/*! For license information please see main.c8d131dd766bbcc19563.js.LICENSE.txt */
(self.webpackChunk_rio_rio_ui=self.webpackChunk_rio_rio_ui||[]).push([[792],{952(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l=p(t(22155)),s=p(t(75235)),c=p(t(63297)),d=p(t(19083)),u=["id","name","text","color","textColor","open","children","size","solid","inline","onToggle"];function p(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},m.apply(null,arguments)}function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var y=s.default.div(a||(a=f(["\n  ",";\n\n  transition-property: background-color, border-top, border-bottom;\n  transition-duration: 0.2s;\n  transition-timing-function: ease-out;\n"])),function(e){var n=e.inline,t=e.theme,a=e.color,r=e.size,i=e.solid;return"\n    background-color:".concat(i?t.colors[a].normal.background:t.colors[a].light.background,";\n    display:").concat(n?"inline-flex":"flex",";\n    padding:").concat(t.geometry[r].spacing,";\n    border-top:3px solid ").concat(t.colors[a].normal.background,";\n    border-bottom:3px solid ").concat(t.colors[a].normal.background,";\n    align-items: center;\n  ")}),g=s.default.div(r||(r=f(["\n  ",";\n"])),function(e){var n=e.inline;return e.theme,e.color,"\n  \n    display:".concat(n?"inline":"block","\n\n  ")}),b=(0,s.default)(d.default)(i||(i=f(["\n  ",";\n  transition: transform 0.2s ease-out;\n"])),function(e){var n=e.open,t=e.inline,a=e.theme;return"\n  \n    margin-left:".concat(t?a.geometry.sm.spacing:"auto",";\n    transform: rotate(").concat(n?"90deg":"0",");\n  ")}),h=s.default.div(o||(o=f(["\n  ",";\n"])),function(e){var n=e.inline;return"\n  \n  display:".concat(n?"inline":"block","\n")});n.default=function(e){var n=e.id,t=e.name,a=e.text,r=e.color,i=void 0===r?"primary":r,o=e.textColor,s=void 0===o?"white":o,d=e.open,p=e.children,f=e.size,v=e.solid,x=e.inline,T=e.onToggle,O=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,u);return l.default.createElement(g,m({inline:x,id:n,name:t},O),l.default.createElement(y,{solid:v,onClick:T,id:"".concat(n,"-Accordion-Header"),name:"".concat(t,"-Accordion-Header"),size:f,inline:x,color:i},l.default.createElement(c.default,{id:"".concat(n,"-Accordion-Header-Text"),size:"lg",color:s},a),l.default.createElement(b,{inline:x,icon:"angle-right",size:"lg",open:d})),d&&l.default.createElement(h,{inline:x,id:"".concat(n,"-Accordion-ChildContainer")},p))}},15053(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c=m(t(22155)),d=m(t(75235)),u=m(t(19083)),p=m(t(63297));function m(e){return e&&e.__esModule?e:{default:e}}function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var y=d.default.div(a||(a=f(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    height: 48px;\n    background-color: white;\n    border-top: 1px solid ".concat(n.colors.inputs.normal.background,";\n    display: flex;\n    flex-direction: row;\n    align-items: center;\n    justify-content: space-between;\n    cursor: pointer;\n    user-select: none;\n\n    &.active {\n      background-color: ").concat(n.colors.primary.normal.background,";\n    }\n  ")}),g=(0,d.default)(p.default)(r||(r=f(["\n  ",";\n"])),function(){return"\n    font-size: calc(10px + 0.6vmin);\n  "}),b=d.default.div(i||(i=f(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    padding-left: ".concat(n.geometry.md.spacing,";\n    p {\n      color: black;\n    }\n\n    &.active p {\n      color: white;\n    }\n  ")}),h=d.default.div(o||(o=f(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    right: ".concat(n.geometry.md.spacing,";\n    color: black;\n    padding-right: 20px;\n    \n    &.active {\n      color: white;\n    }\n  ")}),v=d.default.div(l||(l=f(["\n  display: none;\n  background-color: white;\n  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);\n  z-index: 1;\n  padding: 5px 0;\n  cursor: pointer;\n\n  &.active {\n    display: block;\n  }\n"]))),x=d.default.div(s||(s=f([""])));n.default=function(e){var n=e.dropdown,t=void 0!==n&&n,a=e.children,r=e.click,i=e.text,o=e.activefunc,l=e.className,s=void 0===l?"active":l,d=t&&"active"===s?"chevron-down":"chevron-right";return c.default.createElement("div",null,c.default.createElement(y,{className:s,onClick:function(){return function(e,n){"function"==typeof e&&e(),"function"==typeof n&&n()}(r,o)}},c.default.createElement(b,{className:s},c.default.createElement(g,{weight:"active"===s?"bold":"normal"},i)),c.default.createElement(h,{className:s},c.default.createElement(u.default,{icon:d}))),t&&c.default.createElement(v,{className:s},c.default.Children.map(a,function(e,n){return c.default.createElement(x,{key:n},e)})))}},15418(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i=s(t(22155)),o=s(t(75235)),l=s(t(63297));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var d=o.default.div(a||(a=c(["\n  ",";\n"])),function(e){var n=e.theme;return" \n    height: 36px;\n    display: flex;\n    align-items: center;\n\n    &:hover {\n      background-color: ".concat(n.colors.inputs.normal.background,";\n    }\n\n    &.active {\n      background-color: ").concat(n.colors.inputs.normal.background,";\n    }\n  ")}),u=(0,o.default)(l.default)(r||(r=c(["\n  ",";\n"])),function(e){var n=e.theme;return"  \n    padding-left: ".concat(n.geometry.md.spacing,";\n  ")});n.default=function(e){var n=e.text,t=e.click,a=e.className;return i.default.createElement(d,{onClick:t,className:a},i.default.createElement(u,null,n))}},9243(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s=y(t(22155)),c=y(t(75235)),d=f(t(35351)),u=f(t(19083)),p=f(t(63297)),m=["id","name","size","icon","text","inline","children"];function f(e){return e&&e.__esModule?e:{default:e}}function y(e,n){if("function"==typeof WeakMap)var t=new WeakMap,a=new WeakMap;return(y=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=n?a:t){if(r.has(e))return r.get(e);r.set(e,o)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(o,l,i):o[l]=e[l]);return o})(e,n)}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},g.apply(null,arguments)}function b(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,h(a.key),a)}}function h(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function v(e,n,t){return n=T(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,x()?Reflect.construct(n,t||[],T(e).constructor):n.apply(e,t))}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function O(e,n){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},O(e,n)}function k(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var j=c.default.div(a||(a=k(["\n  ",";\n"])),function(e){var n=e.inline,t=e.theme,a=e.disabled;return"\n    font-family: ".concat(t.accordionFonts.family,";\n    font-weight: ").concat(t.accordionFonts.weight.default,";\n    display: ").concat(n?"inline-flex":"flex",";\n    flex-direction: column;\n    overflow: hidden;\n    opacity: ").concat(a?"0.5":"1",";\n    border-radius: 2px;\n  ")}),C=c.default.div(r||(r=k(["\n  ",";\n"])),function(e){var n=e.size,t=e.theme;return e.disabled,"\n    display: flex;\n    flex-direction: row;\n    align-items: center;\n    background-color: white;\n    padding-left: ".concat(t[n].padding,";\n    height: 70px; \n  ")}),S=c.default.div(i||(i=k([""]))),N=(0,c.default)(u.default)(o||(o=k(["\n  ",";\n"])),function(e){var n=e.sizes,t=e.theme;return e.disabled,"\n    opacity: 0.5;\n    color: ".concat(t.colors.text.dark.background,";\n    font-size: ").concat(t[n].font.size.icon,";\n    padding: ").concat(t[n].iconPadding,";\n  ")}),w=(0,c.default)(p.default)(l||(l=k(["\n  ",";\n"])),function(e){e.size;var n=e.theme;return e.disabled,"\n    // opacity: 0.5;\n    color: ".concat(n.colors.text.dark.background,";\n    font-size: 16px;\n    font-weight: bold;\n    cursor: default;\n    padding-left: 8px;\n  ")}),D=function(e){function n(e){var t;return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),(t=v(this,n,[e])).handleClick=function(e){t.state.activeItem===e?t.setState({activeItem:null}):t.setState({activeItem:e})},t.props=e,t.state={activeItem:null},t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&O(e,n)}(n,e),t=n,a=[{key:"render",value:function(){var e=this,n=this.props,t=n.id,a=n.name,r=n.size,i=void 0===r?"md":r,o=n.icon,l=n.text,u=n.inline,p=n.children,f=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,m);return s.default.createElement(c.ThemeProvider,{theme:d.default},s.default.createElement(j,g({},f,{inline:u,size:i,id:"".concat(t,"-Container"),name:"".concat(a,"-Container")}),s.default.createElement(C,{size:i},s.default.createElement(N,{icon:o,sizes:i,id:"".concat(t,"-IconStyled"),name:"".concat(a,"-IconStyled")}),s.default.createElement(w,{size:i,id:"".concat(t,"-TextStyled"),name:a},l)),s.default.createElement(S,null,s.default.Children.map(p,function(n,t){return n?s.default.cloneElement(n,{key:t,activefunc:function(){e.handleClick(t)},active:e.state.activeItem===t}):null}))))}}],a&&b(t.prototype,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,a}(s.Component);n.default=D},35351(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){var n=e.fonts,t=e.geometry,r=e.colors;return{colors:r,fonts:n,geometry:t,accordionFonts:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},sm:{font:{size:{icon:n.md.size,text:n.xs.size}},padding:t.sm.spacing,iconPadding:(0,a.divide)(t.sm.spacing,12)},md:{font:{size:{icon:n.lg.size,text:n.sm.size}},padding:t.md.spacing,iconPadding:(0,a.divide)(t.md.spacing,12)},lg:{font:{size:{icon:n.xl.size,text:n.md.size}},padding:t.lg.spacing,iconPadding:(0,a.divide)(t.lg.spacing,12)},accordionColors:{primary:r.primary,secondary:r.secondary,tertiary:r.tertiary,info:r.info,success:r.success,warning:r.warning,danger:r.danger}}}},68907(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l=h(t(22155)),s=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),c=h(t(69415)),d=h(t(21670)),u=h(t(3083)),p=h(t(1592)),m=h(t(19083)),f=h(t(1481)),y=h(t(63297)),g=h(t(98844)),b=["id","name","onTemporaryChange","children","temporary","allowsTemporary","temporaryTooltipHeading","temporaryTooltipText"];function h(e){return e&&e.__esModule?e:{default:e}}function v(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,x(a.key),a)}}function x(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function T(e,n,t){return n=k(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,O()?Reflect.construct(n,t||[],k(e).constructor):n.apply(e,t))}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function j(e,n){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},j(e,n)}function C(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var S=s.default.div(a||(a=C(["\n  display: flex;\n  justify-content: space-between;\n  padding: ",";\n  background-color: ",";\n"])),function(e){return e.theme.geometry.sm.spacing},function(e){return e.theme.colors.overlay.light.background}),N=s.default.div(r||(r=C(["\n  position: relative;\n  text-align: right;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n"]))),w=(0,s.default)(d.default)(i||(i=C(["\n  margin-left: ",";\n  border-radius: 100px;\n"])),function(e){return e.theme.geometry.xs.spacing}),D=(0,s.default)(u.default)(o||(o=C(["\n  margin-right: ",";\n"])),function(e){return e.theme.geometry.xs.spacing}),A=function(e){function n(e){var t;return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),(t=T(this,n,[e])).tempAnswerToolTipClickHandler=function(e){t.setState(function(e){return{showTooltip:!e.showTooltip}})},t.state={showTooltip:!1},t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&j(e,n)}(n,e),t=n,a=[{key:"render",value:function(){var e=this.props,n=e.id,t=e.name,a=e.onTemporaryChange,r=e.children,i=e.temporary,o=e.allowsTemporary,d=e.temporaryTooltipHeading,u=e.temporaryTooltipText,h=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,b);return l.default.createElement(s.ThemeProvider,{theme:c.default},l.default.createElement(S,h,o?l.default.createElement(N,null,l.default.createElement(D,{id:"".concat(n,"_TempAnswer"),name:"".concat(t,"-TempAnswer"),inline:!0,onChange:a,checked:i}),l.default.createElement(p.default,{id:"".concat(n,"_checkBoxLabel"),color:"primary",inline:!0,labelFor:"".concat(n,"_TempAnswer")},"This is a temporary answer"),l.default.createElement(w,{color:"primary",id:"".concat(n,"_TempButton"),onClick:this.tempAnswerToolTipClickHandler,size:"xs",inline:!0,pill:!0},l.default.createElement(m.default,{icon:"question",size:"sm"})),l.default.createElement(f.default,{show:this.state.showTooltip,id:"".concat(n,"_toolTip"),color:"white"},l.default.createElement(g.default,{size:"sm",color:"primary"},d),l.default.createElement("br",null),l.default.createElement(y.default,{size:"sm"},u))):l.default.createElement("div",null),l.default.createElement("div",null,r)))}}],a&&v(t.prototype,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,a}(l.default.Component);n.default=A},69415(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){return{colors:e.colors,fonts:e.fonts,geometry:e.geometry}}},1360(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Autocomplete",{enumerable:!0,get:function(){return r.default}});var a,r=(a=t(19049))&&a.__esModule?a:{default:a}},73534(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AutocompleteField=void 0;var a=i(t(75235)),r=i(t(48368));function i(e){return e&&e.__esModule?e:{default:e}}n.AutocompleteField=(0,a.default)(r.default)(function(e){var n=e.theme;return{"& label.Mui-focused":{borderColor:n.colors.primary.normal.background},"& .MuiOutlinedInput-root":{"&:hover fieldset":{borderColor:n.colors.primary.normal.background},"&.Mui-focused fieldset":{borderColor:n.colors.primary.normal.background}},"& .Mui-error":{borderColor:n.colors.danger.background},"& .MuiChip-root":{backgroundColor:n.colors.primary.normal.background,color:n.colors.primary.normal.text},"&& .MuiChip-deleteIcon":{color:"#f2f2f2"},"&& .MuiChip-deleteIcon:hover":{color:n.colors.primary.normal.text},"&& .MuiInputLabel-root.Mui-focused":{color:n.colors.primary.normal.background}}})},65126(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Autocomplete",{enumerable:!0,get:function(){return a.Autocomplete}}),Object.defineProperty(n,"AutocompleteField",{enumerable:!0,get:function(){return r.AutocompleteField}});var a=t(1360),r=t(73534)},8408(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=s(t(22155)),i=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),o=s(t(7943)),l=["children"];function s(e){return e&&e.__esModule?e:{default:e}}var c,d,u=["none","xxs","xxsHalf","xs","xsHalf","sm","smHalf","md","mdHalf","lg","lgHalf","xl","xlHalf","xxl","xxlHalf"],p=["text","text-light","text-normal","text-dark","overlay","overlay-light","overlay-normal","overlay-dark","inputs","inputs-light","inputs-normal","inputs-dark","primary","primary-light","primary-normal","primary-dark","secondary","secondary-light","secondary-normal","secondary-dark","tertiary","tertiary-light","tertiary-normal","tertiary-dark","quaternary","quaternary-light","quaternary-normal","quaternary-dark","neutral","neutral-light","neutral-normal","neutral-dark","info","info-light","info-normal","info-dark","success","success-light","success-normal","success-dark","warning","warning-light","warning-normal","warning-dark","danger","danger-light","danger-normal","danger-dark"],m=i.default.div(a||(c=["\n  ",";\n"],d||(d=c.slice(0)),a=Object.freeze(Object.defineProperties(c,{raw:{value:Object.freeze(d)}}))),function(e){var n=e.theme,t=e.display,a=void 0===t?"block":t,r=e.visuallyHidden,i=(e.shape,e.backgroundColor),o=e.borderColor,l=e.borderSize,s=e.textAlign,c=e.position,d=e.top,m=e.right,f=e.bottom,y=e.left,g=e.grow,b=e.shrink,h=e.flexBasis,v=e.alignSelf,x=e.order,T=e.flexDirection,O=e.flexWrap,k=e.justifyContent,j=e.alignItems,C=e.alignContent,S=e.margin,N=e.marginTop,w=e.marginRight,D=e.marginBottom,A=e.marginLeft,R=e.padding,P=e.paddingTop,L=e.paddingRight,I=e.paddingBottom,E=e.paddingLeft,_=e.overflow,F=e.overflowX,B=e.overflowY,U=e.minHeight,M=e.maxHeight,V=e.height,z=e.minWidth,G=e.maxWidth,$=e.width,W=e.span,q=e.hidden,J=e.fullHeight;return e.sm,e.md,e.lg,"\n    box-sizing: border-box;\n\n    display: ".concat(q?"none":a,";\n    visibility: ").concat(r?"hidden":"initial",";\n    ").concat(i&&"background-color: ".concat(p.includes(i)?n.boxColors[i.split("-",1)[0]][i.split("-")[1]||"normal"].background:i,";"),"\n    ").concat(o&&"border-color: ".concat(p.includes(o)?n.boxColors[o.split("-",1)[0]][o.split("-")[1]||"normal"].background:o,";"),"\n    ").concat(l&&"border-width: ".concat(n.spacing[l].border,";"),"\n    ").concat(l&&o&&"border-style: solid;","\n    ").concat(s&&"text-align: ".concat(s,";"),"\n\n    ").concat(c&&"position: ".concat(c,";"),"\n    ").concat(d&&"top: 0;","\n    ").concat(m&&"right: 0;","\n    ").concat(f&&"bottom: 0;","\n    ").concat(y&&"left: 0;","\n\n    ").concat(g&&"flex-grow: ".concat(g,";"),"\n    ").concat(b&&"flex-shrink: ".concat(b,";"),"\n    ").concat(h&&"flex-basis: ".concat(h,";")||(!!W||0===W||"0"===W)&&"flex-basis: ".concat(W?n.sizes[W]:"0",";"),"\n\n    ").concat(v&&"align-self: ".concat(v,";"),"\n    ").concat(x&&"order: ".concat(x,";"),"\n\n    ").concat(T&&"flex-direction: ".concat(T,";"),"\n    ").concat(O&&"flex-wrap: wrap;","\n    ").concat(k&&"justify-content: ".concat(k,";"),"\n    ").concat(j&&"align-items: ".concat(j,";"),"\n    ").concat(C&&"align-content: ".concat(C,";"),"\n\n    ").concat(S&&"margin: ".concat(u.includes(S)&&n.spacing[S].spacing||S,";"),"\n    ").concat(N&&"margin-top: ".concat(("none"===N?"0":u.includes(N)&&n.spacing[N].spacing)||N,";"),"\n    ").concat(w&&"margin-right: ".concat(("none"===w?"0":u.includes(w)&&n.spacing[w].spacing)||w,";"),"\n    ").concat(D&&"margin-bottom: ".concat(("none"===D?"0":u.includes(D)&&n.spacing[D].spacing)||D,";"),"\n    ").concat(A&&"margin-left: ".concat(("none"===A?"0":u.includes(A)&&n.spacing[A].spacing)||A,";"),"\n\n    ").concat(R&&"padding: ".concat(u.includes(R)&&n.spacing[R].spacing||R,";"),"\n    ").concat(P&&"padding-top: ".concat(("none"===P?"0":u.includes(P)&&n.spacing[P].spacing)||P,";"),"\n    ").concat(L&&"padding-right: ".concat(("none"===L?"0":u.includes(L)&&n.spacing[L].spacing)||L,";"),"\n    ").concat(I&&"padding-bottom: ".concat(("none"===I?"0":u.includes(I)&&n.spacing[I].spacing)||I,";"),"\n    ").concat(E&&"padding-left: ".concat(("none"===E?"0":u.includes(E)&&n.spacing[E].spacing)||E,";"),"\n\n    ").concat(_&&"overflow: ".concat(_,";"),"\n    ").concat(F&&"overflow-x: ".concat(F,";"),"\n    ").concat(B&&"overflow-y: ".concat(B,";"),"\n\n    ").concat(M&&"max-height: ".concat(M,";"),"\n    ").concat(U&&"min-height: ".concat(U,";"),"\n    ").concat(J?"height: 100%;":V&&"height: ".concat(V,";"),"\n\n    ").concat(G&&"max-width: ".concat(G,";")||(!!W||0===W||"0"===W)&&"max-width: ".concat(W?n.sizes[W]:"100%",";"),"\n    ").concat(z&&"min-width: ".concat(z,";"),"\n    ").concat($&&"width: ".concat($,";"),"\n  ")});n.default=function(e){var n=e.children,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,l);return r.default.createElement(i.ThemeProvider,{theme:o.default},r.default.createElement(m,t,n))}},7943(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}n.default=function(e){var n=e.fonts,t=e.geometry,r=e.colors;return i(i({colors:r,fonts:n,geometry:t},t.columns),{},{spacing:{xxs:{spacing:t.xxs.spacing,border:t.xxs.border},xxsHalf:{spacing:(0,a.divide)(t.xxs.spacing,2),border:t.xxs.border},xs:{spacing:t.xs.spacing,border:t.xs.border},xsHalf:{spacing:(0,a.divide)(t.xs.spacing,2),border:t.xs.border},sm:{spacing:t.sm.spacing,border:t.sm.border},smHalf:{spacing:(0,a.divide)(t.sm.spacing,2),border:t.sm.border},md:{spacing:t.md.spacing,border:t.md.border},mdHalf:{spacing:(0,a.divide)(t.md.spacing,2),border:t.md.border},lg:{spacing:t.lg.spacing,border:t.lg.border},lgHalf:{spacing:(0,a.divide)(t.lg.spacing,2),border:t.lg.border},xl:{spacing:t.xl.spacing,border:t.xl.border},xlHalf:{spacing:(0,a.divide)(t.xl.spacing,2),border:t.xl.border},xxl:{spacing:t.xxl.spacing,border:t.xxl.border},xxlHalf:{spacing:(0,a.divide)(t.xxl.spacing,2),border:t.xxl.border}},boxColors:i({},r)})}},42961(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(t(22155)),r=l(t(93107)),i=l(t(63297)),o=l(t(26829));function l(e){return e&&e.__esModule?e:{default:e}}n.default=function(e){var n=e.location.pathname.split("/").slice(1),t=n.length-1;return n.map(function(e,l){return l!==t?a.default.createElement(o.default,{component:"routerLink",to:"/".concat(n.slice(0,l+1).join("/")),color:"normal",size:"sm",inline:!0},(0,r.default)(e)):a.default.createElement(i.default,{size:"sm",inline:!0},(0,r.default)(e))})}},2580(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=o(t(22155)),r=o(t(63297)),i=["children"];function o(e){return e&&e.__esModule?e:{default:e}}n.default=function(e){var n=e.children,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,i),o=a.default.Children.count(n)-1;return a.default.createElement("div",t,a.default.Children.map(n,function(e,n){return n===o?a.default.createElement("span",null,e):a.default.createElement("span",null,e," ",a.default.createElement(r.default,{inline:!0},"/ "))}))}},21670(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=p(t(22155)),i=p(t(75235)),o=u(t(56064)),l=t(97322),s=u(t(84784)),c=["component","size","color","backgroundImage","gradient","pill","outline","inline","submit"],d=["children","component","disabled","loading"];function u(e){return e&&e.__esModule?e:{default:e}}function p(e,n){if("function"==typeof WeakMap)var t=new WeakMap,a=new WeakMap;return(p=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=n?a:t){if(r.has(e))return r.get(e);r.set(e,o)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(o,l,i):o[l]=e[l]);return o})(e,n)}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},m.apply(null,arguments)}function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach(function(n){g(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function g(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function b(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var h,v,x=(0,i.default)(function(e){var n=e.component,t=(e.size,e.color,e.backgroundImage,e.gradient,e.pill,e.outline,e.inline,e.submit,b(e,c));return r.default.cloneElement(r.default.createElement(n,y({},t)),y({},t))})(a||(h=["\n  ",";\n"],v||(v=h.slice(0)),a=Object.freeze(Object.defineProperties(h,{raw:{value:Object.freeze(v)}}))),function(e){var n=e.theme,t=e.size,a=void 0===t?"md":t,r=e.color,i=void 0===r?"primary":r,o=e.pill,l=void 0===o||o,s=e.outline,c=e.inline,d=e.disabled;return"\n    box-sizing: border-box;\n    text-align: center;\n    text-decoration: none;\n    font-family: ".concat(n.font.family,";\n    font-weight: ").concat(n.font.weight,";\n    opacity: ").concat(d?"0.5":"1",";\n    cursor: ").concat(d?"default":"pointer",";\n    width: ").concat(c?"auto":"100%",";\n    display: ").concat(c?"inline-block":"block",";\n    border-style: ").concat(n[a].border.style,";\n    border-width: ").concat(n[a].border.width,";\n    padding: ").concat(n[a].padding,";\n    font-size: ").concat(n[a].font.size,";\n    line-height: ").concat(n[a].font.lineHeight,";\n    border-radius: ").concat(l&&n[a].pill.radius||n[a].radius,";\n    background-color: ").concat(s&&n[i].outline.background||n[i].background,";\n    border-color: ").concat(s&&n[i].outline.border||n[i].border,";\n    color: ").concat(s&&n[i].outline.text||n[i].text,";\n\n    ").concat(!d&&"\n      &:hover {\n        background-color: ".concat(s&&n[i].outline.hover.background||n[i].hover.background,";\n        border-color: ").concat(s&&n[i].outline.hover.border||n[i].hover.border,";\n        color: ").concat(s&&n[i].outline.hover.text||n[i].hover.text,";\n      }\n\n      &:active,\n      .active {\n        background-color: ").concat(s&&n[i].outline.active.background||n[i].active.background,";\n        border-color: ").concat(s&&n[i].outline.active.border||n[i].active.border,";\n        color: ").concat(s&&n[i].outline.active.text||n[i].active.text,";\n      }\n    "),"\n  ")}),T=function(e){var n=e.children;return e.isLoading?r.default.createElement(s.default,{spinner:"SyncLoader",hexColor:"#FFF",size:"xxxs"}):n||null};n.default=(0,r.forwardRef)(function(e,n){var t=e.children,a=e.component,s=void 0===a?"button":a,c=e.disabled,u=e.loading,p=b(e,d);return r.default.createElement(i.ThemeProvider,{theme:o.default},r.default.createElement(x,m({disabled:c||u,component:("button"===s?"button":"a"===s&&"a")||"routerLink"===s&&l.Link||"routerNavLink"===s&&l.NavLink,ref:n},p),r.default.createElement(T,{children:t,isLoading:u})))})},56064(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){var n=e.fonts,t=e.geometry,r=e.colors;return{colors:r,fonts:n,geometry:t,font:{family:n.family,weight:n.weight.default},xs:{border:{width:t.xs.border,style:"solid"},padding:"".concat(t.xxs.spacing," ").concat(t.xs.spacing),radius:t.sm.radius,pill:{radius:(0,a.add)((0,a.divide)(n.xs.lineHeight,2),t.xxs.spacing)},font:{size:n.xs.size,lineHeight:n.xs.lineHeight}},sm:{border:{width:t.sm.border,style:"solid"},padding:"".concat(t.xs.spacing," ").concat(t.sm.spacing),radius:t.md.radius,pill:{radius:(0,a.add)((0,a.divide)(n.sm.lineHeight,2),t.xs.spacing)},font:{size:n.sm.size,lineHeight:n.sm.lineHeight}},md:{border:{width:t.sm.border,style:"solid"},padding:"".concat(t.sm.spacing," ").concat(t.md.spacing),radius:t.md.radius,pill:{radius:(0,a.add)((0,a.divide)(n.md.lineHeight,2),t.sm.spacing)},font:{size:n.md.size,lineHeight:n.md.lineHeight}},lg:{border:{width:t.sm.border,style:"solid"},padding:"".concat(t.md.spacing," ").concat(t.lg.spacing),radius:t.md.radius,pill:{radius:(0,a.add)((0,a.divide)(n.lg.lineHeight,2),t.md.spacing)},font:{size:n.lg.size,lineHeight:n.lg.lineHeight}},xl:{border:{width:t.sm.border,style:"solid"},padding:"".concat(t.lg.spacing," ").concat(t.xl.spacing),radius:t.md.radius,pill:{radius:(0,a.add)((0,a.divide)(n.xl.lineHeight,2),t.lg.spacing)},font:{size:n.xl.size,lineHeight:n.xl.lineHeight}},primary:{background:r.primary.normal.background,border:r.primary.normal.background,text:r.primary.normal.text,hover:{background:r.primary.dark.background,border:r.primary.dark.background,text:r.primary.dark.text},active:{background:r.primary.dark.background,border:r.primary.dark.background,text:r.primary.dark.text},outline:{background:"none",border:r.primary.normal.background,text:r.primary.normal.background,hover:{background:r.primary.normal.background,border:r.primary.normal.background,text:r.primary.normal.text},active:{background:r.primary.normal.background,border:r.primary.normal.background,text:r.primary.normal.text}}},secondary:{background:r.secondary.normal.background,border:r.secondary.normal.background,text:r.secondary.normal.text,hover:{background:r.secondary.dark.background,border:r.secondary.dark.background,text:r.secondary.dark.text},active:{background:r.secondary.dark.background,border:r.secondary.dark.background,text:r.secondary.dark.text},outline:{background:"none",border:r.secondary.normal.background,text:r.secondary.normal.background,hover:{background:r.secondary.normal.background,border:r.secondary.normal.background,text:r.secondary.normal.text},active:{background:r.secondary.normal.background,border:r.secondary.normal.background,text:r.secondary.normal.text}}},tertiary:{background:r.tertiary.normal.background,border:r.tertiary.normal.background,text:r.tertiary.normal.text,hover:{background:r.tertiary.dark.background,border:r.tertiary.dark.background,text:r.tertiary.dark.text},active:{background:r.tertiary.dark.background,border:r.tertiary.dark.background,text:r.tertiary.dark.text},outline:{background:"none",border:r.tertiary.normal.background,text:r.tertiary.normal.background,hover:{background:r.tertiary.normal.background,border:r.tertiary.normal.background,text:r.tertiary.normal.text},active:{background:r.tertiary.normal.background,border:r.tertiary.normal.background,text:r.tertiary.normal.text}}},neutral:{background:r.neutral.normal.background,border:r.neutral.normal.background,text:r.neutral.normal.text,hover:{background:r.neutral.dark.background,border:r.neutral.dark.background,text:r.neutral.dark.text},active:{background:r.neutral.dark.background,border:r.neutral.dark.background,text:r.neutral.dark.text},outline:{background:"none",border:r.neutral.normal.background,text:r.neutral.normal.background,hover:{background:r.neutral.normal.background,border:r.neutral.normal.background,text:r.neutral.normal.text},active:{background:r.neutral.normal.background,border:r.neutral.normal.background,text:r.neutral.normal.text}}},info:{background:r.info.normal.background,border:r.info.normal.background,text:r.info.normal.text,hover:{background:r.info.dark.background,border:r.info.dark.background,text:r.info.dark.text},active:{background:r.info.dark.background,border:r.info.dark.background,text:r.info.dark.text},outline:{background:"none",border:r.info.normal.background,text:r.info.normal.background,hover:{background:r.info.normal.background,border:r.info.normal.background,text:r.info.normal.text},active:{background:r.info.normal.background,border:r.info.normal.background,text:r.info.normal.text}}},success:{background:r.success.normal.background,border:r.success.normal.background,text:r.success.normal.text,hover:{background:r.success.dark.background,border:r.success.dark.background,text:r.success.dark.text},active:{background:r.success.dark.background,border:r.success.dark.background,text:r.success.dark.text},outline:{background:"none",border:r.success.normal.background,text:r.success.normal.background,hover:{background:r.success.normal.background,border:r.success.normal.background,text:r.success.normal.text},active:{background:r.success.normal.background,border:r.success.normal.background,text:r.success.normal.text}}},warning:{background:r.warning.normal.background,border:r.warning.normal.background,text:r.warning.normal.text,hover:{background:r.warning.dark.background,border:r.warning.dark.background,text:r.warning.dark.text},active:{background:r.warning.dark.background,border:r.warning.dark.background,text:r.warning.dark.text},outline:{background:"none",border:r.warning.normal.background,text:r.warning.normal.background,hover:{background:r.warning.normal.background,border:r.warning.normal.background,text:r.warning.normal.text},active:{background:r.warning.normal.background,border:r.warning.normal.background,text:r.warning.normal.text}}},danger:{background:r.danger.normal.background,border:r.danger.normal.background,text:r.danger.normal.text,hover:{background:r.danger.dark.background,border:r.danger.dark.background,text:r.danger.dark.text},active:{background:r.danger.dark.background,border:r.danger.dark.background,text:r.danger.dark.text},outline:{background:"none",border:r.danger.normal.background,text:r.danger.normal.background,hover:{background:r.danger.normal.background,border:r.danger.normal.background,text:r.danger.normal.text},active:{background:r.danger.normal.background,border:r.danger.normal.background,text:r.danger.normal.text}}}}}},36988(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=p(t(22155)),r=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),i=p(t(90334)),o=p(t(64190));t(71031),t(90663);var l,s,c,d,u=p(t(19083));function p(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},m.apply(null,arguments)}function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var y=r.default.div(l||(l=f(["\n  ",";\n"])),function(e){var n=e.width;return"\n    width: ".concat(n,";\n    padding: 0 25px;\n  ")}),g=r.default.div(s||(s=f(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    display: block !important;\n    background-color: transparent !important;\n    color: ".concat(n.arrow.colors.default," !important;\n    font-size: 20px !important;\n\n    &:before {\n      content: none !important;\n    }\n\n    &:active {\n      color: ").concat(n.arrow.colors.active," !important;\n    }\n  ")}),b=r.default.div(c||(c=f(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    margin-top: 20px !important;\n\n    & li button:before {\n      color: ".concat(n.dots.colors.default," !important;\n      font-size: 10px !important;\n    }\n\n    & li.slick-active button:before {\n      color: ").concat(n.dots.colors.active," !important;\n    }\n  ")}),h=r.default.div(d||(d=f(["\n  width: 100%;\n  text-align: center;\n  outline: 0;\n"])));function v(e){var n=e.className,t=e.onClick,r=e.icon,i=e.name;return a.default.createElement(g,{name:i,className:n,onClick:t,inline:!0},a.default.createElement(u.default,{icon:r}))}n.default=function(e){var n={dots:!0,infinite:e.infinite||!1,speed:500,slidesToShow:e.show||3,slidesToScroll:e.scroll||2,nextArrow:a.default.createElement(v,{name:"".concat(e.name||"carousel","__next"),icon:"chevron-right"}),prevArrow:a.default.createElement(v,{name:"".concat(e.name||"carousel","__prev"),icon:"chevron-left"}),appendDots:function(e){return a.default.createElement(b,null,e)}};return a.default.createElement(r.ThemeProvider,{theme:i.default},a.default.createElement(y,{width:e.width||"100%"},a.default.createElement(o.default,m({},n,e),a.default.Children.map(e.children,function(e){return a.default.createElement(h,null,e)}))))}},90334(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,arrow:{colors:{default:a.inputs.dark.background,active:a.inputs.normal.background}},dots:{colors:{default:"#00C8B5",active:"#00C8B5"}}}}},23525(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=c(t(22155)),i=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),o=c(t(93681)),l=c(t(19083)),s=["theme","color","icon"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},d.apply(null,arguments)}var u,p,m=i.default.div(a||(u=["\n  font-size: ",";\n  display: inline-block;\n"],p||(p=u.slice(0)),a=Object.freeze(Object.defineProperties(u,{raw:{value:Object.freeze(p)}}))),function(e){var n=e.theme,t=e.size;return n[void 0===t?"sm":t].size});n.default=(0,i.withTheme)(function(e){var n=e.theme,t=e.color,a=void 0===t?"primary":t,c=e.icon,u=void 0===c?"thumbs-up":c,p=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,s),f=(0,o.default)(n);return r.default.createElement(i.ThemeProvider,{theme:o.default},r.default.createElement(m,d({},p,{className:"fa-layers fa-fw"}),r.default.createElement(l.default,{icon:"certificate",color:f.certificateColors[a].normal.background}),r.default.createElement(l.default,{icon:u,inverse:!0,transform:"shrink-8"})))})},93681(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){var n=e.fonts,t=e.geometry,r=e.colors;return{colors:r,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},xs:{size:(0,a.multiply)(t.xs.spacing,5),font:{size:(0,a.multiply)(n.xs.size,5)}},sm:{size:(0,a.multiply)(t.sm.spacing,5),font:{size:(0,a.multiply)(n.sm.size,5)}},md:{size:(0,a.multiply)(t.md.spacing,5),font:{size:(0,a.multiply)(n.md.size,3)}},lg:{size:(0,a.multiply)(t.lg.spacing,5),font:{size:(0,a.multiply)(n.lg.size,5)}},xl:{size:(0,a.multiply)(t.xl.spacing,5),font:{size:(0,a.multiply)(n.xl.size,5)}},certificateColors:{primary:r.primary,secondary:r.secondary,tertiary:r.tertiary,quaternary:r.quaternary,quinary:r.quinary,senary:r.senary,info:r.info,success:r.success,warning:r.warning,danger:r.danger}}}},3083(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o=d(t(22155)),l=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),s=d(t(28775)),c=["id","name","onChange","checked","size","success","error","disabled","inline","readOnly"];function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},u.apply(null,arguments)}function p(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var m=l.default.div(a||(a=p(["\n  ",";\n"])),function(e){var n=e.inline,t=e.disabled,a=e.success,r=e.error,i=e.theme;return"\n    display: ".concat(n?"inline-block":"block",";\n    position: relative;\n\n    ").concat(!t&&!a&&!r&&"\n    &:hover input ~ span {\n      border-color: ".concat(i.checkboxColors.active.border,";\n    }"),"\n  ")}),f=l.default.input(r||(r=p(["\n  ",";\n"])),function(e){var n=e.error,t=e.theme,a=e.success;return"\n    position: absolute;\n    z-index: 0;\n    opacity: 0;\n\n    &:checked + div {\n      border-color: ".concat(n&&t.checkboxColors.error.border||a&&t.checkboxColors.success.border||t.checkboxColors.checked.border,";\n    }\n\n    &:checked + div:after {\n      display: block;\n    }\n  ")}),y=l.default.div(i||(i=p(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size,a=e.error,r=e.success,i=e.disabled,o=e.checked;return"\n    position: relative;\n    z-index: 0;\n    opacity: 0.99;\n    height: ".concat(n[t].height,";\n    width: ").concat(n[t].width,";\n    background-color: ").concat(o&&n.checkboxColors.checked.background||a&&n.checkboxColors.error.background||r&&n.checkboxColors.success.background||n.checkboxColors.default.background,";\n    border-width: ").concat(n[t].border.width,";\n    border-color: ").concat(o&&n.checkboxColors.checked.border||a&&n.checkboxColors.error.border||r&&n.checkboxColors.success.border||n.checkboxColors.default.border,";\n    border-style: solid;\n    border-radius: ").concat(n[t].border.radius,";\n    opacity: ").concat(i?"0.5":"1",";\n    cursor: ").concat(i?"default":"pointer",";\n\n    &:after {\n      content: '';\n      background-image: url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3E%3Cpath fill='").concat(o&&n.checkboxColors.checked.check||a&&n.checkboxColors.error.border||r&&n.checkboxColors.success.border||n.checkboxColors.checked.border,"' d='M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z'/%3E%3C/svg%3E\");\n      height: ").concat(n[t].check.size,";\n      width: ").concat(n[t].check.size,";\n      margin-top: 11%;\n      margin-left: 11%;\n      display: none;\n    }\n  ")});n.default=function(e){var n=e.id,t=e.name,a=e.onChange,r=e.checked,i=e.size,d=void 0===i?"sm":i,p=e.success,g=e.error,b=e.disabled,h=e.inline,v=e.readOnly,x=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,c);return o.default.createElement(l.ThemeProvider,{theme:s.default},o.default.createElement(m,u({inline:h,disabled:b,success:p,error:g,id:"".concat(n,"Container"),name:"".concat(t,"Container"),onClick:function(){!b&&a&&a({target:{name:t,type:"checkbox",checked:!r}})}},x),o.default.createElement(f,{error:g,success:p,type:"checkbox",id:n,name:t,checked:r,disabled:b,readOnly:v}),o.default.createElement(y,{size:d,error:g,success:p,disabled:b,checked:r})))}},28775(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){var n=e.fonts,t=e.geometry,r=e.colors;return{colors:r,fonts:n,geometry:t,sm:{height:n.sm.lineHeight,width:n.sm.lineHeight,border:{width:t.md.border,style:"solid",radius:"4px"},check:{size:(0,a.multiply)(n.sm.lineHeight,.6)}},md:{height:n.md.lineHeight,width:n.md.lineHeight,border:{width:t.md.border,style:"solid",radius:"6px"},check:{size:(0,a.multiply)(n.md.lineHeight,.7)}},lg:{height:n.lg.lineHeight,width:n.lg.lineHeight,border:{width:t.md.border,style:"solid",radius:"8px"},check:{size:(0,a.multiply)(n.lg.lineHeight,.7)}},xl:{height:n.xl.lineHeight,width:n.xl.lineHeight,border:{width:t.md.border,style:"solid",radius:"10px"},check:{size:(0,a.multiply)(n.xl.lineHeight,.7)}},checkboxColors:{default:{border:r.inputs.dark.background,background:r.inputs.light.background},dark:{border:r.inputs.dark.background,background:r.inputs.light.background},active:{border:r.info.normal.background,background:r.inputs.light.background},checked:{border:r.primary.normal.background,background:r.primary.normal.background,check:r.basic.white},success:{border:r.success.normal.background,background:r.inputs.light.background},error:{border:r.danger.normal.background,background:r.inputs.light.background}}}}},98339(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i=u(t(22155)),o=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),l=u(t(91935)),s=u(t(19083)),c=["iconColor"],d=["icon","size","iconColor","solid"];function u(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},p.apply(null,arguments)}function m(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var y=o.default.span(a||(a=f(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size,a=e.circleColor,r=void 0===a?"primary":a,i=e.height,o=e.solid;return"\n    border-width: ".concat(n[t].border.width,";\n    border-color: ").concat(n.iconColors[r].border,";\n    border-style: ").concat(n[t].border.style,";\n    border-radius: 50%;\n    width: ").concat(i||n[t].width,";\n    height: ").concat(i||n[t].height,";\n    padding: 0;\n    display: flex;\n    align-items: center;\n\n    ").concat(o?"background-color: ".concat(n.iconColors[r].border):"","\n  ")}),g=(0,o.default)(function(e){e.iconColor;var n=m(e,c);return i.default.createElement(s.default,n)})(r||(r=f(["\n  ",";\n"])),function(e){var n=e.theme,t=e.iconColor;return"\n    flex: 1;\n    width: 60%;\n    height: 60%;\n    color: ".concat(n.iconColors[t].border,";\n  ")});n.default=function(e){var n=e.icon,t=e.size,a=void 0===t?"md":t,r=e.iconColor,s=void 0===r?"primary":r,c=e.solid,u=m(e,d);return i.default.createElement(o.ThemeProvider,{theme:l.default},i.default.createElement(y,p({},u,{size:a,solid:c}),i.default.createElement(g,{iconColor:s,icon:n})))}},91935(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,xxs:{border:{width:t.xxs.border,style:"solid"},width:t.xxs.profile.size,height:t.xxs.profile.size,padding:t.xxs.profile.padding},xs:{border:{width:t.xs.border,style:"solid"},width:t.xs.profile.size,height:t.xs.profile.size,padding:t.xs.profile.padding},sm:{border:{width:t.sm.border,style:"solid"},width:t.sm.profile.size,height:t.sm.profile.size,padding:t.sm.profile.padding},md:{border:{width:t.md.border,style:"solid"},width:t.md.profile.size,height:t.md.profile.size,padding:t.md.profile.padding},lg:{border:{width:t.lg.border,style:"solid"},width:t.lg.profile.size,height:t.lg.profile.size,padding:t.lg.profile.padding},xl:{border:{width:t.xl.border,style:"solid"},width:t.xl.profile.size,height:t.xl.profile.size,padding:t.xl.profile.padding},iconColors:{primary:{border:a.primary.normal.background},secondary:{border:a.secondary.normal.background},tertiary:{border:a.tertiary.normal.background},quaternary:{border:a.quaternary.normal.background},quinary:{border:a.quinary.normal.background},senary:{border:a.senary.normal.background},neutral:{border:a.neutral.normal.background},info:{border:a.info.normal.background},success:{border:a.success.normal.background},warning:{border:a.warning.normal.background},danger:{border:a.danger.normal.background},white:{border:"white"},normal:{border:a.neutral.dark.background}}}}},26560(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=s(t(22155)),i=s(t(75235)),o=t(16463),l=["children"];function s(e){return e&&e.__esModule?e:{default:e}}var c,d,u=i.default.div(a||(c=["\n  ",";\n"],d||(d=c.slice(0)),a=Object.freeze(Object.defineProperties(c,{raw:{value:Object.freeze(d)}}))),function(e){var n=e.hidden,t=e.container,a=e.span,r=e.item,i=e.grow,l=e.shrink,s=e.reverse,c=e.distribution,d=void 0===c?"stretch":c,u=e.vdistribution,p=void 0===u?"stretch":u,m=e.itemAlign,f=void 0===m?"stretch":m,y=e.visuallyHidden,g=e.fullHeight,b=e.wrap,h=void 0===b||b;return"\n    box-sizing: border-box;\n    display: ".concat((n?"none":t&&"flex")||"initial",";\n    flex-basis ").concat(!a&&0!==a&&"0"!==a&&r?"auto":a?(0,o.getSpanWidth)(a):"0",";\n    max-width: ").concat(a?(0,o.getSpanWidth)(a):"100%",";\n    flex-grow: ").concat((!!i||0===i||"0"===i)&&i||r&&"1"||"initial",";\n    flex-shrink: ").concat((!!l||0===l||"0"===l)&&l||r&&"1"||"initial",";\n    flex-direction: ").concat(s?"column-reverse":"column",";\n    flex-wrap: ").concat(h,";\n    align-content: ").concat(d&&(("stretch"===d?"stretch":"center"===d&&"center")||"start"===d&&"flex-start"||"end"===d&&"flex-end"||"between"===d&&"space-between"||"around"===d&&"space-around")||"initial",";\n    justify-content: ").concat(p&&(("stretch"===p?"stretch":"center"===p&&"center")||"start"===p&&"flex-start"||"end"===p&&"flex-end"||"between"===p&&"space-between"||"around"===p&&"space-around")||"initial",";\n    align-items: ").concat((f&&"stretch"===f?"stretch":"center"===f&&"center")||"top"===f&&"flex-start"||"bottom"===f&&"flex-end"||"baseline"===f&&"baseline"||"initial",";\n    visibility: ").concat(y?"hidden":"initial",";\n    height: ").concat(g?"100%;":"initial",";\n  ")});n.default=function(e){var n=e.children,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,l);return r.default.createElement(u,t,n)}},12544(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o=d(t(22155)),l=d(t(75235)),s=d(t(68907)),c=["children"];function d(e){return e&&e.__esModule?e:{default:e}}function u(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,p(a.key),a)}}function p(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function m(e,n,t){return n=y(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(n,t||[],y(e).constructor):n.apply(e,t))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function g(e,n){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},g(e,n)}function b(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var h=l.default.div(a||(a=b(["\n  display: flex;\n  flex-direction: column;\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  overflow: auto;\n"])),function(e){return e.theme.colors.inputs.light.background},function(e){var n=e.theme;return"1px solid ".concat(n.colors.inputs.normal.background)},function(e){return e.theme.geometry.md.radius}),v=l.default.div(r||(r=b(["\n  padding: ",";\n"])),function(e){return e.theme.geometry.lg.spacing}),x=l.default.div(i||(i=b(["\n  margin-bottom: ",";\n"])),function(e){return e.theme.geometry.sm.spacing}),T=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),m(this,n,arguments)}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&g(e,n)}(n,e),t=n,a=[{key:"render",value:function(){var e=this.props,n=e.children,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,c);return o.default.createElement(h,t,n)}}],a&&u(t.prototype,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,a}(o.default.Component);T.BodyContainer=v,T.TextContainer=x,T.Footer=s.default,n.default=T},38597(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c,d=h(t(75235)),u=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(22155)),p=h(t(19083)),m=h(t(98844)),f=h(t(63297)),y=h(t(21670)),g=h(t(88695)),b=["id","name","title","body","icon","children","retry","report","details"];function h(e){return e&&e.__esModule?e:{default:e}}function v(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function x(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var T=d.default.div(a||(a=x(["\n  display: flex;\n  flex: 1 1 auto;\n  justify-content: center;\n  align-items: center;\n  background: ",";\n  padding: ",";\n"])),function(e){return e.theme.colors.overlay.light.background},function(e){return e.theme.geometry.md.spacing}),O=d.default.div(r||(r=x(["\n  text-align: center;\n"]))),k=(0,d.default)(p.default)(i||(i=x(["\n  color: ",";\n  display: block;\n  font-size: ",";\n  margin: 0 auto "," auto;\n"])),function(e){return e.theme.colors.text.light.background},function(e){return e.theme.geometry.xxl.spacing},function(e){return e.theme.geometry.md.spacing}),j=(0,d.default)(y.default)(o||(o=x(["\n  display: flex;\n  margin: "," auto 0 auto;\n  padding-left: ",";\n  padding-right: ",";\n  justify-content: center;\n  align-items: center;\n"])),function(e){return e.theme.geometry.md.spacing},function(e){return e.theme.geometry.md.spacing},function(e){return e.theme.geometry.md.spacing}),C=(0,d.default)(p.default)(l||(l=x(["\n  margin-left: ",";\n"])),function(e){return e.theme.geometry.xs.spacing}),S=(0,d.default)(f.default)(s||(s=x(["\n  min-height: 300px;\n  padding: ",";\n"])),function(e){return e.theme.geometry.md.spacing}),N=d.default.div(c||(c=x(["\n  display: flex;\n  justify-content: center;\n"])));n.default=function(e){e.id,e.name;var n,t,a=e.title,r=e.body,i=e.icon,o=e.children,l=e.retry,s=e.report,c=e.details,d=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,b),p=(n=(0,u.useState)(!1),t=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,r,i,o,l=[],s=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;s=!1}else for(;!(s=(a=i.call(t)).done)&&(l.push(a.value),l.length!==n);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return l}}(n,t)||function(e,n){if(e){if("string"==typeof e)return v(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(e,n):void 0}}(n,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.")}()),y=p[0],h=p[1];return u.default.createElement(T,d,u.default.createElement(O,null,i&&u.default.createElement(k,{icon:i}),a&&u.default.createElement(m.default,{align:"center",size:"md",color:"dark"},a),r&&u.default.createElement(f.default,{align:"center",size:"md",color:"dark"},r),o&&u.default.createElement(f.default,{align:"center",size:"md",color:"dark"},o),u.default.createElement(N,null,l&&u.default.createElement(j,{inline:!0,size:"sm",outline:!0,color:"primary",onClick:function(){return l()}},"Retry ",u.default.createElement(C,{icon:"redo-alt"})),s&&u.default.createElement(j,{inline:!0,size:"sm",outline:!0,color:"secondary",onClick:function(){return s()}},"Report ",u.default.createElement(C,{icon:"paper-plane"})),c&&u.default.createElement(j,{inline:!0,size:"sm",outline:!0,color:"tertiary",onClick:function(){return h(!0)}},"Details ",u.default.createElement(C,{icon:"info"}))),u.default.createElement(g.default,{show:y,size:"sm",onDismiss:function(){return h(!1)}},u.default.createElement(m.default,{align:"center",size:"md",color:"dark"},"Error details:"),u.default.createElement(S,{align:"center",size:"md",color:"dark"},c))))}},13890(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(22155)),i=(a=t(75235))&&a.__esModule?a:{default:a},o=t(53506),l=t(43076),s=t(64694);t(38957);var c,d=["onMarkdownChange","sourceContent"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},u.apply(null,arguments)}function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}var m=i.default.div(c||(c=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  min-width: 100%;\n\n  .editor-class {\n    border: 1px solid #f1f1f1;\n    border-radius: 2px;\n  }\n\n  .wrapper-class {\n    width: 75%;\n    height: 250px;\n  }\n"])));n.default=function(e){var n=e.onMarkdownChange,t=e.sourceContent,a=void 0===t?"":t,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,d),c=(0,s.markdownToDraft)(a),f=(0,o.convertFromRaw)(c),y=function(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,r,i,o,l=[],s=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;s=!1}else for(;!(s=(a=i.call(t)).done)&&(l.push(a.value),l.length!==n);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return l}}(e,n)||function(e,n){if(e){if("string"==typeof e)return p(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?p(e,n):void 0}}(e,n)||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.")}()}((0,r.useState)(o.EditorState.createWithContent(f)),2),g=y[0],b=y[1];return r.default.createElement(m,null,r.default.createElement(l.Editor,u({toolbar:{options:["inline","blockType","list","link","emoji","remove","history","image"],inline:{inDropdown:!1,options:["bold","italic","underline","monospace"]},list:{inDropdown:!0},link:{inDropdown:!0},history:{inDropdown:!0}}},i,{editorState:g,wrapperClassName:"wrapper-class",editorClassName:"editor-class",toolbarClassName:"toolbar-class",onEditorStateChange:function(e){b(e),n((0,s.draftToMarkdown)((0,o.convertToRaw)(e.getCurrentContent())))}})))}},87392(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=o(t(22155)),r=o(t(36656)),i=["className","dayPickerRef"];function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},l.apply(null,arguments)}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach(function(n){d(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n,t){return(n=p(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function u(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,p(a.key),a)}}function p(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function m(e,n,t){return n=y(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(n,t||[],y(e).constructor):n.apply(e,t))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function g(e,n){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},g(e,n)}var b=r.default.defaultProps.classNames;n.default=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),m(this,n,arguments)}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&g(e,n)}(n,e),t=n,o=[{key:"render",value:function(){var e=this.props,n=e.className,t=e.dayPickerRef,o=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,i);return a.default.createElement(r.default,l({classNames:c(c({},b),{},{container:"".concat(b.container," ").concat(n)}),ref:t},o))}}],o&&u(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o}(a.default.Component)},25188(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=j(t(22155)),r=k(t(75235)),i=k(t(86704));t(61575),t(5712);var o,l,s,c,d,u,p,m,f=j(t(63238)),y=j(t(87392)),g=j(t(19083)),b=j(t(70050)),h=j(t(26560)),v=j(t(63297)),x=j(t(58582)),T=t(16463),O=["id","name","color","placeholder","selectedDate","onDayClick","disabledDates","disabledDatesBefore","disabledDatesAfter","size","box","pill","inline","disabled","error","readOnly"];function k(e,n){if("function"==typeof WeakMap)var t=new WeakMap,a=new WeakMap;return(k=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=n?a:t){if(r.has(e))return r.get(e);r.set(e,o)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(o,l,i):o[l]=e[l]);return o})(e,n)}function j(e){return e&&e.__esModule?e:{default:e}}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},C.apply(null,arguments)}function S(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,N(a.key),a)}}function N(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function w(e,n,t){return n=A(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,D()?Reflect.construct(n,t||[],A(e).constructor):n.apply(e,t))}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(D=function(){return!!e})()}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function R(e,n){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},R(e,n)}function P(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var L=(0,r.keyframes)(o||(o=P(["\n  0% { opacity: 0; }\n  100% { opacity: 1; }\n"]))),I=(0,r.css)(l||(l=P(["\n  "," 0.3s;\n"])),L),E=(0,r.default)(h.default)(s||(s=P(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    overflow: visible;\n    font-family: ".concat(n.fonts.family,";\n    font-weight: ").concat(n.fonts.weight.default,";\n  ")}),_=(0,r.default)(y.default)(c||(c=P(["\n  ",";\n"])),function(e){var n=e.theme,t=e.color,a=e.size;return(0,r.css)(d||(d=P(["\n    color: ",";\n    font-size: ",";\n    line-height: ",";\n    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);\n    background-color: white;\n    background: #f00;\n\n    .DayPicker-Day--today {\n      color: ",";\n      font-weight: ",";\n    }\n\n    .DayPicker-Day--disabled {\n      color: ",";\n    }\n    .DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside) {\n      background-color: ",";\n      color: ",";\n    }\n\n    .DayPicker:not(.DayPicker--interactionDisabled) .DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--outside):hover {\n      background-color: ",";\n    }\n    .DayPickerInput-Overlay {\n      border-radius: ",";\n      margin-left: -",";\n      margin-top: ",";\n      animation: ",";\n    }\n\n    background: transparent;\n    box-shadow: none;\n    display: flex;\n    flex: 1;\n  "])),n.textColors.default.text,n[a].font.size.default,n[a].font.lineHeight,n.colors[t].normal.background,n.fonts.weight.bold,n.colors.neutral.normal.background,n.colors[t].normal.background,n.colors[t].normal.text,n.colors[t].light.background,n[a].radius,n[a].padding.horizontal,(0,T.multiply)(n[a].padding.vertical,2),I)}),F=r.default.div(u||(u=P(["\n  ",";\n"])),function(e){var n=e.box,t=e.inline,a=e.pill,r=e.size,i=e.theme,o=e.error;return"\n    display:".concat(t?"inline-flex":"flex",";\n    outline: ").concat(n?i[r].border.width:"0",";\n    border-width: ").concat(n?i[r].border.width:"0 0 ".concat(i[r].border.width," 0"),";\n    border-color: ").concat(o?i.colors.danger.normal.background:i.textColors.default.border,";\n    border-style: ").concat(i[r].border.style,";\n    border-radius: ").concat(n&&(a?"5000px":i[r].radius),";\n    align-items: center;\n    background-color: ").concat(i.textColors.default.background,";\n    cursor:text;\n    padding: ").concat(i[r].padding.vertical," ").concat(i[r].padding.horizontal,";\n    \n\n  ")}),B=(0,r.default)(g.default)(p||(p=P(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size,a=e.color,r=e.clickable;return"\n    color: ".concat(n.colors[a].normal.background,";\n    font-size: ").concat(n[t].font.size.small,";\n    margin-right: ").concat(n[t].margin,";\n    cursor: ").concat(r?"pointer":"none",";\n  ")}),U=r.default.div(m||(m=P(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    padding: ".concat(n[t].padding.vertical," ").concat(n[t].padding.horizontal,";\n  ")}),M=function(e){function n(e){var t;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),(t=w(this,n,[e])).datePicker=a.default.createRef(),t.handleYearMonthChange=function(e){t.datePicker.current.getInput().focus(),t.setState({month:e})},t.getDisabledDatesArray=function(e,n,t){return(e||[]).concat([{before:t||void 0,after:n||void 0}])},t.getYearMonthSelector=function(e){return a.default.createElement(x.default,{name:"".concat(t.props.name,"-YearMonthSelector"),onChange:t.handleYearMonthChange,selectedDate:e.date})};var r=e.selectedDate?e.selectedDate:new Date;return t.state={month:new Date(r.getUTCFullYear(),r.getMonth()),show:!1},t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&R(e,n)}(n,e),t=n,o=[{key:"render",value:function(){var e=this,n=this.props,t=n.id,o=n.name,l=n.color,s=void 0===l?"primary":l,c=n.placeholder,d=n.selectedDate,u=n.onDayClick,p=n.disabledDates,m=n.disabledDatesBefore,y=n.disabledDatesAfter,g=n.size,h=void 0===g?"md":g,x=n.box,T=void 0===x||x,k=n.pill,j=void 0===k||k,S=n.inline,N=n.disabled,w=n.error,D=n.readOnly,A=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,O),R=("sm"===h?"xs":"md"===h&&"sm")||"lg"===h&&"md"||"xl"===h&&"lg"||void 0;return a.default.createElement(r.ThemeProvider,{theme:f.default},a.default.createElement(E,C({name:"".concat(o,"-OuterContainer"),container:!0},A,{id:"".concat(t,"-OuterContainer")}),a.default.createElement(b.default,{item:!0,vdistribution:"center"},a.default.createElement(F,{onClick:function(){e.state.show||D||(e.datePicker.current.handleInputClick(),e.datePicker.current.getInput().focus(),e.setState({show:!0}))},name:"".concat(o,"-TextContainer"),box:T,inline:S,pill:j,size:h,disabled:N,error:w},a.default.createElement(_,{dayPickerRef:this.datePicker,value:d,onDayChange:function(e,n,t){u(e,n,t,o)},onDayPickerHide:function(){return e.setState({show:!1})},dayPickerProps:{name:"".concat(o,"-DayPicker"),month:this.state.month,showOutsideDays:!0,color:s,selectedDays:d,disabledDays:this.getDisabledDatesArray(p,y,m),captionElement:this.getYearMonthSelector,locale:"en-gb",localeUtils:i.default},inputProps:{readOnly:D,disabled:N},keepFocus:!1,inline:S,size:h,color:s,formatDate:i.formatDate,parseDate:i.parseDate,placeholder:c,format:"L",disabled:N,readOnly:D}),!d&&a.default.createElement(B,{color:s,size:h,icon:"calendar-alt"}),d&&a.default.createElement(B,{clickable:!0,onClick:function(e){u(""),e.stopPropagation()},color:s,size:h,icon:"times-circle"}))),a.default.createElement(b.default,null,w&&a.default.createElement(U,{size:h},a.default.createElement(v.default,{size:R,weight:"bold",color:"danger"},w)))))}}],o&&S(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o}(a.default.Component);n.default=M},63238(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.colors,t=e.fonts,a=e.geometry;return{fonts:t,geometry:a,colors:n,textColors:{default:{border:n.inputs.normal.background,background:n.inputs.light.background,text:n.text.dark.background,placeholder:n.inputs.dark.background},dark:{border:n.inputs.dark.background,background:n.inputs.dark.background,text:n.text.dark.background,placeholder:n.inputs.dark.background},active:{border:n.info.normal.background,background:n.inputs.light.background,text:n.text.dark.background,placeholder:n.inputs.dark.background},success:{border:n.success.normal.background,background:n.inputs.light.background,text:n.text.dark.background,placeholder:n.inputs.dark.background},error:{border:n.danger.normal.background,background:n.inputs.light.background,text:n.text.dark.background,placeholder:n.inputs.dark.background}},sm:{border:{width:a.sm.border,style:"solid"},margin:a.sm.spacing,padding:{vertical:a.xs.spacing,horizontal:a.sm.spacing},radius:a.md.radius,font:{size:{default:t.sm.size,small:t.xs.size},lineHeight:t.sm.lineHeight}},md:{border:{width:a.md.border,style:"solid"},margin:a.sm.spacing,padding:{vertical:a.sm.spacing,horizontal:a.md.spacing},radius:a.md.radius,font:{size:{default:t.md.size,small:t.sm.size},lineHeight:t.md.lineHeight}},lg:{border:{width:a.md.border,style:"solid"},margin:a.md.spacing,padding:{vertical:a.md.spacing,horizontal:a.lg.spacing},radius:a.md.radius,font:{size:{default:t.lg.size,small:t.md.size},lineHeight:t.lg.lineHeight}},xl:{border:{width:a.lg.border,style:"solid"},margin:a.md.spacing,padding:{vertical:a.lg.spacing,horizontal:a.xl.spacing},radius:a.md.radius,font:{size:{default:t.xl.size,small:t.lg.size},lineHeight:t.xl.lineHeight}}}}},83681(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Draggable",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"DraggableCore",{enumerable:!0,get:function(){return a.DraggableCore}});var a=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(8668))},11431(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,r(t(22155));var a=r(t(5821));function r(e){return e&&e.__esModule?e:{default:e}}var i=function(e){var n=e.error,t=void 0===n?{}:n,a=e.children;return t&&t.message?a({title:"This page failed to load",body:"There was a problem loading this page, please try again.",icon:"exclamation-triangle"}):null};i.propTypes={error:a.default.object,details:a.default.bool,children:a.default.func.isRequired},n.default=i},18917(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c=g(t(22155)),d=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),u=g(t(13649)),p=t(16463),m=g(t(98844)),f=g(t(63297)),y=g(t(98339));function g(e){return e&&e.__esModule?e:{default:e}}function b(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var h=d.default.div(a||(a=b(["\n  ",";\n"])),function(e){var n=e.uploaded,t=e.theme,a=e.size;return"\n    background-color: ".concat(n?t.evidenceColors.green:t.evidenceColors.white,";\n    border-radius: 12px;\n    border: 1px solid grey;\n    box-shadow: 0 0 7px 7px rgba(220, 218, 218, 0.3);\n\n    width: ").concat(t[a].width,";\n    height: ").concat(t[a].height,";\n\n    cursor: pointer;\n  ")}),v=d.default.div(r||(r=b(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    height: ".concat((0,p.multiply)((0,p.divide)(n[t].height,8),3),";\n    width: 100%; \n  ")}),x=d.default.div(i||(i=b(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    height: ".concat((0,p.multiply)((0,p.divide)(n[t].height,8),3),";\n    width: 100%;  \n  ")}),T=d.default.div(o||(o=b(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    height: ".concat((0,p.multiply)((0,p.divide)(n[t].height,8),2),";\n    width: 100%;  \n  ")}),O=d.default.div(l||(l=b(["\n  ",";\n"])),function(e){var n=e.uploaded,t=e.theme;return"\n    position: relative;\n    top: 50%;\n    transform: translateY(-50%);\n    text-align: center;\n\n    & a {\n      color: ".concat(n?t.evidenceColors.white:t.evidenceColors.green,";\n    }\n  ")}),k=d.default.div(s||(s=b(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n"])));n.default=function(e){var n=e.title,t=e.desc,a=e.uploaded,r=e.size,i=void 0===r?"md":r,o=e.onClick,l=["sm","md","lg","xl"];return c.default.createElement(d.ThemeProvider,{theme:u.default},c.default.createElement(h,{uploaded:a,size:i,onClick:o},c.default.createElement(v,{size:i},c.default.createElement(O,null,c.default.createElement(m.default,{size:l[l.indexOf(i)+1]||"xl",align:"center",color:a?"white":"normal"},n),c.default.createElement(f.default,{size:i,align:"center",color:a?"white":"normal"},t))),c.default.createElement(x,{size:i},c.default.createElement(k,null,c.default.createElement(y.default,{solid:!a,circleColor:a?"white":"tertiary",iconColor:"white",icon:a?"check":"plus",size:l[l.indexOf(i)-1]||"sm",border:"heavy"}))),c.default.createElement(T,{size:i},c.default.createElement(O,{uploaded:a},a?"View":"Upload"))))}},13649(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){var n=e.colors,t=e.fonts,r=e.geometry;return{colors:n,fonts:t,geometry:r,sm:{width:(0,a.multiply)(r.sm.spacing,8),height:(0,a.multiply)(r.sm.spacing,16)},md:{width:(0,a.multiply)(r.md.spacing,8),height:(0,a.multiply)(r.md.spacing,16)},lg:{width:(0,a.multiply)(r.lg.spacing,8),height:(0,a.multiply)(r.lg.spacing,16)},xl:{width:(0,a.multiply)(r.xl.spacing,8),height:(0,a.multiply)(r.xl.spacing,16)},evidenceColors:{white:n.basic.white,green:"#00C8B5"}}}},57999(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i=d(t(22155)),o=d(t(75235)),l=d(t(3083)),s=d(t(1592)),c=["id","name","text","checked","color","onChange"];function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},u.apply(null,arguments)}function p(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var m=o.default.div(a||(a=p(["\n  display: inline-flex;\n  flex-direction: row;\n  align-items: center;\n"]))),f=(0,o.default)(l.default)(r||(r=p(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    margin-right:".concat(n.geometry.xxs.spacing,";\n")});n.default=function(e){var n=e.id,t=e.name,a=e.text,r=e.checked,o=e.color,l=e.onChange,d=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,c);return i.default.createElement(m,u({id:"".concat(n,"-Container"),name:"".concat(t,"-Container")},d),i.default.createElement(f,{id:n,name:t,onChange:l,checked:r}),i.default.createElement(s.default,{id:"".concat(n,"-Container-Label"),name:"".concat(t,"-Container-Label"),color:o,labelFor:n},a))}},95020(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i=c(t(22155)),o=c(t(75235)),l=c(t(57999)),s=["id","name","children","columns"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},d.apply(null,arguments)}function u(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var p=o.default.div(a||(a=u(["\n  display: flex;\n  flex-flow: row wrap;\n  width: 100%;\n"]))),m=o.default.div(r||(r=u(["\n  display: flex;\n  flex-flow: row nowrap;\n  flex: ",";\n"])),function(e){return"0 0 ".concat(100/e.columns,"%")}),f=function(e){var n=e.id,t=e.name,a=e.children,r=e.columns,o=void 0===r?3:r,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,s);return i.default.createElement(p,d({id:n,name:t},l),i.default.Children.map(a,function(e){return i.default.createElement(m,{columns:o},e)}))};f.Checkbox=l.default,n.default=f},84784(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=s(t(22155)),r=t(5372),i=t(75235),o=s(t(60410)),l=["id","name","spinner","color","size","hexColor"];function s(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},c.apply(null,arguments)}var d={BarLoader:r.BarLoader,BeatLoader:r.BeatLoader,BounceLoader:r.BounceLoader,ClipLoader:r.ClipLoader,DotLoader:r.DotLoader,FadeLoader:r.FadeLoader,HashLoader:r.HashLoader,MoonLoader:r.MoonLoader,PropagateLoader:r.PropagateLoader,PulseLoader:r.PulseLoader,RotateLoader:r.RotateLoader,ScaleLoader:r.ScaleLoader,SyncLoader:r.SyncLoader},u=function(e){var n=e.id,t=e.name,r=e.spinner,i=void 0===r?"BounceLoader":r,o=e.color,s=void 0===o?"primary":o,u=e.size,p=void 0===u?"md":u,m=e.hexColor,f=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,l),y=d[i];return a.default.createElement(y,c({id:"".concat(n,"-Spinner"),name:"".concat(t,"-Spinner"),color:m||e.theme.colors[s].normal.background,size:parseInt(e.theme.sizes[p].size,10)},f))};n.default=function(e){var n=(0,i.withTheme)(u);return a.default.createElement(i.ThemeProvider,{theme:o.default},a.default.createElement(n,e))}},60410(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){e.fonts;var n=e.geometry,t=e.colors,r=n.md.spacing,i=(0,a.divide)(n.md.spacing,7);return{colors:t,geometry:n,sizes:{xxxs:{border:(0,a.multiply)(i,1.4),size:(0,a.multiply)(r,.5).replace("px","")},xxs:{border:(0,a.multiply)(i,1.4),size:(0,a.multiply)(r,1).replace("px","")},xs:{border:(0,a.multiply)(i,2.2),size:(0,a.multiply)(r,2).replace("px","")},sm:{border:(0,a.multiply)(i,4),size:(0,a.multiply)(r,4).replace("px","")},md:{border:(0,a.multiply)(i,6),size:(0,a.multiply)(r,6).replace("px","")},lg:{border:(0,a.multiply)(i,8),size:(0,a.multiply)(r,8).replace("px","")},xl:{border:(0,a.multiply)(i,10),size:(0,a.multiply)(r,10).replace("px","")}}}}},98844(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=c(t(22155)),i=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),o=c(t(34558)),l=["component"],s=["children","accessibilityLevel","size"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},d.apply(null,arguments)}function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function p(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function m(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var f,y,g=(0,i.default)(function(e){var n=e.component,t=m(e,l);return r.default.cloneElement(r.default.createElement(n),function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach(function(n){p(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},t))})(a||(f=["\n  ",";\n"],y||(y=f.slice(0)),a=Object.freeze(Object.defineProperties(f,{raw:{value:Object.freeze(y)}}))),function(e){var n=e.theme,t=e.size,a=e.color,r=void 0===a?"dark":a,i=e.weight,o=void 0===i?"normal":i,l=e.italic,s=e.inline,c=e.nowrap,d=e.overflow,u=void 0===d?"visible":d,p=e.align,m=void 0===p?"left":p;return"\n    font-family: ".concat(n.headingFonts.family,";\n    font-weight: ").concat(n.headingFonts.weight[o],";\n    text-align: ").concat(m,";\n    text-overflow: ellipsis;\n    word-wrap: break-word;\n    overflow-wrap: break-word;\n    white-space: ").concat(c?"nowrap":"initial",";\n    overflow: ").concat(u,";\n    font-style: ").concat(l?"italic":"initial",";\n    display: ").concat(s?"inline-block":"block",";\n    margin: ").concat(n.sizes[t].margin,";\n    padding: ").concat(n.sizes[t].padding,";\n    font-size: ").concat(n.sizes[t].font.size,";\n    line-height: ").concat(n.sizes[t].font.lineHeight,";\n    color: ").concat(n.headingColors[r].text,";\n  ")});n.default=function(e){var n=e.children,t=e.accessibilityLevel,a=e.size,l=void 0===a?"xl":a,c=m(e,s);return r.default.createElement(i.ThemeProvider,{theme:o.default},r.default.createElement(g,d({},c,{size:l,component:t&&"h".concat(t)||"xs"===l&&"h6"||"sm"===l&&"h5"||"md"===l&&"h4"||"lg"===l&&"h3"||"xl"===l&&"h2"||"xxl"===l&&"h1"}),n))}},34558(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.colors,t=e.fonts;return{colors:n,fonts:t,geometry:e.geometry,headingFonts:{family:t.family,weight:{light:t.weight.normal,normal:t.weight.bold,bold:t.weight.extra}},headingColors:{light:{text:n.text.light.background,border:""},normal:{text:n.text.normal.background,border:""},dark:{text:n.text.dark.background,border:""},primary:{text:n.primary.normal.background,border:""},secondary:{text:n.secondary.normal.background,border:""},tertiary:{text:n.tertiary.normal.background,border:""},neutral:{text:n.neutral.normal.background,border:""},info:{text:n.info.normal.background,border:""},success:{text:n.success.normal.background,border:""},warning:{text:n.warning.normal.background,border:""},danger:{text:n.danger.normal.background,border:""},white:{text:n.basic.white}},sizes:{xs:{margin:"0",padding:"0",font:{size:t.xs.size,lineHeight:t.xs.lineHeight}},sm:{margin:"0",padding:"0",font:{size:t.sm.size,lineHeight:t.sm.lineHeight}},md:{margin:"0",padding:"0",font:{size:t.md.size,lineHeight:t.md.lineHeight}},lg:{margin:"0",padding:"0",font:{size:t.lg.size,lineHeight:t.lg.lineHeight}},xl:{margin:"0",padding:"0",font:{size:t.xl.size,lineHeight:t.xl.lineHeight}},xxl:{margin:"0",padding:"0",font:{size:t.xxl.size,lineHeight:t.xxl.lineHeight}}}}}},11096(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l=m(t(22155)),s=m(t(75235)),c=m(t(43779)),d=m(t(98844)),u=m(t(19083)),p=["name","id","color","error","size","inline","readOnly","editing","placeholder","value","onChange","onEditChange"];function m(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},f.apply(null,arguments)}function y(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var g=s.default.div(a||(a=y(["\n  ",";\n"])),function(e){var n=e.inline;return"\n    display: ".concat(n?"inline-flex":"flex",";\n    flex-direction: row;\n    align-items: center;\n  ")}),b=(0,s.default)(c.default)(r||(r=y(["\n  flex-basis: 100%;\n  input {\n    padding: 0px;\n    font-weight: 700;\n  }\n"]))),h=(0,s.default)(d.default)(i||(i=y(["\n  flex: 1 1 auto;\n  opacity: ",";\n"])),function(e){return e.value?1:.4}),v=(0,s.default)(u.default)(o||(o=y(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    margin-left: ".concat(n.geometry.md.spacing,";\n    color: ").concat(n.colors.text.normal.background,";\n    background: transparent;\n  ")});n.default=function(e){var n=e.name,t=e.id,a=e.color,r=void 0===a?"tertiary":a,i=e.error,o=e.size,s=void 0===o?"md":o,c=e.inline,d=e.readOnly,u=e.editing,m=e.placeholder,y=e.value,x=e.onChange,T=e.onEditChange,O=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,p);return l.default.createElement(g,f({},O,{name:"".concat(n,"__container"),id:t,inline:c}),u?l.default.createElement(b,{autoFocus:!0,name:"".concat(n,"__textInput"),editMode:u,onChange:x,size:s,color:r,placeholder:m,value:y,box:!1,error:i}):l.default.createElement(h,{name:"".concat(n,"__heading"),size:s,color:r,onDoubleClick:function(){d||T()},value:y},y||m),!d&&l.default.createElement(v,{onClick:T,name:"".concat(n,"__").concat(u?"check-button":"edit-button"),icon:u?"check":"pencil-alt",size:s}))}},19083(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=(a=t(22155))&&a.__esModule?a:{default:a},i=t(5188),o=t(92845),l=t(659);i.library.add(l.fas),i.library.add({iconName:"clipboard-check-custom",prefix:"rio",icon:[750,1e3,[],"e001","M284.5 87.9C284.5 39.7 325.4 0 375.1 0 424.7 0 465.7 39.7 465.7 87.9V100.8H507.4C516 100.7 524.2 104 530.3 109.9 536.4 115.8 539.8 123.8 539.7 132.1V237.8C539.8 246.1 536.4 254.1 530.3 260 524.2 265.9 516 269.2 507.4 269.2H242.6C234.1 269.1 225.9 265.8 219.9 259.9 213.8 254 210.5 246.1 210.5 237.8V132.1C210.5 123.9 213.8 115.9 219.9 110 225.9 104.1 234.1 100.8 242.6 100.8H284.5V87.9ZM8.3 164C13.7 158.3 21.1 154.6 29 153.9 30.1 153.8 31.2 153.8 32.3 153.9H146.1V237.5C145.9 288.6 189.7 331.4 242.4 331.7L242.6 331.7H507.1C560 331.9 604.4 288.8 604.2 237.5V153.9H717.9C726.4 153.9 734.6 157.2 740.6 163 746.6 168.9 750 176.7 750 185V968.9C750 977.1 746.6 985 740.6 990.9 734.6 996.7 726.4 1000 717.9 1000H32.4C23.8 1000 15.6 996.8 9.5 990.9 3.5 985.1 0 977.2 0 968.9V185C0 177.2 3 169.8 8.3 164ZM612.4 546.8C630.7 527.4 628.9 497.8 608.2 480.6 587.6 463.4 556 465.1 537.6 484.5L308.3 726.3 212.4 625.1C194 605.8 162.4 604 141.8 621.2 121.1 638.4 119.3 668 137.6 687.4L271 828C280.5 838 294.1 843.8 308.3 843.8 322.6 843.8 336.2 838 345.7 828L612.4 546.8Z"]}),i.library.add({iconName:"flows",prefix:"rio",icon:[16,13,[],"e001","M14.0702 5.29391V9.93798C14.0702 14.0207 7.17266 14.0207 7.17266 9.93798L7.17251 3.45C7.17251 0.999813 3.58754 0.999813 3.58754 3.45V7.70643C4.70642 8.05184 5.51749 9.07717 5.51749 10.2889C5.51749 11.7838 4.28316 12.9953 2.7601 12.9953C1.23705 12.9953 0 11.7863 0 10.2914C0 9.07984 0.811025 8.05436 1.92995 7.70895L1.9298 3.67511C1.9298 -1.22504 8.82734 -1.22504 8.82734 3.67511V9.6629C8.82734 11.8406 12.4123 11.8406 12.4123 9.6629V5.29132C11.2934 4.94591 10.4824 3.92057 10.4824 2.70889C10.4824 1.21397 11.7167 0.00244281 13.2397 0.00244281C14.763 0.00244281 16 1.21412 16 2.70905C16 3.92057 15.1891 4.94853 14.0702 5.29391Z"]}),n.default=function(e){return r.default.createElement(o.FontAwesomeIcon,e)}},67815(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o=d(t(22155)),l=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),s=d(t(19083)),c=d(t(63297));function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},u.apply(null,arguments)}function p(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var m=l.default.div(a||(a=p(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: flex-start;\n  padding: ",";\n  border: "," solid ",";\n  border-radius: ",";\n  ","\n"])),function(e){return e.theme.geometry.sm.spacing},function(e){return e.theme.geometry.sm.border},function(e){return e.setActiveColor||e.theme.colors.overlay.normal.background},function(e){return e.theme.geometry.xxs.radius},function(e){return e.disabled?"opacity: 0.5;":"cursor: pointer;"}),f=l.default.div(r||(r=p(["\n  flex: 2;\n"]))),y=(0,l.default)(c.default)(i||(i=p(["\n  padding-top: ",";\n  padding-bottom: ",";\n  word-break: break-word;\n  text-align: center;\n  color: ",";\n"])),function(e){return e.theme.geometry.xs.spacing},function(e){return e.theme.geometry.xs.spacing},function(e){return e.setActiveColor});n.default=(0,l.withTheme)(function(e){var n=e.title,t=(e.category,e.icon),a=void 0===t?"file-alt":t,r=e.iconColor,i=e.disabled,l=e.onClick,c=void 0===l?function(){}:l,d=e.name,p=e.sizeIcon,g=e.active,b=e.activeColor,h=r||e.theme.colors.quinary.normal.background,v=p||"2x",x=b||g&&"#59c5b5";return o.default.createElement(m,u({},e,{onClick:function(){i||c()},setActiveColor:x,name:"".concat(d,"_IconTile")}),o.default.createElement(f,null,o.default.createElement(s.default,{icon:a,size:v,color:g&&x||h,name:"".concat(d,"_IconTile_Icon")})),o.default.createElement(f,null,o.default.createElement(y,{setActiveColor:x,size:"lg",name:"".concat(d,"_IconTile_Title")},n)))})},57934(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=g(t(75235)),r=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(22155)),i=g(t(39588)),o=g(t(82239)),l=g(t(29053));t(74050);var s,c,d,u,p=g(t(38694)),m=g(t(63297)),f=g(t(21670)),y=["width","height","border","radius","sliderColor","readyText","dropText","rejectText","onSave","outputFormat","acceptedFormats","guideNumbers"];function g(e){return e&&e.__esModule?e:{default:e}}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},b.apply(null,arguments)}function h(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return v(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function x(){var e,n,t="function"==typeof Symbol?Symbol:{},a=t.iterator||"@@iterator",r=t.toStringTag||"@@toStringTag";function i(t,a,r,i){var s=a&&a.prototype instanceof l?a:l,c=Object.create(s.prototype);return T(c,"_invoke",function(t,a,r){var i,l,s,c=0,d=r||[],u=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(n,t){return i=n,l=0,s=e,p.n=t,o}};function m(t,a){for(l=t,s=a,n=0;!u&&c&&!r&&n<d.length;n++){var r,i=d[n],m=p.p,f=i[2];t>3?(r=f===a)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=m&&((r=t<2&&m<i[1])?(l=0,p.v=a,p.n=i[1]):m<f&&(r=t<3||i[0]>a||a>f)&&(i[4]=t,i[5]=a,p.n=f,l=0))}if(r||t>1)return o;throw u=!0,a}return function(r,d,f){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&m(d,f),l=d,s=f;(n=l<2?e:s)||!u;){i||(l?l<3?(l>1&&(p.n=-1),m(l,s)):p.n=s:p.v=s);try{if(c=2,i){if(l||(r="next"),n=i[r]){if(!(n=n.call(i,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,l<2&&(l=0)}else 1===l&&(n=i.return)&&n.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);i=e}else if((n=(u=p.n<0)?s:t.call(a,p))!==o)break}catch(n){i=e,l=1,s=n}finally{c=1}}return{value:n,done:u}}}(t,r,i),!0),c}var o={};function l(){}function s(){}function c(){}n=Object.getPrototypeOf;var d=[][a]?n(n([][a]())):(T(n={},a,function(){return this}),n),u=c.prototype=l.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,T(e,r,"GeneratorFunction")),e.prototype=Object.create(u),e}return s.prototype=c,T(u,"constructor",c),T(c,"constructor",s),s.displayName="GeneratorFunction",T(c,r,"GeneratorFunction"),T(u),T(u,r,"Generator"),T(u,a,function(){return this}),T(u,"toString",function(){return"[object Generator]"}),(x=function(){return{w:i,m:p}})()}function T(e,n,t,a){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}T=function(e,n,t,a){function i(n,t){T(e,n,function(e){return this._invoke(n,t,e)})}n?r?r(e,n,{value:t,enumerable:!a,configurable:!a,writable:!a}):e[n]=t:(i("next",0),i("throw",1),i("return",2))},T(e,n,t,a)}function O(e,n,t,a,r,i,o){try{var l=e[i](o),s=l.value}catch(e){return void t(e)}l.done?n(s):Promise.resolve(s).then(a,r)}function k(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,j(a.key),a)}}function j(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function C(e,n,t){return n=N(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(n,t||[],N(e).constructor):n.apply(e,t))}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function w(e,n){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},w(e,n)}function D(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var A=(0,i.default)(),R=a.default.div(s||(s=D(["\n  width: ","px;\n"])),function(e){return e.width+2*e.border}),P=a.default.div(c||(c=D([""]))),L=(0,a.default)(m.default)(d||(d=D(["\n  text-align: center;\n  display: block;\n"]))),I=a.default.div(u||(u=D(["\n  margin-top: 30px;\n  margin-bottom: 30px;\n  display: block;\n  .input-range__label-container {\n    ","\n    font-family: ",";\n  }\n  .input-range__track--active,\n  .input-range__slider {\n    background: ",";\n  }\n\n  .input-range__slider {\n    border: 1px solid ",";\n  }\n"])),function(e){return e.guideNumbers?"":"display: none;"},function(e){return e.theme.fonts.family},function(e){var n=e.theme,t=e.sliderColor;return n.colors[t].normal.background},function(e){var n=e.theme,t=e.sliderColor;return n.colors[t].normal.background}),E=function(e){function n(e){var t;return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),(t=C(this,n,[e])).handleDrop=function(e){t.setState({image:e[0]})},t.editorClick=function(e){e.stopPropagation(),t.state.image||t.dropzone.current.open()},t.onClickSave=function(){var e,n=(e=x().m(function e(n,a){var r,i,o,l;return x().w(function(e){for(;;)switch(e.n){case 0:if(!t.editor){e.n=2;break}return r=t.editor.getImage(),(i=document.createElement("canvas")).width=a.width,i.height=a.height,e.n=1,A.resize(r,i,{alpha:!0});case 1:o=e.v,"image/jpeg"===a.format&&a.background&&((l=o.getContext("2d")).globalCompositeOperation="destination-over",l.fillStyle=a.background,l.fillRect(0,0,a.width,a.height)),n(o.toDataURL(a.format,.95));case 2:return e.a(2)}},e)}),function(){var n=this,t=arguments;return new Promise(function(a,r){var i=e.apply(n,t);function o(e){O(i,a,r,o,l,"next",e)}function l(e){O(i,a,r,o,l,"throw",e)}o(void 0)})});return function(e,t){return n.apply(this,arguments)}}(),t.setEditorRef=function(e){return t.editor=e},t.dropzone=(0,r.createRef)(),t.state={scale:1,image:t.props.defaultImage},t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&w(e,n)}(n,e),t=n,a=[{key:"render",value:function(){var e=this,n=this.props,t=n.width,a=void 0===t?200:t,i=n.height,s=void 0===i?200:i,c=n.border,d=void 0===c?50:c,u=n.radius,m=void 0===u?0:u,g=n.sliderColor,v=void 0===g?"primary":g,x=n.readyText,T=void 0===x?"Click here or drop a file to upload!":x,O=n.dropText,k=void 0===O?"Drop it like it's hot!":O,j=n.rejectText,C=void 0===j?"File type not accepted, sorry!":j,S=n.onSave,N=n.outputFormat,w=void 0===N?"image/jpeg":N,D=n.acceptedFormats,A=void 0===D?["image/jpeg"]:D,E=n.guideNumbers,_=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,y);return r.default.createElement(R,b({onDrop:this.handleDrop,width:a,border:d},_),r.default.createElement(p.default,{onDrop:this.handleDrop,style:{width:a,height:s},accept:h(A),ref:this.dropzone},function(n){var t=n.getRootProps,i=n.getInputProps,l=n.isDragActive,c=n.isDragReject;return r.default.createElement(P,t({className:"dropzone"}),r.default.createElement("input",i()),r.default.createElement(L,null,!l&&T,l&&!c&&k,c&&C),r.default.createElement(o.default,{onClick:e.editorClick,image:e.state.image,ref:e.setEditorRef,width:a,height:s,border:d,borderRadius:m,color:[128,128,128,.6],scale:e.state.scale,rotate:0,crossOrigin:"anonymous"}))}),r.default.createElement(I,{sliderColor:v,guideNumbers:E},r.default.createElement(l.default,{maxValue:100,minValue:0,value:20*this.state.scale,onChange:function(n){return e.setState({scale:n/20})}})),r.default.createElement(f.default,{onClick:function(){return e.onClickSave(S,w)}},"Save"))}}],a&&k(t.prototype,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,a}(r.Component);n.default=E},45075(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l=m(t(75235)),s=m(t(22155)),c=m(t(19083)),d=m(t(98844)),u=m(t(63297)),p=["id","name","dismissable","onDismiss","title","body","icon"];function m(e){return e&&e.__esModule?e:{default:e}}function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var y=l.default.div(a||(a=f(["\n  ",";\n"])),function(e){var n=e.theme,t=e.inline,a=e.pill;return"\n    position: relative;\n    display: ".concat(t?"inline-flex":"flex",";\n    width: ").concat(t?"auto":"100%",";\n    border-radius: ").concat(a?"5000px":n.geometry.sm.radius,";\n    align-items: center;\n    background-color: ").concat(n.colors.danger.normal.background,";\n    padding: ").concat(n.geometry.sm.spacing,";\n  ")}),g=(0,l.default)(c.default)(r||(r=f(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    flex: 0 0 auto;\n    margin-right: ".concat(n.geometry.sm.spacing,";\n    color: ").concat(n.colors.basic.white,";\n    background:transparent;\n    &:hover {\n      cursor:pointer;\n    }\n  ")}),b=(0,l.default)(c.default)(i||(i=f(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    flex: 0 0 auto;\n    margin-right: ".concat(n.geometry.sm.spacing,";\n    margin-left: ").concat(n.geometry.xs.spacing,";\n    color: ").concat(n.colors.basic.white,";\n  ")}),h=l.default.div(o||(o=f(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    flex: 1 1 auto;\n    margin-right: ".concat(n.geometry.sm.spacing,";\n  ")});n.default=function(e){e.id;var n=e.name,t=e.dismissable,a=e.onDismiss,r=e.title,i=e.body,o=e.icon,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,p);return s.default.createElement(y,l,o&&s.default.createElement(b,{icon:o}),s.default.createElement(h,null,r&&s.default.createElement(d.default,{size:"md",color:"white"},r),i&&s.default.createElement(u.default,{size:"md",color:"white"},i)),t&&s.default.createElement(g,{onClick:a,icon:"times",name:"".concat(n,"__dismiss-cross")}))}},74792(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(22155));function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}n.default=function(e){var n=e.id,t=e.name,i=e.accept,o=e.multiple,l=e.onChange,s=e.inputRef,c=e.onInputClick,d=e.children,u=s||(0,a.createRef)(null);return a.default.createElement(a.default.Fragment,null,a.default.createElement("input",{type:"file",onChange:function(e){var n;"function"==typeof l&&l(function(e){if(Array.isArray(e))return r(e)}(n=e.target.files)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return r(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,n):void 0}}(n)||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.")}(),e)},id:n,name:t,accept:i,multiple:o,ref:u,onClick:function(e){e.stopPropagation(),e.persist(),"function"==typeof c&&c(e)},hidden:!0}),d(function(){return u.current.click()}))}},1592(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=s(t(22155)),i=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),o=s(t(77314)),l=["children","labelFor","textAlign"];function s(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},c.apply(null,arguments)}var d,u,p=i.default.label(a||(d=["\n  ",";\n"],u||(u=d.slice(0)),a=Object.freeze(Object.defineProperties(d,{raw:{value:Object.freeze(u)}}))),function(e){var n=e.theme,t=e.size,a=void 0===t?"md":t,r=e.inline,i=e.color,o=void 0===i?"normal":i,l=e.textAlign,s=void 0===l?"start":l;return"\n    font-family: ".concat(n.font.family,";\n    font-weight: ").concat(n.font.weight.default,";\n    font-size: ").concat(n[a].font.size.default,";\n    line-height: ").concat(n[a].font.lineHeight,";\n    display: ").concat(r?"inline-block":"block",";\n    color: ").concat(n.labelColors[o].text,";\n    text-align: ").concat(s,";\n  ")});n.default=function(e){var n=e.children,t=e.labelFor,a=e.textAlign,s=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,l);return r.default.createElement(i.ThemeProvider,{theme:o.default},r.default.createElement(p,c({},s,{textAlign:a,htmlFor:t}),n))}},77314(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},labelColors:{light:{text:a.text.light.background,border:""},normal:{text:a.text.normal.background,border:""},dark:{text:a.text.dark.background,border:""},primary:{text:a.primary.normal.background,border:""},secondary:{text:a.secondary.normal.background,border:""},tertiary:{text:a.tertiary.normal.background,border:""},neutral:{text:a.neutral.normal.background,border:""},info:{text:a.info.normal.background,border:""},success:{text:a.success.normal.background,border:""},warning:{text:a.warning.normal.background,border:""},danger:{text:a.danger.normal.background,border:""}},sm:{margin:t.sm.spacing,font:{size:{default:n.sm.size,small:n.xs.size},lineHeight:n.sm.lineHeight}},md:{margin:t.md.spacing,font:{size:{default:n.md.size,small:n.sm.size},lineHeight:n.md.lineHeight}},lg:{margin:t.lg.spacing,font:{size:{default:n.lg.size,small:n.md.size},lineHeight:n.lg.lineHeight}},xl:{margin:t.xl.spacing,font:{size:{default:n.xl.size,small:n.lg.size},lineHeight:n.lg.lineHeight}}}}},6127(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c,d,u,p,m,f,y=v(t(22155)),g=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),b=v(t(49715)),h=["size","speed"];function v(e){return e&&e.__esModule?e:{default:e}}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},x.apply(null,arguments)}function T(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var O=g.default.div(a||(a=T(["\n  display: ",";\n  box-sizing: border-box;\n  position: relative;\n  height: ",";\n  width: ",";\n"])),function(e){return e.inline?"inline-block":"block"},function(e){return e.height||e.theme[e.size].size},function(e){return e.height||e.theme[e.size].size}),k=(0,g.keyframes)(r||(r=T(["\n  0% { transform: rotate(0deg); transform-origin: 48% 48%; }\n  100% { transform: rotate(360deg); transform-origin: 48% 48%; }\n"]))),j=(0,g.keyframes)(i||(i=T(["\n  0% { transform: rotate(0deg); transform-origin: 52% 52%; }\n  100% { transform: rotate(360deg); transform-origin: 52% 52%; }\n"]))),C=(0,g.keyframes)(o||(o=T(["\n  0% { transform: rotate(0deg); transform-origin: 48% 52%; }\n  100% { transform: rotate(360deg); transform-origin: 48% 52%; }\n"]))),S=g.default.div(l||(l=T(["\n  box-sizing: border-box;\n  opacity: 1;\n  width: 90%;\n  height: 90%;\n  border-style: solid;\n  border-width: ",";\n  border-radius: 50%;\n  position: absolute;\n  top: 5%;\n  left: 5%;\n"])),function(e){return e.theme[e.size].border}),N=(0,g.default)(S)(s||(s=T(["\n  border-color: ",";\n"])),function(e){return e.theme.loadingColors.primary}),w=(0,g.css)(c||(c=T(["\n  "," infinite ","s linear;\n"])),k,function(e){return 3/e.speed}),D=(0,g.default)(S)(d||(d=T(["\n  border-color: ",";\n  animation: ",";\n"])),function(e){return e.theme.loadingColors.secondary},w),A=(0,g.css)(u||(u=T(["\n  "," infinite ","s linear;\n"])),j,function(e){return 2.5/e.speed}),R=(0,g.default)(S)(p||(p=T(["\n  border-color: ",";\n  animation: ",";\n"])),function(e){return e.theme.loadingColors.tertiary},A),P=(0,g.css)(m||(m=T(["\n  "," infinite ","s linear reverse;\n"])),C,function(e){return 2/e.speed}),L=(0,g.default)(S)(f||(f=T(["\n  border-color: ",";\n  animation: ",";\n"])),function(e){return e.theme.loadingColors.quaternary},P);n.default=function(e){var n=e.size,t=void 0===n?"md":n,a=e.speed,r=void 0===a?1:a,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,h);return y.default.createElement(g.ThemeProvider,{theme:b.default},y.default.createElement(O,x({},i,{size:t}),y.default.createElement(L,{speed:r,size:t}),y.default.createElement(R,{speed:r,size:t}),y.default.createElement(D,{speed:r,size:t}),y.default.createElement(N,{speed:r,size:t})))}},49715(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){var n=e.fonts,t=e.geometry,r=e.colors,i=t.md.spacing,o=(0,a.divide)(t.md.spacing,7);return{colors:r,fonts:n,geometry:t,xxs:{border:(0,a.multiply)(o,1.1),size:(0,a.multiply)(i,1)},xs:{border:(0,a.multiply)(o,1.9),size:(0,a.multiply)(i,2)},sm:{border:(0,a.multiply)(o,3.4),size:(0,a.multiply)(i,4)},md:{border:(0,a.multiply)(o,5),size:(0,a.multiply)(i,6)},lg:{border:(0,a.multiply)(o,6.5),size:(0,a.multiply)(i,8)},xl:{border:(0,a.multiply)(o,8),size:(0,a.multiply)(i,10)},loadingColors:{primary:"#270A7F",secondary:r.primary.normal.background,tertiary:r.tertiary.normal.background,quaternary:r.quaternary.normal.background}}}},82920(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=s(t(22155)),r=s(t(75235)),i=s(t(46762));t(724);var o,l=["id","name","className"];function s(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},c.apply(null,arguments)}var d,u,p=r.default.div(o||(d=["\n  width: 100%;\n  flex-basis: 100%;\n  ol {\n    list-style: decimal;\n  }\n  ul {\n    list-style: initial;\n  }\n"],u||(u=d.slice(0)),o=Object.freeze(Object.defineProperties(d,{raw:{value:Object.freeze(u)}}))));n.default=function(e){var n=e.id,t=e.name,r=e.className,o=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,l);return a.default.createElement(p,{id:"".concat(n,"_Markdown_container"),className:"markdown-body ".concat(r),name:"".concat(t,"_Markdown_container")},a.default.createElement(i.default,c({renderers:{root:a.default.Fragment,link:function(e){var n=e.href,t=e.children;return a.default.createElement("a",{target:"__blank",href:n},t)}}},o)))}},74185(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useEscapeKey=function(e,n,t){(0,a.useEffect)(function(){if(n&&t){var a=function(n){"Escape"===n.key&&e()};return document.addEventListener("keydown",a),function(){document.removeEventListener("keydown",a)}}},[e])};var a=t(22155)},88695(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var n,t=e.show,a=e.name,r=e.children,i=e.span,o=e.size,l=e.onDismiss,s=e.minHeight,c=e.height,d=e.maxHeight,u=e.loading,p=e.draggable,g=e.enableEscapeKey,h=void 0!==g&&g,k=e.draggableOptions,j=void 0===k?{}:k,N=e.bodyRef,w=void 0===N?function(){}:N,D=e.dismissable,A=void 0===D||D,R=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,O),F=function(e){if(Array.isArray(e))return e}(n=(0,m.useState)(!1))||function(e){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,a,r,i,o=[],l=!0,s=!1;try{for(r=(n=n.call(e)).next,!2;!(l=(t=r.call(n)).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return o}}(n)||function(e){if(e){if("string"==typeof e)return S(e,2);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,2):void 0}}(n)||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.")}(),B=F[0],U=F[1],M=function(){U(!1),"function"==typeof l&&l()};return(0,m.useEffect)(function(){U(t)},[t]),(0,T.useEscapeKey)(M,h,A),B&&m.default.createElement(f.ThemeProvider,{theme:y.default},m.default.createElement(P,C({},R,{name:a}),m.default.createElement(L,{onClick:A&&M}),u?m.default.createElement(b.default,{name:"".concat(a,"__loading-indictor")}):m.default.createElement(v.Draggable,C({disabled:!p},j),m.default.createElement(I,{span:i,size:o,minHeight:s,height:c,maxHeight:d,ref:w},A&&m.default.createElement(E,{onClick:M,icon:"times",name:"".concat(a,"__dismiss-cross")}),m.default.createElement(_,{height:c},m.default.createElement(x.ScrollContainer,{container:!0},r))))))};var a,r,i,o,l,s,c,d,u,p,m=j(t(22155)),f=j(t(75235)),y=k(t(49723)),g=k(t(19083)),b=k(t(6127)),h=t(16463),v=t(83681),x=t(74986),T=t(74185),O=["show","name","children","span","size","onDismiss","minHeight","height","maxHeight","loading","draggable","enableEscapeKey","draggableOptions","bodyRef","dismissable"];function k(e){return e&&e.__esModule?e:{default:e}}function j(e,n){if("function"==typeof WeakMap)var t=new WeakMap,a=new WeakMap;return(j=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=n?a:t){if(r.has(e))return r.get(e);r.set(e,o)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(o,l,i):o[l]=e[l]);return o})(e,n)}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},C.apply(null,arguments)}function S(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function N(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var w=(0,f.keyframes)(a||(a=N(["\n  0% { transform: translateY(20%); opacity: 0; }\n  100% { transform: translateY(0%); opacity: 1; }\n"]))),D=(0,f.keyframes)(r||(r=N(["\n  0% { opacity: 0; }\n  100% { opacity: 1; }\n"]))),A=(0,f.css)(i||(i=N(["\n  "," 0.3s;\n"])),D),R=(0,f.css)(o||(o=N(["\n  "," 0.3s;\n"])),w),P=f.default.div(l||(l=N(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  right: 0px;\n  bottom: 0px;\n  z-index: 999;\n"]))),L=f.default.div(s||(s=N(["\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  right: 0px;\n  bottom: 0px;\n  background: rgba(0, 0, 0, 0.5);\n  animation: ",";\n"])),A),I=f.default.div(c||(c=N(["\n  ",";\n"])),function(e){var n=e.theme,t=e.span,a=e.size,r=e.height,i=e.maxHeight,o=e.minHeight;return(0,f.css)(d||(d=N(["\n    position: relative;\n    height: ",";\n    max-height: ",";\n    ",";\n    width: auto;\n    background: #fff;\n    width: ",";\n    border-radius: ",";\n    overflow: auto;\n    box-shadow: 0px 20px 80px -20px rgba(0, 0, 0, 0.3);\n    animation: ",";\n  "])),r||"100%",i||"90%",o&&"\n  min-height: ".concat(o,";\n  "),t&&(0,h.getSpanWidth)(t)||a&&n.size[a]||"auto",n.radius,R)}),E=(0,f.default)(g.default)(u||(u=N(["\n  ",";\n"])),function(e){var n=e.theme;return"\n  position: absolute;\n  top: ".concat(n.dismissOffset,";\n  right: ").concat(n.dismissOffset,";\n  color: ").concat(n.iconColor,";\n  background:transparent;\n  &:hover {\n    cursor:pointer;\n  }\n  z-index: 9999999;\n")}),_=f.default.div(p||(p=N(["\n  ","\n"])),function(e){var n=e.theme,t=e.height;return"\n    display: flex;\n    flex-flow: column;\n    height: 100%;\n    overflow: auto;\n    max-height: ".concat("auto"===t?"inherit":"unset",";\n    padding: ").concat(n.geometry.sm.spacing," 0;\n  ")})},49723(e,n){"use strict";function t(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n,a=e.fonts,r=e.geometry,i=e.colors;return{colors:i,fonts:a,geometry:r,radius:r.md.radius,dismissOffset:r.md.spacing,col:(n=r.columns.sizes,function(e){if(Array.isArray(e))return t(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(e,n):void 0}}(n)||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.")}()),size:{sm:r.columns.sizes[3],md:r.columns.sizes[5],lg:r.columns.sizes[7],xl:r.columns.sizes[9]},iconColor:i.text.light.background}}},82271(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=i(t(22155)),r=i(t(62590));function i(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},o.apply(null,arguments)}n.default=function(e){return a.default.createElement(r.default,o({},e,{isMulti:!0}))}},49335(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o=p(t(22155)),l=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),s=p(t(50651)),c=p(t(19083)),d=p(t(63297)),u=["id","name","size","icon","text","inline"];function p(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},m.apply(null,arguments)}function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var y=l.default.div(a||(a=f(["\n  ",";\n"])),function(e){var n=e.inline,t=(e.box,e.size,e.theme),a=(e.error,e.success,e.disabled);return e.readOnly,"\n    font-family: ".concat(t.font.family,";\n    font-weight: ").concat(t.font.weight.default,";\n    display: ").concat(n?"inline-flex":"flex",";\n    flex-direction: column;\n    align-items: center;\n    background-color: ").concat(t.navColors.primary,";\n    position: relative;\n    overflow: hidden;\n    opacity: ").concat(a?"0.5":"1",";\n  ")}),g=(0,l.default)(c.default)(r||(r=f(["\n  ",";\n"])),function(e){var n=e.size,t=e.theme;return e.disabled,"\n    opacity: 0.5;\n    color: ".concat(t.navColors.primary.dark.background,";\n    font-size: ").concat(t[n].font.size.icon,";\n    padding: ").concat(t[n].iconPadding,";\n  ")}),b=(0,l.default)(d.default)(i||(i=f(["\n  ",";\n"])),function(e){var n=e.size,t=e.theme;return e.disabled,"\n    opacity: 0.5;\n    color: ".concat(t.navColors.primary.dark.background,";\n    font-size: ").concat(t[n].font.size.text,";\n    cursor: default;\n  ")});n.default=function(e){var n=e.id,t=e.name,a=e.size,r=void 0===a?"md":a,i=e.icon,c=e.text,d=e.inline,p=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,u);return o.default.createElement(l.ThemeProvider,{theme:s.default},o.default.createElement(y,m({},p,{inline:d,size:r,id:"".concat(n,"-Container"),name:"".concat(t,"-Container")}),o.default.createElement(g,{icon:i,size:r,id:"".concat(n,"-IconStyled"),name:"".concat(t,"-IconStyled")}),o.default.createElement(b,{size:r,id:"".concat(n,"-TextStyled"),name:t},c)))}},50651(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){var n=e.fonts,t=e.geometry,r=e.colors;return{colors:r,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},sm:{font:{size:{icon:n.md.size,text:n.xs.size}},padding:t.sm.spacing,iconPadding:(0,a.divide)(t.sm.spacing,12)},md:{font:{size:{icon:n.lg.size,text:n.sm.size}},padding:t.md.spacing,iconPadding:(0,a.divide)(t.md.spacing,12)},lg:{font:{size:{icon:n.xl.size,text:n.md.size}},padding:t.lg.spacing,iconPadding:(0,a.divide)(t.lg.spacing,12)},navColors:{primary:r.primary,secondary:r.secondary,tertiary:r.tertiary,info:r.info,success:r.success,warning:r.warning,danger:r.danger}}}},49721(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=d(t(22155)),r=t(4508);t(63873);var i,o,l=d(t(75235)),s=(i=t(39757))&&i.__esModule?i:{default:i},c=["name","color","show","children","onOpen","onClose","preventDuplicate"];function d(e,n){if("function"==typeof WeakMap)var t=new WeakMap,a=new WeakMap;return(d=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=n?a:t){if(r.has(e))return r.get(e);r.set(e,o)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(o,l,i):o[l]=e[l]);return o})(e,n)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},u.apply(null,arguments)}function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function m(e,n,t){return(n=y(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function f(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,y(a.key),a)}}function y(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function g(e,n,t){return n=h(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(n,t||[],h(e).constructor):n.apply(e,t))}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,n){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},v(e,n)}var x=(0,l.default)(r.ToastContainer)(o||(o=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  ",";\n"])),function(e){var n=e.theme,t=e.color;return"\n    .Toastify__toast { border-radius: ".concat(n.radius,"; padding: ").concat(n.padding,"; overflow: hidden; background-color: ").concat(n.notificationColors[t].normal.background,"; }\n    .Toastify__toast-body { color: ").concat(n.notificationColors[t].normal.text,"; }\n    .Toastify__close-button { color: ").concat(n.notificationColors[t].normal.text,"; }\n    .Toastify__progress-bar { background: ").concat(n.notificationColors[t].light.background,"; }\n  ")}),T=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),g(this,n,arguments)}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&v(e,n)}(n,e),function(e,n){return n&&f(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"notify",value:function(e,n,t,i,o){var l=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach(function(n){m(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({onOpen:i,onClose:o,toastId:t?n:null},this.props.toastOptions);(0,r.toast)(a.default.createElement("div",null,e),l)}},{key:"render",value:function(){var e=this.props,n=e.name,t=e.color,r=e.show,i=e.children,o=e.onOpen,d=e.onClose,p=e.preventDuplicate,m=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,c);return a.default.createElement(l.ThemeProvider,{theme:s.default},a.default.createElement("div",{name:n},a.default.createElement(x,u({name:n,color:t},m)),r&&this.notify(i,n,p,o,d)))}}])}(a.Component);T.defaultProps={color:"success",toastOptions:{},preventDuplicate:!0},n.default=T},39757(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,radius:t.md.radius,padding:t.md.spacing,notificationColors:{primary:a.primary,secondary:a.secondary,tertiary:a.tertiary,quaternary:a.quaternary,quinary:a.quinary,senary:a.senary,info:a.info,success:a.success,warning:a.warning,danger:a.danger}}}},11267(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(22155)),r=t(74655);function i(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}n.default=function(e){var n,t,o=e.items,l=e.position,s=void 0===l?"bottom":l,c=e.width,d=void 0===c?150:c,u=(n=(0,a.useState)(!1),t=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,r,i,o,l=[],s=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;s=!1}else for(;!(s=(a=i.call(t)).done)&&(l.push(a.value),l.length!==n);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return l}}(n,t)||function(e,n){if(e){if("string"==typeof e)return i(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?i(e,n):void 0}}(n,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.")}()),p=u[0],m=u[1],f=(0,a.useRef)(null),y=o.map(function(e){return a.default.createElement(r.MenuItem,{onClick:e.onClick},e.text)});return(0,a.useEffect)(function(){var e=function(e){f.current&&!f.current.contains(e.target)&&m(!1)},n=function(e){"Escape"===e.key&&m(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",n),function(){document.removeEventListener("mousedown",e),document.removeEventListener("keydown",n)}}),a.default.createElement(r.MenuWrapper,{ref:f},a.default.createElement(r.MenuToggle,{onClick:function(){return m(!p)}},a.default.createElement("span",null),a.default.createElement("span",null),a.default.createElement("span",null)),p&&a.default.createElement(r.Menu,{className:s,width:d},y))}},74655(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MenuWrapper=n.MenuToggle=n.MenuItem=n.Menu=void 0;var a,r,i,o,l,s=(a=t(75235))&&a.__esModule?a:{default:a};function c(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}n.MenuWrapper=s.default.div(r||(r=c(["\n  position: absolute;\n  top: 0;\n  right: 0;\n  font-family: ",";\n  font-size: ",";\n"])),function(e){return e.theme.fonts.family},function(e){return e.theme.fonts.sm.size}),n.MenuToggle=s.default.div(i||(i=c(["\n  cursor: pointer;\n  display: flex;\n  flex-direction: column;\n  padding: 10px;\n\n  & > span {\n    width: 3px;\n    height: 3px;\n    margin-top: 3px;\n    background: #83838e;\n    border-radius: 50%;\n  }\n"]))),n.Menu=s.default.ul(o||(o=c(["\n  width: ","px;\n  position: absolute;\n  right: 0;\n  background-color: ",";\n  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.05));\n  box-sizing: border-box;\n  border 1px solid #E8E9EC;\n  border-radius: 8px;\n  z-index: 1;\n  \n  &.top {\n    bottom: 40px;\n  }\n\n  &.bottom {\n    top: 40px;\n  }\n"])),function(e){return e.width},function(e){return e.theme.colors.basic.white}),n.MenuItem=s.default.li(l||(l=c(["\n  list-style-type: none;\n  border-bottom: 1px solid #e8e9ec;\n  padding: 15px;\n  margin: 0;\n  cursor: pointer;\n\n  &:last-child {\n    border-bottom: 0px;\n  }\n\n  &:hover {\n    background-color: ",";\n  }\n"])),function(e){return e.theme.colors.inputs.normal.background})},43790(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s=p(t(22155)),c=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),d=p(t(19083)),u=p(t(38178));function p(e){return e&&e.__esModule?e:{default:e}}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var f=c.default.ul(a||(a=m(["\n  display: ",";\n  flex-direction: row;\n  font-family: ",";\n  font-size: ",";\n  list-style-type: none;\n"])),function(e){return e.inline?"inline-flex":"flex"},function(e){return e.theme.fonts.family},function(e){var n=e.size;return e.theme.sizes[n].font.size}),y=c.default.li(r||(r=m(["\n  opacity: ",";\n  cursor: ",";\n  background-color: ",";\n  color: ",";\n  border: 1px solid ",";\n  padding: ",";\n  border-right: 0;\n  line-height: ",";\n"])),function(e){return e.disabled?"0.5":"1"},function(e){return e.disabled?"not-allowed":"pointer"},function(e){var n=e.active,t=e.theme;return n?t.page.active.color.background:t.page.default.color.background},function(e){var n=e.active,t=e.theme;return n?t.page.active.color.text:t.page.default.color.text},function(e){return e.theme.page.border.color},function(e){var n=e.theme,t=e.size;return n.sizes[t].padding},function(e){var n=e.theme,t=e.size;return n.sizes[t].font.lineHeight}),g=(0,c.default)(y)(i||(i=m(["\n  border-bottom-left-radius: ",";\n  border-top-left-radius: ",";\n"])),function(e){return e.theme.geometry.xxs.radius},function(e){return e.theme.geometry.xxs.radius}),b=(0,c.default)(y)(o||(o=m(["\n  border-right: 1px solid ",";\n  border-bottom-right-radius: ",";\n  border-top-right-radius: ",";\n"])),function(e){return e.theme.page.border.color},function(e){return e.theme.geometry.xxs.radius},function(e){return e.theme.geometry.xxs.radius}),h=(0,c.default)(y)(l||(l=m(["\n  cursor: default;\n"]))),v=function(e){var n=e.id,t=e.name,a=e.numbers,r=e.size,i=e.activePage,o=e.onClick;return a.map(function(e){return s.default.createElement(y,{id:"".concat(n,"-").concat(e),name:"".concat(t,"-").concat(e),key:e,size:r,active:e===i,onClick:function(){return o(e)}},e)})};n.default=function(e){var n=e.id,t=e.name,a=e.inline,r=e.size,i=void 0===r?"md":r,o=e.activePage,l=e.itemsCountPerPage,p=e.totalItemsCount,m=e.onChange,x=o-(l-1)/2-1;x=x<0?0:Math.ceil(x);var T=Array(l).fill(0).map(function(e,n){return n+1+x}).filter(function(e){return e<=p&&e>0}),O=T.some(function(e){return e===p}),k=function(e,n){m&&!n&&m(e)},j=function(){return s.default.createElement(s.default.Fragment,null,s.default.createElement(g,{id:"".concat(n,"-UnorderedList-FirstPage"),name:"".concat(t,"-UnorderedList-FirstPage"),size:i,disabled:1===o,onClick:function(){return k(1,1===o)}},s.default.createElement(d.default,{icon:"fa-fast-backward"})),s.default.createElement(y,{size:i,id:"".concat(n,"-UnorderedList-StepBack"),name:"".concat(t,"-UnorderedList-StepBack"),disabled:1===o,onClick:function(){return k(o-1,1===o)}},s.default.createElement(d.default,{icon:"step-backward"})))},C=function(){return s.default.createElement(s.default.Fragment,null,s.default.createElement(y,{id:"".concat(n,"-UnorderedList-StepForward"),name:"".concat(t,"-UnorderedList-StepForward"),size:i,disabled:o===p,onClick:function(){return k(o+1,o===p)}},s.default.createElement(d.default,{icon:"step-forward"})),s.default.createElement(b,{id:"".concat(n,"-UnorderedList-LastPage"),name:"".concat(t,"-UnorderedList-LastPage"),size:i,disabled:o===p,onClick:function(){return k(p,o===p)}},s.default.createElement(d.default,{icon:"fa-fast-forward"})))};return s.default.createElement(c.ThemeProvider,{theme:u.default},s.default.createElement(f,{id:"".concat(n,"-UnorderedList"),name:"".concat(t,"-UnorderedList"),inline:a,size:i},s.default.createElement(j,null),s.default.createElement(v,{id:"".concat(n,"-UnorderedList-Numbers"),name:"".concat(t,"-UnorderedList-Numbers"),numbers:T,size:i,activePage:o,onClick:k}),!O&&s.default.createElement(h,{size:i},"..."),!O&&s.default.createElement(y,{id:"".concat(n,"-UnorderedList-LastPage"),name:"".concat(t,"-UnorderedList-LastPage"),size:i,onClick:function(){return k(p)}},p),s.default.createElement(C,null)))}},38178(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.colors,t=e.fonts,a=e.geometry;return{colors:n,fonts:t,geometry:a,page:{active:{color:{background:n.primary.normal.background,text:n.primary.normal.text}},default:{color:{background:n.inputs.light.background,text:n.text.dark.background}},border:{color:n.inputs.normal.background}},sizes:{xs:{padding:a.xxs.spacing,font:{size:t.xs.size,lineHeight:t.xs.lineHeight}},sm:{padding:a.xs.spacing,font:{size:t.sm.size,lineHeight:t.sm.lineHeight}},md:{padding:a.sm.spacing,font:{size:t.md.size,lineHeight:t.md.lineHeight}},lg:{padding:a.md.spacing,font:{size:t.lg.size,lineHeight:t.lg.lineHeight}},xl:{padding:a.lg.spacing,font:{size:t.xl.size,lineHeight:t.xl.lineHeight}},xxl:{padding:a.xl.spacing,font:{size:t.xxl.size,lineHeight:t.xxl.lineHeight}}}}}},67493(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=i(t(22155)),r=i(t(21670));function i(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},o.apply(null,arguments)}n.default=function(e){return a.default.createElement(r.default,o({},e,{pill:!0}),e.children)}},58290(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=l(t(22155)),i=l(t(75235)),o=["children"];function l(e){return e&&e.__esModule?e:{default:e}}var s,c,d=i.default.pre(a||(s=["\n  ",";\n"],c||(c=s.slice(0)),a=Object.freeze(Object.defineProperties(s,{raw:{value:Object.freeze(c)}}))),function(e){var n=e.theme,t=e.wrap,a=e.size,r=void 0===a?"md":a;return"\n    padding: ".concat(n.geometry[r].spacing,";\n    color: ").concat(n.colors.text.light.text,";\n    background: ").concat(n.colors.overlay.light.background,";\n    border: 1px solid ").concat(n.colors.text.normal.background,";\n    border-radius: ").concat(n.geometry.md.radius,";\n    font-size: ").concat(n.fonts[r].size,";\n    line-height: ").concat(n.fonts[r].lineheight,";\n    height: 100%;\n    font-family: ").concat(n.fonts.monospace,";\n    flex-basis: 100%;\n    ").concat(t&&"white-space: pre-wrap;","\n    flex: 1;\n  ")});n.default=function(e){var n=e.children,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,o);return r.default.createElement(d,t,n)}},46555(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o=u(t(22155)),l=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),s=u(t(76055)),c=t(16463),d=["size","src","accountName","outline","height"];function u(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},p.apply(null,arguments)}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var f=l.default.div(a||(a=m(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size,a=e.color,r=e.border,i=e.height;return"\n    box-sizing: border-box;\n    width: ".concat(i||n[t].picture.width,";\n    height: ").concat(i||n[t].picture.height,";\n    padding: ").concat(n[t].picture.padding,";\n\n    ").concat(r&&"\n      border-radius: 50%;\n      border-width: ".concat(n[t].border.width,";\n      border-color: ").concat(n.profileColors[a].normal.background,";\n      border-style: ").concat(n[t].border.style,";\n    "),"\n  ")}),y=l.default.img(r||(r=m(["\n  ",";\n"])),function(e){var n=e.theme,t=e.color,a=e.outline;return"\n    height: 100%;\n    width: 100%;\n    border-radius: 50%;\n    background: #eee;\n    ".concat(a&&"\n      box-shadow: 0px 0px 0px 3px ".concat(n.profileColors[t].light.background,"; // Used to create a non-obstructing outline around any shape\n    "),"\n  ")}),g=l.default.div(i||(i=m(["\n  ",";\n"])),function(e){var n=e.theme,t=e.color,a=e.size,r=e.outline,i=e.height;return"\n    width: 100%;\n    height: 0;\n    padding: 50% 0;\n    border-radius: 50%;\n    color: white;\n    text-align: center;\n    background: ".concat(n.profileColors[t].normal.background,";\n    font-family: ").concat(n.font.family,";\n    font-size: ").concat(i?(0,c.divide)(i,2.5):n[a].font.size,";\n    line-height: calc(50% - ").concat(i?(0,c.divide)(i,7):(0,c.divide)(n[a].font.size,2.5),");\n    ").concat(r&&"\n      box-shadow: 0px 0px 0px 3px ".concat(n.profileColors[t].light.background,";\n    "),"\n  ")});n.default=function(e){var n=e.size,t=void 0===n?"md":n,a=e.src,r=e.accountName,i=e.outline,c=void 0!==i&&i,u=e.height,m=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,d),b=r.charAt(0)?r.charAt(0).toUpperCase():"?",h=["primary","secondary","tertiary","quaternary","quinary","senary"],v=e.color||h[b.charCodeAt(0)%h.length]||"primary";return o.default.createElement(l.ThemeProvider,{theme:s.default},o.default.createElement(f,p({},m,{size:t,color:v,height:u}),a?o.default.createElement(y,{color:v,outline:c,src:a}):o.default.createElement(g,{color:v,outline:c,size:t,height:u},b)))}},76055(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){var n=e.fonts,t=e.geometry,r=e.colors;return{colors:r,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},xxs:{border:{width:t.xxs.border,style:"solid"},picture:{width:t.xxs.profile.size,height:t.xxs.profile.size,padding:t.xxs.profile.padding},font:{size:(0,a.multiply)(n.xs.size,2)}},xs:{border:{width:t.xs.border,style:"solid"},picture:{width:t.xs.profile.size,height:t.xs.profile.size,padding:t.xs.profile.padding},font:{size:(0,a.multiply)(n.xs.size,2.5)}},sm:{border:{width:t.sm.border,style:"solid"},picture:{width:t.sm.profile.size,height:t.sm.profile.size,padding:t.sm.profile.padding},font:{size:(0,a.multiply)(n.sm.size,2.5)}},md:{border:{width:t.md.border,style:"solid"},picture:{width:t.md.profile.size,height:t.md.profile.size,padding:t.md.profile.padding},font:{size:(0,a.multiply)(n.md.size,2.5)}},lg:{border:{width:t.lg.border,style:"solid"},picture:{width:t.lg.profile.size,height:t.lg.profile.size,padding:t.lg.profile.padding},font:{size:(0,a.multiply)(n.lg.size,2.5)}},xl:{border:{width:t.xl.border,style:"solid"},picture:{width:t.xl.profile.size,height:t.xl.profile.size,padding:t.xl.profile.padding},font:{size:(0,a.multiply)(n.xl.size,2.5)}},profileColors:{primary:r.primary,secondary:r.secondary,tertiary:r.tertiary,quaternary:r.quaternary,quinary:r.quinary,senary:r.senary,info:r.info,success:r.success,warning:r.warning,danger:r.danger}}}},179(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i=u(t(22155)),o=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),l=u(t(46555)),s=u(t(95023)),c=t(16463),d=["children","maxChildren","showCount","reverse","showOverflow","color","size","outline","dimSecondary","theme","overlap","height"];function u(e){return e&&e.__esModule?e:{default:e}}function p(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var m=o.default.div(a||(a=p(["\n  display: inline-flex;\n  flex-direction: row-reverse;\n  justify-content: flex-start;\n  position: relative;\n"]))),f=o.default.div(r||(r=p(["\n  ",";\n"])),function(e){var n=e.index,t=e.offset,a=e.reverse;return"\n    height: 100%;\n    margin-left: -".concat(n&&t,";\n    z-index: ").concat(a?100*n:100,";\n  ")});n.default=(0,o.withTheme)(function(e){var n=e.children,t=e.maxChildren,a=void 0===t?3:t,r=e.showCount,o=void 0===r||r,u=e.reverse,p=void 0!==u&&u,y=e.showOverflow,g=void 0===y||y,b=e.color,h=void 0===b?"secondary":b,v=e.size,x=void 0===v?"xs":v,T=e.outline,O=void 0!==T&&T,k=e.dimSecondary,j=void 0===k||k,C=e.theme,S=e.overlap,N=void 0===S?.4:S,w=e.height,D=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,d),A=(0,s.default)(C),R=1*N,P=function(e){var n=e.children,t=e.height,a=e.maxChildren,r=e.showCount,o=e.showOverflow,s=e.color,c=e.size,d=e.outline,u=e.dimSecondary,p=e.offset,m=e.reverse;if(n&&Array.isArray(n)){var y=n.length,g=a-(y>a);if(n=(n=n.slice(0,g)).map(function(e,n){var a={size:c,color:s,outline:d&&0===n,height:t||null,style:u?{filter:n>0?"contrast(50%) brightness(150%)":"none"}:null};return e=i.default.cloneElement(e,a),i.default.createElement(f,{offset:p,size:c,reverse:m,index:n},e)}),o&&y>g){var b=y-g,h=i.default.createElement(l.default,{name:"overflow-circle",size:c,color:s,height:t,accountName:"".concat(r&&b<=9?b:"+")});h=i.default.createElement(f,{offset:p,size:c,reverse:m,index:g},h),n.push(h)}return n.reverse()}}({children:n,maxChildren:a,showCount:o,showOverflow:g,color:h,size:x,outline:O,dimSecondary:j,offset:(0,c.multiply)(w||A[x].picture.offset,R),height:w,reverse:p});return i.default.createElement(m,D,P)})},95023(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){var n=e.fonts,t=e.geometry;return{colors:e.colors,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},xxs:{border:{width:t.xxs.border,style:"solid"},picture:{width:t.xxs.profile.size,height:t.xxs.profile.size,padding:t.xxs.profile.padding,offset:(0,a.add)(t.xl.profile.size,t.xxs.profile.padding)},font:{size:(0,a.multiply)(n.xs.size,2)}},xs:{border:{width:t.xs.border,style:"solid"},picture:{width:t.xs.profile.size,height:t.xs.profile.size,padding:t.xs.profile.padding,offset:(0,a.add)(t.xs.profile.size,t.xs.profile.padding)},font:{size:(0,a.multiply)(n.xs.size,2.5)}},sm:{border:{width:t.sm.border,style:"solid"},picture:{width:t.sm.profile.size,height:t.sm.profile.size,padding:t.sm.profile.padding,offset:(0,a.add)(t.sm.profile.size,t.sm.profile.padding)},font:{size:(0,a.multiply)(n.sm.size,2.5)}},md:{border:{width:t.md.border,style:"solid"},picture:{width:t.md.profile.size,height:t.md.profile.size,padding:t.md.profile.padding,offset:(0,a.add)(t.md.profile.size,t.md.profile.padding)},font:{size:(0,a.multiply)(n.md.size,2.5)}},lg:{border:{width:t.lg.border,style:"solid"},picture:{width:t.lg.profile.size,height:t.lg.profile.size,padding:t.lg.profile.padding,offset:(0,a.add)(t.lg.profile.size,t.lg.profile.padding)},font:{size:(0,a.multiply)(n.lg.size,2.5)}},xl:{border:{width:t.xl.border,style:"solid"},picture:{width:t.xl.profile.size,height:t.xl.profile.size,padding:t.xl.profile.padding,offset:(0,a.add)(t.xl.profile.size,t.xl.profile.padding)},font:{size:(0,a.multiply)(n.xl.size,2.5)}}}}},8326(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=c(t(22155)),i=c(t(83920)),o=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),l=c(t(80064)),s=["completed","color"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},d.apply(null,arguments)}var u,p,m=(0,o.default)(i.default)(a||(u=["\n  &&& {\n    background-color: ",";\n  }\n  & .MuiLinearProgress-barColorPrimary {\n    background-color: ",";\n  }\n  & .MuiLinearProgress-bar2Buffer {\n    background-color: ",";\n  }\n"],p||(p=u.slice(0)),a=Object.freeze(Object.defineProperties(u,{raw:{value:Object.freeze(p)}}))),function(e){var n=e.theme,t=e.baseColor;return n.colors[t].light.background},function(e){var n=e.theme,t=e.baseColor;return n.colors[t].dark.background},function(e){var n=e.theme,t=e.baseColor;return n.colors[t].normal.background});n.default=function(e){var n=e.completed,t=e.color,a=void 0===t?"green":t,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,s);return r.default.createElement(o.ThemeProvider,{theme:l.default},r.default.createElement(m,d({variant:"determinate",value:n,baseColor:a},i)))}},80064(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.colors;return{colors:{primary:n.primary,secondary:n.secondary,tertiary:n.tertiary,quaternary:n.quaternary,quinary:n.quinary,senary:n.senary,info:n.info,success:n.success,warning:n.warning,danger:n.danger,green:n.gradient.green,blue:n.gradient.blue}}}},58717(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(t(22155)),r=l(t(21670)),i=l(t(40118)),o=["id","name","onClick","label","span","children","disabled","success","error","labelTextAlign","color"];function l(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},s.apply(null,arguments)}n.default=function(e){e.id;var n=e.name,t=(e.onClick,e.label),l=e.span,c=e.children,d=e.disabled,u=e.success,p=e.error,m=e.labelTextAlign,f=e.color,y=void 0===f?"success":f,g=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,o);return a.default.createElement(i.default.Column,{label:t,span:l,labelTextAlign:m},a.default.createElement(r.default,s({id:"propertySheet__button--".concat(n),name:n,onClick:function(t){return e.onClick(t,n)},color:y,disabled:d,error:p,success:u},g),c))}},99445(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o=u(t(22155)),l=u(t(26560)),s=u(t(1592)),c=u(t(75235)),d=["children","label","span","labelTextAlign"];function u(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},p.apply(null,arguments)}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var f=(0,c.default)(l.default)(a||(a=m(["\n  padding: ",";\n"])),function(e){return e.theme.geometry.xs.spacing}),y=(0,c.default)(s.default)(r||(r=m(["\n  margin-right: ",";\n"])),function(e){return e.theme.geometry.xs.spacing}),g=c.default.div(i||(i=m(["\n  margin-bottom: ",";\n  flex: 1;\n"])),function(e){return e.theme.geometry.xs.spacing});n.default=function(e){var n=e.children,t=e.label,a=e.span,r=e.labelTextAlign,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,d);return o.default.createElement(f,{container:!0,item:!0,span:a||null},t?o.default.createElement(g,null,o.default.createElement(y,p({textAlign:r},i),t)):null,n)}},46982(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=c(t(22155)),i=c(t(98844)),o=c(t(75235)),l=c(t(40118)),s=["children","name"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},d.apply(null,arguments)}var u,p,m=(0,o.default)(i.default)(a||(u=["\n  text-align: center;\n  margin-bottom: ",";\n"],p||(p=u.slice(0)),a=Object.freeze(Object.defineProperties(u,{raw:{value:Object.freeze(p)}}))),function(e){return e.theme.geometry.sm.spacing});n.default=function(e){var n=e.children,t=e.name,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,s);return r.default.createElement(l.default.Row,null,r.default.createElement(l.default.Column,null,r.default.createElement(m,d({id:"propertySheet__heading--".concat(t),name:"propertySheet__heading--".concat(t),size:"lg"},a),n)))}},20437(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=o(t(22155)),r=o(t(70050)),i=["children"];function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},l.apply(null,arguments)}n.default=function(e){var n=e.children,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,i);return a.default.createElement(r.default,l({container:!0,align:"between"},t),n)}},16085(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(t(22155)),r=l(t(62590)),i=l(t(40118)),o=["name","children","onChange","value","options","error","success","label","span","labelTextAlign","disabled"];function l(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},s.apply(null,arguments)}n.default=function(e){var n=e.name,t=e.children,l=(e.onChange,e.value),c=e.options,d=e.error,u=e.success,p=e.label,m=e.span,f=e.labelTextAlign,y=e.disabled,g=void 0!==y&&y,b=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,o);return a.default.createElement(i.default.Column,{label:p,span:m,labelTextAlign:f},a.default.createElement(r.default,s({name:n,id:"propertySheet__select--".concat(n),onChange:function(t){return e.onChange(t,n)},color:"success",disabled:g,value:l,options:c,error:d,success:u},b),t))}},73598(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(t(22155)),r=l(t(63297)),i=l(t(40118)),o=["name","value","children","error","success","label","span","color","labelTextAlign"];function l(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},s.apply(null,arguments)}n.default=function(e){var n=e.name,t=e.value,l=e.children,c=e.error,d=e.success,u=e.label,p=e.span,m=e.color,f=e.labelTextAlign,y=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,o);return a.default.createElement(i.default.Column,{label:u,span:p,labelTextAlign:f},a.default.createElement(r.default,s({name:n,id:"propertySheet__select--".concat(n),color:m,disabled:!1,error:c,success:d,value:t},y),l))}},55506(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(t(22155)),r=l(t(43779)),i=l(t(40118)),o=["name","value","children","onChange","error","success","label","span","color","disabled","textInputRef","labelTextAlign"];function l(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},s.apply(null,arguments)}n.default=function(e){var n=e.name,t=e.value,l=e.children,c=(e.onChange,e.error),d=e.success,u=e.label,p=e.span,m=e.color,f=void 0===m?"normal":m,y=e.disabled,g=void 0!==y&&y,b=e.textInputRef,h=e.labelTextAlign,v=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,o);return a.default.createElement(i.default.Column,{label:u,span:p,labelTextAlign:h},a.default.createElement(r.default,s({name:n,id:"propertySheet__select--".concat(n),onChange:function(t){return e.onChange(t,n)},color:f,disabled:g,error:c,success:d,value:t,textInputRef:b},v),l))}},40118(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=y(t(22155)),i=y(t(60144)),o=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),l=y(t(46982)),s=y(t(20437)),c=y(t(58717)),d=y(t(16085)),u=y(t(99445)),p=y(t(55506)),m=y(t(73598)),f=["id","name","children","error","success"];function y(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},g.apply(null,arguments)}var b,h,v=o.default.div(a||(b=["\n  padding: ",";\n"],h||(h=b.slice(0)),a=Object.freeze(Object.defineProperties(b,{raw:{value:Object.freeze(h)}}))),function(e){return e.theme.geometry.md.spacing}),x=function(e){var n=e.id,t=e.name,a=e.children,l=e.error,s=e.success,c=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,f);return r.default.createElement(o.ThemeProvider,{theme:i.default},r.default.createElement(v,g({},c,{id:"".concat(n,"__container"),name:"".concat(t,"__container"),success:s,error:l}),a))};x.ButtonColumn=c.default,x.SelectColumn=d.default,x.TextInputColumn=p.default,x.TextColumn=m.default,x.HeaderRow=l.default,x.Row=s.default,x.Column=u.default,n.default=x},60144(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.geometry,t=e.fonts,a=e.colors;return{colors:a,fonts:t,geometry:n,radius:n.md.spacing,iconPadding:n.sm.spacing,containerBorder:n.md.border,containerBorderThickness:n.md.border,selectColors:{default:{border:a.inputs.normal.background,icon:a.text.normal.background},success:{border:a.success.normal.background},error:{border:a.danger.normal.background}}}}},70050(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=s(t(22155)),i=s(t(75235)),o=t(16463),l=["children"];function s(e){return e&&e.__esModule?e:{default:e}}var c,d,u=i.default.div(a||(c=["\n  ",";\n"],d||(d=c.slice(0)),a=Object.freeze(Object.defineProperties(c,{raw:{value:Object.freeze(d)}}))),function(e){var n=e.hidden,t=e.container,a=e.span,r=e.item,i=e.grow,l=e.shrink,s=e.reverse,c=e.distribution,d=void 0===c?"stretch":c,u=e.vdistribution,p=void 0===u?"stretch":u,m=e.itemAlign,f=void 0===m?"stretch":m,y=e.visuallyHidden,g=e.fullHeight,b=e.wrap,h=void 0===b||b;return"\n    box-sizing: border-box;\n    display: ".concat((n?"none":t&&"flex")||"initial",";\n    flex-basis ").concat(!a&&0!==a&&"0"!==a&&r?"auto":a?(0,o.getSpanWidth)(a):"0",";\n    max-width: ").concat(a?(0,o.getSpanWidth)(a):"100%",";\n    flex-grow: ").concat((!!i||0===i||"0"===i)&&i||r&&"1"||"initial",";\n    flex-shrink: ").concat((!!l||0===l||"0"===l)&&l||r&&"1"||"initial",";\n    flex-direction: ").concat(s?"row-reverse":"row",";\n    flex-wrap: ").concat(h,";\n    justify-content: ").concat(d&&(("stretch"===d?"stretch":"center"===d&&"center")||"start"===d&&"flex-start"||"end"===d&&"flex-end"||"between"===d&&"space-between"||"around"===d&&"space-around")||"initial",";\n    align-content: ").concat(p&&(("stretch"===p?"stretch":"center"===p&&"center")||"start"===p&&"flex-start"||"end"===p&&"flex-end"||"between"===p&&"space-between"||"around"===p&&"space-around")||"initial",";\n    align-items: ").concat((f&&"stretch"===f?"stretch":"center"===f&&"center")||"top"===f&&"flex-start"||"bottom"===f&&"flex-end"||"baseline"===f&&"baseline"||"initial",";\n    visibility: ").concat(y?"hidden":"initial",";\n    height: ").concat(g?"100%;":"initial",";\n  ")});n.default=function(e){var n=e.children,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,l);return r.default.createElement(u,t,n)}},74986(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ScrollContainer=void 0;var a,r,i,o=s(t(26560)),l=s(t(75235));function s(e){return e&&e.__esModule?e:{default:e}}n.ScrollContainer=(0,l.default)(o.default)(a||(r=["\n  ","\n"],i||(i=r.slice(0)),a=Object.freeze(Object.defineProperties(r,{raw:{value:Object.freeze(i)}}))),function(e){var n=e.theme,t=e.color,a=void 0===t?"overlay":t;return"\n    flex: auto;\n    overflow: auto;\n\n    ::-webkit-scrollbar {\n      width: 12px;\n    }\n    ::-webkit-scrollbar-track {\n      background: ".concat(n.colors[a].light.background,";\n    }\n    ::-webkit-scrollbar-thumb {\n      background: #888;\n      \n      :hover {\n        background: ").concat(n.colors[a].dark.background,";\n      }\n    }\n  ")})},76480(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c=h(t(22155)),d=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),u=h(t(1056)),p=h(t(21670)),m=h(t(19083)),f=["size"],y=["size","inline"],g=["size","active"],b=["onSearch","onChange","onBlur","onFocus","id","name","placeholder","readOnly","disabled","size","autoComplete","value","buttonText","inline","pill","hideButton"];function h(e){return e&&e.__esModule?e:{default:e}}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},v.apply(null,arguments)}function x(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function T(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var O=d.default.div(a||(a=T(["\n  ",";\n"])),function(e){var n=e.theme,t=e.inline,a=e.disabled;return"\n    font-family: ".concat(n.font.family,";\n    font-weight: ").concat(n.font.weight.default,";\n    display: ").concat(t?"inline-flex":"flex",";\n    position: relative;\n    overflow: hidden;\n    opacity: ").concat(a?"0.5":"1",";\n  ")}),k=d.default.div(r||(r=T(["\n  ",";\n"])),function(e){var n=e.size,t=e.theme,a=e.pill,r=e.hideButton;return"\n    box-sizing: border-box;\n    display: flex;\n    flex: 1 1 auto;\n    border-width: ".concat(t[n].border.width,";\n    border-color: ").concat(t.searchColors.default.border,";\n    border-style: ").concat(t[n].border.style,";\n    align-items: center;\n    background-color: ").concat(t.searchColors.default.background,";\n    border-radius: ").concat(a?"5000px":t[n].radius,";\n    ").concat(!r&&"border-top-right-radius: 0; border-bottom-right-radius: 0;","\n  ")}),j=(0,d.default)(function(e){e.size;var n=x(e,f);return c.default.createElement(m.default,n)})(i||(i=T(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    opacity: 0.3;\n    color: ".concat(n.searchColors.default.icon,";\n    font-size: ").concat(n[t].font.size.small,";\n    margin-left: ").concat(n[t].margin,";\n  ")}),C=(0,d.default)(function(e){e.size,e.inline;var n=x(e,y);return c.default.createElement("input",n)})(o||(o=T(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size,a=e.inline,r=e.readOnly,i=e.disabled;return"\n    padding: ".concat(n[t].padding,";\n    color: ").concat(n.searchColors.default.text,";\n    font-size: ").concat(n[t].font.size.default,";\n    font-family: ").concat(n.font.family,";\n    line-height: ").concat(n[t].font.lineHeight,";\n    background-color: transparent;\n    width: ").concat(a?"auto":"100%",";\n    display: block;\n    border: none;\n    flex: 1;\n    &::-ms-clear {\n      display: none;\n    }\n    &:focus {\n      outline: none;\n    }\n\n    ").concat(!r&&"\n      &:focus ~ button {\n        background-color: ".concat(n.searchColors.active.button.background,";\n        color: ").concat(n.searchColors.active.button.text,";\n      }\n    "),"\n\n    ").concat(i&&"\n      cursor: not-allowed;\n    ","\n\n\n    &::placeholder {\n      color: ").concat(n.searchColors.default.placeholder,";\n    }\n  ")}),S=d.default.form(l||(l=T(["\n  display: flex;\n  width: 100%;\n"]))),N=(0,d.default)(function(e){e.size,e.active;var n=x(e,g);return c.default.createElement(p.default,n)})(s||(s=T(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size,a=e.active;return"\n    border-top-left-radius: 0;\n    border-bottom-left-radius: 0;\n    border-width: ".concat(n[t].border.width,";\n    outline: none;\n    background-color: ").concat(a?n.searchColors.active.button.background:n.searchColors.default.button.background,";\n    border-color: ").concat(a?n.searchColors.active.button.background:n.searchColors.default.button.background,";\n    color: ").concat(a?n.searchColors.active.button.text:n.searchColors.default.button.text,";\n\n    &:active, &:focus, &:hover {\n      background-color: ").concat(a?n.searchColors.active.button.background:n.searchColors.default.button.background,";\n      border-color: ").concat(a?n.searchColors.active.button.background:n.searchColors.default.button.background,";\n      color: ").concat(a?n.searchColors.active.button.text:n.searchColors.default.button.text,";\n    }\n  ")});n.default=function(e){var n=e.onSearch,t=e.onChange,a=e.onBlur,r=e.onFocus,i=e.id,o=e.name,l=e.placeholder,s=void 0===l?"Search":l,p=e.readOnly,m=e.disabled,f=e.size,y=void 0===f?"md":f,g=e.autoComplete,h=void 0===g?"off":g,T=e.value,w=e.buttonText,D=void 0===w?"Search":w,A=e.inline,R=e.pill,P=void 0===R||R,L=e.hideButton,I=x(e,b);return c.default.createElement(d.ThemeProvider,{theme:u.default},c.default.createElement(O,v({inline:A,name:"".concat(o,"-Outer"),id:"".concat(i,"-Outer")},I),c.default.createElement(S,{onSubmit:function(e){e.preventDefault(),n()}.bind(void 0),name:"".concat(o,"-Form"),id:"".concat(i,"-Form")},c.default.createElement(k,{size:y,pill:P,hideButton:L},c.default.createElement(j,{size:y,icon:"search",name:"".concat(i,"-Icon"),id:"".concat(i,"-Icon")}),c.default.createElement(C,{id:i,name:o,placeholder:s,type:"search",size:y,disabled:m,readOnly:p,autoComplete:h?"on":"off",onChange:t,onBlur:a,onFocus:r,value:T})),!L&&c.default.createElement(N,{id:"".concat(i,"-SearchButton"),name:"".concat(o,"-SearchButton"),inline:!0,pill:P,size:y,disabled:m||0===T.length,readOnly:p,active:T.length>0},D))))}},1056(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},sm:{border:{width:t.sm.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.xs.spacing," ").concat(t.sm.spacing),radius:t.md.radius,font:{size:{default:n.sm.size,small:n.xs.size},lineHeight:n.sm.lineHeight}},md:{border:{width:t.md.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.sm.spacing," ").concat(t.md.spacing),radius:t.md.radius,font:{size:{default:n.md.size,small:n.sm.size},lineHeight:n.md.lineHeight}},lg:{border:{width:t.md.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.md.spacing," ").concat(t.lg.spacing),radius:t.md.radius,font:{size:{default:n.lg.size,small:n.md.size},lineHeight:n.lg.lineHeight}},xl:{border:{width:t.lg.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.lg.spacing," ").concat(t.xl.spacing),radius:t.md.radius,font:{size:{default:n.xl.size,small:n.lg.size},lineHeight:n.xl.lineHeight}},searchColors:{default:{border:a.inputs.normal.background,background:a.basic.white,text:a.text.dark.background,placeholder:a.inputs.dark.background,button:a.neutral.dark,icon:a.neutral.dark},active:{text:a.text.dark.background,placeholder:a.inputs.dark.background,button:a.success.normal}}}}},62590(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o=g(t(22155)),l=y(t(96107)),s=y(t(97759)),c=y(t(96632)),d=g(t(75235)),u=y(t(63297)),p=t(69059),m=["loadOptions"],f=["id","name","isMulti","multiValueColor","size","classPrefix","error","success","onChange","inline","options","pill","menuPlacement","value","loadOptions","defaultOptions","isDisabled","debounceTimeout"];function y(e){return e&&e.__esModule?e:{default:e}}function g(e,n){if("function"==typeof WeakMap)var t=new WeakMap,a=new WeakMap;return(g=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=n?a:t){if(r.has(e))return r.get(e);r.set(e,o)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(o,l,i):o[l]=e[l]);return o})(e,n)}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},b.apply(null,arguments)}function h(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(){var e,n,t="function"==typeof Symbol?Symbol:{},a=t.iterator||"@@iterator",r=t.toStringTag||"@@toStringTag";function i(t,a,r,i){var s=a&&a.prototype instanceof l?a:l,c=Object.create(s.prototype);return x(c,"_invoke",function(t,a,r){var i,l,s,c=0,d=r||[],u=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(n,t){return i=n,l=0,s=e,p.n=t,o}};function m(t,a){for(l=t,s=a,n=0;!u&&c&&!r&&n<d.length;n++){var r,i=d[n],m=p.p,f=i[2];t>3?(r=f===a)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=m&&((r=t<2&&m<i[1])?(l=0,p.v=a,p.n=i[1]):m<f&&(r=t<3||i[0]>a||a>f)&&(i[4]=t,i[5]=a,p.n=f,l=0))}if(r||t>1)return o;throw u=!0,a}return function(r,d,f){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&m(d,f),l=d,s=f;(n=l<2?e:s)||!u;){i||(l?l<3?(l>1&&(p.n=-1),m(l,s)):p.n=s:p.v=s);try{if(c=2,i){if(l||(r="next"),n=i[r]){if(!(n=n.call(i,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,l<2&&(l=0)}else 1===l&&(n=i.return)&&n.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),l=1);i=e}else if((n=(u=p.n<0)?s:t.call(a,p))!==o)break}catch(n){i=e,l=1,s=n}finally{c=1}}return{value:n,done:u}}}(t,r,i),!0),c}var o={};function l(){}function s(){}function c(){}n=Object.getPrototypeOf;var d=[][a]?n(n([][a]())):(x(n={},a,function(){return this}),n),u=c.prototype=l.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,x(e,r,"GeneratorFunction")),e.prototype=Object.create(u),e}return s.prototype=c,x(u,"constructor",c),x(c,"constructor",s),s.displayName="GeneratorFunction",x(c,r,"GeneratorFunction"),x(u),x(u,r,"Generator"),x(u,a,function(){return this}),x(u,"toString",function(){return"[object Generator]"}),(v=function(){return{w:i,m:p}})()}function x(e,n,t,a){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}x=function(e,n,t,a){function i(n,t){x(e,n,function(e){return this._invoke(n,t,e)})}n?r?r(e,n,{value:t,enumerable:!a,configurable:!a,writable:!a}):e[n]=t:(i("next",0),i("throw",1),i("return",2))},x(e,n,t,a)}function T(e,n,t,a,r,i,o){try{var l=e[i](o),s=l.value}catch(e){return void t(e)}l.done?n(s):Promise.resolve(s).then(a,r)}function O(e,n){if(e){if("string"==typeof e)return k(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?k(e,n):void 0}}function k(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach(function(n){S(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function S(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function N(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function w(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var D=(0,d.default)(function(e){var n=e.loadOptions,t=N(e,m);return o.default.cloneElement(o.default.createElement(n?s.default:l.default),C(C({},t),{},{loadOptions:n}))})(a||(a=w(["\n  ",";\n"])),function(e){var n=e.theme,t=e.pill,a=e.inline,r=e.size,i=e.error,o=e.success,l=e.classNamePrefix,s=e.multiValueColor,c=e.menuMaxHeight,d=e.menuMinHeight;return"    \n  font-family: ".concat(n.font.family,";\n  display: ").concat(a?"inline-block":"block",";\n  width: ").concat(a?"auto":"100%",";\n  background-color: ").concat(i&&n.selectColors.error.background||o&&n.selectColors.success.background||n.selectColors.default.background,";\n  border-width: ").concat(n[r].border.width,";\n  border-color: ").concat(i&&n.selectColors.error.border||o&&n.selectColors.success.border||n.selectColors.default.border,";\n  border-style: ").concat(n[r].border.style,";\n  border-radius: ").concat(t?"5000px":n[r].radius,";\n\n  &:focus-within, &:hover, .focus {\n    border-color: ").concat(i&&n.selectColors.error.border||o&&n.selectColors.success.border||n.selectColors.active.border,";\n    background-color: ").concat(i&&n.selectColors.error.background||o&&n.selectColors.success.background||n.selectColors.active.background,";\n    outline: none;\n    box-shadow: none;\n  }   \n\n  .").concat(l,"__control {\n    font-weight: ").concat(n.font.weight.default,";\n    padding: 0px;\n    background: none;\n    border: none;\n\n    &:focus-within, &:hover, .focus {\n      background: none;\n      border: none;\n      outline: none;\n      box-shadow: none;\n    }   \n\n    .").concat(l,"__indicator {\n      svg { \n        path {\n          fill: ").concat(i&&n.selectColors.error.border||o&&n.selectColors.success.border||n.selectColors.default.text,";\n        }\n      }\n    }\n\n    .").concat(l,"__indicator-separator {\n        display: none;\n    }\n      \n    .").concat(l,"__value-container, .").concat(l,"__value-container:focus-within, .").concat(l,"__value-container:hover, .").concat(l,"__value-container.focus  {\n        padding: ").concat(n[r].padding,";\n        color: ").concat(n.selectColors.default.text,";\n        font-size: ").concat(n[r].font.size.default,";\n        line-height: ").concat(n[r].font.lineHeight,";\n        &>div {\n            padding-top: 0px;\n            padding-bottom: 0px;\n        }\n      }  \n    }\n\n    .").concat(l,"__menu, .").concat(l,"__menu-list {\n      max-height: ").concat(c||"auto","  !important;\n      min-height: ").concat(d||"auto"," !important;\n    }\n\n    .").concat(l,"__multi-value__label {\n      color: ").concat(n.multiValueColors[s].text,";\n      font-size: ").concat(n[r].font.size.default,";\n      line-height: ").concat(n[r].font.lineHeight,";\n      background-color:  ").concat(n.multiValueColors[s].background,";\n      border-radius:0;\n    }\n    .").concat(l,"__multi-value {\n      border-radius: ").concat(n[r].radius,";\n      overflow:hidden;\n    }\n    .").concat(l,"__multi-value__remove {\n      color: ").concat(n.multiValueColors[s].text,";\n      border-color:").concat(n.multiValueColors[s].border,";\n      background-color:  ").concat(n.multiValueColors[s].background,";\n      border-radius:0;\n      &:hover  {\n        color: ").concat(n.multiValueColors[s].hover.text,";\n        border-color:").concat(n.multiValueColors[s].hover.border,";\n        background-color:  ").concat(n.multiValueColors[s].hover.background,";\n      }\n    }\n  ")}),A=d.default.div(r||(r=w(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    padding: ".concat(n[t].padding,";\n  ")}),R=d.default.div(i||(i=w(["\n  ",";\n"])),function(e){var n=e.inline;return"\n    display: ".concat(n?"inline-block":"block",";\n    width: ").concat(n?"auto":"100%",";\n  ")}),P={multiValue:function(e,n){return n.data.isFixed?C(C({},e),{},{backgroundColor:"gray"}):e},multiValueLabel:function(e,n){return n.data.isFixed?C(C({},e),{},{fontWeight:"bold",color:"white",paddingRight:6}):e},multiValueRemove:function(e,n){return n.data.isFixed?C(C({},e),{},{display:"none"}):e},menuPortal:function(e){return C(C({},e),{},{zIndex:9999})}};n.default=function(e){e.id;var n,t,a,r,i,l=e.name,s=e.isMulti,m=e.multiValueColor,y=void 0===m?"primary":m,g=e.size,x=void 0===g?"md":g,k=e.classPrefix,j=void 0===k?"rs":k,C=e.error,S=e.success,w=e.onChange,L=e.inline,I=e.options,E=void 0===I?[]:I,_=e.pill,F=void 0===_||_,B=e.menuPlacement,U=void 0===B?"auto":B,M=e.value,V=e.loadOptions,z=e.defaultOptions,G=void 0===z?[]:z,$=e.isDisabled,W=e.debounceTimeout,q=void 0===W?0:W,J=N(e,f),Y=(t=(0,o.useState)(""),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,r,i,o,l=[],s=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;s=!1}else for(;!(s=(a=i.call(t)).done)&&(l.push(a.value),l.length!==n);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return l}}(t,a)||O(t,a)||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.")}()),H=Y[0],K=Y[1],Q=(0,o.useMemo)(function(){return E.sort(function(e){return H?e.label.startsWith(H)?-1:void 0:0})},[H,E]),Z=(0,o.useCallback)(function(e){K(e)},[]),X=C||S||null,ee="".concat(l,"Input").concat(C?"Error":S&&"Success"),ne=("sm"===x?"xs":"md"===x&&"sm")||"lg"===x&&"md"||"xl"===x&&"lg"||void 0,te=(C?"danger":S&&"success")||void 0,ae=document.getElementsByTagName("BODY")[0],re=null===(n=E.filter)||void 0===n?void 0:n.call(E,function(e){return e.isFixed}),ie=(0,o.useCallback)((0,p.debounce)(function(){var e,n=(e=v().m(function e(n){var t,a,r;return v().w(function(e){for(;;)switch(e.n){case 0:if(V){e.n=1;break}return e.a(2);case 1:return e.n=2,V(n);case 2:if(t=e.v,a=t.options,!((r=t.total)&&r>a.length)){e.n=3;break}return e.a(2,[{value:"",label:"Entire list not shown, please start typing to conduct search",isDisabled:!0}].concat(a));case 3:return e.a(2,a)}},e)}),function(){var n=this,t=arguments;return new Promise(function(a,r){var i=e.apply(n,t);function o(e){T(i,a,r,o,l,"next",e)}function l(e){T(i,a,r,o,l,"throw",e)}o(void 0)})});return function(e){return n.apply(this,arguments)}}(),q),[V]);return o.default.createElement(d.ThemeProvider,{theme:c.default},o.default.createElement(R,{name:"".concat(l,"__select__container"),inline:L},o.default.createElement(D,b({styles:P,inline:L,isMulti:s,multiValueColor:y,menuPlacement:U,menuPortalTarget:ae,options:Q,value:"string"==typeof M?(r=E,i=M,r.find(function(e){return e.value===i})):M,name:l,classNamePrefix:j,size:x,error:C,success:S,pill:F,loadOptions:V?ie:void 0,defaultOptions:Array.isArray(G)?Array.from(new Set([].concat(h(G),h(re)))):G,onChange:function(e,n){return function(e,n,t,a,r){r&&r({target:{name:t,action:n,type:"select",value:e?e.value:null,label:e?e.label:null,select:"clear"===n?a:e}})}(e,n.action,l,re,w)},isDisabled:$,onInputChange:Z},J)),X&&o.default.createElement(A,{name:"".concat(l,"__message"),size:x,error:C,sucess:S},o.default.createElement(u.default,{name:ee,size:ne,weight:"bold",color:te},X))))}},96632(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},sm:{border:{width:t.sm.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.xs.spacing," ").concat(t.sm.spacing),radius:t.md.radius,font:{size:{default:n.sm.size,small:n.xs.size},lineHeight:n.sm.lineHeight}},md:{border:{width:t.md.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.sm.spacing," ").concat(t.md.spacing),radius:t.md.radius,font:{size:{default:n.md.size,small:n.sm.size},lineHeight:n.md.lineHeight}},lg:{border:{width:t.md.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.md.spacing," ").concat(t.lg.spacing),radius:t.md.radius,font:{size:{default:n.lg.size,small:n.md.size},lineHeight:n.lg.lineHeight}},xl:{border:{width:t.lg.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.lg.spacing," ").concat(t.xl.spacing),radius:t.md.radius,font:{size:{default:n.xl.size,small:n.lg.size},lineHeight:n.xl.lineHeight}},selectColors:{default:{border:a.inputs.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},dark:{border:a.inputs.dark.background,background:a.inputs.dark.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},active:{border:a.info.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},success:{border:a.success.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},error:{border:a.danger.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background}},multiValueColors:{primary:{border:a.primary.normal.background,background:a.primary.normal.background,text:a.primary.normal.text,hover:{background:a.primary.dark.background,border:a.primary.dark.background,text:a.primary.dark.text}},secondary:{background:a.secondary.normal.background,border:a.secondary.normal.background,text:a.secondary.normal.text,hover:{background:a.secondary.dark.background,border:a.secondary.dark.background,text:a.secondary.dark.text}},tertiary:{background:a.tertiary.normal.background,border:a.tertiary.normal.background,text:a.tertiary.normal.text,hover:{background:a.tertiary.dark.background,border:a.tertiary.dark.background,text:a.tertiary.dark.text}},neutral:{background:a.neutral.normal.background,border:a.neutral.normal.background,text:a.neutral.normal.text,hover:{background:a.neutral.dark.background,border:a.neutral.dark.background,text:a.neutral.dark.text}},info:{background:a.info.normal.background,border:a.info.normal.background,text:a.info.normal.text,hover:{background:a.info.dark.background,border:a.info.dark.background,text:a.info.dark.text}},success:{background:a.success.normal.background,border:a.success.normal.background,text:a.success.normal.text,hover:{background:a.success.dark.background,border:a.success.dark.background,text:a.success.dark.text}},warning:{background:a.warning.normal.background,border:a.warning.normal.background,text:a.warning.normal.text,hover:{background:a.warning.dark.background,border:a.warning.dark.background,text:a.warning.dark.text}},danger:{background:a.danger.normal.background,border:a.danger.normal.background,text:a.danger.normal.text,hover:{background:a.danger.dark.background,border:a.danger.dark.background,text:a.danger.dark.text}}}}}},57923(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c=g(t(22155)),d=g(t(75235)),u=g(t(74807)),p=g(t(63297)),m=g(t(43779)),f=g(t(3083)),y=t(16463);function g(e){return e&&e.__esModule?e:{default:e}}function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach(function(n){v(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function v(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var T=d.default.div(a||(a=x(["\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  right: 0px;\n  bottom: 0px;\n"]))),O=d.default.div(r||(r=x(["\n  position: relative;\n  border-radius: ",";\n  background: ",";\n  border: 1px solid ",";\n  overflow: visible;\n  padding: ",";\n  margin-top: ",";\n\n  &:after,\n  &:before {\n    bottom: 100%;\n    left: 50%;\n    border: solid transparent;\n    content: ' ';\n    height: 0;\n    width: 0;\n    position: absolute;\n    pointer-events: none;\n  }\n\n  &:after {\n    border-color: rgba(0, 0, 0, 0);\n    border-bottom-color: ",";\n    border-width: ",";\n    margin-left: -",";\n  }\n  &:before {\n    border-color: rgba(0, 0, 0, 0);\n    border-bottom-color: ",";\n    border-width: ",";\n    margin-left: -",";\n  }\n"])),function(e){return e.theme.geometry.md.radius},function(e){return e.theme.colors.basic.white},function(e){return e.theme.colors.overlay.normal.background},function(e){return e.theme.geometry.sm.spacing},function(e){var n=e.theme;return"".concat(n.geometry.xs.spacing)},function(e){return e.theme.colors.basic.white},function(e){return e.theme.geometry.xs.spacing},function(e){return e.theme.geometry.xs.spacing},function(e){return e.theme.colors.overlay.normal.background},function(e){var n=e.theme;return(0,y.add)(n.geometry.xs.spacing,1)},function(e){var n=e.theme;return(0,y.add)(n.geometry.xs.spacing,1)}),k=d.default.div(i||(i=x(["\n  width: ",";\n  max-width: ",";\n  max-height: ",";\n  overflow: auto;\n"])),function(e){return e.menuWidth||"auto"},function(e){return e.menuMaxWidth||"auto"},function(e){return e.menuMaxHeight||"auto"}),j=d.default.div(o||(o=x(["\n  padding: ",";\n  margin-right: ",";\n  display: flex;\n  justify-content: flex-start;\n  align-items: center;\n"])),function(e){var n=e.theme;return"".concat(n.geometry.xs.spacing," ").concat(n.geometry.xxs.spacing)},function(e){var n=e.theme;return"".concat(n.geometry.xs.spacing," ").concat(n.geometry.sm.spacing)}),C=(0,d.default)(f.default)(l||(l=x(["\n  margin-right: ",";\n"])),function(e){return e.theme.geometry.xs.spacing}),S=(0,d.default)(m.default)(s||(s=x(["\n  margin-top: ",";\n  margin-bottom: ",";\n"])),function(e){return e.theme.geometry.xxs.spacing},function(e){return e.theme.geometry.xs.spacing});n.default=function(e){var n=e.id,t=e.name,a=e.children,r=e.showFilter,i=void 0===r||r,o=e.filterPlaceholder,l=e.onFilterChange,s=void 0===l?function(){}:l,d=e.filterValue,m=e.onSelectChange,f=void 0===m?function(){}:m,y=e.options,g=e.selected,b=void 0===g?[]:g,v=e.showDropdown,x=e.onOutsideClick,N=void 0===x?function(){}:x,w=e.menuMaxHeight,D=e.menuWidth,A=e.menuMaxWidth,R=e.showSelectAll,P=void 0===R||R,L=e.onSelectAll,I=void 0===L?function(){}:L,E=e.allSelected,_=e.groupSelected,F=void 0===_||_,B=e.attachment,U=void 0===B?"top center":B,M=e.constraints,V=void 0===M?[{to:"scrollParent",attachment:"together"}]:M,z=function(e){return f({target:{name:e.value,type:"checkbox",checked:!e.checked}})},G=function(e){return!!b.find(function(n){return"string"==typeof n?n===e.value:n.value===e.value})};return c.default.createElement("div",null,v&&c.default.createElement(T,{onClick:N}),c.default.createElement(u.default,{attachment:U,constraints:V},c.default.Children.only(a),v&&c.default.createElement(O,null,i&&c.default.createElement(S,{id:"".concat(n,"__filter"),name:"".concat(t,"__filter"),size:"sm",placeholder:o,value:d,onChange:s}),c.default.createElement(k,{menuMaxHeight:w,menuWidth:D,menuMaxWidth:A},P&&c.default.createElement(j,null,c.default.createElement(C,{id:"".concat(n,"__select-all__checkbox"),name:"".concat(t,"__select-all__checkbox"),onChange:I,checked:E,inline:!0,pill:!1}),c.default.createElement(p.default,{id:"".concat(n,"__select-all__checkbox-text"),name:"".concat(t,"__select-all__checkbox-text"),inline:!0,color:"normal",onClick:I},E?"Unselect all":"Select all")),!!y&&y.map(function(e){return h(h({},e),{},{checked:G(e)})}).sort(F?function(e,n){return e.checked===n.checked?0:e.checked?-1:1}:function(){}).map(function(e,a){return c.default.createElement(j,{key:e.value},c.default.createElement(C,{id:"".concat(n,"__").concat(e.value,"__checkbox"),name:"".concat(t,"__").concat(e.value,"__checkbox"),onChange:function(){return z(e)},checked:G(e),inline:!0,pill:!1}),c.default.createElement(p.default,{id:"".concat(n,"__").concat(e.value,"__checkbox-text"),name:"".concat(t,"__").concat(e.value,"__checkbox-text"),inline:!0,color:"normal",onClick:function(){return z(e)}},e.label))})))))}},92948(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c,d=x(t(22155)),u=x(t(28214)),p=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),m=x(t(63297)),f=x(t(62590)),y=x(t(19083)),g=x(t(70050)),b=x(t(26560)),h=t(96107),v=["id","name","size","theme","error","success","onChange","options","fileName","templateLabel","value","onDelete","canDelete"];function x(e){return e&&e.__esModule?e:{default:e}}function T(){return T=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},T.apply(null,arguments)}function O(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var k=(0,p.default)(b.default)(a||(a=O(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    padding-right: ".concat(n.geometry.md.spacing,";\n    padding-left: ").concat(n.geometry.xxs.spacing,";\n\n  ")}),j=(0,p.default)(k)(r||(r=O(["\n  flex-basis: 10%;\n"]))),C=p.default.div(i||(i=O(["\n  ",";\n"])),function(e){var n=e.theme,t=e.error,a=e.success;return"\n    background-color: white;\n    border: ".concat(n.containerBorderThickness," solid ").concat(t?n.selectColors.error.border:a?n.selectColors.success.border:n.selectColors.default.border,";\n    padding: ").concat(n.geometry.md.spacing,";\n    cursor: pointer;\n    border-radius: ").concat(n.radius,"\n  ")}),S=(0,p.default)(g.default)(o||(o=O(["\n  align-items: center;\n"]))),N=p.default.div(l||(l=O(["\n  padding-bottom: ",";\n"])),function(e){return e.theme.geometry.xs.spacing}),w=p.default.div(s||(s=O(["\n  display: flex;\n  align-items: center;\n  position: relative;\n"]))),D=(0,p.default)(y.default)(c||(c=O(["\n  position: absolute;\n  right: ",";\n  cursor: pointer;\n  :hover {\n    color: ",";\n  }\n"])),function(e){return e.theme.geometry.xs.spacing},function(e){return e.theme.colors.danger.light.text}),A=function(e){var n=e.children,t=e.onDelete,a=e.constructedStyles,r=e.data,i=e.innerProps,o=e.canDelete,l=e.setValue,s=e.selectProps,c=e.clearValue,u=e.isSelected;return d.default.createElement(w,null,d.default.createElement(h.components.Option,T({},e,i)),o&&!r.hiddenIcon&&d.default.createElement(D,{onClick:function(n){t(n,e.value),i.onClick(),u&&c(),l(s.value,"selectOption")},id:n,name:n,icon:"times",color:a.selectColors.default.icon,size:"1x"}))};n.default=(0,p.withTheme)(function(e){var n=e.id,t=e.name,a=e.size,r=void 0===a?"md":a,i=e.theme,o=e.error,l=e.success,s=e.onChange,c=e.options,g=e.fileName,h=e.templateLabel,x=e.value,O=e.onDelete,k=e.canDelete,w=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,v),D=(0,u.default)(i);return d.default.createElement(p.ThemeProvider,{theme:u.default},d.default.createElement(C,T({},w,{id:"".concat(n,"_Container"),success:l,error:o}),d.default.createElement(S,{id:"".concat(n,"__Row_1"),container:!0,fullHeight:!0},d.default.createElement(j,{fullHeight:!0,id:"".concat(n,"__Column_1")},d.default.createElement(y.default,{id:"".concat(n,"__Icon"),name:"".concat(t,"__Icon"),icon:"file-upload",color:D.selectColors.default.icon,size:"6x"})),d.default.createElement(b.default,{item:!0,id:"".concat(n,"__Column_2")},d.default.createElement(N,null,d.default.createElement(m.default,{id:"".concat(n,"__Top_Text"),name:"".concat(t,"__Top_Text"),size:"lg",color:"normal",weight:"normal",overflow:"visible",align:"left"},g),d.default.createElement(m.default,{id:"".concat(n,"__Bottom_Text"),name:"".concat(t,"__Bottom_Text"),size:"md",color:"normal",weight:"normal",overflow:"visible",align:"left"},h)),d.default.createElement(f.default,{id:"".concat(n,"__Select"),name:"".concat(t,"__Select"),size:r,error:o,success:l,options:c,onChange:s,value:x,components:{Option:function(e){var n=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return d.default.createElement(A,T({},n,{onDelete:O,canDelete:k,constructedStyles:D}))}}})))))})},28214(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.geometry,t=e.fonts,a=e.colors;return{colors:a,fonts:t,geometry:n,radius:n.md.spacing,containerBorder:n.md.border,containerBorderThickness:n.md.border,selectColors:{default:{border:a.inputs.normal.background,icon:a.text.light.background},success:{border:a.success.normal.background},error:{border:a.danger.normal.background}}}}},98855(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i=d(t(22155)),o=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),l=d(t(54251)),s=d(t(21670)),c=["options","disabled","id","name","pill","size","onChange","selected","inline","color"];function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},u.apply(null,arguments)}function p(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var m=(0,o.default)(s.default)(a||(a=p(["\n  ",";\n"])),function(e){e.theme,e.size;var n=e.pill,t=e.buttonLeft,a=e.buttonRight;return"\n    border-top-left-radius: ".concat((n&&t?"100000px":"0px")||0,";\n    border-bottom-left-radius: ").concat((n&&t?"100000px":"0px")||0,";\n    border-top-right-radius: ").concat((n&&a?"100000px":"0px")||0,";\n    border-bottom-right-radius: ").concat((n&&a?"100000px":"0px")||0,";\n  ")}),f=o.default.div(r||(r=p(["\n  ",";\n"])),function(e){var n=e.inline;return"\n    display: ".concat(n?"inline-flex":"flex",";\n  ")});n.default=function(e){var n=e.options,t=e.disabled,a=e.id,r=e.name,s=e.pill,d=e.size,p=void 0===d?"md":d,y=e.onChange,g=e.selected,b=e.inline,h=e.color,v=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,c);return i.default.createElement(o.ThemeProvider,{theme:l.default},i.default.createElement(f,u({},v,{inline:b}),n.map(function(e,o){return i.default.createElement(m,{id:"".concat(a,"-").concat(e,"-button"),pill:s,key:e,name:"".concat(r,"-").concat(e,"-button"),inline:b,size:p,buttonLeft:0===o,buttonRight:o===n.length-1,outline:g!==e&&g!==o,onClick:function(n){return y(o,e,n)},color:h,disabled:t},e)})))}},54251(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.colors,t=e.fonts,a=e.geometry;return{colors:n,fonts:t,geometry:a,sm:{radius:a.md.radius},md:{radius:a.md.radius},lg:{radius:a.md.radius},xl:{padding:"".concat(a.lg.spacing," ").concat(a.xl.spacing),radius:a.md.radiu}}}},31650(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=d(t(22155)),r=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),i=d(t(89572)),o=d(t(37357));t(4778);var l,s,c=["id","name","inline"];function d(e){return e&&e.__esModule?e:{default:e}}function u(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var p=r.default.div(l||(l=u(["\n  "," position: relative;\n  display: block;\n  width: 100%;\n  height: 100%;\n"])),function(e){var n=e.theme;return e.inline,"\n  font-family: ".concat(n.font.family,";\n  font-weight: ").concat(n.font.weight.default,";\n")}),m=(0,r.default)(o.default)(s||(s=u(["\n  position: absolute !important;\n  width: 100%;\n  height: 100%;\n"])));n.default=function(e){var n=e.id,t=e.name,o=e.inline,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,c);return a.default.createElement(r.ThemeProvider,{theme:i.default},a.default.createElement(p,{id:"".concat(n,"-Outer"),name:"".concat(t,"-Outer"),inline:o},a.default.createElement(m,l)))}},89572(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry;return{colors:e.colors,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},sm:{border:{width:t.sm.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.xs.spacing," ").concat(t.sm.spacing),radius:t.md.radius,font:{size:{default:n.sm.size,small:n.xs.size},lineHeight:n.sm.lineHeight}},md:{border:{width:t.md.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.sm.spacing," ").concat(t.md.spacing),radius:t.md.radius,font:{size:{default:n.md.size,small:n.sm.size},lineHeight:n.md.lineHeight}},lg:{border:{width:t.md.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.md.spacing," ").concat(t.lg.spacing),radius:t.md.radius,font:{size:{default:n.lg.size,small:n.md.size},lineHeight:n.lg.lineHeight}},xl:{border:{width:t.lg.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.lg.spacing," ").concat(t.xl.spacing),radius:t.md.radius,font:{size:{default:n.xl.size,small:n.lg.size},lineHeight:n.xl.lineHeight}}}}},96666(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Tab",{enumerable:!0,get:function(){return s.default}}),n.TabPanel=function(e){var n=e.children,t=e.value,a=e.index;return i.default.createElement(u,{hidden:t!==a},t===a&&n)},n.Tabs=void 0;var a,r,i=c(t(22155)),o=c(t(75235)),l=c(t(62299)),s=c(t(49602));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var u=o.default.div(a||(a=d(["\n  width: 100%;\n  height: 100%;\n"])));n.Tabs=(0,o.default)(l.default)(r||(r=d(["\n  ","\n"])),function(e){var n=e.theme,t=e.indicatorColor;return"\n  & .MuiTabs-indicator {\n    background-color: ".concat(function(e,n){return"secondary"===n?e.colors.secondary.dark.background:"tertiary"===n?e.colors.tertiary.dark.background:e.colors.primary.dark.background}(n,t),";\n  }\n  ")})},63297(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=s(t(22155)),i=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),o=s(t(35221)),l=["children"];function s(e){return e&&e.__esModule?e:{default:e}}var c,d,u=i.default.p(a||(c=["\n  ",";\n"],d||(d=c.slice(0)),a=Object.freeze(Object.defineProperties(c,{raw:{value:Object.freeze(d)}}))),function(e){var n=e.theme,t=e.weight,a=void 0===t?"normal":t,r=e.align,i=void 0===r?"left":r,o=e.nowrap,l=e.overflow,s=void 0===l?"visible":l,c=e.italic,d=e.inline,u=e.size,p=void 0===u?"md":u,m=e.color,f=void 0===m?"normal":m;return"\n    font-family: ".concat(n.textFonts.family,";\n    font-weight: ").concat(n.textFonts.weight[a],";\n    text-align: ").concat(i,";\n    text-overflow: ellipsis;\n    word-wrap: break-word;\n    overflow-wrap: break-word;\n    white-space: ").concat(o?"nowrap":"initial",";\n    overflow: ").concat(s,"\n    font-style: ").concat(c?"italic":"initial",";\n    display: ").concat(d?"inline-block":"block",";\n    margin: ").concat(n.sizes[p].margin,";\n    padding: ").concat(n.sizes[p].padding,";\n    font-size: ").concat(n.sizes[p].font.size,";\n    line-height: ").concat(n.sizes[p].font.lineHeight,";\n    color:").concat(n.textColors[f].text,";\n  ")});n.default=function(e){var n=e.children,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,l);return r.default.createElement(i.ThemeProvider,{theme:o.default},r.default.createElement(u,t,n))}},35221(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.colors,t=e.fonts;return{colors:n,fonts:t,geometry:e.geometry,textFonts:{family:t.family,weight:{light:t.weight.light,normal:t.weight.normal,bold:t.weight.bold}},textColors:{light:{text:n.text.light.background,border:""},normal:{text:n.text.normal.background,border:""},dark:{text:n.text.dark.background,border:""},primary:{text:n.primary.normal.background,border:""},secondary:{text:n.secondary.normal.background,border:""},tertiary:{text:n.tertiary.normal.background,border:""},quaternary:{text:n.quaternary.normal.background,border:""},quinary:{text:n.quinary.normal.background,border:""},senary:{text:n.senary.normal.background,border:""},neutral:{text:n.neutral.normal.background,border:""},info:{text:n.info.normal.background,border:""},success:{text:n.success.normal.background,border:""},warning:{text:n.warning.normal.background,border:""},danger:{text:n.danger.normal.background,border:""},white:{text:n.basic.white}},sizes:{xs:{margin:"0",padding:"0",font:{size:t.xs.size,lineHeight:t.xs.lineHeight}},sm:{margin:"0",padding:"0",font:{size:t.sm.size,lineHeight:t.sm.lineHeight}},md:{margin:"0",padding:"0",font:{size:t.md.size,lineHeight:t.md.lineHeight}},lg:{margin:"0",padding:"0",font:{size:t.lg.size,lineHeight:t.lg.lineHeight}},xl:{margin:"0",padding:"0",font:{size:t.xl.size,lineHeight:t.xl.lineHeight}},xxl:{margin:"0",padding:"0",font:{size:t.xxl.size,lineHeight:t.xxl.lineHeight}}}}}},56928(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c=y(t(22155)),d=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),u=y(t(75114)),p=y(t(63297)),m=y(t(19083)),f=["id","name","maxLength","onChange","onBlur","onFocus","placeholder","value","autoComplete","size","success","error","box","disabled","readOnly","resize","pill"];function y(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},g.apply(null,arguments)}function b(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var h=d.default.div(a||(a=b(["\n  ",";\n"])),function(e){var n=e.theme,t=e.disabled;return"\n    font-family: ".concat(n.font.family,";\n    font-weight: ").concat(n.font.weight.default,";\n    flex-direction: column;\n    display: flex;\n    position: relative;\n    overflow: hidden;\n    opacity: ").concat(t?"0.5":"1",";\n  ")}),v=d.default.div(r||(r=b(["\n  ",";\n"])),function(e){var n=e.box,t=e.pill,a=e.size,r=e.theme,i=e.error,o=e.success,l=e.disabled,s=e.readOnly;return"\n    display: flex;\n    flex: 1 1 auto;\n    position: relative;\n    flex-direction: column;\n\n    outline: ".concat(n?r[a].border.width:"0",";\n    border-width: ").concat(n?r[a].border.width:"0 0 ".concat(r[a].border.width," 0"),";\n    border-color: ").concat(i&&r.textColors.error.border||o&&r.textColors.success.border||r.textColors.default.border,";\n    border-style: ").concat(r[a].border.style,";\n    border-radius: ").concat(n&&(t?r[a].pillRadius:r[a].radius),";\n    align-items: center;\n    background-color: ").concat(n&&(i&&r.textColors.error.background||o&&r.textColors.success.background||r.textColors.default.background)||"transparent",";\n    \n    ").concat(!l&&!s&&"\n    &:focus-within, .focus {\n      border-color: ".concat(i&&r.textColors.error.border||o&&r.textColors.success.border||r.textColors.active.border,";\n      background-color: ").concat(n&&(i&&r.textColors.error.background||o&&r.textColors.success.background||r.textColors.active.background)||"transparent",";\n    }"),"\n  ")}),x=d.default.textarea(i||(i=b(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size,a=e.error,r=e.success,i=e.resize;return"\n    padding: ".concat(n[t].padding,";\n    color: ").concat(a&&n.textColors.error.text||r&&n.textColors.success.text||n.textColors.default.text,";\n    font-size: ").concat(n[t].font.size.default,";\n    line-height: ").concat(n[t].font.lineHeight,";\n    background-color: transparent;\n    display: block;\n    border: none;\n    flex: 1;\n    width: 100%;\n\n    ").concat(i?"":"resize: none;","\n\n    &:focus {\n      outline: none;\n    }\n\n    &::placeholder {\n      color: ").concat(a&&n.textColors.error.placeholder||r&&n.textColors.success.placeholder||n.textColors.default.placeholder,";\n    }\n\n    &::-ms-clear, &::-ms-reveal {\n      display: none;\n    }\n  ")}),T=d.default.div(o||(o=b(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    padding: ".concat(n[t].padding,";\n  ")}),O=d.default.span(l||(l=b(["\n  ",";\n"])),function(e){var n=e.error,t=e.success,a=e.theme,r=e.size;return"\n    color: ".concat(n&&a.textColors.error.border||t&&a.textColors.success.border||a.textColors.dark.border,";\n    font-size: ").concat(a[r].font.size.small,";\n    margin-right: ").concat(a[r].margin,";\n    position: absolute;\n    top: 50%;\n    right: 0;\n    margin-top: -").concat(a[r].font.size.small,";\n  ")}),k=(0,d.default)(p.default)(s||(s=b(["\n  position: absolute;\n  bottom: 0px;\n  right: 20px;\n"])));n.default=function(e){var n=e.id,t=e.name,a=e.maxLength,r=e.onChange,i=e.onBlur,o=e.onFocus,l=e.placeholder,s=e.value,y=e.autoComplete,b=void 0===y||y,j=e.size,C=void 0===j?"md":j,S=e.success,N=e.error,w=e.box,D=void 0===w||w,A=e.disabled,R=e.readOnly,P=e.resize,L=e.pill,I=void 0===L||L,E=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,f),_=N||S;return c.default.createElement(d.ThemeProvider,{theme:u.default},c.default.createElement(h,g({},E,{disabled:A,id:"".concat(n,"-container"),name:"".concat(t,"-container")}),c.default.createElement(v,{box:D,pill:I,size:C,error:N,success:S,disabled:A,readOnly:R},c.default.createElement(x,{size:C,error:N,success:S,id:n,name:t,onChange:r,onFocus:o,onBlur:i,placeholder:l,value:s,autoComplete:b?"on":"off",disabled:A,readOnly:R,resize:P}),_&&c.default.createElement(O,{error:N,success:S,size:C},c.default.createElement(m.default,{icon:N?"exclamation-circle":S&&"check"})),a&&c.default.createElement(k,{name:"charCounter",color:(N?"danger":S&&"success")||void 0},s&&s.length||0,"/",a)),_&&c.default.createElement(T,{id:"".concat(n).concat((N?"Error":S&&"Success")||"","Message"),name:"".concat(t).concat((N?"Error":S&&"Success")||"","Message"),size:C},c.default.createElement(p.default,{name:"".concat(t,"Input").concat(N?"Error":S&&"Success"),weight:"bold",size:("sm"===C?"xs":"md"===C&&"sm")||"lg"===C&&"md"||"xl"===C&&"lg"||void 0,color:N?"danger":S&&"success"},_))))}},75114(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},sm:{border:{width:t.sm.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.xs.spacing," ").concat(t.sm.spacing),radius:t.md.radius,pillRadius:t.xl.radius,font:{size:{default:n.sm.size,small:n.xs.size},lineHeight:n.sm.lineHeight}},md:{border:{width:t.md.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.xs.spacing," ").concat(t.sm.spacing),radius:t.md.radius,pillRadius:t.xl.radius,font:{size:{default:n.md.size,small:n.sm.size},lineHeight:n.md.lineHeight}},lg:{border:{width:t.md.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.sm.spacing," ").concat(t.md.spacing),radius:t.md.radius,pillRadius:t.xl.radius,font:{size:{default:n.lg.size,small:n.md.size},lineHeight:n.lg.lineHeight}},xl:{border:{width:t.lg.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.sm.spacing," ").concat(t.md.spacing),radius:t.md.radius,pillRadius:t.xl.radius,font:{size:{default:n.xl.size,small:n.lg.size},lineHeight:n.xl.lineHeight}},textColors:{default:{border:a.inputs.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},dark:{border:a.inputs.dark.background,background:a.inputs.dark.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},active:{border:a.info.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},success:{border:a.success.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},error:{border:a.danger.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background}}}}},90991(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i=d(t(22155)),o=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),l=d(t(85555)),s=d(t(63297)),c=["id","children","color","size","padding","weight"];function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},u.apply(null,arguments)}function p(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var m=o.default.div(a||(a=p(["\n  ",";\n"])),function(e){var n=e.theme,t=e.color,a=e.inline,r=e.size;return"\n    display: ".concat(a?"inline-block":"block",";\n    background-color: ").concat(n.cardColor[t].background,";\n    box-shadow: 0 1px 2px ").concat(n.cardColor[t].shadow,";\n    padding: ").concat(n[r].padding,";\n    border-radius: ").concat(n[r].radius,";\n  ")}),f=(0,o.default)(s.default)(r||(r=p(["\n  ",";\n"])),function(e){var n=e.theme,t=e.textColor;return"\n    color: ".concat(n.cardColor[t].text,";\n  ")});n.default=function(e){var n=e.id,t=e.children,a=e.color,r=void 0===a?"primary":a,s=e.size,d=void 0===s?"md":s,p=e.padding,y=void 0===p?"md":p,g=e.weight,b=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,c);return i.default.createElement(o.ThemeProvider,{theme:l.default},i.default.createElement(m,u({id:n,size:y,color:r},b),i.default.createElement(f,{id:"".concat(n,"Text"),size:d,textColor:r,align:"center",weight:g},t)))}},85555(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.colors,t=e.fonts,a=e.geometry;return{colors:n,fonts:t,geometry:a,cardColor:{primary:{background:n.primary.normal.background,shadow:n.primary.light.background,text:n.primary.normal.text},secondary:{background:n.secondary.normal.background,shadow:n.secondary.light.background,text:n.secondary.normal.text},tertiary:{background:n.tertiary.normal.background,shadow:n.tertiary.light.background,text:n.tertiary.normal.text},quaternary:{background:n.quaternary.normal.background,shadow:n.quaternary.light.background,text:n.quaternary.normal.text},quinary:{background:n.quinary.normal.background,shadow:n.quinary.light.background,text:n.quinary.normal.text},senary:{background:n.senary.normal.background,shadow:n.senary.light.background,text:n.senary.normal.text},neutral:{background:n.neutral.normal.background,shadow:n.neutral.light.background,text:n.neutral.normal.text},info:{background:n.info.normal.background,shadow:n.info.light.background,text:n.info.normal.text},success:{background:n.success.normal.background,shadow:n.success.light.background,text:n.success.normal.text},warning:{background:n.warning.normal.background,shadow:n.warning.light.background,text:n.warning.normal.text},danger:{background:n.danger.normal.background,shadow:n.danger.light.background,text:n.danger.normal.text},white:{background:n.basic.white,shadow:n.overlay.dark.background,text:n.text.normal.background}},xs:{border:a.xs.border,padding:a.xs.spacing,radius:a.xs.radius},sm:{border:a.sm.border,padding:a.sm.spacing,radius:a.sm.radius},md:{border:a.md.border,padding:a.md.spacing,radius:a.md.radius},lg:{border:a.lg.border,padding:a.lg.spacing,radius:a.lg.radius},xl:{border:a.xl.border,padding:a.xl.spacing,radius:a.xl.radius},xxl:{border:a.xxl.border,padding:a.xxl.spacing,radius:a.xxl.radius}}}},43779(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s=y(t(22155)),c=y(t(75235)),d=f(t(71647)),u=f(t(63297)),p=f(t(19083)),m=["id","name","onChange","onBlur","onFocus","type","placeholder","value","autoComplete","size","success","error","message","box","pill","inline","disabled","readOnly","className","style","textInputRef"];function f(e){return e&&e.__esModule?e:{default:e}}function y(e,n){if("function"==typeof WeakMap)var t=new WeakMap,a=new WeakMap;return(y=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=n?a:t){if(r.has(e))return r.get(e);r.set(e,o)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(o,l,i):o[l]=e[l]);return o})(e,n)}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},g.apply(null,arguments)}function b(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,h(a.key),a)}}function h(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function v(e,n,t){return n=T(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,x()?Reflect.construct(n,t||[],T(e).constructor):n.apply(e,t))}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function O(e,n){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},O(e,n)}function k(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var j=c.default.div(a||(a=k(["\n  ",";\n"])),function(e){var n=e.theme,t=e.inline,a=e.disabled;return"\n    font-family: ".concat(n.font.family,";\n    font-weight: ").concat(n.font.weight.default,";\n    display: ").concat(t?"inline-block":"block",";\n    width: ").concat(t?"auto":"100%",";\n    position: relative;\n    overflow: hidden;\n    opacity: ").concat(a?"0.5":"1",";\n  ")}),C=c.default.div(r||(r=k(["\n  ",";\n"])),function(e){var n=e.box,t=e.pill,a=e.size,r=e.theme,i=e.error,o=e.success,l=e.disabled,s=e.readOnly;return"\n    display: flex;\n    overflow: hidden;\n    outline: ".concat(n?r[a].border.width:"0",";\n    border-width: ").concat(n?r[a].border.width:"0 0 ".concat(r[a].border.width," 0"),";\n    border-color: ").concat(i&&r.textColors.error.border||o&&r.textColors.success.border||r.textColors.default.border,";\n    border-style: ").concat(r[a].border.style,";\n    border-radius: ").concat(n&&(t?"5000px":r[a].radius),";\n    align-items: center;\n    background-color: ").concat(n&&(i&&r.textColors.error.background||o&&r.textColors.success.background||r.textColors.default.background)||"transparent",";\n    \n    ").concat(!l&&!s&&"\n    &:focus-within, .focus {\n      border-color: ".concat(i&&r.textColors.error.border||o&&r.textColors.success.border||r.textColors.active.border,";\n      background-color: ").concat(n&&(i&&r.textColors.error.background||o&&r.textColors.success.background||r.textColors.active.background)||"transparent",";\n    }"),"\n  ")}),S=c.default.input(i||(i=k(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size,a=e.error,r=e.success,i=e.inline;return"\n    padding: ".concat(n[t].padding,";\n    color: ").concat(a&&n.textColors.error.text||r&&n.textColors.success.text||n.textColors.default.text,";\n    font-size: ").concat(n[t].font.size.default,";\n    line-height: ").concat(n[t].font.lineHeight,";\n    background-color: transparent;\n    width: ").concat(i?"auto":"100%",";\n    display: block;\n    border: none;\n    flex: 1;\n\n    &:focus {\n      outline: none;\n    }\n\n    &::placeholder {\n      color: ").concat(a&&n.textColors.error.placeholder||r&&n.textColors.success.placeholder||n.textColors.default.placeholder,";\n    }\n\n    &::-ms-clear, &::-ms-reveal {\n      display: none;\n    }\n  ")}),N=c.default.div(o||(o=k(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    padding: ".concat(n[t].padding,";\n  ")}),w=c.default.span(l||(l=k(["\n  ",";\n"])),function(e){var n=e.error,t=e.success,a=e.theme,r=e.size;return"\n    color: ".concat(n&&a.textColors.error.border||t&&a.textColors.success.border||a.textColors.dark.border,";\n    font-size: ").concat(a[r].font.size.small,";\n    margin-right: ").concat(a[r].margin,";\n  ")}),D=function(e){function n(e){var t;return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),(t=v(this,n,[e])).state={showPassword:!1},t.onPasswordClick=t.onPasswordClick.bind(t),t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&O(e,n)}(n,e),t=n,a=[{key:"onPasswordClick",value:function(e){this.setState({showPassword:!this.state.showPassword})}},{key:"render",value:function(){var e=this.props,n=e.id,t=e.name,a=e.onChange,r=e.onBlur,i=e.onFocus,o=e.type,l=void 0===o?"text":o,f=e.placeholder,y=e.value,b=e.autoComplete,h=void 0===b||b,v=e.size,x=void 0===v?"md":v,T=e.success,O=e.error,k=e.message,D=e.box,A=void 0===D||D,R=e.pill,P=void 0===R||R,L=e.inline,I=e.disabled,E=e.readOnly,_=e.className,F=e.style,B=e.textInputRef,U=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,m),M=O||T||"password"===l,V=(O?"exclamation-circle":T&&"check")||"eye",z=O&&!!O.length||T&&!!T.length||k&&!!k.length,G=O||T||k,$="".concat(t,"Input").concat((O?"Error":T&&"Success")||k&&"Message"),W=("sm"===x?"xs":"md"===x&&"sm")||"lg"===x&&"md"||"xl"===x&&"lg"||void 0,q=(O?"danger":T&&"success")||void 0;return s.default.createElement(c.ThemeProvider,{theme:d.default},s.default.createElement(j,{className:_,style:F,inline:L,disabled:I,id:"".concat(n,"Container"),name:"".concat(t,"Container")},s.default.createElement(C,{box:A,pill:P,size:x,error:O,success:T,disabled:I,readOnly:E},s.default.createElement(S,g({},U,{size:x,error:O,success:T,inline:L,id:n,name:t,onChange:a,onFocus:i,onBlur:r,type:"password"===l&&(this.state.showPassword?"text":"password")||l,placeholder:f,value:y,autoComplete:h?"on":"off",disabled:I,readOnly:E,ref:B})),M&&s.default.createElement(w,{error:O,success:T,size:x,onClick:"password"===l&&this.onPasswordClick},s.default.createElement(p.default,{icon:V}))),z&&s.default.createElement(N,{id:"".concat(n).concat((O?"Error":T&&"Success")||"","Message"),name:"".concat(t).concat((O?"Error":T&&"Success")||"","Message"),size:x},s.default.createElement(u.default,{name:$,weight:"bold",size:W,color:q},G))))}}],a&&b(t.prototype,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,a}(s.Component);n.default=D},71647(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},sm:{border:{width:t.sm.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.xs.spacing," ").concat(t.sm.spacing),radius:t.md.radius,font:{size:{default:n.sm.size,small:n.xs.size},lineHeight:n.sm.lineHeight}},md:{border:{width:t.md.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.sm.spacing," ").concat(t.md.spacing),radius:t.md.radius,font:{size:{default:n.md.size,small:n.sm.size},lineHeight:n.md.lineHeight}},lg:{border:{width:t.md.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.md.spacing," ").concat(t.lg.spacing),radius:t.md.radius,font:{size:{default:n.lg.size,small:n.md.size},lineHeight:n.lg.lineHeight}},xl:{border:{width:t.lg.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.lg.spacing," ").concat(t.xl.spacing),radius:t.md.radius,font:{size:{default:n.xl.size,small:n.lg.size},lineHeight:n.xl.lineHeight}},xxl:{border:{width:t.xl.border,style:"solid"},margin:t.lg.spacing,padding:"".concat(t.md.spacing," ").concat(t.lg.spacing),radius:t.lg.radius,font:{size:{default:n.xxl.size,small:n.xl.size},lineHeight:n.xxl.lineHeight}},textColors:{default:{border:a.inputs.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},dark:{border:a.inputs.dark.background,background:a.inputs.dark.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},active:{border:a.info.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},success:{border:a.success.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},error:{border:a.danger.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background}}}}},53322(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c=y(t(22155)),d=y(t(98156)),u=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),p=y(t(62590)),m=y(t(19083)),f=["id","name","pill","error","box","size","success","disabled","inline","iconType","onTextChange","onSelectChange","options","selectValue","textValue","textPlaceHolder","selectPlaceholder"];function y(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},g.apply(null,arguments)}function b(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var h=u.default.div(a||(a=b(["\n  ",";\n"])),function(e){var n=e.theme,t=e.inline,a=e.disabled;return"\n    font-family: ".concat(n.font.family,";\n    font-weight: ").concat(n.font.weight.default,";\n    display: ").concat(t?"inline-block":"block",";\n    width: ").concat(t?"auto":"100%",";\n    position: relative;\n    overflow: hidden;\n    opacity: ").concat(a?"0.5":"1",";\n  ")}),v=u.default.div(r||(r=b(["\n  ",";\n"])),function(e){var n=e.box,t=e.pill,a=e.size,r=e.theme,i=e.error,o=e.success,l=e.disabled;return"\n    display: flex;\n    overflow: hidden;\n    outline: ".concat(n?r[a].border.width:"0",";\n    border-width: ").concat(n?r[a].border.width:"0 0 ".concat(r[a].border.width," 0"),";\n    border-color: ").concat(i&&r.textColors.error.border||o&&r.textColors.success.border||r.textColors.default.border,";\n    border-style: ").concat(r[a].border.style,";\n    border-radius: ").concat(n&&(t?"5000px":r[a].radius),";\n    align-items: center;\n    background-color: ").concat(n&&(i&&r.textColors.error.background||o&&r.textColors.success.background||r.textColors.default.background)||"transparent",";\n    \n    ").concat(!l&&"\n      &:focus-within, .focus {\n        border-color: ".concat(i&&r.textColors.error.border||o&&r.textColors.success.border||r.textColors.active.border,";\n        background-color: ").concat(n&&(i&&r.textColors.error.background||o&&r.textColors.success.background||r.textColors.active.background)||"transparent",";\n      }\n    "),"\n  ")}),x=u.default.input(i||(i=b(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size,a=e.error,r=e.success,i=e.inline;return"\n    padding: ".concat(n[t].padding,";\n    padding-left: 0;\n    color: ").concat(a&&n.textColors.error.text||r&&n.textColors.success.text||n.textColors.default.text,";\n    font-size: ").concat(n[t].font.size.default,";\n    line-height: ").concat(n[t].font.lineHeight,";\n    background-color: transparent;\n    width: ").concat(i?"auto":"100%",";\n    display: block;\n    border: none;\n    flex: 1 1 auto;\n\n    &:focus {\n      outline: none;\n    }\n\n    &::placeholder {\n      color: ").concat(a&&n.textColors.error.placeholder||r&&n.textColors.success.placeholder||n.textColors.default.placeholder,";\n    }\n\n    &::-ms-clear, &::-ms-reveal {\n      display: none;\n    }\n  ")}),T=u.default.span(o||(o=b(["\n  ",";\n"])),function(e){e.error,e.success;var n=e.theme,t=e.size;return"\n    color: ".concat(n.textColors.dark.border,";\n    font-size: ").concat(n[t].font.size.small,";\n    margin-right: ").concat(n[t].margin,";\n    margin-left: ").concat(n[t].margin,";\n  ")}),O=(0,u.default)(p.default)(l||(l=b(["\n  flex: 1 1 33%;\n  border-width: 0 0 0 ",";\n  border-color: ",";\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n  "," &:focus-within, &:hover, .focus {\n    border-color: ",";\n    background-color: none;\n  }\n"])),function(e){return e.theme[e.size].border.width},function(e){return e.theme.colors.inputs.normal.background},function(e){return e.box?"":"background: none;"},function(e){return e.theme.colors.inputs.normal.background}),k=u.default.div(s||(s=b(["\n  display: flex;\n  flex: 1 1 66%;\n  align-items: center;\n"])));n.default=function(e){var n=e.id,t=e.name,a=e.pill,r=void 0===a||a,i=e.error,o=e.box,l=e.size,s=void 0===l?"md":l,p=e.success,y=e.disabled,b=e.inline,j=e.iconType,C=void 0===j?"search":j,S=e.onTextChange,N=e.onSelectChange,w=e.options,D=e.selectValue,A=e.textValue,R=e.textPlaceHolder,P=e.selectPlaceholder,L=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,f);return c.default.createElement(u.ThemeProvider,{theme:d.default},c.default.createElement(h,g({inline:b,disabled:y},L),c.default.createElement(v,{error:i,box:o,pill:r,size:s,disabled:y,success:p},c.default.createElement(k,null,c.default.createElement(T,{id:"".concat(n,"_icon"),error:i,success:p,size:s},c.default.createElement(m.default,{icon:C})),c.default.createElement(x,{id:"".concat(n,"_Input"),name:"".concat(t,"_Input"),size:s,error:i,success:p,inline:b,onChange:S,value:A,placeholder:R})),c.default.createElement(O,{id:"".concat(n,"_WithSelect"),name:"".concat(t,"_WithSelect"),box:o,classPrefix:"rs",size:s,options:w,onChange:N,value:D,placeholder:P}))))}},98156(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},sm:{border:{width:t.sm.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.xs.spacing," ").concat(t.sm.spacing),radius:t.md.radius,font:{size:{default:n.sm.size,small:n.xs.size},lineHeight:n.sm.lineHeight}},md:{border:{width:t.md.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.sm.spacing," ").concat(t.md.spacing),radius:t.md.radius,font:{size:{default:n.md.size,small:n.sm.size},lineHeight:n.md.lineHeight}},lg:{border:{width:t.md.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.md.spacing," ").concat(t.lg.spacing),radius:t.md.radius,font:{size:{default:n.lg.size,small:n.md.size},lineHeight:n.lg.lineHeight}},xl:{border:{width:t.lg.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.lg.spacing," ").concat(t.xl.spacing),radius:t.md.radius,font:{size:{default:n.xl.size,small:n.lg.size},lineHeight:n.xl.lineHeight}},searchColors:{default:{border:a.inputs.normal.background,background:a.basic.white,text:a.text.dark.background,placeholder:a.inputs.dark.background,button:a.neutral.dark,icon:a.neutral.dark},active:{text:a.text.dark.background,placeholder:a.inputs.dark.background,button:a.success.normal}},textColors:{default:{border:a.inputs.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},dark:{border:a.inputs.dark.background,background:a.inputs.dark.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},active:{border:a.info.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},success:{border:a.success.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},error:{border:a.danger.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background}}}}},82245(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c=y(t(22155)),d=y(t(37617)),u=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),p=y(t(62590)),m=y(t(19083)),f=["id","name","pill","error","box","size","success","disabled","inline","iconType","onTextChange","onSelectChange","options","selectValue","textValue","textPlaceHolder","selectPlaceholder","multiSelectList"];function y(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},g.apply(null,arguments)}function b(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var h=u.default.div(a||(a=b(["\n  ",";\n"])),function(e){var n=e.theme,t=e.inline,a=e.disabled;return"\n    font-family: ".concat(n.font.family,";\n    font-weight: ").concat(n.font.weight.default,";\n    display: ").concat(t?"inline-block":"block",";\n    width: ").concat(t?"auto":"100%",";\n    position: relative;\n    overflow: hidden;\n    opacity: ").concat(a?"0.5":"1",";\n  ")}),v=u.default.div(r||(r=b(["\n  ",";\n"])),function(e){return e.box,e.pill,e.size,e.theme,e.error,e.success,e.disabled,"\n    display: flex;\n    div{width:auto};\n  "}),x=u.default.input(i||(i=b(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size,a=e.error,r=e.success,i=e.inline;return"\n    padding: ".concat(n[t].padding,";\n    padding-left: 0;\n    color: ").concat(a&&n.textColors.error.text||r&&n.textColors.success.text||n.textColors.default.text,";\n    font-size: ").concat(n[t].font.size.default,";\n    line-height: ").concat(n[t].font.lineHeight,";\n    background-color: transparent;\n    width: ").concat(i?"auto":"100%",";\n    display: block;\n    border: none;\n    flex: 1 1 auto;\n\n    &:focus {\n      outline: none;\n    }\n\n    &::placeholder {\n      color: ").concat(a&&n.textColors.error.placeholder||r&&n.textColors.success.placeholder||n.textColors.default.placeholder,";\n    }\n\n    &::-ms-clear, &::-ms-reveal {\n      display: none;\n    }\n  ")}),T=u.default.span(o||(o=b(["\n  ",";\n"])),function(e){e.error,e.success;var n=e.theme,t=e.size;return"\n    color: ".concat(n.textColors.dark.border,";\n    font-size: ").concat(n[t].font.size.small,";\n    margin-right: ").concat(n[t].margin,";\n    margin-left: ").concat(n[t].margin,";\n  ")}),O=(0,u.default)(p.default)(l||(l=b(["\n  min-width: 200px;\n  border: none;\n  background: none;\n  &:focus-within,\n  &:hover,\n  .focus {\n    background: none;\n  }\n  min-width: 110px;\n"]))),k=u.default.div(s||(s=b(["\n  display: flex;\n  flex: 1 1 100%;\n  align-items: center;\n"])));n.default=function(e){var n=e.id,t=e.name,a=e.pill,r=void 0===a||a,i=e.error,o=e.box,l=e.size,s=void 0===l?"md":l,p=e.success,y=e.disabled,b=e.inline,j=e.iconType,C=void 0===j?"search":j,S=e.onTextChange,N=(e.onSelectChange,e.options,e.selectValue,e.textValue),w=e.textPlaceHolder,D=(e.selectPlaceholder,e.multiSelectList),A=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,f);return c.default.createElement(u.ThemeProvider,{theme:d.default},c.default.createElement(h,g({inline:b,disabled:y},A),c.default.createElement(v,{error:i,box:o,pill:r,size:s,disabled:y,success:p},c.default.createElement(k,null,c.default.createElement(T,{id:"".concat(n,"_icon"),error:i,success:p,size:s},c.default.createElement(m.default,{icon:C})),c.default.createElement(x,{id:"".concat(n,"_Input"),name:"".concat(t,"_Input"),size:s,error:i,success:p,inline:b,onChange:S,value:N,placeholder:w})),D.map(function(e){var t=(null==e?void 0:e.transferredSelect)?e.transferredSelect:O;return c.default.createElement(t,{key:"".concat(n,"_WithSelect").concat(e.selectPlaceholder),box:o,classPrefix:"rs",size:s,options:e.options,onChange:e.onSelectChange,value:e.selectValue,placeholder:e.selectPlaceholder})}))))}},37617(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,font:{family:n.family,weight:{default:n.weight.default,bold:n.weight.bold}},sm:{border:{width:t.sm.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.xs.spacing," ").concat(t.sm.spacing),radius:t.md.radius,font:{size:{default:n.sm.size,small:n.xs.size},lineHeight:n.sm.lineHeight}},md:{border:{width:t.md.border,style:"solid"},margin:t.sm.spacing,padding:"".concat(t.sm.spacing," ").concat(t.md.spacing),radius:t.md.radius,font:{size:{default:n.md.size,small:n.sm.size},lineHeight:n.md.lineHeight}},lg:{border:{width:t.md.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.md.spacing," ").concat(t.lg.spacing),radius:t.md.radius,font:{size:{default:n.lg.size,small:n.md.size},lineHeight:n.lg.lineHeight}},xl:{border:{width:t.lg.border,style:"solid"},margin:t.md.spacing,padding:"".concat(t.lg.spacing," ").concat(t.xl.spacing),radius:t.md.radius,font:{size:{default:n.xl.size,small:n.lg.size},lineHeight:n.xl.lineHeight}},searchColors:{default:{border:a.inputs.normal.background,background:a.basic.white,text:a.text.dark.background,placeholder:a.inputs.dark.background,button:a.neutral.dark,icon:a.neutral.dark},active:{text:a.text.dark.background,placeholder:a.inputs.dark.background,button:a.success.normal}},textColors:{default:{border:a.inputs.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},dark:{border:a.inputs.dark.background,background:a.inputs.dark.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},active:{border:a.info.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},success:{border:a.success.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background},error:{border:a.danger.normal.background,background:a.inputs.light.background,text:a.text.dark.background,placeholder:a.inputs.dark.background}}}}},26829(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=d(t(22155)),i=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),o=t(97322),l=d(t(10393)),s=["component","underline","inline"],c=["children","component"];function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},u.apply(null,arguments)}function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function m(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function f(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var y,g,b=(0,i.default)(function(e){var n=e.component,t=(e.underline,e.inline,f(e,s));return r.default.cloneElement(r.default.createElement(n),function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach(function(n){m(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},t))})(a||(y=["\n  ",";\n"],g||(g=y.slice(0)),a=Object.freeze(Object.defineProperties(y,{raw:{value:Object.freeze(g)}}))),function(e){var n=e.underline,t=void 0===n||n,a=e.color,r=void 0===a?"light":a,i=e.weight,o=void 0===i?"normal":i,l=e.size,s=void 0===l?"md":l,c=e.theme,d=e.disabled,u=e.inline;return"\n    box-sizing: border-box;\n    opacity: ".concat(d?"0.5":"0.65",";\n    cursor: ").concat(d?"default":"pointer",";\n    width: ").concat(u?"auto":"100%",";\n    display: ").concat(u?"inline-block":"block",";\n    color: ").concat(c.textColors[r].text,";\n    font-weight: ").concat(c.textFonts.weight[o],";\n    font-size: ").concat(c.textFonts[s].size,";\n    line-height: ").concat(c.textFonts[s].lineHeight,";\n    font-family: ").concat(c.textFonts.family,";\n    text-decoration: ").concat(t?"underline":"none",";\n    &:visited {\n      color: ").concat(c.textColors[r].text,";\n    }\n\n    ").concat(!d&&"\n      &:hover {\n        color: ".concat(c.textColors[r].hover,";\n        opacity: 1;\n      }\n\n      &:active,\n      .active {\n        color: ").concat(c.textColors[r].text,";\n        opacity: 1;\n      }\n    "),"\n  ")});n.default=function(e){var n=e.children,t=e.component,a=void 0===t?"a":t,s=f(e,c);return r.default.createElement(i.ThemeProvider,{theme:l.default},r.default.createElement(b,u({component:("a"===a?"a":"routerLink"===a&&o.Link)||"routerNavLink"===a&&o.NavLink},s),n))}},10393(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.colors,t=e.fonts;return{colors:n,fonts:t,geometry:e.geometry,textFonts:{family:t.family,weight:{normal:t.weight.normal,bold:t.weight.bold,extra:t.weight.extra},sm:t.sm,md:t.md,lg:t.lg,xl:t.xl},textColors:{light:{text:n.text.light.text,hover:n.text.normal.background},normal:{text:n.text.dark.background,hover:n.text.light.text},dark:{text:n.text.dark.background,hover:n.text.light.background},inverted:{text:n.text.dark.background,hover:n.text.normal.background},primary:{text:n.primary.normal.background,hover:n.primary.dark.background},secondary:{text:n.secondary.normal.background,hover:n.secondary.dark.background},tertiary:{text:n.tertiary.normal.background,hover:n.tertiary.dark.background},info:{text:n.info.normal.background,hover:n.info.dark.background},success:{text:n.success.normal.background,hover:n.success.dark.background},warning:{text:n.warning.normal.background,hover:n.warning.dark.background},danger:{text:n.danger.normal.background,hover:n.danger.dark.background}}}}},26209(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=c(t(22155)),r=c(t(36656)),i=t(14264),o=t(18077),l=t(93799),s=["className","timePickerRef"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},d.apply(null,arguments)}function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach(function(n){m(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function m(e,n,t){return(n=y(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function f(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,y(a.key),a)}}function y(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function g(e,n,t){return n=h(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(n,t||[],h(e).constructor):n.apply(e,t))}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,n){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},v(e,n)}var x=r.default.defaultProps.classNames;n.default=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),g(this,n,arguments)}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&v(e,n)}(n,e),t=n,r=[{key:"render",value:function(){var e=this.props,n=e.className,t=e.timePickerRef,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,s);return a.default.createElement(o.LocalizationProvider,{dateAdapter:i.AdapterMoment},a.default.createElement(l.TimePicker,d({classNames:p(p({},x),{},{container:"".concat(x.container," ").concat(n)}),ref:t},r)))}}],r&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}(a.default.Component)},92561(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o=y(t(22155)),l=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),s=y(t(48368)),c=y(t(63238)),d=y(t(26209)),u=y(t(70050)),p=y(t(26560)),m=y(t(63297)),f=["id","name","color","placeholder","selectedTime","size","box","onTimeChange","pill","inline","disabled","error","readOnly"];function y(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},g.apply(null,arguments)}function b(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,h(a.key),a)}}function h(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function v(e,n,t){return n=T(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,x()?Reflect.construct(n,t||[],T(e).constructor):n.apply(e,t))}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function O(e,n){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},O(e,n)}function k(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var j=(0,l.default)(p.default)(a||(a=k(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    overflow: visible;\n    font-family: ".concat(n.fonts.family,";\n    font-weight: ").concat(n.fonts.weight.default,";\n  ")}),C=l.default.div(r||(r=k(["\n  ",";\n"])),function(e){var n=e.box,t=e.inline,a=e.pill,r=e.size,i=e.theme,o=e.error;return"\n    display:".concat(t?"inline-flex":"flex",";\n    outline: ").concat(n?i[r].border.width:"0",";\n    border-width: ").concat(n?i[r].border.width:"0 0 ".concat(i[r].border.width," 0"),";\n    border-color: ").concat(o?i.colors.danger.normal.background:i.textColors.default.border,";\n    border-style: ").concat(i[r].border.style,";\n    border-radius: ").concat(n&&(a?"5000px":i[r].radius),";\n    align-items: center;\n    justify-content: center;\n    background-color: ").concat(i.textColors.default.background,";\n    cursor:text;\n    padding: ").concat(i[r].padding.vertical," ").concat(i[r].padding.horizontal,";\n  ")}),S=l.default.div(i||(i=k(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    padding: ".concat(n[t].padding.vertical," ").concat(n[t].padding.horizontal,";\n  ")}),N=function(e){function n(e){var t;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),t=v(this,n,[e]);var a=e.selectedTime?e.selectedTime:null;return t.state={time:a},t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&O(e,n)}(n,e),t=n,a=[{key:"render",value:function(){var e=this.props,n=e.id,t=e.name,a=e.color,r=void 0===a?"secondary":a,i=e.placeholder,p=e.selectedTime,y=e.size,b=void 0===y?"md":y,h=e.box,v=void 0===h||h,x=e.onTimeChange,T=e.pill,O=void 0===T||T,k=e.inline,N=e.disabled,w=e.error,D=e.readOnly,A=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,f),R=("sm"===b?"xs":"md"===b&&"sm")||"lg"===b&&"md"||"xl"===b&&"lg"||void 0;return o.default.createElement(l.ThemeProvider,{theme:c.default},o.default.createElement(j,g({name:"".concat(t,"-OuterContainer"),container:!0},A,{id:"".concat(n,"-OuterContainer")}),o.default.createElement(u.default,{item:!0,vdistribution:"center"},o.default.createElement(C,{name:"".concat(t,"-TextContainer"),box:v,inline:k,pill:O,size:b,disabled:N,error:w},o.default.createElement(d.default,{size:b,value:p,onChange:function(e){x(e)},renderInput:function(e){return o.default.createElement(s.default,g({},e,{fullWidth:!0}))},color:r,placeholder:i,disabled:N,readOnly:D}))),o.default.createElement(u.default,null,w&&o.default.createElement(S,{size:b},o.default.createElement(m.default,{size:R,weight:"bold",color:"danger"},w)))))}}],a&&b(t.prototype,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,a}(o.default.Component);n.default=N},64174(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l=m(t(22155)),s=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),c=m(t(63297)),d=m(t(98844)),u=m(t(57256)),p=["id","name","imageSrc","cardTitle","bodyText","inline","size","titleColor","textColor","backgroundColor"];function m(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},f.apply(null,arguments)}function y(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var g=s.default.div(a||(a=y(["\n  ",";\n"])),function(e){var n=e.theme,t=e.inline,a=e.backgroundColor;return"\n    display: ".concat(t?"inline-block":"block",";\n    width: ").concat(t?"auto":"100%",";\n    cursor: pointer;\n    background-color: ").concat(n.colors[a].light.background,";\n    box-shadow: 0 1px 2px ").concat(n.colors.overlay.dark.background,";\n    border-radius: ").concat(n.geometry.sm.radius,";\n    overflow: hidden;\n  ")}),b=s.default.div(r||(r=y(["\n  ",";\n"])),function(e){var n=e.theme,t=(e.inline,e.size),a=e.imageSrc;return"\n    width: 100%\n    background-color: ".concat(n.colors.primary.normal.background,";\n    background-image: url(").concat(a,");\n    background-repeat: no-repeat;\n    background-position: center;\n    background-size: cover;\n    height: ").concat(n.imageSize[t],";\n  ")}),h=s.default.div(i||(i=y(["\n  ",";\n"])),function(e){var n=e.theme,t=e.paddingSize;return"\n    padding: ".concat(n.geometry[t].spacing,";\n  ")}),v=(0,s.default)(d.default)(o||(o=y(["\n  ",";\n"])),function(e){var n=e.theme,t=e.marginSize;return"\n    margin-bottom: ".concat(n.geometry[t].spacing,";\n  ")});n.default=function(e){var n=e.id,t=(e.name,e.imageSrc),a=e.cardTitle,r=e.bodyText,i=e.inline,o=e.size,d=void 0===o?"md":o,m=e.titleColor,y=void 0===m?"dark":m,x=e.textColor,T=void 0===x?"normal":x,O=e.backgroundColor,k=void 0===O?"white":O,j=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,p),C=("xs"===d?"xs":"sm"===d&&"sm")||"md"===d&&"sm"||"lg"===d&&"md"||"xl"===d&&"lg"||d;return l.default.createElement(s.ThemeProvider,{theme:u.default},l.default.createElement(g,f({id:n,inline:i,backgroundColor:k},j),l.default.createElement("div",null,l.default.createElement(b,{id:"".concat(n,"_image"),imageSrc:t,size:d})),l.default.createElement(h,{paddingSize:C},l.default.createElement(v,{color:y,size:d,marginSize:C,id:"".concat(n,"_heading")},a),l.default.createElement(c.default,{size:C,color:T,id:"".concat(n,"_bodyText")},r))))}},57256(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}n.default=function(e){var n=e.colors,t=e.fonts,r=e.geometry;return{fonts:t,geometry:r,colors:i(i({},n),{},{white:{light:{background:"white"}}}),imageSize:{xs:(0,a.multiply)(r.xs.spacing,5),sm:(0,a.multiply)(r.sm.spacing,5),md:(0,a.multiply)(r.md.spacing,5),lg:(0,a.multiply)(r.lg.spacing,5),xl:(0,a.multiply)(r.xl.spacing,5)}}}},1481(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r=l(t(22155)),i=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),o=l(t(12861));function l(e){return e&&e.__esModule?e:{default:e}}var s,c,d=i.default.div(a||(s=["\n  ",";\n"],c||(c=s.slice(0)),a=Object.freeze(Object.defineProperties(s,{raw:{value:Object.freeze(c)}}))),function(e){var n=e.theme,t=e.size,a=e.color;return"\n    position: absolute;\n    right: 0%;\n    top: 0%;\n    transform: translate(100%,-100%);\n    background-color: ".concat(n.tooltipColors[a].background,"\n    box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, .2);\n    padding: ").concat(n[t].spacing,";\n  \n   \n  ")});n.default=function(e){var n=e.children,t=e.size,a=void 0===t?"sm":t,l=e.show,s=e.color,c=void 0===s?"primary":s;return r.default.createElement(i.ThemeProvider,{theme:o.default},l&&r.default.createElement(d,{size:a,color:c},n))}},12861(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.colors,t=e.fonts,a=e.geometry;return{colors:n,fonts:t,geometry:a,xs:{spacing:a.xs.spacing},sm:{spacing:a.sm.spacing},md:{spacing:a.md.spacing},lg:{spacing:a.lg.spacing},xl:{spacing:a.xl.spacing},xxl:{spacing:a.xxl.spacing},tooltipColors:{light:{background:n.text.light.background},normal:{background:n.text.normal.background},dark:{background:n.text.dark.background},primary:{background:n.primary.normal.background},secondary:{background:n.secondary.normal.background},tertiary:{background:n.tertiary.normal.background},quaternary:{background:n.quaternary.normal.background},quinary:{background:n.quinary.normal.background},senary:{background:n.senary.normal.background},neutral:{background:n.neutral.normal.background},info:{background:n.info.normal.background},success:{background:n.success.normal.background},warning:{background:n.warning.normal.background},danger:{background:n.danger.normal.background},white:{background:n.basic.white}}}}},21323(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c,d,u,p,m=h(t(22155)),f=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),y=h(t(54478)),g=h(t(19083)),b=t(16463);function h(e){return e&&e.__esModule?e:{default:e}}function v(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},x.apply(null,arguments)}function T(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var O=f.default.div(a||(a=T(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    background-color: #fff;\n    width: ".concat(n.geometry.tooltip.width,";\n    border-radius: ").concat(n.geometry.tooltip.border.radius,";\n    font-family: 'Proxima Nova', sans-serif;\n    padding-top: ").concat(n.geometry.tooltip.padding,";\n  ")}),k=f.default.div(r||(r=T(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    color: ".concat(n.colors.overlay.dark.background,";\n    padding: ").concat(n.geometry.tooltip.padding,";\n    margin-left: ").concat(n.geometry.tooltip.margin,";\n    margin-right: ").concat(n.geometry.tooltip.margin,";\n  ")}),j=f.default.h2(i||(i=T(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    color: ".concat(n.colors.background.light.background,";\n    font-weight: bold;\n    padding: ").concat(n.geometry.tooltip.padding,";\n    padding-top: ").concat((0,b.multiply)(n.geometry.tooltip.padding,3),";\n    margin: 0;\n    margin-left: ").concat(n.geometry.tooltip.margin,";\n    margin-right: ").concat(n.geometry.tooltip.margin,";\n  ")}),C=f.default.div(o||(o=T(["\n  ",";\n"])),function(e){return e.theme,"\n    display: flex;\n    align-items: center;\n    position: relative;\n    bottom: 0px;\n  "}),S=f.default.div(l||(l=T(["\n  ",";\n"])),function(e){var n=e.index,t=e.theme;return"\n    text-align: center;\n    & > span:nth-child(".concat(n+1,") {\n      background-color: ").concat(t.colors.primary.dark.background,";\n    }\n  ")}),N=f.default.button(s||(s=T(["\n  ",";\n"])),function(e){var n=e.theme;return" \n    color: #fff;\n    border: none;\n    width: ".concat((0,b.divide)(n.geometry.tooltip.width,2),";\n    height: ").concat((0,b.divide)(n.geometry.tooltip.height,4),";\n    cursor: pointer;\n    outline: 0;\n  ")}),w=(0,f.default)(N)(c||(c=T(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    background-color: ".concat(n.colors.background.light.background,";\n    border-bottom-left-radius: ").concat(n.geometry.tooltip.border.radius,";\n  ")}),D=(0,f.default)(N)(d||(d=T(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    background-color: ".concat(n.colors.primary.normal.background,";\n    border-bottom-right-radius: ").concat(n.geometry.tooltip.border.radius,";\n  ")}),A=f.default.span(u||(u=T(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    height: ".concat(n.geometry.progress.height,";\n    width: ").concat(n.geometry.progress.width,";\n    background-color: ").concat(n.colors.primary.light.background,";\n    border-radius: 50%;\n    display: inline-block;\n    margin-right: ").concat((0,b.divide)(n.geometry.tooltip.margin,4),";\n    margin-left: ").concat((0,b.divide)(n.geometry.tooltip.margin,4),";\n  ")}),R=f.default.span(p||(p=T(["\n  ",";\n"])),function(e){var n=e.theme;return"\n      position: absolute;\n      right: ".concat((0,b.add)(n.geometry.tooltip.padding,1),";\n      cursor: pointer;\n      color: ").concat(n.colors.overlay.dark.background,";\n      font-size: ").concat(n.geometry.tooltip.closeIcon.size,";\n    ")}),P=function(e){var n=e.backProps,t=e.skipProps,a=e.primaryProps,r=e.closeProps,i=e.locale,o=e.continuous,l=e.index,s=e.isLastStep;return m.default.createElement(C,null,l>0&&m.default.createElement(w,x({},n,{title:""}),i.back),0===l&&m.default.createElement(w,x({},t,{title:""}),i.skip),o&&!s&&m.default.createElement(D,x({},a,{title:""}),i.next),s&&m.default.createElement(D,x({},r,{title:""}),i.close))};n.default=function(e){var n,t=e.content,a=e.continuous,r=e.backProps,i=e.closeProps,o=e.index,l=e.isLastStep,s=e.locale,c=e.primaryProps,d=e.setTooltipRef,u=e.size,p=e.skipProps,b=e.title;return m.default.createElement(f.ThemeProvider,{theme:y.default},m.default.createElement(O,{ref:d},m.default.createElement(R,null,m.default.createElement(g.default,x({icon:"times"},p))),b&&m.default.createElement(j,null,b),t&&m.default.createElement(k,null,t),m.default.createElement(S,{index:o},(n=Array(u),function(e){if(Array.isArray(e))return v(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return v(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(e,n):void 0}}(n)||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.")}()).map(function(e,n){return m.default.createElement(A,{key:n})})),m.default.createElement(P,{backProps:r,skipProps:p,primaryProps:c,closeProps:i,locale:s,continuous:a,index:o,isLastStep:l})))}},20716(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(22155)),r=l(t(61570)),i=l(t(41385)),o=l(t(21323));function l(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},s.apply(null,arguments)}function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach(function(n){u(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function u(e,n,t){return(n=m(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function p(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,m(a.key),a)}}function m(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}function f(e,n,t){return n=g(n),function(e,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(n,t||[],g(e).constructor):n.apply(e,t))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(e,n){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},b(e,n)}var h=function(e){function n(){var e;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return(e=f(this,n,[].concat(a))).state={styles:{options:{arrowColor:"#fff"},spotlight:{backgroundColor:"rgba(255, 255, 255, 0.1)"}},locale:{back:"Previous",close:"GET STARTED!",last:"Last",next:"Next",open:"Open",skip:"Skip"},tooltipComponent:o.default,floaterProps:{wrapperOptions:{offset:-15}}},e.handleClickStart=function(n){n.preventDefault(),e.setState({run:!0,stepIndex:0})},e.handleClickNextButton=function(){var n=e.state.stepIndex;1===e.state.stepIndex&&e.setState({stepIndex:n+1})},e.handleJoyrideCallback=function(n){var t=e.props.joyride;"close"===n.action&&e.setState({stepIndex:0}),"function"==typeof t.callback&&t.callback(n)},e}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&b(e,n)}(n,e),t=n,(i=[{key:"render",value:function(){var e=d(d({},this.state),this.props.joyride);return a.default.createElement(r.default,s({scrollToFirstStep:!0},e,{run:this.props.run,steps:this.props.steps,callback:this.handleJoyrideCallback}))}}])&&p(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i}(a.Component);h.defaultProps={joyride:{continuous:!0},theme:i.default},n.default=h},54478(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=t(16463);n.default=function(e){e.fonts;var n=e.geometry,t=e.colors;return{geometry:{tooltip:{width:(0,a.multiply)(n.xxxl.spacing,3),height:(0,a.multiply)(n.xxxl.spacing,2),border:{radius:n.xxl.border},margin:"10px",padding:"5px",closeIcon:{size:"20px"}},progress:{width:n.xs.spacing,height:n.xs.spacing}},colors:{background:t.sidebar,primary:t.secondary,senary:t.senary,overlay:t.overlay}}}},48101(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c,d,u=v(t(22155)),p=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),m=v(t(63473)),f=v(t(98844)),y=v(t(63297)),g=v(t(62590)),b=v(t(1592)),h=v(t(3083));function v(e){return e&&e.__esModule?e:{default:e}}function x(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var T=p.default.div(a||(a=x(["\n  ",";\n"])),function(e){var n=e.theme,t=e.borderColor,a=e.inline,r=e.disabled;return"\n    opacity: ".concat(r?"0.5":"1",";\n    font-family: ").concat(n.fonts.family,";\n    padding: ").concat(n.geometry.md.spacing,";\n    background-color: #FFF;\n    border-width: ").concat(n.geometry.md.border,";\n    border-radius: ").concat(n.geometry.md.radius," ").concat(n.geometry.md.radius," 0px 0px;\n    border-color: ").concat(n.transpositionColors[t].background,";\n    border-style: solid;\n    display: ").concat(a?"inline-flex":"flex",";\n    flex-direction: column;\n    text-align: center;\n    align-items: center;\n    position: relative;\n  ")}),O=p.default.div(r||(r=x(["\n  ",";\n"])),function(e){var n=e.width;return"\n    width: ".concat(n||"auto",";\n  ")}),k=(0,p.default)(g.default)(i||(i=x(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    width: 100% !important;\n    margin: ".concat(n.geometry.md.spacing," 0;\n    z-index: 100; \n    overflow: visible;\n  ")}),j=p.default.div(o||(o=x(["\n  ",";\n"])),function(e){var n=e.theme,t=e.status;return"\n    text-transform: capitalize;\n    position: absolute;\n    bottom: 0;\n    left: 0;\n    right: 0;\n    padding: ".concat(n.geometry.xs.spacing," ").concat(n.geometry.sm.spacing,";\n    text-align: left;\n    background: ").concat(n.transpositionColors[t].background,";\n    border-radius: 0px 0px ").concat(n.geometry.md.radius," ").concat(n.geometry.md.radius,";\n    z-index: 99; \n    position:relative;\n  ")}),C=(0,p.default)(b.default)(l||(l=x(["\n  ",";\n"])),function(e){var n=e.theme;return"\n    padding-left: ".concat(n.geometry.xs.spacing,";\n    flex: 0 0 auto;\n  ")}),S=p.default.div(s||(s=x(["\n  align-items: center;\n  display: flex;\n"]))),N=(0,p.default)(f.default)(c||(c=x(["\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  width: ","px;\n  text-align: center;\n  ",";\n"])),function(e){var n=e.width;return parseInt(n.split("px"))-50},function(e){var n=e.ignored;return"\n    text-transform: capitalize;\n    opacity: ".concat(n?"0.5":"1",";\n  ")}),w=(0,p.default)(f.default)(d||(d=x(["\n  ",";\n"])),function(e){var n=e.ignored;return"\n    opacity: ".concat(n?"0.4":"0.8",";\n    text-transform: capitalize;\n  ")});n.default=function(e){var n=e.name,t=e.match,a=e.ignored,r=e.suggestion,i=e.onMatch,o=e.onIgnore,l=e.title,s=e.options,c=e.value,d=e.ignoreLabel,f=e.disabled,g=e.readOnly,b=e.width,v=(a?"ignored":t&&"match")||r&&"suggestion"||"unmatched";return u.default.createElement(p.ThemeProvider,{theme:m.default},u.default.createElement(O,{width:b,disabled:f,borderColor:v},u.default.createElement(T,{name:n,disabled:f,borderColor:v},u.default.createElement(N,{name:"".concat(n,"__title-heading"),size:"md",weight:"light",ignored:a,title:l,width:b},l),g?u.default.createElement(w,{name:"".concat(n,"__value-heading"),size:"md",weight:"light",align:"center",ignored:a},"- ",u.default.createElement("br",null)," ",a?"Ignored":c):u.default.createElement(k,{name:"".concat(n,"__select"),isDisabled:f||a,match:t,ignored:a,suggestion:r,options:s,value:c,menuMaxHeight:"800px",menuMinHeight:"auto",onChange:i}),!g&&u.default.createElement(S,null,u.default.createElement(h.default,{disabled:f,inline:!0,id:"".concat(n,"__ignore-checkbox"),name:"".concat(n,"__ignore-checkbox"),checked:a,onChange:o}),u.default.createElement(C,{inline:!0,labelFor:"".concat(n,"__ignore-checkbox"),color:"light"},d))),u.default.createElement(j,{name:"".concat(n,"__status"),status:v},u.default.createElement(y.default,{size:"md",color:a?"normal":"white"},v))))}},63473(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.fonts,t=e.geometry,a=e.colors;return{colors:a,fonts:n,geometry:t,transpositionColors:{match:{background:a.success.normal.background,text:""},ignored:{background:a.neutral.normal.background,text:""},suggestion:{background:a.warning.normal.background,text:""},unmatched:{background:a.danger.normal.background,text:""}}}}},27226(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s=b(t(22155)),c=function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i]);return r}(e)}(t(75235)),d=b(t(20220)),u=b(t(19083)),p=b(t(63297)),m=b(t(21670)),f=b(t(80636)),y=["theme","size"],g=["onClick","isDragActive","isDragEnabled","id","name","dragText","text","buttonText","inline","background","disabled","size"];function b(e){return e&&e.__esModule?e:{default:e}}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},h.apply(null,arguments)}function v(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function x(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var T=c.default.div(a||(a=x(["\n  ",";\n"])),function(e){var n=e.inline,t=e.isDragActive,a=e.isDragEnabled,r=e.theme,i=e.background;return"\n    display: ".concat(n?"inline-flex":"flex",";\n    justify-content: center;\n    flex-direction: column;\n    align-items: center;\n    text-align: center;\n    padding: ").concat(r.padding,";\n    background: ").concat(i?r.uploadColors.background:null,";\n    border-radius: ").concat(r.radius,";\n    opacity: ").concat(a&&t?.5:1,";\n  ")}),O=(0,c.default)(function(e){e.theme,e.size;var n=v(e,y);return s.default.createElement(u.default,n)})(r||(r=x(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    font-size: ".concat(n[t].font.size.icon,";\n    opacity: 0.1;\n    padding-bottom: 10px;\n  ")}),k=(0,c.default)(p.default)(i||(i=x(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    font-size: ".concat(n[t].font.size.text,";\n    padding-top: ").concat(n[t].padding.text.top,";\n    padding-bottom: ").concat(n[t].padding.text.bottom,";\n  ")}),j=(0,c.default)(m.default)(o||(o=x(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    padding-left: ".concat(n[t].padding.button.left,";\n    padding-right: ").concat(n[t].padding.button.right,"\n  ")}),C=(0,c.default)(p.default)(l||(l=x(["\n  ",";\n"])),function(e){var n=e.theme,t=e.size;return"\n    font-size: ".concat(n[t].font.size.button,";\n  ")});n.default=(0,f.default)(function(e){var n=e.onClick,t=e.isDragActive,a=void 0!==t&&t,r=e.isDragEnabled,i=void 0!==r&&r,o=e.id,l=e.name,p=e.dragText,m=e.text,f=e.buttonText,y=e.inline,b=e.background,x=e.disabled,S=e.size,N=void 0===S?"md":S,w=v(e,g);return s.default.createElement(c.ThemeProvider,{theme:d.default},s.default.createElement(T,h({isDragActive:a,isDragEnabled:i},w,{size:N,inline:y,id:"".concat(o,"-Container"),name:"".concat(l,"-Container"),background:b}),s.default.createElement(O,{size:N,icon:"cloud-upload-alt",id:"".concat(o,"-IconStyled"),name:"".concat(l,"-IconStyled")}),a&&i&&s.default.createElement(k,{color:"dark",weight:"bold",align:"center",size:N,id:"".concat(o,"-TextStyled"),name:"".concat(l,"-TextStyled")},s.default.createElement(u.default,{icon:"arrow-circle-down",size:"sm"})," ",p),!(a&&i)&&s.default.createElement(k,{color:"dark",weight:"bold",align:"center",size:N,id:"".concat(o,"-TextStyled"),name:"".concat(l,"-TextStyled")},m),!!f&&s.default.createElement(j,{disabled:x,color:"primary",inline:!0,onClick:n,size:N,id:"".concat(o,"-ButtonStyled"),name:l},s.default.createElement(C,{size:N,color:"neutral",id:"".concat(o,"-ButtonStyled-Text")},f))))})},20220(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var n=e.colors,t=e.fonts,a=e.geometry;return{colors:n,fonts:t,geometry:a,padding:a.md.spacing,radius:a.md.radius,sm:{font:{size:{icon:"60px",text:t.md.size,button:t.sm.size}},padding:{button:{left:"40px",right:"40px"},text:{top:"0px",bottom:"10px"}}},md:{font:{size:{icon:"80px",text:t.lg.size,button:t.md.size}},padding:{button:{left:"60px",right:"60px"},text:{top:"5px",bottom:"20px"}}},lg:{font:{size:{icon:"100px",text:t.xl.size,button:t.lg.size}},padding:{button:{left:"80px",right:"80px"},text:{top:"10px",bottom:"20px"}}},uploadColors:{border:n.inputs.light.text,background:n.inputs.normal.background,text:n.text.dark.background,placeholder:n.inputs.dark.background},sizes:{xs:{margin:"0",padding:"0",font:{size:t.xs.size,lineHeight:t.xs.lineHeight}},sm:{border:{width:a.sm.border,style:"solid"},margin:"0",padding:"0",font:{size:t.sm.size,lineHeight:t.sm.lineHeight}},md:{border:{width:a.md.border,style:"solid"},margin:"0",padding:"0",font:{size:t.md.size,lineHeight:t.md.lineHeight}},lg:{border:{width:a.lg.border,style:"solid"},margin:"0",padding:"0",font:{size:t.lg.size,lineHeight:t.lg.lineHeight}},xl:{border:{width:a.xl.border,style:"solid"},margin:"0",padding:"0",font:{size:t.xl.size,lineHeight:t.xl.lineHeight}},xxl:{margin:"0",padding:"0",font:{size:t.xxl.size,lineHeight:t.xxl.lineHeight}}}}}},80636(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=o(t(22155)),r=o(t(38694)),i=["onDrop","className","accept","multiple"];function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},l.apply(null,arguments)}n.default=function(e){return function(n){var t=n.onDrop,o=n.className,s=n.accept,c=n.multiple,d=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,i),u=s||"*";return a.default.createElement(r.default,{onDrop:t,accept:u,multiple:c},function(n){var r=n.getRootProps,i=(n.getInputProps,n.isDragActive);return a.default.createElement("div",l({className:o},r()),a.default.createElement(e,l({isDragActive:i,isDragEnabled:!!t},d)))})}}},19809(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=o(t(22155)),r=o(t(63297)),i=["id","name","sources"];function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},l.apply(null,arguments)}n.default=function(e){e.id,e.name;var n=e.sources,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,i);return a.default.createElement("video",l({controls:!0},t),n.map(function(e){return a.default.createElement("source",{src:e.link,type:e.type})}),a.default.createElement(r.default,null,"Your browser does not support this HTML5 Video"))}},74808(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i=c(t(22155)),o=c(t(75235)),l=c(t(19083)),s=t(97322);function c(e){return e&&e.__esModule?e:{default:e}}function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var u=(0,o.default)(s.Link)(a||(a=d(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  border-radius: 100%;\n  margin-top: -50px;\n  width: 150px;\n  height: 150px;\n  min-width: 150px;\n  min-height: 150px;\n  color: ",";\n  background: ",";\n  border: 6px solid ",";\n  box-shadow: "," 1px 1px 12px rgba(0, 0, 0, 0.2);\n  transition: transform 0.3s ease-in-out;\n\n  :hover {\n    transform: translateY(-10px);\n    cursor: pointer;\n  }\n"])),function(e){return e.badgeStyle?"rgba(0, 0, 0, 0.2)":e.theme.colors[e.borderColor].normal.background},function(e){return e.badgeStyle?e.theme.colors[e.borderColor].normal.background:"white"},function(e){return e.badgeStyle?"rgba(255, 255, 255, 0.3)":e.theme.colors[e.borderColor].normal.background},function(e){return e.badgeStyle?"inset":""}),p=o.default.h2(r||(r=d(["\n  font-size: 22px;\n  font-weight: bold;\n  color: inherit;\n"])));n.default=function(e){var n=e.accentColor,t=e.icon,a=e.title,r=e.linkTo,o=e.badgeStyle;return i.default.createElement(u,{borderColor:n,badgeStyle:o,size:"s",to:r},i.default.createElement(l.default,{icon:t,size:"3x",color:"inherit"}),i.default.createElement(p,{color:n,badgeStyle:o},a))}},55653(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o,l,s,c,d=m(t(22155)),u=m(t(75235)),p=m(t(74808));function m(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},f.apply(null,arguments)}function y(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var g=u.default.div(a||(a=y(["\n  ",";\n"])),function(e){var n=e.layout;return"\n    display: flex;\n    padding: 0 20px;\n    flex-direction: ".concat("center"!==n?"column":"row",";\n    justify-content: space-between;\n    width: 100%;\n  ")}),b=u.default.div(r||(r=y(["\n  text-align: ",";\n  margin: 5px;\n"])),function(e){return"left"===e.layout?"right":"left"}),h=u.default.div(i||(i=y(["\n  text-align: ",";\n  margin: 5px;\n"])),function(e){return"right"===e.layout?"left":"right"}),v=u.default.p(o||(o=y(["\n  font-size: 16px;\n"]))),x=u.default.h1(l||(l=y(["\n  font-size: 28px;\n  font-weight: bold;\n  color: ",";\n"])),function(e){return e.alert?e.theme.colors.danger.normal.background:e.new?e.theme.colors.success.normal.background:"inherit"}),T=function(e){var n=e.layout,t=e.left,a=e.right;return d.default.createElement(g,{layout:n},t&&d.default.createElement(b,{layout:n},d.default.createElement(v,null,t.name),d.default.createElement(x,{alert:t.alert,new:t.new},t.value)),a&&d.default.createElement(h,{layout:n},d.default.createElement(v,null,a.name),d.default.createElement(x,{alert:a.alert},a.value)))},O=u.default.div(s||(s=y(["\n  ",";\n"])),function(e){var n=e.theme,t=e.layout,a=e.darkMode;return"\n    display: flex;\n    position: relative;\n    flex-direction: ".concat("center"===t?"column":"left"===t?"row":"row-reverse",";\n    justify-content: ").concat("center"===t?"center":"space-between",";\n    align-items: center;\n    background-color: ").concat(a?n.colors.sidebar.normal.background:"white",";\n    color: #888;\n    width: 100%;\n    min-height: 120px;\n    border: 1px solid #bbbbbb;\n    \n    ").concat(a?"\n        background-color: ".concat(n.colors.sidebar.normal.background,";\n        border-color: black;\n        color: white;\n        "):"","\n  ")}),k=u.default.div(c||(c=y(["\n  display: flex;\n  flex-direction: row;\n  justify-content: ",";\n  padding: 0 20px;\n  position: absolute;\n  width: 100%;\n  height: 100%;\n"])),function(e){return"center"===e.layout?"center":"right"===e.layout?"flex-end":"flex-start"});n.default=function(e){var n=e.darkMode,t=void 0!==n&&n,a=e.layout,r=void 0===a?"center":a,i=e.circleProps,o=e.statProps;return d.default.createElement(O,{layout:r,darkMode:t},d.default.createElement(k,{layout:r},d.default.createElement(p.default,i)),d.default.createElement(T,f({layout:r},o)))}},88802(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a,r,i,o=c(t(22155)),l=c(t(75235)),s=c(t(55653));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var u=l.default.div(a||(a=d(["\n  width: 100%;\n  height: 100%;\n  background: rgb(212, 213, 216);\n  border: 1px solid #bbbbbb;\n  border-top: none;\n  overflow-y: auto;\n"]))),p=l.default.div(r||(r=d(["\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  height: 100%;\n  border-radius: 2px;\n"]))),m=l.default.div(i||(i=d(["\n  display: flex;\n  font-family: ",";\n  flex-direction: ",";\n  width: 100%;\n  height: 100%;\n  margin-top: 50px;\n  border-radius: 2px;\n  min-height: 120px;\n  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);\n"])),function(e){return e.theme.fonts.family},function(e){return e.reverse?"column-reverse":"column"});n.default=function(e){var n=e.darkMode,t=e.layout,a=e.circleProps,r=e.statProps,i=e.children;return o.default.createElement(p,null,o.default.createElement(m,{reverse:t.reverse},o.default.createElement(s.default,{darkMode:n,layout:t.header,circleProps:a,statProps:r}),o.default.createElement(u,null,i)))}},58582(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=o(t(22155)),r=o(t(70050)),i=o(t(26560));function o(e){return e&&e.__esModule?e:{default:e}}t(61575),n.default=function(e){for(var n=new Date,t=e.id,o=e.selectedDate,l=e.onChange,s=o||n,c=s.getUTCFullYear(),d=[{value:0,label:"January"},{value:1,label:"February"},{value:2,label:"March"},{value:3,label:"April"},{value:4,label:"May"},{value:5,label:"June"},{value:6,label:"July"},{value:7,label:"August"},{value:8,label:"September"},{value:9,label:"October"},{value:10,label:"November"},{value:11,label:"December"}],u=[],p=n.getUTCFullYear(),m=p;m>=p-70;m--)u.push({value:m,label:m.toString()});for(var f=p+1;f<=p+70;f++)u.unshift({value:f,label:f.toString()});var y=function(e){var n=e.target.form,t=n.year,a=n.month;l(new Date(t.value,a.value,2))};return a.default.createElement("form",{className:"DayPicker-Caption"},a.default.createElement(r.default,{container:!0},a.default.createElement(i.default,{item:!0,span:6},a.default.createElement("select",{id:"".concat(t,"-monthSelect"),name:"month",onChange:y,options:d,value:s.getMonth()},d.map(function(e){return a.default.createElement("option",{key:e.value,value:e.value},e.label)}))),a.default.createElement(i.default,{item:!0,span:2},a.default.createElement("select",{id:"".concat(t,"-yearSelect"),name:"year",onChange:y,options:u,value:c},u.map(function(e){return a.default.createElement("option",{key:e.value,value:e.value},e.label)})))))}},33104(e,n,t){"use strict";Object.defineProperty(n,"nD",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"C8",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"nc",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"KH",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"jT",{enumerable:!0,get:function(){return re.Autocomplete}}),Object.defineProperty(n,"PU",{enumerable:!0,get:function(){return re.AutocompleteField}}),Object.defineProperty(n,"BI",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(n,"$n",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(n,"FN",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(n,"Sc",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(n,"GQ",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(n,"fv",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(n,"OJ",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(n,"j4",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(n,"lr",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(n,"sx",{enumerable:!0,get:function(){return g.Draggable}}),Object.defineProperty(n,"Kw",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(n,"ON",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(n,"DZ",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(n,"Vo",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(n,"In",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(n,"KK",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(n,"nE",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(n,"Wz",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(n,"bT",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(n,"JU",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(n,"Ip",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(n,"To",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(n,"aF",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(n,"KF",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(n,"Eg",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(n,"ob",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(n,"dK",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(n,"v3",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(n,"Y3",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(n,"G3",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(n,"z2",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(n,"hh",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(n,"fI",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(n,"P",{enumerable:!0,get:function(){return B.ScrollContainer}}),Object.defineProperty(n,"vj",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(n,"l6",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(n,"Nl",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(n,"t6",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(n,"oz",{enumerable:!0,get:function(){return Z.Tab}}),Object.defineProperty(n,"Kp",{enumerable:!0,get:function(){return Z.TabPanel}}),Object.defineProperty(n,"tU",{enumerable:!0,get:function(){return Z.Tabs}}),Object.defineProperty(n,"EY",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(n,"fs",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(n,"ks",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(n,"sG",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(n,"Yq",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(n,"AG",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(n,"pN",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(n,"ao",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(n,"h$",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(n,"Ce",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(n,"x0",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(n,"SH",{enumerable:!0,get:function(){return te.default}});var a=ie(t(952)),r=ie(t(15053)),i=ie(t(15418)),o=ie(t(9243)),l=(ie(t(68907)),ie(t(8408)),ie(t(2580))),s=(ie(t(42961)),ie(t(21670))),c=(ie(t(23525)),ie(t(3083))),d=ie(t(98339)),u=ie(t(26560)),p=(ie(t(12544)),ie(t(38597))),m=ie(t(13890)),f=ie(t(25188)),y=ie(t(92561)),g=t(83681),b=ie(t(11431)),h=ie(t(18917)),v=(ie(t(95020)),ie(t(84784)),ie(t(98844))),x=ie(t(19083)),T=ie(t(67815)),O=ie(t(57934)),k=ie(t(45075)),j=ie(t(74792)),C=ie(t(1592)),S=ie(t(6127)),N=ie(t(82920)),w=ie(t(88695)),D=ie(t(82271)),A=(ie(t(49335)),ie(t(49721))),R=ie(t(11267)),P=ie(t(43790)),L=(ie(t(67493)),ie(t(58290))),I=ie(t(46555)),E=ie(t(179)),_=ie(t(8326)),F=ie(t(70050)),B=t(74986),U=ie(t(76480)),M=ie(t(62590)),V=(ie(t(57923)),ie(t(98855)),ie(t(92948))),z=ie(t(63297)),G=ie(t(56928)),$=(ie(t(90991)),ie(t(43779))),W=(ie(t(53322)),ie(t(82245))),q=ie(t(26829)),J=(ie(t(64174)),ie(t(1481)),ie(t(20716))),Y=ie(t(48101)),H=ie(t(27226)),K=ie(t(36988)),Q=ie(t(11096)),Z=(ie(t(31650)),t(96666)),X=ie(t(40118)),ee=ie(t(19809)),ne=ie(t(88802)),te=ie(t(80636)),ae=(ie(t(41385)),ie(t(46921)));ie(t(63705)),ie(t(28811)),t(81812);!function(e){if("function"==typeof WeakMap){var n=new WeakMap;new WeakMap}!function(e){if(e&&e.__esModule)return e;var t,a,r={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return r;if(t=n){if(t.has(e))return t.get(e);t.set(e,r)}for(var i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((a=(t=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(a.get||a.set)?t(r,i,a):r[i]=e[i])}(e)}(t(16463));var re=t(65126);function ie(e){return e&&e.__esModule?e:{default:e}}},13804(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={text:{light:{background:"#bcbbca",text:"#4d505b"},normal:{background:"#83838e",text:"#FFFFFF"},dark:{background:"#4d505b",text:"#FFFFFF"}},overlay:{light:{background:"#F3F4F5",text:"#A2A3A5"},normal:{background:"#E8E9EC",text:"#A2A3A5"},dark:{background:"#A2A3A5",text:"#FFFFFF"}},inputs:{light:{background:"#FAFAFA",text:"#ABABAB"},normal:{background:"#F5F5F5",text:"#ABABAB"},dark:{background:"#ABABAB",text:"#FFFFFF"}},basic:{white:"#ffffff",black:"#000000"}}},47415(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={family:"'Proxima Nova', Helvetica, Arial, sans-serif",monospace:"Inconsolata, Monaco, Consolas, 'Courier New', Courier",weight:{default:"400",light:"300",normal:"400",semibold:"600",bold:"700",extra:"800"},xxs:{size:"8px",lineHeight:"12px"},xs:{size:"10px",lineHeight:"14px"},sm:{size:"12px",lineHeight:"16px"},md:{size:"14px",lineHeight:"20px"},lg:{size:"22px",lineHeight:"28px"},xl:{size:"30px",lineHeight:"34px"},xxl:{size:"40px",lineHeight:"46px"}}},24852(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={columns:{sizes:["0%","8.33333333%","16.66666667%","25%","33.33333333%","41.66666667%","50%","58.33333333%","66.66666667%","75%","83.33333333%","91.66666667%","100%"]},xxs:{radius:"32px",border:"1px",spacing:"4px",profile:{size:"50px",padding:"3px"}},xs:{breakpoint:"320px",container:"100%",radius:"32px",border:"1px",spacing:"8px",profile:{size:"75px",padding:"5px"}},sm:{breakpoint:"768px",container:"768px",radius:"32px",border:"1px",spacing:"16px",profile:{size:"100px",padding:"5px"}},md:{breakpoint:"1060px",container:"1060px",radius:"32px",border:"2px",spacing:"24px",profile:{size:"125px",padding:"7px"}},lg:{breakpoint:"1120px",container:"1120px",radius:"32px",border:"4px",spacing:"48px",profile:{size:"150px",padding:"10px"}},xl:{breakpoint:"1680px",container:"1680px",radius:"32px",border:"4px",spacing:"64px",profile:{size:"175px",padding:"10px"}},xxl:{radius:"32px",border:"4px",spacing:"96px",profile:{size:"200px",padding:"10px"}}}},41385(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(t(13804)),r=l(t(47415)),i=l(t(24852)),o=l(t(93664));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach(function(n){d(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}n.default={name:"Default",colors:c(c({},a.default),o.default),fonts:r.default,geometry:i.default}},93664(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t={primary:{light:{background:"#4eb2d3",text:"#008acb"},normal:{background:"#0094c9",text:"#ffffff"},dark:{background:"#00749b",text:"#ffffff"}},secondary:{light:{background:"#d6d1ff",text:"#7172c8"},normal:{background:"#a3a0fb",text:"#ffffff"},dark:{background:"#7172c8",text:"#ffffff"}},tertiary:{light:{background:"#60fce7",text:"#009685"},normal:{background:"#00c8b5",text:"#ffffff"},dark:{background:"#009685",text:"#ffffff"}},quaternary:{light:{background:"#ffc2cb",text:"#c9606c"},normal:{background:"#ff909a",text:"#ffffff"},dark:{background:"#c9606c",text:"#ffffff"}},quinary:{light:{background:"#635bc3",text:"#000c63"},normal:{background:"#2e3192",text:"#ffffff"},dark:{background:"#000c63",text:"#ffffff"}},senary:{light:{background:"#6aecff",text:"#008acb"},normal:{background:"#00baff",text:"#ffffff"},dark:{background:"#008acb",text:"#ffffff"}},neutral:{light:{background:"#f3f4f5",text:"#a2a3a5"},normal:{background:"#e8e9ec",text:"#a2a3a5"},dark:{background:"#a2a3a5",text:"#ffffff"}},info:{light:{background:"#c9eeff",text:"#05bafc"},normal:{background:"#94e1ff",text:"#ffffff"},dark:{background:"#05bafc",text:"#ffffff"}},success:{light:{background:"#60fce7",text:"#009685"},normal:{background:"#00c8b5",text:"#ffffff"},dark:{background:"#009685",text:"#ffffff"}},warning:{highlight:{background:"#FFF4E4",text:"#cca269"},light:{background:"#ffd7a2",text:"#cca269"},normal:{background:"#ffca83",text:"#ffffff"},dark:{background:"#cca269",text:"#ffffff"}},danger:{light:{background:"#ffc2cb",text:"#c9606c"},normal:{background:"#ff909a",text:"#ffffff"},dark:{background:"#c9606c",text:"#ffffff"}},gradient:{green:{light:{background:"#c9f3de",text:"#000000"},normal:{background:"#4ad991",text:"#ffffff"},dark:{background:"#3bae7a",text:"#ffffff"}},blue:{light:{background:"#9dc2ff",text:"#000000"},normal:{background:"#3b86ff",text:"#ffffff"},dark:{background:"#2f6bcc",text:"#ffffff"}}}},a={sidebar:{light:{background:"#2f2e41",text:t.primary.light.text},normal:{background:"#2f2e41",text:t.primary.normal.text},dark:{background:"#2f2e41",text:t.primary.dark.text}}},r=Object.assign({},t,a);n.default=r},29868(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={text:{light:{background:"#bcbbca",text:"#4d505b"},normal:{background:"#83838e",text:"#FFFFFF"},dark:{background:"#4d505b",text:"#FFFFFF"}},overlay:{light:{background:"#F3F4F5",text:"#A2A3A5"},normal:{background:"#E8E9EC",text:"#A2A3A5"},dark:{background:"#A2A3A5",text:"#FFFFFF"}},inputs:{light:{background:"#FAFAFA",text:"#ABABAB"},normal:{background:"#F5F5F5",text:"#ABABAB"},dark:{background:"#ABABAB",text:"#FFFFFF"}},basic:{white:"#ffffff",black:"#000000"}}},84068(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={family:"'Proxima Nova', Helvetica, Arial, sans-serif",monospace:"Inconsolata, Monaco, Consolas, 'Courier New', Courier",weight:{default:"400",light:"300",normal:"400",bold:"600",extra:"700"},xxs:{size:"8px",lineHeight:"1.4em"},xs:{size:"12px",lineHeight:"1.4em"},sm:{size:"14px",lineHeight:"1.4em"},md:{size:"16px",lineHeight:"1.4em"},lg:{size:"18px",lineHeight:"1.4em"},xl:{size:"24px",lineHeight:"1.4em"},xxl:{size:"32px",lineHeight:"1.4em"},xxxl:{size:"48px",lineHeight:"1.4em"}}},60500(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={columns:{sizes:["0%","8.33333333%","16.66666667%","25%","33.33333333%","41.66666667%","50%","58.33333333%","66.66666667%","75%","83.33333333%","91.66666667%","100%"]},xxs:{radius:"32px",border:"1px",spacing:"4px",profile:{size:"50px",padding:"3px"}},xs:{breakpoint:"320px",container:"100%",radius:"32px",border:"1px",spacing:"8px",profile:{size:"75px",padding:"5px"}},sm:{breakpoint:"768px",container:"768px",radius:"32px",border:"1px",spacing:"16px",profile:{size:"100px",padding:"5px"}},md:{breakpoint:"1060px",container:"1060px",radius:"32px",border:"2px",spacing:"24px",profile:{size:"125px",padding:"7px"}},lg:{breakpoint:"1120px",container:"1120px",radius:"32px",border:"4px",spacing:"32px",profile:{size:"150px",padding:"10px"}},xl:{breakpoint:"1680px",container:"1680px",radius:"32px",border:"4px",spacing:"48px",profile:{size:"175px",padding:"10px"}},xxl:{radius:"32px",border:"4px",spacing:"64px",profile:{size:"200px",padding:"10px"}},xxxl:{radius:"32px",border:"4px",spacing:"96px",profile:{size:"200px",padding:"10px"}}}},46921(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(t(29868)),r=l(t(84068)),i=l(t(60500)),o=l(t(55648));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach(function(n){d(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}n.default={name:"Ditto Sustainability",colors:c(c({},a.default),o.default),fonts:r.default,geometry:i.default}},55648(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t={primary:{light:{background:"#4cb3d9",text:"#0076a1"},normal:{background:"#0094c9",text:"#ffffff"},dark:{background:"#0076a1",text:"#ffffff"}},secondary:{light:{background:"#7D68AB",text:"#37265F"},normal:{background:"#533C89",text:"#ffffff"},dark:{background:"#37265F",text:"#ffffff"}},tertiary:{light:{background:"#47d3c8",text:"#349990"},normal:{background:"#3eb7ad",text:"#ffffff"},dark:{background:"#349990",text:"#ffffff"}},quaternary:{light:{background:"#ffb6ab",text:"#b36a5f"},normal:{background:"#ff9789",text:"#ffffff"},dark:{background:"#b36a5f",text:"#ffffff"}},quinary:{light:{background:"#4cb3d9",text:"#0076a1"},normal:{background:"#0094c9",text:"#ffffff"},dark:{background:"#0076a1",text:"#ffffff"}},senary:{light:{background:"#4cb3d9",text:"#0076a1"},normal:{background:"#0094c9",text:"#ffffff"},dark:{background:"#0076a1",text:"#ffffff"}},neutral:{light:{background:"#f3f4f5",text:"#a2a3a5"},normal:{background:"#e8e9ec",text:"#a2a3a5"},dark:{background:"#a2a3a5",text:"#ffffff"}},info:{light:{background:"#c9eeff",text:"#05bafc"},normal:{background:"#94e1ff",text:"#ffffff"},dark:{background:"#05bafc",text:"#ffffff"}},success:{light:{background:"#60fce7",text:"#009685"},normal:{background:"#00c8b5",text:"#ffffff"},dark:{background:"#009685",text:"#ffffff"}},warning:{highlight:{background:"#FFF4E4",text:"#cca269"},light:{background:"#ffd7a2",text:"#cca269"},normal:{background:"#ffca83",text:"#ffffff"},dark:{background:"#cca269",text:"#ffffff"}},danger:{light:{background:"#ffc2cb",text:"#c9606c"},normal:{background:"#ff909a",text:"#ffffff"},dark:{background:"#c9606c",text:"#ffffff"}},gradient:{green:{light:{background:"#c9f3de",text:"#000000"},normal:{background:"#4ad991",text:"#ffffff"},dark:{background:"#3bae7a",text:"#ffffff"}},blue:{light:{background:"#9dc2ff",text:"#000000"},normal:{background:"#3b86ff",text:"#ffffff"},dark:{background:"#2f6bcc",text:"#ffffff"}}}},a={sidebar:{light:{background:"#2f2e41",text:t.primary.light.text},normal:{background:"#2f2e41",text:t.primary.normal.text},dark:{background:"#2f2e41",text:t.primary.dark.text}}},r=Object.assign({},t,a,{regularText:{text:"#0b4ee6"},redesignPrimary:{background:"#dce1ff"},redesignTertiary:{background:"#bcc4f4"}});n.default=r},49116(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={text:{light:{background:"#bcbbca",text:"#4d505b"},normal:{background:"#83838e",text:"#FFFFFF"},dark:{background:"#4d505b",text:"#FFFFFF"}},overlay:{light:{background:"#F3F4F5",text:"#A2A3A5"},normal:{background:"#E8E9EC",text:"#A2A3A5"},dark:{background:"#A2A3A5",text:"#FFFFFF"}},inputs:{light:{background:"#FAFAFA",text:"#ABABAB"},normal:{background:"#F5F5F5",text:"#ABABAB"},dark:{background:"#ABABAB",text:"#FFFFFF"}},basic:{white:"#ffffff",black:"#000000"}}},29172(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={family:"'Proxima Nova', Helvetica, Arial, sans-serif",monospace:"Inconsolata, Monaco, Consolas, 'Courier New', Courier",weight:{default:"400",light:"300",normal:"400",semibold:"600",bold:"700",extra:"800"},xxs:{size:"8px",lineHeight:"12px"},xs:{size:"10px",lineHeight:"14px"},sm:{size:"12px",lineHeight:"16px"},md:{size:"14px",lineHeight:"20px"},lg:{size:"22px",lineHeight:"28px"},xl:{size:"30px",lineHeight:"34px"},xxl:{size:"40px",lineHeight:"46px"}}},46660(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={columns:{sizes:["0%","8.33333333%","16.66666667%","25%","33.33333333%","41.66666667%","50%","58.33333333%","66.66666667%","75%","83.33333333%","91.66666667%","100%"]},xxs:{radius:"32px",border:"1px",spacing:"4px",profile:{size:"50px",padding:"3px"}},xs:{radius:"32px",border:"1px",spacing:"8px",profile:{size:"75px",padding:"5px"}},sm:{radius:"32px",border:"1px",spacing:"16px",profile:{size:"100px",padding:"5px"}},md:{radius:"32px",border:"2px",spacing:"24px",profile:{size:"125px",padding:"7px"}},lg:{radius:"32px",border:"4px",spacing:"48px",profile:{size:"150px",padding:"10px"}},xl:{radius:"32px",border:"4px",spacing:"64px",profile:{size:"175px",padding:"10px"}},xxl:{radius:"32px",border:"4px",spacing:"96px",profile:{size:"200px",padding:"10px"}}}},63705(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(t(49116)),r=l(t(29172)),i=l(t(46660)),o=l(t(21200));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach(function(n){d(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}n.default={name:"Ditto Tax",colors:c(c({},a.default),o.default),fonts:r.default,geometry:i.default}},21200(e,n){"use strict";function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function a(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach(function(n){r(e,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))})}return e}function r(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i={primary:{light:{background:"#63bfae",text:"#2f9687"},normal:{background:"#44b3a1",text:"#ffffff"},dark:{background:"#2f9687",text:"#ffffff"}},secondary:{light:{background:"#475a7e",text:"#14274b"},normal:{background:"#1a325c",text:"#ffffff"},dark:{background:"#14274b",text:"#ffffff"}},tertiary:{light:{background:"#b7b6c1",text:"#84838e"},normal:{background:"#a5a4b1",text:"#ffffff"},dark:{background:"#84838e",text:"#ffffff"}},quaternary:{light:{background:"#9e519f",text:"#6b1d6b"},normal:{background:"#842985",text:"#ffffff"},dark:{background:"#6b1d6b",text:"#ffffff"}},quinary:{light:{background:"#63bfae",text:"#2f9687"},normal:{background:"#44b3a1",text:"#ffffff"},dark:{background:"#2f9687",text:"#ffffff"}},senary:{light:{background:"#63bfae",text:"#2f9687"},normal:{background:"#44b3a1",text:"#ffffff"},dark:{background:"#2f9687",text:"#ffffff"}},neutral:{light:{background:"#f3f4f5",text:"#a2a3a5"},normal:{background:"#e8e9ec",text:"#a2a3a5"},dark:{background:"#a2a3a5",text:"#ffffff"}},info:{light:{background:"#c9eeff",text:"#05bafc"},normal:{background:"#94e1ff",text:"#ffffff"},dark:{background:"#05bafc",text:"#ffffff"}},success:{light:{background:"#63bfae",text:"#2f9687"},normal:{background:"#44b3a1",text:"#ffffff"},dark:{background:"#2f9687",text:"#ffffff"}},warning:{highlight:{background:"#FFF4E4",text:"#cca269"},light:{background:"#ffd7a2",text:"#cca269"},normal:{background:"#ffca83",text:"#ffffff"},dark:{background:"#cca269",text:"#ffffff"}},danger:{light:{background:"#f1bcc1",text:"#a71321"},normal:{background:"#d11829",text:"#ffffff"},dark:{background:"#a71321",text:"#ffffff"}},gradient:{green:{light:{background:"#c9f3de",text:"#000000"},normal:{background:"#4ad991",text:"#ffffff"},dark:{background:"#3bae7a",text:"#ffffff"}},blue:{light:{background:"#9dc2ff",text:"#000000"},normal:{background:"#3b86ff",text:"#ffffff"},dark:{background:"#2f6bcc",text:"#ffffff"}}}},o={sidebar:{light:{background:i.primary.light.background,text:i.primary.light.text},normal:{background:i.primary.normal.background,text:i.primary.normal.text},dark:{background:i.primary.dark.background,text:i.primary.dark.text}}},l=a(a({},i),o);n.default=l},19202(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={text:{light:{background:"#bcbbca",text:"#4d505b"},normal:{background:"#83838e",text:"#FFFFFF"},dark:{background:"#4d505b",text:"#FFFFFF"}},overlay:{light:{background:"#F3F4F5",text:"#A2A3A5"},normal:{background:"#E8E9EC",text:"#A2A3A5"},dark:{background:"#A2A3A5",text:"#FFFFFF"}},inputs:{light:{background:"#FAFAFA",text:"#ABABAB"},normal:{background:"#F5F5F5",text:"#ABABAB"},dark:{background:"#ABABAB",text:"#FFFFFF"}},basic:{white:"#ffffff",black:"#000000"}}},69773(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={family:"'Proxima Nova', Helvetica, Arial, sans-serif",monospace:"Inconsolata, Monaco, Consolas, 'Courier New', Courier",weight:{default:"400",light:"300",normal:"400",semibold:"600",bold:"700",extra:"800"},xxs:{size:"8px",lineHeight:"12px"},xs:{size:"10px",lineHeight:"14px"},sm:{size:"12px",lineHeight:"16px"},md:{size:"14px",lineHeight:"20px"},lg:{size:"22px",lineHeight:"28px"},xl:{size:"30px",lineHeight:"34px"},xxl:{size:"40px",lineHeight:"46px"}}},76458(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default={columns:{sizes:["0%","8.33333333%","16.66666667%","25%","33.33333333%","41.66666667%","50%","58.33333333%","66.66666667%","75%","83.33333333%","91.66666667%","100%"]},xxs:{radius:"32px",border:"1px",spacing:"4px",profile:{size:"50px",padding:"3px"}},xs:{radius:"32px",border:"1px",spacing:"8px",profile:{size:"75px",padding:"5px"}},sm:{radius:"32px",border:"1px",spacing:"16px",profile:{size:"100px",padding:"5px"}},md:{radius:"32px",border:"2px",spacing:"24px",profile:{size:"125px",padding:"7px"}},lg:{radius:"32px",border:"4px",spacing:"48px",profile:{size:"150px",padding:"10px"}},xl:{radius:"32px",border:"4px",spacing:"64px",profile:{size:"175px",padding:"10px"}},xxl:{radius:"32px",border:"4px",spacing:"96px",profile:{size:"200px",padding:"10px"}}}},28811(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=l(t(19202)),r=l(t(69773)),i=l(t(76458)),o=l(t(58146));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach(function(n){d(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}n.default={name:"Ditto Translation",colors:c(c({},a.default),o.default),fonts:r.default,geometry:i.default}},58146(e,n){"use strict";function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function a(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach(function(n){r(e,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))})}return e}function r(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i={primary:{light:{background:"#FFA74C",text:"#459b84"},normal:{background:"#FF8200",text:"#ffffff"},dark:{background:"#CC6800",text:"#ffffff"}},secondary:{light:{background:"#475a7e",text:"#14274b"},normal:{background:"#1a325c",text:"#ffffff"},dark:{background:"#14274b",text:"#ffffff"}},tertiary:{light:{background:"#b7b6c1",text:"#84838e"},normal:{background:"#a5a4b1",text:"#ffffff"},dark:{background:"#84838e",text:"#ffffff"}},quaternary:{light:{background:"#9e519f",text:"#6b1d6b"},normal:{background:"#842985",text:"#ffffff"},dark:{background:"#6b1d6b",text:"#ffffff"}},quinary:{light:{background:"#FFA74C",text:"#459b84"},normal:{background:"#FF8200",text:"#ffffff"},dark:{background:"#CC6800",text:"#ffffff"}},senary:{light:{background:"#FFA74C",text:"#459b84"},normal:{background:"#FF8200",text:"#ffffff"},dark:{background:"#CC6800",text:"#ffffff"}},neutral:{light:{background:"#f3f4f5",text:"#a2a3a5"},normal:{background:"#e8e9ec",text:"#a2a3a5"},dark:{background:"#a2a3a5",text:"#ffffff"}},info:{light:{background:"#c9eeff",text:"#05bafc"},normal:{background:"#94e1ff",text:"#ffffff"},dark:{background:"#05bafc",text:"#ffffff"}},success:{light:{background:"#bcddcc",text:"#167243"},normal:{background:"#00c8b5",text:"#ffffff"},dark:{background:"#167243",text:"#ffffff"}},warning:{highlight:{background:"#FFF4E4",text:"#cca269"},light:{background:"#ffd7a2",text:"#cca269"},normal:{background:"#ffca83",text:"#ffffff"},dark:{background:"#cca269",text:"#ffffff"}},danger:{light:{background:"#f1bcc1",text:"#a71321"},normal:{background:"#d11829",text:"#ffffff"},dark:{background:"#a71321",text:"#ffffff"}},gradient:{green:{light:{background:"#c9f3de",text:"#000000"},normal:{background:"#4ad991",text:"#ffffff"},dark:{background:"#3bae7a",text:"#ffffff"}},blue:{light:{background:"#9dc2ff",text:"#000000"},normal:{background:"#3b86ff",text:"#ffffff"},dark:{background:"#2f6bcc",text:"#ffffff"}}}},o={sidebar:{light:{background:i.primary.light.background,text:i.primary.light.text},normal:{background:i.primary.normal.background,text:i.primary.normal.text},dark:{background:i.primary.dark.background,text:i.primary.dark.text}}},l=a(a({},i),o);n.default=l},81812(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.withGlobalStyles=n.GlobalStyles=void 0;var a,r,i=(a=t(22155))&&a.__esModule?a:{default:a},o=t(75235),l=n.GlobalStyles=(0,o.createGlobalStyle)(r||(r=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  a,\n  abbr, \n  acronym, \n  address, \n  applet, \n  area, \n  article, \n  aside, \n  audio, \n  b, \n  base,\n  basefont,\n  bdi, \n  bdo, \n  bgsound, \n  big, \n  blink, \n  blockquote, \n  body, \n  br, \n  button, \n  canvas,\n  caption,\n  center, \n  cite, \n  code, \n  col, \n  colgroup, \n  content, \n  data, \n  datalist, \n  dd, \n  del,\n  details,\n  dfn, \n  dir, \n  div, \n  dl, \n  dt, \n  em, \n  embed, \n  fieldset, \n  figcaption, \n  figure, \n  font,\n  footer,\n  form, \n  frame, \n  frameset,  \n  head, \n  header, \n  hgroup, \n  hr,\n  html,\n  i, \n  iframe, \n  img, \n  input, \n  ins, \n  isindex, \n  kbd, \n  keygen, \n  label, \n  legend, \n  li, \n  link,\n  listing,\n  main, \n  map, \n  mark, \n  marquee, \n  menu, \n  menuitem, \n  meta, \n  meter, \n  nav, \n  nobr,\n  noframes,\n  noscript, \n  object, \n  ol, \n  optgroup, \n  option, \n  output, \n  p, \n  param, \n  plaintext,\n  pre,\n  progress, \n  q, \n  rp, \n  rt, \n  ruby, \n  s, \n  samp, \n  script, \n  section, \n  select, \n  shadow, \n  small,\n  source,\n  spacer, \n  span, \n  strike, \n  strong, \n  style, \n  sub, \n  summary, \n  sup, \n  table, \n  tbody,\n  td,\n  template, \n  textarea, \n  tfoot, \n  th, \n  thead, \n  time, \n  title, \n  tr, \n  track, \n  tt, \n  u, \n  ul,\n  var,\n  video, \n  wbr, \n  xmp {\n    background-color: transparent;\n    border: 0;\n    color: inherit;\n    fill: inherit;\n    font-family: inherit;\n    font-size: 100%;\n    font-weight: inherit;\n    margin: 0;\n    outline: 0;\n    padding: 0;\n    text-decoration: none;\n    vertical-align: baseline;\n  }\n\n\n  h1, \n  h2, \n  h3, \n  h4, \n  h5, \n  h6, {\n    background-color: transparent;\n    border: 0;\n    color: inherit;\n    fill: inherit;\n    font-family: inherit;\n    font-weight: inherit;\n    margin: 0;\n    outline: 0;\n    padding: 0;\n    text-decoration: none;\n    vertical-align: baseline;\n  }\n\n  ol,\n  ul {\n    list-style: none;\n  }\n\n  table {\n    border-collapse: collapse;\n    border-spacing: 0;\n    width: 100%;\n  }\n\n  th {\n    text-align: left;\n  }\n\n  * {\n    box-sizing: border-box;\n  }\n\n  html,\n  body,\n  #root {\n    // set base font family\n    // set base font size\n    height: 100%;\n    width: 100%;\n  }\n  "])));n.withGlobalStyles=function(e){return i.default.createElement(i.default.Fragment,null,i.default.createElement(l,null),e())}},16463(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.subtract=n.stripUnit=n.multiply=n.getUnit=n.getSpanWidth=n.divide=n.add=void 0;var t=n.getUnit=function(e){return e.toString().replace(/[-\d.%]/g,"")},a=n.stripUnit=function(e){return parseFloat(e)};n.multiply=function(e,n){var r=t(e),i=t(n),o=a(e),l=a(n);return(!r||!i||r===i)&&"".concat(o*l).concat(r)},n.divide=function(e,n){var r=t(e),i=t(n),o=a(e),l=a(n);return(!r||!i||r===i)&&"".concat(o/l).concat(r)},n.add=function(e,n){var r=t(e),i=t(n),o=a(e),l=a(n);return(!r||!i||r===i)&&"".concat(o+l).concat(r)},n.subtract=function(e,n){var r=t(e),i=t(n),o=a(e),l=a(n);return(!r||!i||r===i)&&"".concat(o-l).concat(r)},n.getSpanWidth=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;return n<=0?"0%":e>n?"100%":"".concat(e/n*100,"%")}},69059(e,n){"use strict";function t(){var e,n,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function l(t,r,i,o){var l=r&&r.prototype instanceof c?r:c,d=Object.create(l.prototype);return a(d,"_invoke",function(t,a,r){var i,o,l,c=0,d=r||[],u=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(n,t){return i=n,o=0,l=e,p.n=t,s}};function m(t,a){for(o=t,l=a,n=0;!u&&c&&!r&&n<d.length;n++){var r,i=d[n],m=p.p,f=i[2];t>3?(r=f===a)&&(l=i[(o=i[4])?5:(o=3,3)],i[4]=i[5]=e):i[0]<=m&&((r=t<2&&m<i[1])?(o=0,p.v=a,p.n=i[1]):m<f&&(r=t<3||i[0]>a||a>f)&&(i[4]=t,i[5]=a,p.n=f,o=0))}if(r||t>1)return s;throw u=!0,a}return function(r,d,f){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&m(d,f),o=d,l=f;(n=o<2?e:l)||!u;){i||(o?o<3?(o>1&&(p.n=-1),m(o,l)):p.n=l:p.v=l);try{if(c=2,i){if(o||(r="next"),n=i[r]){if(!(n=n.call(i,l)))throw TypeError("iterator result is not an object");if(!n.done)return n;l=n.value,o<2&&(o=0)}else 1===o&&(n=i.return)&&n.call(i),o<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),o=1);i=e}else if((n=(u=p.n<0)?l:t.call(a,p))!==s)break}catch(n){i=e,o=1,l=n}finally{c=1}}return{value:n,done:u}}}(t,i,o),!0),d}var s={};function c(){}function d(){}function u(){}n=Object.getPrototypeOf;var p=[][i]?n(n([][i]())):(a(n={},i,function(){return this}),n),m=u.prototype=c.prototype=Object.create(p);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,a(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e}return d.prototype=u,a(m,"constructor",u),a(u,"constructor",d),d.displayName="GeneratorFunction",a(u,o,"GeneratorFunction"),a(m),a(m,o,"Generator"),a(m,i,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),(t=function(){return{w:l,m:f}})()}function a(e,n,t,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}a=function(e,n,t,r){function o(n,t){a(e,n,function(e){return this._invoke(n,t,e)})}n?i?i(e,n,{value:t,enumerable:!r,configurable:!r,writable:!r}):e[n]=t:(o("next",0),o("throw",1),o("return",2))},a(e,n,t,r)}function r(e,n,t,a,r,i,o){try{var l=e[i](o),s=l.value}catch(e){return void t(e)}l.done?n(s):Promise.resolve(s).then(a,r)}function i(e){return function(){var n=this,t=arguments;return new Promise(function(a,i){var o=e.apply(n,t);function l(e){r(o,a,i,l,s,"next",e)}function s(e){r(o,a,i,l,s,"throw",e)}l(void 0)})}}Object.defineProperty(n,"__esModule",{value:!0}),n.debounce=void 0,n.debounce=function(e,n){var a;return function(){for(var r=arguments.length,o=new Array(r),l=0;l<r;l++)o[l]=arguments[l];return new Promise(function(r,l){a&&clearInterval(a),a=setTimeout(i(t().m(function n(){var a,i;return t().w(function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,e.apply(void 0,o);case 1:a=n.v,r(a),n.n=3;break;case 2:n.p=2,i=n.v,l(i);case 3:return n.a(2)}},n,null,[[0,2]])})),n)})}}},69151(e,n){"use strict";var t,a,r,i,o,l,s,c,d,u,p,m,f,y,g,b,h,v,x,T,O,k,j,C,S,N,w,D,A,R,P,L,I,E,_,F,B,U,M,V,z,G,$,W,q,J,Y,H,K,Q,Z,X,ee,ne,te,ae,re,ie,oe,le,se,ce,de,ue,pe,me,fe,ye,ge,be,he,ve,xe;n.sE=n.KB=n.v7=n._P=n.XY=n.Xj=n.K=n.Q=n.uX=n.mv=n.mh=n.yG=n.US=n.h6=n.mF=n.Ub=n.Ak=n.jN=n.II=n.fj=n.l2=n.Fr=n.gb=n.zM=n.F4=n.oQ=n.oY=n.QT=n.pe=n.kt=n.GV=n.Rh=n.qT=n.RA=n.oo=n.G1=n.ID=n.rA=n.ho=n.Ed=n.go=n.x1=n.nA=n.nE=n.G8=n.Qn=n.VT=n.DF=n.C=n.CO=void 0,n.Ui=n.gG=n.M6=n.BL=n.wZ=n.ou=n.D_=n.iG=n.F9=n.AR=n.W6=n.li=n.Ix=n.Tc=n.ZU=n.iD=n.p2=n.xV=n.d=n.kL=n.HG=n.zB=n.WP=n.PG=void 0,(xe=n.CO||(n.CO={})).Enterprise="ENTERPRISE",xe.Team="TEAM",xe.Engage="ENGAGE",(ve=n.C||(n.C={})).Est="EST",ve.Act="ACT",(he=n.DF||(n.DF={})).Sum="SUM",he.Avg="AVG",he.Min="MIN",he.Max="MAX",he.Count="COUNT",he.None="NONE",(be=n.VT||(n.VT={})).Wastestream="WASTESTREAM",be.Wastetreatmentprocess="WASTETREATMENTPROCESS",be.Wastecontractor="WASTECONTRACTOR",be.Wastecarrier="WASTECARRIER",be.Containertypesize="CONTAINERTYPESIZE",be.Wastein="WASTEIN",be.Wasteout="WASTEOUT",be.Locationpoint="LOCATIONPOINT",be.Meter="METER",be.Transport="TRANSPORT",be.Transportsubtype="TRANSPORTSUBTYPE",be.Fueltype="FUELTYPE",be.Transportfueltype="TRANSPORTFUELTYPE",be.Journeytarget="JOURNEYTARGET",be.Unit="UNIT",be.Accuracy="ACCURACY",be.Currency="CURRENCY",be.Material="MATERIAL",be.Materialorigin="MATERIALORIGIN",be.Tariff="TARIFF",be.Counterparty="COUNTERPARTY",(ge=n.Qn||(n.Qn={})).Clean="CLEAN",ge.Error="ERROR",ge.Infected="INFECTED",ge.Pending="PENDING",(ye=n.G8||(n.G8={})).Activity="ACTIVITY",ye.Aspect="ASPECT",ye.Impact="IMPACT",ye.EmergencyCondition="EMERGENCY_CONDITION",ye.ControlMeasure="CONTROL_MEASURE",ye.Status="STATUS",ye.Departments="DEPARTMENTS",(fe=n.nE||(n.nE={})).FormCampaign="FORM_CAMPAIGN",fe.FormSubmission="FORM_SUBMISSION",(n.nA||(n.nA={})).FormService="FORM_SERVICE",(me=n.x1||(n.x1={})).Video="VIDEO",me.Scorm="SCORM",me.Hyperlink="HYPERLINK",(pe=n.go||(n.go={})).Dec="DEC",pe.Epc="EPC",(ue=n.Ed||(n.Ed={})).A="A",ue.B="B",ue.C="C",ue.D="D",ue.E="E",ue.F="F",ue.G="G",(de=n.ho||(n.ho={})).Add="ADD",de.Remove="REMOVE",(ce=n.rA||(n.rA={})).Electricity="ELECTRICITY",ce.Fuel="FUEL",ce.Gas="GAS",ce.Materials="MATERIALS",ce.Transport="TRANSPORT",ce.Waste="WASTE",ce.Water="WATER",(se=n.ID||(n.ID={})).Waste="WASTE",se.Water="WATER",se.Energy="ENERGY",se.Transport="TRANSPORT",se.EnvironmentalSocialGovernance="ENVIRONMENTAL_SOCIAL_GOVERNANCE",se.CircularEconomy="CIRCULAR_ECONOMY",se.HealthAndSafety="HEALTH_AND_SAFETY",se.HealthAndWellbeing="HEALTH_AND_WELLBEING",(le=n.G1||(n.G1={})).Notstarted="NOTSTARTED",le.Inprogress="INPROGRESS",le.Complete="COMPLETE",(oe=n.oo||(n.oo={})).Learn="LEARN",oe.Comply="COMPLY",oe.Data="DATA",oe.Survey="SURVEY",(ie=n.RA||(n.RA={})).FromDate="FROM_DATE",ie.ToDate="TO_DATE",ie.Year_1="YEAR_1",ie.Year_2="YEAR_2",ie.Period_1="PERIOD_1",ie.Period_2="PERIOD_2",ie.StandaloneYear="STANDALONE_YEAR",ie.LocationOccupation="LOCATION_OCCUPATION",ie.ActualOrEstimated="ACTUAL_OR_ESTIMATED",ie.Locations="LOCATIONS",ie.Tags="TAGS",ie.Departments="DEPARTMENTS",ie.Countries="COUNTRIES",ie.Regions="REGIONS",ie.Meters="METERS",ie.Scopes="SCOPES",ie.Sources="SOURCES",ie.Units="UNITS",ie.Materials="MATERIALS",ie.TransportTypes="TRANSPORT_TYPES",ie.PurposesOfTravel="PURPOSES_OF_TRAVEL",ie.FuelTypes="FUEL_TYPES",ie.LocationCustomAttributes="LOCATION_CUSTOM_ATTRIBUTES",ie.WasteStreams="WASTE_STREAMS",ie.WasteContractors="WASTE_CONTRACTORS",ie.WasteCarriers="WASTE_CARRIERS",ie.ProjectPhases="PROJECT_PHASES",ie.BusinessUnit="BUSINESS_UNIT",ie.WaterInOut="WATER_IN_OUT",ie.UploadReferences="UPLOAD_REFERENCES",(re=n.qT||(n.qT={})).Quicksight="QUICKSIGHT",re.Custom="CUSTOM",(ae=n.Rh||(n.Rh={})).SectionTitleTile="SECTION_TITLE_TILE",ae.TotalElectricityConsumption="TOTAL_ELECTRICITY_CONSUMPTION",ae.TotalElectricityConsumptionPeriodComparisonKpiTile="TOTAL_ELECTRICITY_CONSUMPTION_PERIOD_COMPARISON_KPI_TILE",ae.TotalElectricityCost="TOTAL_ELECTRICITY_COST",ae.TotalElectricityCostPeriodComparisonKpiTile="TOTAL_ELECTRICITY_COST_PERIOD_COMPARISON_KPI_TILE",ae.TotalElectricityGrossCarbonEmissions="TOTAL_ELECTRICITY_GROSS_CARBON_EMISSIONS",ae.TotalElectricityGrossCarbonEmissionsPeriodComparisonKpiTile="TOTAL_ELECTRICITY_GROSS_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE",ae.TotalElectricityNetCarbonEmissions="TOTAL_ELECTRICITY_NET_CARBON_EMISSIONS",ae.TotalElectricityNetCarbonEmissionsPeriodComparisonKpiTile="TOTAL_ELECTRICITY_NET_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE",ae.AverageElectricityChargePerKilowattPeriodComparisonKpiTile="AVERAGE_ELECTRICITY_CHARGE_PER_KILOWATT_PERIOD_COMPARISON_KPI_TILE",ae.AverageElectricityChargePerKilowattByLocationPeriodComparisonTableTile="AVERAGE_ELECTRICITY_CHARGE_PER_KILOWATT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.AverageElectricityChargePerKilowattByTagPeriodComparisonTableTile="AVERAGE_ELECTRICITY_CHARGE_PER_KILOWATT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.ElectricityConsumptionByLocation="ELECTRICITY_CONSUMPTION_BY_LOCATION",ae.ElectricityConsumptionByLocationPeriodComparisonTableTile="ELECTRICITY_CONSUMPTION_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.ElectricityConsumptionByTagPeriodComparisonTableTile="ELECTRICITY_CONSUMPTION_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.ElectricityCostByLocationPeriodComparisonTableTile="ELECTRICITY_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.ElectricityCostByTagPeriodComparisonTableTile="ELECTRICITY_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.ElectricityConsumptionByCountryAndScope="ELECTRICITY_CONSUMPTION_BY_COUNTRY_AND_SCOPE",ae.ElectricityCostAndConsupmtionOverTime="ELECTRICITY_COST_AND_CONSUPMTION_OVER_TIME",ae.ElectricityGrossCarbonEmissionsByScope="ELECTRICITY_GROSS_CARBON_EMISSIONS_BY_SCOPE",ae.ElectricityGrossCarbonEmissionsByLocationPeriodComparisonTableTile="ELECTRICITY_GROSS_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.ElectricityGrossCarbonEmissionsByTagPeriodComparisonTableTile="ELECTRICITY_GROSS_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.ElectricityNetCarbonEmissionsByLocationPeriodComparisonTableTile="ELECTRICITY_NET_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.ElectricityNetCarbonEmissionsByTagPeriodComparisonTableTile="ELECTRICITY_NET_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.TotalCarbonEmissions="TOTAL_CARBON_EMISSIONS",ae.TotalCarbonEmissionsPeriodComparisonKpiTile="TOTAL_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE",ae.TotalCarbonCostPeriodComparisonKpiTile="TOTAL_CARBON_COST_PERIOD_COMPARISON_KPI_TILE",ae.CarbonEmissionsByScopePie="CARBON_EMISSIONS_BY_SCOPE_PIE",ae.CarbonEmissionsBySourceBar="CARBON_EMISSIONS_BY_SOURCE_BAR",ae.CarbonEmissionsByScopeAndSourceTable="CARBON_EMISSIONS_BY_SCOPE_AND_SOURCE_TABLE",ae.CarbonEmissionsByDataTypeBar="CARBON_EMISSIONS_BY_DATA_TYPE_BAR",ae.CarbonWttAndTdEmissionsBySourceTableTile="CARBON_WTT_AND_TD_EMISSIONS_BY_SOURCE_TABLE_TILE",ae.CarbonEmissionsByLocationPeriodComparisonTableTile="CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.CarbonCostByLocationPeriodComparisonTableTile="CARBON_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.CarbonEmissionsByTagPeriodComparisonTableTile="CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.CarbonCostByTagPeriodComparisonTableTile="CARBON_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.CarbonEmissionsByScopePeriodComparisonTableTile="CARBON_EMISSIONS_BY_SCOPE_PERIOD_COMPARISON_TABLE_TILE",ae.CarbonCostByScopePeriodComparisonTableTile="CARBON_COST_BY_SCOPE_PERIOD_COMPARISON_TABLE_TILE",ae.CarbonEmissionsByResourcePeriodComparisonTableTile="CARBON_EMISSIONS_BY_RESOURCE_PERIOD_COMPARISON_TABLE_TILE",ae.CarbonCostByResourcePeriodComparisonTableTile="CARBON_COST_BY_RESOURCE_PERIOD_COMPARISON_TABLE_TILE",ae.CarbonEmissionsByScopeForPeriod_1PieTile="CARBON_EMISSIONS_BY_SCOPE_FOR_PERIOD_1_PIE_TILE",ae.CarbonEmissionsByScopeForPeriod_2PieTile="CARBON_EMISSIONS_BY_SCOPE_FOR_PERIOD_2_PIE_TILE",ae.CarbonEmissionsBySourceForPeriod_1BarTile="CARBON_EMISSIONS_BY_SOURCE_FOR_PERIOD_1_BAR_TILE",ae.CarbonEmissionsBySourceForPeriod_2BarTile="CARBON_EMISSIONS_BY_SOURCE_FOR_PERIOD_2_BAR_TILE",ae.ResourcesUsedByScopeTable="RESOURCES_USED_BY_SCOPE_TABLE",ae.ResourcesUsedByLocationTable="RESOURCES_USED_BY_LOCATION_TABLE",ae.ProportionOfActVsEstPie="PROPORTION_OF_ACT_VS_EST_PIE",ae.QuantityAndCo2EByLocationAndMeterTable="QUANTITY_AND_CO2E_BY_LOCATION_AND_METER_TABLE",ae.CarbonEmissionsByCountryBar="CARBON_EMISSIONS_BY_COUNTRY_BAR",ae.CarbonEmissionsByCountryAndScopeTable="CARBON_EMISSIONS_BY_COUNTRY_AND_SCOPE_TABLE",ae.CarbonEmissionsByCountryMap="CARBON_EMISSIONS_BY_COUNTRY_MAP",ae.TopCarbonEmissionsByCountryTable="TOP_CARBON_EMISSIONS_BY_COUNTRY_TABLE",ae.Top_3CarbonEmissionCountriesTable="TOP_3_CARBON_EMISSION_COUNTRIES_TABLE",ae.Bottom_3CarbonEmissionCountriesTable="BOTTOM_3_CARBON_EMISSION_COUNTRIES_TABLE",ae.TotalEnergyConsumptionKpiTile="TOTAL_ENERGY_CONSUMPTION_KPI_TILE",ae.TotalEnergyGrossCarbonEmissionsKpiTile="TOTAL_ENERGY_GROSS_CARBON_EMISSIONS_KPI_TILE",ae.TotalEnergyNetCarbonEmissionsKpiTile="TOTAL_ENERGY_NET_CARBON_EMISSIONS_KPI_TILE",ae.TotalEnergyCostKpiTile="TOTAL_ENERGY_COST_KPI_TILE",ae.EnergyCostAndConsumptionBarTile="ENERGY_COST_AND_CONSUMPTION_BAR_TILE",ae.EnergyCarbonEmissionsByScopeBarTile="ENERGY_CARBON_EMISSIONS_BY_SCOPE_BAR_TILE",ae.EnergyConsumptionPerLocationTableTile="ENERGY_CONSUMPTION_PER_LOCATION_TABLE_TILE",ae.EnergyConsumptionByScopeAndTariffTableTile="ENERGY_CONSUMPTION_BY_SCOPE_AND_TARIFF_TABLE_TILE",ae.TotalEnergyConsumptionYearOnYearKpiTile="TOTAL_ENERGY_CONSUMPTION_YEAR_ON_YEAR_KPI_TILE",ae.TotalEnergyCostYearOnYearKpiTile="TOTAL_ENERGY_COST_YEAR_ON_YEAR_KPI_TILE",ae.TotalEnergyGrossCarbonEmissionsYearOnYearKpiTile="TOTAL_ENERGY_GROSS_CARBON_EMISSIONS_YEAR_ON_YEAR_KPI_TILE",ae.TotalEnergyNetCarbonEmissionsYearOnYearKpiTile="TOTAL_ENERGY_NET_CARBON_EMISSIONS_YEAR_ON_YEAR_KPI_TILE",ae.MonthlyEnergyConsumptionYearOnYearBarTile="MONTHLY_ENERGY_CONSUMPTION_YEAR_ON_YEAR_BAR_TILE",ae.AnnualEnergyFiguresPerLocationTableTile="ANNUAL_ENERGY_FIGURES_PER_LOCATION_TABLE_TILE",ae.TotalWasteWeightKpiTile="TOTAL_WASTE_WEIGHT_KPI_TILE",ae.TotalWasteCostKpiTile="TOTAL_WASTE_COST_KPI_TILE",ae.TotalWasteCarbonEmissionsKpiTile="TOTAL_WASTE_CARBON_EMISSIONS_KPI_TILE",ae.PercentageDivertedFromDisposalKpiTile="PERCENTAGE_DIVERTED_FROM_DISPOSAL_KPI_TILE",ae.WasteCostAndWeightOverTimeBarTile="WASTE_COST_AND_WEIGHT_OVER_TIME_BAR_TILE",ae.WasteHierarchyByTypeDonutTile="WASTE_HIERARCHY_BY_TYPE_DONUT_TILE",ae.WasteCarbonEmissionsByScopeBarTile="WASTE_CARBON_EMISSIONS_BY_SCOPE_BAR_TILE",ae.WasteByWasteStreamPieTile="WASTE_BY_WASTE_STREAM_PIE_TILE",ae.WasteConsumptionByLocationTableTile="WASTE_CONSUMPTION_BY_LOCATION_TABLE_TILE",ae.TotalWasteWeightYearOnYearKpiTile="TOTAL_WASTE_WEIGHT_YEAR_ON_YEAR_KPI_TILE",ae.TotalWasteCarbonEmissionsYearOnYearKpiTile="TOTAL_WASTE_CARBON_EMISSIONS_YEAR_ON_YEAR_KPI_TILE",ae.TotalWasteCostYearOnYearKpiTile="TOTAL_WASTE_COST_YEAR_ON_YEAR_KPI_TILE",ae.TotalWasteCostPerTonnageYearOnYearKpiTile="TOTAL_WASTE_COST_PER_TONNAGE_YEAR_ON_YEAR_KPI_TILE",ae.AnnualWasteGenerationAndCostPerLocationTableTile="ANNUAL_WASTE_GENERATION_AND_COST_PER_LOCATION_TABLE_TILE",ae.MonthlyWasteGenerationYearOnYearBarTile="MONTHLY_WASTE_GENERATION_YEAR_ON_YEAR_BAR_TILE",ae.MonthlyWasteGenerationAndCostYearOnYearBarTile="MONTHLY_WASTE_GENERATION_AND_COST_YEAR_ON_YEAR_BAR_TILE",ae.WasteWeightOverTimeBarTile="WASTE_WEIGHT_OVER_TIME_BAR_TILE",ae.WasteCostByWasteStreamPieTile="WASTE_COST_BY_WASTE_STREAM_PIE_TILE",ae.WasteStreamCostOverTimeBarTile="WASTE_STREAM_COST_OVER_TIME_BAR_TILE",ae.WasteWeightOverTimeByWasteStreamBarTile="WASTE_WEIGHT_OVER_TIME_BY_WASTE_STREAM_BAR_TILE",ae.WasteCostOverTimeByWasteStreamBarTile="WASTE_COST_OVER_TIME_BY_WASTE_STREAM_BAR_TILE",ae.WasteWeightByLocationPeriodComparisonTableTile="WASTE_WEIGHT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCarbonEmissionsByLocationPeriodComparisonTableTile="WASTE_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WasteWeightByTagPeriodComparisonTableTile="WASTE_WEIGHT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCarbonEmissionsByTagPeriodComparisonTableTile="WASTE_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WasteWeightByContractorPeriodComparisonTableTile="WASTE_WEIGHT_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCarbonEmissionsByContractorPeriodComparisonTableTile="WASTE_CARBON_EMISSIONS_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE",ae.WasteWeightByTreatmentProcessPeriodComparisonTableTile="WASTE_WEIGHT_BY_TREATMENT_PROCESS_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCarbonEmissionsByTreatmentProcessPeriodComparisonTableTile="WASTE_CARBON_EMISSIONS_BY_TREATMENT_PROCESS_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCostByLocationPeriodComparisonTableTile="WASTE_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCostPerTonnageByLocationPeriodComparisonTableTile="WASTE_COST_PER_TONNAGE_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCostByTagPeriodComparisonTableTile="WASTE_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCostPerTonnageByTagPeriodComparisonTableTile="WASTE_COST_PER_TONNAGE_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCostByContractorPeriodComparisonTableTile="WASTE_COST_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCostPerTonnageByContractorPeriodComparisonTableTile="WASTE_COST_PER_TONNAGE_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCostByTreatmentProcessPeriodComparisonTableTile="WASTE_COST_BY_TREATMENT_PROCESS_PERIOD_COMPARISON_TABLE_TILE",ae.WasteCostPerTonnageByTreatmentProcessPeriodComparisonTableTile="WASTE_COST_PER_TONNAGE_BY_TREATMENT_PROCESS_PERIOD_COMPARISON_TABLE_TILE",ae.WasteDisposalPercentagePeriodComparisonKpiTile="WASTE_DISPOSAL_PERCENTAGE_PERIOD_COMPARISON_KPI_TILE",ae.WasteRecycingPercentagePeriodComparisonKpiTile="WASTE_RECYCING_PERCENTAGE_PERIOD_COMPARISON_KPI_TILE",ae.WasteDisposalPercentageByLocationPeriodComparisonTableTile="WASTE_DISPOSAL_PERCENTAGE_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WasteRecycingPercentageByLocationPeriodComparisonTableTile="WASTE_RECYCING_PERCENTAGE_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WasteDisposalPercentageByTagPeriodComparisonTableTile="WASTE_DISPOSAL_PERCENTAGE_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WasteRecycingPercentageByTagPeriodComparisonTableTile="WASTE_RECYCING_PERCENTAGE_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WasteDisposalPercentageByWasteStreamPeriodComparisonTableTile="WASTE_DISPOSAL_PERCENTAGE_BY_WASTE_STREAM_PERIOD_COMPARISON_TABLE_TILE",ae.WasteRecycingPercentageByWasteStreamPeriodComparisonTableTile="WASTE_RECYCING_PERCENTAGE_BY_WASTE_STREAM_PERIOD_COMPARISON_TABLE_TILE",ae.WasteDisposalPercentageOverTimeBarTile="WASTE_DISPOSAL_PERCENTAGE_OVER_TIME_BAR_TILE",ae.WasteRecyclingPercentageOverTimeBarTile="WASTE_RECYCLING_PERCENTAGE_OVER_TIME_BAR_TILE",ae.WasteReusePercentagePeriodComparisonKpiTile="WASTE_REUSE_PERCENTAGE_PERIOD_COMPARISON_KPI_TILE",ae.WasteOtherRecoveryPercentagePeriodComparisonKpiTile="WASTE_OTHER_RECOVERY_PERCENTAGE_PERIOD_COMPARISON_KPI_TILE",ae.WasteReusePercentageByLocationPeriodComparisonTableTile="WASTE_REUSE_PERCENTAGE_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WasteOtherRecoveryPercentageByLocationPeriodComparisonTableTile="WASTE_OTHER_RECOVERY_PERCENTAGE_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WasteReusePercentageByTagPeriodComparisonTableTile="WASTE_REUSE_PERCENTAGE_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WasteOtherRecoveryPercentageByTagPeriodComparisonTableTile="WASTE_OTHER_RECOVERY_PERCENTAGE_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WasteReusePercentageByWasteStreamPeriodComparisonTableTile="WASTE_REUSE_PERCENTAGE_BY_WASTE_STREAM_PERIOD_COMPARISON_TABLE_TILE",ae.WasteOtherRecoveryPercentageByWasteStreamPeriodComparisonTableTile="WASTE_OTHER_RECOVERY_PERCENTAGE_BY_WASTE_STREAM_PERIOD_COMPARISON_TABLE_TILE",ae.GasConsumptionPeriodComparisonKpiTile="GAS_CONSUMPTION_PERIOD_COMPARISON_KPI_TILE",ae.GasCarbonEmissionsPeriodComparisonKpiTile="GAS_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE",ae.GasConsumptionByLocationPeriodComparisonTableTile="GAS_CONSUMPTION_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.GasCarbonEmissionsByLocationPeriodComparisonTableTile="GAS_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.GasConsumptionByTagPeriodComparisonTableTile="GAS_CONSUMPTION_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.GasCarbonEmissionsByTagPeriodComparisonTableTile="GAS_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.GasCostAndConsumptionOverTimeBarTile="GAS_COST_AND_CONSUMPTION_OVER_TIME_BAR_TILE",ae.GasCostPeriodComparisonKpiTile="GAS_COST_PERIOD_COMPARISON_KPI_TILE",ae.GasCostByLocationPeriodComparisonTableTile="GAS_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.GasCostByTagPeriodComparisonTableTile="GAS_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.GasAverageChargePerKilowattPeriodComparisonKpiTile="GAS_AVERAGE_CHARGE_PER_KILOWATT_PERIOD_COMPARISON_KPI_TILE",ae.GasAverageChargePerKilowattByLocationPeriodComparisonTableTile="GAS_AVERAGE_CHARGE_PER_KILOWATT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.GasAverageChargePerKilowattByTagPeriodComparisonTableTile="GAS_AVERAGE_CHARGE_PER_KILOWATT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.FuelConsumptionPeriodComparisonKpiTile="FUEL_CONSUMPTION_PERIOD_COMPARISON_KPI_TILE",ae.FuelCarbonEmissionsPeriodComparisonKpiTile="FUEL_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE",ae.FuelConsumptionByLocationPeriodComparisonTableTile="FUEL_CONSUMPTION_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.FuelCarbonEmissionsByLocationPeriodComparisonTableTile="FUEL_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.FuelConsumptionByTagPeriodComparisonTableTile="FUEL_CONSUMPTION_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.FuelCarbonEmissionsByTagPeriodComparisonTableTile="FUEL_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.FuelCostAndConsumptionOverTimeBarTile="FUEL_COST_AND_CONSUMPTION_OVER_TIME_BAR_TILE",ae.FuelCostPeriodComparisonKpiTile="FUEL_COST_PERIOD_COMPARISON_KPI_TILE",ae.FuelCostByLocationPeriodComparisonTableTile="FUEL_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.FuelCostByTagPeriodComparisonTableTile="FUEL_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.FuelAverageChargePerKilowattPeriodComparisonKpiTile="FUEL_AVERAGE_CHARGE_PER_KILOWATT_PERIOD_COMPARISON_KPI_TILE",ae.FuelAverageChargePerKilowattByLocationPeriodComparisonTableTile="FUEL_AVERAGE_CHARGE_PER_KILOWATT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.FuelAverageChargePerKilowattByTagPeriodComparisonTableTile="FUEL_AVERAGE_CHARGE_PER_KILOWATT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WaterConsumptionPeriodComparisonKpiTile="WATER_CONSUMPTION_PERIOD_COMPARISON_KPI_TILE",ae.WaterCarbonEmissionsPeriodComparisonKpiTile="WATER_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE",ae.WaterConsumptionByLocationPeriodComparisonTableTile="WATER_CONSUMPTION_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WaterCarbonEmissionsByLocationPeriodComparisonTableTile="WATER_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WaterConsumptionByTagPeriodComparisonTableTile="WATER_CONSUMPTION_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WaterCarbonEmissionsByTagPeriodComparisonTableTile="WATER_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WaterCostAndConsumptionOverTimeBarTile="WATER_COST_AND_CONSUMPTION_OVER_TIME_BAR_TILE",ae.WaterCostPeriodComparisonKpiTile="WATER_COST_PERIOD_COMPARISON_KPI_TILE",ae.WaterCostByLocationPeriodComparisonTableTile="WATER_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WaterCostByTagPeriodComparisonTableTile="WATER_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.WaterAverageChargePerKilowattPeriodComparisonKpiTile="WATER_AVERAGE_CHARGE_PER_KILOWATT_PERIOD_COMPARISON_KPI_TILE",ae.WaterAverageChargePerKilowattByLocationPeriodComparisonTableTile="WATER_AVERAGE_CHARGE_PER_KILOWATT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.WaterAverageChargePerKilowattByTagPeriodComparisonTableTile="WATER_AVERAGE_CHARGE_PER_KILOWATT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialWeightPeriodComparisonKpiTile="MATERIAL_WEIGHT_PERIOD_COMPARISON_KPI_TILE",ae.MaterialCarbonEmissionsPeriodComparisonKpiTile="MATERIAL_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE",ae.MaterialWeightByLocationPeriodComparisonTableTile="MATERIAL_WEIGHT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialCarbonEmissionsByLocationPeriodComparisonTableTile="MATERIAL_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialWeightByTagPeriodComparisonTableTile="MATERIAL_WEIGHT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialCarbonEmissionsByTagPeriodComparisonTableTile="MATERIAL_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialWeightByContractorPeriodComparisonTableTile="MATERIAL_WEIGHT_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialCarbonEmissionsByContractorPeriodComparisonTableTile="MATERIAL_CARBON_EMISSIONS_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialWeightByTypeAndOriginPeriodComparisonTableTile="MATERIAL_WEIGHT_BY_TYPE_AND_ORIGIN_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialCarbonEmissionsByTypeAndOriginPeriodComparisonTableTile="MATERIAL_CARBON_EMISSIONS_BY_TYPE_AND_ORIGIN_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialWeightAndConsumptionOverTimeBarTile="MATERIAL_WEIGHT_AND_CONSUMPTION_OVER_TIME_BAR_TILE",ae.MaterialCostPeriodComparisonKpiTile="MATERIAL_COST_PERIOD_COMPARISON_KPI_TILE",ae.MaterialCostPerWeightEmissionsPeriodComparisonKpiTile="MATERIAL_COST_PER_WEIGHT_EMISSIONS_PERIOD_COMPARISON_KPI_TILE",ae.MaterialCostByLocationPeriodComparisonTableTile="MATERIAL_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialCostPerWeightEmissionsByLocationPeriodComparisonTableTile="MATERIAL_COST_PER_WEIGHT_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialCostByTagPeriodComparisonTableTile="MATERIAL_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialCostPerWeightEmissionsByTagPeriodComparisonTableTile="MATERIAL_COST_PER_WEIGHT_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.MaterialCarbonEmissionsKpiTile="MATERIAL_CARBON_EMISSIONS_KPI_TILE",ae.MaterialCostKpiTile="MATERIAL_COST_KPI_TILE",ae.MaterialCostAndCarbonEmissionsByLocationTableTile="MATERIAL_COST_AND_CARBON_EMISSIONS_BY_LOCATION_TABLE_TILE",ae.MaterialCarbonEmissionsOverTimeBarTile="MATERIAL_CARBON_EMISSIONS_OVER_TIME_BAR_TILE",ae.SpendBasedMaterialAmountKpiTile="SPEND_BASED_MATERIAL_AMOUNT_KPI_TILE",ae.SpendBasedMaterialAmountByMaterialTypePieTile="SPEND_BASED_MATERIAL_AMOUNT_BY_MATERIAL_TYPE_PIE_TILE",ae.SpendBasedMaterialAmountByPurchaseTypePieTile="SPEND_BASED_MATERIAL_AMOUNT_BY_PURCHASE_TYPE_PIE_TILE",ae.SpendBasedMaterialAmountBySupplierPieTile="SPEND_BASED_MATERIAL_AMOUNT_BY_SUPPLIER_PIE_TILE",ae.SpendBasedMaterialAmountBySupplierTableTile="SPEND_BASED_MATERIAL_AMOUNT_BY_SUPPLIER_TABLE_TILE",ae.SpendBasedMaterialAmountByMaterialTypeWithLayersTableTile="SPEND_BASED_MATERIAL_AMOUNT_BY_MATERIAL_TYPE_WITH_LAYERS_TABLE_TILE",ae.SpendBasedMaterialAmountOverTimeBarTile="SPEND_BASED_MATERIAL_AMOUNT_OVER_TIME_BAR_TILE",ae.SpendBasedMaterialAmountAndCarbonByLocationTableTile="SPEND_BASED_MATERIAL_AMOUNT_AND_CARBON_BY_LOCATION_TABLE_TILE",ae.SpendBasedMaterialCarbonKpiTile="SPEND_BASED_MATERIAL_CARBON_KPI_TILE",ae.SpendBasedMaterialCarbonByMaterialTypePieTile="SPEND_BASED_MATERIAL_CARBON_BY_MATERIAL_TYPE_PIE_TILE",ae.SpendBasedMaterialCarbonByPurchaseTypePieTile="SPEND_BASED_MATERIAL_CARBON_BY_PURCHASE_TYPE_PIE_TILE",ae.SpendBasedMaterialCarbonBySupplierPieTile="SPEND_BASED_MATERIAL_CARBON_BY_SUPPLIER_PIE_TILE",ae.SpendBasedMaterialCarbonBySupplierTableTile="SPEND_BASED_MATERIAL_CARBON_BY_SUPPLIER_TABLE_TILE",ae.SpendBasedMaterialCarbonByMaterialTypeWithLayersTableTile="SPEND_BASED_MATERIAL_CARBON_BY_MATERIAL_TYPE_WITH_LAYERS_TABLE_TILE",ae.ActivityBasedMaterialWeightKpiTile="ACTIVITY_BASED_MATERIAL_WEIGHT_KPI_TILE",ae.ActivityBasedMaterialWeightByMaterialTypePieTile="ACTIVITY_BASED_MATERIAL_WEIGHT_BY_MATERIAL_TYPE_PIE_TILE",ae.ActivityBasedMaterialWeightByPurchaseTypePieTile="ACTIVITY_BASED_MATERIAL_WEIGHT_BY_PURCHASE_TYPE_PIE_TILE",ae.ActivityBasedMaterialWeightBySubcontractorPieTile="ACTIVITY_BASED_MATERIAL_WEIGHT_BY_SUBCONTRACTOR_PIE_TILE",ae.ActivityBasedMaterialWeightBySubcontractorTableTile="ACTIVITY_BASED_MATERIAL_WEIGHT_BY_SUBCONTRACTOR_TABLE_TILE",ae.ActivityBasedMaterialWeightByMaterialTypeWithLayersTableTile="ACTIVITY_BASED_MATERIAL_WEIGHT_BY_MATERIAL_TYPE_WITH_LAYERS_TABLE_TILE",ae.ActivityBasedMaterialWeightOverTimeBarTile="ACTIVITY_BASED_MATERIAL_WEIGHT_OVER_TIME_BAR_TILE",ae.ActivityBasedMaterialWeightAndCarbonByLocationTableTile="ACTIVITY_BASED_MATERIAL_WEIGHT_AND_CARBON_BY_LOCATION_TABLE_TILE",ae.ActivityBasedMaterialCarbonKpiTile="ACTIVITY_BASED_MATERIAL_CARBON_KPI_TILE",ae.ActivityBasedMaterialCarbonByMaterialTypePieTile="ACTIVITY_BASED_MATERIAL_CARBON_BY_MATERIAL_TYPE_PIE_TILE",ae.ActivityBasedMaterialCarbonByPurchaseTypePieTile="ACTIVITY_BASED_MATERIAL_CARBON_BY_PURCHASE_TYPE_PIE_TILE",ae.ActivityBasedMaterialCarbonBySubcontractorPieTile="ACTIVITY_BASED_MATERIAL_CARBON_BY_SUBCONTRACTOR_PIE_TILE",ae.ActivityBasedMaterialCarbonBySubcontractorTableTile="ACTIVITY_BASED_MATERIAL_CARBON_BY_SUBCONTRACTOR_TABLE_TILE",ae.ActivityBasedMaterialCarbonByMaterialTypeWithLayersTableTile="ACTIVITY_BASED_MATERIAL_CARBON_BY_MATERIAL_TYPE_WITH_LAYERS_TABLE_TILE",ae.GeneralMaterialWeightKpiTile="GENERAL_MATERIAL_WEIGHT_KPI_TILE",ae.GeneralMaterialCarbonKpiTile="GENERAL_MATERIAL_CARBON_KPI_TILE",ae.GeneralMaterialWeightByMaterialTypePieTile="GENERAL_MATERIAL_WEIGHT_BY_MATERIAL_TYPE_PIE_TILE",ae.GeneralMaterialCarbonByMaterialTypePieTile="GENERAL_MATERIAL_CARBON_BY_MATERIAL_TYPE_PIE_TILE",ae.GeneralMaterialWeightOverTimeBarTile="GENERAL_MATERIAL_WEIGHT_OVER_TIME_BAR_TILE",ae.GeneralMaterialWeightAndCarbonByLocationTableTile="GENERAL_MATERIAL_WEIGHT_AND_CARBON_BY_LOCATION_TABLE_TILE",ae.TransportCarbonEmissionsPeriodComparisonKpiTile="TRANSPORT_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE",ae.TransportCostPeriodComparisonKpiTile="TRANSPORT_COST_PERIOD_COMPARISON_KPI_TILE",ae.TransportCarbonEmissionsByLocationPeriodComparisonTableTile="TRANSPORT_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.TransportCostByLocationPeriodComparisonTableTile="TRANSPORT_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE",ae.TransportCarbonEmissionsByTagPeriodComparisonTableTile="TRANSPORT_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.TransportCostByTagPeriodComparisonTableTile="TRANSPORT_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE",ae.TransportCarbonEmissionsByTransportTypePeriodComparisonTableTile="TRANSPORT_CARBON_EMISSIONS_BY_TRANSPORT_TYPE_PERIOD_COMPARISON_TABLE_TILE",ae.TransportCostByTransportTypePeriodComparisonTableTile="TRANSPORT_COST_BY_TRANSPORT_TYPE_PERIOD_COMPARISON_TABLE_TILE",ae.TransportCarbonEmissionsByFuelTypePeriodComparisonTableTile="TRANSPORT_CARBON_EMISSIONS_BY_FUEL_TYPE_PERIOD_COMPARISON_TABLE_TILE",ae.TransportCostByFuelTypePeriodComparisonTableTile="TRANSPORT_COST_BY_FUEL_TYPE_PERIOD_COMPARISON_TABLE_TILE",ae.TransportEmissionsAndCostOverTimeBarTile="TRANSPORT_EMISSIONS_AND_COST_OVER_TIME_BAR_TILE",ae.EstatesReportGridTile="ESTATES_REPORT_GRID_TILE",ae.Scope_1CarbonSavingsKpiTile="SCOPE_1_CARBON_SAVINGS_KPI_TILE",ae.AverageFlaringFromUpstreamOperationsKpiTile="AVERAGE_FLARING_FROM_UPSTREAM_OPERATIONS_KPI_TILE",ae.FlaringIntensityKpiTile="FLARING_INTENSITY_KPI_TILE",ae.CurrentYearCarbonIntensityKpiTile="CURRENT_YEAR_CARBON_INTENSITY_KPI_TILE",ae.PastYearCarbonIntensityKpiTile="PAST_YEAR_CARBON_INTENSITY_KPI_TILE",ae.CarbonIntensityReductionKpiTile="CARBON_INTENSITY_REDUCTION_KPI_TILE",ae.PastYearEmissionsByScopeBarTile="PAST_YEAR_EMISSIONS_BY_SCOPE_BAR_TILE",ae.CurrentYearEmissionsByScopeBarTile="CURRENT_YEAR_EMISSIONS_BY_SCOPE_BAR_TILE",ae.CarbonEmissionsByScopeOverTimeLineTile="CARBON_EMISSIONS_BY_SCOPE_OVER_TIME_LINE_TILE",ae.Scope_1CarbonSavingsOverTimeLineTile="SCOPE_1_CARBON_SAVINGS_OVER_TIME_LINE_TILE",ae.CarbonIntensityOverTimeLineTile="CARBON_INTENSITY_OVER_TIME_LINE_TILE",ae.CarbonIntensityReductionOverTimeLineTile="CARBON_INTENSITY_REDUCTION_OVER_TIME_LINE_TILE",ae.AverageFlaringFromUpstreamOperationsOverTimeLineTile="AVERAGE_FLARING_FROM_UPSTREAM_OPERATIONS_OVER_TIME_LINE_TILE",ae.FlaringIntensityOverTimeLineTile="FLARING_INTENSITY_OVER_TIME_LINE_TILE",ae.WaterWithdrawalPercentagePieTile="WATER_WITHDRAWAL_PERCENTAGE_PIE_TILE",ae.WaterDischargePercentagePieTile="WATER_DISCHARGE_PERCENTAGE_PIE_TILE",ae.WaterWithdrawalPercentageOverTimeLineTile="WATER_WITHDRAWAL_PERCENTAGE_OVER_TIME_LINE_TILE",ae.WaterDischargePercentageOverTimeLineTile="WATER_DISCHARGE_PERCENTAGE_OVER_TIME_LINE_TILE",ae.BoardAttendanceRateKpiTile="BOARD_ATTENDANCE_RATE_KPI_TILE",ae.BoardFemaleRepresentationPieTile="BOARD_FEMALE_REPRESENTATION_PIE_TILE",ae.ExecutiveFemaleRepresentationPieTile="EXECUTIVE_FEMALE_REPRESENTATION_PIE_TILE",ae.BoardAttendanceRateOverTimeLineTile="BOARD_ATTENDANCE_RATE_OVER_TIME_LINE_TILE",ae.BoardFemaleRepresentationOverTimeLineTile="BOARD_FEMALE_REPRESENTATION_OVER_TIME_LINE_TILE",ae.ExecutiveFemaleRepresentationOverTimeLineTile="EXECUTIVE_FEMALE_REPRESENTATION_OVER_TIME_LINE_TILE",ae.WaterTotalConsumptionKpiTile="WATER_TOTAL_CONSUMPTION_KPI_TILE",ae.WaterTotalTreatmentKpiTile="WATER_TOTAL_TREATMENT_KPI_TILE",ae.WaterTotalCostKpiTile="WATER_TOTAL_COST_KPI_TILE",ae.WaterTotalEmissionsKpiTile="WATER_TOTAL_EMISSIONS_KPI_TILE",ae.WaterCostConsumptionTreatmentOverTimeBarTile="WATER_COST_CONSUMPTION_TREATMENT_OVER_TIME_BAR_TILE",ae.WaterCarbonEmissionsByScopeOverTimeBarTile="WATER_CARBON_EMISSIONS_BY_SCOPE_OVER_TIME_BAR_TILE",ae.WaterCostConsumptionEmissionsPerLocationTableTile="WATER_COST_CONSUMPTION_EMISSIONS_PER_LOCATION_TABLE_TILE",ae.WaterConsumptionYearOnYearComparisonKpiTile="WATER_CONSUMPTION_YEAR_ON_YEAR_COMPARISON_KPI_TILE",ae.WaterEmissionsYearOnYearComparisonKpiTile="WATER_EMISSIONS_YEAR_ON_YEAR_COMPARISON_KPI_TILE",ae.WaterCostYearOnYearComparisonKpiTile="WATER_COST_YEAR_ON_YEAR_COMPARISON_KPI_TILE",ae.WaterAnnualConsumptionOverTimeComparisonBarTile="WATER_ANNUAL_CONSUMPTION_OVER_TIME_COMPARISON_BAR_TILE",ae.WaterCostConsumptionEmissionsPerLocationComparisonTableTile="WATER_COST_CONSUMPTION_EMISSIONS_PER_LOCATION_COMPARISON_TABLE_TILE",ae.TransportTotalDistanceTraveledKpiTile="TRANSPORT_TOTAL_DISTANCE_TRAVELED_KPI_TILE",ae.TransportTotalCostKpiTile="TRANSPORT_TOTAL_COST_KPI_TILE",ae.TransportTotalEmissionsKpiTile="TRANSPORT_TOTAL_EMISSIONS_KPI_TILE",ae.TransportEmissionsPerLocationPieTile="TRANSPORT_EMISSIONS_PER_LOCATION_PIE_TILE",ae.TransportEmissionsPerPurposePieTile="TRANSPORT_EMISSIONS_PER_PURPOSE_PIE_TILE",ae.TransportEmissionsPerTypePieTile="TRANSPORT_EMISSIONS_PER_TYPE_PIE_TILE",ae.TransportEmissionsPerSubtypePieTile="TRANSPORT_EMISSIONS_PER_SUBTYPE_PIE_TILE",ae.TransportTravelActivityPerLocationTableTile="TRANSPORT_TRAVEL_ACTIVITY_PER_LOCATION_TABLE_TILE",ae.TransportTotalDistanceTraveledYearOnYearKpiTile="TRANSPORT_TOTAL_DISTANCE_TRAVELED_YEAR_ON_YEAR_KPI_TILE",ae.TransportTotalEmissionsYearOnYearKpiTile="TRANSPORT_TOTAL_EMISSIONS_YEAR_ON_YEAR_KPI_TILE",ae.TransportCarbonOverTimeYearOnYearBarTile="TRANSPORT_CARBON_OVER_TIME_YEAR_ON_YEAR_BAR_TILE",ae.TransportCarbonAndDistanceTraveledOverTimeBarTile="TRANSPORT_CARBON_AND_DISTANCE_TRAVELED_OVER_TIME_BAR_TILE",ae.TransportAnnualFiguresPerLocationYearOnYearTableTile="TRANSPORT_ANNUAL_FIGURES_PER_LOCATION_YEAR_ON_YEAR_TABLE_TILE",(te=n.GV||(n.GV={})).Initiated="INITIATED",te.Analyzing="ANALYZING",te.Merging="MERGING",te.UserReview="USER_REVIEW",te.CancelledByUser="CANCELLED_BY_USER",te.ExecutionScheduled="EXECUTION_SCHEDULED",te.Executed="EXECUTED",te.Failed="FAILED",te.Aborted="ABORTED",(ne=n.kt||(n.kt={})).Frequency="FREQUENCY",ne.Recurrence="RECURRENCE",(ee=n.pe||(n.pe={})).Text="text",ee.Number="number",ee.Date="date",ee.Set="set",ee.Boolean="boolean",(X=n.QT||(n.QT={})).Skipped="SKIPPED",X.ScheduledForRefresh="SCHEDULED_FOR_REFRESH",X.SchedulingFailed="SCHEDULING_FAILED",X.Refreshing="REFRESHING",X.Refreshed="REFRESHED",X.RefreshFailed="REFRESH_FAILED",(Z=n.oY||(n.oY={})).BatchImported="BATCH_IMPORTED",Z.BatchRolledBack="BATCH_ROLLED_BACK",Z.PeriodicRefresh="PERIODIC_REFRESH",(Q=n.oQ||(n.oQ={})).Percentage="percentage",Q.Fixed="fixed",(K=n.F4||(n.F4={})).Consignmentnote="CONSIGNMENTNOTE",K.Consignmentnoteea="CONSIGNMENTNOTEEA",K.Wastetransfernote="WASTETRANSFERNOTE",K.Salesorder="SALESORDER",K.Evidence="EVIDENCE",K.Wastepermit="WASTEPERMIT",K.Wastecarrierlicence="WASTECARRIERLICENCE",K.Wastecontractorreport="WASTECONTRACTORREPORT",K.Travelreceipt="TRAVELRECEIPT",K.Auditreport="AUDITREPORT",K.Aspectsandimpacts="ASPECTSANDIMPACTS",K.Certificate="CERTIFICATE",K.Communications="COMMUNICATIONS",K.Legislation="LEGISLATION",K.Managementsystems="MANAGEMENTSYSTEMS",K.Policies="POLICIES",K.Reportingframeworks="REPORTINGFRAMEWORKS",K.Standards="STANDARDS",K.Training="TRAINING",K.Lcareports="LCAREPORTS",K.Bill="BILL",K.Licencesandpermits="LICENCESANDPERMITS",K.Invoice="INVOICE",K.Other="OTHER",K.Meterreading="METERREADING",K.Supplieragreement="SUPPLIERAGREEMENT",K.Formupload="FORMUPLOAD",K.Custom="CUSTOM",(H=n.zM||(n.zM={})).Waste="WASTE",H.Electricity="ELECTRICITY",H.Gas="GAS",H.Water="WATER",H.Transport="TRANSPORT",H.Governance="GOVERNANCE",H.Invest="INVEST",H.Custom="CUSTOM",(Y=n.gb||(n.gb={})).Total="TOTAL",Y.Month="MONTH",Y.HalfHour="HALF_HOUR",(J=n.Fr||(n.Fr={})).Assessment="ASSESSMENT",J.Reaction="REACTION",(q=n.l2||(n.l2={})).Initiated="INITIATED",q.InProgress="IN_PROGRESS",q.Ready="READY",q.Completed="COMPLETED",q.Failed="FAILED",q.DeletedByUser="DELETED_BY_USER",(W=n.fj||(n.fj={})).Greater="GREATER",W.Greaterequal="GREATEREQUAL",W.Less="LESS",W.Lessequal="LESSEQUAL",W.Equal="EQUAL",W.Notequal="NOTEQUAL",W.None="NONE",($=n.II||(n.II={})).Equals="equals",$.NotEqual="notEqual",$.LessThan="lessThan",$.LessThanOrEqual="lessThanOrEqual",$.GreaterThan="greaterThan",$.GreaterThanOrEqual="greaterThanOrEqual",$.Contains="contains",$.NotContains="notContains",$.StartsWith="startsWith",$.EndsWith="endsWith",$.InRange="inRange",$.Blank="blank",$.NotBlank="notBlank",(G=n.jN||(n.jN={})).Daily="Daily",G.Weekly="Weekly",G.Monthly="Monthly",G.Quarterly="Quarterly",G.Annually="Annually",(z=n.Ak||(n.Ak={})).Legislation="LEGISLATION",z.Policy="POLICY",z.ManagementSystem="MANAGEMENT_SYSTEM",z.ReportingFramework="REPORTING_FRAMEWORK",z.VoluntaryAgreement="VOLUNTARY_AGREEMENT",z.Aspect="ASPECT",(V=n.Ub||(n.Ub={})).File="File",V.Ftp="Ftp",(M=n.mF||(n.mF={})).In="IN",M.Out="OUT",M.Both="BOTH",(U=n.h6||(n.h6={})).And="AND",U.Or="OR",(B=n.US||(n.US={})).Pdf="PDF",B.Video="VIDEO",B.Scorm="SCORM",B.Url="URL",(F=n.yG||(n.yG={})).Eng="ENG",F.Wal="WAL",F.Sco="SCO",F.Nir="NIR",F.Gbr="GBR",F.Eur="EUR",(_=n.mh||(n.mh={})).High="HIGH",_.Medium="MEDIUM",_.NoteWorthy="NOTE_WORTHY",(E=n.mv||(n.mv={})).Legal="LEGAL",E.Voluntary="VOLUNTARY",(I=n.uX||(n.uX={})).New="NEW",I.Activated="ACTIVATED",I.Expired="EXPIRED",I.Blocked="BLOCKED",(L=n.Q||(n.Q={})).Region="REGION",L.Tenure="TENURE",L.Buildingtype="BUILDINGTYPE",(P=n.K||(n.K={})).Requested="REQUESTED",P.FailedToRequest="FAILED_TO_REQUEST",P.Granted="GRANTED",P.Rejected="REJECTED",(R=n.Xj||(n.Xj={})).Electricity="ELECTRICITY",R.Gas="GAS",R.Water="WATER",R.Heatsteam="HEATSTEAM",(A=n.XY||(n.XY={})).OwnerOperated="OWNER_OPERATED",A.ThirdParty="THIRD_PARTY",(D=n._P||(n._P={})).Oil="OIL",D.OilGas="OIL_GAS",(w=n.v7||(n.v7={})).Month="MONTH",w.Year="YEAR",w.FinancialYear="FINANCIAL_YEAR",w.Quarter="QUARTER",w.Period="PERIOD",(N=n.KB||(n.KB={})).Low="LOW",N.Medium="MEDIUM",N.High="HIGH",(S=n.sE||(n.sE={})).DirectPurchasedDirectly="DIRECT_PURCHASED_DIRECTLY",S.DirectBroker="DIRECT_BROKER",S.DirectIntercompanyTrade="DIRECT_INTERCOMPANY_TRADE",S.IndirectPurchasedBySubcontractorOrContractor="INDIRECT_PURCHASED_BY_SUBCONTRACTOR_OR_CONTRACTOR",S.IndirectBackchargedByClientOrLandlord="INDIRECT_BACKCHARGED_BY_CLIENT_OR_LANDLORD",S.IndirectFreeIssue="INDIRECT_FREE_ISSUE",(C=n.PG||(n.PG={})).Notapplicable="NOTAPPLICABLE",C.Indirectlyapplicable="INDIRECTLYAPPLICABLE",C.Noncompliant="NONCOMPLIANT",C.Compliancerisk="COMPLIANCERISK",C.Compliant="COMPLIANT",(j=n.WP||(n.WP={})).Today="TODAY",j.Yesterday="YESTERDAY",j.StartOfCurrentYear="START_OF_CURRENT_YEAR",j.EndOfCurrentYear="END_OF_CURRENT_YEAR",j.StartOfLastYear="START_OF_LAST_YEAR",j.EndOfLastYear="END_OF_LAST_YEAR",j.StartOfCurrentMonth="START_OF_CURRENT_MONTH",j.EndOfCurrentMonth="END_OF_CURRENT_MONTH",j.StartOfLastMonth="START_OF_LAST_MONTH",j.EndOfLastMonth="END_OF_LAST_MONTH",j.StartOfCurrentQuarter="START_OF_CURRENT_QUARTER",j.EndOfCurrentQuarter="END_OF_CURRENT_QUARTER",j.StartOfLastQuarter="START_OF_LAST_QUARTER",j.EndOfLastQuarter="END_OF_LAST_QUARTER",(k=n.zB||(n.zB={})).Home="HOME",k.Engage="ENGAGE",k.Governance="GOVERNANCE",k.Data="DATA",k.Surveys="SURVEYS",k.Reporting="REPORTING",k.Intelligence="INTELLIGENCE",k.Configuration="CONFIGURATION",k.Documents="DOCUMENTS",k.Tasks="TASKS",k.Support="SUPPORT",(O=n.HG||(n.HG={})).Account="ACCOUNT",O.Tag="TAG",O.Location="LOCATION",(T=n.kL||(n.kL={})).S3="S3",T.Url="URL",(x=n.d||(n.d={})).Supplier="Supplier",x.Contractor="Contractor",x.Subcontractor="Subcontractor",x.Carrier="Carrier",x.Broker="Broker",x.Haulier="Haulier",(v=n.xV||(n.xV={})).Text="text",v.Dropdown="dropdown",v.Radiogroup="radiogroup",v.Tagbox="tagbox",v.Checkbox="checkbox",v.Imagepicker="imagepicker",v.Boolean="boolean",v.Signaturepad="signaturepad",v.Multipletext="multipletext",v.Rating="rating",v.Ranking="ranking",v.Comment="comment",v.File="file",v.Expression="expression",(h=n.p2||(n.p2={})).Active="active",h.Complete="complete",(b=n.iD||(n.iD={})).RequiresChanges="requires_changes",b.Approved="approved",(g=n.ZU||(n.ZU={})).InProgress="in_progress",g.ReadyForReview="ready_for_review",g.RequiresChanges="requires_changes",g.Approved="approved",(y=n.Tc||(n.Tc={})).InProgress="in_progress",y.ReadyForReview="ready_for_review",(f=n.Ix||(n.Ix={})).Engage="ENGAGE",f.Governance="GOVERNANCE",f.Data="DATA",f.Reporting="REPORTING",f.Documents="DOCUMENTS",(m=n.li||(n.li={})).Audit="AUDIT",m.Report="REPORT",m.Observation="OBSERVATION",(p=n.W6||(n.W6={})).High="HIGH",p.Medium="MEDIUM",p.Low="LOW",(u=n.AR||(n.AR={})).Legislation="LEGISLATION",u.Policies="POLICIES",u.Managementsystems="MANAGEMENTSYSTEMS",u.Targets="TARGETS",u.Aspects="ASPECTS",u.Water="WATER",u.Waste="WASTE",u.Electricity="ELECTRICITY",u.Gas="GAS",u.Transport="TRANSPORT",(d=n.F9||(n.F9={})).Comply="COMPLY",d.Electricity="ELECTRICITY",d.Gas="GAS",d.Intel="INTEL",d.Learn="LEARN",d.Materials="MATERIALS",d.Mixed="MIXED",d.Travel="TRAVEL",d.Waste="WASTE",d.Water="WATER",(c=n.iG||(n.iG={})).Year="YEAR",c.Month="MONTH",c.Date="DATE",(s=n.D_||(n.D_={})).Electricity="ELECTRICITY",s.Fuel="FUEL",s.Gas="GAS",s.Materials="MATERIALS",s.Oil="OIL",s.S3C1Activitybasedmaterial="S3C1ACTIVITYBASEDMATERIAL",s.S3C1Spendbasedmaterial="S3C1SPENDBASEDMATERIAL",s.Oilgassales="OILGASSALES",s.Transport="TRANSPORT",s.Waste="WASTE",s.Water="WATER",s.Hotelstays="HOTELSTAYS",s.Heatsteam="HEATSTEAM",s.Refrigerant="REFRIGERANT",s.Investment="INVESTMENT",s.Liquidfuel="LIQUIDFUEL",s.Coreestate="COREESTATE",s.Emissionsdatabase="EMISSIONSDATABASE",(l=n.ou||(n.ou={})).Combustion="COMBUSTION",l.Wtt="WTT",l.Conversion="CONVERSION",(o=n.wZ||(n.wZ={})).Create="CREATE",o.Delete="DELETE",(i=n.BL||(n.BL={})).Allow="ALLOW",i.Deny="DENY",(r=n.M6||(n.M6={})).Location="LOCATION",r.Tag="TAG",r.OrganisationalUnit="ORGANISATIONAL_UNIT",(a=n.gG||(n.gG={})).Sysadmin="SYSADMIN",a.Businessadmin="BUSINESSADMIN",a.Business="BUSINESS",a.Emschampion="EMSCHAMPION",a.Emschampionanalysecontributor="EMSCHAMPIONANALYSECONTRIBUTOR",a.Contributor="CONTRIBUTOR",a.Emscontributor="EMSCONTRIBUTOR",a.Analysechampion="ANALYSECHAMPION",a.Individual="INDIVIDUAL",a.Businessreadonly="BUSINESSREADONLY",a.Mentor="MENTOR",a.Learner="LEARNER",a.Executive="EXECUTIVE",a.Wasteadmin="WASTEADMIN",a.Consultant="CONSULTANT",a.Employee="EMPLOYEE",a.Surveysonly="SURVEYSONLY",(t=n.Ui||(n.Ui={})).OnsiteWork="ONSITE_WORK",t.Headcount="HEADCOUNT",t.Floorspace="FLOORSPACE",t.WaterLeak="WATER_LEAK",t.OtherOperational="OTHER_OPERATIONAL",t.BelowThreshold="BELOW_THRESHOLD",t.SupplierDataIssue="SUPPLIER_DATA_ISSUE",t.NoActionRequired="NO_ACTION_REQUIRED",t.PendingSupplierResponse="PENDING_SUPPLIER_RESPONSE",t.Other="OTHER"},37965(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DocumentCategory=n.YearToCompareType=n.EUR_CURRENCY_CODE=n.estimatesScenarios=n.operationalControlTypes=n.organisationalUnits=n.projectPhases=n.materialOrigins=n.certificationOrigins=void 0,n.certificationOrigins=["BES 6001","Forest Stewardship Council","Grown in Britain","Programme for the Endorsement of Forest Certifications","Waste and Resources Action Programme (WRAP)","None/Unknown"],n.materialOrigins=["Open-loop source","Primary material production","Closed-loop source","Re-used"];var t,a,r=["Construction","Demolition","Excavation","Premises"];n.projectPhases={default:["Unknown"],"9b5da64b-2e0f-4dc7-adf6-e879a88160b9":r,"66fdc17b-308d-4e71-85ee-0d4a77e3276e":r,"094f8a56-5761-4561-a2dd-1b66ee5bb5da":r,"322fec2b-d241-48fc-aef5-fea7de3f6e53":["Construction","Demolition","Excavation","Commercial","Maintenance","Industrial","Production"],"170b5402-e820-4579-a9e6-981c4573ab1f":["Construction","Demolition","Excavation","Premises","Unknown"]},n.organisationalUnits=["Company","Division","Department","Project","Team","Region","Building","Floor","Contract / Framework","Contract","Business Unit","Fund","Programme","Asset"],n.operationalControlTypes=["Combusted in owned / operated equipment","Combusted in 3rd party equipment but operator purchases the fuel directly","Combusted in 3rd party owned / operated equipment"],n.estimatesScenarios=["1","2","3","4","5"],n.EUR_CURRENCY_CODE="EUR",(a=n.YearToCompareType||(n.YearToCompareType={})).CALENDAR="Calendar",a.FINANCIAL="Financial",(t=n.DocumentCategory||(n.DocumentCategory={})).WasteTransferNote="Waste Transfer Note",t.WasteCarrierLicence="Waste Carrier Licence",t.LCAReports="LCA Reports"},48791(e,n){"use strict";var t,a=this&&this.__extends||(t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},t(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)});Object.defineProperty(n,"__esModule",{value:!0}),n.CustomField=void 0,function(e){var n=function(e){function n(n,t){return e.call(this,'"'.concat(n,'" cannot be casted to ').concat(t,"."))||this}return a(n,e),n}(Error);e.CastAttributeError=n;var t=function(e,n){return e.toLowerCase()===n.toLowerCase()},r=function(){function e(e){this.fields=e}return e.prototype.has=function(e){for(var n=0,a=this.fields;n<a.length;n++){var r=a[n].split(":")[0];if(t(e,r))return!0}return!1},e.prototype.getAttribute=function(e,a,r){for(var i=0,o=this.fields;i<o.length;i++){var l=o[i].split(":"),s=l[0],c=l[1];if(t(e,s))for(var d=0,u=(c||"").split(",");d<u.length;d++){var p=u[d].split("="),m=p[0],f=p[1];if(t(a,m)){if("string"===r)return f||"";if("bool"===r){if("true"!==(y=f||"true")&&"false"!==y)throw new n(f,r);return"true"===y}if("number"===r){var y=Number(f);if(isNaN(y))throw new n(f,r);return y}}}}return null},e.prototype.isRequired=function(e){return!!this.getAttribute(e,"required","bool")},e}();e.Accessor=r}(n.CustomField||(n.CustomField={}))},28184(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(48791),n),r(t(37965),n),r(t(71046),n)},215(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GAS_COMPONENTS_CARBON_COEFFICIENTS=n.GAS_COMPONENTS_WEIGHTS=n.GAS_COMPONENTS=void 0,n.GAS_COMPONENTS=["O2","N2","CO2","H2","H2S","CH4","C2H6","C3H8","C4H10","C5H12","C6H14","C7H16","C8H18","C9+"],n.GAS_COMPONENTS_WEIGHTS={O2:32,N2:28.01,CO2:44.01,H2:2.02,H2S:34.08,CH4:16.04,C2H6:30.07,C3H8:44.1,C4H10:58.12,C5H12:72.15,C6H14:86.18,C7H16:100.21,C8H18:114.23,"C9+":156.31},n.GAS_COMPONENTS_CARBON_COEFFICIENTS={O2:0,N2:0,CO2:1,H2:0,H2S:0,CH4:1,C2H6:2,C3H8:3,C4H10:4,C5H12:5,C6H14:6,C7H16:7,C8H18:8,"C9+":11}},61282(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},72353(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ImportPayload=void 0,(n.ImportPayload||(n.ImportPayload={})).DATE_FORMAT="DD/MM/YYYY"},71046(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(215),n),r(t(72353),n),r(t(61282),n)},49708(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CssBaseline=void 0;var a=t(87283);Object.defineProperty(n,"CssBaseline",{enumerable:!0,get:function(){return a.CssBaseline}})},24804(e,n,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.useTheme=n.styled=n.ThemeProvider=void 0;const r=t(65723),i=t(54790);Object.defineProperty(n,"styled",{enumerable:!0,get:function(){return i.styled}}),Object.defineProperty(n,"useTheme",{enumerable:!0,get:function(){return i.useTheme}});const o=a(t(2877));n.ThemeProvider=e=>{let{children:n}=e;return(0,r.jsx)(i.ThemeProvider,{theme:o.default,children:n})}},7312(e,n,t){"use strict";const a=["gridOptions","gridKey","disableColumnStateRestoration"];var r,i;function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach(function(n){s(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function s(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.AgGrid=void 0;const u=t(65723),p=t(54790);t(44648),t(81949);const m=t(19270),f=d(t(30395)),y=t(22155),g=t(8485),b=t(27951),h=t(90817),v=t(60976),x=d(t(97690)),T=t(41537),O=d(t(80026)),k=["gridOptions"],j=(0,p.styled)("div",{shouldForwardProp:e=>!k.includes(e),name:"AgGrid",slot:"Root"})(r||(r=c([""]))),C=(0,p.styled)("div")(i||(i=c(["\n  width: 100%;\n  height: 100%;\n  border-radius: 8px;\n  box-shadow: ",";\n  --ag-material-primary-color: ",";\n  --ag-material-accent-color: ",";\n  --ag-checkbox-checked-color: ",";\n  --ag-header-background-color: ",";\n  --ag-header-cell-hover-background-color: ",";\n  --ag-row-hover-color: ",";\n  --ag-border-radius: 8px;\n  --ag-header-foreground-color: ",";\n  --ag-data-color: ",";\n  --ag-foreground-color: ",";\n  --ag-font-family: ",";\n  --ag-input-focus-box-shadow: none;\n  --ag-header-height: 36px;\n  --ag-row-height: 40px;\n  --ag-popup-shadow: ",";\n  --ag-card-shadow: ",";\n  --ag-input-focus-box-shadow: ",";\n  --ag-invalid-color: ",";\n\n  & .ag-input-field-input {\n    --ag-border-color: ",";\n  }\n\n  & .ag-root-wrapper-body,\n  & .ag-layout-normal {\n    min-height: 250px;\n    height: 100%;\n  }\n  & .ag-header-cell-text {\n    pointer-events: none;\n  }\n  & .ag-header-cell {\n    ","\n    line-height: 36px;\n    justify-content: center;\n  }\n  & .ag-row-selected,\n  & .ag-row-hover.ag-row-selected,\n  & .ag-row-focus {\n    background-color: ",";\n  }\n  & .ag-row-selected::before,\n  & .ag-row-hover.ag-row-selected::before {\n    display: none;\n  }\n  && .ag-radio-button-input-wrapper.ag-checked::after {\n    color: ",";\n  }\n  & .ag-radio-button-input-wrapper:focus-within,\n  .ag-radio-button-input-wrapper:active {\n    box-shadow: none;\n  }\n  & .ag-picker-field-wrapper:focus-within,\n  & .ag-picker-field-wrapper:active {\n    border: none;\n    outline: none;\n  }\n  & .ag-picker-field-wrapper.ag-picker-has-focus {\n    box-shadow: none;\n  }\n  & .ag-label,\n  & .ag-filter {\n    font-family: ",";\n  }\n  & .ag-label,\n  & .ag-paging-row-summary-panel,\n  & .ag-picker-field-wrapper,\n  & .ag-list-item,\n  & .ag-paging-description,\n  & .ag-text-field-input::placeholder,\n  & .ag-menu-option-text,\n  & .ag-column-select-column-label {\n    ","\n  }\n  & .ag-cell {\n    ","\n    line-height: 40px;\n  }\n  & .ag-checkbox-input-wrapper.ag-checked::after {\n    color: ",";\n  }\n\n  & .ag-tabs-header {\n    background-color: ",";\n  }\n\n  & .ag-popup-child {\n    box-shadow: ",";\n  }\n\n  & .ag-menu-option:hover {\n    background-color: ",";\n  }\n  & .ag-checkbox-input-wrapper.ag-indeterminate::after {\n    color: ",";\n  }\n  & .ag-paging-panel {\n    justify-content: flex-start;\n  }\n\n  & .ag-sort-indicator-icon {\n    display: flex;\n    align-items: center;\n  }\n\n  & .ag-set-filter {\n    width: 330px !important;\n  }\n\n  & .ag-set-filter-list {\n    white-space: nowrap !important;\n    overflow-x: auto !important;\n\n    & .ag-virtual-list-container.ag-filter-virtual-list-container {\n      overflow-x: visible !important;\n      overflow-y: visible !important;\n    }\n  }\n\n  & .ag-set-filter-item,\n  & .ag-set-filter-item-value {\n    display: inline-block;\n    min-width: max-content;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.elevation[0]},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.ref.palette.primary[95]},e=>{let{theme:n}=e;return n.ref.palette.primary[95]},e=>{let{theme:n}=e;return n.ref.palette.primary[90]},e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{theme:n}=e;return n.typography.fontFamily},e=>{let{theme:n}=e;return n.sys.elevation[0]},e=>{let{theme:n}=e;return n.sys.elevation[0]},e=>{let{theme:n}=e;return n.sys.elevation[0]},e=>{let{theme:n}=e;return n.sys.color.error},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return(0,h.textCss)(n,{typescale:"label",size:"large"})},e=>{let{theme:n}=e;return n.ref.palette.primary[90]},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.typography.fontFamily},e=>{let{theme:n}=e;return(0,h.textCss)(n,{typescale:"label",size:"large"})},e=>{let{theme:n}=e;return(0,h.textCss)(n,{typescale:"body",size:"medium"})},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.ref.palette.primary[95]},e=>{let{theme:n}=e;return n.sys.elevation[3]},e=>{let{theme:n}=e;return n.ref.palette.primary[90]},e=>{let{theme:n}=e;return n.sys.color.secondary});n.AgGrid=(0,y.forwardRef)((e,n)=>{const{gridKey:t}=e,{storedValue:a,setValue:r}=(0,b.useLocalStorage)(g.AG_GRID_PARAMS_V2);return(0,u.jsx)(x.default,{onClear:()=>{a&&(delete a[t],r(a))},children:(0,u.jsx)(S,l(l({},e),{},{ref:n}))})});const S=(0,y.forwardRef)((e,n)=>{var t;let{gridOptions:r,gridKey:i,disableColumnStateRestoration:o}=e,s=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const c=(0,p.useColorScheme)(),d=(0,T.useAgGrid)({gridKey:i,rowModel:null!==(t=null==r?void 0:r.rowModelType)&&void 0!==t?t:"clientSide",disableColumnStateRestoration:o});(0,y.useImperativeHandle)(n,()=>({filtersApplied:d.filtersApplied,gridApi:d.api||null,resetGridState:d.resetGridState}),[d.filtersApplied,d.api,d.resetGridState]);const g=(0,f.default)({"ag-theme-material":"light"===c.mode,"ag-theme-material-dark":"dark"===c.mode}),b=(0,O.default)(null==r?void 0:r.serverSideDatasource),h=(0,y.useMemo)(()=>l(l({},r),{},{onColumnVisible:e=>{null!=r&&r.onColumnVisible&&r.onColumnVisible(e),d.onSaveGridColumnState()},onFirstDataRendered:e=>{null!=r&&r.onFirstDataRendered&&r.onFirstDataRendered(e),d.onFirstDataRendered(e)},onColumnPinned:d.onSaveGridColumnState,onColumnMoved:d.onSaveGridColumnState,onColumnRowGroupChanged:d.onSaveGridColumnState,onColumnValueChanged:d.onSaveGridColumnState,onColumnPivotChanged:d.onSaveGridColumnState,onGridPreDestroyed:d.onDestroy,onFilterChanged:e=>{var n;null==r||null===(n=r.onFilterChanged)||void 0===n||n.call(r,e),d.onFilterChanged(e)},onPaginationChanged:e=>{null!=r&&r.onPaginationChanged&&r.onPaginationChanged(e),d.onPaginationChanged(e)},initialState:d.initialState,onGridReady:e=>{null!=r&&r.onGridReady&&r.onGridReady(e),d.onGridReady(e)},serverSideDatasource:b}),[r,d,b]);return(0,u.jsx)(j,l(l({},s),{},{children:(0,u.jsx)(C,{className:g,children:(0,u.jsx)(m.AgGridReact,l({maintainColumnOrder:!0,loadingCellRenderer:v.CustomLoadingCellRenderer},h))})}))})},60976(e,n,t){"use strict";var a,r;function i(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.CustomLoadingCellRenderer=void 0;const o=t(65723),l=t(54790),s=t(46832),c=(0,l.styled)("div")(a||(a=i(["\n  display: flex;\n  align-items: center;\n  height: 40px;\n  padding: 24px;\n"]))),d=(0,l.styled)("div")(r||(r=i(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-right: 6px;\n"])));n.CustomLoadingCellRenderer=e=>{if(e.node.failedLoad){var n;let t=null===(n=e.api.getGridOption("context"))||void 0===n?void 0:n.loadErrorMessage;return"string"==typeof t&&(t.toLowerCase().includes("timeout")||t.toLowerCase().includes("timed out"))?t="SQL query took too long, try hiding some of the columns from the grid to make the query faster":t&&"string"==typeof t||(t="An unexpected error happened"),(0,o.jsxs)(c,{children:[(0,o.jsx)(d,{children:(0,o.jsx)(s.Icons.ReportProblemOutlined,{color:"error"})}),(0,o.jsx)(s.Text,{typescale:"body",size:"medium",children:t})]})}return(0,o.jsxs)(c,{children:[(0,o.jsx)(d,{children:(0,o.jsx)(s.Loader,{size:25})}),(0,o.jsx)(s.Text,{typescale:"body",size:"medium",children:"Loading..."})]})}},97690(e,n,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});const r=t(65723),i=a(t(22155)),o=t(58381),l=t(49680);class s extends i.default.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){console.error(e)}render(){const{error:e}=this.state,{onClear:n}=this.props,t=()=>{this.setState({error:void 0})};return e?(0,r.jsx)(o.LoadFailed,{error:(0,l.isError)(e)?e:void 0,title:"An unexpected error happened",retry:t,clearAndRetry:{title:"Clear cache and retry",solution:()=>{n(),t()}}}):this.props.children}}n.default=s},76126(e,n,t){"use strict";var a,r=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),o=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),o=0;o<t.length;o++)"default"!==t[o]&&r(n,e,t[o]);return i(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.setAgGridLicenseKey=n.valueFormatters=n.AgGrid=void 0;var l=t(7312);Object.defineProperty(n,"AgGrid",{enumerable:!0,get:function(){return l.AgGrid}}),n.valueFormatters=o(t(51480));var s=t(6960);Object.defineProperty(n,"setAgGridLicenseKey",{enumerable:!0,get:function(){return s.setAgGridLicenseKey}})},6960(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setAgGridLicenseKey=void 0;const a=t(67748);n.setAgGridLicenseKey=e=>{a.LicenseManager.setLicenseKey(e)}},41537(e,n,t){"use strict";function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function r(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach(function(n){i(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function i(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.useAgGrid=void 0;const l=o(t(82702)),s=t(22155),c=t(8485),d=t(27951);n.useAgGrid=e=>{var n,t,a;let{gridKey:i,rowModel:o,disableColumnStateRestoration:u}=e;const[p,m]=(0,s.useState)(),{storedValue:f,setValue:y}=(0,d.useLocalStorage)(c.AG_GRID_PARAMS_V2),g=null==p?void 0:p.gridApi,{storedPagination:b,storedColumnState:h,storedFilterModel:v}=(0,s.useMemo)(()=>{const e=f?f[i]:null;return{storedPagination:null==e?void 0:e.paginationState,storedColumnState:null==e?void 0:e.columnState,storedFilterModel:null==e?void 0:e.filterModel}},[f,i]),x=(0,s.useMemo)(()=>{var e,n,t;const a=null==h||null===(e=h.filter(e=>e.hide))||void 0===e?void 0:e.map(e=>e.colId),r=null==h?void 0:h.reduce((e,n)=>{if(null==a||!a.includes(n.colId))switch(n.pinned){case"left":e.leftColIds.push(n.colId);break;case"right":e.rightColIds.push(n.colId)}return e},{leftColIds:[],rightColIds:[]});return h?{columnPinning:{leftColIds:null!==(n=null==r?void 0:r.leftColIds)&&void 0!==n?n:[],rightColIds:null!==(t=null==r?void 0:r.rightColIds)&&void 0!==t?t:[]},columnVisibility:{hiddenColIds:null!=a?a:[]}}:{}},[h]),T=(0,s.useMemo)(()=>v?{filter:{filterModel:v}}:{},[v]),O=v&&!!Object.keys(v).length,k=h&&(!(null==x||null===(n=x.columnVisibility)||void 0===n||!n.hiddenColIds.length)||!(null===(t=x.columnPinning)||void 0===t||!t.leftColIds.length)||!(null===(a=x.columnPinning)||void 0===a||!a.rightColIds.length)),j=Boolean(O||k),C=(0,s.useCallback)(()=>{if(f){let e=f;delete e[i],y(e)}switch(null==g||g.setFilterModel(null),null==g||g.resetColumnState(),null==g||g.paginationGoToPage(0),o){case"serverSide":null==g||g.refreshServerSide({purge:!0});break;case"clientSide":null==g||g.refreshClientSideRowModel();break;case"infinite":null==g||g.refreshInfiniteCache()}},[i,g,f,y]),S=(0,s.useCallback)(e=>{let n=null;f&&(n=f);const t=n&&i?r(r({},n),{},{[i]:r(r({},n[i]),e)}):{[i]:e};y(t)},[f,y]),N=(0,s.useMemo)(()=>(0,l.default)(e=>{S(e)},100),[S]),w=(0,s.useCallback)(e=>{if(!g)return;const n=e.api.getFilterModel();S({filterModel:n})},[g,S]),D=(0,s.useCallback)(()=>{m(null)},[]),A=(0,s.useCallback)(()=>{if(!g)return;const e=g.getColumnState();N({columnState:e})},[g,N]),R=(0,s.useCallback)(e=>{if(g&&(e.newPage||e.newPageSize)){const e=g.getState();N({paginationState:e.pagination})}},[g,N]),P=(0,s.useCallback)(e=>{u||("clientSide"!==o&&v&&Object.values(v).length&&e.api.setFilterModel(v),h&&Object.values(h).length&&e.api.applyColumnState({state:h,applyOrder:!0}),m(n=>r(r({},n),{},{gridApi:e.api})))},[v,u]),L=(0,s.useCallback)(e=>{var n;u||("clientSide"===o&&v&&Object.values(v).length&&e.api.setFilterModel(v),b&&e.api.paginationGoToPage(null!==(n=b.page)&&void 0!==n?n:0))},[b,v,u]);return(0,s.useMemo)(()=>{var e;return{onGridReady:P,filtersApplied:j,onFilterChanged:w,onSaveGridColumnState:A,onDestroy:D,onPaginationChanged:R,onFirstDataRendered:L,api:g,resetGridState:C,initialState:(x||null!==(e=T.filter)&&void 0!==e&&e.filterModel||b)&&!u?r(r(r({},x),T),{},{pagination:b}):{}}},[j,D,P,g,C,w,L,R,A,b,x,T])}},80026(e,n,t){"use strict";function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function r(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach(function(n){i(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function i(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){const[n,t]=(0,o.useState)();return(0,o.useEffect)(()=>{if(n)throw n},[n]),(0,o.useMemo)(()=>{if(e)return r(r({},e),{},{getRows:async n=>{t(void 0);const a=r(r({},n),{},{fail:()=>{t(new Error("An unexpected error happened"))}});try{await e.getRows(a)}catch(e){t(e)}}})},[e])};const o=t(22155)},51480(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.list=n.dateTime=n.date=n.time=void 0;const a=t(89922),r=e=>n=>null===n.value||void 0===n.value?"":e(n);n.time=r(e=>{let{value:n}=e;return a.formatters.time.format(new Date(n))}),n.date=r(e=>{let{value:n}=e;return a.formatters.date.format(new Date(n))}),n.dateTime=r(e=>{let{value:n}=e;return a.formatters.dateTime.format(new Date(n))}),n.list=e=>{let{value:n}=e;return a.formatters.list.format(n)}},66192(e,n,t){"use strict";var a,r,i,o;function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach(function(n){c(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function c(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.AutoComplete=void 0;const p=t(65723),m=t(87283),f=u(t(35429)),y=t(54790),g=u(t(35232)),b=t(22155),h=t(54717),v=t(37829),x=t(90817),T=t(87283),O=(0,y.styled)(m.FormHelperText)(a||(a=d(["\n  padding-left: 16px;\n  color: ",";\n"])),e=>e.error&&e.theme.sys.color.error),k=(0,y.styled)(g.default)(r||(r=d(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n\n  &."," {\n    justify-content: space-between;\n    min-height: 34px;\n    padding-top: 0;\n    padding-bottom: 0;\n    white-space: pre-wrap;\n  }\n\n  ","\n"])),m.autocompleteClasses.option,e=>{let{theme:n}=e;return(0,x.textCss)(n,{typescale:"label",size:"large"})}),j=(0,y.styled)(m.TextField)(i||(i=d(["\n  & .",".",":before {\n    border: 1px solid ",";\n    position: absolute;\n    border-top: none;\n    height: 9px;\n    border-radius: 0px 0px 8px 8px;\n  }\n\n  & .",":after {\n    border: 2px solid ",";\n    border-top: none;\n    height: 9px;\n    border-radius: 0px 0px 8px 8px;\n  }\n\n  & .",":hover::before {\n    border: 2px solid ",";\n    border-top: none;\n    border-radius: 0px 0px 8px 8px;\n  }\n"])),m.inputBaseClasses.root,m.inputClasses.root,e=>{let{theme:n}=e;return n.sys.color.outlineVariant},m.inputClasses.underline,e=>{let{theme:n}=e;return n.sys.color.primary},m.inputClasses.underline,e=>{let{theme:n}=e;return n.sys.color.primary}),C=(0,y.styled)(m.Autocomplete)(o||(o=d(["\n  & .",".Mui-focused {\n    color: "," !important;\n  }\n\n  & ."," {\n    padding-left: 17px;\n  }\n  && .",":hover::before {\n    border-color: ",";\n  }\n  & ."," {\n    color: ",";\n  }\n\n  & .",":not(.",") {\n    transform: translate(10px, 20px) scale(1) !important;\n  }\n  & ."," {\n    margin-right: 8px;\n  }\n"])),m.inputLabelClasses.root,e=>{let{theme:n}=e;return n.sys.color.primary},m.inputLabelClasses.root,m.inputClasses.root,e=>{let{theme:n}=e;return n.sys.color.primary},m.autocompleteClasses.popupIndicator,e=>{let{theme:n}=e;return n.sys.color.primary},m.inputLabelClasses.outlined,m.inputLabelClasses.shrink,m.autocompleteClasses.endAdornment),S=(0,y.styled)(T.IconButton)(e=>{let{theme:n}=e;return{color:n.palette.grey[400]}}),N=25,w={maxHeight:224};function D(e,n){const t=new Map(e);return n.forEach(e=>t.set(e.value,e)),t}n.AutoComplete=e=>{let{sx:n,label:t,value:a,error:r,options:i,loadMore:o,onChange:l,onCreate:c,disabled:d,isLoading:u,helperText:m,placeholder:g,defaultValue:x,createOption:T,noOptionsMessage:A,isMulti:R=!1,fullWidth:P=!0,loadMoreSize:L=N,disableClearable:I,slotProps:E,onDeleteOption:_}=e;const F=(0,y.useTheme)(),[B,U]=(0,b.useState)(0),[M,V]=(0,b.useState)([]),[z,G]=(0,b.useState)([]),[$,W]=(0,b.useState)(new Map),[q,J]=(0,b.useState)("");(0,b.useEffect)(()=>{W(e=>D(e,i))},[i]),(0,b.useEffect)(()=>{W(e=>D(e,z))},[z]),(0,b.useEffect)(()=>{W(e=>D(e,M))},[M]);const Y=(0,h.useDebouncedCallback)(async()=>{if(!o)return;const e=B+L;U(e);const n=await o(L,e,q);n.options.length&&(q?G(e=>e.concat(n.options)):V(e=>e.concat(n.options)))},500),H=(0,h.useDebouncedCallback)(async e=>{if(!o){const n=i.filter(n=>n.label.toLowerCase().includes(e.toLowerCase()));return void G(n)}const n=await o(L,0,e);G(n.options)},500);(0,b.useEffect)(()=>{q?H(q):q||o?!q&&o&&G([]):G(i)},[q]);const K=e=>{const{value:n}=e.target;J(n),""===n?(G([]),U(0)):H(n)},Q=(0,b.useMemo)(()=>({"& .MuiSelect-autoComplete .notranslate::after":g&&!t?s({content:"".concat(g),opacity:.42},n||{}):n}),[g,n,t]),Z=(0,b.useMemo)(()=>{const e=q?[...z]:i.concat(M),n=!e.find(e=>e.value===T),t=!e.find(e=>e.value===A);return T&&n&&e.unshift({value:T,label:T}),!A||t||T||e.length||e.unshift({value:A,label:A,disabled:!0}),e},[i,z,M]),X=(0,b.useMemo)(()=>a?"string"==typeof a?$.get(a)||"":Array.isArray(a)&&a.every(e=>"string"==typeof e)?a.map(e=>$.get(e)).filter(Boolean):a:"",[$,a]),ee=()=>J("");return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(C,{autoComplete:!0,isOptionEqualToValue:(e,n)=>(null==e?void 0:e.value)===(null==n?void 0:n.value),disableClearable:I,clearOnEscape:!1,fullWidth:P,disabled:d,sx:Q,filterOptions:e=>e,style:w,defaultValue:x,value:X,onBlur:ee,options:Z,multiple:R,loading:u,slotProps:E,getOptionKey:e=>null==e?void 0:e.value,clearIcon:(0,p.jsx)(f.default,{fontSize:"small",onClick:ee}),renderOption:(e,n)=>{const t=n,{value:a,label:r,disabled:i}=t,o=_&&a!==T&&!0!==i&&"delete-only"!==i;return(0,p.jsxs)(k,s(s({},e),{},{disabled:!0===i,value:a,sx:{fontWeight:400,zIndex:F.zIndex.modal},onClick:n=>{var t;a===T&&c?c():null===(t=e.onClick)||void 0===t||t.call(e,n)},children:[r,o&&(0,p.jsx)(S,{size:"small",onClick:e=>{e.stopPropagation(),_(t)},children:(0,p.jsx)(f.default,{fontSize:"inherit"})})]}))},onChange:(e,n)=>{null==l||l(n),R&&J("")},ListboxProps:{onScroll:e=>{const n=e.currentTarget;n.scrollTop+n.clientHeight>=n.scrollHeight-1&&Y()}},renderInput:e=>{const n=R?{value:q}:{},a=R?{}:{onChange:K,value:q};return(0,p.jsx)(j,s(s({},e),{},{variant:"standard",label:t,margin:"normal",fullWidth:P,onChange:K,value:q,InputProps:s(s(s({},e.InputProps),a),{},{endAdornment:(0,p.jsxs)(p.Fragment,{children:[u&&(0,p.jsx)(v.Loader,{size:20}),e.InputProps.endAdornment]})}),inputProps:s(s(s({},e.inputProps),n),{},{style:{padding:8}})}))}},"search-autocomplete"),r&&(0,p.jsx)(O,{error:!!r,children:r}),m&&!r&&(0,p.jsx)(O,{children:m})]})}},35462(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(66192),n)},54458(e,n,t){"use strict";var a,r,i=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),o=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),l=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},r(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=r(e),a=0;a<t.length;a++)"default"!==t[a]&&i(n,e,t[a]);return o(n,e),n}),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.StyledBadge=void 0,n.Badge=function(e){let{children:t,className:a,variant:r="standard",badgeContent:i,anchorRightVerticalCenter:o}=e;const l=(0,p.default)(a,{dot:"dot"===r,anchorRightVerticalCenter:o});return(0,c.jsx)(n.StyledBadge,{badgeContent:"dot"===r?" ":i,className:l,children:t})};const c=t(65723),d=t(54790),u=l(t(97239)),p=s(t(30395)),m=s(t(73474));var f,y;n.StyledBadge=(0,d.styled)(u.default)(a||(f=["\n  &.dot > ."," {\n    border: 4px solid ",";\n    background-clip: padding-box;\n    color: transparent;\n    user-select: none;\n  }\n  & ."," {\n    height: 18px;\n    width: 18px;\n    border-radius: 50%;\n    background-color: ",";\n    font-size: 10px;\n    color: ",";\n  }\n\n  &.anchorRightVerticalCenter > ."," {\n    top: 50%;\n    left: 105%;\n    transform: translateY(-50%);\n  }\n"],y||(y=f.slice(0)),a=Object.freeze(Object.defineProperties(f,{raw:{value:Object.freeze(y)}}))),u.badgeClasses.badge,e=>{let{theme:n}=e;return(0,m.default)(n.sys.color.error,.3)},u.badgeClasses.badge,e=>{let{theme:n}=e;return n.sys.color.error},e=>{let{theme:n}=e;return n.sys.color.onError},u.badgeClasses.badge)},85737(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Badge=void 0;var a=t(54458);Object.defineProperty(n,"Badge",{enumerable:!0,get:function(){return a.Badge}})},3732(e,n,t){"use strict";var a;const r=["color"],i=["children","loading","loaderTheme"];function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach(function(n){s(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function s(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var d=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),u=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),p=this&&this.__importStar||function(){var e=function(n){return e=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},e(n)};return function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var a=e(n),r=0;r<a.length;r++)"default"!==a[r]&&d(t,n,a[r]);return u(t,n),t}}(),m=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Button=void 0;const f=t(65723),y=p(t(93756)),g=t(54790),b=m(t(30395)),h=m(t(73474)),v=t(22155),x=t(37829),T="primary",O="Button-withStartIcon",k=["tertiary"],j=e=>void 0===e||!k.includes(e),C=(0,g.styled)(function(e){let{color:n}=e,t=c(e,r);return(0,f.jsx)(y.default,l(l({},t),{},{color:j(n)?n:"primary"}))})(a||(S=["\n  gap: 8px;\n  border: none;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  padding: 10px 24px;\n  font-family: ",";\n  font-size: ","px;\n  font-style: normal;\n  font-weight: ",";\n  line-height: ","px;\n  letter-spacing: ",";\n  box-shadow: ",";\n  border-radius: 500px;\n  text-transform: none;\n\n  &:hover {\n    box-shadow: none;\n  }\n  &:focus {\n    outline: 4px solid ",";\n  }\n\n  &."," {\n    &:hover {\n      background-color: ",";\n    }\n    &:focus {\n      background-color: ",";\n    }\n    &:active {\n      background-color: ",";\n    }\n  }\n  &."," {\n    outline: 1px solid ",";\n    &:hover {\n      background-color: ",";\n      outline: 1px solid ",";\n    }\n    &:focus {\n      background-color: ",";\n      outline: 4px solid ",";\n    }\n    &:active {\n      background-color: ",";\n      outline: 1px solid ",";\n    }\n  }\n  &."," {\n    box-shadow: none;\n    &:hover {\n      background-color: ",";\n    }\n    &:focus {\n      background-color: ",";\n    }\n    &:active {\n      outline: none;\n    }\n  }\n\n  &."," {\n    padding-left: 16px;\n  }\n"],N||(N=S.slice(0)),a=Object.freeze(Object.defineProperties(S,{raw:{value:Object.freeze(N)}}))),e=>e.theme.sys.typescale.label.large.family,e=>e.theme.sys.typescale.label.large.size,e=>e.theme.sys.typescale.label.large.weight,e=>e.theme.sys.typescale.label.large.lineHeight,e=>e.theme.sys.typescale.label.large.tracking,e=>e.theme.sys.elevation[0],e=>{let{theme:n,color:t=T}=e;return n.ref.palette[t][70]},y.buttonClasses.contained,e=>{let{theme:n,color:t=T}=e;return(0,h.default)(n.sys.color[t],.92)},e=>{let{theme:n,color:t=T}=e;return n.sys.color[t]},e=>{let{theme:n,color:t=T}=e;return n.ref.palette[t][10]},y.buttonClasses.outlined,e=>{let{theme:n}=e;return n.ref.palette.neutral[80]},e=>{let{theme:n,color:t=T}=e;return n.ref.palette[t][95]},e=>{let{theme:n,color:t=T}=e;return n.ref.palette[t][80]},e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{theme:n,color:t=T}=e;return n.ref.palette[t][80]},e=>{let{theme:n,color:t=T}=e;return n.ref.palette[t][90]},e=>{let{theme:n,color:t=T}=e;return n.ref.palette[t][80]},y.buttonClasses.text,e=>{let{theme:n,color:t=T}=e;return n.ref.palette[t][95]},e=>{let{theme:n,color:t=T}=e;return n.ref.palette[t][95]},O);var S,N;n.Button=(0,v.forwardRef)((e,n)=>{let{children:t,loading:a,loaderTheme:r}=e,o=c(e,i);const s=(0,b.default)({[O]:!!o.startIcon}),d=(0,v.useMemo)(()=>a?(0,f.jsxs)(f.Fragment,{children:[t,(0,f.jsx)("span",{children:(0,f.jsx)(x.Loader,{size:20,theme:r})})]}):t,[a,t]);return(0,f.jsx)(C,l(l({ref:n,className:s},o),{},{children:d}))})},37043(e,n,t){"use strict";const a=["onClick","multiple","onFileUpload","children","accept"];var r;function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.FileUploadButton=void 0;const s=t(65723),c=t(22155),d=t(54790),u=t(88454),p=(0,d.styled)("input")(r||(m=["\n  display: none;\n"],f||(f=m.slice(0)),r=Object.freeze(Object.defineProperties(m,{raw:{value:Object.freeze(f)}}))));var m,f;n.FileUploadButton=e=>{let{onClick:n,multiple:t,onFileUpload:r,children:i,accept:l="*/*"}=e,d=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const m=(0,c.useRef)(null),f=(0,c.useCallback)(e=>{var t;null==n||n(e),null===(t=m.current)||void 0===t||t.click()},[n]),y=(0,c.useCallback)(e=>{var n;const t=null===(n=e.target)||void 0===n?void 0:n.files;t&&r(Array.from(t))},[r]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Button,o(o({variant:"contained",color:"primary"},d),{},{onClick:f,children:i})),(0,s.jsx)(p,{type:"file",accept:l,onChange:y,ref:m,multiple:t})]})}},88454(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FileUploadButton=n.Button=void 0;var a=t(3732);Object.defineProperty(n,"Button",{enumerable:!0,get:function(){return a.Button}});var r=t(37043);Object.defineProperty(n,"FileUploadButton",{enumerable:!0,get:function(){return r.FileUploadButton}})},65764(e,n,t){"use strict";var a,r,i,o,l,s;function c(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.Card=void 0;const d=t(65723),u=t(22155),p=t(54790),m=t(90817),f=t(89922),y=t(10916),g=t(81272),b=t(24804),h=(0,p.styled)("div",{shouldForwardProp:e=>"disabled"!==e})(a||(a=c(["\n  display: flex;\n  border-radius: 12px;\n  width: 100%;\n  height: 100%;\n  flex-direction: column;\n  justify-content: flex-start;\n  align-items: start;\n  box-shadow: ",";\n  color: ",";\n  border: 1px solid ",";\n  background-color: ",";\n  cursor: 'pointer';\n\n  &:hover {\n    background-color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.elevation[1]},e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.onSecondary},e=>{let{theme:n}=e;return n.sys.color.secondaryContainer}),v=(0,p.styled)("div")(r||(r=c(["\n  align-self: flex-start;\n  width: 100%;\n  height: 168px;\n  background-image: url(",");\n  background-repeat: no-repeat;\n  background-color lightgray;\n  background-size: cover;\n  border-radius: 12px 12px 0 0;\n"])),e=>{let{src:n}=e;return n}),x=(0,p.styled)("div")(i||(i=c(["\n  margin-top: ",";\n  width: 100%;\n  padding: 16px;\n  display: flex;\n  flex-flow: column nowrap;\n  gap: 8px;\n  max-width: 100%;\n"])),e=>e.hasImg?"auto":"20px"),T=(0,p.styled)(m.Text)(o||(o=c(["\n  display: flex;\n  margin: 0;\n  flex: 1;\n"]))).withComponent("h2"),O=(0,p.styled)("div")(l||(l=c(["\n  height: ",";\n  width: 100%;\n  position: relative;\n  background-color: ",";\n"])),e=>e.hasImg?"240px":"100%",e=>{let{theme:n}=e;return n.sys.color.onSecondary}),k=(0,p.styled)("div")(s||(s=c(["\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 16px 16px 0px 16px;\n  margin-bottom: -16px;\n"])));n.Card=e=>{const{src:n,title:t,subContent:a,subTitle:r,children:i,onClick:o,iconName:l,chipContent:s,disabled:c=!1}=e,p=(0,b.useTheme)(),m=(0,u.useCallback)(e=>{null==o||o(e)},[o]),j=l&&y.Icons[l];return(0,d.jsxs)(O,{hasImg:"src"in e,children:[i,(0,d.jsxs)(h,{onClick:m,disabled:c,children:["src"in e&&(0,d.jsx)(v,{src:n}),(j||s)&&(0,d.jsxs)(k,{children:[j&&(0,d.jsx)(j,{fontSize:"large",sx:{color:p.sys.color.primary}}),s&&(0,d.jsx)(g.Chip,{label:s})]}),(0,d.jsxs)(x,{hasImg:"src"in e,children:[(0,d.jsx)(T,{typescale:"body",size:"medium",title:(0,f.getNodeText)(t),oneLine:!0,children:t}),r&&(0,d.jsx)(T,{typescale:"body",size:"small",title:(0,f.getNodeText)(r),oneLine:!0,children:r}),a&&(0,d.jsx)(T,{typescale:"body",size:"small",title:(0,f.getNodeText)(a),children:a})]})]})]})}},97648(e,n,t){"use strict";var a,r,i,o,l,s;function c(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.HorizontalCard=void 0;const d=t(65723),u=t(22155),p=t(54790),m=t(90817),f=t(89922),y=(0,p.styled)("div")(a||(a=c(["\n  display: flex;\n  border-radius: 12px;\n  width: 328px;\n  min-width: 328px;\n  height: 80px;\n  min-height: 80px;\n  flex-direction: unset;\n  justify-content: space-between;\n  align-items: start;\n  box-shadow: ",";\n  color: ",";\n  border: 1px solid ",";\n  background-color: ",";\n  overflow: hidden;\n\n  &:hover {\n    background-color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.elevation[1]},e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.onSecondary},e=>{let{theme:n}=e;return n.sys.color.secondaryContainer}),g=(0,p.styled)("div")(r||(r=c(["\n  background-image: url(",");\n  background-repeat: no-repeat;\n  background-color lightgray;\n  background-size: cover;\n  height: 100%;\n  min-height: 80px;\n  min-width: 80px;\n  flex: 80px 1 0;\n"])),e=>{let{src:n}=e;return n}),b=(0,p.styled)("div")(i||(i=c(["\n  flex: 248px 1 0;\n  max-width: 248px;\n  padding: 16px;\n  display: flex;\n  flex-flow: column nowrap;\n"]))),h=(0,p.styled)(m.Text)(o||(o=c(["\n  margin: 0;\n  margin-bottom: 4px;\n"]))).withComponent("h2"),v=(0,p.styled)(m.Text)(l||(l=c(["\n  margin: 0;\n"]))),x=(0,p.styled)("div")(s||(s=c(["\n  flex: 0 1 80px;\n"])));n.HorizontalCard=e=>{const{src:n,title:t,subTitle:a,onClick:r}=e,i=(0,u.useCallback)(e=>{null==r||r(e)},[r]);return(0,d.jsxs)(y,{onClick:i,children:[(0,d.jsxs)(b,{children:[(0,d.jsx)(h,{typescale:"title",size:"medium",title:(0,f.getNodeText)(t),oneLine:!0,children:t}),a&&(0,d.jsx)(v,{typescale:"body",size:"medium",title:(0,f.getNodeText)(a),oneLine:!0,children:a})]}),(0,d.jsx)(x,{children:(0,d.jsx)(g,{src:n})})]})}},55520(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.HorizontalCard=n.Card=void 0;var a=t(65764);Object.defineProperty(n,"Card",{enumerable:!0,get:function(){return a.Card}});var r=t(97648);Object.defineProperty(n,"HorizontalCard",{enumerable:!0,get:function(){return r.HorizontalCard}})},71073(e,n,t){"use strict";var a,r;function i(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.ChartCard=n.chartCardClassNames=void 0;const o=t(65723),l=t(87283),s=t(54790),c=t(22155),d=(0,s.styled)("span")(a||(a=i(["\n  font-size: ","px;\n  font-family: ",";\n  color: ",";\n  text-align: center;\n"])),e=>{let{theme:n}=e;return n.sys.typescale.title.medium.size},e=>{let{theme:n}=e;return n.sys.typescale.title.medium.family},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),u=(0,s.styled)("div")(r||(r=i(["\n  width: 100%;\n  height: 100%;\n  display: flex;\n  height: 270px;\n  border-radius: 16px;\n  flex-direction: column;\n  max-width: ",";\n  background: ",";\n  align-items: ",";\n  padding: ",";\n  border: ",";\n"])),e=>{let{maxWidth:n}=e;return n||"257px"},e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{alignItems:n}=e;return n||"center"},e=>{let{withPadding:n}=e;return n?"18px":0},e=>{let{border:n,theme:t}=e;return n?"1px solid ".concat(t.sys.color.outlineVariant):"none"});n.chartCardClassNames={title:"title"},n.ChartCard=(0,c.forwardRef)((e,n)=>{let{children:t,border:a,title:r,maxWidth:i,alignItems:s,withPadding:c}=e;return(0,o.jsxs)(u,{ref:n,alignItems:s,border:a,withPadding:c,maxWidth:i,children:[(0,o.jsx)(l.Stack,{gap:"12px",display:"flex",margin:0,width:"100%",direction:"row",children:(0,o.jsx)(d,{children:r})}),t]})})},31316(e,n,t){"use strict";const a=["title","noData","children","startDate","endDate","size","border","titleSize","titleTypescale","noDataStateSuppressSuggestion"];var r,i,o,l;function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach(function(n){d(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function u(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.ChartContainer=n.calculateInnerDimensions=n.ChartSize=void 0;const p=t(65723),m=t(54790),f=t(22155),y=t(57175),g=t(22083),b=t(90817),h=t(46495);var v;!function(e){e.Fluid="Fluid",e.Xs="Xs",e.S="S",e.STall="STall",e.Md="Md",e.L="L",e.Xl="Xl",e.Xxl="Xxl"}(v||(n.ChartSize=v={}));const x={[v.Fluid]:{width:100,height:100,paddingTop:32,paddingRight:32,paddingBottom:32,paddingLeft:32,placeholderIconSize:125,unit:"%"},[v.Xs]:{width:300,height:172,paddingTop:24,paddingRight:0,paddingBottom:0,paddingLeft:24,placeholderIconSize:75,unit:"px"},[v.S]:{width:478,height:172,paddingTop:24,paddingRight:0,paddingBottom:0,paddingLeft:24,placeholderIconSize:75,unit:"px"},[v.STall]:{width:478,height:312,paddingTop:24,paddingRight:0,paddingBottom:0,paddingLeft:24,placeholderIconSize:75,unit:"px"},[v.Md]:{width:626,height:312,paddingTop:32,paddingRight:0,paddingBottom:0,paddingLeft:32,placeholderIconSize:152,unit:"px"},[v.L]:{width:966,height:426,paddingTop:32,paddingRight:32,paddingBottom:32,paddingLeft:32,placeholderIconSize:152,unit:"px"},[v.Xl]:{width:978,height:349,paddingTop:32,paddingRight:32,paddingBottom:0,paddingLeft:32,placeholderIconSize:152,unit:"px"},[v.Xxl]:{width:978,height:651,paddingTop:32,paddingRight:32,paddingBottom:32,paddingLeft:32,placeholderIconSize:152,unit:"px"}},T=e=>"string"==typeof e?x[e]:e,O=(0,m.styled)("div")(r||(r=u(["\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  flex-grow: 1;\n  flex-shrink: 0;\n  border: ",";\n  border-radius: ","px;\n  overflow: hidden;\n\n  & svg {\n    border-radius: ","px;\n  }\n\n  & .",", & ."," {\n    ","\n    font-weight: 500;\n  }\n\n  & .",", & ."," {\n    ","\n    font-weight: 400;\n  }\n\n  ","\n"])),e=>{let{theme:n,border:t,noData:a}=e;return"".concat(t?1:0,"px ").concat(a?"dashed":"solid"," ").concat(n.sys.color.outlineVariant)},e=>{let{border:n}=e;return n?16:0},16,h.chartClassNames.dataLabel,h.chartClassNames.legendLabel,e=>{let{theme:n}=e;return(0,b.textCss)(n,{typescale:"body",size:"medium"})},h.chartClassNames.dataLabelText,h.chartClassNames.legendLabelValue,e=>{let{theme:n}=e;return(0,b.textCss)(n,{typescale:"body",size:"medium"})},e=>{let{size:n}=e;const t=T(n);return t?"\n      flex-basis: ".concat(t.width).concat(t.unit,";\n      width: ").concat(t.width).concat(t.unit,";\n      height: ").concat(t.height).concat(t.unit,";\n      padding-top: ").concat(t.paddingTop,"px;\n      padding-right: ").concat(t.paddingRight,"px;\n      padding-bottom: ").concat(t.paddingBottom,"px;\n      padding-left: ").concat(t.paddingLeft,"px;\n    "):""}),k=(0,m.styled)("div")(i||(i=u(["\n  position: relative;\n  display: flex;\n  align-items: center;\n  height: ","px;\n"])),32),j=(0,m.styled)(b.Text)(o||(o=u(["\n  flex: 1;\n  align-self: flex-start;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),C=(0,m.styled)(y.DatePeriodBadge)(l||(l=u(["\n  position: relative;\n  top: -0.5em;\n  right: 0;\n"])));n.calculateInnerDimensions=e=>{const n=T(e.size);if(!n||e.size===v.Fluid)return{};const t=(e=>!!e.title||!(!e.startDate||!e.endDate))(e)?32:0;return{width:n.width-n.paddingRight-n.paddingLeft,height:n.height-n.paddingTop-n.paddingBottom-t}},n.ChartContainer=(0,f.forwardRef)((e,n)=>{let{title:t,noData:r,children:i,startDate:o,endDate:l,size:s=v.Fluid,border:d=!0,titleSize:u="large",titleTypescale:m="label",noDataStateSuppressSuggestion:f=!1}=e,y=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const b=T(s);return(0,p.jsxs)(O,c(c({size:s,border:d,noData:r},y),{},{ref:n,children:[(t||o&&l)&&(0,p.jsxs)(k,{style:{paddingRight:b.paddingRight>0?0:24},children:[t&&(0,p.jsx)(j,{typescale:m,size:u,className:h.chartClassNames.chartContainerTitle,oneLine:!0,children:t}),!r&&o&&l&&(0,p.jsx)(C,{startDate:o,endDate:l})]}),r?(0,p.jsx)(g.NoDataPlaceholder,{iconSize:b.placeholderIconSize,suppressSuggestion:f}):i]}))})},57175(e,n,t){"use strict";const a=["startDate","endDate"];var r,i;function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach(function(n){s(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function s(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.DatePeriodBadge=void 0;const d=t(65723),u=t(54790),p=t(22155),m=t(90817),f=t(89922),y=(0,u.styled)("div")(r||(r=c(["\n  border-radius: 12px;\n  background: #f7f7ff;\n  padding: 8px 12px;\n  cursor: default;\n"]))),g=(0,u.styled)(m.Text)(i||(i=c(["\n  line-height: 20px;\n  letter-spacing: 0.1px;\n  color: #535353;\n"])));n.DatePeriodBadge=(0,p.forwardRef)((e,n)=>{let{startDate:t,endDate:r}=e,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);return(0,d.jsx)(y,l(l({},i),{},{ref:n,children:(0,d.jsx)(g,{typescale:"label",size:"large",title:f.formatters.date.formatRange(t,r),children:f.formatters.monthYear.formatRange(t,r)})}))})},31023(e,n,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.KpiChartCard=function(e){let{value:n,title:t,border:a,fontSize:d,maxWidth:u,delay:p=1,alignItems:m,withPadding:f,initialDelay:y,parentWidth:g=300}=e;const b=(0,i.useMemo)(()=>{const e=Intl.NumberFormat("en-GB",{notation:"compact"}).format(n);return n>=1e12?String(e):l.formatters.number.format(Math.round(n))},[n]),h=(0,i.useMemo)(()=>{const e=g,n=String(b).length,t=e/n,a="".concat(Math.max(t,12),"px");return 1===n?"128px":a},[b]);return(0,r.jsx)(c.ChartCard,{border:a,maxWidth:u,alignItems:m,withPadding:f,title:t,children:(0,r.jsx)(s.SlotCharacter,{fontSize:d||h,children:(0,r.jsx)(o.default,{debounceDelay:y,delay:p,value:b})})})};const r=t(65723),i=t(22155),o=a(t(91034)),l=t(89922),s=t(77912),c=t(71073)},22083(e,n,t){"use strict";var a,r,i,o;function l(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.NoDataPlaceholder=void 0;const s=t(65723),c=t(54790),d=t(97322),u=t(10916),p=t(90817),m=(0,c.styled)("div")(a||(a=l(["\n  width: 100%;\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n"]))),f=(0,c.styled)(p.Text)(r||(r=l(["\n  margin-bottom: 4px;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),y=(0,c.styled)(p.Text)(i||(i=l(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),g=(0,c.styled)(d.Link)(o||(o=l(["\n  text-decoration: underline;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant});n.NoDataPlaceholder=e=>{let{iconSize:n,suppressSuggestion:t=!1}=e;return(0,s.jsxs)(m,{children:[(0,s.jsx)(u.CustomIcons.NoData,{width:n,height:n}),(0,s.jsx)(f,{typescale:"title",size:"large",children:"No data"}),!t&&(0,s.jsxs)(y,{typescale:"body",size:"small",children:["Upload data in the ",(0,s.jsx)(g,{to:"/v2/data",children:"data"})," section"]})]})}},46495(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.chartClassNames=void 0,n.chartClassNames={dataLabel:"Chart-dataLabel",dataLabelText:"Chart-dataLabelText",legendLabel:"Chart-legendLabel",legendLabelValue:"Chart-legendLabelValue",chartContainerTitle:"Chart-containerTitle"}},19563(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),n.chartClassNames=void 0,r(t(31316),n),r(t(57175),n),r(t(31023),n),r(t(22083),n),r(t(71073),n);var i=t(46495);Object.defineProperty(n,"chartClassNames",{enumerable:!0,get:function(){return i.chartClassNames}})},16508(e,n,t){"use strict";const a=["yAxisTitle","title","xAxisDateFormat","enableLegend","treatZeroAsEmptyData","data","unit","size","startDate","endDate","dataLabels"];function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ColumnChart=void 0;const s=t(65723),c=t(54790),d=l(t(18814)),u=l(t(66044)),p=l(t(34768)),m=t(22155),f=t(16460),y=t(41342),g=t(19563);n.ColumnChart=(0,m.forwardRef)((e,n)=>{let{yAxisTitle:t,title:r,xAxisDateFormat:o,enableLegend:l=!0,treatZeroAsEmptyData:b=!0,data:h,unit:v,size:x,startDate:T,endDate:O,dataLabels:k}=e,j=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const C=(0,c.useTheme)(),S=C.sys.color.primary,N=C.extendedColors.social.color,w=C.sys.typescale.label.small,D=(0,m.useMemo)(()=>h.length>6?1:.2,[h]),A=(0,m.useMemo)(()=>h.length>6?.2:0,[h]),R=(0,m.useMemo)(()=>({fontSize:"".concat(w.size,"px"),fontWeight:"".concat(w.weight),fontFamily:"".concat(w.family),color:"".concat(C.sys.color.onBackground)}),[w,C]),{legend:P,tooltip:L,chart:I}=(0,f.useCalculatedHighchartsOptions)({title:r,startDate:T,endDate:O,size:x,dataLabels:k,tooltip:{unit:v,dimensionIn:"series"},legend:{enabled:l}}),E=(0,y.isDataEmpty)(h,b=!0),{seriesData:_,categories:F}=(0,m.useMemo)(()=>{const e=[],n=[];return h&&[...h].sort((e,n)=>(0,d.default)(e.time).valueOf()-(0,d.default)(n.time).valueOf()).forEach(t=>{const a=t.value||0,r=n.findIndex(e=>e.name===t.dimension);-1===r?n.push({name:t.dimension,data:[a]}):n[r].data.push(a);const i=(0,d.default)(t.time).format(o||"YYYY/MM");e.includes(i)||e.push(i)}),{seriesData:n.map(e=>i(i({},e),{},{type:"column",pointRange:D,groupPadding:A,maxPointWidth:12})),categories:e}},[h,o]),B={legend:P,tooltip:L,colors:[S,N],chart:i(i({},I),{},{type:"column"}),xAxis:{categories:F,labels:{style:R}},yAxis:{min:0,title:{text:t||""},labels:{style:R}},title:{text:""},credits:{enabled:!1},series:_};return(0,s.jsx)(g.ChartContainer,i(i({noData:E,size:x,startDate:T,endDate:O,title:r},j),{},{children:(0,s.jsx)(p.default,{highcharts:u.default,options:B,ref:n})}))})},58102(e,n,t){"use strict";const a=["title","size","startDate","endDate","data","unit","customOptions","treatZeroAsEmptyData","explanations"];var r;function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.DonutChart=void 0;const c=t(65723),d=t(22155),u=s(t(46059)),p=t(54790),m=s(t(50277)),f=s(t(66044)),y=s(t(34768)),g=t(19563),b=t(27951),h=t(16460),v=t(41342),x=(0,p.styled)(g.ChartContainer)(r||(T=["\n  position: relative;\n  padding-right: 0;\n"],O||(O=T.slice(0)),r=Object.freeze(Object.defineProperties(T,{raw:{value:Object.freeze(O)}}))));var T,O;const k={chart:{type:"pie"},title:{text:""},credits:{enabled:!1},plotOptions:{pie:{size:"50%",shadow:!1,allowPointSelect:!0,cursor:"pointer",showInLegend:!0}}};n.DonutChart=(0,d.forwardRef)((e,n)=>{let{title:t,size:r,startDate:i,endDate:l,data:s,unit:p,customOptions:g={},treatZeroAsEmptyData:T=!0,explanations:O}=e,j=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const C=(0,u.default)(s,"value"),S=(0,b.useFindColorByToken)(),{legend:N,tooltip:w,chart:D,dataLabels:A}=(0,h.useCalculatedHighchartsOptions)({title:t,startDate:i,endDate:l,size:r,dataLabels:j.dataLabels,tooltip:{unit:p,explanations:O,dimensionIn:"point"},legend:{labelFormatter(){const{name:e,y:n}=this;return(0,v.formatPieChartLegend)(e,n,C)}}}),R=(0,v.isDataEmpty)(s,T),P=(0,d.useMemo)(()=>(0,m.default)({},k,g,{legend:N,tooltip:w,chart:D,series:[{data:s.map(e=>({name:e.name,y:e.value,color:S(e.color)||e.color})),dataLabels:A,size:"75%",innerSize:"75%"}]}),[g]);return(0,c.jsx)(x,o(o({noData:R,size:r,startDate:i,endDate:l},j),{},{ref:n,children:(0,c.jsx)(y.default,{highcharts:f.default,options:P})}))})},35540(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(58102),n)},69634(e,n,t){"use strict";const a=["size","title","metric","baseline","unit","growthEncouraged","treatZeroAsEmptyData","slot","round","titleSize","titleTypescale","valueTypescale","valueSize"];var r,i,o,l,s,c;function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach(function(n){p(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function p(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.KpiChart=void 0;const y=t(65723),g=t(54790),b=t(22155),h=f(t(91034)),v=f(t(49680)),x=t(89922),T=t(90817),O=t(41342),k=t(8375),j=t(18453),C=t(19563),S=(0,g.styled)(C.ChartContainer)(r||(r=m(["\n  padding: 32px 32px 28px 32px;\n"]))),N=(0,g.styled)("div")(i||(i=m(["\n  display: flex;\n  align-items: center;\n  flex-flow: row nowrap;\n  height: 36px;\n  margin-bottom: 24px;\n"]))),w=(0,g.styled)(T.Text)(o||(o=m(["\n  flex-grow: 1;\n  margin: 0;\n  cursor: default;\n  line-height: 28px;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}).withComponent("h3"),D=(0,g.styled)("div")(l||(l=m(["\n  display: flex;\n  flex-flow: row nowrap;\n  align-items: center;\n  max-width: 100%;\n"]))),A=(0,g.styled)(T.Text)(s||(s=m(["\n  flex: 0 1 auto;\n  margin-right: 8px;\n  line-height: 46px;\n  font-weight: 600;\n  cursor: default;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding-bottom: 4px;\n"]))),R=(0,g.styled)(j.KpiChartTrendLabel)(c||(c=m(["\n  flex: 0 1 auto;\n"])));n.KpiChart=(0,b.forwardRef)((e,n)=>{let{size:t,title:r,metric:i,baseline:o,unit:l,growthEncouraged:s=!1,treatZeroAsEmptyData:c=!0,slot:d=!1,round:p,titleSize:m="large",titleTypescale:f="label",valueTypescale:g="display",valueSize:b="large"}=e,T=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const j=(0,k.calculateTrend)({growthEncouraged:!!s,metric:i,baseline:o,unit:l});if((0,O.isValueEmpty)(i.value,c))return(0,y.jsx)(S,u(u({title:r,titleTypescale:f,titleSize:m,noData:!0,size:t},T),{},{ref:n}));const P="number"!=typeof p||Number.isNaN(i.value)?i.value:v.default.round(i.value,p),L=i.value>1e9?x.formatters.numberCompact.format(P):x.formatters.number.format(P);return(0,y.jsxs)(S,u(u({size:t},T),{},{ref:n,children:[(0,y.jsxs)(N,{children:[(0,y.jsx)(w,{typescale:f,size:m,oneLine:!0,children:r}),(0,y.jsx)(C.DatePeriodBadge,{startDate:i.startDate,endDate:i.endDate})]}),(0,y.jsxs)(D,{children:[(0,y.jsx)(A,{typescale:g,size:b,title:i.value.toString(),children:d?(0,y.jsx)(h.default,{debounceDelay:1,delay:.1,value:L}):L}),o&&j&&(0,y.jsx)(R,{trend:j})]})]}))})},18453(e,n,t){"use strict";const a=["trend"];var r;function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.KpiChartTrendLabel=void 0;const s=t(65723),c=t(54790),d=t(89922),u=t(10916),p=t(65675),m=t(22155),f=["trend"],y=(0,c.styled)("div",{shouldForwardProp:e=>!f.includes(e)})(r||(g=["\n  display: flex;\n  height: 36px;\n  padding: 4px 13px;\n  align-items: center;\n  gap: 4px;\n  border-radius: 12px;\n  background: ",";\n  color: ",";\n  cursor: default;\n  font-weight: 600;\n"],b||(b=g.slice(0)),r=Object.freeze(Object.defineProperties(g,{raw:{value:Object.freeze(b)}}))),e=>{let{trend:n,theme:t}=e;return h(n,t).background},e=>{let{trend:n,theme:t}=e;return h(n,t).color});var g,b;const h=(e,n)=>{switch(e.type){case p.TrendType.Positive:return{color:n.customColors.onSuccess.color,background:n.customColors.success.color};case p.TrendType.Negative:return{color:n.sys.color.onErrorContainer,background:n.sys.color.errorContainer};default:return{color:n.sys.color.onSecondaryContainer,background:n.sys.color.secondaryContainer}}},v=e=>{let{trend:n,theme:t}=e;if(0===n.value)return null;const a=h(n,t);return n.value>0?(0,s.jsx)(u.CustomIcons.ArrowUp,{color:a.color}):(0,s.jsx)(u.CustomIcons.ArrowDown,{color:a.color})};n.KpiChartTrendLabel=(0,m.forwardRef)((e,n)=>{let{trend:t}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const i=(0,c.useTheme)();return(0,s.jsxs)(y,o(o({trend:t,title:t.explanation},r),{},{ref:n,children:[(0,s.jsx)(v,{theme:i,trend:t}),d.formatters.percentage.format(Math.abs(t.value)),"%"]}))})},91094(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(69634),n),r(t(65675),n)},65675(e,n){"use strict";var t;Object.defineProperty(n,"__esModule",{value:!0}),n.TrendType=void 0,function(e){e.Positive="Positive",e.Negative="Negative",e.Neutral="Neutral"}(t||(n.TrendType=t={}))},8375(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.calculateTrend=void 0;const a=t(65675),r=t(12667),i=e=>Number.isFinite(e),o=e=>{let{metric:n,baseline:t,value:a,unit:i}=e;return"".concat(r.formatters.number.format(n.value)," ").concat(i," in ").concat(r.formatters.monthYear.formatRange(n.startDate,n.endDate)," is ").concat(r.formatters.percentage.format(a),"% ").concat(a>=0?"higher ":"lower ","than ").concat(r.formatters.number.format(t.value)," ").concat(i," in ").concat(r.formatters.monthYear.formatRange(t.startDate,t.endDate))};n.calculateTrend=e=>{let{metric:n,baseline:t,growthEncouraged:r,unit:l}=e;if(!i(n.value)||!i(null==t?void 0:t.value))return null;const s=(n.value-t.value)/t.value*100,c=((e,n)=>0===e?a.TrendType.Neutral:n?e>0?a.TrendType.Positive:a.TrendType.Negative:e<0?a.TrendType.Positive:a.TrendType.Negative)(s,r);return{value:s,type:c,explanation:o({metric:n,baseline:t,value:s,unit:l})}}},18092(e,n,t){"use strict";const a=["size","title","unit","yAxisTitle","xAxisDateFormat","data","startDate","endDate","disableLegend","explanations","treatZeroAsEmptyData"];function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.LineChart=void 0;const s=t(65723),c=t(22155),d=l(t(18814)),u=l(t(66044)),p=l(t(34768)),m=t(54790),f=t(19563),y=t(16460),g=t(41342);n.LineChart=(0,c.forwardRef)((e,n)=>{let{size:t,title:r,unit:o,yAxisTitle:l,xAxisDateFormat:b,data:h,startDate:v,endDate:x,disableLegend:T,explanations:O,treatZeroAsEmptyData:k=!0}=e,j=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const C=(0,m.useTheme)(),S=C.sys.typescale.body.medium,N=C.sys.color.primary,w=C.extendedColors.social.color,D=C.sys.typescale.label.medium,A=C.sys.typescale.label.small,R=C.sys.typescale.title.medium,P=(0,c.useMemo)(()=>h.length>6?1:.2,[h]),L=(0,c.useMemo)(()=>h.length>6?.2:0,[h]),I=(0,c.useMemo)(()=>({fontSize:"".concat(A.size,"px"),fontWeight:"".concat(A.weight),fontFamily:"".concat(A.family),color:"".concat(C.sys.color.onBackground)}),[A,C]),{seriesData:E,categories:_}=(0,c.useMemo)(()=>{const e=[],n=[];return h&&[...h].sort((e,n)=>new Date(e.time).getTime()-new Date(n.time).getTime()).forEach(t=>{const a=t.value||0,r=n.findIndex(e=>e.name===t.dimension);-1===r?n.push({name:t.dimension,data:[a]}):n[r].data.push(a);const i=(0,d.default)(new Date(t.time)).format(b||"MMM YYYY");e.includes(i)||e.push(i)}),{seriesData:n.map(e=>i(i({},e),{},{type:"line",pointRange:P,groupPadding:L,maxPointWidth:12})),categories:e}},[h,b]),F=(0,g.isDataEmpty)(h,k),{legend:B,tooltip:U,chart:M}=(0,y.useCalculatedHighchartsOptions)({title:r,startDate:v,endDate:x,size:t,dataLabels:j.dataLabels,tooltip:{unit:o,explanations:O,dimensionIn:"series"},legend:{enabled:!T}}),V=(0,c.useMemo)(()=>({legend:B,colors:[N,w],chart:i(i({},M),{},{type:"line"}),title:{text:""},xAxis:{categories:_,labels:{style:I}},yAxis:{min:0,title:{text:l||""},labels:{style:I}},tooltip:U,credits:{enabled:!1},series:E}),[E,_,S,D,R,I,C,r,N,w,T]);return(0,s.jsx)(f.ChartContainer,i(i({noData:F,title:r,size:t,startDate:v,endDate:x},j),{},{children:(0,s.jsx)(p.default,{highcharts:u.default,options:V,ref:n})}))})},9930(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(18092),n)},77986(e,n,t){"use strict";const a=["title","size","startDate","endDate","customOptions","data","unit","explanations","treatZeroAsEmptyData"];function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.PieChart=void 0;const s=t(65723),c=l(t(50277)),d=l(t(66044)),u=l(t(46059)),p=t(22155),m=l(t(34768)),f=t(19563),y=t(27951),g=t(41342),b=t(16460),h={chart:{type:"pie"},title:{text:""},credits:{enabled:!1},plotOptions:{pie:{shadow:!1,center:["50%","50%"],allowPointSelect:!0,cursor:"pointer",showInLegend:!0},series:{dataLabels:{allowOverlap:!1}}}};n.PieChart=(0,p.forwardRef)((e,n)=>{let{title:t,size:r,startDate:o,endDate:l,customOptions:p,data:v,unit:x="",explanations:T,treatZeroAsEmptyData:O=!0}=e,k=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const j=(0,y.useFindColorByToken)(),C=(0,u.default)(v,"value"),{legend:S,tooltip:N,chart:w,dataLabels:D}=(0,b.useCalculatedHighchartsOptions)({title:t,startDate:o,endDate:l,size:r,dataLabels:k.dataLabels,tooltip:{unit:x,explanations:T,dimensionIn:"point"},legend:{labelFormatter(){const{name:e,y:n}=this;return(0,g.formatPieChartLegend)(e,n,C)}}}),A=(0,g.isDataEmpty)(v,O),R=(0,c.default)({},h,{chart:w,tooltip:N,legend:S,dataLabels:D,series:[{name:"",type:"pie",dataLabels:D,data:v.map(e=>({name:e.name,y:e.value,color:j(e.color)||e.color})),size:"100%"}]},p);return(0,s.jsx)(f.ChartContainer,i(i({noData:A,size:r,startDate:o,endDate:l},k),{},{ref:n,children:(0,s.jsx)(m.default,{highcharts:d.default,options:R})}))})},85122(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(77986),n),r(t(34751),n)},34751(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},26888(e,n,t){"use strict";const a=["data"];var r,i;function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach(function(n){s(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function s(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.RadialChart=void 0;const u=t(65723),p=t(22155),m=d(t(66044)),f=d(t(34768)),y=t(54790),g=t(62111),b=t(34616),h=t(75817),v=(0,y.styled)(h.RadialChartContainer)(r||(r=c(["\n  & {\n    display: flex;\n    max-width: 100%;\n    width: 100%;\n    justify-content: center;\n    height: 386px;\n  }\n\n  & > div:first-child {\n    max-width: 100%;\n    width: 100%;\n    height: 100%;\n  }\n\n  "," {\n    height: 300px;\n  }\n\n  "," {\n    height: auto;\n    align-items: center;\n    flex-direction: column;\n    gap: 24px;\n\n    & > div:first-child {\n      height: 300px;\n    }\n  }\n"])),e=>{let{theme:n}=e;return n.breakpoints.down("xl")},e=>{let{theme:n}=e;return n.breakpoints.down("md")}),x=(0,y.styled)("div")(i||(i=c(["\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n"])));n.RadialChart=(0,p.forwardRef)((e,n)=>{let{data:t=b.mockData}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const i=(0,y.useTheme)(),o=i.sys.typescale.body.medium,s=i.sys.typescale.label.medium,c=(0,p.useMemo)(()=>t.map((e,n)=>{var t;return l(l({},e),null===(t=b.radialData)||void 0===t?void 0:t[n])}),[t,b.radialData]),d={chart:{type:"solidgauge",events:{}},credits:{enabled:!1},title:{text:b.title,useHTML:!0,x:-100,y:0,style:{fontSize:"".concat(o.size,"px"),color:"".concat(i.sys.color.onSurfaceVariant),fontFamily:"".concat(o.family)}},tooltip:{borderWidth:0,backgroundColor:"none",shadow:!1,style:{},valueSuffix:'<p style="font-size: '.concat(s.size,"px; font-weight: ").concat(s.weight,'">%</p>'),pointFormat:'<span  style="font-size: '.concat(i.sys.typescale.display.small.size,"px; color: ").concat(i.sys.color.onSurface,'">{point.y}</span>'),positioner:function(e){return{x:(this.chart.chartWidth-e)/2,y:this.chart.plotHeight/2+34}}},pane:{startAngle:0,endAngle:360,background:(0,b.dataPaneBackground)(c)},yAxis:{min:0,max:100,lineWidth:0,tickPositions:[]},plotOptions:{solidgauge:{dataLabels:{enabled:!1},linecap:"round",stickyTracking:!1,rounded:!0}},series:(0,b.dataSeries)(c)};return(0,u.jsxs)(v,l(l({},r),{},{ref:n,children:[(0,u.jsx)(f.default,{highcharts:m.default,options:d}),(0,u.jsx)(x,{children:null==c?void 0:c.map(e=>(0,u.jsx)(g.ChartInfoItem,{item:e},e.name))})]}))})},75817(e,n,t){"use strict";var a;Object.defineProperty(n,"__esModule",{value:!0}),n.RadialChartContainer=void 0;const r=t(54790),i=t(90817),o=t(46495);var l,s;n.RadialChartContainer=(0,r.styled)("div")(a||(l=["\n  width: 100%;\n  height: 100%;\n\n  & ."," {\n    display: flex;\n    flex-direction: column;\n  }\n  & ."," {\n    display: block;\n    margin: 0;\n    margin-bottom: 4px;\n    ","\n  }\n"],s||(s=l.slice(0)),a=Object.freeze(Object.defineProperties(l,{raw:{value:Object.freeze(s)}}))),o.chartClassNames.dataLabel,o.chartClassNames.dataLabelText,e=>(0,i.textCss)(e.theme,{typescale:"body",size:"medium"}))},62111(e,n,t){"use strict";var a,r,i,o,l;function s(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ChartInfoItem=void 0;const d=t(65723),u=t(54790),p=t(90817),m=c(t(10070)),f=(0,u.styled)("div")(a||(a=s(["\n  display: flex;\n  width: 236px;\n  justify-content: space-between;\n"]))),y=(0,u.styled)("div")(r||(r=s(["\n  display: flex;\n"]))),g=(0,u.styled)("img")(i||(i=s(["\n  margin: 0 2px 0 10px;\n"]))),b=(0,u.styled)(p.Text)(o||(o=s(["\n  margin: 0;\n"]))),h=(0,u.styled)("div")(l||(l=s(["\n  width: 16px;\n  height: 16px;\n  background-color: ",";\n  border-radius: 50%;\n  margin: 3px 12px 0 0;\n"])),e=>e.color);n.ChartInfoItem=e=>{let{item:n}=e;const{name:t,percent:a,startColor:r}=n;return(0,d.jsxs)(f,{children:[(0,d.jsxs)(y,{children:[(0,d.jsx)(h,{color:r}),(0,d.jsx)(b,{typescale:"body",size:"medium",children:t})]}),(0,d.jsxs)(y,{children:[(0,d.jsxs)(b,{typescale:"body",size:"medium",children:[a,"%"]}),(0,d.jsx)(g,{src:m.default}),(0,d.jsx)(b,{typescale:"body",size:"medium",children:"4%"})]})]})}},98125(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(26888),n),r(t(6452),n)},6452(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},34616(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.title=n.dataPaneBackground=n.dataSeries=n.mockData=n.radialData=n.linearGradientColor=void 0;const a=t(83404);n.linearGradientColor=(e,n)=>({linearGradient:{x1:0,y1:1,x2:0,y2:0},stops:[[0,e],[1,n]]}),n.radialData=[{radius:"118%",innerRadius:"97%",startColor:a.themeTokens.extendedColors.environmental.color,endColor:a.themeTokens.extendedColors.environmental.endColor},{radius:"96%",innerRadius:"75%",startColor:a.themeTokens.extendedColors.economic.color,endColor:a.themeTokens.extendedColors.economic.endColor},{radius:"74%",innerRadius:"53%",startColor:a.themeTokens.extendedColors.social.color,endColor:a.themeTokens.extendedColors.social.endColor},{radius:"52%",innerRadius:"31%",startColor:a.themeTokens.extendedColors.governance.color,endColor:a.themeTokens.extendedColors.governance.endColor}],n.mockData=[{name:"Environmental",percent:80},{name:"Social",percent:60},{name:"Economic",percent:75},{name:"Governance",percent:83}],n.dataSeries=e=>e.map(e=>{let{radius:t,innerRadius:a,percent:r,startColor:i,endColor:o}=e;return{type:"solidgauge",name:"",data:[{color:(0,n.linearGradientColor)(i,o),radius:t,innerRadius:a,y:r}],custom:{icon:"filter",iconColor:i}}}),n.dataPaneBackground=e=>e.map(e=>{let{radius:n,innerRadius:t,endColor:a}=e;return{outerRadius:n,innerRadius:t,backgroundColor:a,borderWidth:0}}),n.title='<div style="display: flex; align-items: center; gap: 12px"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">\n  <path d="M4.5 13.1925L5.5575 14.25L9 10.815L12.4425 14.25L13.5 13.1925L9 8.6925L4.5 13.1925Z" fill="#2E3EFF" />\n  <path d="M4.5 8.25L5.5575 9.3075L9 5.8725L12.4425 9.3075L13.5 8.25L9 3.75L4.5 8.25Z" fill="#2E3EFF" />\n</svg> Up 24% on 2023 Q1</div>'},13368(e,n,t){"use strict";const a=["size","startDate","endDate","customOptions","data","title","unit","explanations","treatZeroAsEmptyData"];function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.SimplePieDonutChart=void 0;const s=t(65723),c=l(t(73474)),d=l(t(66044)),u=l(t(34768)),p=l(t(50277)),m=l(t(46059)),f=t(22155),y=t(16460),g=t(19563),b=t(27951),h=t(41342),v={chart:{type:"pie"},title:{text:""},credits:{enabled:!1},plotOptions:{pie:{shadow:!1,center:["50%","50%"],allowPointSelect:!0,cursor:"pointer",showInLegend:!0},series:{dataLabels:{allowOverlap:!1}}}},x=(0,f.forwardRef)((e,n)=>{let{size:t,startDate:r,endDate:o,customOptions:l,data:f,title:x,unit:T="",explanations:O,treatZeroAsEmptyData:k=!0}=e,j=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const C=(0,b.useFindColorByToken)(),S=(0,m.default)(f,"value"),{legend:N,chart:w,tooltip:D,dataLabels:A}=(0,y.useCalculatedHighchartsOptions)({title:x,startDate:r,endDate:o,size:t,dataLabels:j.dataLabels,tooltip:{unit:T,explanations:O,dimensionIn:"point"},legend:{labelFormatter(){const{name:e,y:n}=this;return(0,h.formatPieChartLegend)(e,Number(n),S)}}}),R=(0,h.isDataEmpty)(f,k),P=(0,p.default)({},v,{chart:w,legend:N,tooltip:D,series:[{name:"",data:f.map(e=>({name:e.name,y:e.value,color:C(e.color)?(0,c.default)(C(e.color),.3):(0,c.default)(e.color,.3)})),size:"100%",showInLegend:!1,dataLabels:!1},{name:"",dataLabels:A,data:f.map(e=>({name:e.name,y:e.value,color:C(e.color)||e.color})),size:"100%",innerSize:"75%"}],title:{text:""}},l);return(0,s.jsx)(g.ChartContainer,i(i({noData:R,title:x,size:t,startDate:r,endDate:o},j),{},{ref:n,children:(0,s.jsx)(u.default,{highcharts:d.default,options:P})}))});n.SimplePieDonutChart=x},85996(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(13368),n),r(t(54377),n)},54377(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},32492(e,n,t){"use strict";const a=["title","type","size","unit","startDate","endDate","explanations","enableLegend","treatZeroAsEmptyData","data","colors"];function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.StackedChart=void 0;const s=t(65723),c=t(54790),d=l(t(66044)),u=l(t(34768)),p=t(22155),m=t(16460),f=t(19563),y=t(41342),g=t(27951);n.StackedChart=(0,p.forwardRef)((e,n)=>{let{title:t,type:r,size:o,unit:l,startDate:b,endDate:h,explanations:v,enableLegend:x=!0,treatZeroAsEmptyData:T=!0,data:O,colors:k}=e,j=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const C=(0,c.useTheme)(),S=C.sys.typescale.label.small,N={fontSize:"".concat(S.size,"px"),fontWeight:"".concat(S.weight),fontFamily:"".concat(S.family),color:"".concat(C.sys.color.onBackground)},w=(null==O?void 0:O.reduce((e,n)=>{const{dimension:t,time:a,value:r}=n;return e[a]||(e[a]={}),e[a][t]||(e[a][t]=0),e[a][t]+=r||0,e},{}))||{},D=Object.keys(w).sort(),A=(0,p.useMemo)(()=>new Set,[]);Object.values(w).forEach(e=>{Object.keys(e).forEach(e=>{A.add(e)})});const R=(0,g.useFindColorByToken)(),P=(0,y.isDataEmpty)(O,T),{tooltip:L,legend:I,chart:E,dataLabels:_}=(0,m.useCalculatedHighchartsOptions)({title:t,startDate:b,endDate:h,size:o,dataLabels:j.dataLabels,tooltip:{unit:l,explanations:v,dimensionIn:"series"},legend:{enabled:x}}),F=(0,p.useMemo)(()=>Array.from(A).map(e=>({name:e,dataLabels:_,color:R(k[e]),data:D.map(n=>w[n][e]||0)})),[D,w,A]),B={legend:I,chart:i(i({},E),{},{type:r||"column"}),title:{text:""},xAxis:{categories:D,labels:{style:N}},yAxis:{min:0,title:{text:""},labels:{style:N}},tooltip:L,credits:{enabled:!1},plotOptions:{column:{stacking:"normal"},series:{pointWidth:12}},series:F};return(0,s.jsx)(f.ChartContainer,i(i({noData:P,title:t,size:o,startDate:b,endDate:h},j),{},{ref:n,children:(0,s.jsx)(u.default,{highcharts:d.default,options:B})}))})},60963(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(32492),n),r(t(34306),n)},34306(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},16460(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(24887),n),r(t(18466),n),r(t(65452),n),r(t(74886),n),r(t(45909),n)},45909(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useAgChartsTheme=n.AgChartColor=void 0;const a=t(22155),r=t(54790);var i;!function(e){e.BLACK_1="black-1",e.BLUE_1="blue-1",e.BLUE_2="blue-2",e.BLUE_3="blue-3",e.BLUE_4="blue-4",e.PINK_1="pink-1",e.PINK_2="pink-2",e.PINK_3="pink-3",e.PURPLE_1="purple-1",e.GREEN_1="green-1",e.GREEN_2="green-2",e.GREEN_3="green-3",e.YELLOW_1="yellow-1",e.RED_1="red-1",e.GREY_1="grey-1",e.GREY_2="grey-2"}(i||(n.AgChartColor=i={})),n.useAgChartsTheme=e=>{const n=(0,r.useTheme)(),t=(0,a.useMemo)(()=>({[i.BLACK_1]:n.palette.common.black,[i.BLUE_1]:n.palette.primary.main,[i.BLUE_2]:n.extendedColors.social.color,[i.BLUE_3]:n.semanticColors.refrigerants.color,[i.BLUE_4]:n.semanticColors.hotelStays.color,[i.PINK_1]:n.extendedColors.economic.color,[i.PINK_2]:n.extendedColors.economicVariant.color,[i.PINK_3]:n.semanticColors.workFromHome.color,[i.GREEN_1]:n.extendedColors.environmental.color,[i.GREEN_2]:n.extendedColors.environmentalVariant.color,[i.GREEN_3]:n.semanticColors.finances.color,[i.PURPLE_1]:n.semanticColors.waste.color,[i.YELLOW_1]:n.semanticColors.transport.color,[i.RED_1]:n.semanticColors.heatAndSteam.color,[i.GREY_1]:n.semanticColors.materials.color}),[n]),o=(0,a.useMemo)(()=>{var n;const a=[i.BLUE_1,i.GREEN_1,i.PINK_3,i.BLUE_4,i.GREY_1,i.BLUE_3,i.RED_1,i.PURPLE_1,i.PINK_1,i.BLACK_1,i.RED_1,i.YELLOW_1],r=null===(n=(e&&0!==e.length?e:a)||a)||void 0===n?void 0:n.map(e=>t[e]||"").filter(Boolean);return r&&r.length>0?r:a},[e,n]);return{chartTheme:(0,a.useMemo)(()=>({palette:{fills:o,strokes:o},params:{fontFamily:"Plus Jakarta Sans",accentColor:n.palette.primary.main}}),[n,o]),legendTheme:(0,a.useMemo)(()=>({item:{marker:{shape:"circle"}}}),[n]),agChartColorMap:t}}},74886(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useCalculatedHighchartsOptions=function(e){let{title:n,startDate:t,endDate:l,size:s,legend:c,dataLabels:d,tooltip:u}=e;const p=(0,o.calculateInnerDimensions)({title:n,size:s,startDate:t,endDate:l});return{legend:(0,a.useLegendOptions)(c),tooltip:(0,i.useTooltipOptions)(u),dataLabels:(0,r.useDataLabelOptions)(d),chart:{width:p.width,height:p.height}}};const a=t(18466),r=t(24887),i=t(65452),o=t(19563)},24887(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useDataLabelOptions=function(){let{align:e="left",enabled:n=!1,formatter:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=(0,a.useTheme)(),o=i.sys.typescale.body.medium,l={align:e,enabled:n,className:r.chartClassNames.dataLabel,padding:0,style:{fontFamily:o.family,fontSize:"".concat(o.size,"px"),fontWeight:"400",height:o.lineHeight,color:i.sys.color.onSurface,letterSpacing:"0.25px"}};return t&&(l.formatter=t),l};const a=t(54790),r=t(46495)},18466(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useLegendOptions=function(){let{align:e="right",layout:n="vertical",verticalAlign:t="top",enabled:i=!0,labelFormat:o,labelFormatter:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=(0,a.useTheme)(),c=s.sys.typescale.body.medium,d={enabled:i,layout:n,align:e,verticalAlign:t,className:r.chartClassNames.dataLabel,itemMarginBottom:8,itemStyle:{fontFamily:c.family,fontSize:"".concat(c.size,"px"),fontWeight:"500",height:c.lineHeight,color:s.sys.color.onSurface,letterSpacing:"0.5px"},useHTML:!0};return o&&(d.labelFormat=o),l&&(d.labelFormatter=l),d};const a=t(54790),r=t(46495)},65452(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useTooltipOptions=function(e){let{unit:n,dimensionIn:t,explanations:i={}}=e;const o=(0,a.useTheme)(),{medium:l,small:s}=o.sys.typescale.label;return{animation:!1,enabled:!0,outside:!0,hideDelay:0,shadow:!1,borderWidth:0,borderRadius:12,padding:0,useHTML:!0,formatter(){const e="series"===t?this.series.name:this.key||"",a="".concat(r.formatters.number.format(this.y)," ").concat(n),c=e in i?"".concat(a,". ").concat(i[e]):a,d="padding: 12px 16px; border-radius: 12px; background-color: ".concat(o.sys.color.surfaceVariant),u="margin: 0 0 4px 0; font-size: ".concat(l.size,"px; font-weight: 600; line-height: ").concat(l.lineHeight,"px; letter-spacing: ").concat(l.tracking,"; color: ").concat(o.sys.color.onSurfaceVariant,";"),p="margin: 0; font-size: ".concat(s.size,"px; font-weight: ").concat(s.weight,"; line-height: 16px; letter-spacing: ").concat(s.tracking,"; color: ").concat(o.sys.color.onSurfaceVariant,";");return'\n        <div style="'.concat(d,'">\n          ').concat(e?'<h4 style="'.concat(u,'">').concat(e,"</h4>"):"",'\n          <p style="').concat(p,'">').concat(c,"</p>\n        </div>")}}};const a=t(54790),r=t(89922)},47107(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.AgChartColor=n.useAgChartsTheme=void 0;const o=i(t(66044)),l=i(t(29132)),s=i(t(69062));(0,l.default)(o.default),(0,s.default)(o.default),r(t(85122),n),r(t(91094),n),r(t(98125),n),r(t(60963),n),r(t(16508),n),r(t(46495),n),r(t(85996),n),r(t(9930),n),r(t(35540),n),r(t(70466),n);var c=t(16460);Object.defineProperty(n,"useAgChartsTheme",{enumerable:!0,get:function(){return c.useAgChartsTheme}}),Object.defineProperty(n,"AgChartColor",{enumerable:!0,get:function(){return c.AgChartColor}})},70466(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},41342(e,n,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.formatPieChartLegend=n.formatPieChartDataLabelPercentage=n.formatPieChartDataLabel=n.isDataEmpty=n.isValueEmpty=void 0;const r=a(t(59190)),i=t(19563),o=t(89922);n.isValueEmpty=(e,n)=>0===e?!!n:(0,r.default)(e),n.isDataEmpty=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1?arguments[1]:void 0;return!t.length||(null===(e=t.every)||void 0===e?void 0:e.call(t,e=>(0,n.isValueEmpty)(e.value,a)))},n.formatPieChartDataLabel=e=>'<span class="'.concat(i.chartClassNames.dataLabel,'">').concat(e,"</span>"),n.formatPieChartDataLabelPercentage=(e,n)=>{const t=o.formatters.number.format(n);return'<span class="'.concat(i.chartClassNames.dataLabelText,'">').concat(e," (").concat(t,"%)</span>")},n.formatPieChartLegend=(e,n,t)=>{const a=o.formatters.numberCompact.format(n),r=o.formatters.percentage.format(n/t*100);return'<span class="'.concat(i.chartClassNames.legendLabel,'">').concat(e,'</span> <span class="').concat(i.chartClassNames.legendLabelValue,'">- ').concat(a," (").concat(r,"%)</span>")}},29730(e,n,t){"use strict";var a,r;function i(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Checkbox=void 0;const l=t(65723),s=t(54790),c=o(t(55687)),d=o(t(49865)),u=t(90817),p=(0,s.styled)(u.Text)(a||(a=i(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),m=(0,s.styled)(d.default)(r||(r=i(["\n  svg {\n    path {\n      border: 2px solid ",";\n    }\n  }\n\n  .PrivateSwitchBase-input:checked ~ svg {\n    path {\n      fill: ",";\n    }\n  }\n\n  .PrivateSwitchBase-input:disabled ~ svg {\n    path {\n      opacity: 0.38;\n      fill: ",";\n      border: 2px solid ",";\n    }\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{theme:n}=e;return n.sys.color.onSurface});n.Checkbox=e=>{const{label:n,checked:t,onChange:a,name:r,disabled:i,indeterminate:o}=e;return(0,l.jsx)(c.default,{name:r,control:(0,l.jsx)(m,{checked:t,onChange:a,disabled:i,indeterminate:o}),label:(0,l.jsx)(p,{typescale:"label",size:"large",children:n})})}},45419(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Checkbox=void 0;var a=t(29730);Object.defineProperty(n,"Checkbox",{enumerable:!0,get:function(){return a.Checkbox}})},41284(e,n,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Chip=void 0;var r=t(60086);Object.defineProperty(n,"Chip",{enumerable:!0,get:function(){return a(r).default}})},81272(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Chip=void 0;var a=t(41284);Object.defineProperty(n,"Chip",{enumerable:!0,get:function(){return a.Chip}})},71536(e,n,t){"use strict";const a=["mode","mainContainerProps","additionalText","textProps"];var r,i,o,l,s,c,d,u,p;function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach(function(n){y(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function y(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function g(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var b=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.CircularProgress=void 0;const h=t(65723),v=t(22155),x=t(54790),T=b(t(40850)),O=t(90817),k=t(87283),j=t(89922),C=(0,x.styled)(k.Box)(r||(r=g(["\n  display: flex;\n  align-items: center;\n  position: relative;\n"]))),S=(0,x.styled)("div")(i||(i=g(["\n  display: flex;\n  position: relative:\n"]))),N=(0,x.styled)("div")(o||(o=g(["\n  display: flex;\n\n  ","\n"])),e=>"simple-center"===e.mode||"chart"===e.mode?"    \n    top: 0;\n    left: 0;\n    bottom: 0;\n    right: 0;\n    position: absolute;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    ":"margin-left: 6px;"),w=(0,x.styled)("div")(l||(l=g(["\n  display: inline-flex;\n  position: relative;\n"]))),D=(0,x.styled)(O.Text)(s||(s=g(["\n  position: absolute;\n  right: -14px;\n"]))),A=(0,x.styled)(O.Text)(c||(c=g(["\n  margin-left: 4px;\n  white-space: nowrap;\n"]))),R=(0,x.styled)(T.default)(d||(d=g(["\n  &.MuiCircularProgress-root {\n    z-index: 3;\n  }\n\n  .MuiCircularProgress-circle {\n    ",";\n  }\n"])),e=>{switch(e.color){case"primary":return"color: ".concat(e.theme.sys.color.primary);case"secondary":return"color: ".concat(e.theme.extendedColors.social.color);case"success":return"color: ".concat(e.theme.palette.success.main);case"error":return"color: ".concat(e.theme.palette.error.main);case"warning":return"color: ".concat(e.theme.palette.warning.main);default:return""}}),P=(0,x.styled)(T.default)(u||(u=g(["\n  &.MuiCircularProgress-root {\n    position: absolute;\n    z-index: 2;\n    /* The default is -90 deg and we need this to create the white gap before and after the main circle */\n    transform: rotate(-92deg) !important;\n  }\n\n  .MuiCircularProgress-circle {\n    color: ",";\n  }\n"])),e=>e.theme.sys.color.surface),L=(0,x.styled)(T.default)(p||(p=g(["\n  &.MuiCircularProgress-root {\n    position: absolute;\n    z-index: 1;\n  }\n\n  .MuiCircularProgress-circle {\n    color: ",";\n  }\n"])),e=>{switch(e.color){case"primary":return(0,j.opacifyHex)(e.theme.sys.color.primary,.1);case"secondary":return(0,j.opacifyHex)(e.theme.extendedColors.social.color,.1);case"success":return(0,j.opacifyHex)(e.theme.palette.success.main,.1);case"error":return(0,j.opacifyHex)(e.theme.palette.error.main,.1);case"warning":return(0,j.opacifyHex)(e.theme.palette.warning.main,.1);default:return"transparent"}});n.CircularProgress=e=>{let{mode:n="simple-right",mainContainerProps:t={},additionalText:r,textProps:i}=e,o=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const l=(0,v.useMemo)(()=>{switch(n){case"chart":return 160;case"simple-right":return 16;case"simple-center":return 50;default:return 40}},[n]),s=(0,v.useMemo)(()=>"chart"===n?{typescale:"display",size:"small"}:{typescale:"body",size:"medium"},[n]),c=(0,v.useMemo)(()=>"".concat(Math.round(o.value||0)).concat("chart"!==n?"%":""),[n,o.value]),d=(0,v.useMemo)(()=>({variant:"determinate",size:l,thickness:4.6,color:"primary"}),[l]);return(0,h.jsxs)(C,f(f({},t),{},{children:[(0,h.jsxs)(S,{children:[(0,h.jsx)(R,f(f({},d),o)),(0,h.jsx)(P,f(f(f({},d),o),{},{value:Math.min((o.value||0)+1,100)})),(0,h.jsx)(L,f(f(f({},d),o),{},{value:100}))]}),(0,h.jsxs)(N,{mode:n,children:[(0,h.jsxs)(w,{children:[(0,h.jsx)(O.Text,f(f(f({},s),i),{},{children:c})),"chart"===n&&(0,h.jsx)(D,{typescale:"label",size:"medium",children:"%"})]}),r&&(0,h.jsx)(A,f(f(f({},s),i),{},{children:r}))]})]}))}},21712(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CircularProgress=void 0;var a=t(71536);Object.defineProperty(n,"CircularProgress",{enumerable:!0,get:function(){return a.CircularProgress}})},92154(e,n,t){"use strict";const a=["label","error","name","value","disabled","format","onChange","onFocus"];var r,i,o,l;function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach(function(n){d(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function u(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.DatePicker=void 0;const m=t(65723),f=t(54790),y=t(41784),g=t(90844),b=t(32099),h=t(5267),v=p(t(18814)),x=p(t(38588)),T=t(22155),O=t(90817),k=p(t(61699)),j=p(t(28486)),C=(0,f.styled)("span")(r||(r=u(["\n  position: absolute;\n  top: 0;\n  left: 16px;\n  ","\n"])),e=>{let{theme:n}=e;return(0,O.textCss)(n,{typescale:"label",size:"medium"})}),S=(0,f.styled)("div")(i||(i=u(["\n  position: relative;\n"]))),N=(0,f.styled)(g.DatePicker)(o||(o=u(["\n  ",";\n\n  .MuiInputBase-input ~ .MuiOutlinedInput-notchedOutline,\n  .MuiOutlinedInput-notchedOutline {\n    border-color: ",";\n  }\n\n  .MuiOutlinedInput-notchedOutline,\n  .MuiInputBase-input:active ~ .MuiOutlinedInput-notchedOutline,\n  .MuiInputBase-input:hover ~ .MuiOutlinedInput-notchedOutline,\n  .MuiInputBase-input:focus\n    ~ .MuiOutlinedInput-notchedOutline.\n    .MuiFormControl-root-MuiTextField-root\n    .MuiInputBase-input\n    ~ .MuiOutlinedInput-notchedOutline {\n    border-color: ",";\n  }\n\n  .MuiInputBase-input {\n    padding-left: 16px;\n    padding-bottom: 8px;\n    z-index: 999;\n  }\n\n  .MuiOutlinedInput-notchedOutline {\n    top: 32px;\n    bottom: -9px;\n    margin-bottom: 9px;\n    border: 1px solid\n      ",";\n    border-top: none;\n    z-index: 0;\n    border-radius: 0px 0px 8px 8px;\n  }\n\n  svg {\n    z-index: 999;\n    top: unset !important;\n    right: 8px;\n\n    path {\n      fill: ",";\n    }\n  }\n"])),e=>{let{theme:n}=e;return(0,O.textCss)(n,{typescale:"body",size:"large"})},e=>e.error?e.theme.sys.color.error:e.theme.sys.color.primary,e=>e.error?e.theme.sys.color.error:e.theme.sys.color.primary,e=>e.error?e.theme.sys.color.error:e.theme.sys.color.outlineVariant,e=>{let{theme:n}=e;return n.sys.color.primary}),w=(0,f.styled)("p")(l||(l=u(["\n  padding-left: 16px;\n  ",";\n  color: ",";\n"])),e=>{let{theme:n}=e;return(0,O.textCss)(n,{typescale:"body",size:"small"})},e=>e.theme.sys.color.error);n.DatePicker=e=>{const{label:n,error:t,name:r,value:i,disabled:o,format:l="DD-MM-YYYY",onChange:s,onFocus:d}=e,u=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);v.default.extend(x.default),v.default.extend(k.default),v.default.extend(j.default);const p=(0,T.useCallback)(e=>{const n=(null==e?void 0:e.format("YYYY-MM-DDTHH:mm:ss.SSSZ"))||"";n.startsWith("0")||s(n)},[s]),f=(0,T.useMemo)(()=>i?(0,v.default)(new Date(i)):null,[i]);return(0,m.jsx)(h.LocalizationProvider,{dateAdapter:y.AdapterDayjs,children:(0,m.jsxs)(b.DemoItem,{label:(0,m.jsx)(S,{children:(0,m.jsx)(C,{children:n})}),children:[(0,m.jsx)(N,c(c({},u),{},{slotProps:void 0,format:l,value:f,name:r,onChange:e=>p(e),error:!!t,disabled:o,onOpen:d})),!!t&&(0,m.jsx)(w,{children:t})]})})}},79837(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DatePicker=void 0;var a=t(92154);Object.defineProperty(n,"DatePicker",{enumerable:!0,get:function(){return a.DatePicker}})},59792(e,n,t){"use strict";const a=["open","onClose","children"];var r;function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Dialog=n.RioDialog=void 0;const c=t(65723),d=t(22155),u=s(t(28104)),p=s(t(85221)),m=t(54790),f=(0,d.forwardRef)(function(e,n){return(0,c.jsx)(p.default,o({direction:"up",ref:n},e))}),y=(0,m.styled)("div")(r||(g=["\n  padding: 24px;\n  display: flex;\n  flex-direction: column;\n"],b||(b=g.slice(0)),r=Object.freeze(Object.defineProperties(g,{raw:{value:Object.freeze(b)}}))));var g,b;n.RioDialog=(0,d.forwardRef)(function(e,n){let{open:t,onClose:r,children:i}=e,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);return(0,c.jsx)(u.default,o(o({fullScreen:!0,open:t,onClose:r,TransitionComponent:f},l),{},{ref:n,children:(0,c.jsx)(y,{children:i})}))}),n.Dialog=n.RioDialog},11782(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Dialog=void 0;var a=t(59792);Object.defineProperty(n,"Dialog",{enumerable:!0,get:function(){return a.Dialog}})},87194(e,n,t){"use strict";var a,r,i=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),o=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),l=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},r(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=r(e),a=0;a<t.length;a++)"default"!==t[a]&&i(n,e,t[a]);return o(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.StyledDrawer=void 0,n.Drawer=function(e){let{children:t,className:a,defaultExpanded:r,onChange:i}=e;return(0,s.jsx)(n.StyledDrawer,{className:a,defaultExpanded:r,onChange:i,children:t})};const s=t(65723),c=t(54790),d=l(t(40190));var u,p;n.StyledDrawer=(0,c.styled)(d.default)(a||(u=["\n  &."," {\n    border-radius: 16px;\n    outline: 1px solid ",";\n    background: ",";\n    box-shadow: ",";\n\n    &."," {\n      margin: 0;\n    }\n  }\n\n  &:before {\n    height: 0px;\n    background-color: transparent;\n  }\n"],p||(p=u.slice(0)),a=Object.freeze(Object.defineProperties(u,{raw:{value:Object.freeze(p)}}))),d.accordionClasses.root,e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{theme:n}=e;return n.sys.elevation[1]},d.accordionClasses.expanded)},26346(e,n,t){"use strict";var a,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.StyledDrawerDetails=void 0,n.DrawerDetails=function(e){let{children:t,className:a,sx:r}=e;return(0,i.jsx)(n.StyledDrawerDetails,{className:a,sx:r,children:t})};const i=t(65723),o=t(54790),l=r(t(87248));var s,c;n.StyledDrawerDetails=(0,o.styled)(l.default)(a||(s=[""],c||(c=s.slice(0)),a=Object.freeze(Object.defineProperties(s,{raw:{value:Object.freeze(c)}}))))},33628(e,n,t){"use strict";var a,r,i=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),o=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),l=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},r(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=r(e),a=0;a<t.length;a++)"default"!==t[a]&&i(n,e,t[a]);return o(n,e),n}),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.StyledDrawerSummary=void 0,n.DrawerSummary=function(e){let{children:t,className:a,focusVisibleClassName:r,sx:i,expandIcon:o=(0,c.jsx)(m.default,{})}=e;const l=(0,p.default)(a);return(0,c.jsx)(n.StyledDrawerSummary,{className:l,focusVisibleClassName:r,sx:i,expandIcon:o,children:t})};const c=t(65723),d=t(54790),u=l(t(5922)),p=s(t(30395)),m=s(t(35855));var f,y;n.StyledDrawerSummary=(0,d.styled)(u.default)(a||(f=["\n  ."," {\n    color: ",";\n  }\n"],y||(y=f.slice(0)),a=Object.freeze(Object.defineProperties(f,{raw:{value:Object.freeze(y)}}))),u.accordionSummaryClasses.expandIconWrapper,e=>{let{theme:n}=e;return n.sys.color.primary})},64583(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DrawerSummary=n.DrawerDetails=n.Drawer=void 0;var a=t(87194);Object.defineProperty(n,"Drawer",{enumerable:!0,get:function(){return a.Drawer}});var r=t(26346);Object.defineProperty(n,"DrawerDetails",{enumerable:!0,get:function(){return r.DrawerDetails}});var i=t(33628);Object.defineProperty(n,"DrawerSummary",{enumerable:!0,get:function(){return i.DrawerSummary}})},24362(e,n,t){"use strict";const a=["children","to"];var r,i,o;function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach(function(n){c(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function c(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.DrawerLink=void 0;const u=t(65723),p=t(22155),m=t(97322),f=t(54790),y=t(90817),g=t(10916),b=(0,f.styled)(m.Link)(r||(r=d(["\n  display: flex;\n  width: 100%;\n  padding: 8px 12px;\n  justify-content: space-between;\n  align-items: center;\n  align-self: stretch;\n  border-radius: 16px;\n  outline: 1px solid ",";\n  background: ",";\n  box-shadow: ",";\n  text-decoration: none;\n  ","\n  color: ",";\n\n  &:hover {\n    cursor: pointer;\n  }\n\n  & * {\n    ","\n  }\n\n  &:hover {\n    background-color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{theme:n}=e;return n.sys.elevation[1]},e=>{let{theme:n}=e;return(0,y.textCss)(n,{typescale:"body",size:"medium"})},e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{theme:n}=e;return(0,y.textCss)(n,{typescale:"body",size:"medium"})},e=>{let{theme:n}=e;return n.sys.color.secondaryContainer}),h=(0,f.styled)("div")(i||(i=d(["\n  width: 24px;\n  height: 24px;\n"]))),v=(0,f.styled)(g.Icons.KeyboardArrowRight)(o||(o=d(["\n  width: 100%;\n  height: 100%;\n  fill: ",";\n"])),e=>e.theme.sys.color.primary);n.DrawerLink=(0,p.forwardRef)(function(e,n){let{children:t,to:r}=e,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);return(0,u.jsxs)(b,s(s({to:r,ref:n},i),{},{children:[t,(0,u.jsx)(h,{children:(0,u.jsx)(v,{})})]}))})},39219(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DrawerLink=void 0;var a=t(24362);Object.defineProperty(n,"DrawerLink",{enumerable:!0,get:function(){return a.DrawerLink}})},72266(e,n,t){"use strict";const a=["duration","color"];var r;function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.DurationProgress=void 0;const s=t(65723),c=t(54790),d=t(78364),u=t(89922),p=(0,c.styled)(d.LinearProgress)(r||(m=["\n  &.MuiLinearProgress-root {\n    width: 100%;\n    height: 8px;\n    border-radius: 16px;\n    width: 100%;\n    background-color: ",";\n  }\n\n  .MuiLinearProgress-bar1 {\n    width: auto;\n    border-radius: 16px;\n    animation: progress ","s linear forwards;\n    background-color: ",";\n  }\n\n  .MuiLinearProgress-bar2 {\n    display: none;\n  }\n\n  @keyframes progress {\n    from {\n      left: -35%;\n      right: 100%;\n    }\n\n    to {\n      left: 0%;\n      right: 0%;\n    }\n  }\n"],f||(f=m.slice(0)),r=Object.freeze(Object.defineProperties(m,{raw:{value:Object.freeze(f)}}))),e=>{switch(e.color){case"white":return(0,u.opacifyHex)("#FFFFFF",.5);case"black":return(0,u.opacifyHex)(e.theme.ref.palette.neutral[10],.5);default:return(0,u.opacifyHex)(e.theme.sys.color.primary,.5)}},e=>e.duration?e.duration/1e3:5,e=>{switch(e.color){case"white":return"#FFFFFF";case"black":return e.theme.ref.palette.neutral[10];default:return e.theme.sys.color.primary}});var m,f;n.DurationProgress=e=>{let{duration:n,color:t}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);return(0,s.jsx)(p,o(o({duration:n,color:t},r),{},{ref:r.ref,variant:"indeterminate"}))}},32769(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DurationProgress=void 0;var a=t(72266);Object.defineProperty(n,"DurationProgress",{enumerable:!0,get:function(){return a.DurationProgress}})},6105(e,n,t){"use strict";var a,r,i;function o(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorLayout=function(e){let{title:n,error:t,retry:a,clearAndRetry:r,withNoIcon:i}=e;const[o,s]=(0,f.useState)(!1),c=(0,f.useCallback)(()=>{s(e=>!e)},[s]),h=(0,f.useCallback)(()=>{a?a():window.location.reload()},[a]);return(0,l.jsxs)(d.Grid,{container:!0,size:12,spacing:1,direction:"column",alignItems:"center",justifyContent:"center",children:[!i&&(0,l.jsx)(d.Grid,{children:(0,l.jsx)(g,{})}),n&&(0,l.jsx)(d.Grid,{children:(0,l.jsx)(u.Text,{typescale:"title",size:"medium",children:n})}),t&&(0,l.jsxs)(y,{container:!0,direction:"row",spacing:2,children:[(0,l.jsx)(d.Grid,{children:(0,l.jsx)(p.Button,{variant:"outlined",color:"secondary",onClick:h,children:"Retry"})}),(0,l.jsx)(d.Grid,{children:(0,l.jsx)(p.Button,{variant:"outlined",color:"secondary",onClick:c,children:"Details"})}),r&&(0,l.jsx)(d.Grid,{children:(0,l.jsx)(p.Button,{variant:"outlined",color:"secondary",onClick:r.solution,children:r.title})})]}),(0,l.jsx)(m.Modal,{title:null==t?void 0:t.message,open:o,onClose:c,children:(null==t?void 0:t.stack)&&(0,l.jsx)(b,{children:null==t?void 0:t.stack})})]})};const l=t(65723),s=t(92743),c=t(54790),d=t(34398),u=t(90817),p=t(88454),m=t(72343),f=t(22155),y=(0,c.styled)(d.Grid)(a||(a=o(["\n  margin-top: 12px;\n"]))),g=(0,c.styled)(s.ReportProblemOutlined)(r||(r=o(["\n  fill: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.error}),b=(0,c.styled)("div")(i||(i=o(["\n  width: 400px;\n  max-height: 400px;\n  overflow-y: auto;\n"])))},3852(e,n,t){"use strict";function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function r(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.LoadFailed=function(e){return(0,i.jsx)(o.ErrorLayout,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach(function(n){r(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},e))};const i=t(65723),o=t(6105)},58381(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LoadFailed=void 0;var a=t(3852);Object.defineProperty(n,"LoadFailed",{enumerable:!0,get:function(){return a.LoadFailed}})},34618(e,n,t){"use strict";var a;function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.Footer=function(e){const n=(0,c.useMemo)(()=>(new Date).getFullYear(),[]);return(0,l.jsxs)(d,i(i({},e),{},{children:["© ",n," Rio AI Ltd"]}))};const l=t(65723),s=t(54790),c=t(22155),d=(0,s.styled)("footer")(a||(u=["\n  padding-left: 32px;\n  font-family: ",";\n  font-size: ","px;\n  font-style: normal;\n  font-weight: ",";\n  line-height: ","px;\n  color: ",";\n\n  background-color: ",";\n"],p||(p=u.slice(0)),a=Object.freeze(Object.defineProperties(u,{raw:{value:Object.freeze(p)}}))),e=>e.theme.sys.typescale.body.small.family,e=>e.theme.sys.typescale.label.small.size,e=>e.theme.sys.typescale.label.small.weight,e=>e.theme.sys.typescale.label.small.lineHeight,e=>e.theme.sys.color.onSurfaceVariant,e=>{let{theme:n}=e;return n.sys.color.surface});var u,p},2021(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Footer=void 0;var a=t(34618);Object.defineProperty(n,"Footer",{enumerable:!0,get:function(){return a.Footer}})},74752(e,n,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Grid=void 0;var r=t(3352);Object.defineProperty(n,"Grid",{enumerable:!0,get:function(){return a(r).default}})},34398(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Grid=void 0;var a=t(74752);Object.defineProperty(n,"Grid",{enumerable:!0,get:function(){return a.Grid}})},91594(e,n,t){"use strict";const a=["className","accounts","selectedAccount","onAccountChanged","onProfileClick","onResetToursClick","onLogoutClick","user","v2HideItems","notifications"];var r,i,o,l,s,c,d;function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach(function(n){m(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function m(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var y=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),g=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),b=this&&this.__importStar||function(){var e=function(n){return e=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},e(n)};return function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var a=e(n),r=0;r<a.length;r++)"default"!==a[r]&&y(t,n,a[r]);return g(t,n),t}}(),h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Header=void 0;const v=t(65723),x=t(92743),T=t(87283),O=t(68272),k=t(54790),j=h(t(30395)),C=h(t(49680)),S=b(t(22155)),N=t(88454),w=t(6675),D=t(33709),A=t(29374),R=t(20014),P=t(73920),L=(0,k.styled)("header",{shouldForwardProp:e=>"scrolling"!==e})(r||(r=f(["\n  position: relative;\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  align-items: center;\n  height: 72px;\n  min-height: 72px;\n  padding: 8px 18px;\n  background-color: ",";\n\n  &:after {\n    content: '';\n    display: block;\n    position: absolute;\n    top: 100%;\n    left: 0;\n    width: 100vw;\n    height: 40px;\n    background: linear-gradient(180deg, #fff 62%, rgba(255, 255, 255, 0) 100%);\n    background-position: ",";\n    max-height: ",";\n    transition:\n      max-height 0.3s linear,\n      background-position 0.3s linear;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{scrolling:n}=e;return n?"0% 0%":"0% -100%"},e=>{let{scrolling:n}=e;return n?"40px":"0px"}),I=(0,k.styled)("ul")(i||(i=f(["\n  display: flex;\n  list-style: none;\n  margin: 0;\n  padding: 0;\n  gap: 8px;\n"]))),E=(0,k.styled)("div")(o||(o=f(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  gap: 16px;\n\n  & ."," {\n    width: 166px;\n  }\n"])),O.selectClasses.select),_=(0,k.styled)(x.WorkspacePremiumOutlined)(l||(l=f(["\n  width: 18px;\n  height: 18px;\n"]))),F=(0,k.styled)(A.Select)(s||(s=f(["\n  width: 166px;\n"]))),B=(0,k.styled)(T.MenuItem)(c||(c=f(["\n  color: #a8a8aa;\n  cursor: auto;\n  user-select: text;\n  &:hover {\n    background-color: unset;\n  }\n"]))),U=(0,k.styled)(N.Button)(d||(d=f(["\n  width: 100%;\n"])));n.Header=e=>{let{className:n,accounts:t,selectedAccount:r,onAccountChanged:i,onProfileClick:o,onResetToursClick:l,onLogoutClick:s,user:c,v2HideItems:d=!0,notifications:u}=e,m=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const f=(0,S.useMemo)(()=>t.map(e=>({value:e.id,label:e.name,imgUrl:e.logo})),[t]),y=(0,j.default)(n,"Header"),[g,b]=S.default.useState(null),h=Boolean(g),O=(0,S.useCallback)(()=>{b(null)},[b]),k=e=>{e(),O()},[N,A]=(0,S.useState)(!1),[M,V]=(0,S.useState)(0),z=(0,S.useMemo)(()=>C.default.debounce(()=>A(!1),1e3),[]);return(0,S.useEffect)(()=>{function e(){const e=window.scrollY;A(0!==window.scrollY),V(e<=0?0:e),z()}return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[M]),(0,v.jsxs)(L,p(p({className:y,scrolling:N},m),{},{children:[(0,v.jsx)(D.Logo,{width:"70"}),(0,v.jsxs)(E,{className:"actions-container",children:[!d&&(0,v.jsxs)(U,{variant:"contained",to:"/v2/upgrade/courses",children:[(0,v.jsx)(_,{}),"Buy Courses"]}),(0,v.jsx)(F,{hasImage:!0,options:f,value:r,onChange:i,disabled:c.disableAccountSelector}),(0,v.jsxs)(I,{children:[(0,v.jsx)("li",{children:(0,v.jsx)(w.IconButton,{withThickBorder:!0,withHoverShadow:!0,focusable:!1,to:"/v2/contact",variant:"outlined",children:(0,v.jsx)(x.MailOutline,{})})}),(0,v.jsx)("li",{children:(0,v.jsx)(P.NotificationButton,{notifications:null==u?void 0:u.items,loading:null==u?void 0:u.loading,error:null==u?void 0:u.error,onNotificationClick:null==u?void 0:u.onNotificationClick})}),(0,v.jsxs)("li",{children:[(0,v.jsx)(R.ProfileButton,{focusable:!1,onClick:e=>{b(e.currentTarget)},profilePicture:c.profilePicture,variant:"outlined"}),(0,v.jsxs)(T.Menu,{id:"dropdown-profile-menu",anchorEl:g,open:h,onClose:O,children:[(0,v.jsx)(B,{children:c.fullname}),(0,v.jsxs)(T.MenuItem,{onClick:()=>k(o),children:[(0,v.jsx)(T.ListItemIcon,{children:(0,v.jsx)(x.ManageAccountsOutlined,{})}),"Profile"]}),!d&&(0,v.jsxs)(T.MenuItem,{onClick:()=>k(l),children:[(0,v.jsx)(T.ListItemIcon,{children:(0,v.jsx)(x.ResetTvOutlined,{})}),"Reset Tours"]}),(0,v.jsxs)(T.MenuItem,{onClick:()=>{localStorage.setItem("from_logout","true"),localStorage.removeItem("failed_url"),k(s)},children:[(0,v.jsx)(T.ListItemIcon,{children:(0,v.jsx)(x.LogoutOutlined,{})}),"Logout"]})]})]})]})]})]}))}},73920(e,n,t){"use strict";var a,r,i,o,l,s,c;function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.NotificationButton=void 0;const u=t(65723),p=t(22155),m=t(92743),f=t(87283),y=t(54790),g=t(6675),b=(0,y.styled)(f.Menu)(a||(a=d(["\n  ."," {\n    min-width: 320px;\n    max-height: 400px;\n    overflow-y: auto;\n  }\n"])),f.paperClasses.root),h=(0,y.styled)(f.MenuItem)(r||(r=d(["\n  display: flex;\n  flex-direction: row;\n  align-items: flex-start;\n  padding: 16px;\n  border-bottom: 1px solid ",";\n  border-left: 4px solid\n    ",";\n\n  &:last-child {\n    border-bottom: none;\n  }\n\n  &:hover {\n    background-color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.outline},e=>{let{theme:n,status:t}=e;return"overdue"===t?n.sys.color.error:n.customColors.warning.color},e=>{let{theme:n}=e;return n.sys.color.surfaceVariant}),v=(0,y.styled)(f.Box)(i||(i=d(["\n  margin-right: 12px;\n  margin-top: 2px;\n  color: ",";\n"])),e=>{let{theme:n,status:t}=e;return"overdue"===t?n.sys.color.error:n.customColors.warning.color}),x=(0,y.styled)(f.Box)(o||(o=d(["\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n"]))),T=(0,y.styled)(f.Typography)(l||(l=d(["\n  font-weight: 600;\n  margin-bottom: 4px;\n"]))),O=(0,y.styled)(f.Typography)(s||(s=d(["\n  color: ",";\n  font-size: 12px;\n  margin-bottom: 8px;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),k=(0,y.styled)(f.Box)(c||(c=d(["\n  padding: 24px;\n  text-align: center;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant});n.NotificationButton=e=>{let{notifications:n=[],loading:t=!1,error:a=!1,onNotificationClick:r}=e;const[i,o]=(0,p.useState)(null),l=Boolean(i),s=()=>{o(null)},c=n.length;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(g.IconButton,{withThickBorder:!0,withHoverShadow:!0,focusable:!1,variant:"outlined",onClick:e=>{o(e.currentTarget)},"aria-label":"".concat(c," notifications"),children:(0,u.jsx)(f.Badge,{badgeContent:c>0?c:void 0,color:"error",children:(0,u.jsx)(m.NotificationsOutlined,{})})}),(0,u.jsxs)(b,{id:"notification-menu",anchorEl:i,open:l,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[t&&(0,u.jsx)(k,{children:(0,u.jsx)(f.Typography,{children:"Loading notifications..."})}),a&&(0,u.jsx)(k,{children:(0,u.jsx)(f.Typography,{children:"Error loading notifications"})}),!t&&!a&&0===c&&(0,u.jsx)(k,{children:(0,u.jsx)(f.Typography,{children:"No new notifications"})}),!t&&!a&&n.map(e=>(0,u.jsxs)(h,{status:e.status,onClick:()=>{return n=e.id,null==r||r(n),void s();var n},children:[(0,u.jsx)(v,{status:e.status,children:(0,u.jsx)(m.DocumentScanner,{fontSize:"small"})}),(0,u.jsxs)(x,{children:[(0,u.jsx)(T,{variant:"body2",children:e.title}),(0,u.jsx)(O,{variant:"caption",children:e.message}),e.date&&(0,u.jsx)(O,{variant:"caption",sx:{marginTop:"2px",fontSize:"11px"},children:e.date})]})]},e.id))]})]})}},20014(e,n,t){"use strict";const a=["profilePicture"];var r;function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.ProfileButton=function(e){let{profilePicture:n}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const r=(0,c.useMemo)(()=>n?(0,s.jsx)(m,{src:n}):(0,s.jsx)(d.PermIdentityOutlined,{}),[n]);return(0,s.jsx)(p.IconButton,o(o({withThickBorder:!0,withHoverShadow:!0},t),{},{children:r}))};const s=t(65723),c=t(22155),d=t(92743),u=t(54790),p=t(6675),m=(0,u.styled)("img")(r||(f=["\n  width: 36px;\n  border-radius: 50%;\n"],y||(y=f.slice(0)),r=Object.freeze(Object.defineProperties(f,{raw:{value:Object.freeze(y)}}))));var f,y},12839(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NotificationButton=n.Header=void 0;var a=t(91594);Object.defineProperty(n,"Header",{enumerable:!0,get:function(){return a.Header}});var r=t(73920);Object.defineProperty(n,"NotificationButton",{enumerable:!0,get:function(){return r.NotificationButton}})},67934(e,n,t){"use strict";const a=["focusable","className","tabIndex"];var r;function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var s=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),c=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),d=this&&this.__importStar||function(){var e=function(n){return e=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},e(n)};return function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var a=e(n),r=0;r<a.length;r++)"default"!==a[r]&&s(t,n,a[r]);return c(t,n),t}}(),u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.IconButton=void 0;const p=t(65723),m=t(54790),f=d(t(93756)),y=u(t(73474)),g=u(t(30395)),b="primary",h=(0,m.styled)(f.default)(r||(v=["\n  border: 0;\n  min-height: 40px;\n  height: 40px;\n  width: 40px;\n  min-width: 40px;\n  border-radius: 50%;\n  display: flex;\n  padding: 4px;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  gap: 10px;\n  flex-shrink: 0;\n\n  & svg {\n    height: 24px;\n    width: 24px;\n  }\n\n  &:not(:disabled) {\n    cursor: pointer;\n  }\n\n  //Filled Variant\n  &."," {\n    &:focus:not(:disabled) {\n      background-color: ",";\n    }\n    &:active,\n    &:hover:active,\n    &:active:hover {\n      outline: none;\n      background-color: ",";\n    }\n\n    &:hover {\n      ","\n      background-color: ",";\n    }\n  }\n\n  // Standard Variant\n  &."," {\n    background-color: transparent;\n\n    & svg {\n      color: ",";\n    }\n\n    &:focus:not(:disabled) {\n      & svg {\n        color: ",";\n      }\n      border: "," solid\n        ",";\n      background-color: ",";\n    }\n\n    &:active:not(:disabled),\n    &:active:hover:not(:disabled),\n    &:hover:active:not(:disabled) {\n      border: none;\n      color: ",";\n      background-color: ",";\n    }\n\n    &:hover:not(:disabled) {\n      background-color: ",";\n      & svg {\n        color: ",";\n      }\n    }\n\n    &:disabled {\n      opacity: 0.38;\n    }\n  }\n\n  &."," {\n    background-color: ",";\n    ","\n    & svg {\n      color: ",";\n    }\n\n    &:hover:not(:disabled) {\n      ","\n      background-color: ",";\n    }\n\n    &:focus:not(:disabled) {\n      ","\n    }\n\n    &:active:not(:disabled),\n    &:active:hover:not(:disabled),\n    &:hover:active:not(:disabled) {\n      ","\n      background-color: ",";\n    }\n\n    &:disabled {\n      opacity: 0.38;\n      box-shadow: none;\n      background-color: ",";\n    }\n  }\n\n  // Outlined Variant\n  &."," {\n    background-color: ",";\n    border: "," solid\n      ",";\n    &:focus:not(.focusable) {\n      box-shadow: none;\n      border: "," solid\n        ",";\n    }\n    &:active {\n      background-color: #f1efff;\n    }\n    &:focus {\n      border: "," solid\n        ",";\n    }\n    svg {\n      color: ",";\n    }\n    &.standard {\n      &.Mui-disabled {\n        outline: none;\n        border: none;\n        background-color: ",";\n      }\n    }\n    &.toggleable {\n      &.isOn {\n        outline: none;\n        background-color: ",";\n        &:hover {\n          background-color: ",";\n        }\n        svg {\n          color: ",";\n        }\n        &:focus {\n          outline: "," solid\n            ",";\n        }\n        &:active {\n          outline: none;\n          background-color: ",";\n        }\n        &.Mui-disabled {\n          outline: none;\n          border: none;\n          background-color: ",";\n        }\n      }\n    }\n  }\n"],x||(x=v.slice(0)),r=Object.freeze(Object.defineProperties(v,{raw:{value:Object.freeze(x)}}))),f.buttonClasses.contained,e=>{let{theme:n,color:t=b}=e;return n.sys.color[t]},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][10]},e=>{let{theme:n,withHoverShadow:t}=e;return t?"box-shadow: ".concat(n.sys.elevation[1],";"):""},e=>{let{theme:n,color:t=b}=e;return n.sys.color[t]},f.buttonClasses.text,e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant},e=>{let{theme:n,color:t=b}=e;return n.sys.color[t]},e=>{let{withThickBorder:n}=e;return n?"1.5px":"1px"},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][80]},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][95]},e=>{let{theme:n,color:t=b}=e;return n.sys.color[t]},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][80]},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][95]},e=>{let{theme:n,color:t=b}=e;return n.sys.color[t]},f.buttonClasses.outlined,e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{theme:n,withHoverShadow:t,color:a=b}=e;return t?"box-shadow: 0px 0px 0px 1px ".concat(n.ref.palette[a][80]," inset;"):""},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant},e=>{let{theme:n,withHoverShadow:t,color:a=b}=e;return t?"box-shadow: 0px 0px 0px 1px ".concat(n.ref.palette[a][80]," inset, ").concat(n.sys.elevation[4],";"):""},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][95]},e=>{let{theme:n,withHoverShadow:t,color:a=b}=e;return t?"box-shadow: 0px 0px 0px 4px ".concat(n.ref.palette[a][80]," inset;"):""},e=>{let{theme:n,withHoverShadow:t,color:a=b}=e;return t?"box-shadow: 0px 0px 0px 1px ".concat(n.ref.palette[a][80]," inset;"):""},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][90]},e=>{let{theme:n}=e;return(0,y.default)(n.sys.color.onSurface,n.customStates.disabled.stateLayerOpacity)},f.buttonClasses.outlined,e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{withThickBorder:n}=e;return n?"1.5px":"1px"},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{withThickBorder:n}=e;return n?"1.5px":"1px"},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{withThickBorder:n}=e;return n?"1.5px":"1px"},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][80]},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant},e=>{let{theme:n}=e;return(0,y.default)(n.sys.color.onSurface,n.customStates.disabled.stateLayerOpacity)},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][95]},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][90]},e=>{let{theme:n,color:t=b}=e;return n.sys.color[t]},e=>{let{withThickBorder:n}=e;return n?"1.5px":"1px"},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][70]},e=>{let{theme:n,color:t=b}=e;return n.ref.palette[t][80]},e=>{let{theme:n}=e;return(0,y.default)(n.sys.color.onSurface,n.customStates.disabled.stateLayerOpacity)});var v,x;n.IconButton=e=>{let{focusable:n=!0,className:t,tabIndex:r}=e,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const l=(0,g.default)({focusable:n},t);return(0,p.jsx)(h,o(o({},i),{},{className:l,tabIndex:n?r:-1}))}},6675(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IconButton=void 0;var a=t(67934);Object.defineProperty(n,"IconButton",{enumerable:!0,get:function(){return a.IconButton}})},25877(e,n,t){"use strict";var a;const r=["color"];function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.ArrowUp=n.ArrowDown=void 0;const s=t(65723),c=t(54790),d=t(59049),u=t(34414);var p,m;n.ArrowDown=(0,d.buildIcon)(e=>{let{color:n}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,r);return(0,s.jsx)(u.Svg,o(o({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{},{children:(0,s.jsx)("g",{id:"expand_circle_down",children:(0,s.jsx)("path",{id:"Vector",d:"M10.0533 6.39594L8 8.44927L5.94666 6.39594L4.99999 7.33594L8 10.3359L11 7.33594L10.0533 6.39594ZM8 1.33594C4.31999 1.33594 1.33333 4.3226 1.33333 8.0026C1.33333 11.6826 4.31999 14.6693 8 14.6693C11.68 14.6693 14.6667 11.6826 14.6667 8.0026C14.6667 4.3226 11.68 1.33594 8 1.33594ZM8 13.3359C5.05333 13.3359 2.66666 10.9493 2.66666 8.0026C2.66666 5.05594 5.05333 2.66927 8 2.66927C10.9467 2.66927 13.3333 5.05594 13.3333 8.0026C13.3333 10.9493 10.9467 13.3359 8 13.3359Z",fill:n})})}))}),n.ArrowUp=(0,c.styled)(n.ArrowDown)(a||(p=["\n  & {\n    transform: rotate(180deg);\n  }\n"],m||(m=p.slice(0)),a=Object.freeze(Object.defineProperties(p,{raw:{value:Object.freeze(m)}}))))},79913(e,n,t){"use strict";const a=["color"];function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.Clear=void 0;const l=t(65723),s=t(59049),c=t(34414);n.Clear=(0,s.buildIcon)(e=>{let{color:n}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);return(0,l.jsx)(c.Svg,i(i({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{},{children:(0,l.jsx)("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:n})}))})},6166(e,n,t){"use strict";function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function r(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach(function(n){i(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function i(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.Download=void 0;const o=t(65723),l=t(34414),s=t(59049);n.Download=(0,s.buildIcon)(e=>(0,o.jsx)(l.Svg,r(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,o.jsx)("path",{d:"M18 15V18H6V15H4V18C4 19.1 4.9 20 6 20H18C19.1 20 20 19.1 20 18V15H18ZM17 11L15.59 9.59L13 12.17V4H11V12.17L8.41 9.59L7 11L12 16L17 11Z",fill:e.color})})))},58577(e,n,t){"use strict";const a=["width","height"];function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.NoData=void 0;const l=t(65723),s=t(34414),c=t(59049);n.NoData=(0,c.buildIcon)(e=>{let{width:n=152,height:t=152}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);return(0,l.jsxs)(s.Svg,i(i({width:n,height:t,viewBox:"0 0 152 152",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),{},{children:[(0,l.jsx)("circle",{cx:"76",cy:"76",r:"76",fill:"url(#paint0_linear_58416_60369)"}),(0,l.jsx)("path",{d:"M78 26C60.0659 26 41 30.7797 41 39.6562V104.344C41 113.213 60.0659 118 78 118C95.9341 118 115 113.22 115 104.344V39.6562C115 30.7797 95.9341 26 78 26ZM78 28.875C98.0961 28.875 112.098 34.5531 112.098 39.6562C112.098 44.7594 98.0961 50.4375 78 50.4375C57.9039 50.4375 43.902 44.7594 43.902 39.6562C43.902 34.5531 57.9039 28.875 78 28.875ZM78 115.125C57.9039 115.125 43.902 109.447 43.902 104.344V88.2509C46.579 90.6228 51.019 92.6497 56.9608 94.1087C57.0747 94.137 57.1916 94.1515 57.309 94.1519C57.6653 94.1581 58.0114 94.0341 58.2814 93.8038C58.5513 93.5734 58.7263 93.2527 58.7729 92.9027C58.8196 92.5527 58.7346 92.198 58.5342 91.9061C58.3338 91.6142 58.032 91.4056 57.6863 91.32C49.3069 89.25 43.902 85.915 43.902 82.7812V66.6812C46.579 69.0531 51.019 71.08 56.9608 72.5391C57.0747 72.5673 57.1916 72.5818 57.309 72.5822C57.6653 72.5884 58.0114 72.4645 58.2814 72.2341C58.5513 72.0037 58.7263 71.683 58.7729 71.333C58.8196 70.983 58.7346 70.6283 58.5342 70.3364C58.3338 70.0445 58.032 69.8359 57.6863 69.7503C49.3069 67.6875 43.902 64.3453 43.902 61.2188V45.205C49.9018 50.4878 64.2737 53.3125 78 53.3125C91.7263 53.3125 106.098 50.5094 112.098 45.2266V61.2188C112.098 64.3669 106.635 67.7306 98.1831 69.7862C97.9926 69.8084 97.8083 69.8676 97.6409 69.9603C97.4734 70.053 97.326 70.1775 97.2071 70.3267C97.0882 70.4759 97.0001 70.6468 96.9479 70.8297C96.8956 71.0126 96.8803 71.2039 96.9026 71.3927C96.925 71.5814 96.9847 71.764 97.0783 71.9299C97.1719 72.0958 97.2976 72.2418 97.4482 72.3596C97.5988 72.4774 97.7713 72.5647 97.9559 72.6165C98.1405 72.6682 98.3336 72.6834 98.5241 72.6612C98.6415 72.6609 98.7585 72.6464 98.8724 72.6181C104.901 71.1806 109.399 69.1106 112.098 66.7172V82.7812C112.098 85.9366 106.635 89.3003 98.1831 91.3559C97.8336 91.4347 97.5259 91.6388 97.3193 91.929C97.1127 92.2192 97.0218 92.5749 97.0642 92.9275C97.1065 93.2801 97.2791 93.6047 97.5487 93.8387C97.8183 94.0728 98.1657 94.1997 98.5241 94.195C98.6415 94.1946 98.7585 94.1802 98.8724 94.1519C104.901 92.7144 109.399 90.6444 112.098 88.2509V104.344C112.098 109.447 98.0961 115.125 78 115.125Z",fill:"#006C4B"}),(0,l.jsx)("path",{d:"M78.14 91C73.8589 91 69.9598 92.8893 68.2085 95.8066C68.1102 95.9696 68.045 96.1504 68.0164 96.3387C67.9879 96.5271 67.9966 96.7192 68.0421 96.9041C68.0877 97.0891 68.1691 97.2632 68.2817 97.4164C68.3944 97.5697 68.536 97.6991 68.6986 97.7973C68.9169 97.9274 69.1655 97.9974 69.4193 98C69.6696 97.9972 69.9149 97.929 70.131 97.8021C70.3471 97.6751 70.5266 97.4939 70.6517 97.2761C71.877 95.2347 74.8824 93.8666 78.1184 93.8666C81.2247 93.8666 84.086 95.1045 85.4193 97.0155C85.6456 97.3087 85.9753 97.5035 86.3403 97.5596C86.7054 97.6158 87.078 97.529 87.3813 97.3173C87.6845 97.1056 87.8953 96.785 87.9701 96.4217C88.0449 96.0585 87.978 95.6802 87.7833 95.365C85.9238 92.6867 82.2193 91 78.14 91Z",fill:"#006C4B"}),(0,l.jsx)("path",{d:"M69.5243 76.4757C69.8113 76.7214 70.1804 76.8498 70.5579 76.8352C70.9354 76.8207 71.2935 76.6642 71.5607 76.397C71.8278 76.1299 71.9843 75.7718 71.9989 75.3943C72.0135 75.0168 71.8851 74.6476 71.6393 74.3607L69.7043 72.4182L71.6393 70.4757C71.8851 70.1887 72.0135 69.8196 71.9989 69.4421C71.9843 69.0646 71.8278 68.7065 71.5607 68.4393C71.2935 68.1722 70.9354 68.0157 70.5579 68.0011C70.1804 67.9865 69.8113 68.1149 69.5243 68.3607L67.5818 70.2957L65.6393 68.3607C65.3524 68.1149 64.9833 67.9865 64.6057 68.0011C64.2282 68.0157 63.8701 68.1722 63.603 68.4393C63.3358 68.7065 63.1793 69.0646 63.1647 69.4421C63.1502 69.8196 63.2786 70.1887 63.5243 70.4757L65.4593 72.4182L63.5243 74.3607C63.3673 74.4952 63.2398 74.6606 63.1497 74.8467C63.0597 75.0328 63.0091 75.2355 63.0011 75.4421C62.9931 75.6487 63.0279 75.8547 63.1034 76.0472C63.1788 76.2397 63.2932 76.4145 63.4393 76.5607C63.5855 76.7068 63.7603 76.8212 63.9528 76.8966C64.1453 76.9721 64.3513 77.0069 64.5579 76.9989C64.7645 76.9909 64.9672 76.9403 65.1533 76.8503C65.3394 76.7602 65.5048 76.6327 65.6393 76.4757L67.5818 74.5407L69.5243 76.4757Z",fill:"#006C4B"}),(0,l.jsx)("path",{d:"M92.5674 68.4326C92.2887 68.1555 91.9117 68 91.5187 68C91.1258 68 90.7487 68.1555 90.47 68.4326L88.5437 70.3515L86.6174 68.4326C86.3328 68.1889 85.9667 68.0615 85.5924 68.076C85.218 68.0904 84.8629 68.2456 84.598 68.5106C84.333 68.7755 84.1778 69.1306 84.1634 69.505C84.1489 69.8794 84.2763 70.2454 84.52 70.53L86.4389 72.4563L84.52 74.3826C84.3642 74.516 84.2378 74.6801 84.1485 74.8646C84.0592 75.0492 84.009 75.2502 84.0011 75.4551C83.9932 75.6599 84.0277 75.8642 84.1025 76.0551C84.1773 76.246 84.2907 76.4193 84.4357 76.5643C84.5807 76.7093 84.754 76.8227 84.9449 76.8975C85.1358 76.9723 85.3401 77.0068 85.5449 76.9989C85.7498 76.991 85.9508 76.9408 86.1354 76.8515C86.3199 76.7622 86.484 76.6358 86.6174 76.48L88.5437 74.5611L90.47 76.48C90.7546 76.7237 91.1206 76.8511 91.495 76.8366C91.8694 76.8222 92.2245 76.667 92.4894 76.402C92.7544 76.1371 92.9096 75.782 92.924 75.4076C92.9385 75.0333 92.8111 74.6672 92.5674 74.3826L90.6485 72.4563L92.5674 70.53C92.8445 70.2513 93 69.8742 93 69.4813C93 69.0883 92.8445 68.7113 92.5674 68.4326Z",fill:"#006C4B"}),(0,l.jsx)("defs",{children:(0,l.jsxs)("linearGradient",{id:"paint0_linear_58416_60369",x1:"76",y1:"0",x2:"76",y2:"152",gradientUnits:"userSpaceOnUse",children:[(0,l.jsx)("stop",{"stop-color":"#08EBA7","stop-opacity":"0.15"}),(0,l.jsx)("stop",{offset:"1","stop-color":"#08EBA7","stop-opacity":"0"})]})})]}))})},1689(e,n,t){"use strict";const a=["color","isActive"];function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.RioBot=void 0;const l=t(65723),s=t(34414),c=t(59049);n.RioBot=(0,c.buildIcon)(e=>{let{color:n,isActive:t}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);return(0,l.jsxs)(s.Svg,i(i({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),{},{children:[(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9958 8.02071C13.2065 5.23138 8.68406 5.23138 5.89473 8.02071C3.1054 10.81 3.1054 15.3324 5.89473 18.1218C8.68406 20.9111 13.2065 20.9111 15.9958 18.1218C18.7851 15.3324 18.7851 10.81 15.9958 8.02071ZM10.9441 16.6424C12.9165 16.6424 14.5154 15.0435 14.5154 13.0711C14.5154 11.0987 12.9165 9.49983 10.9441 9.49983C8.97175 9.49983 7.37284 11.0987 7.37284 13.0711C7.37284 15.0435 8.97175 16.6424 10.9441 16.6424Z",fill:t?n:"#46464F"}),(0,l.jsx)("path",{opacity:"0.6",d:"M17.1644 19.1504C17.949 19.2321 18.5188 19.9344 18.4371 20.719C18.3554 21.5037 17.6531 22.0735 16.8684 21.9918C16.0838 21.9101 15.514 21.2078 15.5957 20.4231C15.6774 19.6385 16.3797 19.0687 17.1644 19.1504Z",fill:t?n:"#46464F"}),(0,l.jsx)("path",{opacity:"0.6",fillRule:"evenodd",clipRule:"evenodd",d:"M14.009 2.95357C14.4687 2.08111 15.5487 1.74653 16.4211 2.20626C18.9305 3.52853 20.92 5.70301 22.0052 8.34827C22.3795 9.26066 21.9433 10.3037 21.0309 10.678C20.1185 11.0523 19.0755 10.6161 18.7012 9.70376C17.936 7.83856 16.5295 6.30009 14.7563 5.36573C13.8838 4.90599 13.5493 3.82604 14.009 2.95357Z",fill:t?n:"#46464F"}),(0,l.jsx)("path",{opacity:"0.6",d:"M2.84184 6.03911C3.88878 4.99217 5.58619 4.99217 6.63313 6.03911C7.68006 7.08604 7.68006 8.78346 6.63313 9.83039C5.58619 10.8773 3.88878 10.8773 2.84184 9.83039C1.79491 8.78346 1.79491 7.08604 2.84184 6.03911Z",fill:t?n:"#46464F"})]}))})},58608(e,n,t){"use strict";const a=["color","isActive"];var r;function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.SaudiVision=void 0;const s=t(65723),c=t(54790),d=t(34414),u=t(59049),p=(0,c.styled)(d.Svg)(r||(m=["\n  border: 1px solid;\n  border-radius: 12px;\n"],f||(f=m.slice(0)),r=Object.freeze(Object.defineProperties(m,{raw:{value:Object.freeze(f)}}))));var m,f;n.SaudiVision=(0,u.buildIcon)(e=>{let{color:n,isActive:t}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);return(0,s.jsxs)(p,o(o({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),{},{children:[(0,s.jsx)("path",{d:"M27,4H5c-2.209,0-4,1.791-4,4V24c0,2.209,1.791,4,4,4H27c2.209,0,4-1.791,4-4V8c0-2.209-1.791-4-4-4Zm3,20c0,1.654-1.346,3-3,3H5c-1.654,0-3-1.346-3-3V8c0-1.654,1.346-3,3-3H27c1.654,0,3,1.346,3,3V24Z"}),(0,s.jsx)("path",{d:"M25.47,15.008c.105-.506-.616-3.171-.092-2.76,.071-.184-.288-.624-.39-.863-.362,1.107,.47,3.281,.2,4.749-.205,.431-1.607,.948-1.937,1.134,.74,.218,2.5-.651,2.218-2.26Z",fill:"#000"}),(0,s.jsx)("path",{d:"M10.505,16.004c.189-.342,.23-.711,.203-1.119,.285-.116,.625-.309,.739-.323-.078,.268,.108,.557,.485,.52,.075,2.143,.346,1.695,.235-.061,.244-.113,.285-.331,.376-.424,.529,.867,1.302-.28,.818-.752-.005,.039-.118,.415-.118,.415,0,0,.108,.114,.113,.17-.117,.14-.654,.045-.621-.172,.026-.059,.152-.363-.028-.182-.163,.166-.247,.518-.574,.578,.021-.738-.397-2.077-.198-2.519,.186,.233,.189,.069,.075-.16-.189-.337-.287-.981-.469-.283,.189,.786,.217,2.078,.349,2.962-.361-.07-.248-.325-.244-.489-.049-.033-.698,.313-.968,.396-.032-.274-.072-.521-.089-.724,1.012-.097,.623-1.314,.414-1.883,.025-.034,.297,.197,.133-.076-.251-.317-.358-.681-.477-.079,.157,.294,.301,1.089,.451,1.42-.103,.073-.337,.195-.569,.188,.019-.348-.281-1.172-.047-1.233,.161,.185,.185,.105,.072-.126-.195-.297-.349-1.048-.488-.321,.167,.343,.096,.842,.207,1.609-.632-.338-.133-1.385-.652-1.885-.024,.057-.13,.41-.13,.41,.515,.73-.338,2.343-1.17,1.331-.098-.544,.476-2.27-.336-.957-.16,.529-.555,2.134-1.013,.927-.089-.336,.098-1.28-.115-.503-.119,.293,.045,1.443,.567,1.308,.471-.253,.488-1.453,.854-1.754-.724,1.53,.977,2.599,1.429,.747,.013,.287,.224,.749,.612,.848,.023,.228,.06,.525,.094,.838-.072,.022-.144,.042-.217,.059-.605-1.576-2.019,.892-.179,.401,.024,.072,.04,.143,.042,.207-.852,1.187-3.966,1.185-1.934-.889,.066,.024,.191,.147,.18,.158,.073-.112,.11-.232-.09-.308,.33-.876-.875-.159-.14,.119-.149,.156-.5,.385-.715,.519-.167,.094-.68,.407-.803,.479-.057,.104,.455-.213,.61-.266-1.488,2.836,2.314,2.381,3.326,.88Zm-3.208-.938c.106-.053,.207-.104,.29-.15-1.363,2.364,2.618,1.812,2.664,.131,.069-.021,.138-.044,.208-.068,.024,.255,.041,.505,.042,.723-.365,.429-1.203,.928-1.945,1.131-1.368,.433-1.852-.966-1.259-1.766Z",fill:"#000"}),(0,s.jsx)("path",{d:"M16.342,16.611c.242-.267,1.915-.721,2.199-.864,.025-.071,.148-.321,.156-.373-.557,.05-2.089,.134-2.7,.103,.126-.108,.736-.422,1.182-.554,.042,.074,.073,.148,.079,.212,.032-.033,.056-.142,.048-.253,.293-.093,.443-.124,.508-.142,.041-.053,.114-.268,.125-.425-.359-.659-1.502-.446-.957,.322-.457,.192-1.222,.541-1.44,.856l-.035,.017c-.009,.017-.069,.266-.089,.343-.262-.782-.341-1.798-.795-2.093-.247,.506,.507,1.512,.517,2.056-.142,.33-1.991,1.757-2.309,.939,1.134-.431,2.304-1.185,1.336-2.289-.01-.041,.115,.017,.188,.02,.053-.113-.348-.347-.448-.46-.089-.016-.103,.303-.102,.38,.123,.179,.492,.887,.586,1.102-.139,.177-.837,.553-1.518,.863,.005-.176,.414-.656,.299-.786-.283,.515-.322-.323-.122-.485,.201-.642-.663,.951-.09,.897-.06,.114-.134,.253-.187,.419-.792,.369-2,.72-2.528,.893,.029-.094,.025-.174-.006-.15-.542,.637-.017-.81-.096-.67-.302,.23-.48,1.59,.087,.861,.44-.099,1.918-.203,2.471-.534,.084,1.499,2.627-.297,2.513-1.062,.064,.906,.55,1.539,1.847,1.609,.003-.103-.038-.425-.038-.425-.164-.023-.579-.086-.68-.326Zm-.913-.73c.257,.005,1.655-.032,1.921-.04-.491,.171-1.171,.271-1.14,.96-.403-.091-.624-.464-.781-.92Z",fill:"#000"}),(0,s.jsx)("path",{d:"M12.822,13.817c.459-.246,.482-1.398,.854-1.685-.765,1.473,1.05,2.445,1.404,.667,.322,1.701,2.18,.64,1.302-.691-.241-.549,.228,.023,.066-.334-.251-.316-.358-.681-.477-.079,.16,.291,.317,1.085,.451,1.42-1.359,.72-.927-1.166-1.428-1.825-.024,.057-.13,.41-.13,.41,.838,1.883-1.884,2.344-.998,.137-.447-.722-.639,1.657-1.145,1.614-.411,0-.413-.913-.358-1.107-.292,.019-.146,1.653,.458,1.473Z",fill:"#000"}),(0,s.jsx)("path",{d:"M23.777,14.233c.057,.949,.148,1.852,.117,2.524,.349-.356,.155-1.494,.145-2.223,.438,.519,.919,1.113,1.024,1.678,.013,.036,.069-.11,.06-.338,.048-.4-.665-1.312-1.115-1.788,.058-.461-.361-1.665-.114-1.934,.161,.186,.185,.105,.072-.126-.194-.304-.337-1.009-.476-.298,.17,.367,.134,1.245,.25,2.057-.385-.43-.627-.687-.828-.906,.011-.189-.181-.792,.017-.716,.161,.185,.185,.105,.072-.127-.205-.324-.348-1.024-.491-.286,.133,.193,.073,.417,.129,.814-.3-.442-.684-.627-.168-.578-.212-.149-1.029-.919-.813-.171,.305,.143,.63,.818,1.022,1.192,.063,.847,.258,2.221,.288,3.015-.809,.711-.96,.011-1.425-.246,.002-.225-.005-.444-.005-.573,.11-.505-.579-3.324-.041-2.908-.042-.23-.467-1.414-.568-.555,.225,.773,.255,2.393,.371,3.462,.011,.101,.024,.291,.035,.497-.002,0-.003-.001-.004-.002-.664,.19-.965,2.265-1.701,1.066,1.334-1.002,.41-3.321,.327-4.613,.008-.082,.139,.112,.207,.126,.049-.187-.281-.67-.399-.912-.476,.972,.751,3.11,.284,4.421,.061-.629-.685-1.392-1.221-1.883,.048-.267-.519-2.128-.024-1.609,.045-.023-.005-.16-.067-.282-.198-.331-.312-.975-.476-.273,.137,.173,.197,1.62,.287,1.904-.317-.37-1.855-1.462-1.123-1.362-.006-.02-.038-.068-.119-.117-.276-.09-.873-.788-.694-.054,.038,.003,.106,.049,.155,.107,.379,.518,1.263,1.37,1.843,1.886,.221,2.776,.599,3.546,.278,.267,.461,.469,.995,.976,1.103,1.565-.097,.201-.238,.38-.445,.525-.058-.379,.005-.686-.05-.715-.115,.07-.081,.556-.059,.79-1.629,.876-1.893,1.088,.063,.311,.679,1.706,1.129-.408,1.804-.783,.018,.016,.033,.025,.051,.04,.007,.215,.008,.399-.001,.459,.09-.001,.139-.14,.165-.33,1.967,1.537,1.697-1.371,1.455-2.888,.33,.384,.542,.608,.806,.888Z",fill:"#000"}),(0,s.jsx)("path",{fill:"#000",d:"M22.159,20.66h0s-1.5,0-1.5,0c.115-.083,.176-.205,.159-.327-.01-.077-.087-.135-.181-.143h-.047c-.114,.011-.196,.093-.184,.183l.005,.035,.006,.053c.006,.067,0,.134-.019,.199H9.313c.165,.24,.465,.386,.789,.386l10.116-.006c-.116,.083-.176,.205-.16,.328,.012,.09,.114,.154,.227,.143,.114-.011,.196-.093,.184-.183l-.005-.035-.006-.053c-.006-.067,0-.134,.019-.2h1.248s.035,.058,.035,.058c.031,.053,.071,.1,.117,.142l.064,.053h0c.126,.088,.287,.14,.456,.14,.16,0,.289-.111,.289-.248v-.072c0-.25-.237-.453-.529-.453Z"})]}))})},34414(e,n,t){"use strict";var a;Object.defineProperty(n,"__esModule",{value:!0}),n.Svg=void 0;const r=t(54790),i=["color"];var o,l;n.Svg=(0,r.styled)("svg",{shouldForwardProp:e=>!i.includes(e)})(a||(o=[""],l||(l=o.slice(0)),a=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(l)}}))))},57287(e,n,t){"use strict";function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function r(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach(function(n){i(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function i(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.Upload=void 0;const o=t(65723),l=t(34414),s=t(59049);n.Upload=(0,s.buildIcon)(e=>(0,o.jsx)(l.Svg,r(r({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,o.jsx)("path",{d:"M18 15V18H6V15H4V18C4 19.1 4.9 20 6 20H18C19.1 20 20 19.1 20 18V15H18ZM7 9L8.41 10.41L11 7.83V16H13V7.83L15.59 10.41L17 9L12 4L7 9Z",fill:e.color})})))},59049(e,n,t){"use strict";function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function r(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach(function(n){i(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function i(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.buildIcon=void 0;const l=t(65723),s=o(t(22155)),c=t(54790),d=t(27951);n.buildIcon=e=>s.default.forwardRef((n,t)=>{const a=(0,c.useTheme)(),i=(0,d.useFindColorByToken)()(n.color);return(0,l.jsx)(e,r(r({},n),{},{color:i||n.color||a.sys.color.primary,ref:t}))})},10916(e,n,t){"use strict";var a,r=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),o=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),o=0;o<t.length;o++)"default"!==t[o]&&r(n,e,t[o]);return i(n,e),n});Object.defineProperty(n,"__esModule",{value:!0}),n.Icons=n.CustomIcons=void 0;const l=o(t(92743));n.Icons=l;const s=t(25877),c=t(79913),d=t(57287),u=t(1689),p=t(6166),m=t(58577),f=t(58608);n.CustomIcons={ArrowDown:s.ArrowDown,ArrowUp:s.ArrowUp,Clear:c.Clear,Upload:d.Upload,Download:p.Download,NoData:m.NoData,RioBot:u.RioBot,SaudiVision:f.SaudiVision}},10278(e,n,t){"use strict";var a,r,i,o,l,s,c,d;function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach(function(n){m(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function m(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var y=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ImageEditor=void 0;const g=t(65723),b=t(22155),h=y(t(92467)),v=t(76916),x=t(30467),T=t(90817),O=t(88454),k=t(54790),j=t(35615),C=(0,k.styled)("div")(a||(a=f(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n"]))),S=(0,k.styled)("div")(r||(r=f(["\n  /* +4px for the border */\n  width: ","px;\n  height: ","px;\n  position: relative;\n  margin-bottom: 40px;\n  border: 3px solid ",";\n"])),256,256,e=>e.theme.sys.color.primary),N=(0,k.styled)("div")(i||(i=f(["\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n\n  .reactEasyCrop_CropArea {\n    border: none;\n  }\n\n  ","\n"])),e=>!e.isImageEditable&&"\n    .reactEasyCrop_CropArea.reactEasyCrop_CropAreaGrid {\n      width: 100%;\n      height: 100%;\n    }\n\n    .reactEasyCrop_Image.reactEasyCrop_Contain {\n      width: 100%;\n      height: 100%;\n    }\n  "),w=(0,k.styled)(T.Text)(o||(o=f(["\n  text-align: center;\n  cursor: pointer;\n  margin-bottom: 20px;\n"]))),D=(0,k.styled)(x.Slider)(l||(l=f(["\n  .MuiSlider-rail {\n    background-color: ",";\n  }\n"])),e=>e.theme.sys.color.inversePrimary),A=(0,k.styled)("div")(s||(s=f(["\n  /* Height of the Slider */\n  height: 40px;\n"]))),R=(0,k.styled)(O.Button)(c||(c=f(["\n  margin-top: 40px;\n  width: 100%;\n"]))),P=(0,k.styled)(T.Text)(d||(d=f(["\n  display: inline;\n  text-decoration: underline;\n"]))),L={x:0,y:0},I={width:0,height:0,x:0,y:0};n.ImageEditor=e=>{let{onSave:n,defaultImageSrc:t="",onError:a,onSuccess:r,shouldResetAfterSuccess:i=!1}=e;const o=(0,b.useRef)(null),l=(0,b.useCallback)(()=>{var e;null===(e=o.current)||void 0===e||e.click()},[]),[s,c]=(0,b.useState)(!1),[d,u]=(0,b.useState)(t||""),[m,f]=(0,b.useState)(""),y=(0,b.useMemo)(()=>d.startsWith("data:image"),[d]),[x,T]=(0,b.useState)(1),[O,k]=(0,b.useState)(L),[E,_]=(0,b.useState)(I),F=(0,b.useCallback)(async e=>{if(e[0])try{c(!0);const n=await(0,j.readFile)(e[0]);c(!1),u(n),f(e[0].type)}catch(e){null==a||a("Error at uploading image (".concat(e.message,")"),"danger"),c(!1)}},[a]),{getRootProps:B,getInputProps:U}=(0,v.useDropzone)({onDrop:F,multiple:!1,accept:{"image/*":[".png",".jpeg",".jpg",".svg",".gif"]},noClick:!!d}),M=(0,b.useCallback)(async()=>{if(d)try{c(!0);const e=await(0,j.getCroppedImageBlobUrl)(d,E,m);await n(e),null==r||r("File saved successfully","success"),c(!1),i&&(T(1),k(L),_(I))}catch(e){c(!1),null==a||a("Error at cropping image (".concat(e.message,")"),"danger")}},[E,d,n,a,i,m]);return(0,g.jsxs)(C,{children:[(0,g.jsxs)(w,{typescale:"body",size:"medium",textAlign:"center",onClick:l,children:["Drag and drop an image or"," ",(0,g.jsx)(P,{typescale:"body",size:"medium",children:"click here"})," ","to upload"]}),(0,g.jsx)(S,p(p({},B()),{},{children:(0,g.jsxs)(N,{isImageEditable:y,children:[(0,g.jsx)("input",p(p({},U()),{},{ref:o})),(0,g.jsx)(h.default,{image:d,aspect:1,showGrid:!1,zoom:x,onZoomChange:e=>y&&T(e),crop:O,onCropChange:e=>y&&k(e),onCropComplete:(e,n)=>y&&_(n)})]})})),y?(0,g.jsx)(D,{min:1,max:3,step:.1,value:x,onChange:(e,n)=>T(n),disabled:!y}):(0,g.jsx)(A,{}),(0,g.jsx)(R,{variant:"contained",onClick:M,disabled:s||!y,children:"Save"})]})}},41966(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ImageEditor=void 0;var a=t(10278);Object.defineProperty(n,"ImageEditor",{enumerable:!0,get:function(){return a.ImageEditor}})},35615(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.readFile=n.getCroppedImageBlobUrl=n.createImage=void 0,n.createImage=e=>new Promise((n,t)=>{const a=new Image;a.addEventListener("load",()=>n(a)),a.addEventListener("error",e=>t(e)),a.crossOrigin="Anonymous",a.src=e}),n.getCroppedImageBlobUrl=async(e,t,a)=>{const r=await(0,n.createImage)(e),i=document.createElement("canvas"),o=i.getContext("2d"),l=Math.max(r.width,r.height)/2*Math.sqrt(2)*2;if(i.width=l,i.height=l,o){o.translate(l/2,l/2),o.translate(-l/2,-l/2),o.drawImage(r,l/2-.5*r.width,l/2-.5*r.height);const e=o.getImageData(0,0,l,l);i.width=t.width,i.height=t.height,o.putImageData(e,Math.round(0-l/2+.5*r.width-t.x),Math.round(0-l/2+.5*r.height-t.y))}return i.toDataURL(a,.7)},n.readFile=e=>new Promise((n,t)=>{const a=new FileReader;a.addEventListener("load",()=>n(a.result),{once:!0}),a.addEventListener("error",()=>t(new Error("Error at uploading the files")),{once:!0}),a.readAsDataURL(e)})},78364(e,n,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.LinearProgress=void 0;var r=t(41822);Object.defineProperty(n,"LinearProgress",{enumerable:!0,get:function(){return a(r).default}})},89348(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LinearProgress=void 0;var a=t(78364);Object.defineProperty(n,"LinearProgress",{enumerable:!0,get:function(){return a.LinearProgress}})},95186(e,n,t){"use strict";var a,r=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),o=this&&this.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},a(e)},function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t=a(e),o=0;o<t.length;o++)"default"!==t[o]&&r(n,e,t[o]);return i(n,e),n}),l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Loader=void 0;const s=t(65723),c=l(t(19316)),d=o(t(18418)),u=o(t(9794));n.Loader=e=>{let{size:n=90,theme:t="light"}=e;const a={loop:!0,autoplay:!0,animationData:"dark"===t?d:u,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}};return(0,s.jsx)(c.default,{options:a,width:n,height:n,isClickToPauseDisabled:!0})}},37829(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Loader=void 0;var a=t(95186);Object.defineProperty(n,"Loader",{enumerable:!0,get:function(){return a.Loader}})},26290(e,n,t){"use strict";function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function r(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach(function(n){i(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function i(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.Logo=function(e){return(0,o.jsxs)("svg",r(r({width:"99",height:"56",viewBox:"0 0 99 60",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M81.1421 19.7839C73.3316 11.9734 60.6683 11.9734 52.8579 19.7839C45.0474 27.5944 45.0474 40.2577 52.8579 48.0682C60.6684 55.8786 73.3317 55.8786 81.1421 48.0682C88.9526 40.2577 88.9526 27.5944 81.1421 19.7839ZM67 43.926C72.5229 43.926 77 39.4489 77 33.926C77 28.4032 72.5229 23.926 67 23.926C61.4772 23.926 57 28.4032 57 33.926C57 39.4489 61.4772 43.926 67 43.926Z",fill:"#2E3EFF"}),(0,o.jsx)("path",{opacity:"0.8",d:"M44.308 14.2341C47.2396 11.3025 51.9926 11.3025 54.9241 14.2341C57.8557 17.1656 57.8557 21.9186 54.9241 24.8502C51.9926 27.7817 47.2396 27.7817 44.308 24.8502C41.3765 21.9186 41.3765 17.1656 44.308 14.2341Z",fill:"#E442FF"}),(0,o.jsx)("path",{opacity:"0.8",d:"M82.4143 51.9479C84.6114 52.1767 86.207 54.1433 85.9782 56.3403C85.7493 58.5374 83.7828 60.133 81.5857 59.9042C79.3886 59.6754 77.793 57.7088 78.0218 55.5117C78.2507 53.3146 80.2172 51.719 82.4143 51.9479Z",fill:"#917FFE"}),(0,o.jsx)("path",{opacity:"0.8",fillRule:"evenodd",clipRule:"evenodd",d:"M75.5766 5.59518C76.8639 3.15217 79.8879 2.21529 82.3309 3.5026C89.3574 7.20512 94.9282 13.294 97.9669 20.701C99.0151 23.2558 97.7936 26.1765 95.2389 27.2247C92.6841 28.2728 89.7634 27.0514 88.7152 24.4966C86.5726 19.2738 82.6344 14.9659 77.6692 12.3495C75.2261 11.0622 74.2893 8.03819 75.5766 5.59518Z",fill:"#08EBA7"}),(0,o.jsx)("path",{d:"M35.9582 11.926C34.3582 11.926 32.9582 11.351 31.7582 10.201C30.6082 9.00098 30.0332 7.60098 30.0332 6.00097C30.0332 4.40098 30.6082 3.00098 31.7582 1.80098C32.9582 0.600976 34.3582 0.000976562 35.9582 0.000976562C37.6082 0.000976562 39.0082 0.600976 40.1582 1.80098C41.3582 3.00098 41.9582 4.40098 41.9582 6.00097C41.9582 7.60098 41.3582 9.00098 40.1582 10.201C39.0082 11.351 37.6082 11.926 35.9582 11.926ZM31.1582 52.926V15.426H40.8332V52.926H31.1582Z",fill:"#2E3EFF"}),(0,o.jsx)("path",{d:"M9.675 21.876C11 19.501 14 17.3947 16.1 16.476C17.9516 15.6659 21.3655 14.9223 24 14.676C24.7803 14.603 25.4923 14.676 26.075 14.676V25.476C23.125 25.126 17.475 25.726 15.125 27.276C12.825 28.826 9.675 31.401 9.675 35.001V52.926H0V15.426H9.675V21.876Z",fill:"#2E3EFF"})]}))};const o=t(65723)},33709(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Logo=void 0;var a=t(26290);Object.defineProperty(n,"Logo",{enumerable:!0,get:function(){return a.Logo}})},81302(e,n,t){"use strict";const a=["children","collapsibleChildren","title","titleClassName","viewportHeight","viewportWidth","titleMaxWidth","maxWidth","modalSurfaceProps"];var r,i,o,l,s,c;function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach(function(n){p(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function p(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Modal=n.ModalSurface=void 0;const y=t(65723),g=t(22155),b=t(54790),h=f(t(30395)),v=f(t(43289)),x=t(90817),T=t(34398),O=t(87283),k=t(88454);n.ModalSurface=(0,b.styled)(T.Grid)(r||(r=m(["\n  position: absolute;\n  width: ",";\n  max-width: ",";\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  height: ",";\n  overflow-y: auto;\n\n  display: flex;\n  padding: 32px;\n  flex-flow: column nowrap;\n  align-items: flex-start;\n\n  border-radius: 16px;\n  border: 1px solid ",";\n  background: ",";\n  box-shadow: ",";\n\n  /* Makes the modal scrollable when it's too big (leaves 4%/4% padding at top and bottom) */\n  max-height: 92%;\n"])),e=>{let{viewportWidth:n}=e;return n?"".concat(n,"vw"):"90%"},e=>{let{maxWidth:n}=e;return n||"800px"},e=>{let{viewportHeight:n}=e;return n?"".concat(n,"vh"):"auto"},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{theme:n}=e;return n.sys.elevation[0]});const j=(0,b.styled)(T.Grid)(i||(i=m(["\n  display: flex;\n  width: 100%;\n  gap: 32px;\n\n  &.titled {\n    margin-bottom: 32px;\n  }\n"]))),C=(0,b.styled)(x.Text)(o||(o=m(["\n  flex: 1;\n  margin: 0;\n  ","\n"])),e=>e.maxWidth?"max-width: ".concat(e.maxWidth,"px;"):"").withComponent("h2"),S=(0,b.styled)("div")(l||(l=m(["\n  width: 24px;\n  height: 24px;\n  cursor: pointer;\n  align-left: flex-end;\n"]))),N=(0,b.styled)(k.Button)(s||(s=m(["\n  margin-bottom: 10px;\n"]))),w=(0,b.styled)(T.Grid)(c||(c=m(["\n  flex: 1;\n"]))),D=()=>{const e=(0,b.useTheme)();return(0,y.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,y.jsx)("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:e.sys.color.onSurfaceVariant})})};n.Modal=e=>{let{children:t,collapsibleChildren:r,title:i,titleClassName:o,viewportHeight:l,viewportWidth:s,titleMaxWidth:c,maxWidth:d,modalSurfaceProps:p}=e,m=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const[f,b]=(0,g.useState)(!1),x=(0,g.useCallback)(()=>{b(e=>!e)},[]),T=(0,g.useCallback)(e=>{var n;null===(n=m.onClose)||void 0===n||n.call(m,e,"closeButtonClick")},[m.onClose]),k=(0,h.default)(o,{titled:!!i});return(0,y.jsx)(v.default,u(u({},m),{},{children:(0,y.jsxs)(n.ModalSurface,u(u({},p),{},{viewportHeight:l,viewportWidth:s,maxWidth:d,container:!0,children:[(m.onClose||i)&&(0,y.jsxs)(j,{className:k,children:[(0,y.jsx)(C,{typescale:"title",size:"large",maxWidth:c,children:i}),m.onClose&&(0,y.jsx)(S,{onClick:T,children:(0,y.jsx)(D,{})})]}),(0,y.jsx)(w,{container:!0,direction:"column",size:12,children:t}),r&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(N,{variant:"outlined",onClick:x,children:f?"Show Details":"Hide Details"}),(0,y.jsx)(O.Collapse,{in:!f,children:r})]})]}))}))}},72343(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Modal=void 0;var a=t(81302);Object.defineProperty(n,"Modal",{enumerable:!0,get:function(){return a.Modal}})},43450(e,n,t){"use strict";const a=["error","label","value","options","loadMore","onChange","disabled","onCreate","newValue","isLoading","helperText","placeholder","handleClearOption","loadMoreSize","hasMore"];function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.MultiSelect=void 0;const l=t(65723),s=t(87283),c=t(22155),d=t(24804),u=t(10916),p=t(37829),m=t(51074),f=25;n.MultiSelect=e=>{const{error:n,label:t,value:r,options:o,loadMore:y,onChange:g,disabled:b,onCreate:h,newValue:v,isLoading:x,helperText:T,placeholder:O,handleClearOption:k,loadMoreSize:j=f,hasMore:C}=e,S=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a),[N,w]=(0,c.useState)(0),D=(0,c.useMemo)(()=>[...o].sort((e,n)=>{var t,a;const r=(null===(t=e.label)||void 0===t?void 0:t.toLowerCase())||"",i=(null===(a=n.label)||void 0===a?void 0:a.toLowerCase())||"",o="create new";return r.startsWith(o)?-1:i.startsWith(o)?1:r.localeCompare(i)}),[o]),A=(0,c.useRef)(null),R=(0,d.useTheme)(),P=r?r.map(e=>"string"==typeof e?o.find(n=>n.value===e):e).filter(e=>void 0!==e):[],L=(0,c.useCallback)(e=>{const n=o.filter(n=>e.includes(n.value));n.map(e=>e.value).includes(v||"NEW")&&h?h():g(n)},[v,g,o]),I=(0,c.useCallback)(e=>{e.stopPropagation(),g([])},[g]),E=(0,c.useCallback)(e=>{const n=(null==P?void 0:P.filter(n=>n.value!==e))||[];g(n)},[g,P]),_=(0,c.useCallback)(e=>{e.stopPropagation()},[]),F=x&&(0,l.jsx)(m.LoaderWrapper,{children:(0,l.jsx)(p.Loader,{size:25})}),B=(0,c.useCallback)(e=>(0,l.jsxs)(m.BlockStyled,{children:[(0,l.jsx)(m.ChipWrapper,{children:e.map(e=>{var n;return(0,l.jsx)(s.Chip,{clickable:!0,disabled:b,label:null===(n=o.find(n=>n.value===e))||void 0===n?void 0:n.label,onDelete:()=>E(e),deleteIcon:(0,l.jsx)(u.Icons.Clear,{onMouseDown:_,fontSize:"small"})},e)})}),!!e.length&&!b&&(0,l.jsx)(u.Icons.Clear,{onMouseDown:_,onClick:I,fontSize:"small"})]}),[E,_,I,b]),U=(0,c.useMemo)(()=>D.map(e=>(0,l.jsxs)(m.MenuItemStyled,{value:e.value,children:[e.label,k&&"NEW"!==e.value&&(0,l.jsx)(u.Icons.Clear,{sx:{color:R.palette.grey[400],cursor:"pointer"},onClick:n=>{n.stopPropagation(),k(e.value)}})]},e.value)),[D,k,_,R.palette.grey]);return(0,l.jsxs)(m.StyledFormControl,{variant:"standard",disabled:b,children:[t&&(0,l.jsx)(m.StyledLabel,{children:t}),(0,l.jsxs)(m.StyledSelect,i(i({},S),{},{multiple:!0,ref:A,value:P.map(e=>{let{value:n}=e;return n}),onChange:e=>{let{target:{value:n}}=e;return L(n)},renderValue:B,MenuProps:{PaperProps:{onScroll:async e=>{const n=e.currentTarget;if(n){const e=n.scrollHeight-n.clientHeight;n.scrollTop>=e-1&&C&&(async()=>{const e=N+j;w(e),await(null==y?void 0:y(j,e))})()}},style:{maxHeight:224,width:250}}},children:[U,F]})),n&&(0,l.jsx)(m.StyledHelperText,{error:!!n,children:"boolean"==typeof n?T:n}),T&&!n&&(0,l.jsx)(m.StyledHelperText,{children:T})]})}},49951(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MultiSelect=void 0;var a=t(43450);Object.defineProperty(n,"MultiSelect",{enumerable:!0,get:function(){return a.MultiSelect}})},51074(e,n,t){"use strict";var a,r,i,o,l,s,c,d,u;function p(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var m=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.MenuItemStyled=n.BlockStyled=n.ChipWrapper=n.LoaderWrapper=n.StyledSelect=n.StyledMenuImage=n.StyledHelperText=n.StyledLabel=n.StyledFormControl=void 0;const f=m(t(7617)),y=m(t(73474)),g=t(54790),b=t(60086),h=t(68272),v=t(87283),x=t(90817);n.StyledFormControl=(0,g.styled)(v.FormControl)(a||(a=p(["\n  width: 100%;\n\n  label.Mui-focused {\n    color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.primary}),n.StyledLabel=(0,g.styled)(v.InputLabel)(r||(r=p(["\n  padding-left: 16px;\n  top: 4px;\n\n  &."," {\n    padding-left: 22px;\n    top: 0;\n  }\n"])),v.inputLabelClasses.shrink),n.StyledHelperText=(0,g.styled)(v.FormHelperText)(i||(i=p(["\n  padding-left: 16px;\n  color: ",";\n"])),e=>e.error&&e.theme.sys.color.error),n.StyledMenuImage=(0,g.styled)("img")(o||(o=p(["\n  width: 100%;\n  height: 54px;\n"]))),n.StyledSelect=(0,g.styled)(v.Select)(l||(l=p(["\n  display: inline-flex;\n  width: 100%;\n  cursor: pointer;\n  height: auto;\n\n  ."," {\n    margin-right: 8px;\n    overflow: hidden;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n    padding: 8px 24px 8px 16px;\n  }\n\n  ","\n\n  &:hover {\n    &:before {\n      border: 1px solid ",";\n      border-top: none;\n    }\n  }\n\n  &:before {\n    height: 9px;\n    border: 1px solid ",";\n    border-radius: 0px 0px 8px 8px;\n    border-top: none;\n  }\n\n  &:after {\n    height: 9px;\n    border-radius: 0px 0px 8px 8px;\n    border: 2px solid ",";\n    border-top: none;\n  }\n\n  svg {\n    top: unset !important;\n    right: 8px;\n    cursor: 'pointer';\n\n    path {\n      fill: ",";\n    }\n  }\n\n  ."," {\n    padding-left: 16px;\n\n    &:focus {\n      background: transparent;\n    }\n  }\n"])),h.selectClasses.select,e=>{let{theme:n}=e;return(0,x.textCss)(n,{typescale:"label",size:"large"})},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.primary},h.selectClasses.select),n.LoaderWrapper=(0,g.styled)("div")(s||(s=p(["\n  display: flex;\n  justify-content: center;\n  width: 100%;\n"]))),n.ChipWrapper=(0,g.styled)(f.default)(c||(c=p(["\n  display: flex;\n  flex-wrap: wrap;\n  gap: 0.5rem;\n\n  ."," {\n    ","\n    color: ",";\n    height: 20px;\n  }\n\n  ."," {\n    background-color: ",";\n\n    &:hover {\n      background-color: ",";\n    }\n  }\n\n  ."," {\n    path {\n      fill: "," !important;\n    }\n  }\n"])),b.chipClasses.root,e=>{let{theme:n}=e;return(0,x.textCss)(n,{typescale:"label",size:"large"})},e=>{let{theme:n}=e;return n.sys.color.onSecondary},b.chipClasses.filled,e=>{let{theme:n}=e;return(0,y.default)(n.sys.color.primary,.8)},e=>{let{theme:n}=e;return(0,y.default)(n.sys.color.primary,.6)},b.chipClasses.deleteIcon,e=>{let{theme:n}=e;return n.sys.color.onSecondary}),n.BlockStyled=(0,g.styled)("div")(d||(d=p(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 24px;\n"]))),n.MenuItemStyled=(0,g.styled)(v.MenuItem)(u||(u=p(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n"])))},58346(e,n,t){"use strict";var a,r,i,o,l;function s(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.NavigationDrawer=void 0;const d=t(65723),u=t(54790),p=c(t(30395)),m=c(t(73474)),f=t(22155),y=t(97322),g=t(90817),b=c(t(8948)),h=(0,u.styled)("div")(a||(a=s(["\n  gap: 2px;\n  display: flex;\n  flex-direction: column;\n"]))),v=(0,u.styled)(g.Text)(r||(r=s(["\n  color: ",";\n  padding: 32px 16px 4px;\n  display: block;\n  margin: 0;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),x=(0,u.styled)("div")(i||(i=s(["\n  & {\n    ",";\n    color: ",";\n    cursor: pointer;\n    width: 100%;\n    border-radius: 100px;\n    padding: 6px 8px 6px 16px;\n    display: flex;\n    gap: 4px;\n    align-items: center;\n    justify-content: space-between;\n    min-width: 250px;\n\n    a {\n      display: block;\n      width: 100%;\n    }\n\n    &:hover {\n      background-color: ",";\n    }\n\n    &.active {\n      background-color: ",";\n\n      &:hover {\n        background-color: ",";\n      }\n    }\n\n    &.active > a,\n    &.active > p,\n    &:hover > p,\n    &:hover > a {\n      color: ",";\n    }\n  }\n"])),e=>{let{theme:n}=e;return(0,g.textCss)(n,{typescale:"body",size:"medium"})},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant},e=>{let{theme:n}=e;return(0,m.default)(n.sys.color.onSurface,.08)},e=>{let{theme:n}=e;return(0,m.default)(n.sys.color.primaryContainer,.6)},e=>{let{theme:n}=e;return n.sys.color.primaryContainer},e=>{let{theme:n}=e;return n.sys.color.primary}),T=(0,u.styled)(g.Text)(o||(o=s(["\n  & {\n    color: ",";\n    margin: 0px;\n    text-decoration: none;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),O=(0,u.styled)("img")(l||(l=s(["\n  width: 24px;\n  height: 24px;\n  transform: rotate(0deg);\n  transition: all 0.3s;\n\n  &.rotateArrow {\n    transform: rotate(-90deg);\n    transition: all 0.3s;\n  }\n"]))),k=T.withComponent(y.Link);n.NavigationDrawer=e=>{const{title:n,items:t=[],itemStyle:a}=e,r=e=>{let{item:n,to:t,icon:r=null,onClick:i}=e;return t?(0,d.jsxs)(k,{preventScrollReset:!0,typescale:"title",size:"medium",to:t,onClick:i,style:a,children:[n,r]}):(0,d.jsxs)(T,{typescale:"title",size:"medium",onClick:i,style:a,children:[n,r]})},i=(e,n)=>{const[t,a]=(0,f.useState)(!0),i=(0,p.default)({rotateArrow:t});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(x,{onClick:()=>a(!t),children:[(0,d.jsx)(r,{item:e}),n&&(0,d.jsx)(O,{className:i,src:b.default})]}),t&&n.map(e=>(0,d.jsx)(x,{className:e.isActive?"active":"",children:(0,d.jsx)(r,{to:e.to,item:e.item,onClick:e.onClick})}))]})};return(0,d.jsxs)(h,{children:[n&&(0,d.jsx)(v,{typescale:"label",size:"small",children:n}),t.map((e,n)=>{let{item:t,to:a,isActive:o,icon:l,dropdownItems:s,onClick:c}=e;return(0,d.jsx)(f.Fragment,{children:s?i(t,s):(0,d.jsx)(x,{className:o?"active":"",children:(0,d.jsx)(r,{to:a,item:t,icon:l,onClick:c})})},"".concat(n))})]})}},63469(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NavigationDrawer=void 0;var a=t(58346);Object.defineProperty(n,"NavigationDrawer",{enumerable:!0,get:function(){return a.NavigationDrawer}})},69704(e,n,t){"use strict";var a,r;function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function s(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.NavigationRail=void 0;const c=t(65723),d=t(92743),u=t(54790),p=t(47140),m=t(22155),f=t(97322),y=t(1689),g=t(36491),b=t(90817),h=(0,u.styled)("nav")(a||(a=s(["\n  background-color: ",";\n  min-height: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: space-between;\n"])),e=>{let{theme:n}=e;return n.sys.color.surface}),v=(0,u.styled)(b.Text)(r||(r=s(["\n  margin-bottom: -4px;\n  white-space: pre-wrap;\n  text-align: center;\n"])));n.NavigationRail=e=>{let{button:n,v2ShowItems:t=[]}=e;const a=(0,f.useLocation)(),r=(0,m.useMemo)(()=>(new Date).getFullYear(),[]);return(0,c.jsxs)(h,{children:[(0,c.jsxs)(p.Stack,{direction:"column",gap:"4px",children:[n.impact.show&&(0,c.jsx)(g.NavigationRailItem,{label:"Impact",icon:d.AutoGraphOutlined,href:"/v2/impact",className:a.pathname.includes("impact")?"active":void 0,end:!0}),n.data.show&&(0,c.jsx)(g.NavigationRailItem,{label:"Data",icon:d.DatasetOutlined,href:"/v2/data",badgeContent:n.data.badge}),n.reporting.show&&(0,c.jsx)(g.NavigationRailItem,{label:"Reporting",icon:d.BarChartOutlined,href:"/v2/reporting",badgeContent:n.reporting.badge}),n.howto.show&&(0,c.jsx)(g.NavigationRailItem,{label:"How to",icon:d.WorkspacePremiumOutlined,href:"/v2/engage",badgeContent:n.howto.badge}),n.learnworlds.show&&(0,c.jsx)(g.NavigationRailItem,{label:"Learn",icon:d.LocalLibraryOutlined,href:"/",onClick:n.learnworlds.onClick,badgeContent:n.learnworlds.badge}),n.govenance.show&&t.includes("governance")&&(0,c.jsx)(g.NavigationRailItem,{label:"Governance",icon:d.PolicyOutlined,href:"/v2/governance",badgeContent:n.govenance.badge}),n.docs.show&&t.includes("docs")&&(0,c.jsx)(g.NavigationRailItem,{label:"Docs",icon:d.DocumentScanner,href:"/v2/documents",badgeContent:n.docs.badge}),n.surveys.show&&(0,c.jsx)(g.NavigationRailItem,{label:"Surveys",icon:d.RuleOutlined,href:n.surveys.hasAccessToSurveysSent?"/v2/surveys/sent/overview":"/v2/surveys/received",className:a.pathname.includes("surveys")&&!a.pathname.includes("configuration")?"active":void 0,badgeContent:n.surveys.badge}),n.intelligence.show&&t.includes("intelligence")&&(0,c.jsx)(g.NavigationRailItem,{label:"RioBot",icon:e=>(0,c.jsx)(y.RioBot,o(o({},e),{},{isActive:a.pathname.includes("/v2/intelligence")})),href:"/v2/intelligence",badgeContent:n.intelligence.badge}),n.flows.show&&t.includes("flows")&&(0,c.jsx)(g.NavigationRailItem,{label:"Flows",icon:d.AirlineStopsOutlined,href:"/v2/flows",badgeContent:n.flows.badge}),n.tasks.show&&t.includes("tasks")&&(0,c.jsx)(g.NavigationRailItem,{label:"Tasks",icon:d.TaskOutlined,href:"/v2/tasks",badgeContent:n.tasks.badge}),n.configuration.show&&(0,c.jsx)(g.NavigationRailItem,{label:"Configuration",icon:d.SettingsOutlined,href:"/v2/configuration",badgeContent:n.configuration.badge}),(0,c.jsx)(g.NavigationRailItem,{label:"Support",icon:d.SupportAgentOutlined,href:"https://support.rio.ai/knowledge",external:!0,openInNewTab:!0})]}),(0,c.jsxs)(v,{typescale:"body",size:"small",children:["© ",r,"\n"," Rio AI Ltd"]})]})}},50184(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NavigationRail=void 0;var a=t(69704);Object.defineProperty(n,"NavigationRail",{enumerable:!0,get:function(){return a.NavigationRail}})},14158(e,n,t){"use strict";const a=["href","className","icon","label","badgeContent","showDot","id","name","external","openInNewTab","end","onClick"];var r,i,o,l,s;function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach(function(n){u(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function u(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function p(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.NavigationRailItem=n.NavItemLabel=void 0;const m=t(65723),f=t(22155),y=t(54790),g=t(97322),b=t(54458),h=t(47140);n.NavItemLabel=(0,y.styled)("p")(r||(r=p(["\n  font-family: ",";\n  font-size: ","px;\n  font-weight: ",";\n  line-height: ","px;\n  text-align: center;\n  letter-spacing: 0.5px;\n  margin: 0px;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.typescale.label.medium.family},e=>{let{theme:n}=e;return n.sys.typescale.label.medium.size},e=>{let{theme:n}=e;return n.sys.typescale.label.medium.weight},e=>{let{theme:n}=e;return n.sys.typescale.label.medium.lineHeight},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant});const v=(0,y.styled)("div")(i||(i=p(["\n  display: flex;\n  padding: 4px 16px;\n  border-radius: 30px;\n  justify-content: center;\n  align-items: center;\n\n  & svg {\n    width: 24px;\n    height: 24px;\n  }\n"]))),x=(0,h.css)(o||(o=p(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  align-self: stretch;\n  text-decoration: none;\n  height: 56px;\n"]))),T=(0,y.styled)(g.NavLink)(l||(l=p(["\n  ","\n  &:hover div {\n    background-color: ",";\n  }\n\n  &.disabled:hover div {\n    background-color: transparent;\n  }\n\n  &:active div {\n    background-color: ",";\n  }\n\n  &:not(.active) {\n    & svg {\n      color: ",";\n    }\n  }\n\n  &.active div {\n    background-color: ",";\n  }\n\n  &.active {\n    & svg {\n      color: ",";\n    }\n  }\n\n  &.active > p {\n    font-weight: 600;\n    color: ",";\n  }\n\n  &.disabled {\n    opacity: 0.5;\n  }\n"])),x,e=>{let{theme:n}=e;return n.ref.palette.primary[90]},e=>{let{theme:n}=e;return n.ref.palette.primary[80]},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant},e=>{let{theme:n}=e;return n.ref.palette.primary[95]},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.primary}),O=(0,y.styled)("a")(s||(s=p(["\n  ","\n\n  &:hover div {\n    background-color: ",";\n  }\n\n  &:active div {\n    background-color: ",";\n  }\n\n  &.active {\n    & svg {\n      color: ",";\n    }\n  }\n\n  &:not(.active) {\n    & svg {\n      color: ",";\n    }\n  }\n"])),x,e=>{let{theme:n}=e;return n.ref.palette.primary[90]},e=>{let{theme:n}=e;return n.ref.palette.primary[80]},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant});n.NavigationRailItem=e=>{const{href:t,className:r,icon:i,label:o,badgeContent:l,showDot:s,id:c,name:u,external:p,openInNewTab:y,end:g,onClick:h}=e,x=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a),[k,j]=(0,f.useState)(!1);return p?(0,m.jsxs)(O,d(d({className:r,href:t,id:c,target:y?"_blank":void 0},x),{},{children:[(0,m.jsx)(v,{children:(0,m.jsx)(b.Badge,{badgeContent:l,variant:s?"dot":"standard",children:(0,m.jsx)(i,{})})}),(0,m.jsx)(n.NavItemLabel,{children:o})]})):(0,m.jsxs)(T,d(d({className:"".concat(k?"disabled":""," ").concat(r),to:t,id:c,end:g,onClick:h?async e=>{if(e.preventDefault(),!k)try{j(!0),await h()}finally{j(!1)}}:void 0},x),{},{children:[(0,m.jsx)(v,{children:(0,m.jsx)(b.Badge,{badgeContent:l,variant:s?"dot":"standard",children:(0,m.jsx)(i,{})})}),(0,m.jsx)(n.NavItemLabel,{children:o})]}))}},36491(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NavigationRailItem=void 0;var a=t(14158);Object.defineProperty(n,"NavigationRailItem",{enumerable:!0,get:function(){return a.NavigationRailItem}})},71556(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.usePageErrorContext=n.ErrorContextProvider=n.ErrorContext=void 0;const a=t(65723),r=t(22155);n.ErrorContext=(0,r.createContext)({error:null,setError:e=>{}}),n.ErrorContextProvider=e=>{let{children:t}=e;const[i,o]=(0,r.useState)(null),l=(0,r.useMemo)(()=>({error:i,setError:o}),[i,o]);return(0,a.jsx)(n.ErrorContext.Provider,{value:l,children:t})},n.usePageErrorContext=()=>(0,r.useContext)(n.ErrorContext)},72994(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.usePageLoadingContext=n.LoadingContextProvider=n.LoadingContext=void 0;const a=t(65723),r=t(22155);n.LoadingContext=(0,r.createContext)({loading:!1,setLoading:e=>{}}),n.LoadingContextProvider=e=>{let{children:t}=e;const[i,o]=(0,r.useState)(!1),l=(0,r.useMemo)(()=>({loading:i,setLoading:o}),[i,o]);return(0,a.jsx)(n.LoadingContext.Provider,{value:l,children:t})},n.usePageLoadingContext=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.useContext)(n.LoadingContext);return(0,r.useEffect)(()=>{e.defaultValue&&t.setLoading(e.defaultValue)},[]),t}},66490(e,n,t){"use strict";var a,r,i,o;function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach(function(n){c(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function c(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},d.apply(null,arguments)}function u(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.Page=function(e){let{loading:n,error:t,title:a,children:r}=e;const i=d({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(a),a)),o=(0,f.usePageErrorContext)(),l=(0,y.usePageLoadingContext)();return(0,p.jsx)(x,{children:(0,p.jsxs)(T,{direction:"column",wrap:"nowrap",container:!0,children:[a&&(0,p.jsx)(h.Grid,{size:12,container:!0,children:(0,p.jsx)(b.PageTitle,s({},i))}),(0,p.jsxs)(O,{direction:"column",size:12,children:[(n||l.loading)&&(0,p.jsx)(k,{}),t||o.error?(0,p.jsx)(v.LoadFailed,{error:t||o.error,title:"Something went wrong"}):r]})]})})};const p=t(65723),m=t(54790),f=t(71556),y=t(72994),g=t(89348),b=t(95285),h=t(34398),v=t(58381),x=(0,m.styled)("main")(a||(a=u(["\n  display: flex;\n  flex-flow: column nowrap;\n  padding-left: 32px;\n  padding-right: 32px;\n  flex: 1;\n"]))),T=(0,m.styled)(h.Grid)(r||(r=u(["\n  flex: 1;\n"]))),O=(0,m.styled)(h.Grid)(i||(i=u(["\n  flex: 1;\n  position: relative;\n  padding-top: 24px;\n"]))),k=(0,m.styled)(g.LinearProgress)(o||(o=u(["\n  position: absolute;\n  top: 12px;\n  left: 0;\n  width: 100%;\n  transform: translateY(-150%);\n  background-color: ",";\n\n  .MuiLinearProgress-root {\n    height: 1px;\n  }\n\n  .MuiLinearProgress-bar1 {\n    background-color: ",";\n    height: 1px;\n  }\n\n  .MuiLinearProgress-bar2 {\n    background-color: ",";\n    height: 1px;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.primary})},84281(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PageLoadingContextProvider=n.usePageLoadingContext=n.PageErrorContextProvider=n.usePageErrorContext=n.Page=void 0;var a=t(66490);Object.defineProperty(n,"Page",{enumerable:!0,get:function(){return a.Page}});var r=t(71556);Object.defineProperty(n,"usePageErrorContext",{enumerable:!0,get:function(){return r.usePageErrorContext}}),Object.defineProperty(n,"PageErrorContextProvider",{enumerable:!0,get:function(){return r.ErrorContextProvider}});var i=t(72994);Object.defineProperty(n,"usePageLoadingContext",{enumerable:!0,get:function(){return i.usePageLoadingContext}}),Object.defineProperty(n,"PageLoadingContextProvider",{enumerable:!0,get:function(){return i.LoadingContextProvider}})},44554(e,n,t){"use strict";var a,r,i,o,l,s,c,d;function u(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.PageTitle=n.PageTitleHeader=void 0;const m=t(65723),f=t(22155),y=t(54790),g=p(t(35455)),b=t(97322),h=t(90817),v=(0,y.styled)("p")(a||(a=u(["\n  ","\n  color: ",";\n  text-decoration: none;\n  margin: 0px;\n\n  &:hover {\n    cursor: default;\n  }\n"])),e=>{let{theme:n}=e;return(0,h.textCss)(n,{typescale:"label",size:"medium"})},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant});n.PageTitleHeader=(0,y.styled)("h1")(r||(r=u(["\n  flex: 1;\n  min-width: 300px;\n  ","\n  color: ",";\n  text-decoration: none;\n  margin: 0px;\n  &:hover {\n    cursor: default;\n  }\n"])),e=>{let{theme:n}=e;return(0,h.textCss)(n,{typescale:"display",size:"small"})},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant});const x=(0,y.styled)(g.default)(i||(i=u(["\n  & {\n    height: 12px;\n    width: 12px;\n    color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.primary}),T=(0,y.styled)("div")(o||(o=u(["\n  display: flex;\n  align-items: center;\n  gap: 4px;\n  align-self: stretch;\n"]))),O=(0,y.styled)("div")(l||(l=u(["\n  display: inline-flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 8px;\n  width: 100%;\n"]))),k=(0,y.styled)(v)(s||(s=u(["\n  &:hover {\n    cursor: pointer;\n  }\n"]))).withComponent(b.Link),j=(0,y.styled)("div")(c||(c=u(["\n  display: flex;\n  align-items: flex-end;\n  justify-content: space-between;\n  width: 100%;\n"]))),C=(0,y.styled)("div")(d||(d=u(["\n  display: flex;\n  flex-wrap: wrap;\n  gap: 16px;\n  flex: 1;\n  width: 100%;\n"]))),S=e=>{const{label:n,to:t}=e;return t?(0,m.jsx)(k,{to:t,children:n}):(0,m.jsx)(v,{children:n})};n.PageTitle=e=>{const{crumbs:t=[],content:a,actionButton:r}=e;return(0,m.jsx)(j,{children:(0,m.jsxs)(O,{children:[!!t.length&&(0,m.jsx)(T,{children:t.map((e,n)=>{let{label:a,to:r}=e;const i=n<t.length-1;return(0,m.jsxs)(f.Fragment,{children:[(0,m.jsx)(S,{to:r,label:a}),i&&(0,m.jsx)(x,{})]},n)})}),(0,m.jsxs)(C,{children:[a&&("string"==typeof a?(0,m.jsx)(n.PageTitleHeader,{children:a}):a),r]})]})})}},95285(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(44554),n)},99765(e,n,t){"use strict";var a,r;function i(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.LoadingTextTheme=void 0,n.PreLoader=function(e){let{themes:n=[]}=e;const t=(e=>{const n=u.default;return 0===e.length?n:n.filter(n=>e.includes(n.section))})(n).sort(()=>.5-Math.random()),[a,r]=(0,c.useState)(t[0]);return(0,c.useEffect)(()=>{const e=setInterval(()=>{r(e=>{const n=t.indexOf(e),a=n+1>=t.length?0:n+1;return t[a]})},6e3);return()=>clearInterval(e)},[]),(0,l.jsxs)(m,{children:[(0,l.jsx)(d.Loader,{}),(0,l.jsx)(d.Text,{typescale:"title",size:"large",textAlign:"center",children:a.content}),a.source&&(0,l.jsxs)(d.Text,{typescale:"title",size:"small",textAlign:"center",children:["- ",a.source]}),(0,l.jsx)(f,{})]})};const l=t(65723),s=t(54790),c=t(22155),d=t(11001),u=o(t(62651));var p;!function(e){e.ENGAGE="ENGAGE",e.REPORTING="REPORTING",e.GENERAL="GENERAL"}(p||(n.LoadingTextTheme=p={}));const m=(0,s.styled)("div")(a||(a=i(["\n  display: flex;\n  height: 100%;\n  width: 100%;\n  padding: '12px';\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n  text-align: center;\n"]))),f=(0,s.styled)(d.LinearProgress)(r||(r=i(["\n  width: 100%;\n  transform: translateY(-150%);\n  margin-top: 20px;\n"])))},18760(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LoadingTextTheme=n.PreLoader=void 0;const a=t(99765);Object.defineProperty(n,"PreLoader",{enumerable:!0,get:function(){return a.PreLoader}}),Object.defineProperty(n,"LoadingTextTheme",{enumerable:!0,get:function(){return a.LoadingTextTheme}})},5394(e,n,t){"use strict";var a,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.RadioButton=n.StyledRadioButton=void 0;const i=r(t(54727)),o=t(54790);var l,s;n.StyledRadioButton=(0,o.styled)(i.default)(a||(l=["\n  color: ",";\n\n  &:hover {\n    background-color: var(--m-3-state-layers-light-primary-opacity-008, rgba(103, 80, 164, 0.08));\n  }\n\n  &:focus,\n  &:active {\n    background-color: var(--m-3-state-layers-light-primary-opacity-012, rgba(103, 80, 164, 0.12));\n  }\n\n  &.Mui-checked {\n    color: ",";\n  }\n\n  &.Mui-disabled {\n    background-color: none;\n    opacity: 0.38;\n    color: ",";\n  }\n"],s||(s=l.slice(0)),a=Object.freeze(Object.defineProperties(l,{raw:{value:Object.freeze(s)}}))),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.onSurface}),n.RadioButton=n.StyledRadioButton},89069(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RadioButton=void 0;var a=t(5394);Object.defineProperty(n,"RadioButton",{enumerable:!0,get:function(){return a.RadioButton}})},45870(e,n,t){"use strict";var a,r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.SegmentedButton=void 0;const i=t(65723),o=t(22155),l=r(t(73474)),s=t(54790),c=t(87283),d=(0,s.styled)(c.ToggleButtonGroup)(a||(u=["\n  width: 100%;\n\n  button {\n    width: 100%;\n  }\n\n  &:hover: {\n    color: ",";\n    background-color: ",";\n  }\n\n  & ."," {\n    width: 100%;\n    color: ",";\n    text-transform: unset;\n    padding: 10px 12px;\n    max-height: 40px;\n  }\n\n  & ."," {\n    &:first-of-type {\n      border-color: ",";\n      border-radius: 20px 0 0 20px;\n    }\n\n    &:last-of-type {\n      border-color: ",";\n      border-radius: ",";\n    }\n  }\n\n  & ."," {\n    color: ",";\n    background-color: ",";\n  }\n"],p||(p=u.slice(0)),a=Object.freeze(Object.defineProperties(u,{raw:{value:Object.freeze(p)}}))),e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{theme:n}=e;return(0,l.default)(n.ref.palette.primary[95],.08)},c.toggleButtonClasses.root,e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant},c.toggleButtonGroupClasses.grouped,e=>{let{theme:n}=e;return(0,l.default)(n.sys.color.outline,.16)},e=>{let{theme:n}=e;return(0,l.default)(n.sys.color.outline,.16)},e=>e.length>1?"0 20px 20px 0":"20px",c.toggleButtonClasses.selected,e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{theme:n}=e;return(0,l.default)(n.ref.palette.primary[95],.16)});var u,p;n.SegmentedButton=e=>{let{values:n,onClick:t,toggleOff:a}=e;const[r,l]=(0,o.useState)("");(0,o.useEffect)(()=>{a&&l("")},[a]);const s=n.map((e,n)=>{let{offValue:t,onValue:a}=e;return(0,i.jsx)(c.ToggleButton,{selected:r===t,value:r!==t?t:a,children:r!==t?t:a},"".concat(t,"-").concat(n))});return(0,i.jsx)(d,{length:n.length,exclusive:!0,value:r,onChange:(e,n)=>{l(n),t()},children:s})}},38622(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SegmentedButton=void 0;var a=t(45870);Object.defineProperty(n,"SegmentedButton",{enumerable:!0,get:function(){return a.SegmentedButton}})},86964(e,n,t){"use strict";const a=["value","options","onChange","disabled","hasImage","error","label","helperText","isLoading","placeholder","disableSorting","onDeleteOption","onCreateNew","onClear","sx"],r=["close"];var i,o,l,s,c,d,u;function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach(function(n){f(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function f(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function y(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function g(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var b=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Select=n.isCreateNewOption=void 0;const h=t(65723),v=t(87283),x=t(87283),T=t(54790),O=b(t(30395)),k=t(22155),j=t(37829),C=t(90817),S=b(t(35429)),N=t(85313),w=(0,T.styled)(v.FormControl)(i||(i=g(["\n  width: 100%;\n\n  label.Mui-focused {\n    color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.primary}),D=(0,T.styled)(v.InputLabel)(o||(o=g(["\n  padding-left: 16px;\n  top: 4px;\n\n  &."," {\n    padding-left: 22px;\n    top: 0;\n  }\n"])),v.inputLabelClasses.shrink),A=(0,T.styled)(v.FormHelperText)(l||(l=g(["\n  padding-left: 16px;\n  color: ",";\n"])),e=>e.error&&e.theme.sys.color.error),R=(0,T.styled)("img")(s||(s=g(["\n  width: 100%;\n  height: 54px;\n"]))),P=(0,T.styled)(v.MenuItem)(c||(c=g(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  ","\n\n  & img {\n    display: none;\n  }\n\n  & span {\n    flex: 1;\n    overflow-x: hidden;\n    text-overflow: ellipsis;\n  }\n"])),e=>{let{theme:n}=e;return(0,C.textCss)(n,{typescale:"label",size:"large"})}),L=(0,T.styled)(v.Select)(d||(d=g(["\n  display: inline-flex;\n  width: 100%;\n  cursor: pointer;\n  height: 40px;\n\n  &:not(.Mui-disabled):hover::before {\n    height: 9px;\n    border-top: none;\n    border-radius: 0px 0px 9px 9px;\n    border-color: ",";\n    border-bottom: 2px solid ",";\n  }\n\n  ."," {\n    margin-right: 8px;\n    overflow: hidden;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n    padding: 9px 24px 8px 16px;\n\n    & img {\n      flex: 0 0 106px;\n      height: 40px;\n      object-fit: contain;\n    }\n\n    & span {\n      &.hasImage {\n        display: none;\n      }\n\n      &.noImage {\n        white-space: nowrap;\n        overflow: hidden;\n        text-overflow: ellipsis;\n      }\n    }\n  }\n\n  ","\n\n  &:hover {\n    &:before {\n      border-top: none;\n    }\n  }\n\n  &:before {\n    height: 9px;\n    border: 1px solid ",";\n    border-radius: 0px 0px 8px 8px;\n    border-top: none;\n  }\n\n  &:after {\n    height: 9px;\n    border-radius: 0px 0px 8px 8px;\n    border: 2px solid ",";\n    border-top: none;\n  }\n\n  svg {\n    top: unset !important;\n    right: 8px;\n\n    path {\n      fill: ",";\n    }\n  }\n\n  ."," {\n    padding-left: 16px;\n\n    &:focus {\n      background: transparent;\n    }\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.primary},x.selectClasses.select,e=>{let{theme:n}=e;return(0,C.textCss)(n,{typescale:"label",size:"large"})},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.primary},x.selectClasses.select),I=(0,T.styled)("div")(u||(u=g(["\n  display: flex;\n  justify-content: center;\n  width: 100%;\n"]))),E=(0,T.styled)(v.MenuItem)({display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:0,paddingBottom:0,"&.MuiMenuItem-root":{minHeight:"36px"}}),_=(0,T.styled)("div")({display:"flex",alignItems:"center",justifyContent:"space-between"}),F=(0,T.styled)(x.IconButton)(e=>{let{theme:n}=e;return{color:n.palette.grey[400]}});function B(e){let{option:t,onDeleteOption:a,key:r,close:i}=e;const{label:o,value:l,disabled:s}=t,c=a&&!(0,n.isCreateNewOption)(t)&&!0!==s&&"delete-only"!==s;return(0,h.jsxs)(E,{value:l,disabled:!0===s,children:[o,c&&(0,h.jsx)(F,{size:"small",onClick:e=>{e.stopPropagation(),a(t),i()},children:(0,h.jsx)(S.default,{fontSize:"small"})})]},r)}n.isCreateNewOption=e=>{let{label:n}=e;return(n||"").toLowerCase().startsWith("create new")},n.Select=e=>{const{value:t,options:i,onChange:o,disabled:l,hasImage:s,error:c,label:d,helperText:u,isLoading:p,placeholder:f,disableSorting:g,onDeleteOption:b,onCreateNew:v,onClear:x,sx:T}=e,C=y(e,a),E=(0,N.useToggleSelect)(),{close:U}=E,M=y(E,r),V=(0,k.useMemo)(()=>g?i:[...i].sort((e,t)=>{var a,r;const i=(null===(a=e.label)||void 0===a?void 0:a.toLowerCase())||"",o=(null===(r=t.label)||void 0===r?void 0:r.toLowerCase())||"";return(0,n.isCreateNewOption)(e)?-1:(0,n.isCreateNewOption)(t)?1:i.localeCompare(o)}),[i,g]),z=e=>{const{value:t}=e.target,a=i.find(e=>e.value===t);a&&(v&&(0,n.isCreateNewOption)(a)?v():o(a))},G=e=>{var n;return(0,h.jsxs)(_,{children:[(null===(n=i.find(n=>{let{value:t}=n;return t===e}))||void 0===n?void 0:n.label)||"",x&&(0,h.jsx)(F,{size:"small",onMouseDown:e=>{e.stopPropagation()},onClick:e=>{x(),e.currentTarget.blur()},children:(0,h.jsx)(S.default,{fontSize:"small"})})]})},$=(0,k.useMemo)(()=>({"& .MuiSelect-select .notranslate::after":f&&!d?m({content:'"'.concat(f,'"'),opacity:.42},T||{}):T}),[f,T,d]),W=p&&(0,h.jsx)(I,{children:(0,h.jsx)(j.Loader,{})});return s?(0,h.jsxs)(L,m(m({},C),{},{value:t,onChange:z,variant:"standard",disabled:l,sx:$,children:[W,V.map((e,n)=>{const t=(0,O.default)({noImage:!e.imgUrl,hasImage:!!e.imgUrl});return(0,h.jsxs)(P,{value:e.value,children:[e.imgUrl&&(0,h.jsx)(R,{src:e.imgUrl,alt:"icon"}),(0,h.jsx)("span",{className:t,children:e.label})]},n)})]})):d||u?(0,h.jsxs)(w,{variant:"standard",disabled:l,children:[d&&(0,h.jsx)(D,{children:d}),(0,h.jsxs)(L,m(m(m({},C),M),{},{value:t,onChange:z,label:d,sx:$,renderValue:G,children:[W,V.map((e,n)=>B({option:e,onDeleteOption:b,key:n,close:U}))]})),c&&(0,h.jsx)(A,{error:!!c,children:"boolean"==typeof c?u:c}),u&&!c&&(0,h.jsx)(A,{children:u})]}):(0,h.jsxs)(L,m(m(m({},C),M),{},{value:t,disabled:l,onChange:z,variant:"standard",renderValue:G,sx:$,children:[W,V.map((e,n)=>B({option:e,onDeleteOption:b,key:n,close:U}))]}))}},29374(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Select=void 0;var a=t(86964);Object.defineProperty(n,"Select",{enumerable:!0,get:function(){return a.Select}})},85313(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useToggleSelect=function(){const[e,n]=(0,a.useState)(!1);return{open:e,onClose:()=>n(!1),onOpen:()=>n(!0),close:()=>n(!1)}};const a=t(22155)},48605(e,n,t){"use strict";var a,r,i,o,l,s,c,d,u,p,m;function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach(function(n){g(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function g(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function b(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.SetFilter=n.ALL_OPTIONS_SELECTED=void 0;const h=t(65723),v=t(22155),x=t(17051),T=t(54790),O=t(74231),k=t(90817),j=t(37829),C=t(45419),S=t(33613),N=t(8503),w=(0,T.styled)("div")(a||(a=b(["\n  display: flex;\n  flex-direction: column;\n  position: relative;\n  width: 100%;\n  height: 55px;\n"]))),D=(0,T.styled)(x.Popover.Root)(r||(r=b(["\n  width: 100%;\n"]))),A=(0,T.styled)("label")(i||(i=b(["\n  font-size: 12px;\n  font-weight: 500;\n  font-height: 26px;\n  color: ",";\n  margin-left: 16px;\n  font-family: 'Plus Jakarta Sans' !important;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurface}),R=(0,T.styled)(x.Popover.Trigger)(o||(o=b(["\n  position: relative;\n  width: 100%;\n  display: flex;\n  gap: 6px;\n  padding-left: 16px;\n  padding-right: 16px;\n  padding-top: 9px;\n  padding-bottom: 8px;\n  opacity: ",";\n  color: ",";\n  cursor: ",";\n\n  // Bottom line styles\n  &::before {\n    height: 9px;\n    border: 1px solid ",";\n    border-radius: 0px 0px 8px 8px;\n    border-top: none;\n\n    left: 0;\n    bottom: 0;\n    content: '';\n    position: absolute;\n    right: 0;\n    -webkit-transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n    transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n    pointer-events: none;\n  }\n\n  &:hover::before {\n    border-color: ",";\n    border-top: 0px;\n  }\n\n  &::after {\n    height: 9px;\n    border: 1px solid ",";\n    border-radius: 0px 0px 8px 8px;\n    border-top: none;\n\n    left: 0;\n    bottom: 0;\n    content: '';\n    position: absolute;\n    right: 0;\n    -webkit-transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n    transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n    pointer-events: none;\n  }\n\n  &:hover::after {\n    border: 2px solid ",";\n    border-top: 0px;\n    border-right: 0px;\n    border-left: 0px;\n  }\n"])),e=>{let{disabled:n}=e;return n?.5:1},e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{disabled:n}=e;return n?"not-allowed":"pointer"},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.primary}),P=(0,T.styled)(x.Popover.Popup)(l||(l=b(["\n  display: flex;\n  flex-direction: column;\n  background-color: ",";\n  border-radius: 8px;\n  box-shadow: ",";\n  overflow: auto;\n  width: 350px;\n  padding: 8px 16px;\n  height: 400px;\n"])),e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{theme:n}=e;return n.sys.elevation[5]}),L=(0,T.styled)(x.Popover.Positioner)(s||(s=b(["\n  z-index: 9000;\n"]))),I=(0,T.styled)("div")(c||(c=b(["\n  overflow: hidden;\n  white-space: nowrap;\n  flex-shrink: 0;\n  height: ","px;\n  ","\n  ","\n"])),e=>{let{height:n}=e;return n||42},e=>{let{translateY:n}=e;return void 0!==n?"transform: translateY(".concat(n,"px);"):""},e=>{let{isAbsolute:n}=e;return n?"\n    top: 0;\n    left: 0;\n    position: absolute;\n  ":""}),E=(0,T.styled)(O.TextField)(d||(d=b(["\n  margin-bottom: 16px;\n"]))),_=(0,T.styled)(k.Text)(u||(u=b(["\n  width: 100%;\n"]))),F=(0,T.styled)("div")(p||(p=b(["\n  height: calc(400px - 42px - 8px - 8px - 16px - 42px);\n  width: 100%;\n  overflow: auto;\n"]))),B=(0,T.styled)("div")(m||(m=b(["\n  height: ","px;\n  width: 100%;\n  position: relative;\n"])),e=>{let{height:n}=e;return n});n.ALL_OPTIONS_SELECTED=null,n.SetFilter=e=>{let{error:t,isLoading:a,label:r,selectableOptions:i,selectedOptions:o,setSelectedOptions:l,refetch:s,channel:c,noneSelectedLabel:d}=e;const u=void 0===o?n.ALL_OPTIONS_SELECTED:o,[p,m]=(0,v.useState)(0),f=(0,v.useCallback)(()=>m(e=>e+1),[]),g=(0,v.useMemo)(()=>i.sort((e,n)=>e.label.localeCompare(n.label)),[i]),b=(0,v.useRef)(null),T=(0,v.useRef)(null),{searchValue:O,setSearchValue:U,results:M,loading:V,error:z}=(0,S.useSearchWorker)(g,c),G=(0,N.useVirtualizer)({count:M.length,getScrollElement:()=>b.current,estimateSize:()=>42,overscan:0});(0,v.useLayoutEffect)(()=>{if(!T.current)return;const e=new MutationObserver(e=>{e.forEach(e=>{"attributes"===e.type&&"data-popup-open"===e.attributeName&&f()})});return e.observe(T.current,{attributes:!0,attributeFilter:["data-popup-open"]}),()=>e.disconnect()},[f]);const $=(0,v.useMemo)(()=>i.reduce((e,n)=>y(y({},e),{},{[n.value]:n.label}),{}),[i]);(0,v.useLayoutEffect)(()=>{if(u&&u.length>0&&i&&i.length>0){const e=u.filter(e=>!$[e]),n=e.reduce((e,n)=>y(y({},e),{},{[n]:!0}),{});e.length>0&&l(u.filter(e=>!n[e]))}},[$]);const W=(0,v.useMemo)(()=>u===n.ALL_OPTIONS_SELECTED,[u]),q=(0,v.useMemo)(()=>u&&0===u.length,[u]),J=(0,v.useMemo)(()=>a?"Loading":t?"Loading error":W?"All":q&&d?d:q?"All":u.map(e=>$[e]).sort((e,n)=>e.localeCompare(n)).join(", ").substring(0,70),[a,t,u,q,W,$,d]),Y=a||Boolean(t);return(0,h.jsx)(w,{onClick:()=>{t&&!a&&s()},children:(0,h.jsxs)(D,{children:[(0,h.jsxs)(A,{children:[r,t?" - Click here to try again":""]}),(0,h.jsxs)(R,{disabled:Y,ref:T,children:[a&&(0,h.jsx)("span",{children:(0,h.jsx)(j.Loader,{size:24})}),(0,h.jsx)(_,{oneLine:!0,size:"large",children:J})]}),(0,h.jsx)(x.Popover.Portal,{children:(0,h.jsx)(L,{align:"start",children:(0,h.jsxs)(P,{children:[(0,h.jsx)(E,{placeholder:"Search",value:O,onChange:e=>U(e.target.value),type:"search"}),V&&(0,h.jsx)(j.Loader,{size:24}),!V&&z&&(0,h.jsx)(k.Text,{textAlign:"center",children:"Error loading options"}),!V&&!z&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(I,{children:(0,h.jsx)(C.Checkbox,{checked:W,indeterminate:!!u&&u.length>0,onChange:()=>{U(""),l(q?n.ALL_OPTIONS_SELECTED:[])},label:"Select all"})}),(0,h.jsx)(F,{ref:b,children:(0,h.jsxs)(B,{height:G.getTotalSize(),children:[0===M.length&&(0,h.jsx)(k.Text,{textAlign:"center",children:"No results found"}),G.getVirtualItems().map(e=>{const t=M[e.index];return(0,h.jsx)(I,{height:e.size,translateY:e.start,isAbsolute:!0,children:(0,h.jsx)(C.Checkbox,{checked:u===n.ALL_OPTIONS_SELECTED||(null==u?void 0:u.some(e=>e===t.value)),onChange:e=>{if(e.target.checked){if(u){const e=[...u,t.value];l(e.length===i.length?n.ALL_OPTIONS_SELECTED:e)}}else l((u||i.map(e=>e.value)).filter(e=>e!==t.value))},label:t.label})},t.value)})]})})]})]})})})]})})}},48188(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ALL_OPTIONS_SELECTED=n.SetFilter=void 0;var a=t(48605);Object.defineProperty(n,"SetFilter",{enumerable:!0,get:function(){return a.SetFilter}}),Object.defineProperty(n,"ALL_OPTIONS_SELECTED",{enumerable:!0,get:function(){return a.ALL_OPTIONS_SELECTED}})},33613(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useSearchWorker=void 0;const a=t(22155),r=t(54717);n.useSearchWorker=(e,n)=>{const[t,i]=(0,a.useState)(""),[o]=(0,r.useDebounce)(t,400),[l,s]=(0,a.useState)([]),[c,d]=(0,a.useState)(!1),[u,p]=(0,a.useState)(null),m=(0,a.useRef)();return(0,a.useLayoutEffect)(()=>{const e=new Blob(["\nself.onmessage = (e) => {\n  const { searchValue, data, channel } = e.data;\n\n  try {\n    if (!searchValue) {\n      self.postMessage({ results: data, channel, error: null });\n      return;\n    }\n    const lowerCaseSearchValue = searchValue.toLowerCase().trim();\n    const results = data.filter((item) =>\n      item.label.toLowerCase().startsWith(lowerCaseSearchValue)\n    );\n    self.postMessage({ results, channel, error: null });\n  } catch (error) {\n    self.postMessage({\n      results: [],\n      channel,\n      error: typeof error.message === 'string' ? error.message : 'Something went wrong',\n    });\n  }\n};\n"],{type:"application/javascript"}),t=new Worker(URL.createObjectURL(e));return m.current=t,m.current.onmessage=e=>{const{results:t,error:a,channel:r}=e.data;if(r!==n)return p("Incorrect channel"),s([]),void d(!1);a?(p(a),s([])):(s(t),p(null)),d(!1)},()=>{var e;return null===(e=m.current)||void 0===e?void 0:e.terminate()}},[]),(0,a.useLayoutEffect)(()=>{if(""===o.trim())return s(e),void d(!1);m.current&&(d(!0),p(null),m.current.postMessage({searchValue:o,data:e,channel:n}))},[o,e,n]),{searchValue:t,debouncedSearchValue:o,setSearchValue:i,results:l,loading:c,error:u}}},52782(e,n,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Slider=void 0;var r=t(15277);Object.defineProperty(n,"Slider",{enumerable:!0,get:function(){return a(r).default}})},30467(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Slider=void 0;var a=t(52782);Object.defineProperty(n,"Slider",{enumerable:!0,get:function(){return a.Slider}})},77912(e,n,t){"use strict";var a,r;function i(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Object.defineProperty(n,"__esModule",{value:!0}),n.SlotTextWrapper=n.SlotCharacter=void 0;const o=t(54790);n.SlotCharacter=(0,o.styled)("span")(a||(a=i(["\n  font-size: ",";\n"])),e=>{let{fontSize:n}=e;return n}),n.SlotTextWrapper=(0,o.styled)("div")(r||(r=i(["\n  width: 100%;\n  height: 100%;\n  align-items: center;\n  display: inline-flex;\n  justify-content: center;\n"])))},57018(e,n,t){"use strict";var a;Object.defineProperty(n,"__esModule",{value:!0}),n.Surface=void 0;const r=t(54790);var i,o;n.Surface=(0,r.styled)("div")(a||(i=["\n  background-color: ",";\n"],o||(o=i.slice(0)),a=Object.freeze(Object.defineProperties(i,{raw:{value:Object.freeze(o)}}))),e=>{let{theme:n}=e;return n.sys.color.surface})},54737(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Surface=void 0;var a=t(57018);Object.defineProperty(n,"Surface",{enumerable:!0,get:function(){return a.Surface}})},70064(e,n,t){"use strict";const a=["children","value","index"];var r,i;function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach(function(n){s(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function s(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var d=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),u=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),p=this&&this.__importStar||function(){var e=function(n){return e=Object.getOwnPropertyNames||function(e){var n=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[n.length]=t);return n},e(n)};return function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var a=e(n),r=0;r<a.length;r++)"default"!==a[r]&&d(t,n,a[r]);return u(t,n),t}}(),m=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Tabs=void 0;const f=t(65723),y=p(t(22155)),g=m(t(12243)),b=t(97322),h=m(t(73474)),v=m(t(90268)),x=t(54790),T=t(90268),O=t(34398),k=t(70406),j=(0,x.styled)("div")(r||(r=c(["\n  padding-top: 32px;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),C=(0,x.styled)(v.default)(i||(i=c(["\n  ."," {\n    display: flex;\n    gap: 16px;\n  }\n\n  ."," {\n    background-color: ",";\n    border-radius: 100px;\n  }\n\n  button,\n  a {\n    color: ",";\n    font-weight: ",";\n    padding: 14px 16px;\n    min-width: auto;\n    text-transform: unset;\n\n    &:hover {\n      background-color: ",";\n    }\n  }\n\n  && .Mui-selected {\n    color: ",";\n\n    &:hover {\n      background-color: ",";\n    }\n  }\n"])),T.tabsClasses.flexContainer,T.tabsClasses.indicator,e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant},e=>{let{theme:n}=e;return n.sys.typescale.label.large.weight},e=>{let{theme:n}=e;return(0,h.default)(n.sys.color.onSurface,.08)},e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return(0,h.default)(n.sys.color.primary,.08)}),S=e=>{const{children:n,value:t,index:r}=e,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);return(0,f.jsx)(j,l(l({role:"tabpanel",hidden:t!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},i),{},{children:t===r&&(0,f.jsx)(O.Grid,{size:12,container:!0,children:n})}))};n.Tabs=e=>{let{tabs:n,currentTab:t,handlerChangeTab:a,scrollable:r}=e;const[i,o]=y.default.useState(null!=t?t:0),s=(0,y.useCallback)((e,n)=>{o(n),a&&a(n)},[]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(O.Grid,{container:!0,size:12,children:(0,f.jsx)(C,{variant:r?"scrollable":void 0,scrollButtons:r?"auto":void 0,value:i,onChange:s,"aria-label":"basic tabs example",children:n.map((e,n)=>e.to?(0,f.jsx)(g.default,l({component:b.Link,disableRipple:!1,to:e.to,label:e.label},(0,k.a11yProps)(n)),"simple-tab-".concat(n)):(0,f.jsx)(g.default,l({disableRipple:!1,label:e.label},(0,k.a11yProps)(n)),"simple-tab-".concat(n)))})}),(0,f.jsx)(O.Grid,{size:12,children:n.map((e,n)=>(0,f.jsx)(S,{value:null!=i?i:0,index:n,children:e.children},"tab-panel-".concat(n)))})]})}},24186(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Tabs=void 0;var a=t(70064);Object.defineProperty(n,"Tabs",{enumerable:!0,get:function(){return a.Tabs}})},70406(e,n){"use strict";function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function a(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach(function(n){r(e,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))})}return e}function r(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.a11yProps=n.tabsLink=n.tabs=void 0,n.tabs=[{label:"Item One",children:"Item One Panel"},{label:"Item Two",children:"Item Two Panel"},{label:"Item Three",children:"Item Three Panel"}],n.tabsLink=n.tabs.map((e,n)=>a(a({},e),{},{to:"./tab".concat(n)})),n.a11yProps=e=>({id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)})},2426(e,n,t){"use strict";const a=["theme"];var r;Object.defineProperty(n,"__esModule",{value:!0}),n.Text=n.textCss=void 0;const i=t(54790);n.textCss=(e,n)=>{var t,a,r,i,o;let{typescale:l="body",size:s="medium",fontStyle:c="normal",oneLine:d,weight:u,textAlign:p,color:m}=n;return"\n  font-style: ".concat(c,";\n  font-size: ").concat(null===(t=e.sys.typescale[l])||void 0===t||null===(t=t[s])||void 0===t?void 0:t.size,"px;\n  font-weight: ").concat(u||(null===(a=e.sys.typescale[l])||void 0===a||null===(a=a[s])||void 0===a?void 0:a.weight),";\n  line-height: ").concat(null===(r=e.sys.typescale[l])||void 0===r||null===(r=r[s])||void 0===r?void 0:r.lineHeight,"px;\n  letter-spacing: ").concat(null===(i=e.sys.typescale[l])||void 0===i||null===(i=i[s])||void 0===i?void 0:i.tracking,"px;\n  font-family: ").concat(null===(o=e.sys.typescale[l])||void 0===o||null===(o=o[s])||void 0===o?void 0:o.family,";\n  text-align: ").concat(p||"left",";\n  color: ").concat(m||e.sys.color.onSurface,";\n  margin: 0;\n  ").concat(d?"\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n  ":"","\n")};const o=["typescale","size","fontStyle","oneLine"];var l,s;n.Text=(0,i.styled)("p",{shouldForwardProp:e=>!o.includes(e)})(r||(l=["\n  ","\n"],s||(s=l.slice(0)),r=Object.freeze(Object.defineProperties(l,{raw:{value:Object.freeze(s)}}))),e=>{let{theme:t}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);return(0,n.textCss)(t,r)})},90817(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.textCss=n.Text=void 0;var a=t(2426);Object.defineProperty(n,"Text",{enumerable:!0,get:function(){return a.Text}}),Object.defineProperty(n,"textCss",{enumerable:!0,get:function(){return a.textCss}})},25568(e,n,t){"use strict";const a=["rows","onChange","error","onKeyPress","value","type","shrink"];var r;function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){l(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.TextArea=void 0;const c=t(65723),d=t(22155),u=t(54790),p=s(t(66929)),m=t(74554),f=t(90817),y=(0,u.styled)(p.default)(r||(g=["\n  display: inline-flex;\n  width: 100%;\n  margin-top: 0;\n\n  ","\n\n  label."," {\n    color: ",";\n  }\n\n  .MuiOutlinedInput-root {\n    border-radius: 16px;\n  }\n\n  .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {\n    border-color: ",";\n  }\n"],b||(b=g.slice(0)),r=Object.freeze(Object.defineProperties(g,{raw:{value:Object.freeze(b)}}))),e=>{let{theme:n}=e;return(0,f.textCss)(n,{typescale:"label",size:"large"})},m.inputClasses.focused,e=>e.error?e.theme.sys.color.error:e.theme.sys.color.primary,e=>e.error?e.theme.sys.color.error:e.theme.sys.color.primary);var g,b;n.TextArea=e=>{const{rows:n,onChange:t,error:r,onKeyPress:i,value:l,type:s,shrink:u}=e,p=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a),m=(0,d.useCallback)(e=>{t&&t(e)},[t]);return(0,c.jsx)(y,o(o({},p),{},{multiline:!0,variant:"outlined",InputLabelProps:{shrink:u},error:r,value:l,onChange:m,rows:n||4}))}},15616(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TextArea=void 0;var a=t(25568);Object.defineProperty(n,"TextArea",{enumerable:!0,get:function(){return a.TextArea}})},33814(e,n,t){"use strict";const a=["shrink","onChange","onClear","fullWidth","onKeyPress","value","icon","error","className","type","defaultValue"];var r,i,o,l;function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach(function(n){d(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function u(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.TextField=void 0;const m=t(65723),f=t(74554),y=t(54790),g=t(14809),b=t(65358),h=p(t(66929)),v=t(22155),x=t(10916),T=t(90817),O=p(t(94282)),k=p(t(91171)),j=(0,y.styled)("div")(r||(r=u(["\n  position: relative;\n"]))),C=(0,y.styled)("img")(i||(i=u(["\n  position: absolute;\n  top: 45%;\n  right: 12px;\n  transform: translateY(-55%);\n  cursor: pointer;\n"]))),S=(0,y.styled)(x.Icons.Search)(o||(o=u(["\n  position: absolute;\n  top: 45%;\n  left: 12px;\n  transform: translateY(-45%);\n\n  path {\n    fill: ",";\n  }\n"])),e=>e.theme.sys.color.primary),N=(0,y.styled)(h.default,{shouldForwardProp:e=>"isIcon"!==e})(l||(l=u(["\n  display: inline-flex;\n  width: 100%;\n  margin-top: 0;\n\n  ","\n\n  p."," {\n    color: ",";\n  }\n\n  label."," {\n    color: ",";\n  }\n\n  ."," {\n    padding-left: ",";\n    top: 4px;\n  }\n\n  ."," {\n    padding-left: 22px;\n    top: 0px;\n  }\n\n  ."," {\n    padding-left: 16px;\n  }\n\n  ."," {\n    padding: ",";\n    padding-left: ",";\n  }\n  && .MuiInput-root:hover::before {\n    border-color: ",";\n  }\n\n  ."," {\n    &:hover {\n      &:before {\n        border-top: none;\n      }\n    }\n\n    &:before {\n      height: 9px;\n      border: 1px solid\n        ",";\n      border-radius: 0px 0px 8px 8px;\n      border-top: none;\n    }\n\n    &:after {\n      height: 9px;\n      border-radius: 0px 0px 8px 8px;\n      border: 2px solid ",";\n      border-top: none;\n    }\n  }\n\n  & input:-webkit-autofill,\n  & input:-webkit-autofill:hover,\n  & input:-webkit-autofill:focus,\n  & input:-webkit-autofill:active {\n    border-radius: 0px 0px 8px 8px;\n  }\n"])),e=>{let{theme:n}=e;return(0,T.textCss)(n,{typescale:"label",size:"large"})},f.inputClasses.focused,e=>e.error&&e.theme.sys.color.error,f.inputClasses.focused,e=>e.error?e.theme.sys.color.error:e.theme.sys.color.primary,b.inputLabelClasses.root,e=>e.isSearch?"40px":"16px",b.inputLabelClasses.shrink,g.formHelperTextClasses.root,f.inputClasses.input,e=>e.isIcon?"9px 40px 8px 16px":"9px 16px 8px 16px",e=>e.isSearch?"40px":"16px",e=>e.theme.sys.color.primary,f.inputClasses.root,e=>e.error?e.theme.sys.color.error:e.theme.sys.color.outlineVariant,e=>e.error?e.theme.sys.color.error:e.theme.sys.color.primary);n.TextField=e=>{const{shrink:n,onChange:t,onClear:r,fullWidth:i,onKeyPress:o,value:l,icon:s,error:d,className:u,type:p,defaultValue:f}=e,y=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a),g=(0,v.useCallback)(()=>{r&&r()},[r]),b=(0,v.useCallback)(e=>{t&&t(e)},[t]);return(0,m.jsxs)(j,{className:u,children:[(0,m.jsx)(N,c(c({fullWidth:i},y),{},{slotProps:{inputLabel:{shrink:n}},error:d,isSearch:"search"===p,onChange:b,onKeyPress:o,isIcon:d||s||r&&""!==l,defaultValue:f,value:l,variant:"standard",type:p})),"search"===p&&(0,m.jsx)(S,{}),r&&""!==l&&(0,m.jsx)(C,{src:O.default,onClick:g}),d&&(0,m.jsx)(C,{src:k.default})]})}},74231(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TextField=void 0;var a=t(33814);Object.defineProperty(n,"TextField",{enumerable:!0,get:function(){return a.TextField}})},57290(e,n,t){"use strict";const a=["label","error","value","onChange","disabled","name"];var r,i;function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach(function(n){s(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function s(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.TimePicker=void 0;const u=t(65723),p=t(22155),m=t(54790),f=t(41784),y=t(74554),g=t(32099),b=t(65358),h=t(99022),v=t(5267),x=t(2181),T=t(90817),O=d(t(18814)),k=(0,m.styled)(x.MobileTimePicker)(r||(r=c(["\n  ."," {\n    padding: 16px;\n  }\n\n  ."," {\n    color: ",";\n  }\n\n  ."," ~ ."," {\n    border-color: ",";\n  }\n\n  ."," ."," {\n    border-color: ",";\n  }\n\n  .",":hover ."," {\n    border-color: ",";\n  }\n\n  ."," {\n    top: 32px;\n    bottom: -9px;\n    margin-bottom: 9px;\n    border-top: none;\n    z-index: 0;\n  }\n\n  &:after {\n    position: absolute;\n    content: '';\n    left: 0;\n    z-index: 100;\n    bottom: 8px;\n    background-color: ",";\n    width: 100%;\n    height: 10px;\n  }\n"])),y.inputClasses.input,b.inputLabelClasses.root,e=>{let{theme:n}=e;return n.sys.color.primary},y.inputClasses.input,h.outlinedInputClasses.notchedOutline,e=>{let{theme:n}=e;return n.sys.color.outlineVariant},y.inputClasses.focused,h.outlinedInputClasses.notchedOutline,e=>{let{theme:n}=e;return n.sys.color.primary},h.outlinedInputClasses.root,h.outlinedInputClasses.notchedOutline,e=>{let{theme:n}=e;return n.sys.color.primary},h.outlinedInputClasses.notchedOutline,e=>{let{theme:n}=e;return n.sys.color.onPrimary}),j=(0,m.styled)(T.Text)(i||(i=c(["\n  color: ",";\n"])),e=>e.theme.sys.color.error);n.TimePicker=e=>{let{label:n,error:t,value:r,onChange:i,disabled:o,name:s}=e,c=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,a);const d=(0,p.useCallback)(e=>{i(e)},[i]),m=(0,p.useMemo)(()=>r?(0,O.default)(new Date(r)):null,[r]);return(0,u.jsx)(v.LocalizationProvider,{dateAdapter:f.AdapterDayjs,children:(0,u.jsxs)(g.DemoContainer,{components:["MobileDateTimePicker"],children:[(0,u.jsx)(k,l(l({},c),{},{value:m,label:n,defaultValue:m,onChange:e=>d(e?e.toDate():null),openTo:"hours",orientation:"landscape"})),!!t&&(0,u.jsx)(j,{typescale:"body",size:"medium",children:t})]})})}},93738(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TimePicker=void 0;var a=t(57290);Object.defineProperty(n,"TimePicker",{enumerable:!0,get:function(){return a.TimePicker}})},53042(e,n,t){"use strict";var a,r,i,o;function l(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.Toast=void 0;const c=t(65723),d=t(54790),u=s(t(10124)),p=t(32769),m=t(90817),f=t(35401),y=s(t(22155)),g=(0,d.styled)("div")(a||(a=l(["\n  border-radius: 16px;\n  background-color: ",";\n  padding: 12px 16px;\n  min-width: 282px;\n"])),e=>{switch(e.color){case"danger":return e.theme.sys.color.error;case"warning":return e.theme.customColors.warning.color;default:return e.theme.extendedColors.environmental.color}}),b=(0,d.styled)("div")(r||(r=l(["\n  display: flex;\n  justify-content: space-between;\n  align-items: top;\n  gap: 12px;\n  margin-bottom: 12px;\n"]))),h=(0,d.styled)(u.default)(i||(i=l(["\n  cursor: pointer;\n  margin-top: -2px;\n  margin-right: -4px;\n  color: ",";\n"])),e=>e.isWhite?e.theme.sys.color.onError:e.theme.ref.palette.neutral[10]),v=(0,d.styled)(m.Text)(o||(o=l(["\n  margin: 0;\n  color: ",";\n  max-width: 400px;\n"])),e=>e.isWhite?e.theme.sys.color.onError:e.theme.ref.palette.neutral[10]);n.Toast=y.default.forwardRef((e,n)=>{let{id:t,style:a,color:r,message:i}=e;const{closeSnackbar:o}=(0,f.useSnackbar)(),l="danger"===r;return(0,c.jsxs)(g,{color:r,ref:n,style:a,children:[(0,c.jsxs)(b,{children:[(0,c.jsx)(v,{typescale:"body",size:"medium",isWhite:l,children:i}),(0,c.jsx)(h,{onClick:()=>{o(t)},isWhite:l})]}),(0,c.jsx)(p.DurationProgress,{duration:5e3,color:l?"white":"black"})]})})},17647(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ToastProvider=void 0;const a=t(65723),r=t(35401),i=t(53042),o=(0,t(79533).makeStyles)()(()=>({containerRoot:{zIndex:2147483650}}));n.ToastProvider=e=>{let{children:n}=e;const{classes:t}=o();return(0,a.jsx)(r.SnackbarProvider,{Components:{rioToastV2:i.Toast},autoHideDuration:null,preventDuplicate:!0,anchorOrigin:{vertical:"top",horizontal:"right"},maxSnack:5,domRoot:document.body,classes:{containerRoot:t.containerRoot},children:n})}},93149(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useToast=n.ToastProvider=n.Toast=void 0;var a=t(53042);Object.defineProperty(n,"Toast",{enumerable:!0,get:function(){return a.Toast}});var r=t(17647);Object.defineProperty(n,"ToastProvider",{enumerable:!0,get:function(){return r.ToastProvider}});var i=t(30827);Object.defineProperty(n,"useToast",{enumerable:!0,get:function(){return i.useToast}})},30827(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useToast=void 0;const a=t(35401),r=t(22155);n.useToast=()=>{const{enqueueSnackbar:e,closeSnackbar:n}=(0,a.useSnackbar)(),t=(0,r.useCallback)((t,a)=>{const r=e(t,{variant:"rioToastV2",color:a});r&&setTimeout(()=>{n(r)},5e3)},[]);return(0,r.useMemo)(()=>({showToast:t}),[t])}},11001(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),n.LoadingTextTheme=n.PreLoader=n.LoadFailed=n.Dialog=n.DrawerSummary=n.DrawerDetails=n.Drawer=n.NavigationRailItem=n.NavigationDrawer=n.SegmentedButton=n.NavigationRail=n.ImageEditor=n.Slider=n.CircularProgress=n.LinearProgress=n.MultiSelect=n.RadioButton=n.DrawerLink=n.DatePicker=n.TimePicker=n.IconButton=n.Loader=n.PageTitleHeader=n.PageTitle=n.TextArea=n.TextField=n.Checkbox=n.Surface=n.Footer=n.Header=n.Select=n.FileUploadButton=n.Button=n.Badge=n.Text=n.Logo=n.Tabs=n.Grid=void 0,r(t(76126),n),r(t(55520),n),r(t(19563),n),r(t(47107),n),r(t(84281),n),r(t(72343),n),r(t(93149),n),r(t(32769),n),r(t(81272),n),r(t(10916),n);var i=t(34398);Object.defineProperty(n,"Grid",{enumerable:!0,get:function(){return i.Grid}});var o=t(24186);Object.defineProperty(n,"Tabs",{enumerable:!0,get:function(){return o.Tabs}});var l=t(33709);Object.defineProperty(n,"Logo",{enumerable:!0,get:function(){return l.Logo}});var s=t(90817);Object.defineProperty(n,"Text",{enumerable:!0,get:function(){return s.Text}});var c=t(85737);Object.defineProperty(n,"Badge",{enumerable:!0,get:function(){return c.Badge}});var d=t(88454);Object.defineProperty(n,"Button",{enumerable:!0,get:function(){return d.Button}}),Object.defineProperty(n,"FileUploadButton",{enumerable:!0,get:function(){return d.FileUploadButton}});var u=t(29374);Object.defineProperty(n,"Select",{enumerable:!0,get:function(){return u.Select}});var p=t(12839);Object.defineProperty(n,"Header",{enumerable:!0,get:function(){return p.Header}});var m=t(2021);Object.defineProperty(n,"Footer",{enumerable:!0,get:function(){return m.Footer}});var f=t(54737);Object.defineProperty(n,"Surface",{enumerable:!0,get:function(){return f.Surface}});var y=t(45419);Object.defineProperty(n,"Checkbox",{enumerable:!0,get:function(){return y.Checkbox}});var g=t(74231);Object.defineProperty(n,"TextField",{enumerable:!0,get:function(){return g.TextField}});var b=t(15616);Object.defineProperty(n,"TextArea",{enumerable:!0,get:function(){return b.TextArea}}),r(t(35462),n);var h=t(95285);Object.defineProperty(n,"PageTitle",{enumerable:!0,get:function(){return h.PageTitle}}),Object.defineProperty(n,"PageTitleHeader",{enumerable:!0,get:function(){return h.PageTitleHeader}});var v=t(37829);Object.defineProperty(n,"Loader",{enumerable:!0,get:function(){return v.Loader}});var x=t(6675);Object.defineProperty(n,"IconButton",{enumerable:!0,get:function(){return x.IconButton}});var T=t(93738);Object.defineProperty(n,"TimePicker",{enumerable:!0,get:function(){return T.TimePicker}});var O=t(79837);Object.defineProperty(n,"DatePicker",{enumerable:!0,get:function(){return O.DatePicker}});var k=t(39219);Object.defineProperty(n,"DrawerLink",{enumerable:!0,get:function(){return k.DrawerLink}});var j=t(89069);Object.defineProperty(n,"RadioButton",{enumerable:!0,get:function(){return j.RadioButton}});var C=t(49951);Object.defineProperty(n,"MultiSelect",{enumerable:!0,get:function(){return C.MultiSelect}});var S=t(89348);Object.defineProperty(n,"LinearProgress",{enumerable:!0,get:function(){return S.LinearProgress}});var N=t(21712);Object.defineProperty(n,"CircularProgress",{enumerable:!0,get:function(){return N.CircularProgress}});var w=t(30467);Object.defineProperty(n,"Slider",{enumerable:!0,get:function(){return w.Slider}});var D=t(41966);Object.defineProperty(n,"ImageEditor",{enumerable:!0,get:function(){return D.ImageEditor}});var A=t(50184);Object.defineProperty(n,"NavigationRail",{enumerable:!0,get:function(){return A.NavigationRail}});var R=t(38622);Object.defineProperty(n,"SegmentedButton",{enumerable:!0,get:function(){return R.SegmentedButton}});var P=t(63469);Object.defineProperty(n,"NavigationDrawer",{enumerable:!0,get:function(){return P.NavigationDrawer}});var L=t(36491);Object.defineProperty(n,"NavigationRailItem",{enumerable:!0,get:function(){return L.NavigationRailItem}});var I=t(64583);Object.defineProperty(n,"Drawer",{enumerable:!0,get:function(){return I.Drawer}}),Object.defineProperty(n,"DrawerDetails",{enumerable:!0,get:function(){return I.DrawerDetails}}),Object.defineProperty(n,"DrawerSummary",{enumerable:!0,get:function(){return I.DrawerSummary}});var E=t(11782);Object.defineProperty(n,"Dialog",{enumerable:!0,get:function(){return E.Dialog}});var _=t(58381);Object.defineProperty(n,"LoadFailed",{enumerable:!0,get:function(){return _.LoadFailed}});var F=t(18760);Object.defineProperty(n,"PreLoader",{enumerable:!0,get:function(){return F.PreLoader}}),Object.defineProperty(n,"LoadingTextTheme",{enumerable:!0,get:function(){return F.LoadingTextTheme}}),r(t(48188),n)},8485(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AG_GRID_PARAMS_V2=n.font=void 0,n.font="Plus Jakarta Sans",n.AG_GRID_PARAMS_V2="AG_GRID_PARAMS_V2"},27951(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(70240),n),r(t(4e3),n)},4e3(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useFindColorByToken=function(){const e=(0,a.useTheme)();return(0,r.useCallback)(n=>{if(n)return n in e.customColors?e.customColors[n].color:n in e.extendedColors?e.extendedColors[n].color:n in e.semanticColors?e.semanticColors[n].color:n in e.sys.color?e.sys.color[n]:void 0},[e])};const a=t(54790),r=t(22155)},70240(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useLocalStorage=void 0;const a=t(22155);n.useLocalStorage=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const t=()=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):n}catch(t){return console.error("Error reading localStorage key:",e),n}},[r,i]=(0,a.useState)(()=>t()),o=(0,a.useCallback)(n=>{try{i(n),localStorage.setItem(e,JSON.stringify(n))}catch(n){console.error("Error setting localStorage key:",e)}},[]);return(0,a.useMemo)(()=>({setValue:o,storedValue:r,getValueFromStorage:t}),[r,o])}},46832(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),n.AG_GRID_PARAMS_V2=n.useLocalStorage=n.opacifyHex=n.CssBaseline=void 0,r(t(11001),n),r(t(24804),n),r(t(1982),n);var i=t(49708);Object.defineProperty(n,"CssBaseline",{enumerable:!0,get:function(){return i.CssBaseline}});var o=t(89922);Object.defineProperty(n,"opacifyHex",{enumerable:!0,get:function(){return o.opacifyHex}});var l=t(27951);Object.defineProperty(n,"useLocalStorage",{enumerable:!0,get:function(){return l.useLocalStorage}});var s=t(8485);Object.defineProperty(n,"AG_GRID_PARAMS_V2",{enumerable:!0,get:function(){return s.AG_GRID_PARAMS_V2}})},83404(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.themeTokens=void 0,n.themeTokens={seed:"#001AFF",description:"TYPE: CUSTOM",coreColors:{primary:"#001AFF"},schemes:{light:{primary:"#2E3EFF",onPrimary:"#FFFFFF",primaryContainer:"#E0E0FF",onPrimaryContainer:"#000569",primaryFixed:"#E0E0FF",onPrimaryFixed:"#000569",primaryFixedDim:"#BEC2FF",onPrimaryFixedVariant:"#0016E5",secondary:"#5C5D72",onSecondary:"#FFFFFF",secondaryContainer:"#E1E0F9",onSecondaryContainer:"#191A2C",secondaryFixed:"#E1E0F9",onSecondaryFixed:"#191A2C",secondaryFixedDim:"#C5C4DD",onSecondaryFixedVariant:"#444559",tertiary:"#78536B",onTertiary:"#FFFFFF",tertiaryContainer:"#FFD7EE",onTertiaryContainer:"#2E1126",tertiaryFixed:"#FFD7EE",onTertiaryFixed:"#2E1126",tertiaryFixedDim:"#E7B9D5",onTertiaryFixedVariant:"#5E3C53",error:"#BA1A1A",onError:"#FFFFFF",errorContainer:"#FFDAD6",onErrorContainer:"#410002",outline:"#777680",background:"#FFFBFF",onBackground:"#1B1B1F",surface:"#FFFFFF",onSurface:"#1B1B1F",surfaceVariant:"#E3E1EC",onSurfaceVariant:"#46464F",inverseSurface:"#303034",inverseOnSurface:"#F3F0F4",inversePrimary:"#BEC2FF",shadow:"#000000",surfaceTint:"#2E3EFF",outlineVariant:"#C7C5D0",scrim:"#000000",surfaceContainerHighest:"#FFFFFF",surfaceContainerHigh:"#FFFFFF",surfaceContainer:"#FFFFFF",surfaceContainerLow:"#FFFFFF",surfaceContainerLowest:"#FFFFFF",surfaceBright:"#FFFFFF",surfaceDim:"#FFFFFF"},dark:{primary:"#BEC2FF",onPrimary:"#000DA4",primaryContainer:"#0016E5",onPrimaryContainer:"#E0E0FF",primaryFixed:"#E0E0FF",onPrimaryFixed:"#000569",primaryFixedDim:"#BEC2FF",onPrimaryFixedVariant:"#0016E5",secondary:"#C5C4DD",onSecondary:"#2E2F42",secondaryContainer:"#444559",onSecondaryContainer:"#E1E0F9",secondaryFixed:"#E1E0F9",onSecondaryFixed:"#191A2C",secondaryFixedDim:"#C5C4DD",onSecondaryFixedVariant:"#444559",tertiary:"#E7B9D5",onTertiary:"#45263C",tertiaryContainer:"#5E3C53",onTertiaryContainer:"#FFD7EE",tertiaryFixed:"#FFD7EE",onTertiaryFixed:"#2E1126",tertiaryFixedDim:"#E7B9D5",onTertiaryFixedVariant:"#5E3C53",error:"#FFB4AB",onError:"#690005",errorContainer:"#93000A",onErrorContainer:"#FFDAD6",outline:"#91909A",background:"#1B1B1F",onBackground:"#E4E1E6",surface:"#131316",onSurface:"#C8C5CA",surfaceVariant:"#46464F",onSurfaceVariant:"#C7C5D0",inverseSurface:"#E4E1E6",inverseOnSurface:"#1B1B1F",inversePrimary:"#2E3EFF",shadow:"#000000",surfaceTint:"#BEC2FF",outlineVariant:"#46464F",scrim:"#000000",surfaceContainerHighest:"#131316",surfaceContainerHigh:"#131316",surfaceContainer:"#131316",surfaceContainerLow:"#131316",surfaceContainerLowest:"#131316",surfaceBright:"#131316",surfaceDim:"#131316"}},palettes:{primary:{0:"#000000",5:"#00034A",10:"#000569",dark:"#000569",20:"#000DA4",25:"#0012C4",30:"#0016E5",35:"#0E23FF",40:"#2E3EFF",50:"#5664FF",main:"#2E3EFF",60:"#7A85FF",70:"#9CA4FF",80:"#BEC2FF",light:"#E0E0FF",90:"#E0E0FF",95:"#F1EFFF",98:"#FBF8FF",99:"#FFFBFF",100:"#FFFFFF",contrastText:"#FFFFFF"},secondary:{0:"#000000",5:"#0E0F21",10:"#191A2C",dark:"#191A2C",20:"#2E2F42",25:"#393A4D",30:"#444559",35:"#505165",40:"#5C5D72",50:"#75758B",main:"#5C5D72",60:"#8E8FA6",70:"#A9A9C1",80:"#C5C4DD",light:"#E1E0F9",90:"#E1E0F9",95:"#F1EFFF",98:"#FBF8FF",99:"#FFFBFF",100:"#FFFFFF"},tertiary:{0:"#000000",5:"#21071B",10:"#2E1126",dark:"#2E1126",20:"#45263C",25:"#523147",30:"#5E3C53",35:"#6B475F",40:"#78536B",50:"#926B84",main:"#78536B",60:"#AE849F",70:"#CA9FBA",80:"#E7B9D5",light:"#FFD7EE",90:"#FFD7EE",95:"#FFECF5",98:"#FFF8F9",99:"#FFFBFF",100:"#FFFFFF"},error:{0:"#000000",5:"#2D0001",10:"#410002",dark:"#410002",20:"#690005",25:"#7E0007",30:"#93000A",35:"#A80710",40:"#BA1A1A",main:"#BA1A1A",50:"#DE3730",60:"#FF5449",70:"#FF897D",80:"#FFB4AB",90:"#FFDAD6",light:"#FFDAD6",95:"#FFEDEA",98:"#FFF8F7",99:"#FFFBFF",100:"#FFFFFF"},warning:{0:"#000000",10:"#221B04",dark:"#221B04",20:"#3A2F09",30:"#534612",40:"#6E5D1A",50:"#8C7524",60:"#A88E31",70:"#C5A948",main:"#C5A948",80:"#E2C45F",90:"#FAE190",light:"#FAE190",95:"#FCF1CE",99:"#FEFBFF",100:"#FFFFFF",contrastText:"#FFFFFF"},success:{0:"#000000",10:"#092018",20:"#14372A",dark:"#14372A",30:"#20503E",40:"#2E6B54",main:"#2E6B54",50:"#3B856A",60:"#52A887",70:"#69BD9B",80:"#85D9B6",90:"#A0F5D1",light:"#A0F5D1",95:"#CAFDE5",99:"#F6FFF9",100:"#FFFFFF",contrastText:"#FFFFFF"},neutral:{0:"#000000",5:"#111114",10:"#1B1B1F",dark:"#1B1B1F",17:"#1B1B1F",20:"#303034",22:"#303034",25:"#3C3B3F",30:"#47464A",35:"#535256",40:"#5F5E62",50:"#78767A",main:"#5F5E62",60:"#929094",70:"#ADAAAF",80:"#C8C5CA",light:"#E4E1E6",90:"#E4E1E6",92:"#E4E1E6",95:"#F3F0F4",96:"#F3F0F4",98:"#FCF8FD",99:"#FFFBFF",100:"#FFFFFF"},neutralVariant:{0:"#000000",5:"#101018",10:"#1B1B23",dark:"#1B1B23",20:"#303038",25:"#3B3B43",30:"#46464F",35:"#52525B",40:"#5E5D67",50:"#777680",main:"#5E5D67",60:"#91909A",70:"#ABAAB4",80:"#C7C5D0",light:"#E3E1EC",90:"#E3E1EC",95:"#F2EFFA",98:"#FBF8FF",99:"#FFFBFF",100:"#FFFFFF"},info:{0:"#000000",10:"#05154C",20:"#112874",dark:"#112874",30:"#2D418B",40:"#465AA4",main:"#465AA4",50:"#6073BF",60:"#7A8CDA",70:"#95A7F7",80:"#B9C4FB",90:"#DDE1FD",light:"#DDE1FD",95:"#EFF0FE",99:"#FEFBFF",100:"#ffffff",contrastText:"#FFFFFF"}},styles:{display:{large:{family:"Plus Jakarta Sans",fontFamilyStyle:"Regular",weight:"400",size:57,lineHeight:64,tracking:-.25},medium:{family:"Plus Jakarta Sans",fontFamilyStyle:"Regular",weight:"400",size:45,lineHeight:52,tracking:0},small:{family:"Plus Jakarta Sans",fontFamilyStyle:"Regular",weight:"400",size:36,lineHeight:44,tracking:0}},headline:{large:{family:"Plus Jakarta Sans",fontFamilyStyle:"Regular",weight:"400",size:32,lineHeight:40,tracking:0},medium:{family:"Plus Jakarta Sans",fontFamilyStyle:"Regular",weight:"400",size:28,lineHeight:36,tracking:0},small:{family:"Plus Jakarta Sans",fontFamilyStyle:"Regular",weight:"400",size:24,lineHeight:32,tracking:0}},body:{large:{family:"Plus Jakarta Sans",fontFamilyStyle:"Regular",weight:"400",size:16,lineHeight:24,tracking:.5},medium:{family:"Plus Jakarta Sans",fontFamilyStyle:"Regular",weight:"400",size:14,lineHeight:20,tracking:.25},small:{family:"Plus Jakarta Sans",fontFamilyStyle:"Regular",weight:"400",size:12,lineHeight:16,tracking:.4}},label:{large:{family:"Plus Jakarta Sans",fontFamilyStyle:"Medium",weight:"500",size:14,lineHeight:20,tracking:.1},medium:{family:"Plus Jakarta Sans",fontFamilyStyle:"Medium",weight:"500",size:12,lineHeight:16,tracking:.5},small:{family:"Plus Jakarta Sans",fontFamilyStyle:"Medium",weight:"500",size:11,lineHeight:16,tracking:.5}},title:{large:{family:"Plus Jakarta Sans",fontFamilyStyle:"Regular",weight:"400",size:22,lineHeight:28,tracking:0},medium:{family:"Plus Jakarta Sans",fontFamilyStyle:"Medium",weight:"500",size:16,lineHeight:24,tracking:.15},small:{family:"Plus Jakarta Sans",fontFamilyStyle:"Medium",weight:"500",size:14,lineHeight:20,tracking:.1}}},extendedColors:{environmental:{harmonized:!1,color:"#08EBA7",darkColor:"#006C4B",endColor:"rgba(8, 235, 167, 0.10)",name:"Rio Green (Seed)",description:"Environmental"},environmentalVariant:{harmonized:!1,color:"#3CB770",endColor:"rgba(60, 183, 112, 0.10)",name:"Rio Green Variant",description:"Environmental Variant"},social:{harmonized:!1,color:"#917FFE",endColor:"rgba(228, 66, 255, 0.10)",name:"Rio Purple (Seed)",description:"Social"},economic:{harmonized:!1,color:"#E442FF",endColor:"rgba(145, 127, 254, 0.10)",name:"Rio Pink (Seed)",description:"Economic"},economicVariant:{harmonized:!1,color:"#FABEF1",endColor:"rgba(250, 190, 241, 0.10)",name:"Rio Pink Variant",description:"Economic Variant"},governance:{harmonized:!1,color:"#001AFF",endColor:"rgba(0, 26, 255, 0.10)",name:"Rio Blue (Seed)",description:"Governance"}},customColors:{warning:{harmonized:!1,color:"#FDD238",name:"Yellow",description:"Warning/Charts"},orange:{harmonized:!1,color:"#F27844",name:"Orange",description:"Charts"},success:{harmonized:!1,color:"#EEFFEC",name:"Success",description:"Background for success"},onSuccess:{harmonized:!1,color:"#0C8B00",name:"On success",description:"Success text"}},semanticColors:{electricity:{harmonized:!1,color:"#2E3EFF",name:"Electricity",description:"Represents electricity data in charts"},gas:{harmonized:!1,color:"#08EBA7",name:"Gas",description:"Represents natural gas data in charts"},water:{harmonized:!1,color:"#E442FF",name:"Water",description:"Represents water data in charts"},waste:{harmonized:!1,color:"#917FFE",name:"Waste",description:"Represents waste data in charts"},fuel:{harmonized:!1,color:"#000",name:"Fuel",description:"Represents fuel data in charts"},transport:{harmonized:!1,color:"#FDD237",name:"Transport",description:"Represents transport data in charts"},refrigerants:{harmonized:!1,color:"#A7EAFF",name:"Refrigerants",description:"Represents refrigerants data in charts"},heatAndSteam:{harmonized:!1,color:"#BA1A1A",name:"Heat & steam",description:"Represents heat & steam data in charts"},materials:{harmonized:!1,color:"#AFAFAF",name:"Materials",description:"Represents materials data in charts"},hotelStays:{harmonized:!1,color:"#3786FD",name:"Hotel stays & work from home",description:"Represents hotel stays data"},workFromHome:{harmonized:!1,color:"#FFCCFD",name:"Work from home",description:"Represents number of days worked from home"},finances:{harmonized:!1,color:"#096F00",name:"Finances",description:"Represents finances data"}},name:"M3"}},2877(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.themeConfig=void 0;const a=t(54790),r=t(83404),i=t(97322),o=t(8485);n.themeConfig={cssVariables:!0,ref:{palette:r.themeTokens.palettes},palette:r.themeTokens.palettes,customStates:{disabled:{stateLayerOpacity:.12}},sys:{typescale:r.themeTokens.styles,color:r.themeTokens.schemes.light,state:{hover:{stateLayerOpacity:.84},focus:{stateLayerOpacity:.12},pressed:{stateLayerOpacity:.16}},elevation:["0px 1px 3px 1px rgba(0, 0, 0, 0.05), 0px 1px 2px 0px rgba(0, 0, 0, 0.10)","0px 2px 6px 2px rgba(0, 0, 0, 0.05), 0px 1px 2px 0px rgba(0, 0, 0, 0.10)","0px 1px 3px 0px rgba(0, 0, 0, 0.10), 0px 4px 8px 3px rgba(0, 0, 0, 0.05)","0px 2px 3px 0px rgba(0, 0, 0, 0.10), 0px 6px 10px 4px rgba(0, 0, 0, 0.05)","0px 4px 4px 0px rgba(0, 0, 0, 0.10), 0px 8px 12px 6px rgba(0, 0, 0, 0.05)","0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)"]},extendedColors:r.themeTokens.extendedColors,customColors:r.themeTokens.customColors,semanticColors:r.themeTokens.semanticColors,typography:{fontFamily:o.font},components:{MuiButton:{defaultProps:{disableElevation:!0}},MuiButtonBase:{defaultProps:{disableRipple:!0,LinkComponent:i.Link}}}};const l=(0,a.createTheme)(n.themeConfig);n.default=l},64561(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},1982(e,n,t){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,n,t,a){void 0===a&&(a=t);var r=Object.getOwnPropertyDescriptor(n,t);r&&!("get"in r?!n.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,a,r)}:function(e,n,t,a){void 0===a&&(a=t),e[a]=n[t]}),r=this&&this.__exportStar||function(e,n){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(n,t)||a(n,e,t)};Object.defineProperty(n,"__esModule",{value:!0}),r(t(52111),n),r(t(64561),n)},52111(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},12667(e,n){"use strict";function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function a(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach(function(n){r(e,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))})}return e}function r(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.formatters=void 0;const i={hour:"numeric",minute:"numeric",second:"numeric"},o={day:"numeric",month:"numeric",year:"numeric"},l=new Intl.DateTimeFormat([],i),s=new Intl.DateTimeFormat([],{month:"short"}),c=new Intl.DateTimeFormat([],{month:"short",year:"numeric"}),d=new Intl.DateTimeFormat([],o),u=new Intl.DateTimeFormat([],a(a({},i),o)),p=new Intl.ListFormat,m=new Intl.NumberFormat,f=new Intl.NumberFormat([],{maximumFractionDigits:1,notation:"compact"}),y=new Intl.NumberFormat([],{maximumFractionDigits:0}),g=new Intl.NumberFormat([],{notation:"compact"});n.formatters={time:l,month:s,monthYear:c,date:d,dateTime:u,list:p,int:y,number:m,percentage:f,numberCompact:g}},89922(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatters=n.opacifyHex=n.getNodeText=void 0;var a=t(32641);Object.defineProperty(n,"getNodeText",{enumerable:!0,get:function(){return a.getNodeText}});var r=t(33236);Object.defineProperty(n,"opacifyHex",{enumerable:!0,get:function(){return r.opacifyHex}});var i=t(12667);Object.defineProperty(n,"formatters",{enumerable:!0,get:function(){return i.formatters}})},33236(e,n,t){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.opacifyHex=void 0;var r=t(73474);Object.defineProperty(n,"opacifyHex",{enumerable:!0,get:function(){return a(r).default}})},32641(e,n){"use strict";function t(e){return!(!e||"object"!=typeof e)&&"type"in e}Object.defineProperty(n,"__esModule",{value:!0}),n.isElement=t,n.getNodeText=function e(n){return"string"==typeof n?n:"number"!=typeof n||Number.isNaN(n)?n instanceof Array?n.map(e).join(""):t(n)?e(n.props.children):"":n.toString()}},44273(e,n,t){"use strict";var a={};t.r(a),t.d(a,{ACCOUNT:()=>Se,DEPARTMENT:()=>we,LOCATION:()=>Ce,REGION:()=>De,TAG:()=>Ne,labels:()=>Ae,scopeLegislationOptions:()=>Pe,scopeOptions:()=>Re});var r={};t.r(r),t.d(r,{cw:()=>Qg,K2:()=>ub,vX:()=>eb,Mk:()=>Zg,b1:()=>nb,Vr:()=>ub,Hv:()=>Xg});var i={};t.r(i),t.d(i,{ENG:()=>bln,EUR:()=>Oln,GBR:()=>Tln,JSONIcon:()=>Ww,NIR:()=>vln,SCO:()=>hln,WAL:()=>xln}),t(29969);var o=t(58997),l=t(62020),s=t(59263),c=t(28045),d=t(80610),u=t(85531),p=t(97322),m=t(41346),f=t(46832),y=t(38623),g=t(22155),b=t(87472),h=t(10344),v=t(34862),x=t.n(v);const T=["data"];function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function k(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function j(e){const n=(0,h.IT)(x(),{variables:{id:e},skip:!e}),{data:{getAccountInfo:t={}}={}}=n;return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach(function(n){k(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({data:t},function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,T))}var C,S,N=t(62659),w=t(34553),D=t(27477);function A(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const R=(0,D.J1)(C||(C=A(["\n  fragment getUserInfoFragment on User {\n    id\n    email\n    first_name\n    last_name\n    jobTitle\n    department\n    phone\n    mobile\n    profilePicture\n    roles\n    accessLevel\n    allowedLocations {\n      id\n      name\n      tags {\n        id\n        tagName\n      }\n    }\n    allowedTags {\n      id\n      tagName\n      locations {\n        id\n        name\n      }\n    }\n    account {\n      id\n      name\n      type\n      logoPath\n      departments {\n        id\n        name\n      }\n      children {\n        id\n        name\n        logoPath\n      }\n    }\n    role {\n      role\n      name\n      restrictedAccess\n      permissions {\n        allowedRioModules\n        user\n        account\n        data\n        governance\n        document\n        documentFolder\n        tag\n        transposition\n        email\n        notification\n        learn\n        licence\n        dashboard\n        task\n        ocr\n        intelligence\n        project\n        scheme\n        survey\n        dataTracker\n        dataTrackerAnomalies\n        flows\n        invest\n        dataOverwriting\n      }\n    }\n    disableAccountSelector\n  }\n"]))),P=(0,D.J1)(S||(S=A(["\n  query GetUserByUsername($name: String!) {\n    getUserInfoById(id: $name) {\n      ...getUserInfoFragment\n    }\n  }\n  ","\n"])),R);var L,I,E,_,F,B,U,M;function V(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const z=(0,D.J1)(L||(L=V(["\n  {\n    loginError @client\n  }\n"]))),G=(0,D.J1)(I||(I=V(["\n  {\n    idToken @client {\n      sub\n      given_name\n      aud\n      event_id\n      auth_time\n      name\n      exp\n      iat\n      family_name\n      email\n      roles\n      accessLevel\n      allowedLocations\n      allowedTags\n    }\n    sessionLoading @client\n  }\n"]))),$=(0,D.J1)(E||(E=V(["\n  mutation LogIn($email: String!, $password: String!, $type: String) {\n    login(email: $email, password: $password, type: $type) @client\n  }\n"]))),W=(0,D.J1)(_||(_=V(["\n  mutation LogInSSO($provider: String!) {\n    loginSSO(provider: $provider) @client\n  }\n"]))),q=(0,D.J1)(F||(F=V(["\n  mutation SetPassword($email: String!, $password: String!, $oldPassword: String!) {\n    setPassword(email: $email, password: $password, oldPassword: $oldPassword) @client\n  }\n"]))),J=(0,D.J1)(B||(B=V(["\n  mutation ForgotPassword($username: String!) {\n    forgotPassword(username: $username) @client\n  }\n"]))),Y=((0,D.J1)(U||(U=V(["\n  mutation ResetPassword($username: String!, $password: String!, $confirmationCode: String!) {\n    resetPassword(username: $username, password: $password, confirmationCode: $confirmationCode) @client\n  }\n"]))),(0,D.J1)(M||(M=V(["\n  mutation LogOut {\n    logout @client\n  }\n"]))));var H,K,Q,Z,X,ee,ne,te,ae,re,ie,oe,le,se,ce,de=t(79043);function ue(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const pe=(0,D.J1)(H||(H=ue(["\n  fragment ReportingYearFields on ReportingYear {\n    id\n    name\n    startDate\n    endDate\n  }\n"]))),me=(0,D.J1)(K||(K=ue(["\n  fragment AccessControlsFields on AccessControls {\n    learn\n    intelligence\n    tasks\n    projects\n    surveys\n    flows\n    dataTracker\n    dromoUpload\n    v2Design\n    dataOverwriting\n    organisation\n    comply {\n      legislation\n      tagLevelLegislation\n      policies\n      systems\n      targets\n      frameworks\n      agreements\n    }\n    data {\n      waste\n      electricity\n      gas\n      water\n      materials\n      fuel\n      transport\n      refrigerants\n      heatSteam\n      buildingEnergyRatings\n      hotelStays\n      investment\n      scope3ActivityBasedMaterials\n      scope3SpendBasedMaterials\n      coreEstate\n      oilAndGas\n      insite\n    }\n  }\n"]))),fe=(0,D.J1)(Q||(Q=ue(["\n  fragment FeatureTogglesFields on FeatureToggles {\n    enableGlobalEmissionFactors\n  }\n"]))),ye=(0,D.J1)(Z||(Z=ue(["\n  fragment AccountFields on Account {\n    id\n    name\n    type\n    notes\n    showChatBot\n    n3rgyConsentDocumentLink\n    n3rgyUploadGranularity\n    featureToggles {\n      enableGlobalEmissionFactors\n    }\n    sector {\n      id\n      name\n    }\n    reportingYear {\n      ...ReportingYearFields\n    }\n    children {\n      id\n      name\n      logoPath\n    }\n    accessControls {\n      ...AccessControlsFields\n    }\n    featureToggles {\n      ...FeatureTogglesFields\n    }\n    unrestrictedDocuments\n  }\n  ","\n  ","\n  ","\n"])),pe,me,fe),ge=(0,D.J1)(X||(X=ue(["\n  fragment BannerFields on Banner {\n    id\n    accountId\n    url\n    type\n    thumbnail\n    visible\n  }\n"]))),be=(0,D.J1)(ee||(ee=ue(["\n  mutation CreateAccount(\n    $id: ID!\n    $name: String!\n    $type: AccountType!\n    $accessControls: AccessControlsInput!\n    $children: [ID]\n    $notes: String\n    $showChatBot: Boolean\n    $reportingYearId: ID\n    $sectorId: String\n    $unrestrictedDocuments: [String]\n    $featureToggles: FeatureTogglesInput\n  ) {\n    createAccount(\n      input: {\n        id: $id\n        name: $name\n        type: $type\n        accessControls: $accessControls\n        children: $children\n        notes: $notes\n        showChatBot: $showChatBot\n        sectorId: $sectorId\n        unrestrictedDocuments: $unrestrictedDocuments\n        featureToggles: $featureToggles\n      }\n    ) {\n      ...AccountFields\n    }\n    setAccountReportingYear(accountId: $id, reportingYearId: $reportingYearId) {\n      ...ReportingYearFields\n    }\n  }\n  ","\n  ","\n"])),pe,ye),he=(0,D.J1)(ne||(ne=ue(["\n  mutation UpdateAccount(\n    $id: ID!\n    $name: String!\n    $type: AccountType!\n    $accessControls: AccessControlsInput!\n    $children: [ID]\n    $notes: String\n    $showChatBot: Boolean\n    $reportingYearId: ID\n    $sectorId: String\n    $n3rgyConsentDocumentLink: String\n    $n3rgyUploadGranularity: String\n    $featureToggles: FeatureTogglesInput\n    $unrestrictedDocuments: [String]\n    $customImpactDashboardId: String\n  ) {\n    updateAccount(\n      input: {\n        id: $id\n        name: $name\n        type: $type\n        accessControls: $accessControls\n        children: $children\n        notes: $notes\n        showChatBot: $showChatBot\n        sectorId: $sectorId\n        n3rgyConsentDocumentLink: $n3rgyConsentDocumentLink\n        n3rgyUploadGranularity: $n3rgyUploadGranularity\n        unrestrictedDocuments: $unrestrictedDocuments\n        featureToggles: $featureToggles\n        customImpactDashboardId: $customImpactDashboardId\n      }\n    ) {\n      ...AccountFields\n    }\n    setAccountReportingYear(accountId: $id, reportingYearId: $reportingYearId) {\n      ...ReportingYearFields\n    }\n  }\n  ","\n  ","\n"])),pe,ye),ve=((0,D.J1)(te||(te=ue(["\n  mutation DeleteAccount($id: ID!) {\n    deleteAccount(id: $id)\n  }\n"]))),(0,D.J1)(ae||(ae=ue(["\n  mutation UploadAccountLogo(\n    $fileName: String!\n    $data: String!\n    $contentType: String!\n    $accountId: ID!\n    $accountName: String!\n    $accountType: AccountType!\n    $accessControls: AccessControlsInput!\n  ) {\n    uploadLogo(input: { fileName: $fileName, contentType: $contentType, imageData: $data, accountId: $accountId })\n\n    updateAccount(\n      input: {\n        id: $accountId\n        name: $accountName\n        type: $accountType\n        accessControls: $accessControls\n        logoPath: $fileName\n      }\n    ) {\n      id\n      logoPath\n    }\n  }\n"])))),xe=(0,D.J1)(re||(re=ue(["\n  query GetAccountInfo($id: ID!) {\n    getAccountInfo(id: $id) {\n      ...AccountFields\n      customImpactDashboard {\n        id\n        name\n      }\n    }\n  }\n  ","\n"])),ye),Te=((0,D.J1)(ie||(ie=ue(["\n  query GetBanner($accountId: ID!) {\n    getBanner(accountId: $accountId) {\n      ...BannerFields\n    }\n  }\n  ","\n"])),ge),(0,D.J1)(oe||(oe=ue(["\n  query GetAccounts($limit: Int!, $offset: Int, $sort: [SortCommand!], $filters: Filters) {\n    getAccounts(offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n        type\n        accessControls {\n          ...AccessControlsFields\n        }\n        featureToggles {\n          ...FeatureTogglesFields\n        }\n      }\n    }\n  }\n  ","\n  ","\n"])),me,fe)),Oe=(0,D.J1)(le||(le=ue(["\n  mutation SaveBanner($input: SaveBannerInput!) {\n    saveBanner(input: $input) {\n      ...BannerFields\n    }\n  }\n  ","\n"])),ge),ke=(0,D.J1)(se||(se=ue(["\n  mutation DeleteBanner($accountId: ID!, $id: ID!) {\n    deleteBanner(accountId: $accountId, id: $id)\n  }\n"]))),je=(0,D.J1)(ce||(ce=ue(["\n  query GetReportingYears {\n    getReportingYears {\n      ...ReportingYearFields\n    }\n  }\n  ","\n"])),pe),Ce="LOCATION",Se="ACCOUNT",Ne="TAG",we="DEPARTMENT",De="REGION",Ae={[Ce]:"Location",[Se]:"Account",[Ne]:"Tag",[we]:"Department",[De]:"Region"},Re=[{value:Se,label:Ae[Se]},{value:Ce,label:Ae[Ce]},{value:Ne,label:Ae[Ne]}],Pe={[Ne]:Ae[Ne],[Ce]:Ae[Ce],[we]:Ae[we],[De]:Ae[De]};var Le,Ie;function Ee(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _e=(0,D.J1)(Le||(Le=Ee(["\n  query GetCurrentAccountId {\n    currentAccountId @client\n  }\n"]))),Fe=(0,D.J1)(Ie||(Ie=Ee(["\n  mutation SetCurrentAccountId($currentAccountId: String!) {\n    setCurrentAccountId(currentAccountId: $currentAccountId) @client\n  }\n"])));var Be,Ue,Me,Ve,ze=t(33104),Ge=t(75235),$e=t(17084),We=t(47106),qe=t.n(We),Je=t(34322),Ye=t(81995),He=t(5821),Ke=t.n(He),Qe=t(76013),Ze=t(65723);function Xe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const en=Ge.default.div(Be||(Be=Xe(["\n  padding: ",";\n"])),e=>e.theme.geometry.sm.spacing),nn=(0,Ge.default)(ze.DZ)(Ue||(Ue=Xe(["\n  text-align: center;\n"]))),tn=(0,Ge.default)(ze.ks)(Me||(Me=Xe(["\n  width: 100%;\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),an=(0,Ge.default)(ze.$n)(Ve||(Ve=Xe(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing);class rn extends g.Component{constructor(e){super(e),this.handleChange=e=>{this.setState({username:{value:e.target.value}})},this.handleSendPasswordResetCode=(e,n)=>{this.state.username.value&&n({variables:{username:this.state.username.value}})},this.state={username:{value:e.username||"",error:null},success:!1}}render(){return(0,Ze.jsxs)(en,{name:"forgot-password-container",children:[this.state.success&&(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(nn,{size:"lg",children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.success.title"})}),(0,Ze.jsx)(ze.EY,{align:"center",children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.success.subheading"})}),(0,Ze.jsx)(an,{name:"forgot-password-container__go-to-resetbutton",component:"routerLink",to:"/reset-password?username=".concat(this.state.username.value),children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.goToResetButton"})})]}),!this.state.success&&(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(nn,{size:"lg",children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.title"})}),(0,Ze.jsx)(ze.EY,{align:"center",children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.subheading"})}),(0,Ze.jsx)(tn,{name:"username",error:this.state.username.error,box:!0,placeholder:this.props.intl.formatMessage({id:"login.forgotPassword.usernamePlaceholder"}),value:this.state.username.value,onChange:this.handleChange}),(0,Ze.jsx)(Qe.s,{mutation:J,onCompleted:()=>{this.setState({success:!0}),console.log("==== COMPLETE ====")},children:e=>(0,Ze.jsx)(an,{name:"forgot-password-container__button",onClick:n=>this.handleSendPasswordResetCode(n,e),children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.submitButton"})})})]})]})}}rn.propTypes={username:Ke().string,errors:Ke().object};const on=(0,Ye.Ay)(rn),ln=["name","dismissable","onDismiss","title","body","icon"];var sn,cn,dn,un;function pn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function mn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pn(Object(t),!0).forEach(function(n){fn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function fn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function yn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const gn=Ge.default.div(sn||(sn=yn(["\n  ",";\n"])),e=>{let{theme:n,color:t="primary"}=e;return"\n    display: flex;\n    width: 100%;\n    align-items: center;\n    background-color: ".concat(n.colors[t].normal.background,";\n    padding: ").concat(n.geometry.sm.spacing,";\n  ")}),bn=(0,Ge.default)(ze.In)(cn||(cn=yn(["\n  ",";\n"])),e=>{let{theme:n}=e;return"\n    flex: 0 0 auto;\n    margin-right: ".concat(n.geometry.sm.spacing,";\n    margin-left: ").concat(n.geometry.xs.spacing,";\n    color: ").concat(n.colors.basic.white,";\n  ")}),hn=Ge.default.div(dn||(dn=yn(["\n  ",";\n"])),e=>{let{theme:n}=e;return"\n    flex: 1 1 auto;\n    margin-right: ".concat(n.geometry.sm.spacing,";\n  ")}),vn=(0,Ge.default)(ze.In)(un||(un=yn(["\n  ",";\n"])),e=>{let{theme:n}=e;return"\n    flex: 0 0 auto;\n    margin-right: ".concat(n.geometry.sm.spacing,";\n    color: ").concat(n.colors.basic.white,";\n    background:transparent;\n    &:hover {\n      cursor:pointer;\n    }\n  ")}),xn=e=>{let{name:n,dismissable:t,onDismiss:a,title:r,body:i,icon:o}=e,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,ln);return(0,Ze.jsxs)(gn,mn(mn({},l),{},{children:[o&&(0,Ze.jsx)(bn,{icon:o}),(0,Ze.jsxs)(hn,{children:[r&&(0,Ze.jsx)(ze.DZ,{size:"md",color:"white",children:r}),i&&(0,Ze.jsx)(ze.EY,{size:"md",color:"white",children:i})]}),t&&(0,Ze.jsx)(vn,{onClick:a,icon:"times",name:"".concat(n,"__dismiss-cross")})]}))};xn.propTypes={id:Ke().string,name:Ke().string,title:Ke().string,body:Ke().string,icon:Ke().string};const Tn=xn,On=t.p+"RioLogo2021-e9c2bb60af263e60f79c.png",kn=e=>{var n;return(null===(n={NODE_ENV:"production"})||void 0===n?void 0:n[e])||{NODE_ENV:"production",REACT_APP_LEARN_THUMBNAIL_UPLOAD:"https://vbmmdf81nl.execute-api.eu-west-2.amazonaws.com/live/learnthumbnailupload",REACT_APP_COGNITO_DOMAIN:"rio.auth.eu-west-2.amazoncognito.com",REACT_APP_RESOLVE_EXTERNAL_USER_URL:"https://zp73c6vc5l.execute-api.eu-west-2.amazonaws.com/current/resolve-external-user",REACT_APP_IDENTITY_POOL_ID:"eu-west-2:2fee832d-d0ba-420c-a056-0ed865cde419",REACT_APP_STRIPE_PUBLIC_KEY:"pk_live_51HLD9AEF3FA3cLa5DWIX6QpW41AHM0f5DALJjUtBoRhvP52iJrBkyGW9HajZ6MHF0M6weW7Nals5CkSZdULWyYyT00Pg5PgL0l",REACT_APP_PROFILE_BUCKET:"https://platform-profilepictures-live.s3.eu-west-2.amazonaws.com",REACT_APP_BANNER_CONTENT:"/VIDEO/LearnBanner.mp4",REACT_APP_AG_GRID_LICENSE_KEY:"Using_this_{AG_Grid}_Enterprise_key_{AG-063287}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{RIO_ESG_LTD}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{Rio}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{Rio}_need_to_be_licensed___{Rio}_has_been_granted_a_Deployment_License_Add-on_for_{1}_Production_Environment___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{30_September_2025}____[v3]_[01]_MTc1OTE4NjgwMDAwMA==8e1b4570338f7c27ca6155479e1e2c14",REACT_APP_DS_URL:"https://rio.ai",REACT_APP_LOCATION_PICTURE_BUCKET:"https://platform-location-pictures-live.s3.eu-west-2.amazonaws.com",REACT_APP_GOOGLE_ANALYTIC_KEY:"UA-74511216-3",REACT_APP_IMPACT_LOCATIONS_MAP_ID:"b3c1bd97c9d0fbf8",REACT_APP_AG_CHARTS_LICENSE_KEY:"Using_this_{AG_Charts}_Enterprise_key_{AG-085624}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Ditto_sustainability_limited}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{Rio}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{Rio}_need_to_be_licensed___{Rio}_has_been_granted_a_Deployment_License_Add-on_for_{1}_Production_Environment___This_key_works_with_{AG_Charts}_Enterprise_versions_released_before_{28_March_2026}____[v3]_[02]_MTc3NDY1NjAwMDAwMA==0f33e64d601fc4473c9e232e427c01f2",REACT_APP_DOCUMENT_UPLOAD:"https://1iyju5wg22.execute-api.eu-west-1.amazonaws.com/dev/documentupload",REACT_APP_INTELLIGENCE_API_STAGE:"live",REACT_APP_CONSULTATIONS_URL:"https://inference-engine.esg-r.io/api",REACT_APP_ENVIRONMENT_NAME:"Live",REACT_APP_USER_POOL_ID:"eu-west-2_CXMj8XQn0",REACT_APP_USER_POOL_WEB_CLIENT_ID:"2a8c10u5721464di89s75deqbr",REACT_APP_SENTRY_ENV:"LIVE",REACT_APP_BASE_URL:"https://sustainability.rio.ai",REACT_APP_DROMO_LICENSE_KEY:"a1fc32a8-fb02-4546-ad17-74254111f991",REACT_APP_HUBSPOT_TRACKER:"3847934",REACT_APP_GOOGLE_MAP_API_KEY:"AIzaSyD0bNhOInxPo2plOg1oxsYHeOsIXdefauE",REACT_APP_AZURE_SSO_APP_ID:"f7c97800-e70d-43a3-800e-64b6ba778a31",REACT_APP_AWS_REGION:"eu-west-2",REACT_APP_PINPOINT_REGION:"us-east-1",REACT_APP_GRAPHQL_URI:"https://kmkdrdo3dzcvnkzqzfnmfuwt4m.appsync-api.eu-west-2.amazonaws.com/graphql",REACT_APP_PINPOINT_APP_CLIENT_ID:"1b81e38efb7546329dd7eb32e0088b29"}[e]};var jn,Cn,Sn,Nn,wn,Dn,An,Rn,Pn;function Ln(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function In(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ln(Object(t),!0).forEach(function(n){En(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ln(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function En(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function _n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Fn=(0,Ge.default)(ze.fv)(jn||(jn=_n(["\n  height: 100%;\n  width: 100%;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),Bn=(0,Ge.default)(ze.fv)(Cn||(Cn=_n(["\n  text-align: center;\n"]))),Un=(0,Ge.default)(ze.ks)(Sn||(Sn=_n(["\n  width: 100%;\n  margin-top: ",";\n  margin-left: 5px;\n  margin-right: 5px;\n"])),e=>e.theme.geometry.sm.spacing),Mn=Ge.default.div(Nn||(Nn=_n(["\n  height: 70px;\n  width: 125px;\n  background: no-repeat top center / contain url(",");\n  margin-bottom: ",";\n  align-self: center;\n  flex: 0 0 auto;\n"])),On,e=>e.theme.geometry.sm.spacing),Vn=(0,Ge.default)(ze.EY)(wn||(wn=_n(["\n  margin-top: ",";\n  text-align: center;\n"])),e=>e.theme.geometry.sm.spacing),zn=(0,Ge.default)(ze.fI)(Dn||(Dn=_n(["\n  padding: "," ",";\n  flex-basis: initial;\n  width: 100%;\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.xs.spacing),Gn=(0,Ge.default)(zn)(An||(An=_n(["\n  justify-content: space-between;\n"]))),$n=(0,Ge.default)(ze.Yq)(Rn||(Rn=_n(["\n  flex: 1;\n  &:first-child {\n    text-align: left;\n  }\n  &:last-child {\n    text-align: right;\n  }\n"]))),Wn=Ge.default.form(Pn||(Pn=_n(["\n  width: 100%;\n"]))),qn=e=>{let{message:n}=e;switch(n){case"Incorrect username or password.":return"NotAuthorizedException";case"User does not exist.":return"UserNotFoundException";case"User is disabled.":return"UserDisabledException";case"Confirmation code cannot be empty":return"ConfirmationCodeEmptyException";case"Invalid code provided, please request a code again.":return"InvalidCodeException";default:return n}},Jn=e=>{let{loginError:n}=e;if(!n)return null;const t=(e=>({UserNotFoundException:"login.main.userNotFound",NotAuthorizedException:"login.main.incorrectPassword",UserDisabledException:"login.main.userDisabled",GeneralError:"login.main.generalError"}[e]||e))(n);return(0,Ze.jsx)(Vn,{name:"formError",color:"danger",size:"sm",weight:"bold",children:(0,Ze.jsx)(Je.A,{id:t})})};class Yn extends g.Component{constructor(e){super(e),this.handleChange=e=>{const n=e.target,t="checkbox"===n.type?n.checked:n.value,a=n.name;this.setState({[a]:In(In({},this.state[a]),{},{value:t})})},this.handleSubmit=e=>{e.preventDefault(),this.setState({isLoading:!0});const n=In({},this.state.email),t=In({},this.state.password);n.error=this.state.email.value?"":this.props.intl.formatMessage({id:"login.main.emailError"}),t.error=this.state.password.value?"":this.props.intl.formatMessage({id:"login.main.passwordError"}),this.setState({email:n,password:t}),this.state.email.value&&this.state.password.value&&this.props.mutate({variables:{email:this.state.email.value,password:this.state.password.value},onError:e=>{this.enableSubmitButton(),this.setLoginError(e)}}),(n.error||t.error)&&this.setState({isLoading:!1})},this.setLoginError=e=>{this.setState({loginError:qn(e)})},this.enableSubmitButton=()=>{this.state.isLoading&&this.setState({isLoading:!1})},this.handleForgotPassword=()=>{this.setState({forgotPasswordModal:!0})},this.handleForgotPasswordDismiss=()=>{this.setState({forgotPasswordModal:!1})},this.state={isLoading:!1,email:{value:"",error:""},password:{value:"",error:""},remember:{value:!1},formError:"",loginError:null,forgotPasswordModal:!1}}render(){return(0,Ze.jsxs)(Fn,{container:!0,item:!0,distribution:"center",name:"login-container",children:[("Develop"===kn("REACT_APP_ENVIRONMENT_NAME")||"QA"===kn("REACT_APP_ENVIRONMENT_NAME")||"UAT"===kn("REACT_APP_ENVIRONMENT_NAME"))&&(0,Ze.jsx)(Tn,{name:"LoginContainer__NotificationBanner",color:"primary",icon:"exclamation-triangle",title:"This is the ".concat(kn("REACT_APP_ENVIRONMENT_NAME")," site"),body:"Please note that we regularly reset the data and anything you enter may be overwritten. We recommend that personal details of real individuals are not entered"}),this.state.forgotPasswordModal&&(0,Ze.jsx)(ze.aF,{size:"sm",show:!0,name:"account-create-modal",dismissable:!0,onDismiss:this.handleForgotPasswordDismiss,height:"auto",maxHeight:"90vh",children:(0,Ze.jsx)(on,{id:"forgotPasswordModal__Contents",username:this.state.email.value})}),(0,Ze.jsx)(ze.fI,{container:!0,item:!0,distribution:"center",children:(0,Ze.jsxs)(Bn,{container:!0,vdistribution:"center",item:!0,itemAlign:"center",span:3,children:[(0,Ze.jsx)(Mn,{}),(0,Ze.jsx)(ze.DZ,{size:"lg",children:(0,Ze.jsx)(Je.A,{id:"login.main.title"})}),(0,Ze.jsx)(ze.EY,{align:"center",children:(0,Ze.jsx)(Je.A,{id:"login.main.subheading"})}),(0,Ze.jsxs)(Wn,{name:"login__form",onSubmit:this.handleSubmit,children:[(0,Ze.jsx)(Un,{box:!0,name:"email",placeholder:this.props.intl.formatMessage({id:"login.main.emailPlaceholder"}),value:this.state.email.value,error:this.state.email.error,onChange:this.handleChange}),(0,Ze.jsx)(Un,{box:!0,name:"password",type:"password",placeholder:this.props.intl.formatMessage({id:"login.main.passwordPlaceholder"}),value:this.state.password.value,error:this.state.password.error,onChange:this.handleChange}),(0,Ze.jsxs)(Gn,{container:!0,distribution:"between",children:[(0,Ze.jsx)($n,{inline:!0,id:"forgotPasswordTextLink",onClick:this.handleForgotPassword,children:(0,Ze.jsx)(Je.A,{id:"login.main.forgotPassword"})}),(0,Ze.jsx)($n,{to:"/register",component:"routerLink",children:(0,Ze.jsx)(Je.A,{id:"login.main.newRioUser"})})]}),(0,Ze.jsx)(ze.$n,{name:"loginbutton",loading:this.state.isLoading,submit:!0,children:(0,Ze.jsx)(Je.A,{id:"login.main.loginButton"})})]}),this.state.loginError&&(0,Ze.jsx)(Jn,{loginError:this.state.loginError})]})})]})}}function Hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Kn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Hn(Object(t),!0).forEach(function(n){Qn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Qn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}qe()((0,$e.U)($),Ye.Ay)(Yn);const Zn=[{query:G,data:{sessionLoading:!0,idToken:null}},{query:z,data:{loginError:""}}],Xn=e=>e.writeQuery({query:G,data:{sessionLoading:!1}}),et=async(e,n)=>{var t;e||Xn(n.cache),localStorage.setItem("ID_TOKEN",e.getIdToken().getJwtToken()),localStorage.setItem("ACCESS_TOKEN",e.getAccessToken().getJwtToken());const a=e.getIdToken().decodePayload(),r=a["custom:access_level"]||Se,i=Kn(Kn({event_id:null},a),{},{roles:a["cognito:groups"],accessLevel:r,allowedLocations:r===Ce?JSON.parse(a["custom:allowed_locations"]||null):null,allowedTags:r===Ne?JSON.parse(a["custom:allowed_tags"]||null):null,__typename:"IdToken"}),{data:{getAccountInfo:o}}=await n.query({query:xe,variables:{id:a.name}});var l,s,c,d,u,p,m;de.gV({id:a.sub,email:a.email}),de.o("account",{id:o.id,name:o.name,type:o.type}),de.o("user",{id:a.sub,name:"".concat(a.given_name," ").concat(a.family_name),email:a.email}),de.Wt({accountId:o.id,accountName:o.name,username:a.username,email:a.email,userRole:null===(t=a["cognito:groups"])||void 0===t?void 0:t.toString()}),n.cache.writeQuery({query:G,data:{idToken:i,sessionLoading:!1}}),w.j.updateEndpoint({address:a.email,userAttributes:{userId:[a.sub],email:[a.email],name:["".concat(a.given_name," ").concat(a.family_name)],roles:a["cognito:groups"],accountId:[a.name]}}),l=a.sub,s=a.name,c=a.email,d="".concat(a.given_name," ").concat(a.family_name),u=o.name,p=o.type,m=a["cognito:groups"],window.pendo&&!window.Cypress&&window.pendo.initialize({visitor:{id:l,email:c,full_name:d,roles:m.join(", ")},account:{id:s,name:u,type:p}})};async function nt(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];de.gV(null),de.o("account",null),de.o("user",null);try{await y.N.signOut()}finally{await async function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];localStorage.removeItem("ACCESS_TOKEN"),localStorage.removeItem("ID_TOKEN"),localStorage.removeItem("DISMISSED_BANNERS"),localStorage.removeItem("CURRENT_ACCOUNT"),await e.writeQuery({query:Fe,data:{currentAccountId:null}}),n&&window.location.reload()}(e,n)}}const tt={Mutation:{login:async(e,n,t)=>{let{email:a,password:r,type:i}=n,{client:o,cache:l}=t;try{let e;if("sso"===i)try{y.N.configure({authenticationFlowType:"CUSTOM_AUTH"}),e=await y.N.signIn(a.toLowerCase()),e=await y.N.sendCustomChallengeAnswer(e,r)}finally{y.N.configure({authenticationFlowType:void 0})}else e=await y.N.signIn(a.toLowerCase(),r);await et(e.getSignInUserSession(),o)}catch(e){throw await nt(l,!1),de.Cp(e),e}},loginSSO:async(e,n)=>{let{provider:t}=n;y.N.federatedSignIn({customProvider:t})},logout:async(e,n,t)=>{let{cache:a}=t;return nt(a)},setPassword:async(e,n,t)=>{let{email:a,oldPassword:r,password:i}=n,{client:o,cache:l}=t;try{const e=await y.N.signIn(a.toLowerCase(),r);"NEW_PASSWORD_REQUIRED"===e.challengeName&&await y.N.completeNewPassword(e,i),await et(e.getSignInUserSession(),o)}catch(e){l.writeQuery({query:z,data:{loginError:qn(e)}})}},resetPassword:async(e,n,t)=>{let{username:a,password:r,confirmationCode:i}=n,{cache:o}=t;try{await y.N.forgotPasswordSubmit(a,i,r)}catch(e){o.writeQuery({query:z,data:{loginError:qn(e)}})}},forgotPassword:async(e,n,t)=>{let{username:a}=n,{cache:r}=t;try{await y.N.forgotPassword(a.toLowerCase())}catch(e){r.writeQuery({query:z,data:{loginError:"GeneralError"}})}}}};function at(){const e=(0,N.m)(),{data:n}=(0,h.IT)(G);return(0,g.useEffect)(()=>{n&&n.idToken||(async()=>{try{const n=await y.N.currentSession();await et(n,e)}catch(n){Xn(e)}})()}),{token:n?n.idToken:null,loading:!n||n.sessionLoading}}function rt(e){let{onChange:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{data:t,refetch:a}=(0,h.IT)(_e,{partialRefetch:!0}),[r,i]=(0,g.useState)(t&&t.currentAccountId?t.currentAccountId:null),o=(0,N.m)(),{token:l}=at(),{sub:s}=l||{},c=(0,g.useCallback)(e=>{i(e),null==n||n(e)},[i,n]);return(0,g.useEffect)(()=>{e&&e!==r&&(c(e),a())},[e]),(0,g.useEffect)(()=>{(async()=>{if(s){if(!t||!t.currentAccountId){const{data:e}=await o.query({query:P,variables:{name:s}});e.getUserInfoById.account&&w.j.updateEndpoint({userAttributes:{account:[e.getUserInfoById.account.name]}});const n=e&&e.getUserInfoById&&e.getUserInfoById.account&&e.getUserInfoById.account.id;return await o.mutate({mutation:Fe,variables:{currentAccountId:n}}),c(n)}t&&t.currentAccountId!==r&&c(t.currentAccountId)}})()}),r}const it=["b1f7fc4e-714d-4271-bb3f-d736dff38a14","9b5da64b-2e0f-4dc7-adf6-e879a88160b9","66fdc17b-308d-4e71-85ee-0d4a77e3276e","bf0b444f-10c1-4642-b94b-3acb1a529990","094f8a56-5761-4561-a2dd-1b66ee5bb5da"];function ot(){const e=rt();return it.includes(e)}function lt(){const e=Pu(),n=(0,m.Zp)(),t=(0,m.zy)();(0,g.useEffect)(()=>{var a;if(!e)return;const r=null!=e&&null!==(a=e.accessControls)&&void 0!==a&&a.v2Design?2:1,i=t.pathname.startsWith("/v2")?2:1;i!==r&&n(1===i?t.pathname.replace("/","/v2/"):t.pathname.replace(/\/v2\/?/,"/"))},[e,t.pathname,n])}function st(){return(0,m.zy)().pathname.startsWith("/v2")}var ct;function dt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ut(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dt(Object(t),!0).forEach(function(n){pt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function pt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const mt=(0,g.createContext)({showNotification:()=>{}}),ft=(0,f.styled)("div")(ct||(yt=["\n  margin: 15px -38px 0 -24px;\n  padding-top: 15px;\n  text-align: center;\n  border-top: 1px solid #fff;\n"],gt||(gt=yt.slice(0)),ct=Object.freeze(Object.defineProperties(yt,{raw:{value:Object.freeze(gt)}}))));var yt,gt;const bt=e=>{var n,t;let{children:a}=e;const{showToast:r}=(0,f.useToast)(),{pathname:i}=(0,m.zy)(),[o,l]=(0,g.useState)([]),s=o[0],c=st(),d=!c,u=(0,g.useCallback)((e,n,t)=>{c?r(e,n||"success"):l(a=>{var r;const i=a.find(n=>n.message===e)||(null===(r=a[0])||void 0===r?void 0:r.message)===e;return i?a:[...a,{message:e,action:t,color:n||"success"}]})},[l,c,r]),p=(0,g.useMemo)(()=>({showNotification:u}),[u]),y=(e,n)=>{"clickaway"!==n&&l(e=>e.slice(1))},{autoClose:b=5e3}=(null==s?void 0:s.action)||{};return(0,Ze.jsxs)(mt.Provider,{value:p,children:[a,d&&(0,Ze.jsx)(ze.Eg,{name:"general__notification",show:!!o.length,color:null==s?void 0:s.color,autoClose:b,onClose:y,children:null!=s&&null!==(n=s.action)&&void 0!==n&&n.callback?(0,Ze.jsxs)("div",{onClick:()=>{var e,n;y(),null===(e=s.action)||void 0===e||null===(n=e.callback)||void 0===n||n.call(e)},children:[(0,Ze.jsx)("div",{children:null==s?void 0:s.message}),(0,Ze.jsx)(ft,{children:(null==s||null===(t=s.action)||void 0===t?void 0:t.text)||"OK"})]}):(0,Ze.jsx)("span",{children:null==s?void 0:s.message})})]})},ht=e=>(0,Ze.jsx)(f.ToastProvider,{children:(0,Ze.jsx)(bt,ut({},e))}),vt=()=>(0,g.useContext)(mt);var xt,Tt,Ot=t(38640);function kt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const jt=(0,D.J1)(xt||(xt=kt(["\n  fragment AuditEventFields on AuditEvent {\n    id\n    service\n    entityId\n    entity\n    user {\n      ... on User {\n        id\n        first_name\n        last_name\n      }\n    }\n    account {\n      ... on Account {\n        id\n        name\n      }\n    }\n    type\n    notes\n    payload\n    createdDate\n  }\n"]))),Ct=(0,D.J1)(Tt||(Tt=kt(["\n  query GetAuditByEntityId($entityId: ID!) {\n    getAuditByEntityId(entityId: $entityId) {\n      ...AuditEventFields\n    }\n  }\n  ","\n"])),jt);var St;const Nt=(0,D.J1)(St||(St=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  mutation CreateAuditEvent($event: AuditEventInput!) {\n    createAuditEvent(event: $event) {\n      ...AuditEventFields\n    }\n  }\n  ","\n"])),jt);function wt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Dt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?wt(Object(t),!0).forEach(function(n){At(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):wt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function At(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Rt(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{loading:t,setLoading:a}=(0,f.usePageLoadingContext)({defaultValue:!0}),{setError:r}=(0,f.usePageErrorContext)(),i=(0,h.IT)(e,Dt(Dt({},n),{},{notifyOnNetworkStatusChange:!0,onCompleted:function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];null===(e=n.onCompleted)||void 0===e||e.call(n,...i),setTimeout(()=>{r(null),a(!1)},0)},onError:e=>{var t;null===(t=n.onError)||void 0===t||t.call(n,e),setTimeout(()=>{"all"!==n.errorPolicy&&"ignore"!==n.errorPolicy&&r(e),a(!1)},0)}}));return(0,g.useEffect)(()=>{!t&&i.loading&&a(!0)},[t,a,i.loading]),(0,g.useEffect)(()=>()=>{n.keepErrorAfterUnmount||r(null),a(!1)},[r,a,n.keepErrorAfterUnmount]),i}function Pt(e){return(0,h.IT)(Ct,{fetchPolicy:"network-only",variables:{entityId:e},skip:!e})}function Lt(e){return Rt(Ct,{fetchPolicy:"network-only",variables:{entityId:e},skip:!e,keepErrorAfterUnmount:!0})}var It,Et;function _t(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ft=(0,D.J1)(It||(It=_t(["\n  query GetDataTrackerValidationResults(\n    $accountId: ID!\n    $isIgnored: Boolean\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getDataTrackerValidationResults(\n      accountId: $accountId\n      isIgnored: $isIgnored\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        dataTrackerConfigId\n        startDate\n        endDate\n        supplierName\n        locations\n        meters\n        utility\n        validationType\n        note\n        frequency\n        reason\n        __typename\n      }\n    }\n  }\n"]))),Bt=(0,D.J1)(Et||(Et=_t(["\n  mutation UpdateDataTrackerValidationResults($input: [DataTrackerValidationResultInput]!) {\n    updateDataTrackerValidationResults(input: $input) {\n      id\n    }\n  }\n"])));var Ut=t(68352),Mt=t.n(Ut),Vt=t(69151),zt=t(49680),Gt=t.n(zt),$t=t(5866),Wt=t.n($t),qt=t(20743),Jt=t.n(qt);const Yt=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DD/MM/YYYY";return e&&Wt()(e).format(n)},Ht=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DD/MM/YYYY";return e&&Wt()(e).utc().format(n)},Kt=e=>e?"".concat(e.split("T")[0],"T00:00:00.000Z"):e,Qt=e=>e?new Date((e=>e.slice(0,-1))(e)):null,Zt=e=>e?Jt()(1e3*parseInt(e/1e3)):"",Xt=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DD/MM/YYYY HH:mm";return e?Wt()(e).format(n):""},ea=e=>Wt()(e).subtract((()=>{const e=new Date;return e.getHours()-e.getUTCHours()})(),"hours").toDate(),na=(e,n)=>{if(!n)return 0;const t=new Date(n).setHours(0,0,0,0);return t<e?-1:t>e?1:0};function ta(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function aa(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ta(Object(t),!0).forEach(function(n){ra(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ta(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ra(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ia(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,zt.cloneDeep)(e),t={};for(const e in n){const r=n[e];let i=r.filterType;const o=r.type,l=("greaterThan"===o||"lessThan"===o)&&o;var a;l&&"date"===i&&(r.type="".concat(l,"OrEqual")),i===Vt.pe.Set&&(1!==(null===(a=r.values)||void 0===a?void 0:a.length)||"true"!==r.values[0]&&"false"!==r.values[0]?r.values=r.values.flatMap(e=>{try{const n=JSON.parse(e);return(null==n?void 0:n.value)||n}catch(n){return e}}):(i=Vt.pe.Boolean,r.values=r.values.map(e=>"true"===e))),t[i]||(t[i]=[]),t[i].push(aa(aa({},r),{},{field:e}))}return t}function oa(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(e=>null!==e.sort).map(e=>({field:e.colId,order:e.sort||"asc"}))}const la=e=>{let{value:n}=e;if(!n)return n;try{const e=JSON.parse(n);return e.label||e.value}catch(e){return n}},sa=e=>{let{value:n}=e;return!0===n?"Yes":!1===n?"No":""},ca=e=>{let{value:n}=e;return n?Ht(n):""},da=function(e){let{value:n}=e;return n?Yt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DD/MM/YYYY"):""},ua=e=>{let{value:n}=e;return n?Xt(n):""},pa=e=>{let{value:n}=e;return"1"===(null==n?void 0:n.toString())?"Yes":"0"===(null==n?void 0:n.toString())?"No":""},ma=e=>{let{value:n}=e;return(0,zt.isNil)(n)?"":(0,zt.round)(Number(n),4).toFixed(4)},fa=e=>{let{value:n}=e;return n?n.toFixed(15).replace(/\.0+$/,""):n},ya=e=>{let{value:n}=e;return n?new Intl.NumberFormat("en-GB",{minimumFractionDigits:2}).format(n):n},ga=e=>{let{value:n}=e;if(!n)return n;const t=(e=>{try{return JSON.parse(e)}catch(e){return}})(n);return t?Object.entries(t).map(e=>{let[n,t]=e;return"".concat(n,": ").concat(t)}).join(", "):n},ba=e=>n=>(0,zt.get)(n.data,e),ha=e=>{var n,t;return(null===(n=e.value)||void 0===n?void 0:n.label)||(null===(t=e.value)||void 0===t?void 0:t.value)},va=e=>{var n,t;return(null===(n=e.value)||void 0===n?void 0:n.value)||(null===(t=e.value)||void 0===t?void 0:t.id)},xa=(e,n)=>{const t=null==e?void 0:e.toLowerCase(),a=null==n?void 0:n.toLowerCase();return t<a?-1:t>a?1:0},Ta=(e,n)=>Oa("name")(e,n),Oa=e=>(n,t)=>xa(Gt().get(n,e),Gt().get(t,e)),ka=xa,ja=e=>(0,zt.toNumber)(String(e).replace(",",".")),Ca=e=>new RegExp(/^((\d+(\.|,)(\d+)?)|(\d+))$/).test(e),Sa=e=>/^(-)?((\d+(\.|,)(\d+)?)?|(\d+)?)$/.test(e),Na=(e,n)=>"number"!=typeof e||isNaN(e)?(e=>""!==e&&!Number.isNaN(Number(e))&&"string"==typeof e)(e)?parseFloat(e):n:e,wa=e=>{(0,zt.forIn)(e,(n,t)=>e[t]=Ca(n)?ja(n):0);const{gateFee:n=0,quantity:t=0,managementFee:a=0,binHire:r=0,binExchangeFee:i=0,numberOfCollections:o=0,transportCharge:l=0,liftCharge:s=0,equipmentHire:c=0,miscCost:d=0,miscCostRate:u=0,rebate:p=0}=e;return n*t+a+r+i*o+l+s*o+c+d+u*t+p*t},Da=e=>1.2*ja(e),Aa=(e,n)=>{const t=Wt()(Wt()(e).format("YYYY-MM-DD")),a=Wt()(Wt()(n).format("YYYY-MM-DD"));if(!t.isValid()||!a.isValid())throw new Error("Date is invalid");return t.isBefore(a)?1:t.isAfter(a)?-1:0},Ra=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(T([01]\d|2[0-3]):([0-5]\d):([0-5]\d)(\.\d{3})?(Z|[+-]([01]\d|2[0-3]):[0-5]\d)?)?$/,Pa=/^(\d{2})\/(\d{2})\/(\d{4})$/,La=/^(\d{2})-(\d{2})-(\d{4})$/,Ia=(e,n)=>{let[t,a]=n;const r=Wt()(e),i=Wt()(t),o=Wt()(a),l=r.isBetween(i,o),s=r.isSame(i)||r.isSame(o);return l||s};function Ea(e){let[n,t]=e,{includeReportingYear:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Ht(n),i=Ht(t),o=i?"".concat(r," — ").concat(i):"".concat(r," - Present");return a?"".concat(o," (Reporting year - ").concat(Wt()(n).year(),")"):o}function _a(e){let[n]=e;if(n)return new Date(n.toString())}function Fa(){return Wt()().startOf("day")}function Ba(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DD/MM/YY HH:mm";const t=Wt()(e).local();return t.isValid()?t.format(n):"-"}function Ua(e){if(e instanceof Date)return!isNaN(e.getTime());if(!Ra.test(e))return!1;const n=new Date(e);return!isNaN(n.getTime())}var Ma=t(28184);let Va=function(e){return e.Single="Single",e.Aggregated="Aggregated",e}({}),za=function(e){return e[e.Replicated=0]="Replicated",e[e.Distributed=1]="Distributed",e}({});const Ga="YYYY-MM-DD";let $a=function(e){return e.Daily="daily",e.Weekly="weekly",e.Monthly="monthly",e.Quarterly="quarterly",e.Annually="annually",e}({});const Wa="courseBundle",qa="subscription",Ja="accountCapacity",Ya=Wa,Ha=qa,Ka=Ja,Qa=5e4,Za=25,Xa="66c23f78-8457-47f7-8825-59abff3e5004",er="70a1f28e-7093-4374-988d-b505cb0a5282",nr="92e0ed2d-982c-4279-9b82-fc963f2397c5",tr="dd4d46b9-aae5-4f24-8d5d-d35c763e98b4",ar="033e466c-9e77-4560-84cf-69e25cef76b7",rr="c11f60c9-569e-4f01-b965-05b22df100e5",ir="ce36a6bd-b8a4-4e2f-a895-66b27b732cbb",or="9bf0a2ba-7151-469c-963d-75000a6a9af0",lr="608877fc-83e7-4487-b5a4-493e0ba05903",sr="d45a23a6-ad11-4671-ac3c-7f69a4440728",cr="0768ce2f-99d4-4b62-be7a-a4530dd7fede",dr="cd6b748a-4410-47e6-9c8e-62684f645f42",ur=[Xa,er],pr=[ar,"094f8a56-5761-4561-a2dd-1b66ee5bb5da","1984de26-978f-4e59-af19-b67647c039fa"],mr="NOTSTARTED",fr="INPROGRESS",yr="COMPLETE",gr="CLEAN",br="S3",hr=["image/tiff","image/jpeg","image/png","image/gif","image/webp","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/plain","text/csv","application/pdf","application/json","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/mspowerpoint","application/powerpoint"],vr=[".csv","text/csv","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel"],xr={allowedDocument:{mimeTypes:hr,mimeType:hr.join(",")},allowedDataFile:{mimeTypes:vr,mimeType:vr.join(",")}},Tr=e=>e.toFixed(2);function Or(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kr(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Or(Object(t),!0).forEach(function(n){jr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Or(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jr(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Cr={[$a.Daily]:"days",[$a.Weekly]:"weeks",[$a.Monthly]:"months",[$a.Quarterly]:"quarters",[$a.Annually]:"years"};function Sr(e,n,t){const a=Wt().utc(t.startDate).clone().add(n,e),[r,i]=t.dateField;if(i){const o=Wt().utc(t.startDate).clone().add(n+1,e).subtract(1,"days");return{[r]:a.toDate(),[i]:o.isAfter(t.endDate)?t.endDate:o.toDate()}}return{[r]:a.toDate()}}function Nr(e,n,t){return Gt().mapValues(e,(e,a)=>{if(n.includes(a)){const n=ja(e)/t;return n>0?Tr(n):0}return e})}function wr(e,n){return n.dataFormRowsFillingStrategy===za.Distributed?function(e,n){const t=Gt().cloneDeep(e),{startDate:a,endDate:r,dateFrequency:i,dataFormInputStrategy:o,divideFields:l}=n,s=Cr[i],c=Wt()(r).diff(Wt()(a),s)+1,d=c<1?1:c,u=[];for(let e=0;e<d;e++){const a=Sr(s,e,n),r=kr(kr({},t),a);if(o===Va.Aggregated){const e=Nr(t,l,d);Object.assign(r,e),Object.assign(r,a)}u.push(r)}return u}(e,n):function(e,n){const t=Gt().cloneDeep(e),[a,r]=n.dateField;return t[a]=n.startDate,r&&(t[r]=n.endDate),[t]}(e,n)}const Dr=(e,n)=>e.map(e=>{e=Gt().omitBy(e,e=>null==e||""===e);const t=(a=n,e=>Gt().mapValues(e,(e,n)=>{const t=e instanceof Date,r="object"==typeof e&&null!==e&&!t;return"purchase type"===n&&r&&"label"===a?Gt().get(e,"value"):r?Gt().get(e,a):e}))(e);var a;return(t instanceof Date||"string"==typeof t)&&Ua(t)?Ht(t,Ma.ImportPayload.DATE_FORMAT):t});async function Ar(e,n){try{var t;const a=await fetch(e);if(!a.ok)throw new Error("Download failed: ".concat(a.status," ").concat(a.statusText));const r=await a.blob(),i=null!==(t=null!=n?n:function(e,n){if(n){const e=n.match(/filename\*?=(?:UTF-8'')?["']?([^"';\n]+)["']?/i);if(null!=e&&e[1])try{return decodeURIComponent(e[1])}catch(n){return e[1]}}const t=new URL(e).pathname.split("/").pop();if(t)try{return decodeURIComponent(t)}catch(e){return t}}(e,a.headers.get("Content-Disposition")))&&void 0!==t?t:"";!function(e,n){const t=document.createElement("a"),a=URL.createObjectURL(e);t.href=a,t.download=n,document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(a)}(r,i)}catch(n){window.location.href=e}}function Rr(e){const n=e;return n.graphQLErrors?"GraphQL error: ".concat(e,"\nAll errors: ").concat(JSON.stringify(n.graphQLErrors),"\nNetwork error: ").concat(n.networkError,"\nExtra info: ").concat(n.extraInfo||"","\nStack: ").concat(n.stack):"".concat(e.message,"\nStack: ").concat(e.stack)}function Pr(e){return"object"==typeof e&&null!==e&&"message"in e&&"name"in e}var Lr=t(42625),Ir=t(18600);const Er=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e=>e;const r=Lr.Wp.book_new(),i=t.map(n=>{const t={};return e.forEach(e=>{t[e]=a(n[e])}),t}),o=Lr.Wp.json_to_sheet(i);Lr.Wp.book_append_sheet(r,o,"Data"),(0,Lr._h)(r,"".concat(n,".xlsx"))};async function _r(e){try{const n=await(e=>new Promise((n,t)=>{const a=new FileReader;a.onloadend=()=>{try{const e=(0,Lr.LF)(a.result,{cellDates:!0,dateNF:"dd/MM/YYYY"}),t=e.SheetNames,r=e.Sheets[t[0]];n(Lr.Wp.sheet_to_json(r))}catch(e){t(e)}},a.onerror=t,a.readAsArrayBuffer(e)}))(e);return[null,n]}catch(e){return[e,null]}}function Fr(e){const n=86400*Math.floor(e-25569);return new Date(1e3*n)}function Br(e){return[e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Ur(e,n){let t,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"DD/MM/YYYY";t="number"==typeof e?Fr(e):e instanceof Date?e:Wt().utc(e,a).toDate();const r=Wt().utc(t);if(n){const[e,t,a,i]=function(e){if("string"==typeof e&&e.split(":").length>=2){const[n,t,a=0,r=0]=e.split(":").slice(0,4).map(e=>e?parseInt(e,10):0);return[n,t,a,r]}return"number"==typeof e?Br(Fr(e)):Wt().isMoment(e)?[e.get("hours"),e.get("minutes"),e.get("seconds"),e.get("milliseconds")]:e instanceof Date?Br(e):[0,0,0,0]}(n);return r.set("hours",e).set("minutes",t).set("seconds",a).set("milliseconds",i)}return r}const Mr=async(e,n,t)=>new Promise((a,r)=>{(0,Ir.As)(e,{header:!0,columns:t},(e,t)=>{e&&r(e);const i=(0,Lr.LF)(t,{type:"string"}),o=(0,Lr.M9)(i,{bookType:"xlsx",type:"array"}),l=new Blob([o],{type:"application/octet-stream"}),s=new File([l],"".concat(n.split(".")[0],".xlsx"),{type:"application/octet-stream",lastModified:(new Date).getTime()});a(s)})});function Vr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"xlsx",a=arguments.length>3?arguments[3]:void 0;const r=Lr.Wp.book_new(),i=a||n;r.SheetNames.push(i);const o=Lr.Wp.json_to_sheet(e.map(e=>(0,zt.mapValues)(e,e=>{return("string"==typeof(n=e)?Ra.test(n)||La.test(n)||Pa.test(n):n instanceof Date||Wt().isMoment(n))?function(e){if(Wt().isMoment(e))return e.toDate();if(e instanceof Date)return e;if("number"==typeof e&&!Number.isNaN(e))return Wt()(e).toDate();if("string"==typeof e&&Ra.test(e))return Wt()(e).toDate();if("string"==typeof e&&La.test(e))return Wt()(e,"DD-MM-YYYY").toDate();if("string"==typeof e&&Pa.test(e))return Wt()(e,"DD/MM/YYYY").toDate();const n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("".concat(e," is invalid date"));return n}(e):e;var n})),{cellDates:!0});r.Sheets[i]=o;const l=(0,Lr.M9)(r,{bookType:t,type:"array",cellDates:!0});return new File([l],"".concat(n,".").concat(t),{type:"application/octet-stream"})}const zr=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const t=[];for(const i of e)if("children"in i&&i.children){var a;t.push(...zr(i.children,[...n,null!==(a=i.headerName)&&void 0!==a?a:""]))}else{const e=i;var r;e.field&&!e.hide&&t.push({field:e.field,headerName:null!==(r=e.headerName)&&void 0!==r?r:e.field,groups:n})}return t};function Gr(e){function n(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var n=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:n}})}return Gr=function(e){this.s=e,this.n=e.next},Gr.prototype={s:null,n:null,next:function(){return n(this.n.apply(this.s,arguments))},return:function(e){var t=this.s.return;return void 0===t?Promise.resolve({value:e,done:!0}):n(t.apply(this.s,arguments))},throw:function(e){var t=this.s.return;return void 0===t?Promise.reject(e):n(t.apply(this.s,arguments))}},new Gr(e)}async function $r(e){const n=[];var t,a=!1,r=!1;try{for(var i,o=function(e){var n,t,a,r=2;for("undefined"!=typeof Symbol&&(t=Symbol.asyncIterator,a=Symbol.iterator);r--;){if(t&&null!=(n=e[t]))return n.call(e);if(a&&null!=(n=e[a]))return new Gr(n.call(e));t="@@asyncIterator",a="@@iterator"}throw new TypeError("Object is not async iterable")}(e);a=!(i=await o.next()).done;a=!1){const e=i.value;n.push(e)}}catch(e){r=!0,t=e}finally{try{a&&null!=o.return&&await o.return()}finally{if(r)throw t}}return n}const Wr="IFRAME",qr="EXTERNAL",Jr="PDF";class Yr{constructor(e){this.course=e}getHandleMethod(){switch(this.course.type){case Vt.US.Video:case Vt.US.Scorm:return"EMBED";case Vt.US.Pdf:return Jr;case Vt.US.Url:return this.course.metaData.openIframe?Wr:qr;default:return qr}}}function Hr(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";for(const t in e)n=n.replace(":".concat(t),e[t]);return n}var Kr=t(70114),Qr=t.n(Kr);const Zr="REPORTING_FRAMEWORK",Xr="VOLUNTARY_AGREEMENT";function ei(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ni(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ei(Object(t),!0).forEach(function(n){ti(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ei(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ti(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ai(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];const r=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];const a=n.filter(Boolean).join(".");return a?a+".":""}(...t.map(e=>e.number),e.number),i="".concat(r," ").concat(e.title);return e.tocNumber=r,e.tocTitle=i,e.parent=t[t.length-1],e}function ri(e,n){return e.siblings=n,e}function ii(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null!=e&&e.parent?ii(e.parent,n.concat([e.parent])):n}function oi(e){var n;const t={},a={};if(!e)return{tree:t,documents:a};const r=e=>{var n,t;return null===(n=e.documents)||void 0===n||null===(t=n.forEach)||void 0===t?void 0:t.call(n,e=>a[e.id]=ni(ni({},e),{},{name:e.fileName}))},i=Qr()(e);return r(i),null===(n=i.chapters)||void 0===n||n.forEach((e,n)=>{var a;t[e.id]=ri(ai(e,i),i.chapters),t[e.id].index=n,r(e),null===(a=e.chapters)||void 0===a||a.forEach((n,a)=>{var o;t[n.id]=ri(ai(n,i,e),e.chapters),t[n.id].index=a,r(n),null===(o=n.chapters)||void 0===o||o.forEach((a,o)=>{r(a),t[a.id]=ri(ai(a,i,e,n),n.chapters),t[a.id].index=o})})}),{tree:t,documents:a}}const li=e=>{switch(e){case Zr:return"Reporting Frameworks";case Xr:return"Voluntary Agreements";default:return"Management Systems"}},si=e=>{switch(e){case Zr:return"/governance/frameworks";case Xr:return"/governance/agreements";default:return"/governance/systems"}};function ci(e,n){return{title:li(e),to:n||si(e)}}function di(e,n,t){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!e)return[];const r=[ci(e.type,a)];return t&&e&&ii(n[t.id]).reverse().forEach(n=>{const t=n===e?"".concat(a,"/").concat(e.id):"".concat(a,"/").concat(e.id,"/").concat(n.id);r.push({to:t,title:n.tocTitle||n.title})}),r}function ui(e,n){var t;const a=(null==n?void 0:n.tocNumber)||(null==n?void 0:n.number);return"".concat(e.shortCode).concat(a?" ".concat(a):""," D").concat(((null===(t=n.documents)||void 0===t?void 0:t.length)||0)+1).toLocaleLowerCase()}function pi(e,n,t){return e?t.replace(e,n):"".concat(t,"/").concat(n)}const mi=e=>e.length>=3?1:3-e.length,fi=e=>{let{value:n}=e;const t=Number(n);return isNaN(t)||null==n||void 0===n?0:t<1?Math.round(10*t)/10:Math.round(t)},yi=e=>{let{value:n}=e;const t=Number(n);return isNaN(t)||null==n||void 0===n?0:t.toFixed(2)};var gi=t(87677),bi=t.n(gi);const hi=new Intl.NumberFormat,vi=e=>hi.format(bi()(e,1)),xi=e=>({label:e.name,value:e.id}),Ti=e=>{var n;return(null==e||null===(n=e.map)||void 0===n?void 0:n.call(e,xi))||[]},Oi="CREATE_NEW",ki={label:"Create new...",value:Oi},ji=e=>Array.isArray(e)?e.map(e=>e.value):e.value;function Ci(e){return new wi(e,0)}function Si(e){return function(){return new Ni(e.apply(this,arguments))}}function Ni(e){var n,t;function a(n,t){try{var i=e[n](t),o=i.value,l=o instanceof wi;Promise.resolve(l?o.v:o).then(function(t){if(l){var s="return"===n?"return":"next";if(!o.k||t.done)return a(s,t);t=e[s](t).value}r(i.done?"return":"normal",t)},function(e){a("throw",e)})}catch(e){r("throw",e)}}function r(e,r){switch(e){case"return":n.resolve({value:r,done:!0});break;case"throw":n.reject(r);break;default:n.resolve({value:r,done:!1})}(n=n.next)?a(n.key,n.arg):t=null}this._invoke=function(e,r){return new Promise(function(i,o){var l={key:e,arg:r,resolve:i,reject:o,next:null};t?t=t.next=l:(n=t=l,a(e,r))})},"function"!=typeof e.return&&(this.return=void 0)}function wi(e,n){this.v=e,this.k=n}function Di(e,n,t){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return Si(function*(){let r=0;for(;;){const i=n({limit:a,offset:r}),o=yield Ci(e({variables:i}));if(!o.data)break;const l=t(o.data);if(0===l.length)break;for(const e of l)yield e;if(l.length<a)break;r+=a}})}Ni.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Ni.prototype.next=function(e){return this._invoke("next",e)},Ni.prototype.throw=function(e){return this._invoke("throw",e)},Ni.prototype.return=function(e){return this._invoke("return",e)};var Ai=t(44301);function Ri(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Pi(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ri(Object(t),!0).forEach(function(n){Li(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ri(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Li(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Ii=e=>{var n,t,a;return{id:e.id,accountId:e.accountId,owners:(a=e.owners,null==a?void 0:a.map(e=>({label:e.first_name+" "+e.last_name,value:e.id}))),locations:Ti(null==e?void 0:e.locations),name:e.name,description:e.description||"",priority:e.priority,category:null===(n=e.scheme)||void 0===n?void 0:n.category,schemeId:(null===(t=e.scheme)||void 0===t?void 0:t.id)||"",scheme:void 0,impact:e.impact||"",cost:e.cost||void 0,currencyId:e.currencyId||void 0,baselineStartDate:e.baselineStartDate,startDate:e.startDate,endDate:e.endDate,frequency:e.frequency||"",plannedBenefit:e.plannedBenefit,plannedCostChange:e.plannedCostChange||0,plannedCO2eChange:e.plannedCO2eChange||0,tasks:e.tasks,evidenceNotes:e.evidenceNotes,meters:Ti(e.meters)}},Ei=e=>e.map(e=>{var n;return Pi(Pi({},e),{},{documents:null==e||null===(n=e.documents)||void 0===n?void 0:n.map(e=>null==e?void 0:e.id)})}),_i=e=>{var n;return{accountId:e.accountId||"",id:e.id||"",owners:ji((null==e?void 0:e.owners)||[]),locations:ji((null==e?void 0:e.locations)||[]),priority:e.priority,name:e.name||"",schemeId:(null==e||null===(n=e.schemeId)||void 0===n?void 0:n.toString())||"",baselineStartDate:(null==e?void 0:e.baselineStartDate)||"",startDate:(null==e?void 0:e.startDate)||"",endDate:(null==e?void 0:e.endDate)||"",plannedBenefit:(null==e?void 0:e.plannedBenefit)||0,description:e.description||null,impact:e.impact||null,cost:e.cost||null,currencyId:e.cost?e.currencyId:null,frequency:e.frequency||null,plannedCostChange:e.plannedCostChange&&Math.abs(+e.plannedCostChange)||null,plannedCO2eChange:e.plannedCO2eChange&&Math.abs(+e.plannedCO2eChange)||null,evidenceNotes:Ei((null==e?void 0:e.evidenceNotes)||[]),meters:ji((null==e?void 0:e.meters)||[])}},Fi=e=>{var n,t,a,r;return{id:e.id,accountId:e.accountId,name:e.name,description:e.description,category:e.category,subject:e.subject||null,itemId:(null==e||null===(n=e.item)||void 0===n?void 0:n.id)||null,priority:e.priority,dueDate:e.dueDate,createdAt:e.createdAt||"",completedAt:e.completedAt||null,isCompleted:e.isCompleted,scope:e.scope||null,locationIds:(null===(t=e.locations)||void 0===t?void 0:t.map(e=>null==e?void 0:e.id))||null,owners:(null===(a=e.owners)||void 0===a?void 0:a.map(e=>null==e?void 0:e.id))||null,tagIds:(null===(r=e.tags)||void 0===r?void 0:r.map(e=>null==e?void 0:e.id))||null,projectId:null}},Bi=e=>{const n=(0,zt.get)(e,"target.type");return"text"===n||"textarea"===n};function Ui(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Mi(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ui(Object(t),!0).forEach(function(n){Vi(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ui(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Vi(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const zi=e=>e instanceof Date?e.toISOString():e;function Gi(e){var n;const t=e.split(/[\s\/]/);for(let e=0;e<t.length;e++)t[e].match(/^[A-Z][a-z]+/)&&(t[e]=t[e].toLowerCase());const a=t.join(" ").trim();return(null===(n=a.charAt(0))||void 0===n?void 0:n.toUpperCase())+a.slice(1)}var $i=t(80242),Wi=t(52642),qi=t(88716);const Ji=e=>{let{value:n,label:t}=e;return{value:n,label:t,children:[]}};function Yi(e,n){for(let t=1;t<e.length;t++){let a=n.children.find(n=>{let{value:a}=n;return a===e[t].value});a||(a=Ji(e[t]),n.children.push(a)),n=a}}const Hi=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[...new Set(e.flatMap(e=>e.map(e=>{let{value:n}=e;return n}))),...n]},Ki=(0,qi.Ay)("div")({padding:10}),Qi=(0,qi.Ay)(Wi.y)(e=>{let{theme:n}=e;const t=n.sys.typescale.label.large;return{[["& .MuiTreeItem-content","& .MuiTreeItem-content.Mui-focused","& .MuiTreeItem-content.Mui-selected","& .MuiTreeItem-content.Mui-selected.Mui-focused","& .MuiTreeItem-content:hover","& .MuiTreeItem-content.Mui-selected:hover"].join(", ")]:{backgroundColor:"transparent"},"& .MuiTreeItem-content .MuiTreeItem-label":{fontFamily:t.family,fontStyle:"normal",lineHeight:"".concat(t.lineHeight,"px"),fontSize:t.size,fontWeight:t.weight}}});function Zi(e){return(0,Ze.jsx)(Ze.Fragment,{children:e.map(e=>{let{value:n,label:t,children:a}=e;return(0,Ze.jsx)(Qi,{itemId:n,label:t,children:a.length>0&&Zi(a)},n)})})}function Xi(e){let{value:n,onChange:t,data:a,loading:r}=e;const i=(0,g.useMemo)(()=>{if(a)return n?function(e,n){if(0===e.length)return[];const t=new Set;for(const a of n){const n=[...e];let r=[];for(const{value:e}of a){const a=n.indexOf(e);if(a>-1?(n.splice(a,1),r.forEach(e=>t.add(e)),r=[e]):r.push(e),0===n.length)break}}return[...t]}(n,a):Hi(a)},[a]),o=(0,g.useMemo)(()=>a?function(e){const n=[];for(let t=0;t<e.length;t++){let a=n.find(n=>{let{value:a}=n;return a===e[t][0].value});a||(a=Ji(e[t][0]),n.push(a)),Yi(e[t],a)}return n}(a):[],[a]),l=(0,g.useMemo)(()=>a?Hi(a,["blank"]):[],[a]),s=n||l;return(0,Ze.jsxs)(Ki,{children:[(0,Ze.jsx)($i.G,{selectedItems:n?"":"all",checkboxSelection:!0,onSelectedItemsChange:(e,n)=>{t(n?null:[])},children:(0,Ze.jsx)(Qi,{itemId:"all",label:"(Select All)"})}),r&&(0,Ze.jsx)(f.Loader,{size:32}),i&&o.map((e,n)=>(0,Ze.jsxs)($i.G,{multiSelect:!0,checkboxSelection:!0,selectedItems:s,defaultExpandedItems:i,onSelectedItemsChange:(e,n)=>t(n),children:[0===n&&(0,Ze.jsx)(Qi,{itemId:"blank",label:"(Blanks)"}),Zi([e])]},n))]})}var eo;const no=(0,D.J1)(eo||(eo=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetOrganisationalUnitsForFilter($accountId: ID!, $source: String!) {\n    getOrganisationalUnitsForFilter(accountId: $accountId, source: $source) {\n      value\n      label\n    }\n  }\n"])));function to(e){let{source:n}=e;const t=rt(),{data:a,loading:r}=(0,h.IT)(no,{variables:{accountId:t,source:n},fetchPolicy:"network-only",notifyOnNetworkStatusChange:!0});return[null==a?void 0:a.getOrganisationalUnitsForFilter,r]}function ao(e){let{source:n,onModelChange:t,model:a}=e;const[r,i]=to({source:n});return(0,Ze.jsx)(Xi,{data:r,loading:i,value:null==a?void 0:a.values,onChange:e=>t(e?{filterType:Vt.pe.Set,values:e}:e)})}var ro=t(88037),io=t(56478),oo=t(6273),lo=t(4164),so=t(30929);function co(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function uo(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?co(Object(t),!0).forEach(function(n){po(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):co(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function po(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const mo="Mui-focused",fo="Mui-disabled",yo=e=>"0px 0px ".concat(e,"px ").concat(e,"px"),go=e=>{let{thickness:n,color:t}=e;return{height:9,borderRadius:yo(8),content:'""',left:0,bottom:0,right:0,position:"absolute",border:"".concat(n,"px solid ").concat(t),borderTop:"none"}},bo=(0,f.styled)("div")(e=>{let{theme:n}=e;const t=n.sys.color,a=n.sys.typescale.title.small;return{display:"flex",cursor:"pointer",height:40,fontStyle:"normal",fontSize:a.size,lineHeight:"".concat(a.lineHeight,"px"),fontWeight:a.weight,letterSpacing:a.tracking,justifyContent:"space-between",alignItems:"center",color:t.onSurface,marginTop:16,padding:"9px 8px 8px 16px","&:before":uo(uo({},go({thickness:1,color:t.outlineVariant})),{},{transition:"border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1)"}),["&:not(.".concat(fo,"):hover::before")]:{borderBottomWidth:2,borderColor:t.primary,borderRadius:yo(9)},"&:after":uo(uo({},go({thickness:2,color:t.primary})),{},{transform:"scaleX(0)",transition:"transform 200ms cubic-bezier(0, 0, 0.2, 1)"}),["&.".concat(mo,"::after")]:{transform:"scaleX(1) translateX(0px)"},["&.".concat(fo)]:{color:n.palette.text.disabled,cursor:"default"},["&.".concat(fo,"::before")]:{borderBottomStyle:"dotted"}}}),ho=(0,f.styled)("div")({display:"flex",alignItems:"center"}),vo=(0,f.styled)("div")({overflow:"hidden",textOverflow:"ellipsis",flex:1,minWidth:0,whiteSpace:"nowrap"}),xo=(0,f.styled)(ro.A)({transform:"translate(14px, 0) scale(0.75)"}),To={horizontal:"left",vertical:"bottom"};function Oo(e,n){return e&&n?0===e.length?"(None)":n.get(e[0])+(e.length>1?" and ".concat(e.length-1," more"):""):"All"}function ko(e){let{label:n="Organisational units",source:t,value:a,onChange:r,disabled:i}=e;const[o,l]=to({source:t}),s=(0,g.useMemo)(()=>o?(e=>{const n=new Map([["blank","(Blanks)"]]);for(const t of e)for(const{value:e,label:a}of t)n.set(e,a);return n})(o):void 0,[o]),[c,d]=(0,g.useState)(),[u,p]=(0,g.useState)(null),m=!!u,y=[];m&&y.push(mo),(i||l)&&y.push(fo);const b=y.join(" ");return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(io.A,{fullWidth:!0,children:[(0,Ze.jsx)(xo,{shrink:!0,className:b,children:n}),(0,Ze.jsxs)(bo,{onClick:e=>{i||l||(p(e.currentTarget),d(void 0))},className:b,children:[(0,Ze.jsx)(vo,{children:Oo(a,s)}),(0,Ze.jsxs)(ho,{children:[l&&(0,Ze.jsx)(f.Loader,{size:20}),m?(0,Ze.jsx)(so.A,{fontSize:"medium",color:"primary"}):(0,Ze.jsx)(lo.A,{fontSize:"medium",color:"primary"})]})]})]}),(0,Ze.jsx)(oo.Ay,{open:m,anchorEl:u,onClose:()=>p(null),anchorOrigin:To,transitionDuration:0,slotProps:{transition:{onEntered:e=>{let{clientHeight:n}=e;return d(n)}},paper:{sx:{width:u?u.offsetWidth:void 0,maxHeight:c}}},children:(0,Ze.jsx)(Xi,{onChange:r,value:a,data:o,loading:l})})]})}const jo={[Vt.sE.DirectBroker]:"Direct - Broker",[Vt.sE.DirectIntercompanyTrade]:"Direct - Intercompany Trade",[Vt.sE.DirectPurchasedDirectly]:"Direct - Purchased Directly",[Vt.sE.IndirectBackchargedByClientOrLandlord]:"Indirect - Backcharged by Client/Landlord",[Vt.sE.IndirectFreeIssue]:"Indirect - Free Issue",[Vt.sE.IndirectPurchasedBySubcontractorOrContractor]:"Indirect - Purchased by Subcontractor/Contractor"},Co=function(e){return e?jo[e]:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""},So=e=>e&&jo[e]||e;function No(){return Object.keys(Vt.sE).map(e=>({value:Vt.sE[e],label:Co(Vt.sE[e])}))}const wo=(e,n,t)=>{var a;return null!=n&&null!==(a=n.some)&&void 0!==a&&a.call(n,n=>n.split(":")[0].toLowerCase()==="".concat(e,"Transaction.purchaseType").toLowerCase())?{headerName:"Purchase Type",sortable:!1,field:null!=t&&t.withDromoCasing?"purchase type":"purchaseType",filter:"agSetColumnFilter",filterParams:{values:[null,...Object.values(Vt.sE)],valueFormatter:e=>{let{value:n}=e;return Co(n,"(Blanks)")}},valueFormatter:e=>{let{value:n}=e;return Co(n)}}:null},Do=(e,n)=>null!=n&&n.organisation?[{headerName:"Organisational Units",field:"organisationalUnits",sortable:!1,filter:ao,filterParams:{source:e}}]:[],Ao=(e,n,t)=>{var a;return null!=n&&null!==(a=n.some)&&void 0!==a&&a.call(n,n=>n.split(":")[0].toLowerCase()==="".concat(e,"Transaction.subcontractor").toLowerCase())?{headerName:"Subcontractor",field:"subcontractor",filter:"agSetColumnFilter",filterParams:null!=t&&t.getFilterValues&&null!=t&&t.gridValueFormatter?{values:t.getFilterValues,valueFormatter:t.gridValueFormatter}:void 0}:null},Ro=(e,n,t)=>{var a;return null!=n&&null!==(a=n.some)&&void 0!==a&&a.call(n,n=>n.split(":")[0].toLowerCase()==="".concat(e,"Transaction.productCode").toLowerCase())?{headerName:"Product code",field:null!=t&&t.withDromoCasing?"product code":"productCode",filter:"agTextColumnFilter"}:null},Po=(e,n,t)=>{var a;return null!=n&&null!==(a=n.some)&&void 0!==a&&a.call(n,n=>n.split(":")[0].toLowerCase()==="".concat(e,"Transaction.materialDescription").toLowerCase())?{headerName:"Material description",field:null!=t&&t.withDromoCasing?"material description":"materialDescription",filter:"agTextColumnFilter"}:null},Lo=(e,n,t)=>{var a;return null!=n&&null!==(a=n.some)&&void 0!==a&&a.call(n,n=>n.split(":")[0].toLowerCase()==="".concat(e,"Transaction.percentRecycledContent").toLowerCase())?{headerName:"% Recycled content",field:null!=t&&t.withDromoCasing?"percent recycled content":"percentRecycledContent",filter:"agNumberColumnFilter",valueFormatter:e=>{let{value:n}=e;return null!=n?"".concat(n,"%"):""}}:null},Io=(e,n,t)=>{var a;return null!=n&&null!==(a=n.some)&&void 0!==a&&a.call(n,n=>n.split(":")[0].toLowerCase()==="".concat(e,"Transaction.distanceToSite").toLowerCase())?{headerName:"Distance to location",field:null!=t&&t.withDromoCasing?"distance to site":"distanceToSite",filter:"agNumberColumnFilter"}:null},Eo=(e,n,t)=>{var a;return null!=n&&null!==(a=n.some)&&void 0!==a&&a.call(n,n=>n.split(":")[0].toLowerCase()==="".concat(e,"Transaction.numberOfDeliveries").toLowerCase())?{headerName:"Number of deliveries",field:null!=t&&t.withDromoCasing?"number of deliveries":"numberOfDeliveries",filter:"agNumberColumnFilter"}:null},_o=(e,n,t)=>{var a;return null!=n&&null!==(a=n.some)&&void 0!==a&&a.call(n,n=>n.split(":")[0].toLowerCase()==="".concat(e,"Transaction.originOfCertification").toLowerCase())?{headerName:"Origin of certification",field:null!=t&&t.withDromoCasing?"origin of certification":"originOfCertification",filter:"agSetColumnFilter",filterParams:null!=t&&t.getFilterValues&&null!=t&&t.gridValueFormatter?{values:t.getFilterValues,valueFormatter:t.gridValueFormatter}:void 0}:null},Fo=(e,n,t)=>{var a;return null!=n&&null!==(a=n.some)&&void 0!==a&&a.call(n,n=>n.split(":")[0].toLowerCase()==="".concat(e,"Transaction.origin").toLowerCase())?{headerName:"Origin",field:"origin",filter:"agSetColumnFilter",filterParams:null!=t&&t.getFilterValues&&null!=t&&t.gridValueFormatter?{values:t.getFilterValues,valueFormatter:t.gridValueFormatter}:void 0}:null},Bo={headerName:"Estimates Scenario ",field:"estimatesScenario",filter:"agSetColumnFilter",filterParams:{values:[null,...Ma.estimatesScenarios]}};function Uo(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.keys(e).reduce((t,a)=>{const r=e[a],i=n?"".concat(n,".").concat(a):a;return"string"==typeof r?t[i]=r:Object.assign(t,Uo(r,i)),t},{})}const Mo=e=>{const n=/(?:\.([^.]+))?$/.exec(e),t=n&&n[1];switch(t?t.toUpperCase():""){case"PDF":return"file-pdf";case"PNG":case"JPG":case"JPEG":case"BMP":return"file-image";case"DOCX":case"DOCM":case"DOC":return"file-word";case"XLSX":case"XLS":case"CSV":return"file-excel";default:return"file"}},Vo=e=>[null==e?void 0:e.first_name,null==e?void 0:e.last_name].filter(Boolean).join(" "),zo=e=>{let{value:n}=e;return(0,zt.isBoolean)(n)&&n?"Yes":(0,zt.isBoolean)(n)&&!n?"No":"-"},Go=()=>({values:[!0,!1],valueFormatter:zo,type:"boolean"}),$o=e=>{let{value:n}=e;if(null===n)return"Blank";const{value:t}=JSON.parse(n);return"1"===t?"Yes":"No"},Wo=e=>{let{value:n}=e;return"true"===n?"Yes":"false"===n?"No":n?"Yes":"No"},qo=e=>(0,zt.mapValues)(e,e=>Array.isArray(e)?e.filter(Boolean):(e=>""===e?null:e)(e)),Jo=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",Yo=e=>{const n=new Set,t=new Set;for(const a of e)n.has(a)?t.add(a):n.add(a);return[...t]};function Ho(e){return null==e?[]:[e]}function Ko(e){return new Promise(n=>{setTimeout(n,e)})}async function Qo(e,n,t){const a=Date.now()+(t||0);for(;;){if(t&&Date.now()>a)throw new Error("Poll timeout");if(e())return;await Ko(n)}}const Zo=(e,n)=>{const t=[];if(!e)return t;for(const a of e)if(a){const e=n(a);e&&t.push(e)}return t};function Xo(e){const n=[];for(const t of e)null!=t&&n.push(t);return n}function el(e){return e.split(".").slice(0,-1).join(".")}const nl=e=>{if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(e=>nl(e));const n={};for(const t in e)"__typename"!==t&&(n[t]=nl(e[t]));return n},tl="File type is not allowed. Allowed types are: ".concat(xr.allowedDocument.mimeTypes.join(", "));function al(){const e=(0,N.m)();return(0,g.useCallback)(async(n,t,a)=>{try{const{data:r}=await e.query({query:Mt(),variables:{accountId:n,documentId:t,mimeType:a.type}});if(null==r||!r.getDocumentUploadLink)throw new Error(tl);const i=await fetch(r.getDocumentUploadLink,{method:"PUT",body:a});if(i.status>=500)throw new Error("File service is temporarily out of order. Please try again later.");if(i.status>=400)throw new Error(tl)}catch(e){if(!Pr(e))throw new Error("Something went wrong. Please try again later.");if(e.message.includes("File format is not allowed"))throw new Error(tl);throw e}},[e])}function rl(){return(0,m.zy)().pathname.startsWith("/v2")}function il(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ol(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?il(Object(t),!0).forEach(function(n){ll(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):il(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ll(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t(27351);const sl=(e,n,t,a)=>{const r=Wt()(n).clone().add(a,e),i=Wt()(n).clone().add(a+1,e).subtract(1,"days");return{startDate:r.toDate(),endDate:i.isAfter(t)?t:i.toDate()}};var cl=t(68959),dl=t.n(cl);const ul=["data"];function pl(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ml(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pl(Object(t),!0).forEach(function(n){fl(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pl(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function fl(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function yl(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const t=(0,h.IT)(dl(),ml({variables:{bundleId:e}},n)),{data:{getBundleById:a}={}}=t,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(t,ul);return ml({data:a},r)}var gl=t(15789),bl=t.n(gl);const hl=["data"];function vl(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xl(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vl(Object(t),!0).forEach(function(n){Tl(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vl(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Tl(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Ol=t(2204),kl=t.n(Ol);const jl=["data"];function Cl(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Sl(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Cl(Object(t),!0).forEach(function(n){Nl(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Cl(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Nl(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function wl(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const t=rt(),a=(0,h.IT)(kl(),Sl({variables:{accountId:t,id:e}},n)),{data:{getCourseById:r}={}}=a,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(a,jl);return Sl({data:r},i)}var Dl=t(87858),Al=t.n(Dl);const Rl=["data"],Pl=["id"];function Ll(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Il(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ll(Object(t),!0).forEach(function(n){El(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ll(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function El(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function _l(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var Fl=t(26873),Bl=t.n(Fl);const Ul=["data"];function Ml(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Vl(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ml(Object(t),!0).forEach(function(n){zl(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ml(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zl(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Gl=(0,g.createContext)(null),$l=()=>(0,g.useContext)(Gl);var Wl=t(6134),ql=t.n(Wl);function Jl(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Yl(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Jl(Object(t),!0).forEach(function(n){Hl(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Jl(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Hl(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Kl=(e,n)=>t=>t.map(t=>t.id===e?(e=>{const n=Yl({},e);if(null!=e&&e.offset&&null!=e&&e.totalRows&&0!==e.offset){const t=Math.ceil((null==e?void 0:e.offset)/(null==e?void 0:e.totalRows)*100);n.percents=t}return n})(Yl(Yl({},t),n)):t),Ql=e=>({id:e.id,step:e.rowsProcessed-e.uploadProgress,isBackendExport:!0,downloadLink:null,percents:e.rowsProcessingProgress,uploadProgress:e.uploadProgress,fileName:e.filename,status:e.exportStatus,error:e.errorMessage?new Error(e.errorMessage):null,completed:[Vt.l2.Completed,Vt.l2.Ready].includes(e.exportStatus),loading:e.exportStatus===Vt.l2.InProgress}),Zl="Rio exports your data. You can safely navigate away from this page.";var Xl,es,ns,ts,as=t(72634),rs=t(87653),is=t.n(rs),os=t(41621),ls=t.n(os);function ss(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const cs=(0,D.J1)(Xl||(Xl=ss(["\n  mutation TriggerExportTransactions(\n    $accountId: ID!\n    $transactionType: TransactionType!\n    $filters: Filters\n    $fileName: String!\n  ) {\n    triggerExportTransactions(\n      accountId: $accountId\n      transactionType: $transactionType\n      filters: $filters\n      fileName: $fileName\n    ) {\n      ...ExportProgressFields\n    }\n  }\n\n  ","\n"])),is()),ds=(0,D.J1)(es||(es=ss(["\n  subscription OnExportProgressUpdated($userId: ID!) {\n    exportProgressUpdated(userId: $userId) {\n      ...ExportProgressPayloadFields\n    }\n  }\n\n  ","\n"])),ls()),us=(0,D.J1)(ns||(ns=ss(["\n  query DownloadMyExport($id: ID!, $userId: ID!) {\n    downloadMyExport(id: $id, userId: $userId)\n  }\n"]))),ps=(0,D.J1)(ts||(ts=ss(["\n  mutation DeleteMyExport($id: ID!, $userId: ID!) {\n    deleteMyExport(id: $id, userId: $userId)\n  }\n"])));function ms(){const{token:e}=at();return null==e?void 0:e.sub}function fs(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ys(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var gs=t(13542);function bs(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function hs(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?bs(Object(t),!0).forEach(function(n){vs(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bs(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function vs(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const xs={[Vt.l2.Initiated]:0,[Vt.l2.InProgress]:1,[Vt.l2.Ready]:2,[Vt.l2.Completed]:3};function Ts(){const e=rt(),{showNotification:n}=vt(),t=(0,g.useRef)({}),a=(0,g.useRef)(new Set),[r,i]=(0,g.useState)([]),[o]=(()=>{const e=rt(),{showNotification:n}=vt();return(0,Ot.n)(cs,{variables:{accountId:e},onError:e=>{n("".concat("There was an error at initializing the export."," (").concat(e.message,")"),"danger")},onCompleted:()=>{n(Zl,"success")}})})(),l=(()=>{const e=ms(),{showNotification:n}=vt(),[t]=(0,gs._)(us,{fetchPolicy:"network-only"});return(0,g.useCallback)(async a=>{var r;const i=await t({variables:{id:a.id,userId:e}});if(null===(r=i.data)||void 0===r||!r.downloadMyExport)return n("".concat(a.filename," could not be downloaded"),"danger"),!1;try{return await Ar(i.data.downloadMyExport,a.filename),n("".concat(a.filename," is saved to your downloads"),"success"),!0}catch(e){return n("".concat(a.filename," could not be downloaded"),"danger"),!1}},[t,e,n])})(),s=(()=>{const e=ms(),{showNotification:n}=vt(),[t]=(0,Ot.n)(ps);return(0,g.useCallback)(async a=>{var r;return!(null===(r=(await t({variables:{id:a,userId:e}})).data)||void 0===r||!r.deleteMyExport)||(n("Export could not be deleted","danger"),!1)},[t,e,n])})();(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=ms();(0,as.R)(ds,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fs(Object(t),!0).forEach(function(n){ys(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fs(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({variables:{userId:n},ignoreResults:!0,shouldResubscribe:!0},e))})({onData:async e=>{var n;const t=null===(n=e.data.data)||void 0===n||null===(n=n.exportProgressUpdated)||void 0===n?void 0:n.items;if(null==t||!t.length)return;const r=(0,zt.keyBy)(t,"id");for(const e of t)e.exportStatus!==Vt.l2.Ready||a.current.has(e.id)||(a.current.add(e.id),await l(e)||a.current.delete(e.id),i(n=>n.map(n=>n.id===e.id?hs(hs({},n),{},{completed:!0}):n)));i(e=>{const n=(0,zt.keyBy)(e,"id"),t=Object.keys(r).filter(e=>!(e in n)).sort((e,n)=>new Date(r[n].createdAt).getTime()-new Date(r[e].createdAt).getTime()).map(e=>Ql(r[e])),a=e.map(e=>{if(e.id in r){const n=Ql(r[e.id]);if(e.completed&&!n.completed)return e;if(e.isBackendExport&&!e.completed){const n=xs[e.status],t=xs[r[e.id].exportStatus];if(void 0!==n&&void 0!==t&&t<n)return e}return n}return e});return a.concat(t)})}}),(0,g.useEffect)(()=>{r.filter(e=>!(e.isBackendExport||e.loading||null===e.offset||e.completed||e.error)).forEach(a=>{a.isBackendExport||(i(Kl(a.id,{loading:!0})),a.options.fetchRows({accountId:e,offset:a.offset,limit:a.step,sort:a.options.sort,filters:a.options.filters}).then(e=>{let{rows:r,totalRows:o}=e;if(a.error||a.completed)return;r.forEach(e=>{var n;const r=a.options.formatRow(e);null===(n=t.current[a.id])||void 0===n||n.push(r)});const l=((null==a?void 0:a.offset)||0)+a.step;if(l<o)i(Kl(a.id,{totalRows:o,offset:l,loading:!1}));else{if(t.current[a.id].length){const e=Vr(t.current[a.id],a.options.exportFileName);ql()(e,"".concat(a.options.exportFileName,".").concat("xlsx")),n("Export completed! Please check your downloads.","success")}else n("Nothing to export.","warning");i(Kl(a.id,{totalRows:o,completed:!0,offset:o,loading:!1}))}}).catch(e=>{i(Kl(a.id,{error:e})),n("Export failed: ".concat(e),"danger")}))})},[r]);const c=(0,g.useCallback)(e=>{const a=(0,Ai.A)(),r={isBackendExport:!1,id:a,options:e,offset:0,totalRows:null,loading:!1,completed:!1,error:null,step:e.step||500,percents:0,fileName:e.exportFileName};return t.current[a]=[],i(e=>e.concat(r)),n(Zl,"success"),a},[n]),d=(0,g.useCallback)(async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=r.find(n=>n.id===e);null!=o&&o.isBackendExport&&n.shouldDelete&&await s(e),a.current.delete(e),delete t.current[e],i(n=>n.filter(n=>n.id!==e))},[r,s]),u=(0,g.useCallback)(async t=>{const{data:a}=await o({variables:hs({accountId:e},t)}),r=null==a?void 0:a.triggerExportTransactions;if(!r)throw n("Failed to start your export","danger"),new Error("Failed to start your export");return i(e=>e.find(e=>e.id===r.id)?e:e.concat([Ql(r)])),r.id},[e,o,n]),p=(0,g.useCallback)(e=>{const n=r.find(n=>n.id===e);if(!n)throw new Error("Export not found");return n},[r]),m=(0,g.useCallback)(()=>r,[r]);return(0,g.useMemo)(()=>({stopExport:d,startFrontendExport:c,startBackendExport:u,getExport:p,getExports:m}),[d,u,c,p,m])}function Os(){const e=$l(),{showNotification:n}=vt();return(0,g.useCallback)(async(t,a,r)=>{if(!e)return n("Export is not ready yet. Please try again a couple of seconds later.");await e.startBackendExport({fileName:el(t),transactionType:a,filters:{text:[{filterType:Vt.pe.Text,field:"importBatchId",type:Vt.II.Equals,filter:r}]}})},[e,n])}t(99451);var ks,js=t(3158),Cs=t.n(js);function Ss(){const e=rt(),{data:{getAllLegislation:n=[]}={},loading:t,error:a}=(0,h.IT)(Cs(),{variables:{accountId:e},skip:!e});return{legislations:n,loading:t,error:a}}const Ns=(0,D.J1)(ks||(ks=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  fragment AspectFields on Aspect {\n    id\n    accountId\n    scope\n    activity {\n      id\n      name\n    }\n    locations {\n      id\n      name\n      tags {\n        id\n        tagName\n      }\n    }\n    tags {\n      id\n      tagName\n    }\n    aspects {\n      id\n      name\n    }\n    impacts {\n      id\n      name\n    }\n    legislations {\n      id\n      title\n    }\n    emergencyConditions {\n      id\n      name\n    }\n    controlMeasures {\n      id\n      name\n    }\n    status {\n      id\n      name\n    }\n    task {\n      id\n    }\n    departments {\n      id\n      name\n    }\n    likelihoodNoControl\n    severityNoControl\n    likelihoodControl\n    severityControl\n    significanceControl\n    significanceNoControl\n    reviewDate\n    author {\n      id\n      name\n    }\n    editor {\n      id\n      name\n    }\n    owner {\n      id\n      name\n    }\n    createdDate\n    editedDate\n    activeTasks\n  }\n"])));var ws;const Ds=(0,D.J1)(ws||(ws=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAspectsByAccountId($accountId: ID!) {\n    getAspectsByAccountId(accountId: $accountId) {\n      totalRows\n      rows {\n        ...AspectFields\n      }\n    }\n  }\n  ","\n"])),Ns);var As;const Rs=(0,D.J1)(As||(As=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAspectByIdQuery($id: ID!, $accountId: ID!) {\n    getAspectById(id: $id, accountId: $accountId) {\n      ...AspectFields\n      evidenceNotes {\n        id\n        notes\n        documents {\n          id\n          fileName\n        }\n      }\n    }\n  }\n  ","\n"])),Ns);function Ps(e){const n=rt();for(var t=arguments.length,a=new Array(t>1?t-1:0),r=1;r<t;r++)a[r-1]=arguments[r];return function(e){return(0,g.useMemo)(()=>!!localStorage.getItem(e),[e])}("ENABLE_".concat(e))||[...a].includes(n)}t(26270);var Ls=t(29477),Is=t.n(Ls);const Es=["data"];function _s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Fs(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t(13758);var Bs=t(4271),Us=t.n(Bs);const Ms=["data"];function Vs(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function zs(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Vs(Object(t),!0).forEach(function(n){Gs(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Vs(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Gs(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var $s=t(73949),Ws=t.n($s);const qs=["data"];function Js(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ys(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Js(Object(t),!0).forEach(function(n){Hs(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Js(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Hs(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Ks=t(77928),Qs=t.n(Ks);const Zs=["data"];function Xs(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ec(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var nc;const tc=(0,D.J1)(nc||(nc=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  subscription OnUserUpdated($id: ID!) {\n    userUpdated(id: $id) {\n      id\n      email\n      first_name\n      last_name\n      jobTitle\n      department\n      phone\n      mobile\n      profilePicture\n      roles\n      accessLevel\n      account {\n        id\n        name\n        type\n        logoPath\n        children {\n          id\n          name\n          logoPath\n        }\n      }\n      role {\n        role\n        name\n        permissions {\n          user\n          account\n          data\n          governance\n          document\n          tag\n          transposition\n          email\n          notification\n          learn\n          dashboard\n          task\n          ocr\n          intelligence\n          dataOverwriting\n        }\n      }\n    }\n  }\n"])));const ac=e=>{var n,t,a,r,i,o,l,s;return null!=e&&null!==(n=e.account)&&void 0!==n&&n.find(e=>null==e?void 0:e.startsWith("create"))?"accountconfig/accounts":null!=e&&null!==(t=e.learn)&&void 0!==t&&t.find(e=>null==e?void 0:e.startsWith("createCourse"))?"learnconfig/learncontent":null!=e&&null!==(a=e.dashboard)&&void 0!==a&&a.includes("createAll")?"dashboardconfig/dashboards":null!=e&&null!==(r=e.governance)&&void 0!==r&&r.includes("createLegislationAll")?"governanceconfig/managementsubscriptions":null!=e&&null!==(i=e.ocr)&&void 0!==i&&i.includes("createTemplateAll")?"ocr":null!=e&&null!==(o=e.data)&&void 0!==o&&o.find(e=>null==e?void 0:e.startsWith("getLocation"))?"accountconfig/locations":null!=e&&null!==(l=e.data)&&void 0!==l&&l.find(e=>null==e?void 0:e.startsWith("createSupplier"))?"suppliers":null!=e&&null!==(s=e.data)&&void 0!==s&&s.find(e=>null==e?void 0:e.startsWith("createWasteStream"))?"wasteconfig/wastestream":""};function rc(){var e,n;const{token:t}=at(),a=function(){const e=ms(),{showNotification:n}=vt(),t=(0,N.m)(),{data:a}=(0,as.R)(tc,{variables:{id:e},skip:!e,onData:()=>{(async e=>{const n=await y.N.currentSession(),t=await y.N.currentAuthenticatedUser();await t.refreshSession(n.getRefreshToken(),async()=>{const n=await y.N.currentSession();await et(n,e)})})(t),n("Your account has been updated")}});return null==a?void 0:a.userUpdated}(),{sub:r}=t||{},{data:i,loading:o}=(0,h.IT)(P,{variables:{name:r},skip:!!a||!r}),l=a||(null==i?void 0:i.getUserInfoById),s=null==l||null===(e=l.role)||void 0===e?void 0:e.permissions,c=null==l||null===(n=l.role)||void 0===n?void 0:n.role,d=function(e){return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).find(n=>n.startsWith(e))};return{loading:o,isSystemAdmin:d("createSubscription",(null==s?void 0:s.learn)||[]),allowedRioModules:(null==s?void 0:s.allowedRioModules)||[],currentUser:l,role:c||null,user:(null==s?void 0:s.user)||[],account:(null==s?void 0:s.account)||[],data:(null==s?void 0:s.data)||[],governance:(null==s?void 0:s.governance)||[],document:(null==s?void 0:s.document)||[],documentFolder:(null==s?void 0:s.documentFolder)||[],tag:(null==s?void 0:s.tag)||[],transposition:(null==s?void 0:s.transposition)||[],email:(null==s?void 0:s.email)||[],notification:(null==s?void 0:s.notification)||[],learn:(null==s?void 0:s.learn)||[],dashboard:(null==s?void 0:s.dashboard)||[],task:(null==s?void 0:s.task)||[],ocr:(null==s?void 0:s.ocr)||[],intelligence:(null==s?void 0:s.intelligence)||[],scheme:(null==s?void 0:s.scheme)||[],project:(null==s?void 0:s.project)||[],survey:(null==s?void 0:s.survey)||[],flows:(null==s?void 0:s.flows)||[],invest:(null==s?void 0:s.invest)||[],configurationRoute:ac(s),learnService:{createCourse:d("createCourse",null==s?void 0:s.learn)},licenceService:{createLicence:d("create",(null==s?void 0:s.licence)||[]),assignLicence:d("assign",(null==s?void 0:s.licence)||[])},dataTracker:(null==s?void 0:s.dataTracker)||[],dataTrackerAnomalies:(null==s?void 0:s.dataTrackerAnomalies)||[],dataOverwriting:(null==s?void 0:s.dataOverwriting)||[],insite:(null==s?void 0:s.insite)||[]}}const ic={home:{root:"impact",impact:{emissionByScope:"emission-by-scope",emissionBySource:"emission-by-source",carbonEmissionByScope:"carbon-emission-by-scope",grossNetEmission:"gross-net-emission"}},data:{root:"data"},reporting:{root:"reporting"},learn:{root:"engage"},governance:{root:"governance",legislation:"legislation",systems:"systems",agreements:"agreements",frameworks:"frameworks",policies:"policies",targets:"targets",materiality:"materiality",aspects:"environmental-aspects",health:"health-and-safety-risk-register"},docs:{root:"documents",all:"all",systems:"governance/ManagementSystems"},intelligence:{root:"intelligence"},surveys:{root:"surveys",sent:{overview:"sent/overview",surveys:"sent/surveys",survey:"sent/surveys/:surveyId",contributors:"sent/contributors",contributor:"sent/contributors/:contributorId",contributorAuditLog:"sent/contributors/:contributorId/response-log/:surveyId",submission:"sent/contributors/:contributorId/submission/:submissionId",auditLog:"sent/surveys/:surveyId/survey-log"},received:{surveys:"received",survey:"received/:surveyId",auditLog:"received/:surveyId/response-log"}},flows:{root:"flows"},tasks:{root:"/tasks"},configuration:{root:"configuration",menu:{accounts:"accountconfig/accounts",tracker:{frequency:"datatracker/frequency-recurrence",anomolies:"datatracker/anomaliesthresholds"},locations:"accountconfig/locations",meters:"accountconfig/meters",normalisers:"accountconfig/normalisers",schemes:"accountconfig/schemes",tags:"accountconfig/tags",users:"accountconfig/users",portfolio:{assets:"portfoliomanagement/asset-management",funds:"portfoliomanagement/funds",assetConversionFactors:"portfoliomanagement/asset-conversion-factors",fundFMVs:"portfoliomanagement/fund-fmvs"},aliases:{waste:"aliases/waste",meters:"aliases/meters",transport:"aliases/transport",location:"aliases/location",others:"aliases/others"},suppliers:"suppliers",contractors:"wasteconfig/contractors",containerTypes:"wasteconfig/containertypes",wasteStream:"wasteconfig/wastestream",hierarchies:"wasteconfig/wastehierarchies",hierarchiesNew:"wasteconfig/waste-hierarchies-new",surveys:{templates:"surveys/templates",subscriptions:"surveys/subscriptions",questions:"surveys/questions",categories:"surveys/question-categories"},flows:{root:"flows/flows",subscriptions:"flows/subscriptions"},dashboards:{root:"dashboardconfig/dashboards",subscriptions:"dashboardconfig/subscriptions"},learn:{content:"learnconfig/learncontent",subscriptions:"learnconfig/learnsubscriptions",assignLicense:"learnconfig/account/:accountId/:productType/:productId/licence/assign",createLicense:"learnconfig/account/:accountId/:productType/:productId/licence/create",evaluations:"learnconfig/evaluations",banners:"learnconfig/banners"},governance:{legislation:"governanceconfig/legislation",management:"governanceconfig/managementsubscriptions"},intelligence:{knowledgebases:"intelligenceconfig/knowledgebases",subscriptions:"intelligenceconfig/kbsubscriptions"},ocr:"ocr",organisation:{root:"organisation",organisationalUnits:"organisation/organisational-units",organisationalHierarchies:"organisation/organisational-hierarchies",locationAttachments:"organisation/location-attachments",accessPolicies:"organisation/access-policies",userGroups:"organisation/user-groups"}},emissionFactorsNew:"carbonconversionfactors/emission-factors-new",factors:{location:"carbonconversionfactors/location",market:"carbonconversionfactors/market",gas:"/configuration/carbonconversionfactors/location/gas",electricity:"/configuration/carbonconversionfactors/location/electricity",water:"/configuration/carbonconversionfactors/location/water",waste:"/configuration/carbonconversionfactors/location/waste",transport:"/configuration/carbonconversionfactors/location/transport",fuel:"/configuration/carbonconversionfactors/location/fuel",heat:"/configuration/carbonconversionfactors/location/heat",refrigerant:"/configuration/carbonconversionfactors/location/refrigerant",hotelStays:"/configuration/carbonconversionfactors/location/hotel-stays",material:"/configuration/carbonconversionfactors/location/material"}},projects:{root:"/projects"},header:{profile:"profile",contact:"contact",upgrade:"upgrade"},registration:{verify:"v2/verify-email",setPassword:"v2/set-password",resetPassword:"v2/reset-password",register:"v2/register",login:"v2/login",providerLogin:"login"},market:{checkout:"checkout",cart:"cart",engage:"upgrade/courses"}};function oc(){return(0,g.useMemo)(()=>ic,[])}var lc=t(73469),sc=t.n(lc);const cc=["data"];function dc(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function uc(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function pc(){const e=rt(),{showNotification:n}=vt(),t=(0,m.Zp)(),a=oc(),{licenceService:r,isSystemAdmin:i}=rc(),o=(0,as.R)(sc(),{variables:{id:e},skip:!e,onData:()=>{i||r.assignLicence&&n("You have new licences",void 0,{callback:()=>{t(a.configuration.learn.subscriptions)},text:"Configure",autoClose:!1})}}),{data:{licencesPaid:l}={}}=o,s=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(o,cc);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dc(Object(t),!0).forEach(function(n){uc(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dc(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({data:l},s)}var mc=t(35809),fc=t.n(mc);const yc=["data"];function gc(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function bc(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gc(Object(t),!0).forEach(function(n){hc(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gc(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hc(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function vc(e){const[n,t]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n,t]=(0,gs._)(fc(),bc(bc({},e),{},{fetchPolicy:"cache-and-network"})),{data:{getAccountProductLicencesCount:a=[]}={}}=t,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(t,yc);return[e=>n({variables:{accountId:e}}),bc({data:a},r)]}();return(0,g.useEffect)(()=>{e&&n(e)},[]),t}var xc,Tc=t(90156),Oc=t.n(Tc);function kc(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jc(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kc(Object(t),!0).forEach(function(n){Cc(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kc(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cc(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Sc(e){const{data:{getUserInfoByAccountId:n={}}={},loading:t,error:a}=(0,h.IT)(Oc(),{variables:{limit:1e3,accountId:e},skip:!e});return{data:jc(jc({},n),{},{content:n.users||[]}),loading:t,error:a}}const Nc=(0,D.J1)(xc||(xc=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetUserById($id: String!) {\n    getUserInfoById(id: $id) {\n      id\n      email\n      username\n      roles\n      first_name\n      last_name\n      jobTitle\n      department\n      mobile\n      phone\n      profilePicture\n      disabled\n      last_active_at\n      total_time_spent_ms\n      userGroupName\n      account {\n        id\n        name\n      }\n      role {\n        role\n        name\n        restrictedAccess\n      }\n      accessLevel\n      allowedLocations {\n        id\n        name\n        tags {\n          id\n          tagName\n        }\n      }\n      allowedTags {\n        id\n        tagName\n        locations {\n          id\n        }\n      }\n      disableAccountSelector\n    }\n  }\n"])));function wc(e){const{data:n}=vc(e),{data:{users:t=[]}={}}=Sc(e);return{usersCount:t.length,productLicences:n}}t(10529),t(32356);const Dc="market_cart",Ac="market_discount";function Rc(e,n){const t="percentage"===n.type?e/100*n.discount:n.discount;return(0,zt.round)(t,2)}function Pc(){const[,e]=(0,g.useState)(Math.random()),n=()=>e(Math.random()),t=()=>{const e=localStorage.getItem(Dc);return e?JSON.parse(e):[]},a=()=>new Map(t()),r=t(),i=JSON.parse(localStorage.getItem(Ac)),o=r.filter(e=>{let[,{parent:n}]=e;return(0,zt.isEmpty)(n)}).length,l=r.reduce((e,n)=>{let[,{totalAmount:t}]=n;return e+parseFloat(t)},0),s=i?function(e,n){if(!n)return e;const t=Rc(e,n);return t<e?e-t:0}(l,i):l,c=i?Rc(l,i):null,d=.2*s+s;return{addProduct:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=a();let l;o.has(e.id)?(l=o.get(e.id),l.quantity=l.quantity+t,l.totalAmount=Tr(l.quantity*parseFloat(e.price))):l={resizable:i,parent:r,quantity:t,product:e,totalAmount:Tr(t*parseFloat(e.price))},o.set(e.id,l),localStorage.setItem(Dc,JSON.stringify([...o])),n()},setProduct:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=a(),l={resizable:i,parent:r,quantity:t,product:e,totalAmount:Tr(t*parseFloat(e.price))};o.set(e.id,l),localStorage.setItem(Dc,JSON.stringify([...o])),n()},removeProduct:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const r=a();if(!r.has(e.id))return;const i=r.get(e.id),o=i.quantity-t;i.quantity=o<0?0:o,i.totalAmount=Tr(i.quantity*parseFloat(e.price)),r.set(e.id,i),localStorage.setItem(Dc,JSON.stringify([...r])),n()},removeLine:e=>{const t=a();t&&(Array.from(t).filter(n=>{let[t,{parent:a}]=n;return t===e||a===e}).forEach(e=>{let[n]=e;return t.delete(n)}),localStorage.setItem(Dc,JSON.stringify([...t])),n())},hasProduct:e=>a().has(e),clearCart:()=>{localStorage.removeItem(Dc),localStorage.removeItem(Ac),n()},findLine:e=>a().get(e),setDiscount:e=>{localStorage.setItem(Ac,JSON.stringify(e)),n()},state:{data:r,isCartEmpty:o<1,subTotal:Tr(l),newSubTotal:Tr(s),total:Tr(d),currency:{symbol:"£"},discount:i,discountFixed:c,linesCount:o}}}var Lc=t(69627),Ic=t.n(Lc);const Ec=["content"],_c=["data"],Fc=["id"];function Bc(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Uc(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Bc(Object(t),!0).forEach(function(n){Mc(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Bc(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Mc(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Vc(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function zc(){const[e,n]=function(){var e;const[n,t]=(0,gs._)(Ic()),{content:a={}}=i,r=Vc(i,Ec),{data:{getProductsPaged:i={}}={}}=t,o=Vc(t,_c),l=e=>n=>{let{id:t}=n,r=Vc(n,Fc);if(null==a||!a.itemList)return;const i=(0,zt.findIndex)(a.itemList,n=>{let{id:a,productType:r}=n;return a===t&&r===e});return Uc(Uc(Uc({},r),a.itemList[i]),{},{id:t})};return[function(){return n({variables:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{page:0,size:999}})},Uc({data:Uc(Uc({},r),{},{content:{[Wa]:(null===(e=a.bundlesList)||void 0===e?void 0:e.map(l(Wa)))||[],[Ja]:[{id:"accountCapacity_id"}].map(l(Ja))||[],[qa]:[{id:"team_sub_id"}].map(l(qa))||[]}})},o)]}();return(0,g.useEffect)(()=>{e()},[]),n}var Gc,$c,Wc,qc;function Jc(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Yc=(0,D.J1)(Gc||(Gc=Jc(["\n  query GetMeterOptions(\n    $accountId: ID!\n    $type: TransactionType\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getEnergySourceByAccountIdAndType(\n      accountId: $accountId\n      type: $type\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        value: id\n        label: name\n      }\n    }\n  }\n"]))),Hc=(0,D.J1)($c||($c=Jc(["\n  query getEnergySourceByAccountIdAndType(\n    $accountId: ID!\n    $type: TransactionType\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getEnergySourceByAccountIdAndType(\n      accountId: $accountId\n      type: $type\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        name\n      }\n    }\n  }\n"]))),Kc=(0,D.J1)(Wc||(Wc=Jc(["\n  query getEnergySourceByAccountIdAndType(\n    $accountId: ID!\n    $type: TransactionType\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getEnergySourceByAccountIdAndType(\n      accountId: $accountId\n      type: $type\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        name\n        inOut\n        locationPoint {\n          id\n          name\n          location {\n            id\n            name\n            code\n          }\n        }\n      }\n    }\n  }\n"]))),Qc=(0,D.J1)(qc||(qc=Jc(["\n  query GetEnergySourceFilter($accountId: ID!, $field: String!) {\n    getEnergySourcePageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));function Zc(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Xc(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Zc(Object(t),!0).forEach(function(n){ed(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Zc(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ed(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function nd(e){let{withLocationData:n=!1,notifyOnNetworkStatusChange:t=!1,onCompleted:a=e=>{},variablesProps:r={},onError:i=()=>{},fetchPolicy:o=""}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=rt(),{data:{getEnergySourceByAccountIdAndType:s}={},error:c,loading:d,refetch:u,fetchMore:p}=(0,h.IT)(n?Kc:Hc,{variables:Xc({type:e,accountId:l},r),notifyOnNetworkStatusChange:t,fetchPolicy:o||void 0,onCompleted:a,onError:i,skip:!l});return{data:(null==s?void 0:s.rows)||[],totalRows:null==s?void 0:s.totalRows,loading:d,error:c,refetch:u,fetchMore:p,refetch:u}}var td;t(9908);const ad=(0,D.J1)(td||(td=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  fragment ProjectFields on Project {\n    id\n    accountId\n    name\n    description\n    priority\n    scheme {\n      id\n      name\n      category {\n        id\n        name\n      }\n    }\n    impact\n    cost\n    currencyId\n    baselineStartDate\n    startDate\n    endDate\n    frequency\n    plannedBenefit\n    plannedCostChange\n    plannedCO2eChange\n    locations {\n      id\n      name\n    }\n    owners {\n      id\n      first_name\n      last_name\n      profilePicture\n    }\n    evidenceNotes {\n      id\n      notes\n      documents {\n        id\n        fileName\n      }\n    }\n    meters {\n      id\n      name\n    }\n  }\n"])));var rd;const id=(0,D.J1)(rd||(rd=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  fragment TaskFields on Task {\n    id\n    accountId\n    author {\n      id\n      first_name\n      last_name\n      profilePicture\n    }\n    scope\n    locations {\n      id\n      name\n    }\n    tags {\n      id\n      tagName\n    }\n    name\n    description\n    category\n    subject\n    item {\n      ... on Legislation {\n        id\n        title\n      }\n      ... on Aspect {\n        id\n        activity {\n          id\n          name\n        }\n      }\n      ... on Target {\n        id\n        name\n      }\n    }\n    dueDate\n    createdAt\n    completedAt\n    isCompleted\n    owners {\n      id\n      first_name\n      last_name\n      profilePicture\n    }\n    priority\n    projectId {\n      id\n      name\n    }\n  }\n"])));var od;const ld=(0,D.J1)(od||(od=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetProjectById($id: ID!) {\n    getProject(id: $id) {\n      ...ProjectFields\n      tasks {\n        ...TaskFields\n      }\n      scheme {\n        id\n        name\n      }\n      evidenceNotes {\n        id\n        notes\n        documents {\n          id\n          fileName\n        }\n      }\n    }\n  }\n  ","\n  ","\n"])),ad,id);function sd(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function cd(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sd(Object(t),!0).forEach(function(n){dd(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sd(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dd(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var ud,pd,md=t(16237),fd=t.n(md);function yd(){const e=rt(),{data:{getTargetsByAccountId:n=[]}={},loading:t,error:a}=(0,h.IT)(fd(),{variables:{accountId:e},skip:!e});return{targets:n,loading:t,error:a}}function gd(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const bd=(0,D.J1)(ud||(ud=gd(["\n  fragment getAccountInfoFragment on Account {\n    id\n    name\n    type\n    logoPath\n    showChatBot\n    n3rgyUploadGranularity\n    n3rgyConsentDocumentLink\n    isSupplierRequiredForDocument\n    reportingYear {\n      startDate\n      endDate\n    }\n    accessControls {\n      learn\n      intelligence\n      tasks\n      projects\n      surveys\n      flows\n      dataTracker\n      dromoUpload\n      v2Design\n      dataOverwriting\n      comply {\n        legislation\n        tagLevelLegislation\n        policies\n        systems\n        targets\n        frameworks\n        agreements\n      }\n      data {\n        waste\n        electricity\n        gas\n        water\n        materials\n        fuel\n        transport\n        refrigerants\n        heatSteam\n        buildingEnergyRatings\n        hotelStays\n        investment\n        scope3ActivityBasedMaterials\n        scope3SpendBasedMaterials\n        coreEstate\n        oilAndGas\n        insite\n      }\n      customFields\n      organisation\n    }\n    departments {\n      id\n      name\n    }\n    children {\n      id\n      name\n      logoPath\n    }\n    customImpactDashboard {\n      id\n      name\n      description\n      area\n      provider\n      thumbnailType\n      sheets {\n        title\n        filters {\n          type\n          label\n          defaultValue\n          relativeDateDefault\n          isHidden\n          dataset {\n            datasetName\n            columnName\n          }\n        }\n        tiles {\n          type\n          title\n          colSpan\n          rowSpan\n        }\n        units\n        withVat\n        withCarbonComponents\n      }\n    }\n  }\n"]))),hd=(0,D.J1)(pd||(pd=gd(["\n  query GetAccountInfo($id: ID!) {\n    getAccountInfo(id: $id) {\n      ...getAccountInfoFragment\n    }\n  }\n  ","\n"])),bd);var vd=t(11845),xd=t.n(vd);function Td(){var e;const n=rt(),t=function(){const e=rt(),{showNotification:n}=vt(),{data:t}=(0,as.R)(xd(),{variables:{id:e},skip:!e,onData:()=>{n("Your account has been updated")}});return null==t?void 0:t.accountUpdated}(),{data:a,loading:r}=(0,h.IT)(hd,{variables:{id:n},skip:!!t||!n});return{data:(null==t?void 0:t.accessControls)||(null==a||null===(e=a.getAccountInfo)||void 0===e?void 0:e.accessControls)||{intelligence:!1,learn:!0,tasks:!0,projects:!1,dataTracker:!1,organisation:!1,comply:{legislation:!0,tagLevelLegislation:!1,policies:!0,systems:!0,targets:!0,frameworks:!0,agreements:!0},data:{waste:!0,electricity:!0,gas:!0,water:!0,materials:!0,fuel:!0,transport:!0,refrigerants:!0,heatSteam:!0,buildingEnergyRatings:!0,hotelStays:!0,investment:!0,coreEstate:!0,oilAndGas:!0}},loading:r}}function Od(e){const{data:n}=(0,h.IT)(hd,{variables:{id:e}});return n&&n.getAccountInfo?n.getAccountInfo:null}var kd=t(63219);const jd="AG_GRID_PARAMS",Cd="Energy generation category (kwh)";function Sd(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Nd(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Sd(Object(t),!0).forEach(function(n){wd(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Sd(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function wd(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Dd(){let{autoFit:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n,t]=(0,g.useState)();!function(e){const[n]=(0,kd.useQueryParam)("selectedRows",kd.ArrayParam),t=(null==n?void 0:n.length)||0;(0,g.useEffect)(()=>{t&&e&&e.forEachNodeAfterFilter(e=>{e.id&&null!=n&&n.includes(e.id)&&e.setSelected(!0)})},[n,t,e])}(null==n?void 0:n.gridApi);const a=rt(),{token:{sub:r}}=at(),i=()=>{const e=window.location.pathname;return"".concat(r,"-").concat(a,"-").concat(e)},o=(0,g.useCallback)(e=>{let{api:n}=e;const t=i(),a=localStorage.getItem(jd);let r=null;a&&(r=JSON.parse(a));const o=r?r[t]:null;null!=o&&o.columnState&&n.applyColumnState({state:o.columnState}),null!=o&&o.filterModel&&n.setFilterModel(null==o?void 0:o.filterModel)},[]),l=(0,g.useCallback)(n=>{t(e=>Nd(Nd({},e),{},{gridApi:n.api})),e&&n.api.sizeColumnsToFit()},[e]),s=e=>{const n=i(),t=localStorage.getItem(jd);let a=null;t&&(a=JSON.parse(t));const r=a&&n?Nd(Nd({},a),{},{[n]:Nd(Nd({},a[n]),e)}):{[n]:e};localStorage.setItem(jd,JSON.stringify(r))},c=(0,zt.debounce)(e=>{s({columnState:e})},100),d=(0,g.useCallback)(e=>{const n=e.api.getFilterModel();s({filterModel:n})},[]),u=(0,g.useCallback)(()=>{t(null)},[]),p=(0,g.useCallback)(()=>{var e;if(null==n||!n.gridApi)return;const t=null==n||null===(e=n.gridApi)||void 0===e?void 0:e.getColumnState();c(t)},[null==n?void 0:n.gridApi]),m=(0,g.useCallback)(p,[]);return(0,g.useMemo)(()=>({onFirstDataRendered:o,onGridReady:l,onFilterChanged:d,onSortChanged:m,onSaveGridColumnState:p,onDestroy:u,api:null==n?void 0:n.gridApi}),[o,l,d,m,p,u,n])}function Ad(e){let{type:n}=e;return Ed({query:Yc,request:{type:n,accountId:rt()},response:"getEnergySourceByAccountIdAndType"})}var Rd=t(38649),Pd=t.n(Rd);function Ld(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Id(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ed(e){let{query:n,response:t,request:a}=e;const[r]=(0,gs._)(n,{fetchPolicy:"network-only"}),i=Di(r,e=>{let{limit:n,offset:t}=e;return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ld(Object(t),!0).forEach(function(n){Id(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ld(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({limit:n,offset:t},a)},e=>e[t].rows,1e3);return()=>$r(i())}const _d={Contractor:"contractorType",Carrier:"carrierType",Haulier:"haulierType",Supplier:"supplierType",Broker:"brokerType"},Fd=function(){let{utility:e,type:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=rt(),a={text:[]};var r,i;return n&&(null===(r=a.text)||void 0===r||r.push({field:_d[n],type:Vt.II.Equals,filterType:Vt.pe.Text,filter:n})),e&&(null===(i=a.text)||void 0===i||i.push({field:"utility",type:Vt.II.Equals,filterType:Vt.pe.Text,filter:e})),Ed({query:Pd(),request:{accountId:t,filters:a},response:"getSuppliersPage"})};var Bd=t(53280),Ud=t.n(Bd);function Md(){const e=rt(),[n]=(0,gs._)(Ud());return(0,g.useCallback)(async()=>{var t;const{data:a}=await n({variables:{accountId:e}});return null!==(t=null==a?void 0:a.getMarketCarbonConversionFactors)&&void 0!==t?t:[]},[n,e])}var Vd=t(87228),zd=t.n(Vd);function Gd(){const[e]=(0,gs._)(zd());return(0,g.useCallback)(async()=>{var n;const{data:t}=await e();return null!==(n=null==t?void 0:t.getAllCurrencyTypes)&&void 0!==n?n:[]},[e])}var $d=t(47055),Wd=t.n($d),qd=t(23402),Jd=t.n(qd),Yd=t(81526),Hd=t.n(Yd),Kd=t(76486),Qd=t.n(Kd),Zd=t(80691),Xd=t.n(Zd),eu=t(91053),nu=t.n(eu);const tu=()=>{const[e]=(0,gs._)(nu());return(0,g.useCallback)(async()=>{var n;const{data:t}=await e();return null!==(n=null==t?void 0:t.getAllUnits)&&void 0!==n?n:[]},[e])};var au=t(37308),ru=t.n(au),iu=t(77154),ou=t.n(iu),lu=t(92953),su=t.n(lu);function cu(){return Ed({query:su(),request:{accountId:rt()},response:"getLocationsPage"})}var du=t(25278),uu=t.n(du),pu=t(20407),mu=t.n(pu);var fu=t(66259),yu=t.n(fu);var gu=t(57310),bu=t.n(gu),hu=t(65522),vu=t.n(hu);function xu(e){let{type:n,skip:t}=e;const{showNotification:a}=vt(),r=function(e){const n=Ad({type:e}),t=Fd(),a=Md(),r=Gd();return(0,g.useCallback)(async()=>{const[e,i,o,l]=await Promise.all([n(),t(),a(),r()]);return{"meter name":e,supplier:i,tariff:o,currency:l,"purchase type":No()}},[n,t,a,r])}(n),i=function(){const e=Ad({type:Vt.D_.Water}),n=Fd(),t=Md(),a=Gd();return(0,g.useCallback)(async()=>{const[r,i,o,l]=await Promise.all([e(),n(),t(),a()]);return{"meter name":r,supplier:i,tariff:o,currency:l,"purchase type":No()}},[e,n,t,a])}(),o=function(){const e=(()=>{const e=rt(),[n]=(0,gs._)(Wd());return(0,g.useCallback)(async()=>{var t;const{data:a}=await n({variables:{id:e}});return null!==(t=null==a?void 0:a.getWasteInsByAccountId)&&void 0!==t?t:[]},[n,e])})(),n=(()=>{const e=rt(),[n]=(0,gs._)(Jd());return(0,g.useCallback)(async()=>{var t;const{data:a}=await n({variables:{id:e}});return null!==(t=null==a?void 0:a.getWasteOutsByAccountId)&&void 0!==t?t:[]},[n,e])})(),t=(()=>{const e=rt(),[n]=(0,gs._)(Hd());return(0,g.useCallback)(async()=>{var t;const{data:a}=await n({variables:{accountId:e,page:1,pageSize:Qa,filterValue:""}});return null!==(t=null==a?void 0:a.getWasteStreamsByAccountId.wasteStreams)&&void 0!==t?t:[]},[n,e])})(),a=(()=>{const[e]=(0,gs._)(Qd());return(0,g.useCallback)(async()=>{var n,t;const{data:a}=await e();return null!==(n=null==a||null===(t=a.getAllWasteTreatmentProcesses)||void 0===t?void 0:t.map(e=>({value:e.id,label:e.name})))&&void 0!==n?n:[]},[e])})(),r=Fd({type:"Contractor",utility:Vt.D_.Waste}),i=Fd({type:"Carrier",utility:Vt.D_.Waste}),o=(()=>{const[e]=(0,gs._)(Xd());return(0,g.useCallback)(async()=>{var n;const{data:t}=await e();return null!==(n=null==t?void 0:t.getContainerTypeSizePage.typeSizes)&&void 0!==n?n:[]},[e])})(),l=Gd(),s=tu();return(0,g.useCallback)(async()=>{const[c,d,u,p,m,f,y,g,b]=await Promise.all([e(),n(),t(),a(),r(),i(),o(),l(),s()]);return{"waste in location":c,"waste out location":d,"purchase type":No(),"waste stream":u,"treatment process":p,"waste contractor":m,"waste carrier":f,"container type":y,currency:g,"unit of weight":b}},[e,n,t,a,r,i,o,l,s])}(),l=function(){const e=cu(),n=Fd(),t=Gd(),a=(()=>{const[e]=(0,gs._)(ru(),{variables:{accountId:rt()}});return(0,g.useCallback)(async()=>{var n;const{data:t}=await e();return null!==(n=null==t?void 0:t.getMaterialsByAccountID)&&void 0!==n?n:[]},[e])})(),r=(()=>{const[e]=(0,gs._)(ou());return(0,g.useCallback)(async()=>{var n;const{data:t}=await e();return null!==(n=null==t?void 0:t.getAllMaterialOriginTypes)&&void 0!==n?n:[]},[e])})(),i=tu();return(0,g.useCallback)(async()=>{const[o,l,s,c,d,u]=await Promise.all([e(),n(),t(),a(),r(),i()]);return{location:o,supplier:l,subcontractor:l,currency:s,material:c,origin:d,"quantity (weight) units":u,"purchase type":No()}},[e,n,t,a,r,i])}(),s=function(){const e=(()=>{const[e]=(0,gs._)(uu());return(0,g.useCallback)(async()=>{var n;const{data:t}=await e();return null!==(n=null==t?void 0:t.getRefrigerantGasTypes)&&void 0!==n?n:[]},[e])})(),n=(()=>{const[e]=(0,gs._)(mu());return(0,g.useCallback)(async()=>{var n;const{data:t}=await e();return null!==(n=null==t?void 0:t.getRefrigerantGasGroups)&&void 0!==n?n:[]},[e])})(),t=cu(),a=Gd(),r=tu();return(0,g.useCallback)(async()=>{const[i,o,l,s,c]=await Promise.all([e(),n(),t(),r(),a()]);return{"gas type":i,"gas group":o,location:l,unit:s,currency:c,"purchase type":No()}},[a,t,r,e,n])}(),c=function(){const e=cu(),n=function(){const[e]=(0,gs._)(yu());return(0,g.useCallback)(async()=>{var n;const{data:t}=await e();return null!==(n=null==t?void 0:t.getAllFuelTypes)&&void 0!==n?n:[]},[e])}(),t=Fd(),a=Gd(),r=tu();return(0,g.useCallback)(async()=>{const[i,o,l,s,c]=await Promise.all([e(),n(),t(),a(),r()]);return{location:i,"fuel type":o,supplier:l,"quantity units":c,currency:s,"purchase type":No()}},[e,n,t,a,r])}(),d=function(){const e=cu(),n=Fd(),t=Gd(),a=tu(),r=(()=>{const[e]=(0,gs._)(bu());return(0,g.useCallback)(async()=>{const{data:n}=await e(),t=[],a=[];for(const e of null!==(r=null==n?void 0:n.getAllTransportTypes)&&void 0!==r?r:[]){var r;t.push({label:e.name,value:e.id});for(const n of null!==(i=e.subtypes)&&void 0!==i?i:[]){var i;n&&a.push({label:n.name,value:n.id})}}return{types:t,subtypes:a}},[e])})(),i=(()=>{const[e]=(0,gs._)(bu());return(0,g.useCallback)(async()=>{var n,t;const{data:a}=await e();return null!==(n=null==a||null===(t=a.getAllTransportFuelTypes)||void 0===t?void 0:t.map(e=>({label:e.name,value:e.id})))&&void 0!==n?n:[]},[e])})(),o=(()=>{const[e]=(0,gs._)(vu());return(0,g.useCallback)(async()=>{var n,t;const{data:a}=await e();return null!==(n=null==a||null===(t=a.getAllJourneyTargets)||void 0===t?void 0:t.map(e=>({label:e.name,value:e.id})))&&void 0!==n?n:[]},[e])})();return(0,g.useCallback)(async()=>{const[l,s,c,d,{types:u,subtypes:p},m,f]=await Promise.all([e(),n(),t(),a(),r(),i(),o()]);return{location:l,supplier:s,"unit of volume":d,"unit of distance":d,currency:c,"purchase type":No(),type:u,subtype:p,"fuel type":m,"journey target":f}},[e,n,t,a,r,i,o])}(),[u,p]=(0,g.useState)({}),[m,f]=(0,g.useState)(!0),[y,b]=(0,g.useState)(null);return(0,g.useEffect)(()=>{if(t)return f(!1);let e;if([Vt.D_.Electricity,Vt.D_.Heatsteam,Vt.D_.Gas].includes(n))e=r();else if(n===Vt.D_.Water)e=i();else if(n===Vt.D_.Waste)e=o();else if(n===Vt.D_.Materials)e=l();else if(n===Vt.D_.Refrigerant)e=s();else if(n===Vt.D_.Fuel)e=c();else{if(n!==Vt.D_.Transport){const e=new Error("Unsupported transaction type: ".concat(n));return b(e),a(e.message,"danger"),f(!1)}e=d()}e.then(e=>{const n=Gt().mapValues(e,e=>function(e){const n={};return e.forEach(e=>{n[e.value]=e,n[e.label]=e}),{list:e,index:n}}(e));p(n)}).catch(e=>b(e)).finally(()=>f(!1))},[]),(0,g.useMemo)(()=>({options:u,loading:m,error:y}),[u,m,y])}var Tu;const Ou=(0,D.J1)(Tu||(Tu=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAllCountries {\n    getAllCountries {\n      id\n      numericCode\n      name\n      alpha2Code\n    }\n  }\n"])));function ku(){const{data:e}=(0,h.IT)(Ou);let n=[],t=null;const a=null==e?void 0:e.getAllCountries;if(a){const e=(0,zt.sortBy)(a,"name"),r=(0,zt.find)(e,e=>e.name.includes("United Kingdom"));n=e.map(e=>({value:e.id,label:e.name})),t={value:r.id,label:r.name}}return{countryList:n,defaultCountry:t,allCountries:a}}const ju=(e,n)=>{if(!e||!n)return null;const t=[];return e.forEach(e=>{n.includes(e.id)&&t.push({value:e.id,label:e.name})}),t};function Cu(e,n){const[t,a]=(0,g.useState)(!1),r=rc().account.find(e=>e.startsWith("createDepartment")),i=e?e.map(e=>({id:e.id,value:e.id,label:e.name})):[];n&&!Array.isArray(n)&&(0,zt.find)(e,{id:n})&&i.unshift({value:"notSelected",label:"Not selected"}),r&&i.unshift({value:"NEW",label:"Create New ..."});const o=Array.isArray(n)?n.map(e=>({label:e.name||e.label,value:e.id||e.value}))||[]:n,l=(e,n,t)=>{var a;(Array.isArray(e.target.select)?e.target.select.find(e=>{let{value:n}=e;return"NEW"===n}):"NEW"===(null===(a=e.target.select)||void 0===a?void 0:a.value))?n(e):t(e)};return{departmentSelect:e=>(0,Ze.jsx)(ze.l6,{options:i,value:o?(0,zt.find)(i,{value:o}):null,onChange:n=>{l(n,()=>a(!0),n=>e({target:{name:"department",value:n.target.value}}))},placeholder:(0,Ze.jsx)(Je.A,{id:"components.selectPlaceholder"})}),departmentMultipleSelect:(e,n)=>(0,Ze.jsx)(ze.KF,{options:i,value:o,onChange:n=>{l(n,()=>a(!0),()=>e(n))},error:n}),showCreateDepartment:t,setShowCreateDepartment:a}}var Su=t(2646),Nu=t.n(Su);const wu=["data"];function Du(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Au(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ru(){const e=(0,h.IT)(Nu()),{data:{getAllCurrencyTypes:n=[]}={}}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,wu);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Du(Object(t),!0).forEach(function(n){Au(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Du(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({data:(0,zt.orderBy)(n,["name"],["asc"])},t)}function Pu(){const{data:e}=(0,h.IT)(hd,{variables:{id:rt()}});return(null==e?void 0:e.getAccountInfo)||null}var Lu=t(60680),Iu=t.n(Lu);function Eu(){const e=rt(),{data:n}=(0,h.IT)(Iu(),{variables:{accountId:e,offset:0,limit:1e3}}),t=null==n?void 0:n.getLocationsPage.rows;return(0,g.useMemo)(()=>(0,zt.orderBy)(null!=t?t:[],"name","asc"),[t])}function _u(){const e=ms(),{data:n}=(0,h.IT)(P,{variables:{name:e}});return null==n?void 0:n.getUserInfoById}function Fu(){const e=Pu(),{customFields:n}=(null==e?void 0:e.accessControls)||{};return(0,g.useMemo)(()=>new Ma.CustomField.Accessor(n||[]),[n])}var Bu,Uu,Mu,Vu,zu=t(28892),Gu=t.n(zu);function $u(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Wu=(0,D.J1)(Bu||(Bu=$u(["\n  query GetComplyData($accountId: ID!) {\n    getDocumentRecordsForReview(id: $accountId) {\n      id\n      reviewDate\n      fileName\n    }\n  }\n"]))),qu=(0,D.J1)(Uu||(Uu=$u(["\n  query GetLegislationAlerts($accountId: ID!) {\n    getLegislationAlerts(accountId: $accountId) {\n      expired {\n        id\n        title\n      }\n      approaching {\n        id\n        title\n      }\n      flagged {\n        id\n        title\n      }\n    }\n  }\n"]))),Ju=(0,D.J1)(Mu||(Mu=$u(["\n  query GetAspectsAlerts($accountId: ID!) {\n    getAspectsAlerts(accountId: $accountId) {\n      expired {\n        id\n        activity {\n          id\n          name\n        }\n        reviewDate\n      }\n      approaching {\n        id\n        activity {\n          id\n          name\n        }\n        reviewDate\n      }\n    }\n  }\n"]))),Yu=(0,D.J1)(Vu||(Vu=$u(["\n  query GetAnalyseData($accId: ID!, $wasteBatchPage: Int!) {\n    getDataImportBatchesByAccountId(accountId: $accId, page: $wasteBatchPage, type: WASTE, pageSize: 25) {\n      page\n      pageSize\n      pageCount\n      isLastPage\n      isFirstPage\n      batches {\n        id\n        status\n        rowsUploaded\n        fileName\n        timeStamp\n      }\n    }\n    getTargetsByAccountId(accountId: $accId) {\n      ...TargetFields\n    }\n  }\n  ","\n"])),Gu());var Hu,Ku,Qu,Zu,Xu;function ep(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const np=(0,D.J1)(Hu||(Hu=ep(["\n  fragment FlowDetails on Flow {\n    id\n    progress {\n      id\n      remainingEstimate\n    }\n    title\n    description\n    thumbnailUrl\n    totalEstimate\n    tags\n  }\n"]))),tp=(0,D.J1)(Ku||(Ku=ep(["\n  fragment AccountDetails on Account {\n    id\n    name\n    logoPath\n    children {\n      id\n      name\n      logoPath\n    }\n  }\n"]))),ap=(0,D.J1)(Qu||(Qu=ep(["\n  query GetFlowSubscriptions {\n    getFlowSubscriptions {\n      flow {\n        ...FlowDetails\n      }\n      account {\n        ...AccountDetails\n      }\n    }\n  }\n  ","\n  ","\n"])),np,tp),rp=(0,D.J1)(Zu||(Zu=ep(["\n  mutation CreateFlowSubscription($accountId: ID!, $flowId: ID!) {\n    createFlowSubscription(accountId: $accountId, flowId: $flowId) {\n      flow {\n        ...FlowDetails\n      }\n      account {\n        ...AccountDetails\n      }\n    }\n  }\n  ","\n  ","\n"])),np,tp),ip=(0,D.J1)(Xu||(Xu=ep(["\n  mutation DeleteFlowSubscription($accountId: ID!, $flowId: ID!) {\n    deleteFlowSubscription(accountId: $accountId, flowId: $flowId) {\n      flow {\n        ...FlowDetails\n      }\n      account {\n        ...AccountDetails\n      }\n    }\n  }\n  ",",\n  ","\n"])),np,tp);function op(){return(0,h.IT)(ap)}var lp,sp,cp,dp,up,pp,mp,fp,yp,gp,bp,hp,vp,xp,Tp,Op;function kp(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const jp=(0,D.J1)(lp||(lp=kp(["\n  query GetAliasByIdAndType($aliasId: ID!, $accountId: ID!, $aliasType: AliasType!, $energyType: TransactionType) {\n    getAliasByIdAndType(aliasId: $aliasId, accountId: $accountId, aliasType: $aliasType, energyType: $energyType) {\n      id\n      name\n      parentId\n      aliasType\n      parentItem {\n        id\n        name\n      }\n    }\n  }\n"]))),Cp=(0,D.J1)(sp||(sp=kp(["\n  mutation DeleteAliasByIdAndType($aliasId: ID!, $accountId: ID!, $aliasType: AliasType!) {\n    deleteAliasByIdAndType(aliasId: $aliasId, accountId: $accountId, aliasType: $aliasType)\n  }\n"]))),Sp=(0,D.J1)(cp||(cp=kp(["\n  query GetTreatmentProcesses {\n    getAllWasteTreatmentProcesses {\n      id\n      name\n    }\n  }\n"]))),Np=(0,D.J1)(dp||(dp=kp(["\n  query GetContainerTypesByAccountId($filterValue: String) {\n    getContainerTypeSizePage(page: 1, pageSize: 50, filterValue: $filterValue) {\n      typeSizes {\n        id\n        name\n      }\n    }\n  }\n"]))),wp=(0,D.J1)(up||(up=kp(["\n  mutation updateAlias($id: ID!, $name: String!, $parentId: ID!, $accountId: ID!, $aliasType: AliasType!) {\n    updateAlias(input: { id: $id, name: $name, parentId: $parentId, accountId: $accountId, aliasType: $aliasType }) {\n      id\n      name\n      parentId\n      aliasType\n      parentItem {\n        id\n        name\n        typeId\n      }\n    }\n  }\n"]))),Dp=(0,D.J1)(pp||(pp=kp(["\n  query GetLocationsByAccountId(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getLocationsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n      }\n    }\n  }\n"]))),Ap=(0,D.J1)(mp||(mp=kp(["\n  query GetAllFuelTypes {\n    getAllFuelTypes {\n      id\n      name\n    }\n  }\n"]))),Rp=(0,D.J1)(fp||(fp=kp(["\n  query GetAllTransportFuelTypes {\n    getAllTransportFuelTypes {\n      id\n      name\n    }\n  }\n"]))),Pp=(0,D.J1)(yp||(yp=kp(["\n  query GetAllTransportFuelTypes {\n    getAllTransportSubTypes {\n      id\n      name\n    }\n  }\n"]))),Lp=(0,D.J1)(gp||(gp=kp(["\n  query GetAllJourneyTargets {\n    getAllJourneyTargets {\n      id\n      name\n    }\n  }\n"]))),Ip=(0,D.J1)(bp||(bp=kp(["\n  query GetAllTransportTypes {\n    getAllTransportTypes {\n      id\n      name\n    }\n  }\n"]))),Ep=(0,D.J1)(hp||(hp=kp(["\n  query GetAllUnits {\n    getAllUnits {\n      id\n      name\n    }\n  }\n"]))),_p=(0,D.J1)(vp||(vp=kp(["\n  query GetAllAccuracyTypes {\n    getAllAccuracyTypes {\n      id\n      name\n    }\n  }\n"]))),Fp=(0,D.J1)(xp||(xp=kp(["\n  query GetAllCurrencyTypes {\n    getAllCurrencyTypes {\n      id\n      name\n    }\n  }\n"]))),Bp=((0,D.J1)(Tp||(Tp=kp(["\n  query GetAllMaterialOriginTypes {\n    getAllMaterialOriginTypes {\n      id\n      name\n    }\n  }\n"]))),(0,D.J1)(Op||(Op=kp(["\n  query GetAliasesPage(\n    $accountId: ID!\n    $aliasType: AliasType!\n    $energyType: TransactionType\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getAliasesPage(\n      accountId: $accountId\n      aliasType: $aliasType\n      energyType: $energyType\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        name\n        parentId\n        parentItem {\n          id\n          name\n          typeId\n        }\n        aliasType\n        energyType\n      }\n    }\n  }\n"]))));var Up,Mp;function Vp(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const zp=(0,D.J1)(Up||(Up=Vp(["\n  fragment AnomalyThresholdFields on AnomalyThreshold {\n    id\n    account {\n      id\n      name\n    }\n    thresholdPercentage\n    utilityType {\n      transactionType\n      isDefault\n    }\n    monthlyVarianceDetectionEnabled\n    annuallyVarianceDetectionEnabled\n  }\n"]))),Gp=(0,D.J1)(Mp||(Mp=Vp(["\n  query GetAnomalyThresholds(\n    $accountId: ID\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getAnomalyThresholds(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        ...AnomalyThresholdFields\n      }\n    }\n  }\n  ","\n"])),zp),$p=["data"];function Wp(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function qp(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Wp(Object(t),!0).forEach(function(n){Jp(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Wp(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Jp(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Yp(){const e=ms(),n=(0,h.IT)(P,{variables:{name:e}}),{data:{getUserInfoById:t}={}}=n,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,$p);let r;var i,o,l;return t&&(r=(0,zt.cloneDeep)(t),r.account=qp(qp({},r.account),{},{isEngage:(null===(i=r)||void 0===i||null===(i=i.account)||void 0===i?void 0:i.type)===Vt.CO.Engage,isTeam:(null===(o=r)||void 0===o||null===(o=o.account)||void 0===o?void 0:o.type)===Vt.CO.Team,isEnterprise:(null===(l=r)||void 0===l||null===(l=l.account)||void 0===l?void 0:l.type)===Vt.CO.Enterprise})),qp({data:r},a)}var Hp;const Kp=(0,D.J1)(Hp||(Hp=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetFlows {\n    getFlows {\n      ...FlowDetails\n    }\n  }\n  ",",\n"])),np);function Qp(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Zp(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qp(Object(t),!0).forEach(function(n){Xp(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qp(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Xp(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var em;t(95041);const nm=(0,D.J1)(em||(em=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  fragment LocationFields on Location {\n    id\n    name\n    address {\n      id\n      address1\n      address2\n      address3\n      city\n      phone1\n      postcode\n      country {\n        alpha2Code\n        name\n        id\n      }\n    }\n    wasteIn {\n      id\n      name\n    }\n    wasteOut {\n      id\n      name\n    }\n    tags {\n      id\n      tagName\n    }\n    tenure {\n      id\n      name\n    }\n    buildingType {\n      id\n      name\n    }\n    region {\n      id\n      name\n    }\n    departments {\n      id\n      name\n    }\n    code\n    floorSpace\n    sharedEmissionPercentage\n    startDate\n    endDate\n    leaseRenewalDate\n    notes\n    description\n    attributes\n    picture\n    enableProject\n    displayOnImpactDashboard\n  }\n"])));var tm,am,rm,im,om;function lm(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const sm=(0,D.J1)(tm||(tm=lm(["\n  fragment WasteTransactionsPageItemFields on WasteTransactionPageItem {\n    id\n    accountId\n    wasteOut\n    locationCode\n    locationEndDate\n    locationSharedEmissionPercentage\n    locationCustomAttributes\n    location {\n      ...LocationFields\n    }\n    wasteStream\n    isHazardous\n    ewc\n    importBatchFileName\n    importBatchId\n    currency\n    treatmentProcess\n    tags\n    wasteIn\n    individualCollectionDate\n    periodStartDate\n    periodEndDate\n    numberOfContainers\n    numberOfCollections\n    quantity\n    quantityUnitName\n    accuracy\n    gateFee\n    managementFee\n    binHire\n    binExchangeFee\n    transportCharge\n    liftCharge\n    equipmentHire\n    miscCost\n    miscCostRate\n    rebate\n    penalty\n    notes\n    reference\n    consignmentNoteId\n    wasteTransferNote\n    wtnDocumentId\n    consignmentNoteEA\n    salesOrder\n    invoiceNumber\n    evidenceReference\n    otherReference\n    wasteContractor\n    containerTypeSize\n    labourCost\n    wasteCarrier\n    totalCost\n    totalCostVat\n    carbonEmission\n    departments\n    projectPhase\n    purchaseType\n    organisationalUnits\n    estimatesScenario\n  }\n  ","\n"])),nm),cm=(0,D.J1)(am||(am=lm(["\n  query GetWasteTransactionsPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n    $hiddenColumns: [String!]\n  ) {\n    getWasteTransactionsPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n      hiddenColumns: $hiddenColumns\n    ) {\n      totalRows\n      rows {\n        ...WasteTransactionsPageItemFields\n      }\n    }\n  }\n  ","\n"])),sm),dm=(0,D.J1)(rm||(rm=lm(["\n  query GetWasteTransactionsReportingPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n    $hiddenColumns: [String!]\n  ) {\n    getWasteTransactionsReportingPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n      hiddenColumns: $hiddenColumns\n    ) {\n      totalRows\n      datasetName\n      rows {\n        ...WasteTransactionsPageItemFields\n      }\n    }\n  }\n  ","\n"])),sm),um=(0,D.J1)(im||(im=lm(["\n  query GetWasteTransactionsPageFilter($accountId: ID!, $field: String!) {\n    getWasteTransactionsPageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"]))),pm=(0,D.J1)(om||(om=lm(["\n  query GetWasteTransactionsReportingPageFilter($accountId: ID!, $field: String!) {\n    getWasteTransactionsReportingPageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));var mm=t(79294),fm=t.n(mm);function ym(){var e;const n=(0,h.IT)(fm(),{notifyOnNetworkStatusChange:!0});return{data:null==n||null===(e=n.data)||void 0===e?void 0:e.getAllTransportFuelTypes,refetch:e=>n.refetch(e)}}function gm(){const{data:e}=(0,h.IT)(vu());return null==e?void 0:e.getAllJourneyTargets}function bm(){const{data:e}=(0,h.IT)(bu());return null==e?void 0:e.getAllTransportTypes}function hm(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vm(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hm(Object(t),!0).forEach(function(n){xm(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hm(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xm(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Tm(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Om(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tm(Object(t),!0).forEach(function(n){km(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tm(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function km(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t(73543);const jm=(e,n,t,a)=>{const r=Wt()(n).clone().add(a,e),i=Wt()(n).clone().add(a+1,e).subtract(1,"days");return{startDate:r.toDate(),endDate:i.isAfter(t)?t:i.toDate()}};function Cm(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Sm(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Cm(Object(t),!0).forEach(function(n){Nm(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Cm(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Nm(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const wm={[$a.Daily]:"days",[$a.Weekly]:"weeks",[$a.Monthly]:"months",[$a.Quarterly]:"quarters",[$a.Annually]:"years"},Dm=(e,n,t,a)=>{const r=Wt()(n).clone().add(a,e),i=Wt()(n).clone().add(a+1,e).subtract(1,"days");return{startDate:r.toDate(),endDate:i.isAfter(t)?t:i.toDate()}},Am=(e,n)=>{const t=ja(e);return Number.isNaN(t)?e:(0,zt.round)(t/n,2)},Rm=JSON.parse('[{"defaultName":"Individual Collection Date","id":"individualCollectionDate","field":null,"displayName":"Individual Collection Date","display":true,"width":200,"dataType":"date","__typename":"WasteColumn","filterable":false},{"defaultName":"Waste Out Location","id":"wasteOut","field":"wasteOut","displayName":"Waste-Out Location","display":true,"width":300,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Waste In Location","id":"wasteIn","field":"wasteIn","displayName":"Waste-In Location","display":true,"width":300,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Waste Stream","id":"wasteStream","field":"wasteStream","displayName":"Waste Stream","display":true,"width":300,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Waste Contractor","id":"wasteContractor","field":"wasteContractor","displayName":"Waste Contractor","display":true,"width":300,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Waste Carrier","id":"wasteCarrier","field":null,"displayName":"Waste Carrier","display":true,"width":300,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Treatment Process","id":"treatmentProcess","field":"treatmentProcess","displayName":"Treatment Process","display":true,"width":200,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Number Of Collections","id":"numberOfCollections","field":null,"displayName":"Number Of Collections","display":true,"width":150,"dataType":"number","__typename":"WasteColumn","filterable":true},{"defaultName":"Number Of Containers","id":"numberOfContainers","field":null,"displayName":"Number Of Containers","display":true,"width":150,"dataType":"number","__typename":"WasteColumn","filterable":true},{"defaultName":"Container Type","id":"containerTypeSize","field":"containerTypeSize","displayName":"Container Type Size","display":true,"width":300,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Quantity","id":"quantity","field":null,"displayName":"Quantity","display":true,"width":150,"dataType":"number","__typename":"WasteColumn","filterable":true},{"defaultName":"Unit Of Weight","id":"unitOfWeight","field":null,"displayName":"Unit Of Weight","display":true,"width":150,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Act/Est","id":"accuracy","field":null,"displayName":"Act/Est","display":true,"width":150,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Gate Fee","id":"gateFee","field":null,"displayName":"Gate Fee","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":"Management Fee","id":"managementFee","field":null,"displayName":"Management Fee","display":true,"dataType":"currency","width":150,"__typename":"WasteColumn","filterable":true},{"defaultName":"Bin Hire","id":"binHire","field":null,"displayName":"Bin Hire","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":"Bin Exchange","id":"binExchangeFee","field":null,"displayName":"Bin Exchange Fee","display":true,"dataType":"currency","width":150,"__typename":"WasteColumn","filterable":true},{"defaultName":"Transport Charge","id":"transportCharge","field":null,"displayName":"Transport Charge","display":true,"dataType":"currency","width":150,"__typename":"WasteColumn","filterable":true},{"defaultName":"Lift Charge","id":"liftCharge","field":null,"displayName":"Lift Charge","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":"Equipment Hire","id":"equipmentHire","field":null,"displayName":"Equipment Hire","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":"Labour Cost","id":"labourCost","field":null,"displayName":"Labour Cost","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":"Misc Cost","id":"miscCost","field":null,"displayName":"Misc Cost","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":"Misc Cost Rate","id":"miscCostRate","field":null,"displayName":"Misc Cost Rate","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":"Rebate","id":"rebate","field":null,"displayName":"Rebate","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":"Penalty","id":"penalty","field":null,"displayName":"Penalty","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":null,"id":"totalCost","field":null,"displayName":"Total Cost","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":null,"id":"totalCostVat","field":null,"displayName":"Total Cost (VAT)","display":true,"width":150,"dataType":"currency","__typename":"WasteColumn","filterable":true},{"defaultName":"Currency","id":"currency","field":null,"displayName":"Currency Code","display":true,"width":150,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Notes","id":"notes","field":null,"displayName":"Notes","display":true,"width":600,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Reference","id":"reference","field":null,"displayName":"Reference","display":true,"width":200,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Waste Transfer Note ID","id":"wasteTransferNote","field":null,"displayName":"Waste Transfer Note ID","display":true,"width":200,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Consignment Note (SEPA) ID","id":"consignmentNoteId","field":null,"displayName":"Consignment Note (SEPA) ID","display":true,"width":220,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Consignment Note (EA) ID","id":"consignmentNoteEA","field":null,"displayName":"Consignment Note (EA) ID","display":true,"width":200,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Sales Order ID","id":"salesOrder","field":null,"displayName":"Sales Order ID","display":true,"width":150,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Invoice Number","id":"invoiceNumber","field":null,"displayName":"Invoice Number","display":true,"width":150,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Evidence Reference","id":"evidenceReference","field":null,"displayName":"Evidence Reference","display":true,"width":150,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":"Other Reference","id":"otherReference","field":null,"displayName":"Other Reference","display":true,"width":150,"dataType":"string","__typename":"WasteColumn","filterable":true},{"defaultName":null,"id":"documentCount","field":null,"displayName":"Documents","display":true,"width":150,"dataType":"documentLink","__typename":"WasteColumn","filterable":false},{"defaultName":null,"id":"carbonScope3","field":null,"displayName":"Carbon Emission Scope 3 (kgCO2e)","display":true,"width":350,"dataType":"number","__typename":"WasteColumn","filterable":true},{"defaultName":null,"id":"importBatch","field":"importBatch.fileName","displayName":"Upload Reference","display":true,"width":350,"dataType":"uploadReference","__typename":"WasteColumn","filterable":true}]'),Pm=JSON.parse('[{"defaultName":"Meter Name","id":"meterName","field":"energySource","displayName":"Meter Name","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Location","id":"locationName","field":"locationPoint.name","displayName":"Location","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Start Date (DD/MM/YYYY)","id":"startDate","field":null,"displayName":"Start Date","display":true,"width":200,"dataType":"date","__typename":"EnergyColumn","filterable":false},{"defaultName":"Start Time (HH:mm)","id":"startTime","field":"startTime","displayName":"Start Time","display":true,"width":200,"dataType":"time","__typename":"EnergyColumn","filterable":false},{"defaultName":"End Date (DD/MM/YYYY)","id":"endDate","field":null,"displayName":"End Date","display":true,"width":150,"dataType":"date","__typename":"EnergyColumn","filterable":false},{"defaultName":"End Time (HH:mm)","id":"endTime","field":"endTime","displayName":"End Time","display":true,"width":200,"dataType":"time","__typename":"EnergyColumn","filterable":false},{"defaultName":"Quantity (kWh)","id":"quantity","field":null,"displayName":"Quantity (kWh)","display":true,"width":150,"dataType":"number","__typename":"EnergyColumn","filterable":true},{"defaultName":"Supplier","id":"supplier","field":null,"displayName":"Supplier","display":true,"width":150,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Charge/kWh","id":"charge/kwh","field":null,"displayName":"Charge/kWh","display":true,"width":150,"dataType":"number","__typename":"EnergyColumn","filterable":true},{"defaultName":"Act/Est","id":"accuracy","field":"accuracy","displayName":"Act/Est","display":true,"width":150,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Total Cost","id":"totalCost","field":null,"displayName":"Total Cost","display":true,"width":150,"dataType":"currency","__typename":"EnergyColumn","filterable":true},{"defaultName":"Total Cost (VAT)","id":"totalCostVat","field":null,"displayName":"Total Cost (VAT)","display":true,"width":150,"dataType":"currency","__typename":"EnergyColumn","filterable":true},{"defaultName":"Tariff","id":"tariff","field":"tariff","displayName":"Tariff","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Currency","id":"currency","field":null,"displayName":"Currency Code","display":true,"width":150,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":null,"id":"carbonScope2","field":null,"displayName":"Carbon Emission Scope 2 (kgCO2e)","display":true,"width":150,"dataType":"number","__typename":"EnergyColumn","filterable":true},{"defaultName":null,"id":"carbonScope3","field":null,"displayName":"Carbon Emission Scope 3 (kgCO2e)","display":true,"width":150,"dataType":"number","__typename":"EnergyColumn","filterable":true},{"defaultName":"Activity","id":"activity","field":null,"displayName":"Activity","display":true,"width":150,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Comment","id":"comment","field":null,"displayName":"Comment","display":true,"width":300,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Invoice Number","id":"invoiceNumber","field":null,"displayName":"Invoice Number","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":false},{"defaultName":"Evidence Reference","id":"evidenceReference","field":null,"displayName":"Evidence Reference","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":false},{"defaultName":"Other Reference","id":"otherReference","field":null,"displayName":"Other Reference","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":false},{"defaultName":null,"id":"importBatch","field":"importBatch.fileName","displayName":"Upload Reference","display":true,"width":350,"dataType":"uploadReference","__typename":"EnergyColumn","filterable":true}]'),Lm=JSON.parse('[{"defaultName":"Meter Name","id":"meterName","field":"energySource","displayName":"Meter Name","display":true,"width":200,"dataType":"string","__typename":"GasColumn","filterable":true},{"defaultName":"Location","id":"locationName","field":"locationPoint.name","displayName":"Location","display":true,"width":200,"dataType":"string","__typename":"GasColumn","filterable":true},{"defaultName":"Start Date (DD/MM/YYYY)","id":"startDate","field":null,"displayName":"Start Date","display":true,"width":200,"dataType":"date","__typename":"GasColumn","filterable":false},{"defaultName":"End Date (DD/MM/YYYY)","id":"endDate","field":null,"displayName":"End Date","display":true,"width":150,"dataType":"date","__typename":"GasColumn","filterable":false},{"defaultName":"Quantity (kWh)","id":"quantity","field":null,"displayName":"Quantity (kWh)","display":true,"width":150,"dataType":"number","__typename":"GasColumn","filterable":true},{"defaultName":"Charge/kWh","id":"charge/kwh","field":null,"displayName":"Charge/kWh","display":true,"width":150,"dataType":"number","__typename":"GasColumn","filterable":true},{"defaultName":"Act/Est","id":"accuracy","field":"accuracy","displayName":"Act/Est","display":true,"width":150,"dataType":"string","__typename":"GasColumn","filterable":true},{"defaultName":"Total Cost","id":"totalCost","field":null,"displayName":"Total Cost","display":true,"width":150,"dataType":"currency","__typename":"GasColumn","filterable":true},{"defaultName":"Total Cost (VAT)","id":"totalCostVat","field":null,"displayName":"Total Cost (VAT)","display":true,"width":150,"dataType":"currency","__typename":"GasColumn","filterable":true},{"defaultName":"Currency","id":"currency","field":null,"displayName":"Currency Code","display":true,"width":150,"dataType":"string","__typename":"GasColumn","filterable":true},{"id":"supplier","field":"supplier","displayName":"Supplier","defaultName":"Supplier","display":true,"width":200,"__typename":"GasColumn","filterable":true},{"defaultName":null,"id":"carbonScope1","field":null,"displayName":"Carbon Emission Scope 1 (kgCO2e)","display":true,"width":150,"dataType":"number","__typename":"GasColumn","filterable":true},{"defaultName":null,"id":"carbonScope3","field":null,"displayName":"Carbon Emission Scope 3 (kgCO2e)","display":true,"width":150,"dataType":"number","__typename":"GasColumn","filterable":true},{"defaultName":"Activity","id":"activity","field":null,"displayName":"Activity","display":true,"width":150,"dataType":"string","__typename":"GasColumn","filterable":true},{"defaultName":"Comment","id":"comment","field":null,"displayName":"Comment","display":true,"width":300,"dataType":"string","__typename":"GasColumn","filterable":true},{"defaultName":"Invoice Number","id":"invoiceNumber","field":null,"displayName":"Invoice Number","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":false},{"defaultName":"Evidence Reference","id":"evidenceReference","field":null,"displayName":"Evidence Reference","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":false},{"defaultName":"Other Reference","id":"otherReference","field":null,"displayName":"Other Reference","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":false},{"defaultName":null,"id":"importBatch","field":"importBatch.fileName","displayName":"Upload Reference","display":true,"width":350,"dataType":"uploadReference","__typename":"EnergyColumn","filterable":true}]'),Im=JSON.parse('[{"defaultName":"Meter Name","id":"meterName","field":"energySource","displayName":"Meter Name","display":true,"width":200,"dataType":"string","__typename":"WaterColumn","filterable":true},{"defaultName":null,"id":"locationName","field":"locationPoint.name","displayName":"Location","display":true,"width":200,"dataType":"string","__typename":"WaterColumn","filterable":true},{"defaultName":null,"id":"locationCode","field":"locationPoint.location.code","displayName":"Location Code","display":true,"width":200,"dataType":"string","__typename":"WaterColumn","filterable":true},{"defaultName":"Start Date (DD/MM/YYYY)","id":"startDate","field":null,"displayName":"Start Date","display":true,"width":200,"dataType":"date","__typename":"WaterColumn","filterable":false},{"defaultName":"End Date (DD/MM/YYYY)","id":"endDate","field":null,"displayName":"End Date","display":true,"width":150,"dataType":"date","__typename":"WaterColumn","filterable":false},{"defaultName":null,"id":"waterIn","field":null,"displayName":"Water In (m³)","display":true,"width":150,"dataType":"number","__typename":"WaterColumn","filterable":true},{"defaultName":null,"id":"waterOut","field":null,"displayName":"Water Out (m³)","display":true,"width":150,"dataType":"number","__typename":"WaterColumn","filterable":true},{"defaultName":"Reading","id":"reading","field":null,"displayName":"Reading","display":true,"width":150,"dataType":"number","__typename":"WaterColumn","filterable":true},{"defaultName":"Supplier","id":"supplier","field":null,"displayName":"Supplier","display":true,"width":200,"dataType":"string","__typename":"WaterColumn","filterable":true},{"defaultName":"Quantity (m3)","id":"quantity","field":null,"displayName":"Quantity","display":true,"width":150,"dataType":"number","__typename":"WaterColumn","filterable":true},{"defaultName":"Act/Est","id":"accuracy","field":"accuracy","displayName":"Act/Est","display":true,"width":150,"dataType":"string","__typename":"WaterColumn","filterable":true},{"defaultName":"Tariff (£/m3)","id":"tariff","field":null,"displayName":"Tariff","display":true,"width":150,"dataType":"string","__typename":"WaterColumn","filterable":true},{"defaultName":"Total Cost","id":"totalCost","field":null,"displayName":"Total Cost","display":true,"width":150,"dataType":"string","__typename":"WaterColumn","filterable":true},{"defaultName":"Total Cost (VAT)","id":"totalCostVat","field":null,"displayName":"Total Cost (VAT)","display":true,"width":150,"dataType":"string","__typename":"WaterColumn","filterable":true},{"defaultName":"Currency","id":"currency","field":null,"displayName":"Currency Code","display":true,"width":150,"dataType":"string","__typename":"WaterColumn","filterable":true},{"defaultName":"Comment","id":"comment","field":null,"displayName":"Comment","display":true,"width":300,"dataType":"string","__typename":"WaterColumn","filterable":true},{"defaultName":"Invoice Number","id":"invoiceNumber","field":null,"displayName":"Invoice Number","display":true,"width":200,"dataType":"linkToDocument","__typename":"WaterColumn","filterable":false},{"defaultName":"Evidence Reference","id":"evidenceReference","field":null,"displayName":"Evidence Reference","display":true,"width":200,"dataType":"linkToDocument","__typename":"WaterColumn","filterable":false},{"defaultName":"Other Reference","id":"otherReference","field":null,"displayName":"Other Reference","display":true,"width":200,"dataType":"linkToDocument","__typename":"WaterColumn","filterable":false},{"defaultName":null,"id":"importBatch","field":"importBatch.fileName","displayName":"Upload Reference","display":true,"width":350,"dataType":"uploadReference","__typename":"WaterColumn","filterable":true}]'),Em=JSON.parse('[{"defaultName":"Date","id":"date","field":null,"displayName":"Date","display":true,"width":200,"dataType":"date","__typename":"TransportColumn","filterable":false},{"defaultName":"Location","id":"location","field":null,"displayName":"Location","display":true,"width":200,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Location Code","id":"locationCode","field":"locationCode","displayName":"Location Code","display":true,"width":200,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Type","id":"type","field":null,"displayName":"Type","display":true,"width":200,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Subtype","id":"subtype","field":null,"displayName":"Subtype","display":true,"width":200,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Fuel Type","id":"fuelType","field":null,"displayName":"Fuel Type","display":true,"width":200,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Origin of Travel","id":"origin","field":null,"displayName":"Origin of Travel","display":true,"width":300,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Destination of Travel","id":"destination","field":null,"displayName":"Destination of Travel","display":true,"width":300,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Volume","id":"volume","field":null,"displayName":"Volume","display":true,"width":150,"dataType":"number","__typename":"TransportColumn","filterable":true},{"defaultName":"Unit of Volume","id":"volumeUnit","field":"volumeUnit","displayName":"Volume Unit","display":true,"width":150,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Number of Journeys","id":"numberOfJourneys","field":null,"displayName":"Number of Journeys","display":true,"width":150,"dataType":"number","__typename":"TransportColumn","filterable":true},{"defaultName":"Journey Distance","id":"journeyDistance","field":null,"displayName":"Journey Distance","display":true,"width":150,"dataType":"number","__typename":"TransportColumn","filterable":true},{"defaultName":"Distance","id":"distance","field":"distance","displayName":"Distance","display":true,"width":150,"dataType":"number","__typename":"TransportColumn","filterable":true},{"defaultName":"Total Distance","id":"totalDistance","field":"distance","displayName":"Total Distance","display":true,"width":150,"dataType":"number","__typename":"TransportColumn","filterable":true},{"defaultName":"Unit of Distance","id":"distanceUnit","field":"distanceUnit","displayName":"Distance Unit","display":true,"width":150,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Freight (tonne.km)","id":"freight","field":null,"displayName":"Freight (tonne.km)","display":true,"width":150,"dataType":"number","__typename":"TransportColumn","filterable":true},{"defaultName":"Carrier","id":"carrier","field":null,"displayName":"Carrier","display":true,"width":150,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Data Provider","id":"dataProvider","field":null,"displayName":"Data Provider","display":true,"width":150,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Purpose of Journey","id":"purpose","field":null,"displayName":"Purpose of Journey","display":true,"width":300,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Cost of Journey","id":"cost","field":null,"displayName":"Cost","display":true,"width":150,"dataType":"currency","__typename":"TransportColumn","filterable":true},{"defaultName":"Cost (VAT)","id":"costVat","field":null,"displayName":"Cost (VAT)","display":true,"width":150,"dataType":"currency","__typename":"TransportColumn","filterable":true},{"defaultName":"Currency","id":"currency","field":null,"displayName":"Currency Code","display":true,"width":150,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":null,"id":"carbonEmissions","field":null,"displayName":"Carbon Emissions (kgCO2e)","display":true,"width":150,"dataType":"number","__typename":"TransportColumn","filterable":true},{"defaultName":"Activity","id":"activity","field":null,"displayName":"Activity","display":true,"width":150,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Document Reference","id":"documentReference","field":null,"displayName":"Document Reference","display":true,"width":150,"dataType":"linkToDocument","__typename":"TransportColumn","filterable":true},{"defaultName":"Notes","id":"notes","field":null,"displayName":"Notes","display":true,"width":150,"dataType":"string","__typename":"TransportColumn","filterable":true},{"defaultName":"Reference","id":"reference","field":null,"displayName":"Reference","display":true,"width":200,"dataType":"linkToDocument","__typename":"TransportColumn","filterable":true},{"defaultName":null,"id":"importBatch","field":"importBatch.fileName","displayName":"Upload Reference","display":true,"width":350,"dataType":"uploadReference","__typename":"WasteColumn","filterable":true}]'),_m=JSON.parse('[{"id":"startDate","field":"startDate","displayName":"Start date","defaultName":"Start date (dd/mm/yyyy)","display":true,"dataType":"date","width":200},{"id":"endDate","field":"endDate","displayName":"End date","defaultName":"End date (dd/mm/yyyy)","display":true,"dataType":"date","width":200},{"id":"location","field":"location","displayName":"Location","defaultName":"Location","display":true,"width":200},{"id":"hotelNights","field":"hotelNights","displayName":"Hotel nights","defaultName":"Hotel nights","display":true,"width":200},{"id":"homeWorkingDays","field":"homeWorkingDays","displayName":"Home working days","defaultName":"Home working days","display":true,"width":200},{"id":"country","field":"country","displayName":"Hotel stay / Home working country","defaultName":"Hotel stay / Home working country","display":true,"width":200},{"id":"dataProvider","field":"dataProvider","displayName":"Data provider","defaultName":"Data provider","display":true,"width":200},{"id":"electricityTariff","field":"electricityTariff","displayName":"Tariff","defaultName":"Tariff","display":true,"width":200},{"id":"totalCost","field":"totalCost","displayName":"Total cost","defaultName":"Total cost","display":true,"width":200},{"id":"currency","field":"currency","displayName":"Currency","defaultName":"Currency","display":true,"width":200},{"id":"notes","field":"notes","displayName":"Notes","defaultName":"Notes","display":true,"width":200},{"id":"reference","field":"reference","displayName":"Reference","defaultName":"Reference","display":true,"width":200},{"id":"invoiceNumber","field":"invoiceNumber","displayName":"Invoice number","defaultName":"Invoice number","display":true,"width":200},{"id":"evidenceReference","field":"evidenceReference","displayName":"Evidence reference","defaultName":"Evidence reference","display":true,"width":200},{"id":"otherReference","field":"otherReference","displayName":"Other reference","defaultName":"Other reference","display":true,"width":200}]'),Fm=JSON.parse('[{"defaultName":"Meter Name","id":"meterName","field":"energySource","displayName":"Meter Name","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Location","id":"locationName","field":"locationPoint.name","displayName":"Location","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Start Date (DD/MM/YYYY)","id":"startDate","field":"startDate","displayName":"Start Date","display":true,"width":200,"dataType":"date","__typename":"EnergyColumn","filterable":false},{"defaultName":"Start Time (HH:mm)","id":"startTime","field":"startTime","displayName":"Start Time","display":true,"width":200,"dataType":"time","__typename":"EnergyColumn","filterable":false},{"defaultName":"End Date (DD/MM/YYYY)","id":"endDate","field":"endDate","displayName":"End Date","display":true,"width":150,"dataType":"date","__typename":"EnergyColumn","filterable":false},{"defaultName":"End Time (HH:mm)","id":"endTime","field":"endTime","displayName":"End Time","display":true,"width":200,"dataType":"time","__typename":"EnergyColumn","filterable":false},{"defaultName":"Quantity (kWh)","id":"quantity","field":"quantity","displayName":"Quantity (kWh)","display":true,"width":150,"dataType":"number","__typename":"EnergyColumn","filterable":true},{"defaultName":"Supplier","id":"supplier","field":"supplier","displayName":"Supplier","display":true,"width":150,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Charge/kWh","id":"charge/kwh","field":"charge/kwh","displayName":"Charge/kWh","display":true,"width":150,"dataType":"number","__typename":"EnergyColumn","filterable":true},{"defaultName":"Act/Est","id":"accuracy","field":"accuracy","displayName":"Act/Est","display":true,"width":150,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Total Cost","id":"totalCost","field":"totalCost","displayName":"Total Cost","display":true,"width":150,"dataType":"currency","__typename":"EnergyColumn","filterable":true},{"defaultName":"Total Cost (VAT)","id":"totalCostVat","field":"totalCostVat","displayName":"Total Cost (VAT)","display":true,"width":150,"dataType":"currency","__typename":"EnergyColumn","filterable":true},{"defaultName":"Tariff","id":"tariff","field":"tariff","displayName":"Tariff","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Currency","id":"currency","field":"currency","displayName":"Currency Code","display":true,"width":150,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":null,"id":"carbonScope2","field":"carbonScope2","displayName":"Carbon Emission Scope 2 (kgCO2e)","display":true,"width":150,"dataType":"number","__typename":"EnergyColumn","filterable":true},{"defaultName":null,"id":"carbonScope3","field":"carbonScope3","displayName":"Carbon Emission Scope 3 (kgCO2e)","display":true,"width":150,"dataType":"number","__typename":"EnergyColumn","filterable":true},{"defaultName":"Activity","id":"activity","field":"activity","displayName":"Activity","display":true,"width":150,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Comment","id":"comment","field":"comment","displayName":"Comment","display":true,"width":300,"dataType":"string","__typename":"EnergyColumn","filterable":true},{"defaultName":"Invoice Number","id":"invoiceNumber","field":"invoiceNumber","displayName":"Invoice Number","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":false},{"defaultName":"Evidence Reference","id":"evidenceReference","field":"evidenceReference","displayName":"Evidence Reference","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":false},{"defaultName":"Other Reference","id":"otherReference","field":"otherReference","displayName":"Other Reference","display":true,"width":200,"dataType":"string","__typename":"EnergyColumn","filterable":false},{"defaultName":"Import Batch","id":"importBatch","field":"importBatch.fileName","displayName":"Upload Reference","display":true,"width":350,"dataType":"uploadReference","__typename":"EnergyColumn","filterable":true}]'),Bm=(e,n)=>null==n?void 0:n.some(n=>n.toLowerCase()==="".concat(e,"Transaction.purchaseType").toLowerCase()),Um=(e,n,t)=>[...n,...e===Vt.D_.Waste&&null!=t&&t.includes("WasteTransaction.projectPhase")?[{defaultName:"Project phase",id:"projectPhase",field:null,displayName:"Project phase",display:!0,width:150,dataType:"string",__typename:"WasteColumn",filterable:!0}]:[],...Bm(e,t)?[{defaultName:"Purchase Type",id:"purchaseType",field:null,displayName:"Purchase Type",display:!0,width:150,dataType:"string",__typename:"EnergyColumn",filterable:!0}]:[]];function Mm(e){var n;const t=function(){const[e,n]=(0,g.useState)(!1),[t,a]=(0,g.useState)([]);return[function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!r.length||e)return;n(!0);const{data:i,startDate:o,endDate:l,dataFormRowsFillingStrategy:s,dateFrequency:c,dataFormInputStrategy:d}=t,u=Zp(Zp({},(0,zt.mapValues)(i,e=>(0,zt.isDate)(e)?Ht(e):(0,zt.isObject)(e)?(0,zt.get)(e,"label"):e)),{},{individualCollectionDate:o});u.totalCost=wa(Zp({},u)),u.totalCostVat=Da(u.totalCost);const p=[];if(s===za.Distributed){let e;const n={[$a.Daily]:"days",[$a.Weekly]:"weeks",[$a.Monthly]:"months",[$a.Quarterly]:"quarters",[$a.Annually]:"years"}[c];if(e=Wt()(l).diff(Wt()(o),n)+1,e=e<1?1:e,e>1e5)throw new Error("Too much rows");if(d===Va.Single)for(let t=0;t<e;t++)p.push(Zp(Zp({},u),{},{individualCollectionDate:Wt()(o).add(t,n).toDate()}));else{const t={},a=new Map([["totalCost","currency"],["totalCostVat","currency"]]);r.filter(e=>{let{dataType:n}=e;return"number"===n||"currency"===n}).forEach(e=>{let{id:n,dataType:t}=e;return a.set(n,t)}),(0,zt.forIn)(u,(n,r)=>{if(!a.has(r)||!n)return;const i=ja(n)/e,o="number"===a.get(r);t[r]=i>0?o?Math.round(i):Tr(i):0}),t.totalCost=wa(Zp({},t)),t.totalCostVat=Da(t.totalCost);for(let a=0;a<e;a++)p.push(Zp(Zp(Zp({},u),t),{},{individualCollectionDate:Wt()(o).add(a,n).toDate()}))}}else p.push(u);const m=p.map((e,n)=>Zp(Zp({},e),{},{id:n}));a(m),n(!1)},{data:t,loading:e}]}(),a=function(){const e=rl(),[n,t]=(0,g.useState)(!1),[a,r]=(0,g.useState)([]);return[function(){var a,i,o,l,s,c,d;let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!p.length||n)return;t(!0);const{data:m,startDate:f,endDate:y,startTime:g,endTime:b,dataFormRowsFillingStrategy:h,dateFrequency:v,dataFormInputStrategy:x}=u,T=ol(ol({},(0,zt.mapValues)(m,e=>(0,zt.get)(e,"label",e))),{},{startDate:f,endDate:y,totalCost:m.totalCost||void 0,totalCostVat:void 0,comment:m.comment||void 0,tariff:e?(null===(a=m.tariff)||void 0===a?void 0:a.label)||void 0:m.tariff||void 0,meterName:m.energySource.name||m.energySource.label,energySource:m.energySource.name||m.energySource.label,energySourceId:m.energySource.id||m.energySource.value,locationPoint:m.locationPoint,startTime:null==g?void 0:g.format("hh:mm"),endTime:null==b?void 0:b.format("hh:mm"),tariffId:(null===(i=m.tariff)||void 0===i?void 0:i.id)||(null===(o=m.tariff)||void 0===o?void 0:o.value),supplierId:(null===(l=m.supplier)||void 0===l?void 0:l.id)||(null===(s=m.supplier)||void 0===s?void 0:s.value),currencyId:(null===(c=m.currency)||void 0===c?void 0:c.id)||(null===(d=m.currency)||void 0===d?void 0:d.value)});T.totalCost&&(T.totalCostVat=Da(T.totalCost));const O=[];if(h===za.Distributed){let e;const n={[$a.Daily]:"days",[$a.Weekly]:"weeks",[$a.Monthly]:"months",[$a.Quarterly]:"quarters",[$a.Annually]:"years"}[v];if(e=Wt()(y).diff(Wt()(f),n)+1,e=e<1?1:e,e>1e5)throw new Error("Too much rows");if(x===Va.Single)for(let t=0;t<e;t++){const e=sl(n,f,y,t);O.push(ol(ol({},T),e))}else{const t={},a=new Map([["totalCost","currency"],["totalCostVat","currency"]]);p.filter(e=>{let{dataType:n}=e;return"number"===n||"currency"===n}).forEach(e=>{let{id:n,dataType:t}=e;return a.set(n,t)}),(0,zt.forIn)(T,(n,r)=>{if(!a.has(r)||!n)return;const i=ja(n)/e;t[r]=i>0?Tr(i):0}),t.totalCostVat=Da(t.totalCost);for(let a=0;a<e;a++){const e=sl(n,f,y,a);O.push(ol(ol(ol({},T),t),e))}}}else O.push(T);const k=O.map((e,n)=>ol(ol({},e),{},{id:n}));r(k),t(!1)},{data:a,loading:n}]}(),r=function(){const[e,n]=(0,g.useState)(!1),[t,a]=(0,g.useState)([]);return[function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!r.length||e)return;n(!0);const{data:i,startDate:o,endDate:l,dataFormRowsFillingStrategy:s,dateFrequency:c,dataFormInputStrategy:d}=t,u=vm(vm({},(0,zt.mapValues)(i,e=>(0,zt.get)(e,"label",e))),{},{date:o,cost:i.cost||void 0,distance:i.distance||void 0,volume:i.volume||void 0,freight:i.freight||void 0,carrier:i.carrier||void 0,notes:i.notes||void 0});u.costVat=Da(u.cost);const p=[];if(s===za.Distributed){let e;const n={[$a.Daily]:"days",[$a.Weekly]:"weeks",[$a.Monthly]:"months",[$a.Quarterly]:"quarters",[$a.Annually]:"years"}[c];if(e=Wt()(l).diff(Wt()(o),n)+1,e=e<1?1:e,e>1e5)throw new Error("Too much rows");if(d===Va.Single)for(let t=0;t<e;t++)p.push(vm(vm({},u),{},{date:Wt()(o).add(t,n).toDate()}));else{const t={},a=new Map([["cost","currency"],["costVat","currency"]]);r.filter(e=>{let{dataType:n}=e;return"number"===n||"currency"===n}).forEach(e=>{let{id:n,dataType:t}=e;return a.set(n,t)}),(0,zt.forIn)(u,(n,r)=>{if(!a.has(r)||!n)return;const i=ja(n)/e,o="number"===a.get(r);t[r]=i>0?o?Math.round(i):Tr(i):0}),t.costVat=Da(t.cost);for(let a=0;a<e;a++)p.push(vm(vm(vm({},u),t),{},{date:Wt()(o).add(a,n).toDate()}))}}else p.push(u);const m=p.map((e,n)=>vm(vm({},e),{},{id:n}));a(m),n(!1)},{data:t,loading:e}]}(),i=function(){const[e,n]=(0,g.useState)(!1),[t,a]=(0,g.useState)([]);return[function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!r.length||e)return;n(!0);const{data:i,startDate:o,endDate:l,dataFormRowsFillingStrategy:s,dateFrequency:c,dataFormInputStrategy:d}=t,u=Om(Om({},(0,zt.mapValues)(i,e=>(0,zt.get)(e,"label",e))),{},{startDate:o,endDate:l,totalCost:i.totalCost||(i.tariff>0?i.quantity*i.tariff:void 0),comment:i.comment||void 0,meterName:i.energySource.name||i.energySource.label,energySource:i.energySource.name||i.energySource.label,locationPoint:i.locationPoint});u.totalCost&&(u.totalCostVat=Da(u.totalCost));const p=i.energySource.inOut;u.waterIn=p===Vt.mF.Both||p===Vt.mF.In?i.quantity:null,u.waterOut=p===Vt.mF.Both||p===Vt.mF.Out?i.quantity:null;const m=[];if(s===za.Distributed){let e;const n={[$a.Daily]:"days",[$a.Weekly]:"weeks",[$a.Monthly]:"months",[$a.Quarterly]:"quarters",[$a.Annually]:"years"}[c];if(e=Wt()(l).diff(Wt()(o),n)+1,e=e<1?1:e,e>1e5)throw new Error("Too much rows");if(d===Va.Single)for(let t=0;t<e;t++){const e=jm(n,o,l,t);m.push(Om(Om({},u),e))}else{const t={},a=new Map([["totalCost","currency"],["totalCostVat","currency"]]);r.filter(e=>{let{dataType:n}=e;return"number"===n||"currency"===n}).forEach(e=>{let{id:n,dataType:t}=e;return a.set(n,t)}),(0,zt.forIn)(u,(n,r)=>{if(!a.has(r)||!n)return;const i=ja(n)/e,o="number"===a.get(r);t[r]=i>0?o?Math.round(i):Tr(i):0}),t.totalCostVat=Da(t.totalCost);for(let a=0;a<e;a++){const e=jm(n,o,l,a);m.push(Om(Om(Om({},u),t),e))}}}else m.push(u);const f=m.map((e,n)=>Om(Om({},e),{},{id:n}));a(f),n(!1)},{data:t,loading:e}]}(),o=function(){const[e,n]=(0,g.useState)([]),[t,a]=(0,g.useState)(!0),r=(0,g.useCallback)(e=>{const{data:t,startDate:r,endDate:i,dataFormRowsFillingStrategy:o,dateFrequency:l,dataFormInputStrategy:s}=e,c=Sm(Sm({},(0,zt.mapValues)(t,e=>(0,zt.get)(e,"label",e))),{},{startDate:r,endDate:i}),d=[];if(o===za.Distributed){const e=wm[l],n=Wt()(i).diff(Wt()(r),e)+1,t=n<1?1:n;for(let n=0;n<t;n++){const a=Dm(e,r,i,n),o=Sm(Sm({},c),a);s===Va.Single?d.push(o):d.push(Sm(Sm({},o),{},{totalCost:Am(c.totalCost,t),hotelNights:Am(c.hotelNights,t),homeWorkingDays:Am(c.homeWorkingDays,t)}))}}else d.push(c);const u=d.map((e,n)=>Sm(Sm({},e),{},{id:n}));n(u),a(!1)},[]);return(0,g.useMemo)(()=>[r,{data:e,loading:t}],[r,e,t])}(),l=Pu(),s=null==l||null===(n=l.accessControls)||void 0===n?void 0:n.customFields,c=(0,g.useMemo)(()=>Um(Vt.D_.Waste,Rm,s),[s]),d=(0,g.useMemo)(()=>Um(Vt.D_.Electricity,Pm,s),[s]),u=(0,g.useMemo)(()=>Um(Vt.D_.Gas,Lm,s),[s]),p=(0,g.useMemo)(()=>Um(Vt.D_.Heatsteam,Fm,s),[s]),m=(0,g.useMemo)(()=>Um(Vt.D_.Water,Im,s),[s]),f=(0,g.useMemo)(()=>Um(Vt.D_.Transport,Em,s),[s]),y=(0,g.useMemo)(()=>Um(Vt.D_.Hotelstays,_m,s),[s]);switch(e){case Vt.D_.Waste:return[c,t];case Vt.D_.Electricity:return[d,a];case Vt.D_.Gas:return[u,a];case Vt.D_.Heatsteam:return[p,a];case Vt.D_.Water:return[m,i];case Vt.D_.Transport:return[f,r];case Vt.D_.Hotelstays:return[y,o];default:throw new Error("Undefined data section: ".concat(e))}}var Vm;const zm=(0,D.J1)(Vm||(Vm=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAvailableManagementSystems($accountId: ID!, $type: GovernanceItemType) {\n    getAvailableManagementSystems(accountId: $accountId, type: $type) {\n      id\n      title\n    }\n  }\n"])));function Gm(){const e=rt(),{data:n,loading:t}=(0,h.IT)(zm,{variables:{accountId:e,type:Vt.Ak.ManagementSystem}});return{data:(null==n?void 0:n.getAvailableManagementSystems)||[],loading:t}}function $m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Wm(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$m(Object(t),!0).forEach(function(n){qm(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$m(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function qm(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Jm(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{setLoading:t}=(0,f.usePageLoadingContext)(),{setError:a}=(0,f.usePageErrorContext)(),[r,i]=(0,gs._)(e,Wm(Wm({},n),{},{notifyOnNetworkStatusChange:!0})),o=(0,g.useCallback)(async function(){try{return t(!0),await r(...arguments)}catch(e){throw n.showLoadError&&a(e),e}finally{t(!1)}},[t,a,r]);return[o,i]}function Ym(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Hm(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ym(Object(t),!0).forEach(function(n){Km(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ym(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Km(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Qm(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{loading:t,setLoading:a}=(0,f.usePageLoadingContext)(),{setError:r}=(0,f.usePageErrorContext)(),i=(0,Ot.n)(e,Hm(Hm({},n),{},{notifyOnNetworkStatusChange:!0,onCompleted:function(){for(var e,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];null===(e=n.onCompleted)||void 0===e||e.call(n,...r),setTimeout(()=>{a(!1)},0)},onError:e=>{var t;null===(t=n.onError)||void 0===t||t.call(n,e),setTimeout(()=>{r(e)},0)}}));return(0,g.useEffect)(()=>{const[,e]=i;e.loading&&!t&&a(!0)},[i,t,a,r]),(0,g.useEffect)(()=>()=>{r(null),a(!1)},[r,a]),i}function Zm(e){const n=(0,g.useRef)();return(0,g.useEffect)(()=>{n.current=e},[e]),n.current}var Xm=t(66575),ef=t.n(Xm);function nf(e){return"".concat(e.first_name," ").concat(e.last_name)}function tf(e,n){return"\n    <div>Please report this error as a bug.</div>\n    <div>User: ".concat(nf(n),"</div>\n    <div>URL: ").concat(window.location.href,"</div>\n    ").concat(Rr(e),"\n  ")}const af=(e,n,t)=>{const a=e&&e["".concat(n).concat(t,"GridV2")];let r=[];return a&&a.columnState&&(r=a.columnState.reduce((e,n)=>n.hide?e.concat(n.colId):e,[])),r};var rf;function of(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function lf(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?of(Object(t),!0).forEach(function(n){sf(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):of(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function sf(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const cf=(0,D.J1)(rf||(rf=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  fragment GetDatasetRefreshStatus on DatasetRefreshLogRecord {\n    id\n    datasetName\n    timestamp\n    trigger\n    status\n    description\n    error\n  }\n  query GetDatasetRefreshStatus($datasetName: String!) {\n    getDatasetRefreshStatus(datasetName: $datasetName) {\n      lastRefresh {\n        ...GetDatasetRefreshStatus\n      }\n      current {\n        ...GetDatasetRefreshStatus\n      }\n    }\n  }\n"]))),df=e=>{const{getValueFromStorage:n}=(0,f.useLocalStorage)(f.AG_GRID_PARAMS_V2),t=rt(),[a,r]=(0,g.useState)(e.defaultVariant),i=(0,h.IT)(cf,{variables:{datasetName:e.datasetName},skip:!0,fetchPolicy:"network-only",errorPolicy:"ignore"}),[o]=Jm(e.regularQuery),[l]=Jm(e.reportingQuery),[s]=(0,gs._)(e.regularFiltersQuery),[c]=(0,gs._)(e.reportingFiltersQuery),d=(0,g.useCallback)(async r=>{const i=lf({},r.variables);if(e.enableHiddenColumns&&"regular"===a){const a=n(),r=af(a,t,e.exportFileName);i.hiddenColumns=r}const s="regular"===a?o:l;return(await s(lf(lf({},r),{},{variables:i}))).data[e.mapping[a].data]},[a]),u=(0,g.useCallback)(async n=>{const t="regular"===a?s:c;return(await t(n)).data[e.mapping[a].filters]},[a]),p=(0,g.useMemo)(()=>{var e;return null!==(e=i.data)&&void 0!==e&&null!==(e=e.getDatasetRefreshStatus)&&void 0!==e&&null!==(e=e.lastRefresh)&&void 0!==e&&e.timestamp?Zt(Date.now()-Wt()(i.data.getDatasetRefreshStatus.lastRefresh.timestamp).utc().toDate().getTime()):"unknown time"},[i.data]),m=(0,g.useMemo)(()=>{var e;return(e=>{switch(e){case Vt.QT.ScheduledForRefresh:return"Scheduled for refresh";case Vt.QT.Refreshing:return"Refreshing";case Vt.QT.Refreshed:return"Refreshed";case Vt.QT.RefreshFailed:return"Refresh failed";case Vt.QT.Skipped:return"Skipped";case Vt.QT.SchedulingFailed:return"Scheduling failed";default:return"Unknown"}})(null===(e=i.data)||void 0===e||null===(e=e.getDatasetRefreshStatus.current)||void 0===e?void 0:e.status)},[i.data]);return(0,g.useMemo)(()=>({variant:a,setVariant:r,fetchData:d,fetchFilters:u,reportingLastRefreshedHours:p,reportingCurrentStatus:m}),[a,d,u,p,m])};var uf=t(38126);function pf(){const{token:e}=at(),{accessLevel:n}=e;return n===Se?Re:n===Ne?Re.filter(e=>{let{value:n}=e;return[Ne,Ce].includes(n)}):n===Ce?Re.filter(e=>{let{value:n}=e;return Ce===n}):[]}var mf,ff,yf,gf=t(85587);function bf(e,n,t){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"id";if(!n)return e;const r=new gf.vj(a);for(const e of t)r.addIndex(e);return r.addDocuments(e),r.search(n)}function hf(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const[a,r]=(0,g.useState)(t);return[a,r,bf(e,a,n)]}function vf(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const xf=(0,D.J1)(mf||(mf=vf(["\n  query GetSuppliers(\n    $accountId: ID!\n    $filterValue: String\n    $filterBy: String\n    $utility: TransactionType\n    $pageSize: Int!\n    $page: Int!\n  ) {\n    getSuppliers(\n      accountId: $accountId\n      filterValue: $filterValue\n      filterBy: $filterBy\n      utility: $utility\n      page: $page\n      pageSize: $pageSize\n    ) {\n      suppliers {\n        id\n        name\n        accountId\n        type\n        utility\n        address {\n          id\n          address1\n          address2\n          address3\n          city\n          postcode\n          phone1\n        }\n      }\n    }\n  }\n"]))),Tf=(0,D.J1)(ff||(ff=vf(["\n  query GetSuppliersPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n    $withWasteCarrierLicence: Boolean = false\n  ) {\n    getSuppliersPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n        accountId\n        address {\n          id\n          address1\n          address2\n          address3\n          city\n          postcode\n          phone1\n        }\n        type\n        materials {\n          id\n          name\n        }\n        notes\n        wasteCarrierLicenceDocument @include(if: $withWasteCarrierLicence) {\n          id\n          referenceId\n        }\n      }\n    }\n  }\n"]))),Of=(0,D.J1)(yf||(yf=vf(["\n  query GetSupplier($id: ID!) {\n    getSupplier(id: $id) {\n      id\n      name\n      accountId\n      type\n      utility\n      address {\n        id\n        address1\n        address2\n        address3\n        city\n        postcode\n        phone1\n      }\n    }\n  }\n"])));function kf(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jf(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kf(Object(t),!0).forEach(function(n){Cf(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kf(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cf(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Sf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=rt(),{data:t}=(0,h.IT)(xf,{variables:jf(jf({},e),{},{pageSize:e.pageSize||Za,accountId:e.accountId||n,page:1})});return(null==t?void 0:t.getSuppliers.suppliers)||[]}var Nf;const wf=(0,D.J1)(Nf||(Nf=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(['\n  query GetTags($accountId: String!) {\n    getTagsByAccountId(input: { accountId: $accountId, applicationId: "RIO" }) {\n      id\n      tagName\n      isSystemLevelTag\n      legislationTag\n      locations {\n        id\n      }\n    }\n  }\n'])));function Df(){const e=rt(),n=(0,N.m)(),[t,a]=(0,g.useState)(null);return(0,g.useEffect)(()=>{!async function(){const{data:t}=await n.query({query:wf,variables:{accountId:e}});a((null==t?void 0:t.getTagsByAccountId)||[])}()},[e,n]),t}var Af,Rf,Pf,Lf,If;function Ef(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _f=(0,D.J1)(Af||(Af=Ef(["\n  query GetReceivedSurvey($id: ID!, $accountId: ID!, $userId: ID!, $userGroupId: ID) {\n    getReceivedSurveyById(id: $id, accountId: $accountId, userId: $userId, userGroupId: $userGroupId) {\n      id\n      name\n      owner {\n        id\n        name\n      }\n      lockedBy {\n        id\n        first_name\n        last_name\n      }\n      deadlineDate\n      template {\n        id\n        formContent\n        questions {\n          id\n          name\n          type\n        }\n      }\n      submission {\n        id\n        status\n        version\n        feedback\n        owner {\n          id\n          name\n        }\n        answers {\n          id\n          answer\n          questionId\n        }\n      }\n      isIndividualContributor\n      isUserGroupContributor\n    }\n  }\n"]))),Ff=(0,D.J1)(Rf||(Rf=Ef(["\n  mutation SetSubmission($accountId: ID!, $surveyId: ID!, $submission: SurveySubmissionInput!) {\n    setSurveySubmission(accountId: $accountId, surveyId: $surveyId, submission: $submission) {\n      accountId\n      surveyId\n      id\n      status\n      version\n    }\n  }\n"]))),Bf=(0,D.J1)(Pf||(Pf=Ef(["\n  subscription SubscribeToSetSurveySubmission($accountId: ID!, $surveyId: ID!) {\n    setSurveySubmissionUpdated(accountId: $accountId, surveyId: $surveyId) {\n      id\n      status\n      version\n      answers {\n        id\n        answer\n      }\n    }\n  }\n"]))),Uf=(0,D.J1)(Lf||(Lf=Ef(["\n  query GetDocuments($ids: [ID!]!) {\n    getDocumentRecordsByIds(ids: $ids) {\n      id\n      link\n      fileName\n    }\n  }\n"]))),Mf=(0,D.J1)(If||(If=Ef(["\n  mutation UnlockContributor($accountId: ID!, $campaignId: ID!) {\n    unlockContributor(accountId: $accountId, campaignId: $campaignId) {\n      campaignId\n      accountId\n    }\n  }\n"])));var Vf,zf;function Gf(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $f=(0,D.J1)(Vf||(Vf=Gf(["\n  fragment SubmissionFields on SurveySubmission {\n    id\n    status\n    version\n    answers {\n      id\n      answer\n      questionId\n    }\n  }\n"]))),Wf=(0,D.J1)(zf||(zf=Gf(["\n  query getMyContributorOverview(\n    $accountId: ID!\n    $contributorAccountId: ID!\n    $contributorUserId: ID\n    $contributorUserGroupId: ID\n  ) {\n    getMySurveyContributorById(\n      accountId: $accountId\n      contributorAccountId: $contributorAccountId\n      contributorUserId: $contributorUserId\n      contributorUserGroupId: $contributorUserGroupId\n    ) {\n      ... on AccountSurveyContributor {\n        surveys {\n          id\n          name\n          startDate\n          deadlineDate\n          submission {\n            ...SubmissionFields\n          }\n          template {\n            formContent\n            questions {\n              id\n              type\n              name\n            }\n          }\n        }\n        account {\n          id\n          name\n        }\n        user {\n          id\n          first_name\n          last_name\n          email\n        }\n        userGroup {\n          id\n          name\n        }\n      }\n    }\n  }\n  ","\n"])),$f);var qf,Jf;function Yf(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Hf=(0,D.J1)(qf||(qf=Yf(["\n  query GetReceivedSurveysPage(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getReceivedSurveysPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        id\n        name\n        lockedBy {\n          id\n          first_name\n          last_name\n        }\n        deadlineDate\n        template {\n          id\n          formContent\n          questions {\n            id\n            name\n          }\n        }\n        submission {\n          ...SubmissionFields\n        }\n        owner {\n          id\n          name\n        }\n        isIndividualContributor\n        isUserGroupContributor\n      }\n      totalRows\n    }\n  }\n  ","\n"])),$f),Kf=(0,D.J1)(Jf||(Jf=Yf(["\n  query GetReceivedSurveysPageFilter($accountId: ID!, $field: String!) {\n    getReceivedSurveysPageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));function Qf(e){let{accountId:n,offset:t=0,limit:a,sort:r=[],filters:i={}}=e;return Rt(Hf,{fetchPolicy:"network-only",variables:{accountId:n,offset:t,limit:a,sort:r,filters:i},keepErrorAfterUnmount:!0})}var Zf=t(2087),Xf=t.n(Zf),ey=t(18243),ny=t.n(ey);const ty=["loading"],ay=["file","fileName","accountId"];function ry(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function iy(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ry(Object(t),!0).forEach(function(n){oy(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ry(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function oy(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ly(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function sy(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function cy(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sy(Object(t),!0).forEach(function(n){dy(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dy(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function uy(){const e=rt(),[n,t]=function(){const[e,{loading:n}]=(0,Ot.n)(ny()),[t,a]=(0,Ot.n)(Xf()),{loading:r}=a;return[async function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{file:a,fileName:r,accountId:i}=n,o=ly(n,ay);const{data:{initiateDataUpload:{signedUrl:l,batchId:s}}={}}=await e({variables:iy({fileName:r,accountId:i},o)});return await t({variables:{file:a,fileName:r,accId:i,url:l}}),{signedUrl:l,batchId:s}},iy(iy({},ly(a,ty)),{},{loading:n||r})]}();return[t=>n(cy(cy({},t),{},{accountId:e})),t]}var py=t(23047),my=t.n(py);function fy(e){const n=(0,N.m)(),[t,a]=(0,g.useState)({user:null,currentAccountId:null,accounts:{},accountIds:[]});return(0,g.useEffect)(()=>{(async()=>{const{data:t}=await n.query({query:P,variables:{name:e}});if(t&&t.getUserInfoById&&t.getUserInfoById.account){const{account:e}=t.getUserInfoById,{role:{permissions:n},disableAccountSelector:r}=t.getUserInfoById,i=!n.account.includes("getChild")&&!n.account.includes("getAll")||r?[]:e.children,o=my()([e,...i],"id"),l=i.slice().sort((e,n)=>o[e.id].name<o[n.id].name?-1:o[e.id].name>o[n.id].name?1:0);a({accountIds:[e.id].concat(l.map(e=>{let{id:n}=e;return n})),accounts:o,user:t.getUserInfoById})}})()},[e,n]),t}const yy="LIST_OR_GRID",gy="GRID",by="LIST";function hy(){const[e,n]=(0,g.useState)(localStorage.getItem(yy)||gy),t=e=>{localStorage.setItem(yy,e),n(e)};return{view:e,showGrid:()=>t(gy),showList:()=>t(by),isGrid:e===gy,isList:e===by}}var vy,xy,Ty,Oy=t(13426),ky=t.n(Oy);function jy(){const e=(0,N.m)().cache;return n=>{for(const t of n)e.evict(t);e.gc()}}function Cy(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Sy=(0,D.J1)(vy||(vy=Cy(["\n  query GetFundsByAccountId(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getFundsByAccountId(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n        externalId\n        createdAt\n        lastUpdatedAt\n        deleted\n        currency {\n          id\n          name\n          code\n        }\n      }\n    }\n  }\n"]))),Ny=(0,D.J1)(xy||(xy=Cy(["\n  mutation ImportFunds($funds: [FundInput!]!, $accountId: ID!) {\n    importFunds(funds: $funds, accountId: $accountId) {\n      deleted\n      created\n      updated\n    }\n  }\n"]))),wy=(0,D.J1)(Ty||(Ty=Cy(["\n  query GetFundsFilter($field: String!, $accountId: ID!) {\n    getFundsFilter(field: $field, accountId: $accountId) {\n      label\n      value\n    }\n  }\n"])));var Dy,Ay,Ry;function Py(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ly=(0,D.J1)(Dy||(Dy=Py(["\n  query GetAssetsPageByAccountId(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters!\n  ) {\n    getAssetsPageByAccountId(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n        description\n        externalId\n        gicsCode {\n          id\n          code\n        }\n        assetLocation\n        createdAt\n        deleted\n        lastUpdatedAt\n        accountId\n      }\n    }\n  }\n"]))),Iy=(0,D.J1)(Ay||(Ay=Py(["\n  query GetAssetsPageByAccountIdFilter($field: String!, $accountId: ID!) {\n    getAssetsPageByAccountIdFilter(field: $field, accountId: $accountId) {\n      label\n      value\n    }\n  }\n"]))),Ey=(0,D.J1)(Ry||(Ry=Py(["\n  mutation ImportAssets($assets: [AssetInput!]!, $accountId: ID!) {\n    importAssets(assets: $assets, accountId: $accountId) {\n      created\n      updated\n      deleted\n    }\n  }\n"])));function _y(){const e=rt(),{showNotification:n}=vt(),[t,a]=(0,g.useState)([]),[r,i]=(0,g.useState)(!1),o=Ed({query:Ly,request:{accountId:e,sort:[{field:"name",order:"asc"}],filters:{set:[{values:["0"],filterType:"set",field:"deleted"}]}},response:"getAssetsPageByAccountId"});return(0,g.useEffect)(()=>{i(!0),o().then(e=>{a(e)}).catch(e=>{n("Failed to load assets: ".concat(e.message),"danger")}).finally(()=>{i(!1)})},[]),{loading:r,assets:t}}const Fy=()=>!!rc().data.find(e=>e.startsWith("createImportBatch"));function By(e){const n=rc(),{token:t}=at();return(a,r)=>{const i=n[e];return!!["".concat(a,"All"),"".concat(a,"Parent"),"".concat(a,"Child")].some(e=>i.includes(e))||i.includes("".concat(a,"Own"))&&(!r||r===t.sub)}}var Uy,My,Vy,zy,Gy,$y;function Wy(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const qy=(0,f.styled)(f.TextField)(Uy||(Uy=Wy(["\n  margin: 1rem 0;\n  width: 100%;\n  max-height: 50px;\n"]))),Jy=(0,f.styled)(f.Button)(My||(My=Wy(["\n  width: 100%;\n"]))),Yy=(0,f.styled)(f.Logo)(Vy||(Vy=Wy(["\n  margin: 1rem;\n"]))),Hy=(0,f.styled)("form")(zy||(zy=Wy(["\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-direction: column;\n"]))),Ky=(0,f.styled)("div")(Gy||(Gy=Wy(["\n  display: flex;\n  flex-direction: column;\n  height: 100vh;\n  width: 30vw;\n  margin: 0 auto;\n  align-items: center;\n  justify-content: center;\n  place-items: center;\n"]))),Qy=(0,f.styled)(f.Text)($y||($y=Wy(["\n  color: ",";\n  text-align: center;\n  margin-bottom: 1rem;\n  cursor: pointer;\n"])),e=>e.theme.sys.color.primary),Zy=b.Yj().email("Invalid email").required("Email is required");function Xy(){const e=(0,m.Zp)(),{code:n}=(0,m.g)(),{showNotification:t}=vt(),[a,r]=(0,g.useState)(localStorage.getItem("MEMOIZED_EMAIL")||""),[i,o]=(0,g.useState)(n||""),[l,s]=(0,g.useState)(!1),[c,d]=(0,g.useState)(!1),[u,p]=(0,g.useState)(null),h=async e=>{try{return await Zy.validate(e),p(null),!0}catch(e){return e instanceof b.yI&&p(e.message),!1}},v=(0,g.useCallback)(async()=>{if(a)try{await y.N.resendSignUp(a.trim().toLowerCase()),t("Email has been sent again!","success")}catch(e){const n=e instanceof Error?e.message:"An unexpected error occurred";t("Email wasn't sent: ".concat(n),"danger")}},[a,t]);return(0,Ze.jsxs)(Ky,{children:[(0,Ze.jsx)(Yy,{height:"70px"}),(0,Ze.jsx)(f.Text,{children:"Please verify your email"}),(0,Ze.jsxs)(Hy,{onSubmit:async n=>{if(null==n||n.preventDefault(),c)e("v2/upgrade/courses");else if(await h(a)&&i)try{s(!0),await y.N.confirmSignUp(a.trim().toLowerCase(),i),d(!0),t("Confirmed! Please proceed to login.","success")}catch(e){const n=e instanceof Error?e.message:"An unexpected error occurred";t(n,"danger")}finally{s(!1)}else t("Please provide valid email and code","warning")},children:[(0,Ze.jsx)(qy,{required:!0,type:"email",value:a,placeholder:"Your email",autoComplete:"email",name:"email",helperText:u,error:!!u,onChange:async e=>{const n=e.target.value;r(n),await h(n)}}),(0,Ze.jsx)(qy,{required:!0,type:"text",value:i,placeholder:"Verification code",name:"code",onChange:e=>o(e.target.value)}),(0,Ze.jsx)(Qy,{onClick:v,children:"Not received your confirmation? Resend Email"}),(0,Ze.jsxs)(Jy,{type:"submit",variant:"contained",disabled:!i||!!u||l,children:[c?"Go to Login":"Verify",(0,Ze.jsx)("div",{children:l&&(0,Ze.jsx)(f.Loader,{size:20})})]})]})]})}var eg=t(77161);const ng=e=>e.length<10?"Password must be 10 characters or longer":(e.toUpperCase()===e||e.toLowerCase()===e)&&"Password must contain both upper and lower case characters";var tg,ag;function rg(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ig=(0,Ge.default)(ze.DZ)(tg||(tg=rg(["\n  padding-left: ",";\n  margin-bottom: ",";\n  text-align: center;\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.md.spacing),og=(0,Ge.default)(ze.EY)(ag||(ag=rg(["\n  padding-left: ",";\n  margin-bottom: ",";\n  text-align: center;\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.sm.spacing);function lg(e){let{email:n}=e;const t=(0,m.Zp)(),{showNotification:a}=vt(),r=(0,N.m)(),[i]=(0,Ot.n)(J,{onCompleted:()=>{a("Verification code has been sent to ".concat(n,". Please enter it below to set your new password.")),r.cache.writeQuery({query:z,data:{loginError:""}}),t("/reset-password?username=".concat(n))},onError:()=>{a("Unfortunately we coulndn't reset your password. Please contact support@rio.ai for help.")}});return(0,Ze.jsxs)(ze.hh,{children:[(0,Ze.jsx)(ig,{size:"lg",children:"We think you’ve already set your password."}),(0,Ze.jsx)(og,{children:"Please use one of the options below"}),(0,Ze.jsxs)(ze.hh.Row,{children:[(0,Ze.jsx)(ze.hh.ButtonColumn,{size:"sm",span:6,color:"primary",onClick:()=>t("/login"),children:"Login"}),(0,Ze.jsx)(ze.hh.ButtonColumn,{size:"sm",span:6,color:"secondary",onClick:()=>i({variables:{username:n}}),children:"Reset password"})]})]})}function sg(e){let{titleId:n,subtitleId:t}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Logo,{height:"70px",style:{margin:"1rem",marginBottom:"1.5rem"}}),(0,Ze.jsx)(f.Text,{size:"large",typescale:"title",style:{marginBottom:"1rem"},children:(0,Ze.jsx)(Je.A,{id:n})}),(0,Ze.jsx)(f.Text,{size:"large",typescale:"label",style:{marginBottom:"1rem"},children:(0,Ze.jsx)(Je.A,{id:t})})]})}var cg;const dg=(0,f.styled)("div")(cg||(cg=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex-direction: column;\n  height: 100vh;\n  justify-content: center;\n  align-items: center;\n"]))),ug=dg;var pg;const mg=(0,f.styled)("form")(pg||(pg=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex-direction: column;\n  gap: 1rem;\n  min-width: 30rem;\n  margin-top: 1rem;\n\n  button {\n    margin: auto;\n  }\n"]))),fg=mg;var yg;const gg=(0,f.styled)("div")(yg||(yg=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-bottom: 1rem;\n"]))),bg=gg,hg=["titleId","loading"];function vg(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xg(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vg(Object(t),!0).forEach(function(n){Tg(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Tg(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Og=(0,f.styled)(f.Button)({width:"100%"}),kg=(0,f.styled)("div")(e=>{let{theme:n}=e;return{display:"flex",justifyContent:"space-between",alignItems:"center",gap:n.spacing(1)}});function jg(e){let{titleId:n,loading:t}=e,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,hg);return(0,Ze.jsx)(Og,xg(xg({},a),{},{variant:"contained",type:"submit",children:(0,Ze.jsxs)(kg,{children:[(0,Ze.jsx)(Je.A,{id:n}),t&&(0,Ze.jsx)(f.Loader,{size:20})]})}))}var Cg,Sg=t(46567);function Ng(e){let{messageId:n}=e;const t=(0,Sg.A)();return(0,Ze.jsx)(f.Text,{size:"medium",typescale:"body",sx:{color:t.sys.color.error,marginTop:"0.5rem"},children:(0,Ze.jsx)(Je.A,{id:n})})}const wg=(0,f.styled)("a")(Cg||(Cg=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  color: ",";\n"])),e=>e.theme.sys.color.primary),Dg=e=>{let{terms:n,termsAgreement:t,onChange:a}=e;return(0,Ze.jsx)(f.Checkbox,{name:n,checked:t,onChange:a,label:(0,Ze.jsxs)(f.Text,{size:"medium",typescale:"body",children:[(0,Ze.jsx)(Je.A,{id:"login.termsAgreement.termsAgreementText"}),(0,Ze.jsx)(wg,{href:"http://www.rio.ai/terms-of-".concat(n),target:"_blank",children:(0,Ze.jsx)(Je.A,{id:"login.termsAgreement.termsLinkText",values:{terms:(0,Ze.jsx)(Je.A,{id:"login.termsAgreement.".concat(n)})}})})]})})},Ag=["password1","password2"];function Rg(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Pg(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Rg(Object(t),!0).forEach(function(n){Lg(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Rg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Lg(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Ig=e=>({UserNotFoundException:"login.setPassword.userNotFound",NotAuthorizedException:"login.setPassword.incorrectPassword",UserDisabledException:"login.main.userDisabled",GeneralError:"login.setPassword.generalError"}[e]||e),Eg=["name"];var _g;function Fg(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Bg(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fg(Object(t),!0).forEach(function(n){Ug(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ug(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Mg=Ge.default.div(_g||(_g=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n"]))),Vg=e=>{let{name:n}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,Eg);return(0,Ze.jsx)(Mg,Bg(Bg({},t),{},{role:"progressbar",children:(0,Ze.jsx)(ze.Ip,{name:n,size:"md"})}))};var zg,Gg;function $g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Wg(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$g(Object(t),!0).forEach(function(n){qg(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$g(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function qg(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Jg(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Yg=(0,Ge.default)(ze.OJ)(zg||(zg=Jg(["\n  height: 100%;\n"]))),Hg=(0,Ge.default)(p.Link)(Gg||(Gg=Jg(["\n  text-decoration: underline;\n"]))),Kg=e=>{let{error:n,title:t,body:a,name:r}=e;return(0,Ze.jsx)(ze.Kw,{error:n,children:e=>{let{icon:n}=e;return(0,Ze.jsx)(Yg,{name:r,icon:n,title:t,body:a})}})},Qg=e=>(0,Ze.jsx)(Kg,Wg({title:"Forbidden",body:"Access denied"},e)),Zg=e=>(0,Ze.jsx)(Kg,Wg({title:"Not found",body:"Requested resource was not found",error:new Error("Not found")},e)),Xg=e=>(0,Ze.jsx)(Kg,Wg({error:new Error("Not found"),title:"Page not found",body:"The page you are looking for does not exist"},e)),eb=e=>(0,Ze.jsx)(Kg,Wg({title:"Not available",body:"This page is not available for this account"},e)),nb=e=>{let{name:n,error:t}=e;const a=oc();return(0,Ze.jsx)(ze.Kw,{error:t,children:e=>{let{icon:t}=e;return(0,Ze.jsxs)(Yg,{name:n,icon:t,title:"You do not have access to this learning content.",children:["Please contact your Rio Administrator to gain access to this Premium content, or purchase it"," ",(0,Ze.jsx)(Hg,{to:a.market.engage,children:"here"})]})}})};var tb,ab,rb,ib;function ob(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const lb=(0,Ge.default)(ze.OJ)(tb||(tb=ob(["\n  height: 100%;\n"]))),sb=(0,Ge.default)(ze.v3)(ab||(ab=ob(["\n  text-align: left;\n"]))),cb=Ge.default.div(rb||(rb=ob(["\n  text-align: left;\n"]))),db=(0,Ge.default)(ze.Yq)(ib||(ib=ob(["\n  display: inline-block;\n  width: auto;\n"]))),ub=e=>{let{error:n,retry:t}=e;const a=function(){const e=_u(),{showNotification:n}=vt(),[t]=(0,Ot.n)(ef());return async a=>{try{var r;if(de.Cp(a),!e)throw new Error("Current user is not defined");await t({variables:{replacements:JSON.stringify({topic:"Bug report",name:nf(e),email:e.email,phone:e.phone,company:null===(r=e.account)||void 0===r?void 0:r.name,enquiry:tf(a,e)})}}),n("Thank you for reporting an issue. We will get onto this soon!","success")}catch(e){n("Sorry, we couldn't automatically report an issue. Please use hello@dittosustainability.ai to contact us.","success")}}}(),[r,i]=(0,g.useState)(!1),o=n instanceof Error?n:new Error(n),l=async()=>{r||(await a(o),i(!0))};return(0,Ze.jsx)(lb,{icon:"exclamation-triangle",title:"This page failed to load",body:"There was a problem loading this page, please try again.",retry:t,report:l,details:(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(cb,{children:["Please reload the page and if the problem persists please"," ",(0,Ze.jsx)(db,{to:"/contact",onClick:l,children:"report it"})]}),(0,Ze.jsx)(sb,{size:"md",wrap:!0,children:Rr(o)})]})})};function pb(e){let{result:n,loading:t,error:a,data:r}=e;return n.loading?t?t():(0,Ze.jsx)(Vg,{}):n.error?a?a(n.error,n):(0,Ze.jsx)(ub,{error:n.error,retry:()=>n.refetch(n.variables)}):n.data?r(n.data):null}var mb,fb,yb=t(8644);function gb(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const bb=Ge.default.div(mb||(mb=gb(["\n  height: auto;\n  max-height: 200px;\n  width: 100%;\n  // Subtract sidebar and padding\n  max-width: calc(100vw - 100px - 32px);\n"]))),hb=Ge.default.div(fb||(fb=gb(["\n  img {\n    object-fit: cover;\n    width: 100%;\n    height: auto;\n    max-height: 200px;\n  }\n"]))),vb=e=>{let{item:n,handlerClick:t}=e;const{accountId:a,thumbnail:r,url:i,type:o}=n;return(0,Ze.jsx)(hb,{onClick:()=>t(i,o),children:(0,Ze.jsx)("img",{src:r,alt:"Banner ".concat(a)})})};function xb(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Tb(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xb(Object(t),!0).forEach(function(n){Ob(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xb(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ob(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const kb=e=>{let{banners:n,handlerClick:t}=e;return(0,Ze.jsx)(bb,{children:(0,Ze.jsx)(yb.A,Tb(Tb({},{dots:!0,infinite:!0,speed:2e3,slidesToShow:1,slidesToScroll:1,autoplay:!0,autoplaySpeed:5e3,arrows:!0,centerMode:!0,centerPadding:"0"}),{},{children:n.map(e=>(0,Ze.jsx)(vb,{handlerClick:t,item:e},e.accountId))}))})};var jb,Cb,Sb,Nb;function wb(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(0,D.J1)(jb||(jb=wb(["\n  query getValue($key: String!, $courseId: String!) {\n    getValue(input: { key: $key, courseId: $courseId })\n  }\n"])));const Db=(0,D.J1)(Cb||(Cb=wb(["\n  mutation setValue($key: String!, $value: String!, $courseId: String!) {\n    setValue(input: { key: $key, value: $value, courseId: $courseId })\n  }\n"]))),Ab=(0,D.J1)(Sb||(Sb=wb(["\n  query getAllCourseData($courseId: String!) {\n    getAllCourseData(input: { courseId: $courseId }) {\n      key\n      value\n    }\n  }\n"]))),Rb=(0,D.J1)(Nb||(Nb=wb(["\n  mutation updateUserCourseProgress($userId: ID!, $courseId: ID!, $courseProgress: CourseProgress!) {\n    updateUserCourseProgress(input: { userId: $userId, courseId: $courseId, courseProgress: $courseProgress }) {\n      lastUpdatedAt\n      courseProgress\n    }\n  }\n"])));var Pb,Lb,Ib=t(2374);function Eb(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _b=Ge.default.div(Pb||(Pb=Eb(["\n  padding: ",";\n  position: relative;\n  max-height: 100%;\n  height: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"])),e=>e.theme.geometry.xl.spacing),Fb=(0,Ge.default)(ze.Ce)(Lb||(Lb=Eb(["\n  max-width: 100%;\n  max-height: 100%;\n  min-width: 100%;\n"]))),Bb=(0,Ib.W)(e=>{let{course:n,client:t,courseRefetch:a,onCompleted:r}=e;return(0,Ze.jsx)(_b,{children:(0,Ze.jsx)(Fb,{autoPlay:!0,sources:[{link:n.metaData.highQualityLink||n.metaData.lowQualityLink||n.metaData.link}],onPlay:()=>(async(e,n,t)=>{const a=(await n.query({query:G})).data.idToken.sub;await n.mutate({mutation:Rb,variables:{userId:a,courseId:e.id,courseProgress:fr}}),t()})(n,t,a),onEnded:()=>(async(e,n,t,a)=>{const r=(await n.query({query:G})).data.idToken.sub;await n.mutate({mutation:Rb,variables:{userId:r,courseId:e.id,courseProgress:yr}}),t(),a()})(n,t,a,r)})})});var Ub,Mb;function Vb(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const zb=(0,D.J1)(Ub||(Ub=Vb(["\n  mutation updateUserCourseProgress($userId: ID!, $courseId: ID!, $courseProgress: CourseProgress!) {\n    updateUserCourseProgress(input: { userId: $userId, courseId: $courseId, courseProgress: $courseProgress }) {\n      lastUpdatedAt\n      courseProgress\n    }\n  }\n"]))),Gb=(0,D.J1)(Mb||(Mb=Vb(["\n  mutation completeEvaluation($answers: [AnswerInput!]!, $courseId: ID!, $evaluationId: ID!, $userId: ID!) {\n    completeEvaluation(answers: $answers, courseId: $courseId, evaluationId: $evaluationId, userId: $userId)\n  }\n"]))),$b=class{constructor(e){this.startupData=e}initialise(e,n,t,a,r,i,o,l,s,c){window.API={LMSInitialize:()=>{e.mutate({mutation:Db,variables:{key:"user_name",value:i,courseId:n}}),e.mutate({mutation:Db,variables:{key:"course_title",value:t,courseId:n}}),e.mutate({mutation:Db,variables:{key:"cpd_value",value:a||0,courseId:n}}),e.mutate({mutation:Db,variables:{key:"pass_score",value:r||0,courseId:n}}),o&&o!==mr||e.mutate({mutation:zb,variables:{userId:l,courseId:n,courseProgress:fr}}).then(()=>s())},LMSFinish:e=>{console.log("TCL: InitialiseScormApi -> initialise -> arg",e)},LMSGetValue:e=>{const n=this.getValueByKey(e);return(n?n.value:n)||""},LMSSetValue:(t,a)=>{e.mutate({mutation:Db,variables:{key:t,value:a,courseId:n}}),"cmi.core.lesson_status"!==t||"passed"!==a&&"completed"!==a||e.mutate({mutation:zb,variables:{userId:l,courseId:n,courseProgress:yr}}).then(()=>{s(),c()})},LMSCommit:()=>{},LMSGetLastError:()=>{},LMSGetErrorString:()=>{},LMSGetDiagnostic:()=>{}}}getValueByKey(e){return this.startupData.find(n=>n.key===e)}};var Wb,qb=t(95115),Jb=t(66546);const Yb=Ge.default.iframe(Wb||(Wb=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding-top: 50px;\n  width: 100%;\n  height: 100%;\n"]))),Hb=(0,Ib.W)(e=>{let{course:n,link:t,client:a,courseRefetch:r,onCompleted:i}=e;const o=n.userCourseMetaData?n.userCourseMetaData.courseProgress:mr,l={courseId:n.id};return(0,Ze.jsx)(qb.X,{query:Ab,variables:l,fetchPolicy:"network-only",children:e=>{let{data:s,loading:c,error:d,refetch:u}=e;return c?null:d?(0,Ze.jsx)(ub,{error:d,retry:()=>u(l)}):(new $b(s.getAllCourseData).initialise(a,n.id,n.name,n.metaData.cpd,n.metaData.passScore,(()=>{const e=localStorage.getItem("ID_TOKEN"),{given_name:n,family_name:t}=(0,Jb.A)(e);return"".concat(n," ").concat(t)})(),o,(()=>{const e=localStorage.getItem("ID_TOKEN"),{sub:n}=(0,Jb.A)(e);return n})(),r,i),(0,Ze.jsx)(Yb,{src:t}))}})});var Kb;const Qb=Ge.default.div(Kb||(Kb=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n  position: relative;\n  max-height: 100%;\n  height: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"])),e=>e.theme.geometry.xl.spacing),Zb=e=>{let{course:n}=e;return(0,Ze.jsx)(Qb,{children:(0,Ze.jsx)("iframe",{title:"engage",src:n.metaData.url,width:"100%",height:"100%"})})},Xb=e=>{let{course:n,link:t,onCompleted:a,courseRefetch:r=()=>{}}=e;return n.type===Vt.US.Video?(0,Ze.jsx)(Bb,{course:n,courseRefetch:r,onCompleted:a}):n.type===Vt.US.Scorm?(0,Ze.jsx)(Hb,{course:n,link:t,courseRefetch:r,onCompleted:a}):n.type===Vt.US.Url?(0,Ze.jsx)(Zb,{course:n}):null},eh=["icon","iconColor","breadcrumb","title","children"];var nh,th,ah,rh,ih,oh;function lh(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function sh(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?lh(Object(t),!0).forEach(function(n){ch(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):lh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ch(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function dh(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const uh=(0,Ge.default)(ze.fI)(nh||(nh=dh(["\n  flex: 0 0 auto;\n  align-items: center;\n  padding: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.overlay.normal.background),ph=Ge.default.div(th||(th=dh(["\n  display: flex;\n  align-items: center;\n  padding-right: ",";\n  width: 100%;\n"])),e=>e.theme.geometry.md.spacing),mh=(0,Ge.default)(ze.GQ)(ah||(ah=dh(["\n  margin-right: ",";\n  display: inline-flex;\n"])),e=>e.theme.geometry.sm.spacing),fh=Ge.default.div(rh||(rh=dh(["\n  display: flex;\n  flex-direction: column;\n"]))),yh=(0,Ge.default)(ze.Yq)(ih||(ih=dh(["\n  text-decoration: none;\n"]))),gh=Ge.default.div(oh||(oh=dh(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.sm.spacing),bh=e=>{let{icon:n,iconColor:t,breadcrumb:a,title:r,children:i}=e,o=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,eh);return(0,Ze.jsxs)(uh,sh(sh({container:!0,alignItems:"center"},o),{},{children:[(r||n)&&(0,Ze.jsxs)(ph,{children:[n&&"string"==typeof n||Array.isArray(n)?(0,Ze.jsx)(mh,{inline:!0,height:"50px",size:"xl",circleColor:t,iconColor:t,icon:n}):n&&(0,Ze.jsx)(gh,{children:n}),(0,Ze.jsxs)(fh,{children:[a&&a.length>0&&(0,Ze.jsx)(ze.BI,{children:a.map(e=>(0,Ze.jsx)(yh,{size:"sm",component:"routerLink",to:e.to,inline:!0,children:e.title},e.key||e.to||e.title))}),r&&(0,Ze.jsx)(ze.DZ,{children:r})]})]}),i]}))};var hh,vh,xh,Th;function Oh(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const kh=Ge.default.div(hh||(hh=Oh(["\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  padding: 30px 20px;\n"]))),jh=(0,Ge.default)(ze.$n)(vh||(vh=Oh(["\n  margin-right: ",";\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),Ch=(0,Ge.default)(ze.DZ)(xh||(xh=Oh(["\n  padding: 30px 30px 0px 30px;\n"]))),Sh=Ge.default.div(Th||(Th=Oh(["\n  color: ",";\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  padding: 0px 30px;\n"])),e=>e.theme.colors.neutral.dark.background),Nh=e=>{let{onDismissClick:n,onConfirmClick:t,deleteObjectName:a}=e;return(0,Ze.jsxs)(ze.aF,{height:"auto",maxHeight:"80vh",show:!0,onDismiss:n,children:[(0,Ze.jsxs)(Ch,{children:["Delete ",(0,zt.capitalize)(a)]}),(0,Ze.jsxs)(Sh,{children:["This action will permanently delete this ",a,". Do you want to proceed?"]}),(0,Ze.jsxs)(kh,{children:[(0,Ze.jsx)(jh,{onClick:t,color:"danger","data-testid":"Confirm_Deletion_Button",children:"Delete"}),(0,Ze.jsx)(jh,{onClick:n,"data-testid":"Abort_Deletion_Button",children:"Cancel"})]})]})},wh=()=>{const e=(0,m.r5)();return(0,g.useEffect)(()=>{window.console.error(e),de.Cp(e)},[e]),e?(0,Ze.jsx)(ub,{retry:()=>{window.location.reload()},error:e}):null};var Dh;const Ah=(0,f.styled)("div")(Dh||(Dh=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n"]))),Rh=()=>{const e=(0,m.r5)();return(0,g.useEffect)(()=>{window.console.error(e),de.Cp(e)},[e]),e?(0,Ze.jsx)(Ah,{children:(0,Ze.jsx)(f.LoadFailed,{title:"This page failed to load",error:e})}):null};var Ph,Lh,Ih,Eh,_h;function Fh(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Bh=Ge.default.div(Ph||(Ph=Fh(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n  flex: auto;\n"]))),Uh=(0,Ge.default)(ze.In)(Lh||(Lh=Fh(["\n  color: ",";\n  height: 50px;\n  width: 50px;\n  margin-bottom: 40px;\n"])),e=>e.theme.colors.neutral.light.text),Mh=(0,Ge.default)(ze.EY)(Ih||(Ih=Fh(["\n  width: 500px;\n  text-align: center;\n  color: #4d505b;\n"]))),Vh=(0,Ge.default)(Mh)(Eh||(Eh=Fh(["\n  font-size: 32px;\n  line-height: 39px;\n  margin-bottom: 23px;\n"]))),zh=(0,Ge.default)(Mh)(_h||(_h=Fh(["\n  font-size: 16px;\n  line-height: 19.49px;\n  letter-spacing: -0.005em;\n"])));function Gh(e){let{title:n,description:t,icon:a}=e;return(0,Ze.jsxs)(Bh,{children:[(0,Ze.jsx)(Uh,{color:"#83838e",icon:a}),(0,Ze.jsx)(Vh,{children:n}),(0,Ze.jsx)(zh,{size:"sm",children:t})]})}var $h;const Wh=(0,D.J1)($h||($h=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(['\n  query GetAccounts(\n    $offset: Int = 0, \n    $limit: Int = 25,\n    $sort: [SortCommand!] = [{ field: "name", order: "asc" }]\n    $filters: Filters = {}\n  ) {\n    getAccounts(offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n      }\n    }\n  }\n']))),qh=["onChange","value","allAccountsOption","customOption","isMulti","name"];function Jh(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Yh(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Jh(Object(t),!0).forEach(function(n){Hh(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Jh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Hh(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Kh=e=>{var n;let{onChange:t,value:a,allAccountsOption:r,customOption:i,isMulti:o,name:l="AccountSelector"}=e,s=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,qh);const c=rc(),d=Pu(),u=rt(),p=(0,g.useMemo)(()=>c.account.includes("getAll"),[c]),{loading:m,error:f,data:y}=(0,h.IT)(Wh,{variables:{limit:9999},skip:!p}),b=(0,g.useMemo)(()=>{var e;if(null==y||null===(e=y.getAccounts)||void 0===e||!e.rows||!d)return[];const n=y.getAccounts.rows.map(e=>({value:e.id,label:e.name}));return r&&n.unshift({value:"ALL_ACCOUNTS",label:"All Accounts"}),i&&!n.find(e=>e.value===i.value)&&n.unshift(i),n.find(e=>e.value===u)||n.unshift({value:u,label:null==d?void 0:d.name}),n},[null==y||null===(n=y.getAccounts)||void 0===n?void 0:n.rows,d,r,i,u]);return p?m?(0,Ze.jsx)(ze.l6,Yh(Yh({},s),{},{placeHolder:"Loading"})):f?(0,Ze.jsx)(ze.Kw,{error:f,children:e=>{let{icon:n}=e;return(0,Ze.jsx)(ze.Wz,{name:"AccountSelector__error",icon:n,title:"Account selector failed to load"})}}):(0,Ze.jsx)(ze.l6,Yh(Yh({},s),{},{value:Array.isArray(a)?a.map(e=>b.find(n=>n.value===e)):a,name:l,onChange:e=>{t&&t(o?e.target.select.map(e=>{let{value:n,label:t}=e;return{name:t,id:n}}):{name:e.target.label,id:e.target.value})},options:b,defaultOptions:b,isMulti:o})):null},Qh=e=>({value:e.id,label:e.title}),Zh=e=>{let{value:n,onChange:t,error:a=""}=e;const{showNotification:r}=vt(),{error:i,data:o}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,h.IT)(Kp,e)}({onError:()=>r("Error occurred while loading options:","danger")}),[l,s]=(0,g.useState)([]);return(0,g.useEffect)(()=>{if(i)s([]);else{const e=((null==o?void 0:o.getFlows)||[]).map(Qh);s(e)}},[o,i]),(0,Ze.jsx)(ze.l6,{id:"AddFlow__Select",name:"FlowSelect",placeholder:"Please select a flow",multiValueColor:"tertiary",defaultValue:n,defaultOptions:!0,onChange:t,classPrefix:"user-select",error:a,options:l})};var Xh;const ev=(0,Ge.default)(ze.fI)(Xh||(Xh=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  background: ",";\n"])),e=>"".concat(e.theme.geometry.md.spacing," ").concat(e.theme.geometry.sm.spacing),e=>e.theme.colors.overlay.normal.background,e=>"".concat(e.theme.colors.danger.light.background)),nv=e=>{let{id:n,title:t}=e;return(0,Ze.jsx)(ev,{name:"noresults-row--".concat(n),container:!0,itemAlign:"center",children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{name:"noresults-row__title--".concat(n),size:"md",children:t})})})};function tv(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function av(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tv(Object(t),!0).forEach(function(n){rv(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tv(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rv(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function iv(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";class i extends g.Component{constructor(){return super(...arguments),this.state={runTour:!0},this.updateTourStatus=e=>{const t=this.getTourStatus();t[n]=e,localStorage.setItem("TOUR_STATUS",JSON.stringify(t))},this.getTourStatus=()=>{let e=localStorage.getItem("TOUR_STATUS");return e||(localStorage.setItem("TOUR_STATUS",'{"'.concat(n,'": false}')),e=localStorage.getItem("TOUR_STATUS")),JSON.parse(e)},this.shouldDisplayTour=()=>this.state.runTour&&!this.getTourStatus()[n],this.joyrideHandleClose=e=>{"close"===e.action&&t.onFinish&&t.onFinish(this),"finished"!==e.status&&"skip"!==e.action||this.updateTourStatus(!0)},this}render(){const{intl:n}=this.props,{joyrideOptions:i}=t;i&&(i.scrollToFirstStep="Explore"===this.props.type);const o=av({disableOverlayClose:!0,disableCloseOnEsc:!0,continuous:!0,callback:this.joyrideHandleClose,locale:{close:n.formatMessage({id:t.closeLabel?t.closeLabel:"learnTour.letsGo"}),skip:n.formatMessage({id:"learnTour.skip"}),next:n.formatMessage({id:"learnTour.next"}),back:n.formatMessage({id:"learnTour.back"})}},i),l=(this.props.steps?this.props.steps:a).map(e=>av(av({},e),{},{title:n.formatMessage({id:e.title},{name:r}),content:n.formatMessage({id:e.content})}));return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(e,av({},this.props)),(0,Ze.jsx)(ze.pN,{id:"TourGuide",name:"TourGuide",run:this.shouldDisplayTour(),steps:l,disableBeacon:!0,joyride:o})]})}}return(0,Ye.Ay)(i)}const ov=[{title:"learnTour.explore.item1.title",content:"learnTour.explore.item1.content",placement:"right",target:'[name="Explore-ViewAll"]',textAlign:"left",floaterProps:{disableAnimation:!0},disableBeacon:!0},{title:"learnTour.explore.item2.title",content:"learnTour.explore.item2.content",placement:"auto",target:'[name^="CoursesBanner__Link__"]',textAlign:"left",floaterProps:{disableAnimation:!0},disableBeacon:!0}],lv=[{title:"learnTour.preview.item1.title",content:"learnTour.preview.item1.content",placement:"auto",target:'[name="StartCourse-Button"]',textAlign:"left",floaterProps:{disableAnimation:!0},disableBeacon:!0}];function sv(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function cv(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sv(Object(t),!0).forEach(function(n){dv(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sv(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dv(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const uv=e=>n=>{const t=rc();return(0,Ze.jsx)(e,cv(cv({},n),{},{permissions:t}))};function pv(e,n,t){const a={};return e.questions.forEach(r=>{const i=n[r.id];if(i||(a[r.id]="Please answer the questions"),i<e.scale.min&&(a[r.id]="Can't be less than ".concat(e.scale.min)),i>e.scale.max&&(a[r.id]="Can't be greater than ".concat(e.scale.max)),t){const e=t[r.id];i<e&&(a[r.id]="Can't be less than previous answer - ".concat(e))}}),a}var mv,fv,yv,gv,bv,hv,vv,xv,Tv,Ov;function kv(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jv(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kv(Object(t),!0).forEach(function(n){Cv(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kv(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cv(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Sv(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Nv=(0,Ge.default)(ze.fv)(mv||(mv=Sv(["\n  width: 100%;\n  height: 100%;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),wv=(0,Ge.default)(ze.DZ)(fv||(fv=Sv(["\n  flex: 0;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing),Dv=(0,Ge.default)(ze.EY)(yv||(yv=Sv(["\n  flex: 0;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Av=(0,Ge.default)(ze.fI)(gv||(gv=Sv(["\n  flex: 0 1 75px;\n  padding: "," 0;\n"])),e=>e.theme.geometry.xs.spacing),Rv=(0,Ge.default)(ze.fI)(bv||(bv=Sv(["\n  flex: 1;\n  overflow: auto;\n"]))),Pv=(0,Ge.default)(ze.fv)(hv||(hv=Sv(["\n  flex: 1;\n"]))),Lv=(0,Ge.default)(ze.EY)(vv||(vv=Sv(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Iv=(0,Ge.default)(ze.fv)(xv||(xv=Sv(["\n  padding-right: ",";\n"])),e=>e.theme.geometry.sm.spacing),Ev=(0,Ge.default)(ze.fI)(Tv||(Tv=Sv(["\n  flex: 0;\n  width: 100%;\n  align-self: flex-end;\n  justify-content: space-between;\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),_v=(0,Ge.default)(ze.$n)(Ov||(Ov=Sv(["\n  flex-basis: 48%;\n  padding-right: ",";\n"])),e=>e.theme.geometry.xs.spacing);function Fv(e,n){return e.reduce((e,t)=>{var a;return jv(jv({},e),{},{[t.id]:null===(a=t.answers)||void 0===a||null===(a=a[n])||void 0===a?void 0:a.value})},{})}function Bv(e){let{evaluation:n,onSubmit:t,onGoNext:a,goNextButtonTitle:r,reevaluation:i,type:o,isSubmitting:l}=e;const[s,c]=(0,g.useState)(Fv(n.questions,0)),[d,u]=(0,g.useState)(Fv(n.questions,1)),[p,m]=(0,g.useState)({}),f=n.questions.every(e=>{var n;return(null==e||null===(n=e.answers)||void 0===n?void 0:n.length)>=1}),y=n.questions.every(e=>{var n;return(null==e||null===(n=e.answers)||void 0===n?void 0:n.length)>=2});return(0,Ze.jsxs)(Nv,{container:!0,children:[(0,Ze.jsx)(wv,{align:"center",children:n.name}),(0,Ze.jsx)(Dv,{children:n.description}),(0,Ze.jsx)(Rv,{container:!0,item:!0,children:(0,Ze.jsx)(Pv,{container:!0,item:!0,children:n.questions.map((e,t)=>(0,Ze.jsxs)(Av,{item:!0,container:!0,children:[(0,Ze.jsx)(ze.fv,{span:i?8:10,vdistribution:"center",container:!0,item:!0,children:(0,Ze.jsxs)(ze.EY,{children:[(0,Ze.jsxs)(Lv,{weight:"bold",inline:!0,children:["Q",t+1,":"]}),e.text]})}),(0,Ze.jsx)(Iv,{span:2,item:!0,children:(0,Ze.jsx)(ze.ks,{type:"number",min:n.scale.min,max:n.scale.max,value:s[e.id],error:i?null:p[e.id],placeholder:"".concat(n.scale.min,"-").concat(n.scale.max),disabled:f,onChange:n=>{c(jv(jv({},s),{},{[e.id]:n.target.value}))}})}),i&&(0,Ze.jsx)(Iv,{span:2,item:!0,children:(0,Ze.jsx)(ze.ks,{type:"number",min:n.scale.min,max:n.scale.max,value:d[e.id],error:p[e.id],placeholder:"".concat(s[e.id]||n.scale.min,"-").concat(n.scale.max),disabled:y,onChange:n=>{u(jv(jv({},d),{},{[e.id]:n.target.value}))}})})]},e.id))})}),(0,Ze.jsxs)(Ev,{container:!0,item:!0,children:[(0,Ze.jsx)(_v,{color:"secondary",onClick:a,children:r}),(0,Ze.jsxs)(_v,{color:"success",disabled:l||(i?y:f),onClick:()=>{const e=i?d:s,a=pv(n,e,i?s:null);if(Object.keys(a).length)return m(a);Object.keys(p).length&&m({}),t(Object.keys(e).map(n=>({questionId:n,value:e[n]})))},children:["Submit ",o]})]})]})}function Uv(e,n){const{token:t}=at(),[a]=(0,Ot.n)(zb,{onCompleted:n});return async()=>{if((e.userCourseMetaData?e.userCourseMetaData.courseProgress:mr)!==yr){const n={userId:t.sub,courseId:e.id,courseProgress:yr};await a({variables:n})}}}function Mv(e,n,t){const a=Uv(e,t);return async()=>{await a(),await Ar(n)}}var Vv,zv,Gv;function $v(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Wv=(0,D.J1)(Vv||(Vv=$v(["\n  fragment EvaluationFields on Evaluation {\n    id\n    name\n    description\n    type\n    accountId\n    scale {\n      min\n      max\n    }\n    questions {\n      id\n      text\n    }\n  }\n"]))),qv=(0,D.J1)(zv||(zv=$v(["\n  query getAllEvaluations($accountId: ID) {\n    getAllEvaluations(accountId: $accountId) {\n      ...EvaluationFields\n    }\n  }\n  ","\n"])),Wv),Jv=(0,D.J1)(Gv||(Gv=$v(["\n  mutation createEvaluation($input: CreateEvaluationInput!) {\n    createEvaluation(input: $input) {\n      ...EvaluationFields\n    }\n  }\n  ","\n"])),Wv);var Yv,Hv,Kv,Qv,Zv,Xv;function ex(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const nx=(0,D.J1)(Yv||(Yv=ex(["\n  fragment BannersFields on Banner {\n    accountId\n    name\n    type\n    url\n    thumbnail\n  }\n"]))),tx=(0,D.J1)(Hv||(Hv=ex(["\n  query GetAvailableCourses($accountId: String!, $pageNumber: Int!, $userId: ID) {\n    getAvailableCourses(accountId: $accountId, pageNumber: $pageNumber, userId: $userId) {\n      isLastPage\n      totalItemCount\n      data {\n        id\n        name\n        type\n        accountId\n        bundleIdList\n        metaData {\n          viewed\n          link\n          thumbnail\n          cpd\n          description\n          categories\n        }\n        userCourseMetaData(userId: $userId) {\n          lastUpdatedAt\n          courseProgress\n        }\n      }\n      learnBundleList {\n        id\n        title\n        description\n        restricted\n        startDate\n        endDate\n        courses\n        isBundleHidden\n        isbBundleShow\n        isMandatoryBundle\n      }\n    }\n  }\n"]))),ax=(0,D.J1)(Kv||(Kv=ex(["\n  query SearchCourses($accountId: String!, $pageNumber: Int!, $searchTerm: String!, $userId: ID, $section: String!) {\n    searchCourses(\n      accountId: $accountId\n      pageNumber: $pageNumber\n      searchTerm: $searchTerm\n      section: $section\n      userId: $userId\n    ) {\n      isLastPage\n      totalItemCount\n      data {\n        id\n        name\n        type\n        accountId\n        bundleIdList\n        metaData {\n          viewed\n          link\n          thumbnail\n          cpd\n          categories\n        }\n        userCourseMetaData(userId: $userId) {\n          lastUpdatedAt\n          courseProgress\n        }\n      }\n    }\n\n    getLearnBundlesForAccount(accountId: $accountId) {\n      id\n      title\n      description\n      restricted\n      startDate\n      endDate\n      courses\n      isBundleHidden\n      isbBundleShow\n      isMandatoryBundle\n    }\n  }\n"]))),rx=(0,D.J1)(Qv||(Qv=ex(["\n  query SearchCoursesWithOneBundle(\n    $accountId: String!\n    $pageNumber: Int!\n    $searchTerm: String!\n    $userId: ID\n    $section: String!\n    $bundleId: String!\n  ) {\n    searchCourses(accountId: $accountId, pageNumber: $pageNumber, searchTerm: $searchTerm, section: $section) {\n      isLastPage\n      totalItemCount\n      data {\n        id\n        name\n        type\n        accountId\n        bundleIdList\n        metaData {\n          viewed\n          link\n          thumbnail\n          cpd\n          categories\n        }\n        userCourseMetaData(userId: $userId) {\n          lastUpdatedAt\n          courseProgress\n        }\n      }\n    }\n    getLearnBundleById(accountId: $accountId, bundleId: $bundleId) {\n      id\n      title\n      description\n      restricted\n      startDate\n      endDate\n      courses\n      isBundleHidden\n      isbBundleShow\n      isMandatoryBundle\n    }\n  }\n"]))),ix=(0,D.J1)(Zv||(Zv=ex(["\n  query GetBanners($accountId: ID!) {\n    getBanners(accountId: $accountId) {\n      ...BannersFields\n    }\n  }\n  ","\n"])),nx),ox=(0,D.J1)(Xv||(Xv=ex(["\n  query GetCourseById($id: ID!, $userIdNullable: ID, $userId: ID!, $accountId: ID!) {\n    getCourseById(id: $id, accountId: $accountId) {\n      name\n      id\n      type\n      accountId\n      metaData {\n        link\n        viewed\n        thumbnail\n        description\n        timeToComplete\n        progress\n        duration\n        views\n        highQualityLink\n        lowQualityLink\n        downloadLink\n        cpd\n        passScore\n        categories\n        url\n        openIframe\n      }\n      assessment {\n        ...EvaluationFields\n        questions {\n          id\n          text\n          answers(userId: $userId, courseId: $id) {\n            givenAt\n            value\n          }\n        }\n      }\n      reaction {\n        ...EvaluationFields\n        questions {\n          id\n          text\n          answers(userId: $userId, courseId: $id) {\n            givenAt\n            value\n          }\n        }\n      }\n      userCourseMetaData(userId: $userIdNullable) {\n        lastUpdatedAt\n        courseProgress\n      }\n    }\n  }\n  ","\n"])),Wv);var lx,sx,cx,dx;function ux(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function px(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ux(Object(t),!0).forEach(function(n){mx(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ux(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mx(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function fx(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yx=(0,Ge.default)(ze.fv)(lx||(lx=fx(["\n  height: 100%;\n"]))),gx=(0,Ge.default)(ze.fI)(sx||(sx=fx(["\n  display: flex;\n  flex: auto;\n  height: auto;\n\n  iframe {\n    min-height: 90vh;\n  }\n"]))),bx=(0,Ge.default)(ze.fI)(cx||(cx=fx(["\n  padding: ",";\n  justify-content: space-between;\n  align-self: flex-end;\n  flex: 0 0 auto;\n  width: 100%;\n"])),e=>e.theme.geometry.md.spacing),hx=(0,Ge.default)(ze.$n)(dx||(dx=fx(["\n  flex-basis: 48%;\n  padding-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),vx={display:"block"};function xx(e){var n,t;let{onDismiss:a,course:r,link:i,courseRefetch:o=()=>{}}=e;const l=null===(n=r.assessment)||void 0===n||null===(n=n.questions)||void 0===n||null===(t=n.every)||void 0===t?void 0:t.call(n,e=>{var n;return(null===(n=e.answers)||void 0===n?void 0:n.length)>=1}),[s,c]=(0,g.useState)(null),[d,u]=(0,g.useState)(r.assessment?0:1),[p,m]=(0,g.useState)(!1),f=rt(),[y,{loading:b}]=(0,Ot.n)(Gb,{onError:e=>{c({color:"danger",message:e.message})}}),h=Mv(r,i,o),{token:v}=at(),x=(e,n)=>t=>{t.writeQuery({query:ox,variables:{accountId:f,id:r.id,userId:v.sub,userIdNullable:v.sub},data:{getCourseById:px(px({},r),{},{[n]:px(px({},r[n]),{},{questions:r[n].questions.map(n=>{const t=e.find(e=>e.questionId===n.id),a=n.answers||[];return px(px({},n),{},{answers:a.concat([{givenAt:(new Date).toISOString(),value:t.value,__typename:"Answer"}])})})})})}})};return(0,Ze.jsxs)(ze.aF,{height:"auto",maxHeight:"100%",minHeight:"-webkit-fill-available",span:12,onDismiss:a,style:vx,show:!0,children:[0===d&&(0,Ze.jsx)(Bv,{type:"Pre-assessment",goNextButtonTitle:p?"Go to Post-assessment":"Go to Course",evaluation:r.assessment,onSubmit:async e=>{await y({variables:{answers:e,userId:v.sub,courseId:r.id,evaluationId:r.assessment.id},update:x(e,"assessment")}),o()},onGoNext:async()=>{r.type===Vt.US.Pdf?p?u(2):(await h(),m(!0)):u(1)},isSubmitting:b}),1===d&&(0,Ze.jsxs)(yx,{container:!0,children:[(0,Ze.jsx)(gx,{item:!0,children:(0,Ze.jsx)(Xb,{course:r,link:i,courseRefetch:o,onCompleted:()=>{r.assesment&&l&&u(2)}})}),r.assessment&&l&&(0,Ze.jsxs)(bx,{container:!0,item:!0,children:[(0,Ze.jsx)(hx,{color:"secondary",onClick:()=>{u(2)},children:"Go to Post-assessment"}),(0,Ze.jsx)(hx,{color:"info",onClick:a,children:"Close"})]}),!r.assessment&&r.reaction&&(0,Ze.jsxs)(bx,{container:!0,item:!0,children:[(0,Ze.jsx)(hx,{color:"secondary",onClick:()=>{u(3)},children:"Go to Reaction"}),(0,Ze.jsx)(hx,{color:"info",onClick:a,children:"Close"})]})]}),2===d&&(0,Ze.jsx)(Bv,{type:"Post-assessment",goNextButtonTitle:r.reaction?"Go to reaction":"Close",evaluation:r.assessment,onSubmit:async e=>{await y({variables:{answers:e,userId:v.sub,courseId:r.id,evaluationId:r.assessment.id},update:x(e,"assessment")})},onGoNext:()=>{r.reaction?u(3):a()},isSubmitting:b,reevaluation:!0}),3===d&&(0,Ze.jsx)(Bv,{type:"Reaction",goNextButtonTitle:"Close",evaluation:r.reaction,onSubmit:async e=>{await y({variables:{answers:e,userId:v.sub,courseId:r.id,evaluationId:r.reaction.id},update:x(e,"reaction")})},isSubmitting:b,onGoNext:a}),s&&(0,Ze.jsx)(ze.Eg,{color:s.color,name:s.message,show:!0,children:s.message})]})}var Tx;const Ox=(0,Ge.default)(ze.$n)(Tx||(Tx=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-top: ",";\n  border-radius: 0;\n"])),e=>e.theme.geometry.md.spacing),kx=(0,Ye.Ay)(iv(function(e){let{course:n,downloadLink:t,handleType:a,courseRefetch:r,component:i,name:o,intl:l}=e;const[s,c]=(0,g.useState)(!1),d=i||Ox,u=Uv(n,r),p=Mv(n,t,r),m=a===Jr&&null===n.assessment;return(0,Ze.jsxs)(Ze.Fragment,{children:[s&&(0,Ze.jsx)(xx,{onDismiss:()=>{c(!1)},course:n,link:t,courseRefetch:r}),(0,Ze.jsx)(d,{color:"success",component:m?"a":"button",target:"_blank",pill:!1,rel:"noopener noreferrer",inline:!0,name:o,onClick:()=>{m?p():a===qr?(u(),window.open(n.metaData.url,"_blank")):a===Wr?(u(),c(!0)):c(!0)},children:m?"Download PDF":l.formatMessage({id:"pages.coursesPreview.startCourse"})})]})},"learn.preview",{closeLabel:"learnTour.close",joyrideOptions:{scrollToFirstStep:!1}}));var jx,Cx,Sx,Nx,wx,Dx,Ax,Rx,Px,Lx,Ix,Ex,_x,Fx=t(24257);function Bx(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ux=Ge.default.div(jx||(jx=Bx(["\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  right: 0px;\n  bottom: 0px;\n"]))),Mx=Ge.default.div(Cx||(Cx=Bx(["\n  flex: 0 0 auto;\n  height: 100%;\n  margin-left: auto;\n  border-left: 1px solid ",";\n"])),e=>e.theme.colors.overlay.normal.background),Vx=(0,Ge.default)(ze.fI)(Sx||(Sx=Bx(["\n  flex: 0 0 auto;\n  height: 100%;\n  padding: 0 ",";\n  &:hover {\n    cursor: pointer;\n    background: ",";\n  }\n"])),e=>e.theme.geometry.sm.spacing,e=>{let{theme:n}=e;return n.colors.overlay.light.background}),zx=(0,Ge.default)(ze.Y3)(Nx||(Nx=Bx(["\n  flex: 0 0 auto;\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Gx=(0,Ge.default)(ze.fI)(wx||(wx=Bx(["\n  flex: 0 0 auto;\n"]))),$x=(0,Ge.default)(ze.EY)(Dx||(Dx=Bx(["\n  flex: 0 0 auto;\n"]))),Wx=(0,Ge.default)(ze.In)(Ax||(Ax=Bx(["\n  flex: 0 0 auto;\n  margin-left: ",";\n  color: ",";\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.colors.text.normal.background),qx=(0,Ge.keyframes)(Rx||(Rx=Bx(["\n  0% { opacity: 0.4; }\n  40% { opacity: 0.15; } \n  100% { opacity: 0.4; } \n"]))),Jx=(0,Ge.css)(Px||(Px=Bx(["\n  "," infinite 2s;\n"])),qx),Yx=Ge.default.div(Lx||(Lx=Bx(["\n  height: 44px;\n  width: 44px;\n  background-color: ",";\n  opacity: 0.4;\n  border-radius: 5000px;\n  animation: ",";\n"])),e=>e.theme.colors.overlay.dark.background,Jx),Hx=Ge.default.div(Ix||(Ix=Bx(["\n  margin-left: ",";\n  height: ",";\n  width: ",";\n  background-color: ",";\n  opacity: 0.4;\n  border-radius: ",";\n  animation: "," infinite 2s;\n  animation-delay: 0.1s;\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.fonts.md.size,e=>e.width,e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.md.radius,qx),Kx=Ge.default.div(Ex||(Ex=Bx(["\n  border-radius: 5px;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n  background: ",";\n  border: 1px solid ",";\n  border-top: 0;\n  box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.4);\n"])),e=>{let{theme:n}=e;return n.colors.basic.white},e=>{let{theme:n}=e;return n.colors.overlay.normal.background}),Qx=(0,Ge.default)(ze.Yq)(_x||(_x=Bx(["\n  padding: ",";\n  padding-right: ",";\n  border-top: 1px solid ",";\n\n  &:hover {\n    background: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.geometry.md.spacing},e=>{let{theme:n}=e;return n.geometry.xxl.spacing},e=>{let{theme:n}=e;return n.colors.overlay.normal.background},e=>{let{theme:n}=e;return n.colors.overlay.light.background}),Zx=()=>{const[e,n]=(0,g.useState)({showDropdown:!1}),{data:t}=Yp(),a=()=>n({showDropdown:!e.showDropdown}),r=(e,n)=>{const t="".concat(e," ").concat(n);return t.length>25?"".concat(t.slice(0,22),"..."):t},i=()=>{localStorage.removeItem("TOUR_STATUS")},o=rc(),{showDropdown:l}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[l&&(0,Ze.jsx)(Ux,{onClick:a}),(0,Ze.jsx)(Fx.A,{style:{"z-index":"1"},attachment:"bottom right",targetAttachment:"top right",constraints:[{to:"scrollParent",attachment:"together"}],renderTarget:e=>t?(0,Ze.jsx)(Mx,{name:"AccountDropdown__User",container:!0,ref:e,children:(0,Ze.jsxs)(Vx,{container:!0,itemAlign:"center",onClick:a,children:[(0,Ze.jsx)(zx,{name:"AccountDropdown__User-Name",size:"xxs",src:t.profilePicture,accountName:t.first_name}),(0,Ze.jsxs)(Gx,{container:!0,itemAlign:"center",children:[(0,Ze.jsx)($x,{name:"AccountDropdown__User-Name",inline:!0,size:"md",children:r(t.first_name,t.last_name)}),(0,Ze.jsx)(Wx,{icon:"chevron-down"})]})]})}):(0,Ze.jsxs)(Mx,{ref:e,name:"AccountDropdown__User--Placeholder",container:!0,itemAlign:"center",onClick:a,children:[(0,Ze.jsx)(Yx,{name:"AccountDropdown__User-Image--Placeholder"}),(0,Ze.jsx)(Hx,{width:"70px",name:"AccountDropdown__User-Name--Placeholder"}),(0,Ze.jsx)(Hx,{width:"16px"})]}),renderElement:e=>l&&(0,Ze.jsxs)(Kx,{ref:e,children:[(0,Ze.jsx)(Qx,{name:"AccountDropdown__Link--Profile",underline:!1,color:"dark",component:"routerLink",to:"/profile",children:(0,Ze.jsx)(Je.A,{id:"home.myProfile"})}),(0,Ze.jsx)(Qx,{name:"AccountDropdown__Link--Contact",underline:!1,color:"dark",component:"routerLink",to:"/contact",children:(0,Ze.jsx)(Je.A,{id:"home.contact"})}),o.account.includes("getAll")&&(0,Ze.jsx)(Qx,{name:"AccountDropdown__Link--ResetTours",underline:!1,color:"dark",onClick:i,children:"Reset tours"}),(0,Ze.jsx)(Qe.s,{mutation:Y,children:e=>(0,Ze.jsx)(Qx,{name:"AccountDropdown__Link--Logout",underline:!1,color:"dark",component:"routerLink",to:"/logout",onClick:e,children:(0,Ze.jsx)(Je.A,{id:"home.logoutButtonLabel"})})})]})})]})};var Xx,eT,nT,tT,aT;function rT(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const iT=(0,Ge.default)(ze.fI)(Xx||(Xx=rT(["\n  flex: 0 0 auto;\n  width: 100%;\n  height: 70px;\n  background-color: ",";\n  border-bottom: 1px solid ",";\n  position: relative;\n"])),e=>e.theme.colors.basic.white,e=>e.theme.colors.overlay.normal.background),oT=(0,Ge.default)(p.Link)(eT||(eT=rT(["\n  flex: 1;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n"]))),lT=Ge.default.div(nT||(nT=rT(["\n  position: relative;\n  background: no-repeat center center / contain url(",");\n  height: 44px;\n  width: 88px;\n  background-size: 88px 44px;\n"])),On),sT=(0,Ge.default)(p.NavLink)(tT||(tT=rT([""]))),cT=(0,Ge.default)(ze.$n)(aT||(aT=rT(["\n  display: inline-block;\n  max-width: 160px;\n  font-size: 14px;\n  width: auto;\n  padding: 12px 10px;\n  margin-right: ",";\n  position: relative;\n"])),e=>{let{theme:n}=e;return n.geometry.md.spacing}),dT=()=>(0,Ze.jsxs)(iT,{container:!0,distribution:"center",itemAlign:"center",children:[(0,Ze.jsx)(oT,{to:"/home",children:(0,Ze.jsx)(lT,{})}),(0,Ze.jsx)(sT,{to:"/upgrade/courses",children:(0,Ze.jsx)(cT,{name:"AccountDropdown__Upgrade",children:"Buy Courses"})}),(0,Ze.jsx)(Zx,{})]});var uT=t(96625),pT=t.n(uT);const mT=["account","onClick"];var fT;function yT(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gT(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const bT=Ge.default.img(fT||(fT=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 70px;\n  object-fit: contain;\n"])));function hT(e){let{account:n,onClick:t}=e,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,mT);return(0,Ze.jsx)(bT,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yT(Object(t),!0).forEach(function(n){gT(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yT(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({alt:On,src:n.logoPath||On,onClick:t},a))}var vT,xT,TT,OT,kT,jT,CT,ST,NT,wT;function DT(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const AT=(0,Ge.keyframes)(vT||(vT=DT(["\n  0% { opacity: 0.4; }\n  40% { opacity: 0.15; } \n  100% { opacity: 0.4; } \n"]))),RT=(0,Ge.css)(xT||(xT=DT(["\n  "," infinite 2s;\n"])),AT),PT=Ge.default.div(TT||(TT=DT(["\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  right: 0px;\n  bottom: 0px;\n"]))),LT=Ge.default.div(OT||(OT=DT(["\n  height: ",";\n  width: ",";\n  background-color: ",";\n  opacity: 0.4;\n  border-radius: ",";\n  animation: ",";\n  animation-delay: 0.1s;\n"])),e=>e.theme.fonts.md.size,e=>e.width,e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.md.radius,RT),IT=Ge.default.div(kT||(kT=DT(["\n  position: relative;\n  display: ",";\n  padding: ",";\n  flex: 1 1 auto;\n  flex-direction: column;\n  place-content: stretch center;\n  &:hover {\n    cursor: ",";\n    background: ",";\n  }\n"])),e=>{let{collapsed:n}=e;return n?"none":"flex"},e=>e.theme.geometry.md.spacing,e=>e.clickable?"pointer":"default",e=>e.clickable?e.theme.colors.overlay.light.background:"initial"),ET=Ge.default.ul(jT||(jT=DT(["\n  position: absolute;\n  top: 100%;\n  left: 0;\n  display: flex;\n  flex-direction: column;\n  flex-wrap: nowrap;\n  width: 300px;\n  max-height: 350px;\n  overflow-y: auto;\n  background-color: white;\n"]))),_T=Ge.default.li(CT||(CT=DT(["\n  display: flex;\n  width: 100%;\n  height: 70px;\n  min-height: 70px;\n  align-items: center;\n  padding-left: ",";\n  padding-top: ",";\n  padding-bottom: ",";\n  border-top: 1px solid ",";\n\n  border-radius: 5px;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n  background: ",";\n  border: 1px solid ",";\n  border-top: 0;\n  box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.4);\n\n  &:hover {\n    cursor: pointer;\n    background: ",";\n  }\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.xs.spacing,e=>{let{theme:n}=e;return n.colors.overlay.normal.background},e=>{let{theme:n}=e;return n.colors.basic.white},e=>{let{theme:n}=e;return n.colors.overlay.normal.background},e=>{let{theme:n}=e;return n.colors.overlay.light.background}),FT=Ge.default.div(ST||(ST=DT(["\n  min-width: 110px;\n  max-width: 110px;\n  height: 100%;\n"]))),BT=Ge.default.img(NT||(NT=DT(["\n  min-width: 110px;\n  max-width: 110px;\n  height: 100%;\n"]))),UT=Ge.default.span(wT||(wT=DT(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),MT=(0,Ib.W)(()=>{const{token:e}=at(),n="collapsed"===localStorage.getItem("SIDEBAR_COLLAPSED"),[t,a]=(0,g.useState)(!0),r=e=>{"Sidebar__AccountSection__AcountName--Container"===e.target.id||"Sidebar__AccountSection__AcountName--Logo"===e.target.id?a(!t):a(!0)},i=rt(),{accountIds:o,accounts:l,user:s}=fy(e.sub),c=s&&s.account,d=!n&&(!c||o.length>1),u=(0,g.useRef)([]),p=(0,g.useCallback)(e=>{const n=Object.keys(l).map(e=>l[e]).sort(Ta).find(n=>n.name.toLowerCase()[0]===e.key);if(n){const e=o.findIndex(e=>e===n.id);u.current[e].scrollIntoView(!1)}},[l,o]);return(0,g.useEffect)(()=>{t?window.removeEventListener("keydown",p):window.addEventListener("keydown",p)},[t,p]),(0,Ze.jsx)(Qe.s,{mutation:Fe,children:e=>(0,Ze.jsxs)(Ze.Fragment,{children:[!t&&(0,Ze.jsx)(PT,{onClick:r}),(0,Ze.jsx)(Fx.A,{attachment:"bottom left",targetAttachment:"bottom left",constraints:[{to:"scrollParent",attachment:"together"}],renderTarget:e=>(0,Ze.jsx)(IT,{container:!0,item:!0,ref:e,vdistribution:"center",id:"Sidebar__AccountSection__AcountName--Container",collapsed:n,clickable:d,onClick:e=>{d&&r(e)},children:c&&i?l[i]&&(0,Ze.jsx)(hT,{account:l[i],id:"Sidebar__AccountSection__AcountName--Logo"}):(0,Ze.jsx)(LT,{width:"110px",name:"Sidebar__AccountSection__AccountName--Placeholder"})}),renderElement:n=>!t&&(0,Ze.jsx)(ET,{ref:n,children:o.length>1?o.map((n,t)=>{return(0,Ze.jsxs)(_T,{ref:e=>u.current[t]=e,onClick:t=>{e({variables:{currentAccountId:n}}),r(t)},children:[(0,Ze.jsx)(FT,{children:l[n].logoPath?(0,Ze.jsx)(BT,{src:l[n].logoPath}):null}),(0,Ze.jsxs)(UT,{children:[(a=l[n].name,a.length>25?"".concat(a.slice(0,22),"..."):a),n===i?" (Current)":""]})]},n);var a}):null})})]})})});var VT=t(92301);const zT=e=>{const n=[];return e.forEach(e=>{n.push(...e.elements)}),n},GT=e=>{const n=(0,zt.keyBy)(e.submissions,n=>e.isIndividualContributor?n.userId||"":e.isUserGroupContributor?n.userGroupId||"":n.owner.id),t=e.contributors.map(t=>{let{account:a,user:r,userGroup:i}=t,o="";return o=e.isIndividualContributor?(null==r?void 0:r.id)||"":e.isUserGroupContributor?(null==i?void 0:i.id)||"":a.id,n[o]?((e,n)=>{if(null==n||!n.status)return 0;if((null==n?void 0:n.status)!==Vt.ZU.InProgress)return 100;const{surveyJSON:t,answers:a}=((e,n)=>{const t=JSON.parse(e.formContent),a={elements:zT(t.pages)||[]},r=function(e,n){const t={},a=(0,zt.keyBy)(n.questions,"id");return null==e||e.forEach(e=>{const n=a[e.questionId];if(!n)return;const r=n.name,i=JSON.parse(e.answer);t[r]=i}),t}(null==n?void 0:n.answers,e)||{};return{surveyJSON:a,answers:r}})(e,n);if(!t)return;const r=new VT.SurveyModel(t);return r.progressBarType="requiredQuestions",r.data=a,r.getProgress()})(e.template,n[o]):0});return e.contributors.length?(0,zt.round)((0,zt.sum)(t)/t.length,2):0},$T=(e,n)=>{switch(n){case Vt.ZU.Approved:return e.colors.success.normal.background;case Vt.ZU.InProgress:case Vt.ZU.RequiresChanges:case Vt.ZU.ReadyForReview:return e.colors.warning.normal.background;default:return e.colors.danger.normal.background}};function WT(e){let n="Not Started";switch(e){case Vt.ZU.RequiresChanges:n="Changes Requested";break;case Vt.ZU.ReadyForReview:n="Requires Approval";break;case Vt.ZU.InProgress:n="In Progress";break;case Vt.ZU.Approved:n="Complete"}return n}const qT=e=>"ReceivedSurvey"===e.__typename,JT=e=>{if(!e)return!1;const n=Wt()(),t=Wt()().add(5,"days"),a=Wt()(e);return a.isSameOrAfter(n)&&a.isBefore(t)},YT=e=>!!e&&[Vt.ZU.ReadyForReview,Vt.ZU.Approved].includes(e),HT=e=>{const n=Wt()(e).isBefore(Wt()()),t=JT(e);(e=>{if(!e)return!1;const n=Wt()().add(5,"days");Wt()(e).isAfter(n)})(e);let a,r,i="normal";switch(!0){case t:a="#FD919C",i="600",r=!1;break;case n:a="#83838E",r=!0;break;default:a="#4D505B",r=!1}return{color:a,isOverDue:r,fontWeight:i}};function KT(e){return void 0!==e.submissions}const QT=e=>"number"==typeof e||"boolean"==typeof e?e.toString():null===e?"":Array.isArray(e)?e.join(", "):"object"==typeof e?Object.keys(e).map(n=>"".concat(n,": ").concat(e[n])).join(", "):e;var ZT;const XT=Ge.default.span(ZT||(ZT=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  white-space: nowrap;\n  color: ",";\n  &::before {\n    content: '';\n    position: absolute;\n    top: 3px;\n    left: 0;\n    display: block;\n    width: 12px;\n    height: 12px;\n    border-radius: 50%;\n    background-color: ",";\n  }\n"])),e=>e.theme.colors.text.light.text,e=>{let{status:n,theme:t}=e;return $T(t,n)});var eO;const nO=(0,D.J1)(eO||(eO=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetMyContributors($accountId: ID!) {\n    getMySurveyContributors(accountId: $accountId) {\n      __typename\n      ... on AccountSurveyContributor {\n        account {\n          id\n          name\n        }\n        user {\n          id\n          first_name\n          last_name\n          email\n        }\n        userGroup {\n          id\n          name\n        }\n      }\n    }\n  }\n"])));function tO(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function aO(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function rO(e){return Rt(nO,{variables:{accountId:e},keepErrorAfterUnmount:!0})}function iO(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,gs._)(nO,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tO(Object(t),!0).forEach(function(n){aO(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tO(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({variables:{accountId:e}},n))}var oO;function lO(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function sO(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?lO(Object(t),!0).forEach(function(n){cO(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):lO(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function cO(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const dO=(0,Ge.default)(ze.ob)(oO||(oO=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  background-color: red;\n  div ul {\n    z-index: 100;\n  }\n"]))),uO=e=>{let{survey:n,withExportToXLSX:t=!0}=e;const a=rt(),[r]=iO(a),i=(0,m.Zp)(),o=oc(),l=(0,g.useMemo)(()=>"Survey"===n.__typename?"survey":"response",[n]),s=(0,g.useMemo)(()=>{const{pathname:e}=window.location,t=e.includes(o.surveys.sent.contributor.replace("/:contributorId","")),a=e.includes(o.surveys.sent.surveys),r=e.includes(o.surveys.sent.overview),i=e.includes(o.surveys.sent.survey.replace(":surveyId",n.id)),s=e.includes(o.surveys.received.surveys),c=e.includes(o.surveys.received.survey.replace(":surveyId",n.id)),d=e.includes("submission");if(r||i)return"../sent/surveys/".concat(n.id,"/survey-log");if((t||a)&&"survey"===l)return"./".concat(n.id,"/survey-log");if("survey"===l)return"./survey-log";if(d){var u;return"../sent/contributors/".concat(null==n||null===(u=n.submission)||void 0===u||null===(u=u.owner)||void 0===u?void 0:u.id,"/response-log/").concat(n.id)}return c?"./response-log":s?"./".concat(n.id,"/response-log"):"./response-log/".concat(n.id)},[l,n,o]),c=(0,g.useMemo)(()=>{const e=[{text:"View ".concat(l," log"),onClick:e=>{e.stopPropagation(),i(s)}}];return KT(n)&&t&&e.push({text:"Export to XLSX",onClick:async e=>{var t;e.stopPropagation();const{data:a}=await r(),i=(null==a?void 0:a.getMySurveyContributors)||[],o=["contributor",...(null==n||null===(t=n.template)||void 0===t||null===(t=t.questions)||void 0===t?void 0:t.map(e=>"".concat(e.title," - (").concat(e.name,")")))||[]],l=my()(n.template.questions,"id"),s=n.submissions.map(e=>{var t,a,r;const o=i.find(t=>{var a,r;return n.isIndividualContributor?t.account.id===e.owner.id&&(null===(a=t.user)||void 0===a?void 0:a.id)===e.userId:n.isUserGroupContributor?t.account.id===e.owner.id&&(null===(r=t.userGroup)||void 0===r?void 0:r.id)===e.userGroupId:t.account.id===e.owner.id}),s=n.isIndividualContributor?"".concat(null==o||null===(t=o.user)||void 0===t?void 0:t.first_name," ").concat(null==o||null===(a=o.user)||void 0===a?void 0:a.last_name):null==o||null===(r=o.account)||void 0===r?void 0:r.name;return e.answers.reduce((e,n)=>{const t=l[n.questionId];return t?sO(sO({},e),{},{["".concat(t.title," - (").concat(t.name,")")]:JSON.parse(n.answer)}):e},{contributor:s})});Er(o,"".concat(n.name," Results"),s,QT)}}),e},[l,i,s,n,r,t]);return(0,Ze.jsx)(dO,{items:c})};var pO,mO,fO,yO,gO;function bO(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hO=Ge.default.div(pO||(pO=bO(["\n  flex: 1 1 auto;\n  // Fallbacks for IE\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-self: flex-center;\n\n  // CSS grid for real browsers\n  display: grid;\n  grid-gap: 20px;\n\n  @media (min-width: 1920px) {\n    grid-template-columns: repeat(5, minmax(10px, 1fr));\n  }\n\n  @media (min-width: 1601px) and (max-width: 1920px) {\n    grid-template-columns: repeat(4, minmax(10px, 1fr));\n  }\n\n  @media (min-width: 1367px) and (max-width: 1600px) {\n    grid-template-columns: repeat(3, minmax(10px, 1fr));\n  }\n\n  @media (max-width: 1366px) {\n    grid-template-columns: repeat(2, minmax(10px, 1fr));\n  }\n"]))),vO=Ge.default.div(mO||(mO=bO(["\n  display: flex;\n  flex-flow: column nowrap;\n  flex: 0 0 20%;\n  height: 202px;\n  z-index: 0;\n  padding-top: ",";\n  opacity: ",";\n  border: 1px solid ",";\n  background-color: ",";\n  position: relative;\n  border-radius: 8px;\n  color: ",";\n  &:hover {\n    cursor: ",";\n  }\n"])),e=>e.theme.geometry.sm.spacing,e=>e.disabled?"0.5":"1",e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white,e=>e.theme.colors.text.light.text,e=>e.disabled?"not-allowed":"pointer"),xO=Ge.default.div(fO||(fO=bO(["\n  position: relative;\n  z-index: 10;\n  font-size: 16px;\n  line-height: 20px;\n  margin-bottom: 12px;\n  padding-top: ",";\n  padding-left: ",";\n  margin-right: ",";\n"])),e=>e.theme.geometry.xxs.spacing,e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.xs.spacing),TO=Ge.default.div(yO||(yO=bO(["\n  padding-left: ",";\n  flex: 1;\n  position: relative;\n  font-size: 20px;\n  line-height: 24px;\n"])),e=>e.theme.geometry.md.spacing),OO=Ge.default.div(gO||(gO=bO(["\n  margin-top: ",";\n  font-size: 16px;\n  line-height: 19px;\n  color: ",";\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.colors.text.normal.background),kO=e=>{var n,t;let{survey:a,disabled:r,subtitle:i,onClick:o}=e;const{name:l,template:s,deadlineDate:c}=a||{},d=(0,g.useCallback)(e=>{(e=>{var n;const t=e.target.firstChild,a="span"===(null==t||null===(n=t.tagName)||void 0===n?void 0:n.toLowerCase()),r=!(null!=t&&t.textContent);return a&&r})(e)||r||null==o||o(a.id)},[o,a,r]);return(0,Ze.jsxs)(vO,{name:"SurveyTile--".concat(a.id),disabled:!!r,onClick:d,children:[(0,Ze.jsxs)(xO,{children:[qT(a)&&(0,Ze.jsx)(XT,{status:null===(n=a.submission)||void 0===n?void 0:n.status,children:WT(null===(t=a.submission)||void 0===t?void 0:t.status)}),(0,Ze.jsx)(uO,{survey:a})]}),(0,Ze.jsxs)(TO,{children:[l,i&&(0,Ze.jsx)(OO,{children:i})]}),(0,Ze.jsx)(Vj,{deadlineDate:c,fill:!0})]})};var jO;const CO=Ge.default.div(jO||(jO=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  overflow: auto;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),SO=e=>{let{surveys:{rows:n,totalRows:t},onSurveyClick:a}=e;return t?(0,Ze.jsx)(CO,{children:(0,Ze.jsx)(hO,{children:n.map(e=>(0,Ze.jsx)(kO,{onClick:a,survey:e,subtitle:qT(e)?"From ".concat(e.owner.name):"".concat(GT(e),"% response rate")},e.id))})}):(0,Ze.jsx)(Gh,{title:"You don't have any surveys yet",description:"Surveys are a quick way to collect data and insights",icon:["rio","clipboard-check-custom"]})};var NO=t(93785),wO=t.n(NO);const DO=e=>({value:e.id,label:e.name}),AO=e=>{var n;let{accountId:t,value:a,onChange:r,error:i=""}=e;const{data:o}=(0,h.IT)(wO(),{variables:{accountId:t}}),l=(null!==(n=null==o?void 0:o.getSurveyTemplatesByAccountId)&&void 0!==n?n:[]).map(DO),s=l.find(e=>e.value===a);return(0,Ze.jsx)(ze.l6,{id:"AddSurvey__Select",name:"SurveyTemplateSelect",placeholder:"Please select a survey",multiValueColor:"tertiary",value:s,defaultOptions:!0,onChange:r,classPrefix:"user-select",error:i,options:l})};var RO;const PO=(0,Ge.default)(ze.$n)(RO||(RO=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  align-self: flex-end;\n  width: 200px;\n  background-color: ",";\n  color: ",";\n  border-color: ",";\n  border-width: 1px;\n"])),e=>e.theme.colors.basic.white,e=>e.theme.colors.primary.light.text,e=>e.theme.colors.primary.light.text),LO=e=>{let{fill:n}=e;return(0,Ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50 25C50 38.8071 38.8071 50 25 50C11.1929 50 0 38.8071 0 25C0 11.1929 11.1929 0 25 0C38.8071 0 50 11.1929 50 25ZM46 25C46 36.598 36.598 46 25 46C13.402 46 4 36.598 4 25C4 13.402 13.402 4 25 4C36.598 4 46 13.402 46 25Z",fill:n})},IO=["circle","children"];var EO;function _O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function FO(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_O(Object(t),!0).forEach(function(n){BO(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_O(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function BO(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Ge.default.svg(EO||(EO=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  &:hover {\n    cursor: ",";\n  }\n"])),e=>e.onClick?"pointer":"default");const UO=e=>{let{circle:n,children:t}=e,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,IO);return(0,Ze.jsxs)("svg",FO(FO({},a),{},{children:[t,n&&(0,Ze.jsx)(LO,{fill:n})]}))},MO=["width","height","fill"];function VO(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function zO(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?VO(Object(t),!0).forEach(function(n){GO(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):VO(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function GO(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const $O=e=>{let{width:n=12,height:t=13,fill:a="#83838e"}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,MO);return(0,Ze.jsxs)(UO,zO(zO({width:n,height:t,viewBox:"0 0 ".concat(n," ").concat(t),fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),{},{children:[(0,Ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.99999 12.5V10.5H9.99998V7.5L12 7.5V12.5H6.99999Z",fill:a}),(0,Ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.99999 0.5V2.5L9.99998 2.5V5.49999H12V0.5L6.99999 0.5Z",fill:a}),(0,Ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.99999 12.5V10.5H2L2 7.5L2.52881e-07 7.5L0 12.5H4.99999Z",fill:a}),(0,Ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.99999 0.5V2.5L2 2.5L2 5.49999H2.52881e-07L0 0.5L4.99999 0.5Z",fill:a})]}))},WO=["width","height","fill"];function qO(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function JO(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qO(Object(t),!0).forEach(function(n){YO(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qO(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function YO(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const HO=e=>{let{width:n=50,height:t=50,fill:a="#fd978b"}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,WO);return(0,Ze.jsxs)(UO,JO(JO({width:n,height:t,viewBox:"0 0 ".concat(n," ").concat(t),fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),{},{children:[(0,Ze.jsx)("path",{d:"M25.0023 10C23.6783 10 22.5856 11.073 22.5856 12.3731V12.7207H21.4695C21.2417 12.7217 21.0236 12.8113 20.863 12.9703C20.7025 13.129 20.6127 13.3441 20.6137 13.5679V16.4204C20.6127 16.6442 20.7025 16.8591 20.863 17.018C21.0236 17.1768 21.2416 17.2666 21.4695 17.2674H28.5303C28.7593 17.2683 28.9791 17.1795 29.1412 17.0203C29.303 16.8613 29.3938 16.6453 29.3928 16.4205V13.5679C29.3938 13.3431 29.303 13.127 29.1412 12.9679C28.9791 12.8089 28.7593 12.7201 28.5303 12.7208H27.4192V12.3731C27.4192 11.073 26.3263 10 25.0023 10Z",fill:a}),(0,Ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7737 14.1545C15.5616 14.1754 15.3648 14.273 15.2219 14.4282C15.0788 14.5836 14.9998 14.7856 15 14.9949V36.1595C15.001 36.3834 15.0923 36.5975 15.2541 36.7552C15.4158 36.9128 15.6347 37.0009 15.8628 37H34.1442C34.3709 36.9991 34.588 36.9103 34.7484 36.7529C34.9085 36.5954 34.999 36.3822 35 36.1594V14.9948C34.999 14.7722 34.9085 14.559 34.7484 14.4016C34.588 14.2441 34.3707 14.1552 34.144 14.1545H31.1114V16.4137C31.1165 17.7988 29.9341 18.9602 28.5234 18.955H21.4695L21.4628 18.9548C20.0596 18.9487 18.8898 17.7914 18.8951 16.4135V14.1543H15.8625C15.833 14.1528 15.8034 14.153 15.7737 14.1545ZM31.2191 22.9759C31.7695 23.4403 31.8191 24.2403 31.3299 24.7627L24.2188 32.3565C23.9657 32.6267 23.6031 32.7812 23.2222 32.7812C22.8414 32.7812 22.4787 32.6267 22.2257 32.3565L18.6701 28.5596C18.1809 28.0372 18.2305 27.2372 18.7809 26.7728C19.3312 26.3084 20.174 26.3555 20.6632 26.8779L23.2222 29.6106L29.3368 23.0811C29.826 22.5586 30.6688 22.5116 31.2191 22.9759Z",fill:a})]}))},KO=["width","height","fill"];function QO(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ZO(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?QO(Object(t),!0).forEach(function(n){XO(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):QO(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function XO(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ek=e=>{let{width:n=16,height:t=16,fill:a="#00C8B5"}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,KO);return(0,Ze.jsx)(UO,ZO(ZO({width:n,height:t,viewBox:"0 0 ".concat(n," ").concat(t),fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),{},{children:(0,Ze.jsx)("path",{d:"M12.2759 3.31055L13.7242 4.68986L6.33335 12.4502L2.27588 8.18986L3.72415 6.81055L6.33335 9.5502L12.2759 3.31055Z",fill:a})}))};var nk,tk;function ak(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const rk=Ge.default.div(nk||(nk=ak(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  font-size: 16px;\n  line-height: 19px;\n  color: #83838e;\n  &:hover {\n    cursor: pointer;\n  }\n"]))),ik=Ge.default.span(tk||(tk=ak(["\n  margin-left: 6px;\n"]))),ok=e=>{let{onClick:n}=e;return(0,Ze.jsxs)(rk,{onClick:n,children:[(0,Ze.jsx)($O,{})," ",(0,Ze.jsx)(ik,{children:"Expand"})]})};var lk,sk=t(67687);const ck=Ge.default.span(lk||(lk=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-right: 20px;\n  color: ",";\n"])),e=>e.theme.colors.text.light.text),dk=()=>(0,Ze.jsxs)(ck,{children:[(0,Ze.jsx)(ze.In,{icon:"check",size:"md"}),(0,Ze.jsx)("span",{children:"Auto-save is on"})]});var uk,pk,mk,fk,yk;function gk(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const bk=(0,Ge.default)(ze.fI)(uk||(uk=gk(["\n  justify-content: flex-end;\n  margin-top: ",";\n"])),e=>e.theme.geometry.md.spacing),hk=(0,Ge.default)(PO)(pk||(pk=gk(["\n  width: auto;\n"]))),vk=Ge.default.article(mk||(mk=gk(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),xk=Ge.default.h1(fk||(fk=gk(["\n  margin-bottom: ",";\n  text-align: center;\n  font-weight: 700;\n  font-size: 18px;\n  line-height: 22px;\n  color: ",";\n"])),e=>e.theme.geometry.lg.spacing,e=>e.theme.colors.text.light.text),Tk=Ge.default.p(yk||(yk=gk(["\n  font-size: 16px;\n  line-height: 19px;\n  color: ",";\n"])),e=>e.theme.colors.text.light.text);function Ok(e){var n;let{survey:t}=e;const[a,r]=(0,g.useState)(!1),i=(0,g.useCallback)(()=>r(e=>!e),[r]);return(0,Ze.jsxs)(bk,{container:!0,children:[(0,Ze.jsxs)(hk,{onClick:i,children:["View comments from ",t.owner.name]}),a&&(0,Ze.jsx)(ze.aF,{show:!0,size:"md",height:"auto",onDismiss:i,children:(0,Ze.jsxs)(vk,{children:[(0,Ze.jsxs)(xk,{children:["Comments from ",t.owner.name]}),(0,Ze.jsx)(Tk,{children:null===(n=t.submission)||void 0===n?void 0:n.feedback})]})})]})}var kk,jk,Ck,Sk,Nk,wk,Dk,Ak;function Rk(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Pk=Ge.default.form(kk||(kk=Rk(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),Lk=Ge.default.h1(jk||(jk=Rk(["\n  margin-bottom: ",";\n  font-weight: 700;\n  font-size: 18px;\n  line-height: 22px;\n  text-align: center;\n  color: ",";\n"])),e=>e.theme.geometry.lg.spacing,e=>e.theme.colors.text.light.text),Ik=Ge.default.h5(Ck||(Ck=Rk(["\n  margin-bottom: ",";\n  font-size: 16px;\n  line-height: 19px;\n"])),e=>e.theme.geometry.xs.spacing),Ek=(0,Ge.default)(ze.fs)(Sk||(Sk=Rk(["\n  height: 90px;\n  margin-bottom: 12px;\n"]))),_k=Ge.default.div(Nk||(Nk=Rk(["\n  margin-bottom: ",";\n  font-size: 14px;\n  line-height: 17px;\n  color: ",";\n"])),e=>e.theme.geometry.lg.spacing,e=>e.theme.colors.text.normal.background),Fk=(0,Ge.default)(ze.fI)(wk||(wk=Rk(["\n  justify-content: space-between;\n"]))),Bk=(0,Ge.default)(PO)(Dk||(Dk=Rk(["\n  width: 95%;\n  font-weight: 600;\n"]))),Uk=(0,Ge.default)(ze.$n)(Ak||(Ak=Rk(["\n  color: ",";\n  font-weight: 600;\n"])),e=>e.theme.colors.text.light.text);function Mk(e){let{intention:n,onDismiss:t,onFeedback:a}=e;const r=n===Vt.iD.Approved,[i,o]=(0,g.useState)(null),[l,s]=(0,g.useState)(!1),c=(0,g.useCallback)(e=>o(e.target.value),[o]),d=(0,g.useCallback)(async()=>{try{s(!0),await a(n,i)}finally{s(!1),t()}},[a,i,n,t]);return(0,Ze.jsx)(ze.aF,{show:!0,size:"md",height:"auto",dismissable:!0,enableEscapeKey:!0,children:(0,Ze.jsxs)(Pk,{children:[(0,Ze.jsx)(Lk,{children:r?"Are you sure you want to approve this response?":"Are you sure you want to request changes this response?"}),(0,Ze.jsx)(Ik,{children:"Comments for recipients (optional)"}),(0,Ze.jsx)(Ek,{maxLength:1e3,onChange:c}),(0,Ze.jsx)(_k,{children:"These notes will appear in the email sent to your recipients"}),(0,Ze.jsxs)(Fk,{container:!0,children:[(0,Ze.jsx)(ze.fv,{item:!0,span:6,children:(0,Ze.jsx)(Bk,{disabled:l,onClick:t,children:"No, keep as is"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:6,children:r?(0,Ze.jsx)(ze.$n,{onClick:d,type:"button",color:"success",disabled:l,children:"Yes, approve"}):(0,Ze.jsx)(Uk,{onClick:d,type:"button",color:"warning",disabled:l,children:"Yes, request changes"})})]})]})})}var Vk,zk,Gk,$k;function Wk(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const qk=(0,Ge.default)(ze.fI)(Vk||(Vk=Wk(["\n  justify-content: flex-end;\n  margin-top: ",";\n"])),e=>e.theme.geometry.md.spacing),Jk=(0,Ge.default)(ze.$n)(zk||(zk=Wk(["\n  width: auto;\n  font-weight: 600;\n"]))),Yk=(0,Ge.default)(Jk)(Gk||(Gk=Wk(["\n  color: ",";\n"])),e=>e.theme.colors.text.light.text),Hk=(0,Ge.default)(Jk)($k||($k=Wk(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.md.spacing);function Kk(e){let{submission:n,sendFeedback:t}=e;const[a,r]=(0,g.useState)(!1),[i,o]=(0,g.useState)(!1),l=(0,g.useCallback)(()=>r(e=>!e),[r]),s=(0,g.useCallback)(()=>o(e=>!e),[]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(qk,{item:!0,container:!0,children:[n.status!==Vt.ZU.RequiresChanges&&(0,Ze.jsx)(Yk,{color:"warning",onClick:l,children:"Request changes"}),n.status!==Vt.ZU.Approved&&(0,Ze.jsx)(Hk,{color:"success",onClick:s,children:"Approve"})]}),a&&(0,Ze.jsx)(Mk,{intention:Vt.iD.RequiresChanges,onDismiss:l,onFeedback:t}),i&&(0,Ze.jsx)(Mk,{intention:Vt.iD.Approved,onDismiss:s,onFeedback:t})]})}var Qk,Zk,Xk,ej,nj,tj,aj;function rj(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ij=Ge.default.section(Qk||(Qk=rj(["\n  display: flex;\n  flex-flow: column nowrap;\n  padding: 12px 24px 0 24px;\n  flex-shrink: 0;\n  background-color: white;\n"]))),oj=(0,Ge.default)(ze.fI)(Zk||(Zk=rj(["\n  justify-content: space-between;\n  flex-flow: row nowrap;\n"]))),lj=Ge.default.div(Xk||(Xk=rj(["\n  display: flex;\n  justify-content: space-between;\n  font-size: 16px;\n  line-height: 19px;\n  letter-spacing: -0.005em;\n  color: ",";\n"])),e=>e.theme.colors.text.normal.background),sj=Ge.default.div(ej||(ej=rj(["\n  flex: 1;\n  display: flex;\n  align-items: center;\n"]))),cj=Ge.default.div(nj||(nj=rj(["\n  & svg {\n    margin-right: 12px;\n  }\n"]))),dj=(0,Ge.default)(()=>(0,Ze.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ze.jsx)("path",{d:"M4.3628 1.1062C4.32796 1.07254 4.28656 1.04583 4.24098 1.02761C4.1954 1.00938 4.14653 1 4.09718 1C4.04782 1 3.99895 1.00938 3.95337 1.02761C3.90779 1.04583 3.86639 1.07254 3.83155 1.1062L1.84155 3.01124L1.13217 2.34563C1.09733 2.31197 1.05594 2.28526 1.01035 2.26704C0.964772 2.24881 0.915902 2.23943 0.866547 2.23943C0.817191 2.23943 0.768321 2.24881 0.72274 2.26704C0.677158 2.28526 0.63576 2.31197 0.600921 2.34563L0.110296 2.81866C0.0753358 2.8522 0.0475969 2.89206 0.0286699 2.93595C0.00974287 2.97985 0 3.0269 0 3.07443C0 3.12195 0.00974287 3.16901 0.0286699 3.2129C0.0475969 3.25679 0.0753358 3.29665 0.110296 3.3302L1.59748 4.75649C1.67172 4.82443 1.77022 4.86232 1.87264 4.86232C1.97506 4.86232 2.07357 4.82443 2.1478 4.75649L2.63499 4.28647L4.89124 2.11424C4.96154 2.04649 5.00126 1.95479 5.00179 1.85902C5.00231 1.76326 4.9636 1.67115 4.89405 1.6027L4.3628 1.1062ZM4.3628 5.89632C4.32796 5.86265 4.28656 5.83594 4.24098 5.81772C4.1954 5.79949 4.14653 5.79011 4.09718 5.79011C4.04782 5.79011 3.99895 5.79949 3.95337 5.81772C3.90779 5.83594 3.86639 5.86265 3.83155 5.89632L1.84155 7.81369L1.13217 7.14868C1.09733 7.11502 1.05594 7.08831 1.01035 7.07009C0.964772 7.05186 0.915902 7.04248 0.866547 7.04248C0.817191 7.04248 0.768321 7.05186 0.72274 7.07009C0.677158 7.08831 0.63576 7.11502 0.600921 7.14868L0.110296 7.62081C0.0753358 7.65435 0.0475969 7.69421 0.0286699 7.7381C0.00974287 7.78199 0 7.82905 0 7.87657C0 7.9241 0.00974287 7.97116 0.0286699 8.01505C0.0475969 8.05894 0.0753358 8.0988 0.110296 8.13234L1.59373 9.56164C1.66792 9.62957 1.76637 9.66745 1.86874 9.66745C1.9711 9.66745 2.06956 9.62957 2.14374 9.56164L2.63436 9.08952L4.89061 6.91639C4.96064 6.84911 5.00023 6.75793 5.00076 6.66268C5.00129 6.56743 4.96271 6.47584 4.89343 6.40786L4.3628 5.89632ZM1.99999 11.1113C1.17217 11.1113 0.481546 11.7583 0.481546 12.5557C0.481546 13.3531 1.1728 14 1.99999 14C2.39781 14 2.77934 13.8478 3.06065 13.577C3.34195 13.3061 3.49999 12.9387 3.49999 12.5557C3.49999 12.1726 3.34195 11.8052 3.06065 11.5343C2.77934 11.2635 2.39781 11.1113 1.99999 11.1113ZM15.5 11.5928H6.49999C6.36738 11.5928 6.2402 11.6435 6.14644 11.7338C6.05267 11.8241 5.99999 11.9465 5.99999 12.0742V13.0371C5.99999 13.1648 6.05267 13.2872 6.14644 13.3775C6.2402 13.4678 6.36738 13.5186 6.49999 13.5186H15.5C15.6326 13.5186 15.7598 13.4678 15.8536 13.3775C15.9473 13.2872 16 13.1648 16 13.0371V12.0742C16 11.9465 15.9473 11.8241 15.8536 11.7338C15.7598 11.6435 15.6326 11.5928 15.5 11.5928ZM15.5 1.96378H6.49999C6.36738 1.96378 6.2402 2.01451 6.14644 2.1048C6.05267 2.19509 5.99999 2.31754 5.99999 2.44523V3.40813C5.99999 3.53582 6.05267 3.65828 6.14644 3.74857C6.2402 3.83885 6.36738 3.88958 6.49999 3.88958H15.5C15.6326 3.88958 15.7598 3.83885 15.8536 3.74857C15.9473 3.65828 16 3.53582 16 3.40813V2.44523C16 2.31754 15.9473 2.19509 15.8536 2.1048C15.7598 2.01451 15.6326 1.96378 15.5 1.96378ZM15.5 6.77827H6.49999C6.36738 6.77827 6.2402 6.82899 6.14644 6.91928C6.05267 7.00957 5.99999 7.13203 5.99999 7.25972V8.22262C5.99999 8.3503 6.05267 8.47276 6.14644 8.56305C6.2402 8.65334 6.36738 8.70406 6.49999 8.70406H15.5C15.6326 8.70406 15.7598 8.65334 15.8536 8.56305C15.9473 8.47276 16 8.3503 16 8.22262V7.25972C16 7.13203 15.9473 7.00957 15.8536 6.91928C15.7598 6.82899 15.6326 6.77827 15.5 6.77827Z",fill:"#83838e"})}))(tj||(tj=rj(["\n  margin-right: 12px;\n"]))),uj=Ge.default.span(aj||(aj=rj(["\n  text-align: right;\n  display: flex;\n  align-items: center;\n"])));function pj(e){var n,t,a,r;const{survey:i,newSubscriptionUpdate:o}=e,{template:l}=i;return(0,Ze.jsxs)(ij,{name:"SubmissionInfo__Section",children:[(0,Ze.jsxs)(oj,{item:!0,container:!0,children:[(0,Ze.jsx)(lj,{children:(0,Ze.jsx)(sj,{children:e.readonly&&(0,Ze.jsxs)(cj,{children:[(0,Ze.jsx)(dj,{}),(0,Ze.jsxs)("span",{children:["Viewing response from ",e.contributor]})]})})}),(0,Ze.jsxs)(uj,{status:null===(n=i.submission)||void 0===n?void 0:n.status,children:[e.showAutoSave&&(0,Ze.jsx)(dk,{}),(0,Ze.jsx)(XT,{status:null===(t=i.submission)||void 0===t?void 0:t.status,children:WT(null===(a=i.submission)||void 0===a?void 0:a.status)}),(0,Ze.jsx)(Vj,{newSubscriptionUpdate:o,showAutoSave:!0,deadlineDate:i.deadlineDate,survey:i})]})]}),e.readonly&&i.feedbackEnabled&&i.submission&&(0,Ze.jsx)(Kk,{submission:i.submission,sendFeedback:e.sendFeedback}),!e.readonly&&(null===(r=i.submission)||void 0===r?void 0:r.feedback)&&(0,Ze.jsx)(Ok,{survey:i})]})}var mj,fj;function yj(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const gj=Ge.default.div(mj||(mj=yj(["\n  display: flex;\n  justify-content: ",";\n  padding: 0 25px;\n"])),e=>e.isFirstPage?"flex-end":e.isLastPage?"flex-start":"space-between"),bj=(0,Ge.default)(ze.$n)(fj||(fj=yj(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),hj=e=>{let{model:n}=e;const[t,a]=(0,g.useState)((null==n?void 0:n.currentPageNo)||0),r=0===t,i=t===((null==n?void 0:n.pageCount)||0)-1;(0,g.useEffect)(()=>{a((null==n?void 0:n.currentPageNo)||0)},[null==n?void 0:n.currentPageNo]);const o=((null==n?void 0:n.pageCount)||0)>1,l=(0,g.useCallback)(()=>{null!=n&&n.nextPage()&&a(e=>e+1)},[n]),s=(0,g.useCallback)(()=>{null!=n&&n.prevPage()&&a(e=>e-1)},[n]);return o&&n?(0,Ze.jsxs)(gj,{isFirstPage:r,isLastPage:i,children:[!r&&(0,Ze.jsx)(bj,{onClick:s,color:"tertiary",size:"md",outline:!0,inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"chevron-left"})}),!i&&(0,Ze.jsx)(bj,{onClick:l,color:"tertiary",size:"md",outline:!0,inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"chevron-right"})})]}):null},vj={themeName:"plain",colorPalette:"light",isPanelless:!1,backgroundImage:"",backgroundOpacity:1,backgroundImageAttachment:"scroll",backgroundImageFit:"cover",headerView:"basic",header:{height:150,inheritWidthFrom:"survey",titlePositionX:"center",descriptionPositionX:"center"},cssVariables:{"--sjs-font-editorfont-family":"Plus Jakarta Sans","--sjs-editorpanel-hovercolor":"rgba(241, 239, 255, 1)","--sjs-editorpanel-cornerRadius":"16px","--sjs-questionpanel-hovercolor":"rgba(255, 255, 255, 1)","--sjs-questionpanel-cornerRadius":"16px","--sjs-corner-radius":"4px","--sjs-base-unit":"8px","--sjs-shadow-small":"0px 0px 0px 1px rgba(0, 0, 0, 0.15)","--sjs-font-questiontitle-weight":"400","--sjs-font-questiontitle-color":"rgba(27, 27, 31, 1)","--sjs-font-questiondescription-size":"15px","--sjs-font-questiondescription-color":"rgba(27, 27, 31, 1)","--sjs-shadow-inner":"0px 0px 0px 1px rgba(0, 0, 0, 0.15)","--sjs-font-editorfont-color":"rgba(27, 27, 31, 0.91)","--sjs-font-editorfont-placeholdercolor":"rgba(27, 27, 31, 0.45)","--sjs-border-default":"rgba(27, 27, 31, 0.15)","--sjs-border-light":"rgba(27, 27, 31, 0.15)","--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(248, 248, 248, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dim-dark":"rgba(243, 243, 243, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 0.45)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 0.91)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 0.45)","--sjs-secondary-backcolor":"rgba(255, 152, 20, 1)","--sjs-secondary-backcolor-light":"rgba(255, 152, 20, 0.1)","--sjs-secondary-backcolor-semi-light":"rgba(255, 152, 20, 0.25)","--sjs-secondary-forecolor":"rgba(255, 255, 255, 1)","--sjs-secondary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-shadow-small-reset":"0px 0px 0px 0px rgba(0, 0, 0, 0.15)","--sjs-shadow-medium":"0px 0px 0px 1px rgba(0, 0, 0, 0.1)","--sjs-shadow-large":"0px 8px 16px 0px rgba(0, 0, 0, 0.05)","--sjs-shadow-inner-reset":"0px 0px 0px 0px rgba(0, 0, 0, 0.15)","--sjs-border-inside":"rgba(0, 0, 0, 0.16)","--sjs-special-red-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-green":"rgba(25, 179, 148, 1)","--sjs-special-green-light":"rgba(25, 179, 148, 0.1)","--sjs-special-green-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-blue":"rgba(67, 127, 217, 1)","--sjs-special-blue-light":"rgba(67, 127, 217, 0.1)","--sjs-special-blue-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-yellow":"rgba(255, 152, 20, 1)","--sjs-special-yellow-light":"rgba(255, 152, 20, 0.1)","--sjs-special-yellow-forecolor":"rgba(255, 255, 255, 1)","--sjs-article-font-xx-large-textDecoration":"none","--sjs-article-font-xx-large-fontWeight":"700","--sjs-article-font-xx-large-fontStyle":"normal","--sjs-article-font-xx-large-fontStretch":"normal","--sjs-article-font-xx-large-letterSpacing":"0","--sjs-article-font-xx-large-lineHeight":"64px","--sjs-article-font-xx-large-paragraphIndent":"0px","--sjs-article-font-xx-large-textCase":"none","--sjs-article-font-x-large-textDecoration":"none","--sjs-article-font-x-large-fontWeight":"700","--sjs-article-font-x-large-fontStyle":"normal","--sjs-article-font-x-large-fontStretch":"normal","--sjs-article-font-x-large-letterSpacing":"0","--sjs-article-font-x-large-lineHeight":"56px","--sjs-article-font-x-large-paragraphIndent":"0px","--sjs-article-font-x-large-textCase":"none","--sjs-article-font-large-textDecoration":"none","--sjs-article-font-large-fontWeight":"700","--sjs-article-font-large-fontStyle":"normal","--sjs-article-font-large-fontStretch":"normal","--sjs-article-font-large-letterSpacing":"0","--sjs-article-font-large-lineHeight":"40px","--sjs-article-font-large-paragraphIndent":"0px","--sjs-article-font-large-textCase":"none","--sjs-article-font-medium-textDecoration":"none","--sjs-article-font-medium-fontWeight":"700","--sjs-article-font-medium-fontStyle":"normal","--sjs-article-font-medium-fontStretch":"normal","--sjs-article-font-medium-letterSpacing":"0","--sjs-article-font-medium-lineHeight":"32px","--sjs-article-font-medium-paragraphIndent":"0px","--sjs-article-font-medium-textCase":"none","--sjs-article-font-default-textDecoration":"none","--sjs-article-font-default-fontWeight":"400","--sjs-article-font-default-fontStyle":"normal","--sjs-article-font-default-fontStretch":"normal","--sjs-article-font-default-letterSpacing":"0","--sjs-article-font-default-lineHeight":"28px","--sjs-article-font-default-paragraphIndent":"0px","--sjs-article-font-default-textCase":"none","--sjs-general-backcolor-dim":"rgba(255, 255, 255, 1)","--sjs-primary-backcolor":"rgba(46, 62, 255, 1)","--sjs-primary-backcolor-dark":"rgba(42, 57, 235, 1)","--sjs-primary-backcolor-light":"rgba(46, 62, 255, 0.1)","--sjs-primary-forecolor":"rgba(241, 239, 255, 1)","--sjs-primary-forecolor-light":"rgba(27, 27, 31, 0.38)","--sjs-special-red":"rgba(229, 10, 62, 1)","--sjs-special-red-light":"rgba(229, 10, 62, 0.1)","--sjs-font-surveydescription-size":"21px","--sjs-font-headertitle-weight":"400","--sjs-font-headertitle-color":"rgba(27, 27, 31, 1)","--sjs-font-headerdescription-weight":"400","--sjs-font-headerdescription-color":"rgba(27, 27, 31, 1)","--sjs-header-backcolor":"transparent"}};var xj,Tj,Oj;function kj(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const jj=Ge.default.div(xj||(xj=kj(["\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  background-color: #f3f3f3;\n  & > .sd-root-modern {\n    height: 100%;\n  }\n"]))),Cj=(0,Ge.default)(ze.aF)(Tj||(Tj=kj(["\n  & > div:nth-child(2) {\n    width: calc(100vw - ",");\n    height: calc(100vh - ",");\n    border-radius: 0;\n    z-index: 9;\n\n    & > * {\n      padding: 0;\n    }\n  }\n"])),e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.xl.spacing),Sj=(0,Ge.default)(sk.Survey)(Oj||(Oj=kj(["\n  .sd-title {\n    color: #4d505b;\n    font-weight: 300;\n  }\n"]))),Nj=e=>{const n=rl(),[t,a]=(0,g.useState)(null);(0,g.useEffect)(()=>{e.model&&(n&&e.model.applyTheme(vj),a(e.model))},[e.model]);const r=(0,Ze.jsxs)(jj,{children:[e.readonly?(0,Ze.jsx)(pj,{readonly:!0,survey:e.survey,sendFeedback:e.sendFeedback,contributor:e.contributor}):(0,Ze.jsx)(pj,{readonly:!1,showAutoSave:!0,newSubscriptionUpdate:e.newSubscriptionUpdate,survey:e.survey}),e.header,(0,Ze.jsx)(Sj,{model:t,rootNodeId:"Survey__element",mode:e.readonly?"display":void 0,onValueChanged:e.readonly?void 0:e.onValueChanged}),(0,Ze.jsx)(hj,{model:t}),e.children]});return e.expanded?(0,Ze.jsxs)(Cj,{height:"auto",maxHeight:"100%",span:12,onDismiss:e.onDismiss,dismissable:!0,enableEscapeKey:!0,show:!0,children:[(0,Ze.jsx)(bh,{title:e.survey.name,iconColor:"#FD978B",icon:(0,Ze.jsx)(HO,{circle:"#FD978B"})}),r]}):(0,Ze.jsx)(Ze.Fragment,{children:!!t&&r})},wj=e=>{let{model:n,expanded:t,onDismiss:a,survey:r,contributor:i,sendFeedback:o}=e;return(0,Ze.jsx)(Nj,{readonly:!0,contributor:i,model:n,expanded:t,onDismiss:a,survey:r,sendFeedback:o})};var Dj;const Aj=Ge.default.div(Dj||(Dj=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  font-size: 14px;\n  line-height: 20px;\n  color: ",";\n  font-weight: ",";\n  white-space: nowrap;\n"])),e=>e.color,e=>e.fontWeight),Rj=e=>{let{deadlineDate:n,color:t,fontWeight:a}=e;return(0,Ze.jsxs)(Aj,{color:t,fontWeight:a,children:["Due ",Ht(n,"LL")]})};var Pj,Lj,Ij,Ej;function _j(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Fj=(0,f.styled)("div")(Pj||(Pj=_j(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),Bj=(0,f.styled)("div")(Lj||(Lj=_j(["\n  color: ",";\n  font-weight: ",";\n  font-size: 14px;\n  line-height: 20px;\n"])),e=>e.color,e=>e.fontWeight),Uj=(0,f.styled)("div")(Ij||(Ij=_j(["\n  color: ",";\n"])),e=>e.color),Mj=(0,f.styled)("div")(Ej||(Ej=_j(["\n  height: 38px;\n  width: 20px;\n"]))),Vj=e=>{let{deadlineDate:n,survey:t}=e;const{color:a,isOverDue:r,fontWeight:i}=HT(n);return(0,Ze.jsxs)(Fj,{children:[n&&(0,Ze.jsx)(Bj,{color:a,fontWeight:i,children:r?"Closed":"Open"}),n&&(0,Ze.jsx)(Uj,{color:a,children:"  •  "}),n&&(0,Ze.jsx)(Rj,{deadlineDate:n,color:a,fontWeight:i}),(0,Ze.jsx)(Mj,{children:t&&(0,Ze.jsx)(uO,{survey:t})})]})};var zj,Gj,$j,Wj,qj;function Jj(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Yj=Ge.default.div(zj||(zj=Jj(["\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  background-color: #ffffff;\n  align-items: center;\n  padding-top: 12px;\n  position: relative;\n\n  &:hover {\n    cursor: pointer;\n  }\n"]))),Hj=Ge.default.div(Gj||(Gj=Jj(["\n  display: flex;\n  flex-direction: column;\n  justify-content: flex-end;\n  background-color: #ffffff;\n  align-items: flex-end;\n  padding-right: 24px;\n"]))),Kj=e=>{let{text:n,height:t}=e;const a=Ge.default.div($j||($j=Jj(["\n    display: flex;\n    position: absolute;\n    bottom: 35px;\n  "]))),r=Ge.default.span(Wj||(Wj=Jj(["\n    position: relative;\n    background-color: #d4d5d8;\n    border-radius: 6px;\n    color: #83838e;\n    cursor: default;\n    font-size: 14px;\n    height: ",";\n    text-align: left;\n    padding: 15px 15px;\n    width: 250px;\n    word-break: break-word;\n    text-align: center;\n\n    &::after {\n      content: '';\n      position: absolute;\n      border: 10px solid transparent;\n      border-top-color: #d4d5d8;\n      bottom: -20px;\n      left: calc(80% - 14px);\n      transform: translateX(-50%);\n    }\n  "])),t);return(0,Ze.jsx)(a,{children:(0,Ze.jsx)(r,{children:n})})},Qj=(0,Ge.default)(ze.In)(qj||(qj=Jj(["\n  margin-right: 4px;\n"]))),Zj=e=>{let{model:n,expanded:t,onDismiss:a,saveSurvey:r,survey:i,isLocked:o,editingUser:l,newSubscriptionUpdate:s,children:c}=e;const d=(0,Ge.useTheme)(),[u,p]=(0,g.useState)(!1),m=(0,g.useCallback)(()=>{r()},[r]);return(0,Ze.jsx)(Nj,{readonly:!1,model:n,expanded:t,onDismiss:a,survey:i,onValueChanged:m,newSubscriptionUpdate:s,header:o&&(0,Ze.jsx)(Hj,{children:(0,Ze.jsxs)(Yj,{onClick:()=>p(!u),children:[u?(0,Ze.jsx)(Kj,{text:"You cannot edit this survey simultaneously. Editing will become available once ".concat(l," exits the survey."),height:"120px"}):null,(0,Ze.jsx)(Qj,{icon:"lock",size:"md",color:d.colors.neutral.light.text}),(0,Ze.jsx)(ze.EY,{children:"Locked"})]})}),children:c})},Xj=[Vt.ZU.ReadyForReview,Vt.ZU.Approved,Vt.ZU.InProgress],eC=e=>{var n;return null==e||null===(n=e.filter(e=>{const{isOverDue:n}=HT(e.deadlineDate),t=JT(e.deadlineDate);return!n&&t||!n&&(!e.submission||!Xj.includes(e.submission.status))}))||void 0===n?void 0:n.length},nC=t.p+"rio-logo-rings-99f451b06a9027c84f04.svg",tC=t.p+"RIO_Logo_White-1dc6492e98541f896212.png";var aC;const rC=Ge.default.div(aC||(aC=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  position: absolute;\n  width: 18px;\n  height: 18px;\n  border-radius: 9px;\n  background-color: red;\n  top: -7px;\n  right: -5px;\n  font-size: 10px;\n  color: white;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n"]))),iC=e=>{let{count:n}=e;return(0,Ze.jsx)(rC,{children:n})},oC=["icon","messageId","id","name","circleColor","collapsed"],lC=["route","id","externalLink","exact"];var sC,cC,dC,uC,pC,mC,fC;function yC(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gC(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yC(Object(t),!0).forEach(function(n){bC(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yC(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function bC(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function hC(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function vC(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const xC="32px",TC="white",OC="md",kC=Ge.default.div(sC||(sC=vC(["\n  ",";\n"])),e=>{let{theme:n,collapsed:t}=e;return"\n    display: flex;\n    flex-direction: row;\n    align-items: center;\n    justify-content: ".concat(t?"center":"left",";\n    padding: ").concat(t?"".concat(n.geometry.xs.spacing," 0"):"".concat(n.geometry.xs.spacing," ").concat(n.geometry.sm.spacing),";\n    cursor: pointer;\n\n    &:hover {\n      background-color: rgba(0, 0, 0, 0.1);\n    }\n  ")}),jC=(Ge.default.div(cC||(cC=vC(["\n  ",";\n"])),e=>{let{theme:n,collapsed:t}=e;return"\n    display: flex;\n    opacity: 0.5; \n    flex-direction: row;\n    align-items: center;\n    justify-content: ".concat(t?"center":"left",";\n    padding: ").concat(t?"".concat(n.geometry.xs.spacing," 0"):"".concat(n.geometry.xs.spacing," ").concat(n.geometry.sm.spacing),";\n  ")}),(0,Ge.default)(p.NavLink)(dC||(dC=vC(["\n  &.active > div {\n    background-color: rgba(0, 0, 0, 0.2);\n  }\n"])))),CC=(0,Ge.default)(ze.EY)(uC||(uC=vC(["\n  color: white;\n  padding-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),SC=(Ge.default.div(pC||(pC=vC(["\n  opacity: 0.7;\n  display: inline-block;\n  background: ",";\n  padding: "," ",";\n  margin-left: ",";\n"])),e=>e.theme.colors.basic.white,e=>e.theme.geometry.xxs.spacing,e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.xs.spacing),Ge.default.div(mC||(mC=vC(["\n  display: flex;\n  align-items: center;\n"])))),NC=Ge.default.div(fC||(fC=vC(["\n  position: relative;\n  font-size: ",";\n  width: ",";\n"])),"24px",xC),wC=e=>{const{icon:n,messageId:t,id:a,name:r,circleColor:i,collapsed:o}=e,l=hC(e,oC);return(0,Ze.jsxs)(kC,gC(gC({id:"".concat(a,"-LinkContainer"),collapsed:o},l),{},{children:[(0,Ze.jsxs)(NC,{children:[!!e.notificationCount&&(0,Ze.jsx)(iC,{count:e.notificationCount}),(0,Ze.jsx)(ze.GQ,{height:xC,circleColor:i,iconColor:TC,size:OC,icon:n,id:"".concat(a,"-CircleIcon"),name:"".concat(r,"-CircleIcon")})]}),!o&&(0,Ze.jsx)(SC,{children:(0,Ze.jsx)(CC,{inline:!0,align:"center",id:"".concat(a,"-LinkTextStyled"),name:"".concat(r,"-LinkTextStyled"),children:(0,Ze.jsx)(Je.A,{id:t})})})]}))},DC=e=>{const{route:n,id:t,externalLink:a,exact:r}=e,i=hC(e,lC);return a?(0,Ze.jsx)("a",gC(gC({href:n,target:"_blank",rel:"noopener noreferrer",id:"".concat(t,"-NavLinkStyled")},i),{},{children:(0,Ze.jsx)(wC,gC({},e))})):(0,Ze.jsx)(jC,{end:r,to:n,id:"".concat(t,"-NavLinkStyled"),children:(0,Ze.jsx)(wC,gC({},e))})};var AC,RC,PC,LC,IC,EC,_C,FC,BC;function UC(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const MC=(0,Ge.default)(ze.fv)(AC||(AC=UC(["\n  position: relative;\n  background-color: ",";\n  width: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.colors.sidebar.normal.background,e=>{let{collapsed:n}=e;return n?"70px":"260px"}),VC=Ge.default.div(RC||(RC=UC(["\n  position: absolute;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  align-content: center;\n  right: 0;\n  top: 78px; // height of header component + xs spacing\n  bottom: ",";\n  width: ",";\n  border-right: 2px solid ",";\n  color: ",";\n  margin-right: -",";\n  opacity: 0;\n  transition: opacity 0.5s;\n  cursor: pointer;\n  &:hover {\n    opacity: 1;\n  }\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.sidebar.normal.background,e=>e.theme.colors.sidebar.normal.background,e=>e.theme.geometry.sm.spacing),zC=(0,Ge.default)(ze.fI)(PC||(PC=UC(["\n  flex: 0 0 auto;\n  width: 100%;\n  height: 70px;\n  background-color: white;\n  border-bottom: 1px solid ",";\n  border-right: 1px solid ",";\n"])),e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.overlay.normal.background),GC=Ge.default.div(LC||(LC=UC(["\n  flex: 0 0 auto;\n  width: 70px;\n  height: 100%;\n  border-right: 1px solid ",";\n  background: url(",") center center no-repeat;\n  background-size: 35px 35px;\n\n  &:hover {\n    background-color: ",";\n  }\n"])),e=>e.theme.colors.overlay.normal.background,nC,e=>{let{theme:n}=e;return n.colors.overlay.light.background}),$C=(0,Ge.default)(ze.fv)(IC||(IC=UC(["\n  padding: "," 0;\n"])),e=>e.theme.geometry.sm.spacing),WC=(0,Ge.default)(ze.fv)(EC||(EC=UC(["\n  flex: 0 0 auto;\n  opacity: 0.3;\n  padding: ",";\n  display: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>{let{collapsed:n}=e;return n?"none":"flex"}),qC=Ge.default.div(_C||(_C=UC(["\n  flex: 0 0 auto;\n  width: 92px;\n  height: 44px;\n  background: url(",") center center no-repeat;\n  background-size: 92px 44px;\n  margin-bottom: ",";\n"])),tC,e=>e.theme.geometry.sm.spacing),JC=(0,Ge.default)(ze.EY)(FC||(FC=UC(["\n  flex: 0 0 auto;\n"]))),YC=Ge.default.div(BC||(BC=UC(["\n  height: 1px;\n  opacity: 0.1;\n  margin: "," 0;\n  background-color: #fff;\n"])),e=>e.theme.geometry.xs.spacing),HC=()=>{var e;const[n,t]=(0,g.useState)("collapsed"===localStorage.getItem("SIDEBAR_COLLAPSED")),a=rt(),{data:r}=Td(),{token:i}=at(),o=rc(),l=o.survey.some(e=>e.startsWith("getSurveys")),s={accountId:a,userId:i.sub},{data:c}=(0,h.IT)(pT(),{variables:s,skip:!i.sub||!a}),{data:d}=Qf(s),u=(0,g.useMemo)(()=>null!=c&&c.getTasksByUserId&&null!=i&&i.sub?c.getTasksByUserId.filter(e=>{var n;return!e.isCompleted&&(null===(n=e.owners)||void 0===n?void 0:n.some(e=>{let{id:n}=e;return n.toLowerCase()===i.sub.toLowerCase()}))}):[],[null==c?void 0:c.getTasksByUserId,null==i?void 0:i.sub]),m=eC(null==d||null===(e=d.getReceivedSurveysPage)||void 0===e?void 0:e.rows),f=ur.includes(a);return(0,Ze.jsxs)(MC,{container:!0,name:"Sidebar",vdistribution:"between",collapsed:n,children:[(0,Ze.jsx)(VC,{id:"Sidebar__toggle-collapse",onClick:()=>{localStorage.setItem("SIDEBAR_COLLAPSED",1==!n?"collapsed":"open"),t(!n)},children:(0,Ze.jsx)(ze.In,{icon:n?"angle-right":"angle-left"})}),(0,Ze.jsxs)(zC,{container:!0,children:[(0,Ze.jsx)(p.Link,{to:"",children:(0,Ze.jsx)(GC,{})}),(0,Ze.jsx)(MT,{})]}),(0,Ze.jsxs)($C,{item:!0,children:[(0,Ze.jsx)(DC,{id:"Sidebar__NavLink--Homepage",exact:!0,route:"",messageId:"sidebar.homepage",icon:"home",circleColor:"white",name:"Sidebar__NavLink--Homepage",collapsed:n}),o.allowedRioModules.includes(Vt.zB.Engage)&&(0,Ze.jsx)(DC,{id:"Sidebar__NavLink--Learn",route:"engage",messageId:"sidebar.learn",icon:"graduation-cap",circleColor:"secondary",name:"Sidebar__NavLink--Learn",collapsed:n}),o.allowedRioModules.includes(Vt.zB.Governance)&&!f&&(0,Ze.jsx)(DC,{id:"Sidebar__NavLink--Comply",route:"governance",messageId:"sidebar.governance",icon:"pencil-alt",circleColor:"tertiary",name:"Sidebar__NavLink--Comply",collapsed:n}),r.surveys&&!f&&(0,Ze.jsx)(DC,{route:l?"surveys/sent/overview":"surveys/received",messageId:"sidebar.surveys",icon:["rio","clipboard-check-custom"],notificationCount:m,circleColor:"quaternary",name:"Sidebar__NavLink--Surveys",id:"Sidebar__NavLink--Surveys",collapsed:n}),o.allowedRioModules.includes(Vt.zB.Data)&&!f&&(0,Ze.jsx)(DC,{id:"Sidebar__NavLink--Data",route:"data",messageId:"sidebar.data",icon:"chart-line",circleColor:"quaternary",name:"Sidebar__NavLink--Data",collapsed:n}),o.allowedRioModules.includes(Vt.zB.Reporting)&&!f&&(0,Ze.jsx)(DC,{id:"Sidebar__NavLink--Reporting",route:"reporting",messageId:"sidebar.reporting",icon:"chart-area",circleColor:"quaternary",name:"Sidebar__NavLink--Reporting",collapsed:n}),!!r.intelligence&&o.allowedRioModules.includes(Vt.zB.Intelligence)&&!f&&(0,Ze.jsx)(DC,{id:"Sidebar__NavLink--Intelligence",route:"intelligence",messageId:"sidebar.intelligence",icon:"brain",circleColor:"primary",name:"Sidebar__NavLink--Intelligence",collapsed:n}),r.flows&&!f&&(0,Ze.jsx)(DC,{route:"flows",messageId:"sidebar.flows",icon:["rio","flows"],circleColor:"quaternary",name:"Sidebar__NavLink--Flows",id:"Sidebar__NavLink--Flows",collapsed:n}),(0,Ze.jsx)(YC,{}),o.allowedRioModules.includes(Vt.zB.Configuration)&&(0,Ze.jsx)(DC,{id:"Sidebar__NavLink--Configuration",route:"configuration/".concat(o.configurationRoute),messageId:"sidebar.configuration",icon:"cog",circleColor:"white",name:"Sidebar__NavLink--Configuration",collapsed:n}),o.allowedRioModules.includes(Vt.zB.Documents)&&!f&&(0,Ze.jsx)(DC,{id:"Sidebar__NavLink--Documents",route:"documents",messageId:"sidebar.documents",icon:"file-alt",circleColor:"quaternary",name:"Sidebar__NavLink--Documents",collapsed:n}),o.allowedRioModules.includes(Vt.zB.Tasks)&&!f&&(0,Ze.jsx)(DC,{id:"Sidebar__NavLink--Tasks",route:"tasks",notificationCount:null==u?void 0:u.length,messageId:"sidebar.tasks",icon:"tasks",circleColor:"tertiary",name:"Sidebar__NavLink--Tasks",collapsed:n}),(0,Ze.jsx)(YC,{}),o.allowedRioModules.includes(Vt.zB.Support)&&(0,Ze.jsx)(DC,{id:"Sidebar__NavLink--Support",externalLink:!0,route:"https://support.rio.ai/knowledge",messageId:"sidebar.support",icon:"question",circleColor:"info",name:"Sidebar__NavLink--Support","data-cy":"Sidebar__NavLink--Support",collapsed:n})]}),(0,Ze.jsxs)(WC,{container:!0,itemAlign:"center",collapsed:n,children:[(0,Ze.jsx)(qC,{}),(0,Ze.jsxs)(JC,{size:"xs",color:"white",align:"center",children:["© ",(new Date).getFullYear()," Rio AI Ltd"]})]})]})};var KC,QC,ZC;function XC(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const eS=Ge.default.div(KC||(KC=XC(["\n  color: ",";\n"])),e=>{let{theme:n,error:t}=e;return t?n.colors.danger.normal.background:"black"}),nS=Ge.default.div(QC||(QC=XC(["\n  margin: 15px;\n  margin-top: 35px;\n  padding: 15px;\n  border-radius: 25px;\n  background: ",";\n  max-height: 580px;\n  overflow-y: auto;\n"])),e=>{let{theme:n}=e;return n.colors.neutral.normal.background}),tS=Ge.default.div(ZC||(ZC=XC(["\n  margin: 20px;\n"]))),aS=(e,n)=>e.row>n.row?1:e.row<n.row?-1:0,rS=e=>(0,Ze.jsxs)(eS,{error:"error"===e.type,children:[e.message,"error"===e.type?" at row ".concat(e.row+2):""]}),iS=e=>e.sort(aS).map(rS),oS=e=>{let{uploadedItems:n}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(tS,{children:"Your uploads"}),(0,Ze.jsx)(nS,{children:iS(n)})]})};var lS,sS,cS,dS,uS,pS,mS,fS,yS,gS,bS,hS,vS,xS;function TS(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const OS=(0,D.J1)(lS||(lS=TS(["\n  fragment UserFields on User {\n    id\n    email\n    username\n    roles\n    first_name\n    last_name\n    jobTitle\n    department\n    mobile\n    phone\n    profilePicture\n    disabled\n    last_active_at\n    total_time_spent_ms\n    account {\n      id\n      name\n    }\n    role {\n      role\n      name\n      restrictedAccess\n    }\n    accessLevel\n    allowedLocations {\n      id\n      name\n      tags {\n        id\n        tagName\n      }\n    }\n    allowedTags {\n      id\n      tagName\n      locations {\n        id\n      }\n    }\n    disableAccountSelector\n    userGroupName\n  }\n"]))),kS=(0,D.J1)(sS||(sS=TS(["\n  fragment MysqlUserFields on MysqlUser {\n    id\n    accountId\n    firstName\n    lastName\n    email\n    isDisabled\n    accessLevel\n    allowedLocations\n    allowedTags\n    role\n    jobTitle\n    phone\n    mobile\n    department\n    profilePicture\n    lastActiveAt\n    totalTimeSpentMs\n    accountName\n    tags\n    locations\n    readonly\n    isExternalUser\n    disableAccountSelector\n    userGroupName\n  }\n"]))),jS=(0,D.J1)(cS||(cS=TS(["\n  mutation DeleteUser($username: String!) {\n    deleteUser(username: $username)\n  }\n"]))),CS=(0,D.J1)(dS||(dS=TS(["\n  query GetUserById($id: String!) {\n    getUserInfoById(id: $id) {\n      ...UserFields\n    }\n  }\n  ","\n"])),OS),SS=(0,D.J1)(uS||(uS=TS(["\n  mutation createNewUser(\n    $email: String!\n    $first_name: String!\n    $last_name: String!\n    $roles: UserRole!\n    $password: String!\n    $account_id: ID!\n    $accessLevel: Scope\n    $allowedTagsIds: [ID]\n    $allowedLocationsIds: [ID]\n    $jobTitle: String\n    $department: String\n    $phone: String\n    $mobile: String\n    $disableAccountSelector: Boolean\n    $userGroupId: ID\n  ) {\n    createUser(\n      input: {\n        username: $email\n        first_name: $first_name\n        last_name: $last_name\n        roles: [$roles]\n        password: $password\n        account_id: $account_id\n        accessLevel: $accessLevel\n        allowedTagsIds: $allowedTagsIds\n        allowedLocationsIds: $allowedLocationsIds\n        jobTitle: $jobTitle\n        department: $department\n        phone: $phone\n        mobile: $mobile\n        disableAccountSelector: $disableAccountSelector\n        userGroupId: $userGroupId\n      }\n    ) {\n      ...UserFields\n    }\n  }\n  ","\n"])),OS),NS=(0,D.J1)(pS||(pS=TS(["\n  mutation UpdateUser(\n    $email: String!\n    $previousEmail: String\n    $first_name: String!\n    $last_name: String!\n    $account_id: ID!\n    $id: String!\n    $accessLevel: Scope\n    $allowedTagsIds: [ID]\n    $allowedLocationsIds: [ID]\n    $jobTitle: String\n    $department: String\n    $phone: String\n    $mobile: String\n    $profile: String\n    $disableAccountSelector: Boolean\n    $userGroupId: ID\n  ) {\n    updateUser(\n      input: {\n        email: $email\n        previousEmail: $previousEmail\n        first_name: $first_name\n        last_name: $last_name\n        account_id: $account_id\n        id: $id\n        accessLevel: $accessLevel\n        allowedTagsIds: $allowedTagsIds\n        allowedLocationsIds: $allowedLocationsIds\n        jobTitle: $jobTitle\n        department: $department\n        phone: $phone\n        mobile: $mobile\n        profilePicture: $profile\n        disableAccountSelector: $disableAccountSelector\n        userGroupId: $userGroupId\n      }\n    ) {\n      ...UserFields\n    }\n  }\n  ","\n"])),OS),wS=(0,D.J1)(mS||(mS=TS(["\n  mutation UpdateUserRole($id: String!, $roles: UserRole!) {\n    updateUserRoles(input: { roles: [$roles], username: $id }) {\n      id\n    }\n  }\n"]))),DS=(0,D.J1)(fS||(fS=TS(["\n  mutation resendEmail($username: String!, $password: String!) {\n    resendEmail(input: { username: $username, password: $password }) {\n      username\n    }\n  }\n"]))),AS=(0,D.J1)(yS||(yS=TS(["\n  mutation SetUserDisabled($id: String!, $disabled: Boolean!) {\n    setUserDisabled(id: $id, disabled: $disabled) {\n      ...UserFields\n    }\n  }\n  ","\n"])),OS),RS=(0,D.J1)(gS||(gS=TS(["\n  mutation ResetUserPassword($username: ID!, $password: String!) {\n    resetUserPassword(username: $username, password: $password)\n  }\n"]))),PS=(0,D.J1)(bS||(bS=TS(["\n  query GetRoles {\n    getUserRoles {\n      role\n      name\n      restrictedAccess\n      readonly\n    }\n  }\n"]))),LS=(0,D.J1)(hS||(hS=TS(["\n  query GetUsers($accountId: String!, $offset: Int, $limit: Int = 25, $sort: [SortCommand!], $filters: Filters) {\n    getUsers(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        ...MysqlUserFields\n      }\n      totalRows\n    }\n  }\n  ","\n"])),kS),IS=(0,D.J1)(vS||(vS=TS(["\n  query GetUsersFilter($accountId: ID!, $field: String!) {\n    getUsersFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));var ES,_S,FS,BS,US,MS,VS,zS,GS;function $S(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(0,D.J1)(xS||(xS=TS(["\n  query getUsersLocation($accountId: ID!) {\n    getUsersLocation(accountId: $accountId) {\n      id\n      name\n    }\n  }\n"])));const WS=Ge.default.div(ES||(ES=$S(["\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: center;\n  position: fixed;\n  bottom: 0;\n  left: 360px;\n  right: 100px;\n  height: 75px;\n  background: white;\n  box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.3);\n"]))),qS=(e,n,t)=>{const a=e.data[t].success.map(e=>({type:"success",message:"'".concat(e.name||"".concat(e.first_name," ").concat(e.last_name),"' successfully uploaded!"),row:2})),r=e.data[t].errors.map(e=>({type:"error",message:"Duplicate name: ".concat(e),row:n.findIndex(n=>n.name===e.split(": ")[1])}));return[...a,...r]},JS=async(e,n,t,a,r)=>{const i=(e=>e.length<=10?[e]:Gt().chunk(e,e.length/10))(e);await Promise.all(i.map(async(r,i)=>{if("users"===a){const i=(e=>{const n=(e=>e.map((e,n)=>"$username".concat(n,": String!, $password").concat(n,": String!, $roles").concat(n,": [UserRole!]!, $first_name").concat(n,": String!, $last_name").concat(n,": String!, $jobTitle").concat(n,": String, $department").concat(n,": String, $phone").concat(n,": String, $mobile").concat(n,": String, $account_id").concat(n,": ID!, $accessLevel").concat(n,": Scope, $allowedLocationsIds").concat(n,": [ID], $allowedTagsIds").concat(n,": [ID]")).join(", "))(e),t="mutation Create".concat(e.length,"Users(").concat(n,") {"),a=(e=>{const n=(e=>{const n=e.map((e,n)=>"{\n        username: $username".concat(n,"\n        password: $password").concat(n,"\n        roles: $roles").concat(n,"\n        first_name: $first_name").concat(n,"\n        last_name: $last_name").concat(n,"\n        jobTitle: $jobTitle").concat(n,"\n        department: $department").concat(n,"\n        phone: $phone").concat(n,"\n        mobile: $mobile").concat(n,"\n        account_id: $account_id").concat(n,"\n        accessLevel: $accessLevel").concat(n,"\n        allowedLocationsIds: $allowedLocationsIds").concat(n,"\n        allowedTagsIds: $allowedTagsIds").concat(n,"\n      }")).join(",");return"[".concat(n,"]")})(e);return"createUsers(input: ".concat(n,") {\n        success {\n          first_name\n          last_name\n          id\n          username\n          email\n          jobTitle\n          department\n          phone\n          mobile\n          roles\n        }\n        errors\n      }\n      ")})(e),r="\n      ".concat(t,"\n      ").concat(a,"\n      }\n    "),i=(0,D.J1)(r),o=(e=>{const n={};return e.forEach((e,t)=>{n["username".concat(t)]=e.username,n["password".concat(t)]=e.password,n["roles".concat(t)]=e.roles?e.roles.split(", "):[],n["first_name".concat(t)]=e.first_name,n["last_name".concat(t)]=e.last_name,n["jobTitle".concat(t)]=e.jobTitle,n["department".concat(t)]=e.department,n["phone".concat(t)]=e.phone,n["mobile".concat(t)]=e.mobile,n["account_id".concat(t)]=e.account_id,n["accessLevel".concat(t)]=e.accessLevel,n["allowedLocationsIds".concat(t)]=e.allowedLocationsIds,n["allowedTagsIds".concat(t)]=e.allowedTagsIds}),n})(e);return{createMutation:i,variables:o}})(r);console.log(i),await((e,n,t,a,r)=>async(t,i)=>{const o=await e.mutate({mutation:a,variables:t,refetchQueries:t.account_id0?[{query:Oc(),variables:{limit:600,accountId:t.account_id0}}]:[]});n(e=>{return[...e,...qS(o,i,(n=r,{locations:"createLocationWithLocationPointsBatch",users:"createUsers"}[n]))];var n})})(n,t,0,i.createMutation,a)(i.variables,e)}})),r&&r()},YS=Ge.default.div(_S||(_S=$S(["\n  height: 20px;\n  width: 100%;\n"]))),HS=Ge.default.div(FS||(FS=$S(["\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  display: flex;\n  flex-direction: row;\n"]))),KS=Ge.default.div(BS||(BS=$S(["\n  position: relative;\n  height: 100%;\n  width: 100%;\n  background: ",";\n  box-shadow: 1px 1px 6px inset rgba(0, 0, 0, 0.3);\n"])),e=>{let{theme:n}=e;return n.colors.neutral.normal.background}),QS=Ge.default.div(US||(US=$S(["\n  height: 100%;\n  width: ","%;\n  background: ",";\n"])),e=>{let{percentage:n}=e;return n},e=>{let{theme:n}=e;return n.colors.primary.dark.background}),ZS=Ge.default.div(MS||(MS=$S(["\n  height: 100%;\n  width: ","%;\n  background: ",";\n"])),e=>{let{percentage:n}=e;return n},e=>{let{theme:n}=e;return n.colors.danger.dark.background}),XS=e=>{let{percentage:n,errorPercentage:t}=e;return(0,Ze.jsx)(YS,{children:(0,Ze.jsx)(KS,{children:(0,Ze.jsxs)(HS,{children:[(0,Ze.jsx)(QS,{percentage:n}),(0,Ze.jsx)(ZS,{percentage:t})]})})})},eN=(e,n)=>Math.round(e/n*100),nN=Ge.default.div(VS||(VS=$S(["\n  cursor: pointer;\n"]))),tN=(0,Ge.default)(ze.In)(zS||(zS=$S([""]))),aN=Ge.default.div(GS||(GS=$S(["\n  width: 100%;\n  padding: 20px;\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  align-items: center;\n"]))),rN=e=>e.filter(e=>"error"===e.type).length,iN=e=>e.filter(e=>"success"===e.type).length,oN=(0,Ib.W)(e=>{let{client:n,items:t,dismiss:a,createMutation:r,onComplete:i}=e;const[o,l]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1);return(0,g.useEffect)(()=>{JS(t,n,l,r,i)},[t,n,l,r,i]),(0,Ze.jsxs)(WS,{children:[(0,Ze.jsxs)(aN,{children:[(0,Ze.jsxs)("div",{children:["Uploaded: ",iN(o)]}),(0,Ze.jsxs)("div",{children:["Errors: ",rN(o)]}),(0,Ze.jsx)(nN,{onClick:()=>c(!0),children:"View Uploads"}),(0,Ze.jsx)(tN,{icon:"times",onClick:a})]}),(0,Ze.jsx)(XS,{percentage:eN(iN(o),t.length),errorPercentage:eN(rN(o),t.length),successCount:iN(o),errorCount:rN(o)}),(0,Ze.jsx)(ze.aF,{span:5,size:"md",show:s,name:"MassUpload__Modal",dismissable:!0,onDismiss:()=>c(!1),children:(0,Ze.jsx)(oS,{uploadedItems:o})})]})});var lN,sN,cN;function dN(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const uN=Ge.default.div(lN||(lN=dN(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),pN=(0,Ge.default)(ze.fI)(sN||(sN=dN(["\n  justify-content: center;\n"]))),mN=(0,Ge.default)(ze.EY)(cN||(cN=dN(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),fN=e=>{let{headingText:n,bodyText:t,onConfirmAction:a,onCancelAction:r,name:i="confirmAction",confirmButtonTitle:o="Confirm",cancelButtonTitle:l="Cancel"}=e;return(0,Ze.jsx)(uN,{id:"".concat(i,"__container"),children:(0,Ze.jsxs)(ze.hh,{children:[(0,Ze.jsx)(ze.DZ,{id:"".concat(i,"__text--heading"),name:"".concat(i,"__text--heading"),align:"center",size:"lg",children:n}),(0,Ze.jsx)(pN,{container:!0,item:!0,children:(0,Ze.jsx)(mN,{id:"".concat(i,"__text--body"),name:"".concat(i,"__text--body"),align:"center",children:t})}),(0,Ze.jsxs)(ze.hh.Row,{children:[(0,Ze.jsx)(ze.hh.ButtonColumn,{span:6,color:"danger",id:"".concat(i,"__button--confirm"),name:"".concat(i,"__button--confirm"),onClick:()=>a(),children:o}),(0,Ze.jsx)(ze.hh.ButtonColumn,{span:6,color:"primary",id:"".concat(i,"__button--cancel"),name:"".concat(i,"__button--cancel"),onClick:()=>r(),children:l})]})]})})},yN=["show","size","onDismiss"];function gN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function bN(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gN(Object(t),!0).forEach(function(n){hN(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gN(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hN(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function vN(e){let{show:n,size:t="md",onDismiss:a}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,yN);return(0,Ze.jsx)(ze.aF,{size:t,height:"30vh",show:n,onDismiss:a,children:(0,Ze.jsx)(fN,bN({},r))})}var xN,TN,ON,kN,jN,CN,SN;function NN(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const wN=Ge.default.div(xN||(xN=NN(["\n  position: fixed;\n  left: 25%;\n  bottom: 16px;\n  width: 50%;\n  height: auto;\n  background: white;\n  box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.3);\n"]))),DN=(0,Ge.default)(ze.In)(TN||(TN=NN(["\n  cursor: pointer;\n"]))),AN=(0,Ge.default)(ze.fI)(ON||(ON=NN(["\n  position: relative;\n  align-items: center;\n  height: 48px;\n"]))),RN=(0,Ge.default)(ze.z2)(kN||(kN=NN(["\n  & {\n    position: absolute;\n    height: 36px;\n  }\n"]))),PN=(0,Ge.default)(ze.EY)(jN||(jN=NN(["\n  min-height: 300px;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),LN=(0,Ge.default)(ze.EY)(CN||(CN=NN(["\n  cursor: pointer;\n  text-decoration: underline;\n"]))),IN=(0,Ge.default)(ze.EY)(SN||(SN=NN(["\n  width: 100%;\n"]))),EN=e=>e.error?"danger":100===e.percents?"green":"blue";function _N(){const e=$l(),n=null==e?void 0:e.getExports(),[t,a]=(0,g.useState)(null),[r,i]=(0,g.useState)(null);return null!=n&&n.length?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.sx,{children:(0,Ze.jsx)(wN,{children:n.map(n=>(0,Ze.jsxs)(AN,{container:!0,children:[(0,Ze.jsxs)(ze.fv,{container:!0,span:9,children:[(0,Ze.jsx)(ze.fI,{item:!0,container:!0,children:(0,Ze.jsx)(IN,{align:"center",children:n.fileName})}),(0,Ze.jsx)(RN,{completed:n.percents,color:EN(n),valueBuffer:n.step})]}),(0,Ze.jsx)(ze.fv,{span:2,children:n.error?(0,Ze.jsx)(LN,{align:"center",onClick:()=>a(n.error),children:"Show details"}):(0,Ze.jsxs)(ze.EY,{align:"center",children:[Math.round(n.percents)||0,"%"]})}),(0,Ze.jsx)(ze.fv,{span:1,children:n.completed?(0,Ze.jsx)(DN,{onClick:()=>{null==e||e.stopExport(n.id,{shouldDelete:!1})},icon:"check",color:"green"}):(0,Ze.jsx)(DN,{onClick:()=>{n.error?null==e||e.stopExport(n.id,{shouldDelete:!0}):i(n.id)},icon:"times-circle",color:"red"})})]},n.id))})}),(0,Ze.jsxs)(ze.aF,{show:!!t,size:"sm",onDismiss:()=>a(null),children:[(0,Ze.jsx)(ze.DZ,{align:"center",size:"md",color:"dark",children:"Error details:"}),(0,Ze.jsx)(PN,{align:"center",size:"md",color:"dark",children:null==t?void 0:t.toString()})]}),(0,Ze.jsx)(vN,{show:!!r,onDismiss:()=>i(null),headingText:"Do you want to abort the export?",bodyText:"All progress will be lost.",onConfirmAction:()=>{null==e||e.stopExport(r,{shouldDelete:!0}),i(null)},onCancelAction:()=>{i(null)}})]}):null}var FN,BN,UN,MN;function VN(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const zN=Ge.default.div(FN||(FN=VN(["\n  display: flex;\n  height: 100%;\n  width: 100%;\n  min-width: 1200px;\n"]))),GN=(0,Ge.default)(ze.fv)(BN||(BN=VN(["\n  background-color: ",";\n  overflow: hidden;\n\n  & > .Header {\n    padding-left: 20px;\n    padding-right: 40px;\n  }\n"])),e=>e.theme.colors.neutral.normal.background),$N=(0,Ge.default)(ze.fv)(UN||(UN=VN(["\n  height: 100%;\n  overflow: hidden;\n  flex: 1 1 auto;\n"]))),WN=(0,Ge.default)(ze.Ip)(MN||(MN=VN(["\n  margin: auto;\n  position: relative;\n  top: 35%;\n"]))),qN=["children","to","base","activeClassName"];var JN;function YN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function HN(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?YN(Object(t),!0).forEach(function(n){KN(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):YN(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function KN(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function QN(){return QN=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},QN.apply(null,arguments)}const ZN=(0,Ge.default)(e=>{let n=QN({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,Ze.jsx)(p.Link,HN({},n))})(JN||(JN=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  cursor: ",";\n"])),e=>e.restricted?"default":"pointer"),XN=e=>{const n=(0,m.zy)(),{children:t,to:a="/",base:r,activeClassName:i="active"}=e,o=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,qN),l=n.pathname.includes(r||a);return(0,Ze.jsx)(p.Link,HN(HN({},o),{},{to:a,children:g.Children.map(t,(e,n)=>g.cloneElement(e,HN(HN({},o),{},{key:n,className:l?i:""})))}))};var ew,nw,tw,aw,rw,iw,ow,lw,sw,cw,dw,uw,pw,mw,fw,yw,gw;function bw(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hw=(0,Ge.default)(ze.fI)(ew||(ew=bw(["\n  margin: 0 auto 40px;\n  width: 80%;\n\n  h2 {\n    margin-bottom: ",";\n    font-size: ",";\n  }\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.fonts.lg.size),vw=Ge.default.div(nw||(nw=bw(["\n  margin: 20px auto;\n"]))),xw=Ge.default.div(tw||(tw=bw(["\n  margin: 20px auto;\n\n  label {\n    display: inline-block;\n    margin-bottom: 15px;\n  }\n"]))),Tw=Ge.default.div(aw||(aw=bw(["\n  text-align: center;\n  padding-top: 40px;\n\n  h2 {\n    font-size: ",";\n  }\n\n  a {\n    text-transform: uppercase;\n    text-decoration: underline;\n  }\n"])),e=>e.theme.fonts.lg.size),Ow=(0,Ge.default)(ze.Ip)(rw||(rw=bw(["\n  margin: 30px auto 0;\n"]))),kw=(0,Ge.default)(ze.$n)(iw||(iw=bw(["\n  width: 150px;\n  float: right;\n  margin-left: 10px;\n"]))),jw=Ge.default.div(ow||(ow=bw(["\n  margin: 0 auto;\n  width: 85%;\n  padding-top: 40px;\n\n  h1 {\n    width: 80%;\n    font-size: ",";\n    margin: 0 auto;\n  }\n\n  p {\n    margin: 0 auto 20px;\n    font-size: 20px;\n    width: 80%;\n  }\n"])),e=>e.theme.fonts.md.size),Cw=Ge.default.span(lw||(lw=bw(["\n  text-transform: capitalize;\n"]))),Sw=(Ge.default.span(sw||(sw=bw(["\n  font-size: ","\n  font-weight: bold;\n"])),e=>e.theme.fonts.md.size),(0,Ge.default)(ze.fI)(cw||(cw=bw(["\n  align-items: center;\n  margin-bottom: 20px;\n"]))),(0,Ge.default)(ze.$n)(dw||(dw=bw(["\n  width: 200px;\n  margin: 0 auto;\n"])))),Nw=((0,Ge.default)(ze.fv)(uw||(uw=bw(["\n  text-align: left;\n"]))),(0,Ge.default)(ze.fv)(pw||(pw=bw(["\n  text-align: right;\n"]))),(0,Ge.default)(ze.$n)(mw||(mw=bw(["\n  width: 160px;\n  display: inline-block;\n"])))),ww=(0,Ge.default)(ze.$n)(fw||(fw=bw(["\n  width: 160px;\n  float: right;\n"]))),Dw=Ge.default.div(yw||(yw=bw(["\n  display: inline-block;\n  margin-left: 20px;\n\n  & > div {\n    float: none;\n  }\n"]))),Aw=Ge.default.div(gw||(gw=bw(["\n  text-align: center;\n  margin-bottom: 20px;\n"])));var Rw=t(51918);const Pw=["value","onChange","name","options"];function Lw(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Iw(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Lw(Object(t),!0).forEach(function(n){Ew(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Lw(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ew(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function _w(e){const{value:n,onChange:t,name:a,options:r=[]}=e,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,Pw);return(0,Ze.jsx)(ze.l6,Iw(Iw({},i),{},{name:a,onChange:function(){let{target:{value:e}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(e)},options:r,value:n}))}function Fw(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Bw(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fw(Object(t),!0).forEach(function(n){Uw(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fw(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Uw(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Mw(){const{productId:e,accountId:n,productType:t}=(0,m.g)(),a=(0,m.Zp)(),r="bundle"===t,i=oc(),{control:o,handleSubmit:l,setValue:s}=(0,Rw.mN)(),{isSystemAdmin:c,licenceService:d}=rc(),[u,{loading:f}]=function(){const[e,n]=(0,Ot.n)(Is()),t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{data:{assignBatchAccountLicence:n=[]}={}}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,Es);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_s(Object(t),!0).forEach(function(n){Fs(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_s(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({data:n},t)};return[async n=>t(await e({variables:{input:n}})),t(n)]}(),[y,{loading:g}]=function(){const[e,n]=(0,Ot.n)(Qs()),t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{data:{assignBatchLicences:n=[]}={}}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,Zs);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Xs(Object(t),!0).forEach(function(n){ec(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xs(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({data:n},t)};return[async n=>t(await e({variables:{input:n}})),t(n)]}(),{data:b,loading:v}=wl(e,{skip:r}),{data:x,loading:T}=yl(e,{skip:!r||!d.createLicence}),{data:O,loading:k}=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,h.IT)(Bl(),Vl({variables:{accountId:n,bundleId:e}},t)),{data:{getLearnBundleById:r}={}}=a,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(a,Ul);return Vl({data:r},i)}(e,n,{skip:!r||d.createLicence}),j=x||O,{data:C,loading:S}=function(e,n){const t=(0,h.IT)(Us(),{variables:{productId:e,accountId:n},fetchPolicy:"cache-and-network"}),{data:{getLicencesByProductAndAccount:a=[]}={}}=t,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(t,Ms),i=a?a.map(e=>zs(zs({},e),{},{isNew:"NEW"===e.status})):[];return zs({data:i},r)}(e,n),{data:{content:N},loading:w}=Sc(n),{showNotification:D}=vt(),A=r?j:b,R=new Map(N.map(e=>[e.id,e])),P=new Set(C.map(e=>{let{userId:n,productId:t}=e;return n+t})),L=N.filter(n=>{let{id:t}=n;return!P.has(t+e)}).map(e=>{let{id:n}=e;return n}),I=S||g||f||v||T||k||w,E=!C.length&&!I,_=L.length,F=Hr("/".concat(i.configuration.root,"/").concat(i.configuration.menu.learn.createLicense),{accountId:n,productType:t,productId:e}),B=c&&d.createLicence;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(bh,{name:"ConfigurationLearnSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:"Licence assigning"}),E&&(0,Ze.jsxs)(Tw,{children:[B&&(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)("h2",{children:["There are not licences",(0,Ze.jsx)("br",{}),(0,Ze.jsx)(p.Link,{to:F,children:"Create licences"})]})}),!c&&(0,Ze.jsxs)("h2",{children:["You do not currently have any licences. ",(0,Ze.jsx)("br",{}),"Please contact your administrator or purchase licences ",(0,Ze.jsx)(p.Link,{to:i.market.engage,children:"here"})]})]}),!E&&(0,Ze.jsx)(hw,{container:!0,children:(0,Ze.jsxs)(ze.fv,{span:12,children:[I&&(0,Ze.jsx)(Ow,{}),!I&&(0,Ze.jsxs)("form",{onSubmit:l(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{const t=Object.entries(e).filter(e=>{let[,n]=e;return n}).map(e=>{let[t,a]=e;return c?{licenceId:t,userId:a,accountId:n}:{licenceId:t,userId:a}});if(!t.length)return;const{data:a}=c?await y(t):await u(t);if(!a.length)throw new Error("Not Assigned");D("Licences have been assigned")}catch(e){D("Licences have not been assigned","danger")}}),children:[(0,Ze.jsx)("div",{children:(0,Ze.jsxs)(vw,{children:[(0,Ze.jsxs)(ze.fI,{container:!0,children:[(0,Ze.jsx)(ze.fv,{span:6,children:(0,Ze.jsx)("h2",{children:r?null==A?void 0:A.title:null==A?void 0:A.name})}),(0,Ze.jsxs)(ze.fv,{span:6,children:[(0,Ze.jsxs)(kw,{size:"sm",disabled:!_,onClick:e=>{e.preventDefault(),C.filter(e=>{let{isNew:n}=e;return n}).forEach(e=>{let{id:n}=e;L.length&&s(n,L.shift())})},children:["Assign all (",_,") users"]}),B&&(0,Ze.jsx)(kw,{onClick:()=>a(F),size:"sm",children:"Create licence"})]})]}),C.map((e,n)=>{let{id:t,userId:a}=e;return(0,Ze.jsxs)(xw,{children:[(0,Ze.jsxs)("label",{span:4,children:["Licence # ",++n]}),(0,Ze.jsx)("div",{children:a&&R.get(a)?(0,Ze.jsxs)("span",{children:["Assigned to: ",R.get(a).first_name," ",R.get(a).last_name," -"," ",R.get(a).email]}):(0,Ze.jsx)(Rw.xI,{name:t,control:o,render:e=>{let{field:n}=e;return(0,Ze.jsx)(_w,Bw(Bw({},n),{},{options:(t=null==A?void 0:A.id,N.filter(e=>!P.has(e.id+t)).map(e=>{let{id:n,email:t,first_name:a,last_name:r}=e;return{label:"".concat(a," ").concat(r," - ").concat(t),value:n}}))}));var t}})})]},t)})]})}),(0,Ze.jsx)("div",{children:(0,Ze.jsx)(ze.$n,{children:"Save"})})]})]})})]})}var Vw=t(56137),zw=t(32249),Gw=t.n(zw),$w=t(28621);const Ww=t.p+"json-file-5c210a7621be8aeec55c.png",qw=["onDestroy","id","onGridReady","onColumnResized","defaultColDef","rowIdField"];var Jw;function Yw(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Hw(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Yw(Object(t),!0).forEach(function(n){Kw(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Yw(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Kw(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}$w.hFV.setLicenseKey(kn("REACT_APP_AG_GRID_LICENSE_KEY"));const Qw=Ge.default.div(Jw||(Jw=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n  overflow: auto;\n  & .ag-paging-panel {\n    justify-content: flex-start;\n  }\n  /* reduce ag-grid default header line-height and padding */\n  & .ag-header-cell {\n    line-height: normal;\n    padding: 8px;\n  }\n\n  /* make header separator height proportional to header height */\n  & .ag-header-cell:after,\n  & .ag-header-group-cell:after {\n    height: 50%;\n  }\n\n  /* set icons height to their real absolute value to ensure proper vertical alignment */\n  & .ag-header-cell-menu-button .ag-icon-menu,\n  & .ag-header-cell-label .ag-header-icon {\n    height: 16px;\n  }\n\n  /* make header text wrap, without breaking words and without ellipsis */\n  & .ag-header-cell-label .ag-header-cell-text {\n    height: auto;\n    overflow: visible;\n    overflow-wrap: normal;\n    text-overflow: clip;\n    white-space: normal;\n  }\n\n  & .ag-set-filter {\n    width: 330px !important;\n  }\n\n  & .ag-set-filter-list {\n    white-space: nowrap !important;\n    overflow-x: auto !important;\n\n    & .ag-virtual-list-container.ag-filter-virtual-list-container {\n      overflow-x: visible !important;\n      overflow-y: visible !important;\n    }\n  }\n\n  & .ag-set-filter-item,\n  & .ag-set-filter-item-value {\n    display: inline-block;\n    min-width: max-content;\n  }\n"])));function Zw(e,n){if(!1!==e.finished){e.api.setGridOption("headerHeight",48);const t=document.querySelectorAll("#".concat(n," .ag-header-cell-label"));let a=48;t.forEach(e=>{a=Math.max(a,e.scrollHeight)}),e.api.setGridOption("headerHeight",a+16)}}const Xw=e=>null!=e&&e.hasOwnProperty("name")?null==e?void 0:e.name:null!=e&&e.hasOwnProperty("title")?null==e?void 0:e.title:Array.isArray(e)?e.map(e=>Xw(e)).join(","):null,eD={processCellCallback:e=>{const n=e.value;return"object"==typeof n?Xw(n):n}};function nD(e){let{onDestroy:n,id:t,onGridReady:a,onColumnResized:r,defaultColDef:i,rowIdField:o="id"}=e,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,qw);(0,g.useEffect)(()=>()=>{n&&n()},[n]);const s=t||"ag-grid",c=(0,g.useMemo)(()=>Hw({wrapText:!0},i),[i]);return(0,Ze.jsx)(Qw,{className:"ag-theme-alpine",id:s,children:(0,Ze.jsx)(Vw.W6,Hw({debounceVerticalScrollbar:!0,suppressColumnVirtualisation:"test"===kn("NODE_ENV"),getContextMenuItems:e=>(e=>{const n=["copy","copyWithHeaders","paste","separator",{name:"Download JSON",action:()=>{const n=[];e.api.forEachNode(e=>n.push(e.data)),function(e){const n=new Blob([JSON.stringify(e)],{type:"application/json"}),t=URL.createObjectURL(n),a=document.createElement("a");a.setAttribute("href",t),a.setAttribute("download","transactions"),a.click(),a.remove()}(n)},icon:'<img border="0" width="16" height="16" src="'.concat(Ww,'"/>')}];return n})(e),getRowId:e=>{let{data:n}=e;return Gw()(n,o)},onColumnResized:e=>{Zw(e,s),r&&r(e)},onGridReady:e=>{Zw(e,s),a&&a(e)},defaultColDef:c,defaultExcelExportParams:eD},l))})}const tD=["onChange","trigger","type","value","withNegative"];function aD(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function rD(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?aD(Object(t),!0).forEach(function(n){iD(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):aD(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function iD(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const oD=(0,g.forwardRef)(function(e,n){const{onChange:t=()=>{},trigger:a=()=>{},type:r="text",value:i="",withNegative:o=!1}=e,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,tD),s=(0,g.useCallback)(e=>{const{target:{value:n}}=e,r=o?Sa:Ca;return(0,zt.isEmpty)(n)?(t(void 0,e),void a()):r(n)&&n?(t(n,e),void a()):void e.preventDefault()},[t,a,o]);return(0,Ze.jsx)(ze.ks,rD(rD({},l),{},{onChange:s,value:i,textInputRef:n,type:r}))}),lD=(0,g.forwardRef)(function(e,n){return(0,Ze.jsx)(oD,rD(rD({},e),{},{ref:n,withNegative:!0}))});var sD;const cD=Ge.default.div(sD||(sD=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 90px;\n  height: 40px;\n  border: 1px solid #43425d;\n  border-radius: 5px;\n  background-color: #fff;\n  font-size: 22px;\n  display: flex;\n  float: right;\n  \n  .cart-line-quantity {\n    flex-grow: 1;\n    text-align: center;\n    align-self: center;\n    \n    div {\n      margin: 0 auto;\n      padding: 0;\n      font-size: 22px;\n      width: 50px;\n      height: 30px;\n      border: none;\n      border-radius: 0;\n      background-color: transparent;\n      outline-color: transparent;\n      outline-offset: 0;\n      color: #000;\n    }\n    \n    input {\n      padding: 0;\n      font-size: 22px;\n      width: 50px;\n      height: 30px;\n      text-align: center;\n      border: none;\n      border-radius: 0;\n      background-color: #fff;\n      outline-color: #fff;\n      outline-offset: 0;\n      color: #000;\n    }\n  }\n  \n  .cart-line-arrow-holder {\n    display: flex;\n    flex-direction: column;\n    width: 30px;\n    color: #fff;\n    text-align: center;\n    user-select: none;\n    cursor: pointer;\n    \n    span {\n      background-color: #43425d;\n      height: 19px;\n      font-size: 16px;\n    }\n  }\n"]))),dD=["value","onIncrement","onDecrement"];function uD(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pD(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uD(Object(t),!0).forEach(function(n){mD(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uD(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mD(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const fD=(0,g.forwardRef)((e,n)=>{const{value:t=0,onIncrement:a=()=>{},onDecrement:r=()=>{}}=e,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,dD),[o,l]=(0,g.useState)(t);return(0,g.useEffect)(()=>{o!==t&&l(t)},[t]),(0,Ze.jsxs)(cD,{children:[(0,Ze.jsx)("div",{className:"cart-line-quantity",children:(0,Ze.jsx)(oD,pD(pD({},i),{},{ref:n,value:o,name:"Count-Picker__Number-Input"}))}),(0,Ze.jsxs)("div",{className:"cart-line-arrow-holder",children:[(0,Ze.jsx)("span",{onClick:()=>{const e=o+1;l(e),a(e)},name:"Count-Picker__Increment",children:(0,Ze.jsx)(ze.In,{icon:"angle-up",size:"1x"})}),(0,Ze.jsx)("span",{onClick:()=>{const e=o>0?o-1:0;l(e),r(e)},name:"Count-Picker__Decrement",children:(0,Ze.jsx)(ze.In,{icon:"angle-down",size:"1x"})})]})]})}),yD=["value","onChange","name"];function gD(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function bD(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gD(Object(t),!0).forEach(function(n){hD(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gD(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hD(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function vD(e){const{value:n,onChange:t,name:a}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,yD);return(0,Ze.jsx)(fD,bD(bD({},r),{},{name:a,onIncrement:t,onDecrement:t,value:n}))}function xD(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function TD(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function OD(){const e=(0,m.Zp)(),{productId:n,accountId:t,productType:a}=(0,m.g)(),r=oc(),i="bundle"===a,{control:o,handleSubmit:l,register:s,setValue:c}=(0,Rw.mN)({defaultValues:{accountId:t,productId:n}});(0,g.useEffect)(()=>{s("accountId"),s("productId")},[]);const{licenceService:{assignLicence:d}}=rc(),[u,{loading:p}]=function(){const[e,n]=(0,Ot.n)(Ws()),{data:{createBatchLicences:t=[]}={}}=n,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,qs);return[n=>e({variables:{input:n}}),Ys({data:t},a)]}(),{data:f,loading:y}=wl(n,{skip:i}),{data:b,loading:h}=yl(n,{skip:!i}),{data:v,loading:x}=j(t),{data:{users:T},loading:O}=Sc(t),{showNotification:k}=vt(),C=y||h||x||O||p,S=i?b:f,N=h||y,w=i?null==S?void 0:S.title:null==S?void 0:S.name,D=null==T?void 0:T.length;return(0,g.useEffect)(()=>{N||S||k("The ".concat(a," has not been found"),"danger")},[S,N]),(0,Ze.jsxs)("section",{children:[(0,Ze.jsx)(bh,{name:"ConfigurationLearnSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:"Licence creation"}),C&&(0,Ze.jsx)(Ow,{}),!C&&S&&(0,Ze.jsxs)(jw,{children:[d&&(0,Ze.jsx)(ze.fI,{container:!0,itemAlign:"center",children:(0,Ze.jsx)(ze.fv,{span:12,children:(0,Ze.jsx)(ww,{size:"sm",onClick:()=>e(Hr("/".concat(r.configuration.root,"/").concat(r.configuration.menu.learn.assignLicense),{accountId:t,productId:n,productType:a})),children:"Manage licences"})})}),(0,Ze.jsxs)("form",{onSubmit:l(async e=>{let{licenceCount:n=0,accountId:t,productId:a}=e;try{const e=Array.from({length:n},()=>({accountId:t,productId:a}));if(!e.length)return;await u(e),k("Licences have been created")}catch(e){k("Licences have not been created","danger"),de.Cp(e)}}),children:[(0,Ze.jsx)("h1",{children:"Licences for:"}),(0,Ze.jsxs)("p",{children:[(0,Ze.jsx)(Cw,{children:a})," ",w]}),(0,Ze.jsx)("h1",{children:"Account: "}),(0,Ze.jsx)("p",{children:v.name}),(0,Ze.jsxs)(Aw,{children:[(0,Ze.jsxs)(Nw,{size:"sm",onClick:e=>{e.preventDefault(),c("licenceCount",D)},children:["Add for all (",D,") users"]}),(0,Ze.jsx)(Dw,{children:(0,Ze.jsx)(Rw.xI,{name:"licenceCount",control:o,render:e=>{let{field:n}=e;return(0,Ze.jsx)(vD,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xD(Object(t),!0).forEach(function(n){TD(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xD(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},n))}})})]}),(0,Ze.jsx)(ze.fI,{container:!0,itemAlign:"center",align:"around",children:(0,Ze.jsx)(ze.fv,{span:12,children:(0,Ze.jsx)(Sw,{children:"Create"})})})]})]})]})}var kD;const jD=Ge.default.span(kD||(kD=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: inline-block;\n  margin-left: ",";\n"])),e=>e.theme.geometry.xxs.spacing);function CD(e){const{id:n,licencesCountMap:t=new Map}=e,a={total:0,assigned:0};return t.has(n)&&t.get(n).forEach(e=>{let{count:n,status:t}=e;"NEW"!==t&&(a.assigned+=n),a.total+=n}),(0,Ze.jsxs)(jD,{children:["Licences ",a.assigned,"/",a.total]})}const SD=e=>{let{gridApi:n,onClick:t,inline:a,title:r}=e;return(0,Ze.jsx)(ze.$n,{name:"button-clear-filters",color:"info",onClick:()=>{n&&(n.setFilterModel(null),n.setColumnsVisible(n.getColumns()||[],!0)),t&&t()},disabled:!n,inline:a,children:r||"Clear Filters"})};var ND,wD=t(44477),DD=t(18910);const AD=(0,D.J1)(ND||(ND=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(['\n  query GetTags($accountId: String!) {\n    getTagsByAccountId(input: { accountId: $accountId, applicationId: "RIO" }) {\n      id\n      tagName\n      isSystemLevelTag\n    }\n  }\n'])));function RD(e){return{value:e.id,label:e.tagName}}const PD=e=>{let{accountId:n,value:t,onChange:a,error:r,isSubmitting:i,name:o="tagIds",defaultOptions:l,disabled:s}=e;const{data:c,loading:d}=(0,h.IT)(AD,{variables:{accountId:n},fetchPolicy:"network-only"}),u=(null==c?void 0:c.getTagsByAccountId)||[],p=(0,g.useMemo)(()=>(0,zt.sortBy)(u.map(RD),e=>null==e?void 0:e.label.trim().toLowerCase()),[u]);return(0,Ze.jsx)(ze.KF,{name:o,isLoading:d,isDisabled:d||i||s,onChange:a,multiValueColor:"tertiary",value:t,error:r,defaultOptions:l,options:p})};var LD;const ID=(0,D.J1)(LD||(LD=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetLocationsByAccountId(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getLocationsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n      }\n    }\n  }\n"])));function ED(e){return{value:e.id,label:e.name}}function _D(e){let{accountId:n,value:t,onChange:a,error:r,isSubmitting:i,name:o="locationIds",defaultOptions:l,disabled:s}=e;const c=(0,N.m)();return(0,Ze.jsx)(ze.KF,{name:o,onChange:a,isDisabled:i||s,error:r,multiValueColor:"tertiary",defaultOptions:!Array.isArray(l)||l,value:t,placeholder:"Start typing to search for a location",loadOptions:async e=>{const{data:{getLocationsPage:t}}=await c.query({query:ID,variables:{accountId:n,filters:{text:[{filterType:"text",type:"contains",filter:e,field:"name"}]},sort:[{field:"name",order:"asc"}]}}),{totalRows:a}=t;return{options:t.rows?t.rows.map(ED):[],total:a}}})}var FD,BD,UD,MD,VD,zD,GD,$D,WD;function qD(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const JD=(0,D.J1)(FD||(FD=qD(["\n  mutation CreateAspect($input: AspectInput!) {\n    createAspect(input: $input) {\n      ...AspectFields\n    }\n  }\n  ","\n"])),Ns),YD=(0,D.J1)(BD||(BD=qD(["\n  mutation DeleteAspect($id: ID!, $accountId: ID!) {\n    deleteAspect(id: $id, accountId: $accountId)\n  }\n"]))),HD=(0,D.J1)(UD||(UD=qD(["\n  query GetAspectsByAccountId($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n    getAspectsByAccountId(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        ...AspectFields\n      }\n    }\n  }\n  ","\n"])),Ns),KD=(0,D.J1)(MD||(MD=qD(["\n  query GetAspectsCountByAccountId(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getAspectsByAccountId(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n    }\n  }\n"]))),QD=(0,D.J1)(VD||(VD=qD(["\n  fragment AspectOptionFields on AspectOption {\n    id\n    accountId\n    name\n    type\n    isGlobal\n    referenced\n  }\n"]))),ZD=(0,D.J1)(zD||(zD=qD(["\n  mutation CreateAspectOption($input: AspectOptionInput!) {\n    createAspectOption(input: $input) {\n      ...AspectOptionFields\n    }\n  }\n  ","\n"])),QD),XD=(0,D.J1)(GD||(GD=qD(["\n  mutation DeleteAspectOption($id: ID!, $accountId: ID!, $type: AspectOptionType!) {\n    deleteAspectOption(id: $id, accountId: $accountId, type: $type)\n  }\n"]))),eA=(0,D.J1)($D||($D=qD(["\n  query GetAspectFilter($accountId: ID!, $field: String!) {\n    getAspectFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"]))),nA=(0,D.J1)(WD||(WD=qD(["\n  query GetAllAspectOptions($accountId: ID!) {\n    activities: getAspectOptions(accountId: $accountId, type: ACTIVITY) {\n      ...AspectOptionFields\n    }\n    aspects: getAspectOptions(accountId: $accountId, type: ASPECT) {\n      ...AspectOptionFields\n    }\n    emergencyConditions: getAspectOptions(accountId: $accountId, type: EMERGENCY_CONDITION) {\n      ...AspectOptionFields\n    }\n    impacts: getAspectOptions(accountId: $accountId, type: IMPACT) {\n      ...AspectOptionFields\n    }\n    controlMeasures: getAspectOptions(accountId: $accountId, type: CONTROL_MEASURE) {\n      ...AspectOptionFields\n    }\n    statuses: getAspectOptions(accountId: $accountId, type: STATUS) {\n      ...AspectOptionFields\n    }\n  }\n  ","\n"])),QD);var tA=t(8296),aA=t.n(tA);const rA={ACTIVITY:"ACTIVITY",ASPECT:"ASPECT",RISK:"RISK",HAZZARDS:"HAZZARDS",WHOISEFFECTED:"WHOISEFFECTED",IMPACT:"IMPACT",EMERGENCY_CONDITION:"EMERGENCY_CONDITION",CONTROL_MEASURE:"CONTROL_MEASURE",STATUS:"STATUS",DEPARTMENT:we},iA={ACTIVITY:"Activity / Process",ASPECT:"Environmental Aspect",HAZZARDS:"Identified Hazzards",WHOISEFFECTED:"Who may be effected",IMPACT:"Potential Environmental Impact",EMERGENCY_CONDITION:"Potential Emergency Condition",CONTROL_MEASURE:"Relevant Control Measure",STATUS:"Status",DEPARTMENT:Ae[we]},oA=[{value:"1",label:"1 - Very unlikely"},{value:"2",label:"2 - Unlikely"},{value:"3",label:"3 - Possible"},{value:"4",label:"4 - Likely"},{value:"5",label:"5 - Very likely"}],lA=[{value:"-1",label:"-1 - Positive impact"},{value:"1",label:"1 - Negligible"},{value:"2",label:"2 - Minimal harm"},{value:"3",label:"3 - Some impact"},{value:"4",label:"4 - Harmful"},{value:"5",label:"5 - Severe impact"}];function sA(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function cA(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sA(Object(t),!0).forEach(function(n){dA(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sA(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dA(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function uA(){return(e,n,t,a)=>{const r=(0,zt.clone)(e.readQuery({query:P,variables:{name:a}})),i=cA(cA({},r),{},{getUserInfoById:cA(cA({},r.getUserInfoById),{},{account:cA(cA({},r.getUserInfoById.account),{},{departments:n})})});e.writeQuery({query:P,variables:{name:a},data:i});const o=(0,zt.clone)(e.readQuery({query:hd,variables:{id:t}})),l=cA(cA({},o),{},{getAccountInfo:cA(cA({},o.getAccountInfo),{},{departments:n})});e.writeQuery({query:hd,variables:{id:t},data:l})}}var pA,mA,fA,yA,gA,bA,hA;function vA(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xA(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vA(Object(t),!0).forEach(function(n){TA(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vA(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function TA(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function OA(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const kA=Ge.default.form(pA||(pA=OA(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),jA=(0,Ge.default)(ze.JU)(mA||(mA=OA(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),CA=Ge.default.div(fA||(fA=OA(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),SA=(0,Ge.default)(ze.DZ)(yA||(yA=OA(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),NA=(0,Ge.default)(ze.fv)(gA||(gA=OA(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),wA=(0,Ge.default)(ze.fI)(bA||(bA=OA(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.xs.spacing),DA=(0,Ge.default)(ze.fv)(hA||(hA=OA(["\n  padding: 0 ",";\n"])),e=>e.theme.geometry.xs.spacing),AA=e=>{let{onDismiss:n,onCompleted:t,onError:a,type:r,accountId:i}=e;const o=ms(),l=uA(),s=(0,g.useRef)(null),[c,d]=(0,g.useState)(!1),[u,p]=(0,g.useState)({name:"",departmentId:(0,Ai.A)()}),[m,f]=(0,g.useState)({}),[y]=(0,Ot.n)(rA.DEPARTMENT===r?aA():ZD,{onError:a,onCompleted:e=>{t(e,r===rA.DEPARTMENT?e.createDepartment[0]:e.createAspectOption)},update(e,n){let{data:{createDepartment:t}}=n;l(e,t,i,o)}});return(0,g.useEffect)(()=>{s&&s.current&&s.current.focus()}),(0,Ze.jsx)(ze.aF,{onDismiss:n,size:"md",show:!0,height:"auto",maxHeight:"80vh",children:(0,Ze.jsxs)(kA,{children:[(0,Ze.jsxs)(SA,{size:"lg",children:["Create ",iA[r]]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(NA,{item:!0,children:[(0,Ze.jsx)(CA,{children:(0,Ze.jsx)(jA,{children:"Name"})}),(0,Ze.jsx)(ze.ks,{disabled:c,textInputRef:s,type:"text",onChange:e=>{e.target.value&&f(xA(xA({},m),{},{name:null})),p(xA(xA({},u),{},{name:e.target.value,departmentId:(0,Ai.A)()}))},name:"name",value:u.name,error:m.name,box:!0})]})}),(0,Ze.jsxs)(wA,{container:!0,children:[(0,Ze.jsx)(DA,{container:!0,item:!0,children:(0,Ze.jsx)(ze.$n,{color:"info",onClick:n,children:"Cancel"})}),(0,Ze.jsx)(DA,{container:!0,item:!0,children:(0,Ze.jsx)(ze.$n,{type:"button",onClick:async()=>{const e=function(e){const n={};return e.name||(n.name="Name is required"),n}(u);if(Object.keys(e).length)return f(e);d(!0);const n=u.name.trim(),t=rA.DEPARTMENT===r?{name:n,accountId:i,departmentId:u.departmentId}:{name:n,type:r,accountId:i};await y({variables:{input:t}}),d(!1)},children:"Create"})})]})]})})};function RA(e){let{showCreateDepartment:n,setShowCreateDepartment:t,passedAccountId:a,onComplete:r}=e;const i=rt(),o=a||i;return n&&(0,Ze.jsx)(AA,{accountId:o,type:rA.DEPARTMENT,onDismiss:()=>t(!1),onCompleted:(e,n)=>{t(!1),r(e,n)}})}function PA(e){let{userId:n,disabled:t,showNotification:a}=e;const[r,i]=(0,g.useState)(!1),[o]=(0,Ot.n)(AS);return(0,Ze.jsx)(ze.$n,{color:t?"secondary":"danger",disabled:r,onClick:async()=>{i(!0);try{await o({variables:{id:n,disabled:!t}}),a("The user has been successfully ".concat(t?"enabled":"disabled","!"),"success")}catch(e){a("Something went wrong, if the problem persists please contact support","danger")}finally{i(!1)}},children:t?"Enable user":"Disable user"})}var LA=t(58476),IA=t.n(LA);const EA=e=>e===Vt.HG.Tag||e===Vt.HG.Location,_A=e=>e===Vt.HG.ACCOUNT?Re:EA(e)?Re.filter(e=>e.value!==Vt.HG.Account):Re,FA=e=>e.allowedTags.map(e=>{let{id:n,tagName:t}=e;return{value:n,label:t,isFixed:!0}});var BA;const UA=(0,D.J1)(BA||(BA=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetUserGroupOptions($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n    getUserGroupsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        value: id\n        label: name\n      }\n      totalRows\n    }\n  }\n"]))),MA=(e,n)=>({accountId:e,offset:0,limit:20,filters:n?{text:[{filter:n,field:"name",type:Vt.II.Contains,filterType:Vt.pe.Text}]}:null,sort:[{field:"name",order:"asc"}]}),VA=e=>{let{value:n,onChange:t,error:a,name:r="userGroup",disabled:i,defaultValue:o}=e;const l=rt(),{error:s,loading:c,refetch:d}=(()=>{const e=rt();return(0,h.IT)(UA,{variables:MA(e)})})();return(0,g.useEffect)(()=>{o&&(async()=>{const{data:{getUserGroupsPage:e}}=await d(MA(l,o)),{rows:n}=e;n.length>0&&t({target:{value:n[0].value,name:r,select:n[0],type:"select"}})})()},[]),(0,Ze.jsx)(ze.l6,{name:r,onChange:t,isClearable:!0,isDisabled:i,error:a||(null==s?void 0:s.toString()),value:n,placeholder:"Start typing to search for a user group",isLoading:c,defaultOptions:!0,debounceTimeout:1e3,loadOptions:async e=>{const{data:{getUserGroupsPage:n}}=await d(MA(l,e)),{totalRows:t,rows:a}=n;return{options:a,total:t}}})};var zA,GA,$A,WA,qA,JA;function YA(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function HA(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?YA(Object(t),!0).forEach(function(n){KA(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):YA(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function KA(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function QA(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ZA=Ge.default.div(zA||(zA=QA(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),XA=(0,Ge.default)(ze.fv)(GA||(GA=QA(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),eR=(0,Ge.default)(ze.JU)($A||($A=QA(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),nR=Ge.default.div(WA||(WA=QA(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),tR=(0,Ge.default)(ze.DZ)(qA||(qA=QA(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),aR=(0,Ge.default)(ze.Y3)(JA||(JA=QA(["\n  margin: "," auto;\n"])),e=>e.theme.geometry.sm.spacing),rR={hasError:!1,isSuccess:!1,values:{emailAddress:{text:"",error:""},firstName:{text:"",error:""},lastName:{text:"",error:""},phone:{text:"",error:""},mobile:{text:"",error:""},jobTitle:{text:"",error:""},department:{text:"",error:""},role:{text:null,error:""},accountId:{text:{value:null},error:""},accessLevel:{text:null,error:""},allowedTags:{text:null,error:""},allowedLocations:{text:null,error:""},userGroup:{text:null,error:""}},isSubmitted:!1,disableAccountSelector:!1},iR=e=>{var n,t,a,r,i,o,l,s;const[c,d]=(0,g.useState)(rR),u=rc(),{showNotification:p}=vt(),m=!!e.userId,f=EA(null===(n=u.currentUser)||void 0===n?void 0:n.accessLevel),y=(0,g.useMemo)(()=>m?{value:e.role.role,label:e.role.name,restrictedAccess:e.role.restrictedAccess}:null,[m,e.role]),b=[...e.roleOptions];m&&!e.roleOptions.find(e=>{let{value:n}=e;return n===y.value})&&b.push(y),(0,g.useEffect)(()=>{var n,t;const a={hasError:!1,isSuccess:!1,values:{emailAddress:{text:e.email||"",error:""},firstName:{text:e.firstName||"",error:""},lastName:{text:e.lastName||"",error:""},phone:{text:e.phone||"",error:""},mobile:{text:e.mobile||"",error:""},jobTitle:{text:e.jobTitle||"",error:""},department:{text:e.department||"",error:""},role:{text:m?y:null,error:""},accountId:{text:e.accountId,error:""},accessLevel:{text:e.scopeOptions.find(n=>{let{value:t}=n;return t===(e.accessLevel||Se)}),error:""},allowedTags:{text:(null===(n=e.allowedTags)||void 0===n?void 0:n.map(e=>{let{id:n,tagName:t}=e;return{value:n,label:t}}))||[],error:""},allowedLocations:{text:(null===(t=e.allowedLocations)||void 0===t?void 0:t.map(e=>{let{id:n,name:t}=e;return{value:n,label:t}}))||[],error:""},userGroup:{text:e.userGroupName?{value:e.userGroupName,label:e.userGroupName}:null,error:""},disableAccountSelector:e.disableAccountSelector||!1},isSubmitted:!1};return d(a),()=>{d(rR)}},[y,m,e]);const h=Od("string"==typeof c.values.accountId.text?e.accountId:c.values.accountId.text.value),{departmentSelect:v,showCreateDepartment:x,setShowCreateDepartment:T}=Cu(null==h?void 0:h.departments,c.values.department.text,(null==h?void 0:h.id)||e.accountId),O=e=>""===e?"Field cannot be empty":null,k=e=>{const n=e.target,t="select"===n.type?n.select:n.value,a=HA(HA({},c),{},{values:HA(HA({},c.values),{},{[n.name]:{text:t,error:null}})});d(()=>a)},j=()=>e.onSuccess("The user ".concat(c.values.firstName.text," ").concat(c.values.lastName.text," has been ").concat(m?"updated":"created","!"),"success"),C=e=>{p(e.message.replace("GraphQL error:","").trim(),"danger"),d(e=>HA(HA({},e),{},{hasError:!0,isSuccess:!1,isSubmitted:!1}))},[S]=(0,Ot.n)(SS,{onCompleted:j,onError:C}),[N]=(0,Ot.n)(NS,{onCompleted:j,onError:C,refetchQueries:["GetUsers",{query:CS,variables:{id:e.userId}}]}),[w]=(0,Ot.n)(wS,{onError:C}),[D]=(0,Ot.n)(DS,{onCompleted:()=>e.onSuccess("User email has been sent! The unique link is now on your clipboard.","success"),onError:()=>{d(e=>HA(HA({},e),{},{hasError:!0,isSuccess:!1,isSubmitted:!1})),p("This user has already completed the sign up process. Email can not be resent.","danger")}}),A=(0,g.useCallback)(()=>{d(e=>HA(HA({},e),{},{values:HA(HA({},e.values),{},{disableAccountSelector:!e.values.disableAccountSelector})}))},[]);return(0,Ze.jsxs)(ze.aF,{size:"md",show:!0,loading:e.loading,dismissable:!0,name:"ConfigurationUsersContainer__Modal",onDismiss:e.onDismiss,children:[(0,Ze.jsx)(RA,{showCreateDepartment:x,setShowCreateDepartment:T,passedAccountId:(null==h?void 0:h.id)||e.accountId,onComplete:async(e,n)=>{d(e=>HA(HA({},e),{},{values:HA(HA({},e.values),{},{department:{text:n.departmentId,error:null}})}))}}),(0,Ze.jsxs)(ZA,{name:"user-modal",children:[(0,Ze.jsxs)("form",{name:"user__form",onSubmit:async n=>{var t;n.preventDefault();const a=c.values;var r;if(a.emailAddress.error=(r=a.emailAddress.text,O(r)),a.firstName.error=O(a.firstName.text),a.lastName.error=O(a.lastName.text),a.role.error=a.role.text&&O(a.role.text.value),a.phone.error=!a.phone.text||(0,LA.isNumeric)(a.phone.text)?"":"Must be a valid phone number.",a.mobile.error=!a.mobile.text||(0,LA.isMobilePhone)(a.mobile.text)?"":"Must be a valid mobile number.",a.emailAddress.error||a.firstName.error||a.lastName.error||a.role.error||a.phone.error||a.mobile.error)return void d(e=>HA(HA({},e),{},{values:a}));const i=m?N:S,o={email:c.values.emailAddress.text.toLowerCase(),previousEmail:e.email||null,first_name:c.values.firstName.text,last_name:c.values.lastName.text,jobTitle:c.values.jobTitle.text,department:"notSelected"!==c.values.department.text?c.values.department.text:null,phone:c.values.phone.text,mobile:c.values.mobile.text,roles:c.values.role.text.value,account_id:"string"==typeof c.values.accountId.text?c.values.accountId.text:c.values.accountId.text.value,accessLevel:c.values.accessLevel.text.value,allowedTagsIds:c.values.accessLevel.text.value===Ne?c.values.allowedTags.text.map(e=>{let{value:n}=e;return n}):[],allowedLocationsIds:c.values.accessLevel.text.value===Ce?c.values.allowedLocations.text.map(e=>{let{value:n}=e;return n}):[],profile:e.profilePicture,disableAccountSelector:c.values.disableAccountSelector,userGroupId:(null===(t=c.values.userGroup.text)||void 0===t?void 0:t.value)||null};m?o.id=e.userId:o.password=DD.generate({length:32,numbers:!0,symbols:!1}),m&&o.roles!==e.role.role&&await w({variables:{id:e.userId,roles:o.roles}}),d(e=>HA(HA({},e),{},{isSubmitted:!0})),await i({variables:o})},children:[(0,Ze.jsxs)(tR,{name:"user__heading",size:"lg",children:[m?"Update":"Add New"," User"]}),m&&(0,Ze.jsx)(aR,{accountName:c.values.firstName.text,src:e.profilePicture,border:!0,name:"update-user__profile-picture"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(XA,{item:!0,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Email Address"})}),(0,Ze.jsx)(ze.ks,{disabled:c.isSubmitted,onChange:k,value:c.values.emailAddress.text,error:c.values.emailAddress.error,name:"emailAddress",box:!0})]})}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(XA,{item:!0,span:6,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"First Name"})}),(0,Ze.jsx)(ze.ks,{id:"firstName","aria-label":"first name",disabled:c.isSubmitted,onChange:k,value:c.values.firstName.text,error:c.values.firstName.error,name:"firstName",box:!0})]}),(0,Ze.jsxs)(XA,{item:!0,span:6,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Last Name"})}),(0,Ze.jsx)(ze.ks,{disabled:c.isSubmitted,onChange:k,value:c.values.lastName.text,error:c.values.lastName.error,name:"lastName",box:!0})]})]}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(XA,{item:!0,span:6,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Phone Number (Optional)"})}),(0,Ze.jsx)(ze.ks,{disabled:c.isSubmitted,onChange:k,value:c.values.phone.text,error:c.values.phone.error,name:"phone",box:!0})]}),(0,Ze.jsxs)(XA,{item:!0,span:6,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Mobile Number (Optional)"})}),(0,Ze.jsx)(ze.ks,{disabled:c.isSubmitted,onChange:k,value:c.values.mobile.text,error:c.values.mobile.error,name:"mobile",box:!0})]})]}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(XA,{item:!0,span:6,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Job Title (Optional)"})}),(0,Ze.jsx)(ze.ks,{disabled:c.isSubmitted,onChange:k,value:c.values.jobTitle.text,name:"jobTitle",box:!0})]}),(0,Ze.jsxs)(XA,{item:!0,span:6,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Department (Optional)"})}),v(k)]})]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(XA,{item:!0,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"User Type"})}),(0,Ze.jsx)(ze.l6,{name:"role",isDisabled:c.isSubmitted||e.currentUser.accessLevel===Ce&&e.email,onChange:n=>{d(t=>HA(HA({},t),{},{values:HA(HA({},t.values),{},{role:{text:n.target.select,error:null},accessLevel:{text:e.scopeOptions.find(e=>{let{value:n}=e;return n===Se})||e.scopeOptions[0],error:null}})}))},value:c.values.role.text,error:c.values.role.error,options:b})]})}),u.user.includes("editAll")&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(XA,{item:!0,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Company"})}),(0,Ze.jsx)(Kh,{disabled:c.isSubmitted,name:"accountId",value:c.values.accountId.text,onChange:e=>{let{id:n}=e;c.values.allowedTags.text.length||c.values.allowedLocations.text.length?p("Unable to change account until current Tag/Location restrictions are removed.","danger"):d(e=>HA(HA({},e),{},{values:HA(HA({},e.values),{},{accountId:{text:n,error:""},department:HA(HA({},e.values.department),{},{text:c.values.accountId.text.value!==n?null:e.values.department.text})})}))},error:c.values.accountId.error,defaultValue:h?{value:h.id,label:h.name}:void 0})]})}),c.values.role.text&&(null===(t=c.values.role.text)||void 0===t?void 0:t.restrictedAccess)&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(XA,{item:!0,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Access Level"})}),(0,Ze.jsx)(ze.l6,{name:"accessLevel",options:e.scopeOptions,value:c.values.accessLevel.text||{value:null},onChange:k,isDisabled:e.currentUser.accessLevel===Ce})]})}),c.values.role.text&&(null===(a=c.values.role.text)||void 0===a?void 0:a.restrictedAccess)&&c.values.accessLevel.text.value===Ce&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(XA,{item:!0,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Location(s)"})}),(0,Ze.jsx)(_D,{name:"allowedLocations",accountId:(null===(r=c.values.accountId.text)||void 0===r?void 0:r.value)||c.values.accountId.text,value:c.values.allowedLocations.text,onChange:k,error:c.values.allowedLocations.error,isSubmitting:c.isSubmitted,disabled:e.currentUser.accessLevel===Ce,defaultOptions:f?(R=e.currentUser,R.allowedLocations.map(e=>{let{id:n,name:t}=e;return{value:n,label:t,isFixed:!0}})):null})]})}),c.values.role.text&&(null===(i=c.values.role.text)||void 0===i?void 0:i.restrictedAccess)&&c.values.accessLevel.text.value===Ne&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(XA,{item:!0,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Tag(s)"})}),(0,Ze.jsx)(PD,{name:"allowedTags",accountId:(null===(o=c.values.accountId.text)||void 0===o?void 0:o.value)||c.values.accountId.text,value:c.values.allowedTags.text,onChange:k,error:c.values.allowedTags.error,isSubmitting:c.isSubmitted,disabled:e.currentUser.accessLevel===Ce,defaultOptions:f?FA(e.currentUser):null})]})}),(null==h||null===(l=h.accessControls)||void 0===l?void 0:l.organisation)&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(XA,{item:!0,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"User Group (Optional)"})}),(0,Ze.jsx)(VA,{name:"userGroup",accountId:(null===(s=c.values.accountId.text)||void 0===s?void 0:s.value)||c.values.accountId.text,value:c.values.userGroup.text,onChange:k,defaultValue:e.userGroupName,error:c.values.userGroup.error,disabled:c.isSubmitted})]})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsxs)(XA,{item:!0,children:[(0,Ze.jsx)(nR,{children:(0,Ze.jsx)(eR,{children:"Disable Account Selector"})}),(0,Ze.jsx)(ze.Sc,{onChange:A,checked:c.values.disableAccountSelector})]})}),!m&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(XA,{item:!0,children:(0,Ze.jsx)(ze.$n,{name:"create-user__button--create",color:"success",submit:!0,disabled:c.isSubmitted||!(c.values.emailAddress.text&&c.values.firstName.text&&c.values.lastName.text&&c.values.role.text),children:"Send Invitation"})})}),m&&(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsx)(XA,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{disabled:c.isSubmitted,name:"update-user__button--cancel",color:"info",onClick:e.onDismiss,children:"Cancel"})}),(0,Ze.jsx)(XA,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{name:"update-user__button--save",color:"success",submit:!0,disabled:c.isSubmitted||!(c.values.emailAddress.text&&c.values.firstName.text&&c.values.lastName.text&&c.values.role.text&&c.values.accountId.text),children:"Save"})})]})]}),m&&u.user.find(e=>e.startsWith("resendEmail"))&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(XA,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{disabled:c.isSubmitted,name:"update-user__button--resend",color:"primary",onClick:()=>(e=>{const n=DD.generate({length:32,numbers:!0,symbols:!1});e({variables:{username:c.values.emailAddress.text,password:n}}),wD("".concat(kn("REACT_APP_BASE_URL"),"/login?username=").concat(c.values.emailAddress.text,"&token=").concat(n))})(D),children:"Resend Email"})})}),m&&u.user.find(e=>e.startsWith("toggleStatus"))&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(XA,{item:!0,container:!0,children:(0,Ze.jsx)(PA,{userId:e.userId,disabled:e.disabled,showNotification:p})})})]})]});var R};var oR,lR,sR,cR;function dR(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const uR=Ge.default.div(oR||(oR=dR(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),pR=(0,Ge.default)(ze.DZ)(lR||(lR=dR(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),mR=(0,Ge.default)(ze.EY)(sR||(sR=dR(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),fR=(0,Ge.default)(ze.fv)(cR||(cR=dR(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing);class yR extends g.Component{constructor(e){super(e),this.hideNotification=()=>this.setState({notification:{message:null,color:null}}),this.onDeleteError=()=>{this.setState({notification:{message:"Something went wrong. If the problem persists, contact support.",color:"danger"},hasError:!0,isSuccess:!1,isSubmitted:!1})},this.onDeleteClick=e=>{e({variables:{username:this.props.userId}}),this.setState({isSubmitted:!0})},this.state={hasError:!1,isSuccess:!1,notification:{message:null,color:null},isSubmitted:!1}}render(){return(0,Ze.jsxs)(uR,{name:"delete-user",children:[this.state.notification.message&&(0,Ze.jsx)(ze.Eg,{name:"delete-user__notification",show:!0,color:this.state.notification.color,onClose:this.hideNotification,children:this.state.notification.message}),(0,Ze.jsx)(Qe.s,{mutation:jS,onCompleted:()=>this.props.onSuccess("The user has been deleted!","success",this.props.userId),onError:this.onDeleteError,children:e=>(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(pR,{name:"delete-user__heading",size:"lg",children:"Delete User"}),(0,Ze.jsx)(mR,{size:"md",children:"Are you sure you want to delete this user?"}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsx)(fR,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{disabled:this.state.isSubmitted,color:"info",name:"delete-user__button--cancel",onClick:this.props.onDismiss,children:"Cancel"})}),(0,Ze.jsx)(fR,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{disabled:this.state.isSubmitted,color:"danger",name:"delete-user__button--confirm",onClick:()=>this.onDeleteClick(e),children:"Confirm"})})]})]})})]})}}const gR=yR;var bR=t(96218),hR=t(18966);let vR=function(e){return e.DONE="DONE",e.PENDING="PENDING",e.FAILED="FAILED",e.ACTION_REQUIRED="ACTION",e.ABANDONED="ABANDONED",e.DELETED="DELETED",e.EXTERNAL_ACTION_REQUIRED="EXTERNAL",e}({}),xR=function(e){return e.Dynamic="Dynamic",e.Static="Static",e}({}),TR=function(e){return e.CREATE="CREATE",e.UPDATE="UPDATE",e.DELETE="DELETE",e}({}),OR=function(e){return e.PROJECTS="Projects",e}({});function kR(e){let{template:n,size:t,color:a}=e;const[r,i]=(0,g.useState)(null),o=Boolean(r),l=Array.isArray(n),s=(0,g.useCallback)(()=>{i(null)},[i]),c=(0,g.useCallback)(async e=>{e.type===xR.Static?await Ar(e.url):e.type===xR.Dynamic&&function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const a=Lr.Wp.book_new(),r={};e.forEach((e,n)=>{r[e]=t[n]});const i=Lr.Wp.json_to_sheet([r]);Lr.Wp.book_append_sheet(a,i,"Data"),(0,Lr._h)(a,"".concat(n,".xlsx"))}(e.columns,e.fileName,e.exampleValues)},[]),d=(0,g.useCallback)(e=>{l?i(e.currentTarget):c(n)},[i,c,l,n]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.$n,{size:t||"md",color:a||"secondary",onClick:d,inline:!0,children:"Download template"}),Array.isArray(n)&&(0,Ze.jsx)(bR.A,{anchorEl:r,open:o,onClose:s,children:n.map(e=>(0,Ze.jsx)(hR.A,{id:e.name,onClick:()=>c(e),children:e.name},e.name))})]})}var jR,CR;function SR(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const NR=(0,Ge.default)(ze.fv)(jR||(jR=SR(["\n  ",";\n"])),e=>{let{isDragActive:n,isDragEnabled:t,theme:a,background:r}=e;return"\n    background: ".concat(r?a.uploadColors.background:null,";\n    opacity: ").concat(t&&n?.5:1,";\n  ")}),wR=(0,Ge.default)(ze.EY)(CR||(CR=SR(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),DR=(0,ze.SH)(e=>{let{errors:n,isDragActive:t,isDragEnabled:a}=e;return(0,Ze.jsxs)(NR,{span:12,isDragActive:t,isDragEnabled:a,children:[(0,Ze.jsx)(wR,{children:"We found these errors in your spreadsheet:"}),(0,Ze.jsx)(ze.v3,{children:n.map(e=>(0,Ze.jsx)(ze.EY,{children:e}))})]})});var AR,RR,PR,LR,IR;function ER(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _R=(0,Ge.default)(ze.fv)(AR||(AR=ER(["\n  padding: ",";\n  min-height: 550px;\n"])),e=>e.theme.geometry.lg.spacing),FR=(0,Ge.default)(ze.fv)(RR||(RR=ER(["\n  width: 100%;\n  flex-flow: row nowrap;\n  justify-content: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.lg.spacing),BR=(0,Ge.default)(ze.fv)(PR||(PR=ER(["\n  min-width: 200px;\n  padding: 0 ",";\n"])),e=>e.theme.geometry.sm.spacing),UR=(0,Ge.default)(ze.fv)(LR||(LR=ER(["\n  flex: 1;\n"]))),MR=(0,Ge.default)(ze.h$)(IR||(IR=ER(["\n  & > div {\n    height: 400px;\n  }\n"])));function VR(e){let{template:n,isUploading:t,errors:a,onFileInput:r,onDismiss:i,multiple:o,handleFileChange:l,children:s,size:c}=e;const d=(0,g.useRef)(null),u=(0,g.useCallback)(function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];r(e,...t),d.current&&(d.current.value="")},[r]);return(0,Ze.jsx)(ze.aF,{size:c||"md",onDismiss:i,show:!0,dismissable:!0,height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(_R,{container:!0,children:[(0,Ze.jsxs)(FR,{container:!0,children:[(0,Ze.jsx)(BR,{span:5,align:"center",container:!0,children:(0,Ze.jsx)(ze.bT,{multiple:o,accept:xr.allowedDataFile.mimeType,onChange:l||u,inputRef:d,name:"MassUploadModal__FileInput",children:e=>(0,Ze.jsx)(ze.$n,{onClick:e,size:"md",color:"primary","data-cy":"MassUploadModal__UploadSpreadsheet",name:"MassUploadModal__UploadSpreadsheet",inline:!0,children:"Upload spreadsheet"})})}),(0,Ze.jsx)(BR,{span:5,align:"center",container:!0,children:(0,Ze.jsx)(kR,{template:n})})]}),a&&a.length?(0,Ze.jsx)(DR,{errors:a,onDrop:r,dragText:"Drop file"}):(0,Ze.jsx)(UR,{align:"center",vdistribution:"center",container:!0,children:t?(0,Ze.jsx)(Vg,{}):s||(0,Ze.jsx)(MR,{accept:xr.allowedDataFile.mimeType,multiple:o,onDrop:r,dragText:"Drop file",text:"Select an xlsx, xls or csv file...",background:!0})})]})})}var zR;const GR=(0,D.J1)(zR||(zR=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetLocationsByAccountId(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getLocationsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n      }\n    }\n  }\n"]))),$R=async(e,n,t)=>{const a=e.query({query:wf,variables:{accountId:n}}),r=t?[{field:"name",filterType:Vt.pe.Set,values:t}]:[],i=e.query({query:GR,variables:{accountId:n,limit:Qa,filters:{set:r}}}),[{data:{getTagsByAccountId:o}},{data:{getLocationsPage:l}}]=await Promise.all([a,i]);return{tags:my()(o,"tagName"),locations:my()(l.rows,"name")}},WR=e=>e["Access Level"]?e["Access Level"].toUpperCase():Se,qR=(e,n,t,a)=>{const r=[];e.length||r.push("Your spreadsheet is empty, please add some rows");const i=n.map(e=>{let{label:n}=e;return n}),o=i.map(e=>e.toLowerCase());return e.forEach((e,n)=>{const l=n+2,s=e["User Type"]||"",c=WR(e),d=[Se,Ce,Ne];e["Email Address"]||r.push("Row ".concat(l,': "Email Address" should be defined')),s||r.push("Row ".concat(l,': "User Type" should be defined')),o.includes(s.toLowerCase())||r.push("Row ".concat(l,': "User Type" should equal to one of: ').concat(i.join(", "))),e["First Name"]||r.push("Row ".concat(l,': "First Name" should be defined')),e["Last Name"]||r.push("Row ".concat(l,': "Last Name" should be defined')),e["Mobile Number (Optional)"]&&!(0,LA.isMobilePhone)(e["Mobile Number (Optional)"])&&r.push("Row ".concat(l,': "Mobile Number" should be valid')),e["Phone Number (Optional)"]&&!(0,LA.isNumeric)(e["Phone Number (Optional)"])&&r.push("Row ".concat(l,': "Phone Number" should be numeric')),d.includes(c)||r.push("Row ".concat(l,': "Access Level" should equal to one of: ').concat(d.join(", "))),c===Ce&&e["Allowed Resources"]&&e["Allowed Resources"].split(",").forEach(e=>{a[e.trim()]||r.push("Row ".concat(l,": Location ").concat(e," wasn't found in your account"))}),c===Ne&&e["Allowed Resources"]&&e["Allowed Resources"].split(",").forEach(e=>{t[e.trim()]||r.push("Row ".concat(l,": Tag ").concat(e," wasn't found in your account"))})}),r},JR=(e,n,t,a,r)=>e.map(e=>({username:e["Email Address"],password:DD.generate({length:32,numbers:!0,symbols:!1}),roles:t.find(n=>{let{label:t}=n;return t.toLowerCase()===e["User Type"].toLowerCase()}).value,first_name:e["First Name"],last_name:e["Last Name"],jobTitle:e["Job Title (Optional)"]||null,department:e["Department (Optional)"]||null,phone:e["Phone Number (Optional)"]||null,mobile:e["Mobile Number (Optional)"]||null,account_id:n,accessLevel:WR(e),allowedLocationsIds:WR(e)===Ce?e["Allowed Resources"].split(",").map(e=>a[e.trim()].id):[],allowedTagsIds:WR(e)===Ne?e["Allowed Resources"].split(",").map(e=>r[e.trim()].id):[]}));function YR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function HR(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?YR(Object(t),!0).forEach(function(n){KR(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):YR(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function KR(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const QR=["Email Address","User Type","First Name","Last Name","Job Title (Optional)","Department (Optional)","Phone Number (Optional)","Mobile Number (Optional)","Access Level","Allowed Resources","User Group (Optional)"],ZR=["test@example.com","Read Only","John","Doe","Supervisor","Sales","01610000000","07000000000","Location","London, Manchester","BU: Sales"];function XR(e){let{onDismiss:n,setCreateMutation:t,startUploadingUsers:a,accountId:r,roleOptions:i}=e;const[o,l]=(0,g.useState)([]),s=(0,N.m)();return(0,Ze.jsx)(VR,{template:{columns:QR,exampleValues:ZR,type:xR.Dynamic,fileName:"users-upload"},errors:o,onFileInput:async e=>{let[o]=e;t("users");const[c,d]=await(async(e,n,t,a)=>{const[r,i]=await _r(e);if(r)return[[r],null];const o=i.map(e=>(e=>Gt().get(e,"Allowed Resources","").split(","))(e)).flat(),{tags:l,locations:s}=await $R(a,n,o),c=qR(i,t,l,s);return c.length?[c,null]:[[],JR(i,n,t,s,l)]})(o,r,i,s);if(c&&c.length)return l(c);n(),a(d);const u={accountId:r,limit:600},p=s.readQuery({variables:u,query:Oc()});s.writeQuery({variables:u,query:Oc(),data:{getUserInfoByAccountId:HR(HR({},p.getUserInfoByAccountId),{},{users:p.getUserInfoByAccountId.users.concat(d)})}})},onDismiss:n})}const eP=/^.{10,}$/;function nP(e){var n,t,a,r,i;const o={};return null!==(n=e.email)&&void 0!==n&&n.trim()||(o.email="missingEmail"),null!==(t=e.email)&&void 0!==t&&t.trim()&&!(0,LA.isEmail)(null===(a=e.email)||void 0===a?void 0:a.trim())&&(o.email="invalidEmail"),null!==(r=e.password)&&void 0!==r&&r.trim()||(o.password="missingPassword"),e.password&&!eP.test(e.password)&&(o.password="passwordPattern"),null!==(i=e.passwordConfirmed)&&void 0!==i&&i.trim()||(o.passwordConfirmed="confirmPassword"),e.password&&e.passwordConfirmed&&e.password!==e.passwordConfirmed&&(o.passwordConfirmed="mismatchPassword"),o}var tP,aP,rP,iP,oP,lP,sP;function cP(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const dP=Ge.default.div(tP||(tP=cP(["\n  padding: 20px;\n"]))),uP=(0,Ge.default)(ze.JU)(aP||(aP=cP(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),pP=Ge.default.div(rP||(rP=cP(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),mP=(0,Ge.default)(ze.DZ)(iP||(iP=cP(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),fP=(0,Ge.default)(ze.EY)(oP||(oP=cP(["\n  text-align: center;\n  font-size: 13px;\n"]))),yP=(0,Ge.default)(ze.fv)(lP||(lP=cP(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),gP=(0,Ge.default)(ze.ks)(sP||(sP=cP(["\n  width: 100%;\n"]))),bP=e=>{let{userId:n,onDissmiss:t}=e;const[a,r]=(0,g.useState)(""),[i,o]=(0,g.useState)(""),l=a===i,[s,{error:c,data:d}]=(0,Ot.n)(RS,{variables:{username:n,password:a}});c&&(de.Cp(c),t({message:"Something went wrong. Please try again later or contact support.",color:"danger",id:n})),d&&t({message:"The password has been reset!",color:"success",id:n});const u=a&&!eP.test(a);return(0,Ze.jsxs)(dP,{children:[(0,Ze.jsx)(mP,{size:"lg",children:"Reset Password"}),(0,Ze.jsx)(fP,{children:" Passwords must be at least 10 characters."}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(yP,{item:!0,children:[(0,Ze.jsx)(pP,{children:(0,Ze.jsx)(uP,{children:"New Password"})}),(0,Ze.jsx)(gP,{type:"password",inline:!0,value:a,onChange:e=>r(e.target.value)})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(yP,{item:!0,children:[(0,Ze.jsx)(pP,{children:(0,Ze.jsx)(uP,{children:"Confirm Password"})}),(0,Ze.jsx)(gP,{type:"password",inline:!0,value:i,error:l||!i.length?null:"Passwords do not match.",onChange:e=>o(e.target.value)})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(ze.$n,{name:"SubmitDocuemnt",onClick:s,disabled:!a.length||!i.length||!l||u,color:"success",children:"Reset Password"})})]})},hP=(e,n,t)=>!!e.find(e=>e.startsWith(n)&&!e.endsWith("Own"))||e.includes("".concat(n,"Own"))&&t;var vP;const xP=Ge.default.button(vP||(vP=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  color: ",";\n  padding: ",";\n\n  &:hover {\n    color: ",";\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>"0 ".concat(e.theme.geometry.sm.spacing),e=>e.theme.colors.text.dark.background),TP=e=>{let{user:n,onEdit:t,onPasswordReset:a}=e;const{token:r}=at(),i=rc(),o=n.role===Vt.gG.Sysadmin,l=n.role===Vt.gG.Businessadmin,s=n.id===r.sub,c=!n.isExternalUser&&hP(i.user,"resetPassword",s)&&(!o&&!l||i.user.includes("resetPasswordAll")||s),d=hP(i.user,"edit",s)&&(!o||i.user.includes("editAll"));return(0,Ze.jsxs)(Ze.Fragment,{children:[d&&(0,Ze.jsx)(xP,{"aria-label":"edit",onClick:()=>t(n),children:(0,Ze.jsx)(ze.In,{name:"user-row__edit--".concat(n.id),icon:"pencil-alt"})}),c&&(0,Ze.jsx)(xP,{"aria-label":"reset password",onClick:()=>a(n),children:(0,Ze.jsx)(ze.In,{name:"user-row__passwordReset--".concat(n.id),icon:"key"})})]})};function OP(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kP(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?OP(Object(t),!0).forEach(function(n){jP(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):OP(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jP(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const CP=e=>{let{value:n}=e;return n?"Deactivated":"Active"},SP=e=>{let{value:n}=e;const t=JSON.parse(n),{label:a}=t;return CP({value:JSON.parse(a)})};function NP(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wP(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?NP(Object(t),!0).forEach(function(n){DP(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):NP(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function DP(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const AP={getRowId:e=>e.data.id,pagination:!0,paginationPageSize:25,paginationPageSizeSelector:!1,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}},RP=e=>{let{accountId:n,setGridApi:t,fetchRows:a,showModal:r,roles:i}=e;const o=function(e){const n=(0,N.m)(),t=Pu(),a=null==t?void 0:t.id,{showNotification:r}=vt(),i=(0,g.useCallback)(async e=>{try{const t=e.colDef.colId||e.colDef.field,{data:{getUsersFilter:r}}=await n.query({query:IS,variables:{accountId:a,field:t}});let i=[...r];"department"===t&&(i=r.map(e=>kP(kP({},e),{},{label:e.value}))),"role"===t&&(i=r.filter(n=>e.context.roles[n.value])),e.success(i.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){r("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning")}},[a,n,r]);return(0,g.useMemo)(()=>{var n;return{context:{roles:e},columnDefs:[{headerName:"First Name",field:"firstName",filter:"agTextColumnFilter"},{headerName:"Last Name",field:"lastName",filter:"agTextColumnFilter"},{headerName:"Account",field:"accountName",filterParams:{values:i,valueFormatter:la}},{headerName:"Email",field:"email",filter:"agTextColumnFilter",cellStyle:{"text-overflow":"ellipsis",overflow:"hidden","white-space":"nowrap"}},{headerName:"User Type",field:"role",filterParams:{values:i,valueFormatter:e=>(e=>{let{value:n,context:{roles:t}}=e;if(!n)return n;try{const{label:e}=JSON.parse(n);return e&&t[e]}catch(e){return n}})(e)},valueFormatter:e=>(e=>{let{value:n,context:{roles:t}}=e;return n&&t[n]})(e)},{headerName:"User Group",field:"userGroupName",filter:"agSetColumnFilter",hide:!(null!=t&&null!==(n=t.accessControls)&&void 0!==n&&n.organisation),filterParams:{values:i,valueFormatter:la}},{headerName:"Tags",field:"tags",filterParams:{values:i,valueFormatter:la}},{headerName:"Locations",field:"locations",filterParams:{values:i,valueFormatter:la}},{headerName:"Last Logged in",field:"lastActiveAt",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Xt(n)},cellStyle:{textAlign:"center"},initialSort:"desc"},{headerName:"Total Time in System",field:"totalTimeSpentMs",filter:"agNumberColumnFilter",valueFormatter:e=>{let{value:n}=e;return Zt(n)}},{headerName:"Department",field:"department",filterParams:{values:i,valueFormatter:la}},{headerName:"Status",field:"isDisabled",valueFormatter:CP,filterParams:{values:i,valueFormatter:SP}},{headerName:"Actions",cellRenderer:"actions",field:"readonly",sortable:!1,filter:!1,cellStyle:{justifyContent:"center",alignItems:"center",display:"flex"}}]}},[i,e])}(i),l=(0,g.useMemo)(()=>wP(wP({},AP),o),[o]),s=Dd(),c=(0,g.useCallback)(e=>{r("update",e.id.toLowerCase())},[r]),d=(0,g.useCallback)(e=>{r("resetPassword",e.id.toLowerCase())},[r]),u=(0,g.useMemo)(()=>({actions:e=>e.value?null:(0,Ze.jsx)(TP,{user:e.data,onEdit:c,onPasswordReset:d})}),[c,d]),p=(0,g.useCallback)(e=>{t({api:e.api})},[t]),m=(0,g.useMemo)(()=>({async getRows(e){try{const{startRow:t,sortModel:r,filterModel:i}=e.request,{rows:o,totalRows:s}=await a({accountId:n,offset:t||0,limit:l.paginationPageSize,sort:oa(r),filters:ia(i)});e.success({rowData:o,rowCount:s})}catch(n){e.fail()}}}),[n,a,l.paginationPageSize]);return(0,Ze.jsx)("div",{className:"ag-theme-alpine",style:{height:"100vh"},children:(0,g.createElement)(Vw.W6,wP(wP({},l),{},{paginationPageSize:l.paginationPageSize,cacheBlockSize:l.paginationPageSize,key:n,components:u,onColumnVisible:s.onSaveGridColumnState,onColumnPinned:s.onSaveGridColumnState,onColumnResized:s.onSaveGridColumnState,onColumnMoved:s.onSaveGridColumnState,onColumnRowGroupChanged:s.onSaveGridColumnState,onColumnValueChanged:s.onSaveGridColumnState,onColumnPivotChanged:s.onSaveGridColumnState,serverSideDatasource:m,onGridReady:p}))})},PP="Enter";function LP(e){let{show:n,onDismiss:t,onSubmit:a,defaultFileName:r}=e;const[i,o]=(0,g.useState)(""),l=e=>{a(e),o("")};return(0,Ze.jsx)(ze.aF,{size:"md",show:n,onDismiss:t,height:"auto",maxHeight:"80vh",children:(0,Ze.jsxs)(ze.hh,{children:[(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.TextInputColumn,{textInputRef:e=>{null==e||e.focus()},name:"fileName",onChange:e=>o(e.target.value),label:"File name",value:i,onKeyPress:e=>{e.key===PP&&l(i||r)}})}),(0,Ze.jsxs)(ze.hh.Row,{children:[(0,Ze.jsx)(ze.hh.ButtonColumn,{span:6,color:"primary",onClick:()=>{l(r)},children:"Use default"}),(0,Ze.jsx)(ze.hh.ButtonColumn,{span:6,disabled:!i,color:"tertiary",onClick:()=>{l(i)},children:"Confirm"})]})]})})}var IP,EP;function _P(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const FP=(0,f.styled)(f.Button)(IP||(IP=_P(["\n  width: 50%;\n"]))),BP=(0,f.styled)("div")(EP||(EP=_P(["\n  width: 100%;\n  padding-top: 24px;\n  display: flex;\n  gap: 24px;\n"]))),UP=e=>{let{show:n,onDismiss:t,onSubmit:a,defaultFileName:r}=e;const[i,o]=(0,g.useState)(!1),[l,s]=(0,g.useState)(""),c=(0,g.useCallback)(async e=>{o(!0),await a(e),o(!1),t(),s("")},[a,t]),d=(0,g.useCallback)(e=>{e.key===PP&&c(l||r)},[r,l,c]);return(0,Ze.jsx)(f.Modal,{title:"Please enter file name",open:n,onClose:t,children:(0,Ze.jsxs)(f.Grid,{container:!0,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{name:"fileName",onChange:e=>s(e.target.value),label:"File name",error:!1,value:l,onKeyPress:d})}),(0,Ze.jsxs)(BP,{children:[(0,Ze.jsx)(FP,{variant:"outlined",color:"primary",onClick:()=>{c(r)},disabled:i,children:"Use default"}),(0,Ze.jsx)(FP,{variant:"contained",disabled:!l||i,onClick:()=>{c(l)},children:"Confirm"})]})]})})};function MP(e){let{label:n,fetchRows:t,gridApi:a,defaultExportFileName:r,context:i={},columnsToSkip:o=[],step:l,customFilterModelMapper:s,customSortModelMapper:c,rowMutators:d=[]}=e;const[u,p]=(0,g.useState)(!1),m=$l(),f=(0,g.useRef)(),y=(0,g.useMemo)(()=>{const e=(null==a?void 0:a.getColumns())||[],n={};return e.forEach(e=>{const t=e.getColDef();o.includes(t.headerName)||(n[t.field]={headerName:t.headerName,valueFormatter:(e,n)=>"function"==typeof t.valueFormatter?t.valueFormatter({value:e,context:i,data:n}):e})}),n},[a,i,o]),b=(0,g.useCallback)(e=>{const n={};(0,zt.map)(y,(t,a)=>{const{headerName:r,valueFormatter:i}=t,o=(0,zt.get)(e,a);n[r]=i(o||"",e)});let t=n;for(const e of d)t=e(t);return t},[y]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.$n,{color:"tertiary",onClick:()=>{p(!0)},title:"You are about to export your data. Please note that large datasets may take some time to export.",children:n}),(0,Ze.jsx)(LP,{show:u,onDismiss:()=>{p(!1)},defaultFileName:r,onSubmit:e=>{if(!a)throw new Error("Data is not yet ready for export");const n=a.getColumnState(),r=a.getFilterModel();p(!1);const i=c?c(n):oa(n),o=s?s(r):ia(r);f.current=null==m?void 0:m.startFrontendExport({fetchRows:t,exportFileName:e,formatRow:b,step:l,sort:i,filters:o})}})]})}var VP,zP=t(34739);const GP=(0,f.styled)("span")(VP||(VP=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: fit-content;\n"]))),$P=e=>{const{fetchRows:n,gridApi:t,defaultExportFileName:a,context:r={},columnsToSkip:i=[],step:o,customFilterModelMapper:l,customSortModelMapper:s,isBackendExport:c=!1}=e,d=(e=>!!e.isBackendExport)(e)?e.transactionType:void 0,[u,p]=(0,g.useState)(!1),m=$l(),y=(0,g.useRef)(),b=(0,g.useMemo)(()=>{const e=(null==t?void 0:t.getColumns())||[],n={};return e.forEach(e=>{const t=e.getColDef();i.includes(t.headerName)||(n[t.field]={headerName:t.headerName,valueFormatter:(e,n)=>"function"==typeof t.valueFormatter?t.valueFormatter({value:e,context:r,data:n}):e})}),n},[t,r,i]),h=(0,g.useCallback)(e=>{const n={};return(0,zt.map)(b,(t,a)=>{const{headerName:r,valueFormatter:i}=t,o=(0,zt.get)(e,a);n[r]=i(o||"",e)}),n},[b]),v=(0,g.useCallback)(()=>{p(!0)},[]),x=(0,g.useCallback)(()=>{p(!1)},[]),T=(0,g.useCallback)(async e=>{if(!t)throw new Error("Data is not yet ready for export");const a=t.getColumnState(),r=t.getFilterModel();p(!1);const i=s?s(a):oa(a),u=l?l(r):ia(r);y.current=c?await(null==m?void 0:m.startBackendExport({fileName:e,filters:u,transactionType:d})):null==m?void 0:m.startFrontendExport({fetchRows:n,exportFileName:e,formatRow:h,step:o,sort:i,filters:u})},[t,m,n,h,o,s,l,d,c]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(zP.A,{title:"Export",children:(0,Ze.jsx)(GP,{children:(0,Ze.jsx)(f.IconButton,{variant:"outlined",onClick:v,children:(0,Ze.jsx)(f.CustomIcons.Download,{width:"20px",height:"20px",color:"primary"})})})}),(0,Ze.jsx)(UP,{show:u,onDismiss:x,defaultFileName:a,onSubmit:T})]})};var WP;function qP(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function JP(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qP(Object(t),!0).forEach(function(n){YP(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qP(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function YP(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const HP=(0,Ge.default)(bh)(WP||(WP=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  justify-content: space-between;\n"]))),KP=e=>{const n=rc(),[t,a]=(0,g.useState)({account:{id:e.accountId},createModal:{show:!1},uploadModal:{show:!1},updateModal:{id:""},deleteModal:{id:""},resetPasswordModal:{id:""},notification:{message:null,color:null,id:null}}),[r,i]=(0,g.useState)({}),o=(0,N.m)(),l=(0,g.useCallback)(()=>{var e;return null==r||null===(e=r.api)||void 0===e?void 0:e.refreshServerSide({purge:!0})},[r]),s=function(e){const n=(0,N.m)(),[t,a]=(0,g.useState)(null);return(0,g.useEffect)(()=>{e?(async()=>{const{data:t}=await n.query({query:Nc,variables:{id:e}});a(t.getUserInfoById)})():a(null)},[n,e]),t}(t.updateModal.id),c=(0,g.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(n=>JP(JP({},n),{},{createModal:{show:!1},uploadModal:{show:!1},updateModal:{id:null},deleteModal:{id:null},resetPasswordModal:{id:null},notification:{message:e.message,color:e.color,id:e.id}}))},[]),d=(0,g.useCallback)((e,n)=>"create"===e?a(e=>JP(JP({},e),{},{createModal:{show:!0}})):"upload"===e?a(e=>JP(JP({},e),{},{uploadModal:{show:!0}})):"update"===e?a(e=>JP(JP({},e),{},{updateModal:{id:n}})):"delete"===e?a(e=>JP(JP({},e),{},{deleteModal:{id:n}})):"resetPassword"===e?a(e=>JP(JP({},e),{},{resetPasswordModal:{id:n}})):void 0,[]),u=()=>a(e=>JP(JP({},e),{},{notification:{message:null,color:null,id:null}})),p=(0,g.useCallback)(a=>{const{notification:r,createModal:i,uploadModal:o,updateModal:d,deleteModal:p,resetPasswordModal:m,account:f}=t,y=n.currentUser.accessLevel,g=_A(y);return(0,Ze.jsxs)(Ze.Fragment,{children:[r.message&&(0,Ze.jsxs)(ze.Eg,{name:"ConfigurationUsersContainer__Notification",show:!0,color:"success",onClose:u,children:[r.message,(0,Ze.jsx)("div",{hidden:!0,name:"ConfigurationUsersContainer__Notification__Id",children:r.id})]}),i.show&&(0,Ze.jsx)(iR,{onDismiss:c,onSuccess:(e,n,t)=>c({message:e,color:n,id:t}),accountId:f.id,startUploadingUsers:e.massUploadFunction,setCreateMutation:e.setCreateMutation,roleOptions:a,accessLevel:n.currentUser.accessLevel,allowedLocations:n.currentUser.allowedLocations,allowedTags:n.currentUser.allowedTags,currentUser:n.currentUser,scopeOptions:g}),o.show&&(0,Ze.jsx)(XR,{onDismiss:c,accountId:f.id,startUploadingUsers:e.massUploadFunction,setCreateMutation:e.setCreateMutation,roleOptions:a}),d.id&&(0,Ze.jsx)(Ze.Fragment,{children:!!s&&(0,Ze.jsx)(iR,{userId:s.id,firstName:s.first_name,lastName:s.last_name,phone:s.phone,mobile:s.mobile,jobTitle:s.jobTitle,department:s.department,email:s.email,profilePicture:s.profilePicture,role:s.role,disabled:s.disabled,accountId:s.account.id,accessLevel:s.accessLevel,allowedLocations:s.allowedLocations,allowedTags:s.allowedTags,disableAccountSelector:s.disableAccountSelector,userGroupName:s.userGroupName,onSuccess:(e,n,t)=>{c({message:e,color:n,id:t}),l()},onDismiss:c,roleOptions:a,currentUser:n.currentUser,scopeOptions:g})}),p.id&&(0,Ze.jsx)(ze.aF,{size:"sm",show:!0,dismissable:!0,name:"ConfigurationUsersContainer__Modal--delete",onDismiss:c,children:(0,Ze.jsx)(gR,{userId:p.id,onSuccess:(e,n,t)=>c({message:e,color:n,id:t}),onDismiss:c})}),m.id&&(0,Ze.jsx)(ze.aF,{size:"sm",show:!0,dismissable:!0,name:"ConfigurationUsersContainer__Modal--resetpassword",onDismiss:c,height:"auto",maxHeight:"90vh",children:(0,Ze.jsx)(bP,{userId:m.id,onDissmiss:c})})]})},[c,n.currentUser,e.massUploadFunction,e.setCreateMutation,l,s,t]),{data:m}=(0,h.IT)(PS),f=(0,g.useMemo)(()=>(null==m?void 0:m.getUserRoles.filter(e=>!e.readonly).map(e=>{let{role:n,name:t,restrictedAccess:a}=e;return{value:n,label:t,restrictedAccess:a}}).sort(Oa("label")))||[],[null==m?void 0:m.getUserRoles]),y=(0,g.useMemo)(()=>null==m?void 0:m.getUserRoles.reduce((e,n)=>{let{role:t,name:a}=n;return e[t]=a,e},{}),[null==m?void 0:m.getUserRoles]),b=(0,g.useCallback)(async e=>{const{data:{getUsers:{rows:n,totalRows:t}}}=await o.query({query:LS,variables:e,fetchPolicy:"network-only"});return{rows:n,totalRows:t}},[o]);return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationUsersContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(HP,{name:"ConfigurationUsersContainer__Controls",icon:"user",iconColor:"primary",title:"Users",children:[(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(SD,{gridApi:r.api})}),(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(ze.$n,{name:"ConfigurationUsersContainer__Controls__Button--create",color:"primary",onClick:()=>d("create"),children:"+ Add Users"})}),(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(ze.$n,{name:"ConfigurationUsersContainer__Controls__Button--upload",color:"secondary",onClick:()=>d("upload"),children:"Upload users"})}),(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(MP,{fetchRows:b,gridApi:r.api,defaultExportFileName:"users",context:{roles:y},columnsToSkip:["Actions"],label:"Export Users"})})]}),(0,Ze.jsx)(Ze.Fragment,{children:p(f)}),(0,Ze.jsx)(RP,{accountId:e.accountId,setGridApi:i,fetchRows:b,showModal:d,roles:y},e.accountId)]})};var QP,ZP,XP,eL;function nL(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function tL(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nL(Object(t),!0).forEach(function(n){aL(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nL(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function aL(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function rL(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const iL="32px",oL="md",lL=(0,Ge.default)(ze.fv)(QP||(QP=rL(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),sL=Ge.default.div(ZP||(ZP=rL(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),cL=Ge.default.a(XP||(XP=rL(["\n  display: inline-block;\n  color: ",";\n  padding: 0 0 0 ",";\n  margin-right: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xxl.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),dL=Ge.default.a(eL||(eL=rL(["\n  display: inline-block;\n  color: ",";\n  margin-right: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),uL=e=>{let{data:{id:n},onEdit:t,onLogoEdit:a}=e;return(0,Ze.jsxs)(sL,{children:[(0,Ze.jsx)(cL,{onClick:()=>t(n),children:(0,Ze.jsx)(ze.In,{name:"account-row__edit--".concat(n),icon:"pencil-alt"})}),(0,Ze.jsx)(dL,{onClick:()=>a(n),children:(0,Ze.jsx)(ze.In,{name:"account-row__edit--".concat(n),icon:"image"})})]})},pL=e=>{let{data:{accessControls:n,id:t}}=e;const a=n.comply,r=n.learn,i=Object.values(n.data).some(e=>!0===e);return(0,Ze.jsxs)(sL,{children:[(0,Ze.jsx)(lL,{children:(0,Ze.jsx)(ze.GQ,{icon:"graduation-cap",height:iL,iconColor:r?"secondary":"neutral",size:oL,circleColor:r?"secondary":"neutral",name:"Account-".concat(t,r?"-Learn":"-NoLearn")})}),(0,Ze.jsx)(lL,{children:(0,Ze.jsx)(ze.GQ,{icon:"pencil-alt",height:iL,iconColor:a?"tertiary":"neutral",size:oL,circleColor:a?"tertiary":"neutral",name:"Account-".concat(t,a?"-Comply":"-NoComply")})}),(0,Ze.jsx)(lL,{children:(0,Ze.jsx)(ze.GQ,{icon:"chart-line",height:iL,iconColor:i?"quaternary":"neutral",size:oL,circleColor:i?"quaternary":"neutral",name:"Account-".concat(t,i?"-Data":"-NoData")})})]})};function mL(e){let{setGridApi:n,fetchRows:t,onEdit:a,onLogoEdit:r,onBannerEdit:i}=e;const o=Dd({autoFit:!0}),l={pagination:!0,paginationPageSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,cellStyle:{height:"auto"}},columnDefs:[{headerName:"Name",filter:"agTextColumnFilter",filterParams:{buttons:["reset","apply"],newRowsAction:"keep"},field:"name",resizable:!0},{headerName:"Type",field:"type",filter:"agSetColumnFilter",filterParams:{newRowsAction:"keep",values:Object.values(Vt.CO)},resizable:!0},{headerName:"",cellRenderer:"permissions",resizable:!1,filter:!1,sortable:!1},{headerName:"",cellRenderer:"action",filter:!1,sortable:!1,resizable:!1}],rowStyle:{width:"100%",display:"flex",alignItems:"center"},rowHeight:58},s={permissions:pL,action:e=>(0,Ze.jsx)(uL,tL(tL({},e),{},{onEdit:a,onLogoEdit:r,onBannerEdit:i}))};return(0,Ze.jsx)(nD,tL(tL({},l),{},{cacheBlockSize:l.paginationPageSize,onFirstDataRendered:o.onFirstDataRendered,onFilterChanged:o.onFilterChanged,onSortChanged:o.onSortChanged,onColumnVisible:o.onSaveGridColumnState,onColumnPinned:o.onSaveGridColumnState,onColumnResized:o.onSaveGridColumnState,onColumnMoved:o.onSaveGridColumnState,onColumnRowGroupChanged:o.onSaveGridColumnState,onColumnValueChanged:o.onSaveGridColumnState,onColumnPivotChanged:o.onSaveGridColumnState,components:s,onGridReady:e=>{o.onGridReady(e),n({api:e.api}),e.api.setGridOption("serverSideDatasource",{async getRows(e){let{request:n,fail:a,success:r}=e;try{const{startRow:e,sortModel:a,filterModel:i}=n,o=ia(i),{rows:s,totalRows:c}=await t({offset:e||0,limit:l.paginationPageSize,sort:oa(a),filters:o});return r({rowCount:c,rowData:s}),{rows:s,totalRows:c}}catch(e){throw a(),e}}})}}))}var fL=t(47396),yL=t.n(fL);const gL=e=>e.replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f"),bL={limit:25};function hL(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vL(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hL(Object(t),!0).forEach(function(n){xL(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hL(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xL(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var TL=t(94823),OL=t(30349),kL=t(35963),jL=t(53380),CL=t(49505),SL=t(96597);const NL=e=>{let{id:n,name:t}=e;return{value:n,label:t}},wL=e=>{let{multiValueColor:n="tertiary",name:t="accountIds",value:a,onChange:r,error:i,isSubmitting:o,defaultOptions:l,disabled:s}=e;const c=(0,N.m)();return(0,Ze.jsx)(ze.KF,{id:"Accounts__MultiSelect",name:t,onChange:r,isDisabled:o||s,error:i,multiValueColor:n,defaultOptions:!Array.isArray(l)||l,value:a,placeholder:"Start typing to search for an account",loadOptions:(0,g.useMemo)(()=>(e=>async n=>{const{data:{getAccounts:t}}=await e.query({query:Wh,variables:{filters:{text:[{filterType:"text",type:"contains",filter:n,field:"name"}]}}}),{totalRows:a}=t;return{options:t.rows?t.rows.map(NL):[],total:a}})(c),[c])})};var DL,AL,RL,PL;function LL(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const IL=Ge.default.div(DL||(DL=LL(["\n  display: flex;\n  position: relative;\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing),EL=(0,Ge.default)(ze.In)(AL||(AL=LL(["\n  position: absolute;\n  top: -15px;\n  right: 5px;\n  cursor: pointer;\n"]))),_L=Ge.default.div(RL||(RL=LL(["\n  display: flex;\n  flex-direction: column;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),FL=Ge.default.div(PL||(PL=LL(["\n  display: block;\n  height: 350px;\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing),BL=e=>{let{onSave:n,source:t}=e;const[a,r]=(0,g.useState)(!1),[i,o]=(0,g.useState)("");return(0,g.useEffect)(()=>{o(t)},[t]),(0,Ze.jsxs)(IL,{children:[(0,Ze.jsx)(EL,{icon:"pencil-alt",onClick:()=>r(!0)}),(0,Ze.jsx)(ze.To,{source:i}),a&&(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(ze.aF,{size:"lg",show:!0,onDismiss:()=>r(!1),height:"auto",maxHeight:"80vh",children:(0,Ze.jsxs)(_L,{children:[(0,Ze.jsx)(ze.fI,{container:!0,item:!0,distribution:"center",itemAlign:"center",children:(0,Ze.jsx)(ze.DZ,{children:"Edit Content"})}),(0,Ze.jsx)(FL,{children:(0,Ze.jsx)(ze.j4,{sourceContent:i,onMarkdownChange:o})}),(0,Ze.jsx)(ze.$n,{color:"success",onClick:()=>{r(!1),n(gL(i))},children:"Save Content"})]})})})]})};var UL;const ML=(0,D.J1)(UL||(UL=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAccountSectors {\n    getAccountSectors {\n      value: id\n      label: name\n    }\n  }\n"]))),VL=["onChange","isSubmitting","disabled","value","name"];function zL(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function GL(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?zL(Object(t),!0).forEach(function(n){$L(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):zL(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function $L(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const WL=e=>{let{onChange:n,isSubmitting:t,disabled:a,value:r,name:i="SectorSelector"}=e,o=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,VL);const{loading:l,error:s,data:c}=(0,h.IT)(ML,{});if(s)return(0,Ze.jsx)(ze.Kw,{error:s,children:e=>{let{icon:n}=e;return(0,Ze.jsx)(ze.Wz,{name:"SectorSelector__error",icon:n,title:"Sector selector failed to load"})}});const d=null!=c&&c.getAccountSectors?[...c.getAccountSectors]:[];return(0,Ze.jsx)(ze.l6,GL(GL({},o),{},{value:Array.isArray(r)?r.map(e=>d.find(n=>n.value===e)):r,name:i,isLoading:l,isDisabled:t||a,onChange:n,options:d,defaultOptions:d}))};var qL;const JL=(0,D.J1)(qL||(qL=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetSubscribedDashboards($accountId: ID!) {\n    getSubscribedDashboards(accountId: $accountId) {\n      id\n      name\n      description\n      area\n      provider\n      providerDashboardId\n      thumbnailUrl\n      sheets {\n        title\n        filters {\n          type\n          label\n          defaultValue\n          relativeDateDefault\n          isHidden\n          dataset {\n            datasetName\n            columnName\n          }\n        }\n        tiles {\n          type\n          title\n          colSpan\n          rowSpan\n        }\n        units\n        withVat\n        withCarbonComponents\n      }\n    }\n  }\n"])));var YL,HL,KL,QL;function ZL(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const XL=(0,D.J1)(YL||(YL=ZL(["\n  query GetAllDashboards {\n    getAllDashboards {\n      id\n      name\n      description\n      area\n      provider\n      providerDashboardId\n      sheets {\n        title\n        filters {\n          type\n          label\n          defaultValue\n          relativeDateDefault\n          isHidden\n          dataset {\n            datasetName\n            columnName\n          }\n        }\n        tiles {\n          type\n          title\n          colSpan\n          rowSpan\n        }\n        units\n        withVat\n        withCarbonComponents\n      }\n    }\n  }\n"]))),eI=(0,D.J1)(HL||(HL=ZL(["\n  query GetDashboard($id: ID!) {\n    getDashboard(id: $id) {\n      id\n      name\n      description\n      area\n      provider\n      providerDashboardId\n      thumbnailType\n      sheets {\n        title\n        filters {\n          type\n          label\n          defaultValue\n          relativeDateDefault\n          isHidden\n          dataset {\n            datasetName\n            columnName\n          }\n        }\n        tiles {\n          type\n          title\n          colSpan\n          rowSpan\n        }\n        units\n        withVat\n        withCarbonComponents\n      }\n    }\n  }\n"]))),nI=(0,D.J1)(KL||(KL=ZL(["\n  mutation CreateDashboard(\n    $id: ID!\n    $name: String!\n    $description: String!\n    $provider: DashboardProvider!\n    $area: DashboardArea!\n    $providerId: String!\n    $thumbnail: ThumbnailType\n    $sheets: [DashboardSheetInput!]\n  ) {\n    createDashboard(\n      input: {\n        id: $id\n        name: $name\n        description: $description\n        area: $area\n        provider: $provider\n        providerDashboardId: $providerId\n        thumbnailType: $thumbnail\n        sheets: $sheets\n      }\n    )\n  }\n"]))),tI=(0,D.J1)(QL||(QL=ZL(["\n  mutation UpdateDashboard(\n    $id: ID!\n    $name: String!\n    $description: String!\n    $provider: DashboardProvider!\n    $area: DashboardArea!\n    $providerId: String!\n    $thumbnail: ThumbnailType\n    $sheets: [DashboardSheetInput!]\n  ) {\n    updateDashboard(\n      input: {\n        id: $id\n        name: $name\n        description: $description\n        area: $area\n        provider: $provider\n        providerDashboardId: $providerId\n        thumbnailType: $thumbnail\n        sheets: $sheets\n      }\n    )\n  }\n"]))),aI=e=>({value:e.id,label:e.name}),rI=e=>({value:e.providerDashboardId,label:e.name}),iI=e=>{let{accountId:n,area:t,value:a,onChange:r,optionMapper:i=aI,error:o,name:l="dashboardId",loading:s,label:c="Dashboard",placeholder:d,disabled:u,emptyOptionLabel:p,shouldGetAllDashboards:m=!1}=e;const{data:y,loading:b,error:v}=(0,h.IT)(JL,{variables:{accountId:n},fetchPolicy:"network-only",skip:m}),{data:x,loading:T,error:O}=(0,h.IT)(XL,{variables:{accountId:n},fetchPolicy:"network-only",skip:!m}),k=m?T:b,j=m?O:v,C=(0,g.useMemo)(()=>m?(null==x?void 0:x.getAllDashboards)||[]:(null==y?void 0:y.getSubscribedDashboards)||[],[null==x?void 0:x.getAllDashboards,null==y?void 0:y.getSubscribedDashboards,m]),S=(0,g.useMemo)(()=>{const e=(0,zt.sortBy)(C.filter(e=>!t||e.area===t).map(i),e=>null==e?void 0:e.label.trim().toLowerCase());return p&&e.unshift({value:"",label:p}),e},[C,t,p,i]),N=(null==j?void 0:j.message)||o||"";return(0,Ze.jsx)(f.Select,{name:l,label:c,isLoading:k||s,disabled:k||s||u,onChange:r,placeholder:d,value:a,error:Boolean(N),helperText:N,options:S})};function oI(e){let{name:n,onChange:t,value:a}=e;const{data:r}=(0,h.IT)(je),i=(0,g.useMemo)(()=>null!=r&&r.getReportingYears?r.getReportingYears.map(e=>({value:e.id,label:e.name})):[],[null==r?void 0:r.getReportingYears]),o=(0,g.useCallback)(e=>{t(e.target.value)},[t]);return(0,Ze.jsx)(ze.l6,{placeholder:"Please select the reporting year type",name:n,value:a,options:i,onChange:o})}const lI=JSON.parse('[{"label":"Consignment Note (EA)","value":"Consignment Note (EA)","category":"Consignment Note (EA) ID","libraries":["WASTE"]},{"label":"Consignment Note (SEPA)","value":"Consignment Note (SEPA)","category":"Consignment Note (SEPA) ID","libraries":["WASTE"]},{"label":"Evidence","value":"Evidence Reference","category":"Evidence Reference ID","libraries":["WASTE"]},{"label":"Invoice","value":"Invoice Number","category":"Invoice Number","libraries":["WASTE","TRANSPORT"]},{"label":"Other Reference","value":"Other Reference","category":"Other Reference ID","libraries":["WASTE","ELECTRICITY","GAS","WATER","TRANSPORT","GOVERNANCE"]},{"label":"Sales Order","value":"Sales Order","category":"Sales Order ID","libraries":["WASTE"]},{"label":"Waste Carrier Licence","value":"Waste Carrier Licence","category":"Waste Carrier Licence ID","libraries":["WASTE"]},{"label":"Waste Permit","value":"Waste Permit","category":"Waste Permit ID","libraries":["WASTE"]},{"label":"Waste Transfer Note","value":"Waste Transfer Note","category":"Waste Transfer Note ID","libraries":["WASTE"]},{"label":"Waste Contractor Report","value":"Waste Contractor Report","category":"Waste Contractor Report","libraries":["WASTE"]},{"label":"Travel Receipt","value":"Travel Receipt","category":"Reference","libraries":["TRANSPORT"]},{"label":"Audit Report","value":"Audit Report","category":"Reference","libraries":["GOVERNANCE"]},{"label":"Aspects and Impacts","value":"Aspects and Impacts","category":"Reference","libraries":["GOVERNANCE"]},{"label":"Certificate","value":"Certificate","category":"Reference","libraries":["GOVERNANCE"]},{"label":"Communications","value":"Communications","category":"Reference","libraries":["GOVERNANCE"]},{"label":"Legislation","value":"Legislation","category":"Reference","libraries":["LEGISLATION","GOVERNANCE"]},{"label":"Management Systems","value":"Management Systems","category":"Reference","libraries":["GOVERNANCE"]},{"label":"Policies","value":"Policies","category":"Reference","libraries":["GOVERNANCE"]},{"label":"Reporting Frameworks","value":"Reporting Frameworks","category":"Reference","libraries":["GOVERNANCE"]},{"label":"Standards","value":"Standards","category":"Reference","libraries":["GOVERNANCE"]},{"label":"Training","value":"Training","category":"Reference","libraries":["GOVERNANCE"]},{"label":"Bill","value":"Bill","category":"Reference","libraries":["ELECTRICITY","GAS","WATER"]},{"label":"Licences and Permits","value":"Licences and Permits","category":"Reference","libraries":["WATER","TRANSPORT","GOVERNANCE"]},{"label":"Meter Readings","value":"Meter Readings","category":"Reference","libraries":["ELECTRICITY","GAS","WATER"]},{"label":"Supplier Agreement","value":"Supplier Agreement","category":"Reference","libraries":["ELECTRICITY","GAS","WATER"]},{"label":"LCA Reports","value":"LCA Reports","category":"Reference","libraries":["GOVERNANCE"]}]');var sI,cI,dI,uI,pI,mI,fI;function yI(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const gI=(0,Ge.default)(p.Link)(sI||(sI=yI(["\n  text-decoration: underline;\n"]))),bI=(0,Ge.default)(ze.JU)(cI||(cI=yI(["\n  margin: 0 ",";\n"])),e=>e.theme.geometry.xs.spacing),hI=Ge.default.div(dI||(dI=yI(["\n  height: 24px;\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),vI=(0,Ge.default)(ze.DZ)(uI||(uI=yI(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),xI=(0,Ge.default)(ze.fv)(pI||(pI=yI(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),TI=(0,Ge.default)(ze.EY)(mI||(mI=yI(["\n  margin-top: ",";\n  margin-bottom: ",";\n  padding-left: ",";\n  padding-right: ",";\n"])),e=>e.theme.fonts.xs.size,e=>e.theme.fonts.xs.size,e=>e.theme.fonts.xs.size,e=>e.theme.fonts.xs.size),OI=(0,Ge.default)(TL.A)(fI||(fI=yI(["\n  border-radius: 7.5px !important;\n  margin-top: ",";\n"])),e=>e.theme.fonts.xs.size),kI={comply:"governance",data:"data"},jI=function(e){var n;const t=(0,eg.A)(),[a,r]=(0,g.useState)(()=>Boolean(e.n3rgyConsentDocumentLink));return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(vI,{size:"lg",children:e.heading}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(xI,{item:!0,children:[(0,Ze.jsx)(hI,{children:(0,Ze.jsx)(bI,{children:"Company Name"})}),(0,Ze.jsx)(ze.ks,{disabled:e.isSubmitted,onChange:e.handleChange,name:"businessName",value:e.businessName.text,error:e.businessName.error,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(xI,{item:!0,children:[(0,Ze.jsx)(hI,{children:(0,Ze.jsx)(bI,{children:"Sector"})}),(0,Ze.jsx)(WL,{name:"Sector__Select",isSubmitting:e.isSubmitted,value:e.selectedSector,onChange:n=>{e.onSectorChange(n.target.select)}})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(xI,{item:!0,children:[(0,Ze.jsx)(hI,{children:(0,Ze.jsx)(bI,{children:"Child Accounts"})}),(0,Ze.jsx)(wL,{name:"Child-Accounts__MultiSelect",multiValueColor:"tertiary",onChange:n=>{e.onChildAccountsChange(n.target.select)},isSubmitting:e.isSubmitted,value:e.selectedChildAccounts})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(xI,{container:!0,item:!0,children:[Object.keys(kI).map(n=>{const a=e.accessControls[n],r="pages.configuration.account.sections.".concat(kI[n]);return(0,Ze.jsxs)(OI,{children:[(0,Ze.jsx)(OL.A,{expandIcon:(0,Ze.jsx)(ze.In,{icon:"chevron-down"}),"aria-controls":"panel1a-content",children:(0,Ze.jsx)(Je.A,{id:"".concat(r,".name")})}),(0,Ze.jsx)(kL.A,{children:(0,Ze.jsx)(jL.A,{"aria-label":"position",row:!0,children:Object.keys(a).map(i=>{if("__typename"===i)return null;const o=zt.isBoolean(a[i])?a[i]:void 0;return(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{id:"update-account-access-".concat(i),name:"".concat(n,".").concat(i),checked:Boolean(o),onChange:e.onCheckboxClick}),label:t.formatMessage({id:"".concat(r,".").concat(i)}),labelPlacement:"top"},i)})})})]},n)}),(0,Ze.jsxs)(OI,{children:[(0,Ze.jsx)(OL.A,{expandIcon:(0,Ze.jsx)(ze.In,{icon:"chevron-down"}),"aria-controls":"panel1a-content",children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.account.sections.other.name"})}),(0,Ze.jsx)(kL.A,{children:(0,Ze.jsxs)(jL.A,{"aria-label":"position",row:!0,children:[(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{name:"showChatBot",checked:zt.isBoolean(e.showChatBot)?e.showChatBot:void 0,onChange:e.onShowChatBotChange}),label:t.formatMessage({id:"pages.configuration.account.sections.other.chatBot"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{name:"dataTracker",checked:zt.isBoolean(e.accessControls.dataTracker)?e.accessControls.dataTracker:void 0,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.dataTracker"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{name:"learn",checked:e.accessControls.learn,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.engage"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{"data-cy":"AccountDetails_accessControls_flows",name:"flows",checked:zt.isBoolean(e.accessControls.flows)?e.accessControls.flows:void 0,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.flows"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{name:"intelligence",checked:e.accessControls.intelligence,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.intelligence"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{name:"projects",checked:e.accessControls.projects,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.projects"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{"data-cy":"AccountDetails_accessControls_surveys",name:"surveys",checked:zt.isBoolean(e.accessControls.surveys)?e.accessControls.surveys:void 0,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.surveys"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{name:"tasks",checked:e.accessControls.tasks,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.tasks"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{name:"dromoUpload",checked:zt.isBoolean(e.accessControls.dromoUpload)?e.accessControls.dromoUpload:void 0,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.dromoUpload"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{name:"v2Design",checked:zt.isBoolean(e.accessControls.v2Design)?e.accessControls.v2Design:void 0,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.v2Design"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{name:"organisation",checked:zt.isBoolean(e.accessControls.organisation)?e.accessControls.organisation:void 0,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.organisation"}),labelPlacement:"top"}),(0,Ze.jsx)(CL.A,{value:"top",control:(0,Ze.jsx)(SL.A,{name:"dataOverwriting",checked:zt.isBoolean(e.accessControls.dataOverwriting)?e.accessControls.dataOverwriting:void 0,onChange:e.onCheckboxClick}),label:t.formatMessage({id:"pages.configuration.account.sections.other.dataOverwriting"}),labelPlacement:"top"})]})})]},"other"),(0,Ze.jsxs)(OI,{children:[(0,Ze.jsx)(OL.A,{expandIcon:(0,Ze.jsx)(ze.In,{icon:"chevron-down"}),"aria-controls":"panel1a-content",children:(0,Ze.jsx)(Je.A,{id:"Restricted Document Types"})}),(0,Ze.jsx)(kL.A,{children:(0,Ze.jsx)(jL.A,{"aria-label":"position",row:!0,children:lI.map(n=>(0,Ze.jsx)(CL.A,{value:n.value,control:(0,Ze.jsx)(SL.A,{name:n.value,checked:!e.unrestrictedDocuments.includes(n.value),onChange:e.onRestrictedDocumentChange}),label:n.value,labelPlacement:"top"},n.value))})})]},"documentRestrictions"),(0,Ze.jsxs)(OI,{children:[(0,Ze.jsx)(OL.A,{expandIcon:(0,Ze.jsx)(ze.In,{icon:"chevron-down"}),"aria-controls":"panel1a-content",children:(0,Ze.jsx)(Je.A,{id:"Features"})}),(0,Ze.jsxs)(kL.A,{children:[(0,Ze.jsx)(jL.A,{"aria-label":"position",row:!0}),(0,Ze.jsx)(jL.A,{"aria-label":"position",row:!0,children:(0,Ze.jsx)(CL.A,{value:"featureToggles.enableGlobalEmissionFactors",control:(0,Ze.jsx)(SL.A,{name:"featureToggles.enableGlobalEmissionFactors",checked:Boolean(null===(n=e.featureToggles)||void 0===n?void 0:n.enableGlobalEmissionFactors),onChange:e.onCheckboxClick}),label:"Enable scope 3 global emission factors",labelPlacement:"top"},"enableGlobalEmissionFactors")})]})]},"featureToggles")]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(xI,{item:!0,children:[(0,Ze.jsx)(hI,{children:(0,Ze.jsx)(bI,{children:"Reporting Year:"})}),(0,Ze.jsx)(oI,{name:"reportingYearId",onChange:e.onReportingYearChange,value:e.reportingYearId}),(0,Ze.jsxs)(TI,{children:["Please select the reporting year relevant for your account. Your reporting year will affect the conversion factors used for calculating your carbon emissions as explained"," ",(0,Ze.jsx)(gI,{to:"/configuration/carbonconversionfactors/location",children:"here"}),". After configuring your account here you later wish to change you reporting year you will need to contact your Customer Support Manager, as Rio will not re-calculate carbon emissions."]})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(xI,{item:!0,children:[(0,Ze.jsxs)(hI,{children:[(0,Ze.jsx)(bI,{children:"Enable AMR Integration"}),(0,Ze.jsx)(zP.A,{title:"This is used to automate data from your smart meter into Rio.",children:(0,Ze.jsx)(f.Icons.InfoOutlined,{color:"info"})})]}),(0,Ze.jsx)(ze.Sc,{onChange:()=>{r(!a),e.handleChange({target:{name:"n3rgyConsentDocumentLink",value:""}}),e.handleChange({target:{name:"n3rgyUploadGranularity",value:""}}),e.handleChange({target:{name:"n3rgyUploadBatchingEnabled",value:!1}}),e.handleChange({target:{name:"n3rgyTariff",value:""}})},checked:a})]})}),a&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(xI,{item:!0,children:[(0,Ze.jsx)(hI,{children:(0,Ze.jsx)(bI,{children:"Consent document link"})}),(0,Ze.jsx)(ze.ks,{value:e.n3rgyConsentDocumentLink,name:"n3rgyConsentDocumentLink",onChange:e.handleChange})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(xI,{item:!0,children:[(0,Ze.jsx)(hI,{children:(0,Ze.jsx)(bI,{children:"Granularity"})}),(0,Ze.jsx)(ze.l6,{options:[{value:"day",label:"Daily"},{value:"halfhour",label:"Half-hourly"}],value:e.n3rgyUploadGranularity,onChange:n=>{e.handleChange({target:{name:"n3rgyUploadGranularity",value:n.target.value}})}})]})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsxs)(xI,{item:!0,children:[(0,Ze.jsxs)(hI,{children:[(0,Ze.jsx)(bI,{children:"Enable batching"}),(0,Ze.jsx)(zP.A,{title:"By enabling this, the monthly data will be batched into a single import for all meters instead of one import per meter.",children:(0,Ze.jsx)(f.Icons.InfoOutlined,{color:"info"})})]}),(0,Ze.jsx)(ze.Sc,{onChange:n=>{e.handleChange({target:{name:"n3rgyUploadBatchingEnabled}",value:n.target.checked}})},checked:e.n3rgyUploadBatchingEnabled})]})}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsx)(xI,{item:!0,children:(0,Ze.jsx)(hI,{children:(0,Ze.jsx)(bI,{children:"Tariff"})})}),(0,Ze.jsx)(xI,{item:!0,children:(0,Ze.jsx)(ze.ks,{value:e.n3rgyTariff,name:"n3rgyTariff",onChange:e.handleChange})})]})]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(xI,{item:!0,children:[(0,Ze.jsx)(hI,{children:(0,Ze.jsx)(bI,{children:"Notes"})}),(0,Ze.jsx)(BL,{source:e.notes||"Add Notes here.",onSave:e.onNotesChange})]})}),e.accountId&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(xI,{item:!0,children:(0,Ze.jsx)(iI,{shouldGetAllDashboards:!0,accountId:e.accountId,value:e.customImpactDashboardId||"",label:"Custom Impact Dashboard",emptyOptionLabel:"None (clear selection)",onChange:n=>e.onCustomImpactDashboardChange(n.value||null)})})})]})},CI="ENGAGE";function SI(e){return""===e?"Field cannot be empty":null}var NI,wI;function DI(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function AI(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?DI(Object(t),!0).forEach(function(n){RI(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):DI(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function RI(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function PI(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const LI=Ge.default.div(NI||(NI=PI(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),II=(0,Ge.default)(ze.fv)(wI||(wI=PI(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing);function EI(e){var n;let{allAccounts:t,onDismiss:a}=e;const[r,i]=(0,g.useState)({hasError:!1,values:{businessName:{text:"",error:""},childAccounts:[],notes:"",sector:{id:null}},accessControls:{learn:!1,intelligence:!1,tasks:!0,projects:!1,surveys:!1,dromoUpload:!1,dataOverwriting:!1,v2Design:!0,comply:{legislation:!1,tagLevelLegislation:!1,policies:!1,systems:!1,targets:!1,frameworks:!1,agreements:!1},data:{waste:!1,electricity:!1,gas:!1,water:!1,materials:!1,fuel:!1,transport:!1,refrigerants:!1,heatSteam:!1,buildingEnergyRatings:!1,hotelStays:!1,investment:!1,scope3ActivityBasedMaterials:!1,scope3SpendBasedMaterials:!1,coreEstate:!1,oilAndGas:!1,insite:!1}},featureToggles:{enableGlobalEmissionFactors:!1},reportingYearId:"0f7e7a35-88a3-11eb-9118-0ad87669f1a4",showChatBot:!1,unrestrictedDocuments:[]}),[o,{loading:l}]=function(e){const{showNotification:n}=vt();return(0,Ot.n)(be,{onCompleted:t=>{let{createAccount:a}=t;n("The account ".concat(a.name," has been created!"),"success"),e()},onError:()=>{n("Something went wrong. If the problem persists, contact support.","danger")},update:(e,n)=>{var t,a;const{getAccounts:r}=e.readQuery({query:Te,variables:bL}),i=vL(vL({},null===(t=n.data)||void 0===t?void 0:t.createAccount),{},{reportingYear:null===(a=n.data)||void 0===a?void 0:a.setAccountReportingYear}),o=i.id;e.writeQuery({query:Te,variables:bL,data:{getAccounts:vL(vL({},r),{},{accounts:r.rows.concat([{id:i.id,name:i.name,accessControls:i.accessControls,featureToggles:i.featureToggles,type:i.type,children:i.children}])})}}),e.writeQuery({query:xe,variables:{id:o},data:{getAccountInfo:i}})}})}(a);return(0,Ze.jsx)(LI,{children:(0,Ze.jsxs)("form",{name:"create-account__form",onSubmit:e=>{(async e=>{var n;e.preventDefault();const{values:t,accessControls:a,featureToggles:l,showChatBot:s,reportingYearId:c,unrestrictedDocuments:d}=r,u=SI(t.businessName.text);if(u)return i(e=>AI(AI({},e),{},{values:AI(AI({},e.values),{},{businessName:AI(AI({},t.businessName),{},{error:u})})}));const p=(0,Ai.A)();await o({variables:{id:p,accessControls:a,featureToggles:l,reportingYearId:c,showChatBot:s,name:t.businessName.text,type:"ENTERPRISE",notes:gL(t.notes),children:t.childAccounts.map(e=>{let{value:n}=e;return n}),sectorId:null===(n=t.sector)||void 0===n?void 0:n.id,unrestrictedDocuments:d}})})(e)},children:[(0,Ze.jsx)(jI,{heading:"Create Account",handleChange:e=>{e.persist(),i(n=>AI(AI({},n),{},{values:AI(AI({},r.values),{},{[e.target.name]:{text:e.target.value,error:null}})}))},businessName:r.values.businessName,isSubmitted:l,onCheckboxClick:e=>{const n=e.target.name;n.startsWith("featureToggles.")?i(t=>AI(AI({},t),{},{featureToggles:yL()(n.replace("featureToggles.",""),e.target.checked,t.featureToggles)})):i(t=>AI(AI({},t),{},{accessControls:yL()(n,e.target.checked,t.accessControls)}))},accessControls:r.accessControls,featureToggles:r.featureToggles,allAccounts:t,selectedChildAccounts:r.values.childAccounts,selectedSector:null===(n=r.values.sector)||void 0===n?void 0:n.id,notes:r.values.notes,showChatBot:r.showChatBot,unrestrictedDocuments:r.unrestrictedDocuments,onRestrictedDocumentChange:e=>{const n=e.target.value,t=[...r.unrestrictedDocuments];if(t.includes(n)){const e=t.indexOf(n);t.splice(e,1)}else t.push(n);i(e=>AI(AI({},e),{},{unrestrictedDocuments:t}))},onShowChatBotChange:()=>{i(e=>AI(AI({},e),{},{showChatBot:!r.showChatBot}))},onNotesChange:e=>i(n=>AI(AI({},n),{},{values:AI(AI({},n.values),{},{notes:e})})),onChildAccountsChange:e=>i(n=>AI(AI({},n),{},{values:AI(AI({},n.values),{},{childAccounts:e})})),onSectorChange:e=>i(n=>AI(AI({},n),{},{values:AI(AI({},n.values),{},{sector:{id:e.value}})})),reportingYearId:r.reportingYearId,onReportingYearChange:e=>i(n=>AI(AI({},n),{},{reportingYearId:e}))}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(II,{item:!0,children:(0,Ze.jsx)(ze.$n,{name:"create-account__button--create",color:"success",submit:!0,disabled:!r.values.businessName.text||l,children:"Create Account"})})})]})})}function _I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function FI(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_I(Object(t),!0).forEach(function(n){BI(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_I(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function BI(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var UI,MI;function VI(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function zI(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?VI(Object(t),!0).forEach(function(n){GI(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):VI(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function GI(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function $I(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const WI=Ge.default.div(UI||(UI=$I(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),qI=(0,Ge.default)(ze.fv)(MI||(MI=$I(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing);function JI(e){var n,t;let{account:a,allAccounts:r,accessControls:i,featureToggles:o,businessName:l,notes:s,showChatBot:c,reportingYearId:d,dismiss:u}=e;const[p,{loading:m}]=function(e){const{showNotification:n}=vt();return(0,Ot.n)(he,{onCompleted:t=>{let{updateAccount:a}=t;n("The account ".concat(a.name," has been updated!"),"success"),e()},onError:()=>{n("Something went wrong. If the problem persists, contact support.","danger")},update:(e,n)=>{var t,a;const{getAccounts:r}=e.readQuery({query:Te,variables:bL}),i=FI(FI({},null===(t=n.data)||void 0===t?void 0:t.updateAccount),{},{reportingYear:null===(a=n.data)||void 0===a?void 0:a.setAccountReportingYear}),o=null==i?void 0:i.id;e.writeQuery({query:Te,variables:bL,data:{getAccounts:FI(FI({},r),{},{accounts:r.rows.map(e=>e.id===o?i:e)})}}),e.writeQuery({query:xe,variables:{id:o},data:{getAccountInfo:i}})}})}(u),f=function(e){return e.children.filter(Boolean).map(e=>({label:null==e?void 0:e.name,value:null==e?void 0:e.id}))}(a),[y,b]=(0,g.useState)({values:{showChatBot:c,reportingYearId:d,childAccounts:f,businessName:{text:l,error:""},notes:s||"",n3rgyConsentDocumentLink:{text:(null==a?void 0:a.n3rgyConsentDocumentLink)||"",error:""},n3rgyUploadGranularity:{text:(null==a?void 0:a.n3rgyUploadGranularity)||"",error:""},n3rgyUploadBatchingEnabled:{text:(null==a?void 0:a.n3rgyUploadBatchingEnabled)||!1,error:""},n3rgyTariff:{text:(null==a?void 0:a.n3rgyTariff)||"",error:""},sector:{id:(null==a||null===(n=a.sector)||void 0===n?void 0:n.id)||""},unrestrictedDocuments:a.unrestrictedDocuments||[],customImpactDashboardId:(null==a||null===(t=a.customImpactDashboard)||void 0===t?void 0:t.id)||null},accessControls:{learn:i.learn,intelligence:i.intelligence,comply:i.comply,data:i.data,tasks:i.tasks,projects:i.projects,surveys:i.surveys,flows:i.flows,dataTracker:i.dataTracker,dromoUpload:i.dromoUpload,dataOverwriting:i.dataOverwriting,v2Design:i.v2Design,organisation:i.organisation},featureToggles:{enableGlobalEmissionFactors:Boolean(null==o?void 0:o.enableGlobalEmissionFactors)}});return(0,Ze.jsx)(WI,{children:(0,Ze.jsxs)("form",{name:"update-account__form",onSubmit:e=>{(async e=>{e.preventDefault();const{values:n,accessControls:t,featureToggles:r}=y,i=SI(n.businessName.text);if(i)return b(e=>zI(zI({},e),{},{values:zI(zI({},n),{},{businessName:zI(zI({},n.businessName),{},{error:i})})}));await p({variables:{accessControls:t,id:a.id,name:n.businessName.text,type:a.type,notes:gL(n.notes),showChatBot:n.showChatBot,children:n.childAccounts.map(e=>{let{value:n}=e;return n}),reportingYearId:n.reportingYearId,sectorId:n.sector.id,n3rgyConsentDocumentLink:n.n3rgyConsentDocumentLink.text,n3rgyUploadGranularity:n.n3rgyUploadGranularity.text,n3rgyUploadBatchingEnabled:n.n3rgyUploadBatchingEnabled.text,n3rgyTariff:n.n3rgyTariff.text,featureToggles:r,unrestrictedDocuments:n.unrestrictedDocuments,customImpactDashboardId:n.customImpactDashboardId}}),b(e=>zI(zI({},e),{},{isSubmitted:!0}))})(e)},children:[(0,Ze.jsx)(jI,{heading:"Update Account",handleChange:e=>{var n;null===(n=e.persist)||void 0===n||n.call(e),b(n=>zI(zI({},n),{},{values:zI(zI({},n.values),{},{[e.target.name]:{text:e.target.value,error:null}})}))},businessName:y.values.businessName,isSubmitted:m,onCheckboxClick:e=>{const n=e.target.name;n.startsWith("featureToggles.")?b(t=>zI(zI({},t),{},{featureToggles:yL()(n.replace("featureToggles.",""),e.target.checked,t.featureToggles)})):b(t=>zI(zI({},t),{},{accessControls:yL()(n,e.target.checked,t.accessControls)}))},accessControls:y.accessControls,allAccounts:r,accountId:a.id,selectedChildAccounts:y.values.childAccounts,selectedSector:y.values.sector.id,notes:y.values.notes,n3rgyConsentDocumentLink:y.values.n3rgyConsentDocumentLink.text,n3rgyUploadGranularity:y.values.n3rgyUploadGranularity.text,n3rgyUploadBatchingEnabled:y.values.n3rgyUploadBatchingEnabled.text,n3rgyTariff:y.values.n3rgyTariff.text,featureToggles:y.featureToggles,showChatBot:y.values.showChatBot,reportingYearId:y.values.reportingYearId,unrestrictedDocuments:y.values.unrestrictedDocuments,onRestrictedDocumentChange:e=>{const n=e.target.value,t=[...y.values.unrestrictedDocuments];if(t.includes(n)){const e=t.indexOf(n);t.splice(e,1)}else t.push(n);b(e=>zI(zI({},e),{},{values:zI(zI({},e.values),{},{unrestrictedDocuments:t})}))},onShowChatBotChange:()=>{b(e=>zI(zI({},e),{},{values:zI(zI({},y.values),{},{showChatBot:!y.values.showChatBot})}))},onNotesChange:e=>b(n=>zI(zI({},n),{},{values:zI(zI({},n.values),{},{notes:e})})),onSectorChange:e=>b(n=>zI(zI({},n),{},{values:zI(zI({},n.values),{},{sector:{id:e.value}})})),onChildAccountsChange:e=>b(n=>zI(zI({},n),{},{values:zI(zI({},n.values),{},{childAccounts:e})})),onReportingYearChange:e=>{b(n=>zI(zI({},n),{},{values:zI(zI({},n.values),{},{reportingYearId:e})}))},customImpactDashboardId:y.values.customImpactDashboardId,onCustomImpactDashboardChange:e=>b(n=>zI(zI({},n),{},{values:zI(zI({},n.values),{},{customImpactDashboardId:e})}))}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsx)(qI,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{disabled:m,name:"update-account__button--cancel",color:"info",onClick:u,children:"Cancel"})}),(0,Ze.jsx)(qI,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{name:"update-account__button--save",color:"success",submit:!0,disabled:m||!y.values.businessName.text,children:"Save"})})]})]})})}var YI,HI,KI;function QI(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ZI(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?QI(Object(t),!0).forEach(function(n){XI(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):QI(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function XI(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function eE(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const nE=Ge.default.div(YI||(YI=eE(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),tE=(0,Ge.default)(ze.DZ)(HI||(HI=eE(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),aE=(0,Ge.default)(ze.fv)(KI||(KI=eE(["\n  padding: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing);class rE extends g.Component{constructor(e){super(e),this.hideNotification=()=>this.setState({notification:ZI(ZI({},this.state.notification),{},{show:!1})}),this.onUploadError=()=>{this.setState({notification:{show:!0,message:"Something went wrong. If the problem persists, contact support.",color:"danger"},hasError:!0,isSuccess:!1,isSubmitted:!1})},this.onLogoSave=(e,n)=>{n({variables:{fileName:"".concat(this.props.accountData.id,".png"),data:e,contentType:"image/png",accountId:this.props.accountData.id,accountName:this.props.accountData.name,accountType:this.props.accountData.type,accessControls:this.props.accountData.accessControls}}),this.setState({isSubmitted:!0})},this.state={hasError:!1,isSuccess:!1,notification:{show:!1,message:"",color:"success"},isSubmitted:!1}}render(){return(0,Ze.jsxs)(nE,{name:"upload-account",children:[this.state.notification.show&&(0,Ze.jsx)(ze.Eg,{name:"upload-account__notification",show:!0,color:this.state.notification.color,onClose:this.hideNotification,children:this.state.notification.message}),(0,Ze.jsx)(Qe.s,{mutation:ve,onCompleted:()=>this.props.onSuccess("The logo has been uploaded!","success"),onError:this.onUploadError,children:e=>(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(tE,{name:"upload-account__heading",size:"lg",children:"Add/Edit Logo"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(aE,{item:!0,container:!0,children:(0,Ze.jsx)(ze.nE,{width:141,height:69,border:50,defaultImage:this.props.accountData.logoPath?"".concat(this.props.accountData.logoPath,"?v=").concat((0,Ai.A)()):"",onSave:n=>this.onLogoSave(n,e),acceptedFormats:["image/png","image/jpeg","image/svg+xml","image/gif"],outputFormat:{format:"image/png",width:141,height:69}})})})]})})]})}}const iE=rE;var oE=t(54717);const lE=e=>{let{gridApi:n}=e;const[t,a]=(0,g.useState)(""),r=(0,oE.useDebouncedCallback)(()=>{var e,a;null==n||null===(e=n.api)||void 0===e||e.setColumnFilterModel("name",{filterType:"text",type:"contains",filter:t}),null==n||null===(a=n.api)||void 0===a||a.onFilterChanged()},500,{trailing:!0});return(0,Ze.jsx)(ze.vj,{name:"ConfigurationAccountsContainer__Controls__Search",value:t,onChange:e=>{a(e.target.value),r()},hideButton:!0})};var sE;const cE=(0,Ge.default)(ze.$n)(sE||(sE=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),dE="CREATE",uE="UPDATE",pE="LOGO",mE="BANNER",fE=()=>{var e,n;const t=(0,N.m)(),[a,r]=(0,g.useState)(),{data:i,loading:o,error:l,refetch:s,networkStatus:c}=(0,h.IT)(Te,{variables:bL}),[d,u]=(0,g.useState)({type:null,accountId:null}),{data:p,loading:m,error:f}=(y=null==d?void 0:d.accountId,b=!(null!=d&&d.accountId),(0,h.IT)(xe,{variables:{id:y},skip:b||!y,fetchPolicy:"cache-and-network"}));var y,b;const{showNotification:v}=vt(),x=(null==i||null===(e=i.getAccounts)||void 0===e?void 0:e.rows)||[],T=e=>n=>u({type:e,accountId:n}),O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};T(null)(null),e.message&&v(e.message,e.color),n()},k=async e=>{const{data:{getAccounts:{rows:n,totalRows:a}}}=await t.query({query:Te,variables:e,fetchPolicy:"network-only"});return{rows:n,totalRows:a}};return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{name:"ConfigurationAccountsContainer__Controls",icon:"briefcase",iconColor:"primary",title:"Accounts",children:[(0,Ze.jsx)(ze.fv,{span:6,container:!0,item:!0,children:(0,Ze.jsx)(lE,{gridApi:a})}),(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(cE,{name:"ConfigurationAccountsContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>T(dE)(),children:"+ Add Account"})}),(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(MP,{fetchRows:k,gridApi:null==a?void 0:a.api,defaultExportFileName:"Account Exports",label:"Export Data"})})]}),(o&&3!==c||4===c)&&(0,Ze.jsx)(Vg,{name:"ConfigurationAccountsContainer__Loading"}),l?(0,Ze.jsx)(ub,{error:l,retry:k}):(0,Ze.jsx)(mL,{fetchRows:k,setGridApi:r,onEdit:T(uE),onLogoEdit:T(pE),onBannerEdit:T(mE)}),d.type===uE&&(0,Ze.jsxs)(ze.aF,{size:"lg",show:!0,loading:m,dismissable:!0,name:"ConfigurationAccountsContainer__Modal--update",onDismiss:O,children:[f&&"Error! ".concat(f.message),m||f||null==p||!p.getAccountInfo?null:(0,Ze.jsx)(JI,{account:p.getAccountInfo,businessName:p.getAccountInfo.name||"",accessControls:p.getAccountInfo.accessControls||[],featureToggles:p.getAccountInfo.featureToggles||null,notes:p.getAccountInfo.notes||"",showChatBot:!!p.getAccountInfo.showChatBot,reportingYearId:(null===(n=p.getAccountInfo.reportingYear)||void 0===n?void 0:n.id)||"",dismiss:O,allAccounts:x})]}),d.type===pE&&(0,Ze.jsxs)(ze.aF,{size:"sm",show:!0,dismissable:!0,loading:m,name:"ConfigurationAccountsContainer__Modal--Logo",onDismiss:O,children:[f&&"Error! ".concat(f.message),!m&&!f&&(0,Ze.jsx)(iE,{accountData:null==p?void 0:p.getAccountInfo,onSuccess:(e,n)=>O({message:e,color:n},s),dismiss:O})]}),d.type===mE&&(0,Ze.jsx)(ze.aF,{size:"lg",show:!0,dismissable:!0,loading:o,name:"ConfigurationAccountsContainer__Modal--Logo",onDismiss:O,children:f&&"Error! ".concat(f.message)}),d.type===dE&&(0,Ze.jsx)(ze.aF,{size:"lg",show:!0,name:"ConfigurationAccountsContainer__Modal--create",dismissable:!0,onDismiss:O,children:(0,Ze.jsx)(EI,{onDismiss:()=>O(),allAccounts:x})})]})};var yE,gE,bE,hE,vE;function xE(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const TE=(0,D.J1)(yE||(yE=xE(["\n  fragment SurveyTemplateFields on SurveyTemplate {\n    id\n    owner {\n      id\n      first_name\n      last_name\n    }\n    name\n    version\n    description\n    formContent\n    createdDate\n    expiryDate\n  }\n"]))),OE=(0,D.J1)(gE||(gE=xE(["\n  query GetSurveyTemplates {\n    getSurveyTemplates {\n      ...SurveyTemplateFields\n    }\n  }\n  ","\n"])),TE),kE=(0,D.J1)(bE||(bE=xE(["\n  mutation CreateSurveyTemplate($template: SurveyTemplateInput!) {\n    createSurveyTemplate(template: $template) {\n      ...SurveyTemplateFields\n    }\n  }\n  ","\n"])),TE),jE=(0,D.J1)(hE||(hE=xE(["\n  mutation UpdateSurveyTemplate($id: ID!, $template: SurveyTemplateInput!) {\n    updateSurveyTemplate(id: $id, template: $template) {\n      ...SurveyTemplateFields\n    }\n  }\n  ","\n"])),TE),CE=(0,D.J1)(vE||(vE=xE(["\n  mutation DeleteSurveyTemplate($id: ID!) {\n    deleteSurveyTemplate(id: $id)\n  }\n"])));function SE(e){const n={};return e.name||(n.name="Name is required"),e.formContent||(n.formContent="Survey content is required"),e.ownerId||(n.ownerId="Owner is required"),IA().isJSON(e.formContent)||(n.formContent="Should be a valid JSON string"),Object.keys(n).length?[n,null]:[null,e]}var NE,wE;function DE(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function AE(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?DE(Object(t),!0).forEach(function(n){RE(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):DE(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function RE(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function PE(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const LE=Ge.default.div(NE||(NE=PE(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),IE=(0,Ge.default)(ze.hh.TextColumn)(wE||(wE=PE(["\n  align-self: center;\n"])));function EE(e){let{onDismiss:n,buttonDescription:t,TemplateDetails:a,title:r,submitButtonText:i="Create Template"}=e;const[o,l]=(0,g.useState)({name:"",description:"",expiryDate:null}),[s,c]=(0,g.useState)({}),[d,{loading:u}]=function(){const{showNotification:e}=vt();return(0,Ot.n)(kE,{onCompleted:()=>{e("Template has been successfully created!","success")},onError:n=>{e("Something went wrong. If the problem persists, contact support. ".concat(n),"danger")},update:(e,n)=>{var t;const{getSurveyTemplates:a}=e.readQuery({query:OE}),r=null===(t=n.data)||void 0===t?void 0:t.createSurveyTemplate;r&&e.writeQuery({query:OE,data:{getSurveyTemplates:a.concat(r)}})}})}(),p=(0,g.useCallback)(e=>{l(n=>AE(AE({},n),e))},[]),m=(0,g.useCallback)(async e=>{e.preventDefault();const[t,a]=SE(o);if(t)return c(e=>AE(AE({},e),t));await d({variables:{template:a},onCompleted:()=>n()})},[o,d,n]);return(0,Ze.jsx)(LE,{name:"CreateTemplate",children:(0,Ze.jsxs)(ze.hh,{onSubmit:m,children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:r}),(0,Ze.jsx)(a,{onChange:p,template:o,errors:s,disabled:u}),(0,Ze.jsx)(ze.hh.ButtonColumn,{disabled:u,onClick:m,name:"CreateTemplate__SubmitButton",children:i}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(IE,{span:12,size:"xs",color:"normal",children:t})})]})})}function _E(){return(0,h.IT)(OE)}const FE=e=>({value:e.id.toLowerCase(),label:"".concat(e.firstName," ").concat(e.lastName)}),BE=e=>{let{accountId:n,value:t,onChange:a,isDisabled:r=!1,selectedOption:i=[],error:o="",isMulti:l=!0}=e;const s=(0,N.m)();return(0,Ze.jsx)(ze.l6,{isMulti:l,name:"owner",placeholder:"Begin typing to find users...",multiValueColor:"tertiary",value:t,defaultOptions:!0,onChange:a,selectedOption:i,classPrefix:"user-select",isDisabled:r,error:o,loadOptions:async e=>{var t;const{data:{getUsers:a}}=await s.query({query:LS,variables:{accountId:n,filters:{text:[{filterType:Vt.pe.Text,field:"fullName",type:Vt.II.Contains,filter:e},{filterType:Vt.pe.Text,operator:Vt.h6.Or,condition1:{filterType:Vt.pe.Text,field:"accountId",type:Vt.II.Equals,filter:n},condition2:{filterType:Vt.pe.Text,field:"role",type:Vt.II.Equals,filter:Vt.gG.Consultant}}]},sort:[{field:"firstName",order:"asc"}]}}),{totalRows:r}=a;return{options:(null===(t=a.rows)||void 0===t?void 0:t.map(FE))||[],total:r}}})};var UE;const ME=(0,Ge.default)(ze.fs)(UE||(UE=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 150px;\n"])));function VE(e){let{template:n,errors:t,onChange:a,owner:r,disabled:i}=e;const o=rt(),l=(0,g.useCallback)(e=>a({[e.target.name]:e.target.value}),[a]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.TextInputColumn,{label:"Title",name:"name",onChange:l,value:n.name,error:t.name,disabled:i})}),(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.TextInputColumn,{label:"Description",name:"description",onChange:l,value:n.description,error:t.description,disabled:i})}),(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.Column,{label:"Form content",name:"formContent",children:(0,Ze.jsx)(ME,{name:"formContent",onChange:l,value:n.formContent,error:t.formContent,disabled:i})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Owner",span:12,children:(0,Ze.jsx)(BE,{isMulti:!1,accountId:o,value:r?{value:r.id,label:Vo(r)}:n.ownerId,error:t.ownerId||void 0,onChange:(0,g.useCallback)(e=>a({ownerId:e.target.select.value}),[a])})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Expiry date",span:12,children:(0,Ze.jsx)(ze.lr,{onDayClick:(0,g.useCallback)(e=>a({expiryDate:e}),[a]),name:"expiryDate",selectedDate:n.expiryDate,disabledDatesBefore:Fa().toDate(),box:!0})})}),(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.TextInputColumn,{label:"Version",name:"version",onChange:l,value:n.version,error:t.version,disabled:i})})]})}var zE;function GE(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?GE(Object(t),!0).forEach(function(n){WE(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):GE(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function WE(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const qE=Ge.default.div(zE||(zE=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing);function JE(e){let{onDismiss:n,existingTemplate:t}=e;const[a,r]=(0,g.useState)({name:t.name,description:t.description,formContent:t.formContent,expiryDate:t.expiryDate?new Date(t.expiryDate):null,ownerId:t.owner.id,version:t.version}),[i,o]=(0,g.useState)({}),[l,{loading:s}]=function(){const{showNotification:e}=vt();return(0,Ot.n)(jE,{onCompleted:()=>{e("The template has been successfully updated!","success")},onError:n=>{e("Something went wrong. If the problem persists, contact support. ".concat(n),"danger")},update:(e,n)=>{var t;const{getSurveyTemplates:a}=e.readQuery({query:OE}),r=null===(t=n.data)||void 0===t?void 0:t.updateFormTemplate;e.writeQuery({query:OE,data:{getSurveyTemplates:a.map(e=>e.id===(null==r?void 0:r.id)?r:e)}})}})}(),[c,{loading:d}]=function(){const{showNotification:e}=vt();return(0,Ot.n)(CE,{onCompleted:()=>{e("Template has been deleted.","success")},onError:n=>{e("Something went wrong. If the problem persists, contact support. ".concat(n),"danger")},update:(e,n)=>{var t;const{getSurveyTemplates:a}=e.readQuery({query:OE}),r=null===(t=n.data)||void 0===t?void 0:t.deleteSurveyTemplate;r&&e.writeQuery({query:OE,data:{getSurveyTemplates:a.filter(e=>e.id!==r)}})}})}(),u=(0,g.useCallback)(e=>{r(n=>$E($E({},n),e))},[]),p=(0,g.useCallback)(async e=>{e.preventDefault();const[r,i]=SE(a);if(r)return o(e=>$E($E({},e),r));await l({variables:{id:t.id,template:i},onCompleted:()=>n()})},[a,l,n,t.id]),m=(0,g.useCallback)(()=>{c({variables:{id:t.id},onCompleted:()=>n()})},[t.id,c,n]),f=s||d;return(0,Ze.jsx)(qE,{children:(0,Ze.jsxs)(ze.hh,{container:!0,onSubmit:p,children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:"Update Form Template"}),(0,Ze.jsx)(VE,{onChange:u,template:a,owner:t.owner,errors:i,disabled:f}),(0,Ze.jsxs)(ze.hh.Row,{container:!0,children:[(0,Ze.jsx)(ze.hh.ButtonColumn,{span:6,disabled:f,onClick:p,name:"UpdateTemplate__UpdateTemplateButton",children:"Update template"}),(0,Ze.jsx)(ze.hh.ButtonColumn,{span:6,disabled:f,onClick:m,color:"danger",name:"UpdateTemplate__DeleteTemplateButton",children:"Delete template"})]})]})})}var YE,HE,KE;function QE(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ZE(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?QE(Object(t),!0).forEach(function(n){XE(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):QE(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function XE(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function e_(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const n_=Ge.default.div(YE||(YE=e_(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),t_=Ge.default.a(HE||(HE=e_(["\n  display: inline-block;\n  color: ",";\n  padding: 0 0 0 ",";\n  margin-right: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xxl.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),a_=Ge.default.div(KE||(KE=e_(["\n  height: 100%;\n"]))),r_=e=>{let{data:n,onEdit:t}=e;return(0,Ze.jsx)(n_,{children:(0,Ze.jsx)(t_,{onClick:()=>t(n),children:(0,Ze.jsx)(ze.In,{icon:"pencil-alt"})})})},i_={resizable:!0,sortable:!0,filter:!0,cellStyle:{height:"auto"}},o_=ba("id"),l_=[{headerName:"Title",field:"name"},{headerName:"Date Created",field:"createdDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)}},{headerName:"Expiry Date",field:"expiryDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)}},{headerName:"Description",field:"description"},{headerName:"Version",field:"version"},{headerName:"Owner",field:"owner",valueFormatter:e=>{let{value:n}=e;return Vo(n)}},{headerName:"Actions",field:"id",cellRenderer:"edit",colId:"edit"}];function s_(e){let{rows:n,onEdit:t}=e;const a={edit:e=>(0,Ze.jsx)(r_,ZE(ZE({},e),{},{onEdit:e=>t(e)}))};return(0,Ze.jsx)(a_,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,{rowSelection:"single",defaultColDef:i_,columnDefs:l_,components:a,rowData:n,paginationPageSize:25,getRowId:o_,pagination:!0})})}var c_,d_;function u_(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const p_=(0,Ge.default)(ze.$n)(c_||(c_=u_(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),m_=(0,Ge.default)(bh)(d_||(d_=u_(["\n  justify-content: space-between;\n"]))),f_=()=>{const{data:e,loading:n,error:t,refetch:a,networkStatus:r}=_E(),[i,o]=(0,g.useState)(!1),[l,s]=(0,g.useState)(null),c=(0,g.useCallback)(()=>o(e=>!e),[]),d=(0,g.useCallback)(e=>s(e),[]),u=(0,g.useCallback)(()=>s(null),[]);return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsx)(m_,{icon:"briefcase",iconColor:"primary",name:"ConfigurationSurveysContainer",title:"Survey Templates",children:(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(p_,{size:"md",color:"primary",onClick:c,name:"AddSurveyTemplateButton",inline:!0,children:"+ Add Survey Template"})})}),(n&&3!==r||4===r)&&(0,Ze.jsx)(Vg,{name:"ConfigurationAccountsContainer__Loading"}),t&&(0,Ze.jsx)(ub,{error:t,retry:a}),!t&&!n&&(null==e?void 0:e.getSurveyTemplates)&&(0,Ze.jsx)(s_,{rows:null==e?void 0:e.getSurveyTemplates,onEdit:d}),l&&(0,Ze.jsx)(ze.aF,{size:"md",onDismiss:u,dismissable:!0,show:!0,children:(0,Ze.jsx)(JE,{existingTemplate:l,onDismiss:u})}),i&&(0,Ze.jsx)(ze.aF,{size:"md",onDismiss:c,dismissable:!0,show:!0,children:(0,Ze.jsx)(EE,{onDismiss:c,TemplateDetails:VE,title:"Create Survey Template",submitButtonText:"Create template"})})]})};var y_,g_,b_,h_,v_,x_,T_,O_,k_;function j_(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const C_=(0,D.J1)(y_||(y_=j_(["\n  query GetWasteContractorsPaged($page: Int!, $pageSize: Int!, $filterValue: String, $filterBy: String) {\n    getWasteContractorsPaged(\n      page: $page\n      pageSize: $pageSize\n      filterValue: $filterValue\n      filterExpression: EQUAL\n      filterBy: $filterBy\n    ) {\n      count\n      hasNextPage\n      hasPreviousPage\n      isFirstPage\n      isLastPage\n      pageCount\n      totalItemCount\n      page\n      pageSize\n      wasteContractors {\n        name\n        id\n        address {\n          id\n          address1\n          address2\n          address3\n          city\n          phone1\n          postcode\n          country {\n            alpha2Code\n            name\n            id\n          }\n        }\n      }\n    }\n  }\n"]))),S_=(0,D.J1)(g_||(g_=j_(["\n  mutation CreateWasteContractor(\n    $id: ID!\n    $name: String!\n    $addressId: ID!\n    $add1: String\n    $add2: String\n    $add3: String\n    $city: String!\n    $post: String!\n    $phone: String\n    $countryId: ID!\n  ) {\n    createAddress(\n      input: {\n        id: $addressId\n        address1: $add1\n        address2: $add2\n        address3: $add3\n        city: $city\n        postcode: $post\n        coordinates: null\n        phone1: $phone\n        countryId: $countryId\n      }\n    ) {\n      id\n    }\n    createWasteContractor(input: { id: $id, name: $name, addressId: $addressId }) {\n      id\n      name\n    }\n  }\n"]))),N_=(0,D.J1)(b_||(b_=j_(["\n  mutation UpdateWasteContractor(\n    $id: ID!\n    $name: String!\n    $addressId: ID!\n    $add1: String\n    $add2: String\n    $add3: String\n    $city: String!\n    $post: String!\n    $phone: String\n    $countryId: ID!\n  ) {\n    updateAddress(\n      input: {\n        id: $addressId\n        address1: $add1\n        address2: $add2\n        address3: $add3\n        city: $city\n        postcode: $post\n        coordinates: null\n        phone1: $phone\n        countryId: $countryId\n      }\n    ) {\n      id\n      address1\n      address2\n      address3\n      city\n      postcode\n      phone1\n      country {\n        alpha2Code\n        name\n        id\n      }\n    }\n    updateWasteContractor(input: { id: $id, name: $name, addressId: $addressId }) {\n      id\n      name\n    }\n  }\n"]))),w_=(0,D.J1)(h_||(h_=j_(["\n  {\n    wasteContractorsGridPage @client\n  }\n"]))),D_=(0,D.J1)(v_||(v_=j_(["\n  {\n    wasteContractorsGridTotalPages @client\n  }\n"]))),A_=(0,D.J1)(x_||(x_=j_(["\n  mutation SetWasteContractorsGridPage($page: Int!) {\n    setWasteContractorsGridPage(page: $page) @client\n  }\n"]))),R_=((0,D.J1)(T_||(T_=j_(["\n  mutation SetWasteContractorsGridTotalPages($totalPages: Int!) {\n    setWasteContractorsGridTotalPages(totalPages: $totalPages) @client\n  }\n"]))),(0,D.J1)(O_||(O_=j_(["\n  {\n    wasteContractorsGridSearch @client\n  }\n"])))),P_=(0,D.J1)(k_||(k_=j_(["\n  mutation SetWasteContractorsGridSearch($search: String!) {\n    setWasteContractorsGridSearch(search: $search) @client\n  }\n"])));var L_,I_,E_,__,F_,B_;function U_(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const M_=(0,Ge.default)(ze.fI)(L_||(L_=U_(["\n  flex: 0 0 auto;\n  padding: ",";\n  padding-right: ",";\n  border-bottom: 1px solid ",";\n  opacity: 0.7;\n  transition: all 0.2s ease-in;\n\n  &:hover {\n    opacity: 1;\n  }\n\n  &:hover .slide-in-animation {\n    transform: translateX(25px);\n  }\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>"".concat(e.theme.geometry.xs.spacing),e=>e.theme.colors.overlay.normal.background),V_=Ge.default.a(I_||(I_=U_(["\n  display: inline-block;\n  color: ",";\n  padding: ",";\n\n  &:hover {\n    color: ",";\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>"".concat(e.theme.geometry.md.spacing," ").concat(e.theme.geometry.sm.spacing),e=>e.theme.colors.text.dark.background),z_=(0,Ge.default)(ze.Y3)(E_||(E_=U_(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),G_=Ge.default.a(__||(__=U_(["\n  display: inline-block;\n  color: ",";\n  padding: ",";\n\n  &:hover {\n    color: ",";\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>"".concat(e.theme.geometry.md.spacing," ").concat(e.theme.geometry.sm.spacing),e=>e.theme.colors.text.dark.background),$_=(0,Ge.default)(ze.fv)(F_||(F_=U_(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.profile.padding),W_=(0,Ge.default)($_)(B_||(B_=U_(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: flex-end;\n"]))),q_=e=>{let{contractorId:n,name:t,address:a,phoneNumber:r,onEdit:i}=e;const o=rc();return(0,Ze.jsxs)(M_,{container:!0,name:"contractor-row--".concat(n),itemAlign:"center",children:[(0,Ze.jsx)(z_,{name:"contractor-row__profile-picture--".concat(n),size:"xs",accountName:t}),(0,Ze.jsx)($_,{container:!0,item:!0,contractorId:n,span:3,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"contractor-row__name--".concat(n),size:"md",children:t})}),(0,Ze.jsx)($_,{container:!0,item:!0,contractorId:n,span:3,children:r&&(0,Ze.jsx)($_,{contractorId:n,children:(0,Ze.jsx)(G_,{name:"contractor-row__phoneNumber--".concat(n),size:"md",href:"tel:".concat(r),children:r})})}),(0,Ze.jsx)($_,{container:!0,item:!0,inline:!0,contractorId:n,span:3,children:a&&(0,Ze.jsxs)($_,{contractorId:n,inline:!0,children:[(0,Ze.jsx)(ze.EY,{name:"contractorRow__addressLine1--".concat(n),size:"md",children:a.address1}),(0,Ze.jsx)(ze.EY,{name:"contractorRow__addressLine2--".concat(n),size:"md",children:a.address2}),(0,Ze.jsx)(ze.EY,{name:"contractorRow__addressLine3--".concat(n),size:"md",children:a.address3}),(0,Ze.jsx)(ze.EY,{name:"contractorRow__addressCity--".concat(n),size:"md",children:a.city}),(0,Ze.jsx)(ze.EY,{name:"contractorRow__addressPostcode--".concat(n),size:"md",children:a.postcode}),(0,Ze.jsx)(ze.EY,{name:"contractorRow__addressPostcode--".concat(n),size:"md",children:a.country.name})]})}),o.data.includes("editWasteContractorAll")&&(0,Ze.jsx)(W_,{span:2,children:(0,Ze.jsx)(V_,{onClick:i,children:(0,Ze.jsx)(ze.In,{name:"contractorRow__edit--".concat(n),icon:"pencil-alt"})})})]})},J_=e=>{let{id:n,name:t,inline:a=!0,totalPagesCount:r,onChange:i,currentPage:o,itemsCountPerPage:l=5,size:s="md"}=e;return(0,Ze.jsx)(ze.dK,{id:n,name:t,inline:a,activePage:o,itemsCountPerPage:l,totalItemsCount:r,onChange:i,size:s})},Y_=["setPageMutation","setSearchMutation"];function H_(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function K_(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H_(Object(t),!0).forEach(function(n){Q_(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H_(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Q_(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}class Z_ extends g.Component{constructor(e){super(e),this.onChange=(e,n,t)=>{this.setState({search:e.target.value},()=>{this.onSearch(n,t)})},this.onSearch=(e,n)=>{const{search:t}=this.state;n({variables:{page:1}}),e({variables:{search:t}})},this.state={search:""}}render(){const e=this.props,{setPageMutation:n,setSearchMutation:t}=e,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,Y_);return(0,Ze.jsx)(Qe.s,{mutation:n,children:e=>(0,Ze.jsx)(Qe.s,{mutation:t,children:n=>(0,Ze.jsx)(ze.vj,K_(K_({},a),{},{name:"account-controls__search",value:this.state.search,onChange:t=>this.onChange(t,n,e),onSearch:()=>this.onSearch(n,e)}))})})}componentWillUnmount(){const{client:e,setSearchMutation:n}=this.props;e.mutate({mutation:n,variables:{search:""}})}}const X_=(0,Ib.W)(Z_),eF=["1","2","3","4","5","6","7","8","9","0"," "],nF=e=>{if((e=[...e.trim()]).length<=0||1===e.length&&" "===e[0])return!1;let n=!0;for(const t of e)if(!eF.includes(t)){n=!1;break}return n},tF=e=>null!==e.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g);var aF;const rF=(0,Ge.default)(ze.fv)(aF||(aF=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>"".concat(e.theme.geometry.xs.spacing));function iF(e){const{id:n,address1:t,address2:a,address3:r,city:i,postcode:o,phone:l,isSubmitted:s,handleChange:c,countryList:d,selectCountry:u,handleSelectChange:p}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(ze.hh.Row,{container:!0,align:"between",children:[(0,Ze.jsx)(ze.hh.TextInputColumn,{id:"".concat(n,"-address1"),disabled:s,name:"address1",onChange:c,label:"Address 1",value:t.text,error:t.error}),(0,Ze.jsx)(ze.hh.TextInputColumn,{id:"".concat(n,"-address2"),disabled:s,name:"address2",onChange:c,label:" Address 2 (Optional)",value:a.text,error:a.error})]}),(0,Ze.jsxs)(ze.hh.Row,{container:!0,align:"between",children:[(0,Ze.jsx)(ze.hh.TextInputColumn,{id:"".concat(n,"-address3"),disabled:s,name:"address3",onChange:c,label:"Address 3 (Optional)",value:r.text,error:r.error}),(0,Ze.jsx)(ze.hh.TextInputColumn,{id:"".concat(n,"-city"),disabled:s,name:"city",onChange:c,label:"City",value:i.text,error:i.error})]}),(0,Ze.jsxs)(ze.hh.Row,{container:!0,align:"between",children:[(0,Ze.jsx)(rF,{span:"12",children:(0,Ze.jsx)(ze.hh.TextInputColumn,{id:"".concat(n,"-postcode"),disabled:s,name:"postcode",onChange:c,label:"Postcode",value:o.text,error:o.error})}),(0,Ze.jsx)(rF,{span:"12",children:(0,Ze.jsx)(ze.hh.SelectColumn,{id:"".concat(n,"-country"),disabled:s,name:"selectCountry",onChange:p,value:u,options:d,label:"Country"})})]}),(0,Ze.jsx)(ze.hh.Row,{container:!0,align:"between",children:(0,Ze.jsx)(ze.hh.TextInputColumn,{id:"".concat(n,"-phone"),disabled:s,name:"phone",onChange:c,label:"Phone (Optional)",value:l.text,error:l.error})})]})}iF.propTypes={id:Ke().string,name:Ke().string,address1:Ke().shape({value:Ke().string,error:Ke().string}),address2:Ke().shape({value:Ke().string,error:Ke().string}),address3:Ke().shape({value:Ke().string,error:Ke().string}),city:Ke().shape({value:Ke().string,error:Ke().string}),postcode:Ke().shape({value:Ke().string,error:Ke().string}),phone:Ke().shape({value:Ke().string,error:Ke().string}),selectCountry:Ke().shape({value:Ke().string,error:Ke().string}),disabled:Ke().bool,handleChange:Ke().func};const oF=iF;var lF;function sF(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function cF(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sF(Object(t),!0).forEach(function(n){dF(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sF(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dF(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const uF=Ge.default.div(lF||(lF=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),pF=e=>{let{refetchQuery:n,onUpdate:t,onSuccess:a}=e;const{countryList:r,defaultCountry:i}=ku(),[o,l]=(0,g.useState)({hasError:!1,isSuccess:!1,notification:{show:!1,message:"",color:"success"},contractorName:{value:"",success:null},address1:{text:"",error:""},address2:{text:"",error:""},address3:{text:"",error:""},city:{text:"",error:""},postcode:{text:"",error:""},phone:{text:"",error:""},selectCountry:null}),s=rt(),[c]=(0,Ot.n)(S_,{refetchQueries:n,onError:e=>{e.graphQLErrors&&e.graphQLErrors[0]&&400===e.graphQLErrors[0].errorType?l(cF(cF({},o),{},{notification:{show:!0,message:"Contractor name must be unique.",color:"danger"},hasError:!0,isSuccess:!1})):l(cF(cF({},o),{},{notification:{show:!0,message:"Something went wrong. If the problem continues please contact support.",color:"danger"},hasError:!0,isSuccess:!1}))},onCompleted:e=>{l(cF(cF({},o),{},{hasError:!1,isSuccess:!0})),a("Contractor has been created!","success",e.createWasteContractor.id,e.createWasteContractor)},update:(e,n)=>{t&&t(e,n)}}),d=()=>o.contractorName.success&&u(o.address1.text)&&u(o.city.text)&&u(o.postcode.text)&&(0,LA.isPostalCode)(o.postcode.text,"GB")&&(!o.phone.text||nF(o.phone.text)),u=e=>!(""===e.trim());return(0,Ze.jsxs)(uF,{name:"create-contractor",children:[o.notification.show&&(0,Ze.jsx)(ze.Eg,{name:"create-account__notification",show:!0,color:o.notification.color,onClose:()=>{l(cF(cF({},o),{},{notification:cF(cF({},o.notification),{},{show:!1})}))},children:o.notification.message}),(0,Ze.jsxs)(ze.hh,{id:"createContractor--propertySheet",children:[(0,Ze.jsx)(ze.hh.HeaderRow,{name:"createContractor--header",children:"Create Contractor"}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextInputColumn,{name:"contractor--name",onChange:e=>{const n=e.target.value,t=!!n||null;l(cF(cF({},o),{},{contractorName:cF(cF({},o.contractorName),{},{value:n,success:t})}))},label:"Contractor Name",value:o.contractorName.value,success:o.contractorName.success})}),(0,Ze.jsx)(oF,{id:"ContractorAddressPropertySheet",name:"ContractorAddressPropertySheet",address1:o.address1,address2:o.address2,address3:o.address3,city:o.city,postcode:o.postcode,phone:o.phone,handleChange:e=>l(cF(cF({},o),{},{[e.target.name]:{text:e.target.value,error:null}})),handleSelectChange:e=>{l(n=>cF(cF({},n),{},{[e.target.name]:{value:e.target.select.value,label:e.target.select.label}}))},countryList:r||[],selectCountry:o.selectCountry||i}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.ButtonColumn,{name:"createContractor",onClick:()=>{var e;d()&&c({variables:{id:(0,Ai.A)(),name:o.contractorName.value,addressId:(0,Ai.A)(),add1:o.address1.text||null,add2:o.address2.text||null,add3:o.address3.text||null,city:o.city.text,post:o.postcode.text,phone:o.phone.text?o.phone.text.trim():null,accountId:s,countryId:(null===(e=o.selectCountry)||void 0===e?void 0:e.value)||i.value,aliases:[]}})},disabled:!d(),children:"Save"})})]})]})},mF=["defaultCountry","onDismiss","countryList"];var fF;function yF(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gF(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yF(Object(t),!0).forEach(function(n){bF(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yF(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function bF(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const hF=Ge.default.div(fF||(fF=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),vF=e=>{let{defaultCountry:n,onDismiss:t,countryList:a}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,mF);const[i,o]=(0,g.useState)({hasError:!1,isSuccess:!1,notification:{show:!1,message:"",color:"success"},contractorId:{value:r.contractorId},contractorName:{value:r.contractorName,success:!0},contractorAddressId:{value:r.contractorAddressId},address1:{text:r.address1,error:""},address2:{text:r.address2,error:""},address3:{text:r.address3,error:""},city:{text:r.city,error:""},postcode:{text:r.postcode,error:""},phone:{text:r.phone,error:""},options:[],selectCountry:n}),[l]=(0,Ot.n)(N_,{onError:()=>{o(gF(gF({},i),{},{notification:{show:!0,message:"Something went wrong. If the problem continues please contact support.",color:"danger"},hasError:!0,isSuccess:!1}))},onCompleted:()=>{t({show:!1,message:"Contractor has been updated!",color:"success"})}}),s=()=>i.contractorName.success&&c(i.address1.text)&&c(i.city.text)&&c(i.postcode.text)&&(0,LA.isPostalCode)(i.postcode.text,"GB")&&(!i.phone.text||nF(i.phone.text)),c=e=>e&&""!==e.trim();return(0,Ze.jsxs)(hF,{name:"update-contractor",children:[i.notification.show&&(0,Ze.jsx)(ze.Eg,{name:"update-account__notification",show:!0,color:i.notification.color,onClose:()=>{o(gF(gF({},i),{},{notification:gF(gF({},i.notification),{},{show:!1})}))},children:i.notification.message}),(0,Ze.jsxs)(ze.hh,{id:"PropertySheet",children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:"Update Contractor"}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextInputColumn,{name:"contractor--name",onChange:e=>{const n=e.target.value,t=!!n||null;o(gF(gF({},i),{},{contractorName:gF(gF({},i.contractorName),{},{value:n,success:t})}))},label:"Contractor Name",value:i.contractorName.value,success:i.contractorName.success})}),(0,Ze.jsx)(oF,{id:"ContractorAddressPropertySheet",name:"ContractorAddressPropertySheet",address1:i.address1,address2:i.address2,address3:i.address3,city:i.city,postcode:i.postcode,phone:i.phone,handleChange:e=>o(gF(gF({},i),{},{[e.target.name]:{text:e.target.value,error:null}})),handleSelectChange:e=>{o(n=>gF(gF({},n),{},{[e.target.name]:{value:e.target.select.value,label:e.target.select.label}}))},disabled:!1,countryList:a,selectCountry:i.selectCountry}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.ButtonColumn,{name:"updateContractor",onClick:()=>{s()&&l({variables:{id:i.contractorId.value,name:i.contractorName.value,addressId:i.contractorAddressId.value,add1:i.address1.text||null,add2:i.address2.text||null,add3:i.address3.text||null,city:i.city.text,post:i.postcode.text,phone:i.phone.text?i.phone.text.trim():null,countryId:i.selectCountry.value}})},disabled:!s(),children:"Save"})})]})]})};var xF;function TF(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function OF(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?TF(Object(t),!0).forEach(function(n){kF(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):TF(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function kF(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const jF=(0,Ge.default)(ze.$n)(xF||(xF=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),CF=e=>{const[n,t]=(0,g.useState)({createModal:{show:!1},updateModal:{id:""},selectedTags:[],notification:{message:null,color:null},account:{id:e.accountId},shouldRefetch:!1,selectAll:!1,orderByDesc:!0,pagination:{page:1,totalPages:0},countryList:[],defaultCountry:null}),{countryList:a}=ku(),r=rc(),{data:{wasteContractorsGridSearch:i}}=(0,h.IT)(R_),o={accountId:n.account.id,page:n.pagination.page,pageSize:20,filterValue:i||null,orderDir:n.orderByDesc?"desc":"asc",filterBy:"name"},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(OF(OF({},n),{},{createModal:{show:!1},updateModal:{id:null},notification:{message:e.message,color:e.color,id:e.id}}))},s=(e,a,r,i)=>"create"===e?t(OF(OF({},n),{},{createModal:{show:!0}})):"update"===e?t(OF(OF({},n),{},{updateModal:{id:a,name:r,address:i}})):void 0,c=()=>{t(e=>OF(OF({},e),{},{notification:{message:null,color:null,id:null}}))},{data:d,error:u,loading:p,refetch:m}=(0,h.IT)(C_,{variables:o,onCompleted:e=>(e=>{const a=n.pagination.page!==e.getWasteContractorsPaged.page,r=n.pagination.totalPages!==e.getWasteContractorsPaged.pageCount;(a||r)&&t(OF(OF({},n),{},{pagination:{page:e.getWasteContractorsPaged.page,totalPages:e.getWasteContractorsPaged.pageCount}}))})(e)}),f=(e=>{let{data:n,error:t,loading:a,refetch:r}=e;return t?(0,Ze.jsx)(ze.Kw,{error:t,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationContractorsContainer__Error",icon:a,title:n,body:t,retry:()=>r()})}}):a?(0,Ze.jsx)(Vg,{name:"ConfigurationContractorsContainer__Loading"}):0===(i=n.getWasteContractorsPaged).wasteContractors.length?(0,Ze.jsx)(nv,{name:"ConfigurationContractorsContainer__NoResults",title:"No Contractors found"}):i.wasteContractors.map(e=>(0,Ze.jsx)(q_,{contractorId:e.id,name:e.name,address:e.address,hasTransactions:e.hasTransactions,phoneNumber:e.address?e.address.phone1:null,onEdit:()=>s("update",e.id,e.name,e.address)},e.id));var i})({data:d,error:u,loading:p,refetch:m});return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationContractorsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{name:"ConfigurationContractorsContainer__Controls",icon:"business-time",iconColor:"primary",title:"Contractors",children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(X_,{setPageMutation:A_,setSearchMutation:P_,hideButton:!0})}),r.data.includes("createWasteContractorAll")&&(0,Ze.jsx)(jF,{name:"ConfigurationContractorsContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>s("create"),children:"+ Create Contractor"})]}),(e=>(0,Ze.jsxs)(g.Fragment,{children:[n.notification.message&&(0,Ze.jsxs)(ze.Eg,{name:"ConfigurationContractorsContainer__Notification",show:!0,color:"success",onClose:c,children:[n.notification.message,(0,Ze.jsx)("div",{hidden:!0,name:"ConfigurationContractorsContainer__Notification__createlocation_id",children:n.notification.id?n.notification.id[0]:null}),(0,Ze.jsx)("div",{hidden:!0,name:"ConfigurationContractorsContainer__Notification__createaddress_id",children:n.notification.id?n.notification.id[1]:null})]}),n.createModal.show&&(0,Ze.jsx)(ze.aF,{span:5,size:"md",show:!0,name:"ConfigurationContractorsContainer__Modal--create",dismissable:!0,onDismiss:l,children:(0,Ze.jsx)(pF,{onSuccess:(e,n,t)=>l({message:e,color:n,id:t}),accountId:n.account.id,countryList:a,refetchQuery:[{query:C_,variables:e}]})}),n.updateModal.id&&(0,Ze.jsx)(ze.aF,{size:"md",show:!0,dismissable:!0,onDismiss:l,name:"ConfigurationContractorsContainer__Modal--update",children:(0,Ze.jsx)(vF,{contractorId:n.updateModal.id,contractorName:n.updateModal.name,contractorAddressId:n.updateModal.address&&n.updateModal.address.id,address1:n.updateModal.address&&n.updateModal.address.address1,address2:n.updateModal.address&&n.updateModal.address.address2,address3:n.updateModal.address&&n.updateModal.address.address3,city:n.updateModal.address&&n.updateModal.address.city,postcode:n.updateModal.address&&n.updateModal.address.postcode,phone:n.updateModal.address&&n.updateModal.address.phone1,onDismiss:l,onSuccess:(e,n,t)=>l({message:e,color:n,id:t}),countryList:a,defaultCountry:n.updateModal.address&&{value:n.updateModal.address.country.id,label:n.updateModal.address.country.name}})})]}))(o),f,(0,Ze.jsx)(J_,{totalPagesCount:n.pagination.totalPages,currentPage:n.pagination.page,onChange:e=>{return a=e,void t(OF(OF({},n),{},{pagination:{page:a,totalPages:n.pagination.totalPages}}));var a}})]})};var SF,NF,wF,DF,AF,RF,PF,LF,IF,EF,_F;function FF(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const BF=(0,D.J1)(SF||(SF=FF(["\n  mutation CreateLocation(\n    $locId: ID!\n    $locName: String!\n    $accId: ID!\n    $add1: String\n    $add2: String\n    $add3: String\n    $city: String!\n    $post: String!\n    $phone: String\n    $wasteIn: ID\n    $wasteOut: ID\n    $tags: [ID!]\n    $countryId: ID!\n    $code: String\n    $buildingType: ID\n    $departments: [ID!]\n    $tenure: ID\n    $region: ID\n    $floorSpace: Float\n    $sharedEmissionPercentage: Float\n    $startDate: String\n    $endDate: String\n    $leaseRenewalDate: String\n    $notes: String\n    $description: String\n    $attributes: AWSJSON\n    $enableProject: Boolean\n    $displayOnImpactDashboard: Boolean\n  ) {\n    createLocationWithLocationPoints(\n      input: {\n        id: $locId\n        name: $locName\n        address1: $add1\n        address2: $add2\n        address3: $add3\n        city: $city\n        postcode: $post\n        coordinates: null\n        phone1: $phone\n        countryId: $countryId\n        accountId: $accId\n        wasteInId: $wasteIn\n        wasteOutId: $wasteOut\n        tags: $tags\n        code: $code\n        buildingType: $buildingType\n        departments: $departments\n        tenure: $tenure\n        region: $region\n        floorSpace: $floorSpace\n        sharedEmissionPercentage: $sharedEmissionPercentage\n        startDate: $startDate\n        endDate: $endDate\n        leaseRenewalDate: $leaseRenewalDate\n        notes: $notes\n        description: $description\n        attributes: $attributes\n        enableProject: $enableProject\n        displayOnImpactDashboard: $displayOnImpactDashboard\n      }\n    ) {\n      ...LocationFields\n    }\n  }\n  ","\n"])),nm),UF=(0,D.J1)(NF||(NF=FF(["\n  mutation UpdateLocation(\n    $locId: ID!\n    $locName: String!\n    $accId: ID!\n    $add1: String\n    $add2: String\n    $add3: String\n    $city: String!\n    $post: String!\n    $phone: String\n    $wasteIn: UpdateLocationLocationPointInput\n    $wasteOut: UpdateLocationLocationPointInput\n    $tags: [ID!]\n    $countryId: ID!\n    $code: String\n    $buildingType: ID\n    $departments: [ID!]\n    $tenure: ID\n    $region: ID\n    $floorSpace: Float\n    $sharedEmissionPercentage: Float\n    $startDate: String\n    $endDate: String\n    $leaseRenewalDate: String\n    $notes: String\n    $description: String\n    $attributes: AWSJSON\n    $enableProject: Boolean\n    $displayOnImpactDashboard: Boolean\n  ) {\n    updateLocationWithLocationPoints(\n      input: {\n        id: $locId\n        name: $locName\n        address1: $add1\n        address2: $add2\n        address3: $add3\n        city: $city\n        postcode: $post\n        coordinates: null\n        phone1: $phone\n        countryId: $countryId\n        accountId: $accId\n        wasteIn: $wasteIn\n        wasteOut: $wasteOut\n        tags: $tags\n        code: $code\n        buildingType: $buildingType\n        departments: $departments\n        tenure: $tenure\n        region: $region\n        floorSpace: $floorSpace\n        sharedEmissionPercentage: $sharedEmissionPercentage\n        startDate: $startDate\n        endDate: $endDate\n        leaseRenewalDate: $leaseRenewalDate\n        notes: $notes\n        description: $description\n        attributes: $attributes\n        enableProject: $enableProject\n        displayOnImpactDashboard: $displayOnImpactDashboard\n      }\n    ) {\n      ...LocationFields\n    }\n  }\n  ","\n"])),nm),MF=((0,D.J1)(wF||(wF=FF(["\n  mutation ExportLocations($accountId: ID!) {\n    getLocationExport(accountId: $accountId)\n  }\n"]))),(0,D.J1)(DF||(DF=FF(["\n  query GetLocationById($id: ID!) {\n    getLocationById(id: $id) {\n      ...LocationFields\n    }\n  }\n  ","\n"])),nm)),VF=(0,D.J1)(AF||(AF=FF(["\n  query GetLocationsByAccountId(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getLocationsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        ...LocationFields\n      }\n    }\n  }\n  ","\n"])),nm),zF=(0,D.J1)(RF||(RF=FF(['\n  query getTagsByAccountId($accountId: String!) {\n    getTagsByAccountId(input: { accountId: $accountId, applicationId: "RIO" }) {\n      id\n      tagName\n      isSystemLevelTag\n    }\n  }\n']))),GF=(0,D.J1)(PF||(PF=FF(["\n  query GetLocationsPageFilter($accountId: ID!, $field: String!) {\n    getLocationsPageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"]))),$F=(0,D.J1)(LF||(LF=FF(["\n  mutation UpsertLocations($locations: [UpsertLocationsInput!]!, $accountId: ID!) {\n    upsertLocations(accountId: $accountId, locations: $locations)\n  }\n"]))),WF=(0,D.J1)(IF||(IF=FF(['\n  query GetLocationSelectOptions($accountId: ID!, $accountIdAsString: String!) {\n    getTagsByAccountId(input: { accountId: $accountIdAsString, applicationId: "RIO" }) {\n      value: id\n      label: tagName\n    }\n    getAccountInfo(id: $accountId) {\n      departments {\n        value: id\n        label: name\n      }\n    }\n    getAllCountries {\n      value: id\n      label: name\n    }\n    getLocationMetadataOptionsForAccount(accountId: $accountId) {\n      tenures {\n        value: id\n        label: name\n      }\n      buildingTypes {\n        value: id\n        label: name\n      }\n      regions {\n        value: id\n        label: name\n      }\n    }\n  }\n']))),qF=(0,D.J1)(EF||(EF=FF(["\n  query GetAllLocationIds($accountId: ID!, $limit: Int, $offset: Int) {\n    getLocationsPage(accountId: $accountId, limit: $limit, offset: $offset) {\n      rows {\n        id\n        name\n      }\n      totalRows\n    }\n  }\n"]))),JF=(0,D.J1)(_F||(_F=FF(["\n  mutation UploadLocationPicture($input: UploadLocationPictureInput!) {\n    uploadLocationPicture(input: $input)\n  }\n"])));var YF;const HF=(0,Ge.default)(ze.fI)(YF||(YF=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n  justify-content: flex-end;\n  align-items: center;\n  *:not(:last-child) {\n    margin-right: ",";\n  }\n"])),e=>e.theme.geometry.xs.spacing);var KF,QF;function ZF(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const XF=(0,D.J1)(KF||(KF=ZF(["\n  query GetLocationMetaOptions($accountId: ID!) {\n    getLocationMetadataOptionsForAccount(accountId: $accountId) {\n      tenures {\n        id\n        name\n      }\n      regions {\n        id\n        name\n      }\n      buildingTypes {\n        id\n        name\n      }\n    }\n  }\n"]))),eB=(0,D.J1)(QF||(QF=ZF(["\n  mutation CreateLocationMetaOption($id: ID!, $accountId: ID!, $name: String!, $type: LocationMetadataOptionType!) {\n    createLocationMetadataOption(input: { id: $id, accountId: $accountId, name: $name, type: $type })\n  }\n"]))),nB="TENURE",tB="REGION",aB="BUILDINGTYPE";var rB,iB,oB,lB,sB,cB,dB;function uB(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const pB=Ge.default.form(rB||(rB=uB(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),mB=(0,Ge.default)(ze.JU)(iB||(iB=uB(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),fB=Ge.default.div(oB||(oB=uB(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),yB=(0,Ge.default)(ze.DZ)(lB||(lB=uB(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),gB=(0,Ge.default)(ze.fv)(sB||(sB=uB(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),bB=(0,Ge.default)(ze.fI)(cB||(cB=uB(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.xs.spacing),hB=(0,Ge.default)(ze.fv)(dB||(dB=uB(["\n  padding: 0 ",";\n"])),e=>e.theme.geometry.xs.spacing),vB=e=>{switch(e){case tB:return"regions";case aB:return"buildingTypes";default:return"tenures"}},xB=e=>{let{optionType:n=nB,accountId:t,selectedOption:a,setSelectedOption:r}=e;const[i,o]=(0,g.useState)(!1),[l,s]=(0,g.useState)(""),{showNotification:c}=vt(),d=rt(),[u]=(0,Ot.n)(eB,{onCompleted:()=>{o(!1),s(""),c("Option has been created.")},onError:()=>{c("Something went wrong please try again later.","danger")}}),{data:p}=(0,h.IT)(XF,{variables:{accountId:t||d}}),m=[...(null==p?void 0:p.getLocationMetadataOptionsForAccount[vB(n)])||[]];return m.find(e=>"NEW"===e.id)||(m.unshift({name:"Not Specified",id:null}),m.unshift({name:"Create New...",id:"NEW"})),(0,Ze.jsxs)(Ze.Fragment,{children:[i&&(0,Ze.jsx)(ze.aF,{show:!0,size:"sm",onDismiss:()=>o(!1),span:6,height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(pB,{children:[(0,Ze.jsx)(yB,{size:"lg",children:"Create Option"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(gB,{item:!0,children:[(0,Ze.jsx)(fB,{children:(0,Ze.jsx)(mB,{children:"Name (Required)"})}),(0,Ze.jsx)(ze.ks,{onChange:e=>s(e.target.value),name:"name",value:l,box:!0})]})}),(0,Ze.jsxs)(bB,{container:!0,children:[(0,Ze.jsx)(hB,{container:!0,item:!0,children:(0,Ze.jsx)(ze.$n,{color:"info",onClick:()=>o(!1),children:"Cancel"})}),(0,Ze.jsx)(hB,{container:!0,item:!0,children:(0,Ze.jsx)(ze.$n,{type:"button",onClick:()=>(()=>{if(l){const e=(0,Ai.A)();u({variables:{id:e,accountId:t||d,name:l,type:n},refetchQueries:["GetLocationMetaOptions"]}),r(e)}else c("Name is a required field.","danger")})(),children:"Create"})})]})]})}),(0,Ze.jsx)(ze.l6,{options:m.map(e=>({label:e.name,value:e.id})),value:a,onChange:e=>(e=>{"NEW"===e.target.value?o(!0):r(e.target.value)})(e)})]})};function TB(){const[e,n]=(0,g.useState)(!0),t=(0,g.useRef)({}),{showNotification:a}=vt(),r=function(){const e=Ed({query:ky(),request:{accountId:rt()},response:"getLocationsPage"});return(0,g.useCallback)(async()=>(await e()).map(e=>({id:e.id,code:e.code||""})),[e])}();(0,g.useEffect)(()=>{r().then(e=>{t.current=e.reduce((e,n)=>(e[n.code]=n.id,e),{}),n(!1)}).catch(()=>{a("Error fetching location codes to validate your input","danger"),n(!1)})},[]);const i=(0,g.useCallback)(e=>{const n={};for(const t of e){const e=t.locationCode;e&&(n[e]?n[e]++:n[e]=1)}const a=new Set;for(const r of e){const e=r.locationCode,i=r.id;if(e&&n[e]&&n[e]>1){a.add(e);continue}const o=Boolean(t.current[e]),l=t.current[e]!==i;e&&o&&l&&a.add(e)}return Array.from(a).sort((e,n)=>e.localeCompare(n))},[]);return{isLoading:e,validateLocationCodeInDromoRows:(0,g.useCallback)(e=>e.map(e=>{const n=(0,zt.cloneDeep)(e),a=n.row.locationCode.value,r=n.row.id.value,i=Boolean(t.current[a]),o=t.current[a]!==r;return a&&i&&o?(n.row.locationCode.info=[{message:(l=a,"Location codes are usually unique but ".concat(l," already exists in the database. After the upload there will be multiple locations with the same code.")),level:"warning"}],n):(n.row.locationCode.info=[],n);var l}),[]),getDuplicateLocationCodes:i}}var OB,kB,jB;function CB(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function SB(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?CB(Object(t),!0).forEach(function(n){NB(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):CB(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function NB(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function wB(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const DB=(0,Ge.default)(ze.fv)(OB||(OB=wB(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),AB=(0,Ge.default)(ze.JU)(kB||(kB=wB(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),RB=Ge.default.div(jB||(jB=wB(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),PB=e=>{let{accountId:n,selectedOptions:t={},setSelectedOptions:a=()=>{},locationId:r}=e;const i=Od(n),o=rc(),{departmentMultipleSelect:l,showCreateDepartment:s,setShowCreateDepartment:c}=Cu(null==i?void 0:i.departments,t.departments),{getDuplicateLocationCodes:d,isLoading:u}=TB(),p=(0,g.useMemo)(()=>d([{locationCode:(t.code||"").trim(),id:r}]).length>0,[d,t.code,r]),m=[Vt.gG.Sysadmin,Vt.gG.Businessadmin,Vt.gG.Consultant].includes(o.role);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Location Code (Location ID / ePIM) (Optional)"})}),(0,Ze.jsx)(ze.ks,{onChange:e=>a(SB(SB({},t),{},{code:e.target.value})),value:t.code,box:!0}),u?(0,Ze.jsx)(ze.EY,{children:"Loading location codes for validation..."}):null,!u&&p&&(0,Ze.jsx)(ze.EY,{color:"warning",children:"Warning: This location code is already configured for another location (it is still possible to use it regardless of this warning)"}),!u&&!p&&t.code&&(0,Ze.jsx)(ze.EY,{color:"success",children:"This location code is not used by another location"})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Departments (Optional)"})}),l(e=>{a(SB(SB({},t),{},{departments:e.target.select.map(e=>({id:e.value,name:e.label}))}))})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Tenure (Optional)"})}),(0,Ze.jsx)(xB,{accountId:n,optionType:nB,selectedOption:t.tenure,setSelectedOption:e=>a(SB(SB({},t),{},{tenure:e}))})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Region (Optional)"})}),(0,Ze.jsx)(xB,{accountId:n,optionType:tB,selectedOption:t.region,setSelectedOption:e=>a(SB(SB({},t),{},{region:e}))})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Building Type (Optional)"})}),(0,Ze.jsx)(xB,{accountId:n,optionType:aB,selectedOption:t.buildingType,setSelectedOption:e=>a(SB(SB({},t),{},{buildingType:e}))})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Floor Space (Square Meters) (Optional)"})}),(0,Ze.jsx)(ze.ks,{onChange:e=>a(SB(SB({},t),{},{floorSpace:e.target.value})),type:"number",min:"0",value:t.floorSpace,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Occupation Start Date (Optional)"})}),(0,Ze.jsx)(ze.lr,{onDayClick:e=>a(SB(SB({},t),{},{startDate:e||null})),name:"startDate",selectedDate:t.startDate?new Date(t.startDate):t.startDate,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Occupation End Date (Optional)"})}),(0,Ze.jsx)(ze.lr,{onDayClick:e=>a(SB(SB({},t),{},{endDate:e||null})),name:"endDate",selectedDate:t.endDate?new Date(t.endDate):t.endDate,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Lease Renewal Date (Optional)"})}),(0,Ze.jsx)(ze.lr,{onDayClick:e=>a(SB(SB({},t),{},{leaseRenewalDate:e||null})),name:"leaseDate",selectedDate:t.leaseRenewalDate?new Date(t.leaseRenewalDate):t.leaseRenewalDate,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsxs)(RB,{children:[(0,Ze.jsx)(AB,{children:"Shared Emission Percentage (Optional)"}),(0,Ze.jsx)(zP.A,{title:"Use this field if emissions generated from this locations are shared with another organisation. The percentage entered will be what you are responsible for. This doesn't apply to the Transport, Hotel Stays/Homeworking or Financed Emission utilities.",children:(0,Ze.jsx)(f.Icons.InfoOutlined,{color:"info"})})]}),(0,Ze.jsx)(ze.ks,{onChange:e=>{const n=""===e.target.value?null:parseFloat(e.target.value);a(SB(SB({},t),{},{sharedEmissionPercentage:n}))},type:"number",min:"0",max:"100",step:".01",value:null===t.sharedEmissionPercentage||void 0===t.sharedEmissionPercentage?"":t.sharedEmissionPercentage,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Notes (Optional)"})}),(0,Ze.jsx)(ze.fs,{onChange:e=>a(SB(SB({},t),{},{notes:e.target.value})),value:t.notes,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(DB,{item:!0,children:[(0,Ze.jsx)(RB,{children:(0,Ze.jsx)(AB,{children:"Description (Optional) (Appears on projects map - max 5 lines of text)"})}),(0,Ze.jsx)(ze.fs,{onChange:e=>a(SB(SB({},t),{},{description:e.target.value})),value:t.description,box:!0})]})}),(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsxs)(DB,{container:!0,item:!0,span:6,children:[(0,Ze.jsx)(AB,{children:"Enable Project Page Button"}),(0,Ze.jsx)(ze.Sc,{name:"enableProject",onChange:e=>a(SB(SB({},t),{},{enableProject:e.target.checked})),checked:t.enableProject})]})}),m&&(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsxs)(DB,{container:!0,item:!0,span:6,children:[(0,Ze.jsx)(AB,{children:"Display on impact dashboard"}),(0,Ze.jsx)(ze.Sc,{name:"displayOnImpactDashboard",onChange:e=>a(SB(SB({},t),{},{displayOnImpactDashboard:e.target.checked})),checked:t.displayOnImpactDashboard})]})}),(0,Ze.jsx)(RA,{showCreateDepartment:s,setShowCreateDepartment:c,passedAccountId:n,onComplete:()=>{}})]})},LB=(e,n)=>""===e.trim()?"".concat(n," cannot be empty."):null,IB=e=>e.map(e=>e.value),EB=(e,n)=>e&&!n?{id:(0,Ai.A)(),operation:"CREATE"}:!e&&n?{id:n,operation:"DELETE"}:null;var _B=t(82946),FB=t(6131),BB=t(35429);function UB(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function MB(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?UB(Object(t),!0).forEach(function(n){VB(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):UB(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function VB(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const zB=(0,Ge.default)(e=>(0,Ze.jsx)(TL.A,MB(MB({},e),{},{disableGutters:!0,elevation:0,square:!0})))(e=>{let{theme:n}=e;return{border:"".concat(n.geometry.md.border," solid ").concat(n.colors.inputs.normal.background),borderRadius:"7.5px",marginTop:n.geometry.sm.spacing,marginBottom:n.geometry.sm.spacing,"&::before":{display:"none"}}}),GB=(0,Ge.default)(ze.JU)(e=>{let{theme:n}=e;return{fontWeight:n.fonts.weight.bold}}),$B=(0,Ge.default)(ze.JU)(e=>{let{theme:n}=e;return{marginBottom:n.geometry.xs.spacing}}),WB=(0,Ge.default)(ze.fI)(e=>{let{theme:n}=e;return{marginBottom:n.geometry.sm.spacing}}),qB=(0,Ge.default)("div")(e=>{let{theme:n}=e;return{display:"flex",alignItems:"start",marginBottom:n.geometry.sm.spacing}}),JB=(0,Ge.default)(_B.A)(e=>{let{theme:n}=e;return{marginLeft:"".concat(n.geometry.xxs.spacing," !important"),marginTop:"15px!important"}}),YB=(0,Ge.default)(BB.default)({width:"18px !important",height:"18px !important"}),HB=(0,Ge.default)(ze.ks)(e=>{let{theme:n}=e;return{marginRight:n.geometry.xxs.spacing}}),KB=()=>({id:(0,Ai.A)(),name:"",value:""});function QB(e){let{attributes:n,onChange:t,onRemove:a,onTouch:r,errors:i}=e;const o=null!=n&&n.length?n:[KB()],[l,s]=(0,g.useState)(!1);(0,g.useEffect)(()=>{null!=i&&i.length&&s(!0)},[i]);const c=(e,n,a)=>{t(o.map(t=>t.id===a.id?MB(MB({},a),{},{[n]:e}):t)),r(a,n)},d=o.length>1||""!==o[0].name,u=(e,n)=>{var t;return null==i||null===(t=i.find(t=>t.id===e&&t.field===n))||void 0===t?void 0:t.message};return(0,Ze.jsxs)(zB,{onChange:()=>s(!l),expanded:l,children:[(0,Ze.jsx)(OL.A,{expandIcon:(0,Ze.jsx)(FB.A,{}),children:(0,Ze.jsx)(GB,{children:"Add advanced details"})}),(0,Ze.jsxs)(kL.A,{children:[(0,Ze.jsx)(WB,{container:!0,children:(0,Ze.jsxs)(ze.fv,{item:!0,children:[(0,Ze.jsx)($B,{children:"Custom attributes"}),o.map(e=>(0,Ze.jsxs)(qB,{children:[(0,Ze.jsx)(HB,{placeholder:"Name",value:e.name,error:u(e.id,"name"),box:!0,onChange:n=>c(n.target.value,"name",e)}),(0,Ze.jsx)(ze.ks,{placeholder:"Value",value:e.value,error:u(e.id,"value"),box:!0,onChange:n=>c(n.target.value,"value",e)}),(0,Ze.jsx)(JB,{size:"small",disabled:!d,onClick:()=>{return n=e,1===o.length?t([KB()]):t(o.filter(e=>e.id!==n.id)),void a(n);var n},children:(0,Ze.jsx)(YB,{})})]},e.id))]})}),(0,Ze.jsx)(ze.$n,{type:"button",outline:!0,size:"sm",onClick:()=>{t([...o,KB()])},children:"Add new attribute"})]})]})}function ZB(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function XB(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ZB(Object(t),!0).forEach(function(n){eU(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ZB(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function eU(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const nU=e=>""===e.trim();function tU(e){return nU(e)?"must not be blank":e.length>50?"must not exceed 50 chars":/^[a-zA-Z0-9 _-]+$/.test(e)?void 0:"can only include letters, digits, spaces, underscores (_), and dashes (-)"}function aU(e){if(nU(e))return"must not be blank"}function rU(e){const[n,t]=(0,g.useState)(()=>(e=>e?Object.entries(JSON.parse(e)).map(e=>{let[n,t]=e;return{id:n,name:n,value:t}}):[])(e)),[a,r]=(0,g.useState)([]),i=(e,n)=>{let{id:t}=e;return r(null==a?void 0:a.filter(e=>!(e.id===t&&(!n||e.field===n))))};return{attributesHandler:{attributes:n,errors:a,onChange:t,onRemove:i,onTouch:i},validateAttributes:(0,g.useCallback)(()=>{const e=[],t=n.filter(e=>{let{name:n,value:t}=e;return!nU(n)||!nU(t)});for(const{id:n,name:a,value:r}of t){const t=tU(a);t&&e.push({id:n,field:"name",message:t});const i=aU(r);i&&e.push({id:n,field:"value",message:i})}if(0===e.length){const n=[];for(const{id:a,name:r}of t){const t=r.trim().toLowerCase();n.includes(t)?e.push({id:a,field:"name",message:"It's already defined"}):n.push(t)}}return r(e),0===e.length},[n]),prepareAttributes:(0,g.useCallback)(()=>JSON.stringify(n.reduce((e,n)=>{let{name:t,value:a}=n;return t=t.trim(),a=a.trim(),""===t?e:XB(XB({},e),{},{[t]:a})},{})),[n])}}var iU,oU,lU,sU,cU,dU;function uU(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pU(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uU(Object(t),!0).forEach(function(n){mU(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uU(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mU(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function fU(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yU=Ge.default.div(iU||(iU=fU(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),gU=(0,Ge.default)(ze.fv)(oU||(oU=fU(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),bU=(0,Ge.default)(ze.JU)(lU||(lU=fU(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),hU=Ge.default.div(sU||(sU=fU(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),vU=(0,Ge.default)(ze.DZ)(cU||(cU=fU(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),xU=Ge.default.div(dU||(dU=fU(["\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.md.spacing),TU=uv(e=>{const{accountId:n,onSuccess:t,refreshGrid:a,onUpdate:r,showModal:i,locationPoints:o={wasteOut:!1,wasteIn:!1}}=e,{countryList:l,defaultCountry:s}=ku(),c={hasError:!1,isSuccess:!1,values:{locationId:{text:(0,Ai.A)()},locationName:{text:"",error:""},address1:{text:"",error:""},address2:{text:"",error:""},address3:{text:"",error:""},city:{text:"",error:""},postcode:{text:"",error:""},phone:{text:"",error:""},selectCountry:null,locationPoints:{wasteOut:{checked:(0,zt.get)(o,"wasteOut",!1)},wasteIn:{checked:(0,zt.get)(o,"wasteIn",!1)}},tags:[],aliases:[]},notification:{message:"",color:"success",id:null},isSubmitted:!1},[d,u]=(0,g.useState)(c),[p,m]=(0,g.useState)({code:"",tenure:null,region:null,buildingType:null,floorSpace:null,startDate:null,endDate:null,leaseRenewalDate:null,notes:"",description:"",departments:[],sharedEmissionPercentage:null,enableProject:!1,displayOnImpactDashboard:!0}),f=e=>{e.persist(),u(n=>pU(pU({},n),{},{values:pU(pU({},n.values),{},{[e.target.name]:{text:e.target.value,error:null}})}))},y=e=>{u(n=>pU(pU({},n),{},{values:pU(pU({},d.values),{},{locationPoints:pU(pU({},d.values.locationPoints),{},{[e.target.name]:{checked:e.target.checked}})})}))},{loading:b,error:v,data:x}=(0,h.IT)(zF,{variables:{accountId:n}}),T=b||v?[]:x.getTagsByAccountId.map(e=>({label:e.tagName,value:e.id})),O=!((0,zt.get)(o,"wasteIn",!1)||(0,zt.get)(o,"wasteOut",!1)),[k]=(0,Ot.n)(BF,{onError:e=>{u(n=>pU(pU({},n),{},{notification:{message:"Something went wrong: ".concat(e.message,". If the problem persists, contact support."),color:"danger"},hasError:!0,isSuccess:!1,isSubmitted:!1}))},onCompleted:e=>{u(n=>pU(pU({},n),{},{createdAccountId:e.createLocationWithLocationPoints.id})),t("The location ".concat(e.createLocationWithLocationPoints.name," has been created!"),"success",i?e.createLocationWithLocationPoints.id:[e.createLocationWithLocationPoints.id,e.createLocationWithLocationPoints.address.id],e.createLocationWithLocationPoints),a()},update:(e,n)=>{r&&r(e,n)}}),{attributesHandler:j,validateAttributes:C,prepareAttributes:S}=rU(),N=(0,g.useCallback)(e=>{var t;e.preventDefault();const{values:{locationName:a,address1:r,city:i,postcode:o,phone:l}}=d,c=LB(a.text,"Location Name"),m=LB(r.text,"Address 1"),f=LB(i.text,"City"),y=LB(o.text,"Postcode")||((0,LA.isPostalCode)(o.text,"any")?null:"Please enter a valid postcode."),g=l.text?nF(l.text)?null:"Please enter a valid phone number using only characters 0 - 9":null,b=C();c||m||f||y||g||!b?u(e=>pU(pU({},e),{},{values:pU(pU({},e.values),{},{locationName:pU(pU({},e.values.locationName),{},{error:c}),address1:pU(pU({},e.values.address1),{},{error:m}),city:pU(pU({},e.values.city),{},{error:f}),postcode:pU(pU({},e.values.postcode),{},{error:y}),phone:pU(pU({},e.values.phone),{},{error:g})})})):(k({variables:pU(pU({locId:(0,Ai.A)(),locName:d.values.locationName.text,accId:n,add1:d.values.address1.text||null,add2:d.values.address2.text||null,add3:d.values.address3.text||null,city:d.values.city.text,post:d.values.postcode.text,phone:d.values.phone.text?d.values.phone.text.trim():null,wasteOut:d.values.locationPoints.wasteOut.checked?(0,Ai.A)():null,wasteIn:d.values.locationPoints.wasteIn.checked?(0,Ai.A)():null,tags:IB(d.values.tags),aliases:IB(d.values.tags),countryId:(null===(t=d.values.selectCountry)||void 0===t?void 0:t.value)||s.value},p),{},{departments:(null==p?void 0:p.departments.map(e=>e.id))||[],startDate:zi(null==p?void 0:p.startDate),endDate:zi(null==p?void 0:p.endDate),leaseRenewalDate:zi(null==p?void 0:p.leaseRenewalDate),attributes:S()})}),u(e=>pU(pU({},e),{},{isSubmitted:!0})))},[n,null==s?void 0:s.value,p,d,k,C,S]);return(0,Ze.jsxs)(yU,{name:"create-location",children:[d.notification.message&&(0,Ze.jsx)(ze.Eg,{name:"create-location__notification",LocationId:d.createdAccountId,show:!0,color:d.notification.color,onClose:()=>{u(e=>pU(pU({},e),{},{notification:{message:null,color:null}}))},children:d.notification.message}),(0,Ze.jsxs)("form",{name:"create-location__form",children:[(0,Ze.jsx)(vU,{name:"create-location__heading",size:"lg",children:"Add New Location"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(gU,{item:!0,children:[(0,Ze.jsx)(hU,{children:(0,Ze.jsx)(bU,{children:"Location Name"})}),(0,Ze.jsx)(ze.ks,{disabled:d.isSubmitted,onChange:f,value:d.values.locationName.text,error:d.values.locationName.error,name:"locationName",box:!0})]})}),(0,Ze.jsx)(oF,{id:"LocationAddressPropertySheet",name:"LocationAddressPropertySheet",address1:d.values.address1,address2:d.values.address2,address3:d.values.address3,city:d.values.city,postcode:d.values.postcode,phone:d.values.phone,handleChange:f,handleSelectChange:e=>{u(n=>pU(pU({},n),{},{values:pU(pU({},n.values),{},{[e.target.name]:{value:e.target.select.value,label:e.target.select.label}})}))},disabled:d.isSubmitted,countryList:l||[],selectCountry:d.values.selectCountry||s}),O&&(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(gU,{container:!0,item:!0,span:6,children:[(0,Ze.jsx)(bU,{id:"create-location-wasteout-label",name:"create-location-wasteout-label",children:"Waste Out"}),(0,Ze.jsx)(ze.Sc,{disabled:d.isSubmitted,id:"create-location-wasteout",name:"wasteOut",onChange:y,checked:d.values.locationPoints.wasteOut.checked})]}),(0,Ze.jsxs)(gU,{container:!0,item:!0,span:6,children:[(0,Ze.jsx)(bU,{id:"create-location-wastein-label",name:"create-location-wastein-label",children:"Waste In"}),(0,Ze.jsx)(ze.Sc,{disabled:d.isSubmitted,id:"create-location-wastein",name:"wasteIn",onChange:y,checked:d.values.locationPoints.wasteIn.checked})]})]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(gU,{container:!0,item:!0,span:12,children:(0,Ze.jsxs)(bU,{id:"create-location-tags-label",name:"create-location-tags-label",children:["Tags (Optional)",v?(0,Ze.jsx)(ze.Kw,{error:v,children:e=>{let{icon:n}=e;return(0,Ze.jsx)(xU,{children:(0,Ze.jsx)(ze.Wz,{name:"location-tag__error",icon:n,title:"Tags failed to load"})})}}):(0,Ze.jsx)(ze.KF,{id:"create-location-tag-multiselection",name:"create-location-tag-multiselection",pill:!1,isLoading:b,components:{LoadingIndicator:()=>(0,Ze.jsx)(ze.Ip,{name:"tag-location-Loading",size:"xxs"})},onChange:e=>{const n=e.target.select;u(e=>pU(pU({},e),{},{values:pU(pU({},e.values),{},{tags:n})}))},isDisabled:b||v,multiValueColor:"tertiary",options:T,value:d.values.tags})]})})}),(0,Ze.jsx)(PB,{accountId:n,selectedOptions:p,setSelectedOptions:m}),(0,Ze.jsx)(QB,pU({},j)),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(gU,{item:!0,children:(0,Ze.jsx)(ze.$n,{name:"create-location--create",color:"success",type:"button",onClick:N,disabled:!d.values.locationName.text||d.isSubmitted,children:"Create Location"})})})]})]})});var OU,kU,jU,CU,SU,NU,wU;function DU(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function AU(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?DU(Object(t),!0).forEach(function(n){RU(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):DU(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function RU(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function PU(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const LU=Ge.default.div(OU||(OU=PU(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),IU=(0,Ge.default)(ze.fv)(kU||(kU=PU(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),EU=(0,Ge.default)("p")(jU||(jU=PU(["\n  width: fit-content;\n"]))),_U=(0,Ge.default)(ze.JU)(CU||(CU=PU(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),FU=Ge.default.div(SU||(SU=PU(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),BU=(0,Ge.default)(ze.DZ)(NU||(NU=PU(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),UU=Ge.default.div(wU||(wU=PU(["\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.md.spacing),MU=uv(function(e){var n,t,a,r,i,o;let{locationId:l,accountId:s,name:c,add1:d,add2:u,add3:p,city:m,postcode:f,phone:y,wasteIn:b,wasteOut:v,tags:x,onSuccess:T,refreshGrid:O,countryList:k,defaultCountry:j,metadata:C,attributes:S}=e;const N={hasError:!1,isSuccess:!1,values:{locationName:{text:c||"",error:""},address1:{text:d||"",error:""},address2:{text:u||"",error:""},address3:{text:p||"",error:""},city:{text:m||"",error:""},postcode:{text:f||"",error:""},phone:{text:y||"",error:""},locationPoints:{wasteIn:{initialCheck:!!b,checked:!!b,id:b},wasteOut:{initialCheck:!!v,checked:!!v,id:v}},tags:x.map(e=>({value:e.id,label:e.tagName})),aliases:x.map(e=>({value:e.id,label:e.tagName})),selectCountry:{value:j.id,label:j.name}},notification:{message:"",color:"success",id:null},isSubmitted:!1},[w,D]=(0,g.useState)(N),{attributesHandler:A,validateAttributes:R,prepareAttributes:P}=rU(S),L=e=>{const n=e.target.name,t=e.target.value;D(e=>AU(AU({},e),{},{values:AU(AU({},w.values),{},{[n]:{text:t,error:null}})}))},[I,E]=(0,g.useState)({code:(null==C?void 0:C.code)||"",tenure:(null==C||null===(n=C.tenure)||void 0===n?void 0:n.id)||null,region:(null==C||null===(t=C.region)||void 0===t?void 0:t.id)||null,buildingType:(null==C||null===(a=C.buildingType)||void 0===a?void 0:a.id)||null,floorSpace:(null==C?void 0:C.floorSpace)||null,startDate:(null==C?void 0:C.startDate)||null,endDate:(null==C?void 0:C.endDate)||null,leaseRenewalDate:(null==C?void 0:C.leaseRenewalDate)||null,notes:(null==C?void 0:C.notes)||"",description:(null==C?void 0:C.description)||"",departments:(null==C?void 0:C.departments)||[],sharedEmissionPercentage:null!==(r=null==C?void 0:C.sharedEmissionPercentage)&&void 0!==r?r:null,enableProject:null!==(i=null==C?void 0:C.enableProject)&&void 0!==i&&i,displayOnImpactDashboard:null===(o=null==C?void 0:C.displayOnImpactDashboard)||void 0===o||o}),_=e=>{const n=e.target.name;D(e=>AU(AU({},e),{},{values:AU(AU({},e.values),{},{locationPoints:AU(AU({},e.values.locationPoints),{},{[n]:AU(AU({},e.values.locationPoints[n]),{},{checked:!e.values.locationPoints[n].checked})})})}))},{loading:F,error:B,data:U}=(0,h.IT)(zF,{variables:{accountId:s}}),M=F||B?[]:U.getTagsByAccountId.map(e=>({label:e.tagName,value:e.id})),[V]=(0,Ot.n)(UF,{onError:e=>{const n=e.toString().includes("Name_AccountID_UNIQUE")?"The location name should be unique.":"Something went wrong: ".concat(e.message);D(e=>AU(AU({},e),{},{notification:{message:"".concat(n," If the problem persists, contact support."),color:"danger"},hasError:!0,isSuccess:!1,isSubmitted:!1}))},onCompleted:e=>{T("The location ".concat(e.updateLocationWithLocationPoints.name," has been updated!"),"success",null),O()}});return(0,Ze.jsxs)(LU,{name:"update-account",children:[w.notification.message&&(0,Ze.jsx)(ze.Eg,{name:"update-location__notification",show:!0,color:w.notification.color,onClose:()=>{D(e=>AU(AU({},e),{},{notification:{message:null,color:null}}))},children:w.notification.message}),(0,Ze.jsxs)("form",{name:"update-location__form",onSubmit:e=>{((e,n)=>{e.preventDefault();const t=w.values;t.locationName.error=LB(t.locationName.text,"Location Name"),t.address1.error=LB(t.address1.text,"Address 1"),t.city.error=LB(t.city.text,"City"),t.postcode.error=LB(t.postcode.text,"Postcode")||((0,LA.isPostalCode)(t.postcode.text,"any")?null:"Please enter a valid postcode."),t.phone.error=t.phone.text?nF(t.phone.text)?null:"Please enter a valid phone number using only characters 0 - 9":null;const a=R();t.locationName.error||t.address1.error||t.city.error||t.postcode.error||t.phone.error||!a?D(e=>AU(AU({},e),{},{values:t})):(n({variables:AU(AU({locId:l,locName:w.values.locationName.text,accId:s,add1:w.values.address1.text||null,add2:w.values.address2.text||null,add3:w.values.address3.text||null,city:w.values.city.text,post:w.values.postcode.text,phone:w.values.phone.text?w.values.phone.text.trim():null,wasteOut:EB(w.values.locationPoints.wasteOut.checked,w.values.locationPoints.wasteOut.id),wasteIn:EB(w.values.locationPoints.wasteIn.checked,w.values.locationPoints.wasteIn.id),tags:IB(w.values.tags),aliases:IB(w.values.tags),countryId:w.values.selectCountry.value},I),{},{departments:(null==I?void 0:I.departments.map(e=>e.id))||[],startDate:zi(null==I?void 0:I.startDate),endDate:zi(null==I?void 0:I.endDate),leaseRenewalDate:zi(null==I?void 0:I.leaseRenewalDate),attributes:P()})}),D(e=>AU(AU({},e),{},{isSubmitted:!0})))})(e,V)},children:[(0,Ze.jsx)(BU,{name:"update-location__heading",size:"lg",children:"Update Location"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(IU,{item:!0,children:[(0,Ze.jsx)(FU,{children:(0,Ze.jsx)(_U,{children:"Location Name"})}),(0,Ze.jsx)(ze.ks,{disabled:w.isSubmitted,onChange:L,value:w.values.locationName.text,error:w.values.locationName.error,name:"locationName",box:!0})]})}),(0,Ze.jsx)(oF,{id:"LocationAddressPropertySheet",name:"LocationAddressPropertySheet",address1:w.values.address1,address2:w.values.address2,address3:w.values.address3,city:w.values.city,postcode:w.values.postcode,phone:w.values.phone,handleChange:L,handleSelectChange:e=>{D(n=>AU(AU({},n),{},{values:AU(AU({},w.values),{},{[e.target.name]:{value:e.target.select.value,label:e.target.select.label}})}))},disabled:w.isSubmitted,countryList:k,selectCountry:w.values.selectCountry}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(IU,{container:!0,item:!0,span:6,children:[(0,Ze.jsx)(_U,{id:"update-location-wasteout-label",name:"update-location-wasteout-label",children:"Waste Out"}),(0,Ze.jsx)(zP.A,{placement:"right-end",title:"Waste Out can not be removed",open:w.values.locationPoints.wasteOut.initialCheck,disableHoverListener:!0,children:(0,Ze.jsx)(EU,{children:(0,Ze.jsx)(ze.Sc,{id:"update-location-wasteout",name:"wasteOut",onChange:_,checked:w.values.locationPoints.wasteOut.checked,disabled:w.values.locationPoints.wasteOut.initialCheck})})})]}),(0,Ze.jsxs)(IU,{container:!0,item:!0,span:6,children:[(0,Ze.jsx)(_U,{id:"update-location-wastein-label",name:"update-location-wastein-label",children:"Waste In"}),(0,Ze.jsx)(zP.A,{placement:"right-end",title:"Waste In can not be removed",open:w.values.locationPoints.wasteIn.initialCheck,disableHoverListener:!0,children:(0,Ze.jsx)(EU,{children:(0,Ze.jsx)(ze.Sc,{id:"update-location-wastein",name:"wasteIn",onChange:_,checked:w.values.locationPoints.wasteIn.checked,disabled:w.values.locationPoints.wasteIn.initialCheck})})})]})]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(IU,{container:!0,item:!0,span:12,children:(0,Ze.jsxs)(_U,{id:"update-location-tags-label",name:"update-location-tags-label",children:["Tags (Optional)",B?(0,Ze.jsx)(ze.Kw,{error:B,children:e=>{let{icon:n}=e;return(0,Ze.jsx)(UU,{children:(0,Ze.jsx)(ze.Wz,{name:"location-tag__error",icon:n,title:"Tags failed to load"})})}}):(0,Ze.jsx)(ze.KF,{name:"update-location-tag-multiselection",id:"update-location-tag-multiselection",pill:!1,isLoading:F,components:{LoadingIndicator:()=>(0,Ze.jsx)(ze.Ip,{name:"tag-location-Loading",size:"xxs"})},onChange:e=>{const n=e.target.select;D(e=>AU(AU({},e),{},{values:AU(AU({},e.values),{},{tags:n})}))},isDisabled:F||B,multiValueColor:"tertiary",value:w.values.tags,options:M})]})})}),(0,Ze.jsx)(PB,{accountId:s,selectedOptions:I,setSelectedOptions:E,locationId:l}),(0,Ze.jsx)(QB,AU({},A)),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(IU,{item:!0,children:(0,Ze.jsx)(ze.$n,{name:"update-location--create",color:"success",submit:!0,disabled:!w.values.locationName.text||w.isSubmitted,children:"Update Location"})})})]})]})});var VU=t(18482),zU=t(8716),GU=t.n(zU);const $U=e=>'<div><p>Please click the link to download a template for this upload, including a separate tab for guidance.</p> <a style="text-decoration: underline" href='.concat(e," download>Template Link</a></div>"),WU={fields:[],settings:{developmentMode:"Develop"===kn("REACT_APP_ENVIRONMENT_NAME"),importIdentifier:"",allowCustomFields:!1,invalidDataBehavior:"BLOCK_SUBMIT",backendSyncMode:"FULL_DATA",autoMapHeaders:!0,manualInputDisabled:!1,displayEncoding:!1,matchValuesStep:{maxMappableSelectValues:1e3},uploadStep:{helpText:"Please click the link to download a template for this upload, including a separate tab for guidance."},reviewStep:{processingText:"We're currently processing your data upload now and hope to be complete shortly",enableUserTransformations:!0},styleOverrides:{global:{primaryTextColor:"#394B59",secondaryTextColor:"#667D8D"},primaryButton:{textColor:"#FFFFFF",backgroundColor:"#2E3EFF",borderRadius:"1000000px"},secondaryButton:{textColor:"#FFFFFF",backgroundColor:"#46464F",borderRadius:"1000000px"}}},style:{backgroundColor:"#0094c9",borderColor:"#0094c9",borderRadius:"32px",borderStyle:"solid",borderWidth:"1px",boxSizing:"border-box",color:"#ffffff",cursor:"pointer",display:"inline-block",fontFamily:'"Proxima Nova", Helvetica, Arial, sans-serif',fontSize:"16px",fontWeight:400,lineHeight:"1.4em",marginLeft:"16px",opacity:1,padding:"16px 24px",textAlign:"center",textDecoration:"none",width:"auto"},schemaIds:{dev:"",qa:"",uat:"",live:""}};function qU(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function JU(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qU(Object(t),!0).forEach(function(n){YU(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qU(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function YU(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const HU=JU({},WU.settings),KU=JU({},WU.schemaIds),QU={fields:[],settings:HU,style:JU({},WU.style),schemaIds:KU};function ZU(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function XU(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ZU(Object(t),!0).forEach(function(n){eM(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ZU(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function eM(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const nM={tagIds:"getTagsByAccountId",departmentIds:"getAccountInfo.departments",countryId:"getAllCountries",tenureId:"getLocationMetadataOptionsForAccount.tenures",buildingTypeId:"getLocationMetadataOptionsForAccount.buildingTypes",regionId:"getLocationMetadataOptionsForAccount.regions"},tM=[{key:"id",type:"string",label:"ID",description:"Rio ID. Enter it if you want to update existing location. Example value: 5a72c22b-6c56-4eb1-802c-b26d91e7953b"},{key:"name",type:"string",label:"Name",description:"Name of the location",validators:[{validate:"unique_case_insensitive"},{validate:"required"}]},{key:"address1",type:"string",label:"Address 1",validators:[{validate:"required"}],description:"First line of the address"},{key:"address2",type:"string",label:"Address 2",validators:[],description:"Address 2 (optional)"},{key:"address3",type:"string",label:"Address 3",validators:[],description:"Address 3 (optional)"},{key:"city",type:"string",label:"City",description:"City",validators:[{validate:"required"}]},{key:"postCode",type:"string",label:"Postcode",description:"Postcode",validators:[{validate:"required"}]},{key:"countryId",type:"select",label:"Country",selectOptions:[],description:"Country",validators:[{errorMessage:"Please ensure you have selected a country for your locations",validate:"required"}]},{key:"wasteIn",type:"checkbox",label:"Waste In",description:"Check if it is a Waste In location"},{key:"wasteOut",type:"checkbox",label:"Waste Out",description:"Check if it is a Waste Out location"},{key:"tagIds",type:"select",label:"Tags",description:"Selects tags (optional)",manyToOne:!0},{key:"departmentIds",type:"select",label:"Departments",description:"Selects departments (optional)",manyToOne:!0},{key:"regionId",type:"select",label:"Region",selectOptions:[],description:"Select region (optional)"},{key:"tenureId",type:"select",label:"Tenure",selectOptions:[],description:"Select tenure (optional)"},{key:"buildingTypeId",type:"select",label:"Building Type",selectOptions:[],description:"Select building type (optional)"},{key:"locationCode",type:"string",label:"Location code",description:"Location code (Location ID / ePIM) (optional)",validators:[{level:"warning",validate:"unique_case_insensitive",errorMessage:"Location code is usually unique, but this location code is appearing multiple times in this file. After the upload there will be multiple locations with the same code."}]},{key:"phone1",type:"string",label:"Phone",description:"Phone number"},{key:"floorSpace",type:["number","default"],label:"Floor space",description:"Enter floor space (square meters) (optional)",invalidValueMessage:"Please ensure floor space is entered as a number using the m2 unit"},{key:"sharedEmissionPercentage",type:["number",{min:0,max:100}],label:"Shared emissions (%)",description:"Enter the percentage of shared emissions for this location (optional)",invalidValueMessage:"Please ensure shared emissions percentage is entered as a number between 0 and 100"},{key:"startDate",type:["date",{locale:"en-GB"}],label:"Occupation start date",description:"Enter occupation start date (optional)"},{key:"endDate",type:["date",{locale:"en-GB"}],label:"Occupation end date",description:"Enter occupation end date (optional)"},{key:"leaseRenewalDate",type:["date",{locale:"en-GB"}],label:"Lease renewal date",description:"Enter lease renewal date (optional)"},{key:"notes",type:"string",label:"Notes",description:"Enter notes (optional)"}];const aM=t.p+"locations-template-5ce902ec91c79c88510c.xlsx";function rM(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function iM(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rM(Object(t),!0).forEach(function(n){oM(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rM(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function oM(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function lM(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function sM(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?lM(Object(t),!0).forEach(function(n){cM(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):lM(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function cM(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const dM=[kn("REACT_APP_BASE_URL"),aM].join("");function uM(e){let{accountId:n,gridApi:t}=e;const a=Od(n),r=function(){const e=rt(),[n]=(0,gs._)(qF,{fetchPolicy:"network-only"}),t=Di(n,n=>{let{limit:t,offset:a}=n;return{limit:t,offset:a,accountId:e}},e=>e.getLocationsPage.rows,1e3);return async e=>{const n=[],a=new Set,r=await $r(t());for(const e of r)a.add(e.id);for(const t of e)!t.value||a.has(t.value)?n.push(t):n.push(iM(iM({},t),{},{info:[{message:"One or more locations you’re trying to update weren’t recognised in your upload, please review",level:"error"}]}));return n}}(),{validateLocationCodeInDromoRows:i,getDuplicateLocationCodes:o,isLoading:l}=TB(),s=_u(),{showNotification:c}=vt(),d=(0,g.useRef)([]),[u]=(0,Ot.n)($F),p=function(e){const{data:n}=function(e){return(0,h.IT)(WF,{variables:{accountId:e,accountIdAsString:e}})}(e);return(0,g.useMemo)(()=>tM.map(e=>"select"===e.type?XU(XU({},e),{},{type:"select",selectOptions:Gw()(n,nM[e.key],[])}):e),[n])}(n),m=(0,g.useCallback)(async e=>{try{const a=e.map(qo);await Promise.all(GU()(a,1e3).map(async e=>u({variables:{locations:e,accountId:n}}))),t.refreshServerSide({purge:!0}),c("The locations have been uploaded!","success")}catch(e){c("Something unexpected happened. Please review your upload document and try again. If the problem persists, please contact support.","danger")}},[n,t,c,u]),f=(0,g.useMemo)(()=>a&&s?{id:s.id,name:Vo(s),email:s.email,companyId:a.id,companyName:a.name}:null,[a,s]),y=(0,g.useCallback)(async e=>{const n=o(e);if(n.length>0&&!(0,zt.isEqual)(d.current,n))return d.current=n,{message:"The following location codes will have duplicates after the upload: ".concat(n.join(", "),'. If this is your intention, press "Finish" again to finalize the upload.'),cancel:!0}},[o]);return f?l?(0,Ze.jsx)(ze.$n,{loading:!0,children:"Upload"}):(0,Ze.jsx)(VU.A,{licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:f,style:QU.style,settings:sM(sM({},QU.settings),{},{importIdentifier:"Locations",uploadStep:sM(sM({},QU.settings.uploadStep),{},{helpText:$U(dM)}),manualInputDisabled:!0}),columnHooks:[{fieldName:"id",callback:r}],bulkRowHooks:[i],fields:p,onResults:m,beforeFinish:y,children:"Upload"}):null}var pM,mM,fM;function yM(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gM(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yM(Object(t),!0).forEach(function(n){bM(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yM(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function bM(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function hM(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const vM=Ge.default.div(pM||(pM=hM(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),xM=Ge.default.img(mM||(mM=hM(["\n  width: 50px;\n  height: 50px;\n  object-fit: cover;\n"]))),TM=Ge.default.a(fM||(fM=hM(["\n  display: inline-block;\n  color: ",";\n  margin-right: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),OM=e=>{let{data:{id:n},onEdit:t,onPicture:a}=e;return(0,Ze.jsxs)(vM,{children:[(0,Ze.jsx)(TM,{onClick:()=>a(n),children:(0,Ze.jsx)(ze.In,{name:"location-row__picture--".concat(n),icon:"image"})}),(0,Ze.jsx)(TM,{onClick:()=>t(n),children:(0,Ze.jsx)(ze.In,{name:"location-row__edit--".concat(n),icon:"pencil-alt"})})]})},kM=e=>{let{data:n,field:t}=e;return(0,Ze.jsx)("input",{type:"checkbox",checked:!!n[t]})},jM=e=>{let{data:{picture:n}}=e;return n?(0,Ze.jsx)(xM,{src:n,alt:"Location Picture"}):null};function CM(e){let{onEdit:n,fetchRows:t,accountId:a,setGridApi:r,onPictureClick:i}=e;const o=(0,N.m)(),l=Dd({autoFit:!0}),s=!!rc().data.find(e=>e.startsWith("editLocation")),{showNotification:c}=vt(),d=async e=>{try{const{data:{getLocationsPageFilter:n}}=await o.query({query:GF,variables:{accountId:a,field:e.colDef.colId}});e.success(n.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){de.Cp(n),c("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning"),e.success([])}},u=(0,g.useMemo)(()=>({async getRows(e){try{const{startRow:n,sortModel:r,filterModel:i}=e.request,o={accountId:a,offset:n,limit:25,sort:oa(r),filters:ia(i)},{rows:l,totalRows:s}=await t(o);e.success({rowData:l,rowCount:s})}catch(n){de.Cp(n),e.fail()}}}),[a,t]),p={pagination:!0,paginationPageSize:25,paginationPageSizeSelector:!1,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,cellStyle:{height:"auto"}},columnDefs:[{headerName:"Name",filter:"agTextColumnFilter",filterParams:{buttons:["reset","apply"],newRowsAction:"keep"},field:"name",resizable:!0,sortable:!0},{colId:"address1",headerName:"Address 1",field:"address.address1",filter:"agTextColumnFilter",resizable:!0,sortable:!0},{colId:"address2",headerName:"Address 2",field:"address.address2",filter:"agTextColumnFilter",resizable:!0,sortable:!0,hide:!0},{colId:"address3",headerName:"Address 3",field:"address.address3",filter:"agTextColumnFilter",resizable:!0,sortable:!0,hide:!0},{colId:"city",headerName:"City",field:"address.city",filter:"agTextColumnFilter",resizable:!0,sortable:!0},{colId:"postcode",headerName:"Postcode",field:"address.postcode",filter:"agTextColumnFilter",resizable:!0,sortable:!0},{colId:"country",headerName:"Country",field:"address.country.name",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},resizable:!0,sortable:!0},{colId:"attributes",headerName:"Custom attributes",field:"attributes",filter:"agTextColumnFilter",valueFormatter:e=>{let{value:n}=e;try{const e=JSON.parse(n);return Object.entries(e).map(e=>{let[n,t]=e;return"".concat(n,": ").concat(t)}).join(", ")||"-"}catch(e){return"-"}},resizable:!0,sortable:!0},{colId:"wasteIn",field:"wasteIn",headerName:"Waste In",valueFormatter:e=>{let{value:n}=e;return n?"Yes":"No"},cellRenderer:"checkWasteIn",filter:!1,sortable:!1,resizable:!0,hide:!0},{colId:"wasteOut",headerName:"Waste Out",field:"wasteOut",valueFormatter:e=>{let{value:n}=e;return n?"Yes":"No"},cellRenderer:"checkWasteOut",filter:!1,sortable:!1,resizable:!0,hide:!0},{colId:"tags",headerName:"Tags",field:"tags",autoHeight:!0,valueFormatter:e=>{let{value:n=[]}=e;return n.map(e=>e.tagName).join(", ")},filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},sortable:!1,resizable:!0,hide:!0},{colId:"departments",headerName:"Departments",field:"departments",autoHeight:!0,valueFormatter:e=>{let{value:n=[]}=e;return n.map(e=>e.name).join(", ")},filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},sortable:!1,resizable:!0,hide:!0},{colId:"region",headerName:"Region",field:"region.name",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},resizable:!0,sortable:!0,hide:!0},{colId:"tenure",headerName:"Tenure",field:"tenure.name",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},resizable:!0,sortable:!0,hide:!0},{colId:"buildingType",headerName:"Building Type",field:"buildingType.name",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},resizable:!0,sortable:!0,hide:!0},{colId:"code",headerName:"Location Code",field:"code",filter:"agTextColumnFilter",resizable:!0,sortable:!0,hide:!0},{colId:"phone1",headerName:"Phone",field:"address.phone1",filter:!1,resizable:!0,sortable:!1,hide:!0},{colId:"floorSpace",headerName:"Floor Space",field:"floorSpace",filter:"agNumberColumnFilter",resizable:!0,sortable:!0,hide:!0},{colId:"sharedEmissionPercentage",headerName:"Shared Emissions (%)",field:"sharedEmissionPercentage",filter:"agNumberColumnFilter",resizable:!0,sortable:!0,hide:!0},{colId:"startDate",headerName:"Occupation start Date",field:"startDate",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},sortable:!0,resizable:!0,hide:!0},{colId:"endDate",headerName:"Occupation end Date",field:"endDate",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},resizable:!0,sortable:!0,hide:!0},{colId:"leaseRenewalDate",headerName:"Lease Renewal Date",field:"leaseRenewalDate",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},resizable:!0,sortable:!0,hide:!0},{colId:"notes",headerName:"Notes",field:"notes",filter:"agTextColumnFilter",resizable:!0,sortable:!0,hide:!0},{colId:"picture",headerName:"Picture",field:"picture",resizable:!0,sortable:!0,hide:!0,cellRenderer:"picture"},{colId:"id",headerName:"ID",field:"id",filter:"agTextColumnFilter",resizable:!0,sortable:!0,hide:!0}],rowStyle:{width:"100%",display:"flex",alignItems:"center"},rowHeight:58};s&&p.columnDefs.push({headerName:"Actions",cellRenderer:"action",filter:!1,sortable:!1,resizable:!0});const m={action:e=>(0,Ze.jsx)(OM,gM(gM({},e),{},{onEdit:n,onPicture:i})),checkWasteIn:e=>(0,Ze.jsx)(kM,gM(gM({},e),{},{field:"wasteIn"})),checkWasteOut:e=>(0,Ze.jsx)(kM,gM(gM({},e),{},{field:"wasteOut"})),picture:e=>(0,Ze.jsx)(jM,gM({},e))};return(0,Ze.jsx)(nD,{gridOptions:p,paginationPageSize:25,cacheBlockSize:25,serverSideDatasource:u,onFirstDataRendered:l.onFirstDataRendered,onFilterChanged:l.onFilterChanged,onSortChanged:l.onSortChanged,onColumnVisible:l.onSaveGridColumnState,onColumnPinned:l.onSaveGridColumnState,onColumnResized:l.onSaveGridColumnState,onColumnMoved:l.onSaveGridColumnState,onColumnRowGroupChanged:l.onSaveGridColumnState,onColumnValueChanged:l.onSaveGridColumnState,onColumnPivotChanged:l.onSaveGridColumnState,components:m,onGridReady:e=>{l.onGridReady(e),r({api:e.api,datasource:u})}})}function SM(e){let{source:n,target:t,quantity:a=5}=e;return e=>{const r=Object.entries(e),i=r.findIndex(e=>{let[t]=e;return t===n}),o=(i>-1?r[i]:[void 0,""])[1],l=null==o?"":o;if("string"!=typeof l)throw new Error("".concat(n," must be string"));const s=l.split(","),c=[];for(let e=0;e<a;e++)c.push(["".concat(t," ").concat(e+1),s[e]||""]);return i>-1?r.splice(i,1,...c):r.push(...c),Object.fromEntries(r)}}var NM,wM,DM;function AM(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function RM(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?AM(Object(t),!0).forEach(function(n){PM(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):AM(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function PM(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function LM(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const IM=(0,Ge.default)(ze.fv)(NM||(NM=LM(["\n  .ag-header-cell-resize {\n    z-index: 0;\n  }\n"]))),EM=Ge.default.div(wM||(wM=LM(["\n  padding: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),_M=(0,Ge.default)(bh)(DM||(DM=LM(["\n  & > div:first-child {\n    padding-right: ",";\n    width: initial;\n  }\n  justify-content: space-between;\n"])),e=>e.theme.geometry.xxxl.spacing),FM=uv(e=>{const[n,t]=(0,g.useState)({createModal:{show:!1},updateModal:{id:""},pictureModal:{id:""},selectedTags:[],notification:{message:null,color:null},account:{id:e.accountId},shouldRefetch:!1,selectAll:!1,orderByDesc:!0,pagination:{page:1,totalPages:0},countryList:[],defaultCountry:null}),[a,r]=(0,g.useState)({}),i=(0,N.m)(),{countryList:o}=ku(),{data:l}=(0,h.IT)(MF,{variables:{id:n.updateModal.id||n.pictureModal.id},skip:!n.updateModal.id&&!n.pictureModal.id}),{showNotification:s}=vt(),[c]=(0,Ot.n)(JF),d=e=>{c({variables:{input:{fileName:"location-picture.png",contentType:"image/png",accountId:n.account.id,locationId:n.pictureModal.id,imageData:e}},onCompleted:()=>{p(),s("Location picture uploaded successfully","success"),y()},onError:e=>{console.error(e),s("Failed to upload location picture","danger")}})},u=e.permissions.data.find(e=>e.startsWith("exportLocation")),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(n=>RM(RM({},n),{},{createModal:{show:!1},updateModal:{id:null},pictureModal:{id:null},notification:{message:e.message,color:e.color,id:e.id}}))},m=(e,a)=>"create"===e?t(RM(RM({},n),{},{createModal:{show:!0}})):"update"===e?t(RM(RM({},n),{},{updateModal:{id:a}})):"picture"===e?t(RM(RM({},n),{},{pictureModal:{id:a}})):void 0,y=()=>{a.api.refreshServerSide({purge:!0})},b=()=>t(e=>RM(RM({},e),{},{notification:{message:null,color:null,id:null}})),v=(0,g.useCallback)(async e=>{const{data:{getLocationsPage:{totalRows:n,rows:t}}}=await i.query({query:VF,variables:e,fetchPolicy:"network-only"});return{rows:t,totalRows:n}},[i]);return(0,Ze.jsxs)(IM,{name:"ConfigurationLocationsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(_M,{name:"ConfigurationLocationsContainer__Controls",icon:"map-marker-alt",iconColor:"primary",title:"Locations",children:(0,Ze.jsxs)(HF,{container:!0,item:!0,distribution:"center",vdistribution:"center",itemAlign:"center",children:[(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(SD,{gridApi:a.api,title:"Clear"})}),(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(ze.$n,{name:"ConfigurationLocationsContainer__Controls__Button--create",size:"md",color:"primary",onClick:()=>m("create"),children:"+ Add"})}),(0,Ze.jsx)(ze.fv,{span:3,children:(null==a?void 0:a.api)&&(0,Ze.jsx)(uM,{accountId:n.account.id,gridApi:a.api})}),u&&(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(MP,{fetchRows:v,gridApi:null==a?void 0:a.api,defaultExportFileName:"Location Exports",columnsToSkip:["Actions"],label:"Export",rowMutators:[SM({source:"Tags",target:"Tag"}),SM({source:"Departments",target:"Department"})]})})]})}),e.permissions.account.includes("getAll")&&(0,Ze.jsx)(EM,{children:(0,Ze.jsx)(Kh,{value:n.account.id,onChange:e=>t(RM(RM({},n),{},{account:{id:e.id}}))})}),(0,Ze.jsx)(g.Fragment,{children:(()=>{var e,t,a;const r=l&&l.getLocationById?l.getLocationById.address:null,i=l&&l.getLocationById?l.getLocationById.tags:null,s=l&&{code:l.getLocationById.code||"",tenure:l.getLocationById.tenure||null,region:l.getLocationById.region||null,buildingType:l.getLocationById.buildingType||null,floorSpace:l.getLocationById.floorSpace||null,startDate:l.getLocationById.startDate||null,endDate:l.getLocationById.endDate||null,leaseRenewalDate:l.getLocationById.leaseRenewalDate||null,notes:l.getLocationById.notes||"",description:l.getLocationById.description||"",departments:l.getLocationById.departments||[],sharedEmissionPercentage:null!==(e=l.getLocationById.sharedEmissionPercentage)&&void 0!==e?e:null,enableProject:null!==(t=l.getLocationById.enableProject)&&void 0!==t&&t,displayOnImpactDashboard:null===(a=l.getLocationById.displayOnImpactDashboard)||void 0===a||a};return(0,Ze.jsxs)(g.Fragment,{children:[n.notification.message&&(0,Ze.jsxs)(ze.Eg,{name:"ConfigurationLocationsContainer__Notification",show:!0,color:"success",onClose:b,children:[n.notification.message,(0,Ze.jsx)("div",{hidden:!0,name:"ConfigurationLocationsContainer__Notification__createlocation_id",children:n.notification.id?n.notification.id[0]:null}),(0,Ze.jsx)("div",{hidden:!0,name:"ConfigurationLocationsContainer__Notification__createaddress_id",children:n.notification.id?n.notification.id[1]:null})]}),n.createModal.show&&(0,Ze.jsx)(ze.aF,{span:5,size:"md",show:!0,name:"ConfigurationLocationsContainer__Modal--create",dismissable:!0,onDismiss:p,children:(0,Ze.jsx)(TU,{accountId:n.account.id,onSuccess:(e,n,t)=>p({message:e,color:n,id:t}),refreshGrid:y})}),n.updateModal.id&&l&&(0,Ze.jsx)(ze.aF,{span:5,size:"sm",show:!0,dismissable:!0,name:"ConfigurationLocationsContainer__Modal--update",onDismiss:p,children:(0,Ze.jsx)(MU,{locationId:l.getLocationById.id,name:l.getLocationById.name,add1:r?r.address1:"",add2:r?r.address2:"",add3:r?r.address3:"",city:r?r.city:"",postcode:r?r.postcode:"",phone:r?r.phone1:"",accountId:n.account.id,addressId:r?r.id:"",wasteIn:!!l.getLocationById.wasteIn&&l.getLocationById.wasteIn.id,wasteOut:!!l.getLocationById.wasteOut&&l.getLocationById.wasteOut.id,onSuccess:(e,n,t)=>p({message:e,color:n,id:t}),onDismiss:p,tags:i,countryList:o,defaultCountry:l.getLocationById.address.country,metadata:s,refreshGrid:y,attributes:l.getLocationById.attributes})}),n.pictureModal.id&&l&&(0,Ze.jsx)(f.Modal,{open:!0,onClose:p,title:"Edit Location Picture",children:(0,Ze.jsx)(f.ImageEditor,{defaultImageSrc:l.getLocationById.picture,onSave:d,shouldResetAfterSuccess:!0})})]})})()}),(0,Ze.jsx)(CM,{accountId:n.account.id,onEdit:e=>m("update",e),setGridApi:r,fetchRows:v,onPictureClick:e=>m("picture",e)},n.account.id)]})});var BM,UM,MM,VM,zM,GM,$M,WM,qM,JM;function YM(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const HM=(0,D.J1)(BM||(BM=YM(["\n  query GetWasteStreamByAccountId($accId: ID!, $page: Int!, $pageSize: Int!, $filterValue: String) {\n    getWasteStreamsByAccountId(accountId: $accId, page: $page, pageSize: $pageSize, filterValue: $filterValue) {\n      pageCount\n      totalItemCount\n      wasteStreams {\n        id\n        name\n        ewc {\n          description\n          code\n          id\n          hazardous\n        }\n        isHazardous\n      }\n    }\n  }\n"]))),KM=(0,D.J1)(UM||(UM=YM(["\n  query GetAllEWCs {\n    getAllEWCs {\n      code\n      description\n      id\n      hazardous\n    }\n  }\n"]))),QM=(0,D.J1)(MM||(MM=YM(["\n  mutation CreateWasteStream($id: ID!, $name: String!, $ewcId: ID!, $hazardous: Boolean!, $accId: ID!) {\n    createWasteStream(input: { id: $id, name: $name, ewcId: $ewcId, accountId: $accId, isHazardous: $hazardous }) {\n      id\n      name\n      ewc {\n        description\n        code\n        id\n        hazardous\n      }\n      isHazardous\n    }\n  }\n"]))),ZM=(0,D.J1)(VM||(VM=YM(["\n  mutation EditWasteStream($id: ID!, $name: String!, $ewcId: ID!, $hazardous: Boolean!, $accId: ID!) {\n    editWasteStream(input: { id: $id, name: $name, ewcId: $ewcId, accountId: $accId, isHazardous: $hazardous }) {\n      id\n    }\n  }\n"]))),XM=(0,D.J1)(zM||(zM=YM(["\n  {\n    wasteStreamGridPage @client\n  }\n"]))),eV=(0,D.J1)(GM||(GM=YM(["\n  {\n    wasteStreamGridTotalPages @client\n  }\n"]))),nV=(0,D.J1)($M||($M=YM(["\n  mutation SetWasteStreamGridPage($page: Int!) {\n    setWasteStreamGridPage(page: $page) @client\n  }\n"]))),tV=((0,D.J1)(WM||(WM=YM(["\n  mutation SetWasteStreamGridTotalPages($totalPages: Int!) {\n    setWasteStreamGridTotalPages(totalPages: $totalPages) @client\n  }\n"]))),(0,D.J1)(qM||(qM=YM(["\n  {\n    wasteStreamGridSearch @client\n  }\n"])))),aV=(0,D.J1)(JM||(JM=YM(["\n  mutation SetWasteStreamGridSearch($search: String!) {\n    setWasteStreamGridSearch(search: $search) @client\n  }\n"])));var rV,iV,oV,lV;function sV(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function cV(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sV(Object(t),!0).forEach(function(n){dV(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sV(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dV(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function uV(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const pV=Ge.default.div(rV||(rV=uV(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),mV=Ge.default.div(iV||(iV=uV(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),fV=Ge.default.div(oV||(oV=uV(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),yV=(0,Ge.default)(ze.fv)(lV||(lV=uV(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing);class gV extends g.Component{constructor(e){super(e),this.validate=()=>{let e=!1;const n=this.state.values;for(const t of Object.keys(this.state.values))n[t].value||(n[t]={value:n[t].value,error:"Field cannot be left empty"},e|=!0);return e&&this.setState({values:n}),!e},this.handleNameChange=e=>{e.target&&this.setState({values:cV(cV({},this.state.values),{},{name:{value:e.target.value,error:null}})})},this.handleEWCChange=(e,n)=>{if(e.target&&e.target.value){const t=n.find(n=>n.value===e.target.value).hazardous;this.setState({isChecked:t,showError:!1,values:cV(cV({},this.state.values),{},{ewc:{value:e.target.value,error:null}})})}},this.handleCreateComplete=e=>{this.props.onSuccess&&this.props.onSuccess("Waste Stream created successfully","success",e.createWasteStream.id,e.createWasteStream)},this.handleCreateError=()=>{this.setState({showError:!0,isSubmitted:!1}),this.props.onError&&this.props.onError("Something went wrong. If the problem continues please contact support.","danger")},this.handleCreateUpdate=(e,n)=>{this.props.onUpdate&&this.props.onUpdate(e,n)},this.state={isChecked:!1,values:{name:{value:null,error:null},ewc:{value:null,error:null}},isSubmitted:!1},this.handleCreateComplete=this.handleCreateComplete.bind(this),this.handleCreateError=this.handleCreateError.bind(this)}render(){const{accountId:e=(0,Jb.A)(localStorage.getItem("ID_TOKEN")).name,refetchQueries:n}=this.props;return(0,Ze.jsx)(qb.X,{query:KM,children:t=>{let{loading:a,error:r,data:i}=t;return r?(0,Ze.jsx)("div",{}):(0,Ze.jsxs)(pV,{children:[this.state.showError&&(0,Ze.jsx)(ze.Eg,{name:"wasteStreamError__notification",show:!0,color:"danger",onClose:()=>this.setState({showError:!1}),children:"There was an error creating the waste stream"}),(0,Ze.jsx)(mV,{children:(0,Ze.jsx)(ze.DZ,{inline:!0,size:"lg",children:"New Waste Stream"})}),(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsxs)(yV,{children:[(0,Ze.jsx)(fV,{children:(0,Ze.jsx)(ze.JU,{children:"Name"})}),(0,Ze.jsx)(ze.ks,{name:"Waste_Stream_Name",disabled:this.state.isSubmitted,box:!0,placeholder:"Name",onChange:this.handleNameChange,value:this.state.values.name.value,error:this.state.values.name.error})]})}),(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsxs)(yV,{children:[(0,Ze.jsx)(fV,{children:(0,Ze.jsx)(ze.JU,{children:"EWC Code"})}),(()=>{if(i&&i.getAllEWCs&&!a){const e=i.getAllEWCs.map(e=>({label:"".concat(e.code," - ").concat(e.description),value:e.id,hazardous:e.hazardous}));return(0,Ze.jsx)(ze.l6,{name:"Waste_Stream_EWC_Code",disabled:this.state.isSubmitted,options:e,value:this.state.values.ewc.value,error:this.state.values.ewc.error,onChange:n=>{this.handleEWCChange(n,e)}})}return(0,Ze.jsx)(ze.l6,{placeholder:"Loading"})})()]})}),(0,Ze.jsxs)(ze.fI,{container:!0,children:[(0,Ze.jsx)(yV,{span:11,children:(0,Ze.jsx)(ze.JU,{children:"Hazardous"})}),(0,Ze.jsx)(yV,{span:1,children:this.state.isChecked?"True":"False"})]}),(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsx)(yV,{children:(0,Ze.jsx)(Qe.s,{mutation:QM,onCompleted:this.handleCreateComplete,onError:this.handleCreateError,refetchQueries:n,update:this.handleCreateUpdate,children:n=>(0,Ze.jsx)(ze.$n,{name:"Waste_Stream_Create",disabled:!i||!i.getAllEWCs||this.state.isSubmitted,color:"primary",onClick:()=>{this.validate()&&(n({variables:{id:(0,Ai.A)(),name:this.state.values.name.value,ewcId:this.state.values.ewc.value,accId:e,hazardous:this.state.isChecked}}),this.setState({isSubmitted:!0}))},children:"Create"})})})})]})}})}}const bV=gV;var hV,vV,xV,TV;function OV(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kV(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?OV(Object(t),!0).forEach(function(n){jV(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):OV(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jV(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function CV(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const SV=Ge.default.div(hV||(hV=CV(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),NV=Ge.default.div(vV||(vV=CV(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),wV=Ge.default.div(xV||(xV=CV(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),DV=(0,Ge.default)(ze.fv)(TV||(TV=CV(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing);class AV extends g.Component{constructor(e){super(e),this.validate=()=>{let e=!1;const n=this.state.values;for(const t of Object.keys(this.state.values))n[t].value||(n[t]={value:n[t].value,error:"Field cannot be left empty"},e|=!0);return e&&this.setState({values:n}),!e},this.handleNameChange=e=>{e.target&&this.setState({values:kV(kV({},this.state.values),{},{name:{value:e.target.value,error:null}})})},this.handleEWCChange=(e,n)=>{if(e.target&&e.target.value){const t=n.find(n=>n.value===e.target.value).hazardous;this.setState({isChecked:t,showError:!1,values:kV(kV({},this.state.values),{},{ewc:{value:e.target.value,error:null}})})}},this.handleEditComplete=()=>{this.props.onSuccess&&this.props.onSuccess("Waste stream has been updated!","success")},this.handleEditError=e=>{this.setState({showError:!0}),this.props.onError&&this.props.onError(e)},this.state={isChecked:this.props.streamEwc.hazardous,id:this.props.streamId,values:{name:{value:this.props.streamName,error:null},ewc:{value:this.props.streamEwc.id,error:null}},isSubmitted:!1},this.handleEditComplete=this.handleEditComplete.bind(this),this.handleEditError=this.handleEditError.bind(this)}render(){const{accountId:e=(0,Jb.A)(localStorage.getItem("ID_TOKEN")).name}=this.props;return(0,Ze.jsx)(qb.X,{query:KM,children:n=>{let{loading:t,error:a,data:r}=n;return a?(0,Ze.jsx)("div",{}):(0,Ze.jsxs)(SV,{children:[this.state.showError&&(0,Ze.jsx)(ze.Eg,{name:"wasteStreamError__notification",show:!0,color:"danger",onClose:()=>this.setState({showError:!1}),children:"There was an error creating the waste stream"}),(0,Ze.jsx)(NV,{children:(0,Ze.jsx)(ze.DZ,{inline:!0,size:"lg",children:"Edit Waste Stream"})}),(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsxs)(DV,{children:[(0,Ze.jsx)(wV,{children:(0,Ze.jsx)(ze.JU,{children:"Name"})}),(0,Ze.jsx)(ze.ks,{name:"Edit_Waste_Stream_Name",box:!0,placeholder:"Name",disabled:this.state.isSubmitted,onChange:this.handleNameChange,value:this.state.values.name.value,error:this.state.values.name.error})]})}),(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsxs)(DV,{children:[(0,Ze.jsx)(wV,{children:(0,Ze.jsx)(ze.JU,{children:"EWC Code"})}),(()=>{if(r&&r.getAllEWCs&&!t){const e=r.getAllEWCs.map(e=>({label:"".concat(e.code," - ").concat(e.description),value:e.id,hazardous:e.hazardous}));return(0,Ze.jsx)(ze.l6,{name:"Edit_Waste_Stream_EWC_Code",options:e,value:this.state.values.ewc.value,error:this.state.values.ewc.error,onChange:n=>{this.handleEWCChange(n,e)},disabled:this.state.isSubmitted})}return(0,Ze.jsx)(ze.l6,{placeholder:"Loading"})})()]})}),(0,Ze.jsxs)(ze.fI,{container:!0,children:[(0,Ze.jsx)(DV,{span:11,children:(0,Ze.jsx)(ze.JU,{children:"Hazardous"})}),(0,Ze.jsx)(DV,{span:1,children:this.state.isChecked?"True":"False"})]}),(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsx)(DV,{children:(0,Ze.jsx)(Qe.s,{mutation:ZM,onCompleted:this.handleEditComplete,onError:this.handleEditError,children:n=>(0,Ze.jsx)(ze.$n,{name:"Waste_Stream_Edit",disabled:!r||!r.getAllEWCs||this.state.isSubmitted,color:"primary",onClick:()=>{this.validate()&&(n({variables:{id:this.state.id,name:this.state.values.name.value,ewcId:this.state.values.ewc.value,accId:e,hazardous:this.state.isChecked}}),this.setState({isSubmitted:!0}))},children:"Edit"})})})})]})}})}}const RV=AV;var PV,LV,IV,EV;function _V(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const FV=(0,Ge.default)(ze.fI)(PV||(PV=_V(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.light.background,e=>{if(e.action)return"background-color: ".concat(e.theme.colors.warning.highlight.background,";")}),BV=(0,Ge.default)(ze.fv)(LV||(LV=_V(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.profile.padding),UV=(0,Ge.default)(BV)(IV||(IV=_V(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: flex-end;\n"]))),MV=Ge.default.a(EV||(EV=_V(["\n  display: inline-block;\n  color: ",";\n  padding: ",";\n\n  &:hover {\n    cursor: pointer;\n    color: ",";\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>"".concat(e.theme.geometry.md.spacing," ").concat(e.theme.geometry.sm.spacing),e=>e.theme.colors.text.dark.background),VV=e=>{const{name:n,id:t,streamId:a,ewc:r,description:i,isHazardous:o,onEdit:l}=e;return(0,Ze.jsxs)(FV,{container:!0,name:"".concat(t,"__WasteStream__Row"),children:[(0,Ze.jsx)(BV,{span:2,children:(0,Ze.jsx)(ze.EY,{name:"".concat(t,"__WasteStream__Name"),children:n})}),(0,Ze.jsx)(BV,{span:2,children:(0,Ze.jsx)(ze.EY,{name:"".concat(t,"__WasteStream__ewc"),children:r})}),(0,Ze.jsx)(BV,{span:4,children:(0,Ze.jsx)(ze.EY,{name:"".concat(t,"__WasteStream__description"),children:i})}),(0,Ze.jsx)(BV,{span:2,children:(0,Ze.jsx)(ze.EY,{name:"".concat(t,"__WasteStream__hazardous"),children:o})}),(0,Ze.jsx)(UV,{span:2,children:(0,Ze.jsx)(MV,{onClick:()=>{l&&l(a)},children:(0,Ze.jsx)(ze.In,{name:"".concat(t,"__WasteStream__edit"),icon:"pencil-alt"})})})]})};VV.propTypes={id:Ke().string,streamId:Ke().string,name:Ke().string,ewc:Ke().string,isHazardous:Ke().string};const zV=(0,Ge.withTheme)(VV);var GV,$V,WV;function qV(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const JV=(0,Ge.default)(ze.fI)(GV||(GV=qV(["\n  padding: ",";\n  background: ",";\n  border-bottom: 1px solid ",";\n  border-top: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.sm.spacing," ").concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.light.background,e=>e.theme.colors.text.light.background,e=>e.theme.colors.text.light.background),YV=(0,Ge.default)(ze.fv)($V||($V=qV(["\n  p {\n    padding: ",";\n  }\n"])),e=>e.theme.geometry.md.profile.padding),HV=Ge.default.div(WV||(WV=qV(["\n  flex: 1 1 auto;\n"]))),KV=e=>{const{queryVariables:n,shouldRefetch:t,onRefetch:a,showModal:r}=e;return(0,Ze.jsxs)(g.Fragment,{children:[(0,Ze.jsxs)(JV,{container:!0,align:"between",children:[(0,Ze.jsx)(YV,{item:!0,span:2,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Name"})}),(0,Ze.jsx)(YV,{item:!0,span:2,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"EWC Code"})}),(0,Ze.jsx)(YV,{item:!0,span:4,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Description"})}),(0,Ze.jsx)(YV,{item:!0,span:2,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Hazardous"})}),(0,Ze.jsx)(YV,{item:!0,span:2})]}),(0,Ze.jsx)(qb.X,{query:HM,fetchPolicy:"network-only",variables:n,children:e=>{let{data:n,error:i,loading:o,refetch:l}=e;if(t&&((e,n)=>{e(),n()})(l,a),o)return(0,Ze.jsx)(Vg,{name:"ConfigurationWasteStreamsContainer__Loading"});if(i)return(0,Ze.jsx)(ze.Kw,{error:i,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationWasteStreamsContainer__ContainerError",icon:a,title:n,body:t,retry:()=>l()})}});if(n){const e=n.getWasteStreamsByAccountId.wasteStreams;return(0,Ze.jsxs)(g.Fragment,{children:[!e.length&&(0,Ze.jsx)(nv,{name:"ConfigurationWasteStreamsContainer__NoResults",title:"There are no results for this search."}),!!e.length&&(0,Ze.jsx)(HV,{children:e.map(e=>(0,Ze.jsx)(zV,{name:e.name,id:e.id,streamId:e.id,ewc:e.ewc.code,description:e.ewc.description,isHazardous:e.isHazardous?"True":"False",onEdit:()=>r("update",e.id,e.name,e.ewc)},e.id))})]})}}})]})};KV.propTypes={queryVariables:Ke().shape({accId:Ke().string,Page:Ke().number,PageSize:Ke().number,filterValue:Ke().string}),shouldRefetch:Ke().bool,onRefetch:Ke().func,onGetWasteStreamsCompleted:Ke().func};const QV=KV,ZV=(0,Ge.default)(ze.$n)({width:"auto",whiteSpace:"nowrap",marginLeft:10}),XV=e=>{var n,t;return{ID:e.id,Name:e.name,"EWC Code":null===(n=e.ewc)||void 0===n?void 0:n.code,Description:null===(t=e.ewc)||void 0===t?void 0:t.description,Hazardous:e.isHazardous?"True":"False"}};function ez(e){let{accountId:n}=e;const[t,a]=(0,g.useState)(!1),r=$l(),i=(0,g.useRef)(),[o]=(0,gs._)(HM,{fetchPolicy:"network-only"});return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ZV,{color:"tertiary",onClick:()=>{a(!0)},title:"You are about to export your data. Please note that large datasets may take some time to export.",children:"Export"}),(0,Ze.jsx)(LP,{show:t,onDismiss:()=>{a(!1)},defaultFileName:"waste_streams",onSubmit:e=>{a(!1),i.current=null==r?void 0:r.startFrontendExport({fetchRows:async e=>{let{offset:t=0,limit:a=1e3}=e;const{data:r}=await o({variables:{accId:n,page:0===t?1:t/a+1,pageSize:a}}),{totalItemCount:i,wasteStreams:l}=r.getWasteStreamsByAccountId;return{rows:l,totalRows:i}},formatRow:XV,exportFileName:e,sort:[],filters:{}})}})]})}var nz,tz;function az(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const rz=Ge.default.div(nz||(nz=az(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),iz=(0,Ge.default)(X_)(tz||(tz=az(["\n  flex: 1;\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing);class oz extends g.Component{constructor(e){var n;super(e),n=this,this.dismissModals=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return n.setState({createModal:{show:!1},updateModal:{id:null,name:null,ewc:null},notification:{message:e.message,color:e.color,id:e.id}},t)},this.showModal=(e,n,t,a)=>"create"===e?this.setState({createModal:{show:!0}}):"update"===e?this.setState({updateModal:{id:n,name:t,ewc:a}}):void 0,this.hideNotification=()=>this.setState({notification:{message:null,color:null,id:null}}),this.handleAccountChange=e=>this.setState({account:{id:e.id}}),this.setShouldRefetch=()=>this.setState({shouldRefetch:!0}),this.onRefetch=()=>this.setState({shouldRefetch:!1}),this.renderModals=e=>{const{notification:n,createModal:t,updateModal:a,account:r}=this.state;return(0,Ze.jsxs)(g.Fragment,{children:[n.message&&(0,Ze.jsxs)(ze.Eg,{name:"ConfigurationWasteStreamsContainer__Notification",show:!0,color:"success",onClose:this.hideNotification,children:[n.message,(0,Ze.jsx)("div",{hidden:!0,name:"ConfigurationWasteStreamsContainer__Notification__Id",children:n.id})]}),t.show&&(0,Ze.jsx)(ze.aF,{size:"sm",show:!0,dismissable:!0,name:"ConfigurationWasteStreamsContainer__Modal--create",onDismiss:this.dismissModals,height:"auto",maxHeight:"90vh",children:(0,Ze.jsx)(bV,{onSuccess:(n,t,a)=>this.dismissModals({message:n,color:t,id:a},e),accountId:r.id})}),a.id&&(0,Ze.jsx)(ze.aF,{size:"sm",show:!0,dismissable:!0,name:"ConfigurationUsersContainer__Modal--update",onDismiss:this.dismissModals,height:"auto",maxHeight:"90vh",children:(0,Ze.jsx)(RV,{accountId:r.id,streamName:a.name,streamId:a.id,streamEwc:a.ewc,onSuccess:(n,t)=>this.dismissModals({message:n,color:t},e)})})]})},this.state={account:{id:e.accountId},createModal:{show:!1},updateModal:{id:"",name:"",ewc:""},notification:{message:null,color:null,id:null},shouldRefetch:!1}}render(){return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationWasteStreamsContainer",container:!0,fullHeight:!0,children:[this.renderModals(this.setShouldRefetch),(0,Ze.jsxs)(bh,{name:"ConfigurationWasteStreamsContainer__Controls",icon:"trash-alt",iconColor:"primary",title:"Waste Streams",children:[(0,Ze.jsx)(iz,{setPageMutation:nV,setSearchMutation:aV}),(0,Ze.jsx)(ez,{accountId:this.state.account.id}),(0,Ze.jsx)(ZV,{name:"ConfigurationWasteStreamsContainer__Controls__Button--add",color:"primary",component:"button",onClick:()=>this.showModal("create"),children:"+ Add Waste Stream"})]}),this.props.permissions.data.includes("getWasteStreamsAll")&&(0,Ze.jsx)(rz,{children:(0,Ze.jsx)(Kh,{onChange:this.handleAccountChange,value:this.state.account.id,name:"ConfigurationWasteStreamsContainer__AccountSelector"})}),(0,Ze.jsx)(qb.X,{query:tV,children:e=>{let{data:{wasteStreamGridSearch:n}}=e;const t={accId:this.state.account.id,page:1,pageSize:1e3,filterValue:n||null};return(0,Ze.jsx)(QV,{queryVariables:t,shouldRefetch:this.state.shouldRefetch,onRefetch:this.onRefetch,showModal:this.showModal})}})]})}}const lz=uv(oz);var sz,cz,dz,uz;function pz(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const mz=(0,D.J1)(sz||(sz=pz(['\n  query getTagsByAccountId($accountId: String!) {\n    getTagsByAccountId(input: { accountId: $accountId, applicationId: "RIO" }) {\n      tagName\n      isSystemLevelTag\n      legislationTag\n      id\n      locations {\n        id\n        name\n      }\n    }\n  }\n']))),fz=(0,D.J1)(cz||(cz=pz(['\n  mutation createTag(\n    $tagName: String!\n    $accountId: String!\n    $id: ID!\n    $description: String\n    $isSystemLevelTag: Boolean!\n    $legislationTag: Boolean!\n  ) {\n    createTag(\n      input: {\n        tagName: $tagName\n        id: $id\n        applicationId: "RIO"\n        accountId: $accountId\n        description: $description\n        isSystemLevelTag: $isSystemLevelTag\n        legislationTag: $legislationTag\n      }\n    ) {\n      id\n      tagName\n      description\n      applicationId\n      isSystemLevelTag\n      legislationTag\n      locations {\n        id\n        name\n      }\n    }\n  }\n']))),yz=(0,D.J1)(dz||(dz=pz(['\n  mutation updateTag(\n    $tagName: String!\n    $accountId: String!\n    $id: ID!\n    $description: String\n    $isSystemLevelTag: Boolean!\n    $legislationTag: Boolean!\n  ) {\n    updateTag(\n      input: {\n        tagName: $tagName\n        id: $id\n        applicationId: "RIO"\n        accountId: $accountId\n        description: $description\n        isSystemLevelTag: $isSystemLevelTag\n        legislationTag: $legislationTag\n      }\n    ) {\n      id\n      tagName\n      description\n      applicationId\n      isSystemLevelTag\n      legislationTag\n      locations {\n        id\n        name\n      }\n    }\n  }\n']))),gz=(0,D.J1)(uz||(uz=pz(["\n  mutation updateLocationTag($id: ID!, $locationsId: [ID!]!, $accountId: ID!) {\n    updateLocationTag(input: { tagId: $id, locationsId: $locationsId, accountId: $accountId })\n  }\n"])));var bz,hz,vz,xz,Tz,Oz,kz;function jz(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Cz(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jz(Object(t),!0).forEach(function(n){Sz(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jz(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Sz(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Nz(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const wz=(0,Ge.default)(ze.fI)(bz||(bz=Nz(["\n  padding: ",";\n  background: ",";\n  border-bottom: 1px solid ",";\n  border-top: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.sm.spacing," ").concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.light.background,e=>e.theme.colors.text.light.background,e=>e.theme.colors.text.light.background),Dz=(0,Ge.default)(ze.fI)(hz||(hz=Nz(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n"])),e=>"".concat(e.theme.geometry.sm.spacing," ").concat(e.theme.geometry.md.spacing),e=>e.theme.colors.text.light.background),Az=(0,Ge.default)(ze.fv)(vz||(vz=Nz(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.profile.padding),Rz=(0,Ge.default)(ze.fv)(xz||(xz=Nz(["\n  padding: ",";\n  justify-content: center;\n  display: flex;\n"])),e=>e.theme.geometry.md.profile.padding),Pz=Ge.default.a(Tz||(Tz=Nz(["\n  display: block;\n  color: ",";\n\n  &:hover {\n    cursor: pointer;\n    color: ",";\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.colors.text.dark.background),Lz=Ge.default.span(Oz||(Oz=Nz(["\n  cursor: pointer;\n"]))),Iz=(0,Ge.default)(ze.In)(kz||(kz=Nz(["\n  cursor: pointer;\n  margin: 0 0 0 5px;\n"]))),Ez=e=>{let{tags:n,onUpdateTag:t}=e;const[a,r]=(0,g.useState)({openLocation:[]}),i=rc(),o=i.tag.includes("getAll");return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(wz,{container:!0,align:"between",children:[(0,Ze.jsx)(Az,{span:3,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Tag"})}),(0,Ze.jsx)(Az,{span:o?10:20,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Location"})}),o&&(0,Ze.jsx)(Az,{span:10,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Legislation Tag"})}),(0,Ze.jsx)(Az,{span:1})]}),n.map(e=>{const n=(e=>{const n=e.locations.map(e=>e.name).join(", "),t=a.openLocation.includes(e.id)?(0,Ze.jsxs)(Ze.Fragment,{children:[n,(0,Ze.jsx)(Iz,{onClick:()=>(e=>r(Cz(Cz({},a),{},{openLocation:(0,zt.remove)(a.openLocation,e.id)})))(e),icon:"arrow-up"})]}):(0,Ze.jsxs)(Ze.Fragment,{children:[n.substr(0,90),(0,Ze.jsx)(Lz,{onClick:()=>(e=>r(Cz(Cz({},a),{},{openLocation:[...a.openLocation,e.id]})))(e),children:"..."})]});return n.length<90?(0,Ze.jsx)(ze.EY,{children:n}):(0,Ze.jsx)(ze.EY,{children:t})})(e);return(0,Ze.jsxs)(Dz,{container:!0,align:"between",children:[(0,Ze.jsx)(Az,{span:3,children:(0,Ze.jsx)(ze.EY,{children:e.tagName})}),(0,Ze.jsx)(Az,{span:o?10:20,children:n}),o&&(0,Ze.jsx)(Az,{span:10,children:e.legislationTag?"Yes":"No"}),(0,Ze.jsx)(Rz,{span:1,children:(!e.isSystemLevelTag||i.tag.includes("editAll"))&&(0,Ze.jsx)(Pz,{onClick:()=>t(e),children:(0,Ze.jsx)(ze.In,{icon:"pencil-alt"})})})]},e.id)})]})};var _z,Fz,Bz,Uz;function Mz(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Vz(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Mz(Object(t),!0).forEach(function(n){zz(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Mz(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zz(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Gz(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $z=(0,Ge.default)(ze.fv)(_z||(_z=Gz(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Wz=(0,Ge.default)(ze.JU)(Fz||(Fz=Gz(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),qz=Ge.default.span(Bz||(Bz=Gz(["\n  color: grey;\n  font-style: italic;\n"]))),Jz=(Ge.default.div(Uz||(Uz=Gz(["\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.md.spacing),{offset:0,limit:10,filters:{},sort:[{field:"name",order:"asc"}]}),Yz=e=>{let{onSuccess:n,accountId:t,tag:a}=e;const[r,i]=(0,g.useState)({hasError:!1,isSuccess:!1,values:{tagName:{text:a.tagName,error:""},isSystemLevelTag:{checked:a.isSystemLevelTag,error:""},legislationTag:{checked:a.legislationTag,error:""},description:"",locations:a?a.locations.map(e=>({label:e.name,value:e.id})):[]},notification:{message:"",color:"success",id:null}}),o=rc(),l=(0,N.m)(),[s]=(0,Ot.n)(yz,{onError:()=>{i(Vz(Vz({},r),{},{notification:{show:!0,message:"Something went wrong. If the problem persists, contact support.",color:"danger"},hasError:!0,isSuccess:!1,isSubmitted:!1}))}}),c=e=>{i(n=>Vz(Vz({},n),{},{values:Vz(Vz({},n.values),{},{[e.target.name]:{checked:!n.values[e.target.name].checked,error:null}})}))},{data:d}=(0,h.IT)(VF,{variables:Vz(Vz({},Jz),{},{accountId:t})}),u=d&&d.getLocationsPage.rows?d.getLocationsPage.rows.map(e=>({label:e.name,value:e.id})):[];return(0,Ze.jsxs)(ze.hh,{id:"CreateTagPropSheet",children:[r.notification.message&&(0,Ze.jsx)(ze.Eg,{name:"create-tag__notification",show:!0,color:r.notification.color,onClose:()=>{i(Vz(Vz({},r),{},{notification:{message:null,color:null}}))},children:r.notification.message}),(0,Ze.jsx)(ze.hh.HeaderRow,{children:"Update Tag"}),(0,Ze.jsxs)("form",{name:"create-Tag__form",children:[(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextInputColumn,{name:"tagName",disabled:r.isSubmitted,onChange:e=>{i(Vz(Vz({},r),{},{values:Vz(Vz({},r.values),{},{[e.target.name]:{text:e.target.value,error:null}})}))},value:r.values.tagName.text,error:r.values.tagName.error,label:"Tag Name"})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)($z,{container:!0,item:!0,span:12,children:(0,Ze.jsxs)(Wz,{id:"create-location-tags-label",name:"create-location-tags-label",children:["Locations ",(0,Ze.jsx)(qz,{children:"(Optional)"}),(0,Ze.jsx)(ze.KF,{id:"create-location-tag-multiselection",name:"create-location-tag-multiselection",pill:!1,isLoading:!1,components:{LoadingIndicator:()=>(0,Ze.jsx)(ze.Ip,{name:"tag-location-Loading",size:"xxs"})},onChange:e=>{const n=e.target.select;i(e=>Vz(Vz({},e),{},{values:Vz(Vz({},e.values),{},{locations:n})}))},isDisabled:!1,multiValueColor:"tertiary",value:r.values.locations,defaultOptions:u,loadOptions:async e=>{const{data:{getLocationsPage:n}}=await l.query({query:VF,variables:Vz(Vz({},Jz),{},{filters:{text:[{filterType:"text",type:"contains",filter:e,field:"name"}]},accountId:t})});return{options:n.rows?n.rows.map(e=>({label:e.name,value:e.id})):[],total:n.totalRows}}})]})})}),o.tag.includes("createAll")&&(0,Ze.jsxs)(ze.hh.Row,{align:"center",distribution:"between",children:[(0,Ze.jsx)(ze.hh.Column,{label:"System Level Tag",children:(0,Ze.jsx)(ze.Sc,{id:"isSystemLevelCheck",disabled:!0,onChange:c,name:"isSystemLevelTag",checked:r.values.isSystemLevelTag.checked})}),(0,Ze.jsx)(ze.hh.Column,{label:"Create Legal Register",children:(0,Ze.jsx)(ze.Sc,{id:"legislationCheck",onChange:c,name:"legislationTag",checked:r.values.legislationTag.checked})})]}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.ButtonColumn,{name:"create-tag__Button",submit:!0,disabled:""===r.values.tagName.text||r.isSubmitted,onClick:async e=>{e.preventDefault(),i(Vz(Vz({},r),{},{isSubmitted:!0}));const o=r.values;if(o.tagName.error=""===o.tagName.text?"".concat("Tag Name"," cannot be empty."):null,o.tagName.error)return void i(Vz(Vz({},r),{},{values:o}));await(async e=>{await l.mutate({mutation:gz,variables:{id:e,locationsId:r.values.locations.map(e=>e.value),accountId:t}})})(a.id);const c=o.tagName.text.trim();await s({variables:{id:a.id,tagName:c,accountId:t,locationsId:r.values.locations.map(e=>e.value),description:o.description.trim(),isSystemLevelTag:r.values.isSystemLevelTag.checked,legislationTag:r.values.legislationTag.checked}}),n("Tag: ".concat(c,"  has been updated!"),"success",s.id)},children:"Update Tag"})})]})]})};var Hz,Kz,Qz,Zz;function Xz(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function eG(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Xz(Object(t),!0).forEach(function(n){nG(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xz(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function nG(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function tG(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const aG=(0,Ge.default)(ze.fv)(Hz||(Hz=tG(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),rG=(0,Ge.default)(ze.JU)(Kz||(Kz=tG(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),iG=Ge.default.span(Qz||(Qz=tG(["\n  color: grey;\n  font-style: italic;\n"]))),oG=Ge.default.div(Zz||(Zz=tG(["\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.md.spacing),lG={offset:0,limit:10,filters:{},sort:[{field:"name",order:"asc"}]},sG=e=>{let{onSuccess:n,accountId:t}=e;const[a,r]=(0,g.useState)({hasError:!1,isSuccess:!1,values:{tagName:{text:"",error:""},isSystemLevelTag:{checked:!1,error:""},legislationTag:{checked:!1,error:""},description:"",locations:[]},notification:{message:"",color:"success",id:null}}),i=(0,N.m)(),o=rc(),[l]=(0,Ot.n)(fz,{onError:()=>{r(eG(eG({},a),{},{notification:{show:!0,message:"Something went wrong. If the problem persists, contact support.",color:"danger"},hasError:!0,isSuccess:!1,isSubmitted:!1}))},onCompleted:async e=>{const r=e.createTag,o=a.values.locations.map(e=>e.value);o&&o.length>0&&await i.mutate({mutation:gz,variables:{id:r.id,locationsId:a.values.locations.map(e=>e.value),accountId:t}}),n("The tag: ".concat(r.tagName," has been created!"),"success",r.id)}}),s=e=>{r(n=>eG(eG({},n),{},{values:eG(eG({},n.values),{},{[e.target.name]:{checked:!n.values[e.target.name].checked,error:null}})}))},{data:c,loading:d,error:u}=(0,h.IT)(VF,{variables:eG(eG({},lG),{},{accountId:t})}),p=c&&c.getLocationsPage.rows?c.getLocationsPage.rows.map(e=>({label:e.name,value:e.id})):[];return(0,Ze.jsxs)(ze.hh,{id:"CreateTagPropSheet",children:[a.notification.message&&(0,Ze.jsx)(ze.Eg,{name:"create-tag__notification",show:!0,color:a.notification.color,onClose:()=>{r(eG(eG({},a),{},{notification:{message:null,color:null}}))},children:a.notification.message}),(0,Ze.jsx)(ze.hh.HeaderRow,{children:"Create Tag"}),(0,Ze.jsxs)("form",{name:"create-Tag__form",children:[(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextInputColumn,{name:"tagName",disabled:a.isSubmitted,onChange:e=>{r(eG(eG({},a),{},{values:eG(eG({},a.values),{},{[e.target.name]:{text:e.target.value,error:null}})}))},value:a.values.tagName.text,error:a.values.tagName.error,label:"Tag Name"})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(aG,{container:!0,item:!0,span:12,children:(0,Ze.jsxs)(rG,{id:"create-location-tags-label",name:"create-location-tags-label",children:["Locations ",(0,Ze.jsx)(iG,{children:"(Optional)"}),u?(0,Ze.jsx)(ze.Kw,{error:u,children:e=>{let{icon:n}=e;return(0,Ze.jsx)(oG,{children:(0,Ze.jsx)(ze.Wz,{name:"location-tag__error",icon:n,title:"Locations failed to load"})})}}):(0,Ze.jsx)(ze.KF,{id:"create-location-tag-multiselection",name:"create-location-tag-multiselection",pill:!1,isLoading:d,components:{LoadingIndicator:()=>(0,Ze.jsx)(ze.Ip,{name:"tag-location-Loading",size:"xxs"})},onChange:e=>{const n=e.target.select;r(e=>eG(eG({},e),{},{values:eG(eG({},e.values),{},{locations:n})}))},isDisabled:d||u,multiValueColor:"tertiary",defaultOptions:p,value:a.values.locations,loadOptions:async e=>{const{data:{getLocationsPage:n}}=await i.query({query:VF,variables:eG(eG({},lG),{},{filters:{text:[{filterType:"text",type:"contains",filter:e,field:"name"}]},accountId:t})});return{options:n.rows?n.rows.map(e=>({label:e.name,value:e.id})):[],total:n.totalRows}}})]})})}),o.tag.includes("createAll")&&(0,Ze.jsxs)(ze.hh.Row,{align:"center",distribution:"between",children:[(0,Ze.jsx)(ze.hh.Column,{label:"System Level Tag",children:(0,Ze.jsx)(ze.Sc,{id:"isSystemLevelCheck",onChange:s,name:"isSystemLevelTag",checked:a.values.isSystemLevelTag.checked})}),(0,Ze.jsx)(ze.hh.Column,{label:"Create Legal Register",children:(0,Ze.jsx)(ze.Sc,{id:"legislationCheck",onChange:s,name:"legislationTag",checked:a.values.legislationTag.checked})})]}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.ButtonColumn,{name:"create-tag__Button",disabled:""===a.values.tagName.text||a.isSubmitted,onClick:e=>{e.preventDefault();const n=a.values;if(n.tagName.error=""===n.tagName.text?"".concat("Tag Name"," cannot be empty."):null,n.tagName.error)return void r(eG(eG({},a),{},{values:n}));const i=(0,Ai.A)();l({variables:{id:i,tagName:n.tagName.text.trim(),accountId:t,description:n.description.trim(),locationsId:a.values.locations.map(e=>e.value),isSystemLevelTag:a.values.isSystemLevelTag.checked,legislationTag:a.values.legislationTag.checked}}),r(eG(eG({},a),{},{isSubmitted:!0}))},children:"Create Tag"})})]})]})};var cG,dG,uG;function pG(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function mG(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pG(Object(t),!0).forEach(function(n){fG(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pG(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function fG(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function yG(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const gG=Ge.default.div(cG||(cG=yG(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.overlay.normal.background),bG=(0,Ge.default)(ze.$n)(dG||(dG=yG(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),hG=Ge.default.div(uG||(uG=yG(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),vG=e=>{let{accountId:n}=e;const t=rc(),[a,r]=(0,g.useState)({search:{value:"",error:""},createModal:{show:!1},updateModal:{show:!1,tag:null},selected:[],notification:{message:null,color:null},account:{id:n},shouldRefetch:!1}),i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;r(n=>mG(mG({},n),{},{createModal:{show:!1},updateModal:{show:!1},notification:{message:e.message,color:e.color,id:e.id}})),n&&n()},o=(e,n)=>"create"===e?r(e=>mG(mG({},e),{},{createModal:{show:!0}})):"update"===e?r(e=>mG(mG({},e),{},{updateModal:{show:!0,tag:n}})):void 0,l=()=>r(e=>mG(mG({},e),{},{notification:{message:null,color:null,id:null}})),s=e=>{o("update",e)},{data:c,error:d,loading:u,refetch:p}=(0,h.IT)(mz,{variables:{accountId:a.account.id},fetchPolicy:"network-only"}),m=(e=>{let{data:n,error:t,loading:r}=e;if(t)return(0,Ze.jsx)(hG,{children:(0,Ze.jsx)(ze.Kw,{error:t,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationTagsContainer__Error",icon:a,title:n,body:t})}})});if(r)return(0,Ze.jsx)(Vg,{name:"ConfigurationTagsContainer__Loading"});const i=(0,zt.sortBy)(((e,n)=>{if(!n)return e;const t=new gf.vj("tagName");return t.addIndex("tagName"),t.addDocuments(e),t.search(n)})(n.getTagsByAccountId,a.search.value),"tagName");return i.length?(0,Ze.jsx)(Ez,{tags:i,onUpdateTag:s}):(0,Ze.jsx)(nv,{name:"ConfigurationTagsContainer__NoResults",title:"There are no results for this search.",id:"tags-no-results"})})({data:c,error:d,loading:u});return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationTagsContainer",container:!0,fullHeight:!0,children:[(e=>{const{notification:n,createModal:t,account:r}=a;return(0,Ze.jsxs)(Ze.Fragment,{children:[n.message&&(0,Ze.jsxs)(ze.Eg,{name:"ConfigurationTagsContainer__Notification",show:!0,color:"success",onClose:l,children:[n.message,(0,Ze.jsx)("div",{hidden:!0,name:"ConfigurationTagsContainer__Notification__createtag_id",children:n.id})]}),t.show&&(0,Ze.jsx)(ze.aF,{span:5,size:"md",show:!0,name:"ConfigurationTagsContainer__Modal--create",dismissable:!0,onDismiss:i,height:"auto",maxHeight:"90vh",children:(0,Ze.jsx)(sG,{accountId:r.id,onSuccess:(n,t,a)=>i({message:n,color:t,id:a},e)})})]})})(p),(()=>{const{notification:e,updateModal:n,account:t}=a;return(0,Ze.jsxs)(Ze.Fragment,{children:[e.message&&(0,Ze.jsxs)(ze.Eg,{name:"ConfigurationTagsContainer__Notification",show:!0,color:"success",onClose:l,children:[e.message,(0,Ze.jsx)("div",{hidden:!0,name:"ConfigurationTagsContainer__Notification__createtag_id",children:e.id})]}),n.show&&(0,Ze.jsx)(ze.aF,{span:5,size:"md",show:!0,name:"ConfigurationTagsContainer__Modal--create",dismissable:!0,onDismiss:i,height:"auto",maxHeight:"90vh",children:(0,Ze.jsx)(Yz,{accountId:t.id,onSuccess:(e,n,t)=>i({message:e,color:n,id:t}),tag:a.updateModal.tag})})]})})(),(0,Ze.jsxs)(bh,{name:"ConfigurationTagsContainer__Controls",icon:"tags",iconColor:"primary",title:"Tags",children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationTagsContainer__Controls__Search",value:a.search.value,onChange:e=>r(mG(mG({},a),{},{search:mG(mG({},a.search),{},{value:e.target.value})})),hideButton:!0})}),(0,Ze.jsx)(bG,{name:"ConfigurationTagsContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>o("create"),children:"+ Create Tag"})]}),t.tag.includes("getAll")&&(0,Ze.jsx)(gG,{children:(0,Ze.jsx)(Kh,{value:a.account.id,onChange:e=>r(mG(mG({},a),{},{account:{id:e.id}}))})}),m]})};var xG,TG;function OG(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const kG=(0,D.J1)(xG||(xG=OG(["\n  query GetSchemesByAccountId($accountId: ID!) {\n    getProjectSchemes(accountId: $accountId) {\n      id\n      name\n      category {\n        id\n        name\n      }\n    }\n  }\n"]))),jG=(0,D.J1)(TG||(TG=OG(["\n  query GetSchemesPage(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getProjectSchemesPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n        description\n        category {\n          id\n          name\n        }\n      }\n    }\n  }\n"])));var CG,SG=t(11122),NG=t.n(SG);const wG=(0,D.J1)(CG||(CG=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetProjectCategories {\n    getProjectCategories {\n      id\n      name\n    }\n  }\n"])));var DG,AG,RG,PG;function LG(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const IG=(0,D.J1)(DG||(DG=LG(["\n  fragment SchemeFields on Scheme {\n    id\n    name\n    accountId\n    category {\n      id\n      name\n    }\n    description\n  }\n"]))),EG=(0,D.J1)(AG||(AG=LG(["\n  mutation CreateProjectScheme($name: String!, $accountId: ID!, $categoryId: ID!, $description: String) {\n    createProjectScheme(\n      input: { name: $name, accountId: $accountId, categoryId: $categoryId, description: $description }\n    ) {\n      ...SchemeFields\n    }\n  }\n  ","\n"])),IG),_G=(0,D.J1)(RG||(RG=LG(["\n  mutation UpdateProjectScheme($id: ID!, $name: String!, $accountId: ID!, $categoryId: ID!, $description: String) {\n    editProjectScheme(\n      input: { id: $id, name: $name, accountId: $accountId, categoryId: $categoryId, description: $description }\n    ) {\n      ...SchemeFields\n    }\n  }\n  ","\n"])),IG),FG=(0,D.J1)(PG||(PG=LG(["\n  mutation DeleteProjectScheme($id: ID!, $accountId: ID!) {\n    deleteProjectScheme(id: $id, accountId: $accountId)\n  }\n"])));var BG,UG,MG,VG,zG;function GG(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?GG(Object(t),!0).forEach(function(n){WG(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):GG(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function WG(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function qG(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const JG=Ge.default.div(BG||(BG=qG(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),YG=(0,Ge.default)(ze.fv)(UG||(UG=qG(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),HG=(0,Ge.default)(ze.JU)(MG||(MG=qG(["\n  margin: 0 ",";\n"])),e=>e.theme.geometry.xs.spacing),KG=Ge.default.div(VG||(VG=qG(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),QG=(0,Ge.default)(ze.DZ)(zG||(zG=qG(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),ZG=e=>{let{accountId:n,schemeToUpdate:t,refresh:a,dismiss:r}=e;const[i,o]=(0,g.useState)((null==t?void 0:t.name)||""),[l,s]=(0,g.useState)((null==t?void 0:t.description)||""),[c,d]=(0,g.useState)((null==t?void 0:t.category)||null),[u,p]=(0,g.useState)(!1),{showNotification:m}=vt(),[f,{loading:y}]=(0,Ot.n)(t?_G:EG),{data:b}=(0,h.IT)(wG),v=(0,g.useMemo)(()=>{var e;return(null==b||null===(e=b.getProjectCategories)||void 0===e?void 0:e.map(xi))||[]},[null==b?void 0:b.getProjectCategories]);return(0,Ze.jsx)(ze.aF,{size:"md",height:"auto",maxHeight:"90vh",show:!0,loading:y,dismissable:!0,name:"ConfigurationSchemesContainer__Modal--update",onDismiss:r,children:(0,Ze.jsx)(JG,{children:(0,Ze.jsxs)("form",{name:"create-or-update-scheme__form",onSubmit:e=>{(async e=>{e.preventDefault(),p(!0);const o={accountId:n,name:i,description:l,categoryId:null==c?void 0:c.id};try{await f({variables:t?$G($G({},o),{},{id:null==t?void 0:t.id}):o}),m("Scheme ".concat(i," has been successfully ").concat(t?"updated":"created"),"success"),a()}catch(e){m("Something went wrong. If the problem persists, contact support","danger"),console.error(e)}finally{r()}p(!1)})(e)},children:[(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(QG,{size:"lg",children:t?"Update Scheme":"Create Scheme"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(YG,{item:!0,children:[(0,Ze.jsx)(KG,{children:(0,Ze.jsx)(HG,{children:"Scheme Name"})}),(0,Ze.jsx)(ze.ks,{disabled:u,onChange:e=>o(null==e?void 0:e.target.value),name:"schemeName",value:i,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(YG,{item:!0,children:[(0,Ze.jsx)(KG,{children:(0,Ze.jsx)(HG,{children:"Description"})}),(0,Ze.jsx)(ze.ks,{disabled:u,onChange:e=>s(null==e?void 0:e.target.value),name:"schemeDescription",value:l,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(YG,{item:!0,children:[(0,Ze.jsx)(KG,{children:(0,Ze.jsx)(HG,{children:"Category"})}),(0,Ze.jsx)(ze.l6,{id:"Categories__Select",onChange:e=>d({id:e.target.value,name:e.target.name}),isDisabled:u,error:"",value:(null==c?void 0:c.id)||"",placeholder:"Start typing to search for a category",options:v,isClearable:!0})]})})]}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(YG,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{name:"create-or-update-scheme__button",color:"success",submit:!0,disabled:y||!i||!(null!=c&&c.id),children:t?"Update":"Create"})})})]})})})};var XG,e$;function n$(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const t$=Ge.default.div(XG||(XG=n$(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),a$=Ge.default.a(e$||(e$=n$(["\n  display: inline-block;\n  color: ",";\n  padding: 0 0 0 ",";\n  margin-right: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),r$=e=>{let{data:{id:n},onEdit:t,onDelete:a}=e;const r=rc(),i=r.scheme.find(e=>e.startsWith("edit")),o=r.scheme.find(e=>e.startsWith("delete"));return(0,Ze.jsxs)(t$,{children:[i&&(0,Ze.jsx)(a$,{onClick:()=>t(TR.UPDATE,n),children:(0,Ze.jsx)(ze.In,{name:"scheme-row__edit--".concat(n),icon:"pencil-alt"})}),o&&(0,Ze.jsx)(a$,{onClick:()=>a(TR.DELETE,n),children:(0,Ze.jsx)(ze.In,{name:"scheme-row__delete--".concat(n),icon:"trash-alt"})})]})};var i$,o$,l$;function s$(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const c$=(0,Ge.css)(i$||(i$=s$(["\n  font-family: inherit;\n  display: inline-block;\n  color: inherit;\n  opacity: 1;\n  &:hover {\n    text-decoration: none;\n  }\n  text-decoration: underline;\n  font-size: ",";\n"])),e=>e.theme.fonts.sm.size),d$=(0,Ge.default)(ze.Yq)(o$||(o$=s$(["\n  ","\n"])),c$),u$=(0,Ge.default)(p.Link)(l$||(l$=s$(["\n  ","\n"])),c$);var p$;const m$=(0,Ge.default)(u$)(p$||(p$=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-right: 4px;\n  &:hover {\n    color: ",";\n  }\n"])),e=>e.theme.colors.text.normal.background),f$=e=>{let{data:{relatedProjects:n}}=e;return(0,Ze.jsx)("div",{children:n.map(e=>(0,Ze.jsx)(m$,{to:"/projects/".concat(e.id),target:"_blank",rel:"noopener noreferrer",children:e.name},e.id))})};function y$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function g$(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y$(Object(t),!0).forEach(function(n){b$(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y$(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function b$(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function h$(e){let{setGridApi:n,fetchRows:t,onEdit:a,onDelete:r}=e;const i=Dd({autoFit:!0}),o={pagination:!0,paginationPageSize:25,rowModelType:"serverSide",defaultColDef:{resizable:!1,sortable:!0,filter:!0,cellStyle:{padding:"10px",height:"auto",wordBreak:"break-word",lineHeight:"20px"},autoHeight:!0},columnDefs:[{headerName:"Name",filter:"agTextColumnFilter",field:"name"},{headerName:"Description",filter:"agTextColumnFilter",field:"description"},{headerName:"Category",filter:!1,sortable:!1,field:"category.name"},{headerName:"Related Projects",filter:!1,sortable:!1,field:"relatedProjects",cellRenderer:"relatedProjects"},{headerName:"Projects Related",filter:!1,sortable:!1,hide:!0,field:"projectsRelated"},{headerName:"Actions",cellRenderer:"action",filter:!1,sortable:!1}],rowStyle:{width:"100%",display:"flex",alignItems:"center"},rowHeight:58},l={action:e=>(0,Ze.jsx)(r$,g$(g$({},e),{},{onEdit:a,onDelete:r})),relatedProjects:e=>(0,Ze.jsx)(f$,g$({},e))};return(0,Ze.jsx)(nD,g$(g$({},o),{},{cacheBlockSize:o.paginationPageSize,onFirstDataRendered:i.onFirstDataRendered,onFilterChanged:i.onFilterChanged,onSortChanged:i.onSortChanged,onColumnVisible:i.onSaveGridColumnState,onColumnPinned:i.onSaveGridColumnState,onColumnResized:i.onSaveGridColumnState,onColumnMoved:i.onSaveGridColumnState,onColumnRowGroupChanged:i.onSaveGridColumnState,onColumnValueChanged:i.onSaveGridColumnState,onColumnPivotChanged:i.onSaveGridColumnState,components:l,onGridReady:e=>{i.onGridReady(e),n({api:e.api}),e.api.setGridOption("serverSideDatasource",{async getRows(e){let{request:n,success:a,fail:r}=e;try{const e=ia(n.filterModel),{rows:r,totalRows:i}=await t({offset:n.startRow||0,limit:o.paginationPageSize,sort:oa(n.sortModel),filters:e});return a({rowData:r,rowCount:i}),{rows:r,totalRows:i}}catch(e){throw r(),e}}})}}))}var v$;function x$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function T$(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x$(Object(t),!0).forEach(function(n){O$(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x$(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function O$(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const k$=(0,Ge.default)(ze.fv)(v$||(v$=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),j$=()=>{const e=(0,N.m)(),n=rt(),t=rc(),{token:a}=at(),{showNotification:r}=vt(),[i,o]=(0,g.useState)(""),[l,s]=(0,g.useState)([]),[c,d]=(0,g.useState)(),[u,p]=(0,g.useState)({type:null,schemeId:null}),{data:m,loading:f}=Td(),y=null==m?void 0:m.projects,{error:b,refetch:v,networkStatus:x}=function(e){return(0,h.IT)(jG,{variables:{accountId:e}})}(n),[T]=(0,Ot.n)(FG),O=l.find(e=>e.id===u.schemeId),k=(0,g.useCallback)(()=>{var e,n;null==c||null===(e=c.api)||void 0===e||e.setColumnFilterModel("name",{filterType:"text",type:"contains",filter:i}),null==c||null===(n=c.api)||void 0===n||n.onFilterChanged()},[null==c?void 0:c.api,i]),j=(0,g.useCallback)(()=>{var e;return null==c||null===(e=c.api)||void 0===e?void 0:e.refreshServerSide({purge:!0})},[c]),C=(0,g.useMemo)(()=>(0,zt.debounce)(k,250),[k]);(0,g.useEffect)(()=>{C()},[i,C]);const S=(e,n)=>p({type:e,schemeId:n}),w=e=>{S(null,null),null!=e&&e.message&&r(null==e?void 0:e.message,null==e?void 0:e.color)},D=async t=>{const{data:{getProjectSchemesPage:{totalRows:r,rows:i}}}=await e.query({query:jG,variables:T$(T$({},t),{},{accountId:n}),fetchPolicy:"network-only"}),{data:{getProjects:o}}=await e.query({query:NG(),variables:{accountId:n,userId:a.sub},fetchPolicy:"network-only"});return s(e=>[...e,...i]),{rows:i.map(e=>T$(T$({},e),{},{relatedProjects:o.filter(n=>{var t;return(null==n||null===(t=n.scheme)||void 0===t?void 0:t.name)===e.name}).map(e=>({id:e.id,name:e.name})),projectsRelated:o.filter(n=>{var t;return(null==n||null===(t=n.scheme)||void 0===t?void 0:t.name)===e.name}).map(e=>e.name).join()})),totalRows:r}};return y?(0,Ze.jsxs)(ze.fv,{name:"ConfigurationSchemesContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{name:"ConfigurationSchemesContainer__Controls",icon:"list",iconColor:"primary",title:"Schemes",children:[(0,Ze.jsx)(k$,{span:6,container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationSchemesContainer__Controls__Search",value:i,onChange:e=>o(e.target.value),hideButton:!0})}),t.scheme.find(e=>e.startsWith("create"))&&(0,Ze.jsx)(k$,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(ze.$n,{name:"ConfigurationSchemesContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>S(TR.CREATE),children:"+ Add Scheme"})}),(0,Ze.jsx)(k$,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(MP,{fetchRows:D,gridApi:null==c?void 0:c.api,defaultExportFileName:"Schemes Exports",label:"Export Data",columnsToSkip:["Actions","Related Projects"]})})]}),(f&&3!==x||4===x)&&(0,Ze.jsx)(Vg,{name:"ConfigurationSchemesContainer__Loading"}),b&&(0,Ze.jsx)(ze.Kw,{error:b,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationSchemesContainer__Error",icon:a,title:n,body:t,retry:v})}}),(0,Ze.jsx)(h$,{fetchRows:D,setGridApi:d,onEdit:S,onDelete:S}),u.type===TR.CREATE&&(0,Ze.jsx)(ZG,{accountId:n,refresh:j,dismiss:w}),u.type===TR.UPDATE&&(0,Ze.jsx)(ZG,{accountId:n,schemeToUpdate:O,refresh:j,dismiss:w}),u.type===TR.DELETE&&(0,Ze.jsx)(Nh,{deleteObjectName:null==O?void 0:O.name,onConfirmClick:async()=>{try{await T({variables:{id:null==O?void 0:O.id,accountId:n}}),r("Scheme ".concat(null==O?void 0:O.name," has been successfully deleted"),"success"),j()}catch(e){r("An error has occurred. If the problem persists please contact support","danger"),console.error(e)}finally{w()}},onDismissClick:w})]}):(0,Ze.jsx)(nv,{name:"Schemes__NoResults",title:"Your account has no access to this section"})};var C$;const S$=(0,f.styled)("span")(C$||(C$=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: fit-content;\n"]))),N$=e=>{let{filtersApplied:n,resetGridState:t}=e;const a=(0,eg.A)();return(0,Ze.jsx)(zP.A,{title:"Clear filters",children:(0,Ze.jsx)(S$,{children:(0,Ze.jsx)(f.IconButton,{variant:"contained",title:a.formatMessage({id:"pages.data.overview.clear"}),color:"secondary",disabled:Boolean(!n),onClick:()=>null==t?void 0:t(),children:(0,Ze.jsx)(f.Icons.FilterAltOff,{})})})})};var w$,D$,A$,R$,P$,L$,I$;function E$(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _$=(0,D.J1)(w$||(w$=E$(["\n  fragment WasteHierarchyFields on WasteHierarchy {\n    id\n    accountId\n    prevention\n    preparingForReuse\n    recycling\n    otherRecovery\n    disposal\n    unknown\n    reference\n    isGlobal\n    startDate\n    endDate\n    treatmentProcess {\n      name\n      id\n    }\n    user {\n      id\n      first_name\n      last_name\n    }\n    wasteIn {\n      id\n      name\n    }\n  }\n"]))),F$=(0,D.J1)(D$||(D$=E$(["\n  query GetWasteHierarchiesData($accountId: ID!) {\n    getWasteHierarchiesByAccountId(accountId: $accountId) {\n      ...WasteHierarchyFields\n    }\n    getWasteInsByAccountId(id: $accountId) {\n      id\n      name\n    }\n  }\n  ","\n"])),_$),B$=(0,D.J1)(A$||(A$=E$(["\n  query GetWasteHierarchiesPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n    getWasteHierarchiesPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        ...WasteHierarchyFields\n      }\n      totalRows\n    }\n  }\n  ","\n"])),_$),U$=(0,D.J1)(R$||(R$=E$(["\n  query getTreatmentProcesses {\n    getAllWasteTreatmentProcesses {\n      id\n      name\n    }\n  }\n"]))),M$=(0,D.J1)(P$||(P$=E$(["\n  mutation UpsertHierarchy($input: UpsertCustomWasteHierarchyInput!) {\n    upsertCustomWasteHierarchy(input: $input) {\n      ...WasteHierarchyFields\n    }\n  }\n  ","\n"])),_$),V$=(0,D.J1)(L$||(L$=E$(["\n  mutation DeleteCustomWasteHierarchy($id: ID!) {\n    deleteCustomWasteHierarchy(id: $id)\n  }\n"]))),z$=(0,D.J1)(I$||(I$=E$(["\n  query GetDefaultWasteHierarchyByWasteTreatmentId($treatmentProcessId: ID!) {\n    getDefaultWasteHierarchyByWasteTreatmentId(treatmentProcessId: $treatmentProcessId) {\n      ...WasteHierarchyFields\n    }\n  }\n  ","\n"])),_$);var G$,$$,W$,q$;function J$(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Y$=(0,f.styled)("div")(G$||(G$=J$(["\n  margin-top: 32px;\n  display: flex;\n  flex-direction: row;\n  gap: 16px;\n  ","\n"])),e=>{let{fullWidth:n}=e;return n?"\n    width: 100%;\n    button {\n      flex: 1;  \n    }\n  ":"\n  justify-content: flex-end;\n  "}),H$=(0,f.styled)(f.Text)($$||($$=J$(["\n  min-width: 100%;\n  margin-bottom: 16px;\n"]))),K$=(0,f.styled)(f.TextField)(W$||(W$=J$(["\n  margin-top: 16px;\n  width: 100%;\n  & .MuiOutlinedInput-root {\n    background-color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.palette.background.paper}),Q$=(0,f.styled)(f.Text)(q$||(q$=J$(["\n  margin-top: 4px;\n  color: ",";\n  text-align: right;\n"])),e=>{let{theme:n}=e;return n.palette.text.secondary}),Z$=e=>{let{open:n,title:t,body:a="",confirmButtonText:r="Confirm",closeButtonText:i="Close",onConfirm:o,onClose:l,onCloseButtonClick:s,closeButtonTestId:c,confirmButtonTestId:d,confirmButtonColor:u="primary",withFullWidthButtons:p,withTextArea:m=!1,textAreaLabel:y="",disabled:b=!1}=e;const[h,v]=(0,g.useState)(""),[x,T]=(0,g.useState)(!1),O=(0,g.useCallback)(async()=>{T(!0);try{await(null==o?void 0:o(m?h:void 0)),l(!0)}finally{T(!1)}},[l,o,m,h]),k=(0,g.useCallback)(()=>{s?s():l(!1)},[s,l]);return(0,g.useEffect)(()=>{n||v("")},[n]),(0,Ze.jsxs)(f.Modal,{open:n,onClose:()=>l(!1),title:t,children:[(0,Ze.jsx)(H$,{typescale:"body",size:"medium",children:a}),m&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(K$,{label:y,value:h,onChange:e=>{const n=e.target.value;n.length<=255&&v(n)},multiline:!0,rows:3,inputProps:{maxLength:255}}),(0,Ze.jsxs)(Q$,{typescale:"body",size:"small",children:[h.length,"/",255," characters"]})]}),(0,Ze.jsxs)(Y$,{fullWidth:p,children:[(0,Ze.jsx)(f.Button,{onClick:k,variant:"outlined",color:"primary","data-testid":c,disabled:b,children:i}),(0,Ze.jsx)(f.Button,{onClick:O,variant:"contained",color:u,"data-testid":d,loading:x,disabled:b||x,children:r})]})]})};var X$,eW,nW,tW=t(17303);function aW(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function rW(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?aW(Object(t),!0).forEach(function(n){iW(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):aW(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function iW(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function oW(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const lW=(0,f.styled)("form")(X$||(X$=oW(["\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n  width: 100%;\n"]))),sW=(0,f.styled)(f.Button)(eW||(eW=oW(["\n  width: calc(50% - 12px);\n"]))),cW=(0,f.styled)(f.Grid)(nW||(nW=oW(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 24px;\n"]))),dW=e=>{let{onDismiss:n,onCompleted:t,onError:a,type:r,accountId:i}=e;const o=ms(),l=uA(),[s,c]=(0,g.useState)(!1),[d,u]=(0,g.useState)({name:"",departmentId:(0,Ai.A)()}),[p,m]=(0,g.useState)({name:null}),[y]=(0,Ot.n)(rA.DEPARTMENT===r?aA():ZD,{onError:a,onCompleted:e=>{t(e,r===rA.DEPARTMENT?e.createDepartment[0]:e.createAspectOption)},update(e,n){let{data:{createDepartment:t}}=n;l(e,t,i,o)}}),b=(0,g.useCallback)(async e=>{var t;e.preventDefault();const a=(e=>{const n={name:null};return e.name&&""!==e.name.trim()||(n.name="Name is required"),n})(d);if(null!=a&&null!==(t=a.name)&&void 0!==t&&t.length)return m(a);c(!0);const o=d.name.trim(),l=rA.DEPARTMENT===r?{name:o,accountId:i,departmentId:d.departmentId}:{name:o,type:r,accountId:i};await y({variables:{input:l}}),c(!1),n()},[i,d,y,n,r]),h=(0,g.useCallback)(e=>{e.target.value&&m(rW(rW({},p),{},{name:null})),u(rW(rW({},d),{},{name:e.target.value,departmentId:(0,Ai.A)()}))},[d,p]);return(0,Ze.jsx)(f.Modal,{onClose:n,title:"Create ".concat(iA[r]),open:!0,children:(0,Ze.jsxs)(lW,{name:"create-option__form",children:[(0,Ze.jsx)(f.TextField,{label:"Name",disabled:s,type:"text",onChange:h,name:"name",value:d.name,error:!(null==p||!p.name),helperText:(null==p?void 0:p.name)||""}),(0,Ze.jsxs)(cW,{children:[(0,Ze.jsx)(sW,{variant:"outlined",onClick:n,children:"Cancel"}),(0,Ze.jsx)(sW,{onClick:b,variant:"contained",children:"Create"})]})]})})},uW=e=>{let{onError:n,onComplete:t,passedAccountId:a,showCreateDepartment:r,setShowCreateDepartment:i}=e;const o=rt(),l=a||o,s=(0,g.useCallback)((e,n)=>{null==t||t(e,n),i(!1)},[t,i]);return r?(0,Ze.jsx)(dW,{accountId:l,type:rA.DEPARTMENT,onDismiss:()=>i(!1),onError:e=>null==n?void 0:n(e),onCompleted:s}):(0,Ze.jsx)(Ze.Fragment,{})};var pW,mW,fW;function yW(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const gW=(0,f.styled)("form")(pW||(pW=yW(["\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n  width: 100%;\n"]))),bW=(0,f.styled)(f.Button)(mW||(mW=yW(["\n  width: calc(50% - 12px);\n"]))),hW=(0,f.styled)(f.Grid)(fW||(fW=yW(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 24px;\n"]))),vW=e=>{switch(e){case tB:return"regions";case aB:return"buildingTypes";case nB:return"tenures";default:return""}},xW=e=>{let{optionType:n=nB,accountId:t,selectedOption:a,label:r,setSelectedOption:i}=e;const[o,l]=(0,g.useState)(!1),[s,c]=(0,g.useState)(""),{showNotification:d}=vt(),u=rt(),{data:p}=(0,h.IT)(XF,{variables:{accountId:t||u}}),[m]=(0,Ot.n)(eB,{onCompleted:()=>{l(!1),c(""),d("Option has been created.")},onError:()=>{d("Something went wrong please try again later.","danger")}}),y=[{name:"Create New...",id:"NEW"},{name:"Not Specified",id:null},...(0,zt.get)(p,"getLocationMetadataOptionsForAccount.".concat(vW(n)),[])].map(e=>({label:e.name,value:e.id}));return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Select,{label:r,options:y,value:a,onChange:e=>(e=>{"NEW"===e.value?l(!0):i(e)})(e)}),o&&(0,Ze.jsx)(f.Modal,{title:"Create Option",open:!0,onClose:()=>l(!1),children:(0,Ze.jsxs)(gW,{children:[(0,Ze.jsx)(f.TextField,{onChange:e=>c(e.target.value),label:"Name (Required)",name:"name",value:s}),(0,Ze.jsxs)(hW,{container:!0,children:[(0,Ze.jsx)(bW,{variant:"outlined",onClick:()=>l(!1),children:"Cancel"}),(0,Ze.jsx)(bW,{variant:"contained",onClick:()=>(()=>{if(s){const e=(0,Ai.A)();m({variables:{id:e,accountId:t||u,name:s,type:n},refetchQueries:["GetLocationMetaOptions"]}),i({value:e,label:s})}else d("Name is a required field.","danger")})(),children:"Create"})]})]})})]})};var TW,OW,kW,jW,CW;function SW(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const NW=(0,f.styled)(f.Grid)(TW||(TW=SW(["\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n  width: 100%;\n"]))),wW=(0,f.styled)(NW)(OW||(OW=SW([""]))).withComponent("form"),DW=(0,f.styled)(f.Grid)(kW||(kW=SW(["\n  display: grid;\n  grid-template-columns: repeat(2, 1fr);\n  align-items: center;\n  justify-content: space-between;\n  gap: 24px;\n\n  & > *:last-child {\n    grid-column: span 2;\n  }\n"]))),AW=(0,f.styled)(f.Grid)(jW||(jW=SW(["\n  display: flex;\n  align-items: center;\n  gap: 24px;\n"]))),RW=(0,f.styled)(f.Text)(CW||(CW=SW(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.error});function PW(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function LW(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?PW(Object(t),!0).forEach(function(n){IW(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):PW(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function IW(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const EW=e=>{var n,t,a,r,i;let{accountId:o,selectedOptions:l,setSelectedOptions:s}=e;const c=Od(o),d=null==c||null===(n=c.departments)||void 0===n?void 0:n.map(e=>{var n,t;return{value:null!==(n=e.id)&&void 0!==n?n:"",label:null!==(t=e.name)&&void 0!==t?t:""}}),u=null==l||null===(t=l.departments)||void 0===t?void 0:t.map(e=>{var n,t;return{value:null!==(n=e.id)&&void 0!==n?n:"",label:null!==(t=e.name)&&void 0!==t?t:""}}),{departmentMultipleSelect:p,showCreateDepartment:m,setShowCreateDepartment:y}=((e,n)=>{const[t,a]=(0,g.useState)(!1),r=rc().account.some(e=>e.startsWith("createDepartment")),i=(0,g.useMemo)(()=>{const t=[...e];return n&&!Array.isArray(n)&&(0,zt.find)(e,{id:n})&&t.unshift({value:"notSelected",label:"Not selected"}),r&&t.unshift({value:"NEW",label:"Create New ..."}),t},[e,n,r]),o=(0,g.useMemo)(()=>Array.isArray(n)?n||[]:n,[n]),l=(0,g.useCallback)((e,n,t)=>{"NEW"===(null==e?void 0:e.value)?n():t(e)},[]),s=(0,g.useCallback)((e,n)=>{l(e,()=>a(!0),e=>n({target:{name:"department",value:e.target.value}}))},[l]),c=(0,g.useCallback)(e=>(0,Ze.jsx)(f.Select,{options:i,value:o?(0,zt.find)(i,{value:o}):{},onChange:n=>s(n,e),placeholder:"Select..."}),[s,i,o]),d=(0,g.useCallback)(e=>(0,Ze.jsx)(f.MultiSelect,{options:i,value:o,label:"Departments (Optional)",placeholder:"Select...",newValue:"NEW",onCreate:()=>a(!0),onChange:n=>e(n)}),[i,o]);return{departmentSelect:c,departmentMultipleSelect:d,showCreateDepartment:t,setShowCreateDepartment:a}})(d,u);return(0,Ze.jsxs)(NW,{container:!0,children:[(0,Ze.jsx)(f.TextField,{label:"Location Code (Location ID / ePIM) (Optional)",onChange:e=>s(LW(LW({},l),{},{code:e.target.value})),value:l.code||""}),p(e=>{s(LW(LW({},l),{},{departments:e.map(e=>({id:e.value,name:e.label}))}))}),(0,Ze.jsx)(xW,{label:"Tenure (Optional)",accountId:o,optionType:nB,selectedOption:(null===(a=l.tenure)||void 0===a?void 0:a.value)||"",setSelectedOption:e=>s(LW(LW({},l),{},{tenure:e}))}),(0,Ze.jsx)(xW,{label:"Region (Optional)",accountId:o,optionType:tB,selectedOption:(null===(r=l.region)||void 0===r?void 0:r.value)||"",setSelectedOption:e=>s(LW(LW({},l),{},{region:e}))}),(0,Ze.jsx)(xW,{label:"Building Type (Optional)",accountId:o,optionType:aB,selectedOption:(null===(i=l.buildingType)||void 0===i?void 0:i.value)||"",setSelectedOption:e=>s(LW(LW({},l),{},{buildingType:e}))}),(0,Ze.jsx)(f.TextField,{label:"Floor Space (Square Meters) (Optional)",onChange:e=>s(LW(LW({},l),{},{floorSpace:e.target.value})),type:"number",inputProps:{min:0},value:l.floorSpace||""}),(0,Ze.jsx)(f.DatePicker,{label:"Occupation Start Date (Optional)",onChange:e=>s(LW(LW({},l),{},{startDate:e})),name:"startDate",value:l.startDate||""}),(0,Ze.jsx)(f.DatePicker,{label:"Occupation End Date (Optional)",onChange:e=>s(LW(LW({},l),{},{endDate:e})),name:"endDate",value:(null==l?void 0:l.endDate)||""}),(0,Ze.jsx)(f.DatePicker,{label:"Lease Renewal Date (Optional)",onChange:e=>s(LW(LW({},l),{},{leaseRenewalDate:e})),name:"leaseDate",value:(null==l?void 0:l.leaseRenewalDate)||""}),(0,Ze.jsx)(f.TextField,{label:"Shared Emission Percentage (Optional)",inputProps:{min:0,max:100},onChange:e=>s(LW(LW({},l),{},{sharedEmissionPercentage:e.target.value})),value:(null==l?void 0:l.sharedEmissionPercentage)||"",type:"number"}),(0,Ze.jsx)(f.TextField,{label:"Notes (Optional)",onChange:e=>s(LW(LW({},l),{},{notes:e.target.value})),value:(null==l?void 0:l.notes)||""}),(0,Ze.jsx)(uW,{showCreateDepartment:m,setShowCreateDepartment:y,passedAccountId:o,onComplete:()=>{},onError:()=>{}})]})},_W=e=>{const{id:n,address1:t,address2:a,address3:r,city:i,postcode:o,phone:l,disabled:s,handleChange:c,countryList:d,selectCountry:u,handleSelectChange:p}=e;return(0,Ze.jsxs)(DW,{container:!0,children:[(0,Ze.jsx)(f.TextField,{id:"".concat(n,"-address1"),disabled:s,name:"address1",onChange:c,label:"Address 1",value:t.text,error:!!t.error,helperText:t.error}),(0,Ze.jsx)(f.TextField,{id:"".concat(n,"-address2"),disabled:s,name:"address2",onChange:c,label:" Address 2 (Optional)",value:a.text,error:!!a.error,helperText:a.error}),(0,Ze.jsx)(f.TextField,{id:"".concat(n,"-address3"),disabled:s,name:"address3",onChange:c,label:"Address 3 (Optional)",value:r.text,error:!!r.error,helperText:r.error}),(0,Ze.jsx)(f.TextField,{id:"".concat(n,"-city"),disabled:s,name:"city",onChange:c,label:"City",value:i.text,error:!!i.error,helperText:i.error}),(0,Ze.jsx)(f.TextField,{id:"".concat(n,"-postcode"),disabled:s,name:"postcode",onChange:c,label:"Postcode",value:o.text,error:!!o.error,helperText:o.error}),(0,Ze.jsx)(f.Select,{id:"".concat(n,"-country"),disabled:s,name:"selectCountry",onChange:e=>p(e),value:(null==u?void 0:u.value)||"",options:d,label:"Country"}),(0,Ze.jsx)(f.TextField,{id:"".concat(n,"-phone"),disabled:s,name:"phone",onChange:c,label:"Phone (Optional)",value:l.text,error:!!l.error,helperText:l.error})]})};function FW(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function BW(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?FW(Object(t),!0).forEach(function(n){UW(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):FW(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function UW(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const MW=e=>{var n;const{accountId:t,onSuccess:a,refreshGrid:r,onUpdate:i,showModal:o,locationPoints:l={wasteOut:!1,wasteIn:!1}}=e,{showNotification:s}=vt(),{countryList:c,defaultCountry:d}=ku(),[u,p]=(0,g.useState)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{hasError:!1,isSuccess:!1,values:{locationId:{text:""},locationName:{text:"",error:""},address1:{text:"",error:""},address2:{text:"",error:""},address3:{text:"",error:""},city:{text:"",error:""},postcode:{text:"",error:""},phone:{text:"",error:""},selectCountry:null,locationPoints:{wasteOut:{checked:(0,zt.get)(e,"wasteOut",!1)},wasteIn:{checked:(0,zt.get)(e,"wasteIn",!1)}},tags:[],aliases:[]},isSubmitted:!1}}(l)),[m,y]=(0,g.useState)(""),[b,v]=(0,g.useState)({code:null,tenure:null,region:null,buildingType:null,floorSpace:null,startDate:null,endDate:null,leaseRenewalDate:null,notes:null,departments:[]}),x=(0,g.useCallback)(e=>{e.persist(),p(n=>BW(BW({},n),{},{values:BW(BW({},n.values),{},{[e.target.name]:BW(BW({},n.values[e.target.name]),{},{text:e.target.value})})}))},[]),T=(0,g.useCallback)(e=>{p(n=>BW(BW({},n),{},{values:BW(BW({},n.values),{},{selectCountry:e})}))},[]),O=(0,g.useCallback)(e=>{p(e=>BW(BW({},e),{},{hasError:!0,isSuccess:!1,isSubmitted:!1})),e instanceof tW.K4&&s("Something went wrong! Please try again later.","danger")},[s]),k=(0,g.useCallback)(e=>{p(n=>BW(BW({},n),{},{values:BW(BW({},n.values),{},{locationPoints:BW(BW({},n.values.locationPoints),{},{[e.target.name]:{checked:e.target.checked}})})}))},[]),j=(0,g.useCallback)((e,n)=>{i&&i(e,n)},[i]),{loading:C,error:S,data:N}=(0,h.IT)(zF,{variables:{accountId:t}}),w=C||S?[]:N.getTagsByAccountId.map(e=>({label:e.tagName,value:e.id})),D=!((0,zt.get)(l,"wasteIn",!1)||(0,zt.get)(l,"wasteOut",!1)),[A]=(0,Ot.n)(BF,{onError:O,onCompleted:e=>{p(n=>BW(BW({},n),{},{createdAccountId:e.createLocationWithLocationPoints.id})),a("The location ".concat(e.createLocationWithLocationPoints.name," has been created!"),"success",o?e.createLocationWithLocationPoints.id:[e.createLocationWithLocationPoints.id,e.createLocationWithLocationPoints.address.id],e.createLocationWithLocationPoints),r()},update:j}),R=(0,g.useCallback)(e=>{var n,a,r,i,o;e.preventDefault();const{values:{locationName:l,address1:s,city:c,postcode:m,phone:f}}=u,g=LB(l.text,"Location Name")||"",h=LB(s.text,"Address 1")||"",v=LB(c.text,"City")||"",x=LB(m.text,"Postcode")||((0,LA.isPostalCode)(m.text,"any")?"":"Please enter a valid postcode."),T=f.text?nF(f.text)?"":"Please enter a valid phone number using only characters 0 - 9":"";if(g||h||v||x||T)return p(e=>BW(BW({},e),{},{values:BW(BW({},e.values),{},{locationName:BW(BW({},e.values.locationName),{},{error:g}),address1:BW(BW({},e.values.address1),{},{error:h}),city:BW(BW({},e.values.city),{},{error:v}),postcode:BW(BW({},e.values.postcode),{},{error:x}),phone:BW(BW({},e.values.phone),{},{error:T})})})),y("Please correct the errors in the form."),!1;const O=BW(BW({locId:(0,Ai.A)(),locName:u.values.locationName.text,accId:t,add1:u.values.address1.text||null,add2:u.values.address2.text||null,add3:u.values.address3.text||null,city:u.values.city.text,post:u.values.postcode.text,phone:u.values.phone.text?u.values.phone.text.trim():null,wasteOut:u.values.locationPoints.wasteOut.checked?(0,Ai.A)():null,wasteIn:u.values.locationPoints.wasteIn.checked?(0,Ai.A)():null,tags:u.values.tags.map(e=>e.value),aliases:u.values.tags.map(e=>e.value),countryId:(null===(n=u.values.selectCountry)||void 0===n?void 0:n.value)||(null==d?void 0:d.value)},b),{},{tenure:null==b||null===(a=b.tenure)||void 0===a?void 0:a.value,region:null==b||null===(r=b.region)||void 0===r?void 0:r.value,buildingType:null==b||null===(i=b.buildingType)||void 0===i?void 0:i.value,departments:(null==b||null===(o=b.departments)||void 0===o?void 0:o.map(e=>null==e?void 0:e.id))||[],startDate:zi(null==b?void 0:b.startDate),endDate:zi(null==b?void 0:b.endDate),leaseRenewalDate:zi(null==b?void 0:b.leaseRenewalDate)});A({variables:O}),p(e=>BW(BW({},e),{},{isSubmitted:!0}))},[t,null==d?void 0:d.value,b,u,A]),P=S instanceof tW.K4?null==S?void 0:S.message:S;return(0,Ze.jsx)(NW,{container:!0,children:(0,Ze.jsxs)(wW,{name:"create-location__form",children:[(0,Ze.jsx)(f.TextField,{name:"locationName",disabled:u.isSubmitted,label:"Location Name",onChange:x,value:u.values.locationName.text,error:!!u.values.locationName.error,helperText:u.values.locationName.error}),(0,Ze.jsx)(_W,{id:"LocationAddressPropertySheet",name:"LocationAddressPropertySheet",address1:u.values.address1,address2:u.values.address2,address3:u.values.address3,city:u.values.city,postcode:u.values.postcode,phone:u.values.phone,handleChange:x,handleSelectChange:e=>T(e),disabled:u.isSubmitted,countryList:c||[],selectCountry:u.values.selectCountry||d}),D&&(0,Ze.jsxs)(AW,{container:!0,children:[(0,Ze.jsx)(f.Checkbox,{label:"Waste Out",disabled:u.isSubmitted,name:"wasteOut",onChange:k,checked:u.values.locationPoints.wasteOut.checked}),(0,Ze.jsx)(f.Checkbox,{disabled:u.isSubmitted,label:" Waste In",name:"wasteIn",onChange:k,checked:u.values.locationPoints.wasteIn.checked})]}),(0,Ze.jsx)(f.MultiSelect,{name:"create-location-tag-multiselection",isLoading:C,value:null==u||null===(n=u.values)||void 0===n?void 0:n.tags,label:"Tags (Optional)",onChange:e=>{return n=e,void p(e=>BW(BW({},e),{},{values:BW(BW({},e.values),{},{tags:n})}));var n},error:!!S,helperText:P||"",disabled:!(!C&&!S),options:w}),(0,Ze.jsx)(EW,{accountId:t,selectedOptions:b,setSelectedOptions:v}),m&&(0,Ze.jsx)(RW,{typescale:"body",size:"medium",children:m}),(0,Ze.jsx)(f.Button,{variant:"contained",onClick:R,disabled:!u.values.locationName.text||u.isSubmitted,children:"Create Location"})]})})},VW=[{order:"asc",field:"name"}],zW="Create new location...",GW=e=>{let{onChange:n,refetch:t,error:a,loading:r,value:i,createNew:o,accountId:l,loadMore:s,label:c,isMulti:d,options:u,locationPoints:p,accessor:m="",disabled:y}=e;const{showNotification:b}=vt(),[h,v]=(0,g.useState)(!1),x=(0,g.useCallback)(e=>{e.value===zW?v(!0):n(e)},[n]),T=(0,g.useCallback)(async(e,n,a,r)=>{const i={text:[{filterType:Vt.pe.Text,type:Vt.II.Contains,filter:"",field:"name"}]},o={accountId:l,sort:VW,filters:i};await t(o),b(e,n);const s={value:(0,zt.get)(r,"".concat(m,"id")),label:(0,zt.get)(r,"".concat(m,"name"))};v(!1),x(s)},[m,l,x,t,b]),O=a instanceof Error?null==a?void 0:a.message:a;return(0,Ze.jsxs)(Ze.Fragment,{children:[h&&(0,Ze.jsx)(f.Modal,{open:h,title:"Add new location",onClose:()=>v(!1),children:(0,Ze.jsx)(MW,{accountId:l,onSuccess:T,locationPoints:p})}),(0,Ze.jsx)(f.AutoComplete,{placeholder:'"Begin typing to find locations"',options:u,helperText:O||"",onChange:x,loadMore:s,isLoading:r,value:i,isMulti:d,createOption:o?zW:void 0,label:c,error:null==a?void 0:a.toString(),disabled:y})]})};var $W,WW,qW;function JW(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const YW=(0,D.J1)($W||($W=JW(["\n  query GetLocationsByAccountId($accountId: ID!, $offset: Int = 0, $limit: Int = 25, $sort: [SortCommand!] = [], $filters: Filters = {}) {\n    getLocationsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n      }\n    }\n  }\n"]))),HW=(0,D.J1)(WW||(WW=JW(["\n  query GetWasteInsByAccountId($id: ID!, $offset: Int = 0, $limit: Int = 25, $sort: [SortCommand!] = [], $filters: Filters = {}) {\n    getWasteInsByAccountId(id: $id, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      id\n      name\n    }\n  }\n"]))),KW=(0,D.J1)(qW||(qW=JW(["\n  query GetWasteOutsByAccountId($id: ID!, $offset: Int = 0, $limit: Int = 25, $sort: [SortCommand!] = [], $filters: Filters = {}) {\n    getWasteOutsByAccountId(id: $id, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      id\n      name\n    }\n  }\n"])));function QW(){let{onQueryCompleted:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=rt(),[t,a]=(0,g.useState)(!1),{data:r,refetch:i,fetchMore:o}=(0,h.IT)(YW,{variables:{accountId:n,sort:VW,limit:Za},onCompleted:e,notifyOnNetworkStatusChange:!0});return{options:(0,g.useMemo)(()=>Ti(null==r?void 0:r.getLocationsPage.rows),[r]),loadMore:async(e,t,r)=>{a(!0);try{const a={accountId:n,offset:t,limit:e};r&&(a.filters={text:[{filterType:Vt.pe.Text,type:Vt.II.Contains,filter:r,field:"name"}]});const i=await o({variables:a});return{total:i.data.getLocationsPage.totalRows,options:Ti(i.data.getLocationsPage.rows)}}finally{a(!1)}},loading:t,refetch:i}}const ZW=e=>{let{value:n,name:t,isMulti:a,onChange:r,error:i,label:o,createNew:l}=e;const s=rt(),{loading:c,options:d,refetch:u,loadMore:p}=QW({onQueryCompleted:e=>{var t;const a=(null==e||null===(t=e.getLocationsPage)||void 0===t?void 0:t.rows)||[],r=Ti(a);null!=n&&n.value&&!r.find(e=>{let{value:t}=e;return t===n.value})&&r.unshift(n)}});return(0,Ze.jsx)(GW,{name:t,value:n,label:o,error:i,loading:c,refetch:u,isMulti:a,options:d,onChange:r,loadMore:p,createNew:l,accountId:s})},XW=e=>{let{value:n,name:t,onChange:a,error:r,label:i,createNew:o,createNewAccessor:l}=e;const s=rt(),{data:c,refetch:d,loading:u,fetchMore:p}=(0,h.IT)(KW,{notifyOnNetworkStatusChange:!0,variables:{id:s,sort:VW,limit:Za,filters:{text:[{filterType:Vt.pe.Text,type:Vt.II.Contains,filter:"",field:"name"}]}}}),m=(0,g.useMemo)(()=>Ti(null==c?void 0:c.getWasteOutsByAccountId),[c]),f=(0,g.useCallback)(async(e,n,t)=>{const a={id:s,offset:n,limit:e};t&&(a.filters={text:[{filterType:Vt.pe.Text,type:Vt.II.Contains,filter:t,field:"name"}]});const r=await p({variables:a});return{total:1/0,options:Ti(r.data.getWasteOutsByAccountId)}},[p,s]);return(0,Ze.jsx)(GW,{name:t,value:n,error:r,label:i,options:m,refetch:d,loading:u,onChange:a,loadMore:f,createNew:o,accountId:s,accessor:l,locationPoints:{wasteOut:!0}})},eq=e=>{let{value:n,name:t,error:a,label:r,onChange:i,createNew:o,createNewAccessor:l,disabled:s}=e;const c=rt(),{data:d,refetch:u,loading:p,fetchMore:m}=(0,h.IT)(HW,{notifyOnNetworkStatusChange:!0,variables:{id:c,sort:VW,limit:Za,filters:{text:[{filterType:Vt.pe.Text,type:Vt.II.Contains,filter:"",field:"name"}]}}}),f=(0,g.useMemo)(()=>Ti(null==d?void 0:d.getWasteInsByAccountId),[d]),y=(0,g.useCallback)(async(e,n,t)=>{const a={offset:n,limit:e,id:c};t&&(a.filters={text:[{filterType:Vt.pe.Text,type:Vt.II.Contains,filter:t,field:"name"}]});const r=await m({variables:a});return{total:1/0,options:Ti(r.data.getWasteInsByAccountId)}},[m,c]);return(0,Ze.jsx)(GW,{name:t,value:n,error:a,label:r,options:f,refetch:u,loading:p,onChange:i,loadMore:y,createNew:o,accountId:c,accessor:l,locationPoints:{wasteIn:!0},disabled:s})};var nq;const tq=(0,D.J1)(nq||(nq=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetTreatmentProcesses {\n    getAllWasteTreatmentProcesses {\n      id\n      name\n    }\n  }\n"])));function aq(e){let{value:n,onChange:t,error:a}=e;const{data:r,loading:i,error:o}=(0,h.IT)(tq);return(0,Ze.jsx)(ze.l6,{placeholder:"Please select treatment process",value:n,options:Ti(null==r?void 0:r.getAllWasteTreatmentProcesses),error:a||o,isLoading:i,onChange:t})}const rq=e=>{let{value:n,onChange:t,label:a,error:r,disabled:i}=e;const{data:o,loading:l,error:s}=(0,h.IT)(tq),c=r||s,d=c instanceof tW.K4?c.message:c,u=Ti(null==o?void 0:o.getAllWasteTreatmentProcesses);return(0,Ze.jsx)(f.Select,{placeholder:"Please select treatment process",value:n,label:a,isLoading:l,options:u,error:!!c,helperText:d||"",onChange:e=>t(e),disabled:i})};function iq(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function oq(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?iq(Object(t),!0).forEach(function(n){lq(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):iq(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function lq(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const sq=e=>{let{onClose:n,onSuccess:t,accountId:a,initialValues:r}=e;const{showNotification:i}=vt(),o=!(null==r||!r.wasteHierarchyId),[l,s]=(0,g.useState)(r||{wasteHierarchyId:null,treatmentProcessId:"",wasteInId:"",prevention:0,preparingForReuse:0,recycling:0,otherRecovery:0,disposal:0,unknown:0,startDate:null,endDate:null,reference:"",isGlobal:!1}),[c,{loading:d,error:u}]=(0,Ot.n)(M$,{onCompleted:()=>{i("Waste hierarchy submitted successfully","success"),n(),null==t||t()},onError:e=>{i("Error: ".concat(e.message),"danger")}}),p=e=>{const{name:n,value:t}=e.target;s(e=>oq(oq({},e),{},{[n]:t}))};return(0,Ze.jsx)(f.Modal,{open:!0,onClose:n,title:"Waste Hierarchy",children:(0,Ze.jsxs)(f.Grid,{container:!0,spacing:3,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(rq,{label:"Treatment process",onChange:e=>{s(n=>oq(oq({},n),{},{treatmentProcessId:e.value}))},value:l.treatmentProcessId,disabled:o})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(eq,{label:"Waste in location",onChange:e=>{s(n=>oq(oq({},n),{},{wasteInId:e.value}))},value:l.wasteInId||void 0,disabled:o})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Checkbox,{label:"Global",onChange:e=>{s(n=>oq(oq({},n),{},{isGlobal:e.target.checked}))},checked:Boolean(l.isGlobal),disabled:o})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.DatePicker,{label:"Start Date",name:"startDate",value:l.startDate?new Date(l.startDate):void 0,onChange:e=>s(n=>oq(oq({},n),{},{startDate:e}))})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.DatePicker,{label:"End Date",name:"endDate",value:l.endDate?new Date(l.endDate):void 0,onChange:e=>s(n=>oq(oq({},n),{},{endDate:e}))})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{label:"Prevention %",name:"prevention",type:"number",value:String(l.prevention),onChange:p})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{label:"Preparing for Reuse %",name:"preparingForReuse",type:"number",value:String(l.preparingForReuse),onChange:p})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{label:"Recycling %",name:"recycling",type:"number",value:String(l.recycling),onChange:p})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{label:"Other Recovery %",name:"otherRecovery",type:"number",value:String(l.otherRecovery),onChange:p})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{label:"Disposal %",name:"disposal",type:"number",value:String(l.disposal),onChange:p})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{label:"Unknown %",name:"unknown",type:"number",value:String(l.unknown),onChange:p})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{label:"Reference",name:"reference",value:l.reference,onChange:p})}),u&&(0,Ze.jsx)(f.Text,{color:"error",textAlign:"center",children:u.message}),(0,Ze.jsxs)(f.Grid,{size:12,container:!0,spacing:2,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,onClick:n,disabled:d,children:"Close"})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,variant:"contained",color:"primary",onClick:e=>{e.preventDefault(),100===[Number(l.prevention)||0,Number(l.preparingForReuse)||0,Number(l.recycling)||0,Number(l.otherRecovery)||0,Number(l.disposal)||0,Number(l.unknown)||0].reduce((e,n)=>e+n,0)?c({variables:{input:{accountId:a,wasteHierarchyId:l.wasteHierarchyId,treatmentProcessId:l.treatmentProcessId,wasteInId:l.wasteInId||null,prevention:Number(l.prevention)||0,preparingForReuse:Number(l.preparingForReuse)||0,recycling:Number(l.recycling)||0,otherRecovery:Number(l.otherRecovery)||0,disposal:Number(l.disposal)||0,unknown:Number(l.unknown)||0,startDate:l.startDate?Wt()(l.startDate).format("YYYY-MM-DD"):null,endDate:l.endDate?Wt()(l.endDate).format("YYYY-MM-DD"):null,reference:l.reference,isGlobal:l.isGlobal}}}):i("Percentages must sum to 100%","danger")},disabled:d,children:"Submit"})})]})]})})};var cq,dq;function uq(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pq(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uq(Object(t),!0).forEach(function(n){mq(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uq(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mq(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function fq(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yq=(0,f.styled)(f.Grid)(cq||(cq=fq(["\n  display: flex;\n  align-items: center;\n  gap: 8px;\n"]))),gq=(0,f.styled)(f.AgGrid)(dq||(dq=fq(["\n  height: calc(100vh - 216px); // header + page title height;\n  padding-bottom: 2px; // border bottom and shadow to show properly\n"]))),bq=()=>{var e,n;const t=(0,g.useRef)(null),a=rt(),{showNotification:r}=vt(),[i,o]=(0,g.useState)(null),[l,s]=(0,g.useState)(!1),[c,d]=(0,g.useState)(void 0),{canCreateWasteHierarchy:u,canEditWasteHierarchy:p,canDeleteWasteHierarchy:m}=function(){const e=By("data");return{get canCreateWasteHierarchy(){return e("createWasteHierarchy")},get canEditWasteHierarchy(){return e("createWasteHierarchy")},get canDeleteWasteHierarchy(){return e("createWasteHierarchy")}}}(),[y]=(0,Ot.n)(V$,{onCompleted:()=>{var e;r("Waste hierarchy deleted successfully","success"),o(null),null===(e=t.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.refreshServerSide({purge:!0})},onError:e=>{r("Failed to delete waste hierarchy","danger"),de.Cp(e)}}),b=(0,g.useCallback)(e=>{o(e)},[]),h=(0,g.useCallback)(()=>{i&&y({variables:{id:i}})},[i,y]),v=(0,g.useCallback)(()=>{s(!0)},[]),x=(0,g.useCallback)(e=>{var n;s(!0),d(pq(pq({},e),{},{wasteHierarchyId:e.id,treatmentProcessId:null===(n=e.treatmentProcess)||void 0===n?void 0:n.id}))},[]),T=(0,g.useCallback)(()=>{s(!1),d(void 0)},[]),[O]=Jm(B$,{notifyOnNetworkStatusChange:!0,fetchPolicy:"network-only"}),k=(0,g.useMemo)(()=>[{headerName:"Treatment Process",field:"treatmentProcessName",sortable:!0,filter:"agTextColumnFilter",valueFormatter:e=>{var n;return null===(n=e.data.treatmentProcess)||void 0===n?void 0:n.name}},{headerName:"Waste In",field:"wasteInName",sortable:!0,filter:"agTextColumnFilter",valueFormatter:e=>{var n;return(null===(n=e.data.wasteIn)||void 0===n?void 0:n.name)||"-"}},{field:"startDate",headerName:"Start Date",sortable:!0,filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)||"-"}},{field:"endDate",headerName:"End Date",sortable:!0,filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)||"-"}},{field:"isGlobal",headerName:"Global",sortable:!0,valueFormatter:zo,filter:"agSetColumnFilter",filterParams:Go()},{field:"reference",headerName:"Reference",sortable:!0,filter:"agTextColumnFilter",valueFormatter:e=>{let{value:n}=e;return n||"-"}},{field:"prevention",headerName:"Prevention %",sortable:!0,filter:"agNumberColumnFilter"},{field:"preparingForReuse",headerName:"Preparing for Reuse %",sortable:!0,filter:"agNumberColumnFilter"},{field:"recycling",headerName:"Recycling %",sortable:!0,filter:"agNumberColumnFilter"},{field:"otherRecovery",headerName:"Other Recovery %",sortable:!0,filter:"agNumberColumnFilter"},{field:"disposal",headerName:"Disposal %",sortable:!0,filter:"agNumberColumnFilter"},{field:"unknown",headerName:"Unknown %",sortable:!0,filter:"agNumberColumnFilter"},...p||m?[{field:"actions",headerName:"Actions",cellRenderer:e=>(0,Ze.jsxs)(yq,{children:[p&&(0,Ze.jsx)(f.IconButton,{children:(0,Ze.jsx)(f.Icons.Edit,{onClick:()=>x(e.data)})}),m&&(0,Ze.jsx)(f.IconButton,{onClick:()=>b(e.data.id),children:(0,Ze.jsx)(f.Icons.Delete,{})})]})}]:[]],[b,x,p,m]),j=(0,g.useMemo)(()=>({columnDefs:k,rowModelType:"serverSide",serverSideDatasource:{async getRows(e){try{const{startRow:n=0,endRow:t=25,sortModel:r,filterModel:i}=e.request,o=await O({variables:{accountId:a,offset:n,limit:t-n,sort:oa(r),filters:ia(i)}});if(o.error||!o.data)throw o.error||new Error("No data returned from query");const{rows:l,totalRows:s}=o.data.getWasteHierarchiesPage;e.success({rowData:l,rowCount:s})}catch(n){e.fail(),de.Cp(n)}}},pagination:!0,paginationPageSize:20}),[a,k,O]);return(0,Ze.jsxs)(f.Page,{title:{content:"Waste Hierarchies",actionButton:(0,Ze.jsxs)(yq,{children:[(0,Ze.jsx)(N$,{filtersApplied:null===(e=t.current)||void 0===e?void 0:e.filtersApplied,resetGridState:null===(n=t.current)||void 0===n?void 0:n.resetGridState}),u&&(0,Ze.jsx)(f.Button,{variant:"contained",onClick:v,children:"Add new"})]})},children:[(0,Ze.jsx)(gq,{ref:t,gridKey:"".concat(a,"WasteHierarchiesGridV2"),gridOptions:j}),m&&(0,Ze.jsx)(Z$,{open:!!i,onClose:()=>o(null),onConfirm:h,title:"Delete Waste Hierarchy",body:"Are you sure you want to delete this waste hierarchy?",confirmButtonText:"Delete"}),u&&l&&(0,Ze.jsx)(sq,{onClose:T,accountId:a,initialValues:c,onSuccess:()=>{var e;null===(e=t.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.refreshServerSide({purge:!0})}})]})};var hq=t(49995);const vq=["id","name","icon","size"];var xq;function Tq(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Oq(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tq(Object(t),!0).forEach(function(n){kq(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tq(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function kq(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const jq=Ge.default.a(xq||(xq=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: inline-block;\n  color: ",";\n  transition: all 0.2s ease-in-out;\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n    transform: scale(1.2);\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.colors.text.dark.background),Cq=e=>{let{id:n,name:t,icon:a,size:r="md"}=e,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,vq);return(0,Ze.jsx)(jq,Oq(Oq({},i),{},{children:(0,Ze.jsx)(ze.In,{id:n,name:t,icon:a,size:r})}))};var Sq,Nq;function wq(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Dq=(0,Ge.default)(ze.fI)(Sq||(Sq=wq(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.light.background,e=>{if(e.action)return"background-color: ".concat(e.theme.colors.warning.highlight.background,";")}),Aq=(0,Ge.default)(ze.fv)(Nq||(Nq=wq(["\n  padding: ",";\n  word-break: break-all;\n"])),e=>e.theme.geometry.md.profile.padding),Rq=e=>{const{id:n,wasteTreatmentProcessName:t,prevention:a,preparingForReuse:r,recycling:i,otherRecovery:o,disposal:l,unknown:s,reference:c,isGlobal:d,showViewModal:u}=e;return(0,Ze.jsxs)(Dq,{container:!0,id:"".concat(n,"__WasteHierarchy__Row"),name:"".concat(n,"__WasteHierarchy__Row"),children:[(0,Ze.jsx)(Aq,{item:!0,span:2,children:(0,Ze.jsx)(ze.EY,{id:"".concat(n,"__WasteHierarchy__wasteTreatmentProcessName"),name:"".concat(n,"__WasteHierarchy__wasteTreatmentProcessName"),children:t})}),(0,Ze.jsx)(Aq,{item:!0,span:1.25,children:(0,Ze.jsxs)(ze.EY,{id:"".concat(n,"__WasteHierarchy__prevention"),name:"".concat(n,"__WasteHierarchy__prevention"),children:[a||"0.00","%"]})}),(0,Ze.jsx)(Aq,{item:!0,span:1.25,children:(0,Ze.jsxs)(ze.EY,{id:"".concat(n,"__WasteHierarchy__preparingForReuse"),name:"".concat(n,"__WasteHierarchy__preparingForReuse"),children:[r||"0.00","%"]})}),(0,Ze.jsx)(Aq,{item:!0,span:1.25,children:(0,Ze.jsxs)(ze.EY,{id:"".concat(n,"__WasteHierarchy__recycling"),children:[i||"0.00","%"]})}),(0,Ze.jsx)(Aq,{item:!0,span:1.25,children:(0,Ze.jsxs)(ze.EY,{id:"".concat(n,"__WasteHierarchy__otherRecovery"),name:"".concat(n,"__WasteHierarchy__otherRecovery"),children:[o||"0.00","%"]})}),(0,Ze.jsx)(Aq,{item:!0,span:1.25,children:(0,Ze.jsxs)(ze.EY,{id:"".concat(n,"__WasteHierarchy__disposal"),name:"".concat(n,"__WasteHierarchy__disposal"),children:[l||"0.00","%"]})}),(0,Ze.jsx)(Aq,{item:!0,span:1.25,children:(0,Ze.jsxs)(ze.EY,{id:"".concat(n,"__WasteHierarchy__unknown"),name:"".concat(n,"__WasteHierarchy__unknown"),children:[s||"0.00","%"]})}),(0,Ze.jsxs)(Aq,{item:!0,span:1.25,children:[c&&(0,Ze.jsx)(ze.Yq,{id:"".concat(n,"__WasteHierarchy__reference"),name:"".concat(n,"__WasteHierarchy__reference"),href:c,target:"_blank",children:(0,Ze.jsx)(ze.In,{icon:"external-link-alt"})}),!c&&(0,Ze.jsx)(ze.EY,{id:"".concat(n,"__WasteHierarchy__reference"),name:"".concat(n,"__WasteHierarchy__reference"),children:"-"})]}),(0,Ze.jsx)(Aq,{item:!0,span:1.25,children:(0,Ze.jsx)(ze.EY,{id:"".concat(n,"__WasteHierarchy__defaultOrCustom"),name:"".concat(n,"__WasteHierarchy__defaultOrCustom"),children:d?"Default":"Custom"})}),(0,Ze.jsx)(Aq,{item:!0,span:1.25,children:(0,Ze.jsx)(Cq,{id:"".concat(n,"__WasteHierarchy__view"),name:"".concat(n,"__WasteHierarchy__view"),icon:"eye",size:"lg",onClick:u})})]})};Rq.propTypes={id:Ke().string,wasteTreatmentProcessName:Ke().string,prevention:Ke().number,preparingForReuse:Ke().number,recycling:Ke().number,otherRecovery:Ke().number,disposal:Ke().number,reference:Ke().string};const Pq=Rq;var Lq,Iq;function Eq(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _q=(0,Ge.default)(ze.fI)(Lq||(Lq=Eq(["\n  padding: ",";\n  background: ",";\n  border-bottom: 1px solid ",";\n  border-top: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.sm.spacing," ").concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.light.background,e=>e.theme.colors.text.light.background,e=>e.theme.colors.text.light.background),Fq=Ge.default.div(Iq||(Iq=Eq(["\n  flex: 1 1 auto;\n  overflow: scroll;\n"]))),Bq=e=>{const{wasteTreatmentProcessHierarchies:n,showViewModal:t}=e;return(0,Ze.jsxs)(g.Fragment,{children:[(0,Ze.jsxs)(_q,{id:"WasteHierarchyContainerHeaderRow",name:"WasteHierarchyContainerHeaderRow",container:!0,align:"between",children:[(0,Ze.jsx)(ze.fv,{item:!0,span:2,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Waste Treatment Process"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:1.25,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Prevention"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:1.25,children:(0,Ze.jsxs)(ze.EY,{weight:"bold",children:["Preparing for",(0,Ze.jsx)("br",{}),"re-use"]})}),(0,Ze.jsx)(ze.fv,{item:!0,span:1.25,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Recycling"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:1.25,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Other Recovery"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:1.25,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Disposal"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:1.25,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Unknown"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:1.25,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Reference"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:1.25,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"Default or Custom"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:1.25,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:"View"})})]}),(0,Ze.jsx)(Fq,{id:"WasteHierarchyContainerRowContainer",name:"WasteHierarchyContainerRowContainer",children:n.map(e=>(0,Ze.jsx)(Pq,{id:e.id,wasteTreatmentProcessName:e.treatmentProcess.name,prevention:e.prevention,preparingForReuse:e.preparingForReuse,recycling:e.recycling,otherRecovery:e.otherRecovery,disposal:e.disposal,unknown:e.unknown,sum:e.sum,reference:e.reference,isGlobal:e.isGlobal,showViewModal:()=>t(e)},e.id))})]})};Bq.propTypes={wasteTreatmentProcessHierarchies:Ke().array};const Uq=Bq;var Mq;const Vq=Ge.default.div(Mq||(Mq=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.md.spacing);function zq(e){if(e&&e.getAllWasteTreatmentProcesses)return e.getAllWasteTreatmentProcesses.map(e=>({label:e.name,value:e.id}))}function Gq(e){let{onWasteTreatmentChange:n,wasteTreatmentId:t,disabled:a,validationError:r}=e;const{loading:i,error:o,data:l}=(0,h.IT)(U$);return(0,Ze.jsxs)(Ze.Fragment,{children:[o&&(0,Ze.jsx)(ze.Kw,{error:o,children:e=>{let{icon:n}=e;return(0,Ze.jsx)(Vq,{children:(0,Ze.jsx)(ze.Wz,{icon:n,title:"Treatment Processes failed to load"})})}}),(0,Ze.jsx)(ze.hh.SelectColumn,{isDisabled:a,error:r,label:"Treatment Process",name:"treatmentProcessSelectBox",isLoading:i,components:{LoadingIndicator:()=>(0,Ze.jsx)(ze.Ip,{size:"xxs"})},options:zq(l),onChange:n,value:t})]})}const $q=(e,n)=>e<0?"".concat(n," should be positive."):e?null:"".concat(n," cannot be empty.");var Wq=t(9355),qq=t.n(Wq);function Jq(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Yq(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Jq(Object(t),!0).forEach(function(n){Hq(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Jq(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Hq(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Kq(e){return n=>{const t=!!n.wasteIn,a=t&&n.wasteIn.id===e,r=n.isGlobal,i=n.accountId&&!t;return"Default"===e?r||i:a||i||r}}function Qq(e){return e.wasteIn?3:e.accountId?2:1}function Zq(e,n){return Qq(n)-Qq(e)}function Xq(e,n){const t=ka(e.treatmentProcess.name,n.treatmentProcess.name);return 0!==t?t:+n.isGlobal-+e.isGlobal}function eJ(e,n){return e.query({query:F$,variables:{accountId:n}})}var nJ,tJ,aJ;function rJ(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function iJ(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rJ(Object(t),!0).forEach(function(n){oJ(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rJ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function oJ(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function lJ(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const sJ=Ge.default.div(nJ||(nJ=lJ(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),cJ={treatmentProcessId:{value:"",select:{value:"",label:""},error:""},prevention:{value:"",error:"",name:"prevention",label:"Prevention"},preparingForReuse:{value:"",error:"",name:"preparingForReuse",label:"Preparing for Reuse"},recycling:{value:"",error:"",name:"recycling",label:"Recycling"},otherRecovery:{value:"",error:"",name:"otherRecovery",label:"Other Recovery"},disposal:{value:"",error:"",name:"disposal",label:"Disposal"},unknown:{value:"",error:"",name:"unknown",label:"Unknown"},reference:{value:"",error:""},isSubmitting:!1},dJ=(0,Ge.default)(ze.hh.HeaderRow)(tJ||(tJ=lJ(["\n  margin-bottom: 0;\n"]))),uJ=(0,Ge.default)(ze.hh.HeaderRow)(aJ||(aJ=lJ(["\n  font-weight: 400;\n"])));function pJ(e){let{onNotification:n,onDismiss:t,accountId:a,currentWasteIn:r}=e;const[i,o]=(0,g.useState)(cJ),[l]=(0,Ot.n)(M$),s=(0,N.m)(),c=e=>{let{target:{name:n,value:t}}=e;o(e=>iJ(iJ({},e),{},{[n]:iJ(iJ({},e[n]),{},{error:"",value:t})}))},{isSubmitting:d,prevention:u,preparingForReuse:p,recycling:m,otherRecovery:f,disposal:y,unknown:b}=i,h=[u,p,m,f,y,b];return(0,Ze.jsxs)(sJ,{children:[(0,Ze.jsx)(dJ,{children:"Set Custom Waste Hierarchy Percentages"}),r&&(0,Ze.jsxs)(uJ,{children:["For Waste In location: ",(0,Ze.jsx)("em",{children:r.name})]}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(Gq,{onWasteTreatmentChange:e=>{(e=>{o(n=>iJ(iJ({},n),{},{treatmentProcessId:iJ(iJ({},n.treatmentProcessId),{},{error:"",value:e.target.value,select:e.target.select})}))})(e),(async e=>{const n=r?r.id:null,t=await async function(e,n,t,a){const r=await async function(e,n,t,a){try{const{data:r}=await eJ(e,t),i=Kq(a);return r.getWasteHierarchiesByAccountId.filter(e=>e.treatmentProcess.id===n&&i(e)).sort(Zq).shift()}catch(e){return null}}(e,n,t,a);return r||async function(e,n){try{const{data:t}=await e.query({query:z$,variables:{treatmentProcessId:n}});return t.getDefaultWasteHierarchyByWasteTreatmentId}catch(e){return null}}(e,n)}(s,e,a,n),i=["prevention","preparingForReuse","recycling","otherRecovery","disposal","unknown"];o(e=>{const n={};return i.forEach(a=>{n[a]=iJ(iJ({},e[a]),{},{value:t?String(t[a]):""})}),iJ(iJ({},e),n)})})(e.target.value)},disabled:d,validationError:i.treatmentProcessId.error,wasteTreatmentId:i.treatmentProcessId.select})}),h.map(e=>(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextInputColumn,{disabled:d,name:e.name,type:"number",label:e.label,error:i[e.name].error,value:i[e.name].value,onChange:c,placeholder:i[e.name].placeholder})},e.name)),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextInputColumn,{disabled:d,name:"reference",type:"text",label:"Reference",error:i.reference.error,value:i.reference.value,onChange:c})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.ButtonColumn,{disabled:d,onClick:async()=>{const{treatmentProcessId:e,prevention:c,preparingForReuse:d,recycling:u,otherRecovery:p,disposal:m,unknown:f,reference:y}=i;if(o(e=>iJ(iJ({},e),{},{isSubmitting:!0})),e.error=$q(e.value,"Treatment Process"),c.error=$q(c.value,"Prevention"),d.error=$q(d.value,"Preparing for Reuse"),u.error=$q(u.value,"Recycling"),p.error=$q(p.value,"Other Recovery"),m.error=$q(m.value,"Disposal"),f.error=$q(f.value,"Unknown"),e.error||c.error||d.error||u.error||p.error||m.error||f.error)return void o(e=>iJ(iJ({},e),{},{isSubmitting:!1}));let g=y.value;g.match(/https?:\/\/.*/g)||""===g.trim()||(g="https://".concat(g));const b=(e=>{const n=e.reduce((e,n)=>e+ +n,0);return 100===n?null:"Percentages must add up to 100, Total is currently at ".concat(n)})([c.value,d.value,u.value,p.value,m.value,f.value]);if(b)return n(b,"danger"),void o(e=>iJ(iJ({},e),{},{isSubmitting:!1}));try{const{data:{upsertCustomWasteHierarchy:i}}=await l({variables:{input:{accountId:a,treatmentProcessId:e.value,prevention:c.value,preparingForReuse:d.value,recycling:u.value,otherRecovery:p.value,disposal:m.value,unknown:f.value,reference:g,wasteInId:r?r.id:null}}});await async function(e,n,t){const{data:a}=await eJ(e,n);a.getWasteHierarchiesByAccountId.find(e=>e.id===t.id)||await e.cache.writeQuery({query:F$,variables:{accountId:n},data:Yq(Yq({},a),{},{getWasteHierarchiesByAccountId:[...a.getWasteHierarchiesByAccountId,t]})})}(s,a,i),n("Waste Hierarchy successfully set","success",i.id),t()}catch(e){n("Waste Hierarchy was not set","danger")}},name:"wasteHierarchySubmitButton",children:"Set Percentages"})})]})}const mJ=e=>{const{id:n,name:t="PropertySheetTextColumn",label:a,value:r}=e;return(0,Ze.jsxs)(ze.hh.Row,{children:[(0,Ze.jsx)(ze.hh.TextColumn,{id:"".concat(t,"__label--").concat(n),name:"".concat(t,"__label--").concat(n),children:a}),(0,Ze.jsx)(ze.hh.TextColumn,{id:"".concat(t,"__value--").concat(n),name:"".concat(t,"__value--").concat(n),align:"right",children:r})]})};var fJ;const yJ=Ge.default.div(fJ||(fJ=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),gJ=e=>{const{hierarchy:n}=e,{id:t,treatmentProcess:a,prevention:r,preparingForReuse:i,recycling:o,otherRecovery:l,disposal:s,unknown:c,reference:d,isGlobal:u,user:p}=n;return(0,Ze.jsxs)(yJ,{children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:a.name}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsxs)(ze.hh.TextColumn,{id:"ViewWasteHierarchies__isGlobal--".concat(t),name:"ViewWasteHierarchies__isGlobal--".concat(t),children:["This is a ",u?"default":"custom"," waste hierarchy"]})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsxs)(ze.hh.TextColumn,{id:"ViewWasteHierarchies__user--".concat(t),name:"ViewWasteHierarchies__user--".concat(t),children:["Created By: ",p?p.first_name:"Ditto"," ",p?p.last_name:"Sustainability"]})}),(0,Ze.jsx)(mJ,{id:t,name:"ViewWasteHierarchiesPrevention",label:"Prevention:",value:"".concat(r,"%")}),(0,Ze.jsx)(mJ,{id:t,name:"ViewWasteHierarchiesPreparingForReuse",label:"Preparing For Reuse:",value:"".concat(i,"%")}),(0,Ze.jsx)(mJ,{id:t,name:"ViewWasteHierarchiesRecycling",label:"Recycling:",value:"".concat(o,"%")}),(0,Ze.jsx)(mJ,{id:t,name:"ViewWasteHierarchiesOtherRecovery",label:"Other Recovery:",value:"".concat(l,"%")}),(0,Ze.jsx)(mJ,{id:t,name:"ViewWasteHierarchiesDisposal",label:"Disposal:",value:"".concat(s,"%")}),(0,Ze.jsx)(mJ,{id:t,name:"ViewWasteHierarchiesUnknown",label:"Unknown:",value:"".concat(c,"%")}),d&&(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextColumn,{id:"ViewWasteHierarchies__reference--".concat(t),name:"ViewWasteHierarchies__reference--".concat(t),label:"Reference:",children:(0,Ze.jsx)(ze.Yq,{id:"ViewWasteHierarchies__reference--".concat(t),name:"ViewWasteHierarchies__reference--".concat(t),href:d,target:"_blank",children:d})})})]})},bJ=e=>{const{showCreateModal:n,onDismiss:t,onNotification:a,accountId:r,viewHierarchyModal:i,currentWasteIn:o}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[n&&(0,Ze.jsx)(ze.aF,{span:4,show:!0,name:"CreateWasteHierarchyModal",dismissable:!0,onDismiss:t,children:(0,Ze.jsx)(pJ,{accountId:r,onNotification:a,onDismiss:t,currentWasteIn:o})}),i.show&&(0,Ze.jsx)(ze.aF,{show:!0,name:"ViewWasteHierarchyModal",dismissable:!0,onDismiss:t,height:"auto",maxHeight:"90vh",children:(0,Ze.jsx)(gJ,{accountId:r,hierarchy:i.hierarchy})})]})},hJ={label:"Default",value:"Default"};function vJ(e){return[hJ].concat(e.slice().sort(Ta).map(e=>({label:e.name,value:e.id})).slice(0,100))}function xJ(e){let{wasteInLocations:n,value:t,onChange:a}=e;const r=vJ(n);return(0,Ze.jsx)(ze.l6,{placeholder:"Waste In Locations",options:r,defaultOptions:r,onChange:e=>{a(e.target.value)},loadOptions:e=>({options:vJ(bf(n,e,["id","name"]))}),value:t})}var TJ,OJ,kJ;function jJ(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function CJ(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jJ(Object(t),!0).forEach(function(n){SJ(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jJ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function SJ(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function NJ(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const wJ=(0,Ge.default)(ze.fI)(TJ||(TJ=NJ(["\n  margin-left: auto;\n"]))),DJ=(0,Ge.default)(ze.fv)(OJ||(OJ=NJ(["\n  margin-left: auto;\n"]))),AJ=(0,Ge.default)(ze.fv)(kJ||(kJ=NJ(["\n  padding-right: 32px;\n"]))),RJ=uv(function(){const[e,n]=(0,g.useState)({showCreateModal:!1,viewHierarchyModal:{show:!1,hierarchy:{}},notification:{message:null,color:null,id:null}}),[t,a]=(0,g.useState)("Default"),r=rt(),i={accountId:r},{data:o,error:l,refetch:s,networkStatus:c}=(0,h.IT)(F$,{variables:i}),d=(e=>e<hq.pT.refetch)(c),u=function(e){return e&&e.getWasteHierarchiesByAccountId?e.getWasteHierarchiesByAccountId:[]}(o),p=function(e){return e&&e.getWasteInsByAccountId?e.getWasteInsByAccountId:[]}(o),m=function(e,n){const t=e.filter(Kq(n)),a=qq()(t,e=>e.treatmentProcess.id);return Object.keys(a).map(e=>a[e].sort(Zq).shift())}(u,t).slice().sort(Xq);return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[e.notification.message&&(0,Ze.jsx)(ze.Eg,{color:e.notification.color,onClose:()=>{n(e=>CJ(CJ({},e),{},{notification:{message:null,color:null,id:null}}))},name:e.notification.id,show:!0,preventDuplicate:!0,children:e.notification.message}),(0,Ze.jsx)(bJ,{showCreateModal:e.showCreateModal,onDismiss:()=>{n(e=>CJ(CJ({},e),{},{showCreateModal:!1,viewHierarchyModal:{show:!1,hierarchy:null}}))},onNotification:(e,t,a)=>{n(n=>CJ(CJ({},n),{},{notification:{message:e,color:t,id:a}}))},accountId:r,viewHierarchyModal:e.viewHierarchyModal,currentWasteIn:"Default"===t?null:p.find(e=>e.id===t)}),(0,Ze.jsx)(bh,{icon:"trash-alt",iconColor:"primary",title:"Waste Hierarchies",children:(0,Ze.jsxs)(wJ,{span:9,item:!0,container:!0,children:[(0,Ze.jsx)(AJ,{item:!0,span:6,children:(0,Ze.jsx)(xJ,{wasteInLocations:p,onChange:a,value:t})}),(0,Ze.jsx)(DJ,{item:!0,span:6,children:(0,Ze.jsx)(ze.$n,{onClick:()=>{n(e=>CJ(CJ({},e),{},{showCreateModal:!0}))},children:"+ Set Custom %s"})})]})}),d&&(0,Ze.jsx)(Vg,{}),!d&&l&&(0,Ze.jsx)(ze.Kw,{error:l,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{icon:a,title:n,body:t,retry:()=>s(i)})}}),!d&&u.length&&(0,Ze.jsx)(Uq,{wasteTreatmentProcessHierarchies:m,showViewModal:e=>{n(n=>CJ(CJ({},n),{},{viewHierarchyModal:{show:!0,hierarchy:e}}))}})]})}),PJ=e=>{let{value:n}=e;return!!n&&(0,Ze.jsx)("div",{children:(0,Ze.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,Ze.jsx)("path",{d:"M17 7.5L12 3.5L7 10.5L3 7.5V20.5H21V7.5H17ZM19 17.45L12 12L8 17.5L5 15.1V11.5L7.44 13.33L12.4 6.38L16.3 9.5H19V17.45Z",fill:"#444746"})})})};var LJ,IJ;function EJ(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _J=Ge.default.div(LJ||(LJ=EJ(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),FJ=Ge.default.a(IJ||(IJ=EJ(["\n  display: inline-block;\n  color: ",";\n  margin-right: ",";\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),BJ=e=>{let{data:n,onEdit:t}=e;return(0,Ze.jsx)(_J,{children:(0,Ze.jsx)(FJ,{onClick:()=>t(n.id,n),children:(0,Ze.jsx)(ze.In,{name:"edit--".concat(n.id),icon:"pencil-alt"})})})};var UJ;const MJ=Ge.default.a(UJ||(UJ=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  text-decoration: underline;\n"])));function VJ(e){let{value:n,to:t,icon:a}=e;const r=t||n,i=a?(0,Ze.jsx)(ze.In,{icon:a}):n;return IA().isURL(r||"")||null!=r&&r.startsWith("/")?(0,Ze.jsx)(MJ,{href:r,target:"_blank",rel:"noopener noreferrer",children:i}):i}var zJ;const GJ=Ge.default.mark(zJ||(zJ=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  background-color: yellow;\n"])));function $J(e,n){if(!n)return[e];const t=new RegExp("(".concat(n,")"),"ig").exec(e);return t?[e.slice(0,t.index),(0,Ze.jsx)(GJ,{children:t[0]}),e.slice(t.index+n.length)]:[e]}function WJ(e){let{text:n,searchValue:t}=e;return(0,Ze.jsx)(Ze.Fragment,{children:n?$J(n,t):null})}function qJ(e){let{value:n,valueFormatted:t,searchValue:a}=e;const r=t||n||null;return(0,Ze.jsx)(WJ,{text:r?String(r):null,searchValue:a})}function JJ(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function YJ(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?JJ(Object(t),!0).forEach(function(n){HJ(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):JJ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function HJ(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function KJ(e){let{onEdit:n,fetchRows:t,accountId:a,setGridApi:r}=e;const i=(0,N.m)(),o=Dd({autoFit:!0}),[l,s]=(0,g.useState)(null),{showNotification:c}=vt(),d=async e=>{try{const{data:{getEnergySourcePageFilter:n}}=await i.query({query:Qc,variables:{accountId:a,field:e.colDef.colId||e.colDef.field}}),t="locationPointId"===e.colDef.colId?(e=>e.reduce((e,n)=>{const t=e.findIndex(e=>e.label===n.label);return-1!==t?e[t]=YJ(YJ({},e[t]),{},{value:Array.isArray(e[t].value)?e[t].value.concat([n.value]):[e[t].value].concat([n.value])}):e.push(n),e},[]))(n):"isGeneration"===e.colDef.colId?(e=>e.map(e=>YJ(YJ({},e),{},{value:"true"===e.value?"1":"false"===e.value?"0":null})))(n):n;e.success(t.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){de.Cp(n),c("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning")}},u={async getRows(e){try{const{startRow:n,sortModel:r,filterModel:i}=e.request,o={accountId:a,offset:n,limit:25,sort:oa(r),filters:ia(i)},{rows:l,totalRows:s}=await t(o);e.success({rowData:l,rowCount:s})}catch(n){e.fail(),s(n),de.Cp(n)}}},p=YJ(YJ({},{pagination:!0,paginationPageSize:25,paginationPageSizeSelector:!1,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}}),{},{columnDefs:[{headerName:"Name",filter:"agTextColumnFilter",filterParams:{buttons:["reset","apply"],newRowsAction:"keep"},field:"name"},{colId:"typeId",headerName:"Type",field:"type.name",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la}},{colId:"locationPointId",headerName:"Location",field:"locationPoint.name",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la}},{colId:"meterCode",headerName:"Meter Code",field:"meterCode",filter:"agTextColumnFilter"},{colId:"inOut",headerName:"Water Direction",field:"inOut",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la}},{colId:"isGeneration",headerName:"Renewable energy",field:"isGeneration",valueFormatter:e=>zo(e),filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:$o}},{colId:"n3rgyConsentStatus",headerName:"AMR Integration",field:"n3rgyConsentStatus",valueFormatter:e=>(e=>{const n=e.value,t=n===Vt.K.FailedToRequest,a=e.data.n3rgyConsentRequestDate?"at: ".concat(Wt()(e.data.n3rgyConsentRequestDate).format("YYYY-MM-DD")):"",r=t&&e.data.n3rgyConsentErrorMessage||"",i=n?Gi(n.toLowerCase().replaceAll("_"," ")):"";return n?"".concat(i," ").concat(a," ").concat(r):"-"})(e),filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la}},{colId:"startDate",headerName:"Start Date",field:"startDate",cellRenderer:"date"},{colId:"endDate",headerName:"End Date",field:"endDate",cellRenderer:"date"},{headerName:"Actions",cellRenderer:"action",filter:!1,sortable:!1}],rowStyle:{width:"100%",display:"flex",alignItems:"center"},rowHeight:58}),m={action:e=>(0,Ze.jsx)(BJ,YJ(YJ({},e),{},{onEdit:n})),date:e=>e.value?Intl.DateTimeFormat().format(new Date(e.value)):null};return l?(0,Ze.jsx)(ub,{error:l,name:l.message,retry:async()=>{await t({accountId:a,offset:0,limit:25}),s(null)}}):(0,Ze.jsx)(nD,{gridOptions:p,paginationPageSize:25,cacheBlockSize:25,onFirstDataRendered:o.onFirstDataRendered,onFilterChanged:o.onFilterChanged,onSortChanged:o.onSortChanged,onColumnVisible:o.onSaveGridColumnState,onColumnPinned:o.onSaveGridColumnState,onColumnResized:o.onSaveGridColumnState,onColumnMoved:o.onSaveGridColumnState,onColumnRowGroupChanged:o.onSaveGridColumnState,onColumnValueChanged:o.onSaveGridColumnState,onColumnPivotChanged:o.onSaveGridColumnState,components:m,onGridReady:e=>{o.onGridReady(e),r({api:e.api,datasource:u}),e.api.setGridOption("serverSideDatasource",u)}})}const QJ="CREATE_NEW";function ZJ(e){let{options:n,onChange:t,error:a,accountId:r,value:i,selectedOption:o,loadOptions:l,createNew:s,createNewModalSize:c=5,loading:d,locationPoints:u,accessor:p="",labelledBy:m}=e;const{showNotification:f}=vt(),[y,b]=(0,g.useState)(!1),h=(0,g.useCallback)((e,n,a,r)=>{f(e,n);const i={value:(0,zt.get)(r,"".concat(p,"id")),label:(0,zt.get)(r,"".concat(p,"name"))};t({target:{select:i,value:i}}),b(!1)},[p,t,f]);return(0,Ze.jsxs)(Ze.Fragment,{children:[y&&(0,Ze.jsx)(ze.aF,{span:c,size:"md",show:y,name:"CreateLocation__Modal--create",dismissable:!0,onDismiss:()=>b(!1),children:(0,Ze.jsx)(TU,{accountId:r,onSuccess:h,locationPoints:u})}),(0,Ze.jsx)(ze.l6,{"aria-labelledby":m,name:"locationId",placeholder:"Begin typing to find locations",value:o||i,options:n,error:a,defaultOptions:!0,debounceTimeout:1e3,isLoading:d,loadOptions:async e=>{const{options:n,total:t}=await l(e);return o&&!n.find(e=>{let{value:n}=e;return n===o.value})&&n.unshift(o),s&&n.unshift({label:"Create new...",value:QJ}),{options:n,total:t}},onChange:e=>{e.target.select.value===QJ?b(!0):t(e)}})]})}function XJ(e){return{value:e.id,label:e.name}}const eY=[{order:"asc",field:"name"}];function nY(e){let{value:n,onChange:t,error:a,selectedOption:r,createNew:i,createNewModalSize:o=5,labelledBy:l}=e;const s=rt(),c=(0,N.m)();return(0,Ze.jsx)(ZJ,{value:n,loadOptions:async e=>{const n=await c.query({query:YW,variables:{accountId:s,sort:eY,filters:{text:[{filterType:"text",type:"contains",filter:e,field:"name"}]}}}),{getLocationsPage:t}=n.data;return{options:t.rows?t.rows.map(XJ):[],total:t.totalRows}},onChange:t,accountId:s,error:a,selectedOption:r?XJ(r):null,createNew:i,createNewModalSize:o,labelledBy:l})}const tY=[{order:"asc",field:"name"}];function aY(e){let{value:n,onChange:t,error:a,createNew:r,createNewModalSize:i=5,selectedOption:o,createNewAccessor:l}=e;const s=rt(),c=(0,N.m)();return(0,Ze.jsx)(ZJ,{value:n,locationPoints:{wasteOut:!0},onChange:t,accountId:s,error:a,createNew:r,createNewModalSize:i,accessor:l,selectedOption:o,loadOptions:async e=>{var n;const t=await c.query({query:KW,variables:{id:s,sort:tY,filters:{text:[{filterType:"text",type:"contains",filter:e,field:"name"}]}}});return{options:null!==(n=t.data)&&void 0!==n&&n.getWasteOutsByAccountId?t.data.getWasteOutsByAccountId.map(XJ):[]}}})}const rY=[{order:"asc",field:"name"}];function iY(e){let{value:n,onChange:t,error:a,createNew:r,createNewModalSize:i=5,selectedOption:o,createNewAccessor:l}=e;const s=rt(),c=(0,N.m)(),d=(0,g.useRef)({id:s});return(0,Ze.jsx)(ZJ,{value:n,locationPoints:{wasteIn:!0},onChange:t,accountId:s,error:a,createNew:r,createNewModalSize:i,accessor:l,selectedOption:o,loadOptions:async e=>{d.current={id:s,sort:rY,filters:{text:[{filterType:Vt.pe.Text,type:Vt.II.Contains,filter:e,field:"name"}]}};return{options:(n=await c.query({query:HW,variables:d.current}),(null==n||null===(t=n.data)||void 0===t?void 0:t.getWasteInsByAccountId)||[]).map(XJ)};var n,t}})}var oY,lY,sY,cY,dY,uY;function pY(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const mY=(0,D.J1)(oY||(oY=pY(["\n  mutation CreateEnergySources($energySources: [EnergySourceInput!]!) {\n    createEnergySources(energySources: $energySources) {\n      id\n      name\n      locationPoint {\n        id\n        name\n        location {\n          id\n          name\n          code\n        }\n      }\n    }\n  }\n"]))),fY=(0,D.J1)(lY||(lY=pY(["\n  mutation UpdateEnergySource(\n    $id: ID!\n    $name: String!\n    $meterId: String!\n    $locationId: ID!\n    $typeId: ID!\n    $accountId: ID!\n    $inOut: InOut\n    $isGeneration: Boolean\n    $meterCode: String\n    $hardwareProviderName: String\n    $operatorProviderName: String\n    $startDate: String\n    $endDate: String\n    $n3rgyConsentStatus: N3rgyConsentStatus\n    $n3rgyIsIndirectSource: Boolean\n    $isReadingMeter: Boolean\n    $initialReading: Float\n  ) {\n    updateEnergySource(\n      input: {\n        id: $id\n        name: $name\n        locationId: $locationId\n        meterId: $meterId\n        typeId: $typeId\n        accountId: $accountId\n        inOut: $inOut\n        isGeneration: $isGeneration\n        meterCode: $meterCode\n        hardwareProviderName: $hardwareProviderName\n        operatorProviderName: $operatorProviderName\n        startDate: $startDate\n        endDate: $endDate\n        n3rgyConsentStatus: $n3rgyConsentStatus\n        n3rgyIsIndirectSource: $n3rgyIsIndirectSource\n        isReadingMeter: $isReadingMeter\n        initialReading: $initialReading\n      }\n    ) {\n      id\n      name\n      n3rgyConsentStatus\n      n3rgyConsentErrorMessage\n    }\n  }\n"]))),yY=(0,D.J1)(sY||(sY=pY(["\n  query getEnergySourceByAccountIdAndType(\n    $accountId: ID!\n    $type: TransactionType\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getEnergySourceByAccountIdAndType(\n      accountId: $accountId\n      type: $type\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        name\n        id\n        type {\n          name\n          id\n        }\n        locationPoint {\n          name\n          location {\n            id\n            name\n          }\n        }\n        meterCode\n        inOut\n        isGeneration\n        hardwareProviderName\n        operatorProviderName\n        startDate\n        endDate\n        n3rgyConsentRequestDate\n        n3rgyConsentStatus\n        n3rgyConsentErrorMessage\n        n3rgyIsIndirectSource\n        isReadingMeter\n        initialReading\n      }\n    }\n  }\n"]))),gY=(0,D.J1)(cY||(cY=pY(["\n  query GetLocationsByAccountId(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getLocationsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n      }\n    }\n  }\n"]))),bY=(0,D.J1)(dY||(dY=pY(["\n  query GetAllEnergyTypes {\n    getAllEnergyType {\n      id\n      name\n    }\n  }\n"]))),hY=(0,D.J1)(uY||(uY=pY(["\n  mutation TriggerN3rgyImport($input: TriggerN3rgyImportInput!) {\n    triggerN3rgyImport(input: $input) {\n      mpxn\n      numberOfUploadedMeterReadings\n      missingDataTimestamps\n      errorMessage\n    }\n  }\n"]))),vY=e=>{let{onChange:n,value:t,error:a}=e;const{data:r,loading:i}=(0,h.IT)(bY);if(i)return(0,Ze.jsx)(ze.l6,{isDisabled:!0,placeholder:"Loading"});if(a||!r||!r.getAllEnergyType)return(0,Ze.jsx)(ze.l6,{isDisabled:!0,placeholder:"Something went wrong!"});const o=r.getAllEnergyType.map(e=>({value:{id:e.id,name:e.name},label:e.name}));return(0,Ze.jsx)(ze.l6,{value:t,options:o,onChange:n,error:a})};function xY(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function TY(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xY(Object(t),!0).forEach(function(n){OY(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xY(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function OY(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const kY={meterName:{error:"",value:""},locationId:{error:"",value:"",label:""},typeId:{error:"",value:{id:"",name:""},label:""},meterIn:!0,meterOut:!1,isGeneration:!1,code:"",hardwareProviderName:null,operatorProviderName:null,startDate:null,endDate:null,n3rgyIntegration:!1,n3rgyIsIndirectSource:!1,isReadingMeter:!1,initialReading:null};function jY(e,n){switch(n.type){case"change-field-value":return TY(TY({},e),{},{[n.fieldName]:n.value});case"change-meter-name":{let t=n.value?"":"Meter Name cannot be empty";return null!==n.value&&n.value.length>64&&(t="Meter Name cannot exceed 64 characters"),TY(TY({},e),{},{meterName:{error:t,value:n.value}})}case"change-location":{const t=n.value,a=t?"":"An location must be selected";return TY(TY({},e),{},{locationId:{error:a,value:t,label:n.label}})}case"change-meter-type":const t=n.value,a=t?"":"Type must be selected";return e.meterIn||e.meterOut||"Water"!==t.name?TY(TY({},e),{},{typeId:{error:a,value:t,label:t.name}}):TY(TY({},e),{},{meterIn:!0,typeId:{error:a,value:t,label:t.name}});case"replace-state":return n.newState}}function CY(){const[e,n]=(0,g.useReducer)(jY,kY),t=(0,g.useMemo)(()=>!(!e.meterName.value||e.meterName.error||!e.typeId.value||e.typeId.error||!e.locationId.value||e.locationId.error),[e.meterName,e.typeId,e.locationId]),a=(0,g.useMemo)(()=>"Water"===e.typeId.value.name?e.meterIn&&e.meterOut?"BOTH":e.meterOut?"OUT":"IN":null,[e.meterIn,e.meterOut,e.typeId.value.name]),r=(0,g.useCallback)(()=>{e.meterIn&&!e.meterOut||n({type:"change-field-value",fieldName:"meterIn",value:!e.meterIn})},[e.meterIn,e.meterOut]),i=(0,g.useCallback)(()=>{e.meterOut&&!e.meterIn||n({type:"change-field-value",fieldName:"meterOut",value:!e.meterOut})},[e.meterIn,e.meterOut]),o=(0,g.useCallback)(()=>{n({type:"change-field-value",fieldName:"n3rgyIntegration",value:!e.n3rgyIntegration})},[e.n3rgyIntegration]),l=(0,g.useCallback)(()=>{n({type:"change-field-value",fieldName:"n3rgyIsIndirectSource",value:!e.n3rgyIsIndirectSource})},[e.n3rgyIsIndirectSource]),s=(0,g.useCallback)(()=>{n({type:"change-field-value",fieldName:"isReadingMeter",value:!e.isReadingMeter})},[e.isReadingMeter]);return{isValidData:t,state:e,changeMeterName:e=>n(TY(TY({},e),{},{type:"change-meter-name"})),changeMeterType:e=>n(TY(TY({},e),{},{type:"change-meter-type"})),changeLocation:e=>n(TY(TY({},e),{},{type:"change-location"})),changeFieldValue:e=>n(TY(TY({},e),{},{type:"change-field-value"})),replaceState:e=>n({newState:e,type:"replace-state"}),toggleWaterMeterIn:r,toggleWaterMeterOut:i,toggleN3rgyIntegration:o,waterMeterType:a,toggleN3rgyIsIndirectSource:l,toggleIsReadingMeter:s}}var SY,NY,wY,DY,AY;function RY(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const PY=Ge.default.div(SY||(SY=RY(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),LY=(0,Ge.default)(ze.fv)(NY||(NY=RY(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),IY=(0,Ge.default)(ze.DZ)(wY||(wY=RY(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),EY=(0,Ge.default)(ze.JU)(DY||(DY=RY(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),_Y=Ge.default.div(AY||(AY=RY(["\n  height: 24px;\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),FY=e=>{let{accountId:n,onError:t,onSuccess:a}=e;const{state:r,changeMeterName:i,changeMeterType:o,changeLocation:l,isValidData:s,changeFieldValue:c,waterMeterType:d,toggleWaterMeterIn:u,toggleWaterMeterOut:p,toggleN3rgyIntegration:m,toggleN3rgyIsIndirectSource:y,toggleIsReadingMeter:g}=CY(),b=e=>{const n=e.target.value;l({value:n,label:e.target.label})},h=()=>{const e="The Meter ".concat(r.meterName.value," was created successfully");a(e)},v=e=>{t("Something went wrong: ".concat(e.message,". If the problem persists, contact support."),"danger")},x=()=>(0,Ze.jsx)(nY,{value:r.locationId,onChange:b,error:r.locationId.error}),T=()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(LY,{item:!0,children:(0,Ze.jsx)(Qe.s,{mutation:mY,onCompleted:h,onError:v,children:(e,t)=>{let{called:a}=t;return(0,Ze.jsx)(ze.$n,{name:"create-energyMeter__button--create",color:"success",disabled:!s||a,onClick:()=>{e({variables:{energySources:[{id:(0,Ai.A)(),name:r.meterName.value,locationId:r.locationId.value,typeId:r.typeId.value.id,accountId:n,inOut:d,isGeneration:"Electricity"===r.typeId.value.name||"Heat & Steam"===r.typeId.value.name?r.isGeneration||!1:null,meterCode:r.code,hardwareProviderName:r.hardwareProviderName,operatorProviderName:r.operatorProviderName,startDate:r.startDate,endDate:r.endDate,n3rgyConsentStatus:"Electricity"===r.typeId.value.name&&r.n3rgyIntegration?Vt.K.Requested:void 0,n3rgyIsIndirectSource:r.n3rgyIsIndirectSource,isReadingMeter:r.isReadingMeter,initialReading:r.initialReading}]}})},children:"Add Meter"})}})})});return(0,Ze.jsxs)(PY,{children:[(0,Ze.jsx)(IY,{name:"create-energyMeter__heading",size:"lg",children:"Add New Meter"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsx)(_Y,{children:(0,Ze.jsx)(EY,{children:"What do you want to call this meter?"})}),(0,Ze.jsx)(ze.ks,{value:r.meterName.value,error:r.meterName.error,onChange:e=>{i({value:e.target.value})}})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsx)(_Y,{children:(0,Ze.jsx)(EY,{children:"What is the meter type?"})}),(0,Ze.jsx)(vY,{value:r.typeId,onChange:e=>{const{select:{value:n}}=e.target;o({value:n,label:n.name})},error:r.typeId.error})]})}),"Water"===r.typeId.value.name&&(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsxs)(EY,{children:[r.typeId.value.name," In"]}),(0,Ze.jsx)(ze.Sc,{id:"create-meter-in",name:"in",onChange:()=>u(),checked:r.meterIn})]}),(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsxs)(EY,{children:[r.typeId.value.name," Out"]}),(0,Ze.jsx)(ze.Sc,{id:"create-meter-out",name:"out",onChange:()=>p(),checked:r.meterOut})]})]}),("Electricity"===r.typeId.value.name||"Heat & Steam"===r.typeId.value.name)&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsx)(_Y,{children:(0,Ze.jsx)(EY,{children:"Renewable energy generating meter"})}),(0,Ze.jsx)(ze.Sc,{id:"is-generating-meter",name:"isGeneration",onChange:()=>c({fieldName:"isGeneration",value:!r.isGeneration}),checked:r.isGeneration||!1})]})}),"Electricity"===r.typeId.value.name&&(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsxs)(_Y,{children:[(0,Ze.jsx)(EY,{children:"AMR Integrated"}),(0,Ze.jsx)(zP.A,{title:"This is used to automate data from your smart meter into Rio. After the integration is checked and saved it cannot be unchecked anymore (only be the developer team).",children:(0,Ze.jsx)(f.Icons.InfoOutlined,{color:"info"})})]}),(0,Ze.jsx)(ze.Sc,{onChange:()=>m(),checked:r.n3rgyIntegration})]}),(0,Ze.jsx)(LY,{item:!0,children:(0,Ze.jsxs)(_Y,{children:[(0,Ze.jsx)(EY,{children:"Indirect Data Source"}),(0,Ze.jsx)(zP.A,{title:"If this is toggled data imported from smart meters will be considered indirect data.",children:(0,Ze.jsx)(f.Icons.InfoOutlined,{color:"info"})})]})}),(0,Ze.jsx)(LY,{item:!0,children:(0,Ze.jsx)(ze.Sc,{onChange:()=>y(),checked:r.n3rgyIsIndirectSource})})]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsxs)(_Y,{children:[(0,Ze.jsx)(EY,{children:"Enable Reading Functionality"}),(0,Ze.jsx)(zP.A,{title:"When enabled, this meter will accept reading values instead of consumption values. An initial reading must be provided.",children:(0,Ze.jsx)(f.Icons.InfoOutlined,{color:"info"})})]}),(0,Ze.jsx)(ze.Sc,{onChange:()=>g(),checked:r.isReadingMeter})]})}),r.isReadingMeter&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsx)(_Y,{children:(0,Ze.jsx)(EY,{children:"Initial Reading"})}),(0,Ze.jsx)(ze.ks,{type:"number",value:Na(r.initialReading,""),onChange:e=>{c({fieldName:"initialReading",value:Na(e.target.value,"")})},placeholder:"Enter initial reading value"})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsx)(_Y,{children:(0,Ze.jsx)(EY,{children:"Which location is this meter at?"})}),(0,Ze.jsx)(x,{})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsx)(_Y,{children:(0,Ze.jsx)(EY,{children:"Meter Code"})}),(0,Ze.jsx)(ze.ks,{value:r.code,onChange:e=>c({fieldName:"code",value:e.target.value})})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(LY,{item:!0,children:[(0,Ze.jsx)(_Y,{children:(0,Ze.jsx)(EY,{children:"Has this meter closed?"})}),(0,Ze.jsx)(_Y,{children:(0,Ze.jsx)(EY,{children:"Start Date"})}),(0,Ze.jsx)(ze.lr,{name:"startDate",box:!0,onDayClick:e=>{c({fieldName:"startDate",value:e})},selectedDate:r.startDate,disabledDatesAfter:r.endDate}),(0,Ze.jsx)(_Y,{children:(0,Ze.jsx)(EY,{children:"End Date"})}),(0,Ze.jsx)(ze.lr,{name:"endDate",box:!0,onDayClick:e=>{c({fieldName:"endDate",value:e})},selectedDate:r.endDate,disabledDatesBefore:r.startDate})]})}),(0,Ze.jsx)(T,{})]})};var BY;const UY=(0,D.J1)(BY||(BY=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetEnergySourceById($id: ID!) {\n    getEnergySourceById(id: $id) {\n      name\n      id\n      inOut\n      isGeneration\n      type {\n        id\n        name\n      }\n      locationPoint {\n        name\n        location {\n          id\n          name\n        }\n      }\n      meterCode\n      hardwareProviderName\n      operatorProviderName\n      startDate\n      endDate\n      n3rgyConsentRequestDate\n      n3rgyConsentStatus\n      n3rgyConsentErrorMessage\n      n3rgyIsIndirectSource\n      isReadingMeter\n      initialReading\n    }\n  }\n"]))),MY=["state","replaceState"];function VY(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function zY(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?VY(Object(t),!0).forEach(function(n){GY(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):VY(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function GY(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var $Y,WY,qY,JY,YY;function HY(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const KY=Ge.default.div($Y||($Y=HY(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),QY=(0,Ge.default)(ze.fv)(WY||(WY=HY(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),ZY=(0,Ge.default)(ze.DZ)(qY||(qY=HY(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),XY=(0,Ge.default)(ze.JU)(JY||(JY=HY(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),eH=Ge.default.div(YY||(YY=HY(["\n  height: 24px;\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),nH=e=>{let{accountId:n,onSuccess:t,sourceId:a}=e;const{showNotification:r}=vt(),{state:i,changeMeterName:o,changeLocation:l,changeMeterType:s,isValidData:c,changeFieldValue:d,waterMeterType:u,toggleWaterMeterIn:p,toggleWaterMeterOut:m,toggleN3rgyIntegration:y,toggleN3rgyIsIndirectSource:b,toggleIsReadingMeter:v,initialState:x}=function(e){const n=CY(),{state:t,replaceState:a}=n,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,MY),{showNotification:i}=vt(),[o,l]=(0,g.useState)(t);return(0,h.IT)(UY,{variables:{id:e},fetchPolicy:"no-cache",onCompleted:e=>{const n=e.getEnergySourceById,t={meterName:{error:"",value:n.name},locationId:{error:"",value:n.locationPoint.location.id,label:n.locationPoint.location.name},typeId:{error:"",value:{id:n.type.id,name:n.type.name},label:n.type.name},meterIn:"IN"===n.inOut||"BOTH"===n.inOut,meterOut:"OUT"===n.inOut||"BOTH"===n.inOut,isGeneration:n.isGeneration,code:n.meterCode||"",hardwareProviderName:n.hardwareProviderName,operatorProviderName:n.operatorProviderName,startDate:n.startDate?new Date(n.startDate):null,endDate:n.endDate?new Date(n.endDate):null,n3rgyIntegration:n.n3rgyConsentStatus===Vt.K.Granted||n.n3rgyConsentStatus===Vt.K.Requested,n3rgyIsIndirectSource:n.n3rgyIsIndirectSource||!1,isReadingMeter:n.isReadingMeter||!1,initialReading:n.initialReading||null};a(t),l(t)},onError:()=>{i("Server error occurred. Please try again later.","danger")}}),zY(zY({state:t},r),{},{initialState:o})}(a),T=()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(QY,{item:!0,children:(0,Ze.jsx)(Qe.s,{mutation:fY,onCompleted:()=>{t("The Meter ".concat(i.meterName.value," was updated successfully"))},onError:e=>{r("Something went wrong: ".concat(e.message,". If the problem persists, contact support."),"danger")},children:(e,t)=>{let{called:r}=t;return(0,Ze.jsx)(ze.$n,{name:"update-energyMeter__button--update",color:"success",disabled:!c||r,onClick:()=>{e({variables:{id:a,name:i.meterName.value,locationId:i.locationId.value,typeId:i.typeId.value.id,accountId:n,meterId:a,inOut:u,isGeneration:"Electricity"===i.typeId.value.name||"Heat & Steam"===i.typeId.value.name?i.isGeneration||!1:null,meterCode:i.code,hardwareProviderName:i.hardwareProviderName,operatorProviderName:i.operatorProviderName,startDate:i.startDate,endDate:i.endDate,n3rgyConsentStatus:"Electricity"===i.typeId.value.name&&!x.n3rgyIntegration&&i.n3rgyIntegration?Vt.K.Requested:void 0,n3rgyIsIndirectSource:i.n3rgyIsIndirectSource,isReadingMeter:i.isReadingMeter,initialReading:i.initialReading}})},children:"Update Meter"})}})})});return(0,Ze.jsxs)(KY,{children:[(0,Ze.jsx)(ZY,{name:"update-energyMeter__heading",size:"lg",children:"Update Meter"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(QY,{item:!0,children:[(0,Ze.jsx)(eH,{children:(0,Ze.jsx)(XY,{children:"What do you want to call this meter?"})}),(0,Ze.jsx)(ze.ks,{value:i.meterName.value,error:i.meterName.error,onChange:e=>{o({value:e.target.value})}},"meterName")]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(QY,{item:!0,children:[(0,Ze.jsx)(eH,{children:(0,Ze.jsx)(XY,{children:"What is the meter type?"})}),(0,Ze.jsx)(vY,{value:i.typeId,onChange:e=>{const{select:{value:n}}=e.target;s({value:n,label:n.name})},error:i.typeId.error})]})}),"Water"===i.typeId.value.name&&(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(QY,{item:!0,children:[(0,Ze.jsxs)(XY,{children:[i.typeId.value.name," In"]}),(0,Ze.jsx)(ze.Sc,{id:"create-meter-in",name:"in",onChange:()=>p(),checked:i.meterIn})]}),(0,Ze.jsxs)(QY,{item:!0,children:[(0,Ze.jsxs)(XY,{children:[i.typeId.value.name," Out"]}),(0,Ze.jsx)(ze.Sc,{id:"create-meter-out",name:"out",onChange:()=>m(),checked:i.meterOut})]}),"Ç"]}),("Electricity"===i.typeId.value.name||"Heat & Steam"===i.typeId.value.name)&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(QY,{item:!0,children:[(0,Ze.jsx)(eH,{children:(0,Ze.jsx)(XY,{children:"Renewable energy generating meter"})}),(0,Ze.jsx)(ze.Sc,{id:"is-generating-meter",name:"isGeneration",onChange:()=>d({fieldName:"isGeneration",value:!i.isGeneration}),checked:i.isGeneration||!1})]})}),"Electricity"===i.typeId.value.name&&(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsx)(QY,{item:!0,children:(0,Ze.jsxs)(eH,{children:[(0,Ze.jsx)(XY,{children:"AMR Integrated"}),(0,Ze.jsx)(zP.A,{title:"This is used to automate data from smart meters into Rio.",children:(0,Ze.jsx)(f.Icons.InfoOutlined,{color:"info"})})]})}),(0,Ze.jsx)(QY,{item:!0,children:(0,Ze.jsx)(ze.Sc,{disabled:i.n3rgyIntegration,onChange:()=>y(),checked:i.n3rgyIntegration})}),(0,Ze.jsx)(QY,{item:!0,children:(0,Ze.jsxs)(eH,{children:[(0,Ze.jsx)(XY,{children:"Indirect Data Source"}),(0,Ze.jsx)(zP.A,{title:"If this is toggled data imported from smart meters will be considered indirect data.",children:(0,Ze.jsx)(f.Icons.InfoOutlined,{color:"info"})})]})}),(0,Ze.jsx)(QY,{item:!0,children:(0,Ze.jsx)(ze.Sc,{onChange:()=>b(),checked:i.n3rgyIsIndirectSource})})]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(QY,{item:!0,children:[(0,Ze.jsxs)(eH,{children:[(0,Ze.jsx)(XY,{children:"Enable Reading Functionality"}),(0,Ze.jsx)(zP.A,{title:"When enabled, this meter will accept reading values instead of consumption values. An initial reading must be provided.",children:(0,Ze.jsx)(f.Icons.InfoOutlined,{color:"info"})})]}),(0,Ze.jsx)(ze.Sc,{onChange:()=>v(),checked:i.isReadingMeter})]})}),i.isReadingMeter&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(QY,{item:!0,children:[(0,Ze.jsx)(eH,{children:(0,Ze.jsx)(XY,{children:"Initial Reading"})}),(0,Ze.jsx)(ze.ks,{type:"number",value:Na(i.initialReading,""),onChange:e=>{d({fieldName:"initialReading",value:Na(e.target.value,"")})},placeholder:"Enter initial reading value"})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(QY,{item:!0,children:[(0,Ze.jsx)(eH,{children:(0,Ze.jsx)(XY,{children:"Which location is this meter at?"})}),(0,Ze.jsx)(nY,{value:i.locationId,onChange:e=>{const n=e.target.value;l({value:n,label:e.target.label})},error:i.locationId.error})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(QY,{item:!0,children:[(0,Ze.jsx)(eH,{children:(0,Ze.jsx)(XY,{children:"Meter Code"})}),(0,Ze.jsx)(ze.ks,{value:i.code,onChange:e=>d({fieldName:"code",value:e.target.value})})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(QY,{item:!0,children:[(0,Ze.jsx)(eH,{children:(0,Ze.jsx)(XY,{children:"Has this meter closed?"})}),(0,Ze.jsx)(eH,{children:(0,Ze.jsx)(XY,{children:"Start Date"})}),(0,Ze.jsx)(ze.lr,{name:"startDate",box:!0,onDayClick:e=>{d({fieldName:"startDate",value:e})},selectedDate:i.startDate,disabledDatesAfter:i.endDate}),(0,Ze.jsx)(eH,{children:(0,Ze.jsx)(XY,{children:"End Date"})}),(0,Ze.jsx)(ze.lr,{name:"endDate",box:!0,onDayClick:e=>{d({fieldName:"endDate",value:e})},selectedDate:i.endDate,disabledDatesBefore:i.startDate})]})}),(0,Ze.jsx)(T,{})]})},tH=e=>{let{modalState:n,accountId:t,onSuccess:a,onError:r}=e;return n.createModal?(0,Ze.jsx)(FY,{accountId:t,onSuccess:a,onError:r}):n.updateModal?(0,Ze.jsx)(nH,{accountId:t,onSuccess:a,onError:r,sourceId:n.updateModal}):null},aH=e=>{const{onDismiss:n,modalState:t,accountId:a,onComplete:r}=e,{showNotification:i}=vt();return t.createModal||t.updateModal?(0,Ze.jsx)(ze.aF,{show:!0,dismissable:!0,name:"ConfigurationEnergyMeter__Modal",onDismiss:n,span:6,height:"auto",maxHeight:"90vh",children:(0,Ze.jsx)(tH,{modalState:t,accountId:a,onSuccess:r,onError:i})}):null},rH="Electricity",iH="Heat & Steam",oH=["Meter Name","Meter Type","Meter Location"],lH="Meter Start Date (Optional dd/mm/yyyy)",sH="Meter End Date (Optional dd/mm/yyyy)",cH=[...oH,"Generation","Water In / Water Out","Meter Code (Optional)","Hardware Provider (Optional)","Operator Provider (Optional)",lH,sH],dH=e=>void 0===e?"blank":e.toString().toLowerCase(),uH=[Vt.mF.In,Vt.mF.Out,Vt.mF.Both],pH=["true","false","blank"],mH=e=>e["Meter Type"]!==rH&&e["Meter Type"]!==iH||!pH.includes(dH(e.Generation))?null:"true"===dH(e.Generation),fH=(e,n,t,a,r)=>e.map(e=>({id:(0,Ai.A)(),name:e["Meter Name"],locationId:a[e["Meter Location"]].id,typeId:t[e["Meter Type"]].id,accountId:n,isGeneration:mH(e),inOut:e["Water In / Water Out"]?e["Water In / Water Out"].toUpperCase():null,meterCode:e["Meter Code (Optional)"]||null,hardwareProviderName:e["Hardware Provider (Optional)"]?r[e["Hardware Provider (Optional)"]].id:null,operatorProviderName:e["Operator Provider (Optional)"]?r[e["Operator Provider (Optional)"]].id:null,startDate:e[lH]?new Date(e[lH]):null,endDate:e[sH]?new Date(e[sH]):null,n3rgyConsentStatus:!0===e["Enable N3rgy Integration"]?Vt.K.Requested:null}));function yH(e){let{onDismiss:n,accountId:t,onComplete:a}=e;const[r,i]=(0,g.useState)([]),[o]=(0,Ot.n)(mY),l=Sf({accountId:t,pageSize:Qa}),s=(0,N.m)(),c=(0,h.IT)(bY),d=c.data&&c.data.getAllEnergyType?c.data.getAllEnergyType:[],u=Gt()(d).keyBy("name").value(),p=Gt()(l).keyBy("name").value();return(0,Ze.jsx)(VR,{template:{type:xR.Dynamic,columns:cH,fileName:"meters-upload"},errors:r,onFileInput:async e=>{var n;let[r]=e;const[l,c]=await _r(r);if(l&&l.length)return i(l);c.length||i(["Your spreadsheet is empty, please add some rows"]);const d=Gt()(c).map("Meter Location").uniq().value(),m=await s.query({query:gY,variables:{accountId:t,limit:Qa,filters:{set:[{field:"name",filterType:Vt.pe.Set,values:d}]}},fetchPolicy:"network-only"}),f=null==m||null===(n=m.data)||void 0===n||null===(n=n.getLocationsPage)||void 0===n?void 0:n.rows;if(null==f||!f.length)return i(["Locations from spreadsheet are not found in the current account"]);const y=Gt()(f).keyBy("name").value(),[g,b]=await(async(e,n,t,a,r)=>{const i=((e,n,t,a)=>{const r=[],i=[];return e.forEach((e,o)=>{const l=o+2,s=e["Meter Name"].toString(),c=(e=>n=>"Row ".concat(e,": value not provided for ").concat(n))(l),d=(e=>function(n,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return"Row ".concat(e,": invalid ").concat(n," - ").concat(t,".").concat(a.length?" Should be one of ".concat(a.join(", ")):"")})(l),u=(e=>(n,t,a)=>"Row ".concat(e,": invalid value ").concat(t," for ").concat(n,", format should be ").concat(a))(l),p=dH(e.Generation);function m(n){const t=e[n].toString();"Invalid Date"===new Date(t).toString()&&r.push(u(n,t,"dd/mm/yyyy"))}oH.forEach(n=>{e[n]||r.push((e=>"".concat(e," is a required field"))(n))}),i.includes(s.toLowerCase())?r.push("Row ".concat(l,": name duplicate - ").concat(e["Meter Name"])):i.push(s.toLowerCase()),e["Meter Name"]||r.push(c("Meter Name")),e["Meter Type"]||r.push(c("Meter Type")),e["Meter Location"]||r.push(c("Meter Location")),"Water"!==e["Meter Type"]||e["Water In / Water Out"]?"Water"!==e["Meter Type"]||uH.includes(String(e["Water In / Water Out"]).toUpperCase())||r.push(d("Water In / Water Out",e["Water In / Water Out"],uH)):r.push(c("Water In / Water Out")),e["Meter Type"]!==rH&&e["Meter Type"]!==iH&&void 0!==e.Generation&&r.push((e=>"Row ".concat(e," - '").concat("Generation","' should be blank"))(l)),e["Meter Type"]!==rH&&e["Meter Type"]!==iH||pH.includes(p)||r.push(d("Generation",e.Generation,pH)),n[e["Meter Type"]]||r.push(d("Meter Type",e["Meter Type"],Object.values(n).map(e=>e.name))),t[e["Meter Location"]]||r.push(d("Meter Location",e["Meter Location"])),e["Hardware Provider (Optional)"]&&!a[e["Hardware Provider (Optional)"]]&&r.push(d("Hardware Provider (Optional)",e["Hardware Provider (Optional)"])),e["Operator Provider (Optional)"]&&!a[e["Operator Provider (Optional)"]]&&r.push(d("Operator Provider (Optional)",e["Operator Provider (Optional)"])),e["Enable N3rgy Integration"]&&!0!==e["Enable N3rgy Integration"]&&r.push("Row ".concat(l,": 'Enable N3rgy Integration' column invalid value, must be blank or TRUE, instead received: ").concat(e["Enable N3rgy Integration"])),e[lH]&&m(lH),e[sH]&&m(sH)}),r})(e,n,t,a);return i.length?[i,null]:[null,fH(e,r,n,t,a)]})(c,u,y,p,t);if(g&&g.length)return i(g);try{await o({variables:{energySources:b}}),a("Meters have been uploaded","success")}catch(e){a("Something went wrong","danger")}},onDismiss:n})}var gH,bH,hH,vH,xH,TH,OH;function kH(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const jH=(0,Ge.default)("span")(gH||(gH=kH(["\n  font-weight: bold;\n"]))),CH=Ge.default.div(bH||(bH=kH(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),SH=(0,Ge.default)(ze.DZ)(hH||(hH=kH(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.lg.spacing),NH=(0,Ge.default)(ze.EY)(vH||(vH=kH(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.lg.spacing),wH=(0,Ge.default)(ze.fs)(xH||(xH=kH(["\n  margin-bottom: ",";\n  min-height: 300px;\n"])),e=>e.theme.geometry.lg.spacing),DH=(0,Ge.default)(ze.fv)(TH||(TH=kH(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),AH=(0,Ge.default)("div")(OH||(OH=kH(["\n  height: ",";\n"])),e=>e.theme.geometry.lg.spacing),RH=e=>{let{onDismiss:n}=e;const t=rt(),[a]=(0,gs._)(yY),[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)(!1),[s,c]=(0,g.useState)(""),[d,u]=(0,g.useState)([]),[p]=(0,Ot.n)(fY),[m,f]=(0,g.useState)(""),y=(0,g.useMemo)(()=>d.filter(e=>{let{status:n}=e;return"success"===n}),[d]),b=(0,g.useMemo)(()=>d.filter(e=>{let{status:n}=e;return"error"===n}),[d]);return(0,Ze.jsx)(ze.aF,{show:!0,dismissable:!0,onDismiss:n,span:6,height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(CH,{children:[(0,Ze.jsx)(SH,{size:"lg",children:"Bulk Integrate Meters"}),(0,Ze.jsx)(NH,{children:"Provide a white space or comma separated list of meter codes that you would like to integrate with the automated monthly readings (max limit 1000)"}),o&&(0,Ze.jsx)(NH,{color:"success",children:"Submission was successful (see the results below)! To integrate another set of meters please open the modal again"}),s&&(0,Ze.jsxs)(NH,{color:"danger",children:["Error: ",s]}),!o&&(0,Ze.jsx)(wH,{disabled:r,value:m,onChange:e=>f(e.target.value)}),o&&(0,Ze.jsxs)(Ze.Fragment,{children:[!b.length&&(0,Ze.jsx)(NH,{color:"success",children:"All meters were successfully integrated!"}),y.length>0&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(NH,{color:"success",children:["Successfully integrated meters (",y.length,"):"]}),y.map(e=>{let{meterCode:n}=e;return(0,Ze.jsx)("div",{children:(0,Ze.jsx)(jH,{children:n})},n)}),(0,Ze.jsx)(AH,{})]}),b.length>0&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(NH,{color:"danger",children:["Failed to integrate meters (",b.length,"):"]}),b.map(e=>{let{meterCode:n,errorMessage:t}=e;return(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(jH,{children:n})," - Error: ",t]},n)}),(0,Ze.jsx)(AH,{})]})]}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsx)(DH,{item:!0,span:6,children:(0,Ze.jsx)(ze.$n,{onClick:n,disabled:r,children:"Cancel"})}),(0,Ze.jsx)(DH,{item:!0,span:6,children:(0,Ze.jsx)(ze.$n,{color:"success",disabled:r||o||!m,onClick:async()=>{try{i(!0);const e=(0,zt.uniq)(m.replace(/\n/g," ").replace(/,/g," ").split(" ").map(e=>e.trim()).filter(Boolean));if(0===e.length)throw new Error("Please provide at least one meter code");if(e.length>1e3)throw new Error("The maximum limit of 1000 was exceeded, you provided: ".concat(e.length));const n=(await a({variables:{accountId:t,offset:0,limit:1e3,filters:{set:[{values:e,filterType:"set",field:"meterCode"}]}}})).data.getEnergySourceByAccountIdAndType.rows,r=n.map(e=>e.meterCode),o=Yo(r);if(o.length>0)throw new Error("The following meter codes have more than one meter associated to them in the system, please resolve these and try again: ".concat(o.join(", ")));if(n.length<e.length){const n=e.filter(e=>!r.includes(e)).join(", ");throw new Error("The following meters were not found in the system, please remove them from the list and try again: ".concat(n))}const s=n.map(e=>({id:e.id,meterId:e.id,name:e.name,locationId:e.locationPoint.location.id,typeId:e.type.id,accountId:t,inOut:e.inOut,isGeneration:e.isGeneration,meterCode:e.meterCode,hardwareProviderName:e.hardwareProviderName,operatorProviderName:e.operatorProviderName,startDate:e.startDate,endDate:e.endDate,n3rgyConsentStatus:Vt.K.Requested,n3rgyIsIndirectSource:e.n3rgyIsIndirectSource})),d=await Promise.allSettled(s.map(e=>p({variables:e})));u(d.map((e,n)=>{const t=s[n];if("fulfilled"===e.status){console.log(e.value);const n=e.value.data.updateEnergySource;return n.n3rgyConsentStatus===Vt.K.FailedToRequest?{meterCode:t.meterCode,status:"error",errorMessage:n.n3rgyConsentErrorMessage}:{meterCode:t.meterCode,status:"success",errorMessage:null}}const a="string"==typeof e.reason?e.reason:e.reason.message;return{meterCode:t.meterCode,status:"error",errorMessage:a}})),l(!0),c(""),i(!1)}catch(e){i(!1),c(e.message)}},children:"Start Integration"})})]})]})})};var PH,LH,IH,EH,_H,FH,BH;function UH(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const MH=(0,Ge.default)("span")(PH||(PH=UH(["\n  font-weight: bold;\n"]))),VH=Ge.default.div(LH||(LH=UH(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),zH=(0,Ge.default)(ze.DZ)(IH||(IH=UH(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.lg.spacing),GH=(0,Ge.default)(ze.EY)(EH||(EH=UH(["\n  text-align: ",";\n  margin-bottom: ",";\n"])),e=>e.align||"center",e=>e.theme.geometry.lg.spacing),$H=(0,Ge.default)(ze.fs)(_H||(_H=UH(["\n  margin-bottom: ",";\n  min-height: 300px;\n"])),e=>e.theme.geometry.lg.spacing),WH=(0,Ge.default)(ze.fv)(FH||(FH=UH(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),qH=(0,Ge.default)("div")(BH||(BH=UH(["\n  height: ",";\n"])),e=>e.theme.geometry.lg.spacing),JH=e=>{let{onDismiss:n}=e;const t=rt(),[a]=(0,gs._)(yY),[r,{loading:i,error:o,data:l}]=(0,Ot.n)(hY,{onCompleted:()=>{h("")}}),[s,c]=(0,g.useState)(),[d,u]=(0,g.useState)(),[p,m]=(0,g.useState)(""),[f,y]=(0,g.useState)(!1),[b,h]=(0,g.useState)(""),v=null==l?void 0:l.triggerN3rgyImport,x=Boolean(v),T=f||i||x,O=b||(null==o?void 0:o.message),k=v?v.filter(e=>!e.errorMessage&&0===e.missingDataTimestamps.length):[],j=v?v.filter(e=>!e.errorMessage&&e.missingDataTimestamps.length>0):[],C=v?v.filter(e=>e.errorMessage):[];return(0,Ze.jsx)(ze.aF,{show:!0,dismissable:!0,onDismiss:n,span:6,height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(VH,{children:[(0,Ze.jsx)(zH,{size:"lg",children:"N3rgy Data Import"}),(0,Ze.jsx)(GH,{children:"Provide a white space or comma separated list of meter codes that you would like to import n3rgy data from (max limit 50)"}),x&&(0,Ze.jsx)(GH,{color:"success",children:"Import was successful (see the results below)! To import data from another set of meters please open the modal again"}),O&&(0,Ze.jsxs)(GH,{color:"danger",children:["Error: ",O]}),!x&&(0,Ze.jsxs)("div",{children:[(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(ze.JU,{children:"Start Date"}),(0,Ze.jsx)(ze.lr,{disabled:f||i,selectedDate:s,onDayClick:c})]}),(0,Ze.jsx)(qH,{}),(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(ze.JU,{children:"End Date"}),(0,Ze.jsx)(ze.lr,{disabled:f||i,selectedDate:d,onDayClick:u})]}),(0,Ze.jsx)(qH,{}),(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(ze.JU,{children:"Meter codes"}),(0,Ze.jsx)($H,{disabled:f||i,value:p,onChange:e=>m(e.target.value)})]})]}),x&&(0,Ze.jsxs)(Ze.Fragment,{children:[!C.length&&(0,Ze.jsx)(GH,{color:"success",children:"All meters' data was successfully imported!"}),k.length>0&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(GH,{color:"success",align:"left",children:["Successfully imported meters with full data (",k.length,"):"]}),k.map((e,n)=>{let{mpxn:t,numberOfUploadedMeterReadings:a}=e;return(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(MH,{children:t})," ",0===n?"(Number of readings: ".concat(a,")"):""]},t)}),(0,Ze.jsx)(qH,{}),(0,Ze.jsx)(qH,{})]}),j.length>0&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(GH,{color:"warning",align:"left",children:["Successfully imported meters with partial data (",j.length,"):"]}),j.map(e=>{let{mpxn:n,numberOfUploadedMeterReadings:t,missingDataTimestamps:a}=e;return(0,Ze.jsxs)(g.Fragment,{children:[(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(MH,{children:n})," (Number of readings: ",t,")",(0,Ze.jsxs)("div",{children:["Missing data blocks:"," ",a.map(e=>(0,Ze.jsx)("div",{children:e},e))]})]}),(0,Ze.jsx)(qH,{})]},n)}),(0,Ze.jsx)(qH,{})]}),C.length>0&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(GH,{color:"danger",align:"left",children:["Failed to import meters (",C.length,"):"]}),C.map(e=>{let{mpxn:n,errorMessage:t}=e;return(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(MH,{children:n})," - Error: ",t]},n)}),(0,Ze.jsx)(qH,{})]})]}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsx)(WH,{item:!0,span:6,children:(0,Ze.jsx)(ze.$n,{onClick:n,disabled:T,children:"Cancel"})}),(0,Ze.jsx)(WH,{item:!0,span:6,children:(0,Ze.jsx)(ze.$n,{color:"success",disabled:T,onClick:async()=>{try{if(y(!0),!s||!d)throw new Error("Please provide a start date and an end date");if(Wt()(s).isAfter(Wt()(d)))throw new Error("The start date cannot after the end date");if(Wt()(s).add(3,"months").isBefore(Wt()(d)))throw new Error("The difference between the start and end dates cannot be more than 3 months");if(Wt()(s).isSame(Wt()(),"day")||Wt()(d).isSame(Wt()(),"day"))throw new Error("The start and end dates cannot be today");if(Wt()(s).isAfter(Wt()())||Wt()(d).isAfter(Wt()()))throw new Error("The start and end dates must be in the past");if(!p)throw new Error("Please provide meter codes to import");const e=(0,zt.uniq)(p.replace(/\n/g," ").replace(/,/g," ").split(" ").map(e=>e.trim()).filter(Boolean));if(e.length>50)throw new Error("The maximum limit of 50 was exceeded, you provided: ".concat(e.length));const n=(await a({variables:{accountId:t,offset:0,limit:50,filters:{set:[{values:e,filterType:"set",field:"meterCode"}]}}})).data.getEnergySourceByAccountIdAndType.rows.map(e=>e.meterCode),i=Yo(n);if(i.length>0)throw new Error("The following meter codes have more than one meter associated to them in the system, please resolve these and try again: ".concat(i.join(", ")));if(n.length<e.length){const t=e.filter(e=>!n.includes(e)).join(", ");throw new Error("The following meters were not found in the system, please remove them from the list and try again: ".concat(t))}const o=Wt()(s).startOf("day").add(30,"minutes").format("YYYYMMDDHHmm"),l=Wt()(d).startOf("day").add(23,"hours").add(59,"minutes").add(59,"seconds").format("YYYYMMDDHHmm");r({variables:{input:{startDate:o,endDate:l,onlyIncludeAccountIds:[t],onlyIncludeMpxns:e}}}),h("")}catch(e){y(!1),h(e.message)}},children:i?"Importing":"Start Import"})})]})]})})};var YH,HH,KH;function QH(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ZH(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?QH(Object(t),!0).forEach(function(n){XH(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):QH(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function XH(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function eK(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const nK=Ge.default.div(YH||(YH=eK(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),tK=(0,Ge.default)(ze.vj)(HH||(HH=eK(["\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),aK=(0,Ge.default)(bh)(KH||(KH=eK(["\n  & > div {\n    width: auto;\n  }\n"]))),rK={createModal:!1,uploadModal:!1,updateModal:!1,bulkIntegrateModal:!1,n3rgyImportModal:!1,deleteModal:!1},iK=e=>{const[n,t]=(0,g.useState)({accountId:e.accountId,modalState:rK}),[a,r]=(0,g.useState)(""),[i,o]=(0,g.useState)(e.accountId),[l,s]=(0,g.useState)(),c=rc(),d=(0,N.m)(),u=()=>{null!=l&&l.api&&null!=l&&l.datasource&&l.api.refreshServerSide({purge:!0})};(0,g.useEffect)(()=>{u()},[i]);const p=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success";t(t=>ZH(ZH({},t),{},{notification:{message:e,color:n},modalState:rK,shouldRefetch:!0})),u()},m=(e,n)=>{"create"===e&&t(e=>ZH(ZH({},e),{},{modalState:{createModal:!0}})),"upload"===e&&t(e=>ZH(ZH({},e),{},{modalState:{uploadModal:!0}})),"update"===e&&t(e=>ZH(ZH({},e),{},{modalState:{updateModal:n}})),"integrate"===e&&t(e=>ZH(ZH({},e),{},{modalState:{bulkIntegrateModal:!0}})),"n3rgy"===e&&t(e=>ZH(ZH({},e),{},{modalState:{n3rgyImportModal:!0}})),"delete"===e&&t(e=>ZH(ZH({},e),{},{modalState:{deleteModal:n}}))},f=()=>{t(e=>ZH(ZH({},e),{},{modalState:rK}))},y=(0,g.useCallback)(()=>{var e,n;null==l||null===(e=l.api)||void 0===e||e.setColumnFilterModel("name",{filterType:"text",type:"contains",filter:a}),null==l||null===(n=l.api)||void 0===n||n.onFilterChanged()},[null==l?void 0:l.api,a]),b=(0,g.useMemo)(()=>(0,zt.debounce)(y,250),[y]);(0,g.useEffect)(()=>{b()},[a,b]);const h=async e=>{const{data:{getEnergySourceByAccountIdAndType:{totalRows:n,rows:t}}}=await d.query({query:yY,variables:ZH({},e),fetchPolicy:"network-only"});return{rows:t,totalRows:n}};return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationEnergyMetersContainer",container:!0,fullHeight:!0,children:[n.notification&&(0,Ze.jsx)(ze.Eg,{name:"create-energyMeter__notification",show:!0,color:n.notification.color,onClose:()=>{t(e=>ZH(ZH({},e),{},{notification:null}))},children:n.notification.message}),n.modalState.uploadModal?(0,Ze.jsx)(yH,{onComplete:p,accountId:i,onDismiss:f}):(0,Ze.jsx)(aH,{accountId:i,modalState:n.modalState,onDismiss:f,onComplete:p}),!!n.modalState.bulkIntegrateModal&&(0,Ze.jsx)(RH,{onDismiss:f}),!!n.modalState.n3rgyImportModal&&(0,Ze.jsx)(JH,{onDismiss:f}),(0,Ze.jsxs)(aK,{name:"ConfigurationEnergyMetersContainer__Controls",icon:"bolt",iconColor:"primary",title:"Meters",children:[(0,Ze.jsx)(tK,{name:"ConfigurationEnergyMetersContainer__Controls__Search",value:a,onChange:e=>{var n;r(null===(n=e.target)||void 0===n?void 0:n.value)},hideButton:!0}),(0,Ze.jsxs)(HF,{container:!0,item:!0,distribution:"center",vdistribution:"center",itemAlign:"center",children:[(0,Ze.jsx)(ze.fv,{item:1,children:(0,Ze.jsx)(ze.$n,{name:"ConfigurationEnergyMetersContainer__Controls__Button--add",color:"primary",inline:!0,onClick:()=>m("create"),children:"+ Add Meter"})}),(0,Ze.jsx)(ze.fv,{item:2,children:(0,Ze.jsx)(ze.$n,{name:"ConfigurationEnergyMetersContainer__Controls__Button--upload",color:"secondary",inline:!0,onClick:()=>m("upload"),children:"Upload Meters"})}),(0,Ze.jsx)(ze.fv,{item:2,children:(0,Ze.jsx)(ze.$n,{name:"ConfigurationEnergyMetersContainer__Controls__Button--integrate",color:"secondary",inline:!0,onClick:()=>m("integrate"),children:"Bulk Integrate"})}),(0,Ze.jsx)(ze.fv,{item:2,children:(0,Ze.jsx)(ze.$n,{name:"ConfigurationEnergyMetersContainer__Controls__Button--integrate",color:"secondary",inline:!0,onClick:()=>m("n3rgy"),children:"N3rgy import"})}),(0,Ze.jsx)(ze.fv,{item:2,children:(0,Ze.jsx)(MP,{fetchRows:h,gridApi:null==l?void 0:l.api,defaultExportFileName:"Meters Exports",label:"Export Data",columnsToSkip:["Actions"]})})]})]}),!!c.account.includes("getAll")&&(0,Ze.jsx)(nK,{children:(0,Ze.jsx)(Kh,{onChange:e=>{o(e.id)},value:i,name:"ConfigurationEnergyMetersContainer__AccountSelector"})}),(0,Ze.jsx)(KJ,{accountId:i,onEdit:e=>m("update",e),setGridApi:s,fetchRows:h},i)]})};var oK,lK,sK,cK,dK,uK,pK,mK;function fK(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yK=(0,D.J1)(oK||(oK=fK(["\n  mutation UploadLearnContent(\n    $accountId: ID\n    $url: String\n    $contentPath: String\n    $id: ID\n    $title: String!\n    $description: String\n    $cpd: Int\n    $thumbnail: File!\n    $content: File!\n    $type: LearnContentType!\n    $version: String\n    $presignedLinks: [String]\n  ) {\n    uploadLearnContent(\n      accountId: $accountId\n      url: $url\n      contentPath: $contentPath\n      id: $id\n      title: $title\n      description: $description\n      cpd: $cpd\n      thumbnail: $thumbnail\n      content: $content\n      type: $type\n      version: $version\n      presignedLinks: $presignedLinks\n    ) @client {\n      status\n      fileUploaded\n    }\n  }\n"]))),gK=(0,D.J1)(lK||(lK=fK(["\n  query InitiateLearnFileUpload($accountId: ID!, $type: String!, $fileName: String!) {\n    initiateLearnFileUpload(accountId: $accountId, type: $type, fileName: $fileName) {\n      url\n      contentPath\n      id\n    }\n  }\n"]))),bK=(0,D.J1)(sK||(sK=fK(["\n  query InitiateLearnFileUpload($accountId: ID!, $type: String!, $files: [ScormFileMetadata!]) {\n    initiateScormFileUpload(accountId: $accountId, type: $type, files: $files) {\n      url\n      contentPath\n      id\n    }\n  }\n"]))),hK=(0,D.J1)(cK||(cK=fK(["\n  query GetAllLearnSubscriptions($accountId: String!) {\n    getAllLearnSubscriptions(accountId: $accountId) {\n      subscriptions\n      bundleShow\n      bundleHidden\n      mandatoryBundleId\n    }\n  }\n"]))),vK=(0,D.J1)(dK||(dK=fK(["\n  mutation SaveLearnSubscriptions(\n    $accountId: String!\n    $subscriptions: [String!]!\n    $bundleShow: [String!]!\n    $bundleHidden: [String!]!\n    $mandatoryBundleId: String\n  ) {\n    saveLearnSubscriptions(\n      input: {\n        accountId: $accountId\n        subscriptions: $subscriptions\n        bundleShow: $bundleShow\n        bundleHidden: $bundleHidden\n        mandatoryBundleId: $mandatoryBundleId\n      }\n    ) {\n      subscriptions\n      bundleShow\n      bundleHidden\n      mandatoryBundleId\n    }\n  }\n"]))),xK=(0,D.J1)(uK||(uK=fK(["\n  mutation SaveLearnContentMetadata(\n    $id: ID!\n    $title: String!\n    $description: String\n    $cpd: Int\n    $passScore: Int\n    $contentPath: String\n    $type: LearnContentType!\n    $categories: [CourseCategory!]\n    $assessmentId: ID\n    $reactionId: ID\n    $accountId: ID\n    $isEngage: Boolean\n    $url: String\n    $openIframe: Boolean\n  ) {\n    saveLearnContentMetadata(\n      input: {\n        id: $id\n        title: $title\n        description: $description\n        contentPath: $contentPath\n        type: $type\n        cpd: $cpd\n        passScore: $passScore\n        categories: $categories\n        assessmentId: $assessmentId\n        reactionId: $reactionId\n        accountId: $accountId\n        isEngage: $isEngage\n        url: $url\n        openIframe: $openIframe\n      }\n    ) {\n      id\n      accountId\n      name\n      type\n      isEngage\n      assessment {\n        ...EvaluationFields\n      }\n      reaction {\n        ...EvaluationFields\n      }\n      metaData {\n        viewed\n        link\n        thumbnail\n        description\n        categories\n        cpd\n        passScore\n        url\n        openIframe\n      }\n    }\n  }\n  ","\n"])),Wv),TK=(0,D.J1)(pK||(pK=fK(["\n  mutation SaveLearnBundle(\n    $id: ID!\n    $title: String!\n    $description: String!\n    $restricted: Boolean!\n    $startDate: String\n    $endDate: String\n    $courses: [ID!]!\n    $isEngage: Boolean\n  ) {\n    saveLearnBundle(\n      input: {\n        id: $id\n        title: $title\n        description: $description\n        restricted: $restricted\n        startDate: $startDate\n        endDate: $endDate\n        courses: $courses\n        isEngage: $isEngage\n      }\n    ) {\n      id\n      title\n      description\n      restricted\n      startDate\n      endDate\n      courses\n      isEngage\n    }\n  }\n"]))),OK=(0,D.J1)(mK||(mK=fK(["\n  query GetAllCoursesAndLearnData {\n    getAllCourses {\n      isLastPage\n      totalItemCount\n      data {\n        id\n        name\n        type\n        accountId\n        isEngage\n        reaction {\n          ...EvaluationFields\n        }\n        assessment {\n          ...EvaluationFields\n        }\n        metaData {\n          viewed\n          link\n          thumbnail\n          description\n          categories\n          cpd\n          passScore\n          url\n          openIframe\n        }\n      }\n    }\n\n    getAllLearnBundles {\n      id\n      title\n      description\n      restricted\n      startDate\n      endDate\n      isEngage\n      courses\n    }\n  }\n  ","\n"])),Wv),kK=[{label:"Waste",value:"WASTE"},{label:"Water",value:"WATER"},{label:"Energy",value:"ENERGY"},{label:"Transport",value:"TRANSPORT"},{label:"Environmental Social Governance (ESG)",value:"ENVIRONMENTAL_SOCIAL_GOVERNANCE"},{label:"Circular Economy",value:"CIRCULAR_ECONOMY"},{label:"Health & Safety",value:"HEALTH_AND_SAFETY"},{label:"Health & Wellbeing",value:"HEALTH_AND_WELLBEING"}],jK=(e,n,t)=>fetch(e).then(e=>e.arrayBuffer()).then(e=>new File([e],n,{type:t})),CK=e=>new Promise((n,t)=>{const a=new FileReader;a.readAsDataURL(e),a.onload=()=>n(a.result.toString()),a.onerror=e=>t(e)});function SK(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function NK(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?SK(Object(t),!0).forEach(function(n){wK(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):SK(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function wK(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const DK=e=>e.size<5e9,AK=e=>"File ".concat(e.webkitRelativePath||e.name," is ").concat(Math.round(e.size/5e9),"MB which exceeds the maximum upload limit of 5 GB.\n"),RK=e=>e.length<=0?null:e.map(e=>AK(e)).join("\n"),PK="ASSESSMENT",LK="REACTION",IK={[PK]:"Assessment",[LK]:"Reaction"};var EK,_K,FK,BK,UK,MK,VK,zK,GK,$K;function WK(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function qK(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?WK(Object(t),!0).forEach(function(n){JK(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):WK(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function JK(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function YK(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const HK=Ge.default.div(EK||(EK=YK(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),KK=(0,Ge.default)(ze.fv)(_K||(_K=YK(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),QK=(0,Ge.default)(ze.DZ)(FK||(FK=YK(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),ZK=(0,Ge.default)(ze.JU)(BK||(BK=YK(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),XK=Ge.default.div(UK||(UK=YK(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),eQ=Ge.default.img(MK||(MK=YK(["\n  width: 200px;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),nQ=Ge.default.a(VK||(VK=YK(["\n  margin-bottom: ",";\n  text-decoration-line: underline;\n  cursor: pointer;\n"])),e=>e.theme.geometry.xs.spacing),tQ=Ge.default.div(zK||(zK=YK(["\n  display: none;\n"]))),aQ=Ge.default.p(GK||(GK=YK(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),rQ=(0,Ge.default)(ze.$n)($K||($K=YK(["\n  width: 200px;\n"]))),iQ=[{label:"PDF",value:Vt.US.Pdf},{label:"Video",value:Vt.US.Video},{label:"SCORM",value:Vt.US.Scorm},{label:"URL",value:Vt.US.Url}],oQ={label:"Not selected",value:null},lQ=function(e){var n,t,a;let{course:r,uploadContent:i,onSuccess:o,edit:l}=e;const s=rc(),c=rt(),[d,u]=(0,g.useState)({id:r.id||(0,Ai.A)(),title:r.name||"",description:r.metaData.description||"",isSubmitted:!1,invalidFiles:[],type:r.type||"",categories:r.metaData.categories?r.metaData.categories.map(e=>kK.find(n=>n.value===e)):[],thumbnail:r.metaData.thumbnail||null,thumbnailSource:null,content:r.metaData.link||null,fileError:null,cpd:r.metaData.cpd||0,passScore:r.metaData.passScore||0,assessmentId:null===(n=r.assessment)||void 0===n?void 0:n.id,reactionId:null===(t=r.reaction)||void 0===t?void 0:t.id,isEngage:r.isEngage,url:r.metaData.url,openIframe:r.metaData.openIframe}),p=(0,h.IT)(qv,{fetchPolicy:"network-only"}),m=(null==p||null===(a=p.data)||void 0===a?void 0:a.getAllEvaluations)||[],f=m.filter(e=>e.type===LK),y=m.filter(e=>e.type===PK),b=e=>s.learn.includes("createEvaluationAll")?e:e.filter(e=>e.accountId===c),v=(0,g.useRef)(null),x=(0,g.useRef)(null),{sub:T}=at(),O=e=>{e.persist(),u(n=>qK(qK({},n),{},{[e.target.name]:e.target.value}))},k=e=>{const n=e.target.files[0];DK(n)?u(t=>qK(qK({},t),{},{[e.target.name]:n,fileError:""})):u(e=>qK(qK({},e),{},{fileError:AK(n)}))};(0,g.useEffect)(()=>{(async e=>"string"==typeof e?e:e instanceof File?CK(e):null)(d.thumbnail).then(e=>u(n=>qK(qK({},n),{},{thumbnailSource:e})))},[d.thumbnail]);const j=new Yr(r).getHandleMethod();return(0,Ze.jsxs)(HK,{name:"create-content",children:[(0,Ze.jsx)(QK,{size:"lg",children:"Engage Content Details"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Title"})}),(0,Ze.jsx)(ze.ks,{disabled:d.isSubmitted,onChange:O,name:"title",value:d.title,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Content Type"})}),(0,Ze.jsx)(ze.l6,{disabled:d.isSubmitted,onChange:e=>{u(n=>qK(qK({},n),{},{[e.target.name]:e.target.value,fileError:null,content:null}))},name:"type",value:d.type,box:!0,options:iQ})]})}),d.type===Vt.US.Url&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"URL"})}),(0,Ze.jsx)(ze.ks,{disabled:d.isSubmitted,onChange:O,name:"url",value:d.url,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Open URL in Iframe"})}),(0,Ze.jsx)(ze.Sc,{checked:void 0===d.openIframe||d.openIframe,size:"md",onChange:e=>{u(n=>qK(qK({},n),{},{openIframe:e.target.checked}))}})]})})]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Categories"})}),(0,Ze.jsx)(ze.KF,{multiValueColor:"tertiary",onChange:e=>{u(n=>qK(qK({},n),{},{categories:e.target.select}))},isDisabled:d.isSubmitted,value:d.categories,options:kK,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Description"})}),(0,Ze.jsx)(ze.fs,{size:"lg",disabled:d.isSubmitted,onChange:O,name:"description",value:d.description,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"CPD Value (Minutes)"})}),(0,Ze.jsx)(ze.ks,{type:"number",disabled:d.isSubmitted,onChange:O,name:"cpd",value:parseInt(d.cpd),box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Pass Score"})}),(0,Ze.jsx)(ze.ks,{type:"number",disabled:d.isSubmitted,onChange:O,name:"passScore",value:parseInt(d.passScore),box:!0})]})}),s.learn.includes("createCourseAll")&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Include into Engage subscription"})}),(0,Ze.jsx)(ze.Sc,{checked:d.isEngage,size:"md",onChange:e=>{u(n=>qK(qK({},n),{},{isEngage:e.target.checked}))}})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Assessment"})}),(0,Ze.jsx)(ze.l6,{disabled:d.isSubmitted,onChange:e=>{u(qK(qK({},d),{},{assessmentId:e.target.select.value}))},name:"assessmentId",value:d.assessmentId,options:[oQ].concat(b(y).map(e=>({label:e.name,value:e.id}))),box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Reaction"})}),(0,Ze.jsx)(ze.l6,{disabled:d.isSubmitted,onChange:e=>{u(qK(qK({},d),{},{reactionId:e.target.select.value}))},name:"reactionId",value:d.reactionId,options:[oQ].concat(b(f).map(e=>({label:e.name,value:e.id}))),box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Thumbnail"})}),!d.thumbnail&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.h$,{background:!0,disabled:d.isSubmitting,text:d.thumbnailFileError||"Select a file",buttonText:"Select File",onClick:()=>{v.current.click()}}),(0,Ze.jsx)(tQ,{children:(0,Ze.jsx)("input",{name:"thumbnail",type:"file",ref:v,onChange:e=>{const n=e.target.files[0];DK(n)?u(t=>qK(qK({},t),{},{[e.target.name]:n,thumbnailFileError:""})):u(e=>qK(qK({},e),{},{thumbnailFileError:AK(n)}))},accept:"image/*"})})]}),d.thumbnail&&(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsxs)(ze.fv,{container:!0,item:!0,fullWidth:!0,children:[(0,Ze.jsx)(eQ,{src:d.thumbnailSource,alt:""}),d.thumbnail.name?(0,Ze.jsx)(aQ,{children:d.thumbnail.name}):(0,Ze.jsx)(nQ,{href:d.thumbnail,children:"Download Thumbnail"}),(0,Ze.jsx)(rQ,{color:"danger",onClick:()=>{u(e=>qK(qK({},e),{},{thumbnail:null}))},children:"Remove thumbnail"})]})})]})}),d.type!==Vt.US.Url&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(KK,{item:!0,children:[(0,Ze.jsx)(XK,{children:(0,Ze.jsx)(ZK,{children:"Content"})}),!d.content&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.h$,{background:!0,name:"contentfile",disabled:d.isSubmitting||!d.type,text:d.fileError||"Select a file",buttonText:"Select File",onClick:()=>{x.current.click()}}),(0,Ze.jsxs)(tQ,{children:[d.type===Vt.US.Scorm&&(0,Ze.jsx)("input",{name:"content",type:"file",ref:x,onChange:e=>{const n=e.target.files,t=(e=>{const n=[];for(let t=0;t<e.length;t++){const a=e[t];DK(a)||n.push(a)}return n})(n);t.length>0?u(e=>qK(qK({},e),{},{invalidFiles:t,fileError:RK(t)})):(n.name=n[0].webkitRelativePath.split("/")[0],u(t=>qK(qK({},t),{},{[e.target.name]:n,invalidFiles:[]})))},multiple:!0,mozdirectory:"true",directory:"",webkitdirectory:""}),d.type===Vt.US.Pdf&&(0,Ze.jsx)("input",{name:"content",type:"file",accept:"application/pdf",ref:x,onChange:k}),d.type===Vt.US.Video&&(0,Ze.jsx)("input",{name:"content",type:"file",accept:"video/mp4,video/x-m4v,video/*",ref:x,onChange:k})]})]}),d.content&&(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsxs)(ze.fv,{container:!0,item:!0,fullWidth:!0,children:[d.content.name?(0,Ze.jsx)(aQ,{children:d.content.name}):(0,Ze.jsx)(kx,{course:r,handleType:j,downloadLink:r.metaData.link,userId:T,courseRefetch:()=>{},name:"StartCourse-Button",steps:[],component:e=>{let{onClick:n}=e;return(0,Ze.jsx)(nQ,{onClick:n,children:"View"})}}),(0,Ze.jsx)(rQ,{color:"danger",onClick:()=>{u(e=>qK(qK({},e),{},{content:null}))},children:"Remove content"})]})})]})}),(0,Ze.jsx)("form",{onSubmit:e=>{e.preventDefault(),i({id:d.id,title:d.title,description:d.description,thumbnail:d.thumbnail,content:d.content,type:d.type,categories:d.categories.map(e=>e.value),cpd:parseInt(d.cpd),passScore:parseInt(d.passScore),assessmentId:d.assessmentId,reactionId:d.reactionId,isEngage:d.isEngage,url:d.url,openIframe:d.openIframe}),o()},children:(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(KK,{item:!0,children:(0,Ze.jsx)(ze.$n,{color:"success",submit:!0,disabled:(C=d,!C.title||C.isSubmitted||!C.description||!C.content&&C.type!==Vt.US.Url||!C.url&&C.type===Vt.US.Url||!C.type||!C.thumbnail||C.invalidFiles.length>0),children:l?"Update Engage Content":"Upload Engage Content"})})})})]});var C};var sQ,cQ,dQ;function uQ(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const pQ=(0,Ge.default)(ze.fI)(sQ||(sQ=uQ(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.sm.spacing),e=>e.theme.colors.overlay.normal.background),mQ=(0,Ge.default)(ze.Y3)(cQ||(cQ=uQ(["\n  margin-right: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.sm.spacing),fQ=(0,Ge.default)(ze.ks)(dQ||(dQ=uQ(["\n  width: 90px;\n  & input {\n    text-align: center;\n    flex: auto;\n  }\n  margin-right: ",";\n"])),e=>e.theme.geometry.sm.spacing),yQ=e=>{let{checkedElements:n,courseId:t,courseTitle:a,courseType:r,onChecked:i,changeTyping:o,changeOrder:l}=e;const s=null!=n&&n[t]?n[t].order:"",c=null!=n&&n[t]?n[t].typingOrder:null;return(0,Ze.jsxs)(pQ,{name:"account-row--".concat(t),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(mQ,{name:"account-row__profile-picture--".concat(t),src:null,size:"xs",accountName:"".concat(r,"-").concat(a)}),(0,Ze.jsxs)(ze.fv,{container:!0,item:!0,span:18,children:[(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(t),size:"md",children:a}),(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__type--".concat(t),size:"md",children:r})]}),(0,Ze.jsx)(ze.fv,{container:!0,children:(0,Ze.jsx)(fQ,{box:!0,onChange:o,onBlur:l,value:c||s})}),(0,Ze.jsx)(ze.fv,{container:!0,children:(0,Ze.jsx)(ze.Sc,{size:"md",onChange:i,checked:(null==n?void 0:n[t])&&n[t].checked})})]})};var gQ;const bQ=Ge.default.div(gQ||(gQ=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),hQ=e=>{let{checkedElements:n,courses:t,search:a,onChecked:r,changeTyping:i,changeOrder:o}=e;const l=a?t.filter(e=>e.name.toLowerCase().includes(a)):t;return l.length?l.map(e=>(0,Ze.jsx)(yQ,{checkedElements:n,courseId:e.id,courseTitle:e.name,courseType:e.type,onChecked:()=>r(e),changeTyping:n=>i(n,e),changeOrder:()=>o(e)},e.id)):(0,Ze.jsx)(bQ,{children:(0,Ze.jsx)(nv,{name:"LearnUploads__NoResults",title:"There are no results for this search."})})},vQ=(0,g.memo)(hQ);function xQ(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function TQ(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xQ(Object(t),!0).forEach(function(n){OQ(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xQ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function OQ(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var kQ,jQ,CQ,SQ,NQ,wQ,DQ,AQ;function RQ(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function PQ(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?RQ(Object(t),!0).forEach(function(n){LQ(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):RQ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function LQ(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function IQ(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const EQ=Ge.default.div(kQ||(kQ=IQ(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),_Q=(0,Ge.default)(ze.fv)(jQ||(jQ=IQ(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),FQ=(0,Ge.default)(ze.fv)(CQ||(CQ=IQ(["\n  padding-top: ",";\n  padding-bottom: ",";\n  padding-left: ",";\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.xs.spacing),BQ=(0,Ge.default)(ze.DZ)(SQ||(SQ=IQ(["\n  margin: auto;\n  padding-left: 100px;\n"]))),UQ=(0,Ge.default)(ze.JU)(NQ||(NQ=IQ(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),MQ=Ge.default.div(wQ||(wQ=IQ(["\n  margin-bottom: ",";\n  display: flex;\n"])),e=>e.theme.geometry.xs.spacing),VQ=(0,Ge.default)(ze.fv)(DQ||(DQ=IQ(["\n  flex-direction: unset;\n  align-items: center;\n  justify-content: center;\n"]))),zQ=(0,Ge.default)(ze.fv)(AQ||(AQ=IQ(["\n  position: inherit;\n  white-space: nowrap;\n"]))),GQ=[{label:"Free",value:"Free"},{label:"Restricted",value:"Restricted"}],$Q=(e,n)=>{const t={};if(e.hasOwnProperty("courses")&&e.courses.length){const a={};n.forEach(e=>a[e.id]=e),e.courses.forEach((e,n)=>{t[e]={checked:!0,order:n+1,typingOrder:null,course:a[e]}})}return t},WQ=e=>{let{bundle:n,client:t,courses:a,onSuccess:r,edit:i,loading:o}=e;const l=rc();n||(n={id:null,title:null,description:null});const[s,c]=(0,g.useState)({id:n.id||(0,Ai.A)(),title:n.title||"",description:n.description||"",restricted:n.restricted?"Restricted":"Free",checkedElements:$Q(n,a),enableSaveButton:!1,isEngage:n.isEngage}),[d,u]=(0,g.useState)(""),p=e=>{e.persist(),c(n=>PQ(PQ({},n),{},{[e.target.name]:e.target.value}))};return(0,Ze.jsxs)(EQ,{name:"create-content",children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(VQ,{container:!0,span:"24",children:[(0,Ze.jsx)(BQ,{size:"lg",children:"Bundle content"}),(0,Ze.jsx)(zQ,{container:!0,children:(0,Ze.jsx)(ze.$n,{color:"success",submit:!0,disabled:!s.title||!s.description,onClick:async()=>{let[e,n]=[[],[]];Object.values(s.checkedElements).forEach(t=>{t.checked&&(t.order?e.push(t):n.push(t))}),e=(0,zt.orderBy)(e,"order","asc"),n=(0,zt.orderBy)(n,[e=>e.course.name.toLowerCase()],"asc");const a=[...e,...n].map(e=>{let{course:n}=e;return n.id}),i={id:s.id,title:s.title,description:s.description,restricted:"Restricted"===s.restricted,courses:a,isEngage:s.isEngage};await((e,n)=>n.mutate({mutation:TK,variables:e,update:(e,n)=>{const t=e.readQuery({query:OK}),a=n.data.saveLearnBundle,r=TQ(TQ({},t),{},{getAllLearnBundles:[...t.getAllLearnBundles.filter(e=>e.id!==a.id),a]});e.writeQuery({query:OK,data:r})}}))(i,t),r()},children:i?"Update bundle":"Save bundle"})})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(_Q,{item:!0,children:[(0,Ze.jsx)(MQ,{children:(0,Ze.jsx)(UQ,{children:"Title"})}),(0,Ze.jsx)(ze.ks,{onChange:p,name:"title",value:s.title,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(_Q,{item:!0,children:[(0,Ze.jsx)(MQ,{children:(0,Ze.jsx)(UQ,{children:"Content type"})}),(0,Ze.jsx)(ze.l6,{onChange:e=>{c(n=>PQ(PQ({},n),{},{restricted:e.target.value}))},name:"type",value:s.restricted,box:!0,options:GQ})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(_Q,{item:!0,children:[(0,Ze.jsx)(MQ,{children:(0,Ze.jsx)(UQ,{children:"Description"})}),(0,Ze.jsx)(ze.fs,{size:"lg",disabled:s.isSubmitted,onChange:p,name:"description",value:s.description,box:!0})]})}),l.learn.includes("createCourseAll")&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(_Q,{item:!0,children:[(0,Ze.jsx)(MQ,{children:(0,Ze.jsx)(UQ,{children:"Include into Engage subscription"})}),(0,Ze.jsx)(ze.Sc,{checked:s.isEngage,size:"md",onChange:e=>{c(n=>PQ(PQ({},n),{},{isEngage:e.target.checked}))}})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(FQ,{item:!0,children:(0,Ze.jsx)(ze.vj,{container:!0,name:"ConfigurationLearnUploadContainer__Controls__Search",hideButton:!0,onChange:e=>{e.preventDefault(),u(e.target.value.toLowerCase())},value:d})})}),o?(0,Ze.jsx)(Vg,{name:"CoursePreview__Loading"}):(0,Ze.jsx)(vQ,{client:t,search:d,courses:a,checkedElements:s.checkedElements,changeTyping:(e,n)=>{const t=e.target.value;if(t.match(/^\d+$/)||!t){const e=PQ({},s.checkedElements);if(null!=e&&e[n.id])e[n.id].typingOrder=+t;else{const a={checked:!1,order:"",typingOrder:+t,course:n};e[n.id]=a}c(n=>PQ(PQ({},n),{},{checkedElements:e}))}},changeOrder:e=>{const n=PQ({},s.checkedElements);Object.keys(n).map(t=>(n[t].order===n[e.id].typingOrder&&e.id!==t&&(n[t].order=""),t)),n[e.id].order=n[e.id].typingOrder,n[e.id].typingOrder=null,c(PQ(PQ({},s),{},{checkedElements:n}))},onChecked:e=>{const n=PQ({},s.checkedElements);if(n.hasOwnProperty(e.id))n[e.id].checked=!s.checkedElements[e.id].checked;else{const t={checked:!0,order:"",typingOrder:null,course:e};n[e.id]=t}c(e=>PQ(PQ({},e),{},{checkedElements:n}))}})]})};var qQ,JQ;function YQ(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const HQ=Ge.default.div(qQ||(qQ=YQ(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),KQ=Ge.default.a(JQ||(JQ=YQ(["\n  display: inline-block;\n  color: ",";\n  padding: 0 0 0 ",";\n  margin-right: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),QQ=e=>{let{data:{id:n},onEdit:t}=e;return(0,Ze.jsx)(HQ,{children:(0,Ze.jsx)(KQ,{onClick:()=>t(n),children:(0,Ze.jsx)(ze.In,{name:"scheme-row__edit--".concat(n),icon:"pencil-alt"})})})};var ZQ;function XQ(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function eZ(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?XQ(Object(t),!0).forEach(function(n){nZ(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):XQ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function nZ(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const tZ=(0,zt.keyBy)(kK,"value"),aZ=(0,Ge.default)(ze.fI)(ZQ||(ZQ=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n"]))),rZ=e=>{let{value:n}=e;return(0,zt.capitalize)(n)},iZ=e=>{let{value:n}=e;return null===n?"(Blanks)":(0,zt.capitalize)(tZ[n].label)},oZ=e=>{let{value:n}=e;return null==n?void 0:n.map(e=>" "+(0,zt.capitalize)(tZ[e].label))},lZ=function(e){let{courses:n,onEdit:t}=e;const a=Dd(),r={action:e=>(0,Ze.jsx)(QQ,eZ(eZ({},e),{},{onEdit:t}))},i={rowHeight:120,columnDefs:[{headerName:"Title",filter:"agTextColumnFilter",filterParams:{newRowsAction:"keep"},field:"name"},{headerName:"Content Type",filter:"agSetColumnFilter",filterParams:{valueFormatter:rZ},valueFormatter:rZ,field:"type"},{headerName:"Category",filter:"agSetColumnFilter",filterParams:{valueFormatter:iZ},valueFormatter:oZ,field:"metaData.categories",width:300},{headerName:"Is Engage",filter:"agSetColumnFilter",filterParams:{valueFormatter:Wo},valueGetter:e=>{let{data:n}=e;return null!==n.isEngage&&n.isEngage},valueFormatter:Wo,field:"isEngage"},{headerName:"Actions",cellRenderer:"action",filter:!1,sortable:!1}],defaultColDef:{sortable:!0,resizable:!0,filter:!0,cellStyle:{padding:"10px",height:"auto",wordBreak:"break-word",lineHeight:"20px"}},rowStyle:{width:"100%",display:"flex",alignItems:"center"}};return(0,Ze.jsx)(aZ,{container:!0,children:(0,Ze.jsx)(nD,eZ({rowData:n,components:r,getRowId:ba("id"),onGridReady:e=>a.onGridReady(e),onFilterChanged:a.onFilterChanged,onFirstDataRendered:a.onFirstDataRendered},i))})};var sZ;function cZ(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dZ(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cZ(Object(t),!0).forEach(function(n){uZ(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cZ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function uZ(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const pZ=(0,Ge.default)(ze.fI)(sZ||(sZ=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n"]))),mZ=e=>{let{value:n}=e;return"true"===n?"Restricted":"false"===n?"Free":n?"Restricted":"Free"},fZ=function(e){let{bundles:n,onEdit:t}=e;const a=Dd(),r={action:e=>(0,Ze.jsx)(QQ,dZ(dZ({},e),{},{onEdit:t}))},i={rowHeight:120,columnDefs:[{headerName:"Unique Identifier",filter:"agTextColumnFilter",filterParams:{newRowsAction:"keep"},field:"id",width:300,hide:!0},{headerName:"Title",filter:"agTextColumnFilter",filterParams:{newRowsAction:"keep"},field:"title"},{headerName:"Content Type",filter:"agSetColumnFilter",filterParams:{valueFormatter:mZ},valueFormatter:mZ,field:"restricted"},{headerName:"Is Engage",filter:"agSetColumnFilter",filterParams:{valueFormatter:Wo},valueGetter:e=>{let{data:n}=e;return null!==n.isEngage&&n.isEngage},valueFormatter:Wo,field:"isEngage"},{headerName:"Actions",cellRenderer:"action",filter:!1,sortable:!1}],defaultColDef:{sortable:!0,resizable:!0,filter:!0,cellStyle:{padding:"10px",height:"auto",wordBreak:"break-word",lineHeight:"20px"}},rowStyle:{width:"100%",display:"flex",alignItems:"center"}};return(0,Ze.jsx)(pZ,{container:!0,children:(0,Ze.jsx)(nD,dZ({rowData:n,components:r,getRowId:ba("id"),onGridReady:e=>a.onGridReady(e),onFilterChanged:a.onFilterChanged,onFirstDataRendered:a.onFirstDataRendered},i))})};var yZ,gZ,bZ;function hZ(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vZ(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hZ(Object(t),!0).forEach(function(n){xZ(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hZ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xZ(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function TZ(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const OZ=(0,Ge.default)(ze.tU)(yZ||(yZ=TZ(["\n  &.MuiTabs-root {\n    min-height: 60px;\n  }\n"]))),kZ=(0,Ge.default)(ze.$n)(gZ||(gZ=TZ(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),jZ=Ge.default.div(bZ||(bZ=TZ(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.colors.overlay.normal.background),CZ={upload:!1,notification:{show:!1,message:"",color:""},edit:!1,test:!0,editedCourse:{id:"",name:"",type:"",metaData:{link:"",thumbnail:"",description:""}},currentUpload:null,uploadCount:0,error:!1,selectedButton:null,updateBundle:0,editBundle:null},SZ=function(){var e,n,t;const[a,r]=(0,g.useState)(CZ),[i,o]=(0,g.useState)(""),[l,s]=(0,g.useState)(""),[c,d]=(0,g.useState)(0),[u,p]=(0,g.useState)(!1),[m,f]=(0,g.useState)("SYSTEM_LEVEL"),y=(0,N.m)(),b=rt(),v=rc(),x=v.learn.includes("createCourseAll"),T=()=>r(e=>vZ(vZ({},e),{},{upload:!1,edit:!1})),O=e=>{r(n=>vZ(vZ({},n),{},{notification:e}))},k=e=>{r(n=>vZ(vZ({},n),{},{edit:!0,editedCourse:null==R?void 0:R.find(n=>n.id===e),selectedButton:"LearnContent"}))},{data:j,loading:C,error:S,refetch:w,networkStatus:D}=function(e,n){const t={accountId:n,pageNumber:1};return e||(t.ownedCourses=!0),(0,h.IT)(e?OK:Al(),{notifyOnNetworkStatusChange:!0,variables:t})}(x,b),A=j?(e=>{let n,t;return x?(n=e?e.getAllCourses.data:null,t=e?e.getAllLearnBundles:null,{allBundles:t,allCourses:n}):(n=e?e.getAvailableCourses.data:null,t=e?e.getAvailableCourses.learnBundleList:null,{allBundles:t,allCourses:n})})(j):{allCourses:[],allBundles:[]},R=null==A||null===(e=A.allCourses)||void 0===e?void 0:e.filter(e=>e.name.toLowerCase().includes(i)),P=null==A||null===(n=A.allBundles)||void 0===n?void 0:n.filter(e=>e.title.toLowerCase().includes(l));return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationLearnUploadContainer",container:!0,fullHeight:!0,children:[(a.upload||a.edit)&&(0,Ze.jsx)(ze.aF,{size:"lg",show:!0,name:"ConfigurationLearnUploadContainer--create",dismissable:!0,onDismiss:T,children:"LearnBundle"===a.selectedButton?(0,Ze.jsx)(WQ,{client:y,bundle:a.editBundle,loading:C,onSuccess:()=>{T(),w(),r(e=>vZ({},e)),O({show:!0,message:a.edit?"The bundle was updated":"The bundle was added",color:"primary"})},edit:a.edit,courses:R}):(0,Ze.jsx)(lQ,{course:a.editedCourse,onSuccess:a.upload?()=>{T(),w(),O({show:!0,message:"Your upload will continue in the background. Check back shortly to see it",color:"primary"})}:T,uploadContent:async e=>{const{edit:n,editedCourse:t}=a;try{const i=e.content instanceof File||e.content instanceof FileList,o=e.thumbnail instanceof File,l=!n||i||o;let s=t.metaData.link;if(l){r(n=>vZ(vZ({},n),{},{currentUpload:{contentData:e,status:"In-progress",showNotification:!0,color:"primary"}}));const{data:n}=i?await((e,n,t)=>{const a="network-only",{type:r}=e;if(r===Vt.US.Scorm){const i=[...e.content].map(e=>{const{name:n,webkitRelativePath:t}=e;return{name:n,webkitRelativePath:t}});return n.query({query:bK,variables:{accountId:t,type:r,files:i},fetchPolicy:a})}return n.query({query:gK,variables:{accountId:t,type:r,fileName:e.content.name},fetchPolicy:a})})(e,y,b):{},t=((e,n)=>{if(!n)return e;const{initiateLearnFileUpload:t,initiateScormFileUpload:a}=n;if(t){const n=(0,Ai.A)();let{id:a,contentPath:r,url:i}=t;return e.id&&(a=e.id),NK(NK({},e),{},{id:a,contentPath:r,version:n,url:i})}if(a){let{id:n,contentPath:t,version:r,isNotScorm:i}=(e=>{for(const n of e.values()){const{contentPath:e}=n,[t,a,r,i,...o]=e.split("/");if(e.includes("indexAPI.html")||e.includes("index_lms.html"))return{id:r,contentPath:e,version:i,courseType:a,filePath:o,s:t}}return{isNotScorm:!0}})(a);if(e.id&&(n=e.id),i)throw new Error("No main Scorm file found");const o=a.map(e=>e.url);return NK(NK({},e),{},{id:n,contentPath:t,version:r,presignedLinks:o})}return e})(e,n);await(async(e,n,t)=>{let{url:a,contentPath:r,id:i,title:o,description:l,cpd:s,thumbnail:c,content:d,type:u,version:p,presignedLinks:m}=e;await n.mutate({mutation:yK,variables:{accountId:t,url:a,presignedLinks:m,contentPath:r,id:i,title:o,description:l,cpd:s,thumbnail:c,content:d,type:u,version:p}})})(t,y,b),i&&(s=t.contentPath)}const c="SYSTEM_LEVEL"===m?v.learn.includes("createCourseAll")?null:b:m,d=e.type===Vt.US.Url?void 0===e.openIframe||e.openIframe:void 0;if(await((e,n)=>n.mutate({mutation:xK,variables:e,update:(e,n)=>{const t=e.readQuery({query:OK}),a=n.data.saveLearnContentMetadata,r=TQ(TQ({},t),{},{getAllCourses:TQ(TQ({},t.getAllCourses),{},{data:[...t.getAllCourses.data.filter(e=>e.id!==a.id),a]})});e.writeQuery({query:OK,data:r})}}))({contentPath:e.type!==Vt.US.Url?s:void 0,accountId:c,id:e.id,title:e.title,description:e.description,cpd:e.cpd,passScore:e.passScore,type:e.type,categories:e.categories,assessmentId:e.assessmentId,reactionId:e.reactionId,isEngage:e.isEngage,url:e.type===Vt.US.Url?e.url:void 0,openIframe:d},y),e.isAccountSpecific)try{const{subscriptions:n,bundleShow:t,bundleHidden:a,mandatoryBundleId:r}=await(async(e,n)=>{const{data:t}=await n.query({query:hK,variables:{accountId:e},fetchPolicy:"network-only"});return t.getAllLearnSubscriptions})(b,y);await(async(e,n)=>{await n.mutate({mutation:vK,variables:TQ({},e)})})({subscriptions:[...n,e.id],bundleShow:t,bundleHidden:a,mandatoryBundleId:r,accountId:b},y)}catch(e){console.log("ERROR",e)}r(e=>vZ(vZ({},e),{},{currentUpload:vZ(vZ({},a.currentUpload),{},{status:"Complete",color:"success"}),uploadCount:a.uploadCount+1})),O({show:!0,message:n?"Your course has been updated!":"Your upload has finished!",color:"success"}),w()}catch(e){O({show:!0,message:n?"Your course failed to update":"Your course failed to upload",color:"danger"}),r(n=>vZ(vZ({},n),{},{error:e,currentUpload:vZ(vZ({},a.currentUpload),{},{status:"Failed",color:"danger"})}))}},edit:a.edit})}),a.notification.show&&(0,Ze.jsx)(ze.Eg,{id:"ConfigurationLearnUpload__notification",name:"ConfigurationLearnUpload__notification",show:!0,color:a.notification.color,onClose:()=>{r(e=>vZ(vZ({},e),{},{notification:{show:!1,message:""}}))},children:a.notification.message}),(0,Ze.jsxs)(bh,{name:"ConfigurationLearnUploadContainer__Controls",icon:"graduation-cap",iconColor:"primary",title:"Engage Content",children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationLearnUploadContainer__Controls__Search",value:u?i:l,onChange:e=>{e.preventDefault(),u?o(e.target.value.toLowerCase()):s(e.target.value.toLowerCase())},hideButton:!0})}),v.learn.find(e=>e.startsWith("createBundle"))&&(0,Ze.jsx)(kZ,{name:"ConfigurationLearnUploadContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>{r(e=>vZ(vZ({},e),{},{upload:!0,editBundle:null,selectedButton:"LearnBundle"}))},children:"+ Add bundle"}),(0,Ze.jsx)(kZ,{name:"ConfigurationLearnUploadContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>{r(e=>vZ(vZ({},e),{},{upload:!0,selectedButton:"LearnContent",editedCourse:{id:"",name:"",type:"",metaData:{link:"",thumbnail:"",description:"",categories:[]}}}))},children:"+ Add Engage Content"})]}),x&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(jZ,{children:(0,Ze.jsx)(Kh,{value:m,onChange:e=>{let{id:n}=e;return f(n)},customOption:{value:"SYSTEM_LEVEL",label:"System Level"}})}),(0,Ze.jsx)(OZ,{variant:"fullWidth",value:c,onChange:(e,n)=>d(n),children:[{label:"Bundles"},{label:"Courses"}].map(e=>{let{label:n}=e;return(0,Ze.jsx)(ze.oz,{label:n,onClick:()=>p("Courses"===n)},n)})})]}),a.currentUpload&&a.currentUpload.showNotification&&(0,Ze.jsx)("div",{children:(0,Ze.jsx)(Tn,{id:"CurrentUpload__NotificationBanner",name:"CurrentUpload__NotificationBanner",icon:"upload",dismissable:!0,onDismiss:()=>{r(e=>vZ(vZ({},e),{},{currentUpload:vZ(vZ({},a.currentUpload),{},{showNotification:!1})}))},title:"Uploading Files: ".concat((null===(t=a.currentUpload.contentData.content)||void 0===t?void 0:t.name)||a.currentUpload.contentData.thumbnail.name),body:"Upload Status: ".concat(a.currentUpload.status),color:a.currentUpload.color})}),(C&&3!==D||4===D)&&(0,Ze.jsx)(Vg,{name:"CoursePreview__Loading"}),!C&&x&&"SYSTEM_LEVEL"===m&&u&&(S?(0,Ze.jsx)(ub,{error:S,retry:w}):R.length?(0,Ze.jsx)(lZ,{onEdit:k,courses:R}):(0,Ze.jsx)(nv,{name:"LearnUploads__NoResults",title:"There are no results for this search."})),!C&&x&&"SYSTEM_LEVEL"===m&&!u&&(S?(0,Ze.jsx)(ub,{error:S,retry:w}):P.length?(0,Ze.jsx)(fZ,{onEdit:e=>{r(n=>vZ(vZ({},n),{},{edit:!0,editBundle:null==P?void 0:P.find(n=>n.id===e),selectedButton:"LearnBundle"}))},bundles:P}):(0,Ze.jsx)(nv,{name:"LearnUploads__NoResults",title:"There are no results for this search."})),!C&&!x&&(S?(0,Ze.jsx)(ub,{error:S,retry:w}):R.length?(0,Ze.jsx)(lZ,{onEdit:k,courses:R}):(0,Ze.jsx)(nv,{name:"LearnUploads__NoResults",title:"There are no results for this search."}))]})};var NZ,wZ,DZ,AZ;function RZ(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const PZ=(0,Ge.default)(ze.fI)(NZ||(NZ=RZ(["\n  padding: ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing)),LZ=(0,Ge.default)(ze.Y3)(wZ||(wZ=RZ(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),IZ=(0,Ge.default)(ze.fI)(DZ||(DZ=RZ(["\n  align-items: center;\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.colors.overlay.normal.background),EZ=Ge.default.div(AZ||(AZ=RZ(["\n  padding-right: 24px;\n  text-align: right;\n  width: 145px;\n  float: right;\n\n  a {\n    text-decoration: underline;\n    cursor: pointer;\n  }\n\n  a:hover {\n    text-decoration: none;\n  }\n"]))),_Z=e=>{var n,t;const a=(0,m.Zp)(),{accountId:r,businessName:i,profileImage:o,path:l,isCourseRows:s=!1,record:c,permissions:d={},licencesCountMap:u=new Map}=e,p=oc();let f;const y=(null==d||null===(n=d.licenceService)||void 0===n?void 0:n.assignLicence)&&s,g=(null==c||null===(t=c.inBundles)||void 0===t?void 0:t.length)>0,b=g?c.inBundles[0]:c.id;y&&(f=Hr("/".concat(p.configuration.root,"/").concat(p.configuration.menu.learn.assignLicense),{accountId:r,productType:g?"bundle":"course",productId:b}));const h=s?f:"".concat(l,"/").concat(r);return(0,Ze.jsx)("div",{children:(0,Ze.jsxs)(IZ,{container:!0,children:[(0,Ze.jsx)(ze.fv,{span:y?8:12,children:(0,Ze.jsx)(XN,{name:"configuration-menu__item--contractors",to:h,children:(0,Ze.jsxs)(PZ,{name:"account-row--".concat(r),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(LZ,{name:"account-row__profile-picture--".concat(r),src:o,size:"xs",accountName:i}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(r),size:"md",children:i})})]})})}),y&&(0,Ze.jsx)(ze.fv,{span:4,children:(0,Ze.jsx)(EZ,{children:(0,Ze.jsx)(ze.$n,{size:"sm",onClick:()=>a(f),children:(0,Ze.jsx)(CD,{id:b,licencesCountMap:u})})})})]})})};var FZ,BZ,UZ,MZ;function VZ(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const zZ=(0,Ge.default)(ze.fI)(FZ||(FZ=VZ(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),GZ=(0,Ge.default)(ze.Y3)(BZ||(BZ=VZ(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),$Z=Ge.default.div(UZ||(UZ=VZ(["\n  height: 3px;\n  background-color: rgb(109, 108, 122);\n  flex-direction: row;\n  flex: 0 0 auto;\n"]))),WZ=(0,Ge.default)(ze.fv)(MZ||(MZ=VZ(["\n  min-width: ",";\n  text-align: center;\n  & p {\n    text-align: center;\n  }\n  & div {\n    display: inline-block;\n  }\n"])),e=>e.minWidth),qZ=()=>{const e=rc(),n=rt(),t=(0,m.Zp)(),a=(0,m.zy)(),r=oc(),{isSystemAdmin:i,licenceService:{assignLicence:o}={}}=e,{courses:l,bundles:s,loading:c}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=rt(),t=(0,h.IT)(Al(),Il({variables:{accountId:n,pageNumber:0}},e)),{data:{getAvailableCourses:a={}}={}}=t,r=_l(t,Rl),i=(null==a?void 0:a.learnBundleList)||[],o=(a.data||[]).map(e=>{let{id:n}=e,t=_l(e,Pl);const a=i.filter(e=>{let{courses:t}=e;return t.indexOf(n)>-1}).map(e=>{let{id:n}=e;return n});return Il(Il({},t),{},{id:n,inBundles:a})})||[];return Il({courses:o,bundles:i},r)}({skip:i}),[d,u]=(0,g.useState)(),{data:{getAccounts:{rows:p=[]}={}}={},error:f,loading:y,refetch:b}=(0,h.IT)(Wh,{variables:{limit:100,filters:{text:[{filterType:"text",type:"contains",filter:d,field:"name"}]}},skip:!i}),{productLicences:v=[],loading:x}=wc(n),T=new Map(v.map(e=>{let{productId:n,count:t}=e;return[n,t]})),O=i?p:l,[k,j,C]=hf(O||[],["name"]),[,S,N]=hf(s||[],["title"]),w=!i,D=y||c||x;return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationLearnSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:"Engage Subscriptions",children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationLearnSubscriptionsContainer__Controls__Search",value:k,onChange:e=>{return n=e.target.value,j(n),i&&u(n),void(o&&S(n));var n},hideButton:!0})})}),D&&(0,Ze.jsx)(Vg,{name:"ConfigurationAccountsContainer__Loading"}),f&&(0,Ze.jsx)(ze.Kw,{error:f,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationAccountsContainer__Error",icon:a,title:n,body:t,retry:b})}}),!D&&!f&&!C.length&&!N.length&&(0,Ze.jsx)(nv,{name:"ConfigurationLearnSubscriptionsContainer__NoResults",title:"There are no results for this search."}),o&&(0,Ze.jsxs)(Ze.Fragment,{children:[N.map(e=>(0,Ze.jsxs)(zZ,{name:"account-row--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(GZ,{name:"account-row__profile-picture--".concat(n),size:"xs",accountName:"B",color:"secondary"}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(n),size:"md",children:e.title})}),(0,Ze.jsx)(WZ,{minWidth:"120px",children:(0,Ze.jsx)(ze.$n,{size:"sm",onClick:()=>t(Hr("/".concat(r.configuration.root,"/").concat(r.configuration.menu.learn.assignLicense),{productId:e.id,productType:"bundle",accountId:n})),children:(0,Ze.jsx)(CD,{id:e.id,licencesCountMap:T})})})]},e.id)),(0,Ze.jsx)($Z,{})]}),O&&!!C.length&&C.slice().sort((e,n)=>ka(e.name,n.name)).map(t=>(0,Ze.jsx)(_Z,{licencesCountMap:T,accountId:w?n:t.id,businessName:t.name,profileImage:t.profile,record:t,isCourseRows:w,permissions:e,path:a.pathname},t.id))]})})};var JZ,YZ,HZ,KZ;function QZ(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ZZ=(0,Ge.default)(ze.fI)(JZ||(JZ=QZ(["\n  padding: ",";\n"])),e=>"".concat(e.theme.geometry.sm.spacing," ").concat(e.theme.geometry.md.spacing)),XZ=(0,Ge.default)(ZZ)(YZ||(YZ=QZ(["\n  background: ",";\n  border-bottom: 1px solid ",";\n  border-top: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.colors.overlay.light.background,e=>e.theme.colors.text.light.background,e=>e.theme.colors.text.light.background),eX=(0,Ge.default)(ze.fv)(HZ||(HZ=QZ(["\n  flex: ",";\n  padding: ",";\n"])),e=>e.span,e=>e.theme.geometry.md.profile.padding),nX=(0,Ge.default)(ze.In)(KZ||(KZ=QZ(["\n  cursor: pointer;\n"]))),tX=[{field:"type",name:"Type",width:5.5,format:e=>IK[e]},{field:"name",name:"Name",width:5.5},{field:"edit",name:null,width:1,format:()=>(0,Ze.jsx)(nX,{icon:"pencil-alt"})}];function aX(e){let{evaluations:n,error:t,onEdit:a,retry:r}=e;return(0,Ze.jsxs)(ze.fv,{children:[(0,Ze.jsx)(XZ,{container:!0,children:tX.map(e=>(0,Ze.jsx)(eX,{container:!0,item:!0,span:e.width,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:e.name})},e.field))}),t?(0,Ze.jsx)(ub,{name:t.message,error:t,retry:r}):n.map(e=>(0,Ze.jsx)(ZZ,{container:!0,item:!0,children:tX.map(n=>(0,Ze.jsx)(eX,{container:!0,item:!0,inline:!0,span:n.width,children:"edit"===n.field?(0,Ze.jsx)(nX,{onClick:()=>{a(e)},icon:"pencil-alt"}):(0,Ze.jsx)(ze.EY,{size:"md",children:n.format?n.format(e[n.field]):e[n.field]})},e.id+n.field))},e.id))]})}var rX,iX;function oX(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function lX(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?oX(Object(t),!0).forEach(function(n){sX(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oX(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function sX(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function cX(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const dX=(0,Ge.default)(ze.JU)(rX||(rX=cX(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),uX=(0,Ge.default)(ze.In)(iX||(iX=cX(["\n  cursor: pointer;\n"])));function pX(e){let{label:n,items:t,onChange:a,error:r,placeholder:i}=e;const o=(0,Ge.useTheme)(),[l,s]=(0,g.useState)(""),[c,d]=(0,g.useState)(null),u=()=>{if(!l)return d("Please fill in the field");a(t.concat([{id:(0,Ai.A)(),text:l}])),s("")};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(dX,{children:n}),(0,Ze.jsxs)(ze.hh.Row,{children:[(0,Ze.jsx)(ze.hh.TextInputColumn,{value:l,error:c||r,placeholder:i||"Item text",onKeyPress:e=>{e.key===PP&&u()},onChange:e=>{s(e.target.value)}}),(0,Ze.jsx)(ze.fv,{span:1,vdistribution:"center",itemAlign:"center",item:!0,container:!0,children:(0,Ze.jsx)(uX,{icon:"save",title:"Add item",color:o.colors.success.normal.background,onClick:()=>{u()}})})]}),t.map(e=>(0,Ze.jsxs)(ze.hh.Row,{children:[(0,Ze.jsx)(ze.hh.TextInputColumn,{value:e.text,onChange:n=>{a(t.map(t=>t.id===e.id?lX(lX({},t),{},{text:n.target.value}):t))}}),(0,Ze.jsx)(ze.fv,{span:1,vdistribution:"center",itemAlign:"center",item:!0,container:!0,children:(0,Ze.jsx)(uX,{icon:"trash-alt",title:"Delete item",color:o.colors.danger.normal.background,onClick:()=>{a(t.filter(n=>n.id!==e.id))}})})]},e.id))]})}function mX(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function fX(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mX(Object(t),!0).forEach(function(n){yX(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mX(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function yX(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const gX={name:"",description:"",type:PK,scale:{min:1,max:5},questions:[]};function bX(e){var n,t;let{defaultEvaluation:a,heading:r,onDismiss:i,onCompleted:o,onError:l}=e;const[s,c]=(0,g.useState)(a||gX),[d,u]=(0,g.useState)({}),p=rc(),m=rt(),[f,{loading:y}]=(0,Ot.n)(Jv,{onCompleted:o,onError:l,update:(e,n)=>{const t=n.data.createEvaluation,{getAllEvaluations:a}=e.readQuery({query:qv,variables:{accountId:p.learn.includes("createEvaluationAll")?null:m}});a.find(e=>e.id===t.id)||e.writeQuery({query:qv,variables:{accountId:p.learn.includes("createEvaluationAll")?null:m},data:{getAllEvaluations:a.concat([t])}})}});return(0,Ze.jsx)(ze.aF,{onDismiss:i,size:"md",show:!0,children:(0,Ze.jsxs)(ze.hh,{children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:r}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextInputColumn,{label:"Name",value:s.name,error:d.name,disabled:y,onChange:e=>{c(fX(fX({},s),{},{name:e.target.value}))}})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextInputColumn,{label:"Description",value:s.description,error:d.description,disabled:y,onChange:e=>{c(fX(fX({},s),{},{description:e.target.value}))}})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.SelectColumn,{label:"Type",value:s.type,error:d.type,disabled:y,onChange:e=>{c(fX(fX({},s),{},{type:e.target.select.value}))},options:[{value:PK,label:IK[PK]},{value:LK,label:IK[LK]}]})}),(0,Ze.jsxs)(ze.hh.Row,{children:[(0,Ze.jsx)(ze.hh.TextInputColumn,{label:"Minimum score",value:s.scale.min,error:null===(n=d.scale)||void 0===n?void 0:n.min,disabled:y,onChange:e=>{c(fX(fX({},s),{},{scale:fX(fX({},s.scale),{},{min:e.target.value})}))}}),(0,Ze.jsx)(ze.hh.TextInputColumn,{label:"Maximum score",value:s.scale.max,error:null===(t=d.scale)||void 0===t?void 0:t.max,disabled:y,onChange:e=>{c(fX(fX({},s),{},{scale:fX(fX({},s.scale),{},{max:e.target.value})}))}})]}),(0,Ze.jsx)(pX,{label:"Questions",placeholder:"New question",items:s.questions,error:d.questions,onChange:e=>{c(fX(fX({},s),{},{questions:e}))}}),(0,Ze.jsxs)(ze.hh.Row,{children:[(0,Ze.jsx)(ze.hh.ButtonColumn,{color:"info",disabled:y,onClick:()=>{i()},children:"Cancel"}),(0,Ze.jsx)(ze.hh.ButtonColumn,{onClick:()=>{const e=function(e){const n={};return e.name||(n.name="Name is required"),e.description||(n.description="Description is required"),e.scale||(n.scale="Please select minimum and maximum value of the scale"),parseFloat(e.scale.min,10)<0&&(n.scale=n.scale||{},n.scale.min="Minimum value of scale should be greater or equal to 0"),parseFloat(e.scale.max,10)<=0&&(n.scale=n.scale||{},n.scale.max="Maximum value of scale should be greater than 0"),e.questions.length||(n.questions="At least one question should be present"),n}(s);if(Object.keys(e).length)return u(e);const n=fX(fX({},s),{},{accountId:p.learn.includes("createEvaluationAll")?null:m});s.id||(n.id=(0,Ai.A)()),f({variables:{input:n}})},disabled:y,children:"Save"})]})]})})}var hX;const vX=(0,Ge.default)(ze.$n)(hX||(hX=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 250px;\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing);function xX(){const e=rt(),n=rc(),{data:t,error:a,refetch:r}=(0,h.IT)(qv,{variables:{accountId:n.learn.includes("createEvaluationAll")?null:e}}),[i,o,l]=hf((null==t?void 0:t.getAllEvaluations)||[],["id","name","type"]),[s,c]=(0,g.useState)(!1),[d,u]=(0,g.useState)(null),[p,m]=(0,g.useState)(null),f=e=>{m({message:e.message,color:"danger"})};return(0,Ze.jsxs)(ze.fv,{children:[(0,Ze.jsxs)(bh,{icon:"briefcase",iconColor:"primary",title:"Engage Evaluations",children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{value:i,onChange:e=>{o(e.target.value)},hideButton:!0})}),(0,Ze.jsx)(vX,{onClick:()=>{c(!0)},children:"+ Add Evaluation"})]}),(0,Ze.jsx)(aX,{evaluations:l,error:a,retry:r,onEdit:u}),s&&(0,Ze.jsx)(bX,{heading:"Create Evaluation",onDismiss:()=>{c(!1)},onCompleted:()=>{c(!1),m({message:"Evaluation has been successfully created!",color:"success"})},onError:f}),d&&(0,Ze.jsx)(bX,{heading:"Edit Evaluation",onDismiss:()=>{u(null)},onCompleted:()=>{u(null),m({message:"Evaluation has been successfully edited!",color:"success"})},onError:f,defaultEvaluation:d}),p&&(0,Ze.jsx)(ze.Eg,{name:p.message,show:!0,color:p.color,onClose:()=>m(null),children:p.message})]})}var TX,OX;function kX(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const jX=(0,Ge.default)(ze.fI)(TX||(TX=kX(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),CX=(0,Ge.default)(ze.Y3)(OX||(OX=kX(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),SX=e=>{let{accountId:n,businessName:t,profileImage:a}=e;const r=(0,m.zy)();return(0,Ze.jsx)(XN,{name:"configuration-menu__item--contractors",to:"".concat(r.pathname,"/").concat(n),children:(0,Ze.jsxs)(jX,{name:"account-row--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(CX,{name:"account-row__profile-picture--".concat(n),src:a,size:"xs",accountName:t}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(n),size:"md",children:t})})]})})};function NX(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wX(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?NX(Object(t),!0).forEach(function(n){DX(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):NX(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function DX(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}class AX extends g.Component{constructor(){return super(...arguments),this.state={search:{value:"",error:""}},this.handleSearchChange=e=>{this.setState({search:wX(wX({},this.state.search),{},{value:e.target.value})})},this}render(){return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationDashboardSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:"Dashboard Subscriptions",children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationDashboardSubscriptionsContainer__Controls__Search",value:this.state.search.value,onChange:this.handleSearchChange,hideButton:!0})})}),(0,Ze.jsx)(qb.X,{query:Wh,variables:{limit:100,filters:{text:[{filterType:"text",type:"contains",filter:this.state.search.value,field:"name"}]}},children:e=>{let{loading:n,error:t,data:a,refetch:r,networkStatus:i}=e;return n&&3!==i||4===i?(0,Ze.jsx)(Vg,{name:"ConfigurationAccountsContainer__Loading"}):t?(0,Ze.jsx)(ze.Kw,{error:t,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationAccountsContainer__Error",icon:a,title:n,body:t,retry:r})}}):a.getAccounts.totalRows?a.getAccounts.rows.map(e=>(0,Ze.jsx)(SX,{accountId:e.id,businessName:e.name,profileImage:e.profile},e.id)):(0,Ze.jsx)(nv,{name:"ConfigurationDashboardSubscriptionsContainer__NoResults",title:"There are no results for this search."})}})]})})}}const RX=AX;var PX,LX;function IX(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const EX=(0,Ge.default)(ze.fI)(PX||(PX=IX(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),_X=(0,Ge.default)(ze.Y3)(LX||(LX=IX(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing);function FX(e){const{dashboardName:n,accountId:t,id:a,onCheckboxClick:r,checked:i}=e;return(0,Ze.jsx)("div",{children:(0,Ze.jsxs)(EX,{name:"account-row--".concat(t),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(_X,{name:"account-row__profile-picture--".concat(t),src:"",size:"xs",accountName:n}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(t),size:"md",children:n})}),(0,Ze.jsx)(ze.Sc,{id:"update-subscription-".concat(a),name:a,onChange:r,checked:i})]})},a)}var BX,UX,MX,VX,zX;function GX(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $X=(0,D.J1)(BX||(BX=GX(["\n  query GetAccountInfo($id: ID!) {\n    getAccountInfo(id: $id) {\n      id\n      name\n      accessControls {\n        learn\n        intelligence\n        v2Design\n        comply {\n          legislation\n          tagLevelLegislation\n          policies\n          systems\n          targets\n          frameworks\n          agreements\n        }\n        data {\n          waste\n          electricity\n          gas\n          water\n          materials\n          fuel\n          transport\n          refrigerants\n          heatSteam\n          oilAndGas\n          coreEstate\n        }\n      }\n    }\n  }\n"]))),WX=(0,D.J1)(UX||(UX=GX(["\n  query GetDashboardSubscriptions($accountId: ID!) {\n    getDashboardSubscriptions(accountId: $accountId)\n  }\n"]))),qX=(0,D.J1)(MX||(MX=GX(["\n  mutation SaveDashboardSubscriptions($accountId: ID!, $subscriptions: [String!]!) {\n    saveDashboardSubscriptions(input: { accountId: $accountId, subscriptions: $subscriptions })\n  }\n"]))),JX=((0,D.J1)(VX||(VX=GX(["\n  query GetDashboardById($id: ID!) {\n    getDashboard(id: $id) {\n      id\n      name\n      description\n      area\n      provider\n      providerDashboardId\n    }\n  }\n"]))),(0,D.J1)(zX||(zX=GX(["\n  query GetAllDashboards {\n    getAllDashboards {\n      id\n      name\n      description\n      area\n      provider\n      providerDashboardId\n    }\n  }\n"]))));function YX(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function HX(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?YX(Object(t),!0).forEach(function(n){KX(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):YX(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function KX(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}class QX extends g.Component{constructor(e){super(e),this.onCheckboxClick=e=>{const n=[],t=this.state.dashboards.map(n=>{let t=n.checked;return n.id===e.target.name&&(t=!n.checked),HX(HX({},n),{},{checked:t})});t.map(e=>(e.checked&&n.push(e.id),null)),this.props.client.mutate({mutation:qX,variables:{accountId:this.props.accountId,subscriptions:n}}),this.setState({dashboards:t})},this.state={dashboards:this.props.dashboards.map(e=>HX(HX({},e),{},{checked:this.props.selectedDashboards.includes(e.id)}))}}render(){const{accountId:e,permissions:n}=this.props;return(0,Ze.jsx)(Ze.Fragment,{children:this.state.dashboards.sort((e,n)=>ka(e.name,n.name)).map(t=>(0,Ze.jsx)(FX,{permissions:n,id:t.id,dashboardName:t.name,accountId:e,onCheckboxClick:this.onCheckboxClick,checked:t.checked||!1},t.id))})}}const ZX=(0,Ib.W)(QX);var XX;function e0(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function n0(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?e0(Object(t),!0).forEach(function(n){t0(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):e0(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function t0(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const a0=Ge.default.div(XX||(XX=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"])));class r0 extends g.Component{constructor(e){super(e),this.handleSearchChange=e=>{this.setState({search:n0(n0({},this.state.search),{},{value:e.target.value})})},this.search=(e,n)=>{if(!n)return e;const t=new gf.vj("id");return t.addIndex("name"),t.addDocuments(e),t.search(n)},this.state={search:{value:"",error:""}}}render(){const{title:e,accountId:n,permissions:t}=this.props;return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationLearnSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:e,children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationLearnSubscriptionsContainer__Controls__Search",value:this.state.search.value,onChange:this.handleSearchChange,hideButton:!0})})}),(0,Ze.jsx)(qb.X,{query:WX,variables:{accountId:n},fetchPolicy:"network-only",children:e=>{let{loading:a,error:r,data:i,refetch:o}=e;return r?(0,Ze.jsx)(ze.Kw,{error:r,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationLearnSubscriptionsContainer__Error",icon:a,title:n,body:t,retry:o})}}):a?(0,Ze.jsx)(a0,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})}):(0,Ze.jsx)(qb.X,{query:JX,children:e=>{let{loading:a,error:r,data:o,refetch:l}=e;if(r)return(0,Ze.jsx)(ze.Kw,{error:r,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationLearnSubscriptionsContainer__Error",icon:a,title:n,body:t,retry:l})}});if(a)return(0,Ze.jsx)(a0,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})});const s=Array.from(new Set(o.getAllDashboards)),c=this.search(s,this.state.search.value);return c.length?(0,Ze.jsx)(ZX,{permissions:t,dashboards:c,accountId:n,selectedDashboards:i.getDashboardSubscriptions}):(0,Ze.jsx)(nv,{name:"ConfigurationUsersContainer__NoResults",title:"There are no results for this search."})}})}})]})})}}const i0=r0;var o0;const l0=Ge.default.div(o0||(o0=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"])));function s0(){const{accountId:e}=(0,m.g)(),n=rc();return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(qb.X,{query:$X,variables:{id:e},children:t=>{let{loading:a,error:r,data:i}=t;return a||r?(0,Ze.jsx)(l0,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})}):(0,Ze.jsx)(i0,{accountId:e,permissions:n,title:"Dashboard Subscriptions - ".concat(i.getAccountInfo.name)})}})})}var c0,d0,u0,p0,m0;function f0(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const y0=(0,Ge.default)(ze.fI)(c0||(c0=f0(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),g0=(0,Ge.default)(ze.Y3)(d0||(d0=f0(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),b0=Ge.default.div(u0||(u0=f0(["\n  height: 3px;\n  background-color: rgb(109, 108, 122);\n  flex-direction: row;\n  flex: 0 0 auto;\n"]))),h0=(0,Ge.default)(ze.fv)(p0||(p0=f0(["\n  min-width: ",";\n  text-align: center;\n  & p {\n    text-align: center;\n  }\n  & div {\n    display: inline-block;\n  }\n"])),e=>e.minWidth),v0=Ge.default.div(m0||(m0=f0(["\n  & input:checked + div {\n    border-color: "," !important;\n    background-color: ",";\n  }\n"])),e=>e.theme.colors.secondary.light.text,e=>e.theme.colors.secondary.light.text),x0=e=>{let{accountId:n,bundle:t,getAllLearnSubscriptions:a,onClickBundle:r,onClickMandatory:i,licencesCountMap:o=new Map}=e;const l=rc(),s=(0,m.Zp)(),c=oc(),d=(0,zt.orderBy)(t,[e=>e.title.toLowerCase()],"asc"),{subscriptions:u,bundleShow:p,bundleHidden:f,mandatoryBundleId:y}=a,g=(0,zt.keyBy)(p),b=(0,zt.keyBy)(f),h=e=>{r({type:"bundleShow",courseId:e.target.name,subscriptions:u,bundleShow:p,bundleHidden:f,mandatoryBundleId:y})},v=e=>{r({type:"bundleHidden",courseId:e.target.name,subscriptions:u,bundleShow:p,bundleHidden:f,mandatoryBundleId:y})},x=e=>{i({courseId:e.target.name,subscriptions:u,bundleShow:p,bundleHidden:f,mandatoryBundleId:y})},T=l.licenceService.assignLicence;return d&&d.length?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(y0,{name:"account-row--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0}),(0,Ze.jsx)(h0,{minWidth:"100px",children:(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:"MANDATORY"})}),(0,Ze.jsx)(h0,{minWidth:"85px",children:(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:"HIDE"})}),(0,Ze.jsx)(h0,{minWidth:"50px",children:(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:"SHOW"})})]}),d.map(e=>(0,Ze.jsxs)(y0,{name:"account-row--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(g0,{name:"account-row__profile-picture--".concat(n),size:"xs",accountName:"B",color:"secondary"}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(n),size:"md",children:e.title})}),T&&(0,Ze.jsx)(h0,{minWidth:"150px",children:(0,Ze.jsx)(ze.$n,{onClick:()=>{const t=Hr("/".concat(c.configuration.root,"/").concat(c.configuration.menu.learn.assignLicense),{productId:e.id,productType:"bundle",accountId:n});s(t)},size:"sm",children:(0,Ze.jsx)(CD,{id:e.id,licencesCountMap:o})})}),(0,Ze.jsx)(h0,{minWidth:"85px",children:(0,Ze.jsx)(v0,{children:(0,Ze.jsx)(ze.Sc,{id:"update-subscription-".concat(e.id),name:e.id,onChange:x,checked:y===e.id,disabled:y&&y!==e.id})})}),(0,Ze.jsx)(h0,{minWidth:"85px",children:(0,Ze.jsx)(v0,{children:(0,Ze.jsx)(ze.Sc,{id:"update-subscription-".concat(e.id),name:e.id,onChange:v,checked:b.hasOwnProperty(e.id)})})}),(0,Ze.jsx)(h0,{minWidth:"50px",children:(0,Ze.jsx)(v0,{children:(0,Ze.jsx)(ze.Sc,{id:"update-subscription-".concat(e.id),name:e.id,onChange:h,checked:g.hasOwnProperty(e.id),color:"purple"})})})]},e.id)),(0,Ze.jsx)(b0,{})]}):null};var T0,O0,k0,j0,C0;function S0(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const N0=(0,Ge.default)(ze.fI)(T0||(T0=S0(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),w0=(0,Ge.default)(ze.Y3)(O0||(O0=S0(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),D0=(0,Ge.default)(ze.fv)(k0||(k0=S0(["\n  min-width: 50px;\n  text-align: center;\n  & div {\n    display: inline-block;\n  }\n"]))),A0=(0,Ge.default)(ze.fv)(j0||(j0=S0(["\n  min-width: 170px;\n"]))),R0=(0,Ge.default)(ze.fv)(C0||(C0=S0(["\n  min-width: 150px;\n"]))),P0=e=>{let{id:n,onCheckboxClick:t,disabledCheckbox:a,checked:r}=e;return a?(0,Ze.jsx)(v0,{children:(0,Ze.jsx)(ze.Sc,{id:"update-subscription-".concat(n),name:n,onChange:t,checked:a||r,disabled:a})}):(0,Ze.jsx)(ze.Sc,{id:"update-subscription-".concat(n),name:n,onChange:t,checked:a||r,disabled:a})},L0=e=>{const{courseName:n,accountId:t,id:a,onCheckboxClick:r,checked:i,disabledCheckbox:o,hideProfile:l,permissions:s,licencesCountMap:c=new Map}=e,d=oc(),u=(0,m.Zp)(),p=s.licenceService.assignLicence;return(0,Ze.jsxs)(N0,{name:"account-row--".concat(t),container:!0,itemAlign:"center",children:[!l&&(0,Ze.jsx)(w0,{name:"account-row__profile-picture--".concat(t),size:"xs",accountName:n}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(t),size:"md",children:n})}),p&&(0,Ze.jsx)(R0,{children:(0,Ze.jsx)(ze.$n,{size:"sm",onClick:()=>{const e=Hr("/".concat(d.configuration.root,"/").concat(d.configuration.menu.learn.assignLicense),{productId:a,accountId:t,productType:"course"});u(e)},children:(0,Ze.jsx)(CD,{id:a,licencesCountMap:c})})}),(0,Ze.jsx)(A0,{}),(0,Ze.jsx)(D0,{children:(0,Ze.jsx)(P0,{id:a,onCheckboxClick:r,disabledCheckbox:o,checked:i})})]},a)};function I0(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function E0(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I0(Object(t),!0).forEach(function(n){_0(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I0(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _0(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const F0=e=>{let{courses:n,getAllLearnSubscriptions:t,onClickCourses:a,accountId:r,getAllLearnBundles:i,licencesCountMap:o=new Map}=e;const{subscriptions:l,bundleShow:s,bundleHidden:c}=t||{subscriptions:[],bundleShow:[],bundleHidden:[]},d=rc(),u=(0,zt.keyBy)(l),p=(0,zt.keyBy)([...s,...c]),m=i.filter(e=>p.hasOwnProperty(e.id)).reduce((e,n)=>{let{courses:t}=n;return e.concat(t)},[]),f=(0,zt.keyBy)(m),y=n.map(e=>E0(E0({},e),{},{checked:u.hasOwnProperty(e.id)})),g=e=>{a({courseId:e.target.name,subscriptions:l,bundleShow:s,bundleHidden:c})};return(0,Ze.jsx)(Ze.Fragment,{children:(0,zt.orderBy)(y,[e=>e.name.toLowerCase()],"asc").map(e=>(0,Ze.jsx)(L0,{permissions:d,licencesCountMap:o,id:e.id,courseName:e.name,accountId:r,onCheckboxClick:g,checked:e.checked,disabledCheckbox:f.hasOwnProperty(e.id)},e.id))})};var B0,U0,M0,V0,z0,G0,$0,W0,q0,J0,Y0;function H0(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const K0=(0,D.J1)(B0||(B0=H0(["\n  query GetAccountInfo($id: ID!) {\n    getAccountInfo(id: $id) {\n      id\n      name\n      accessControls {\n        learn\n        intelligence\n        v2Design\n        comply {\n          legislation\n          tagLevelLegislation\n          policies\n          systems\n          targets\n          frameworks\n          agreements\n        }\n        data {\n          waste\n          electricity\n          gas\n          water\n          materials\n          fuel\n          transport\n          refrigerants\n          heatSteam\n          oilAndGas\n          coreEstate\n        }\n      }\n    }\n  }\n"]))),Q0=((0,D.J1)(U0||(U0=H0(["\n  query GetAllLearnSubscriptions($accountId: String!) {\n    getAllLearnSubscriptions(accountId: $accountId) {\n      subscriptions\n      bundleShow\n      bundleHidden\n      mandatoryBundleId\n    }\n  }\n"]))),(0,D.J1)(M0||(M0=H0(["\n  mutation SaveLearnSubscriptions(\n    $accountId: String!\n    $subscriptions: [String!]!\n    $bundleShow: [String!]!\n    $bundleHidden: [String!]!\n    $mandatoryBundleId: String\n  ) {\n    saveLearnSubscriptions(\n      input: {\n        accountId: $accountId\n        subscriptions: $subscriptions\n        bundleShow: $bundleShow\n        bundleHidden: $bundleHidden\n        mandatoryBundleId: $mandatoryBundleId\n      }\n    ) {\n      subscriptions\n      bundleShow\n      bundleHidden\n      mandatoryBundleId\n    }\n  }\n"])))),Z0=(0,D.J1)(V0||(V0=H0(["\n  fragment PaginatedCoursesFields on PaginatedCourses {\n    isLastPage\n    totalItemCount\n    data {\n      id\n      name\n      type\n      metaData {\n        viewed\n        link\n        thumbnail\n      }\n    }\n  }\n"]))),X0=(0,D.J1)(z0||(z0=H0(["\n  query GetAllSubscriptionInfo($accountId: String!) {\n    getAllLearnBundles {\n      id\n      title\n      description\n      restricted\n      startDate\n      endDate\n      courses\n    }\n\n    getAllLearnSubscriptions(accountId: $accountId) {\n      subscriptions\n      bundleShow\n      bundleHidden\n      mandatoryBundleId\n    }\n\n    courses: getAllCourses {\n      ...PaginatedCoursesFields\n    }\n  }\n  ","\n"])),Z0),e1=(0,D.J1)(G0||(G0=H0(["\n  query GetAvailableSubscriptionInfo($accountId: String!, $userId: ID!) {\n    getAllLearnBundles {\n      id\n      title\n      description\n      restricted\n      startDate\n      endDate\n      courses\n    }\n\n    getAllLearnSubscriptions(accountId: $accountId) {\n      subscriptions\n      bundleShow\n      bundleHidden\n      mandatoryBundleId\n    }\n\n    courses: getAvailableCourses(accountId: $accountId, userId: $userId, ownedCourses: true, pageNumber: 1) {\n      ...PaginatedCoursesFields\n    }\n  }\n  ","\n"])),Z0),n1=(0,D.J1)($0||($0=H0(["\n  query GetUserInfoByAccountId($accountId: String!, $limit: Int!, $paginationToken: String) {\n    getUserInfoByAccountId(accountId: $accountId, limit: $limit, paginationToken: $paginationToken) {\n      paginationToken\n      users {\n        id\n        email\n        first_name\n        last_name\n        username\n        last_active_at\n        total_time_spent_ms\n        roles\n        role {\n          role\n          name\n        }\n      }\n    }\n  }\n"]))),t1=(0,D.J1)(W0||(W0=H0(["\n  query GetCourseById($id: ID!, $accountId: ID!) {\n    getCourseById(id: $id, accountId: $accountId) {\n      name\n      id\n    }\n  }\n"]))),a1=(0,D.J1)(q0||(q0=H0(["\n  query GetExclusionsForAccount($id: ID!) {\n    getExclusionsByAccountId(id: $id) {\n      userId\n      exclusions\n    }\n  }\n"]))),r1=(0,D.J1)(J0||(J0=H0(["\n  mutation SaveUserExclusion($userId: ID!, $accountId: ID!, $exclusions: [String!]!) {\n    saveUserExclusion(input: { userId: $userId, accountId: $accountId, exclusions: $exclusions }) {\n      userId\n      accountId\n      exclusions\n    }\n  }\n"]))),i1=(0,D.J1)(Y0||(Y0=H0(["\n  mutation BulkUpdateExclusions(\n    $courseId: ID!\n    $accountId: ID!\n    $userIds: [String!]!\n    $operation: BulkUpdateExclusionOperation!\n  ) {\n    bulkUpdateExclusions(\n      input: { userIds: $userIds, courseId: $courseId, accountId: $accountId, operation: $operation }\n    )\n  }\n"])));function o1(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function l1(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o1(Object(t),!0).forEach(function(n){s1(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o1(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function s1(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const c1=(e,n,t)=>{if(!n)return e;const a=new gf.vj("id");return a.addIndex(t),a.addDocuments(e),a.search(n)},d1=e=>{let{accountId:n,title:t,allSubscriptionInfo:a,licencesCountMap:r=new Map}=e;const[i,o]=(0,g.useState)(a),[l,s]=(0,g.useState)(""),[c]=(0,Ot.n)(Q0),d=(0,N.m)(),u=c1(i.courses.data,l,"name"),p=c1(i.getAllLearnBundles,l,"title");return(0,g.useEffect)(()=>()=>{d.writeQuery({query:X0,variables:{accountId:n},data:i})}),(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationLearnSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:t,children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationLearnSubscriptionsContainer__Controls__Search",value:l,onChange:e=>{s(e.target.value)},hideButton:!0})})}),u.length||p.length?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(x0,{licencesCountMap:r,accountId:n,bundle:p,getAllLearnSubscriptions:i.getAllLearnSubscriptions,onClickBundle:e=>{let{type:t,courseId:a,subscriptions:r,bundleShow:l,bundleHidden:s}=e,[d,u]=[[...l],[...s]];"bundleShow"===t?u=s.filter(e=>e!==a):"bundleHidden"===t&&(d=d.filter(e=>e!==a));const p="bundleShow"===t?d:u;if(p.includes(a)){const e=p.findIndex(e=>e===a);p.splice(e,1)}else p.push(a);const m=l1(l1({},i),{},{getAllLearnSubscriptions:l1(l1({},i.getAllLearnSubscriptions),{},{subscriptions:r,bundleShow:d,bundleHidden:u})});c({variables:l1(l1({},m.getAllLearnSubscriptions),{},{accountId:n})}),o(m)},onClickMandatory:e=>{let{courseId:t,subscriptions:a,bundleShow:r,bundleHidden:l,mandatoryBundleId:s}=e;const d=l1(l1({},i),{},{getAllLearnSubscriptions:l1(l1({},i.getAllLearnSubscriptions),{},{subscriptions:a,bundleShow:r,bundleHidden:l,mandatoryBundleId:s?void 0:t})});c({variables:l1(l1({},d.getAllLearnSubscriptions),{},{accountId:n})}),o(d)}}),(0,Ze.jsx)(F0,{licencesCountMap:r,courses:u,accountId:n,getAllLearnSubscriptions:i.getAllLearnSubscriptions,getAllLearnBundles:i.getAllLearnBundles,onClickCourses:e=>{let{courseId:t,subscriptions:a,bundleShow:r,bundleHidden:l}=e,s=[...a];s.includes(t)?s=s.filter(e=>e!==t):s.push(t);const d=l1(l1({},i),{},{getAllLearnSubscriptions:l1(l1({},i.getAllLearnSubscriptions),{},{subscriptions:s,bundleShow:r,bundleHidden:l})});c({variables:l1(l1({},d.getAllLearnSubscriptions),{},{accountId:n})}),o(d)}})]}):(0,Ze.jsx)(nv,{name:"ConfigurationUsersContainer__NoResults",title:"There are no results for this search."})]})})};var u1;const p1=Ge.default.div(u1||(u1=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"]))),m1=e=>{let{title:n,accountId:t}=e;const a=ms(),{role:r}=rc(),i="SYSADMIN"===r,{loading:o,error:l,data:s,refetch:c}=(0,h.IT)(i?X0:e1,{variables:{accountId:t,userId:a}}),{productLicences:d=[],loading:u}=wc(t),p=new Map(d.map(e=>{let{productId:n,count:t}=e;return[n,t]})),m=u||o;return s&&!l?(0,Ze.jsx)(d1,{accountId:t,licencesCountMap:p,allSubscriptionInfo:s,title:n}):(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationLearnSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:n,children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationLearnSubscriptionsContainer__Controls__Search",hideButton:!0})})}),m?(0,Ze.jsx)(p1,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})}):l?(0,Ze.jsx)(ze.Kw,{error:l,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationLearnSubscriptionsContainer__Error",icon:a,title:n,body:t,retry:c})}}):null]})};var f1;function y1(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function g1(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y1(Object(t),!0).forEach(function(n){b1(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y1(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function b1(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const h1=Ge.default.div(f1||(f1=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"]))),v1=e=>{let{title:n,courseId:t,accountId:a}=e;const[r,i]=(0,g.useState)({}),[o,l]=(0,g.useState)(!1),[s]=(0,Ot.n)(i1),{loading:c,error:d,data:u,refetch:p}=(0,h.IT)(n1,{variables:{accountId:a,limit:999}}),{loading:m,error:f,data:y}=(0,h.IT)(a1,{variables:{id:a},fetchPolicy:"network-only"}),b=u&&y&&!c&&!m,[v,x,T]=hf((null==u?void 0:u.getUserInfoByAccountId.users)||[],["first_name","last_name"]);(0,g.useEffect)(()=>{if(!m&&y){const e=zt.keyBy(null==y?void 0:y.getExclusionsByAccountId,"userId"),n=!(null==y||!y.getExclusionsByAccountId.filter(e=>e.exclusions.includes(t)).length);i(e),l(!n)}},[m,y,t]);const[O]=(0,Ot.n)(r1);return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationLearnSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:n,children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationLearnSubscriptionsContainer__Controls__Search",hideButton:!0,onChange:e=>x(e.target.value),value:v})})}),c||m?(0,Ze.jsx)(h1,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})}):d||f?(0,Ze.jsx)(ze.Kw,{error:d,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationLearnSubscriptionsContainer__Error",icon:a,title:n,body:t,retry:p})}}):null,b&&(0,Ze.jsx)(L0,{hideProfile:!0,id:"ToggleAllUserExclusions",courseName:"Add/Remove All Users",onCheckboxClick:()=>(e=>{const n=g1({},r),o=u.getUserInfoByAccountId.users.map(e=>e.id);o.forEach(a=>{const r=n[a]||{exclusions:[]};n[a]=e?{exclusions:[...new Set([...r.exclusions.filter(e=>e!==t)])]}:{exclusions:[...new Set([...r.exclusions,t])]}}),i(n),l(e),s({variables:{userIds:o,accountId:a,courseId:t,operation:e?"REMOVE":"ADD"}})})(!o),checked:o}),b&&T.map(e=>{const n=!r[e.id]||!r[e.id].exclusions.includes(t);return(0,Ze.jsx)(L0,{id:t,courseName:"".concat(e.first_name," ").concat(e.last_name),accountId:a,onCheckboxClick:()=>(e=>{var n;const o=(null===(n=r[e])||void 0===n?void 0:n.exclusions)||[];let s;s=o.includes(t)?o.filter(e=>e!==t):[...o,t],O({variables:{userId:e,accountId:a,exclusions:s}});const c=g1(g1({},r),{},{[e]:{exclusions:s}});l(!Object.keys(c).filter(e=>!!c[e]&&c[e].exclusions.includes(t)).length),i(c)})(e.id),checked:n},e.id)})]})};var x1;const T1=Ge.default.div(x1||(x1=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"]))),O1=()=>{const e=rt(),n=(0,m.g)(),{isSystemAdmin:t}=rc(),{data:a,loading:r}=(0,h.IT)(t?K0:t1,{variables:{id:n.accountId,accountId:e}});return(0,Ze.jsxs)(Ze.Fragment,{children:[r&&(0,Ze.jsx)(T1,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})}),!r&&a&&t&&(0,Ze.jsx)(m1,{accountId:n.accountId,title:"Learn Subscriptions - ".concat(a.getAccountInfo.name)}),!r&&a&&!t&&(0,Ze.jsx)(v1,{courseId:a.getCourseById.id,accountId:e,title:"Learn Subscriptions - ".concat(a.getCourseById.name)})]})};var k1,j1,C1,S1,N1,w1,D1,A1,R1,P1,L1,I1,E1,_1=t(52269);function F1(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const B1=(0,D.J1)(k1||(k1=F1(["\n  fragment SupplierFields on Supplier {\n    name\n    id\n    accountId\n    utility\n    type\n    materials {\n      id\n      name\n    }\n    notes\n    address {\n      id\n      address1\n      address2\n      address3\n      city\n      phone1\n      postcode\n      country {\n        alpha2Code\n        name\n        id\n      }\n    }\n  }\n"]))),U1=(0,D.J1)(j1||(j1=F1(["\n  query GetSuppliers(\n    $page: Int!\n    $pageSize: Int!\n    $filterValue: String\n    $orderDir: String\n    $filterBy: String\n    $accountId: ID!\n    $utility: TransactionType\n    $withWasteCarrierLicence: Boolean = false\n  ) {\n    getSuppliers(\n      accountId: $accountId\n      page: $page\n      pageSize: $pageSize\n      filterValue: $filterValue\n      filterExpression: EQUAL\n      orderDir: $orderDir\n      filterBy: $filterBy\n      utility: $utility\n    ) {\n      count\n      hasNextPage\n      hasPreviousPage\n      isFirstPage\n      isLastPage\n      pageCount\n      totalItemCount\n      page\n      pageSize\n      suppliers {\n        ...SupplierFields\n        wasteCarrierLicenceDocument @include(if: $withWasteCarrierLicence) {\n          id\n          referenceId\n        }\n      }\n    }\n  }\n  ","\n"])),B1),M1=(0,D.J1)(C1||(C1=F1(["\n  mutation CreateSupplier(\n    $id: ID!\n    $name: String!\n    $addressId: ID!\n    $add1: String\n    $add2: String\n    $add3: String\n    $city: String!\n    $post: String!\n    $phone: String\n    $accountId: ID!\n    $countryId: ID!\n    $utility: TransactionType!\n    $type: [String!]!\n    $materialIds: [ID!]\n    $notes: String\n  ) {\n    createAddress(\n      input: {\n        id: $addressId\n        address1: $add1\n        address2: $add2\n        address3: $add3\n        city: $city\n        postcode: $post\n        coordinates: null\n        phone1: $phone\n        countryId: $countryId\n      }\n    ) {\n      id\n    }\n    createSupplier(\n      input: {\n        id: $id\n        name: $name\n        addressId: $addressId\n        accountId: $accountId\n        utility: $utility\n        type: $type\n        materialIds: $materialIds\n        notes: $notes\n      }\n    ) {\n      ...SupplierFields\n    }\n  }\n  ","\n"])),B1),V1=(0,D.J1)(S1||(S1=F1(["\n  mutation UpdateSupplier(\n    $id: ID!\n    $name: String!\n    $addressId: ID!\n    $add1: String\n    $add2: String\n    $add3: String\n    $city: String!\n    $post: String!\n    $phone: String\n    $accountId: ID!\n    $countryId: ID!\n    $utility: TransactionType!\n    $type: [String!]!\n    $materialIds: [ID!]\n    $notes: String\n  ) {\n    updateAddress(\n      input: {\n        id: $addressId\n        address1: $add1\n        address2: $add2\n        address3: $add3\n        city: $city\n        postcode: $post\n        coordinates: null\n        phone1: $phone\n        countryId: $countryId\n      }\n    ) {\n      id\n    }\n    updateSupplier(\n      input: {\n        id: $id\n        name: $name\n        addressId: $addressId\n        accountId: $accountId\n        utility: $utility\n        type: $type\n        materialIds: $materialIds\n        notes: $notes\n      }\n    ) {\n      ...SupplierFields\n    }\n  }\n  ","\n"])),B1),z1=(0,D.J1)(N1||(N1=F1(["\n  mutation UpdateSupplierAndCreateAddress(\n    $id: ID!\n    $name: String!\n    $addressId: ID!\n    $add1: String\n    $add2: String\n    $add3: String\n    $city: String!\n    $post: String!\n    $phone: String\n    $accountId: ID!\n    $countryId: ID!\n    $utility: TransactionType!\n    $type: [String!]!\n    $materialIds: [ID!]\n    $notes: String\n  ) {\n    createAddress(\n      input: {\n        id: $addressId\n        address1: $add1\n        address2: $add2\n        address3: $add3\n        city: $city\n        postcode: $post\n        coordinates: null\n        phone1: $phone\n        countryId: $countryId\n      }\n    ) {\n      id\n    }\n    updateSupplier(\n      input: {\n        id: $id\n        name: $name\n        addressId: $addressId\n        accountId: $accountId\n        utility: $utility\n        type: $type\n        materialIds: $materialIds\n        notes: $notes\n      }\n    ) {\n      ...SupplierFields\n    }\n  }\n  ","\n"])),B1),G1=(0,D.J1)(w1||(w1=F1(["\n  {\n    suppliersGridPage @client\n  }\n"]))),$1=(0,D.J1)(D1||(D1=F1(["\n  {\n    suppliersGridTotalPages @client\n  }\n"]))),W1=(0,D.J1)(A1||(A1=F1(["\n  mutation SetSuppliersGridPage($page: Int!) {\n    setSuppliersGridPage(page: $page) @client\n  }\n"]))),q1=((0,D.J1)(R1||(R1=F1(["\n  mutation SetSuppliersGridTotalPages($totalPages: Int!) {\n    suppliersGridTotalPages(totalPages: $totalPages) @client\n  }\n"]))),(0,D.J1)(P1||(P1=F1(["\n  {\n    suppliersGridSearch @client\n  }\n"])))),J1=(0,D.J1)(L1||(L1=F1(["\n  mutation SetSuppliersGridSearch($search: String!) {\n    setSuppliersGridSearch(search: $search) @client\n  }\n"]))),Y1=(0,D.J1)(I1||(I1=F1(["\n  query GetAllSupplierIds($accountId: ID!, $offset: Int, $limit: Int) {\n    getSuppliersPage(accountId: $accountId, offset: $offset, limit: $limit) {\n      totalRows\n      rows {\n        id\n      }\n    }\n  }\n"]))),H1=(0,D.J1)(E1||(E1=F1(["\n  mutation UpsertSuppliers($accountId: ID!, $suppliers: [UpsertSuppliersInput!]!) {\n    upsertSuppliers(accountId: $accountId, suppliers: $suppliers)\n  }\n"])));var K1,Q1;function Z1(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const X1=(0,Ge.default)(ze.fv)(K1||(K1=Z1(["\n  flex: ",";\n  padding: ",";\n"])),e=>e.span,e=>e.theme.geometry.md.profile.padding),e2=(0,Ge.default)(ze.fI)(Q1||(Q1=Z1(["\n  padding: ",";\n"])),e=>"".concat(e.theme.geometry.sm.spacing," ").concat(e.theme.geometry.md.spacing)),n2=e=>[{field:"name",name:"Name",width:4},{field:"address",name:"Address",width:4},...e===Vt.D_.Materials?[{field:"material",name:"Materials",width:3}]:[],{field:"type",name:"Type",width:3},{field:"level",name:"Level",width:2},...e===Vt.D_.Waste?[{field:"wasteCarrierLicenceDocument",name:"Carrier Licence",width:3}]:[],{field:null,name:null,width:1}];var t2,a2,r2;function i2(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const o2=(0,Ge.default)(e2)(t2||(t2=i2(["\n  flex: 0 0 auto;\n  border-bottom: 1px solid ",";\n  opacity: 0.7;\n  transition: all 0.2s ease-in;\n\n  &:hover {\n    opacity: 1;\n  }\n\n  &:hover .slide-in-animation {\n    transform: translateX(25px);\n  }\n"])),e=>e.theme.colors.overlay.normal.background),l2=Ge.default.a(a2||(a2=i2(["\n  display: inline-block;\n  color: ",";\n  padding: ",";\n\n  &:hover {\n    color: ",";\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>"".concat(e.theme.geometry.md.spacing," ").concat(e.theme.geometry.sm.spacing),e=>e.theme.colors.text.dark.background),s2=(0,Ge.default)(ze.EY)({textDecoration:"underline",wordBreak:"break-all"}),c2=Ge.default.a(r2||(r2=i2(["\n  &:hover {\n    color: ",";\n  }\n"])),e=>e.theme.colors.text.dark.background),d2=e=>{let{onEdit:n,supplier:t}=e;const{supplierId:a,name:r,type:i,address:o,utility:l,materials:s,accountId:c,wasteCarrierLicenceDocument:d}=t,u=o?o.phone1:null,m=n2(l),f=rt(),y=By("data")("createSupplier")&&c===f,b=(e=>(0,g.useMemo)(()=>{const n=n2(e);return new Map(n.map(e=>[e.field,e]))},[e]))(l),h=b.get("wasteCarrierLicenceDocument"),v=b.get("level");return(0,Ze.jsxs)(o2,{container:!0,name:"supplier-row--".concat(a),children:[(0,Ze.jsx)(X1,{container:!0,vdistribution:"center",item:!0,span:m[0].width,children:(0,Ze.jsx)(ze.EY,{size:"md",children:r})}),(0,Ze.jsx)(X1,{container:!0,item:!0,inline:!0,span:m[1].width,children:o&&(0,Ze.jsxs)(X1,{supplierId:a,inline:!0,children:[(0,Ze.jsx)(ze.EY,{name:"supplierRow__addressLine1--".concat(a),size:"md",children:o.address1}),(0,Ze.jsx)(ze.EY,{name:"supplierRow__addressLine2--".concat(a),size:"md",children:o.address2}),(0,Ze.jsx)(ze.EY,{name:"supplierRow__addressLine3--".concat(a),size:"md",children:o.address3}),(0,Ze.jsx)(ze.EY,{name:"supplierRow__addressCity--".concat(a),size:"md",children:o.city}),(0,Ze.jsx)(ze.EY,{name:"supplierRow__addressPostcode--".concat(a),size:"md",children:o.postcode}),(0,Ze.jsx)(ze.EY,{name:"supplierRow__addressPostcode--".concat(a),size:"md",children:o.country.name}),u&&(0,Ze.jsx)(ze.EY,{children:(0,Ze.jsx)(c2,{name:"supplier-row__phoneNumber--".concat(a),size:"md",href:"tel:".concat(u),children:u})})]})}),(0,Ze.jsx)(X1,{vdistribution:"center",span:m[2].width,container:!0,item:!0,children:l===Vt.D_.Materials?null==s?void 0:s.map(e=>{let{name:n}=e;return n}).join(", "):i.join(", ")}),l===Vt.D_.Materials&&(0,Ze.jsx)(X1,{vdistribution:"center",span:m[3].width,container:!0,item:!0,children:i.join(", ")}),(0,Ze.jsx)(X1,{vdistribution:"center",span:v.width,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{name:"supplierRow__supplierScope--".concat(a),size:"md",children:Boolean(c)?"Account":"Global"})}),h&&(0,Ze.jsx)(X1,{vdistribution:"center",span:h.width,container:!0,item:!0,children:(0,Ze.jsx)(s2,{children:d&&(0,Ze.jsx)(p.Link,{to:"/documents/all/".concat(d.id),children:d.referenceId})})}),(0,Ze.jsx)(X1,{vdistribution:"center",span:m[m.length-1].width,container:!0,item:!0,children:y&&(0,Ze.jsx)(l2,{onClick:n,children:(0,Ze.jsx)(ze.In,{name:"supplierRow__edit--".concat(a),icon:"pencil-alt"})})})]})};var u2,p2,m2,f2,y2,g2,b2;function h2(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function v2(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h2(Object(t),!0).forEach(function(n){x2(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h2(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function x2(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function T2(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const O2=(0,Ge.default)(ze.fI)(u2||(u2=T2(["\n  margin-bottom: ",";\n  padding-right: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),k2=(0,Ge.default)(ze.JU)(p2||(p2=T2(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),j2=(0,Ge.default)(ze.JU)(m2||(m2=T2(["\n  cursor: pointer;\n"]))),C2=(0,Ge.default)(ze.Sc)(f2||(f2=T2(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),S2=(0,Ge.default)(ze.fv)(y2||(y2=T2(["\n  max-height: 100px;\n  flex-wrap: wrap;\n  flex: 1;\n"]))),N2=(0,Ge.default)(ze.fI)(g2||(g2=T2(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),w2=(0,Ge.default)(ze.EY)(b2||(b2=T2(["\n  color: ",";\n  font-size: 14px;\n  line-height: 1.4em;\n  font-weight: 600;\n"])),e=>e.theme.colors.danger.normal.background),D2={WASTE:["Supplier","Carrier","Contractor"],ELECTRICITY:["Supplier","Broker","Contractor"],GAS:["Supplier","Broker","Contractor"],WATER:["Supplier","Contractor"],TRANSPORT:["Supplier","Haulier","Contractor"],MATERIALS:["Supplier","Subcontractor"],HOTELSTAYS:["Supplier"],FUEL:["Supplier"]},A2=e=>{let{onChange:n,error:t,utility:a,defaultSelected:r=[]}=e;const i={};D2[a].forEach(e=>{i[e]=r.includes(e)});const[o,l]=(0,g.useState)(i);return D2[a].length?(0,Ze.jsxs)(ze.fv,{container:!0,children:[(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(k2,{children:"Type"})}),t&&(0,Ze.jsx)(N2,{children:(0,Ze.jsx)(w2,{children:t})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(S2,{container:!0,children:Object.keys(i).map(e=>{const t=()=>{const t=v2(v2({},o),{},{[e]:!o[e]});l(t);const a=Object.keys(o).filter(e=>t[e]);n(a)};return(0,Ze.jsxs)(O2,{container:!0,children:[(0,Ze.jsx)(C2,{name:e,size:"md",checked:o[e],onChange:t}),(0,Ze.jsx)(j2,{onClick:t,children:e})]},e)})})})]}):null},R2=e=>!e||""===e.trim(),P2=(e,n)=>{let t=!0;const{supplierName:a,address1:r,city:i,postcode:o,phone:l,type:s}=Qr()(e),c=null==n?void 0:n.alpha2Code.toUpperCase(),d=LA.isPostalCodeLocales.includes(c);return R2(a.text)&&(t=!1,e.supplierName.error="Supplier Name is required"),R2(r.text)&&(t=!1,e.address1.error="Address 1 is required"),R2(i.text)&&(t=!1,e.city.error="City is required"),R2(o.text)?(t=!1,e.postcode.error="Postcode is required"):d&&!(0,LA.isPostalCode)(o.text,c)&&(t=!1,e.postcode.error="Invalid postcode"),R2(l.text)||nF(l.text)||(t=!1,e.phone.error="Invalid phone number"),s.value.length||(t=!1,e.type.error="At least one supplier type should be selected"),[e,t]};var L2,I2,E2,_2;function F2(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function B2(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F2(Object(t),!0).forEach(function(n){U2(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F2(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function U2(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function M2(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const V2=Ge.default.div(L2||(L2=M2(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),z2=(0,Ge.default)(ze.JU)(I2||(I2=M2(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),G2=Ge.default.div(E2||(E2=M2(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),$2=(0,Ge.default)(ze.fv)(_2||(_2=M2(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),W2=e=>{var n;let{onSuccess:t,accountId:a,refetchQuery:r,utility:i,heading:o,defaultTypes:l=[],forType:s,materialTypesOptions:c}=e;const d=rc(),{countryList:u,defaultCountry:p,allCountries:m}=ku(),[f,y]=(0,g.useState)({hasError:!1,isSuccess:!1,notification:{show:!1,message:"",color:"success"},supplierName:{text:"",error:""},address1:{text:"",error:""},address2:{text:"",error:""},address3:{text:"",error:""},city:{text:"",error:""},postcode:{text:"",error:""},phone:{text:"",error:""},selectCountry:null,materials:null,notes:null,type:{value:s?[s]:l,error:""},accountId:a}),[b,h]=(0,g.useState)(!1),[v]=(0,Ot.n)(M1,{refetchQueries:r,onError:e=>{h(!1),e.graphQLErrors&&e.graphQLErrors[0]&&400===e.graphQLErrors[0].errorType?y(B2(B2({},f),{},{notification:{show:!0,message:"Supplier name must be unique.",color:"danger"},hasError:!0,isSuccess:!1})):y(B2(B2({},f),{},{notification:{show:!0,message:"Something went wrong. If the problem continues please contact support.",color:"danger"},hasError:!0,isSuccess:!1}))},onCompleted:e=>{h(!0),y(B2(B2({},f),{},{hasError:!1,isSuccess:!0})),t("Supplier has been created!","success",e.createSupplier.id,e.createSupplier)}}),x=e=>y(B2(B2({},f),{},{[e.target.name]:{text:e.target.value,error:""}})),{notification:T,supplierName:O,address1:k,address2:j,address3:C,city:S,postcode:N,phone:w,selectCountry:D}=f;return(0,Ze.jsxs)(V2,{name:"create-supplier",children:[f.notification.show&&(0,Ze.jsx)(ze.Eg,{name:"create-supplier__notification",show:!0,color:T.color,onClose:()=>{y(B2(B2({},f),{},{notification:B2(B2({},f.notification),{},{show:!1})}))},children:T.message}),(0,Ze.jsxs)(ze.hh,{id:"createSupplier--propertySheet",children:[(0,Ze.jsx)(ze.hh.HeaderRow,{name:"createSupplier--header",children:o}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextInputColumn,{name:"supplier--name",onChange:e=>{const n=e.target.value,t=n?"":f.supplierName.error;y(B2(B2({},f),{},{supplierName:B2(B2({},f.supplierName),{},{text:n,error:t})}))},label:"Supplier Name",value:O.text,error:O.error})}),(0,Ze.jsx)(oF,{id:"SupplierAddressPropertySheet",name:"SupplierAddressPropertySheet",address1:k,address2:j,address3:C,city:S,postcode:N,phone:w,handleChange:x,handleSelectChange:e=>{y(n=>B2(B2({},n),{},{[e.target.name]:{value:e.target.select.value,label:e.target.select.label}}))},disabled:b,countryList:u||[],selectCountry:D||p}),d.account.includes("getAll")&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)($2,{item:!0,children:[(0,Ze.jsx)(G2,{children:(0,Ze.jsx)(z2,{children:"Account"})}),(0,Ze.jsx)(Kh,{value:f.accountId,onChange:e=>{let{id:n}=e;y(e=>B2(B2({},e),{},{accountId:n}))}})]})}),!s&&(0,Ze.jsx)(A2,{utility:i,error:f.type.error,defaultSelected:l,onChange:e=>y(B2(B2({},f),{},{type:{value:e,error:""}}))}),i===Vt.D_.Materials&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)($2,{item:!0,children:[(0,Ze.jsx)(G2,{children:(0,Ze.jsx)(z2,{children:"Material Supplied"})}),(0,Ze.jsx)(ze.KF,{value:f.materials,options:c,isDisabled:b,onChange:e=>y(n=>B2(B2({},n),{},{materials:e.target.select})),multi:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)($2,{item:!0,children:[(0,Ze.jsx)(G2,{children:(0,Ze.jsx)(z2,{children:"Notes"})}),(0,Ze.jsx)(ze.fs,{size:"lg",disabled:b,onChange:e=>x(e),name:"notes",value:null===(n=f.notes)||void 0===n?void 0:n.text,box:!0})]})})]}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.ButtonColumn,{name:"createSupplier",onClick:()=>(()=>{const{supplierName:e,address1:n,address2:t,address3:a,city:r,postcode:o,phone:l,selectCountry:s,type:c,materials:d,notes:u}=f,g=(null==s?void 0:s.value)||p.value,b={utility:i,countryId:g,id:(0,Ai.A)(),name:e.text,addressId:(0,Ai.A)(),add1:n.text||"",add2:t.text||"",add3:a.text||"",city:r.text,post:o.text,phone:l.text?l.text.trim():"",type:c.value,accountId:f.accountId,materialIds:null==d?void 0:d.map(e=>{let{value:n}=e;return n}),notes:null==u?void 0:u.text,isGlobal:!1},[h,x]=P2(f,m.find(e=>e.id===g));x?v({variables:b}):y(B2({},h))})(),disabled:b,children:"Save"})})]})]})};var q2,J2,Y2,H2;function K2(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Q2(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?K2(Object(t),!0).forEach(function(n){Z2(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):K2(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Z2(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function X2(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const e5=Ge.default.div(q2||(q2=X2(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),n5=(0,Ge.default)(ze.JU)(J2||(J2=X2(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),t5=Ge.default.div(Y2||(Y2=X2(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),a5=(0,Ge.default)(ze.fv)(H2||(H2=X2(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),r5=e=>{var n;let{defaultCountry:t,onDismiss:a,countryList:r,accountId:i,supplierId:o,supplierName:l,addressId:s,address1:c,address2:d,address3:u,city:p,postcode:m,phone:f,utility:y,type:b,heading:h,allCountries:v,materials:x,notes:T,materialTypesOptions:O}=e;const[k,j]=(0,g.useState)({hasError:!1,isSuccess:!1,notification:{show:!1,message:"",color:"success"},supplierId:{value:o},supplierName:{text:l,error:""},addressId:{value:s},address1:{text:c||"",error:""},address2:{text:d||"",error:""},address3:{text:u||"",error:""},city:{text:p,error:""},postcode:{text:m,error:""},phone:{text:f||"",error:""},options:[],selectCountry:{value:null==t?void 0:t.value,label:null==t?void 0:t.label},materials:null==x?void 0:x.map(e=>{let{id:n,name:t}=e;return{label:t,value:n}}),notes:{text:T||"",error:""},type:{value:b,error:""}}),[C,S]=(0,g.useState)(!1),[N]=(0,Ot.n)(s?V1:z1,{onError:()=>{S(!1),j(Q2(Q2({},k),{},{notification:{show:!0,message:"Something went wrong. If the problem continues please contact support.",color:"danger"},hasError:!0,isSuccess:!1}))},onCompleted:()=>{S(!1),a({show:!1,message:"Supplier has been updated!",color:"success"})}}),w=e=>j(Q2(Q2({},k),{},{[e.target.name]:{text:e.target.value,error:""}}));return(0,Ze.jsxs)(e5,{name:"update-supplier",children:[k.notification.show&&(0,Ze.jsx)(ze.Eg,{name:"update-supplier__notification",show:!0,color:k.notification.color,onClose:()=>{j(Q2(Q2({},k),{},{notification:Q2(Q2({},k.notification),{},{show:!1})}))},children:k.notification.message}),(0,Ze.jsxs)(ze.hh,{id:"PropertySheet",children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:h}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextInputColumn,{name:"supplier--name",onChange:e=>{const n=e.target.value;j(Q2(Q2({},k),{},{supplierName:Q2(Q2({},k.supplierName),{},{text:n})}))},label:"Supplier Name",value:k.supplierName.text})}),(0,Ze.jsx)(oF,{id:"SupplierAddressPropertySheet",name:"SupplierAddressPropertySheet",address1:k.address1,address2:k.address2,address3:k.address3,city:k.city,postcode:k.postcode,phone:k.phone,handleChange:w,handleSelectChange:e=>{j(n=>Q2(Q2({},n),{},{[e.target.name]:{value:e.target.select.value,label:e.target.select.label}}))},countryList:r,selectCountry:k.selectCountry}),(0,Ze.jsx)(A2,{utility:y,error:k.type.error,defaultSelected:k.type.value,onChange:e=>{j(Q2(Q2({},k),{},{type:{value:e,error:""}}))}}),y===Vt.D_.Materials&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(a5,{item:!0,children:[(0,Ze.jsx)(t5,{children:(0,Ze.jsx)(n5,{children:"Material Supplied"})}),(0,Ze.jsx)(ze.KF,{value:k.materials,options:O,isDisabled:C,onChange:e=>j(n=>Q2(Q2({},n),{},{materials:e.target.select})),multi:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(a5,{item:!0,children:[(0,Ze.jsx)(t5,{children:(0,Ze.jsx)(n5,{children:"Notes"})}),(0,Ze.jsx)(ze.fs,{size:"lg",disabled:C,onChange:e=>w(e),name:"notes",value:null===(n=k.notes)||void 0===n?void 0:n.text,box:!0})]})})]}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.ButtonColumn,{name:"updateSupplier",onClick:()=>{var e;const n=(null===(e=k.selectCountry)||void 0===e?void 0:e.value)||(null==t?void 0:t.value),[a,r]=P2(k,v.find(e=>e.id===n));if(r){var o,l;const{supplierId:e,supplierName:n,addressId:t,address1:a,address2:r,address3:s,city:c,postcode:d,phone:u,selectCountry:p,type:m}=k;S(!0),N({variables:{utility:y,accountId:i,id:e.value,name:n.text,addressId:t.value||(0,Ai.A)(),add1:a.text||"",add2:r.text||"",add3:s.text||"",city:c.text,post:d.text,phone:u.text?u.text.trim():"",countryId:p.value,type:m.value,materialIds:null===(o=k.materials)||void 0===o?void 0:o.map(e=>{let{value:n}=e;return n}),notes:null===(l=k.notes)||void 0===l?void 0:l.text}})}else j(Q2({},a))},disabled:C,children:"Update"})})]})]})};var i5;const o5=(0,D.J1)(i5||(i5=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetSupplierSelectOptions($accountId: ID!) {\n    getAllCountries {\n      value: id\n      label: name\n    }\n    getMaterialsByAccountID(accountId: $accountId) {\n      value: id\n      label: name\n    }\n  }\n"])));function l5(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function s5(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l5(Object(t),!0).forEach(function(n){c5(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l5(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function c5(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const d5={countryId:"getAllCountries"},u5=[{key:"id",type:"string",label:"ID",description:"Rio ID. Enter it if you want to update existing supplier. Example value: 5a72c22b-6c56-4eb1-802c-b26d91e7953b"},{key:"name",type:"string",label:"Name",description:"Name of the supplier",validators:[{validate:"unique_case_insensitive"},{validate:"required"}]},{key:"address1",type:"string",label:"Address 1",validators:[{validate:"required"}],description:"First line of the address"},{key:"address2",type:"string",label:"Address 2",validators:[],description:"Address 2 (optional)"},{key:"address3",type:"string",label:"Address 3",validators:[],description:"Address 3 (optional)"},{key:"city",type:"string",label:"City",description:"City",validators:[{validate:"required"}]},{key:"postCode",type:"string",label:"Postcode",description:"Postcode",validators:[{validate:"required"}]},{key:"phone1",type:"string",label:"Phone",description:"Phone number (optional)"},{key:"countryId",type:"select",label:"Country",selectOptions:[],description:"Country",validators:[{errorMessage:"Please ensure you have selected a country for your suppliers",validate:"required"}]},{key:"utility",type:"select",label:"Utility",selectOptions:[{value:"WASTE",label:"Waste"},{value:"ELECTRICITY",label:"Electricity"},{value:"GAS",label:"Gas"},{value:"WATER",label:"Water"},{value:"FUEL",label:"Fuel"},{value:"TRANSPORT",label:"Transport"},{value:"MATERIALS",label:"Materials"},{value:"HOTELSTAYS",label:"Hotel Stays"}],description:"Utility type",validators:[{validate:"required"}]},{key:"type",type:"string",label:"Supplier Types",description:"Enter supplier types separated by commas (e.g., Supplier, Contractor, Carrier)",validators:[{validate:"required"}]},{key:"notes",type:"string",label:"Notes",description:"Enter notes (optional)"}];const p5=t.p+"suppliers_template-191ae864c44a69e5456b.xlsx";function m5(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function f5(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m5(Object(t),!0).forEach(function(n){y5(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m5(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function y5(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const g5={WASTE:["Supplier","Carrier","Contractor"],ELECTRICITY:["Supplier","Broker","Contractor"],GAS:["Supplier","Broker","Contractor"],WATER:["Supplier","Contractor"],TRANSPORT:["Supplier","Haulier","Contractor"],MATERIALS:["Supplier","Subcontractor"],HOTELSTAYS:["Supplier"],FUEL:["Supplier"]},b5=(e,n)=>"Invalid supplier types for ".concat(e,": ").concat(n.join(", "),". Valid types are: ").concat(g5[e.toUpperCase()].join(", "));function h5(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function v5(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h5(Object(t),!0).forEach(function(n){x5(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h5(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function x5(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const T5=[kn("REACT_APP_BASE_URL"),p5].join("");function O5(e){let{accountId:n,gridApi:t}=e;const a=Od(n),r=function(){const e=rt(),[n]=(0,gs._)(Y1,{fetchPolicy:"network-only"}),t=Di(n,n=>{let{limit:t,offset:a}=n;return{limit:t,offset:a,accountId:e}},e=>e.getSuppliersPage.rows,1e3);return async e=>{const n=[],a=new Set,r=await $r(t());for(const e of r)a.add(e.id);for(const t of e)!t.value||a.has(t.value)?n.push(t):n.push(f5(f5({},t),{},{info:[{message:"One or more suppliers you're trying to update weren't recognised in your upload, please review",level:"error"}]}));return n}}(),i=_u(),{showNotification:o}=vt(),[l]=(0,Ot.n)(H1),s=function(e){const{data:n}=function(e){return(0,h.IT)(o5,{variables:{accountId:e},fetchPolicy:"cache-and-network"})}(e);return(0,g.useMemo)(()=>u5.map(e=>"select"===e.type&&d5[e.key]?s5(s5({},e),{},{type:"select",selectOptions:Gw()(n,d5[e.key],[])}):e),[n])}(n),c=a&&i?{id:i.id,name:Vo(i),email:i.email,companyId:a.id,companyName:a.name}:null;return c?(0,Ze.jsx)(VU.A,{licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:c,style:QU.style,settings:v5(v5({},QU.settings),{},{importIdentifier:"Suppliers",backendSyncMode:"DISABLED",uploadStep:v5(v5({},QU.settings.uploadStep),{},{helpText:$U(T5)}),manualInputDisabled:!1}),columnHooks:[{fieldName:"id",callback:r}],bulkRowHooks:[e=>e.map(e=>{var n,t;const a=(0,zt.cloneDeep)(e),r=null===(n=a.row.utility)||void 0===n?void 0:n.value,i=null===(t=a.row.type)||void 0===t?void 0:t.value;if(a.row.type&&(a.row.type.info=[]),!r||!i)return a;const o=i.split(",").map(e=>e.trim()).filter(e=>e.length>0),l=g5[r.toUpperCase()];if(l){const e=o.filter(e=>!l.includes(e));e.length>0&&(a.row.type.info=[{message:b5(r,e),level:"error"}])}return a})],fields:s,onResults:async e=>{try{if(e.length>5e3)return void o("Upload failed: File contains ".concat(e.length," rows, but the maximum allowed is ").concat(5e3," rows. Please split your file into smaller chunks."),"danger");const a=e.map(e=>({id:e.id||void 0,name:e.name,address1:e.address1,address2:e.address2||void 0,address3:e.address3||void 0,city:e.city,postCode:e.postCode,phone1:e.phone1||void 0,countryId:e.countryId,utility:e.utility,type:e.type.split(",").map(e=>e.trim()).filter(e=>e.length>0),notes:e.notes||void 0}));await l({variables:{accountId:n,suppliers:a}}),o("Successfully uploaded ".concat(a.length," supplier").concat(1===a.length?"":"s"),"success"),t&&t.refreshInfiniteCache()}catch(e){console.error("Error processing supplier upload results:",e),o("An error occurred while processing the upload","danger")}},children:"Upload"}):null}const k5=JSON.parse('[{"label":"Waste","value":"WASTE"},{"label":"Electricity/Heat/Steam","value":"ELECTRICITY"},{"label":"Fuel","value":"FUEL"},{"label":"Gas","value":"GAS"},{"label":"Water","value":"WATER"},{"label":"Transport","value":"TRANSPORT"},{"label":"Materials","value":"MATERIALS"},{"label":"Hotel Stays And Home Working","value":"HOTELSTAYS"}]');var j5;const C5=(0,D.J1)(j5||(j5=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getMaterialsByAccountID($accountId: ID!) {\n    getMaterialsByAccountID(accountId: $accountId) {\n      id\n      name\n    }\n  }\n"]))),S5=["data"];function N5(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function w5(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var D5;const A5=(0,f.styled)("div")(D5||(D5=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  gap: 16px;\n"])));function R5(e){let{fileName:n}=e;return(0,Ze.jsxs)(A5,{children:[(0,Ze.jsx)(f.Icons.InsertDriveFile,{}),(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:n})]})}var P5;const L5=(0,D.J1)(P5||(P5=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  fragment DocumentFields on DocumentRecord {\n    id\n    link\n    source\n    key\n    fileName\n    documentArea\n    category\n    type\n    supplierId\n    supplierName\n    reviewDate\n    reviewDateStatus\n    library\n    referenceId\n    managementSystemCode\n    managementSystemId\n    managementSystemChapterId\n    createdAt\n    createdBy {\n      id\n      first_name\n      last_name\n    }\n    createdByName\n    updatedAt\n    updatedBy {\n      first_name\n      last_name\n    }\n    updatedByName\n    antivirusStatus\n    tags {\n      id\n      tagName\n    }\n    locations {\n      id\n      name\n    }\n    notes\n    folderId\n    folders {\n      parent {\n        id\n        name\n      }\n      child {\n        id\n        name\n      }\n    }\n    startDate\n    expirationDate\n  }\n"])));var I5;const E5=(0,D.J1)(I5||(I5=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  fragment ChapterFields on Chapter {\n    id\n    title\n    number\n    synopsis\n    type\n    content {\n        headerButton {\n          text\n          link\n        }\n      }\n    documents {\n      ...DocumentFields\n      __typename\n    }\n    ... on ManagementSystemChapter {\n      id\n      title\n      number\n      synopsis\n      type\n      content {\n        headerButton {\n          text\n          link\n        }\n      }\n      documents {\n        ...DocumentFields\n        __typename\n      }\n    }\n    __typename\n  }\n  ","\n"])),L5);var _5;const F5=(0,D.Ay)(_5||(_5=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  fragment ChapterFieldsNesting on Chapter {\n    ... on ManagementSystemChapter {\n        chapters {\n            ...ChapterFields\n            ... on ManagementSystemChapter {\n                chapters {\n                    ...ChapterFields\n                }\n            }\n        }\n    }\n   \n  }\n  ","\n"])),E5);var B5,U5,M5,V5,z5,G5,$5,W5,q5,J5,Y5,H5,K5,Q5,Z5;function X5(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const e3=(0,D.J1)(B5||(B5=X5(["\n  mutation CreateDocumentRecord(\n    $id: ID!\n    $accountId: ID!\n    $key: String\n    $userId: ID!\n    $category: String!\n    $type: [String!]\n    $supplierId: String\n    $fileName: String!\n    $library: DocumentLibrary!\n    $referenceId: String\n    $reviewDate: String\n    $managementSystemCode: String\n    $managementSystemId: ID\n    $managementSystemChapterId: ID\n    $source: Source!\n    $link: String\n    $tags: [String!]\n    $locations: [String!]\n    $notes: String\n    $folderId: String\n    $startDate: String\n    $expirationDate: String\n  ) {\n    createDocumentRecord(\n      input: {\n        id: $id\n        userId: $userId\n        accountId: $accountId\n        key: $key\n        category: $category\n        type: $type\n        supplierId: $supplierId\n        fileName: $fileName\n        library: $library\n        referenceId: $referenceId\n        reviewDate: $reviewDate\n        managementSystemCode: $managementSystemCode\n        managementSystemId: $managementSystemId\n        managementSystemChapterId: $managementSystemChapterId\n        link: $link\n        source: $source\n        tags: $tags\n        locations: $locations\n        notes: $notes\n        folderId: $folderId\n        startDate: $startDate\n        expirationDate: $expirationDate\n      }\n    ) {\n      ...DocumentFields\n    }\n  }\n  ","\n"])),L5),n3=(0,D.J1)(U5||(U5=X5(["\n  query GetDocumentRecordById($id: ID!, $accountId: String) {\n    getDocumentRecordById(id: $id, accountId: $accountId) {\n      ...DocumentFields\n    }\n  }\n  ","\n"])),L5),t3=(0,D.J1)(M5||(M5=X5(["\n  mutation DeleteDocumentRecord($id: ID!) {\n    deleteDocumentRecord(id: $id)\n  }\n"]))),a3=(0,D.J1)(V5||(V5=X5(["\n  mutation DeleteDocumentRecords($ids: [ID!]!) {\n    deleteDocumentRecords(ids: $ids)\n  }\n"]))),r3=(0,D.J1)(z5||(z5=X5(["\n  query GetManagementSystemById($id: ID!, $accountId: ID!) {\n    getManagementSystemById(id: $id, accountId: $accountId) {\n      id\n      title\n      synopsis\n      shortCode\n      documents {\n        ...DocumentFields\n      }\n      chapters {\n        ...ChapterFields\n        ... on ManagementSystemChapter {\n          chapters {\n            ...ChapterFields\n            ...ChapterFieldsNesting\n          }\n        }\n      }\n    }\n    getAvailableManagementSystems(accountId: $accountId) {\n      id\n      title\n    }\n  }\n  ","\n  ","\n  ","\n"])),L5,E5,F5),i3=(0,D.J1)(G5||(G5=X5(["\n  mutation AttachDocumentToManagementSystem($systemId: ID!, $documentId: ID!, $accountId: ID!, $linkId: ID!) {\n    attachDocumentToManagementSystem(\n      input: { id: $systemId, documentId: $documentId, accountId: $accountId, linkId: $linkId }\n    )\n  }\n"]))),o3=(0,D.J1)($5||($5=X5(["\n  query GetDocumentsCount(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 1\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getDocumentsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n    }\n  }\n"]))),l3=(0,D.J1)(W5||(W5=X5(["\n  mutation CreateFolder($input: CreateDocumentFolderInput!) {\n    createDocumentFolder(input: $input)\n  }\n"]))),s3=(0,D.J1)(q5||(q5=X5(["\n  mutation UpdateFolder($input: UpdateDocumentFolderInput!) {\n    updateDocumentFolder(input: $input)\n  }\n"]))),c3=(0,D.J1)(J5||(J5=X5(["\n  mutation DeleteFolders($accountId: ID!, $ids: [ID!]!) {\n    deleteDocumentFolders(accountId: $accountId, ids: $ids)\n  }\n"]))),d3=(0,D.J1)(Y5||(Y5=X5(["\n  query GetFoldersForOptions($accountId: ID!, $parentId: ID) {\n    getDocumentFolders(accountId: $accountId, parentId: $parentId) {\n      id\n      name\n    }\n  }\n"]))),u3=(0,D.J1)(H5||(H5=X5(["\n  query GetFoldersForPage($accountId: ID!, $parentId: ID) {\n    getDocumentFolders(accountId: $accountId, parentId: $parentId) {\n      id\n      name\n    }\n  }\n"]))),p3=(0,D.J1)(K5||(K5=X5(["\n  query GetParentAndChildFoldersForPage($accountId: ID!, $parentId: ID!) {\n    getDocumentFolders(accountId: $accountId, parentId: $parentId) {\n      id\n      name\n    }\n\n    getDocumentFolder(accountId: $accountId, id: $parentId) {\n      id\n      name\n      empty\n    }\n  }\n"]))),m3=(0,D.J1)(Q5||(Q5=X5(["\n  query GetFolderForDocumentPage($accountId: ID!, $id: ID!) {\n    getDocumentFolder(accountId: $accountId, id: $id) {\n      id\n      name\n      empty\n      parentId\n      parent {\n        id\n        name\n      }\n    }\n  }\n"]))),f3=(0,D.J1)(Z5||(Z5=X5(["\n  query GetDocumentDownloadLink($accountId: ID!, $documentId: ID!) {\n    getDocumentDownloadLink(accountId: $accountId, documentId: $documentId)\n  }\n"])));function y3(e){const n=Wt()(e).local().format("DD/MM/YYYY");return"Invalid date"===n?"-":n}function g3(e){const n=Wt()(e).local().format("DD/MM/YYYY [at] HH:mm");return"Invalid date"===n?"-":n}function b3(e){return Wt().utc(new Date(e)).format("DD/MM/YYYY")}function h3(e){if("string"!=typeof e)return"";const n=e.split(".");return n.length>1?n.slice(0,n.length-1).join("."):e}function v3(e,n){return"CLEAN/".concat(e,"/").concat(n,"/").concat(n)}function x3(e){const n="quaternary";if(!e)return n;const t={GAS:"quaternary",ELECTRICITY:"quaternary",WASTE:"quaternary",TRANSPORT:"quaternary",WATER:"quaternary",GOVERNANCE:"tertiary"},a=null==e?void 0:e.toUpperCase();return e&&a in t&&t[a]||n}function T3(e,n,t,a,r){const i={};return e&&(i.text=[{filterType:Vt.pe.Text,type:Vt.II.Contains,filter:e,field:"fileName"}]),t&&O3(t)?i.set=[{values:[t],filterType:Vt.pe.Set,field:"folderId"}]:(n||t||a||r)&&(i.set=[],n&&i.set.push({values:[n],filterType:Vt.pe.Set,field:"library"}),t&&i.set.push({values:[t],filterType:Vt.pe.Set,field:"category"}),a&&i.set.push({values:[a],filterType:Vt.pe.Set,field:"managementSystemId"}),(r||null===r&&!e)&&i.set.push({values:[r],filterType:Vt.pe.Set,field:"managementSystemChapterId"})),i}const O3=e=>/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(e),k3=e=>(null==e?void 0:e.library)===Vt.zM.Waste&&(null==e?void 0:e.category)===Ma.DocumentCategory.WasteCarrierLicence,j3=e=>(null==e?void 0:e.library)===Vt.zM.Waste&&(null==e?void 0:e.category)===Ma.DocumentCategory.WasteTransferNote,C3=e=>{let{value:n,onChange:t,error:a,label:r="",isSubmitting:i,defaultOptions:o,disabled:l}=e;const{loading:s,options:c,loadMore:d}=QW();return(0,Ze.jsx)(f.AutoComplete,{isMulti:!0,loadMore:d,label:r||(0,Ze.jsx)(Je.A,{id:"pages.project.details.locations"}),options:c,onChange:e=>t(e,"locationsSelect"),isLoading:s,error:null==a?void 0:a.toString(),value:n,defaultValue:Array.isArray(o)?o:[],disabled:i||l,placeholder:"Start typing to search for a location"})},S3={[Vt.d.Broker]:{field:"brokerType",type:Vt.II.Equals,filterType:Vt.pe.Text,filter:"Broker"},[Vt.d.Carrier]:{field:"carrierType",type:Vt.II.Equals,filterType:Vt.pe.Text,filter:"Carrier"},[Vt.d.Contractor]:{field:"contractorType",type:Vt.II.Equals,filterType:Vt.pe.Text,filter:"Contractor"},[Vt.d.Haulier]:{field:"haulierType",type:Vt.II.Equals,filterType:Vt.pe.Text,filter:"Haulier"},[Vt.d.Supplier]:{field:"supplierType",type:Vt.II.Equals,filterType:Vt.pe.Text,filter:"Supplier"},[Vt.d.Subcontractor]:{field:"subcontractorType",type:Vt.II.Equals,filterType:Vt.pe.Text,filter:"Subcontractor"}},N3=(e,n)=>{const t=[];return e&&t.push({field:"utility",type:Vt.II.Equals,filterType:Vt.pe.Text,filter:e}),n&&t.push(S3[n]),{text:t}};function w3(e){let{value:n,error:t,onChange:a,utility:r,supplierType:i,label:o="Supplier",disableClearable:l,withWasteCarrierLicence:s,onSuppliersLoaded:c}=e;const{data:d,fetchMore:u,loading:p}=function(e){let{limit:n,utility:t,supplierType:a,withWasteCarrierLicence:r=!1}=e;const i=rt();return(0,h.IT)(Tf,{fetchPolicy:"network-only",notifyOnNetworkStatusChange:!0,variables:{limit:n,accountId:i,filters:N3(t,a),withWasteCarrierLicence:r}})}({limit:Za,utility:r,supplierType:i,withWasteCarrierLicence:s}),[m,y]=(0,g.useState)([]);return(0,g.useEffect)(()=>{const e=(null==d?void 0:d.getSuppliersPage.rows)||[];null==c||c(e),y(Ti(e))},[d]),(0,Ze.jsx)(f.AutoComplete,{disableClearable:l,isMulti:!1,loadMore:async(e,n,t)=>{const a=N3(r,i);t&&a.text.push({filterType:Vt.pe.Text,type:Vt.II.Contains,filter:t,field:"name"});const o=await u({variables:{offset:n,limit:e,filters:a}}),l=o.data.getSuppliersPage.rows;return null==c||c(l),{total:o.data.getSuppliersPage.totalRows,options:Ti(l)}},onChange:a,label:o,value:n,isLoading:p,error:null==t?void 0:t.toString(),helperText:t||"",noOptionsMessage:"No suppliers found",options:m})}function D3(e){return{value:e.id,label:e.tagName}}const A3=e=>{let{accountId:n,value:t,onChange:a,error:r,name:i="tagIds",loading:o,label:l="Tags",disabled:s}=e;const{data:c,loading:d,error:u}=(0,h.IT)(AD,{variables:{accountId:n},fetchPolicy:"network-only"}),p=(0,g.useMemo)(()=>(null==c?void 0:c.getTagsByAccountId)||[],[null==c?void 0:c.getTagsByAccountId]),m=(0,g.useMemo)(()=>(0,zt.sortBy)(p.map(D3),e=>null==e?void 0:e.label.trim().toLowerCase()),[p]),y=(null==u?void 0:u.message)||r||"";return(0,Ze.jsx)(f.MultiSelect,{name:i,label:l,isLoading:d||o,disabled:o||s,onChange:a,value:t,error:Boolean(y),helperText:y,options:m})},R3=JSON.parse('[{"label":"Part A","value":"Part A"},{"label":"Part B","value":"Part B"},{"label":"Part C","value":"Part C"},{"label":"Part D","value":"Part D"},{"label":"Part E","value":"Part E"}]'),P3=[{id:"be36f589-60f2-4e30-923d-0657ca6cbaf7",title:"All Documents",library:"ALL",link:"all",icon:"folder"},{id:"ad1d9409-bfe9-4c34-9ce6-12cf10a1b594",title:"Electricity Documents",library:Vt.zM.Electricity,link:"electricity",icon:"folder",accessControlIndexer:"data.electricity"},{id:"4cacab91-659a-4437-ba4e-18020d9badd7",title:"Gas Documents",library:Vt.zM.Gas,link:"gas",icon:"folder",accessControlIndexer:"data.gas"},{id:"24cde553-cced-4add-998d-5bbacfed3717",title:"Governance Documents",library:Vt.zM.Governance,link:"governance",icon:"folder",iconColor:"tertiary",accessControlIndexer:"comply"},{id:"02cf37a1-b95e-4b05-9731-e3ae5f41af77",title:"Transport Documents",library:Vt.zM.Transport,link:"transport",icon:"folder",accessControlIndexer:"data.transport"},{id:"8eb9e9e4-0d6c-4ef4-b1eb-f2850947782a",title:"Waste Documents",library:Vt.zM.Waste,link:"waste",icon:"folder",accessControlIndexer:"data.waste"},{id:"71a1ff35-ea84-4a5a-8b5c-bbacc51a3f2b",title:"Water Documents",library:Vt.zM.Water,link:"water",icon:"folder",accessControlIndexer:"data.water"}];function L3(){const e=By("documentFolder");return{get canGetFolder(){return e("get")},get canCreateFolder(){return e("upsert")},get canEditFolder(){return e("upsert")},get canDeleteFolder(){return e("delete")}}}function I3(){let{parentId:e,skip:n,preloaded:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const a=rt(),{canGetFolder:r}=L3(),{data:i}=(0,h.IT)(d3,{variables:{accountId:a,parentId:e},skip:n||!r}),o=null==i?void 0:i.getDocumentFolders;return(0,g.useMemo)(()=>(o||(t?[t]:[])).map(e=>{let{id:n,name:t}=e;return{value:n,label:t}}),[o,t])}function E3(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function _3(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E3(Object(t),!0).forEach(function(n){F3(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E3(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function F3(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const B3=P3,U3=e=>{var n;let{document:t,isSubmitting:a,onChange:r,predefinedValues:i={},errors:o,relocatable:l,shouldParseIdFromFileName:s,onSuppliersLoaded:c}=e;const d=_u(),{data:u}=Td(),p=rt(),m=j3(t),[y,b]=(0,g.useState)(s||!1),h="Consignment Note (EA)"===t.category||"Consignment Note (SEPA)"===t.category,[v,x]=(0,g.useState)(!1),[T,O]=(0,g.useState)(null===(n=i.customLibrary)||void 0===n?void 0:n.id),k=Pu(),j=!(null==k||!k.isSupplierRequiredForDocument),C=t.tags,S=null==d?void 0:d.allowedTags,N=t.locations,w=null==d?void 0:d.allowedLocations,D=l||!i.library&&!i.customLibrary,A=l||!i.category&&!i.customCategory,R=I3({skip:!D,preloaded:i.customLibrary}),P=(0,g.useMemo)(()=>[...B3.filter(e=>Gw()(u,e.accessControlIndexer)).map(e=>{let{title:n,library:t}=e;return{label:n,value:t}}),...R],[u,R]),L=t.library,I=I3({skip:!A||!T,parentId:T,preloaded:i.customCategory}),E=(0,g.useMemo)(()=>L&&L!==Vt.zM.Custom?lI.filter(e=>e.libraries.includes(L)):[],[L]),_=T?I:E;(0,g.useEffect)(()=>{(!C&&null!=S&&S.length||!N&&null!=w&&w.length)&&r(_3(_3({},t),{},{tags:C||(null==S?void 0:S.filter(Boolean).map(e=>e.id)),locations:N||(null==w?void 0:w.filter(Boolean).map(e=>e.id))}),{})},[C,S,N,w,r]);const F=(e,n)=>{const t=_3(_3({},n),{},{expirationDate:Kt(e)});return r(t,{field:"expirationDate"}),t},B=(e,n)=>{let t=_3(_3({},n),{},{startDate:Kt(e)});if(r(t,{field:"startDate"}),t.startDate&&!n.expirationDate){const e=Wt()(t.startDate).add(36,"months");e.isValid()&&(t=F(e.toISOString(),t))}return t},{supplierId:U,supplierName:M}=t||{},V=(0,g.useMemo)(()=>U&&M?{value:U,label:M}:null,[U,M]);return(0,Ze.jsxs)(f.Grid,{container:!0,columns:12,rowGap:3,columnGap:3,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Select,{label:"Select document library",value:T||t.library||"",options:P,disabled:!D||a,onChange:e=>{let{value:n}=e;const a=O3(n),i=_3({},t);a?(O(n),i.library=Vt.zM.Custom):(O(void 0),i.library=n),i.category=null,i.folderId=null,r(i,{field:"library"})}})}),(t.library||T)&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Select,{label:"Select document category",error:!(null==o||!o.category),helperText:null==o?void 0:o.category,value:t.folderId||t.category||"",options:_,disabled:!A||a,onChange:e=>{let{value:n,label:a}=e;const i=_3({},t),o=O3(n);o?(i.category=a,i.folderId=n):i.category=n,r(i,{field:o?"folderId":"category"}),k3(i)||F(null,B(null,i))}})}),(t.category||t.folderId)&&(0,Ze.jsxs)(Ze.Fragment,{children:[h&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.MultiSelect,{label:"Select document type",value:Array.isArray(t.type)?t.type:[],options:R3,disabled:a,onChange:e=>r(_3(_3({},t),{},{type:e.map(e=>e.value)}),{field:"type"})})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Checkbox,{label:"Parse ID From Filename",disabled:m,checked:y||m,value:y,onChange:()=>{const e=!y;b(e),r(e?_3(_3({},t),{},{referenceId:h3(Gw()(t,"fileName"))}):t,{field:"shouldParse",value:e})}})}),!y&&!m&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{error:!(null==o||!o.referenceId),helperText:null==o?void 0:o.referenceId,label:"".concat(t.category," ID"),value:t.referenceId||"",onChange:e=>r(_3(_3({},t),{},{referenceId:e.target.value}),{field:"referenceId"})})}),k3(t)&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.DatePicker,{label:"Start date",error:null==o?void 0:o.startDate,disabled:a,onChange:e=>B(e,t),value:Kt(t.startDate)})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.DatePicker,{label:"Expiration date",disablePast:!0,error:null==o?void 0:o.expirationDate,disabled:a,onChange:e=>F(e,t),value:Kt(t.expirationDate)})})]}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.DatePicker,{label:"Review date (optional)",disabled:a,onChange:e=>r(_3(_3({},t),{},{reviewDate:e?new Date(e).toISOString():void 0}),{field:"reviewDate"}),value:t.reviewDate?new Date(t.reviewDate):void 0})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(w3,{disableClearable:j,onSuppliersLoaded:e=>null==c?void 0:c(e),label:"Select supplier/carrier ".concat(j?"":"(optional)"),error:null==o?void 0:o.supplierId,value:V||t.supplierId||"",withWasteCarrierLicence:!0,onChange:e=>{const n=e;r(_3(_3({},t),{},{supplierId:n.value,supplierName:n.label}),{field:"supplierId"})}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(A3,{label:"Select tags (optional)",value:C||[],accountId:p,onChange:e=>r(_3(_3({},t),{},{tags:e.map(e=>e.value)}),{field:"tags"})})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(C3,{label:"Select locations (optional)",value:N||[],onChange:e=>r(_3(_3({},t),{},{locations:e.map(e=>e.value)}),{field:"locations"})})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{label:"Notes",value:t.notes||"",error:v,helperText:v&&"Notes can not contain more than 255 symbols",onChange:e=>{var n;x(!1),(null==e||null===(n=e.target)||void 0===n||null===(n=n.value)||void 0===n?void 0:n.length)>255?x(!0):r(_3(_3({},t),{},{notes:e.target.value}),{field:"notes"})}})})]})]})]})};var M3,V3;function z3(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const G3=(0,f.styled)("div")(M3||(M3=z3(["\n  margin-top: 32px;\n  display: flex;\n  gap: 16px;\n"]))),$3=(0,f.styled)(f.Button)(V3||(V3=z3(["\n  flex: 1;\n"])));function W3(e){let{onDismiss:n,heading:t,children:a,onSubmit:r,submitButtonTitle:i,isSubmitting:o,submitDisabled:l,showButtons:s=!0}=e;return(0,Ze.jsxs)(f.Modal,{open:!0,onClose:n,title:t,maxWidth:"1000px",children:[a,s&&(0,Ze.jsxs)(G3,{children:[(0,Ze.jsx)($3,{variant:"outlined",disabled:o,onClick:n,children:"Cancel"}),(0,Ze.jsx)($3,{variant:"contained",disabled:o||l,onClick:r,children:i})]})]})}const q3=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}/,J3=()=>e=>!e||q3.test(e)?void 0:"Invalid date";function Y3(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function H3(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Y3(Object(t),!0).forEach(function(n){K3(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Y3(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function K3(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Q3=J3(),Z3={supplierId:(e,n)=>{let{optional:t,suppliers:a}=n;const{supplierId:r}=e;if(!r)return t?null:"Supplier is required";if(k3(e)){var i;const n=null==a?void 0:a.get(r),t=null==n||null===(i=n.wasteCarrierLicenceDocument)||void 0===i?void 0:i.id;if(t&&t!==e.id)return"A valid licence already exists for this waste carrier"}return null},referenceId:(e,n)=>{let{referenceId:t}=e,{optional:a}=n;return t||a?null:"ID is required"},category:(e,n)=>{let{files:t}=n;return k3(e)&&((null==t?void 0:t.length)||0)>1?"You can upload only one file for the Waste Carrier Licence":null},startDate:e=>k3(e)?e.startDate?Q3(e.startDate)?"Start date is invalid":null:"Start date is required":null,expirationDate:e=>{if(!k3(e))return null;if(!e.expirationDate)return"Expiration date is required";if(Q3(e.expirationDate))return"Expiration date is invalid";const n=Wt()(e.expirationDate);if(n.isSameOrBefore(Wt()(),"day"))return"Expiration date must be in the future";if(!e.startDate)return null;const t=Wt()(e.startDate);return n.isSameOrBefore(t,"day")?"Expiration date must be after the start date":null}};function X3(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{field:t,optionals:a}=n,r={};return(t?[t]:Object.keys(Z3)).forEach(t=>{const i=Z3[t];i&&(r[t]=i(e,H3(H3({},n),{},{optional:a.includes(t)})))}),r}function e4(){const[e,n]=(0,g.useState)(),[t,a]=(0,g.useState)(!1),r=Pu();return{documentDetailsErrors:e,validateDocumentDetailsOnSubmit:(e,a)=>{const i=[],o=j3(e);(t||o)&&i.push("referenceId"),null!=r&&r.isSupplierRequiredForDocument||i.push("supplierId");const l=X3(e,H3(H3({},a),{},{optionals:i}));return n(l),0===Object.values(l).filter(e=>!!e).length},validateDocumentDetailsOnChange:(e,t)=>{let{field:i,value:o}=t;if(!i)return;const l=[];"shouldParse"===i&&(a(o),i="referenceId",o&&l.push("referenceId")),"supplierId"!==i||null!=r&&r.isSupplierRequiredForDocument||l.push("supplierId");const s=X3(e,H3(H3({},t),{},{optionals:l}));n(e=>H3(H3({},e),s))}}}function n4(){const[e,n]=(0,g.useState)(new Map);return{suppliers:e,addSuppliers:e=>n(n=>{const t=new Map(n);return e.forEach(e=>t.set(e.id,e)),t})}}function t4(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function a4(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?t4(Object(t),!0).forEach(function(n){r4(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):t4(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function r4(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i4(e){let{onComplete:n,onError:t,onDismiss:a,document:r,predefinedValues:i}=e;const o=rt(),l=ms(),[s,c]=(0,g.useState)(function(e){var n,t;return a4(a4({},e),{},{tags:null===(n=e.tags)||void 0===n?void 0:n.map(e=>{let{id:n}=e;return n}),locations:null===(t=e.locations)||void 0===t?void 0:t.map(e=>{let{id:n}=e;return n})})}(r)),[d,{loading:u}]=(0,Ot.n)(e3),p=jy(),{documentDetailsErrors:m,validateDocumentDetailsOnChange:f,validateDocumentDetailsOnSubmit:y}=e4(),{suppliers:b,addSuppliers:h}=n4();return(0,Ze.jsx)(W3,{heading:"Edit Document",onDismiss:a,submitButtonTitle:u?"Updating...":"Update",isSubmitting:u,onSubmit:async()=>{if(!y(s,{suppliers:b}))return;const e=j3(s);try{var a;const{data:t}=await d({variables:a4(a4(a4({},s),{},{notes:null===(a=s.notes)||void 0===a?void 0:a.trim(),accountId:o,userId:l,fileName:r.fileName},e?{referenceId:h3(r.fileName)}:{}),{},{supplierName:void 0})}),i=t.createDocumentRecord;if(i.folderId!==r.folderId){const e=[];i.folderId&&e.push(i.folderId),r.folderId&&e.push(r.folderId),p(e.map(e=>({fieldName:"getDocumentFolder",args:{accountId:o,id:e}})))}n(i)}catch(e){de.Cp(e),t(new Error("Document ".concat(r.fileName," failed to update"),{cause:e}))}},children:(0,Ze.jsx)(U3,{predefinedValues:i,relocatable:!0,document:s,onChange:(e,n)=>{f(e,a4(a4({},n),{},{suppliers:b})),c(e)},isSubmitting:u,errors:m,onSuppliersLoaded:h})})}var o4;const l4=(0,f.styled)("div")(o4||(o4=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-direction: column;\n  gap: 24px;\n  flex-grow: 1;\n  flex-shrink: 0;\n  border-radius: 16px;\n  background-color: ",";\n  padding: 16px;\n  min-height: 250px;\n"])),e=>e.theme.palette.grey[100]);function s4(e){let{onFiles:n,single:t}=e;return(0,Ze.jsxs)(l4,{children:[(0,Ze.jsx)(f.Icons.CloudUpload,{fontSize:"large"}),(0,Ze.jsx)(f.FileUploadButton,{multiple:!t,onFileUpload:n,accept:xr.allowedDocument.mimeType,children:"Select files"})]})}const c4=["customCategory","category","library","customLibrary"];var d4;function u4(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function p4(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u4(Object(t),!0).forEach(function(n){m4(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u4(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function m4(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const f4=(0,f.styled)("div")(d4||(d4=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n"])));const y4=(0,f.styled)(f.Text)(e=>{let{theme:n}=e;return{color:n.sys.color.error,width:"100%"}}),g4=(0,f.styled)(f.Text)(e=>{let{theme:n}=e;return{color:n.customColors.onSuccess.color,width:"100%"}});function b4(e){let{onDismiss:n,onError:t,onUpload:a,onComplete:r,onTerminate:i,predefinedValues:o,shouldParseIdFromFileName:l,single:s}=e;const[c,d]=(0,g.useState)([]),[u,p]=(0,g.useState)(0),[m,y]=(0,g.useState)(!1),[b,h]=(0,g.useState)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{customCategory:n,category:t,library:a,customLibrary:r}=e,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,c4);return p4({type:null,supplierId:null,reviewDate:null,referenceId:null,library:r?Vt.zM.Custom:a||null,category:(null==n?void 0:n.name)||t||null,folderId:(null==n?void 0:n.id)||null},i||{})}(o)),v=al(),[x]=(0,Ot.n)(e3),{token:T}=at(),O=rt(),{showNotification:k}=vt(),{documentDetailsErrors:j,validateDocumentDetailsOnChange:C,validateDocumentDetailsOnSubmit:S}=e4(),[N,w]=(0,g.useState)(),{suppliers:D,addSuppliers:A}=n4(),R=jy(),P=(0,g.useCallback)(async()=>{if(!S(b,{files:c,suppliers:D}))return;y(!0);const e=100/c.length,o=GU()(c,20);let l=u;const s=[],d=[],m=j3(b),f=new Map;for(const[n,r]of o.entries())await Promise.all(r.map(async n=>{const r=(0,Ai.A)(),i=n instanceof File,o=n.name;try{var c,u;i&&await v(O,r,n);const f=p4(p4({},b),{},{id:r,accountId:O,fileName:o,userId:T.sub,key:i?v3(O,r):null,link:i?null:n.link,source:i?br:"URL",referenceId:b.referenceId&&!m?b.referenceId:h3(o),notes:null===(c=b.notes)||void 0===c?void 0:c.trim(),supplierName:void 0});if(t&&d.length)return void d.forEach(e=>t(e));const y=await x({variables:f}),g=null==y||null===(u=y.data)||void 0===u?void 0:u.createDocumentRecord;g&&(s.push(g),a&&a("".concat(o," has been uploaded"),g)),p(l+=e)}catch(e){if(e instanceof tW.K4&&"DuplicateReferenceID"===e.message)return void f.set(n.name,"Reference ID already exists. Please rename the file and try again.");const a="string"==typeof e?e:e.message,r=new Error("Creation of ".concat(o," failed (").concat(a,")"));d.push(r),t&&t(r)}})),n!==o.length-1&&await new Promise(e=>setTimeout(e,15e3));if(s.length>0){const e=[];s[0].folderId&&e.push({fieldName:"getDocumentFolder",args:{accountId:O,id:s[0].folderId}}),R(e)}if(0===f.size&&n(),d.length&&t&&t(new Error("Unfortunately ".concat(d.length," of your uploads did not go through"))),f.size>0)w({failedFiles:f,succeededFiles:s.map(e=>{let{fileName:n}=e;return n})});else if(s.length>0){const e=(g=s.length===c.length,h=s.length,"".concat(g?"All files ":"","(").concat(h,") ").concat(g?"":"file".concat(0!==h&&"s"," "),"have been successfully uploaded."));r&&r(e,s,d),k(e,"success")}var g,h;null==i||i(s,d)},[c,u,n,t,b,O,T.sub,x,v,a,r,k,S]),L=bi()(u,2),I=N?N.succeededFiles.length>0?"Partially uploaded - ".concat(L,"%"):"Nothing uploaded":"Uploading... ".concat(L,"%");return(0,Ze.jsx)(W3,{onDismiss:n,heading:"Documents Upload",submitButtonTitle:"Upload",showButtons:!!c.length,submitDisabled:!b.library||!b.category,isSubmitting:m,onSubmit:P,children:(0,Ze.jsxs)(f.Grid,{container:!0,columns:12,rowGap:3,children:[c.length?c.map(e=>(0,Ze.jsxs)(f.Grid,{size:12,children:[(0,Ze.jsx)(R5,{fileName:e.name}),(null==N?void 0:N.failedFiles.has(e.name))&&(0,Ze.jsx)(y4,{children:null==N?void 0:N.failedFiles.get(e.name)}),(null==N?void 0:N.succeededFiles.includes(e.name))&&(0,Ze.jsx)(g4,{children:"Uploaded successfully!"})]},e.name)):(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(s4,{single:s,onFiles:e=>{d(e),e.length>0&&l&&h(p4(p4({},b),{},{referenceId:h3(e[0].name)}))}})}),!!c.length&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(U3,{document:b,predefinedValues:o,shouldParseIdFromFileName:l,onSuppliersLoaded:A,onChange:(e,n)=>{C(e,p4(p4({},n),{},{files:c,suppliers:D})),h(e)},errors:j})}),m&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsxs)(f4,{children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:I}),(0,Ze.jsx)(f.LinearProgress,{variant:"determinate",color:N?"error":void 0,value:bi()(u,2)})]})})]})})}function h4(e){let{supplier:n,onDismiss:t,onUploaded:a}=e;return(0,Ze.jsx)(b4,{single:!0,predefinedValues:{library:Vt.zM.Waste,category:Ma.DocumentCategory.WasteCarrierLicence,supplierId:n.id,supplierName:n.name},onDismiss:t,onUpload:a})}var v4,x4,T4,O4,k4;function j4(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function C4(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j4(Object(t),!0).forEach(function(n){S4(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j4(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function S4(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function N4(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const w4=(0,Ge.default)(e2)(v4||(v4=N4(["\n  background: ",";\n  border-bottom: 1px solid ",";\n  border-top: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.colors.overlay.light.background,e=>e.theme.colors.text.light.background,e=>e.theme.colors.text.light.background),D4=(0,Ge.default)(ze.$n)(x4||(x4=N4(["\n  width: 250px;\n  margin-left: ",";\n  cursor: po;\n"])),e=>e.theme.geometry.sm.spacing),A4=Ge.default.div(T4||(T4=N4(["\n  & > div {\n    overflow: auto;\n  }\n"]))),R4=Ge.default.div(O4||(O4=N4(["\n  width: 100%;\n  height: 100%;\n"]))),P4=Ge.default.div(k4||(k4=N4(["\n  padding: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),L4=(0,_1.A)({root:{justifyContent:"center"},scroller:{flexGrow:"0"}}),I4=()=>{const e=L4(),n=rt(),t=rc(),a={page:1,totalPages:0},[r,i]=(0,g.useState)(a),[o,l]=(0,g.useState)({createModal:{show:!1},updateModal:{id:""},selectedTags:[],notification:{message:null,color:null},shouldRefetch:!1,selectAll:!1,orderByDesc:!0,countryList:[],defaultCountry:null}),[s,c]=(0,g.useState)(0),[d,u]=(0,g.useState)(null),[p,m]=(0,g.useState)(null),f=k5[s],{countryList:y,allCountries:b}=ku(),{data:{suppliersGridSearch:v}}=(0,h.IT)(q1),x=n2(null==f?void 0:f.value),{data:T}=function(e){const n=(0,h.IT)(C5,{variables:{accountId:e}}),{data:{getMaterialsByAccountID:t=[]}={}}=n,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,S5);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?N5(Object(t),!0).forEach(function(n){w5(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N5(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({data:t},a)}(n),O=T.map(e=>{let{id:n,name:t}=e;return{label:t,value:n}}).sort(Oa("label")),k={accountId:d,page:r.page,pageSize:20,filterValue:v||null,orderDir:o.orderByDesc?"desc":"asc",filterBy:"name",utility:f.value,withWasteCarrierLicence:f.value===Vt.D_.Waste},j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(C4(C4({},o),{},{createModal:{show:!1},updateModal:{id:null},notification:{message:e.message,color:e.color,id:e.id}}))},C=(e,n,t,a,r,i,s,c,d)=>"create"===e?l(C4(C4({},o),{},{createModal:{show:!0}})):"update"===e?l(C4(C4({},o),{},{updateModal:{id:n,name:t,utility:a,address:r,type:i,materials:s,notes:c,accountId:d}})):void 0,S=()=>{l(e=>C4(C4({},e),{},{notification:{message:null,color:null,id:null}}))},{data:N,error:w,loading:D,refetch:A}=(0,h.IT)(U1,{variables:k,onCompleted:e=>{const n=r.page!==e.getSuppliers.page,t=r.totalPages!==e.getSuppliers.pageCount;(n||t)&&i({page:e.getSuppliers.page,totalPages:e.getSuppliers.pageCount})},fetchPolicy:"network-only",skip:!t});return(0,g.useEffect)(()=>{u(n)},[n]),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(ze.fv,{name:"ConfigurationMySuppliersContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{name:"ConfigurationMySuppliersContainer__Controls",icon:"parachute-box",iconColor:"primary",title:"Suppliers",children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(X_,{setPageMutation:W1,setSearchMutation:J1,hideButton:!0})}),(0,Ze.jsx)(D4,{name:"ConfigurationMySuppliersContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>C("create"),children:"+ Add Supplier"}),d&&(0,Ze.jsx)(O5,{accountId:d})]}),(e=>(0,Ze.jsxs)(g.Fragment,{children:[o.notification.message&&(0,Ze.jsxs)(ze.Eg,{name:"ConfigurationMySuppliersContainer__Notification",show:!0,color:"success",onClose:S,children:[o.notification.message,(0,Ze.jsx)("div",{hidden:!0,name:"ConfigurationMySuppliersContainer__Notification__createlocation_id",children:o.notification.id?o.notification.id[0]:null}),(0,Ze.jsx)("div",{hidden:!0,name:"ConfigurationMySuppliersContainer__Notification__createaddress_id",children:o.notification.id?o.notification.id[1]:null})]}),o.createModal.show&&(0,Ze.jsx)(ze.aF,{span:5,size:"md",show:!0,name:"ConfigurationMySuppliersContainer__Modal--create",dismissable:!0,onDismiss:j,children:(0,Ze.jsx)(W2,{onSuccess:(e,n,t,a)=>{j({message:e,color:n,id:t}),a.type.includes(Vt.d.Carrier)&&m(a)},accountId:n,countryList:y,refetchQuery:[{query:U1,variables:e}],utility:k5[s].value,heading:"Create ".concat(f.label," Supplier"),materialTypesOptions:O})}),o.updateModal.id&&(0,Ze.jsx)(ze.aF,{size:"md",show:!0,dismissable:!0,onDismiss:j,name:"ConfigurationMySuppliersContainer__Modal--update",children:(0,Ze.jsx)(r5,{supplierId:o.updateModal.id,notes:o.updateModal.notes,materials:o.updateModal.materials,accountId:o.updateModal.accountId,supplierName:o.updateModal.name,addressId:o.updateModal.address&&o.updateModal.address.id,address1:o.updateModal.address&&o.updateModal.address.address1,address2:o.updateModal.address&&o.updateModal.address.address2,address3:o.updateModal.address&&o.updateModal.address.address3,city:o.updateModal.address&&o.updateModal.address.city,postcode:o.updateModal.address&&o.updateModal.address.postcode,phone:o.updateModal.address&&o.updateModal.address.phone1,utility:o.updateModal.utility,onDismiss:j,onSuccess:(e,n,t)=>j({message:e,color:n,id:t}),countryList:y,defaultCountry:o.updateModal.address&&{value:o.updateModal.address.country.id,label:o.updateModal.address.country.name},allCountries:b,type:o.updateModal.type,materialTypesOptions:O})})]}))(k),t.account.includes("getAll")&&(0,Ze.jsx)(P4,{children:(0,Ze.jsx)(Kh,{value:d,onChange:e=>{let{id:n}=e;u(n)}})}),(0,Ze.jsx)(ze.tU,{classes:{root:e.root,scroller:e.scroller},variant:"scrollable",value:s,onChange:(e,n)=>{i(a),c(n)},children:k5.map(e=>(0,Ze.jsx)(ze.oz,{label:e.label},e.label+e.value))}),(0,Ze.jsx)(w4,{container:!0,children:x.map(e=>(0,Ze.jsx)(X1,{container:!0,item:!0,span:e.width,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:e.name})},e.name))}),k5.map((e,n)=>{return(0,Ze.jsx)(A4,{children:(0,Ze.jsx)(ze.Kp,{index:n,value:s,children:(0,Ze.jsx)(R4,{children:w?(0,Ze.jsx)(ze.Kw,{error:w,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationMySuppliersContainer__Error",icon:a,title:n,body:t,retry:()=>A()})}}):D?(0,Ze.jsx)(Vg,{name:"ConfigurationMySuppliersContainer__Loading"}):(a=N.getSuppliers,0===a.suppliers.length?(0,Ze.jsx)(nv,{name:"ConfigurationMySuppliersContainer__NoResults",title:"No Suppliers found"}):a.suppliers.map(e=>(0,Ze.jsx)(d2,{supplier:e,permissions:t,onEdit:()=>C("update",e.id,e.name,e.utility,e.address,e.type,e.materials,e.notes,e.accountId)},e.id)))})})},e.label+e.value);var a}),r.totalPages>1?(0,Ze.jsx)(J_,{totalPagesCount:r.totalPages,currentPage:r.page,onChange:e=>{i({page:e,totalPages:r.totalPages})}}):null]}),p&&(0,Ze.jsx)(h4,{supplier:p,onDismiss:()=>m(null),onUploaded:()=>{m(null),A()}})]})};var E4,_4,F4,B4,U4,M4,V4,z4;function G4(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $4=(0,D.J1)(E4||(E4=G4(["\n  fragment NormaliserFields on Normaliser {\n    id\n    name\n    description\n    quantity\n    accountId\n    locationId\n    location {\n      name\n    }\n    tagId\n    startDate\n    endDate\n    type {\n      id\n      name\n    }\n  }\n"]))),W4=(0,D.J1)(_4||(_4=G4(['\n  query GetNormalisersPage(\n    $accountId: ID!\n    $limit: Int = 25\n    $offset: Int = 0\n    $sort: [SortCommand!] = [{ field: "name", order: "asc" }]\n    $filters: Filters = {}\n  ) {\n    getNormalisersPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        ...NormaliserFields\n      }\n    }\n  }\n  ',"\n"])),$4),q4=(0,D.J1)(F4||(F4=G4(["\n  query GetNormalisersPageFilter($accountId: ID!, $field: String!) {\n    getNormalisersPageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"]))),J4=(0,D.J1)(B4||(B4=G4(["\n  query GetNormaliserById($id: ID!) {\n    getNormaliserById(id: $id) {\n      ...NormaliserFields\n    }\n  }\n  ","\n"])),$4),Y4=(0,D.J1)(U4||(U4=G4(["\n  mutation UpdateNormaliser(\n    $id: ID!\n    $name: String!\n    $description: String!\n    $quantity: Float!\n    $accountId: String!\n    $locationId: String\n    $startDate: String!\n    $endDate: String!\n    $tagId: String\n    $type: ID!\n  ) {\n    updateNormaliser(\n      input: {\n        id: $id\n        name: $name\n        description: $description\n        quantity: $quantity\n        accountId: $accountId\n        locationId: $locationId\n        startDate: $startDate\n        endDate: $endDate\n        tagId: $tagId\n        type: $type\n      }\n    ) {\n      ... on Normaliser {\n        ...NormaliserFields\n      }\n      ... on UpdateNormaliserError {\n        error\n      }\n    }\n  }\n  ","\n"])),$4),H4=(0,D.J1)(M4||(M4=G4(["\n  mutation CreateNormalisers($normalisers: [NormaliserInput!]!) {\n    createNormalisers(normalisers: $normalisers) {\n      ... on Normalisers {\n        normalisers {\n          ...NormaliserFields\n        }\n      }\n      ... on CreateNormalisersErrors {\n        errors\n      }\n    }\n  }\n  ","\n"])),$4),K4=(0,D.J1)(V4||(V4=G4(["\n  {\n    getNormaliserTypes {\n      id\n      name\n      scopes\n    }\n  }\n"]))),Q4=(0,D.J1)(z4||(z4=G4(["\n  query GetLocationById($id: ID!) {\n    getLocationById(id: $id) {\n      id\n      name\n    }\n  }\n"])));function Z4(e){return e.tagId?Ne:e.locationId?Ce:Se}var X4,e6;function n6(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function t6(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?n6(Object(t),!0).forEach(function(n){a6(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):n6(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function a6(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r6(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const i6=Ge.default.a(X4||(X4=r6(["\n  display: inline-block;\n  color: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.colors.text.dark.background),o6=Ge.default.div(e6||(e6=r6(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),l6=e=>{let{data:{id:n},onEdit:t,canEdit:a}=e;return(0,Ze.jsx)(o6,{children:a&&(0,Ze.jsx)(i6,{onClick:()=>t(n),children:(0,Ze.jsx)(ze.In,{name:"location-row__edit--".concat(n),icon:"pencil-alt"})})})};function s6(e){let{accountId:n,fetchRows:t,showModal:a,setGridApi:r}=e;const i=(0,N.m)(),o=Dd({autoFit:!0}),l=rc(),{showNotification:s}=vt(),c=Boolean(l.data.find(e=>e.startsWith("editNormaliser"))),d=async e=>{try{const{data:{getNormalisersPageFilter:t}}=await i.query({query:q4,variables:{accountId:n,field:e.colDef.colId}});e.success(t.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){s("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning"),e.success([])}},u={pagination:!0,paginationPageSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,cellStyle:{height:"auto"}},columnDefs:[{headerName:"Name",filter:"agTextColumnFilter",filterParams:{buttons:["reset","apply"],newRowsAction:"keep"},field:"name",resizable:!0,sortable:!0},{colId:"type",headerName:"Type",field:"type.name",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},resizable:!0,sortable:!0},{colId:"quantity",headerName:"Quantity",field:"quantity",filter:"agNumberColumnFilter",width:90,resizable:!0,sortable:!0},{colId:"scope",headerName:"Applied to",field:"scope",valueFormatter:e=>{let{data:n}=e;return Ae[Z4(n)]},filter:!1,width:100,resizable:!0,sortable:!0},{colId:"locationName",headerName:"Location",field:"location.name",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},resizable:!0,sortable:!0},{colId:"startDate",headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},width:110,resizable:!0,sortable:!0},{colId:"endDate",headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},width:110,resizable:!0,sortable:!0},{headerName:"Actions",cellRenderer:"action",filter:!1,width:80,resizable:!0,sortable:!1,hidden:!c}],rowStyle:{width:"100%",display:"flex",alignItems:"center"},rowHeight:58},p={action:e=>(0,Ze.jsx)(l6,t6(t6({},e),{},{onEdit:e=>a("update",e),canEdit:c}))},m={async getRows(e){try{const{startRow:a,sortModel:r,filterModel:i}=e.request,{rows:o,totalRows:l}=await t({accountId:n,offset:a||0,limit:u.paginationPageSize,sort:oa(r),filters:ia(i)});return e.success({rowData:o,rowCount:l}),{rows:o,totalRows:l}}catch(n){throw e.fail(),n}}};return(0,Ze.jsx)(nD,t6(t6({},u),{},{paginationPageSize:25,cacheBlockSize:25,onFirstDataRendered:o.onFirstDataRendered,onFilterChanged:o.onFilterChanged,onSortChanged:o.onSortChanged,onColumnVisible:o.onSaveGridColumnState,onColumnPinned:o.onSaveGridColumnState,onColumnResized:o.onSaveGridColumnState,onColumnMoved:o.onSaveGridColumnState,onColumnRowGroupChanged:o.onSaveGridColumnState,onColumnValueChanged:o.onSaveGridColumnState,onColumnPivotChanged:o.onSaveGridColumnState,components:p,onGridReady:e=>{o.onGridReady(e),r({api:e.api,datasource:m}),e.api.setGridOption("serverSideDatasource",m)}}))}var c6;const d6=(0,D.J1)(c6||(c6=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(['\n  query GetTags($accountId: String!) {\n    getTagsByAccountId(input: { accountId: $accountId, applicationId: "RIO" }) {\n      id\n      tagName\n      isSystemLevelTag\n    }\n  }\n'])));function u6(e){let{accountId:n,value:t,onChange:a,error:r,additionalOptions:i=[]}=e;const{data:o}=(0,h.IT)(d6,{variables:{accountId:n},fetchPolicy:"network-only"}),l=((null==o?void 0:o.getTagsByAccountId)||[]).map(e=>({value:e.id,label:e.tagName}));return(0,Ze.jsx)(ze.l6,{name:"tagId",placeholder:"Begin typing to find tags",value:t,options:[...i,...l],error:r,onChange:a})}var p6,m6,f6,y6,g6,b6;function h6(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const v6=(0,Ge.default)(ze.JU)(p6||(p6=h6(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),x6=Ge.default.div(m6||(m6=h6(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),T6=(0,Ge.default)(ze.DZ)(f6||(f6=h6(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),O6=(0,Ge.default)(ze.fv)(y6||(y6=h6(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),k6=(0,Ge.default)(ze.lr)(g6||(g6=h6(["\n  .DayPickerInput-Overlay {\n    top: -354px;\n    left: 50%;\n  }\n"]))),j6=(0,Ge.default)(ze.lr)(b6||(b6=h6(["\n  .DayPickerInput-Overlay {\n    top: -354px;\n    left: 50%;\n  }\n"]))),C6=function(e){var n;let{heading:t,accountId:a,isSubmitting:r,setValues:i,values:o,errors:l}=e;const{data:s}=(0,h.IT)(K4),c=(null==s||null===(n=s.getNormaliserTypes)||void 0===n?void 0:n.map(e=>{let{id:n,name:t,scopes:a}=e;return{label:t,value:n,scopes:a}}).sort(Oa("label")))||[],d=c.find(e=>{let{value:n}=e;return n===o.type}),u=Re.filter(e=>{let{value:n}=e;return null==d?void 0:d.scopes.includes(n)})||[],{data:p,loading:m}=(0,h.IT)(Q4,{variables:{id:o.locationId},skip:!o.locationId}),f=e=>{if(r)return;const n=e.target,t="select"===n.type?n.select.value:n.value;i({[e.target.name]:t})};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(T6,{size:"lg",children:t}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(O6,{item:!0,children:[(0,Ze.jsx)(x6,{children:(0,Ze.jsx)(v6,{children:"Normaliser Name"})}),(0,Ze.jsx)(ze.ks,{disabled:r,onChange:f,name:"name",value:o.name,error:l.name,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(O6,{item:!0,children:[(0,Ze.jsx)(x6,{children:(0,Ze.jsx)(v6,{children:"Normaliser Type"})}),(0,Ze.jsx)(ze.l6,{name:"type",disabled:r,onChange:e=>{f(e),c.find(n=>{let{value:t}=n;return t===e.target.select.value}).scopes.includes(o.scope)||i({scope:null})},value:o.type,error:l.type,options:c})]})}),!!o.type&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(O6,{item:!0,children:[(0,Ze.jsx)(x6,{children:(0,Ze.jsx)(v6,{children:"Normaliser Scope"})}),(0,Ze.jsx)(ze.l6,{name:"scope",disabled:r,onChange:e=>{f(e),e.target.select.value===Se&&i({locationId:null,tagId:null}),e.target.select.value===Ne&&i({locationId:null}),e.target.select.value===Ce&&i({tagId:null})},value:o.scope,error:l.scope,options:u})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(O6,{item:!0,children:[(0,Ze.jsx)(x6,{children:(0,Ze.jsx)(v6,{children:"Description"})}),(0,Ze.jsx)(ze.fs,{size:"lg",disabled:r,onChange:f,name:"description",value:o.description,error:l.description,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(O6,{item:!0,children:[(0,Ze.jsx)(x6,{children:(0,Ze.jsx)(v6,{children:"Quantity"})}),(0,Ze.jsx)(ze.ks,{type:"number",disabled:r,onChange:f,name:"quantity",value:o.quantity,error:l.quantity,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(O6,{item:!0,children:[(0,Ze.jsx)(x6,{children:(0,Ze.jsx)(v6,{children:"Start Date"})}),(0,Ze.jsx)(k6,{disabled:r,onDayClick:e=>{e&&f({target:{value:e,name:"startDate"}})},name:"startDate",selectedDate:o.startDate,disabledDatesAfter:o.endDate,error:l.startDate,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(O6,{item:!0,children:[(0,Ze.jsx)(x6,{children:(0,Ze.jsx)(v6,{children:"End Date"})}),(0,Ze.jsx)(j6,{disabled:r,onDayClick:e=>{e&&f({target:{value:e,name:"endDate"}})},name:"endDate",selectedDate:o.endDate,disabledDatesBefore:o.startDate,error:l.endDate,box:!0})]})}),o.scope===Ce&&!m&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(O6,{item:!0,children:[(0,Ze.jsx)(x6,{children:(0,Ze.jsx)(v6,{children:"Location"})}),(0,Ze.jsx)(nY,{accountId:a,value:o.locationId,onChange:f,error:l.locationId,disabled:r,selectedOption:null==p?void 0:p.getLocationById})]})}),o.scope===Ne&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(O6,{item:!0,children:[(0,Ze.jsx)(x6,{children:(0,Ze.jsx)(v6,{children:"Tag"})}),(0,Ze.jsx)(u6,{accountId:a,value:o.tagId,onChange:f,error:l.tagId,disabled:r})]})})]})};function S6(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function N6(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?S6(Object(t),!0).forEach(function(n){w6(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):S6(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function w6(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const D6={name:"",description:"",quantity:0,scope:Se,account:null,locationId:null,startDate:new Date,endDate:(()=>{const e=new Date;return e.setFullYear(e.getFullYear()+1),e})(),tagId:null,type:null},A6={name:null,description:null,quantity:null,scope:null,account:null,locationId:null,startDate:null,endDate:null,tagId:null,type:null};function R6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D6;const[n,t]=(0,g.useState)(e),[a,r]=(0,g.useState)(A6);return[n,e=>{t(n=>N6(N6({},n),e))},a,()=>{const e=function(e){const n={name:"Name must be specified",description:"Description must be specified",quantity:"Quantity must be specified",locationId:"Location must be specified",tagId:"Tag must be specified",startDate:"Start Date must be specified",endDate:"End Date must be specified",type:"Type must be specified",scope:"Scope must be specified"};return Object.keys(n).reduce((t,a)=>{if(!e[a]){const r="locationId"===a&&e.scope!==Ce,i="tagId"===a&&e.scope!==Ne;return r||i?t:N6(N6({},t),{},{[a]:n[a]})}return t},{})}(n),t=function(e){const n={};return e.startDate&&e.endDate&&e.startDate.getTime()>e.endDate.getTime()&&(n.endDate="End Date cannot be less than Start Date"),n}(n),a=N6(N6({},e),t);return r(a),!Object.keys(a).length}]}var P6,L6;function I6(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const E6=Ge.default.div(P6||(P6=I6(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),_6=(0,Ge.default)(ze.fv)(L6||(L6=I6(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),F6=function(e){let{accountId:n,showNotification:t}=e;const[a,r]=(0,g.useState)(!1),[i]=(0,Ot.n)(H4),[o,l,s,c]=R6();return(0,Ze.jsx)(E6,{name:"create-normaliser",children:(0,Ze.jsxs)("form",{name:"create-normaliser__form",onSubmit:async e=>{if(e.preventDefault(),c()&&!a){const e=(0,Ai.A)();try{var l;r(!0);const{data:a}=await i({variables:{normalisers:[{id:e,accountId:n,name:o.name,description:o.description,quantity:o.quantity,locationId:o.locationId,startDate:o.startDate?Xt(o.startDate,"YYYY-MM-DD HH:mm:ss"):null,endDate:o.endDate?Xt(o.endDate,"YYYY-MM-DD HH:mm:ss"):null,tagId:o.scope===Ne?o.tagId:null,type:o.type}]}}),s=null==a||null===(l=a.createNormalisers)||void 0===l?void 0:l.errors;s?t(s.join("\n"),"danger","create"):t("The Normaliser ".concat(o.name," has been created!"),"success")}catch(e){t("Something went wrong. If the problem persists, contact support.","danger")}finally{r(!1)}}},children:[(0,Ze.jsx)(C6,{setValues:l,values:o,errors:s,isSubmitting:a,heading:"Create Normaliser",accountId:n}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(_6,{item:!0,children:(0,Ze.jsx)(ze.$n,{name:"create-normaliser__button--create",color:"success",submit:!0,disabled:a,children:"Create Normaliser"})})})]})})};var B6,U6;function M6(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const V6=Ge.default.div(B6||(B6=M6(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),z6=(0,Ge.default)(ze.fv)(U6||(U6=M6(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),G6=function(e){let{id:n,accountId:t,showNotification:a}=e;const{values:r,setValues:i,errors:o,validate:l,loading:s}=function(e){const[n,t,a,r]=R6(),[i,o]=(0,g.useState)(!0),l=(0,N.m)();return(0,g.useEffect)(()=>{!async function(){const{data:n,error:a}=await l.query({query:J4,variables:{id:e}}).finally(()=>{o(!1)});if(!a&&n&&n.getNormaliserById){var r;const e=n.getNormaliserById,a=Z4(e);t(N6(N6({},e),{},{type:(null==e||null===(r=e.type)||void 0===r?void 0:r.id)||null,scope:a,startDate:e.startDate?ea(e.startDate):null,endDate:e.endDate?ea(e.endDate):null}))}}()},[e]),{values:n,setValues:t,errors:a,validate:r,loading:i}}(n),[c,d]=(0,g.useState)(!1),[u]=(0,Ot.n)(Y4);return(0,Ze.jsx)(V6,{name:"update-normaliser",children:s?(0,Ze.jsx)(Vg,{name:"ConfigurationNormaliserContainer__Loading"}):(0,Ze.jsxs)("form",{name:"update-normaliser__form",onSubmit:async e=>{if(e.preventDefault(),l()&&!c)try{var i;d(!0);const{data:e}=await u({variables:{id:n,accountId:t,name:r.name,description:r.description,quantity:r.quantity,locationId:r.locationId,startDate:r.startDate?Xt(r.startDate,"YYYY-MM-DD HH:mm:ss"):null,endDate:r.endDate?Xt(r.endDate,"YYYY-MM-DD HH:mm:ss"):null,tagId:r.scope===Ne?r.tagId:null,type:r.type}}),o=null==e||null===(i=e.updateNormaliser)||void 0===i?void 0:i.error;o?a(o,"danger","update"):a("The Normaliser ".concat(r.name," has been updated!"),"success")}catch(e){a("Something went wrong. If the problem persists, contact support.","danger")}finally{d(!1)}},children:[(0,Ze.jsx)(C6,{setValues:i,values:r,errors:o,isSubmitted:c,heading:"Update Normaliser",accountId:t}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(z6,{item:!0,children:(0,Ze.jsx)(ze.$n,{name:"update-normaliser__button--update",color:"success",submit:!0,disabled:c,children:"Update Normaliser"})})})]})})};var $6=t(40944),W6=t.n($6);const q6=["Name","Description","Quantity","Start Date","End Date","Location","Tag","Scope","Type"];function J6(e){let{accountId:n,showNotification:t,onDismiss:r}=e;const[i,o]=(0,g.useState)([]),[l,s]=(0,g.useState)(!1),c=(0,N.m)(),{data:d}=(0,h.IT)(K4),u=d?d.getNormaliserTypes:[];return(0,Ze.jsx)(VR,{template:{columns:q6,type:xR.Dynamic,fileName:"normalisers-upload"},isUploading:l,errors:i,onFileInput:async e=>{let[r]=e;s(!0);try{var i;const[e,l]=await async function(e,n,t,r){const[i,o]=await _r(e);if(i)return[["The file you provided is not a valid XLSX, XLS or CSV file"],null];const l=W6()(o.map(e=>e.Location)),{tags:s,locations:c}=await $R(n,t,l),d=function(e,n,t,r){const i=[];return e.length||i.push("Your spreadsheet is empty, please add some rows"),e.forEach((e,o)=>{const l=e.Scope||"",s=o+2,c=parseInt(e.Quantity,10),d=l.toUpperCase()===Ce,u=l.toUpperCase()===Ne,p=!e.Location,m=!e.Tag,f=r.map(e=>e.name);e.Name||i.push("Row ".concat(s,": Name should be defined")),e.Description||i.push("Row ".concat(s,": Description should be defined")),d&&p&&i.push("Row ".concat(s,": Location should be defined if the scope of the normaliser is location")),u&&m&&i.push("Row ".concat(s,": Tag should be defined if the scope of the normaliser is tag")),l.toUpperCase()in a||i.push("Row ".concat(s,": Column Scope should be one of: ").concat(Se,", ").concat(Ce," or ").concat(Ne)),!d||t[e.Location]||p||i.push("Row ".concat(s,": Location ").concat(e.Location," wasn't found in your account")),!u||n[e.Tag]||m||i.push("Row ".concat(s,": Tag ").concat(e.Tag," wasn't found in your account")),("number"!=typeof c||Number.isNaN(c))&&i.push("Row ".concat(s,": Quantity should be defined")),e.Type||i.push("Row ".concat(s,": Type should be defined and equal to one of: ").concat(f.join(", "))),"string"!=typeof e.Type||f.find(n=>n.toLowerCase()===e.Type.toLowerCase())||i.push("Row ".concat(s,": Type is not valid, should be one of: ").concat(f.join(", ")))}),i}(o,s,c,r);if(d.length)return[d,null];const u=o.map(e=>{const n=function(e){return"string"==typeof e.Scope?e.Scope.toUpperCase():Se}(e),a=c[e.Location],i=s[e.Tag],o=n===Ce&&a?a.id:null,l=n===Ne&&i?i.id:null;return{id:(0,Ai.A)(),accountId:t,locationId:o,tagId:l,name:e.Name,description:e.Description,quantity:parseInt(e.Quantity,10),startDate:e["Start Date"]?Ur(e["Start Date"]).format("YYYY-MM-DD 00:00:00"):null,endDate:e["End Date"]?Ur(e["End Date"]).format("YYYY-MM-DD 23:59:59"):null,type:r.find(n=>{let{name:t}=n;return t.toLowerCase()===e.Type.toLowerCase()}).id}});return[d,await n.mutate({mutation:H4,variables:{normalisers:u}})]}(r,c,n,u),d=(null==l||null===(i=l.data)||void 0===i||null===(i=i.createNormalisers)||void 0===i?void 0:i.errors)||e;o(d),s(!1),d.length||t("Your normalisers have been successfully uploaded!","success")}catch(e){t("Something went wrong, normalisers weren't uploaded. If the problem persists, contact support. ".concat(e),"danger")}},onDismiss:r})}var Y6,H6,K6,Q6;function Z6(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function X6(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z6(Object(t),!0).forEach(function(n){e7(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z6(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function e7(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function n7(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const t7=(0,Ge.default)(bh)(Y6||(Y6=n7(["\n  & > div {\n    width: auto;\n"]))),a7=(0,Ge.default)(ze.fv)(H6||(H6=n7(["\n  padding-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),r7=(0,Ge.default)(ze.$n)(K6||(K6=n7(["\n  width: 100%;\n"]))),i7=Ge.default.div(Q6||(Q6=n7(["\n  padding: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing);var o7=function(e){return e.create="create",e.update="update",e.upload="upload",e}(o7||{});const l7=function(e){let{accountId:n}=e;const[t,a]=(0,g.useState)({accountId:n,search:{value:""},createModal:{show:!1},updateModal:{id:"",show:!1},uploadModal:{id:"",show:!1},notification:{message:null,color:null}}),[r,i]=(0,g.useState)({}),o=rc(),l=(0,N.m)(),s=(0,g.useCallback)(()=>{var e;return null==r||null===(e=r.api)||void 0===e?void 0:e.refreshServerSide({purge:!0})},[r]);(0,g.useEffect)(()=>{var e,n;null==r||null===(e=r.api)||void 0===e||e.setColumnFilterModel("name",{filterType:"text",type:"contains",filter:t.search.value}),null===(n=r.api)||void 0===n||n.onFilterChanged()},[null==r?void 0:r.api,t.search.value]);const c=e=>{let{target:{value:n}}=e;a(e=>X6(X6({},e),{},{search:X6(X6({},e.search),{},{value:n})}))},d=(e,n)=>{e===o7.create&&a(e=>X6(X6({},e),{},{createModal:{show:!0}})),e===o7.update&&a(e=>X6(X6({},e),{},{updateModal:{id:n,show:!0}})),e===o7.upload&&a(e=>X6(X6({},e),{},{uploadModal:{id:"",show:!0}}))},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";a(a=>("function"==typeof n&&n(),X6(X6({},a),{},{createModal:{show:"create"===t},updateModal:{id:"",show:"update"===t},uploadModal:{id:"",show:!1},notification:{message:e.message||null,color:e.color||null}})))};return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationNormaliserContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(t7,{name:"ConfigurationNormaliserContainer__Controls",icon:"subscript",iconColor:"primary",title:"Normalisers",children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationNormaliserContainer__Controls__Search",value:t.search.value,onChange:c,onSearch:c,hideButton:!0})}),(0,Ze.jsx)(a7,{item:1,container:!0,children:(0,Ze.jsx)(r7,{name:"ConfigurationNormaliserContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>d(o7.create),children:"+ Add Normaliser"})}),(0,Ze.jsx)(a7,{item:2,container:!0,children:(0,Ze.jsx)(r7,{name:"ConfigurationNormaliserContainer__Controls__Button--upload",size:"md",color:"secondary",inline:!0,onClick:()=>d(o7.upload),children:"Upload Normalisers"})})]}),o.account.includes("getAll")&&(0,Ze.jsx)(i7,{children:(0,Ze.jsx)(Kh,{value:t.accountId,onChange:e=>{let{id:n}=e;return a(e=>X6(X6({},e),{},{accountId:n}))}})}),t.createModal.show&&(0,Ze.jsx)(ze.aF,{size:"md",show:!0,name:"ConfigurationNormaliserContainer__Modal--create",dismissable:!0,onDismiss:u,children:(0,Ze.jsx)(F6,{showNotification:(e,n,t)=>u({message:e,color:n},s,t),accountId:t.accountId})}),t.updateModal.show&&(0,Ze.jsx)(ze.aF,{size:"md",show:!0,name:"ConfigurationNormaliserContainer__Modal--create",dismissable:!0,onDismiss:u,children:(0,Ze.jsx)(G6,{id:t.updateModal.id,showNotification:(e,n,t)=>u({message:e,color:n},s,t),accountId:t.accountId})}),t.uploadModal.show&&(0,Ze.jsx)(J6,{showNotification:(e,n)=>u({message:e,color:n},s),accountId:t.accountId,onDismiss:u}),t.notification.message&&(0,Ze.jsx)(ze.Eg,{name:"ConfigurationNormaliserContainer__Notification",show:!0,color:t.notification.color,onClose:()=>{a(e=>X6(X6({},e),{},{notification:{message:"",color:null}}))},children:t.notification.message}),(0,Ze.jsx)(s6,{accountId:t.accountId,fetchRows:async e=>{!function(e){const n={field:"type",order:"asc"},t={field:"name",order:"asc"};Array.isArray(e.sort)?(e.sort.find(e=>"name"===e.field)||(e.sort=[t,...e.sort]),e.sort.find(e=>"type"===e.field)||(e.sort=[n,...e.sort])):e.sort=[n,t]}(e);const{data:{getNormalisersPage:{rows:n,totalRows:t}}}=await l.query({query:W4,variables:X6(X6({},e),{},{offset:e.offset||0,limit:e.limit||25}),fetchPolicy:"network-only"});return{rows:n,totalRows:t}},showModal:d,setGridApi:i},t.accountId)]})};var s7,c7;function d7(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const u7=Ge.default.div(s7||(s7=d7(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),p7=Ge.default.a(c7||(c7=d7(["\n  display: inline-block;\n  color: ",";\n  padding: 0 0 0 ",";\n  margin-right: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),m7=e=>{let{data:n,onEdit:t}=e;return(0,Ze.jsx)(u7,{children:(0,Ze.jsx)(p7,{onClick:()=>t(n),children:(0,Ze.jsx)(ze.In,{name:"alias-row__edit--".concat(null==n?void 0:n.id),icon:"pencil-alt"})})})};var f7;function y7(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function g7(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y7(Object(t),!0).forEach(function(n){b7(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y7(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function b7(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const h7=(0,Ge.default)(ze.fI)(f7||(f7=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n  display: flex;\n  height: 100%;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),v7=function(e){let{fetchRows:n,setGridApi:t,showModal:a}=e;const r=Dd({autoFit:!0}),i={action:e=>(0,Ze.jsx)(m7,g7(g7({},e),{},{onEdit:a}))},o={rowHeight:50,pagination:!0,paginationPageSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!1,filter:!0,cellStyle:{padding:"10px",height:"auto",wordBreak:"break-word",lineHeight:"20px"}},columnDefs:[{headerName:"Name",field:"name",filter:"agTextColumnFilter",minWidth:300},{headerName:"Aliased Name",field:"parentItem.name",filter:"agTextColumnFilter",minWidth:300},{headerName:"Actions",cellRenderer:"action",filter:!1,sortable:!1,minWidth:80}],rowStyle:{width:"100%",display:"flex",alignItems:"center"}};return(0,Ze.jsx)(h7,{children:(0,Ze.jsx)(nD,g7(g7({},o),{},{cacheBlockSize:o.paginationPageSize,onFirstDataRendered:r.onFirstDataRendered,onFilterChanged:r.onFilterChanged,onSortChanged:r.onSortChanged,onColumnVisible:r.onSaveGridColumnState,onColumnPinned:r.onSaveGridColumnState,onColumnResized:r.onSaveGridColumnState,onColumnMoved:r.onSaveGridColumnState,onColumnRowGroupChanged:r.onSaveGridColumnState,onColumnValueChanged:r.onSaveGridColumnState,onColumnPivotChanged:r.onSaveGridColumnState,components:i,onGridReady:e=>{r.onGridReady(e),t({api:e.api}),e.api.setGridOption("serverSideDatasource",{async getRows(e){let{request:t,fail:a,success:r}=e;try{const{startRow:e,sortModel:a,filterModel:i}=t,l=ia(i),{rows:s,totalRows:c}=await n({offset:e||0,limit:o.paginationPageSize,sort:oa(a),filters:l});return r({rowData:s,rowCount:c}),{rows:s,totalRows:c}}catch(e){throw a(),e}}})}}))})};var x7,T7,O7,k7,j7,C7,S7,N7,w7=t(40337),D7=t.n(w7),A7=t(18552),R7=t.n(A7),P7=t(70303),L7=t.n(P7),I7=t(28342),E7=t.n(I7);function _7(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const F7=(0,D.J1)(x7||(x7=_7(["\n  fragment aliasFragment on Alias {\n    id\n    name\n    parentId\n    aliasType\n    parentItem {\n      id\n      name\n    }\n  }\n"]))),B7=((0,D.J1)(T7||(T7=_7(["\n  mutation createAlias(\n    $id: ID!\n    $name: String!\n    $parentId: ID!\n    $accountId: ID!\n    $aliasType: AliasType!\n    $energyType: TransactionType\n  ) {\n    createAlias(\n      input: {\n        id: $id\n        name: $name\n        parentId: $parentId\n        accountId: $accountId\n        aliasType: $aliasType\n        energyType: $energyType\n      }\n    ) {\n      ...aliasFragment\n    }\n  }\n  ","\n"])),F7),(0,D.J1)(O7||(O7=_7(["\n  mutation createAliases($input: [AliasInput!]!) {\n    createAliases(input: $input) {\n      ...aliasFragment\n    }\n  }\n  ","\n"])),F7)),U7=((0,D.J1)(k7||(k7=_7(["\n  mutation updateAlias(\n    $id: ID!\n    $name: String!\n    $parentId: ID!\n    $accountId: ID!\n    $aliasType: AliasType!\n    $energyType: TransactionType\n  ) {\n    updateAlias(\n      input: {\n        id: $id\n        name: $name\n        parentId: $parentId\n        accountId: $accountId\n        aliasType: $aliasType\n        energyType: $energyType\n      }\n    ) {\n      ...aliasFragment\n    }\n  }\n  ","\n"])),F7),(0,D.J1)(j7||(j7=_7(["\n  mutation UpdateTransactionDataImportBatchStatus($id: ID!) {\n    updateTransactionDataImportBatchStatus(id: $id) {\n      id\n      status\n    }\n  }\n"])))),M7=(0,D.J1)(C7||(C7=_7(["\n  query getAliasByValueBatch($GetAliasBatchInput: AliasValueBatchInput!) {\n    getAliasByValueBatch(input: $GetAliasBatchInput) {\n      getParentResponses {\n        id\n        name\n        parentId\n        aliasType\n        parentItem {\n          id\n          name\n        }\n      }\n    }\n  }\n"]))),V7=(0,D.J1)(S7||(S7=_7(["\n  query GetDataImportBatchById($id: ID!) {\n    getDataImportBatchById(id: $id) {\n      id\n      errorsCount\n      fileName\n      status\n      failedReason\n      timeStamp\n      rowsUploaded\n      errors {\n        fieldName\n        value\n        rows\n        message\n        actionRequired\n        possibleAliases\n      }\n    }\n  }\n"]))),z7=(0,D.J1)(N7||(N7=_7(["\n  query getEnergySourceByAccountIdAndType(\n    $accountId: ID!\n    $type: TransactionType\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getEnergySourceByAccountIdAndType(\n      accountId: $accountId\n      type: $type\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        name\n        id\n        type {\n          name\n          id\n        }\n        locationPoint {\n          name\n          location {\n            id\n            name\n          }\n        }\n      }\n    }\n  }\n"])));var G7,$7,W7,q7,J7;function Y7(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const H7=(0,D.J1)(G7||(G7=Y7(["\n  fragment MarketCarbonConversionFactorFields on MarketCarbonConversionFactor {\n    id\n    supplierId\n    supplierName\n    tariff\n    renewablePercentage\n    isGlobal\n    accountIds\n    generationFactor\n    wellToTankForGenerationFactor\n    wellToTankForTransmissionAndDistributionFactor\n    transmissionAndDistributionFactor\n    startDate\n    endDate\n    reference\n    notes\n  }\n"]))),K7=(0,D.J1)($7||($7=Y7(["\n  query getMarketCarbonConversionFactors($accountId: ID) {\n    getMarketCarbonConversionFactors(accountId: $accountId) {\n      ...MarketCarbonConversionFactorFields\n    }\n  }\n  ","\n"])),H7),Q7=(0,D.J1)(W7||(W7=Y7(["\n  mutation createMarketCarbonConversionFactor($factor: MarketCarbonConversionFactorInput!) {\n    createMarketCarbonConversionFactor(factor: $factor) {\n      ...MarketCarbonConversionFactorFields\n    }\n  }\n  ","\n"])),H7),Z7=(0,D.J1)(q7||(q7=Y7(["\n  mutation editMarketCarbonConversionFactor($factor: MarketCarbonConversionFactorInput!) {\n    updateMarketCarbonConversionFactor(factor: $factor) {\n      ...MarketCarbonConversionFactorFields\n    }\n  }\n  ","\n"])),H7),X7=(0,D.J1)(J7||(J7=Y7(["\n  mutation deleteMarketCarbonConversionFactor($id: ID!) {\n    deleteMarketCarbonConversionFactor(id: $id) {\n      ...MarketCarbonConversionFactorFields\n    }\n  }\n  ","\n"])),H7);var e8,n8,t8,a8,r8,i8,o8=t(6323),l8=t.n(o8);function s8(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const c8=Ge.default.div(e8||(e8=s8(["\n  margin: ",";\n  display: flex;\n  flex-direction: column;\n"])),e=>e.theme.geometry.sm.spacing),d8=Ge.default.div(n8||(n8=s8(["\n  margin: ",";\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n"])),e=>e.theme.geometry.sm.spacing),u8=(0,Ge.default)(ze.JU)(t8||(t8=s8(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),p8=Ge.default.div(a8||(a8=s8(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),m8=(0,Ge.default)(ze.DZ)(r8||(r8=s8(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),f8=(0,Ge.default)(ze.fv)(i8||(i8=s8(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),y8=e=>{let{id:n,name:t}=e;return{value:n,label:t}},g8={WASTESTREAM:{query:E7(),accessor:"getWasteStreamsByAccountId.wasteStreams",mapFunction:y8},WASTEIN:{query:L7(),accessor:"getWasteInsByAccountId",mapFunction:y8},WASTEOUT:{query:R7(),accessor:"getWasteOutsByAccountId",mapFunction:y8},WASTETREATMENTPROCESS:{query:Sp,accessor:"getAllWasteTreatmentProcesses",mapFunction:y8},WASTECONTRACTOR:{query:D7(),accessor:"getAllWasteContractors",mapFunction:y8},WASTECARRIER:{query:l8(),accessor:"getSuppliers.suppliers",mapFunction:y8},CONTAINERTYPESIZE:{query:Np,accessor:"getContainerTypeSizePage.typeSizes",mapFunction:y8},METER:{ELECTRICITY:{query:z7,accessor:"getEnergySourceByAccountIdAndType.rows",mapFunction:y8},GAS:{query:z7,accessor:"getEnergySourceByAccountIdAndType.rows",mapFunction:y8},WATER:{query:z7,accessor:"getEnergySourceByAccountIdAndType.rows",mapFunction:y8}},LOCATIONPOINT:{query:Dp,accessor:"getLocationsPage.rows",mapFunction:y8},TRANSPORT:{query:Ip,accessor:"getAllTransportTypes",mapFunction:y8},FUELTYPE:{query:Ap,accessor:"getAllFuelTypes",mapFunction:y8},TRANSPORTFUELTYPE:{query:Rp,accessor:"getAllTransportFuelTypes",mapFunction:y8},TRANSPORTSUBTYPE:{query:Pp,accessor:"getAllTransportSubTypes",mapFunction:y8},JOURNEYTARGET:{query:Lp,accessor:"getAllJourneyTargets",mapFunction:y8},UNIT:{query:Ep,accessor:"getAllUnits",mapFunction:y8},ACCURACY:{query:_p,accessor:"getAllAccuracyTypes",mapFunction:y8},CURRENCY:{query:Fp,accessor:"getAllCurrencyTypes",mapFunction:y8},[Vt.VT.Tariff]:{query:K7,accessor:"getMarketCarbonConversionFactors",mapFunction:e=>({label:e.tariff,value:e.id})}},b8=(e,n)=>{if(!n)return e;const t=n.trim().toLowerCase();return e.filter(e=>e.label.trim().toLowerCase().includes(t))},h8=e=>{let{aliasData:n,onComplete:t}=e;const[a,r]=(0,g.useState)(""),[i,o]=(0,g.useState)(null),[l,s]=(0,g.useState)(!1),c=(0,N.m)(),d=rt(),u=rc(),{showNotification:p}=vt(),m=(0,g.useCallback)(()=>{p("Something went wrong! If the problem persists, please contact support.","danger")},[p]),f=(0,g.useCallback)(()=>{r(""),o(null),s(!1),p("Success! Your alias has been updated.","success"),t()},[r,o,s,p,t]),[y]=(0,Ot.n)(wp,{onCompleted:e=>f(e),onError:()=>m(),variables:{id:n.aliasId,name:a,parentId:null==i?void 0:i.value,accountId:n.accountId,aliasType:n.aliasType,energyType:null==n?void 0:n.energyType},refetchQueries:["GetAliasesPage"]}),{data:b,loading:v}=(0,h.IT)(jp,{notifyOnNetworkStatusChange:!0,variables:{aliasId:n.aliasId,accountId:n.accountId,aliasType:n.aliasType,energyType:null==n?void 0:n.energyType}});b&&!a&&(r(b.getAliasByIdAndType.name),o({label:b.getAliasByIdAndType.parentItem.name,value:b.getAliasByIdAndType.parentItem.id}));const[x]=(0,Ot.n)(Cp,{variables:{aliasId:n.aliasId,accountId:n.accountId,aliasType:n.aliasType},refetchQueries:["GetAliasesPage"]}),T=n.aliasType===Vt.VT.Meter?g8[n.aliasType][n.energyType]:g8[n.aliasType],O=!!u.data.find(e=>e.startsWith("deleteAlias"));return(0,Ze.jsxs)(c8,{children:[v&&(0,Ze.jsx)(d8,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})}),b&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(m8,{size:"lg",children:"Update Alias"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(f8,{item:!0,children:[(0,Ze.jsx)(p8,{children:(0,Ze.jsx)(u8,{children:"Name"})}),(0,Ze.jsx)(ze.ks,{name:"aliasedName",onChange:e=>r(e.target.value),value:a,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(f8,{item:!0,children:[(0,Ze.jsx)(p8,{children:(0,Ze.jsx)(u8,{children:"Aliased Name"})}),n.aliasType===Vt.VT.Locationpoint&&(0,Ze.jsx)(nY,{accountId:d,onChange:e=>o({label:e.target.select.label,value:e.target.select.value}),value:i}),n.aliasType===Vt.VT.Wastein&&(0,Ze.jsx)(iY,{accountId:d,onChange:e=>o({label:e.target.select.label,value:e.target.select.value}),value:i}),n.aliasType===Vt.VT.Wasteout&&(0,Ze.jsx)(aY,{accountId:d,onChange:e=>o({label:e.target.select.label,value:e.target.select.value}),value:i}),![Vt.VT.Locationpoint,Vt.VT.Wastein,Vt.VT.Wasteout].includes(n.aliasType)&&(0,Ze.jsx)(ze.l6,{name:"item-to-alias",onChange:e=>{o({label:e.target.select.label,value:e.target.select.value})},value:i,loadOptions:async e=>{try{const t=await c.query({query:T.query,variables:{filterValue:e,accountId:n.accountId,type:n.energyType}}),a=t.data?(e=>Gt().get(e,T.accessor).map(T.mapFunction))(t.data):[];return{options:b8(a,e)}}catch(e){console.error(e)}},debounceTimeout:1e3,defaultOptions:!0})]})}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsx)(f8,{item:!0,children:(0,Ze.jsx)(ze.$n,{name:"update-alias__button",color:"success",submit:!0,onClick:()=>{s(!0),y()},disabled:!i||!a||l,children:"Update Alias"})}),O&&(0,Ze.jsx)(f8,{item:!0,children:(0,Ze.jsx)(ze.$n,{name:"delete-alias__button",color:"danger",submit:!0,onClick:async()=>{if(window.confirm("Are you sure you want to delete this alias?"))try{s(!0),await x(),p("Alias has been deleted!","success"),s(!1),t()}catch(e){p("".concat(e.message),"danger")}},disabled:!i||!a||l,children:"Delete Alias"})})]})]})]})};var v8,x8,T8,O8,k8;function j8(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function C8(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j8(Object(t),!0).forEach(function(n){S8(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j8(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function S8(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function N8(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const w8=(0,Ge.default)(ze.tU)(v8||(v8=N8(["\n  &.MuiTabs-root {\n    min-height: 60px;\n  }\n"]))),D8=Ge.default.div(x8||(x8=N8(["\n  padding: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),A8=(0,Ge.default)(ze.fv)(T8||(T8=N8(["\n  display: flex;\n  height: 100%;\n"]))),R8=(0,Ge.default)(ze.fI)(O8||(O8=N8(["\n  display: flex;\n  flex: 1;\n  justify-content: center;\n  align-items: center;\n  width: 100%;\n  height: auto;\n"]))),P8=Ge.default.div(k8||(k8=N8(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"])));function L8(e){let{error:n,loading:t,showUpdateModal:a,setGridApi:r,fetchRows:i}=e;return n?(0,Ze.jsx)(ub,{error:n,retry:i}):t?(0,Ze.jsx)(P8,{children:(0,Ze.jsx)(ze.Ip,{})}):(0,Ze.jsx)(v7,{showModal:a,setGridApi:r,fetchRows:i})}function I8(e){var n,t,a;let{accountId:r,aliasTypes:i}=e;const o=(0,N.m)(),[l,s]=(0,g.useState)({}),c=rc(),[d,u]=(0,g.useState)(0),[p,m]=(0,g.useState)({accountId:r,updateModal:{alias:null},notification:{show:!1,color:"success",message:""}}),{loading:f,error:y}=function(e){let{accountId:n,aliasType:t,energyType:a}=e;const{data:{getAliasesPage:r=[]}={},loading:i,error:o,networkStatus:l,refetch:s}=(0,h.IT)(Bp,{variables:{accountId:n,aliasType:t,energyType:a},notifyOnNetworkStatusChange:!0,skip:!n});return{data:r,loading:i,error:o,networkStatus:l,refetch:s}}(r,null===(n=i[d])||void 0===n||n.aliasType,null===(t=i[d])||void 0===t||t.energyType),b=(0,g.useCallback)(()=>{var e;return null==l||null===(e=l.api)||void 0===e?void 0:e.refreshServerSide({purge:!0})},[l]),v=async e=>{const{data:{getAliasesPage:{rows:n,totalRows:t}}}=await o.query({query:Bp,variables:C8(C8({},e),{},{accountId:p.accountId,aliasType:i[d].aliasType,energyType:i[d].energyType||null}),fetchPolicy:"network-only",notifyOnNetworkStatusChange:!0});return{rows:n,totalRows:t}},x=e=>{m(n=>C8(C8({},n),{},{updateModal:{alias:e}}))},T=()=>{m(e=>C8(C8({},e),{},{updateModal:{alias:null}})),b()},O=(0,g.useCallback)(e=>{let{aliasType:n,energyType:t}=e;switch(t){case void 0:case void 0:case void 0:case void 0:case void 0:case void 0:case void 0:case"WATER":case"GAS":case"ELECTRICITY":case void 0:case void 0:case void 0:case void 0:case void 0:case void 0:case void 0:return(0,Ze.jsx)(L8,{showUpdateModal:x,setGridApi:s,fetchRows:v,loading:f,error:y});default:return null}},[i[d].aliasType,i[d].energyType]);return(0,Ze.jsxs)(A8,{children:[(0,Ze.jsx)(bh,{name:"ConfigurationContractorsContainer__Controls",icon:"link",iconColor:"primary",title:"Aliases",children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(MP,{fetchRows:v,gridApi:l.api,defaultExportFileName:"aliases",columnsToSkip:["Actions"],label:"Export Aliases"})})}),c.account.includes("getAll")&&(0,Ze.jsx)(D8,{children:(0,Ze.jsx)(Kh,{value:p.accountId,onChange:e=>{let{id:n}=e;return m(e=>C8(C8({},e),{},{accountId:n}))}})}),(0,Ze.jsx)(w8,{variant:"fullWidth",value:d,onChange:(e,n)=>u(n),children:i.map(e=>{let{label:n}=e;return(0,Ze.jsx)(ze.oz,{label:n},n)})}),(0,Ze.jsx)(R8,{children:(0,Ze.jsx)(ze.Kp,{value:d,index:d,children:(0,Ze.jsx)(O,{aliasType:i[d].aliasType,energyType:i[d].energyType})})}),(0,Ze.jsx)(ze.Eg,{name:"update-alias__notification",show:p.notification.show,color:p.notification.color,onClose:()=>{m(e=>C8(C8({},e),{},{notification:C8(C8({},e.notification),{},{show:!1})}))},children:p.notification.message}),p.updateModal.alias&&(0,Ze.jsx)(ze.aF,{size:"md",show:!0,name:"ConfigurationAliasContainer__Modal--update",dismissable:!0,onDismiss:T,height:"auto",maxHeight:"90vh",children:(0,Ze.jsx)(h8,{aliasData:{aliasId:p.updateModal.alias.id,typeId:null===(a=p.updateModal.alias)||void 0===a||null===(a=a.parentItem)||void 0===a?void 0:a.typeId,energyType:i[d].energyType,aliasType:i[d].aliasType,accountId:p.accountId},onComplete:T,triggerNotification:e=>{m(n=>C8(C8({},n),{},{notification:e}))}})})]})}const E8=[{aliasType:Vt.VT.Wastestream,label:"Waste Stream"},{aliasType:Vt.VT.Wastein,label:"Waste In Location"},{aliasType:Vt.VT.Wasteout,label:"Waste Out Location"},{aliasType:Vt.VT.Containertypesize,label:"Container Type"},{aliasType:Vt.VT.Wastetreatmentprocess,label:"Treatment Process"},{aliasType:Vt.VT.Wastecontractor,label:"Waste Contractor"},{aliasType:Vt.VT.Wastecarrier,label:"Waste Carrier"}],_8=function(e){let{accountId:n}=e;return(0,Ze.jsx)(I8,{accountId:n,aliasTypes:E8})},F8=[{aliasType:Vt.VT.Meter,energyType:"ELECTRICITY",label:"Electricity"},{aliasType:Vt.VT.Meter,energyType:"GAS",label:"Gas"},{aliasType:Vt.VT.Meter,energyType:"WATER",label:"Water"}],B8=function(e){let{accountId:n}=e;return(0,Ze.jsx)(I8,{accountId:n,aliasTypes:F8})},U8=[{aliasType:Vt.VT.Transportfueltype,label:"Transport Fuel Type"},{aliasType:Vt.VT.Transport,label:"Transport"},{aliasType:Vt.VT.Journeytarget,label:"Purpose"},{aliasType:Vt.VT.Transportsubtype,label:"Transport Subtype"}],M8=function(e){let{accountId:n}=e;return(0,Ze.jsx)(I8,{accountId:n,aliasTypes:U8})},V8=[{aliasType:Vt.VT.Locationpoint,label:"Location"}],z8=function(e){let{accountId:n}=e;return(0,Ze.jsx)(I8,{accountId:n,aliasTypes:V8})},G8=[{aliasType:Vt.VT.Tariff,label:"Tariffs"},{aliasType:Vt.VT.Fueltype,label:"Fuel Type"}],$8=function(e){let{accountId:n}=e;return(0,Ze.jsx)(I8,{accountId:n,aliasTypes:G8})};var W8,q8,J8;function Y8(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const H8=(0,Ge.default)(ze.fI)(W8||(W8=Y8(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),K8=(0,Ge.default)(ze.Y3)(q8||(q8=Y8(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),Q8=Ge.default.a(J8||(J8=Y8(["\n  display: inline-block;\n  color: ",";\n  padding: 0 "," 0 0;\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xxl.spacing,e=>e.theme.colors.text.dark.background),Z8=e=>{let{dashboardId:n,dashboardName:t,profileImage:a,onEdit:r}=e;return(0,Ze.jsxs)(H8,{name:"account-row--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(K8,{name:"account-row__profile-picture--".concat(n),src:a,size:"xs",accountName:t}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(n),size:"md",children:t})}),(0,Ze.jsx)(Q8,{onClick:r,children:(0,Ze.jsx)(ze.In,{name:"account-row__edit--".concat(n),icon:"pencil-alt"})})]})};var X8,e9,n9,t9;function a9(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const r9=(0,Ge.default)(ze.JU)(X8||(X8=a9(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),i9=Ge.default.div(e9||(e9=a9(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),o9=(0,Ge.default)(ze.DZ)(n9||(n9=a9(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),l9=(0,Ge.default)(ze.fv)(t9||(t9=a9(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),s9=[{value:"LEARN",label:"Engage"},{value:"COMPLY",label:"Comply"},{value:"DATA",label:"Data"},{value:"SURVEY",label:"Survey"}],c9=[{value:"COMPLY",label:"Comply"},{value:"ELECTRICITY",label:"Electricity"},{value:"GAS",label:"Gas"},{value:"INTEL",label:"Intelligence"},{value:"LEARN",label:"Engage"},{value:"MATERIALS",label:"Materials"},{value:"MIXED",label:"Mixed"},{value:"TRAVEL",label:"Travel"},{value:"WASTE",label:"Waste"},{value:"WATER",label:"Water"}],d9=[{value:Vt.qT.Quicksight,label:"Quicksight"},{value:Vt.qT.Custom,label:"Custom"}];class u9 extends g.Component{render(){return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(o9,{size:"lg",children:this.props.heading}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(l9,{item:!0,children:[(0,Ze.jsx)(i9,{children:(0,Ze.jsx)(r9,{children:"Dashboard Name"})}),(0,Ze.jsx)(ze.ks,{disabled:this.props.isSubmitted,onChange:this.props.handleChange,name:"dashboardName",value:this.props.values.dashboardName.text,error:this.props.values.dashboardName.error,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(l9,{item:!0,children:[(0,Ze.jsx)(i9,{children:(0,Ze.jsx)(r9,{children:"Description"})}),(0,Ze.jsx)(ze.fs,{size:"lg",disabled:this.props.isSubmitted,onChange:this.props.handleChange,name:"description",value:this.props.values.description.text,error:this.props.values.description.error,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(l9,{item:!0,children:[(0,Ze.jsx)(i9,{children:(0,Ze.jsx)(r9,{children:"Content Area"})}),(0,Ze.jsx)(ze.l6,{name:"area",disabled:this.props.isSubmitted,onChange:this.props.handleChange,value:this.props.values.area.text,error:this.props.values.area.error,options:s9})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(l9,{item:!0,children:[(0,Ze.jsx)(i9,{children:(0,Ze.jsx)(r9,{children:"Thumbnail Type"})}),(0,Ze.jsx)(ze.l6,{name:"thumbnail",disabled:this.props.isSubmitted,onChange:this.props.handleChange,value:this.props.values.thumbnail.text,error:this.props.values.thumbnail.error,options:c9})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(l9,{item:!0,children:[(0,Ze.jsx)(i9,{children:(0,Ze.jsx)(r9,{children:"Type"})}),(0,Ze.jsx)(ze.l6,{name:"provider",disabled:this.props.isSubmitted,onChange:this.props.handleChange,value:this.props.values.provider.text,error:this.props.values.provider.error,options:d9})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(l9,{item:!0,children:[(0,Ze.jsx)(i9,{children:(0,Ze.jsx)(r9,{children:"Quicksight Dashboard Id"})}),(0,Ze.jsx)(ze.ks,{disabled:this.props.isSubmitted,onChange:this.props.handleChange,name:"providerId",value:this.props.values.providerId.text,error:this.props.values.providerId.error,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(l9,{item:!0,children:[(0,Ze.jsx)(i9,{children:(0,Ze.jsx)(r9,{children:"Custom Dashboard Configuration"})}),(0,Ze.jsx)(ze.fs,{size:"lg",disabled:this.props.isSubmitted,onChange:this.props.handleChange,name:"customDashboardConfiguration",value:this.props.values.customDashboardConfiguration.text,error:this.props.values.customDashboardConfiguration.error,box:!0})]})})]})}}var p9,m9;function f9(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function y9(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f9(Object(t),!0).forEach(function(n){g9(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f9(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function g9(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function b9(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const h9=Ge.default.div(p9||(p9=b9(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),v9=(0,Ge.default)(ze.fv)(m9||(m9=b9(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing);class x9 extends g.Component{constructor(e){super(e),this.validateField=e=>""===e?"Field cannot be empty":null,this.hideNotification=()=>this.setState({notification:{message:null,color:null}}),this.handleChange=e=>{const n=e.target,t="select"===n.type?n.select.value:n.value;this.setState({values:y9(y9({},this.state.values),{},{[e.target.name]:{text:t,error:null}})})},this.handleCheckboxChange=e=>{this.setState({values:y9(y9({},this.state.values),{},{[e.target.name]:{text:e.target.checked,error:null}})})},this.handleSubmit=(e,n)=>{e.preventDefault();const t=this.state.values;if(t.dashboardName.error=this.validateField(t.dashboardName.text),t.description.error=this.validateField(t.description.text),t.area.error=this.validateField(t.area.text),t.customDashboardConfiguration.text)try{JSON.parse(this.state.values.customDashboardConfiguration.text)}catch(e){t.customDashboardConfiguration.error="Invalid JSON"}t.dashboardName.error||t.description.error||t.area.error||t.customDashboardConfiguration.error?this.setState({values:t}):(n({variables:{id:(0,Ai.A)(),name:this.state.values.dashboardName.text,description:this.state.values.description.text,area:this.state.values.area.text,thumbnail:this.state.values.thumbnail.text,provider:this.state.values.provider.text,providerId:this.state.values.providerId.text,sheets:this.state.values.customDashboardConfiguration.text?JSON.parse(this.state.values.customDashboardConfiguration.text):null}}),this.setState({isSubmitted:!0}))},this.onCreateComplete=()=>this.props.onSuccess("The dashboard ".concat(this.state.values.dashboardName.text,", has been created!"),"success"),this.onCreateError=()=>{this.setState({notification:{message:"Something went wrong. If the problem persists, contact support.",color:"danger"},hasError:!0,isSuccess:!1,isSubmitted:!1})},this.onCheckboxClick=e=>{this.setState({accessControls:y9(y9({},this.state.accessControls),{},{[e.target.name]:e.target.checked})})},this.state={hasError:!1,isSuccess:!1,values:{dashboardName:{text:"",error:""},description:{text:"",error:""},area:{text:"",error:""},thumbnail:{text:"",error:""},providerId:{text:"",error:""},customDashboardConfiguration:{text:"",error:""},provider:{text:Vt.qT.Quicksight,error:""}},notification:{message:"",color:"success",id:null},isSubmitted:!1}}render(){return(0,Ze.jsxs)(h9,{name:"create-dashboard",children:[this.state.notification.message&&(0,Ze.jsxs)(ze.Eg,{name:"create-dashboard__notification",show:!0,color:this.state.notification.color,onClose:this.hideNotification,children:[this.state.notification.message,this.state.notification.id&&(0,Ze.jsx)("p",{name:"create-dashboard__id",style:{display:"none"},children:this.state.notification.id})]}),(0,Ze.jsx)(Qe.s,{mutation:nI,onCompleted:this.onCreateComplete,onError:this.onCreateError,children:e=>(0,Ze.jsxs)("form",{name:"create-dashboard__form",onSubmit:n=>{this.handleSubmit(n,e)},children:[(0,Ze.jsx)(u9,{handleChange:this.handleChange,handleCheckboxChange:this.handleCheckboxChange,values:this.state.values,isSubmitted:this.state.isSubmitted,heading:"Create Dashboard"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(v9,{item:!0,children:(0,Ze.jsx)(ze.$n,{name:"create-dashboard__button--create",color:"success",submit:!0,disabled:!this.state.values.dashboardName.text||this.state.isSubmitted,children:"Create Dashboard"})})})]})})]})}}const T9=x9;var O9,k9;function j9(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function C9(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j9(Object(t),!0).forEach(function(n){S9(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j9(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function S9(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function N9(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const w9=Ge.default.div(O9||(O9=N9(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),D9=(0,Ge.default)(ze.fv)(k9||(k9=N9(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing);class A9 extends g.Component{constructor(e){super(e),this.validateField=e=>""===e?"Field cannot be empty":null,this.hideNotification=()=>this.setState({notification:{message:null,color:null}}),this.handleChange=e=>{const n=e.target,t="select"===n.type?n.select.value:n.value;this.setState({values:C9(C9({},this.state.values),{},{[e.target.name]:{text:t,error:null}})})},this.handleCheckboxChange=e=>{this.setState({values:C9(C9({},this.state.values),{},{[e.target.name]:{text:e.target.checked,error:null}})})},this.handleSubmit=(e,n)=>{e.preventDefault();const t=this.state.values;if(t.dashboardName.error=this.validateField(t.dashboardName.text),t.description.error=this.validateField(t.description.text),t.provider.error=this.validateField(t.provider.text),t.area.error=this.validateField(t.area.text),t.customDashboardConfiguration.text)try{JSON.parse(this.state.values.customDashboardConfiguration.text)}catch(e){t.customDashboardConfiguration.error="Invalid JSON"}t.dashboardName.error||t.description.error||t.area.error||t.customDashboardConfiguration.error?this.setState({values:t}):(n({variables:{id:this.props.id,name:this.state.values.dashboardName.text,description:this.state.values.description.text,area:this.state.values.area.text,thumbnail:this.state.values.thumbnail.text,provider:this.state.values.provider.text,providerId:this.state.values.providerId.text,sheets:this.state.values.customDashboardConfiguration.text?JSON.parse(this.state.values.customDashboardConfiguration.text):null}}),this.setState({isSubmitted:!0}))},this.onUpdateComplete=()=>this.props.onSuccess("The dashboard ".concat(this.state.values.dashboardName.text,", has been updated!"),"success"),this.onUpdateError=()=>{this.setState({notification:{message:"Something went wrong. If the problem persists, contact support.",color:"danger"},hasError:!0,isSuccess:!1,isSubmitted:!1})},this.onCheckboxClick=e=>{this.setState({accessControls:C9(C9({},this.state.accessControls),{},{[e.target.name]:e.target.checked})})},this.state={hasError:!1,isSuccess:!1,loading:!0,values:{dashboardName:{text:"",error:""},description:{text:"",error:""},provider:{text:"",error:""},area:{text:"",error:""},thumbnail:{text:"",error:""},providerId:{text:"",error:""},customDashboardConfiguration:{text:"",error:""},type:{text:"",error:""}},notification:{message:"",color:"success",id:null},isSubmitted:!1}}async componentDidMount(){const e=await this.props.client.query({query:eI,variables:{id:this.props.id}});this.setState({loading:!1,values:{dashboardName:{text:e.data.getDashboard.name,error:""},description:{text:e.data.getDashboard.description,error:""},provider:{text:e.data.getDashboard.provider,error:""},area:{text:e.data.getDashboard.area,error:""},thumbnail:{text:e.data.getDashboard.thumbnailType,error:""},providerId:{text:e.data.getDashboard.providerDashboardId,error:""},provider:{text:e.data.getDashboard.provider,error:""},customDashboardConfiguration:{text:e.data.getDashboard.sheets?JSON.stringify(nl(e.data.getDashboard.sheets)):"",error:""}}})}render(){return(0,Ze.jsxs)(Ze.Fragment,{children:[this.state.loading&&(0,Ze.jsx)(Vg,{name:"ConfigurationDashboardsContainer__Loading"}),!this.state.loading&&(0,Ze.jsxs)(w9,{name:"update-dashboard",children:[this.state.notification.message&&(0,Ze.jsxs)(ze.Eg,{name:"update-dashboard__notification",show:!0,color:this.state.notification.color,onClose:this.hideNotification,children:[this.state.notification.message,this.state.notification.id&&(0,Ze.jsx)("p",{name:"update-dashboard__id",style:{display:"none"},children:this.state.notification.id})]}),(0,Ze.jsx)(Qe.s,{mutation:tI,onCompleted:this.onUpdateComplete,onError:this.onUpdateError,children:e=>(0,Ze.jsxs)("form",{name:"update-dashboard__form",onSubmit:n=>{this.handleSubmit(n,e)},children:[(0,Ze.jsx)(u9,{handleChange:this.handleChange,handleCheckboxChange:this.handleCheckboxChange,values:this.state.values,isSubmitted:this.state.isSubmitted,heading:"Update Dashboard"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(D9,{item:!0,children:(0,Ze.jsx)(ze.$n,{name:"update-dashboard__button--update",color:"success",submit:!0,disabled:!this.state.values.dashboardName.text||this.state.isSubmitted,children:"Update Dashboard"})})})]})})]})]})}}const R9=(0,Ib.W)(A9);var P9;function L9(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function I9(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L9(Object(t),!0).forEach(function(n){E9(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L9(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function E9(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const _9=(0,Ge.default)(ze.$n)(P9||(P9=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing);class F9 extends g.Component{constructor(e){var n;super(e),n=this,this.handleSearchChange=e=>this.setState({search:I9(I9({},this.state.search),{},{value:e.target.value})}),this.search=(e,n)=>{if(!n)return e;const t=new gf.vj("id");return t.addIndex("name"),t.addIndex("provider"),t.addIndex("area"),t.addDocuments(e),t.search(n)},this.showModal=(e,n)=>"create"===e?this.setState({createModal:{show:!0}}):"update"===e?this.setState({updateModal:{id:n}}):void 0,this.dismissModals=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};n.setState({createModal:{show:!1},updateModal:{id:""},notification:{message:e.message,color:e.color}},t)},this.state={search:{value:"",error:""},createModal:{show:!1},updateModal:{id:""},notification:{message:null,color:null}}}render(){return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{name:"ConfigurationAccountsContainer__Controls",icon:"tachometer-alt",iconColor:"primary",title:"Dashboards",children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationAccountsContainer__Controls__Search",value:this.state.search.value,onChange:this.handleSearchChange,hideButton:!0})}),(0,Ze.jsx)(_9,{name:"ConfigurationAccountsContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>this.showModal("create"),children:"+ Add Dashboard"})]}),(0,Ze.jsx)(qb.X,{query:XL,children:e=>{let{loading:n,error:t,data:a,refetch:r,networkStatus:i}=e;if(this.state.shouldRefetch&&this.setState({shouldRefetch:!1},r),n&&3!==i||4===i)return(0,Ze.jsx)(Vg,{name:"ConfigurationDashboardsContainer__Loading"});if(t)return(0,Ze.jsx)(ze.Kw,{error:t,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationDashboardsContainer__Error",icon:a,title:n,body:t,retry:r})}});const o=this.search(a.getAllDashboards,this.state.search.value);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(Ze.Fragment,{children:[this.state.createModal.show&&(0,Ze.jsx)(ze.aF,{size:"sm",show:!0,name:"ConfigurationDashboardsContainer__Modal--create",dismissable:!0,onDismiss:this.dismissModals,span:4,children:(0,Ze.jsx)(T9,{onSuccess:(e,n)=>this.dismissModals({message:e,color:n},r)})}),this.state.updateModal.id&&(0,Ze.jsx)(ze.aF,{size:"sm",show:!0,name:"ConfigurationDashboardsContainer__Modal--create",dismissable:!0,onDismiss:this.dismissModals,span:4,children:(0,Ze.jsx)(R9,{id:this.state.updateModal.id,onSuccess:(e,n)=>this.dismissModals({message:e,color:n},r)})}),this.state.notification.message&&(0,Ze.jsx)(ze.Eg,{name:"ConfigurationDashboardsContainer__Notification",show:!0,color:"success",onClose:this.hideNotification,children:this.state.notification.message})]}),(0,Ze.jsxs)(Ze.Fragment,{children:[!o.length&&(0,Ze.jsx)(nv,{name:"ConfigurationDashboardsContainer__NoResults",title:"There are no results for this search."}),!!o.length&&o.slice().sort((e,n)=>ka(e.name,n.name)).map(e=>(0,Ze.jsx)(Z8,{dashboardId:e.id,dashboardName:e.name,onEdit:()=>this.showModal("update",e.id)},e.id))]})]})}})]})}}const B9=F9;var U9,M9,V9;function z9(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const G9=(0,D.J1)(U9||(U9=z9(["\n  query GetAllKnowledgeBases {\n    getAllKnowledgeBases {\n      id\n      externalID\n      title\n      synopsis\n      demoMode\n    }\n  }\n"]))),$9=(0,D.J1)(M9||(M9=z9(["\n  mutation CreateKnowledgeBase($details: KnowledgeBaseDetailsInput!) {\n    createKnowledgeBase(input: $details) {\n      id\n      externalID\n      title\n      synopsis\n      demoMode\n    }\n  }\n"]))),W9=(0,D.J1)(V9||(V9=z9(["\n  mutation UpdateKnowledgeBase($details: KnowledgeBaseDetailsInput!) {\n    updateKnowledgeBase(input: $details) {\n      id\n      externalID\n      title\n      synopsis\n      demoMode\n    }\n  }\n"])));var q9,J9,Y9;function H9(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const K9=(0,Ge.default)(ze.fI)(q9||(q9=H9(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),Q9=(0,Ge.default)(ze.Y3)(J9||(J9=H9(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),Z9=Ge.default.a(Y9||(Y9=H9(["\n  display: inline-block;\n  color: ",";\n  padding: 0 "," 0 0;\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xxl.spacing,e=>e.theme.colors.text.dark.background),X9=e=>{let{kb:n,onEdit:t}=e;return(0,Ze.jsxs)(K9,{name:"kb-row--".concat(n.id),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(Q9,{name:"kb-row__profile-picture--".concat(n.id),size:"xs",accountName:n.title}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"kb-row__tile",size:"md",children:n.title})}),(0,Ze.jsx)(Z9,{onClick:t,children:(0,Ze.jsx)(ze.In,{name:"kb-row__edit",icon:"pencil-alt"})})]})};var eee,nee,tee,aee;function ree(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function iee(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ree(Object(t),!0).forEach(function(n){oee(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ree(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function oee(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function lee(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const see=(0,Ge.default)(ze.JU)(eee||(eee=lee(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),cee=Ge.default.div(nee||(nee=lee(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),dee=(0,Ge.default)(ze.DZ)(tee||(tee=lee(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),uee=(0,Ge.default)(ze.fv)(aee||(aee=lee(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),pee=e=>{let{heading:n,knowledgeBase:t,setKnowledgeBase:a}=e;const r=e=>{let n=e.target.value;"demoMode"===e.target.name&&(n=!t.demoMode),a(iee(iee({},t),{},{[e.target.name]:n}))};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(dee,{size:"lg",children:n}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(uee,{item:!0,children:[(0,Ze.jsx)(cee,{children:(0,Ze.jsx)(see,{children:"Title"})}),(0,Ze.jsx)(ze.ks,{onChange:r,name:"title",value:t.title,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(uee,{item:!0,children:[(0,Ze.jsx)(cee,{children:(0,Ze.jsx)(see,{children:"Description"})}),(0,Ze.jsx)(ze.fs,{onChange:r,name:"synopsis",value:t.synopsis,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(uee,{item:!0,children:[(0,Ze.jsx)(cee,{children:(0,Ze.jsx)(see,{children:"External ID (Builder Public Token)"})}),(0,Ze.jsx)(ze.ks,{onChange:r,name:"externalID",value:t.externalID,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(uee,{item:!0,children:[(0,Ze.jsx)(cee,{children:(0,Ze.jsx)(see,{children:"Demo Mode (Only visible in Rio ESG owned accounts)"})}),(0,Ze.jsx)(ze.Sc,{onChange:r,name:"demoMode",checked:t.demoMode})]})})]})};var mee,fee;function yee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gee(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yee(Object(t),!0).forEach(function(n){bee(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yee(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function bee(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function hee(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const vee=Ge.default.div(mee||(mee=hee(["\n  padding: 20px;\n"]))),xee=(0,Ge.default)(ze.fv)(fee||(fee=hee(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Tee=e=>{let{onDismiss:n,onComplete:t}=e;const[a]=(0,Ot.n)($9,{onCompleted:()=>{t("Knowledge Base has been created.","success"),n()},onError:()=>{t("Something went wrong! Please try again later.","danger")}}),[r,i]=(0,g.useState)({title:"",synopsis:"",externalID:"",demoMode:!1});return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,onDismiss:()=>n(),height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(vee,{children:[(0,Ze.jsx)(pee,{heading:"Create New Knowledge Base",knowledgeBase:r,setKnowledgeBase:i}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(xee,{item:!0,children:(0,Ze.jsx)(ze.$n,{disabled:(r.title,r.synopsis,!r.externalID),onClick:()=>{a({variables:{details:gee({id:(0,Ai.A)()},r)},refetchQueries:["GetAllKnowledgeBases"]})},children:"Submit"})})})]})})};var Oee,kee;function jee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Cee(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jee(Object(t),!0).forEach(function(n){See(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jee(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function See(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Nee(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const wee=Ge.default.div(Oee||(Oee=Nee(["\n  padding: 20px;\n"]))),Dee=(0,Ge.default)(ze.fv)(kee||(kee=Nee(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Aee=e=>{let{onDismiss:n,onComplete:t,selectedKb:a}=e;const[r]=(0,Ot.n)(W9,{onCompleted:()=>{t("Knowledge Base has been updated.","success"),n()},onError:()=>{t("Something went wrong! Please try again later.","danger")}}),[i,o]=(0,g.useState)(a);return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,onDismiss:()=>n(),height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(wee,{children:[(0,Ze.jsx)(pee,{heading:"Update Knowledge Base",knowledgeBase:i,setKnowledgeBase:o}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(Dee,{item:!0,children:(0,Ze.jsx)(ze.$n,{disabled:(i.title,i.synopsis,!i.externalID),onClick:()=>{r({variables:{details:Cee({id:(0,Ai.A)()},i)},refetchQueries:["GetAllKnowledgeBases"]})},children:"Submit"})})})]})})};var Ree,Pee;function Lee(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Iee=(0,Ge.default)(ze.$n)(Ree||(Ree=Lee(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),Eee=Ge.default.div(Pee||(Pee=Lee(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),_ee=()=>{const[e,n]=(0,g.useState)(!1),[t,a]=(0,g.useState)(""),[r,i]=(0,g.useState)(null),{showNotification:o}=vt(),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(G9),[u,p,m]=hf((null==l?void 0:l.getAllKnowledgeBases)||[],["title"]);return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationKbContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{name:"ConfigurationKbContainer__Controls",icon:"brain",iconColor:"primary",title:"Knowledge Bases",children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationKbContainer__Controls__Search",value:u,onChange:e=>p(e.target.value),hideButton:!0})}),(0,Ze.jsx)(Iee,{name:"ConfigurationKbContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>n(!0),children:"+ Add KB"})]}),s&&(0,Ze.jsx)(Eee,{children:(0,Ze.jsx)(ze.Ip,{})}),c&&(0,Ze.jsx)(ub,{error:c,retry:d}),e&&(0,Ze.jsx)(Tee,{onComplete:o,onDismiss:()=>n(!1)}),t&&(0,Ze.jsx)(Aee,{onComplete:o,onDismiss:()=>a(!1),selectedKb:r}),!s&&!c&&!m.length&&(0,Ze.jsx)(nv,{name:"ConfigurationKbsContainer__NoResults",title:"There are no results for this search."}),!s&&!!m.length&&m.slice().sort((e,n)=>ka(e.title,n.title)).map(e=>(0,Ze.jsx)(X9,{kb:e,onEdit:()=>{i(e),a(!0)}},e.id))]})};var Fee,Bee,Uee;function Mee(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Vee=(0,D.J1)(Fee||(Fee=Mee(["\n  query GetAllTemplates {\n    getAllTemplates {\n      id\n      name\n      parserId\n    }\n  }\n"]))),zee=(0,D.J1)(Bee||(Bee=Mee(["\n  mutation CreateTemplate($id: ID!, $name: String!, $parserId: String!) {\n    createTemplate(input: { id: $id, name: $name, parserId: $parserId }) {\n      id\n      name\n      parserId\n    }\n  }\n"]))),Gee=(0,D.J1)(Uee||(Uee=Mee(["\n  mutation UpdateTemplate($id: ID!, $name: String!, $parserId: String!) {\n    updateTemplate(input: { id: $id, name: $name, parserId: $parserId }) {\n      id\n      name\n      parserId\n    }\n  }\n"])));var $ee,Wee,qee;function Jee(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Yee=(0,Ge.default)(ze.fI)($ee||($ee=Jee(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),Hee=(0,Ge.default)(ze.Y3)(Wee||(Wee=Jee(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),Kee=Ge.default.a(qee||(qee=Jee(["\n  display: inline-block;\n  color: ",";\n  padding: 0 "," 0 0;\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xxl.spacing,e=>e.theme.colors.text.dark.background),Qee=e=>{let{template:n,onEdit:t}=e;return(0,Ze.jsxs)(Yee,{name:"template-row--".concat(n.id),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(Hee,{name:"template-row__profile-picture--".concat(n.id),size:"xs",accountName:n.name}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"template-row__name",size:"md",children:n.name})}),(0,Ze.jsx)(Kee,{onClick:t,children:(0,Ze.jsx)(ze.In,{name:"template-row__edit",icon:"pencil-alt"})})]})};var Zee,Xee,ene,nne;function tne(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ane(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tne(Object(t),!0).forEach(function(n){rne(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tne(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rne(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ine(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const one=(0,Ge.default)(ze.JU)(Zee||(Zee=ine(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),lne=Ge.default.div(Xee||(Xee=ine(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),sne=(0,Ge.default)(ze.DZ)(ene||(ene=ine(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),cne=(0,Ge.default)(ze.fv)(nne||(nne=ine(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),dne=e=>{let{heading:n,template:t,setTemplate:a}=e;const r=e=>{a(ane(ane({},t),{},{[e.target.name]:e.target.value}))};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(sne,{size:"lg",children:n}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(cne,{item:!0,children:[(0,Ze.jsx)(lne,{children:(0,Ze.jsx)(one,{children:"Template Name"})}),(0,Ze.jsx)(ze.ks,{onChange:r,name:"name",value:t.name,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(cne,{item:!0,children:[(0,Ze.jsx)(lne,{children:(0,Ze.jsx)(one,{children:"Doc Parser ID"})}),(0,Ze.jsx)(ze.ks,{onChange:r,name:"parserId",value:t.parserId,box:!0})]})})]})};var une,pne;function mne(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function fne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mne(Object(t),!0).forEach(function(n){yne(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mne(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function yne(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function gne(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const bne=Ge.default.div(une||(une=gne(["\n  padding: 20px;\n"]))),hne=(0,Ge.default)(ze.fv)(pne||(pne=gne(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),vne=e=>{let{onDismiss:n,onComplete:t}=e;const[a]=(0,Ot.n)(zee,{onCompleted:()=>{t({message:"Template has been created.",colour:"success"}),n()},onError:()=>{t({message:"Something went wrong! Please try again later.",colour:"danger"})}}),[r,i]=(0,g.useState)({name:"",parserId:""});return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,onDismiss:()=>n(),height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(bne,{children:[(0,Ze.jsx)(dne,{heading:"Create New Template",template:r,setTemplate:i}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(hne,{item:!0,children:(0,Ze.jsx)(ze.$n,{disabled:(r.name,!r.parserId),onClick:()=>{a({variables:fne({id:(0,Ai.A)()},r),refetchQueries:["GetAllTemplates"]})},children:"Submit"})})})]})})};var xne,Tne;function One(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?One(Object(t),!0).forEach(function(n){jne(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):One(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jne(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Cne(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Sne=Ge.default.div(xne||(xne=Cne(["\n  padding: 20px;\n"]))),Nne=(0,Ge.default)(ze.fv)(Tne||(Tne=Cne(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),wne=e=>{let{onDismiss:n,onComplete:t,selectedTemplate:a}=e;const[r]=(0,Ot.n)(Gee,{onCompleted:()=>{t({message:"Template has been updated.",colour:"success"}),n()},onError:()=>{t({message:"Something went wrong! Please try again later.",colour:"danger"})}}),[i,o]=(0,g.useState)(a);return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,onDismiss:()=>n(),height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(Sne,{children:[(0,Ze.jsx)(dne,{heading:"Update Template",template:i,setTemplate:o}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(Nne,{item:!0,children:(0,Ze.jsx)(ze.$n,{disabled:(i.name,!i.parserId),onClick:()=>{r({variables:kne({id:(0,Ai.A)()},i),refetchQueries:["GetAllTemplates"]})},children:"Submit"})})})]})})};var Dne,Ane;function Rne(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Pne=(0,Ge.default)(ze.$n)(Dne||(Dne=Rne(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),Lne=Ge.default.div(Ane||(Ane=Rne(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),Ine=()=>{const[e,n]=(0,g.useState)(!1),[t,a]=(0,g.useState)(""),[r,i]=(0,g.useState)(null),[o,l]=(0,g.useState)(null),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(Vee),[p,m,f]=hf((null==s?void 0:s.getAllTemplates)||[],["name","parserId"]);return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationOcrContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{name:"ConfigurationOcrContainer__Controls",icon:"tachometer-alt",iconColor:"primary",title:"OCR Templates",children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationOcrContainer__Controls__Search",value:p,onChange:e=>m(e.target.value),hideButton:!0})}),(0,Ze.jsx)(Pne,{name:"ConfigurationOcrContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>n(!0),children:"+ Add Template"})]}),c&&(0,Ze.jsx)(Lne,{children:(0,Ze.jsx)(ze.Ip,{})}),d&&(0,Ze.jsx)(ub,{error:d,retry:u}),e&&(0,Ze.jsx)(vne,{onComplete:l,onDismiss:()=>n(!1)}),t&&(0,Ze.jsx)(wne,{onComplete:l,onDismiss:()=>a(!1),selectedTemplate:r}),o&&(0,Ze.jsx)(ze.Eg,{name:"Template__Notification",show:!0,color:o.colour,onClose:()=>l(null),children:o.message}),!c&&!d&&!f.length&&(0,Ze.jsx)(nv,{name:"ConfigurationDashboardsContainer__NoResults",title:"There are no results for this search."}),!c&&!!f.length&&f.slice().sort((e,n)=>ka(e.name,n.name)).map(e=>(0,Ze.jsx)(Qee,{template:e,onEdit:()=>{i(e),a(!0)}},e.id))]})};var Ene,_ne;function Fne(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Bne=Ge.default.div(Ene||(Ene=Fne(["\n  position: relative;\n  display: flex;\n  flex: 1;\n  justify-content: center;\n  align-items: center;\n  width: 100%;\n  height: 100%;\n  & > div {\n    max-height: 100%;\n  }\n"]))),Une=Ge.default.div(_ne||(_ne=Fne(["\n  display: flex;\n  flex-flow: column nowrap;\n  width: 100%;\n  height: 100%;\n"])));function Mne(e){let{error:n,loading:t,currentTab:a,retry:r,index:i,children:o}=e;const l=!!n||t;return(0,Ze.jsxs)(ze.Kp,{value:a,index:i,children:[l&&(0,Ze.jsxs)(Bne,{children:[n&&(0,Ze.jsx)(ub,{name:n.message,error:n,retry:r}),t&&(0,Ze.jsx)(ze.Ip,{})]}),!n&&!t&&(0,Ze.jsx)(Une,{children:o})]})}var Vne,zne=t(44773),Gne=t.n(zne);const $ne=(0,D.J1)(Vne||(Vne=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getWasteStreamsByAccountId($accountId: ID!, $filterValue: String, $page: Int = 1, $pageSize: Int = 200) {\n    getWasteStreamsByAccountId(accountId: $accountId, page: $page, pageSize: $pageSize, filterValue: $filterValue) {\n      pageCount\n      wasteStreams {\n        id\n        name\n        ewc {\n          code\n          id\n        }\n      }\n    }\n  }\n"])));function Wne(e){return{value:e.id,label:e.name}}function qne(e){let{value:n,onChange:t,createNew:a,error:r,createNewModalSize:i=6}=e;const o=rt(),l=(0,N.m)(),s=(0,g.useRef)({}),[c,d]=(0,g.useState)(!1),u=rc(),{showNotification:p}=vt();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.l6,{name:"wasteStreamId",placeholder:"Begin typing to find waste stream",value:n,error:r,defaultOptions:!0,cacheOptions:!0,loadOptions:async e=>{const n=await l.query({query:$ne,variables:{accountId:o,filterValue:e}}),{wasteStreams:t,totalItemCount:r}=n.data.getWasteStreamsByAccountId;Object.assign(s.current,my()(t,"id"));const i=t.map(Wne);return a&&u.data.find(e=>e.startsWith("createWasteStream"))&&i.unshift(ki),{options:i,total:r}},onChange:e=>{let{target:n}=e;var a;n.select.value===Oi?d(!0):t(null===(a=s.current)||void 0===a?void 0:a[n.value])}}),c&&(0,Ze.jsx)(ze.aF,{size:"md",span:i,onDimiss:()=>{d(!1)},show:!0,children:(0,Ze.jsx)(bV,{accountId:o,onSuccess:(e,n,a,r)=>{p(e,n),d(!1),t(r)}})})]})}var Jne;const Yne=(0,f.styled)(f.Grid)(Jne||(Jne=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n  width: 100%;\n"]))),Hne=e=>{let{onSuccess:n,onError:t,onUpdate:a,refetchQueries:r,accountId:i}=e;const{showNotification:o}=vt(),[l,s]=(0,g.useState)(!1),[c,d]=(0,g.useState)(""),[u,p]=(0,g.useState)(null),[m,y]=(0,g.useState)(!1),{loading:b,error:v,data:x}=(0,h.IT)(KM),[T]=(0,Ot.n)(QM,{onCompleted:e=>O(e),onError:()=>k(),update:(e,n)=>j(e,n),refetchQueries:r}),O=e=>{n&&n("Waste Stream created successfully","success",e.createWasteStream.id,xi(e.createWasteStream))},k=()=>{o("There was an error creating the waste stream"),y(!1),t&&t("Something went wrong. If the problem continues please contact support.","danger")},j=(0,g.useCallback)((e,n)=>{a&&a(e,n)},[a]),C=(0,g.useMemo)(()=>{var e;return(null==x||null===(e=x.getAllEWCs)||void 0===e?void 0:e.map(e=>({label:"".concat(e.code," - ").concat(e.description),value:e.id,hazardous:e.hazardous})))||[]},[null==x?void 0:x.getAllEWCs]),S=(0,g.useCallback)(()=>{T({variables:{id:(0,Ai.A)(),name:c,ewcId:null==u?void 0:u.value,accId:i,hazardous:l}}),y(!0)},[i,T,c,l,null==u?void 0:u.value]),N=(0,g.useCallback)(e=>{const n=C.find(n=>n.value===e.value);s((null==n?void 0:n.hazardous)||!1),p(e)},[C]);return(0,Ze.jsxs)(Yne,{container:!0,children:[(0,Ze.jsx)(f.TextField,{label:"Name",name:"Waste_Stream_Name",disabled:m,placeholder:"Name",onChange:e=>d(e.target.value),value:null!=c?c:""}),(0,Ze.jsx)(f.Select,{label:"EWC Code",name:"Waste_Stream_EWC_Code",disabled:m,options:C,value:(null==u?void 0:u.value)||"",error:!!v,helperText:(null==v?void 0:v.message)||"",onChange:N,isLoading:b,placeholder:b?"Loading":"Select EWC Code"}),(0,Ze.jsx)(f.Checkbox,{label:"Hazardous",name:"Waste_Stream_IsHazardous",checked:l,onChange:()=>{}}),(0,Ze.jsx)(f.Button,{name:"Waste_Stream_Create",variant:"contained",disabled:!x||!x.getAllEWCs||m,onClick:S,children:"Create"})]})},Kne=e=>{let{value:n,onChange:t,createNew:a,label:r,error:i}=e;const o=rt(),l=rc().data.find(e=>e.startsWith("createWasteStream")),{showNotification:s}=vt(),[c,d]=(0,g.useState)(!1),u=(0,g.useMemo)(()=>({accountId:o,pageSize:Za}),[o]),{data:p,loading:m,refetch:y,fetchMore:b,error:v}=(0,h.IT)($ne,{notifyOnNetworkStatusChange:!0,variables:u}),x=(0,g.useMemo)(()=>{var e;const n=(null==p||null===(e=p.getWasteStreamsByAccountId)||void 0===e?void 0:e.wasteStreams)||[];return Ti(n)},[p]),T=(null==v?void 0:v.message)||i,O=(0,g.useCallback)(async(e,n,a,r)=>{await y(u),t(r),d(!1),s(e,n)},[t,s,u,d,y]),k=(0,g.useCallback)(e=>{e.value===Oi?d(!0):t(e)},[t]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.AutoComplete,{placeholder:"Begin typing to find waste stream",label:r,createOption:l&&a?"Create new...":void 0,error:T,helperText:T,options:x,value:n,isLoading:m,onCreate:()=>{d(!0)},loadMore:async(e,n,t)=>{const a={page:n/e+1,pageSize:e,accountId:o};t&&(a.filterValue=t);const r=await b({variables:a});return{total:r.data.getWasteStreamsByAccountId.count,options:Ti(r.data.getWasteStreamsByAccountId.wasteStreams)}},onChange:k}),c&&(0,Ze.jsx)(f.Modal,{title:"New waste stream",onClose:()=>{d(!1)},open:!0,children:(0,Ze.jsx)(Hne,{accountId:o,onSuccess:O})})]})},Qne={startDate:{columnName:"Start Date",width:2,order:1,format:e=>Wt().utc(new Date(e)).format("DD/MM/YYYY")},endDate:{columnName:"Expiry",width:2,order:2,format:e=>Wt().utc(new Date(e)).format("DD/MM/YYYY")},reportingYear:{columnName:"DEFRA Year",width:1,order:3},fromUnit:{columnName:"From unit",width:1,order:4},toUnit:{columnName:"To unit",width:1,order:5},value:{columnName:"Factor",width:1,order:6,valueFormatter:ma},scope:{columnName:"Scope",width:1,order:7},reference:{columnName:"Reference",width:1,order:8},note:{columnName:"Note",width:2,order:9}},Zne={"Re-use":{columnName:"Re-use",width:2,valueFormatter:ma},"Open-loop":{columnName:"Open-loop",width:2,valueFormatter:ma},"Closed-loop":{columnName:"Closed-loop",width:2,valueFormatter:ma},Composting:{columnName:"Composting",width:2,valueFormatter:ma},Combustion:{columnName:"Combustion",width:2,valueFormatter:ma},Landfill:{columnName:"Landfill",width:2,valueFormatter:ma},"Anaerobic Digestion":{columnName:"Anaerobic Digestion",width:2}};function Xne(e,n){const t=Object.keys(e);return t.length!==Object.keys(Qne).length?12/t.length:e[n].width}function ete(e,n){return new Date(n.startDate).getTime()-new Date(e.startDate).getTime()}var nte,tte;function ate(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const rte=(0,Ge.default)(ze.fI)(nte||(nte=ate(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.light.background,e=>{if(e.action)return"background-color: ".concat(e.theme.colors.warning.highlight.background,";")}),ite=(0,Ge.default)(ze.fv)(tte||(tte=ate(["\n  padding: ",";\n  word-break: break-all;\n"])),e=>e.theme.geometry.md.profile.padding),ote=(e,n,t)=>e[n]&&"function"==typeof e[n].format?e[n].format(t[n]):t[n];function lte(e){let{factor:n,config:t}=e;return(0,Ze.jsx)(rte,{container:!0,children:Object.keys(t).map(e=>"reference"===e?(0,Ze.jsx)(ite,{item:!0,span:Xne(t,e),children:(0,Ze.jsx)(ze.Yq,{href:n.reference,target:"_blank",children:(0,Ze.jsx)(ze.In,{icon:"external-link-alt"})})},e):(0,Ze.jsx)(ite,{item:!0,span:Xne(t,e),children:(0,Ze.jsx)(ze.EY,{children:ote(t,e,n)})},e))})}var ste,cte;function dte(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ute=(0,Ge.default)(ze.fI)(ste||(ste=dte(["\n  padding: ",";\n  background: ",";\n  border-bottom: 1px solid ",";\n  border-top: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.sm.spacing," ").concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.light.background,e=>e.theme.colors.text.light.background,e=>e.theme.colors.text.light.background),pte=Ge.default.div(cte||(cte=dte(["\n  flex: 1 1 auto;\n  overflow: scroll;\n"])));function mte(e){let{factors:n,config:t,children:a=null}=e;const r=Object.keys(t).sort((e,n)=>t[e].order-t[n].order);return(0,Ze.jsxs)(g.Fragment,{children:[a,(0,Ze.jsx)(ute,{align:"between",container:!0,children:r.map(e=>(0,Ze.jsx)(ze.fv,{item:!0,span:Xne(t,e),children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:t[e].columnName})},e))}),(0,Ze.jsx)(pte,{children:n.slice().sort(ete).map(e=>(0,Ze.jsx)(lte,{factor:e,config:t},e.id))})]})}function fte(e){let{ranges:n,value:t,onChange:a,includeReportingYear:r}=e;const{rangesFormatted:i,mapOfDates:o}=function(e){let{includeReportingYear:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const t={},a=Gt()(e).orderBy(_a,"desc").map(e=>{let[a,r]=e;const i=Ea([a,r],{includeReportingYear:n});return t[i]||(t[i]=[a,r]),i}).uniq().value();return{rangesFormatted:a,mapOfDates:t}}(n,{includeReportingYear:r});return(0,Ze.jsx)(ze.l6,{placeholder:"Select date range",value:t?Ea(t,{includeReportingYear:r}):null,options:i.map(e=>({label:e,value:e})),onChange:e=>a(o[e.target.value])})}var yte,gte,bte,hte,vte,xte,Tte;function Ote(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kte(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ote(Object(t),!0).forEach(function(n){jte(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ote(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jte(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Cte(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ste=Ge.default.table(yte||(yte=Cte(["\n  tr:nth-child(even) {\n    background: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.colors.overlay.light.background}),Nte=Ge.default.th(gte||(gte=Cte(["\n  padding: ",";\n  background: ",";\n  border-bottom: 1px solid ",";\n  border-right: 1px solid ",";\n  font-weight: 600;\n"])),e=>{let{theme:n}=e;return n.geometry.xs.spacing},e=>{let{theme:n}=e;return n.colors.overlay.light.background},e=>{let{theme:n}=e;return n.colors.overlay.normal.background},e=>{let{theme:n}=e;return n.colors.overlay.normal.background}),wte=Ge.default.td(bte||(bte=Cte(["\n  padding: ",";\n"])),e=>{let{theme:n}=e;return n.geometry.xs.spacing}),Dte=(0,Ge.default)(ze.Yq)(hte||(hte=Cte(["\n  display: inline;\n  word-wrap: break-word;\n  hyphens: auto;\n"]))),Ate=Ge.default.div(vte||(vte=Cte(["\n  margin-top: 12px;\n  margin-bottom: 12px;\n  padding-left: 12px;\n  padding-right: 32px;\n  font-size: ",";\n  line-height: 20px;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.fonts.md.size},e=>{let{theme:n}=e;return n.colors.text.normal.background}),Rte=(0,Ge.default)(ze.EY)(xte||(xte=Cte(["\n  margin-top: 12px;\n  margin-bottom: 12px;\n  padding-left: 12px;\n  padding-right: 32px;\n"]))),Pte=(0,Ge.default)(p.Link)(Tte||(Tte=Cte(["\n  text-decoration: underline;\n"])));function Lte(){return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Rte,{weight:"bold",children:"Reporting year"}),(0,Ze.jsxs)(Rte,{children:["If you would like to report in calendar years or financial years, please ask your Customer Support Manager to configure your account. Visit your"," ",(0,Ze.jsx)(Pte,{to:"/configuration/accountconfig/accounts",children:"Account Configuration"})," page to see how your reporting period is currently configured."]})]})}function Ite(){return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Rte,{weight:"bold",children:"Note:"}),(0,Ze.jsx)(Rte,{children:"Rio has been configured to account for data ranging across two annual government conversion factor datasets as above. In the unlikely event that factors for the most recent year are not yet published, the most recent available conversion factor will be used. Once new factors are published, Rio will update any calculated carbon emissions."}),(0,Ze.jsx)(Rte,{children:"If you wish to configure reporting year to calendar or financial you will need to contact your Customer Support Manager as Rio will not re-calculate carbon emissions."})]})}function Ete(){return(0,Ze.jsxs)(Ze.Fragment,{children:[Lte(),Ite()]})}function _te(){return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(Rte,{children:["The emission factors applied to your selected waste stream has been based on the"," ",(0,Ze.jsx)(Dte,{href:"https://www.gov.uk/government/collections/government-conversion-factors-for-company-reporting",target:"_blank",rel:"noopener noreferrer",children:"UK Government GHG Conversion Factors for Company Reporting"}),". Rio has associated the most appropriate conversion factor for your waste stream based on its physical properties and EWC code and the treatment processes you are applying."]}),(0,Ze.jsxs)(Rte,{children:["These factors cannot be used to determine the relative lifecycle merit of different waste management options. This is because the benefits of energy recovery and recycling are attributed to the user of the recycled materials, not the producer of the waste, in line with"," ",(0,Ze.jsx)(Dte,{href:"https://ghgprotocol.org/corporate-standard",target:"_blank",rel:"noopener noreferrer",children:"GHG Protocol Guidelines."})]})]})}function Fte(){return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(Rte,{children:["The emission factors applied to your natural gas consumption are based on the"," ",(0,Ze.jsx)(Dte,{href:"https://www.gov.uk/government/collections/government-conversion-factors-for-company-reporting",target:"_blank",rel:"noopener noreferrer",children:"UK Government conversion factors for company reporting of greenhouse gas emissions."})]}),(0,Ze.jsx)(Rte,{children:"Please note for natural gas consumption Rio applies the Gross Calorific Value (Gross CV) emission factor by default. As per UK Government guidance, a majority of energy billing is provided on a Gross CV basis rather than as Net CV. The Gross CV of the fuel accounts for the total energy content of the gas whereas the Net CV assumes some of the energy is not recovered. If you need to report Natural Gas in Net CV, that data can be uploaded accordingly to Rio’s fuel section."}),(0,Ze.jsx)(Rte,{children:"Publication Dates:"}),(0,Ze.jsx)(Rte,{children:"To produce carbon reporting in real time, Rio utilises a publication factor logic, applying emission factors for transaction data consumed between the start and end dates indicated in the EF table above. Rio also applies the same factor set’s respective emission factors to show the GHG breakdown by common gases (CO2, CH4, and N2O) all of which are converted to CO2e (Carbon Dioxide equivalent) in alignment with Intergovernmental Panel on Climate Change (IPCC) Global Warming Potentials (GWPs)."}),(0,Ze.jsx)(Rte,{children:"The Global Warming Potentials (GWPs) are based on the Intergovernmental Panel on Climate Change (IPCC) Fifth Assessment Report (AR5) over a 100-year period so that the Conversion Factors are consistent with current national and international reporting requirements. rom 2023 factor sets onwards."})]})}function Bte(){return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(Rte,{children:["The emission factors applied to your water consumption are based on the"," ",(0,Ze.jsx)(Dte,{href:"https://www.gov.uk/government/collections/government-conversion-factors-for-company-reporting",target:"_blank",rel:"noopener noreferrer",children:"UK Government conversion factors for company reporting of greenhouse gas emissions."})]})})}const Ute=[{scope:1,column:"Combustion",comment:"Included to Scope 1 if activity is direct, otherwise, goes to Scope 3"},{scope:3,column:"Well-to-tank",comment:"Always included to Scope 3"}];function Mte(){return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(Rte,{children:["The emission factors applied to your Fuel consumption are based on the"," ",(0,Ze.jsx)(Dte,{href:"https://www.gov.uk/government/collections/government-conversion-factors-for-company-reporting",target:"_blank",rel:"noopener noreferrer",children:"UK Government conversion factors for company reporting of greenhouse gas emissions."})]}),(0,Ze.jsx)(Rte,{weight:"bold",children:"Scopes"}),(0,Ze.jsx)(Rte,{children:"Here is the explanation of how Rio utilises these factors to calculate Scope 1 and Scope 3 for your fuel transactions:"}),(0,Ze.jsx)(Ate,{children:(0,Ze.jsxs)(Ste,{children:[(0,Ze.jsx)("thead",{children:(0,Ze.jsxs)("tr",{children:[(0,Ze.jsx)(Nte,{children:"Scope"}),(0,Ze.jsx)(Nte,{children:"Column"}),(0,Ze.jsx)(Nte,{children:"Comment"})]})}),(0,Ze.jsx)("tbody",{children:Ute.map((e,n)=>(0,Ze.jsxs)("tr",{children:[(0,Ze.jsx)(wte,{children:e.scope}),(0,Ze.jsx)(wte,{children:e.column}),(0,Ze.jsx)(wte,{children:e.comment})]},n))})]})})]})}function Vte(){return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(Rte,{children:["The emission factors applied to your electricity consumed in the UK are based on the"," ",(0,Ze.jsx)(Dte,{href:"https://www.gov.uk/government/collections/government-conversion-factors-for-company-reporting",target:"_blank",rel:"noopener noreferrer",children:"UK Government conversion factors for company reporting of greenhouse gas emissions."})]}),(0,Ze.jsx)(Rte,{children:"Overseas CO2 emission factors are based on data published by the International Energy Agency (IEA) from 2023. This includes emission factors for generation, electricity trade, and transmission and distribution losses."}),(0,Ze.jsx)(Rte,{children:"The IEA conversion factors have varying associated timeframes. The IEA conversion factor are annual figures (1st Jan-31st Dec). If the timeframe appropriate for the calculation is not available, Rio will use the conversion factor for the most recent year."}),(0,Ze.jsx)(Ete,{})]})}function zte(){return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(Rte,{children:["The emission factors applied to your refrigerants and other gasses are based on the",(0,Ze.jsx)(Dte,{href:"https://www.gov.uk/government/collections/government-conversion-factors-for-company-reporting",target:"_blank",rel:"noopener noreferrer",children:"UK Government conversion factors for company reporting of greenhouse gas emissions."})]})})}function Gte(){const e={scope:3,comment:"Always included to Scope 3"},n=[{scope:2,column:"Generation",comment:"Included to Scope 2 if activity is direct, otherwise, included to Scope 3"},kte(kte({},e),{},{column:"Transmission & distribution"}),kte(kte({},e),{},{column:"Well-to-tank generation"}),kte(kte({},e),{},{column:"Well-to-tank transmission and distribution"})];return(0,Ze.jsxs)(Ze.Fragment,{children:[Bte(),Lte(),(0,Ze.jsx)(Rte,{weight:"bold",children:"Scopes"}),(0,Ze.jsx)(Rte,{children:"Here is the explanation of how Rio utilises these factors to calculate Scope 2 and Scope 3 for your heat & steam transactions:"}),(0,Ze.jsx)(Ate,{children:(0,Ze.jsxs)(Ste,{children:[(0,Ze.jsx)("thead",{children:(0,Ze.jsxs)("tr",{children:[(0,Ze.jsx)(Nte,{children:"Scope"}),(0,Ze.jsx)(Nte,{children:"Column"}),(0,Ze.jsx)(Nte,{children:"Comment"})]})}),(0,Ze.jsx)("tbody",{children:n.map((e,n)=>(0,Ze.jsxs)("tr",{children:[(0,Ze.jsx)(wte,{children:e.scope}),(0,Ze.jsx)(wte,{children:e.column}),(0,Ze.jsx)(wte,{children:e.comment})]},n))})]})}),Ite()]})}function $te(){return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Rte,{children:"Material use conversion factors should be used to report on consumption of procured materials based on their origin (that is, comprised of primary material or recycled materials). For primary materials, these factors cover the extraction, primary processing, manufacturing and transporting materials to the point of sale, not the materials in use. For secondary materials, the factors cover sorting, processing, manufacturing and transporting to the point of sale, not the materials in use. These factors are useful for reporting efficiencies gained through reduced procurement of material or the benefit of procuring items that are the product of a previous recycling process."}),(0,Ze.jsx)(Rte,{children:"The emission factors applied to your Materials consumption are based on the UK Government conversion factors for company reporting of greenhouse gas emissions."})]})}var Wte,qte;function Jte(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Yte=(0,D.J1)(Wte||(Wte=Jte(["\n  fragment CarbonConversionFactorFields on CarbonConversionFactor {\n    id\n    startDate\n    endDate\n    reportingYear\n    fromUnit\n    toUnit\n    value\n    scope\n    type\n    reference\n    note\n  }\n"]))),Hte=(0,D.J1)(qte||(qte=Jte(["\n  query GetCarbonConversionFactorsByAccountId($accountId: ID!, $ewcId: ID) {\n    getCarbonConversionFactorsByAccountId(accountId: $accountId, ewcId: $ewcId) {\n      ...CarbonConversionFactorFields\n      ... on WasteCarbonConversionFactor {\n        ewcId\n        defraEquivalent\n      }\n    }\n  }\n  ","\n"])),Yte);var Kte,Qte,Zte,Xte;function eae(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const nae=(0,Ge.default)(ze.fI)(Kte||(Kte=eae(["\n  flex-flow: row nowrap;\n  padding-top: 12px;\n  padding-bottom: 12px;\n"]))),tae=(0,Ge.default)(ze.fv)(Qte||(Qte=eae(["\n  padding-left: 12px;\n  padding-right: 12px;\n"]))),aae=Ge.default.div(Zte||(Zte=eae(["\n  border: 1px solid ",";\n  padding: 12px;\n"])),e=>{let{theme:n}=e;return n.colors.text.light.background}),rae=(0,Ge.default)(ze.EY)(Xte||(Xte=eae(["\n  text-align: center;\n"])));function iae(){var e;const n=rt(),[t,a]=(0,g.useState)(null),r=null==(i=t)?void 0:i.ewc;var i;const o=null==r?void 0:r.id,[l,{data:s,loading:c}]=(0,gs._)(Hte,{variables:{accountId:n,ewcId:null!=o?o:void 0},fetchPolicy:"network-only"});(0,g.useEffect)(()=>{o&&l({variables:{accountId:n,ewcId:o}})},[o,n,l]);const d=(0,g.useMemo)(()=>{var e;return null!==(e=null==s?void 0:s.getCarbonConversionFactorsByAccountId)&&void 0!==e?e:[]},[null==s?void 0:s.getCarbonConversionFactorsByAccountId]),u=(0,g.useMemo)(()=>d.map(e=>[e.startDate,e.endDate]),[d]),[p,m]=(0,g.useState)(null);(0,g.useEffect)(()=>{if(u.length>0){const n=(e=u,Gt().maxBy(e,_a));m(null!=n?n:null)}else m(null);var e},[u]);const f=p?function(e,n){return e.filter(e=>{return t=n,a=[e.startDate,e.endDate],Ia(t[0],a)||Ia(t[1],a);var t,a})}(d,p):[],y=Gne()(my()(f,"defraEquivalent"),e=>e.value&&bi()(e.value,4));return(0,Ze.jsxs)("div",{children:[(0,Ze.jsxs)(nae,{container:!0,children:[(0,Ze.jsx)(tae,{span:5,item:!0,children:(0,Ze.jsx)(qne,{onChange:e=>a(e)})}),(0,Ze.jsx)(tae,{span:2,vdistribution:"center",item:!0,container:!0,children:(0,Ze.jsxs)(ze.EY,{children:["EWC: ",r?r.code:"Not specified"]})}),(0,Ze.jsx)(tae,{span:5,item:!0,children:(0,Ze.jsx)(fte,{ranges:u,value:null!==(e=null!=p?p:u[0])&&void 0!==e?e:null,onChange:e=>m(e),includeReportingYear:!0})})]}),c&&!d.length?(0,Ze.jsx)(aae,{children:(0,Ze.jsx)(rae,{children:"Loading..."})}):o?(0,Ze.jsx)(mte,{factors:[y],config:Zne}):(0,Ze.jsx)(aae,{children:(0,Ze.jsx)(rae,{children:"Select a waste stream to view the factors"})}),(0,Ze.jsx)(_te,{})]})}var oae,lae;function sae(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const cae=(0,D.J1)(oae||(oae=sae(["\n  query getTransportConversionFactors($filters: Filters, $limit: Int = 100, $offset: Int, $sort: [SortCommand!]) {\n    getTransportConversionFactors(filters: $filters, limit: $limit, offset: $offset, sort: $sort) {\n      rows {\n        id\n        startDate\n        endDate\n        reportingYear\n        fromUnit\n        toUnit\n        value\n        scope\n        type\n        reference\n        note\n        transportType\n        transportSubtype\n        fuelType\n      }\n      totalRows\n    }\n  }\n"]))),dae=(0,D.J1)(lae||(lae=sae(["\n  query getTransportConversionFactorsFilter($field: String!) {\n    getTransportConversionFactorsFilter(field: $field) {\n      label\n      value\n    }\n  }\n"]))),uae=([["2012-06-01T00:00:00.000Z","2013-05-31T23:59:59.000Z"],["2013-06-01T00:00:00.000Z","2014-05-31T23:59:59.000Z"],["2014-06-01T00:00:00.000Z","2015-05-31T23:59:59.000Z"],["2015-06-01T00:00:00.000Z","2016-05-31T23:59:59.000Z"],["2016-06-01T00:00:00.000Z","2017-06-30T23:59:59.000Z"],["2017-07-01T00:00:00.000Z","2018-07-31T23:59:59.000Z"],["2018-08-01T00:00:00.000Z","2019-07-31T23:59:59.000Z"],["2019-08-01T00:00:00.000Z","2020-07-31T23:59:59.000Z"],["2020-08-01T00:00:00.000Z","2021-05-31T23:59:59.000Z"],["2021-06-01T00:00:00.000Z","2022-05-31T23:59:59.000Z"],["2022-06-01T00:00:00.000Z","2023-06-07T23:59:59.000Z"]].map(e=>{let[n,t]=e;return[new Date(n),new Date(t)]}),"Each year represents a “factor set”, these are applied based on year of data being uploaded"),pae="This refers to the beginning of the consumption period for which this factor set will be applied in the platform",mae="This refers to the end of the consumption period for which this factor set will be applied in the platform",fae="The factor value's scope according to the DEFRA guidance for this factor set/reporting year",yae="A link to the DEFRA guidance for this factor set/reporting year";function gae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function bae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gae(Object(t),!0).forEach(function(n){hae(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gae(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hae(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const vae=e=>e.data.id;function xae(e){const n=(0,g.useMemo)(()=>({reference:VJ}),[]),[t]=(0,kd.useQueryParam)("reportingYear",kd.NumberParam),[a]=(0,kd.useQueryParam)("type",kd.StringParam),r=(0,g.useCallback)(n=>{if("serverSide"!==n.api.getGridOption("rowModelType"))n.api.forEachNodeAfterFilter(e=>{e.data.reportingYear===t&&e.setSelected(!0)}),n.api.forEachNodeAfterFilter(e=>{a&&e.data.type===a&&e.setSelected(!0)});else{var r;let e={};t&&(e=bae(bae({},e),{reportingYear:{filterType:"set",values:[t.toString()]}})),a&&(e=bae(bae({},e),{type:{filterType:"set",values:[a]}})),null===(r=n.api)||void 0===r||r.setFilterModel(e)}e.onGridReady&&e.onGridReady(n)},[a,t,e]);return(0,Ze.jsx)("div",{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,bae(bae({},e),{},{components:n,onGridReady:r,domLayout:"autoHeight",getRowId:vae}))})}function Tae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Oae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tae(Object(t),!0).forEach(function(n){kae(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tae(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function kae(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const jae={pagination:!0,paginationPageSize:25,defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}},rowModelType:"serverSide",cacheBlockSize:25,maxBlocksInCache:3};function Cae(e){let{config:n,serverSideDatasource:t}=e;return(0,Ze.jsx)(xae,Oae(Oae(Oae({},jae),n),{},{serverSideDatasource:t}))}function Sae(){const{currentTab:e}=(0,g.useContext)(Nre),n=oc(),t=function(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async t=>{try{const{data:{getTransportConversionFactorsFilter:n}}=await e.query({query:dae,variables:{field:t.colDef.colId||t.colDef.field}});t.success(n.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){n("Couldn't load filter values for column \"".concat(t.colDef.headerName,'"'),"warning")}},[e]);return(0,g.useMemo)(()=>({columnDefs:[{headerName:"DEFRA Year",field:"reportingYear",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},headerTooltip:uae},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:pae},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:mae},{headerName:"Scope",field:"scope",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},headerTooltip:fae},{headerName:"From Unit",field:"fromUnit",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la}},{headerName:"To Unit",field:"toUnit",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la}},{headerName:"Type",field:"type",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la}},{headerName:"Transport Type",field:"transportType",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la}},{headerName:"Transport Subtype",field:"transportSubtype",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la}},{headerName:"Fuel Type",field:"fuelType",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la}},{headerName:"kgCO2e",field:"value",minWidth:100,filter:"agNumberColumnFilter",filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"Reference",field:"reference",cellRenderer:"reference",cellRendererParams:{icon:"external-link-alt"},minWidth:100,headerTooltip:yae},{headerName:"Note",filter:"agTextColumnFilter",filterParams:{buttons:["reset","apply"],newRowsAction:"keep"},field:"note",resizable:!0}]}),[t])}(),[a,{error:r,refetch:i}]=(0,gs._)(cae,{fetchPolicy:"network-only"}),o=(0,g.useCallback)(async e=>{try{const{startRow:n,sortModel:t,filterModel:r}=e.request,{data:{getTransportConversionFactors:{rows:i,totalRows:o}}}=await a({variables:{offset:n,limit:25,sort:oa(t),filters:ia(r)}});e.success({rowData:i,rowCount:o})}catch(n){throw e.fail(),n}},[a]),l=(0,g.useMemo)(()=>({getRows:o}),[o]);return(0,Ze.jsx)(Mne,{currentTab:e,index:n.configuration.factors.transport,error:r,loading:!1,retry:i,children:(0,Ze.jsxs)("div",{className:"ag-theme-alpine",children:[(0,Ze.jsx)(Cae,{config:t,serverSideDatasource:l}),(0,Ze.jsx)(Mte,{}),(0,Ze.jsx)(Ete,{})]})})}var Nae,wae;function Dae(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Aae=(0,D.J1)(Nae||(Nae=Dae(["\n  query getFuelConversionFactors($filters: Filters, $limit: Int = 100, $offset: Int, $sort: [SortCommand!]) {\n    getFuelConversionFactors(filters: $filters, limit: $limit, offset: $offset, sort: $sort) {\n      rows {\n        id\n        reportingYear\n        unit\n        fuelType\n        fuelActivity\n        comKgCo2e\n        wttKgCO2e\n        reference\n\n        comKgCo2\n        comKgCh4\n        comKgN20\n        gjGross\n        gjNet\n        kWhGross\n        kWhNet\n        densityKg\n        densityM3\n        densityT\n\n        startDate\n        endDate\n      }\n      totalRows\n    }\n  }\n"]))),Rae=(0,D.J1)(wae||(wae=Dae(["\n  query getFuelConversionFactorsFilter($field: String!) {\n    getFuelConversionFactorsFilter(field: $field) {\n      label\n      value\n    }\n  }\n"])));function Pae(){const{currentTab:e}=(0,g.useContext)(Nre),n=oc(),t=function(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async t=>{try{const{data:{getFuelConversionFactorsFilter:n}}=await e.query({query:Rae,variables:{field:t.colDef.colId||t.colDef.field}}),a=n.map(e=>e.value).filter(e=>void 0!==e);t.success(a)}catch(e){n("Couldn't load filter values for column \"".concat(t.colDef.headerName,'"'),"warning")}},[e,n]);return(0,g.useMemo)(()=>({columnDefs:[{headerName:"DEFRA Year",field:"reportingYear",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},headerTooltip:uae},{headerName:"Fuel Type",field:"fuelType",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},initialSort:"asc"},{headerName:"Fuel Activity",field:"fuelActivity",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la}},{headerName:"Unit",field:"unit",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la}},{headerName:"Combustion (kgCO2e)",field:"comKgCo2e",minWidth:100,filter:"agNumberColumnFilter",filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"Well-to-tank (kgCO2e)",field:"wttKgCO2e",minWidth:100,filter:"agNumberColumnFilter",filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:pae},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:mae},{headerName:"Combustion (kgCO2)",field:"comKgCo2",minWidth:100,filter:"agNumberColumnFilter",initialHide:!0,filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"Combustion (kgCH4)",field:"comKgCh4",minWidth:100,filter:"agNumberColumnFilter",initialHide:!0,filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"Combustion (kgN2O)",field:"comKgN20",minWidth:100,filter:"agNumberColumnFilter",initialHide:!0,filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"GJ Gross",field:"gjGross",minWidth:100,filter:"agNumberColumnFilter",initialHide:!0,filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"GJ Net",field:"gjNet",minWidth:100,filter:"agNumberColumnFilter",initialHide:!0,filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"kWh Gross",field:"kWhGross",minWidth:100,filter:"agNumberColumnFilter",initialHide:!0,filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"kWh Net",field:"kWhNet",minWidth:100,filter:"agNumberColumnFilter",initialHide:!0,filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"Density (kg)",field:"densityKg",minWidth:100,filter:"agNumberColumnFilter",initialHide:!0,filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"Density (m3)",field:"densityM3",minWidth:100,filter:"agNumberColumnFilter",initialHide:!0,filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"Density (t)",field:"densityT",minWidth:100,filter:"agNumberColumnFilter",initialHide:!0,filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"Reference",field:"reference",cellRenderer:"reference",cellRendererParams:{icon:"external-link-alt"},minWidth:100,headerTooltip:yae}]}),[t])}(),[a,{error:r,refetch:i}]=(0,gs._)(Aae),o=(0,g.useCallback)(async e=>{try{const{startRow:n,sortModel:t,filterModel:r}=e.request,{data:{getFuelConversionFactors:{rows:i,totalRows:o}}}=await a({variables:{offset:n,limit:25,sort:oa(t),filters:ia(r)}});e.success({rowData:i,rowCount:o})}catch(n){throw e.fail(),n}},[a]),l=(0,g.useMemo)(()=>({getRows:o}),[o]);return(0,Ze.jsx)(Mne,{currentTab:e,index:n.configuration.factors.fuel,error:r,loading:!1,retry:i,children:(0,Ze.jsxs)("div",{className:"ag-theme-alpine",children:[(0,Ze.jsx)(Cae,{config:t,serverSideDatasource:l}),(0,Ze.jsx)(Mte,{}),(0,Ze.jsx)(Ete,{})]})})}var Lae,Iae;function Eae(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _ae=(0,D.J1)(Lae||(Lae=Eae(["\n  query getGasConversionFactors($filters: Filters, $limit: Int = 100, $offset: Int, $sort: [SortCommand!]) {\n    getGasConversionFactors(filters: $filters, limit: $limit, offset: $offset, sort: $sort) {\n      rows {\n        id\n        reportingYear\n        consumptionKgCo2e\n        wttKgCo2e\n        reference\n        startDate\n        endDate\n      }\n      totalRows\n    }\n  }\n"]))),Fae=(0,D.J1)(Iae||(Iae=Eae(["\n  query getGasConversionFactorsFilter($field: String!) {\n    getGasConversionFactorsFilter(field: $field) {\n      label\n      value\n    }\n  }\n"])));function Bae(){const{currentTab:e}=(0,g.useContext)(Nre),n=oc(),t=function(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async t=>{try{const{data:{getGasConversionFactorsFilter:n}}=await e.query({query:Fae,variables:{field:t.colDef.colId||t.colDef.field}}),a=n.map(e=>e.value).filter(e=>void 0!==e);t.success(a)}catch(e){n("Couldn't load filter values for column \"".concat(t.colDef.headerName,'"'),"warning")}},[e,n]);return(0,g.useMemo)(()=>({columnDefs:[{headerName:"DEFRA Year",field:"reportingYear",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},initialSort:"desc",headerTooltip:uae},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:pae},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:mae},{headerName:"Scope 1 Combustion (kgCO2e)",field:"consumptionKgCo2e",minWidth:200,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 WTT (kgCO2e)",field:"wttKgCo2e",minWidth:200,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Reference",field:"reference",cellRenderer:"reference",cellRendererParams:{icon:"external-link-alt"},minWidth:100,headerTooltip:yae}]}),[t])}(),[a,{error:r,refetch:i}]=(0,gs._)(_ae),o=(0,g.useCallback)(async e=>{try{const{startRow:n,sortModel:t,filterModel:r}=e.request,{data:{getGasConversionFactors:{rows:i,totalRows:o}}}=await a({variables:{offset:n,limit:25,sort:oa(t),filters:ia(r)}});e.success({rowData:i,rowCount:o})}catch(n){throw e.fail(),n}},[a]),l=(0,g.useMemo)(()=>({getRows:o}),[o]);return(0,Ze.jsx)(Mne,{currentTab:e,index:n.configuration.factors.gas,error:r,loading:!1,retry:i,children:(0,Ze.jsxs)("div",{className:"ag-theme-alpine",children:[(0,Ze.jsx)(Cae,{config:t,serverSideDatasource:l}),(0,Ze.jsx)(Fte,{})]})})}var Uae,Mae;function Vae(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const zae=(0,D.J1)(Uae||(Uae=Vae(["\n  query getElectricityConversionFactors($filters: Filters, $limit: Int = 100, $offset: Int, $sort: [SortCommand!]) {\n    getElectricityConversionFactors(filters: $filters, limit: $limit, offset: $offset, sort: $sort) {\n      rows {\n        id\n        reportingYear\n        reference\n\n        genKgCo2e\n        tdKgCo2e\n        wttGenKgCo2e\n        wttTdKgCo2e\n        wttTradeKgCo2e\n\n        genKgCo2\n        tdKgCo2\n        wttGenKgCo2\n        wttTdKgCo2\n        wttTradeKgCo2\n\n        genKgCh4\n        tdKgCh4\n        wttGenKgCh4\n        wttTdKgCh4\n        wttTradeKgCh4\n\n        genKgN2o\n        tdKgN2o\n        wttGenKgN2o\n        wttTdKgN2o\n        wttTradeKgN2o\n\n        startDate\n        endDate\n      }\n      totalRows\n    }\n  }\n"]))),Gae=(0,D.J1)(Mae||(Mae=Vae(["\n  query getElectricityConversionFactorsFilter($field: String!) {\n    getElectricityConversionFactorsFilter(field: $field) {\n      label\n      value\n    }\n  }\n"])));function $ae(){const{currentTab:e}=(0,g.useContext)(Nre),n=oc(),t=function(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async t=>{try{const{data:{getElectricityConversionFactorsFilter:n}}=await e.query({query:Gae,variables:{field:t.colDef.colId||t.colDef.field}}),a=n.map(e=>e.value).filter(e=>void 0!==e);t.success(a)}catch(e){n("Couldn't load filter values for column \"".concat(t.colDef.headerName,'"'),"warning")}},[e,n]);return(0,g.useMemo)(()=>({columnDefs:[{headerName:"DEFRA Year",field:"reportingYear",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},initialSort:"desc",headerTooltip:uae},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:pae},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:mae},{headerName:"Scope 2 Generation (kgCO2e)",field:"genKgCo2e",minWidth:320,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 Transmission and Distribution (kgCO2e)",field:"tdKgCo2e",minWidth:320,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 WTT Generation (kgCO2e)",field:"wttGenKgCo2e",minWidth:320,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 WTT T&D",field:"wttTdKgCo2e",minWidth:320,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Reference",field:"reference",cellRenderer:"reference",cellRendererParams:{icon:"external-link-alt"},minWidth:100,headerTooltip:yae},{headerName:"Scope 2 Generation (kgCO2)",field:"genKgCo2",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 T&D (kgCO2)",field:"tdKgCo2",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 WTT generation (kgCO2)",field:"wttGenKgCo2",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3  WTT T&D (kgCO2)",field:"wttTdKgCo2",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 2 Generation (kgCH4)",field:"genKgCh4",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 T&D (kgCH4)",field:"tdKgCh4",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 WTT generation (kgCH4)",field:"wttGenKgCh4",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 WTT T&D (kgCH4)",field:"wttTdKgCh4",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 2 Generation (kgN2O)",field:"genKgN2o",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 T&D (kgN2O)",field:"tdKgN2o",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 WTT generation (kgN2O)",field:"wttGenKgN2o",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae},{headerName:"Scope 3 WTT T&D (kgN2O)",field:"wttTdKgN2o",initialHide:!0,filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:fae}]}),[t])}(),[a,{error:r,refetch:i}]=(0,gs._)(zae),o=(0,g.useCallback)(async e=>{try{const{startRow:n,sortModel:t,filterModel:r}=e.request,{data:{getElectricityConversionFactors:{rows:i,totalRows:o}}}=await a({variables:{offset:n,limit:25,sort:oa(t),filters:ia(r)}});e.success({rowData:i,rowCount:o})}catch(n){throw e.fail(),n}},[a]),l=(0,g.useMemo)(()=>({getRows:o}),[o]);return(0,Ze.jsx)(Mne,{currentTab:e,index:n.configuration.factors.electricity,error:r,loading:!1,retry:i,children:(0,Ze.jsxs)("div",{className:"ag-theme-alpine",children:[(0,Ze.jsx)(Cae,{config:t,serverSideDatasource:l}),(0,Ze.jsx)(Vte,{}),(0,Ze.jsx)(Ete,{})]})})}var Wae,qae;function Jae(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Yae=(0,D.J1)(Wae||(Wae=Jae(["\n  query getWaterConversionFactors($filters: Filters, $limit: Int = 100, $offset: Int, $sort: [SortCommand!]) {\n    getWaterConversionFactors(filters: $filters, limit: $limit, offset: $offset, sort: $sort) {\n      rows {\n        id\n        reportingYear\n        reference\n        supplyKgCo2e\n        treatmentKgCo2e\n        startDate\n        endDate\n      }\n      totalRows\n    }\n  }\n"]))),Hae=(0,D.J1)(qae||(qae=Jae(["\n  query getWaterConversionFactorsFilter($field: String!) {\n    getWaterConversionFactorsFilter(field: $field) {\n      label\n      value\n    }\n  }\n"])));function Kae(){const{currentTab:e}=(0,g.useContext)(Nre),n=oc(),t=function(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async t=>{try{const{data:{getWaterConversionFactorsFilter:n}}=await e.query({query:Hae,variables:{field:t.colDef.colId||t.colDef.field}}),a=n.map(e=>e.value).filter(e=>void 0!==e);t.success(a)}catch(e){n("Couldn't load filter values for column \"".concat(t.colDef.headerName,'"'),"warning")}},[e,n]);return(0,g.useMemo)(()=>({columnDefs:[{headerName:"DEFRA Year",field:"reportingYear",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},initialSort:"desc",headerTooltip:uae},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:pae},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:mae},{headerName:"Water Supply (kgCO2e)",field:"supplyKgCo2e",minWidth:100,filter:"agNumberColumnFilter",valueFormatter:ma},{headerName:"Water Treatment (kgCO2e)",field:"treatmentKgCo2e",minWidth:100,filter:"agNumberColumnFilter",valueFormatter:ma},{headerName:"Reference",field:"reference",cellRenderer:"reference",cellRendererParams:{icon:"external-link-alt"},minWidth:100,headerTooltip:yae}]}),[t])}(),[a,{error:r,refetch:i}]=(0,gs._)(Yae),o=(0,g.useCallback)(async e=>{try{const{startRow:n,sortModel:t,filterModel:r}=e.request,{data:{getWaterConversionFactors:{rows:i,totalRows:o}}}=await a({variables:{offset:n,limit:25,sort:oa(t),filters:ia(r)}});e.success({rowData:i,rowCount:o})}catch(n){throw e.fail(),n}},[a]),l=(0,g.useMemo)(()=>({getRows:o}),[o]);return(0,Ze.jsx)(Mne,{currentTab:e,index:n.configuration.factors.water,error:r,loading:!1,retry:i,children:(0,Ze.jsxs)("div",{className:"ag-theme-alpine",children:[(0,Ze.jsx)(Cae,{config:t,serverSideDatasource:l}),(0,Ze.jsx)(Bte,{}),(0,Ze.jsx)(Ete,{})]})})}var Qae,Zae;function Xae(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ere=(0,D.J1)(Qae||(Qae=Xae(["\n  query getHeatConversionFactors($filters: Filters, $limit: Int = 100, $offset: Int, $sort: [SortCommand!]) {\n    getHeatConversionFactors(filters: $filters, limit: $limit, offset: $offset, sort: $sort) {\n      rows {\n        id\n        reportingYear\n        reference\n\n        genKgCo2e\n        tdKgCo2e\n        wttGenKgCo2e\n        wttTdKgCo2e\n\n        genKgCo2\n        tdKgCo2\n\n        genKgCh4\n        tdKgCh4\n\n        genKgN2o\n        tdKgN2o\n\n        startDate\n        endDate\n      }\n      totalRows\n    }\n  }\n"]))),nre=(0,D.J1)(Zae||(Zae=Xae(["\n  query getHeatConversionFactorsFilter($field: String!) {\n    getHeatConversionFactorsFilter(field: $field) {\n      label\n      value\n    }\n  }\n"])));function tre(){const{currentTab:e}=(0,g.useContext)(Nre),n=oc(),t=function(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async t=>{try{const{data:{getHeatConversionFactorsFilter:n}}=await e.query({query:nre,variables:{field:t.colDef.colId||t.colDef.field}}),a=n.map(e=>e.value).filter(e=>void 0!==e);t.success(a)}catch(e){n("Couldn't load filter values for column \"".concat(t.colDef.headerName,'"'),"warning")}},[e,n]);return(0,g.useMemo)(()=>({columnDefs:[{headerName:"DEFRA Year",field:"reportingYear",filter:"agSetColumnFilter",filterParams:{values:t,valueFormatter:la},initialSort:"desc",headerTooltip:uae},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:pae},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:mae},{headerName:"Generation (kgCO2e)",field:"genKgCo2e",filter:"agNumberColumnFilter",valueFormatter:ma},{headerName:"Transmission & distribution (kgCO2e)",field:"tdKgCo2e",filter:"agNumberColumnFilter",valueFormatter:ma},{headerName:"WTT generation (kgCO2e)",field:"wttGenKgCo2e",filter:"agNumberColumnFilter",valueFormatter:ma},{headerName:"WTT transmission and distribution (kgCO2e)",field:"wttTdKgCo2e",filter:"agNumberColumnFilter",valueFormatter:ma},{headerName:"Generation (kgCO2)",field:"genKgCo2",filter:"agNumberColumnFilter",valueFormatter:ma,initialHide:!0},{headerName:"Generation (kgCH4)",field:"genKgCh4",filter:"agNumberColumnFilter",valueFormatter:ma,initialHide:!0},{headerName:"Generation (kgN2O)",field:"genKgN2o",filter:"agNumberColumnFilter",valueFormatter:ma,initialHide:!0},{headerName:"Transmission and distribution (kgCO2)",field:"tdKgCo2",filter:"agNumberColumnFilter",valueFormatter:ma,initialHide:!0},{headerName:"Transmission and distribution (kgCH4)",field:"tdKgCh4",filter:"agNumberColumnFilter",valueFormatter:ma,initialHide:!0},{headerName:"Transmission and distribution (kgN2O)",field:"tdKgN2o",filter:"agNumberColumnFilter",valueFormatter:ma,initialHide:!0},{headerName:"Reference",field:"reference",cellRenderer:"reference",cellRendererParams:{icon:"external-link-alt"},headerTooltip:yae}]}),[t])}(),[a,{error:r,refetch:i}]=(0,gs._)(ere),o=(0,g.useCallback)(async e=>{try{const{startRow:n,sortModel:t,filterModel:r}=e.request,{data:{getHeatConversionFactors:{rows:i,totalRows:o}}}=await a({variables:{offset:n,limit:25,sort:oa(t),filters:ia(r)}});e.success({rowData:i,rowCount:o})}catch(n){throw e.fail(),n}},[a]),l=(0,g.useMemo)(()=>({getRows:o}),[o]);return(0,Ze.jsx)(Mne,{currentTab:e,index:n.configuration.factors.heat,error:r,loading:!1,retry:i,children:(0,Ze.jsxs)("div",{className:"ag-theme-alpine",children:[(0,Ze.jsx)(Cae,{config:t,serverSideDatasource:l}),(0,Ze.jsx)(Gte,{})]})})}var are,rre;function ire(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ore=(0,D.J1)(are||(are=ire(["\n  query getRefrigerantConversionFactors($filters: Filters, $limit: Int = 100, $offset: Int, $sort: [SortCommand!]) {\n    getRefrigerantConversionFactors(filters: $filters, limit: $limit, offset: $offset, sort: $sort) {\n      rows {\n        id\n        reportingYear\n        startDate\n        endDate\n        reference\n        kgCO2e\n        gasName\n        gasGroupName\n      }\n      totalRows\n    }\n  }\n"]))),lre=(0,D.J1)(rre||(rre=ire(["\n  query getRefrigerantConversionFactorsFilter($field: String!) {\n    getRefrigerantConversionFactorsFilter(field: $field) {\n      label\n      value\n    }\n  }\n"])));function sre(){const{currentTab:e}=(0,g.useContext)(Nre),n=oc(),t=function(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async t=>{try{const{data:{getRefrigerantConversionFactorsFilter:n}}=await e.query({query:lre,variables:{field:t.colDef.colId||t.colDef.field}}),a=n.map(e=>e.value).filter(e=>void 0!==e);t.success(a)}catch(e){n("Couldn't load filter values for column \"".concat(t.colDef.headerName,'"'),"warning")}},[e,n]);return(0,g.useMemo)(()=>({columnDefs:[{headerName:"DEFRA Year",field:"reportingYear",filter:"agSetColumnFilter",filterParams:{values:t,valueFormatter:la},initialSort:"desc",headerTooltip:uae},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:pae},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:mae},{headerName:"Gas Type",field:"gasName",filter:"agSetColumnFilter",filterParams:{values:t,valueFormatter:la}},{headerName:"Gas Category",field:"gasGroupName",filter:"agSetColumnFilter",filterParams:{values:t,valueFormatter:la}},{headerName:"kgCO2e",field:"kgCO2e",filter:"agNumberColumnFilter",valueFormatter:ma},{headerName:"Unit",filter:"agNumberColumnFilter",valueGetter:()=>"kg",initialWidth:80},{headerName:"Reference",field:"reference",cellRenderer:"reference",cellRendererParams:{icon:"external-link-alt"},headerTooltip:yae}]}),[t])}(),[a,{error:r,refetch:i}]=(0,gs._)(ore),o=(0,g.useCallback)(async e=>{try{const{startRow:n,sortModel:t,filterModel:r}=e.request,{data:{getRefrigerantConversionFactors:{rows:i,totalRows:o}}}=await a({variables:{offset:n,limit:25,sort:oa(t),filters:ia(r)}});e.success({rowData:i,rowCount:o})}catch(n){throw e.fail(),n}},[a]),l=(0,g.useMemo)(()=>({getRows:o}),[o]);return(0,Ze.jsx)(Mne,{currentTab:e,index:n.configuration.factors.refrigerant,error:r,loading:!1,retry:i,children:(0,Ze.jsxs)("div",{className:"ag-theme-alpine",children:[(0,Ze.jsx)(Cae,{config:t,serverSideDatasource:l}),(0,Ze.jsx)(zte,{})]})})}var cre,dre;function ure(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const pre=(0,D.J1)(cre||(cre=ure(["\n  query getMaterialConversionFactors($filters: Filters, $limit: Int = 100, $offset: Int, $sort: [SortCommand!]) {\n    getMaterialConversionFactors(filters: $filters, limit: $limit, offset: $offset, sort: $sort) {\n      rows {\n        id\n        reportingYear\n        kgCO2e\n        startDate\n        endDate\n        material\n        origin\n        activity\n        reference\n      }\n      totalRows\n    }\n  }\n"]))),mre=(0,D.J1)(dre||(dre=ure(["\n  query getMaterialConversionFactorsFilter($field: String!) {\n    getMaterialConversionFactorsFilter(field: $field) {\n      label\n      value\n    }\n  }\n"])));function fre(){const{currentTab:e}=(0,g.useContext)(Nre),n=oc(),t=function(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async t=>{try{const{data:{getMaterialConversionFactorsFilter:n}}=await e.query({query:mre,variables:{field:t.colDef.colId||t.colDef.field}}),a=n.map(e=>e.value).filter(e=>void 0!==e);t.success(a)}catch(e){n("Couldn't load filter values for column \"".concat(t.colDef.headerName,'"'),"warning")}},[e,n]);return(0,g.useMemo)(()=>({columnDefs:[{headerName:"DEFRA Year",field:"reportingYear",filter:"agSetColumnFilter",filterParams:{values:t,valueFormatter:la},initialSort:"desc",headerTooltip:uae},{headerName:"kgCO2e",field:"kgCO2e",filter:"agNumberColumnFilter",valueFormatter:ma,headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:pae},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:mae},{headerName:"Material",field:"material",filter:"agSetColumnFilter",filterParams:{values:t,valueFormatter:la}},{headerName:"Origin",field:"origin",filter:"agSetColumnFilter",filterParams:{values:t,valueFormatter:la}},{headerName:"Activity",headerTooltip:"This shows if the activity falls under your organisation's direct (company owned emission sources) or indirect (non company owned, employee, contractor or third party emission sources) activities",field:"activity",filter:"agSetColumnFilter",filterParams:{values:t,valueFormatter:la}},{headerName:"Reference",field:"reference",cellRenderer:"reference",cellRendererParams:{icon:"external-link-alt"},headerTooltip:yae}]}),[t])}(),[a,{error:r,refetch:i}]=(0,gs._)(pre),o=(0,g.useCallback)(async e=>{try{const{startRow:n,sortModel:t,filterModel:r}=e.request,{data:{getMaterialConversionFactors:{rows:i,totalRows:o}}}=await a({variables:{offset:n,limit:25,sort:oa(t),filters:ia(r)}});e.success({rowData:i,rowCount:o})}catch(n){throw e.fail(),n}},[a]),l=(0,g.useMemo)(()=>({getRows:o}),[o]);return(0,Ze.jsx)(Mne,{currentTab:e,index:n.configuration.factors.material,error:r,loading:!1,retry:i,children:(0,Ze.jsxs)("div",{className:"ag-theme-alpine",children:[(0,Ze.jsx)(Cae,{config:t,serverSideDatasource:l}),(0,Ze.jsx)($te,{})]})})}var yre,gre;function bre(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hre=(0,D.J1)(yre||(yre=bre(["\n  query getHotelStaysConversionFactors($filters: Filters, $limit: Int = 100, $offset: Int, $sort: [SortCommand!]) {\n    getHotelStaysConversionFactors(filters: $filters, limit: $limit, offset: $offset, sort: $sort) {\n      rows {\n        id\n        reportingYear\n        type\n        unit\n        reference\n        startDate\n        endDate\n        country\n        kgCO2e\n      }\n      totalRows\n    }\n  }\n"]))),vre=(0,D.J1)(gre||(gre=bre(["\n  query getHotelStaysConversionFactorsFilter($field: String!) {\n    getHotelStaysConversionFactorsFilter(field: $field) {\n      label\n      value\n    }\n  }\n"])));function xre(e){let n,{value:t}=e;try{n=JSON.parse(t).value}catch(e){n=t}switch(n){case"HOTEL":default:return"Hotel";case"WORK_FROM_HOME":return"Work From Home"}}function Tre(){const{currentTab:e}=(0,g.useContext)(Nre),n=oc(),t=function(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async t=>{try{const{data:{getHotelStaysConversionFactorsFilter:n}}=await e.query({query:vre,variables:{field:t.colDef.colId||t.colDef.field}});t.success(n.map(e=>e.value?e.value:JSON.stringify(e)))}catch(e){n("Couldn't load filter values for column \"".concat(t.colDef.headerName,'"'),"warning")}},[e,n]);return(0,g.useMemo)(()=>({columnDefs:[{headerName:"DEFRA Year",field:"reportingYear",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},initialSort:"desc",headerTooltip:uae},{headerName:"Type",field:"type",filter:"agSetColumnFilter",minWidth:100,valueFormatter:xre,filterParams:{values:t,valueFormatter:xre},initialSort:"asc"},{headerName:"Country",field:"country",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la},initialSort:"asc"},{headerName:"Unit",field:"unit",filter:"agSetColumnFilter",minWidth:100,filterParams:{values:t,valueFormatter:la}},{headerName:"kgCO2e",field:"kgCO2e",minWidth:100,filter:"agNumberColumnFilter",filterParams:{values:t,valueFormatter:la},valueFormatter:ma},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",initialHide:!0,minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:pae},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",initialHide:!0,minWidth:100,filterParams:{values:t,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return Ht(n)},headerTooltip:mae},{headerName:"Reference",field:"reference",initialHide:!0,cellRenderer:"reference",cellRendererParams:{icon:"external-link-alt"},minWidth:100,headerTooltip:yae}]}),[t])}(),[a,{error:r,refetch:i}]=(0,gs._)(hre),o=(0,g.useCallback)(async e=>{try{const{startRow:n,sortModel:t,filterModel:r}=e.request,{data:{getHotelStaysConversionFactors:{rows:i,totalRows:o}}}=await a({variables:{offset:n,limit:25,sort:oa(t),filters:ia(r)}});e.success({rowData:i,rowCount:o})}catch(n){throw e.fail(),n}},[a]),l=(0,g.useMemo)(()=>({getRows:o}),[o]);return(0,Ze.jsx)(Mne,{currentTab:e,index:n.configuration.factors.hotelStays,error:r,loading:!1,retry:i,children:(0,Ze.jsxs)("div",{className:"ag-theme-alpine",children:[(0,Ze.jsx)(Cae,{config:t,serverSideDatasource:l}),(0,Ze.jsx)(Ete,{})]})})}var Ore;function kre(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jre(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kre(Object(t),!0).forEach(function(n){Cre(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kre(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cre(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Sre=(0,Ge.default)(ze.fv)(Ore||(Ore=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  height: 100%;\n"]))),Nre=(0,g.createContext)({error:void 0,loading:void 0,currentTab:void 0,retry:()=>{}});function wre(){const e=oc(),n=function(e){const{pathname:n}=(0,m.zy)(),t=n.includes("v2");for(let a=0;a<e.length;a+=1){const r=t?"/v2".concat(e[a]):e[a];if(null!==(0,uf.B6)(r,n))return e[a]}return null}(Object.values(e.configuration.factors))||e.configuration.factors.gas,t={currentTab:n,retry:()=>window.location.reload()};return(0,Ze.jsxs)(Sre,{children:[(0,Ze.jsx)(bh,{name:"ConfigurationContractorsContainer__Controls",icon:"recycle",iconColor:"primary",title:"Location Based Emission Factors"}),(0,Ze.jsxs)(ze.tU,{variant:"scrollable",scrollButtons:"auto",value:n,children:[(0,Ze.jsx)(ze.oz,{label:"Gas",value:e.configuration.factors.gas,to:e.configuration.factors.gas,component:p.Link}),(0,Ze.jsx)(ze.oz,{label:"Electricity",value:e.configuration.factors.electricity,to:e.configuration.factors.electricity,component:p.Link}),(0,Ze.jsx)(ze.oz,{label:"Water",value:e.configuration.factors.water,to:e.configuration.factors.water,component:p.Link}),(0,Ze.jsx)(ze.oz,{label:"Waste",value:e.configuration.factors.waste,to:e.configuration.factors.waste,component:p.Link}),(0,Ze.jsx)(ze.oz,{label:"Transport",value:e.configuration.factors.transport,to:e.configuration.factors.transport,component:p.Link}),(0,Ze.jsx)(ze.oz,{label:"Fuel",value:e.configuration.factors.fuel,to:e.configuration.factors.fuel,component:p.Link}),(0,Ze.jsx)(ze.oz,{label:"Heat & Steam",value:e.configuration.factors.heat,to:e.configuration.factors.heat,component:p.Link}),(0,Ze.jsx)(ze.oz,{label:"Refrigerants & Other gasses",value:e.configuration.factors.refrigerant,to:e.configuration.factors.refrigerant,component:p.Link}),(0,Ze.jsx)(ze.oz,{label:"Hotel stays & Home Working",value:e.configuration.factors.hotelStays,to:e.configuration.factors.hotelStays,component:p.Link}),(0,Ze.jsx)(ze.oz,{label:"Material",value:e.configuration.factors.material,to:e.configuration.factors.material,component:p.Link})]}),(0,Ze.jsxs)(Nre.Provider,{value:t,children:[(0,Ze.jsx)(Bae,{}),(0,Ze.jsx)($ae,{}),(0,Ze.jsx)(Kae,{}),(0,Ze.jsxs)(Mne,jre(jre({},t),{},{index:e.configuration.factors.waste,children:[(0,Ze.jsx)(iae,{}),(0,Ze.jsx)(Ete,{})]})),(0,Ze.jsx)(Sae,{}),(0,Ze.jsx)(Pae,{}),(0,Ze.jsx)(tre,{}),(0,Ze.jsx)(sre,{}),(0,Ze.jsx)(Tre,{}),(0,Ze.jsx)(fre,{})]})]})}function Dre(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Are(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dre(Object(t),!0).forEach(function(n){Rre(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dre(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Rre(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Pre(){const e=rt();return{accountId:rc().data.includes("getMarketCarbonConversionFactorAll")?null:e}}function Lre(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ire(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Lre(Object(t),!0).forEach(function(n){Ere(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Lre(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ere(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const _re=(e,n)=>{const t={value:null,label:"(No supplier)"};if(!e&&n)return[t];const a=Gt()(e).map(e=>({value:e.id,label:e.name})).orderBy(["label"],["asc"]).value();return n&&a.unshift(t),a},Fre=()=>!0;function Bre(e){var n;let{value:t,error:a,name:r,onChange:i,accountId:o,utility:l,filter:s=Fre,includeEmpty:c=!1,isClearable:d=!0}=e;const u=(0,N.m)(),p={accountId:o,utility:l===Vt.D_.Heatsteam?Vt.D_.Electricity:null==l?void 0:l.toUpperCase(),filterValue:"",filterBy:"name",pageSize:Za,page:1},{data:m,loading:f,error:y}=(0,h.IT)(xf,{variables:p,fetchPolicy:"network-only"});let g=(null==m||null===(n=m.getSuppliers)||void 0===n?void 0:n.suppliers)||[];const b=g.filter(s),v=_re(b,c),x=a?"string"==typeof a?a:a.message:(null==y?void 0:y.message)||null;return(0,Ze.jsx)(ze.l6,{name:r,placeholder:f?"Loading suppliers...":"Start typing to view suppliers...",value:t,loadOptions:async e=>{try{var n;const t=await u.query({query:xf,variables:Ire(Ire({},p),{},{filterValue:e})}),{suppliers:a,totalItemCount:r}=null===(n=t.data)||void 0===n?void 0:n.getSuppliers;return g=a||[],{options:_re(g.filter(s)||[],c),total:r}}catch(e){return{options:[],total:0}}},debounceTimeout:1e3,defaultOptions:v,options:v,error:x,onChange:e=>{const n=g.find(n=>n.id===e.target.value);n&&i(Ire(Ire({},e),{},{entity:n}))},classPrefix:"supplier-select",isClearable:d,isLoading:f})}function Ure(e){return e?{id:e.id,supplierId:e.supplierId,tariff:e.tariff,renewablePercentage:e.renewablePercentage,generationFactor:e.generationFactor,wellToTankForGenerationFactor:e.wellToTankForGenerationFactor,wellToTankForTransmissionAndDistributionFactor:e.wellToTankForTransmissionAndDistributionFactor,transmissionAndDistributionFactor:e.transmissionAndDistributionFactor,startDate:e.startDate,endDate:e.endDate,isGlobal:e.isGlobal,accountIds:e.accountIds,reference:e.reference,notes:e.notes}:{id:(0,Ai.A)(),supplierId:"",tariff:"",renewablePercentage:0,generationFactor:0,wellToTankForGenerationFactor:0,wellToTankForTransmissionAndDistributionFactor:0,transmissionAndDistributionFactor:0,startDate:Fa().toISOString(),endDate:Wt()().add(1,"year").toISOString(),isGlobal:!0,accountIds:[],reference:"",notes:""}}function Mre(e){const n={};return e.supplierId||(n.supplierId="Supplier should be selected"),e.tariff||(n.tariff="Tariff shouldn't be empty"),("number"!=typeof e.renewablePercentage||e.renewablePercentage<0||e.renewablePercentage>100)&&(n.renewablePercentage="Renewable (%) should be not greater than 100 or less 0"),n}var Vre,zre,Gre,$re,Wre;function qre(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Jre(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qre(Object(t),!0).forEach(function(n){Yre(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qre(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Yre(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Hre(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Kre=(0,Ge.default)(ze.fv)(Vre||(Vre=Hre(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),Qre=(0,Ge.default)(ze.JU)(zre||(zre=Hre(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Zre=Ge.default.div(Gre||(Gre=Hre(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),Xre=(0,Ge.default)(ze.DZ)($re||($re=Hre(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),eie=(0,Ge.default)(ze.fv)(Wre||(Wre=Hre(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing);function nie(e){let{heading:n,isSubmitting:t,onChange:a,values:r,errors:i,setErrors:o}=e;const l=rt(),s=e=>{let{target:n}=e;const t=n.name,l="checkbox"===n.type?n.checked:"number"===n.type?parseFloat(n.value):n.value,s=Jre(Jre({},r),{},{[t]:l});if(Object.keys(i).length){const e=Mre(s);o(e)}a(s)};return(0,Ze.jsxs)(Kre,{span:12,container:!0,children:[(0,Ze.jsx)(Xre,{size:"lg",children:n}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Tariff"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:s,name:"tariff",value:r.tariff,error:i.tariff,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Supplier"})}),(0,Ze.jsx)(Bre,{value:r.supplierId,name:"supplierId",accountId:l,utility:Vt.D_.Electricity,onChange:s,error:i.supplierId,includeEmpty:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Renewable (%)"})}),(0,Ze.jsx)(ze.ks,{type:"number",min:0,max:100,name:"renewablePercentage",value:r.renewablePercentage,onChange:s,error:i.renewablePercentage})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Generation (kgCO2e)"})}),(0,Ze.jsx)(ze.ks,{type:"number",value:r.generationFactor,name:"generationFactor",onChange:s,error:i.generationFactor})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Well-to-Tank (Generation) (kgCO2e)"})}),(0,Ze.jsx)(ze.ks,{type:"number",value:r.wellToTankForGenerationFactor,name:"wellToTankForGenerationFactor",onChange:s,error:i.wellToTankForGenerationFactor})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Well-to-Tank (T&D) (kgCO2e)"})}),(0,Ze.jsx)(ze.ks,{type:"number",value:r.wellToTankForTransmissionAndDistributionFactor,name:"wellToTankForTransmissionAndDistributionFactor",onChange:s,error:i.wellToTankForTransmissionAndDistributionFactor})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Transmission & Distribution (kgCO2e)"})}),(0,Ze.jsx)(ze.ks,{type:"number",value:r.transmissionAndDistributionFactor,name:"transmissionAndDistributionFactor",onChange:s,error:i.transmissionAndDistributionFactor})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Start Date"})}),(0,Ze.jsx)(ze.lr,{placeholder:"Select start date",name:"startDate",disabled:t,onDayClick:e=>{a(Jre(Jre({},r),{},{startDate:e.toISOString()}))},selectedDate:r.startDate?new Date(r.startDate):null})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"End Date"})}),(0,Ze.jsx)(ze.lr,{placeholder:"Select end date",name:"endDate",disabled:t,onDayClick:e=>{a(Jre(Jre({},r),{},{endDate:e.toISOString()}))},selectedDate:r.endDate?new Date(r.endDate):null})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Reference"})}),(0,Ze.jsx)(ze.ks,{value:r.reference,name:"reference",onChange:s})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Notes"})}),(0,Ze.jsx)(ze.ks,{value:r.notes,name:"notes",onChange:s})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Visible to All Accounts"})}),(0,Ze.jsx)(ze.Sc,{name:"isGlobal",checked:r.isGlobal,onChange:s})]})}),!r.isGlobal&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(eie,{item:!0,children:[(0,Ze.jsx)(Zre,{children:(0,Ze.jsx)(Qre,{children:"Select Accounts"})}),(0,Ze.jsx)(Kh,{name:"accountIds",value:r.accountIds,onChange:e=>{a(Jre(Jre({},r),{},{accountIds:e.map(e=>{let{id:n}=e;return n})}))},isMulti:!0})]})})]})}var tie,aie;function rie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function iie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rie(Object(t),!0).forEach(function(n){oie(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rie(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function oie(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function lie(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const sie=(0,Ge.default)(ze.fI)(tie||(tie=lie(["\n  justify-content: space-between;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),cie=(0,Ge.default)(ze.fv)(aie||(aie=lie(["\n  max-width: 48%;\n  flex-grow: 0;\n"])));function die(e){let{factor:n,onDismiss:t,onComplete:a}=e;const[r,i]=(0,g.useState)(n),[o,l]=(0,g.useState)({}),[s]=function(e){let{onComplete:n}=e;const t=Pre();return(0,Ot.n)(Z7,{update:(e,a)=>{var r;const i=null===(r=a.data)||void 0===r?void 0:r.updateMarketCarbonConversionFactor;if(i){const a=e.readQuery({query:K7,variables:t}),r=((null==a?void 0:a.getMarketCarbonConversionFactors)||[]).map(e=>e.id===i.id?i:e);e.writeQuery({query:K7,variables:t,data:{getMarketCarbonConversionFactors:r}}),n(r)}}})}({onComplete:a}),[c]=function(e){let{onComplete:n}=e;const t=Pre();return(0,Ot.n)(X7,{update:(e,a)=>{var r;const i=null===(r=a.data)||void 0===r?void 0:r.deleteMarketCarbonConversionFactor;e.writeQuery({query:K7,variables:t,data:{getMarketCarbonConversionFactors:i}}),n(i)}})}({onComplete:a}),{showNotification:d}=vt();return(0,Ze.jsxs)(ze.aF,{size:"md",onDismiss:t,show:!0,children:[(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(nie,{heading:"Edit Market Based Emission Factors",isSubmitting:!1,onChange:e=>i(n=>iie(iie({},n),e)),values:r,errors:o,setErrors:l})}),(0,Ze.jsxs)(sie,{container:!0,children:[(0,Ze.jsx)(cie,{item:!0,span:6,children:(0,Ze.jsx)(ze.$n,{color:"danger",onClick:async()=>{if(window.confirm("Are you sure you want to delete this Tariff?"))try{await c({variables:{id:r.id}}),d("Tariff has been deleted","success")}catch(e){d(e.message,"danger")}},children:"Delete"})}),(0,Ze.jsx)(cie,{item:!0,span:6,children:(0,Ze.jsx)(ze.$n,{color:"success",onClick:async()=>{try{const e=Mre(r);if(Object.keys(e).length)return l(e);await s({variables:{factor:r}}),d("Tariff has been edited","success")}catch(e){d(e.message,"danger")}},children:"Edit"})})]})]})}function uie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uie(Object(t),!0).forEach(function(n){mie(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uie(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mie(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const fie=[{headerName:"Supplier",field:"supplierName",filter:"agSetColumnFilter",resizable:!0,tooltipField:"supplierName"},{headerName:"Tariff",field:"tariff",filter:"agSetColumnFilter",sort:"asc",resizable:!0,tooltipField:"tariff"},{headerName:"Renewable (%)",field:"renewablePercentage",valueFormatter:e=>{let{value:n}=e;return"".concat(n,"%")},filter:"agNumberColumnFilter"},{headerName:"Generation (kgCO2e)",filter:"agNumberColumnFilter",field:"generationFactor"},{headerName:"WTT (Generation) (kgCO2e)",filter:"agNumberColumnFilter",field:"wellToTankForGenerationFactor"},{headerName:"WTT (T&D) (kgCO2e)",filter:"agNumberColumnFilter",field:"wellToTankForTransmissionAndDistributionFactor"},{headerName:"Transmission & Distribution (kgCO2e)",filter:"agNumberColumnFilter",field:"transmissionAndDistributionFactor"},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",filterParams:{comparator:na},valueFormatter:e=>{let{value:n}=e;return Ht(n)}},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",filterParams:{comparator:na},valueFormatter:e=>{let{value:n}=e;return Ht(n)}},{headerName:"Reference",field:"reference",cellRenderer:"link",filter:"agSetColumnFilter",resizable:!0,tooltipField:"reference"},{headerName:"Notes",field:"notes",filter:"agSetColumnFilter"},{headerName:"Edit",cellRenderer:"edit",filter:!1,sortable:!1}];function yie(e){let{factors:n,editAllowed:t,agGrid:a}=e;const[r,i]=(0,g.useState)(null),o={edit:e=>(0,Ze.jsx)(BJ,pie(pie({},e),{},{onEdit:(e,n)=>{const t=Ure(n);i(t)}})),link:VJ};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(nD,{onColumnVisible:a.onSaveGridColumnState,onColumnPinned:a.onSaveGridColumnState,onColumnResized:a.onSaveGridColumnState,onColumnMoved:a.onSaveGridColumnState,onColumnRowGroupChanged:a.onSaveGridColumnState,onColumnValueChanged:a.onSaveGridColumnState,onColumnPivotChanged:a.onSaveGridColumnState,onDestroy:a.onDestroy,onGridReady:e=>{a.onGridReady(e)},components:o,columnDefs:t?fie:fie.filter(e=>"Edit"!==e.headerName),rowData:n}),r&&(0,Ze.jsx)(die,{factor:r,onComplete:e=>{var n;null===(n=a.api)||void 0===n||n.setGridOption("rowData",e),i(null)},onDismiss:()=>i(null)})]})}var gie;const bie=(0,Ge.default)(ze.fI)(gie||(gie=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing);function hie(e){let{onDismiss:n,onComplete:t}=e;const[a,r]=(0,g.useState)(Ure(null)),[i,o]=(0,g.useState)({}),[l]=function(e){let{onComplete:n}=e;const t=Pre();return(0,Ot.n)(Q7,{update:(e,a)=>{var r;const i=null===(r=a.data)||void 0===r?void 0:r.createMarketCarbonConversionFactor;if(i){const a=e.readQuery({query:K7,variables:t}),r=((null==a?void 0:a.getMarketCarbonConversionFactors)||[]).concat([i]);e.writeQuery({query:K7,variables:t,data:{getMarketCarbonConversionFactors:r}}),n(r)}}})}({onComplete:t}),{showNotification:s}=vt();return(0,Ze.jsxs)(ze.aF,{size:"md",onDismiss:n,show:!0,children:[(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(nie,{heading:"Market Based Emission Factors",isSubmitting:!1,onChange:r,values:a,errors:i,setErrors:o})}),(0,Ze.jsx)(bie,{container:!0,children:(0,Ze.jsx)(ze.fv,{item:!0,span:12,children:(0,Ze.jsx)(ze.$n,{color:"success",onClick:async()=>{try{const e=Mre(a);if(Object.keys(e).length)return o(e);await l({variables:{factor:a}}),s("Tariff has been created","success")}catch(e){s(e.message,"danger")}},children:"Create"})})})]})}var vie,xie,Tie;function Oie(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const kie=(0,Ge.default)(ze.fv)(vie||(vie=Oie(["\n  display: flex;\n  height: 100%;\n"]))),jie=(0,Ge.default)(ze.fv)(xie||(xie=Oie(["\n  justify-content: flex-end;\n"]))),Cie=(0,Ge.default)(ze.$n)(Tie||(Tie=Oie(["\n  align-self: flex-end;\n  width: 200px;\n"])));function Sie(){const[e,n]=(0,g.useState)(0),[t,a]=(0,g.useState)(!1),{loading:r,data:i,error:o,refetch:l}=function(){const e=Pre(),n=(0,h.IT)(K7,{variables:e,skip:rc().loading,notifyOnNetworkStatusChange:!0,fetchPolicy:"cache-and-network"});return Are(Are({},n),{},{refetch:()=>n.refetch(e)})}(),s=(null==i?void 0:i.getMarketCarbonConversionFactors)||[],c=rc(),d=Dd(),u=c.data.includes("createMarketCarbonConversionFactorAll");return(0,Ze.jsxs)(kie,{children:[(0,Ze.jsx)(bh,{name:"MarketBasedCarbonConversionFactors__Controls",icon:"recycle",iconColor:"primary",title:"Market Based Emission Factors",children:(0,Ze.jsx)(jie,{span:6,container:!0,children:u&&(0,Ze.jsx)(Cie,{onClick:()=>{a(!0)},children:"+ Electricity Tariff"})})}),(0,Ze.jsx)(ze.tU,{variant:"fullWidth",value:e,onChange:(e,t)=>n(t),children:(0,Ze.jsx)(ze.oz,{label:"Electricity"})}),(0,Ze.jsx)(Mne,{error:o,loading:r,currentTab:e,index:0,retry:l,children:(0,Ze.jsx)(yie,{agGrid:d,editAllowed:u,factors:s})}),t&&(0,Ze.jsx)(hie,{onComplete:e=>{var n;null===(n=d.api)||void 0===n||n.setGridOption("rowData",e),a(!1)},onDismiss:()=>{a(!1)}})]})}var Nie,wie,Die=t(13380),Aie=t.n(Die),Rie=t(24931),Pie=t.n(Rie);function Lie(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Iie=(0,D.J1)(Nie||(Nie=Lie(["\n  {\n    getAllUnits {\n      id\n      name\n    }\n  }\n"]))),Eie=(0,D.J1)(wie||(wie=Lie(["\n  mutation CreateContainerType($input: CreateContainerTypeInput!) {\n    createContainerType(input: $input) {\n      ...ContainerTypeFields\n    }\n  }\n  ","\n"])),Aie());var _ie,Fie;function Bie(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Uie=(0,Ge.default)(ze.fI)(_ie||(_ie=Bie(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.light.background,e=>{if(e.action)return"background-color: ".concat(e.theme.colors.warning.highlight.background,";")}),Mie=(0,Ge.default)(ze.fv)(Fie||(Fie=Bie(["\n  padding: ",";\n  word-break: break-all;\n  flex: 1;\n"])),e=>e.theme.geometry.md.profile.padding),Vie=(e,n,t)=>e[n]&&"function"==typeof e[n].format?e[n].format(t[n]):t[n];function zie(e){let{containerType:n,config:t}=e;return(0,Ze.jsx)(Uie,{container:!0,children:Object.keys(t).map(e=>(0,Ze.jsx)(Mie,{item:!0,span:t[e].width,children:(0,Ze.jsx)(ze.EY,{children:Vie(t,e,n)})},e))})}const Gie={name:{columnName:"Name",width:4},volume:{columnName:"Volume",width:4,format:e=>null===e?"-":bi()(e,4)},unit:{columnName:"Unit",width:4}};var $ie,Wie;function qie(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Jie=(0,Ge.default)(ze.fI)($ie||($ie=qie(["\n  padding: ",";\n  background: ",";\n  border-bottom: 1px solid ",";\n  border-top: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.sm.spacing," ").concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.light.background,e=>e.theme.colors.text.light.background,e=>e.theme.colors.text.light.background),Yie=Ge.default.div(Wie||(Wie=qie(["\n  flex: 1 1 auto;\n  overflow: scroll;\n"])));function Hie(e,n){return ka(e.name,n.name)}function Kie(e){let{typeSizes:n,config:t=Gie}=e;return(0,Ze.jsxs)(g.Fragment,{children:[(0,Ze.jsx)(Jie,{align:"between",container:!0,children:Object.keys(t).map(e=>(0,Ze.jsx)(ze.fv,{item:!0,span:t[e].width,children:(0,Ze.jsx)(ze.EY,{weight:"bold",children:t[e].columnName})},e))}),(0,Ze.jsx)(Yie,{children:n.slice().sort(Hie).map(e=>(0,Ze.jsx)(zie,{containerType:e,config:t},e.id))})]})}var Qie,Zie,Xie,eoe,noe,toe,aoe;function roe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ioe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?roe(Object(t),!0).forEach(function(n){ooe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):roe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ooe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function loe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const soe=Ge.default.form(Qie||(Qie=loe(["\n  min-height: 50vh;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),coe=(0,Ge.default)(ze.JU)(Zie||(Zie=loe(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),doe=Ge.default.div(Xie||(Xie=loe(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),uoe=(0,Ge.default)(ze.DZ)(eoe||(eoe=loe(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),poe=(0,Ge.default)(ze.fv)(noe||(noe=loe(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),moe=(0,Ge.default)(ze.fI)(toe||(toe=loe(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.xs.spacing),foe=(0,Ge.default)(ze.fv)(aoe||(aoe=loe(["\n  padding: 0 ",";\n"])),e=>e.theme.geometry.xs.spacing);function yoe(e){let{onDismiss:n,onCompleted:t,onError:a}=e;const[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)({name:"",volume:0,volumeUnitId:null}),[s,c]=(0,g.useState)({}),[d]=(0,Ot.n)(Eie,{onError:a,onCompleted:t}),{data:u}=(0,h.IT)(Iie),p=(null==u?void 0:u.getAllUnits)||[];return(0,Ze.jsx)(ze.aF,{onDismiss:n,size:"md",show:!0,height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(soe,{children:[(0,Ze.jsx)(uoe,{size:"lg",children:"Add Container Type"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(poe,{item:!0,children:[(0,Ze.jsx)(doe,{children:(0,Ze.jsx)(coe,{children:"Container Name"})}),(0,Ze.jsx)(ze.ks,{disabled:r,onChange:e=>{e.target.value&&c(ioe(ioe({},s),{},{name:null})),l(ioe(ioe({},o),{},{name:e.target.value}))},name:"name",value:o.name,error:s.name,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(poe,{item:!0,children:[(0,Ze.jsx)(doe,{children:(0,Ze.jsx)(coe,{children:"Volume"})}),(0,Ze.jsx)(ze.ks,{name:"volume",type:"number",disabled:r,onChange:e=>{e.target.value&&c(ioe(ioe({},s),{},{volume:null})),l(ioe(ioe({},o),{},{volume:e.target.value}))},value:o.volume,error:s.volume})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(poe,{item:!0,children:[(0,Ze.jsx)(doe,{children:(0,Ze.jsx)(coe,{children:"Unit"})}),(0,Ze.jsx)(ze.l6,{name:"volumeUnitId",disabled:r,error:s.volumeUnitId,onChange:e=>{e.target.select.value&&c(ioe(ioe({},s),{},{volumeUnitId:null})),l(ioe(ioe({},o),{},{volumeUnitId:e.target.select.value}))},value:o.volumeUnitId,options:p.map(e=>({value:e.id,label:e.name}))})]})}),(0,Ze.jsxs)(moe,{container:!0,children:[(0,Ze.jsx)(foe,{container:!0,item:!0,children:(0,Ze.jsx)(ze.$n,{color:"info",onClick:n,children:"Cancel"})}),(0,Ze.jsx)(foe,{container:!0,item:!0,children:(0,Ze.jsx)(ze.$n,{type:"button",onClick:async()=>{const e=function(e){const n={};return e.name||(n.name="Name is required"),e.volume||(n.volume="Volume is required"),parseFloat(e.volume,10)>0||(n.volume="Volume should be greater than 0"),e.volumeUnitId||(n.volumeUnitId="Please select a unit"),n}(o);if(Object.keys(e).length)return c(e);i(!0),await d({variables:{input:{id:(0,Ai.A)(),name:o.name,volume:parseFloat(o.volume,10),volumeUnitId:o.volumeUnitId}}}),i(!1)},children:"Add"})})]})]})})}var goe,boe,hoe,voe,xoe;function Toe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ooe=(0,Ge.default)(ze.fv)(goe||(goe=Toe(["\n  display: flex;\n  height: 100%;\n"]))),koe=(0,Ge.default)(ze.vj)(boe||(boe=Toe(["\n  flex: 1;\n"]))),joe=(0,Ge.default)(ze.fI)(hoe||(hoe=Toe(["\n  flex: 1;\n  min-width: 400px;\n"]))),Coe=(0,Ge.default)(ze.fv)(voe||(voe=Toe(["\n  padding: 0 ",";\n"])),e=>e.theme.geometry.xs.spacing),Soe=(0,Ge.default)(ze.fv)(xoe||(xoe=Toe(["\n  display: flex;\n  flex: 1;\n  justify-content: center;\n  align-items: center;\n  width: 100%;\n  height: auto;\n"])));function Noe(){const{data:e,loading:n,error:t,refetch:a}=(0,h.IT)(Pie()),r=e&&e.getContainerTypes?e.getContainerTypes:[],[i,o]=(0,g.useState)(null),l=function(e){const n=[];for(const t of e)for(const e of t.sizes)n.push({id:"".concat(t.id,"_").concat(e.id),name:t.name,volume:e.volume,unit:e.volumeUnit?e.volumeUnit.name:"-"});return n}(r),[s,c,d]=hf(l,["name","unit","volume"]),[u,p]=(0,g.useState)(!1),m=rc().data.includes("createContainerTypeAll");return(0,Ze.jsxs)(Ooe,{children:[u&&(0,Ze.jsx)(yoe,{onDismiss:()=>p(!1),onError:e=>o({message:e.message,color:"danger"}),onCompleted:()=>{p(!1),o({message:"Container has been created!",color:"success"}),a()}}),i&&(0,Ze.jsx)(ze.Eg,{name:i.message,color:i.color,show:!0,children:i.message}),(0,Ze.jsx)(bh,{icon:"dumpster",iconColor:"primary",title:"Container Types",children:(0,Ze.jsxs)(joe,{container:!0,children:[(0,Ze.jsx)(ze.fv,{span:m?6:12,container:!0,item:!0,children:(0,Ze.jsx)(koe,{value:s,onChange:e=>c(e.target.value),onSearch:e=>c(e.target.value),hideButton:!0})}),m&&(0,Ze.jsx)(Coe,{container:!0,item:!0,span:6,children:(0,Ze.jsx)(ze.$n,{onClick:()=>p(!0),children:"+ Add Container Type"})})]})}),t?(0,Ze.jsx)(ub,{error:t,retry:a}):n?(0,Ze.jsx)(Soe,{children:(0,Ze.jsx)(ze.Ip,{})}):(0,Ze.jsx)(Kie,{typeSizes:d})]})}var woe,Doe;function Aoe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Roe=(0,D.J1)(woe||(woe=Aoe(["\n  query GetAllLegislation($accountId: ID!) {\n    getAllLegislation(accountId: $accountId) {\n      id\n      title\n    }\n  }\n"]))),Poe=(0,D.J1)(Doe||(Doe=Aoe(["\n  mutation createLegislation($legislation: LegislationInput, $userId: ID!, $accountId: ID!) {\n    createLegislation(input: { legislation: $legislation, userId: $userId, accountId: $accountId }) {\n      id\n      title\n    }\n  }\n"])));var Loe,Ioe;function Eoe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _oe=(0,Ge.default)(ze.fI)(Loe||(Loe=Eoe(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),Foe=(0,Ge.default)(ze.Y3)(Ioe||(Ioe=Eoe(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),Boe=e=>{let{id:n,title:t,path:a}=e;return(0,Ze.jsx)(XN,{name:"configuration-menu__item--contractors",to:"".concat(a,"/").concat(n),children:(0,Ze.jsxs)(_oe,{name:"legislation-row--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(Foe,{name:"legislation-row__profile-picture--".concat(n),size:"xs",accountName:t}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"legislation-row__name--".concat(n),size:"md",children:t})})]})})},Uoe=JSON.parse('[{"label":"England","value":"ENG"},{"label":"Northern Ireland","value":"NIR"},{"label":"Scotland","value":"SCO"},{"label":"Wales","value":"WAL"},{"label":"Europe","value":"EUR"}]'),Moe=e=>{let{value:n,onChange:t}=e;return(0,Ze.jsx)(ze.KF,{name:"countries",placeholder:"Select applicable countires...",multiValueColor:"tertiary",value:n,options:Uoe,onChange:t})};var Voe,zoe,Goe,$oe;function Woe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function qoe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Woe(Object(t),!0).forEach(function(n){Joe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Woe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Joe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Yoe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Hoe=(0,Ge.default)(ze.JU)(Voe||(Voe=Yoe(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Koe=Ge.default.div(zoe||(zoe=Yoe(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),Qoe=(0,Ge.default)(ze.DZ)(Goe||(Goe=Yoe(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Zoe=(0,Ge.default)(ze.fv)($oe||($oe=Yoe(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Xoe=e=>{let{heading:n,isSubmitting:t,legislation:a,setLegislation:r}=e;const i=e=>{r(qoe(qoe({},a),{},{[e.target.name]:e.target.value}))};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Qoe,{size:"lg",children:n}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Zoe,{item:!0,children:[(0,Ze.jsx)(Koe,{children:(0,Ze.jsx)(Hoe,{children:"Legislation Title"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"title",value:a.title,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Zoe,{item:!0,children:[(0,Ze.jsx)(Koe,{children:(0,Ze.jsx)(Hoe,{children:"Synopsis"})}),(0,Ze.jsx)(ze.fs,{size:"lg",disabled:t,onChange:e=>i(e),name:"synopsis",value:a.synopsis,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Zoe,{item:!0,children:[(0,Ze.jsx)(Koe,{children:(0,Ze.jsx)(Hoe,{children:"Links (Comma Seperated)"})}),(0,Ze.jsx)(ze.fs,{size:"lg",disabled:t,onChange:e=>i(e),name:"links",value:a.links,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Zoe,{item:!0,children:[(0,Ze.jsx)(Koe,{children:(0,Ze.jsx)(Hoe,{children:"Countries"})}),(0,Ze.jsx)(Moe,{name:"countries",onChange:e=>{i({target:{value:e.target.select,name:"countries"}})},value:a.countries})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Zoe,{item:!0,children:[(0,Ze.jsx)(Koe,{children:(0,Ze.jsx)(Hoe,{children:"Gov API Path (e.g “/asp/2003/3“)"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"apiData",value:a.apiData,box:!0})]})})]})},ele=e=>{const n=!!e.title,t=!!e.synopsis,a=!!e.links.length,r=!!e.countries.length;return n&&t&&a&&r};var nle,tle;function ale(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function rle(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ale(Object(t),!0).forEach(function(n){ile(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ale(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ile(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ole(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const lle=Ge.default.div(nle||(nle=ole(["\n  padding: 20px;\n"]))),sle=(0,Ge.default)(ze.fv)(tle||(tle=ole(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),cle=e=>{let{onDismiss:n,onComplete:t}=e;const a=ms(),r=rt(),[i]=(0,Ot.n)(Poe,{onCompleted:()=>{t({message:"Legislation has been created.",colour:"success"}),n()},onError:()=>{t({message:"Something went wrong! Please try again later.",colour:"danger"})}}),[o,l]=(0,g.useState)({title:"",synopsis:"",links:"",countries:[],apiData:""}),s=e=>rle(rle({id:(0,Ai.A)()},e),{},{countries:e.countries.map(e=>e.value),links:e.links.split(","),isActive:!0,type:"LEGAL",apiData:{path:e.apiData}});return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,onDismiss:()=>n(),children:(0,Ze.jsxs)(lle,{children:[(0,Ze.jsx)(Xoe,{heading:"Create New Legislation",legislation:o,setLegislation:l}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(sle,{item:!0,children:(0,Ze.jsx)(ze.$n,{disabled:!ele(s(o)),onClick:()=>{i({variables:{legislation:rle({},s(o)),userId:a,accountId:r}})},children:"Submit"})})})]})})};var dle,ule,ple;function mle(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const fle=Ge.default.div(dle||(dle=mle(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),yle=Ge.default.div(ule||(ule=mle(["\n  display: flex;\n  align-items: center;\n  justify-content: space-evenly;\n  width: 100%;\n"]))),gle=Ge.default.div(ple||(ple=mle(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),ble=e=>{let{accountId:n}=e;const[t,a]=(0,g.useState)(""),[r,i]=(0,g.useState)(!1),{pathname:o}=(0,m.zy)(),[l,s]=(0,g.useState)(null),{data:c,loading:d}=(0,h.IT)(Roe,{variables:{accountId:n}}),u=c?((e,n)=>{if(!n)return e;const t=new gf.vj("id");return t.addIndex("title"),t.addDocuments(e),t.search(n)})(c.getAllLegislation,t):[];return(0,Ze.jsxs)(fle,{children:[(0,Ze.jsx)(ze.fv,{name:"ConfigurationLegislationContainer",container:!0,fullHeight:!0,children:(0,Ze.jsx)(bh,{name:"ConfigurationLegislationContainer__Controls",icon:"pencil-alt",iconColor:"tertiary",title:"Legislation",children:(0,Ze.jsxs)(yle,{children:[(0,Ze.jsx)(ze.vj,{name:"ConfigurationLegislationContainer__Controls__Search",value:t,onChange:e=>a(e.target.value),hideButton:!0}),(0,Ze.jsx)(ze.$n,{name:"ConfigurationLegislationContainer__Controls__Button--add",color:"primary",inline:!0,component:"button",onClick:()=>i(!0),children:"+ Add Legislation"})]})})}),l&&(0,Ze.jsx)(ze.Eg,{name:"Task__Notification",show:!0,color:l.colour,onClose:()=>s(null),children:l.message}),d&&(0,Ze.jsx)(gle,{children:(0,Ze.jsx)(ze.Ip,{})}),!d&&r&&(0,Ze.jsx)(cle,{onDismiss:()=>i(!1),onComplete:s}),!!u.length&&u.slice().sort((e,n)=>ka(e.title,n.title)).map(e=>(0,Ze.jsx)(Boe,{id:e.id,title:e.title,path:o},e.id))]})};var hle,vle,xle=t(65718),Tle=t.n(xle);function Ole(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const kle=(0,D.J1)(hle||(hle=Ole(["\n  query GetLegislationById($id: ID!, $accountId: ID!) {\n    getLegislationById(id: $id, accountId: $accountId) {\n      ...LegislationFields\n    }\n  }\n  ","\n"])),Tle()),jle=(0,D.J1)(vle||(vle=Ole(["\n  mutation updateLegislation($legislation: LegislationInput, $userId: ID!, $accountId: ID!) {\n    updateLegislation(input: { legislation: $legislation, userId: $userId, accountId: $accountId }) {\n      ...LegislationFields\n    }\n  }\n  ","\n"])),Tle());var Cle,Sle,Nle,wle,Dle;function Ale(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Rle(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ale(Object(t),!0).forEach(function(n){Ple(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ale(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ple(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Lle(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ile=Ge.default.div(Cle||(Cle=Lle(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),Ele=Ge.default.div(Sle||(Sle=Lle(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),_le=Ge.default.div(Nle||(Nle=Lle(["\n  display: flex;\n  flex-direction: column;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),Fle=Ge.default.div(wle||(wle=Lle(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: space-evenly;\n"]))),Ble=(0,Ge.default)(ze.DZ)(Dle||(Dle=Lle(["\n  cursor: pointer;\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),Ule=e=>{let{accountId:n}=e;const t=ms(),{legislationId:a}=(0,m.g)(),{data:r,loading:i}=(0,h.IT)(kle,{variables:{id:a,accountId:n}}),[o,l]=(0,g.useState)(""),[s,c]=(0,g.useState)(null),[d,u]=(0,g.useState)(""),[p,f]=(0,g.useState)([]),[y,b]=(0,g.useState)(""),[v,x]=(0,g.useState)(""),[T,O]=(0,g.useState)(""),[k,j]=(0,g.useState)(!1),[C,S]=(0,g.useState)(!1),[N]=(0,Ot.n)(jle,{onCompleted:()=>{S(!1),c({colour:"success",message:"Legislation has been updated!"})},onError:()=>{S(!1),c({colour:"danger",message:"Something went wrong! Please try again later."})}});return(0,g.useEffect)(()=>{l(r?r.getLegislationById.title:""),u(r?r.getLegislationById.synopsis:""),O(r?r.getLegislationById.lastFlaggedForReview:""),b(r&&Array.isArray(r.getLegislationById.links)?r.getLegislationById.links.join(","):""),x(r&&r.getLegislationById.apiData?r.getLegislationById.apiData.path:""),f(r&&Array.isArray(r.getLegislationById.countries)?Uoe.filter(e=>r.getLegislationById.countries.includes(e.value)):"")},[r]),(0,Ze.jsxs)(Ile,{children:[(0,Ze.jsx)(ze.fv,{name:"ConfigurationLegislationContainer",container:!0,fullHeight:!0,children:(0,Ze.jsx)(bh,{name:"ConfigurationLegislationContainer__Controls",icon:"pencil-alt",iconColor:"tertiary",title:"Edit Legislation"})}),s&&(0,Ze.jsx)(ze.Eg,{name:"ConfigurationLegislationContainer__Notification",show:!0,color:s.colour,onClose:()=>c(null),children:s.message}),i&&(0,Ze.jsx)(Ele,{children:(0,Ze.jsx)(ze.Ip,{})}),!i&&r&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(_le,{children:[(0,Ze.jsx)(ze.DZ,{children:"Title"}),(0,Ze.jsx)(ze.ks,{onChange:e=>l(e.target.value),value:o,box:!0})]}),(0,Ze.jsxs)(_le,{children:[(0,Ze.jsx)(ze.DZ,{children:"Synopsis"}),(0,Ze.jsx)(BL,{source:d,onSave:e=>u(e)})]}),(0,Ze.jsxs)(_le,{children:[(0,Ze.jsx)(ze.DZ,{children:"Links"}),(0,Ze.jsx)(ze.ks,{onChange:e=>b(e.target.value),value:y,box:!0})]}),(0,Ze.jsxs)(_le,{children:[(0,Ze.jsx)(ze.DZ,{children:"Countries"}),(0,Ze.jsx)(Moe,{value:p,onChange:e=>{f(e.target.select)}})]}),(0,Ze.jsxs)(_le,{children:[(0,Ze.jsx)(ze.DZ,{children:"Api Link"}),(0,Ze.jsx)(ze.ks,{onChange:e=>x(e.target.value),value:v,box:!0})]}),(0,Ze.jsxs)(Fle,{children:[(0,Ze.jsxs)(Fle,{onClick:()=>j(!k),children:[(0,Ze.jsx)(Ble,{children:"Flag For Review"}),(0,Ze.jsx)(ze.Sc,{checked:k})]}),(0,Ze.jsxs)(_le,{children:[!C&&(0,Ze.jsx)(ze.$n,{onClick:()=>{j(!1),S(!0)},children:"Clear Review Flag"}),C&&(0,Ze.jsx)(Ble,{onClick:()=>S(!1),children:"Undo"})]})]}),T&&(0,Ze.jsx)(_le,{children:(0,Ze.jsx)(ze.EY,{children:"This legislation was last flagged for review on ".concat(Wt()(T).format("DD/MM/YYYY"))})}),(0,Ze.jsx)(_le,{children:(0,Ze.jsx)(ze.$n,{name:"save",color:"success",onClick:()=>{N({variables:{legislation:Rle(Rle({},r.getLegislationById),{},{title:o,apiData:{path:v},synopsis:d,lastFlaggedForReview:C?null:k?(new Date).toISOString():r.getLegislationById.lastFlaggedForReview,countries:p.map(e=>e.value),links:y.split(",")}),userId:t,accountId:n}})},children:"Save"})})]})]})};var Mle,Vle;function zle(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Gle=(0,Ge.default)(ze.fI)(Mle||(Mle=zle(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),$le=(0,Ge.default)(ze.Y3)(Vle||(Vle=zle(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),Wle=e=>{let{accountId:n,businessName:t,profileImage:a,path:r}=e;return(0,Ze.jsx)(XN,{name:"configuration-menu__item--contractors",to:"".concat(r,"/").concat(n),children:(0,Ze.jsxs)(Gle,{name:"account-row--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)($le,{name:"account-row__profile-picture--".concat(n),src:a,size:"xs",accountName:t}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(n),size:"md",children:t})})]})})};var qle,Jle;function Yle(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Hle=Ge.default.div(qle||(qle=Yle(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),Kle=Ge.default.div(Jle||(Jle=Yle(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),Qle=()=>{const[e,n]=(0,g.useState)(""),{pathname:t}=(0,m.zy)(),{data:a,loading:r}=(0,h.IT)(Wh,{variables:{limit:100,filters:{text:[{filterType:"text",type:"contains",filter:e,field:"name"}]}}}),i=(null==a?void 0:a.getAccounts.rows)||[];return(0,Ze.jsxs)(Hle,{children:[(0,Ze.jsx)(ze.fv,{name:"ConfigurationMssContainer",container:!0,fullHeight:!0,children:(0,Ze.jsx)(bh,{name:"ConfigurationMssSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:"Management Systems Subscriptions",children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationMssSubscriptionsContainer__Controls__Search",value:e,onChange:e=>n(e.target.value),hideButton:!0})})})}),r&&(0,Ze.jsx)(Kle,{children:(0,Ze.jsx)(ze.Ip,{})}),!r&&!i.length&&(0,Ze.jsx)(nv,{name:"ConfigurationIntelligenceSubscriptionsContainer__NoResults",title:"There are no results for this search."}),!!i.length&&i.slice().map(e=>(0,Ze.jsx)(Wle,{accountId:e.id,businessName:e.name,profileImage:e.profile,path:t},e.id))]})};var Zle,Xle;function ese(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const nse=(0,Ge.default)(ze.fI)(Zle||(Zle=ese(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),tse=(0,Ge.default)(ze.Y3)(Xle||(Xle=ese(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing);class ase extends g.Component{render(){const{managementSystemName:e,id:n,onCheckboxClick:t,checked:a}=this.props;return(0,Ze.jsx)("div",{children:(0,Ze.jsxs)(nse,{name:"mss-row--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(tse,{name:"mss-row__profile-picture--".concat(n),src:"",size:"xs",accountName:e}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"mss-row__name--".concat(n),size:"md",children:e})}),(0,Ze.jsx)(ze.Sc,{id:"update-subscription-".concat(n),name:n,onChange:t,checked:a})]})},n)}}const rse=ase;var ise,ose,lse;function sse(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const cse=(0,D.J1)(ise||(ise=sse(["\n  query GetAllManagementSystems {\n    getAllManagementSystems {\n      id\n      title\n    }\n  }\n"]))),dse=(0,D.J1)(ose||(ose=sse(["\n  query GetManagementSystemSubscription($accountId: ID!) {\n    getManagementSystemSubscription(accountId: $accountId)\n  }\n"]))),use=(0,D.J1)(lse||(lse=sse(["\n  mutation SetManagementSystemSubscription($accountId: ID!, $subscriptions: [String!]!) {\n    setManagementSystemSubscription(accountId: $accountId, subscriptions: $subscriptions)\n  }\n"])));var pse,mse;function fse(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yse=Ge.default.div(pse||(pse=fse(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),gse=Ge.default.div(mse||(mse=fse(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),bse=()=>{const[e,n]=(0,g.useState)(""),[t,a]=(0,g.useState)([]),[r,i]=(0,g.useState)([]),{accountId:o}=(0,m.g)(),{data:l,loading:s}=(0,h.IT)(cse),{data:c,loading:d}=(0,h.IT)(dse,{variables:{accountId:o},fetchPolicy:"network-only"}),[u]=(0,Ot.n)(use);return(0,g.useEffect)(()=>{c&&a(c.getManagementSystemSubscription),l&&i(l.getAllManagementSystems)},[l,c]),(0,Ze.jsxs)(yse,{children:[(0,Ze.jsx)(ze.fv,{name:"ConfigurationMssContainer",container:!0,fullHeight:!0,children:(0,Ze.jsx)(bh,{name:"ConfigurationMssSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:"Management Systems Subscriptions",children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationMssSubscriptionsContainer__Controls__Search",value:e,onChange:e=>n(e.target.value),hideButton:!0})})})}),(s||d)&&(0,Ze.jsx)(gse,{children:(0,Ze.jsx)(ze.Ip,{})}),!(s||d)&&r&&r.map(e=>(0,Ze.jsx)(rse,{id:e.id,managementSystemName:e.title,onCheckboxClick:()=>(e=>{let n=[];n=t.includes(e)?t.filter(n=>n!==e):[...t,e],a(n),u({variables:{accountId:o,subscriptions:n}})})(e.id),checked:t.includes(e.id)},e.id))]})};var hse,vse;function xse(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Tse=(0,Ge.default)(ze.fI)(hse||(hse=xse(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),Ose=(0,Ge.default)(ze.Y3)(vse||(vse=xse(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),kse=e=>{let{accountId:n,businessName:t,profileImage:a,path:r}=e;return(0,Ze.jsx)(XN,{name:"configuration-menu__item--contractors",to:"".concat(r,"/").concat(n),children:(0,Ze.jsxs)(Tse,{name:"account-row--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(Ose,{name:"account-row__profile-picture--".concat(n),src:a,size:"xs",accountName:t}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(n),size:"md",children:t})})]})})},jse=()=>{const e=(0,m.zy)(),[n,t]=(0,g.useState)(""),{loading:a,error:r,data:i,refetch:o,networkStatus:l}=(0,h.IT)(Wh,{variables:{limit:100,filters:{text:[{filterType:"text",type:"contains",filter:n,field:"name"}]}}}),s=(null==i?void 0:i.getAccounts.rows)||[];return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationIntelligenceSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:"Intelligence Subscriptions",children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationIntelligenceSubscriptionsContainer__Controls__Search",value:n,onChange:e=>t(e.target.value),hideButton:!0})})}),(a&&3!==l||4===l)&&(0,Ze.jsx)(Vg,{name:"ConfigurationAccountsContainer__Loading"}),r&&(0,Ze.jsx)(ze.Kw,{error:r,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationAccountsContainer__Error",icon:a,title:n,body:t,retry:o})}}),!a&&!s.length&&(0,Ze.jsx)(nv,{name:"ConfigurationIntelligenceSubscriptionsContainer__NoResults",title:"There are no results for this search."}),s.slice().sort((e,n)=>ka(e.name,n.name)).map(n=>(0,Ze.jsx)(kse,{accountId:n.id,businessName:n.name,profileImage:n.profile,path:e.pathname},n.id))]})})};var Cse,Sse;function Nse(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const wse=(0,Ge.default)(ze.fI)(Cse||(Cse=Nse(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),Dse=(0,Ge.default)(ze.Y3)(Sse||(Sse=Nse(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),Ase=e=>{let{name:n,id:t,onCheckboxClick:a,checked:r}=e;return(0,Ze.jsx)("div",{children:(0,Ze.jsxs)(wse,{name:"kb-row--".concat(t),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(Dse,{name:"kb-row__profile-picture--".concat(t),src:"",size:"xs",accountName:n}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(t),size:"md",children:n})}),(0,Ze.jsx)(ze.Sc,{id:"update-subscription-".concat(t),name:t,onChange:a,checked:r})]})},t)};var Rse,Pse,Lse,Ise,Ese;function _se(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Fse=(0,D.J1)(Rse||(Rse=_se(["\n  query GetAccountInfo($id: ID!) {\n    getAccountInfo(id: $id) {\n      id\n      name\n      accessControls {\n        learn\n        intelligence\n        tasks\n        projects\n        v2Design\n        comply {\n          legislation\n          tagLevelLegislation\n          policies\n          systems\n          targets\n          frameworks\n          agreements\n        }\n        data {\n          waste\n          electricity\n          gas\n          water\n          materials\n          fuel\n          transport\n          refrigerants\n          heatSteam\n          oilAndGas\n        }\n      }\n    }\n  }\n"]))),Bse=(0,D.J1)(Pse||(Pse=_se(["\n  query GetIntelligenceSubscriptions($accountId: ID!) {\n    getIntelligenceSubscriptions(accountId: $accountId)\n  }\n"]))),Use=(0,D.J1)(Lse||(Lse=_se(["\n  mutation SaveIntelligenceSubscriptions($accountId: ID!, $subscriptions: [String!]!) {\n    saveIntelligenceSubscriptions(input: { accountId: $accountId, subscriptions: $subscriptions }) {\n      subscriptions\n    }\n  }\n"]))),Mse=((0,D.J1)(Ise||(Ise=_se(["\n  query GetDashboardById($id: ID!) {\n    getDashboard(id: $id) {\n      id\n      name\n      description\n      area\n      provider\n      providerDashboardId\n    }\n  }\n"]))),(0,D.J1)(Ese||(Ese=_se(["\n  query GetAllDashboards {\n    getAllDashboards {\n      id\n      name\n      description\n      area\n      provider\n      providerDashboardId\n    }\n  }\n"]))),(0,Ib.W)(e=>{let{knowledgebases:n,accountId:t}=e;const{data:a}=(0,h.IT)(Bse,{variables:{accountId:t},fetchPolicy:"network-only"}),[r]=(0,Ot.n)(Use),[i,o]=(0,g.useState)([]);return(0,g.useEffect)(()=>{o((null==a?void 0:a.getIntelligenceSubscriptions)||[])},[a]),(0,Ze.jsx)(Ze.Fragment,{children:n.slice().sort((e,n)=>ka(e.title,n.title)).map(e=>(0,Ze.jsx)(Ase,{id:e.id,name:e.title,onCheckboxClick:()=>(e=>{let n=[...i];n.includes(e)?n=n.filter(n=>n!==e):n.push(e),r({variables:{accountId:t,subscriptions:n}}),o(n)})(e.id),checked:!i.includes(e.id)},e.id))})}));var Vse;const zse=Ge.default.div(Vse||(Vse=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"]))),Gse=e=>{let{title:n,accountId:t}=e;const[a,r]=(0,g.useState)(""),{data:i,loading:o}=function(e){const{data:n,loading:t}=(0,h.IT)(G9,{variables:{accountId:e}});return{data:(null==n?void 0:n.getAllKnowledgeBases)||[],loading:t}}(t),l=((e,n)=>{if(!n)return e;const t=new gf.vj("id");return t.addIndex("title"),t.addDocuments(e),t.search(n)})(i,a);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationLearnSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:n,children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationLearnSubscriptionsContainer__Controls__Search",value:a,onChange:e=>r(e.target.value),hideButton:!0})})}),o&&(0,Ze.jsx)(zse,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})}),!o&&!l.length&&(0,Ze.jsx)(nv,{name:"ConfigurationUsersContainer__NoResults",title:"There are no results for this search."}),!!l.length&&(0,Ze.jsx)(Mse,{knowledgebases:l,accountId:t})]})})};var $se;const Wse=Ge.default.div($se||($se=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"]))),qse=()=>{const{accountId:e}=(0,m.g)(),{loading:n,error:t,data:a}=(0,h.IT)(Fse,{variables:{id:e}});return(0,Ze.jsxs)(Ze.Fragment,{children:[(n||t)&&(0,Ze.jsx)(Wse,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})}),!n&&!t&&(0,Ze.jsx)(Gse,{accountId:e,title:"Intelligence Subscriptions - ".concat(a.getAccountInfo.name)})]})};var Jse,Yse,Hse,Kse;function Qse(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Zse=(0,D.J1)(Jse||(Jse=Qse(["\n  fragment SurveyTemplateSubscriptionFields on SurveyTemplateSubscription {\n    account {\n      id\n      name\n    }\n    template {\n      id\n      name\n    }\n  }\n"]))),Xse=(0,D.J1)(Yse||(Yse=Qse(["\n  {\n    getSurveyTemplateSubscriptions {\n      ...SurveyTemplateSubscriptionFields\n    }\n  }\n  ","\n"])),Zse),ece=(0,D.J1)(Hse||(Hse=Qse(["\n  mutation CreateSurveyTemplateSubscription($accountId: ID!, $templateId: ID!) {\n    createSurveyTemplateSubscription(accountId: $accountId, templateId: $templateId) {\n      ...SurveyTemplateSubscriptionFields\n    }\n  }\n  ","\n"])),Zse),nce=(0,D.J1)(Kse||(Kse=Qse(["\n  mutation DeleteSurveyTemplateSubscription($accountId: ID!, $templateId: ID!) {\n    deleteSurveyTemplateSubscription(accountId: $accountId, templateId: $templateId) {\n      ...SurveyTemplateSubscriptionFields\n    }\n  }\n  ","\n"])),Zse);function tce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ace(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tce(Object(t),!0).forEach(function(n){rce(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tce(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rce(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var ice;function oce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function lce(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?oce(Object(t),!0).forEach(function(n){sce(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oce(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function sce(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const cce=Ge.default.div(ice||(ice=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing);function dce(e){var n;let{onDismiss:t}=e;const[a,r]=(0,g.useState)({accountId:"",templateId:""}),[i,o]=(0,g.useState)({}),{data:l}=_E(),[s,{loading:c}]=function(){const{showNotification:e}=vt();return(0,Ot.n)(ece,{onCompleted:n=>{let{createSurveyTemplateSubscription:t}=n;e("Subscribed ".concat(t.account.name," to ").concat(t.template.name),"success")},onError:n=>e(n.toString(),"danger"),update:(e,n)=>{var t;const{getSurveyTemplateSubscriptions:a}=e.readQuery({query:Xse}),r=null===(t=n.data)||void 0===t?void 0:t.createSurveyTemplateSubscription;r&&(e.writeQuery({query:Xse,data:{getSurveyTemplateSubscriptions:a.concat(r)}}),((e,n)=>{if(null==n||!n.createSurveyTemplateSubscription)return;const t=n.createSurveyTemplateSubscription,a={query:wO(),variables:{accountId:t.account.id}},r=e.readQuery(a);if(r){const n=r.getSurveyTemplatesByAccountId,i={getSurveyTemplatesByAccountId:Array.isArray(n)?n.concat(t.template):[t.template]};e.writeQuery(ace(ace({},a),{},{data:i}))}})(e,n.data))}})}(),d=(0,g.useCallback)(async e=>{e.preventDefault();const[n,r]=function(e){const n={};return e.accountId||(n.accountId="Account is required"),e.templateId||(n.templateId="Template is required"),Object.keys(n).length?[n,null]:[null,e]}(a);if(n)return o(e=>lce(lce({},e),n));await s({variables:r,onCompleted:()=>t()})},[a,s,t]);return(0,Ze.jsx)(cce,{children:(0,Ze.jsxs)(ze.hh,{onSubmit:d,children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:"Subscribe template"}),(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.Column,{label:"Accounts",children:(0,Ze.jsx)(Kh,{value:a.accountId,error:i.accountId,onChange:(0,g.useCallback)(e=>r(n=>lce(lce({},n),{},{accountId:e.id})),[])})})}),(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.SelectColumn,{label:"Template",options:null==l||null===(n=l.getSurveyTemplates)||void 0===n?void 0:n.map(e=>({value:e.id,label:e.name})),error:i.templateId,onChange:(0,g.useCallback)(e=>r(n=>lce(lce({},n),{},{templateId:e.target.value})),[])})}),(0,Ze.jsx)(ze.hh.ButtonColumn,{disabled:c,onClick:d,children:"Subscribe"})]})})}var uce,pce,mce;function fce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function yce(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fce(Object(t),!0).forEach(function(n){gce(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fce(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function gce(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function bce(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hce=Ge.default.div(uce||(uce=bce(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),vce=Ge.default.a(pce||(pce=bce(["\n  display: inline-block;\n  color: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.colors.text.dark.background),xce=Ge.default.div(mce||(mce=bce(["\n  height: 100%;\n"]))),Tce=e=>{let{data:n,onDelete:t}=e;return(0,Ze.jsx)(hce,{children:(0,Ze.jsx)(vce,{onClick:()=>t(n),children:(0,Ze.jsx)(ze.In,{icon:"trash",color:"#ff909a"})})})},Oce={resizable:!0,sortable:!0,filter:!0,cellStyle:{height:"auto"}},kce=[{headerName:"Account",field:"account.name"},{headerName:"Template",field:"template.name"},{headerName:"Actions",cellRenderer:"actions"}];function jce(e){let{rows:n,onDelete:t}=e;const a={actions:e=>(0,Ze.jsx)(Tce,yce(yce({},e),{},{onDelete:e=>t(e)}))},r=(0,g.useCallback)(e=>{e.api.sizeColumnsToFit()},[]);return(0,Ze.jsx)(xce,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,{rowSelection:"single",defaultColDef:Oce,columnDefs:kce,components:a,rowData:n,onGridReady:r,paginationPageSize:25,pagination:!0})})}var Cce,Sce;function Nce(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const wce=(0,Ge.default)(ze.$n)(Cce||(Cce=Nce(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),Dce=(0,Ge.default)(bh)(Sce||(Sce=Nce(["\n  justify-content: space-between;\n"]))),Ace=()=>{const{data:e,loading:n,error:t,refetch:a,networkStatus:r}=(0,h.IT)(Xse),[i,o]=(0,g.useState)(!1),[l,s]=(0,g.useState)(null),c=(0,g.useCallback)(()=>o(e=>!e),[]),d=(0,g.useCallback)(e=>s(e),[]),u=(0,g.useCallback)(()=>s(null),[]),[p]=function(){const{showNotification:e}=vt();return(0,Ot.n)(nce,{onCompleted:n=>{let{deleteSurveyTemplateSubscription:t}=n;e("Unsubscribed ".concat(t.account.name," from ").concat(t.template.name),"success")},onError:n=>{e("Something went wrong. If the problem persists, contact support. ".concat(n),"danger")},update:(e,n)=>{var t;const{getSurveyTemplateSubscriptions:a}=e.readQuery({query:Xse}),r=null===(t=n.data)||void 0===t?void 0:t.deleteSurveyTemplateSubscription;r&&(e.writeQuery({query:Xse,data:{getSurveyTemplateSubscriptions:a.filter(e=>!(e.account.id===r.account.id&&e.template.id===r.template.id))}}),((e,n)=>{if(null==n||!n.deleteSurveyTemplateSubscription)return;const t=n.deleteSurveyTemplateSubscription,a={query:wO(),variables:{accountId:t.account.id}},r=e.readQuery(a);if(r){const n=r.getSurveyTemplatesByAccountId,i={getSurveyTemplatesByAccountId:Array.isArray(n)?n.filter(e=>e.id!==t.template.id):[]};e.writeQuery(ace(ace({},a),{},{data:i}))}})(e,n.data))}})}(),m=(0,g.useCallback)(async()=>{l&&await p({variables:{accountId:null==l?void 0:l.account.id,templateId:null==l?void 0:l.template.id},onCompleted:()=>u()})},[p,l,u]);return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsx)(Dce,{name:"ConfigurationSubscriptionsContainer",icon:"briefcase",iconColor:"primary",title:"Template Subscriptions",children:(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(wce,{size:"md",color:"primary",inline:!0,onClick:c,children:"+ Add Template Subscription"})})}),(n&&3!==r||4===r)&&(0,Ze.jsx)(Vg,{}),t&&(0,Ze.jsx)(ub,{error:t,retry:a}),!t&&!n&&(null==e?void 0:e.getSurveyTemplateSubscriptions)&&(0,Ze.jsx)(jce,{rows:null==e?void 0:e.getSurveyTemplateSubscriptions,onDelete:d}),l&&(0,Ze.jsx)(vN,{confirmButtonTitle:"Unsubscribe",cancelButtonTitle:"Cancel",headingText:"Are you sure you want to unsubscribe ".concat(l.account.name," from ").concat(l.template.name,"?"),bodyText:"The subscription can be re-created at anytime",onConfirmAction:m,onDismiss:u,onCancelAction:u,show:!0}),i&&(0,Ze.jsx)(ze.aF,{size:"md",height:"50vh",onDismiss:c,dismissable:!0,show:!0,children:(0,Ze.jsx)(dce,{onDismiss:c})})]})};var Rce,Pce,Lce,Ice;function Ece(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _ce=(0,D.J1)(Rce||(Rce=Ece(["\n  query GetQuestions($offset: Int, $limit: Int, $filters: Filters, $sort: [SortCommand!]) {\n    getQuestions(offset: $offset, limit: $limit, filters: $filters, sort: $sort) {\n      totalRows\n      rows {\n        id\n        name\n        page\n        title\n        description\n        type\n        required\n        payload\n        order\n        createdDate\n        isKeyMetric\n        options {\n          id\n          name\n          score\n          isNotApplicableMarker\n          isDataMissingMarker\n        }\n        category {\n          id\n          name\n        }\n        template {\n          id\n          name\n          description\n        }\n      }\n    }\n  }\n"]))),Fce=(0,D.J1)(Pce||(Pce=Ece(["\n  query GetQuestionsFilter($field: String!) {\n    getQuestionsFilter(field: $field) {\n      label\n      value\n    }\n  }\n"]))),Bce=(0,D.J1)(Lce||(Lce=Ece(["\n  mutation UpdateSurveyQuestion($question: SurveyQuestionInput!) {\n    updateSurveyQuestion(question: $question) {\n      id\n      name\n      isKeyMetric\n      options {\n        id\n        name\n        score\n        isNotApplicableMarker\n        isDataMissingMarker\n      }\n      category {\n        id\n        name\n      }\n    }\n  }\n"]))),Uce=(0,D.J1)(Ice||(Ice=Ece(["\n  query {\n    getSurveyQuestionCategories {\n      id\n      name\n      parentCategory {\n        id\n        name\n      }\n    }\n  }\n"])));var Mce,Vce,zce;function Gce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $ce(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gce(Object(t),!0).forEach(function(n){Wce(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gce(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Wce(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function qce(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Jce=Ge.default.div(Mce||(Mce=qce(["\n  height: 100%;\n"]))),Yce=Ge.default.div(Vce||(Vce=qce(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),Hce=Ge.default.a(zce||(zce=qce(["\n  display: inline-block;\n  color: ",";\n  padding: 0 0 0 ",";\n  margin-right: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xxl.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),Kce={resizable:!0,sortable:!0,filter:!0,cellStyle:{height:"auto"}},Qce=e=>{let{data:n,onEdit:t}=e;return(0,Ze.jsx)(Yce,{children:(0,Ze.jsx)(Hce,{onClick:()=>t(n),children:(0,Ze.jsx)(ze.In,{icon:"pencil-alt"})})})},Zce=ba("id");function Xce(e){let{onEdit:n,setAgGridApi:t}=e;const[a]=(0,gs._)(_ce),[r]=(0,gs._)(Fce),{showNotification:i}=vt(),o=(0,g.useCallback)(e=>{t(e.api),e.api.sizeColumnsToFit()},[t]),l=(0,g.useMemo)(()=>({edit:e=>(0,Ze.jsx)(Qce,$ce($ce({},e),{},{onEdit:e=>n(e)}))}),[n]),s=(0,g.useCallback)(async e=>{try{var n;const t=e.colDef.colId||e.colDef.field;if(!t)throw new Error("Unfilterable");const a=await r({variables:{field:t}});if(null===(n=a.data)||void 0===n||!n.getQuestionsFilter)throw new Error("Filter values not loaded");e.success(a.data.getQuestionsFilter.map(e=>e.label))}catch(e){de.Cp(e),i(new Error(e).message,"danger")}},[r,i]),c=(0,g.useMemo)(()=>({async getRows(e){try{var n;const{startRow:r,sortModel:i,filterModel:o}=e.request,l={offset:r,limit:20,sort:oa(i),filters:ia(o)},s=await a({variables:l});if(null===(n=s.data)||void 0===n||!n.getQuestions)throw new Error("Error fetching questions");{var t;const{rows:n,totalRows:a}=null===(t=s.data)||void 0===t?void 0:t.getQuestions;e.success({rowData:n,rowCount:a})}}catch(n){de.Cp(n),e.fail()}}}),[a]),d=(0,g.useMemo)(()=>[{headerName:"Form Template Name",field:"template.name",filter:"agSetColumnFilter",filterParams:{values:s}},{headerName:"Title",field:"title",filter:"agTextColumnFilter"},{headerName:"Name",field:"name",filter:"agTextColumnFilter"},{headerName:"Type",field:"type",filter:"agSetColumnFilter",filterParams:{values:s}},{headerName:"Category",field:"category.name"},{headerName:"Is Key Metric",field:"isKeyMetric",filter:"agSetColumnFilter",valueFormatter:e=>{let{value:n}=e;return n?"Yes":"No"}},{headerName:"Actions",field:"id",cellRenderer:"edit",colId:"edit"}],[s]);return(0,Ze.jsx)(Jce,{className:"ag-theme-alpine",id:"FormConfiguration__Grid__Questions",children:(0,Ze.jsx)(Vw.W6,{rowModelType:"serverSide",rowSelection:"single",defaultColDef:Kce,serverSideDatasource:c,components:l,getRowId:Zce,columnDefs:d,onGridReady:o,paginationPageSize:20,cacheBlockSize:20,pagination:!0})})}var ede,nde,tde;function ade(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function rde(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ade(Object(t),!0).forEach(function(n){ide(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ade(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ide(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ode(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const lde=(0,f.styled)("div")(ede||(ede=ode(["\n  padding: 20px 8px;\n"]))),sde=(0,f.styled)("div")(nde||(nde=ode(["\n  width: 8px;\n"]))),cde=(0,f.styled)("div")(tde||(tde=ode(["\n  min-width: 145px;\n"])));function dde(e){var n;let{questionInput:t,question:a,onChange:r,disabled:i,errors:o}=e;const l=e=>n=>{var a;const i=null===(a=t.scores)||void 0===a?void 0:a.map(t=>t.id===e?rde(rde({},t),{},{isNotApplicableMarker:n.target.checked}):t);r({scores:i})},s=e=>n=>{var a;const i=null===(a=t.scores)||void 0===a?void 0:a.map(t=>t.id===e?rde(rde({},t),{},{isDataMissingMarker:n.target.checked}):t);r({scores:i})},{data:c}=(0,h.IT)(Uce),d=(0,g.useMemo)(()=>(0,zt.keyBy)(a.options,"id"),[a.options]);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(ze.hh.Column,{container:!0,children:[(0,Ze.jsx)(ze.hh.SelectColumn,{name:"category",label:"Category",disabled:i,value:t.category,options:null==c||null===(n=c.getSurveyQuestionCategories)||void 0===n?void 0:n.map(e=>({value:e.id,label:e.name})),error:o.category,onChange:(0,g.useCallback)(e=>r({category:e.target.value}),[r])}),(0,Ze.jsxs)(lde,{children:[(0,Ze.jsx)(ze.JU,{children:"Is key metric"}),(0,Ze.jsx)(ze.Sc,{name:"isKeyMetric",disabled:i,checked:t.isKeyMetric,onChange:(0,g.useCallback)(e=>r({isKeyMetric:e.target.checked}),[r])})]}),t.scores&&t.scores.length>0&&(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsxs)(ze.hh.Column,{label:"Question options scores",children:[(0,Ze.jsxs)(ze.hh.Row,{children:[(0,Ze.jsx)(ze.hh.Column,{label:"Option"}),(0,Ze.jsx)(ze.hh.Column,{label:"Score"})]}),t.scores.map((e,n)=>{var a,o;const c=null!==(a=t.scores[n].score)&&void 0!==a?a:"";return(0,Ze.jsxs)(ze.hh.Row,{className:"score-row",children:[(0,Ze.jsx)(ze.hh.TextColumn,{children:null===(o=d[e.id])||void 0===o?void 0:o.name}),(0,Ze.jsx)(ze.hh.TextInputColumn,{type:"number",min:"0",name:"score-".concat(e.id),onChange:(u=e.id,e=>{var n;const a=null===(n=t.scores)||void 0===n?void 0:n.map(n=>n.id===u?rde(rde({},n),{},{score:parseInt(e.target.value)}):n);r({scores:a})}),value:c,disabled:i}),(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(ze.JU,{children:"N/A"}),(0,Ze.jsx)(ze.Sc,{name:"isNotApplicableMarker-".concat(e.id),checked:e.isNotApplicableMarker,onChange:l(e.id)})]}),(0,Ze.jsx)(sde,{}),(0,Ze.jsxs)(cde,{children:[(0,Ze.jsx)(ze.JU,{children:"Missing data marker"}),(0,Ze.jsx)(ze.Sc,{name:"isDataMissingMarker-".concat(e.id),checked:e.isDataMissingMarker,onChange:s(e.id)})]})]},e.id);var u})]})})]})})}var ude;function pde(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function mde(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pde(Object(t),!0).forEach(function(n){fde(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pde(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function fde(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const yde=Ge.default.div(ude||(ude=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing);function gde(e){var n,t;let{onUpdated:a,question:r}=e;const[i,o]=(0,g.useState)({category:null===(n=r.category)||void 0===n?void 0:n.id,isKeyMetric:r.isKeyMetric||!1,scores:(null===(t=r.options)||void 0===t?void 0:t.map(e=>{let{id:n,score:t,isNotApplicableMarker:a,isDataMissingMarker:r}=e;return{id:n,score:t,isNotApplicableMarker:!!a,isDataMissingMarker:!!r}}))||[]}),[l,s]=(0,g.useState)({}),[c,{loading:d}]=(0,Ot.n)(Bce),{showNotification:u}=vt(),p=(0,g.useCallback)(e=>{o(n=>mde(mde({},n),e))},[]),m=(0,g.useCallback)(async e=>{e.preventDefault();const[n]=function(e){const n={};return e.category||(n.category="Category is required"),Object.keys(n).length?[n,null]:[null,e]}(i);if(n)return s(e=>mde(mde({},e),n));await c({variables:{question:{id:r.id,category:i.category,isKeyMetric:i.isKeyMetric,scores:i.scores||[]}},onCompleted:a,onError:e=>u(e.message,"danger")})},[r,c,a,u,i]);return(0,Ze.jsx)(yde,{children:(0,Ze.jsxs)(ze.hh,{container:!0,onSubmit:m,children:[(0,Ze.jsx)(ze.hh.HeaderRow,{name:"update-question__heading",children:"Update Survey Question"}),(0,Ze.jsx)(dde,{onChange:p,questionInput:i,errors:l,question:r}),(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.ButtonColumn,{disabled:d,onClick:m,name:"UpdateQuestion__UpdateQuestionButton",children:"Update Question"})})]})})}var bde;const hde=(0,Ge.default)(bh)(bde||(bde=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  justify-content: space-between;\n"]))),vde=()=>{const[e,n]=(0,g.useState)(null),[t,a]=(0,g.useState)(null),r=(0,g.useCallback)(()=>a(null),[]),i=(0,g.useCallback)(e=>a(e),[]),{showNotification:o}=vt(),l=(0,g.useCallback)(async()=>{r(),e&&e.refreshServerSide({purge:!0}),o("Question updated successfully","success")},[r,o,e]);return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsx)(hde,{name:"ConfigurationSurveyQuestionsContainer",icon:"question",iconColor:"primary",title:"Questions"}),(0,Ze.jsx)(Xce,{setAgGridApi:n,onEdit:i}),t&&(0,Ze.jsx)(ze.aF,{size:"md",onDismiss:r,dismissable:!0,show:!0,children:(0,Ze.jsx)(gde,{question:t,onUpdated:l})})]})};function xde(e){const n={};return e.name||(n.name="Name is required"),Object.keys(n).length?[n,null]:[null,e]}var Tde,Ode,kde,jde;function Cde(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Sde=(0,D.J1)(Tde||(Tde=Cde(["\n  query {\n    getSurveyQuestionCategories {\n      id\n      name\n      parentCategory {\n        id\n        name\n      }\n    }\n  }\n"]))),Nde=(0,D.J1)(Ode||(Ode=Cde(["\n  mutation CreateSurveyQuestionCategory($category: SurveyQuestionCategoryInput!) {\n    createSurveyQuestionCategory(category: $category) {\n      id\n      name\n      parentCategory {\n        id\n        name\n      }\n    }\n  }\n"]))),wde=(0,D.J1)(kde||(kde=Cde(["\n  mutation UpdateSurveyQuestionCategory($id: ID!, $category: SurveyQuestionCategoryInput!) {\n    updateSurveyQuestionCategory(id: $id, category: $category) {\n      id\n      name\n      parentCategory {\n        id\n        name\n      }\n    }\n  }\n"]))),Dde=(0,D.J1)(jde||(jde=Cde(["\n  mutation DeleteSurveyQuestionCategory($id: ID!) {\n    deleteSurveyQuestionCategory(id: $id) {\n      id\n      name\n      parentCategory {\n        id\n        name\n      }\n    }\n  }\n"])));var Ade,Rde;function Pde(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Lde(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pde(Object(t),!0).forEach(function(n){Ide(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pde(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ide(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ede(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _de=Ge.default.div(Ade||(Ade=Ede(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),Fde=(0,Ge.default)(ze.hh.TextColumn)(Rde||(Rde=Ede(["\n  align-self: center;\n"])));function Bde(e){let{onCompleted:n,buttonDescription:t,CategoryDetails:a}=e;const[r,i]=(0,g.useState)({name:"",parentCategoryId:null}),[o,l]=(0,g.useState)({}),{showNotification:s}=vt(),[c,{loading:d}]=(0,Ot.n)(Nde,{update:(e,n)=>{let{data:t}=n;e.updateQuery({query:Sde},e=>{const n=null==e?void 0:e.getSurveyQuestionCategories;if(n&&null!=t&&t.createSurveyQuestionCategory)return{getSurveyQuestionCategories:n.concat(null==t?void 0:t.createSurveyQuestionCategory)}})}}),u=(0,g.useCallback)(e=>{i(n=>Lde(Lde({},n),e))},[]),p=(0,g.useCallback)(async e=>{e.preventDefault();const[t,a]=xde(r);if(t)return l(e=>Lde(Lde({},e),t));await c({variables:{category:a},onCompleted:n,onError:e=>{s(e.message,"danger")}})},[r,c,n,s]);return(0,Ze.jsx)(_de,{name:"CreateCategory",children:(0,Ze.jsxs)(ze.hh,{onSubmit:p,children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:"Add Survey Category"}),(0,Ze.jsx)(a,{onChange:u,category:r,errors:o,disabled:d}),(0,Ze.jsx)(ze.hh.ButtonColumn,{disabled:d,onClick:p,name:"CreateCategory__SubmitButton",children:"Add Category"}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(Fde,{span:12,size:"xs",color:"normal",children:t})})]})})}function Ude(e){let{category:n,errors:t,onChange:a,disabled:r}=e;const{data:i}=(0,h.IT)(Uce),o=(0,g.useMemo)(()=>{var e;return[{value:null,label:"(No parent)"},...(null==i||null===(e=i.getSurveyQuestionCategories)||void 0===e?void 0:e.map(e=>({value:e.id,label:e.name})))||[]]},[i]),l=(0,g.useCallback)(e=>a({[e.target.name]:e.target.value}),[a]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.TextInputColumn,{label:"Name",name:"name",onChange:l,value:n.name,error:t.name,disabled:r})}),(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.SelectColumn,{name:"parentCategoryId",label:"Parent category",disabled:r,value:n.parentCategoryId,options:o,onChange:e=>l(e)})})]})}var Mde;function Vde(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function zde(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Vde(Object(t),!0).forEach(function(n){Gde(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Vde(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Gde(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const $de=Ge.default.div(Mde||(Mde=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing);function Wde(e){var n;let{onUpdated:t,onDeleted:a,existingCategory:r}=e;const[i,o]=(0,g.useState)({name:r.name,parentCategoryId:null===(n=r.parentCategory)||void 0===n?void 0:n.id}),[l,s]=(0,g.useState)({}),[c,{loading:d}]=(0,Ot.n)(wde,{update:(e,n)=>{let{data:t}=n;e.updateQuery({query:Sde},e=>{const n=null==e?void 0:e.getSurveyQuestionCategories;if(n&&null!=t&&t.updateSurveyQuestionCategory)return{getSurveyQuestionCategories:n.map(e=>e.id===t.updateSurveyQuestionCategory.id?t.updateSurveyQuestionCategory:e)}})}}),[u,{loading:p}]=(0,Ot.n)(Dde,{update:(e,n)=>{let{data:t}=n;e.updateQuery({query:Sde},e=>{const n=null==e?void 0:e.getSurveyQuestionCategories;if(n&&null!=t&&t.deleteSurveyQuestionCategory)return{getSurveyQuestionCategories:n.filter(e=>e.id!==t.deleteSurveyQuestionCategory.id)}})}}),{showNotification:m}=vt(),f=(0,g.useCallback)(e=>{o(n=>zde(zde({},n),e))},[]),y=(0,g.useCallback)(async e=>{e.preventDefault();const[n,a]=xde(i);if(n)return s(e=>zde(zde({},e),n));await c({variables:{id:r.id,category:{name:a.name,parentCategoryId:a.parentCategoryId}},onCompleted:t,onError:e=>{m(e.message,"danger")}})},[i,c,t,r.id,m]),b=(0,g.useCallback)(()=>{u({variables:{id:r.id},onCompleted:a})},[r.id,u,a]),h=d||p;return(0,Ze.jsx)($de,{children:(0,Ze.jsxs)(ze.hh,{container:!0,onSubmit:y,children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:"Update Survey Category"}),(0,Ze.jsx)(Ude,{onChange:f,category:i,errors:l,disabled:h}),(0,Ze.jsxs)(ze.hh.Row,{container:!0,children:[(0,Ze.jsx)(ze.hh.ButtonColumn,{span:6,disabled:h,onClick:y,name:"UpdateCategory__UpdateCategoryButton",children:"Update category"}),(0,Ze.jsx)(ze.hh.ButtonColumn,{span:6,disabled:h,onClick:b,color:"danger",name:"UpdateCategory__DeleteCategoryButton",children:"Delete category"})]})]})})}var qde,Jde,Yde;function Hde(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Kde(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Hde(Object(t),!0).forEach(function(n){Qde(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hde(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Qde(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Zde(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Xde=Ge.default.div(qde||(qde=Zde(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),eue=Ge.default.a(Jde||(Jde=Zde(["\n  display: inline-block;\n  color: ",";\n  padding: 0 0 0 ",";\n  margin-right: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xxl.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),nue=Ge.default.div(Yde||(Yde=Zde(["\n  height: 100%;\n"]))),tue=e=>{let{data:n,onEdit:t}=e;return(0,Ze.jsx)(Xde,{children:(0,Ze.jsx)(eue,{onClick:()=>t(n.id),children:(0,Ze.jsx)(ze.In,{icon:"pencil-alt"})})})},aue={resizable:!0,sortable:!0,filter:!0,cellStyle:{height:"auto"}},rue=ba("id"),iue=[{headerName:"Name",field:"name",flex:1},{headerName:"Parent category",field:"parentCategory",valueGetter:e=>{var n;let{data:t}=e;return null===(n=t.parentCategory)||void 0===n?void 0:n.name},flex:1},{headerName:"Actions",field:"id",cellRenderer:"edit",colId:"edit"}];function oue(e){let{rows:n,onEdit:t}=e;const a={edit:e=>(0,Ze.jsx)(tue,Kde(Kde({},e),{},{onEdit:t}))};return(0,Ze.jsx)(nue,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,{rowSelection:"single",defaultColDef:aue,columnDefs:iue,components:a,rowData:n,paginationPageSize:25,getRowId:rue,pagination:!0})})}var lue,sue;function cue(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const due=(0,Ge.default)(ze.$n)(lue||(lue=cue(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),uue=(0,Ge.default)(bh)(sue||(sue=cue(["\n  justify-content: space-between;\n"]))),pue=()=>{const{data:e,loading:n,error:t,refetch:a,networkStatus:r}=(0,h.IT)(Sde,{notifyOnNetworkStatusChange:!0}),[i,o]=(0,g.useState)(!1),[l,s]=(0,g.useState)(null),c=(0,g.useCallback)(()=>o(e=>!e),[]),d=(0,g.useCallback)(e=>s(e),[]),u=(0,g.useCallback)(()=>s(null),[]),{showNotification:p}=vt(),m=(0,g.useCallback)(()=>{c(),p("Category created successfully","success")},[c,p]),f=(0,g.useCallback)(()=>{u(),p("Category deleted successfully","success")},[u,p]),y=(0,g.useCallback)(()=>{u(),p("Category updated successfully","success")},[u,p]),b=l?null==e?void 0:e.getSurveyQuestionCategories.find(e=>e.id===l):null;return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsx)(uue,{icon:"briefcase",iconColor:"primary",title:"Question Categories",children:(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(due,{size:"md",color:"primary",onClick:c,name:"AddCategoryButton",inline:!0,children:"+ Add Category"})})}),(n&&3!==r||4===r)&&(0,Ze.jsx)(Vg,{name:"ConfigurationAccountsContainer__Loading"}),t&&(0,Ze.jsx)(ub,{error:t,retry:a}),!t&&!n&&(null==e?void 0:e.getSurveyQuestionCategories)&&(0,Ze.jsx)(oue,{rows:null==e?void 0:e.getSurveyQuestionCategories,onEdit:d}),b&&(0,Ze.jsx)(ze.aF,{size:"md",onDismiss:u,dismissable:!0,show:!0,children:(0,Ze.jsx)(Wde,{existingCategory:b,onDeleted:f,onUpdated:y})}),i&&(0,Ze.jsx)(ze.aF,{size:"md",onDismiss:c,dismissable:!0,show:!0,children:(0,Ze.jsx)(Bde,{onCompleted:m,CategoryDetails:Ude})})]})};var mue,fue,yue,gue,bue,hue,vue;function xue(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Tue=(0,D.J1)(mue||(mue=xue(["\n  fragment DataTrackerConfigFields on DataTrackerConfig {\n    id\n    account {\n      id\n      name\n    }\n    supplier {\n      id\n      name\n    }\n    frequency\n    recurrence\n    locations {\n      id\n      name\n      tags {\n        id\n        tagName\n      }\n    }\n    meters {\n      id\n      name\n    }\n    tags\n  }\n"]))),Oue=((0,D.J1)(fue||(fue=xue(["\n  query GetDataTrackerConfig($id: ID!) {\n    getDataTrackerConfig(id: $id) {\n      ...DataTrackerConfigFields\n    }\n  }\n  ","\n"])),Tue),(0,D.J1)(yue||(yue=xue(["\n  query GetDataTrackerConfigs(\n    $accountId: ID\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getDataTrackerConfigs(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        ...DataTrackerConfigFields\n      }\n    }\n  }\n  ","\n"])),Tue)),kue=(0,D.J1)(gue||(gue=xue(["\n  query GetDataTrackerConfigFilters($accountId: ID, $field: String!) {\n    getDataTrackerConfigFilters(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"]))),jue=(0,D.J1)(bue||(bue=xue(["\n  mutation CreateDataTrackerConfig(\n    $id: ID!\n    $accountId: ID!\n    $supplierId: ID!\n    $frequency: Frequency!\n    $recurrence: Int!\n    $locationIds: [ID!]!\n    $metersIds: [ID!]!\n  ) {\n    createDataTrackerConfig(\n      input: {\n        id: $id\n        accountId: $accountId\n        supplierId: $supplierId\n        frequency: $frequency\n        recurrence: $recurrence\n        locationIds: $locationIds\n        metersIds: $metersIds\n      }\n    ) {\n      ...DataTrackerConfigFields\n    }\n  }\n  ","\n"])),Tue),Cue=(0,D.J1)(hue||(hue=xue(["\n  mutation UpdateDataTrackerConfig(\n    $id: ID!\n    $accountId: ID!\n    $supplierId: ID!\n    $frequency: Frequency!\n    $recurrence: Int!\n    $locationIds: [ID!]!\n    $metersIds: [ID!]!\n  ) {\n    updateDataTrackerConfig(\n      input: {\n        id: $id\n        accountId: $accountId\n        supplierId: $supplierId\n        frequency: $frequency\n        recurrence: $recurrence\n        locationIds: $locationIds\n        metersIds: $metersIds\n      }\n    ) {\n      ...DataTrackerConfigFields\n    }\n  }\n  ","\n"])),Tue),Sue=(0,D.J1)(vue||(vue=xue(["\n  mutation DeleteDataTrackerConfig($id: ID!) {\n    deleteDataTrackerConfig(id: $id)\n  }\n"])));var Nue,wue;function Due(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Aue=Ge.default.div(Nue||(Nue=Due(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),Rue=Ge.default.a(wue||(wue=Due(["\n  display: inline-block;\n  color: ",";\n  padding: 0 0 0 ",";\n  margin-right: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background),Pue=e=>{let{data:{id:n,account:t},onEdit:a,onDelete:r}=e;const i=rc(),o=i.dataTracker.find(e=>e.startsWith("edit")),l=i.dataTracker.find(e=>e.startsWith("delete")),s=n||(null==t?void 0:t.id);return(0,Ze.jsxs)(Aue,{children:[o&&(0,Ze.jsx)(Rue,{onClick:()=>a(TR.UPDATE,s),children:(0,Ze.jsx)(ze.In,{name:"data-tracker-config-row__edit--".concat(s),icon:"pencil-alt"})}),l&&(0,Ze.jsx)(Rue,{onClick:()=>r(TR.DELETE,s),children:(0,Ze.jsx)(ze.In,{name:"data-tracker-config-row__delete--".concat(s),icon:"trash-alt"})})]})};function Lue(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Iue(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Lue(Object(t),!0).forEach(function(n){Eue(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Lue(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Eue(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const _ue={pagination:!0,paginationPageSize:25,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{resizable:!1,sortable:!0,filter:!0,cellStyle:{padding:"10px",height:"auto",wordBreak:"break-word",lineHeight:"20px"},autoHeight:!0,minWidth:150},rowStyle:{width:"100%",display:"flex",alignItems:"center"},rowHeight:58};function Fue(e){let{setGridApi:n,fetchRows:t,onEdit:a,onDelete:r,isSystemAdmin:i}=e;const o=rt(),l=(0,N.m)(),s=Dd({autoFit:!0}),{showNotification:c}=vt(),d=(0,g.useCallback)(async e=>{try{const{data:{getDataTrackerConfigFilters:n}}=await l.query({query:kue,variables:{accountId:i?null:o,field:e.colDef.colId||e.colDef.field}});e.success(n.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){c("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning")}},[l,c,i,o]),u=(0,g.useMemo)(()=>[{headerName:"Account",filter:"agTextColumnFilter",filterParams:{buttons:["reset","apply"],newRowsAction:"keep"},field:"account.name",hide:!i,flex:1},{headerName:"Supplier",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},field:"supplier.name",flex:1},{headerName:"Frequency",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},field:"frequency",flex:1},{headerName:"Recurrence",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},field:"recurrence",flex:1},{headerName:"Locations",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},valueGetter:e=>{let{data:{locations:n}}=e;return null==n?void 0:n.map(e=>null==e?void 0:e.name)},field:"locations",flex:1},{headerName:"Meters",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},valueGetter:e=>{let{data:{meters:n}}=e;return null==n?void 0:n.map(e=>null==e?void 0:e.name)},field:"meters",flex:1},{headerName:"Tags",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},field:"tags",flex:1},{cellRenderer:"action",filter:!1,sortable:!1}],[d,i]),p=(0,g.useMemo)(()=>({action:e=>(0,Ze.jsx)(Pue,Iue(Iue({},e),{},{onEdit:a,onDelete:r}))}),[r,a]),m=(0,g.useMemo)(()=>({async getRows(e){try{const{startRow:n,sortModel:a,filterModel:r}=e.request,i=ia(r),{rows:o,totalRows:l}=await t({offset:n||0,limit:_ue.paginationPageSize,sort:oa(a),filters:i});return e.success({rowData:o,rowCount:l}),{rows:o,totalRows:l}}catch(n){throw e.fail(),n}}}),[t]);return(0,Ze.jsx)(nD,Iue(Iue({},_ue),{},{serverSideDatasource:m,columnDefs:u,onFirstDataRendered:s.onFirstDataRendered,onFilterChanged:s.onFilterChanged,onSortChanged:s.onSortChanged,onColumnVisible:s.onSaveGridColumnState,onColumnPinned:s.onSaveGridColumnState,onColumnResized:s.onSaveGridColumnState,onColumnMoved:s.onSaveGridColumnState,onColumnRowGroupChanged:s.onSaveGridColumnState,onColumnValueChanged:s.onSaveGridColumnState,onColumnPivotChanged:s.onSaveGridColumnState,components:p,onGridReady:e=>{s.onGridReady(e),n({api:e.api})}}))}const Bue=(e,n)=>{const t=[];return Array.isArray(e)&&e.length&&t.push({filterType:Vt.pe.Set,field:"locationPointId",values:e}),n&&t.push({filterType:Vt.pe.Set,field:"typeId",values:["636fddfc-01ef-4ebe-bef8-0c807cecee82","37333633-3533-3533-2d34-3234312d3338"]},{filterType:Vt.pe.Set,field:"isGeneration",values:["1"]}),t.length?{set:t}:{}};function Uue(e){var n,t;let{accountId:a,value:r,onChange:i,error:o,isSubmitting:l,name:s="metersIds",locationsToFilter:c,defaultOptions:d,disabled:u,isGenerationMeters:p}=e;const m=null==c?void 0:c.map(e=>e.label),{data:f,loading:y}=(0,h.IT)(Qc,{variables:{accountId:a,field:"locationPointId"},fetchPolicy:"network-only"}),b=null==f||null===(n=f.getEnergySourcePageFilter)||void 0===n?void 0:n.filter(e=>null==m?void 0:m.includes(e.label)),v=(null==b?void 0:b.map(e=>e.value))||[],x=Bue(v,p),{data:T,loading:O}=(0,h.IT)(Hc,{variables:{accountId:a,filters:x,sort:[{field:"name",order:"asc"}]},skip:y,fetchPolicy:"network-only"});let k=(0,g.useMemo)(()=>{var e;const n=null==T||null===(e=T.getEnergySourceByAccountIdAndType)||void 0===e?void 0:e.rows;return(0,zt.sortBy)(null==n?void 0:n.map(xi),e=>null==e?void 0:e.label.trim().toLowerCase())},[null==T||null===(t=T.getEnergySourceByAccountIdAndType)||void 0===t?void 0:t.rows]);return c&&c.length>0&&!v.length&&(k=[{label:"There is no meters for selected locations",value:null,isDisabled:!0}]),(0,Ze.jsx)(ze.KF,{name:s,onChange:i,isDisabled:l||u,isLoading:y||O,error:o,options:k,multiValueColor:"tertiary",defaultOptions:!Array.isArray(d)||d,value:r,placeholder:"Start typing to search for a meter"})}const Mue=e=>{const n=(0,zt.get)(e,"target.type");return"text"===n||"textarea"===n};var Vue=function(e){return e.account="account",e.supplier="supplier",e.frequency="frequency",e.recurrence="recurrence",e}(Vue||{});const zue=Object.keys(Vt.jN).map(e=>({label:e,value:e}));var Gue,$ue,Wue,que,Jue,Yue;function Hue(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Kue(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Hue(Object(t),!0).forEach(function(n){Que(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hue(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Que(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Zue(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Xue=(0,Ge.default)(ze.fv)(Gue||(Gue=Zue(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),epe=(0,Ge.default)(ze.JU)($ue||($ue=Zue(["\n  margin: 0 ",";\n"])),e=>e.theme.geometry.xs.spacing),npe=Ge.default.div(Wue||(Wue=Zue(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),tpe=(0,Ge.default)(ze.DZ)(que||(que=Zue(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),ape=Ge.default.div(Jue||(Jue=Zue(["\n  display: flex;\n  flex-flow: column;\n  height: 100%;\n  padding: "," 0;\n"])),e=>e.theme.geometry.sm.spacing),rpe=(0,Ge.default)(ze.P)(Yue||(Yue=Zue(["\n  ","\n"])),e=>{let{theme:n}=e;return"\n    overflow: auto;\n    padding: ".concat(n.geometry.xs.spacing,";\n  ")}),ipe=(0,Ge.default)(ze.EY)(e=>{let{theme:n}=e;return{margin:"".concat(n.geometry.xs.spacing," 0 ").concat(n.geometry.xs.spacing," ").concat(n.geometry.xs.spacing),'& [data-icon="info-circle"]':{color:n.colors.info.dark.background,marginRight:"3px"}}}),ope={offset:0,limit:10,filters:{},sort:[{field:"name",order:"asc"}]},lpe=["WATER","ELECTRICITY","GAS","HEATSTEAM"],spe=e=>{var n,t,a,r,i,o,l;let{isSysAdmin:s,currentAccount:c,dataTrackerConfigToUpdate:d,refresh:u,dismiss:p}=e;const m=(0,N.m)(),f=rt(),y=s?{id:null,name:null}:c,[b,v]=(0,g.useState)({name:(null==d||null===(n=d.account)||void 0===n?void 0:n.label)||y.name,id:(null==d||null===(t=d.account)||void 0===t?void 0:t.value)||y.id}),[x,T]=(0,g.useState)(!1),[O,k]=(0,g.useState)({}),[j,C]=(0,g.useState)((null==d?void 0:d.locations)||[]),[S,w]=(0,g.useState)((null==d?void 0:d.meters)||[]),[D,A]=(0,g.useState)(d||{id:(0,Ai.A)(),account:s?null:{value:f,label:null==c?void 0:c.name},supplier:null,frequency:null,recurrence:0,locations:[],meters:[],supplierUtility:""}),R=null==d||null===(a=d.supplier)||void 0===a?void 0:a.value;(0,g.useEffect)(()=>{R&&(async e=>{const n=await m.query({query:Of,variables:{id:R}}),{utility:t}=null===(e=n.data)||void 0===e?void 0:e.getSupplier;A(Kue(Kue({},D),{},{supplierUtility:t}))})()},[R]),(0,g.useEffect)(()=>{const e=Object.values(O).some(Boolean),n=Object.values(D).every(Boolean);T(!e&&n)},[O,D]);const[P,L]=(0,g.useState)(!1),{showNotification:I}=vt(),{data:E}=(0,h.IT)(ID,{variables:Kue(Kue({},ope),{},{accountId:b.id})}),_=Ti(null==E||null===(r=E.getLocationsPage)||void 0===r?void 0:r.rows),[F,{loading:B}]=(0,Ot.n)(d?Cue:jue),U=(0,g.useCallback)(e=>{"locationsSelect"===e.target.name?(C(e.target.select),w([]),A(Kue(Kue({},D),{},{locations:e.target.select,meters:[]}))):"meters"===e.target.name?(w(e.target.select),A(Kue(Kue({},D),{},{meters:e.target.select}))):"supplier"===e.target.name?(A(Kue(Kue({},D),{},{supplier:e.target.select,supplierUtility:e.entity.utility})),lpe.includes(e.entity.utility)||(A(Kue(Kue({},D),{},{supplier:e.target.select,supplierUtility:e.entity.utility,meters:[]})),w([]))):A(Kue(Kue({},D),{},{[e.target.name]:Mue(e)?e.target.value:e.target.select}))},[D]),M=(0,g.useCallback)(e=>{const n=Kue(Kue({},D),{},{[e.target.name]:e.target.value});A(n),k((e=>{const n={};(Number(e.recurrence)<=0||!Number.isInteger(Number(e.recurrence)))&&(n.recurrence="The value must be an number greater than zero");for(const t of Object.values(Vue))e[t]||(n[t]="Value required");return n})(n))},[D]),V=s?b.id:f,z=!lpe.includes(D.supplierUtility);return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,loading:B,dismissable:!0,name:"ConfigurationSchemesContainer__Modal--update",onDismiss:p,children:(0,Ze.jsxs)(ape,{children:[(0,Ze.jsx)(tpe,{size:"lg",children:d?(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.updateHeader"}):(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.createHeader"})}),(0,Ze.jsx)(rpe,{children:(0,Ze.jsxs)("form",{name:"create-or-update-dataTrackerConfig__form",children:[s&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Xue,{item:!0,children:[(0,Ze.jsx)(npe,{children:(0,Ze.jsx)(epe,{children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.account"})})}),(0,Ze.jsx)(Kh,{"data-cy":"DataTrackerConfig__Account-name",onChange:e=>{let{name:n,id:t}=e;v({name:n,id:t}),C([]),w([]),A(Kue(Kue({},D),{},{account:{value:t,label:n},supplier:null,locations:[],meters:[]}))},name:"account",value:b.id,error:O.account})]})}),V&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Xue,{item:!0,children:[(0,Ze.jsx)(npe,{children:(0,Ze.jsx)(epe,{children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.supplier"})})}),(0,Ze.jsx)(Bre,{"data-cy":"DataTrackerConfig__Supplier",accountId:(null==D||null===(i=D.account)||void 0===i?void 0:i.value)||V,onChange:U,name:"supplier",value:D.supplier,error:O.supplier})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Xue,{item:!0,children:[(0,Ze.jsx)(npe,{children:(0,Ze.jsx)(epe,{children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.frequency"})})}),(0,Ze.jsx)(ze.l6,{name:"frequency",classPrefix:"frequency-select",isDisabled:P,onChange:U,value:D.frequency,options:zue,error:O.frequency})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-priority",children:(0,Ze.jsxs)(Xue,{item:!0,children:[(0,Ze.jsx)(npe,{children:(0,Ze.jsx)(epe,{children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.recurrence"})})}),(0,Ze.jsx)(ze.ks,{"data-cy":"DataTrackerConfigDetails__Input-recurrence",disabled:P,onChange:M,name:"recurrence",value:D.recurrence,error:O.recurrence,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Xue,{item:!0,children:[(0,Ze.jsx)(npe,{children:(0,Ze.jsx)(epe,{children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.locations"})})}),(0,Ze.jsx)(_D,{name:"locationsSelect",accountId:(null==D||null===(o=D.account)||void 0===o?void 0:o.value)||V,value:j,onChange:U,isSubmitting:P,disabled:P,defaultOptions:_,error:void 0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Xue,{item:!0,children:[(0,Ze.jsx)(npe,{children:(0,Ze.jsx)(epe,{children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.meters"})})}),(0,Ze.jsx)(Uue,{name:"meters",accountId:(null==D||null===(l=D.account)||void 0===l?void 0:l.value)||V,locationsToFilter:D.locations,value:S,onChange:U,isSubmitting:P,disabled:P||z,defaultOptions:!1,isGenerationMeters:!1,error:void 0}),z&&(0,Ze.jsxs)(ipe,{size:"sm",children:[(0,Ze.jsx)(ze.In,{icon:"info-circle"}),"Meters can only be selected for suppliers with data types that use meters (electricity, heat & steam, water and gas)"]})]})})]})]})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(Xue,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{name:"create-or-update-dataTrackerConfig__button",color:"success",onClick:e=>{(async e=>{var n;e.preventDefault(),L(!0);const t=Kue(Kue({},(e=>{var n,t,a;return{accountId:null==e||null===(n=e.account)||void 0===n?void 0:n.value,id:e.id,supplierId:null==e||null===(t=e.supplier)||void 0===t?void 0:t.value,frequency:null===(a=e.frequency)||void 0===a?void 0:a.value,recurrence:Number(e.recurrence),locationIds:ji(e.locations||[]),metersIds:ji(e.meters||[])}})(D)),{},{accountId:(null===(n=D.account)||void 0===n?void 0:n.value)||f});try{await F({variables:d?Kue(Kue({},t),{},{id:null==d?void 0:d.id}):t}),I("Data Tracker configuration has been successfully ".concat(d?"updated":"created"),"success"),u()}catch(e){I("Something went wrong. If the problem persists, contact support","danger"),console.error(e)}finally{p()}L(!1)})(e)},disabled:B||!x,children:d?(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.update"}):(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.create"})})})})]})})};var cpe;function dpe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function upe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dpe(Object(t),!0).forEach(function(n){ppe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dpe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ppe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const mpe=(0,Ge.default)(ze.$n)(cpe||(cpe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),fpe=(0,Ye.Ay)(()=>{const e=(0,N.m)(),n=rt(),{id:t,name:a}=Pu(),r={id:t,name:a},i=rc(),o=i.role===Vt.gG.Sysadmin,{showNotification:l}=vt(),[s,c]=(0,g.useState)([]),[d,u]=(0,g.useState)(),[p,m]=(0,g.useState)({type:null,dataTrackerConfigId:null}),{error:f,refetch:y}=function(e){return(0,h.IT)(Oue,{variables:{accountId:e||null}})}(o?null:n),[b]=(0,Ot.n)(Sue),v=s.find(e=>e.id===p.dataTrackerConfigId),x=(0,g.useCallback)(()=>{var e;return null==d||null===(e=d.api)||void 0===e?void 0:e.refreshServerSide({purge:!0})},[d]),T=(e,n)=>m({type:e,dataTrackerConfigId:n}),O=e=>{T(null,null),null!=e&&e.message&&l(null==e?void 0:e.message,null==e?void 0:e.color)};return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationDataTrackerContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{name:"ConfigurationDataTrackerContainer__Controls",icon:"list",iconColor:"primary",title:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.container.header.missing"}),children:[(0,Ze.jsx)(ze.fv,{span:2,children:(0,Ze.jsx)(SD,{gridApi:null==d?void 0:d.api})}),i.dataTracker.find(e=>e.startsWith("create"))&&(0,Ze.jsx)(mpe,{name:"ConfigurationDataTrackerContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>T(TR.CREATE),children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.container.add"})})]}),f&&(0,Ze.jsx)(ze.Kw,{error:f,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationDataTrackerContainer__Error",icon:a,title:n,body:t,retry:y})}}),(0,Ze.jsx)(Fue,{isSystemAdmin:o,fetchRows:async t=>{const{data:{getDataTrackerConfigs:{rows:a,totalRows:r}}}=await e.query({query:Oue,variables:upe(upe({},t),{},{accountId:o?null:n}),fetchPolicy:"network-only"});return c(a),{rows:a,totalRows:r}},setGridApi:u,onEdit:T,onDelete:T}),p.type===TR.CREATE&&(0,Ze.jsx)(spe,{isSysAdmin:o,currentAccount:r,refresh:x,dismiss:O}),p.type===TR.UPDATE&&(0,Ze.jsx)(spe,{isSysAdmin:o,currentAccount:r,dataTrackerConfigToUpdate:(k=v,{id:k.id,account:xi(k.account),supplier:xi(k.supplier),frequency:(j=k.frequency,{label:j,value:j}),recurrence:k.recurrence,locations:Ti(k.locations),meters:Ti(k.meters),supplierUtility:k.supplier.utility}),refresh:x,dismiss:O}),p.type===TR.DELETE&&(0,Ze.jsx)(Nh,{deleteObjectName:"Data Tracker Configuration",onConfirmClick:async()=>{try{await b({variables:{id:null==v?void 0:v.id}}),l("DataTracker configuration has been successfully deleted","success"),x()}catch(e){l("An error has occurred. If the problem persists please contact support","danger"),console.error(e)}finally{O()}},onDismissClick:O})]});var k,j});var ype,gpe,bpe,hpe,vpe;function xpe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(0,D.J1)(ype||(ype=xpe(["\n  query GetAnomalyThreshold($accountId: ID!) {\n    getAnomalyThreshold(accountId: $accountId) {\n      ...AnomalyThresholdFields\n    }\n  }\n  ","\n"])),zp);const Tpe=(0,D.J1)(gpe||(gpe=xpe(["\n  mutation CreateAnomalyThreshold(\n    $accountId: ID!,\n    $thresholdPercentage: Float!,\n    $utilityType: UtilityTypeInput!,\n    $monthlyVarianceDetectionEnabled: Boolean!,\n    $annuallyVarianceDetectionEnabled: Boolean!\n  ) {\n    createAnomalyThreshold(\n      input: {\n        accountId: $accountId,\n        thresholdPercentage: $thresholdPercentage,\n        utilityType: $utilityType,\n        monthlyVarianceDetectionEnabled: $monthlyVarianceDetectionEnabled,\n        annuallyVarianceDetectionEnabled: $annuallyVarianceDetectionEnabled\n      }\n    ) {\n      ...AnomalyThresholdFields\n    }\n  }\n  ","\n"])),zp),Ope=(0,D.J1)(bpe||(bpe=xpe(["\n  mutation UpdateAnomalyThreshold(\n    $id: ID!,\n    $accountId: ID!,\n    $thresholdPercentage: Float!,\n    $utilityType: UtilityTypeInput!,\n    $monthlyVarianceDetectionEnabled: Boolean!,\n    $annuallyVarianceDetectionEnabled: Boolean!\n  ) {\n    updateAnomalyThreshold(\n      input: {\n        id: $id,\n        accountId: $accountId,\n        thresholdPercentage: $thresholdPercentage,\n        utilityType: $utilityType,\n        monthlyVarianceDetectionEnabled: $monthlyVarianceDetectionEnabled,\n        annuallyVarianceDetectionEnabled: $annuallyVarianceDetectionEnabled\n      }\n    ) {\n      ...AnomalyThresholdFields\n    }\n  }\n  ","\n"])),zp),kpe=(0,D.J1)(hpe||(hpe=xpe(["\n  mutation DeleteAnomalyThreshold($id: ID!) {\n    deleteAnomalyThreshold(id: $id)\n  }\n"]))),jpe=(0,D.J1)(vpe||(vpe=xpe(["\n  query GetDataTrackerAnomalyFilters($accountId: ID, $field: String!) {\n    getDataTrackerAnomalyFilters(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));function Cpe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Spe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Cpe(Object(t),!0).forEach(function(n){Npe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Cpe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Npe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function wpe(e){let{setGridApi:n,fetchRows:t,onEdit:a,onDelete:r,isSystemAdmin:i}=e;const o=rt(),l=(0,N.m)(),s=Dd({autoFit:!0}),{showNotification:c}=vt(),d={pagination:!0,paginationPageSize:25,rowModelType:"serverSide",defaultColDef:{resizable:!1,sortable:!0,filter:!0,cellStyle:{padding:"10px",height:"auto",wordBreak:"break-word",lineHeight:"20px"},autoHeight:!0},columnDefs:[{headerName:"Account",filter:"agTextColumnFilter",filterParams:{buttons:["reset","apply"],newRowsAction:"keep"},field:"account.name",hide:!i,flex:1},{headerName:"Threshold Percentage",filter:"agNumberColumnFilter",field:"thresholdPercentage",valueFormatter:e=>"".concat(e.value,"%"),flex:1},{headerName:"Utility Type",filter:"agSetColumnFilter",field:"transactionType",valueGetter:e=>{const{transactionType:n,isDefault:t}=e.data.utilityType;return t?"DEFAULT":n},filterParams:{values:async e=>{try{const{data:{getDataTrackerAnomalyFilters:n}}=await l.query({query:jpe,variables:{accountId:i?null:o,field:e.colDef.colId||e.colDef.field}});e.success(n.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){c("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning")}},valueFormatter:la},flex:1},{headerName:"Monthly Variance Detection",field:"monthlyVarianceDetectionEnabled",valueFormatter:e=>e.value?"Enabled":"Disabled",filter:!1,flex:1},{headerName:"Annual Variance Detection",field:"annuallyVarianceDetectionEnabled",valueFormatter:e=>e.value?"Enabled":"Disabled",filter:!1,flex:1},{cellRenderer:"action",filter:!1,sortable:!1}],rowStyle:{width:"100%",display:"flex",alignItems:"center"},rowHeight:58},u={action:e=>(0,Ze.jsx)(Pue,Spe(Spe({},e),{},{onEdit:()=>a(uE,e.data.id),onDelete:()=>r("DELETE",e.data.id)}))};return(0,g.createElement)(nD,Spe(Spe({},d),{},{key:o,cacheBlockSize:d.paginationPageSize,onFirstDataRendered:s.onFirstDataRendered,onFilterChanged:s.onFilterChanged,onSortChanged:s.onSortChanged,onColumnVisible:s.onSaveGridColumnState,onColumnPinned:s.onSaveGridColumnState,onColumnResized:s.onSaveGridColumnState,components:u,onGridReady:e=>{s.onGridReady(e),n({api:e.api}),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{const{startRow:n,sortModel:a,filterModel:r}=e.request,i=ia(r),{rows:o,totalRows:l}=await t({offset:n||0,limit:d.paginationPageSize,sort:oa(a),filters:i});return e.success({rowData:o,rowCount:l}),{rows:o,totalRows:l}}catch(n){throw e.fail(),n}}})}}))}function Dpe(e){let{value:n,error:t,name:a,onChange:r}=e;const i=(0,g.useMemo)(()=>Object.entries(Vt.D_).map(e=>{let[n,t]=e;return{value:t,label:n}}),[]);return(0,Ze.jsx)(ze.l6,{name:a,placeholder:"Select a utility type...",value:n,options:i,error:t,onChange:r,classPrefix:"utility-select"})}function Ape(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Rpe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ape(Object(t),!0).forEach(function(n){Ppe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ape(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ppe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Lpe,Ipe,Epe,_pe,Fpe,Bpe,Upe=function(e){return e.account="account",e.thresholdPercentage="thresholdPercentage",e}(Upe||{});function Mpe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Vpe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Mpe(Object(t),!0).forEach(function(n){zpe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Mpe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zpe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Gpe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $pe=(0,Ge.default)(ze.fv)(Lpe||(Lpe=Gpe(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Wpe=(0,Ge.default)(ze.JU)(Ipe||(Ipe=Gpe(["\n  margin: 0 ",";\n"])),e=>e.theme.geometry.xs.spacing),qpe=Ge.default.div(Epe||(Epe=Gpe(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),Jpe=(0,Ge.default)(ze.DZ)(_pe||(_pe=Gpe(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Ype=Ge.default.div(Fpe||(Fpe=Gpe(["\n  display: flex;\n  flex-flow: column;\n  height: 100%;\n  padding: "," 0;\n"])),e=>e.theme.geometry.sm.spacing),Hpe=(0,Ge.default)(ze.P)(Bpe||(Bpe=Gpe(["\n  ","\n"])),e=>{let{theme:n}=e;return"\n    overflow: auto;\n    padding: ".concat(n.geometry.xs.spacing,";\n  ")}),Kpe=e=>{var n,t,a;let{isSysAdmin:r,currentAccount:i,anomalyThresholdToUpdate:o,refresh:l,dismiss:s}=e;const c=rt(),d=r?{id:null,name:null}:i,[u,p]=(0,g.useState)({name:(null==o||null===(n=o.account)||void 0===n?void 0:n.label)||d.name,id:(null==o||null===(t=o.account)||void 0===t?void 0:t.value)||d.id}),[m,f]=(0,g.useState)(!1),[y,b]=(0,g.useState)({}),[h,v]=(0,g.useState)(o||{account:r?null:{value:c,label:null==i?void 0:i.name},thresholdPercentage:null,utilityType:{isDefault:!0},monthlyVarianceDetectionEnabled:!0,annuallyVarianceDetectionEnabled:!0}),[x,T]=(0,g.useState)(!1),{showNotification:O}=vt(),[k,{loading:j}]=(0,Ot.n)(o?Ope:Tpe),C=(0,g.useCallback)((e,n)=>{const t="object"==typeof e&&e.target?e:n;if(!t||!t.target)return;const{name:a,value:r}=t.target;let i=Vpe({},h);if("transactionType"===a){const e={transactionType:r,isDefault:!r};i=Vpe(Vpe({},h),{},{utilityType:e})}else i=Vpe(Vpe({},h),{},{[a]:r});v(i),b((e=>{const n={},t=Number(e.thresholdPercentage);(isNaN(t)||t<=0||t>100)&&(n.thresholdPercentage="The value must be a number between 1 and 100");for(const t of Object.values(Upe))e[t]||(n[t]="Value required");return n})(i))},[h,v,b]);(0,g.useEffect)(()=>{const e=Object.values(y).some(Boolean),n=Vpe({},h),t=Object.values(n).every(e=>null!=e&&""!==e);f(!e&&t)},[y,h]);const S=r?u.id:c;return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,loading:j,dismissable:!0,name:"ConfigurationSchemesContainer__Modal--update",onDismiss:s,children:(0,Ze.jsxs)(Ype,{children:[(0,Ze.jsx)(Jpe,{size:"lg",children:o?(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.updateHeader"}):(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.createHeader"})}),(0,Ze.jsx)(Hpe,{children:(0,Ze.jsxs)("form",{name:"create-or-update-anomalyThresholdConfig__form",children:[r&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)($pe,{item:!0,children:[(0,Ze.jsx)(qpe,{children:(0,Ze.jsx)(Wpe,{children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.account"})})}),(0,Ze.jsx)(Kh,{"data-cy":"AnomalyThresholdConfig__Account-name",onChange:e=>{let{name:n,id:t}=e;p({name:n,id:t}),v(Vpe(Vpe({},h),{},{account:{value:t,label:n}}))},name:"account",value:u.id,error:y.account})]})}),S&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-priority",children:(0,Ze.jsxs)($pe,{item:!0,children:[(0,Ze.jsx)(qpe,{children:(0,Ze.jsx)(Wpe,{children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.thresholdPercentage"})})}),(0,Ze.jsx)(oD,{"data-cy":"AnomalyThresholdConfigDetails__Input-thresholdPercentage",disabled:x,onChange:C,name:"thresholdPercentage",value:h.thresholdPercentage,error:y.thresholdPercentage,box:!0,type:"number",step:"1"})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-priority",children:(0,Ze.jsxs)($pe,{item:!0,children:[(0,Ze.jsx)(qpe,{children:(0,Ze.jsx)(Wpe,{children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.utilityType"})})}),(0,Ze.jsx)(Dpe,{"data-cy":"AnomalyThresholdConfig_TransactionType",onChange:C,name:"transactionType",value:null===(a=h.utilityType)||void 0===a?void 0:a.transactionType})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-varianceDetection",children:(0,Ze.jsxs)($pe,{item:!0,children:[(0,Ze.jsx)(qpe,{children:(0,Ze.jsx)(Wpe,{children:"Monthly"})}),(0,Ze.jsx)(ze.Sc,{"data-cy":"AnomalyThresholdConfig_MonthlyVarianceDetection",onChange:e=>{v(Vpe(Vpe({},h),{},{monthlyVarianceDetectionEnabled:e.target.checked}))},checked:h.monthlyVarianceDetectionEnabled})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-varianceDetection",children:(0,Ze.jsxs)($pe,{item:!0,children:[(0,Ze.jsx)(qpe,{children:(0,Ze.jsx)(Wpe,{children:"Annually"})}),(0,Ze.jsx)(ze.Sc,{"data-cy":"AnomalyThresholdConfig_AnnuallyVarianceDetection",onChange:e=>{v(Vpe(Vpe({},h),{},{annuallyVarianceDetectionEnabled:e.target.checked}))},checked:h.annuallyVarianceDetectionEnabled})]})})]})]})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)($pe,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{name:"create-or-update-anomalyThresholdConfig__button",color:"success",onClick:e=>{(async e=>{e.preventDefault(),T(!0);const n=Vpe({},((e,n)=>{var t;const a=null==e||null===(t=e.account)||void 0===t?void 0:t.value;if(void 0===a)throw new Error("Account ID is undefined");const r=Number(null==e?void 0:e.thresholdPercentage);if(isNaN(r))throw new Error("Threshold percentage is not a number");const i=e.utilityType.transactionType,o={transactionType:i,isDefault:!i};if(!o)throw new Error("Utility type is required");const l={accountId:a,thresholdPercentage:r,utilityType:o,monthlyVarianceDetectionEnabled:e.monthlyVarianceDetectionEnabled,annuallyVarianceDetectionEnabled:e.annuallyVarianceDetectionEnabled},s=e.id;if(n){if(!s)throw new Error("Id is required");l.id=s}return l})(h,!!o));try{await k({variables:n}),O("Anomaly Threshold has been successfully ".concat(o?"updated":"created"),"success"),l()}catch(e){if(e instanceof Error&&e.message.includes("Duplicate"))return O("Anomaly Threshold already exists for this account","danger");O("Something went wrong. If the problem persists, contact support","danger")}finally{s()}T(!1)})(e)},disabled:j||!m,children:o?(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.update"}):(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.modal.create"})})})})]})})};var Qpe;function Zpe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Xpe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Zpe(Object(t),!0).forEach(function(n){eme(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Zpe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function eme(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const nme=(0,Ge.default)(ze.$n)(Qpe||(Qpe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),tme=(0,Ye.Ay)(()=>{const e=(0,N.m)(),n=rt(),t=Pu(),a=rc(),r=a.role===Vt.gG.Sysadmin,{showNotification:i}=vt(),[o,l]=(0,g.useState)([]),[s,c]=(0,g.useState)(),[d,u]=(0,g.useState)({id:"",type:null,anomalyThresholdId:null,utilityType:""}),{error:p,refetch:m}=function(e){return(0,h.IT)(Gp,{variables:{accountId:e||null}})}(r?null:n),[f]=(0,Ot.n)(kpe),y=o.find(e=>e.id===d.id),b=(0,g.useCallback)(()=>{try{var e;null==s||null===(e=s.api)||void 0===e||e.refreshServerSide({purge:!0})}catch(e){console.error(e)}},[s]),v=(e,n)=>u({type:e,id:n}),x=e=>{v(null,null),null!=e&&e.message&&i(null==e?void 0:e.message,null==e?void 0:e.color)};return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAnomalyContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationAnomalyContainer__Controls",icon:"list",iconColor:"primary",title:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.container.header.anomaly"}),children:a.dataTracker.find(e=>e.startsWith("create"))&&(0,Ze.jsx)(nme,{name:"ConfigurationAnomalyContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>v(TR.CREATE,null),children:(0,Ze.jsx)(Je.A,{id:"pages.configuration.dataTracker.container.add"})})}),p&&(0,Ze.jsx)(ze.Kw,{error:p,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationAnomalyContainer__Error",icon:a,title:n,body:t,retry:m})}}),(0,Ze.jsx)(wpe,{isSystemAdmin:r,fetchRows:async t=>{const a=await e.query({query:Gp,variables:Xpe(Xpe({},t),{},{accountId:r?null:n}),fetchPolicy:"network-only"}),{data:{getAnomalyThresholds:{rows:i,totalRows:o}}}=a;return l(i),{rows:i,totalRows:o}},setGridApi:c,onEdit:v,onDelete:v}),d.type===TR.CREATE&&(0,Ze.jsx)(Kpe,{isSysAdmin:r,currentAccount:t,refresh:b,dismiss:x}),d.type===TR.UPDATE&&(0,Ze.jsx)(Kpe,{isSysAdmin:r,currentAccount:t,anomalyThresholdToUpdate:(T=y,Rpe(Rpe({},T),{},{account:xi(T.account),monthlyVarianceDetectionEnabled:T.monthlyVarianceDetectionEnabled,annuallyVarianceDetectionEnabled:T.annuallyVarianceDetectionEnabled})),refresh:b,dismiss:x}),d.type===TR.DELETE&&(0,Ze.jsx)(Nh,{deleteObjectName:"Anomaly Threshold",onConfirmClick:async()=>{try{await f({variables:{id:null==y?void 0:y.id}}),i("DataTracker configuration has been successfully deleted","success"),b()}catch(e){i("An error has occurred. If the problem persists please contact support","danger"),console.error(e)}finally{x()}},onDismissClick:x})]});var T});var ame;const rme=Ge.default.iframe(ame||(ame=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  height: calc(100% - 5px);\n"]))),ime=()=>(0,Ze.jsx)(rme,{id:"flowsFrame",src:"/rio-flows/configuration/"});var ome,lme;function sme(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const cme=(0,Ge.default)(ze.fI)(ome||(ome=sme(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),dme=(0,Ge.default)(ze.Y3)(lme||(lme=sme(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),ume=e=>{let{accountId:n,businessName:t,profileImage:a,path:r}=e;return(0,Ze.jsx)(XN,{name:"configuration-menu__item--contractors",to:"".concat(r,"/").concat(n),children:(0,Ze.jsxs)(cme,{name:"account-row--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(dme,{name:"account-row__profile-picture--".concat(n),src:a,size:"xs",accountName:t}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(n),size:"md",children:t})})]})})};var pme,mme,fme,yme;function gme(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function bme(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gme(Object(t),!0).forEach(function(n){hme(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gme(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hme(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function vme(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const xme=(0,Ge.default)(ze.JU)(pme||(pme=vme(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Tme=Ge.default.div(mme||(mme=vme(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),Ome=(0,Ge.default)(ze.DZ)(fme||(fme=vme(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),kme=(0,Ge.default)(ze.fv)(yme||(yme=vme(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),jme=e=>{let{heading:n,flowSubscriptionDetails:t,setFlowSubscriptionDetails:a}=e;const r=(0,g.useCallback)((e,n)=>{var r;a(bme(bme({},t),{},{[n]:e.id||(null===(r=e.target)||void 0===r?void 0:r.value)}))},[a,t]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Ome,{size:"lg",children:n}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kme,{item:!0,children:[(0,Ze.jsx)(Tme,{children:(0,Ze.jsx)(xme,{children:"Account"})}),(0,Ze.jsx)(Kh,{value:t.accountId,onChange:e=>r(e,"accountId")})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kme,{item:!0,children:[(0,Ze.jsx)(Tme,{children:(0,Ze.jsx)(xme,{children:"Flow"})}),(0,Ze.jsx)(Zh,{value:t.flowId,onChange:e=>r(e,"flowId")})]})})]})},Cme=e=>{const n=!!e.accountId,t=!!e.flowId;return n&&t};var Sme,Nme;function wme(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Dme=Ge.default.div(Sme||(Sme=wme(["\n  padding: 20px;\n"]))),Ame=(0,Ge.default)(ze.fv)(Nme||(Nme=wme(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Rme=e=>{let{onDismiss:n,onComplete:t}=e;const[a,r]=(0,g.useState)({accountId:"",flowId:""}),[i]=(0,Ot.n)(rp,{onCompleted:()=>{t({message:"Flow subscription has been created.",colour:"success"}),n()},onError:()=>{t({message:"Something went wrong! Please try again later.",colour:"danger"})},update:(e,n)=>{let{data:{createFlowSubscription:t}}=n;const a=e.readQuery({query:ap});if(a&&t){const n=[...a.getFlowSubscriptions,t];e.writeQuery({query:ap,data:{getFlowSubscriptions:n}})}}}),o=(0,g.useCallback)(()=>{i({variables:{accountId:a.accountId,flowId:a.flowId}})},[i,a]);return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,onDismiss:n,children:(0,Ze.jsxs)(Dme,{children:[(0,Ze.jsx)(jme,{heading:"Create new Flow Subscription",flowSubscriptionDetails:a,setFlowSubscriptionDetails:r}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(Ame,{item:!0,children:(0,Ze.jsx)(ze.$n,{disabled:!Cme(a),onClick:o,children:"Submit"})})})]})})};var Pme,Lme,Ime;function Eme(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _me=(0,Ge.default)(ze.fv)(Pme||(Pme=Eme(["\n  display: flex;\n  flex-direction: row;\n"]))),Fme=(0,Ge.default)(ze.vj)(Lme||(Lme=Eme(["\n  min-width: 150px;\n"]))),Bme=(0,Ge.default)(ze.$n)(Ime||(Ime=Eme(["\n  margin-right: ",";\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),Ume=()=>{const e=(0,m.zy)(),[n,t]=(0,g.useState)(""),[a,r]=(0,g.useState)(!1),[i,o]=(0,g.useState)(null),{showNotification:l}=vt(),{data:s,loading:c,networkStatus:d,error:u,refetch:p}=op(),f=(null==s?void 0:s.getFlowSubscriptions)||[],y=new Set,b=(null==f?void 0:f.filter(e=>{const n=y.has(e.account.id);return y.add(e.account.id),!n})).filter(e=>{var t;return null==e||null===(t=e.account)||void 0===t||null===(t=t.name)||void 0===t?void 0:t.includes(n)});return l&&null!=i&&i.message&&null!=i&&i.colour&&l(i.message,i.colour),(0,Ze.jsxs)(ze.fv,{name:"ConfigurationFlowsSubscriptionsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationFlowsSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:"Accounts with Flow Subscriptions",children:(0,Ze.jsxs)(_me,{container:!0,item:!0,children:[(0,Ze.jsx)(Bme,{name:"ConfigurationLegislationContainer__Controls__Button--add",color:"primary",inline:!0,component:"button",onClick:()=>r(!0),children:"+ Add Subscription"}),(0,Ze.jsx)(Fme,{name:"ConfigurationFlowsSubscriptionsContainer__Controls__Search",value:n,onChange:e=>{t(e.target.value)},hideButton:!0})]})}),(c&&3!==d||4===d)&&(0,Ze.jsx)(Vg,{name:"ConfigurationFlowsSubscriptionsContainer__Loading"}),u&&(0,Ze.jsx)(ze.Kw,{error:u,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ConfigurationFlowsSubscriptionsContainer__Error",icon:a,title:n,body:t,retry:p})}}),!c&&!b.length&&(0,Ze.jsx)(nv,{name:"ConfigurationFlowsSubscriptionsContainer__NoResults",title:"There are no results for this search."}),!c&&a&&(0,Ze.jsx)(Rme,{onDismiss:()=>r(!1),onComplete:o}),b.map(n=>{const t=n.account,a="string"==typeof t.logoPath?t.logoPath:"";return(0,Ze.jsx)(ume,{accountId:t.id,businessName:t.name,profileImage:a,path:e.pathname},t.id)})]})};var Mme,Vme,zme;function Gme(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $me=(0,Ge.default)(ze.fI)(Mme||(Mme=Gme(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),Wme=(0,Ge.default)(ze.Y3)(Vme||(Vme=Gme(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),qme=Ge.default.a(zme||(zme=Gme(["\n  display: inline-block;\n  color: ",";\n  padding: 0 "," 0 0;\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.xxl.spacing,e=>e.theme.colors.text.dark.background),Jme=e=>{let{name:n,id:t,onDelete:a,accountId:r}=e;return(0,Ze.jsx)("div",{children:(0,Ze.jsxs)($me,{name:"kb-row--".concat(t),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(Wme,{name:"kb-row__profile-picture--".concat(t),src:"",size:"xs",accountName:n}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,name:"account-row__name--".concat(t),size:"md",children:n})}),(0,Ze.jsx)(qme,{onClick:()=>a(t,r),children:(0,Ze.jsx)(ze.In,{name:"kb-row__edit",icon:"trash-alt"})})]})},t)},Yme=e=>{let{flows:n,onComplete:t}=e;const[a]=(0,Ot.n)(ip,{onCompleted:()=>{t("Flow subscription has been deleted.","success")},onError:()=>{t("Something went wrong! Please try again later.","danger")},update:(e,n)=>{let{data:{deleteFlowSubscription:t}}=n;const a=e.readQuery({query:ap});if(a&&t){const n=a.getFlowSubscriptions.filter(e=>e.flow.id!==t.flow.id);e.writeQuery({query:ap,data:{getFlowSubscriptions:n}})}}}),r=(0,g.useCallback)((e,n)=>a({variables:{accountId:n,flowId:e}}),[a]);return(0,Ze.jsx)(Ze.Fragment,{children:n.map(e=>(0,Ze.jsx)(Jme,{id:e.flow.id,accountId:e.account.id,name:e.flow.title,onDelete:r},e.flow.id))})};var Hme;const Kme=Ge.default.div(Hme||(Hme=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"]))),Qme=e=>{let{title:n,filteredFlows:t,onSearchChange:a,loading:r,search:i}=e;const{showNotification:o}=vt();return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationAccountsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationLearnSubscriptionsContainer__Controls",icon:"briefcase",iconColor:"primary",title:n,children:(0,Ze.jsx)(ze.fv,{container:!0,item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationFlowsSubscriptionsContainer__Controls__Search",value:i,onChange:a,hideButton:!0})})}),r&&(0,Ze.jsx)(Kme,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})}),!r&&!t.length&&(0,Ze.jsx)(nv,{name:"ConfigurationUsersContainer__NoResults",title:"There are no results for this search."}),!!t.length&&(0,Ze.jsx)(Yme,{flows:t,onComplete:o})]})};var Zme;const Xme=Ge.default.div(Zme||(Zme=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"]))),efe=()=>{const{accountId:e}=(0,m.g)(),[n,t]=(0,g.useState)(""),{data:a,loading:r,error:i}=op(),o=(0,g.useCallback)(e=>{t(e.target.value)},[t]),l=((null==a?void 0:a.getFlowSubscriptions)||[]).filter(t=>{var a;return(null===(a=t.account.name)||void 0===a?void 0:a.includes(n))&&t.account.id===e}).sort((e,n)=>ka(e.flow.title,n.flow.title));return(0,Ze.jsxs)(Ze.Fragment,{children:[(r||i)&&(0,Ze.jsx)(Xme,{children:(0,Ze.jsx)(ze.Ip,{size:"md"})}),!r&&!i&&(0,Ze.jsx)(Qme,{filteredFlows:l,onSearchChange:o,title:"Subscriptions",loading:r,search:n})]})};function nfe(){return(0,Ot.n)(Ey)}function tfe(){const[e]=(0,gs._)(Ly,{fetchPolicy:"network-only"});return async n=>{var t;const a=await e({variables:n});if(null===(t=a.data)||void 0===t||!t.getAssetsPageByAccountId)throw new Error("Failed to fetch assets page");const{rows:r,totalRows:i}=a.data.getAssetsPageByAccountId;return{rows:r,totalRows:i||0}}}var afe;function rfe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ife(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rfe(Object(t),!0).forEach(function(n){ofe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rfe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ofe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const lfe=Ge.default.div(afe||(afe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  gap: 8px;\n  align-items: center;\n"])));var sfe;function cfe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dfe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cfe(Object(t),!0).forEach(function(n){ufe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cfe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ufe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const pfe=Ge.default.div(sfe||(sfe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n"]))),mfe={pagination:!0,paginationPageSize:25,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}};function ffe(e){let{accountId:n,onGridReady:t,onEdit:a}=e;const r=(e=>{const n=rt(),t=Eu(),{showNotification:a}=vt(),[r]=(0,gs._)(Iy),i=(0,g.useCallback)(e=>{var n;const a=e.value;if(!a)return"";const r=t.find(e=>e.id===a);return null!==(n=null==r?void 0:r.name)&&void 0!==n?n:a},[t]),o=(0,g.useCallback)(async e=>{try{var t;const a=e.colDef.field||e.colDef.colId;if(!a)throw new Error("Unfilterable column");const i=((null===(t=(await r({variables:{accountId:n,field:a}})).data)||void 0===t?void 0:t.getAssetsPageByAccountIdFilter)||[]).map(e=>e.value?JSON.stringify(Gt().omit(e,"__typename")):e.value);e.success(i)}catch(n){a("Couldn't load filter values for column ".concat(e.colDef.field,": ").concat(n),"danger")}},[r,n,a]),l=(0,g.useMemo)(()=>({values:o,valueFormatter:la,cache:!1,refreshValuesOnOpen:!0}),[o]),s=(0,g.useMemo)(()=>ife(ife({},l),{},{valueFormatter:la}),[l]);return(0,g.useMemo)(()=>[{headerName:"ID",field:"id",filter:"agTextColumnFilter"},{headerName:"Name",field:"name",filter:"agTextColumnFilter"},{headerName:"Description",field:"description",filter:"agTextColumnFilter"},{filterParams:l,headerName:"GICS Code",field:"gicsCode.code",colId:"gicsCode.id"},{filterParams:l,headerName:"Asset Location",field:"assetLocation",filter:"agTextColumnFilter",valueFormatter:i},{filterParams:l,headerName:"Asset ID",field:"externalId"},{headerName:"Created At",field:"createdAt",valueFormatter:ua,filter:"agDateColumnFilter"},{headerName:"Last Updated At",field:"lastUpdatedAt",valueFormatter:ua,filter:"agDateColumnFilter"},{filterParams:s,headerName:"Deleted",field:"deleted",valueFormatter:sa,filter:"agSetColumnFilter"},...e?[{headerName:"Actions",field:"actions",sortable:!1,filter:!1,cellRenderer:n=>{const t=n.data;return(0,Ze.jsx)(lfe,{children:(0,Ze.jsx)(f.IconButton,{onClick:()=>e(t),title:"Edit","aria-label":"Edit",children:(0,Ze.jsx)(f.Icons.Edit,{})})})}}]:[]],[i,s,l,e])})(a),i=tfe();return(0,Ze.jsx)(pfe,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,dfe(dfe({},mfe),{},{columnDefs:r,onGridReady:e=>{t(e),e.api.setFilterModel({deleted:{field:"deleted",values:[JSON.stringify({label:"No",value:"0"})],filterType:"set"}}),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{const{startRow:t,sortModel:a,filterModel:r}=e.request,{rows:o,totalRows:l}=await i({accountId:n,offset:t||0,limit:mfe.paginationPageSize,sort:oa(a),filters:ia(r)});e.success({rowData:o,rowCount:l})}catch(n){de.Cp(n),e.fail()}}})}}))})}const yfe=JSON.parse('{"OA":[{"key":"name","type":"string","label":"Name","validators":[],"description":"Name of the asset"},{"key":"description","type":"string","label":"Description","validators":[],"description":"Description of the asset"},{"key":"externalId","type":"string","label":"Asset ID","validators":[],"description":"External identifier"},{"key":"assetLocation","type":"string","label":"Asset Location","validators":[],"description":"Location of the asset (free text)"},{"key":"gicsCodeId","type":"select","label":"GICS Code","validators":[],"description":"Code of The Global Industry Classification Standard (GICS)","selectOptions":[]},{"key":"deleted","type":"checkbox","label":"Deleted","validators":[],"description":"Leave non-empty to mark assets as deleted"},{"key":"id","type":"string","label":"ID (optional)","validators":[],"description":"Leave empty to create new. Provide existing record ID to update."}],"W0":{"version":"v2","styleOverrides":{"global":{},"primaryButton":{},"secondaryButton":{}},"backendSyncMode":"DISABLED","importIdentifier":"Investment Assets","allowCustomFields":false,"invalidDataBehavior":"REMOVE_INVALID_ROWS"},"iF":{"backgroundColor":"#0094c9","borderColor":"#0094c9","borderRadius":"32px","borderStyle":"solid","borderWidth":"1px","boxSizing":"border-box","color":"#ffffff","cursor":"pointer","display":"inline-block","fontFamily":"\'Proxima Nova\', Helvetica, Arial, sans-serif","fontSize":"16px","fontWeight":400,"lineHeight":"1.4em","marginLeft":"16px","opacity":1,"padding":"16px 24px","textAlign":"center","textDecoration":"none","width":"auto"}}');var gfe;const bfe=(0,D.J1)(gfe||(gfe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getGicsCodes {\n    getGicsCodes {\n      id\n      name\n      code\n    }\n  }\n"]))),hfe=["data"];function vfe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xfe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Tfe(){const e=(0,h.IT)(bfe),{data:{getGicsCodes:n=[]}={}}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,hfe);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vfe(Object(t),!0).forEach(function(n){xfe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vfe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({data:(0,zt.orderBy)(n,["name"],["asc"])},t)}const Ofe=["id"];function kfe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jfe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kfe(Object(t),!0).forEach(function(n){Cfe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kfe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cfe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Sfe(e){let{onCompleted:n}=e;const t=Pu(),a=rt(),r=_u(),i=Eu(),{data:o}=Tfe(),{showNotification:l}=vt(),[s]=nfe(),c=(0,g.useCallback)(async e=>{const t=e.map(e=>{const n=e,{id:t}=n,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,Ofe);return t&&String(t).trim()?jfe(jfe({},a),{},{id:String(t).trim()}):a}),r=(0,zt.chunk)(t,500),i={created:0,updated:0,deleted:0,failed:0};for(const e of r){const n=await s({variables:{assets:e,accountId:a}});await new Promise(e=>{setTimeout(()=>{e()},500)}),n.errors?i.failed+=e.length:n.data&&(i.created+=n.data.importAssets.created,i.updated+=n.data.importAssets.updated,i.deleted+=n.data.importAssets.deleted)}const{created:o,updated:c,deleted:d,failed:u}=i;let p="".concat(o," created, ").concat(c," updated, ").concat(d," deleted");u>0&&(p+=", ".concat(u," failed")),l(p),n()},[l,n,s,a]);if(!r)throw new Error("Configuration is not ready");const d={id:(null==r?void 0:r.id)||"",name:Vo(r),email:null==r?void 0:r.email,companyId:a,companyName:null==t?void 0:t.name},u=(0,g.useMemo)(()=>yfe.OA.map(e=>{switch(e.key){case"locationId":return jfe(jfe({},e),{},{selectOptions:i.map(e=>({label:e.name,value:e.id}))});case"gicsCodeId":return jfe(jfe({},e),{},{selectOptions:o.map(e=>({label:"".concat(e.code," - ").concat(e.name),value:e.id}))});default:return e}}),[i,o]);return(0,Ze.jsx)(VU.A,{licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:d,style:jfe(jfe({},QU.style),yfe.iF),settings:jfe(jfe({},QU.settings),yfe.W0),fields:u,onResults:c,children:"+ Upload assets"})}function Nfe(e){var n,t;let{asset:a,accountId:r,onClose:i,onCompleted:o}=e;const[l,s]=(0,g.useState)(a.name||""),[c,d]=(0,g.useState)(a.description||""),[u,p]=(0,g.useState)(a.externalId||""),[m,y]=(0,g.useState)((null===(n=a.gicsCode)||void 0===n?void 0:n.id)||""),[b,h]=(0,g.useState)(()=>{const e=a.assetLocation;return e?{value:e,label:e}:void 0}),[v,{loading:x}]=nfe(),{showNotification:T}=vt(),{data:O}=Tfe(),k=(0,g.useCallback)(async()=>{try{var e;await v({variables:{accountId:r,assets:[{id:a.id,name:l.trim(),description:c.trim()||void 0,externalId:u.trim()||void 0,gicsCodeId:m||void 0,assetLocation:(null==b||null===(e=b.value)||void 0===e?void 0:e.trim())||void 0}]},refetchQueries:["GetAssetsPageByAccountId"]}),T('Asset "'.concat(a.name,'" updated successfully'),"success"),o(),i()}catch(e){T("Failed to update asset: ".concat(e instanceof Error?e.message:"Unknown error"),"danger")}},[a,r,l,c,u,m,b,v,o,i,T]),j=[{label:"No GICS Code",value:""},...null!==(t=null==O?void 0:O.map(e=>({label:"".concat(e.code," - ").concat(e.name),value:e.id})))&&void 0!==t?t:[]];return(0,Ze.jsx)(f.Modal,{open:!0,onClose:i,title:"Edit Asset",children:(0,Ze.jsxs)(f.Grid,{container:!0,direction:"column",gap:3,children:[(0,Ze.jsx)(f.TextField,{label:"Name",value:l,onChange:e=>s(e.target.value),fullWidth:!0,required:!0}),(0,Ze.jsx)(f.TextField,{label:"Description",value:c,onChange:e=>d(e.target.value),fullWidth:!0}),(0,Ze.jsx)(f.TextField,{label:"Asset ID",value:u,onChange:e=>p(e.target.value),fullWidth:!0}),(0,Ze.jsx)(f.Select,{label:"GICS Code",value:m,onChange:e=>y(e.value),options:j,placeholder:"Select GICS Code"}),(0,Ze.jsx)(ZW,{label:"Asset Location",value:b,onChange:e=>h(null!=e?e:void 0)}),(0,Ze.jsxs)(f.Grid,{container:!0,gap:2,justifyContent:"flex-end",children:[(0,Ze.jsx)(f.Button,{variant:"text",onClick:i,disabled:x,children:"Cancel"}),(0,Ze.jsx)(f.Button,{onClick:k,disabled:x,children:"Save"})]})]})})}function wfe(e){let{accountId:n}=e;const t=tfe(),[a,r]=(0,g.useState)(),[i,o]=(0,g.useState)(null),l=(0,g.useCallback)(e=>{o(e)},[]),s=(0,g.useCallback)(()=>{var e;null==a||null===(e=a.api)||void 0===e||e.refreshServerSide({purge:!0})},[a]),c=(0,g.useCallback)(()=>{o(null)},[]);return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{icon:"briefcase",iconColor:"primary",title:"Asset management",children:[(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(MP,{fetchRows:t,gridApi:null==a?void 0:a.api,defaultExportFileName:"assets",columnsToSkip:["Actions"],label:"Export assets"})}),(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(Sfe,{onCompleted:()=>{var e;return null==a||null===(e=a.api)||void 0===e?void 0:e.refreshServerSide({purge:!0})}})})]}),(0,Ze.jsx)(ffe,{accountId:n,onGridReady:r,onEdit:l}),i&&(0,Ze.jsx)(Nfe,{asset:i,accountId:n,onClose:c,onCompleted:s})]})}function Dfe(){const[e]=(0,gs._)(Sy,{fetchPolicy:"network-only"});return async n=>{var t;const a=await e({variables:n});if(null===(t=a.data)||void 0===t||!t.getFundsByAccountId)throw new Error("Failed to fetch funds");const{rows:r,totalRows:i}=a.data.getFundsByAccountId;return{rows:r,totalRows:i||0}}}function Afe(){return(0,Ot.n)(Ny)}function Rfe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Pfe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Rfe(Object(t),!0).forEach(function(n){Lfe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Rfe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Lfe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Ife;function Efe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function _fe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Efe(Object(t),!0).forEach(function(n){Ffe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Efe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ffe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Bfe=Ge.default.div(Ife||(Ife=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n"]))),Ufe={pagination:!0,paginationPageSize:25,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}};function Mfe(e){let{accountId:n,onGridReady:t,onEdit:a}=e;const r=Dfe(),i=(e=>{const n=rt(),{showNotification:t}=vt(),[a]=(0,gs._)(wy),r=(0,g.useCallback)(async e=>{try{var r;const t=e.colDef.field||e.colDef.colId;if(!t)throw new Error("Unfilterable column");const i=((null===(r=(await a({variables:{accountId:n,field:t}})).data)||void 0===r?void 0:r.getFundsFilter)||[]).map(e=>e.value?JSON.stringify(Gt().omit(e,"__typename")):e.value);e.success(i)}catch(n){t("Couldn't load filter values for column ".concat(e.colDef.field,": ").concat(n),"danger")}},[a,n,t]),i=(0,g.useMemo)(()=>({values:r,valueFormatter:la,cache:!1,refreshValuesOnOpen:!0}),[r]),o=(0,g.useMemo)(()=>Pfe(Pfe({},i),{},{valueFormatter:la}),[i]);return(0,g.useMemo)(()=>[{headerName:"ID",field:"id",filter:"agTextColumnFilter"},{headerName:"Name",field:"name",filter:"agTextColumnFilter"},{headerName:"External ID",field:"externalId",filter:"agTextColumnFilter"},{filterParams:i,headerName:"Currency",field:"currency.code",colId:"currency.id"},{headerName:"Created At",field:"createdAt",valueFormatter:ua,filter:"agDateColumnFilter"},{headerName:"Last Updated At",field:"lastUpdatedAt",valueFormatter:ua,filter:"agDateColumnFilter"},{filterParams:o,headerName:"Deleted",field:"deleted",valueFormatter:sa,filter:"agSetColumnFilter"},...e?[{headerName:"Actions",field:"actions",sortable:!1,filter:!1,cellRenderer:n=>(0,Ze.jsx)(f.IconButton,{onClick:()=>e(n.data),children:(0,Ze.jsx)(f.Icons.Edit,{})})}]:[]],[i,o,e])})(a),o=(0,g.useCallback)(e=>{t(e),e.api.setFilterModel({deleted:{field:"deleted",values:[JSON.stringify({label:"No",value:"0"})],filterType:"set"}}),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{const{startRow:t,sortModel:a,filterModel:i}=e.request,{rows:o,totalRows:l}=await r({accountId:n,offset:t||0,limit:Ufe.paginationPageSize,sort:oa(a),filters:ia(i)});e.success({rowData:o,rowCount:l})}catch(n){e.fail()}}})},[r,n,t]);return(0,Ze.jsx)(Bfe,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,_fe(_fe({},Ufe),{},{columnDefs:i,onGridReady:o}))})}const Vfe=JSON.parse('{"OA":[{"key":"name","type":"string","label":"Name","validators":[{"validate":"required"}],"description":"Name of the fund"},{"key":"currencyId","type":"select","label":"Currency","validators":[],"description":"The code of main currency of the fund in ISO 4217","selectOptions":[]},{"key":"externalId","type":"string","label":"External ID","validators":[{"validate":"unique_case_insensitive"}],"description":"External ID of the asset"},{"key":"deleted","type":"checkbox","label":"Deleted","validators":[]}],"W0":{"version":"v2","styleOverrides":{"global":{},"primaryButton":{},"secondaryButton":{}},"backendSyncMode":"DISABLED","importIdentifier":"Investment Funds","allowCustomFields":false,"invalidDataBehavior":"REMOVE_INVALID_ROWS"},"iF":{"backgroundColor":"#0094c9","borderColor":"#0094c9","borderRadius":"32px","borderStyle":"solid","borderWidth":"1px","boxSizing":"border-box","color":"#ffffff","cursor":"pointer","display":"inline-block","fontFamily":"\'Proxima Nova\', Helvetica, Arial, sans-serif","fontSize":"16px","fontWeight":400,"lineHeight":"1.4em","marginLeft":"16px","opacity":1,"padding":"16px 24px","textAlign":"center","textDecoration":"none","width":"auto"}}');function zfe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Gfe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?zfe(Object(t),!0).forEach(function(n){$fe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):zfe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function $fe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Wfe(e){let{onCompleted:n}=e;const t=Pu(),a=rt(),r=_u(),{data:i}=Ru(),{showNotification:o}=vt(),[l]=Afe(),s=(0,g.useCallback)(e=>{l({variables:{funds:e,accountId:a},onCompleted:e=>{let{importFunds:{created:t,updated:a,deleted:r}}=e;o("".concat(t," created, ").concat(a," updated, ").concat(r," deleted")),n()}})},[l,a,o,n]);if(!r)throw new Error("Configuration is not ready");const c={id:(null==r?void 0:r.id)||"",name:Vo(r),email:null==r?void 0:r.email,companyId:a,companyName:null==t?void 0:t.name},d=(0,g.useMemo)(()=>Vfe.OA.map(e=>"currencyId"===e.key?Gfe(Gfe({},e),{},{selectOptions:i.map(e=>({label:e.name,value:e.id}))}):e),[i]);return(0,Ze.jsx)(VU.A,{licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:c,style:Gfe(Gfe({},QU.style),Vfe.iF),settings:Gfe(Gfe({},QU.settings),Vfe.W0),fields:d,onResults:s,children:"+ Upload funds"})}function qfe(e){let{fund:n,accountId:t,open:a,onClose:r,onCompleted:i}=e;const[o,l]=(0,g.useState)(n.name),[s,{loading:c}]=Afe(),{showNotification:d}=vt(),u=(0,g.useCallback)(async()=>{try{await s({variables:{accountId:t,funds:[{id:n.id,name:o,currencyId:n.currency.id}]}}),d('Fund "'.concat(n.name,'" changed to "').concat(o,'" successfully'),"success"),i(),r()}catch(e){d("Failed to update fund: ".concat(e instanceof Error?e.message:"Unknown error"),"danger")}},[o,n,t,s,i,r,d]),p=(0,g.useCallback)(()=>{l(n.name),r()},[n.name,r]);return(0,Ze.jsx)(f.Modal,{open:a,onClose:p,title:"Edit Fund",children:(0,Ze.jsxs)(f.Grid,{container:!0,direction:"column",gap:3,children:[(0,Ze.jsx)(f.TextField,{label:"Fund Name",value:o,onChange:e=>l(e.target.value),fullWidth:!0,required:!0}),(0,Ze.jsxs)(f.Grid,{container:!0,gap:2,justifyContent:"flex-end",children:[(0,Ze.jsx)(f.Button,{variant:"text",onClick:p,disabled:c,children:"Cancel"}),(0,Ze.jsx)(f.Button,{onClick:u,disabled:c||!o.trim()||o===n.name,children:"Save"})]})]})})}function Jfe(){const e=rt(),n=Dfe(),[t,a]=(0,g.useState)(),[r,i]=(0,g.useState)(null),o=(0,g.useCallback)(()=>{var e;null==t||null===(e=t.api)||void 0===e||e.refreshServerSide({purge:!0})},[t]),l=(0,g.useCallback)(e=>{i(e)},[]),s=(0,g.useCallback)(()=>{var e;null==t||null===(e=t.api)||void 0===e||e.refreshServerSide({purge:!0})},[t]),c=(0,g.useCallback)(()=>{i(null)},[]);return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{icon:"business-time",iconColor:"primary",title:"Fund management",children:[(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(MP,{fetchRows:n,gridApi:null==t?void 0:t.api,defaultExportFileName:"funds",columnsToSkip:["Actions"],label:"Export"})}),(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(Wfe,{onCompleted:o})})]}),(0,Ze.jsx)(Mfe,{accountId:e,onGridReady:a,onEdit:l}),r&&(0,Ze.jsx)(qfe,{fund:r,accountId:e,open:!0,onClose:c,onCompleted:s})]})}var Yfe;const Hfe=(0,D.J1)(Yfe||(Yfe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getBanners($accountId: ID!) {\n    getBanners(accountId: $accountId, includeHidden: true) {\n      id\n      accountId\n      name\n      thumbnail\n      url\n      type\n      visible\n    }\n  }\n"])));var Kfe,Qfe,Zfe,Xfe,eye;function nye(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function tye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nye(Object(t),!0).forEach(function(n){aye(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nye(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function aye(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function rye(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const iye=Ge.default.div(Kfe||(Kfe=rye(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),oye=(0,Ge.default)(ze.DZ)(Qfe||(Qfe=rye(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),lye=(0,Ge.default)(ze.fI)(Zfe||(Zfe=rye(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),sye=(0,Ge.default)(ze.JU)(Xfe||(Xfe=rye(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),cye=(0,Ge.default)(ze.$n)(eye||(eye=rye(["\n  width: 656px;\n"]))),dye=[{value:Vt.US.Scorm,label:"Scorm"},{value:Vt.US.Video,label:"Video"},{value:"HYPERLINK",label:"Hyperlink"}],uye=function(e){let{banner:n,onBannerSaved:t,onBannerDeleted:a,showDelete:r=!1}=e;const[i,o]=(0,g.useState)({}),l=(0,g.useRef)(null),s=()=>o({}),c=(0,N.m)(),[d,u]=(0,g.useState)(n);return(0,Ze.jsx)(Qe.s,{mutation:Oe,onCompleted:t,children:e=>(0,Ze.jsx)(Qe.s,{mutation:ke,update:()=>{c.clearStore(),l.current.setState({image:""})},onCompleted:a,children:t=>(0,Ze.jsxs)(iye,{id:"upload-account-banner",children:[i.thumbnail&&(0,Ze.jsx)(ze.Eg,{id:"validate-thumbnail__notification",name:"validate-thumbnail__notification",color:"danger",show:!0,children:i.thumbnail}),(0,Ze.jsx)(oye,{size:"lg",children:"Add/Edit Banner"}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(sye,{for:"upload-account-banner-url",children:"Name"})}),(0,Ze.jsx)(lye,{container:!0,children:(0,Ze.jsx)(ze.ks,{onChange:e=>{u(n=>tye(tye({},n),{},{name:e.target.value})),s()},id:"upload-account-banner-name",value:d.name,error:i.name,required:!0,box:!0})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(sye,{for:"upload-account-banner-url",children:"URL"})}),(0,Ze.jsx)(lye,{container:!0,children:(0,Ze.jsx)(ze.ks,{onChange:e=>{u(n=>tye(tye({},n),{},{url:e.target.value})),s()},id:"upload-account-banner-url",value:d.url,error:i.url,required:!0,box:!0})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(sye,{for:"upload-account-banner-type",children:"Type"})}),(0,Ze.jsx)(lye,{container:!0,children:(0,Ze.jsx)(ze.l6,{id:"upload-account-banner-type",placeholder:"Select banner type...",onChange:e=>{const{value:n}=e.target;u(e=>tye(tye({},e),{},{type:n})),n&&s()},value:d.type,options:dye,error:i.type,required:!0})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(sye,{for:"upload-account-banner-type",children:"Thumbnail"})}),(0,Ze.jsx)(lye,{distribution:"center",container:!0,children:(0,Ze.jsx)(ze.fv,{children:(0,Ze.jsx)(ze.nE,{width:616,height:75,border:20,defaultImage:d.thumbnail,ref:l,onSave:n=>{const t=tye(tye({},d),{},{thumbnail:n}),a=function(e){const n={thumbnail:e.thumbnail?null:"Please upload a thumbnail picture",url:tF(e.url)?null:e.url.trim()?"Incorrect url format":"The url is required",type:e.type?null:"Please select the type of the banner",get any(){const{thumbnail:e,url:t,type:a}=n;return Object.values({thumbnail:e,url:t,type:a}).some(Boolean)}};return n}(t);o(a),a.any||e({variables:{input:t}})},acceptedFormats:["image/png","image/jpeg","image/svg+xml","image/gif"],outputFormat:{format:"image/jpeg",width:1553,height:189,background:"#e8e9ec"}})})}),(0,Ze.jsx)(ze.fI,{distribution:"center",container:!0,children:(0,Ze.jsx)(cye,{color:"warning",onClick:()=>{u(e=>tye(tye({},e),{},{visible:!e.visible}))},children:d.visible?"Hide Banner":"Show Banner"})}),r&&(0,Ze.jsx)(ze.fI,{distribution:"center",container:!0,style:{marginTop:"1rem"},children:(0,Ze.jsx)(cye,{color:"danger",onClick:()=>{window.confirm("Are you sure you want to reset the banner to its default state?")&&t({variables:{accountId:n.accountId,id:n.id}})},children:"Delete Banner"})})]})})})},pye=(0,g.createContext)({onEdit(){throw new Error("Not implemented")},onCreate(){throw new Error("Not implemented")},onAccountSelectorChange(){throw new Error("Not implemented")},agGrid:{},currentAccountId:""});function mye(){return(0,g.useContext)(pye)}const fye=e=>{let{children:n}=e;const{showNotification:t}=vt(),a=rt(),[r,i]=(0,g.useState)(a),o=Dd(),[l,s]=(0,g.useState)(!1),[c,d]=(0,g.useState)(null),u=(0,g.useCallback)(e=>{d(e)},[d]),p=(0,g.useCallback)(()=>{d(null)},[d]),m=(0,g.useCallback)(()=>{s(!0)},[s]),f=(0,g.useCallback)(()=>{s(!1)},[s]);return(0,Ze.jsxs)(pye.Provider,{value:{onAccountSelectorChange:i,onCreate:m,onEdit:u,agGrid:o,currentAccountId:r},children:[n,c&&(0,Ze.jsx)(ze.aF,{size:"lg",show:!0,dismissable:!0,name:"ConfigurationAccountsContainer__Modal--Logo",onDismiss:p,children:(0,Ze.jsx)(uye,{banner:c,onBannerSaved:()=>{var e;t("The banner has been updated","success"),null===(e=o.api)||void 0===e||e.refreshServerSide(),p()},showDelete:!0,onBannerDeleted:()=>{var e;t("The banner has been deleted","success"),null===(e=o.api)||void 0===e||e.refreshServerSide(),p()}})}),l&&(0,Ze.jsx)(ze.aF,{size:"lg",show:!0,dismissable:!0,name:"ConfigurationAccountsContainer__Modal--Logo",onDismiss:f,children:(0,Ze.jsx)(uye,{banner:{id:(0,Ai.A)(),accountId:r,name:"",thumbnail:"",visible:!0,type:Vt.x1.Hyperlink,url:"",__typename:"Banner"},onBannerSaved:()=>{var e;t("The banner has been created","success"),null===(e=o.api)||void 0===e||e.refreshServerSide(),s(!1)}})})]})};var yye,gye,bye;function hye(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hye(Object(t),!0).forEach(function(n){xye(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hye(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xye(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Tye(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Oye=(0,Ge.default)(ze.In)(yye||(yye=Tye(["\n  cursor: pointer;\n"]))),kye=Ge.default.img(gye||(gye=Tye(["\n  object-fit: contain;\n  width: 100%;\n"]))),jye=(0,Ge.default)(nD)(bye||(bye=Tye(["\n  .ag-header-cell-resize {\n    z-index: 0;\n  }\n"]))),Cye=vye(vye({},{pagination:!0,paginationPageSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}}),{},{columnDefs:[{headerName:"Name",field:"name",filter:"agTextColumnFilter"},{headerName:"URL",field:"url",filter:"agTextColumnFilter"},{headerName:"Thumbnail",field:"thumbnail",cellRenderer:"thumbnail"},{headerName:"Type",field:"type",filter:"agTextColumnFilter"},{headerName:"Visible",field:"visible",cellRenderer:"visibility"},{cellRenderer:"edit"}],components:{thumbnail:e=>{let{data:n}=e;return(0,Ze.jsx)(kye,{src:n.thumbnail})},visibility:e=>{let{data:n}=e;return n.visible?(0,Ze.jsx)(ze.In,{icon:"eye"}):(0,Ze.jsx)(ze.In,{icon:"eye-slash"})},edit:e=>{let{data:n}=e;const{onEdit:t}=mye();return(0,Ze.jsx)(Oye,{icon:"pencil-alt",onClick:()=>t(n)})}}});function Sye(e){let{fetchRows:n}=e;const{agGrid:t,currentAccountId:a}=mye(),r=(0,g.useCallback)(e=>{t.onGridReady(e),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{const{rows:t,totalRows:r}=await n({accountId:a});e.success({rowData:t,rowCount:r})}catch(n){throw e.fail(),n}}})},[a,t,n]);return(0,g.createElement)(jye,vye(vye({},Cye),{},{key:a,onColumnVisible:t.onSaveGridColumnState,onColumnPinned:t.onSaveGridColumnState,onColumnResized:t.onSaveGridColumnState,onColumnMoved:t.onSaveGridColumnState,onColumnRowGroupChanged:t.onSaveGridColumnState,onColumnValueChanged:t.onSaveGridColumnState,onColumnPivotChanged:t.onSaveGridColumnState,onDestroy:t.onDestroy,onGridReady:r}))}var Nye,wye,Dye,Aye,Rye,Pye,Lye;function Iye(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Eye=Ge.default.div(Nye||(Nye=Iye(["\n  ","\n"])),e=>{let{theme:n,color:t="primary"}=e;return"\n    display: flex;\n    flex-direction: row;\n    justify-content: center;\n    align-items: center;\n\n    -webkit-transition: background .5s ease-out, border .5s ease-out;\n    -moz-transition: background .5s ease-out, border .5s ease-out;\n    -o-transition: background .5s ease-out, border .5s ease-out;\n    transition: background .5s ease-out, border .5s ease-out;\n\n    border: 1px solid transparent;\n    border-radius: 3px;\n\n    :hover {\n      background: ".concat(n.colors[t].light.background,";\n      border: 1px solid ").concat(n.colors[t].dark.background," !important;\n    }\n  ")}),_ye=Ge.default.div(wye||(wye=Iye(["\n  padding: 1.2rem 1.8rem 1.2rem 1.6rem;\n  width: 2rem;\n"]))),Fye=Ge.default.p(Dye||(Dye=Iye(["\n  ","\n"])),e=>{let{theme:n,color:t="primary"}=e;return"\n    border: solid ".concat(n.colors[t].dark.background,";\n    border-width: 0 0.1rem 0.1rem 0;\n    display: inline-block;\n    padding: 0.3rem;\n  ")}),Bye=(0,Ge.default)(Fye)(Aye||(Aye=Iye(["\n  transform: rotate(135deg);\n  -webkit-transform: rotate(135deg);\n"]))),Uye=((0,Ge.default)(Fye)(Rye||(Rye=Iye(["\n  transform: rotate(-45deg);\n  -webkit-transform: rotate(-45deg);\n"]))),(0,Ge.default)(Fye)(Pye||(Pye=Iye(["\n  transform: rotate(-135deg);\n  -webkit-transform: rotate(-135deg);\n"]))),(0,Ge.default)(Fye)(Lye||(Lye=Iye(["\n  transform: rotate(45deg);\n  -webkit-transform: rotate(45deg);\n"]))),["name","title","breadcrumbs","icon","iconColor","isDropdown","dropdownItems","dropdownDefault","children","leftButtonClick"]);var Mye,Vye,zye,Gye,$ye,Wye,qye;function Jye(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Yye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Jye(Object(t),!0).forEach(function(n){Hye(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Jye(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Hye(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Kye(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Qye=(0,Ge.default)(ze.fI)(Mye||(Mye=Kye(["\n  background: white;\n  padding: ",";\n  flex: 0 0 auto;\n  display: flex;\n  justify-content: space-between;\n"])),e=>e.theme.geometry.md.spacing),Zye=(0,Ge.default)(ze.GQ)(Vye||(Vye=Kye(["\n  margin-right: ",";\n  display: inline-flex;\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.sm.spacing),Xye=Ge.default.div(zye||(zye=Kye(["\n  display: flex;\n  align-items: center;\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),ege=(0,Ge.default)(ze.EY)(Gye||(Gye=Kye(["\n  padding: 0 ",";\n"])),e=>e.theme.geometry.xs.spacing),nge=Ge.default.div($ye||($ye=Kye(["\n  display: flex;\n  flex: 0 0 auto;\n  width: ","px;\n  .rs__value-container {\n    padding-left: 0 !important;\n  }\n\n  .rs__single-value {\n    font-size: 32px;\n    line-height: 1.4em;\n    color: #4d505b;\n  }\n"])),e=>16*e.characterLength+100),tge=(0,Ge.default)(ze.l6)(Wye||(Wye=Kye(["\n  background-color: transparent;\n  border-radius: 0;\n  border: none;\n"]))),age=(0,Ge.default)(e=>{let{className:n,onClick:t}=e;return(0,Ze.jsx)(Eye,{className:n,onClick:t,children:(0,Ze.jsx)(_ye,{children:(0,Ze.jsx)(Bye,{})})})})(qye||(qye=Kye(["\n  margin-right: 10px;\n"]))),rge=e=>{let{name:n,title:t,breadcrumbs:a,icon:r,iconColor:i,isDropdown:o,dropdownItems:l,dropdownDefault:s,children:c,leftButtonClick:d}=e,u=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,Uye);const p=(0,m.Zp)(),f=(0,m.zy)();return(0,Ze.jsxs)(Qye,Yye(Yye({name:"".concat(n,"__PageHeader"),container:!0,distribution:"between",itemAlign:"center"},u),{},{children:[d?(0,Ze.jsx)(age,{onClick:d}):"",(0,Ze.jsxs)(Xye,{children:[(0,Ze.jsx)(Zye,{name:"".concat(n,"__PageHeader__Icon"),inline:!0,height:"50px",size:"lg",circleColor:i,iconColor:i,icon:r}),(0,Ze.jsxs)(ze.fv,{container:!0,item:!0,vdistribution:"center",span:12,children:[!!a&&(0,Ze.jsx)("div",{children:a.map((e,t)=>(0,Ze.jsxs)(g.Fragment,{children:[e.to?(0,Ze.jsx)(ze.Yq,{name:"".concat(n,"__PageHeader__Breadcrumb__Link"),component:"routerLink",inline:!0,underline:!1,color:"dark",size:"sm",to:e.to,children:e.title}):(0,Ze.jsx)(ze.EY,{name:"".concat(n,"__PageHeader__Breadcrumb__Text"),inline:!0,color:"dark",size:"sm",children:e.title}),t<a.length-1&&(0,Ze.jsx)(ege,{inline:!0,color:"dark",size:"sm",children:"/"})]},t))}),!!t&&!o&&(0,Ze.jsx)(ze.DZ,{name:"".concat(n,"__PageHeader__Title"),size:"xxl",weight:"light",align:"left",children:t}),o&&l&&s&&(0,Ze.jsx)(nge,{characterLength:s.length,children:(0,Ze.jsx)(tge,{onChange:e=>{p(f.pathname.replace(/[^/]*$/,e.target.select.link))},value:s,options:l.map(e=>({label:e.title,value:e.title,link:e.link})),isSearchable:!1})})]})]}),c||null]}))};rge.propTypes={name:Ke().string.isRequired,children:Ke().node,title:Ke().string,isDropdown:Ke().bool,dropdownItems:Ke().array,dropdownDefault:Ke().string,breadcrumbs:Ke().array,icon:Ke().string,iconColor:Ke().oneOf(["primary","secondary","tertiary","info","success","warning","danger","quaternary"])};const ige=rge;var oge,lge;function sge(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const cge=(0,Ge.default)(ze.$n)(oge||(oge=sge(["\n  width: 250px;\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),dge=Ge.default.div(lge||(lge=sge(["\n  padding: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing);function uge(){const{currentAccountId:e,onCreate:n,onAccountSelectorChange:t}=mye(),a=rc(),r=(0,N.m)();return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsx)(ige,{name:"Engage Banners",title:"Engage Banners",breadcrumbs:[{title:"Configuration",to:"/configuration"},{title:"Engage",to:"/configuration/learnconfig/learncontent"},{title:"Banners"}],icon:"chart-line",iconColor:"quaternary",children:(0,Ze.jsx)(HF,{container:!0,item:!0,distribution:"center",vdistribution:"center",itemAlign:"center",children:(0,Ze.jsx)(cge,{name:"ConfigurationEnergyMetersContainer__Controls__Button--add",color:"primary",inline:!0,onClick:()=>n(),children:"+ Create Banner"})})}),a.account.includes("getAll")&&(0,Ze.jsx)(dge,{children:(0,Ze.jsx)(Kh,{value:e,onChange:e=>{let{id:n}=e;return t(n)}})}),(0,Ze.jsx)(Sye,{fetchRows:async e=>{const{data:{getBanners:n}}=await r.query({query:Hfe,variables:e,fetchPolicy:"network-only"});return{rows:n,totalRows:n.length}}})]})}const pge=()=>(0,Ze.jsx)(fye,{children:(0,Ze.jsx)(uge,{})});var mge,fge;function yge(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const gge=(0,D.J1)(mge||(mge=yge(["\n  query GetGasComposition(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getGasComposition(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        accountId\n        date\n        user {\n          id\n          name\n        }\n        assetId\n        assetName\n        higherHeatingValue\n        higherHeatingUnit\n        gasMolWt\n        fuelMixWtC\n        molCMol\n        co2MolFraction\n        ch4MolFraction\n        boeConv\n        components {\n          id\n          component\n          molePercentage\n          molecularWeight\n          weight\n          weightPercentage\n          coefficientCarbon\n          weightPercentageCarbon\n          weightPercentageCarbonMixture\n          molCarbonMolGas\n        }\n      }\n    }\n  }\n"]))),bge=(0,D.J1)(fge||(fge=yge(["\n  query GetGasCompositionFilter($accountId: ID!, $field: String!) {\n    getGasCompositionFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));var hge;function vge(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xge(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vge(Object(t),!0).forEach(function(n){Tge(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vge(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Tge(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Oge=Ge.default.div(hge||(hge=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n"]))),kge={pagination:!0,paginationPageSize:25,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}},masterDetail:!0,detailRowHeight:300,detailCellRendererParams:{detailGridOptions:{columnDefs:[{headerName:"Component",field:"component",sortable:!0},{headerName:"Mole %",field:"molePercentage",sortable:!0,valueFormatter:e=>{var n;return"".concat(null===(n=e.value)||void 0===n?void 0:n.toFixed(2),"%")}},{headerName:"Molecular Weight",field:"molecularWeight",sortable:!0,valueFormatter:e=>{var n;return null===(n=e.value)||void 0===n?void 0:n.toFixed(2)}},{headerName:"Weight",field:"weight",sortable:!0,valueFormatter:e=>{var n;return null===(n=e.value)||void 0===n?void 0:n.toFixed(4)}},{headerName:"Weight %",field:"weightPercentage",sortable:!0,valueFormatter:e=>{var n;return"".concat(null===(n=e.value)||void 0===n?void 0:n.toFixed(2),"%")}},{headerName:"Carbon Coeff.",field:"coefficientCarbon",sortable:!0,valueFormatter:e=>{var n;return null===(n=e.value)||void 0===n?void 0:n.toFixed(2)}},{headerName:"Weight % Carbon",field:"weightPercentageCarbon",sortable:!0,valueFormatter:e=>{var n;return"".concat(null===(n=e.value)||void 0===n?void 0:n.toFixed(2),"%")}},{headerName:"Weight % Carbon Mixture",field:"weightPercentageCarbonMixture",sortable:!0,valueFormatter:e=>{var n;return"".concat(null===(n=e.value)||void 0===n?void 0:n.toFixed(2),"%")}},{headerName:"Mol Carbon/Mol Gas",field:"molCarbonMolGas",sortable:!0,valueFormatter:e=>{var n;return null===(n=e.value)||void 0===n?void 0:n.toFixed(4)}}],defaultColDef:{sortable:!0,resizable:!0},pagination:!1,suppressFilter:!0},getDetailRowData:e=>{e.successCallback(e.data.components)}}};function jge(e){let{accountId:n,onGridReady:t}=e;const[a]=(0,gs._)(gge),r=(()=>{const e=rt(),[n]=(0,gs._)(bge),{showNotification:t}=vt(),a=(0,g.useCallback)(async a=>{try{var r;const t=a.colDef.field||a.colDef.colId;if(!t)throw new Error("Unfilterable column");const i=((null===(r=(await n({variables:{accountId:e,field:t}})).data)||void 0===r?void 0:r.getGasCompositionFilter)||[]).map(e=>e.value?JSON.stringify(e):e.value);a.success(i)}catch(e){t("Couldn't load filter values for column ".concat(a.colDef.field,": ").concat(e),"danger")}},[n,e,t]),r=(0,g.useMemo)(()=>({values:a,valueFormatter:la,cache:!1,refreshValuesOnOpen:!0}),[a]);return(0,g.useMemo)(()=>[{headerName:"Date",field:"date",valueFormatter:e=>da(e),filter:"agDateColumnFilter",sort:"desc",cellRenderer:"agGroupCellRenderer"},{headerName:"Asset",field:"assetName",filter:"agSetColumnFilter",filterParams:r},{headerName:"User",field:"user.name",filter:"agSetColumnFilter",filterParams:r},{headerName:"Higher Heating Value",field:"higherHeatingValue",filter:"agNumberColumnFilter",valueFormatter:e=>null==e.value?"":"".concat(e.value.toFixed(2)," ").concat(e.data.higherHeatingUnit||"")},{headerName:"Gas Mol Wt",field:"gasMolWt",filter:"agNumberColumnFilter",valueFormatter:e=>null==e.value?"":e.value.toFixed(2)},{headerName:"Fuel Mix Wt% C",field:"fuelMixWtC",filter:"agNumberColumnFilter",valueFormatter:e=>null==e.value?"":"".concat(e.value.toFixed(2),"%")},{headerName:"Mol C/Mol",field:"molCMol",filter:"agNumberColumnFilter",valueFormatter:e=>null==e.value?"":e.value.toFixed(4)},{headerName:"CO2 Mol Fraction",field:"co2MolFraction",filter:"agNumberColumnFilter",valueFormatter:e=>null==e.value?"":e.value.toFixed(4)},{headerName:"CH4 Mol Fraction",field:"ch4MolFraction",filter:"agNumberColumnFilter",valueFormatter:e=>null==e.value?"":e.value.toFixed(4)},{headerName:"BOE Conv",field:"boeConv",filter:"agNumberColumnFilter",valueFormatter:e=>null==e.value?"":e.value.toFixed(2)}],[r])})(),i=(0,g.useCallback)(e=>{t(e),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{var t;const{startRow:r,sortModel:i,filterModel:o}=e.request,l=await a({variables:{accountId:n,offset:r||0,limit:kge.paginationPageSize,sort:oa(i),filters:ia(o)}});if(null===(t=l.data)||void 0===t||!t.getGasComposition)throw new Error("Failed to fetch gas compositions");const{rows:s,totalRows:c}=l.data.getGasComposition;e.success({rowData:s,rowCount:c})}catch(n){console.error("Error fetching gas compositions:",n),e.fail()}}})},[a,n,t]);return(0,Ze.jsx)(Oge,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,xge(xge({},kge),{},{columnDefs:r,onGridReady:i}))})}var Cge,Sge;function Nge(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const wge=(0,D.J1)(Cge||(Cge=Nge(["\n  mutation CreateGasComposition($input: CreateGasCompositionInput!) {\n    createGasComposition(input: $input)\n  }\n"])));(0,D.J1)(Sge||(Sge=Nge(["\n  query GetGasComposition(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getGasComposition(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        accountId\n        assetName\n        date\n        user\n        higherHeatingValue\n        higherHeatingUnit\n        components {\n          id\n          component\n          molePercentage\n          molecularWeight\n          weight\n          weightPercentage\n          coefficientCarbon\n          weightPercentageCarbon\n          weightPercentageCarbonMixture\n          molCarbonMolGas\n        }\n      }\n    }\n  }\n"])));const Dge=(e,n,t)=>(t.forEach(t=>{var a;n.row[t]&&((null===(a=n.row[t].info)||void 0===a?void 0:a.some(n=>n.message===e.message&&n.level===e.level))||(n.row[t].info||(n.row[t].info=[]),n.row[t].info.push(e)))}),n),Age=(e,n)=>(n.forEach(n=>{e.row[n]&&(e.row[n].info=[])}),e),Rge=e=>"number"==typeof e&&!Number.isNaN(e)||("string"==typeof e?!!e.trim():!!e);var Pge;const Lge=(0,D.J1)(Pge||(Pge=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetOilProducingAssetsForSelect($accountId: ID!) {\n    getOilProducingAssetsPage(accountId: $accountId, pageSize: 1000, page: 1) {\n      items {\n        id\n        location {\n          id\n          name\n        }\n        field\n      }\n    }\n  }\n"]))),Ige=t.p+"gas-composition-template-dd653cf877e901f5e77a.xlsx";var Ege,_ge,Fge,Bge;function Uge(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Mge(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Uge(Object(t),!0).forEach(function(n){Vge(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Uge(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Vge(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function zge(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Gge=(0,Ge.default)(ze.fv)(Ege||(Ege=zge(["\n  display: flex;\n  height: 100%;\n"]))),$ge=Ge.default.div(_ge||(_ge=zge(["\n  flex: 1;\n  min-height: 0;\n  padding: 0 ",";\n"])),e=>e.theme.geometry.md.spacing),Wge=Ge.default.div(Fge||(Fge=zge(["\n  padding: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),qge=Ge.default.div(Bge||(Bge=zge(["\n  margin-left: auto;\n"]))),Jge=[kn("REACT_APP_BASE_URL"),Ige].join(""),Yge=uv(function(e){let{permissions:n,accountId:t}=e;const a=rt(),[r,i]=(0,g.useState)({id:t||a}),[o,l]=(0,g.useState)(null),s=(0,N.m)(),c=r.id||a,d=Od(c),u=_u(),{showNotification:p}=vt(),[m]=(0,Ot.n)(wge),f=function(e){var n;const{data:t}=(0,h.IT)(Lge,{variables:{accountId:e},fetchPolicy:"network-only",skip:!e});return(0,g.useMemo)(()=>{var e;return[{key:"assetId",type:"select",label:"Asset",description:"Select the oil producing asset",validators:[{validate:"required"}],selectOptions:(null==t||null===(e=t.getOilProducingAssetsPage)||void 0===e||null===(e=e.items)||void 0===e?void 0:e.map(e=>({label:"".concat(e.field," - ").concat(e.location.name),value:e.id})))||[]},{key:"date",type:["date",{locale:"en-GB"}],label:"Date",description:"Date of the gas composition measurement",validators:[{validate:"required"}]},{key:"higherHeatingValue",type:["number",{min:0}],label:"Higher Heating Value",description:"Higher heating value of the gas",validators:[{validate:"required"}]},{key:"higherHeatingUnit",type:"select",label:"Higher Heating Unit",description:"Unit for the higher heating value",validators:[{validate:"required"}],selectOptions:[{label:"kJ/m³",value:"kJ/m³"},{label:"BTU/scf",value:"BTU/scf"}]},{key:"o2MolePercentage",type:["number",{min:0}],label:"O2 Mole %",description:"Oxygen mole percentage (0-100)",defaultValue:0},{key:"n2MolePercentage",type:["number",{min:0}],label:"N2 Mole %",description:"Nitrogen mole percentage (0-100)",defaultValue:0},{key:"co2MolePercentage",type:["number",{min:0}],label:"CO2 Mole %",description:"Carbon dioxide mole percentage (0-100)",defaultValue:0},{key:"h2MolePercentage",type:["number",{min:0}],label:"H2 Mole %",description:"Hydrogen mole percentage (0-100)",defaultValue:0},{key:"h2sMolePercentage",type:["number",{min:0}],label:"H2S Mole %",description:"Hydrogen sulfide mole percentage (0-100)",defaultValue:0},{key:"ch4MolePercentage",type:["number",{min:0}],label:"CH4 Mole %",description:"Methane mole percentage (0-100)",defaultValue:0},{key:"c2h6MolePercentage",type:["number",{min:0}],label:"C2H6 Mole %",description:"Ethane mole percentage (0-100)",defaultValue:0},{key:"c3h8MolePercentage",type:["number",{min:0}],label:"C3H8 Mole %",description:"Propane mole percentage (0-100)",defaultValue:0},{key:"c4h10MolePercentage",type:["number",{min:0}],label:"C4H10 Mole %",description:"Butane mole percentage (0-100)",defaultValue:0},{key:"c5h12MolePercentage",type:["number",{min:0}],label:"C5H12 Mole %",description:"Pentane mole percentage (0-100)",defaultValue:0},{key:"c6h14MolePercentage",type:["number",{min:0,max:101}],label:"C6H14 Mole %",description:"Hexane mole percentage (0-100)",defaultValue:0},{key:"c7h16MolePercentage",type:["number",{min:0,max:101}],label:"C7H16 Mole %",description:"Heptane mole percentage (0-100)",defaultValue:0},{key:"c8h18MolePercentage",type:["number",{min:0,max:101}],label:"C8H18 Mole %",description:"Octane mole percentage (0-100)",defaultValue:0},{key:"c9PlusMolePercentage",type:["number",{min:0,max:101}],label:"C9+ Mole %",description:"C9+ compounds mole percentage (0-100)",defaultValue:0}]},[null==t||null===(n=t.getOilProducingAssetsPage)||void 0===n?void 0:n.items])}(c),y=(0,g.useCallback)(e=>{l(e.api)},[]),b=(0,g.useCallback)(async e=>{try{const n=e.map(e=>({assetId:e.assetId,date:e.date,higherHeatingValue:Number(e.higherHeatingValue),higherHeatingUnit:e.higherHeatingUnit,o2MolePercentage:e.o2MolePercentage||null,n2MolePercentage:e.n2MolePercentage||null,co2MolePercentage:e.co2MolePercentage||null,h2MolePercentage:e.h2MolePercentage||null,h2sMolePercentage:e.h2sMolePercentage||null,ch4MolePercentage:e.ch4MolePercentage||null,c2h6MolePercentage:e.c2h6MolePercentage||null,c3h8MolePercentage:e.c3h8MolePercentage||null,c4h10MolePercentage:e.c4h10MolePercentage||null,c5h12MolePercentage:e.c5h12MolePercentage||null,c6h14MolePercentage:e.c6h14MolePercentage||null,c7h16MolePercentage:e.c7h16MolePercentage||null,c8h18MolePercentage:e.c8h18MolePercentage||null,c9PlusMolePercentage:e.c9PlusMolePercentage||null}));await m({variables:{input:{accountId:c,gasCompositions:n}}}),p("Successfully uploaded ".concat(n.length," gas composition").concat(n.length>1?"s":"","!"),"success"),s.refetchQueries({include:[gge]}).then(()=>{o&&o.refreshServerSide({purge:!0})})}catch(e){p("Something unexpected happened. Error: ".concat(e.message||"Internal server error"),"danger")}},[m,p,c,s,o]),v=(0,g.useMemo)(()=>d&&u?{id:u.id,name:Vo(u),email:u.email,companyId:d.id,companyName:d.name}:null,[d,u]);return(0,Ze.jsxs)(Gge,{children:[(0,Ze.jsx)(bh,{name:"ConfigurationGasCompositionContainer__Controls",icon:"flask",iconColor:"primary",title:"Gas Composition",children:(0,Ze.jsx)(qge,{children:v&&(0,Ze.jsx)(VU.A,{licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:v,style:QU.style,settings:Mge(Mge({},QU.settings),{},{importIdentifier:"GasComposition",uploadStep:Mge(Mge({},QU.settings.uploadStep),{},{helpText:$U(Jge)}),manualInputDisabled:!1}),fields:f,onResults:b,bulkRowHooks:[e=>(e=>{const n=["o2MolePercentage","n2MolePercentage","co2MolePercentage","h2MolePercentage","h2sMolePercentage","ch4MolePercentage","c2h6MolePercentage","c3h8MolePercentage","c4h10MolePercentage","c5h12MolePercentage","c6h14MolePercentage","c7h16MolePercentage","c8h18MolePercentage","c9PlusMolePercentage"];return e.map(e=>{const t=n.reduce((n,t)=>n+Number(e.row[t].resultValue||0),0);return Age(e,n),t>=99.9&&t<=100.1?e:Dge({message:"The sum of the mole percentages should be 100% (+/- 0.1%), currently it is ".concat(t,"%"),level:"error"},e,n)})})(e)],children:"Upload Gas Composition"})})}),n.account.includes("getAll")&&(0,Ze.jsx)(Wge,{children:(0,Ze.jsx)(Kh,{value:r.id,onChange:e=>{i({id:e.id})}})}),(0,Ze.jsx)($ge,{children:(0,Ze.jsx)(jge,{accountId:r.id,onGridReady:y})})]})});var Hge;const Kge=(0,D.J1)(Hge||(Hge=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetGasCompositionUncertaintiesFilter($accountId: ID!, $field: String!) {\n    getGasCompositionUncertaintiesFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));var Qge;const Zge=(0,D.J1)(Qge||(Qge=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetGasCompositionUncertainties(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getGasCompositionUncertainties(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        accountId\n        assetId\n        assetName\n        date\n        co2MolMean\n        co2MolURel\n        ch4MolMean\n        ch4MolURel\n        molCMolGasMean\n        molCMolGasURel\n        mwMean\n        mwURel\n        wtCMean\n        wtCURel\n        boeConvMean\n        createdAt\n        updatedAt\n      }\n    }\n  }\n"])));function Xge(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ebe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Xge(Object(t),!0).forEach(function(n){nbe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xge(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function nbe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const tbe={pagination:!0,paginationPageSize:25,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}},abe=e=>{let{accountId:n,onGridReady:t}=e;const[a,r]=(0,g.useState)(null),i=(()=>{const e=rt(),[n]=(0,gs._)(Kge),{showNotification:t}=vt(),a=(0,g.useCallback)(async a=>{try{var r;const t=a.colDef.field||a.colDef.colId;if(!t)throw new Error("Unfilterable column");const i=((null===(r=(await n({variables:{accountId:e,field:t}})).data)||void 0===r?void 0:r.getGasCompositionUncertaintiesFilter)||[]).map(e=>e.value?JSON.stringify(e):e.value);a.success(i)}catch(e){t("Couldn't load filter values for column ".concat(a.colDef.field,": ").concat(e),"danger")}},[n,e,t]),r=(0,g.useMemo)(()=>({values:a,valueFormatter:la,cache:!1,refreshValuesOnOpen:!0}),[a]);return(0,g.useMemo)(()=>[{headerName:"Date",filter:"agDateColumnFilter",field:"date",width:120},{headerName:"Asset",field:"assetName",filter:"agSetColumnFilter",filterParams:r,width:250},{headerName:"CO2 Mol Mean (%)",filter:"agNumberColumnFilter",field:"co2MolMean",width:230,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(4)):""},{headerName:"CO2 Mol U(rel) (%)",filter:"agNumberColumnFilter",field:"co2MolURel",width:230,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(2),"%"):"0"},{headerName:"CH4 Mol Mean (%)",filter:"agNumberColumnFilter",field:"ch4MolMean",width:230,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(4)):"0"},{headerName:"CH4 Mol U(rel) (%)",filter:"agNumberColumnFilter",field:"ch4MolURel",width:230,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(2),"%"):"0"},{headerName:"Mol C/Mol Gas Mean",filter:"agNumberColumnFilter",field:"molCMolGasMean",width:230,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(4)):"0"},{headerName:"Mol C/Mol Gas U(rel) (%)",filter:"agNumberColumnFilter",field:"molCMolGasURel",width:230,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(2),"%"):"0"},{headerName:"MW Mean",filter:"agNumberColumnFilter",field:"mwMean",width:180,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(2)):"0"},{headerName:"MW U(rel) (%)",filter:"agNumberColumnFilter",field:"mwURel",width:180,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(2),"%"):"0"},{headerName:"Wt C Mean (%)",filter:"agNumberColumnFilter",field:"wtCMean",width:200,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(4)):"0"},{headerName:"Wt C U(rel) (%)",filter:"agNumberColumnFilter",field:"wtCURel",width:200,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(2),"%"):"0"},{headerName:"BOE Conv Mean",filter:"agNumberColumnFilter",field:"boeConvMean",width:200,cellStyle:{textAlign:"right"},valueFormatter:e=>e.value?"".concat(e.value.toFixed(4)):"0"},{headerName:"Created At",filter:"agDateColumnFilter",field:"createdAt",width:170,valueFormatter:e=>e.value?new Date(e.value).toLocaleString():"0"},{headerName:"Updated At",filter:"agDateColumnFilter",field:"updatedAt",width:170,valueFormatter:e=>e.value?new Date(e.value).toLocaleString():"0"}],[r])})(),[o]=(0,gs._)(Zge,{fetchPolicy:"network-only"}),l=(0,g.useCallback)(e=>{null==t||t(e),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{var t;const{startRow:a,sortModel:r,filterModel:i}=e.request,l=await o({variables:{accountId:n,offset:a||0,limit:tbe.paginationPageSize,sort:oa(r),filters:ia(i)}});if(null===(t=l.data)||void 0===t||!t.getGasCompositionUncertainties)throw new Error("Failed to fetch gas composition uncertainties");const{rows:s,totalRows:c}=l.data.getGasCompositionUncertainties;e.success({rowData:s,rowCount:c})}catch(n){console.error("Error fetching gas composition uncertainties:",n),r(n),de.Cp(n),e.fail()}}})},[o,n,t]);if(a)return(0,Ze.jsx)(ub,{error:a});const s=ebe(ebe({},tbe),{},{columnDefs:i,onGridReady:l});return(0,Ze.jsx)("div",{className:"ag-theme-alpine",style:{height:"100%",width:"100%"},children:(0,Ze.jsx)(f.AgGrid,{gridKey:"gas-composition-uncertainties",gridOptions:s})})};var rbe,ibe;function obe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const lbe=Ge.default.div(rbe||(rbe=obe(["\n  flex: 1;\n  min-height: 0;\n  padding: 0 ",";\n"])),e=>e.theme.geometry.md.spacing),sbe=Ge.default.div(ibe||(ibe=obe(["\n  padding: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),cbe=uv(function(e){let{permissions:n,accountId:t}=e;const a=rt(),[r,i]=(0,g.useState)({id:t||a});return(0,Ze.jsxs)(f.Page,{title:{content:(0,Ze.jsx)(bh,{name:"ConfigurationGasCompositionUncertaintiesContainer__Controls",icon:"calculator",iconColor:"primary",title:"Gas Composition Uncertainties"})},children:[n.account.includes("getAll")&&(0,Ze.jsx)(sbe,{children:(0,Ze.jsx)(Kh,{value:r.id,onChange:e=>{i({id:e.id})}})}),(0,Ze.jsx)(lbe,{children:(0,Ze.jsx)(abe,{accountId:r.id})})]})});var dbe,ube,pbe,mbe,fbe,ybe=t(2904),gbe=t(8859);function bbe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hbe=(0,D.J1)(dbe||(dbe=bbe(["\n  query GetEstatesConfiguration(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getEstatesConfiguration(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        accountId\n        locationId\n        locationName\n        forecastYear\n      }\n    }\n  }\n"]))),vbe=(0,D.J1)(ube||(ube=bbe(["\n  query GetEstatesConfigurationById($id: ID!, $accountId: ID!) {\n    getEstatesConfigurationById(id: $id, accountId: $accountId) {\n      id\n      accountId\n      locationId\n      locationName\n      forecastYear\n      locationStatus\n      cityStatus\n      tenure\n      tenureStatus\n      floorSpace\n      floorSpaceStatus\n      occupationStartDate\n      occupationStartDateStatus\n      occupationBreakDate\n      occupationBreakDateStatus\n      occupationEndDate\n      occupationEndDateStatus\n      facilitiesCondition\n      facilitiesConditionStatus\n      facilitiesStatComp\n      facilitiesStatCompStatus\n      facilitiesEpc\n      facilitiesEpcStatus\n      facilitiesGovSystem\n      facilitiesGovSystemStatus\n      locationYearPropertyMilestone\n      locationYearPropertyMilestoneStatus\n      estateChange\n      estateChangeStatus\n      desnzEntityHeadcountDesnz\n      desnzEntityHeadcountDesnzStatus\n      desnzEntityHeadcountIcs\n      desnzEntityHeadcountIcsStatus\n      desnzEntityHeadcountGbe\n      desnzEntityHeadcountGbeStatus\n      desnzEntityHeadcountSeahorse\n      desnzEntityHeadcountSeahorseStatus\n      dsitEntityHeadcountDsit\n      dsitEntityHeadcountDsitStatus\n      dsitEntityHeadcountUksa\n      dsitEntityHeadcountUksaStatus\n      totalHeadcountTotal\n      totalHeadcountTotalStatus\n      totalHeadcountFacilitated\n      totalHeadcountFacilitatedStatus\n      totalHeadcountVoid\n      totalHeadcountVoidStatus\n      itEnabledWorkSettingsRequired\n      itEnabledWorkSettingsRequiredStatus\n      itEnabledWorkSettingsFacilitated\n      itEnabledWorkSettingsFacilitatedStatus\n      itEnabledWorkSettingsVoid\n      itEnabledWorkSettingsVoidStatus\n      officeAttendanceFacilitated\n      officeAttendanceFacilitatedStatus\n      officeAttendanceActual\n      officeAttendanceActualStatus\n      runningCostRent\n      runningCostRentStatus\n      runningCostNonRent\n      runningCostNonRentStatus\n      runningCostTotal\n      runningCostTotalStatus\n      runningCostPerDesk\n      runningCostPerDeskStatus\n      runningCostPerHeadcount\n      runningCostPerHeadcountStatus\n      source\n      sourceStatus\n      capitalInvestmentCostFitOut\n      capitalInvestmentCostFitOutStatus\n      dilaps\n      dilapsStatus\n      runningCostPerEntityDesnzRent\n      runningCostPerEntityDesnzRentStatus\n      runningCostPerEntityDesnzNonRent\n      runningCostPerEntityDesnzNonRentStatus\n      runningCostPerEntityDesnzTotal\n      runningCostPerEntityDesnzTotalStatus\n      runningCostPerEntityIcsRent\n      runningCostPerEntityIcsRentStatus\n      runningCostPerEntityIcsNonRent\n      runningCostPerEntityIcsNonRentStatus\n      runningCostPerEntityIcsTotal\n      runningCostPerEntityIcsTotalStatus\n      runningCostPerEntityGbeRent\n      runningCostPerEntityGbeRentStatus\n      runningCostPerEntityGbeNonRent\n      runningCostPerEntityGbeNonRentStatus\n      runningCostPerEntityGbeTotal\n      runningCostPerEntityGbeTotalStatus\n      runningCostPerEntitySeahorseRent\n      runningCostPerEntitySeahorseRentStatus\n      runningCostPerEntitySeahorseNonRent\n      runningCostPerEntitySeahorseNonRentStatus\n      runningCostPerEntitySeahorseTotal\n      runningCostPerEntitySeahorseTotalStatus\n      runningCostPerEntityDsitRent\n      runningCostPerEntityDsitRentStatus\n      runningCostPerEntityDsitNonRent\n      runningCostPerEntityDsitNonRentStatus\n      runningCostPerEntityDsitTotal\n      runningCostPerEntityDsitTotalStatus\n      runningCostPerEntityUksaRent\n      runningCostPerEntityUksaRentStatus\n      runningCostPerEntityUksaNonRent\n      runningCostPerEntityUksaNonRentStatus\n      runningCostPerEntityUksaTotal\n      runningCostPerEntityUksaTotalStatus\n      runningCostPerEntityTotalCheck\n      runningCostPerEntityTotalCheckStatus\n      notes\n      user {\n        id\n        name\n      }\n    }\n  }\n"]))),xbe=(0,D.J1)(pbe||(pbe=bbe(["\n  mutation UpdateEstatesConfiguration($id: ID!, $input: UpdateEstatesConfigurationInput!) {\n    updateEstatesConfiguration(id: $id, input: $input)\n  }\n"]))),Tbe=(0,D.J1)(mbe||(mbe=bbe(["\n  mutation DeleteEstatesConfiguration($locationId: ID!, $accountId: ID!, $forecastYear: String!) {\n    deleteEstatesConfiguration(locationId: $locationId, accountId: $accountId, forecastYear: $forecastYear)\n  }\n"]))),Obe=(0,D.J1)(fbe||(fbe=bbe(["\n  query GetEstatesReportData($accountId: ID!, $limit: Int = 1000) {\n    getEstatesConfiguration(accountId: $accountId, limit: $limit) {\n      totalRows\n      rows {\n        id\n        locationId\n        locationName\n        city\n        forecastYear\n        locationStatus\n        cityStatus\n        tenure\n        tenureStatus\n        floorSpace\n        floorSpaceStatus\n        occupationStartDate\n        occupationStartDateStatus\n        occupationBreakDate\n        occupationBreakDateStatus\n        occupationEndDate\n        occupationEndDateStatus\n        facilitiesCondition\n        facilitiesConditionStatus\n        facilitiesStatComp\n        facilitiesStatCompStatus\n        facilitiesEpc\n        facilitiesEpcStatus\n        facilitiesGovSystem\n        facilitiesGovSystemStatus\n        locationYearPropertyMilestone\n        locationYearPropertyMilestoneStatus\n        estateChange\n        estateChangeStatus\n        desnzEntityHeadcountDesnz\n        desnzEntityHeadcountDesnzStatus\n        desnzEntityHeadcountIcs\n        desnzEntityHeadcountIcsStatus\n        desnzEntityHeadcountGbe\n        desnzEntityHeadcountGbeStatus\n        desnzEntityHeadcountSeahorse\n        desnzEntityHeadcountSeahorseStatus\n        dsitEntityHeadcountDsit\n        dsitEntityHeadcountDsitStatus\n        dsitEntityHeadcountUksa\n        dsitEntityHeadcountUksaStatus\n        totalHeadcountTotal\n        totalHeadcountTotalStatus\n        totalHeadcountFacilitated\n        totalHeadcountFacilitatedStatus\n        totalHeadcountVoid\n        totalHeadcountVoidStatus\n        itEnabledWorkSettingsRequired\n        itEnabledWorkSettingsRequiredStatus\n        itEnabledWorkSettingsFacilitated\n        itEnabledWorkSettingsFacilitatedStatus\n        itEnabledWorkSettingsVoid\n        itEnabledWorkSettingsVoidStatus\n        officeAttendanceFacilitated\n        officeAttendanceFacilitatedStatus\n        officeAttendanceActual\n        officeAttendanceActualStatus\n        runningCostRent\n        runningCostRentStatus\n        runningCostNonRent\n        runningCostNonRentStatus\n        runningCostTotal\n        runningCostTotalStatus\n        runningCostPerDesk\n        runningCostPerDeskStatus\n        runningCostPerHeadcount\n        runningCostPerHeadcountStatus\n        source\n        sourceStatus\n        capitalInvestmentCostFitOut\n        capitalInvestmentCostFitOutStatus\n        dilaps\n        dilapsStatus\n        runningCostPerEntityDesnzRent\n        runningCostPerEntityDesnzRentStatus\n        runningCostPerEntityDesnzNonRent\n        runningCostPerEntityDesnzNonRentStatus\n        runningCostPerEntityDesnzTotal\n        runningCostPerEntityDesnzTotalStatus\n        runningCostPerEntityIcsRent\n        runningCostPerEntityIcsRentStatus\n        runningCostPerEntityIcsNonRent\n        runningCostPerEntityIcsNonRentStatus\n        runningCostPerEntityIcsTotal\n        runningCostPerEntityIcsTotalStatus\n        runningCostPerEntityGbeRent\n        runningCostPerEntityGbeRentStatus\n        runningCostPerEntityGbeNonRent\n        runningCostPerEntityGbeNonRentStatus\n        runningCostPerEntityGbeTotal\n        runningCostPerEntityGbeTotalStatus\n        runningCostPerEntitySeahorseRent\n        runningCostPerEntitySeahorseRentStatus\n        runningCostPerEntitySeahorseNonRent\n        runningCostPerEntitySeahorseNonRentStatus\n        runningCostPerEntitySeahorseTotal\n        runningCostPerEntitySeahorseTotalStatus\n        runningCostPerEntityDsitRent\n        runningCostPerEntityDsitRentStatus\n        runningCostPerEntityDsitNonRent\n        runningCostPerEntityDsitNonRentStatus\n        runningCostPerEntityDsitTotal\n        runningCostPerEntityDsitTotalStatus\n        runningCostPerEntityUksaRent\n        runningCostPerEntityUksaRentStatus\n        runningCostPerEntityUksaNonRent\n        runningCostPerEntityUksaNonRentStatus\n        runningCostPerEntityUksaTotal\n        runningCostPerEntityUksaTotalStatus\n        runningCostPerEntityTotalCheck\n        runningCostPerEntityTotalCheckStatus\n        notes\n      }\n    }\n  }\n"]))),kbe=[{label:"Estimated",value:"Estimated"},{label:"Confirmed",value:"Confirmed"},{label:"Current",value:"Current"}];function jbe(e){var n;let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{data:a}=(0,h.IT)(VF,{variables:{accountId:e,offset:0,limit:1e3},skip:!e});return(0,g.useMemo)(()=>{var e;return[{key:t?"locationName":"locationId",type:"select",label:"Location",description:"Select the location for this estates configuration",validators:[{validate:"required"}],selectOptions:(null==a||null===(e=a.getLocationsPage)||void 0===e||null===(e=e.rows)||void 0===e?void 0:e.map(e=>({label:e.name,value:e.id})))||[],readOnly:t},{key:"forecastYear",type:"string",label:"Forecast Year",description:"Forecast year (e.g., 2024/25)",validators:[{validate:"required"},{validate:"length",max:9}],readOnly:t},{key:"locationStatus",type:"select",label:"Location Status",description:"Status of the location information",selectOptions:kbe},{key:"cityStatus",type:"select",label:"City Status",description:"Status of the city information",selectOptions:kbe},{key:"tenure",type:"string",label:"Tenure",description:"Tenure type for this location",validators:[{validate:"length",max:255}]},{key:"tenureStatus",type:"select",label:"Tenure Status",description:"Status of the tenure information",selectOptions:kbe},{key:"floorSpace",type:["number",{preset:"decimal_2",min:0}],label:"Floor Space",description:"Floor space area"},{key:"floorSpaceStatus",type:"select",label:"Floor Space Status",description:"Status of the floor space information",selectOptions:kbe},{key:"occupationStartDate",type:["date",{locale:"en-GB"}],label:"Occupation Start Date",description:"Date when occupation started"},{key:"occupationStartDateStatus",type:"select",label:"Occupation Start Date Status",description:"Status of the occupation start date information",selectOptions:kbe},{key:"occupationBreakDate",type:["date",{locale:"en-GB"}],label:"Occupation Break Date",description:"Date when occupation was broken or interrupted"},{key:"occupationBreakDateStatus",type:"select",label:"Occupation Break Date Status",description:"Status of the occupation break date information",selectOptions:kbe},{key:"occupationEndDate",type:["date",{locale:"en-GB"}],label:"Occupation End Date",description:"Date when occupation ended"},{key:"occupationEndDateStatus",type:"select",label:"Occupation End Date Status",description:"Status of the occupation end date information",selectOptions:kbe},{key:"facilitiesCondition",type:"string",label:"Facilities Condition",description:"Condition of the facilities",validators:[{validate:"length",max:255}]},{key:"facilitiesConditionStatus",type:"select",label:"Facilities Condition Status",description:"Status of the facilities condition information",selectOptions:kbe},{key:"facilitiesStatComp",type:["number",{preset:"decimal_2",min:0}],label:"Facilities Stat Comp",description:"Statistical compliance value for facilities"},{key:"facilitiesStatCompStatus",type:"select",label:"Facilities Stat Comp Status",description:"Status of the facilities statistical compliance information",selectOptions:kbe},{key:"facilitiesEpc",type:"string",label:"Facilities EPC",description:"Energy Performance Certificate rating",validators:[{validate:"length",max:255}]},{key:"facilitiesEpcStatus",type:"select",label:"Facilities EPC Status",description:"Status of the facilities EPC information",selectOptions:kbe},{key:"facilitiesGovSystem",type:"string",label:"Facilities Gov System",description:"Government system classification",validators:[{validate:"length",max:255}]},{key:"facilitiesGovSystemStatus",type:"select",label:"Facilities Gov System Status",description:"Status of the facilities government system information",selectOptions:kbe},{key:"locationYearPropertyMilestone",type:"string",label:"Location Year Property Milestone",description:"Milestone information for location, year and property",validators:[{validate:"length",max:500}]},{key:"locationYearPropertyMilestoneStatus",type:"select",label:"Location Year Property Milestone Status",description:"Status of the milestone information",selectOptions:kbe},{key:"estateChange",type:"string",label:"Estate Change",description:"Information about estate changes",validators:[{validate:"length",max:500}]},{key:"estateChangeStatus",type:"select",label:"Estate Change Status",description:"Status of the estate change information",selectOptions:kbe},{key:"desnzEntityHeadcountDesnz",type:["number",{preset:"decimal_2",min:0}],label:"DESNZ Entity Headcount - DESNZ",description:"Headcount for DESNZ entity"},{key:"desnzEntityHeadcountDesnzStatus",type:"select",label:"DESNZ Entity Headcount DESNZ Status",description:"Status of DESNZ headcount information",selectOptions:kbe},{key:"desnzEntityHeadcountIcs",type:["number",{preset:"decimal_2",min:0}],label:"DESNZ Entity Headcount - ICS",description:"Headcount for ICS entity"},{key:"desnzEntityHeadcountIcsStatus",type:"select",label:"DESNZ Entity Headcount ICS Status",description:"Status of ICS headcount information",selectOptions:kbe},{key:"desnzEntityHeadcountGbe",type:["number",{preset:"decimal_2",min:0}],label:"DESNZ Entity Headcount - GBE",description:"Headcount for GBE entity"},{key:"desnzEntityHeadcountGbeStatus",type:"select",label:"DESNZ Entity Headcount GBE Status",description:"Status of GBE headcount information",selectOptions:kbe},{key:"desnzEntityHeadcountSeahorse",type:["number",{preset:"decimal_2",min:0}],label:"DESNZ Entity Headcount - Seahorse",description:"Headcount for Seahorse entity"},{key:"desnzEntityHeadcountSeahorseStatus",type:"select",label:"DESNZ Entity Headcount Seahorse Status",description:"Status of Seahorse headcount information",selectOptions:kbe},{key:"dsitEntityHeadcountDsit",type:["number",{preset:"decimal_2",min:0}],label:"DSIT Entity Headcount - DSIT",description:"Headcount for DSIT entity"},{key:"dsitEntityHeadcountDsitStatus",type:"select",label:"DSIT Entity Headcount DSIT Status",description:"Status of DSIT headcount information",selectOptions:kbe},{key:"dsitEntityHeadcountUksa",type:["number",{preset:"decimal_2",min:0}],label:"DSIT Entity Headcount - UKSA",description:"Headcount for UKSA entity"},{key:"dsitEntityHeadcountUksaStatus",type:"select",label:"DSIT Entity Headcount UKSA Status",description:"Status of UKSA headcount information",selectOptions:kbe},{key:"totalHeadcountTotal",type:["number",{preset:"decimal_2",min:0}],label:"Total Headcount - Total",description:"Total headcount"},{key:"totalHeadcountTotalStatus",type:"select",label:"Total Headcount Total Status",description:"Status of total headcount information",selectOptions:kbe},{key:"totalHeadcountFacilitated",type:["number",{preset:"decimal_2",min:0}],label:"Total Headcount - Facilitated",description:"Facilitated headcount"},{key:"totalHeadcountFacilitatedStatus",type:"select",label:"Total Headcount Facilitated Status",description:"Status of facilitated headcount information",selectOptions:kbe},{key:"totalHeadcountVoid",type:"string",label:"Total Headcount - Void",description:"Void headcount (text field)",validators:[{validate:"length",max:255}]},{key:"totalHeadcountVoidStatus",type:"select",label:"Total Headcount Void Status",description:"Status of void headcount information",selectOptions:kbe},{key:"itEnabledWorkSettingsRequired",type:["number",{preset:"decimal_2",min:0}],label:"IT Enabled Work Settings - Required",description:"Required IT enabled work settings"},{key:"itEnabledWorkSettingsRequiredStatus",type:"select",label:"IT Enabled Work Settings Required Status",description:"Status of required IT work settings information",selectOptions:kbe},{key:"itEnabledWorkSettingsFacilitated",type:["number",{preset:"decimal_2",min:0}],label:"IT Enabled Work Settings - Facilitated",description:"Facilitated IT enabled work settings"},{key:"itEnabledWorkSettingsFacilitatedStatus",type:"select",label:"IT Enabled Work Settings Facilitated Status",description:"Status of facilitated IT work settings information",selectOptions:kbe},{key:"itEnabledWorkSettingsVoid",type:["number",{preset:"decimal_2",min:0}],label:"IT Enabled Work Settings - Void",description:"Void IT enabled work settings"},{key:"itEnabledWorkSettingsVoidStatus",type:"select",label:"IT Enabled Work Settings Void Status",description:"Status of void IT work settings information",selectOptions:kbe},{key:"officeAttendanceFacilitated",type:["number",{preset:"decimal_2",min:0}],label:"Office Attendance Facilitated",description:"Facilitated office attendance count"},{key:"officeAttendanceFacilitatedStatus",type:"select",label:"Office Attendance Facilitated Status",description:"Status of facilitated office attendance information",selectOptions:kbe},{key:"officeAttendanceActual",type:["number",{preset:"decimal_2",min:0}],label:"Office Attendance Actual",description:"Actual office attendance count"},{key:"officeAttendanceActualStatus",type:"select",label:"Office Attendance Actual Status",description:"Status of actual office attendance information",selectOptions:kbe},{key:"runningCostRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Rent",description:"Running cost for rent"},{key:"runningCostRentStatus",type:"select",label:"Running Cost Rent Status",description:"Status of running cost rent information",selectOptions:kbe},{key:"runningCostNonRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Non Rent",description:"Running cost for non-rent expenses"},{key:"runningCostNonRentStatus",type:"select",label:"Running Cost Non Rent Status",description:"Status of running cost non-rent information",selectOptions:kbe},{key:"runningCostTotal",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Total",description:"Total running cost"},{key:"runningCostTotalStatus",type:"select",label:"Running Cost Total Status",description:"Status of total running cost information",selectOptions:kbe},{key:"runningCostPerDesk",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Desk",description:"Running cost per desk"},{key:"runningCostPerDeskStatus",type:"select",label:"Running Cost Per Desk Status",description:"Status of running cost per desk information",selectOptions:kbe},{key:"runningCostPerHeadcount",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Headcount",description:"Running cost per headcount"},{key:"runningCostPerHeadcountStatus",type:"select",label:"Running Cost Per Headcount Status",description:"Status of running cost per headcount information",selectOptions:kbe},{key:"source",type:"string",label:"Source",description:"Source of the information",validators:[{validate:"length",max:255}]},{key:"sourceStatus",type:"select",label:"Source Status",description:"Status of the source information",selectOptions:kbe},{key:"capitalInvestmentCostFitOut",type:["number",{preset:"decimal_2",min:0}],label:"Capital Investment Cost Fit Out",description:"Capital investment cost for fit out"},{key:"capitalInvestmentCostFitOutStatus",type:"select",label:"Capital Investment Cost Fit Out Status",description:"Status of capital investment cost fit out information",selectOptions:kbe},{key:"dilaps",type:["number",{preset:"decimal_2",min:0}],label:"Dilaps",description:"Dilapidations cost"},{key:"dilapsStatus",type:"select",label:"Dilaps Status",description:"Status of dilaps information",selectOptions:kbe},{key:"runningCostPerEntityDesnzRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity DESNZ Rent",description:"Running cost per entity for DESNZ rent"},{key:"runningCostPerEntityDesnzRentStatus",type:"select",label:"Running Cost Per Entity DESNZ Rent Status",description:"Status of running cost per entity DESNZ rent information",selectOptions:kbe},{key:"runningCostPerEntityDesnzNonRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity DESNZ Non Rent",description:"Running cost per entity for DESNZ non-rent"},{key:"runningCostPerEntityDesnzNonRentStatus",type:"select",label:"Running Cost Per Entity DESNZ Non Rent Status",description:"Status of running cost per entity DESNZ non-rent information",selectOptions:kbe},{key:"runningCostPerEntityDesnzTotal",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity DESNZ Total",description:"Total running cost per entity for DESNZ"},{key:"runningCostPerEntityDesnzTotalStatus",type:"select",label:"Running Cost Per Entity DESNZ Total Status",description:"Status of running cost per entity DESNZ total information",selectOptions:kbe},{key:"runningCostPerEntityIcsRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity ICS Rent",description:"Running cost per entity for ICS rent"},{key:"runningCostPerEntityIcsRentStatus",type:"select",label:"Running Cost Per Entity ICS Rent Status",description:"Status of running cost per entity ICS rent information",selectOptions:kbe},{key:"runningCostPerEntityIcsNonRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity ICS Non Rent",description:"Running cost per entity for ICS non-rent"},{key:"runningCostPerEntityIcsNonRentStatus",type:"select",label:"Running Cost Per Entity ICS Non Rent Status",description:"Status of running cost per entity ICS non-rent information",selectOptions:kbe},{key:"runningCostPerEntityIcsTotal",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity ICS Total",description:"Total running cost per entity for ICS"},{key:"runningCostPerEntityIcsTotalStatus",type:"select",label:"Running Cost Per Entity ICS Total Status",description:"Status of running cost per entity ICS total information",selectOptions:kbe},{key:"runningCostPerEntityGbeRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity GBE Rent",description:"Running cost per entity for GBE rent"},{key:"runningCostPerEntityGbeRentStatus",type:"select",label:"Running Cost Per Entity GBE Rent Status",description:"Status of running cost per entity GBE rent information",selectOptions:kbe},{key:"runningCostPerEntityGbeNonRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity GBE Non Rent",description:"Running cost per entity for GBE non-rent"},{key:"runningCostPerEntityGbeNonRentStatus",type:"select",label:"Running Cost Per Entity GBE Non Rent Status",description:"Status of running cost per entity GBE non-rent information",selectOptions:kbe},{key:"runningCostPerEntityGbeTotal",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity GBE Total",description:"Total running cost per entity for GBE"},{key:"runningCostPerEntityGbeTotalStatus",type:"select",label:"Running Cost Per Entity GBE Total Status",description:"Status of running cost per entity GBE total information",selectOptions:kbe},{key:"runningCostPerEntitySeahorseRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity Seahorse Rent",description:"Running cost per entity for Seahorse rent"},{key:"runningCostPerEntitySeahorseRentStatus",type:"select",label:"Running Cost Per Entity Seahorse Rent Status",description:"Status of running cost per entity Seahorse rent information",selectOptions:kbe},{key:"runningCostPerEntitySeahorseNonRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity Seahorse Non Rent",description:"Running cost per entity for Seahorse non-rent"},{key:"runningCostPerEntitySeahorseNonRentStatus",type:"select",label:"Running Cost Per Entity Seahorse Non Rent Status",description:"Status of running cost per entity Seahorse non-rent information",selectOptions:kbe},{key:"runningCostPerEntitySeahorseTotal",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity Seahorse Total",description:"Total running cost per entity for Seahorse"},{key:"runningCostPerEntitySeahorseTotalStatus",type:"select",label:"Running Cost Per Entity Seahorse Total Status",description:"Status of running cost per entity Seahorse total information",selectOptions:kbe},{key:"runningCostPerEntityDsitRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity DSIT Rent",description:"Running cost per entity for DSIT rent"},{key:"runningCostPerEntityDsitRentStatus",type:"select",label:"Running Cost Per Entity DSIT Rent Status",description:"Status of running cost per entity DSIT rent information",selectOptions:kbe},{key:"runningCostPerEntityDsitNonRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity DSIT Non Rent",description:"Running cost per entity for DSIT non-rent"},{key:"runningCostPerEntityDsitNonRentStatus",type:"select",label:"Running Cost Per Entity DSIT Non Rent Status",description:"Status of running cost per entity DSIT non-rent information",selectOptions:kbe},{key:"runningCostPerEntityDsitTotal",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity DSIT Total",description:"Total running cost per entity for DSIT"},{key:"runningCostPerEntityDsitTotalStatus",type:"select",label:"Running Cost Per Entity DSIT Total Status",description:"Status of running cost per entity DSIT total information",selectOptions:kbe},{key:"runningCostPerEntityUksaRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity UKSA Rent",description:"Running cost per entity for UKSA rent"},{key:"runningCostPerEntityUksaRentStatus",type:"select",label:"Running Cost Per Entity UKSA Rent Status",description:"Status of running cost per entity UKSA rent information",selectOptions:kbe},{key:"runningCostPerEntityUksaNonRent",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity UKSA Non Rent",description:"Running cost per entity for UKSA non-rent"},{key:"runningCostPerEntityUksaNonRentStatus",type:"select",label:"Running Cost Per Entity UKSA Non Rent Status",description:"Status of running cost per entity UKSA non-rent information",selectOptions:kbe},{key:"runningCostPerEntityUksaTotal",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity UKSA Total",description:"Total running cost per entity for UKSA"},{key:"runningCostPerEntityUksaTotalStatus",type:"select",label:"Running Cost Per Entity UKSA Total Status",description:"Status of running cost per entity UKSA total information",selectOptions:kbe},{key:"runningCostPerEntityTotalCheck",type:["number",{preset:"decimal_2",min:0}],label:"Running Cost Per Entity Total Check",description:"Total check for running cost per entity"},{key:"runningCostPerEntityTotalCheckStatus",type:"select",label:"Running Cost Per Entity Total Check Status",description:"Status of running cost per entity total check information",selectOptions:kbe},{key:"notes",type:"string",label:"Notes",description:"Additional notes for this estates configuration",validators:[{validate:"length",max:1e3}]}]},[null==a||null===(n=a.getLocationsPage)||void 0===n?void 0:n.rows])}const Cbe=["floorSpace","facilitiesStatComp","desnzEntityHeadcountDesnz","desnzEntityHeadcountIcs","desnzEntityHeadcountGbe","desnzEntityHeadcountSeahorse","dsitEntityHeadcountDsit","dsitEntityHeadcountUksa","totalHeadcountTotal","totalHeadcountFacilitated","totalHeadcountVoid","itEnabledWorkSettingsRequired","itEnabledWorkSettingsFacilitated","itEnabledWorkSettingsVoid","officeAttendanceFacilitated","officeAttendanceActual","runningCostRent","runningCostNonRent","runningCostTotal","runningCostPerDesk","runningCostPerHeadcount","capitalInvestmentCostFitOut","dilaps","runningCostPerEntityDesnzRent","runningCostPerEntityDesnzNonRent","runningCostPerEntityDesnzTotal","runningCostPerEntityIcsRent","runningCostPerEntityIcsNonRent","runningCostPerEntityIcsTotal","runningCostPerEntityGbeRent","runningCostPerEntityGbeNonRent","runningCostPerEntityGbeTotal","runningCostPerEntitySeahorseRent","runningCostPerEntitySeahorseNonRent","runningCostPerEntitySeahorseTotal","runningCostPerEntityDsitRent","runningCostPerEntityDsitNonRent","runningCostPerEntityDsitTotal","runningCostPerEntityUksaRent","runningCostPerEntityUksaNonRent","runningCostPerEntityUksaTotal","runningCostPerEntityTotalCheck"];var Sbe,Nbe;function wbe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Dbe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?wbe(Object(t),!0).forEach(function(n){Abe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):wbe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Abe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Rbe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Pbe=(0,f.styled)("div")(Sbe||(Sbe=Rbe(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),Lbe=e=>{let{data:n,onEditClick:t,onDeleteClick:a}=e;return(0,Ze.jsxs)(Pbe,{children:[(0,Ze.jsx)(f.IconButton,{onClick:()=>t(n),children:(0,Ze.jsx)(ybe.A,{fontSize:"small",titleAccess:"Edit"})}),(0,Ze.jsx)(f.IconButton,{onClick:()=>a(n),children:(0,Ze.jsx)(gbe.A,{fontSize:"small",titleAccess:"Delete"})})]})},Ibe=(0,f.styled)("div")(Nbe||(Nbe=Rbe(["\n  height: 100%;\n"]))),Ebe={pagination:!0,paginationPageSize:25,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}};function _be(e){let{accountId:n,onGridReady:t}=e;const[a]=(0,gs._)(hbe,{fetchPolicy:"cache-and-network"}),[r]=(0,gs._)(vbe,{fetchPolicy:"network-only"}),[i]=(0,Ot.n)(xbe,{refetchQueries:["GetEstatesConfiguration","GetEstatesConfigurationById"],awaitRefetchQueries:!1}),[o]=(0,Ot.n)(Tbe,{refetchQueries:["GetEstatesConfiguration"]}),[l,s]=(0,g.useState)(null),[c,d]=(0,g.useState)(null),[u,p]=(0,g.useState)(null),m=_u(),{showNotification:f}=vt(),y=jbe(n,!0),b=(0,g.useRef)(null),h=(0,g.useCallback)(async e=>{try{var t;console.log("Edit clicked for row:",e);const a=await r({variables:{id:e.id,accountId:n}});null!==(t=a.data)&&void 0!==t&&t.getEstatesConfigurationById?s(a.data.getEstatesConfigurationById):(console.error("Failed to fetch estates configuration details"),f("Failed to fetch estates configuration details","danger"))}catch(e){console.error("Error fetching estates configuration details:",e),f("Error fetching estates configuration details","danger")}},[r,n,f]);(0,g.useEffect)(()=>{l&&b.current&&b.current.open()},[l]);const v=(0,g.useCallback)(e=>{d({locationId:e.locationId,accountId:e.accountId,forecastYear:e.forecastYear})},[]),x=(0,g.useCallback)(async()=>{if(c)try{await o({variables:{locationId:c.locationId,accountId:c.accountId,forecastYear:c.forecastYear}}),f("Successfully deleted estates configuration","success"),u&&u.refreshServerSide({purge:!0})}catch(e){const n=e instanceof Error?e.message:"Failed to delete estates configuration";f("Error: ".concat(n),"danger")}},[c,o,f,u]),T=(0,g.useCallback)(()=>{s(null)},[]),O=(0,g.useCallback)(async e=>{if(l&&0!==e.length)try{console.log("=== UPDATING ESTATES CONFIGURATION ==="),console.log("Original data:",l),console.log("Updated data:",e[0]);const n=e[0],t={};Object.keys(n).forEach(e=>{"locationId"!==e&&"locationName"!==e&&void 0!==n[e]&&(t[e]=""===n[e]?null:n[e])}),console.log("Update input:",t),await i({variables:{id:l.id,input:t}}),f("Successfully updated estates configuration","success"),u&&u.refreshServerSide({purge:!0}),T()}catch(e){console.error("Error updating estates configuration:",e);const n=e instanceof Error?e.message:"Failed to update estates configuration";f("Error: ".concat(n),"danger")}else f("No data to update","warning")},[l,i,f,u,T]),k=(0,g.useCallback)(e=>{t(e),p(e.api),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{var t;const{startRow:r,sortModel:i,filterModel:o}=e.request,l=await a({variables:{accountId:n,offset:r||0,limit:Ebe.paginationPageSize,sort:oa(i),filters:ia(o)}});if(null===(t=l.data)||void 0===t||!t.getEstatesConfiguration)throw new Error("Failed to fetch estates configuration");const{rows:s,totalRows:c}=l.data.getEstatesConfiguration;e.success({rowData:s,rowCount:c})}catch(n){console.error("Error fetching estates configuration:",n),e.fail()}}})},[a,n,t]),j={action:e=>(0,Ze.jsx)(Lbe,Dbe(Dbe({},e),{},{onEditClick:h,onDeleteClick:v}))};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Ibe,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,Dbe(Dbe({},Ebe),{},{columnDefs:[{headerName:"Location",field:"locationName",sortable:!0,filter:"agTextColumnFilter",flex:1},{headerName:"Forecast Year",field:"forecastYear",sortable:!0,filter:"agTextColumnFilter",width:150},{headerName:"Actions",field:"actions",sortable:!1,filter:!1,width:120,cellRenderer:"action"}],components:j,onGridReady:k}))}),m&&(0,Ze.jsx)(VU.A,{ref:b,licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:m,style:{display:"none"},settings:Dbe(Dbe({},QU.settings),{},{importIdentifier:"EditEstatesConfiguration",title:"Edit Estates Configuration",uploadStep:Dbe(Dbe({},QU.settings.uploadStep),{},{helpText:"Edit the estates configuration data below and click Submit to save changes."}),manualInputDisabled:!1,initialData:l?[l]:[]}),fields:y,onResults:O,onCancel:T}),(0,Ze.jsx)(Z$,{open:Boolean(c),title:"Delete Estates Configuration",body:"Are you sure you want to delete this estates configuration? This action cannot be undone.",confirmButtonText:"Delete",closeButtonText:"Cancel",onConfirm:x,onClose:()=>d(null)})]})}var Fbe;const Bbe=(0,D.J1)(Fbe||(Fbe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  mutation CreateEstatesConfiguration($input: CreateEstatesConfigurationInput!) {\n    createEstatesConfiguration(input: $input)\n  }\n"]))),Ube=t.p+"estates-configuration-template-238da9bb756d638ef399.xlsx";var Mbe,Vbe,zbe,Gbe;function $be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Wbe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$be(Object(t),!0).forEach(function(n){qbe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$be(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function qbe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Jbe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ybe=(0,f.styled)("div")(Mbe||(Mbe=Jbe(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),Hbe=(0,f.styled)("div")(Vbe||(Vbe=Jbe(["\n  flex: 1;\n  min-height: 0;\n  padding: 0 16px;\n"]))),Kbe=(0,f.styled)("div")(zbe||(zbe=Jbe(["\n  padding: 16px;\n  flex: 0 0 auto;\n"]))),Qbe=(0,f.styled)("div")(Gbe||(Gbe=Jbe(["\n  margin-left: auto;\n"]))),Zbe=uv(function(e){let{permissions:n,accountId:t}=e;const a=rt(),[r,i]=(0,g.useState)({id:t||a}),[o,l]=(0,g.useState)(null),s=(0,N.m)(),c=r.id||a,d=(Od(c),_u()),{showNotification:u}=vt(),[p]=(0,Ot.n)(Bbe),m=jbe(c),f=[kn("REACT_APP_BASE_URL"),Ube].join(""),y=(0,g.useMemo)(()=>d?{id:d.id,name:Vo(d)}:null,[d]),b=(0,g.useCallback)(e=>{i({id:e})},[]),h=(0,g.useCallback)(e=>{l(e.api)},[]),v=(0,g.useCallback)(async e=>{try{const n=e.map(e=>{const n=Wbe({accountId:c},e);return function(e){Cbe.forEach(n=>{if(void 0!==e[n]&&null!==e[n]&&""!==e[n]){const t=parseFloat(e[n]);isNaN(t)?e[n]=null:e[n]=t}else""===e[n]&&(e[n]=null)})}(n),p({variables:{input:n}})});await Promise.all(n),u("Successfully created estates configuration records","success"),s.refetchQueries({include:[hbe]}).then(()=>{o&&o.refreshServerSide({purge:!0})})}catch(e){const n=e instanceof Error?e.message:"Failed to create estates configuration data";u("Error: ".concat(n),"danger")}},[c,p,u,o,s]);return(0,Ze.jsxs)(Ybe,{children:[(0,Ze.jsx)(bh,{name:"ConfigurationEstatesContainer__Controls",icon:"building",iconColor:"primary",title:"Estates Configuration",children:(0,Ze.jsx)(Qbe,{children:y&&(0,Ze.jsx)(VU.A,{licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:y,style:QU.style,settings:Wbe(Wbe({},QU.settings),{},{importIdentifier:"EstatesConfiguration",uploadStep:Wbe(Wbe({},QU.settings.uploadStep),{},{helpText:$U(f)}),manualInputDisabled:!1}),fields:m,onResults:v,bulkRowHooks:[e=>e],children:"Upload Estates Configuration"})})}),n.account.includes("getAll")&&(0,Ze.jsx)(Kbe,{children:(0,Ze.jsx)(Kh,{value:r.id,onChange:b})}),(0,Ze.jsx)(Hbe,{children:(0,Ze.jsx)(_be,{accountId:r.id,onGridReady:h})})]})});var Xbe,ehe,nhe;function the(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ahe=(0,D.J1)(Xbe||(Xbe=the(["\n  mutation ImportOilProducingAssets($oilProducingAssets: [OilProducingAssetInput!]!, $accountId: ID!) {\n    importOilProducingAssets(oilProducingAssets: $oilProducingAssets, accountId: $accountId) {\n      created\n      updated\n      deleted\n    }\n  }\n"]))),rhe=(0,D.J1)(ehe||(ehe=the(["\n  mutation UpdateOilProducingAsset($id: ID!, $accountId: ID!, $input: UpdateOilProducingAssetInput!) {\n    updateOilProducingAsset(id: $id, accountId: $accountId, input: $input)\n  }\n"]))),ihe=(0,D.J1)(nhe||(nhe=the(["\n  query GetOilProducingAssetsPage(\n    $accountId: ID!\n    $page: Int!\n    $pageSize: Int!\n    $sortBy: String\n    $sortOrder: String\n    $filters: Filters\n  ) {\n    getOilProducingAssetsPage(\n      accountId: $accountId\n      page: $page\n      pageSize: $pageSize\n      sortBy: $sortBy\n      sortOrder: $sortOrder\n      filters: $filters\n    ) {\n      items {\n        id\n        locationId\n        countryName\n        field\n        operation\n        jointVenture\n        equityShare\n        fuelGasConsumption\n        flaredGas\n        liquidFuelCombustion\n        fugitiveEmissions\n        releaseValves\n        platforms\n        products\n        notes\n        createdAt\n        updatedAt\n        createdBy\n        updatedBy\n        location {\n          id\n          name\n        }\n      }\n      totalCount\n      page\n      pageSize\n    }\n  }\n"])));var ohe,lhe,she,che;function dhe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function uhe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dhe(Object(t),!0).forEach(function(n){phe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dhe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function phe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function mhe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const fhe=(0,f.styled)("div")(ohe||(ohe=mhe(["\n  margin-bottom: 16px;\n"]))),yhe=(0,f.styled)(f.Text)(lhe||(lhe=mhe(["\n  font-weight: 600;\n  margin-bottom: 4px;\n  display: block;\n"]))),ghe=(0,f.styled)(f.Text)(she||(she=mhe(["\n  display: block;\n"]))),bhe=(0,f.styled)("div")(che||(che=mhe(["\n  display: flex;\n  gap: 16px;\n  margin-top: 32px;\n"])));function hhe(e){var n;let{asset:t,accountId:a,onDismiss:r,onComplete:i}=e;const[o]=(0,Ot.n)(rhe),{showNotification:l}=vt(),[s,c]=(0,g.useState)({field:t.field,operation:t.operation,products:t.products,jointVenture:t.jointVenture,equityShare:t.equityShare,fuelGasConsumption:t.fuelGasConsumption,flaredGas:t.flaredGas,liquidFuelCombustion:t.liquidFuelCombustion,fugitiveEmissions:t.fugitiveEmissions,releaseValves:t.releaseValves,platforms:t.platforms,notes:t.notes||""}),[d,u]=(0,g.useState)({});return(0,Ze.jsx)(f.Modal,{open:!0,onClose:r,title:"Edit Oil Producing Asset",children:(0,Ze.jsxs)(f.Grid,{container:!0,spacing:3,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsxs)(fhe,{children:[(0,Ze.jsx)(yhe,{typescale:"label",size:"large",children:"Location"}),(0,Ze.jsx)(ghe,{typescale:"body",size:"medium",children:null===(n=t.location)||void 0===n?void 0:n.name})]})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{fullWidth:!0,label:"Field",value:s.field,onChange:e=>c(uhe(uhe({},s),{},{field:e.target.value})),error:!!d.field,helperText:d.field})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Select,{fullWidth:!0,label:"Operation",value:s.operation,onChange:e=>{let{value:n}=e;return c(uhe(uhe({},s),{},{operation:n}))},error:!!d.operation,helperText:d.operation,options:[{value:"OWNER_OPERATED",label:"Owner Operated"},{value:"THIRD_PARTY",label:"Third Party"}]})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Select,{fullWidth:!0,label:"Products",value:s.products,onChange:e=>{let{value:n}=e;return c(uhe(uhe({},s),{},{products:n}))},error:!!d.products,helperText:d.products,options:[{value:"OIL",label:"Oil"},{value:"OIL_GAS",label:"Oil & Gas"}]})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Checkbox,{label:"Joint Venture",checked:s.jointVenture,onChange:e=>c(uhe(uhe({},s),{},{jointVenture:e.target.checked}))})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{fullWidth:!0,label:"Equity Share (%)",type:"number",value:s.equityShare.toString(),onChange:e=>c(uhe(uhe({},s),{},{equityShare:parseFloat(e.target.value)||0})),error:!!d.equityShare,helperText:d.equityShare,slotProps:{htmlInput:{min:0,max:100,step:.01}}})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Checkbox,{label:"Fuel Gas Consumption",checked:s.fuelGasConsumption,onChange:e=>c(uhe(uhe({},s),{},{fuelGasConsumption:e.target.checked}))})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Checkbox,{label:"Flared Gas",checked:s.flaredGas,onChange:e=>c(uhe(uhe({},s),{},{flaredGas:e.target.checked}))})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Checkbox,{label:"Liquid Fuel Combustion",checked:s.liquidFuelCombustion,onChange:e=>c(uhe(uhe({},s),{},{liquidFuelCombustion:e.target.checked}))})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Checkbox,{label:"Fugitive Emissions",checked:s.fugitiveEmissions,onChange:e=>c(uhe(uhe({},s),{},{fugitiveEmissions:e.target.checked}))})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{fullWidth:!0,label:"Release Valves",type:"number",value:s.releaseValves.toString(),onChange:e=>c(uhe(uhe({},s),{},{releaseValves:parseInt(e.target.value)||0})),error:!!d.releaseValves,helperText:d.releaseValves,slotProps:{htmlInput:{min:0,step:1}}})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{fullWidth:!0,label:"Platforms",type:"number",value:s.platforms.toString(),onChange:e=>c(uhe(uhe({},s),{},{platforms:parseInt(e.target.value)||0})),error:!!d.platforms,helperText:d.platforms,slotProps:{htmlInput:{min:0,step:1}}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextArea,{fullWidth:!0,label:"Notes",value:s.notes,onChange:e=>c(uhe(uhe({},s),{},{notes:e.target.value})),rows:4})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsxs)(bhe,{children:[(0,Ze.jsx)(f.Button,{variant:"outlined",onClick:r,fullWidth:!0,children:"Cancel"}),(0,Ze.jsx)(f.Button,{variant:"contained",onClick:async()=>{(()=>{const e={};return s.field&&""!==s.field.trim()||(e.field="Field is required"),s.operation||(e.operation="Operation is required"),s.products||(e.products="Products is required"),(s.equityShare<0||s.equityShare>100)&&(e.equityShare="Equity share must be between 0 and 100"),s.releaseValves<0&&(e.releaseValves="Release valves cannot be negative"),s.platforms<0&&(e.platforms="Platforms cannot be negative"),u(e),0===Object.keys(e).length})()&&await o({variables:{id:t.id,accountId:a,input:s},onCompleted:()=>{i(),l("Oil Producing Asset updated successfully","success"),r()},onError:e=>{l(e.message,"danger")}})},fullWidth:!0,children:"Save Changes"})]})})]})})}var vhe;function xhe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function The(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xhe(Object(t),!0).forEach(function(n){Ohe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xhe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ohe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const khe=Ge.default.div(vhe||(vhe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n"]))),jhe={pagination:!0,paginationPageSize:25,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}};function Che(e){let{accountId:n,onGridReady:t}=e;const[a]=(0,gs._)(ihe,{fetchPolicy:"network-only"}),r=(0,g.useMemo)(()=>[{headerName:"Location",field:"location.name",filter:"agTextColumnFilter",sortable:!0},{headerName:"Country",field:"countryName",filter:"agTextColumnFilter",sortable:!0},{headerName:"Field",field:"field",filter:"agTextColumnFilter",sortable:!0},{headerName:"Operation",field:"operation",filter:"agTextColumnFilter",sortable:!0},{headerName:"Joint Venture",field:"jointVenture",filter:"agBooleanColumnFilter",sortable:!0,valueFormatter:e=>e.value?"Yes":"No"},{headerName:"Equity Share (%)",field:"equityShare",filter:"agNumberColumnFilter",sortable:!0,valueFormatter:e=>null==e.value?"":"".concat(e.value.toFixed(2),"%")},{headerName:"Fuel Gas Consumption",field:"fuelGasConsumption",filter:"agBooleanColumnFilter",sortable:!0,valueFormatter:e=>e.value?"Yes":"No"},{headerName:"Flared Gas",field:"flaredGas",filter:"agBooleanColumnFilter",sortable:!0,valueFormatter:e=>e.value?"Yes":"No"},{headerName:"Liquid Fuel Combustion",field:"liquidFuelCombustion",filter:"agBooleanColumnFilter",sortable:!0,valueFormatter:e=>e.value?"Yes":"No"},{headerName:"Fugitive Emissions",field:"fugitiveEmissions",filter:"agBooleanColumnFilter",sortable:!0,valueFormatter:e=>e.value?"Yes":"No"},{headerName:"Release Valves",field:"releaseValves",filter:"agNumberColumnFilter",sortable:!0},{headerName:"Platforms",field:"platforms",filter:"agNumberColumnFilter",sortable:!0},{headerName:"Products",field:"products",filter:"agTextColumnFilter",sortable:!0},{headerName:"Notes",field:"notes",filter:"agTextColumnFilter",sortable:!0,cellRenderer:"agTextCellRenderer",cellRendererParams:{maxLength:50}},{headerName:"Created At",field:"createdAt",filter:"agDateColumnFilter",sortable:!0,valueFormatter:ca},{headerName:"Updated At",field:"updatedAt",filter:"agDateColumnFilter",sortable:!0,valueFormatter:ca},{headerName:"Actions",cellRenderer:"editCell",filter:!1,sortable:!1,maxWidth:100}],[]),[i,o]=(0,g.useState)(null),[l,s]=(0,g.useState)(null),c={editCell:e=>(0,Ze.jsx)(BJ,The(The({},e),{},{onEdit:(e,n)=>{o(n)}}))},d=(0,g.useCallback)(e=>{t(e),s(e.api),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{var t,r,i;const{startRow:o,sortModel:l,filterModel:s}=e.request,c=await a({variables:{accountId:n,page:Math.floor((o||0)/jhe.paginationPageSize)+1,pageSize:jhe.paginationPageSize,sortBy:null==l||null===(t=l[0])||void 0===t?void 0:t.colId,sortOrder:null==l||null===(r=l[0])||void 0===r?void 0:r.sort,filters:ia(s)}});if(null===(i=c.data)||void 0===i||!i.getOilProducingAssetsPage)throw new Error("Failed to fetch oil producing assets");const{items:d,totalCount:u}=c.data.getOilProducingAssetsPage;e.success({rowData:d,rowCount:u})}catch(n){console.error("Error fetching oil producing assets:",n),e.fail()}}})},[a,n,t]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(khe,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,The(The({},jhe),{},{columnDefs:r,onGridReady:d,components:c}))}),i&&(0,Ze.jsx)(hhe,{asset:i,accountId:n,onComplete:()=>{o(null),l&&l.refreshServerSide({purge:!0})},onDismiss:()=>o(null)})]})}const She=JSON.parse('{"OA":[{"key":"locationId","label":"Location","type":"select","validators":[{"validate":"required"}],"description":"Select the location for this asset data. Only one asset record per location is allowed."},{"key":"field","label":"Field","type":"string","validators":[{"validate":"required"}],"description":"Which field does this site / activity support?"},{"key":"operation","label":"Operation","type":"select","validators":[{"validate":"required"}],"description":"Is this site / activity owner operated or a service provided by a third-party?"},{"key":"jointVenture","label":"Joint Venture","type":"checkbox","description":"Is this a joint venture?"},{"key":"equityShare","label":"Equity Share (%)","type":"number","min":0,"max":100,"validators":[{"validate":"required"}],"description":"Enter equity share percentage (0-100)"},{"key":"fuelGasConsumption","label":"Fuel Gas Consumption","type":"checkbox","description":"Please select the emission sources relevant to this site / activity"},{"key":"flaredGas","label":"Flared Gas","type":"checkbox","description":"Please select the emission sources relevant to this site / activity"},{"key":"liquidFuelCombustion","label":"Liquid Fuel Combustion","type":"checkbox","description":"Please select the emission sources relevant to this site / activity"},{"key":"fugitiveEmissions","label":"Fugitive Emissions","type":"checkbox","description":"Please select the emission sources relevant to this site / activity"},{"key":"releaseValves","label":"Release Valves","type":"number","min":0,"default":0,"validators":[{"validate":"required"}],"description":"If the site is a production platform or FPSO, please supply details on the number of Pressure Relief Valves / Safety Relief Valves"},{"key":"platforms","label":"Platforms","type":"number","min":0,"default":0,"validators":[{"validate":"required"}],"description":"If the location is a field which aggregates a number of platforms, please input the number of platforms"},{"key":"products","label":"Products","type":"select","validators":[{"validate":"required"}],"description":"Which products are sent to the market for sale?"},{"key":"notes","label":"Notes","type":"string","description":"Additional notes (optional)"}],"W0":{"importIdentifier":"locationAssetData","allowCustomFields":false,"invalidDataBehavior":"BLOCK_SUBMIT","backendSyncMode":"FULL_DATA","autoMapHeaders":true,"manualInputDisabled":false,"displayEncoding":false,"matchValuesStep":{"maxMappableSelectValues":1000},"uploadStep":{"helpText":"Please click the link to download a template for this upload, including a separate tab for guidance. Note: Only one asset record is allowed per location. If a location already has asset data, it will be updated."},"reviewStep":{"processingText":"We\'re currently processing your data upload now and hope to be complete shortly","enableUserTransformations":true}},"iF":{"backgroundColor":"#0094c9","borderColor":"#0094c9","borderRadius":"32px","borderStyle":"solid","borderWidth":"1px","boxSizing":"border-box","color":"#ffffff","cursor":"pointer","display":"inline-block","fontFamily":"\\"Proxima Nova\\", Helvetica, Arial, sans-serif","fontSize":"16px","fontWeight":400,"lineHeight":"1.4em","marginLeft":"16px","opacity":1,"padding":"16px 24px","textAlign":"center","textDecoration":"none","width":"auto"}}'),Nhe=t.p+"oil-producing-asset-template-ff3e531a40f89139004b.xlsx";function whe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Dhe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?whe(Object(t),!0).forEach(function(n){Ahe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):whe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ahe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Rhe=[kn("REACT_APP_BASE_URL"),Nhe].join("");function Phe(e){let{onCompleted:n}=e;const t=Pu(),a=rt(),r=_u(),i=Eu(),{showNotification:o}=vt(),[l]=(0,Ot.n)(ahe),s=(0,g.useCallback)(async e=>{const t=function(e){const n=[];return e.forEach((e,t)=>{const a=function(e,n){const t=[];return e.locationId||t.push({row:n+1,field:"locationId",message:"Location is required"}),e.field&&""!==e.field.trim()||t.push({row:n+1,field:"field",message:"Field is required"}),e.operation?["OWNER_OPERATED","THIRD_PARTY"].includes(e.operation)||t.push({row:n+1,field:"operation",message:'Operation must be either "OWNER_OPERATED" or "THIRD_PARTY"'}):t.push({row:n+1,field:"operation",message:"Operation is required"}),void 0!==e.jointVenture&&null!==e.jointVenture||t.push({row:n+1,field:"jointVenture",message:"Joint venture is required"}),void 0===e.equityShare||null===e.equityShare?t.push({row:n+1,field:"equityShare",message:"Equity share is required"}):"number"!=typeof e.equityShare?t.push({row:n+1,field:"equityShare",message:"Equity share must be a number"}):(e.equityShare<0||e.equityShare>100)&&t.push({row:n+1,field:"equityShare",message:"Equity share must be between 0 and 100 percent (got ".concat(e.equityShare,")")}),void 0!==e.fuelGasConsumption&&null!==e.fuelGasConsumption||t.push({row:n+1,field:"fuelGasConsumption",message:"Fuel gas consumption is required"}),void 0!==e.flaredGas&&null!==e.flaredGas||t.push({row:n+1,field:"flaredGas",message:"Flared gas is required"}),void 0!==e.liquidFuelCombustion&&null!==e.liquidFuelCombustion||t.push({row:n+1,field:"liquidFuelCombustion",message:"Liquid fuel combustion is required"}),void 0!==e.fugitiveEmissions&&null!==e.fugitiveEmissions||t.push({row:n+1,field:"fugitiveEmissions",message:"Fugitive emissions is required"}),void 0===e.releaseValves||null===e.releaseValves?t.push({row:n+1,field:"releaseValves",message:"Release valves is required"}):"number"!=typeof e.releaseValves?t.push({row:n+1,field:"releaseValves",message:"Release valves must be a number"}):e.releaseValves<0&&t.push({row:n+1,field:"releaseValves",message:"Release valves must be 0 or greater"}),void 0===e.platforms||null===e.platforms?t.push({row:n+1,field:"platforms",message:"Platforms is required"}):"number"!=typeof e.platforms?t.push({row:n+1,field:"platforms",message:"Platforms must be a number"}):e.platforms<0&&t.push({row:n+1,field:"platforms",message:"Platforms must be 0 or greater"}),e.products?["OIL","OIL_GAS"].includes(e.products)||t.push({row:n+1,field:"products",message:'Products must be either "OIL" or "OIL_GAS"'}):t.push({row:n+1,field:"products",message:"Products is required"}),void 0!==e.notes&&null!==e.notes&&"string"!=typeof e.notes&&t.push({row:n+1,field:"notes",message:"Notes must be a string"}),t}(e,t);n.push(...a)}),n}(e);if(t.length>0){const e=function(e){if(0===e.length)return"";const n=e.reduce((e,n)=>(e[n.row]||(e[n.row]=[]),e[n.row].push("".concat(n.field,": ").concat(n.message)),e),{}),t=Object.entries(n).map(e=>{let[n,t]=e;return"Row ".concat(n,": ").concat(t.join(", "))});return"Validation failed: ".concat(t.join("; "))}(t);return void o(e,"danger")}const r=(0,zt.chunk)(e,500),i={created:0,updated:0,deleted:0,failed:0};for(const e of r){const n=await l({variables:{oilProducingAssets:e,accountId:a}});await new Promise(e=>{setTimeout(()=>{e()},500)}),n.errors?i.failed+=e.length:n.data&&(i.created+=n.data.importOilProducingAssets.created,i.updated+=n.data.importOilProducingAssets.updated,i.deleted+=n.data.importOilProducingAssets.deleted)}const{created:s,updated:c,deleted:d,failed:u}=i;let p="".concat(s," created, ").concat(c," updated, ").concat(d," deleted");u>0&&(p+=", ".concat(u," failed")),o(p),n()},[o,n,l,a]);if(!r)throw new Error("Configuration is not ready");const c={id:(null==r?void 0:r.id)||"",name:Vo(r),email:null==r?void 0:r.email,companyId:a,companyName:null==t?void 0:t.name},d=(0,g.useMemo)(()=>She.OA.map(e=>{switch(e.key){case"locationId":return Dhe(Dhe({},e),{},{selectOptions:i.map(e=>({label:e.name,value:e.id}))});case"operation":return Dhe(Dhe({},e),{},{selectOptions:[{label:"Owner Operated",value:"OWNER_OPERATED"},{label:"Third Party",value:"THIRD_PARTY"}]});case"products":return Dhe(Dhe({},e),{},{selectOptions:[{label:"Oil",value:"OIL"},{label:"Oil & Gas",value:"OIL_GAS"}]});default:return e}}),[i]);return(0,Ze.jsx)(VU.A,{licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:c,style:Dhe(Dhe({},QU.style),She.iF),settings:Dhe(Dhe(Dhe({},QU.settings),She.W0),{},{uploadStep:Dhe(Dhe({},QU.settings.uploadStep),{},{helpText:$U(Rhe)})}),fields:d,onResults:s,children:"+ Upload Oil Producing Assets"})}var Lhe,Ihe,Ehe,_he;function Fhe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Bhe=(0,Ge.default)(ze.fv)(Lhe||(Lhe=Fhe(["\n  display: flex;\n  height: 100%;\n"]))),Uhe=Ge.default.div(Ihe||(Ihe=Fhe(["\n  flex: 1;\n  min-height: 0;\n  padding: 0 ",";\n"])),e=>e.theme.geometry.md.spacing),Mhe=Ge.default.div(Ehe||(Ehe=Fhe(["\n  margin-left: auto;\n  display: flex;\n  gap: 16px;\n  align-items: center;\n"]))),Vhe=Ge.default.div(_he||(_he=Fhe(["\n  padding: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),zhe=uv(function(e){let{permissions:n,accountId:t}=e;const a=rt(),[r,i]=(0,g.useState)({id:t||a}),[o,l]=(0,g.useState)(),s=(0,N.m)(),c=(()=>{const[e]=(0,gs._)(ihe);return async n=>{var t,a,r,i;const o=n.offset?Math.floor(n.offset/(n.limit||25))+1:1,l=n.limit||25,{data:s}=await e({variables:{accountId:n.accountId,page:o,pageSize:l,sortBy:null===(t=n.sort)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.field,sortOrder:null===(a=n.sort)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.order,filters:n.filters}});return{rows:(null==s||null===(r=s.getOilProducingAssetsPage)||void 0===r?void 0:r.items)||[],totalRows:(null==s||null===(i=s.getOilProducingAssetsPage)||void 0===i?void 0:i.totalCount)||0}}})(),d=(0,g.useCallback)(e=>{l(e)},[]),u=(0,g.useCallback)(()=>{console.log("handleUploadCompleted called, refetching data..."),s.refetchQueries({include:[ihe]}).then(()=>{null!=o&&o.api&&o.api.refreshServerSide({purge:!0})})},[s,null==o?void 0:o.api]);return(0,Ze.jsxs)(Bhe,{children:[(0,Ze.jsx)(bh,{name:"ConfigurationOilProducingAssetContainer__Controls",icon:"map-marker-alt",iconColor:"primary",title:"Oil Producing Assets",children:(0,Ze.jsxs)(Mhe,{children:[(0,Ze.jsx)(MP,{fetchRows:c,gridApi:null==o?void 0:o.api,defaultExportFileName:"oil-producing-asset-data",columnsToSkip:["Actions"],label:"Export Oil Producing Assets"}),(0,Ze.jsx)(Phe,{onCompleted:u})]})}),n.account.includes("getAll")&&(0,Ze.jsx)(Vhe,{children:(0,Ze.jsx)(Kh,{value:r.id,onChange:e=>{i({id:e.id})}})}),(0,Ze.jsx)(Uhe,{children:(0,Ze.jsx)(Che,{accountId:r.id,onGridReady:d})})]})});function Ghe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $he(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ghe(Object(t),!0).forEach(function(n){Whe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ghe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Whe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const qhe=e=>{let{fetchRows:n}=e;const t=Dd({autoFit:!0}),[a,r]=(0,g.useState)(null),i={async getRows(e){try{const t=await n();e.success({rowData:t,rowCount:t.length})}catch(n){e.fail(),r(n),de.Cp(n)}}},o=$he($he({},{pagination:!0,paginationPageSize:25,paginationPageSizeSelector:!1,rowModelType:"serverSide",defaultColDef:{sortable:!1,resizable:!0,filter:!1,autoHeight:!0,filterParams:{showTooltip:!0}}}),{},{columnDefs:[{headerName:"Factor Name",field:"factorName"},{headerName:"Unit From",field:"unitFrom"},{headerName:"Unit To",field:"unitTo"},{headerName:"Factor Value",field:"factorValue"}],rowStyle:{width:"100%",display:"flex",alignItems:"center"},rowHeight:58});return a?(0,Ze.jsx)(ub,{error:a,name:a.message,retry:async()=>{await n(),r(null)}}):(0,Ze.jsx)(nD,{gridOptions:o,paginationPageSize:25,cacheBlockSize:25,onFirstDataRendered:t.onFirstDataRendered,onFilterChanged:t.onFilterChanged,onSortChanged:t.onSortChanged,onColumnVisible:t.onSaveGridColumnState,onColumnPinned:t.onSaveGridColumnState,onColumnResized:t.onSaveGridColumnState,onColumnMoved:t.onSaveGridColumnState,onColumnRowGroupChanged:t.onSaveGridColumnState,onColumnValueChanged:t.onSaveGridColumnState,onColumnPivotChanged:t.onSaveGridColumnState,onGridReady:e=>{t.onGridReady(e),e.api.setServerSideDatasource(i)}})};var Jhe;const Yhe=(0,D.J1)(Jhe||(Jhe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetApiConversionFactors {\n    getApiConversionFactors {\n      id\n      factorName\n      unitFrom\n      unitTo\n      factorValue\n      source\n    }\n  }\n"])));var Hhe;const Khe=(0,Ge.default)(bh)(Hhe||(Hhe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  & > div {\n    width: auto;\n  }\n"])));function Qhe(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async()=>{try{const{data:n}=await e.query({query:Yhe});return n.getApiConversionFactors}catch(e){return n("Error fetching API Conversion Factors","danger"),[]}},[e,n]);return(0,Ze.jsxs)(ze.fv,{name:"ConfigurationApiConversionFactorsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(Khe,{name:"ConfigurationApiConversionFactorsContainer__Controls",icon:"calculator",iconColor:"primary",title:"API Conversion Factors"}),(0,Ze.jsx)(qhe,{fetchRows:t})]})}function Zhe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Xhe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Zhe(Object(t),!0).forEach(function(n){eve(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Zhe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function eve(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const nve={pagination:!0,paginationPageSize:25,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}},tve=e=>{let{fetchRows:n}=e;const[t,a]=(0,g.useState)(null),r=(0,g.useMemo)(()=>[{headerName:"ID",field:"id",hide:!0},{headerName:"Activity",filter:"agTextColumnFilter",field:"activity",width:300},{headerName:"Value",filter:"agNumberColumnFilter",field:"value",width:150,valueFormatter:e=>null===e.value||void 0===e.value?"":Number(e.value).toFixed(6)},{headerName:"Asset",filter:"agTextColumnFilter",field:"asset",width:200,valueFormatter:e=>e.value&&e.value.name?e.value.name:"N/A"}],[]),i=(0,g.useCallback)(e=>{e.api.setGridOption("serverSideDatasource",{async getRows(e){try{const t=await n();e.success({rowData:t,rowCount:t.length})}catch(n){console.error("Error fetching uncertainties background:",n),a(n),de.Cp(n),e.fail()}}})},[n]);if(t)return(0,Ze.jsx)(ub,{error:t});const o=Xhe(Xhe({},nve),{},{columnDefs:r,onGridReady:i});return(0,Ze.jsx)("div",{className:"ag-theme-alpine",style:{height:"100%",width:"100%"},children:(0,Ze.jsx)(f.AgGrid,{gridKey:"uncertainties-background",gridOptions:o})})};var ave;const rve=(0,D.J1)(ave||(ave=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetUncertaintiesBackground {\n    getUncertaintiesBackground {\n      id\n      activity\n      value\n      asset {\n        id\n        name\n      }\n    }\n  }\n"])));var ive;const ove=Ge.default.div(ive||(ive=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n  min-height: 0;\n  padding: 0 ",";\n"])),e=>e.theme.geometry.md.spacing);function lve(){const e=(0,N.m)(),{showNotification:n}=vt(),t=(0,g.useCallback)(async()=>{try{const{data:n}=await e.query({query:rve});return n.getUncertaintiesBackground}catch(e){return n("Error fetching Uncertainties Background data","danger"),[]}},[e,n]);return(0,Ze.jsx)(f.Page,{title:{content:(0,Ze.jsx)(bh,{name:"ConfigurationUncertaintiesBackgroundContainer__Controls",icon:"chart-line",iconColor:"primary",title:"Uncertainties Background"})},children:(0,Ze.jsx)(ove,{children:(0,Ze.jsx)(tve,{fetchRows:t})})})}var sve;const cve=(0,D.J1)(sve||(sve=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetLiquidFuelEmissionFactors {\n    getLiquidFuelEmissionFactors {\n      fuelType\n      unit\n      totalKgCO2ePerUnit\n      kgCO2eOfCO2PerUnit\n      kgCO2eOfCH4PerUnit\n      kgCO2eOfN2OPerUnit\n      kgCH4PerUnit\n      kgN2OPerUnit\n    }\n  }\n"])));var dve,uve,pve;function mve(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const fve=(0,f.styled)("div")(dve||(dve=mve(["\n  min-height: 350px;\n"]))),yve=(0,f.styled)(f.AgGrid)(uve||(uve=mve(["\n  flex: 1;\n  height: calc(100vh - 240px);\n"]))),gve=(0,f.styled)("div")(pve||(pve=mve(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n"])));function bve(){const{data:e,loading:n,error:t}=(0,h.IT)(cve),a=(0,g.useMemo)(()=>(null==e?void 0:e.getLiquidFuelEmissionFactors)||[],[e]),r=(0,g.useMemo)(()=>({rowData:a,pagination:!1,defaultColDef:{sortable:!0,resizable:!0,filter:!0},columnDefs:[{headerName:"Fuel Type",filter:"agTextColumnFilter",field:"fuelType"},{headerName:"Unit",filter:"agTextColumnFilter",field:"unit"},{headerName:"Total kg CO2e per Unit",filter:"agNumberColumnFilter",field:"totalKgCO2ePerUnit"},{headerName:"kg CO2e of CO2 per Unit",filter:"agNumberColumnFilter",field:"kgCO2eOfCO2PerUnit"},{headerName:"kg CO2e of CH4 per Unit",filter:"agNumberColumnFilter",field:"kgCO2eOfCH4PerUnit"},{headerName:"kg CO2e of N2O per Unit",filter:"agNumberColumnFilter",field:"kgCO2eOfN2OPerUnit"},{headerName:"kg CH4 per Unit",filter:"agNumberColumnFilter",field:"kgCH4PerUnit"},{headerName:"kg N2O per Unit",filter:"agNumberColumnFilter",field:"kgN2OPerUnit"}]}),[a]);return n||0===a.length?(0,Ze.jsx)(gve,{children:(0,Ze.jsx)(f.Loader,{})}):t?(0,Ze.jsx)(gve,{children:(0,Ze.jsx)(f.LoadFailed,{error:t})}):(0,Ze.jsxs)(ze.fv,{name:"ConfigurationLiquidFuelConversionFactorsContainer",container:!0,fullHeight:!0,children:[(0,Ze.jsx)(bh,{name:"ConfigurationLiquidFuelConversionFactorsContainer__Controls",icon:"calculator",iconColor:"primary",title:"Liquid Fuel Conversion Factors"}),(0,Ze.jsx)(fve,{children:(0,Ze.jsx)(yve,{gridOptions:r,gridKey:"ConfigurationLiquidFuelConversionFactorsContainer"})})]})}function hve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vve(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hve(Object(t),!0).forEach(function(n){xve(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hve(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xve(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Tve={rowModelType:"serverSide",pagination:!0,paginationPageSize:25,paginationPageSizeSelector:[25,50,100],autoSizeStrategy:{type:"fitGridWidth"}};function Ove(e){let{columnDefs:n,serverSideDatasource:t}=e;return(0,g.useMemo)(()=>vve(vve({},Tve),{},{columnDefs:n,serverSideDatasource:t}),[n,t])}function kve(e,n){const[t]=Jm(e,{notifyOnNetworkStatusChange:!0,fetchPolicy:"network-only"});return(0,g.useCallback)(async e=>{const{error:a,data:r}=await t({variables:e});if(a||!r)throw a||new Error("No data returned from query");return r[n]},[t,n])}function jve(e,n){const t=rt(),a=kve(e,n);return(0,g.useMemo)(()=>({async getRows(e){const{startRow:n=0,endRow:r=25,sortModel:i,filterModel:o}=e.request;try{const l=await a({accountId:t,offset:n,limit:r-n,sort:oa(i),filters:ia(o)}),{rows:s,totalRows:c}=l;e.success({rowData:s,rowCount:c})}catch(n){e.fail(),de.Cp(n)}}}),[a,t])}var Cve,Sve,Nve,wve,Dve;function Ave(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Rve=(0,D.J1)(Cve||(Cve=Ave(["\n  fragment UserAccessPolicyFields on UserAccessPolicy {\n    id\n    name\n    accountId\n    effect\n    resourceType\n    resources\n    createdAt\n    lastUpdatedAt\n  }\n"]))),Pve=(0,D.J1)(Sve||(Sve=Ave(["\n  query GetUserAccessPoliciesPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getUserAccessPoliciesPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        ...UserAccessPolicyFields\n      }\n      totalRows\n    }\n  }\n  ","\n"])),Rve),Lve=(0,D.J1)(Nve||(Nve=Ave(["\n  mutation CreateUserAccessPolicy($accountId: ID!, $input: UserAccessPolicyInput!) {\n    createUserAccessPolicy(accountId: $accountId, input: $input) {\n      ...UserAccessPolicyFields\n    }\n  }\n  ","\n"])),Rve),Ive=(0,D.J1)(wve||(wve=Ave(["\n  mutation UpdateUserAccessPolicy($accountId: ID!, $id: ID!, $input: UserAccessPolicyInput!) {\n    updateUserAccessPolicy(accountId: $accountId, id: $id, input: $input) {\n      ...UserAccessPolicyFields\n    }\n  }\n  ","\n"])),Rve),Eve=(0,D.J1)(Dve||(Dve=Ave(["\n  mutation DeleteUserAccessPolicy($accountId: ID!, $id: ID!) {\n    deleteUserAccessPolicy(accountId: $accountId, id: $id)\n  }\n"])));var _ve;const Fve=(0,f.styled)(f.Grid)(_ve||(_ve=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  gap: 8px;\n"])));function Bve(e){let{data:n,onEditClick:t,onDeleteClick:a}=e;const r=(0,g.useCallback)(()=>{t(n)},[t,n]),i=(0,g.useCallback)(()=>{a(n)},[a,n]);return(0,Ze.jsxs)(Fve,{children:[(0,Ze.jsx)(f.IconButton,{children:(0,Ze.jsx)(f.Icons.Edit,{onClick:r})}),(0,Ze.jsx)(f.IconButton,{children:(0,Ze.jsx)(f.Icons.Delete,{onClick:i})})]})}const Uve={[Vt.BL.Allow]:"Allow",[Vt.BL.Deny]:"Deny"},Mve={[Vt.M6.OrganisationalUnit]:"Organisational unit",[Vt.M6.Tag]:"Tag",[Vt.M6.Location]:"Location"};function Vve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function zve(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Vve(Object(t),!0).forEach(function(n){Gve(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Vve(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Gve(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var $ve,Wve;function qve(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Jve=(0,f.styled)(f.Grid)($ve||($ve=qve(["\n  display: flex;\n  align-items: center;\n  gap: 8px;\n"]))),Yve=(0,f.styled)(f.AgGrid)(Wve||(Wve=qve(["\n  height: calc(100vh - 216px); // header + page title height;\n  padding-bottom: 2px; // border bottom and shadow to show properly\n"])));function Hve(e){var n,t;let{gridRef:a,onCreateClick:r,allowManage:i}=e;return(0,Ze.jsxs)(Jve,{children:[(0,Ze.jsx)(N$,{filtersApplied:null===(n=a.current)||void 0===n?void 0:n.filtersApplied,resetGridState:null===(t=a.current)||void 0===t?void 0:t.resetGridState}),i&&(0,Ze.jsx)(zP.A,{title:"Create new access policy",children:(0,Ze.jsx)(f.IconButton,{color:"primary",variant:"contained",onClick:r,children:(0,Ze.jsx)(f.Icons.Add,{})})})]})}var Kve;const Qve=(0,D.J1)(Kve||(Kve=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetOrganisationalUnitOptions(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getOrganisationalUnitsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        value: id\n        label: name\n      }\n      totalRows\n    }\n  }\n"])));const Zve=e=>{let{value:n,onChange:t,error:a,defaultOptions:r,disabled:i}=e;const{loading:o,options:l}=function(){const e=rt(),[n,t]=(0,g.useState)([]),[a,r]=(0,g.useState)(!1),i=(0,g.useRef)(0),[o]=(0,gs._)(Qve,{notifyOnNetworkStatusChange:!0});return(0,g.useEffect)(()=>{(async()=>{var n,a;r(!0);const l=[],s=await o({variables:{accountId:e,sort:[{field:"name",order:"asc"}],offset:i.current,limit:Za}});if(null==s||null===(n=s.data)||void 0===n||!n.getOrganisationalUnitsPage)return;const c=null!==(a=s.data.getOrganisationalUnitsPage.totalRows)&&void 0!==a?a:0;for(l.push(...s.data.getOrganisationalUnitsPage.rows);l.length<c&&i.current<=c;){var d;const n=await o({variables:{accountId:e,offset:i.current,sort:[{field:"name",order:"asc"}],limit:Za}});if(null==n||null===(d=n.data)||void 0===d||null===(d=d.getOrganisationalUnitsPage)||void 0===d||!d.rows)return;l.push(...n.data.getOrganisationalUnitsPage.rows),i.current+=Za}t(l),r(!1)})()},[]),(0,g.useMemo)(()=>({options:n,loading:a}),[n,a])}();return(0,Ze.jsx)(f.AutoComplete,{isMulti:!0,label:"Select your organisational unit(s)",options:l,onChange:t,isLoading:o,error:null==a?void 0:a.toString(),value:n,defaultValue:Array.isArray(r)?r:[],disabled:i,placeholder:"Start typing to search for an organisational unit"})};function Xve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function exe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Xve(Object(t),!0).forEach(function(n){nxe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xve(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function nxe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const txe={name:"",effect:Vt.BL.Allow,resourceType:Vt.M6.OrganisationalUnit,resources:[]};function axe(e){let{onSubmit:n,defaultValues:t,disabled:a}=e;const r=rt(),[i,o]=(0,g.useState)(t||txe),[l,s]=(0,g.useState)({}),c=(0,g.useCallback)(e=>{o(n=>exe(exe({},n),{},{[e.target.name]:e.target.value}))},[]),d=e=>n=>{o(t=>exe(exe({},t),{},{[e]:Array.isArray(n)?n.map(e=>e.value):n.value}))},u=(0,g.useMemo)(()=>Object.entries(Uve).map(e=>{let[n,t]=e;return{value:n,label:t}}),[]),p=(0,g.useMemo)(()=>Object.entries(Mve).map(e=>{let[n,t]=e;return{value:n,label:t}}),[]),m=(0,g.useCallback)(()=>{const e={};i.name||(e.name="Name is required"),i.effect||(e.effect="Allow / deny is required"),i.resourceType||(e.resourceType="Resource type is required"),i.resources.length||(e.resources="At least one resource has to be selected"),0===Object.keys(e).length?n(i):s(e)},[i,n]);return(0,Ze.jsxs)(f.Grid,{container:!0,direction:"column",justifyContent:"space-between",gap:2,children:[(0,Ze.jsx)(f.TextField,{label:"Name",name:"name",value:i.name,onChange:c,error:!!l.name,disabled:a}),(0,Ze.jsx)(f.Select,{label:"Allow / deny",name:"effect",value:i.effect,options:u,onChange:d("effect"),disabled:a,error:!!l.effect}),(0,Ze.jsx)(f.Select,{label:"Resource type",name:"resourceType",options:p,value:i.resourceType,onChange:d("resourceType"),disabled:a,error:!!l.resourceType}),i.resourceType===Vt.M6.Location&&(0,Ze.jsx)(C3,{value:i.resources,onChange:d("resources"),error:l.resources,disabled:a}),i.resourceType===Vt.M6.Tag&&(0,Ze.jsx)(A3,{accountId:r,value:i.resources,onChange:d("resources"),disabled:a,error:l.resources}),i.resourceType===Vt.M6.OrganisationalUnit&&(0,Ze.jsx)(Zve,{value:i.resources,defaultOptions:i.resources,onChange:d("resources"),disabled:a,error:l.resources}),(0,Ze.jsx)(f.Button,{variant:"contained",color:"primary",onClick:m,disabled:a,children:"Submit"})]})}function rxe(e){let{open:n,onClose:t,onCompleted:a,onError:r}=e;const[i,{loading:o}]=(0,Ot.n)(Lve),l=rt(),s=(0,g.useCallback)(e=>{i({onCompleted:()=>{a()},onError:e=>{r(e)},variables:{input:e,accountId:l}})},[i,a,l,r]);return(0,Ze.jsx)(f.Modal,{title:"Configure your new access policy",open:n,onClose:t,children:(0,Ze.jsx)(axe,{onSubmit:s,disabled:o})})}function ixe(e){let{open:n,policy:t,onClose:a,onCompleted:r,onError:i}=e;const[o,{loading:l}]=(0,Ot.n)(Ive),s=rt(),c=(0,g.useCallback)(e=>{t&&o({onCompleted:()=>{r()},onError:e=>{i(e)},variables:{id:t.id,input:e,accountId:s}})},[o,s,t,r,i]),d=(0,g.useMemo)(()=>{if(t)return{name:t.name,effect:t.effect,resourceType:t.resourceType,resources:t.resources}},[t]);return(0,Ze.jsx)(f.Modal,{title:"Update your access policy",open:n,onClose:a,children:(0,Ze.jsx)(axe,{onSubmit:c,defaultValues:d,disabled:l})})}function oxe(){const e=By("data"),n=By("user");return{get canGetOrganisationalUnit(){return e("getOrganisationalUnit")},get canCreateOrganisationalUnit(){return e("createOrganisationalUnit")},get canGetOrganisationalHierarchy(){return e("getOrganisationalHierarchy")},get canCreateOrganisationalHierarchy(){return e("createOrganisationalHierarchy")},get canDeleteOrganisationalHierarchy(){return e("deleteOrganisationalHierarchy")},get canGetOrganisationalUnitLocationAttachment(){return e("getOrganisationalUnitLocationAttachment")},get canCreateOrganisationalUnitLocationAttachment(){return e("createOrganisationalUnitLocationAttachment")},get canDeleteOrganisationalUnitLocationAttachment(){return e("deleteOrganisationalUnitLocationAttachment")},get canGetUserAccessPolicy(){return n("getUserAccessPolicy")},get canManageUserAccessPolicy(){return n("manageUserAccessPolicy")},get canGetUserGroup(){return n("getUserGroup")},get canManageUserGroup(){return n("manageUserGroup")}}}function lxe(e){let{policy:n,onClose:t,onCompleted:a,onError:r}=e;const[i,{loading:o}]=(0,Ot.n)(Eve),l=rt(),s=(0,g.useCallback)(()=>{n&&i({onCompleted:()=>{a()},onError:e=>{r(e)},variables:{id:n.id,accountId:l}})},[i,a,r,n,l]);return(0,Ze.jsx)(Z$,{title:"Delete access policy",body:'Are you sure you want to delete the access policy "'.concat(null==n?void 0:n.name,'"? Policy may be undeletable until it is detached from all user groups.'),closeButtonText:"No, cancel",confirmButtonText:"Yes, delete it",open:!!n,disabled:o,onClose:t,onConfirm:s})}function sxe(){const e=(0,g.useRef)(null),n=rt(),{canManageUserAccessPolicy:t}=oxe(),[a,r]=(0,g.useState)(!1),[i,o]=(0,g.useState)(null),[l,s]=(0,g.useState)(null),{showNotification:c}=vt(),d="".concat(n,"_Organisation_AccessPolicies"),u=(e=>{let{onEditClick:n,onDeleteClick:t,allowManage:a}=e;const r=(0,g.useMemo)(()=>{const e=[{headerName:"Name",field:"name",sortable:!0,filter:"agTextColumnFilter"},{headerName:"Effect",field:"effect",sortable:!0,filter:"agTextColumnFilter",valueFormatter:e=>{return n=e.value,Uve[n];var n}},{headerName:"Resource type",field:"resourceType",sortable:!0,filter:"agTextColumnFilter",valueFormatter:e=>{return n=e.value,Mve[n];var n}},{headerName:"Resources",field:"resources",sortable:!0,filter:"agTextColumnFilter",valueFormatter:e=>e.value.length},{headerName:"Created at",field:"createdAt",sortable:!0,filter:"agTextColumnFilter",valueFormatter:ua},{headerName:"Last updated at",field:"lastUpdatedAt",sortable:!0,filter:"agTextColumnFilter",valueFormatter:ua}];return a&&e.push({field:"actions",sortable:!1,filter:!1,resizable:!1,maxWidth:200,cellRenderer:e=>(0,Ze.jsx)(Bve,zve(zve({},e),{},{onEditClick:n,onDeleteClick:t}))}),e},[a,n,t]);return Ove({columnDefs:r,serverSideDatasource:jve(Pve,"getUserAccessPoliciesPage")})})({allowManage:t,onDeleteClick:e=>{o(e)},onEditClick:e=>{s(e)}}),p=(0,g.useCallback)(()=>{r(e=>!e)},[]),m=(0,g.useCallback)(()=>{s(null)},[]),y=(0,g.useCallback)(e=>{console.error(e),c(e.message,"danger")},[c]),b=(0,g.useCallback)(()=>{var n;c("Success","success"),r(!1),s(null),o(null),null===(n=e.current)||void 0===n||null===(n=n.gridApi)||void 0===n||n.refreshServerSide({purge:!0})},[c,s,r]);return(0,Ze.jsxs)(f.Page,{title:{content:"Access policies",actionButton:(0,Ze.jsx)(Hve,{gridRef:e,onCreateClick:p,allowManage:t})},children:[(0,Ze.jsx)(Yve,{ref:e,gridKey:d,gridOptions:u}),(0,Ze.jsx)(rxe,{open:a,onClose:p,onCompleted:b,onError:y}),(0,Ze.jsx)(ixe,{open:!!l,policy:l,onClose:m,onCompleted:b,onError:y}),(0,Ze.jsx)(lxe,{policy:i,onClose:()=>o(null),onError:y,onCompleted:b})]})}var cxe,dxe,uxe;function pxe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const mxe=(0,D.J1)(cxe||(cxe=pxe(["\n  query GetOrganisationalUnitsPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getOrganisationalUnitsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        id\n        name\n        type\n      }\n      totalRows\n    }\n  }\n"]))),fxe=(0,D.J1)(dxe||(dxe=pxe(["\n  query GetOrganisationalUnitsForValidator($accountId: ID!, $offset: Int, $limit: Int) {\n    getOrganisationalUnitsPage(accountId: $accountId, offset: $offset, limit: $limit) {\n      rows {\n        id\n        name\n      }\n      totalRows\n    }\n  }\n"]))),yxe=(0,D.J1)(uxe||(uxe=pxe(["\n  mutation UpsertOrganisationalUnits($accountId: ID!, $inputs: [UpsertOrganisationalUnitInput!]!) {\n    upsertOrganisationalUnits(accountId: $accountId, inputs: $inputs)\n  }\n"])));function gxe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function bxe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gxe(Object(t),!0).forEach(function(n){hxe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gxe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hxe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const vxe=(0,f.styled)(f.Text)({textAlign:"center",color:"#ba1a1a",width:"100%"}),xxe=Ma.organisationalUnits.map(e=>({value:e,label:e})),Txe={"Some organisational units with the provided names already exist":{field:"name",message:"This name is already taken"}};function Oxe(e){let{data:n,onClose:t}=e;const a=!!n,{handleSubmit:r,control:i,setError:o,formState:{isDirty:l,isValid:s}}=(0,Rw.mN)({defaultValues:{name:null==n?void 0:n.name,type:null==n?void 0:n.type},mode:"onChange"}),[c,d]=(0,g.useState)(!1),[u,p]=(0,g.useState)(),m=function(){const e=rt(),[n]=(0,Ot.n)(yxe);return t=>n({variables:{accountId:e,inputs:[t]}})}(),{showNotification:y}=vt(),b=s&&l&&!c;return(0,Ze.jsx)(f.Modal,{open:!0,onClose:()=>t(),title:"".concat(a?"Update":"Create"," an organisational unit"),children:(0,Ze.jsx)("form",{onSubmit:r(async e=>{d(!0),p(void 0);try{const a=bxe(bxe({},e),{},{id:null==n?void 0:n.id});await m(a),y("Organisational unit saved successfully","success"),t(a)}catch(e){if(!(e instanceof tW.K4))throw e;{const{message:n}=e,t=Txe[n];t?o(t.field,{message:t.message}):p(n)}}finally{d(!1)}}),children:(0,Ze.jsxs)(f.Grid,{container:!0,spacing:3,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"name",control:i,rules:{required:"Name is required"},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(f.TextField,bxe(bxe({},n),{},{label:"Name",fullWidth:!0,error:!!t,helperText:null==t?void 0:t.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"type",control:i,rules:{required:"Type is required"},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(f.Select,bxe(bxe({},n),{},{placeholder:"Please select type",fullWidth:!0,options:xxe,error:!!t,helperText:null==t?void 0:t.message,onChange:e=>{let{value:t}=e;return n.onChange(t)}}))}})}),u&&(0,Ze.jsx)(vxe,{children:u}),(0,Ze.jsxs)(f.Grid,{size:12,container:!0,spacing:2,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,onClick:()=>t(),children:"Close"})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,variant:"contained",color:"primary",type:"submit",disabled:!b,children:"Submit"})})]})]})})})}var kxe;const jxe=(0,f.styled)(f.Grid)(kxe||(kxe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  gap: 8px;\n"])));function Cxe(e){let{data:n,api:t,rowIndex:a}=e;const[r,i]=(0,g.useState)(!1),{canCreateOrganisationalUnit:o}=oxe();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(jxe,{children:o&&(0,Ze.jsx)(f.IconButton,{children:(0,Ze.jsx)(f.Icons.Edit,{onClick:()=>i(!0)})})}),r&&(0,Ze.jsx)(Oxe,{data:n,onClose:e=>{i(!1),e&&t.applyServerSideRowData({startRow:a,successParams:{rowData:[e]}})}})]})}function Sxe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Nxe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function wxe(e,n){let{row:t}=e;for(const[e,a]of Object.entries(n)){const n=t[e];n&&(n.resultValue=a(n.resultValue))}}const Dxe=e=>void 0===e||""===e||null===e?null:e,Axe=e=>null!=e&&""!==e;function Rxe(e,n){let{row:t,rowId:a}=e;for(const[e,r]of Object.entries(n)){const n=t[e];if(n&&(n.info=[],Axe(n.resultValue))){const e=r(n.resultValue,{row:t,rowId:a});n.info=e?[{message:e,level:"error"}]:[]}}}function Pxe(e,n,t){const a=t.get(n);a&&(a.delete(e),0===a.size&&t.delete(n))}const Lxe=e=>n=>e.has(n)?null:"No organisational unit was found with this ID",Ixe=(e,n)=>(t,a)=>{var r;let{row:i,rowId:o}=a;const l=t.toLowerCase(),s=n.get(l);if(s&&s.size>(s.has(o)?1:0))return"This name is already added";const c=e.has(l),d=e.get(l),u=null===(r=i.id)||void 0===r?void 0:r.resultValue;return!c||"string"==typeof u&&u===d?null:"This name already exists"},Exe=t.p+"organisational-units-template-836a059d8c9fb83efc79.xlsx";var _xe;function Fxe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Bxe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fxe(Object(t),!0).forEach(function(n){Uxe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fxe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Uxe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Mxe=(0,f.styled)("span")(_xe||(_xe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: fit-content;\n"])));function Vxe(e){let{importIdentifier:n,templateUrl:t,fields:a,columnHooks:r,bulkRowHooks:i,rowDeleteHooks:o,tooltip:l,onClick:s,onResults:c,onClose:d,disabled:u}=e;const p=_u(),m=Pu(),y=Fy(),b=(0,g.useRef)(null),h=(0,g.useCallback)(()=>{var e;null==s||s(),null===(e=b.current)||void 0===e||e.open()},[s]),v=(0,g.useCallback)(()=>{var e;null==d||d(),null===(e=b.current)||void 0===e||null===(e=e.dromo)||void 0===e||e.close()},[d]),x=(0,g.useCallback)((e,n)=>{c(e,n),v()},[c,v]),T=(0,g.useMemo)(()=>m&&p?{id:p.id,name:Vo(p),email:p.email,companyId:m.id,companyName:m.name}:null,[m,p]),O=!T||!y,k=O||u;if(!T)return null;const{settings:j}=WU,{uploadStep:C}=j,S=t?{helpText:$U("".concat(kn("REACT_APP_BASE_URL")).concat(t))}:{helpText:null};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(zP.A,{title:O?"You don't have permission to upload data":l,children:(0,Ze.jsx)(Mxe,{children:(0,Ze.jsx)(f.IconButton,{variant:"contained",name:"DromoUploaderButton__uploadDataButton",onClick:k?void 0:h,disabled:k,children:(0,Ze.jsx)(f.CustomIcons.Upload,{color:"onPrimary"})})})}),(0,Ze.jsx)(VU.A,{ref:b,licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:T,settings:Bxe(Bxe({},j),{},{importIdentifier:n,uploadStep:Bxe(Bxe({},C),S)}),style:{display:"none"},onCancel:v,columnHooks:r,onResults:x,bulkRowHooks:i,rowDeleteHooks:o,fields:a})]})}const zxe=["gridApi","mutation","sanitizers","bulkRowHooks","rowDeleteHooks","validator","errorRecognizer","tooltip","templateUrl","formatRow"];function Gxe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $xe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gxe(Object(t),!0).forEach(function(n){Wxe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gxe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Wxe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function qxe(e){let{gridApi:n,mutation:t,sanitizers:a,bulkRowHooks:r,rowDeleteHooks:i,validator:o,errorRecognizer:l,tooltip:s,templateUrl:c,formatRow:d}=e,u=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,zxe);const{importIdentifier:p}=u,m=rt(),{showNotification:f}=vt();return(0,Ze.jsx)(Vxe,$xe($xe({},u),{},{onResults:async e=>{try{var r;await Promise.all((0,zt.chunk)(e,1e3).map(e=>{const n=a?function(e,n){for(const[t,a]of Object.entries(n))for(const n of e)n[t]=a(n[t]);return e}(e,a):e,r=d?n.map(d):n;return t({variables:{inputs:r,accountId:m}})})),null==n||null===(r=n.refreshServerSide)||void 0===r||r.call(n,{purge:!0}),f("".concat(p," have been uploaded!"),"success")}catch(e){if(e instanceof tW.K4&&null!=l&&l(e.message))return void f(e.message,"warning");f("Something unexpected happened. Please review your upload document and try again. If the problem persists, please contact support.","danger")}},bulkRowHooks:[o,...r||[]],templateUrl:c,tooltip:s,rowDeleteHooks:[e=>{o([e],"delete")},...i||[]]}))}const Jxe=[{key:"name",type:"string",label:"Name",validators:[{validate:"required"}]},{key:"type",type:"select",label:"Type",validators:[{validate:"required"}],selectOptions:Ma.organisationalUnits.map(e=>({label:e,value:e})).sort((e,n)=>e.label.localeCompare(n.label))},{key:"id",type:["uuid",{version:4}],label:"ID"}];function Yxe(e){let{gridApi:n}=e;const[t]=(0,Ot.n)(yxe),a=function(){const e=rt(),n=Ed({query:fxe,request:{accountId:e},response:"getOrganisationalUnitsPage"}),t=new Map,a=new Set,{clearAddedNames:r,handleAddedName:i,removeAddedName:o,indexedNames:l}=function(){const e=new Map,n=new Map,t=t=>{const a=e.get(t);e.delete(t),a&&Pxe(t,a,n)};return{indexedNames:n,clearAddedNames:()=>{e.clear(),n.clear()},handleAddedName:a=>{let{row:r,rowId:i}=a;const o=r.name.resultValue;if(Axe(o)){const t=e.get(i),a=o.toLowerCase();e.set(i,a),t&&Pxe(i,t,n),function(e,n,t){const a=t.get(n)||new Set;a.add(e),t.set(n,a)}(i,a,n)}else t(i)},removeAddedName:e=>{let{rowId:n}=e;return t(n)}}}();return async(e,s)=>{if("init"===s){t.clear(),a.clear(),r();const e=await n();for(const{id:n,name:r}of e)t.set(r.toLowerCase(),n),a.add(n)}for(const n of e)"delete"!==s?(wxe(n,{id:Dxe}),Rxe(n,{id:Lxe(a),name:Ixe(t,l)}),i(n)):o(n);return e}}();return(0,Ze.jsx)(qxe,{tooltip:"Bulk upload organisational units",importIdentifier:"Organisational units",gridApi:n,mutation:t,templateUrl:Exe,sanitizers:{id:Dxe},validator:a,fields:Jxe})}function Hxe(e){var n,t,a;let{gridRef:r}=e;const i=null===(n=r.current)||void 0===n?void 0:n.gridApi,{canCreateOrganisationalUnit:o}=oxe(),l=o&&i,s=kve(mxe,"getOrganisationalUnitsPage");return(0,Ze.jsxs)(Jve,{children:[(0,Ze.jsx)(N$,{filtersApplied:null===(t=r.current)||void 0===t?void 0:t.filtersApplied,resetGridState:null===(a=r.current)||void 0===a?void 0:a.resetGridState}),i&&(0,Ze.jsx)($P,{fetchRows:s,gridApi:i,defaultExportFileName:"organisational-units",columnsToSkip:["Actions"]}),l&&(0,Ze.jsx)(Yxe,{gridApi:i})]})}function Kxe(){const e=(0,g.useRef)(null),n=Ove({columnDefs:(0,g.useMemo)(()=>[{headerName:"ID",field:"id",hide:!0},{headerName:"Name",field:"name",sortable:!0,filter:"agTextColumnFilter"},{headerName:"Type",field:"type",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:Ma.organisationalUnits}},{headerName:"Actions",field:"actions",sortable:!1,filter:!1,resizable:!1,maxWidth:200,cellRenderer:e=>(0,Ze.jsx)(Cxe,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Sxe(Object(t),!0).forEach(function(n){Nxe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Sxe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},e))}],[]),serverSideDatasource:jve(mxe,"getOrganisationalUnitsPage")}),t=rt(),a="".concat(t,"_Organisation_OrganisationalUnits");return(0,Ze.jsx)(f.Page,{title:{content:"Organisational Units",actionButton:(0,Ze.jsx)(Hxe,{gridRef:e})},children:(0,Ze.jsx)(Yve,{ref:e,gridKey:a,gridOptions:n})})}var Qxe,Zxe,Xxe,eTe;function nTe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const tTe=(0,D.J1)(Qxe||(Qxe=nTe(["\n  query GetOrganisationalHierarchiesPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getOrganisationalHierarchiesPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      rows {\n        ancestor {\n          id\n          name\n        }\n        descendant {\n          id\n          name\n        }\n      }\n      totalRows\n    }\n  }\n"]))),aTe=(0,D.J1)(Zxe||(Zxe=nTe(["\n  mutation InsertOrganisationalHierarchies($accountId: ID!, $inputs: [InsertOrganisationalHierarchyInput!]!) {\n    insertOrganisationalHierarchies(accountId: $accountId, inputs: $inputs)\n  }\n"]))),rTe=(0,D.J1)(Xxe||(Xxe=nTe(["\n  query GetOrganisationalUnitsForHierarchiesUpload($accountId: ID!, $offset: Int, $limit: Int) {\n    getOrganisationalUnitsPage(accountId: $accountId, offset: $offset, limit: $limit) {\n      rows {\n        id\n        name\n      }\n      totalRows\n    }\n  }\n"]))),iTe=(0,D.J1)(eTe||(eTe=nTe(["\n  mutation DeleteOrganisationalHierarchy($accountId: ID!, $ancestorId: ID!, $descendantId: ID!) {\n    deleteOrganisationalHierarchy(accountId: $accountId, ancestorId: $ancestorId, descendantId: $descendantId)\n  }\n"])));var oTe,lTe;function sTe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function cTe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function dTe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const uTe=(0,f.styled)(f.Grid)(oTe||(oTe=dTe(["\n  display: flex;\n  align-items: center;\n  gap: 2px;\n"]))),pTe=(0,f.styled)("div")(lTe||(lTe=dTe(["\n  width: 36px;\n  height: 36px;\n"]))),mTe=(0,f.styled)(f.IconButton)({transform:"scale(0.9)",color:"#1B1B1F"});function fTe(e){let{hint:n,onClick:t,icon:a,disabled:r}=e;return(0,Ze.jsx)(zP.A,{title:n,children:(0,Ze.jsx)(pTe,{children:(0,Ze.jsx)(mTe,{disabled:r,onClick:t,children:a})})})}function yTe(e){let{buttons:n}=e;return(0,Ze.jsx)(uTe,{children:n.map((e,n)=>(0,Ze.jsx)(fTe,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sTe(Object(t),!0).forEach(function(n){cTe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sTe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},e),n))})}function gTe(e){let{api:n,rowIndex:t,data:a}=e;const[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)(!1),s=function(){const e=rt(),[n]=(0,Ot.n)(iTe),t=jy();return async a=>{let{ancestor:r,descendant:i}=a;await n({variables:{accountId:e,ancestorId:r.id,descendantId:i.id}}),t([{fieldName:"getOrganisationalHierarchiesPage"}])}}(),c=[],{canDeleteOrganisationalHierarchy:d}=oxe();return d&&c.push({hint:"Delete",onClick:()=>i(!0),icon:(0,Ze.jsx)(f.Icons.Delete,{}),disabled:o}),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(yTe,{buttons:c}),(0,Ze.jsx)(Z$,{open:r,onClose:()=>i(!1),onConfirm:async()=>{l(!0);try{await s(a),n.applyServerSideRowData({startRow:t,successParams:{rowData:[null]}})}finally{l(!1)}},title:"Delete organizational hierarchy",body:"This will permanently delete the organizational hierarchy. Do you want to proceed?",confirmButtonText:"Delete"})]})}function bTe(e){return{headerName:"Actions",field:"actions",sortable:!1,filter:!1,resizable:!1,maxWidth:200,cellRenderer:e}}function hTe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vTe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const xTe=(e,n)=>{let{row:t}=n;return e===t.ancestorId.resultValue?"Descendant must be different than ancestor":null},TTe=t.p+"organisational-hierarchies-template-08015504d77c1c8f9c4c.xlsx",OTe=e=>e.includes("create a hierarchy exceeding the maximum allowed depth")||e.includes("create a circular hierarchy");function kTe(e){let{gridApi:n,data:t}=e;const a=function(){const[e]=(0,Ot.n)(aTe),n=jy();return async t=>{await e(t),n([{fieldName:"getOrganisationalHierarchiesPage"}])}}(),r=(e=>{let{organisationalUnits:n}=e;return(0,g.useMemo)(()=>[{key:"descendantId",type:"select",label:"Unit",validators:[{validate:"required"}],selectOptions:n.map(e=>{let{name:n,id:t}=e;return{label:n,value:t}})},{key:"ancestorId",type:"select",label:"Report to",validators:[{validate:"required"}],selectOptions:n.map(e=>{let{name:n,id:t}=e;return{label:n,value:t}})}],[n])})(t);return(0,Ze.jsx)(qxe,{tooltip:"Bulk upload organisational hierarchies",gridApi:n,validator:async(e,n)=>{if(["init","update"].includes(n))for(const n of e)Rxe(n,{descendantId:xTe});return e},mutation:a,importIdentifier:"Organisational hierarchies",fields:r,templateUrl:TTe,errorRecognizer:OTe})}var jTe;const CTe=(0,f.styled)("span")(jTe||(jTe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: fit-content;\n"])));function STe(e){let{hint:n,onClick:t,disabled:a,icon:r,variant:i,color:o}=e;return(0,Ze.jsx)(zP.A,{title:n,children:(0,Ze.jsx)(CTe,{children:(0,Ze.jsx)(f.IconButton,{color:o,variant:i||"contained",onClick:t,disabled:a,children:r})})})}var NTe=t(81206),wTe=t(49366),DTe=(t(43692),t(70381)),ATe=t.n(DTe);function RTe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function PTe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?RTe(Object(t),!0).forEach(function(n){LTe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):RTe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function LTe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ITe={width:172,height:36};const ETe=(0,f.styled)("div")({width:"100%",height:"100%"});function _Te(e){let{onClose:n}=e;const{nodes:t,edges:a}=function(){const e=rt(),[n,t]=(0,g.useState)([]),[a,r]=(0,g.useState)([]),{data:i}=(0,h.IT)(tTe,{variables:{accountId:e,limit:1e3}}),o=null==i?void 0:i.getOrganisationalHierarchiesPage.rows;return(0,g.useEffect)(()=>{if(o){const[e,n]=function(e){const n=(new(ATe().graphlib.Graph)).setGraph({}).setDefaultEdgeLabel(()=>({})),t=new Map,a=[],r=[],i=new Set,o=new Set;for(const{ancestor:r,descendant:l}of e){for(const e of[r,l])t.has(e.id)||(t.set(e.id,e),n.setNode(e.id,PTe({},ITe))),i.add(e.id),o.add(e.id);a.push({id:"".concat(r.id,"-").concat(l.id),source:r.id,target:l.id}),n.setEdge(r.id,l.id)}for(const{ancestor:n,descendant:t}of e)i.delete(t.id),o.delete(n.id);ATe().layout(n);for(const e of t.values()){const t=n.node(e.id);r.push({id:e.id,type:i.has(e.id)?"input":o.has(e.id)?"output":void 0,data:{label:e.name},position:{x:t.x-ITe.width/2,y:t.y-ITe.height/2}})}return[r,a]}(o);t(e),r(n)}},[o]),{nodes:n,edges:a}}();return(0,Ze.jsx)(f.Modal,{title:"Visual Hierarchy",open:!0,onClose:n,maxWidth:"95vw",viewportWidth:95,viewportHeight:90,children:(0,Ze.jsx)(ETe,{children:(0,Ze.jsxs)(wTe.Gc,{nodes:t,edges:a,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,children:[(0,Ze.jsx)(wTe.VS,{}),(0,Ze.jsx)(wTe.H2,{showInteractive:!1})]})})})}function FTe(e){var n,t,a;let{gridRef:r}=e;const i=null===(n=r.current)||void 0===n?void 0:n.gridApi,{canCreateOrganisationalHierarchy:o}=oxe(),l=function(){const{canCreateOrganisationalHierarchy:e}=oxe(),n=rt(),t=Ed({query:rTe,request:{accountId:n},response:"getOrganisationalUnitsPage"}),[a,r]=(0,g.useState)();return(0,g.useEffect)(()=>{e&&(async()=>{r({organisationalUnits:await t()})})()},[e]),a}(),[s,c]=(0,g.useState)(!1),d=kve(tTe,"getOrganisationalHierarchiesPage"),u=o&&i&&l;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(Jve,{children:[(0,Ze.jsx)(STe,{hint:"Visualize",onClick:()=>c(!0),icon:(0,Ze.jsx)(NTe.A,{})}),(0,Ze.jsx)(N$,{filtersApplied:null===(t=r.current)||void 0===t?void 0:t.filtersApplied,resetGridState:null===(a=r.current)||void 0===a?void 0:a.resetGridState}),i&&(0,Ze.jsx)($P,{fetchRows:d,gridApi:i,defaultExportFileName:"organisational-hierarchies"}),u&&(0,Ze.jsx)(kTe,{data:l,gridApi:i})]}),s&&(0,Ze.jsx)(_Te,{onClose:()=>c(!1)})]})}function BTe(){const e=(0,g.useRef)(null),n=Ove({columnDefs:(0,g.useMemo)(()=>[{headerName:"Unit",field:"descendant.name",sortable:!0,filter:"agTextColumnFilter"},{headerName:"Report to",field:"ancestor.name",sortable:!0,filter:"agTextColumnFilter"},bTe(e=>(0,Ze.jsx)(gTe,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hTe(Object(t),!0).forEach(function(n){vTe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hTe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},e)))],[]),serverSideDatasource:jve(tTe,"getOrganisationalHierarchiesPage")}),t=rt(),a="".concat(t,"_Organisation_OrganisationalHierarchies");return(0,Ze.jsx)(f.Page,{title:{content:"Organisational hierarchies",actionButton:(0,Ze.jsx)(FTe,{gridRef:e})},children:(0,Ze.jsx)(Yve,{ref:e,gridKey:a,gridOptions:n})})}var UTe,MTe,VTe,zTe;function GTe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $Te=(0,D.J1)(UTe||(UTe=GTe(["\n  query GetLocationAttachmentsPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getOrganisationalUnitLocationAttachmentsPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      rows {\n        organisationalUnit {\n          id\n          name\n        }\n        location {\n          id\n          name\n        }\n      }\n      totalRows\n    }\n  }\n"]))),WTe=(0,D.J1)(MTe||(MTe=GTe(["\n  mutation InsertLocationAttachments($accountId: ID!, $inputs: [InsertOrganisationalUnitLocationAttachmentInput!]!) {\n    insertOrganisationalUnitLocationAttachments(accountId: $accountId, inputs: $inputs)\n  }\n"]))),qTe=e=>(0,D.J1)(VTe||(VTe=GTe(["\n  query GetDataForLocationAttachmentsUpload($accountId: ID!, $offset: Int, $limit: Int) {\n    ","\n  }\n"])),e.map(e=>"\n      ".concat(e,"(accountId: $accountId, offset: $offset, limit: $limit) {\n        rows {\n          id\n          name\n        }\n        totalRows\n      }  \n    "))),JTe=(0,D.J1)(zTe||(zTe=GTe(["\n  mutation DeleteLocationAttachment($accountId: ID!, $organisationalUnitId: ID!, $locationId: ID!) {\n    deleteOrganisationalUnitLocationAttachment(\n      accountId: $accountId\n      organisationalUnitId: $organisationalUnitId\n      locationId: $locationId\n    )\n  }\n"])));function YTe(e){let{api:n,rowIndex:t,data:a}=e;const[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)(!1),s=function(){const e=rt(),[n]=(0,Ot.n)(JTe);return async t=>{let{location:a,organisationalUnit:r}=t;await n({variables:{accountId:e,locationId:a.id,organisationalUnitId:r.id}})}}(),c=[],{canDeleteOrganisationalUnitLocationAttachment:d}=oxe();return d&&c.push({hint:"Delete",onClick:()=>i(!0),icon:(0,Ze.jsx)(f.Icons.Delete,{}),disabled:o}),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(yTe,{buttons:c}),(0,Ze.jsx)(Z$,{open:r,onClose:()=>i(!1),onConfirm:async()=>{l(!0);try{await s(a),n.applyServerSideRowData({startRow:t,successParams:{rowData:[null]}})}finally{l(!1)}},title:"Delete location attachment",body:"This will permanently delete the location attachment. Do you want to proceed?",confirmButtonText:"Delete"})]})}function HTe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function KTe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const QTe=t.p+"location-attachments-template-8fa74a9d20e32a86097f.xlsx";function ZTe(e){let{gridApi:n,data:t}=e;const[a]=(0,Ot.n)(WTe),r=(e=>{let{organisationalUnits:n,locations:t}=e;return(0,g.useMemo)(()=>[{key:"organisationalUnitId",type:"select",label:"Organisational unit",validators:[{validate:"required"}],selectOptions:n.map(e=>{let{name:n,id:t}=e;return{label:n,value:t}})},{key:"locationId",type:"select",label:"Location",validators:[{validate:"required"}],selectOptions:t.map(e=>{let{name:n,id:t}=e;return{label:n,value:t}})}],[n,t])})(t);return(0,Ze.jsx)(qxe,{tooltip:"Bulk upload location attachments",gridApi:n,validator:async e=>e,mutation:a,templateUrl:QTe,importIdentifier:"Location attachments",fields:r})}var XTe=t(2662),eOe=t(77583),nOe=t(81381),tOe=t(70415),aOe=t(3224),rOe=t(50953),iOe=t(96411);const oOe=JSON.parse('{"__schema":{"queryType":{"name":"Query"},"mutationType":{"name":"Mutation"},"subscriptionType":{"name":"Subscription"},"types":[{"kind":"SCALAR","name":"AWSDate","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"AWSDateTime","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"AWSJSON","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AccessControls","description":null,"fields":[{"name":"learn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"comply","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GovernanceAccessControls","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"data","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataAccessControls","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"intelligence","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"tasks","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"projects","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"surveys","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"flows","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dataTracker","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dromoUpload","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"v2Design","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"customFields","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"activityBasedUploads","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dataOverwriting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"Boolean","description":"The `Boolean` scalar type represents `true` or `false`.","fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"String","description":"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.","fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AccessControlsInput","description":null,"fields":null,"inputFields":[{"name":"learn","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"intelligence","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"comply","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"GovernanceAccessControlsInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"data","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DataAccessControlsInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tasks","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"projects","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"surveys","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"flows","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dataTracker","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dromoUpload","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"investment","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"v2Design","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"activityBasedUploads","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dataOverwriting","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Account","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AccountType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"children","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"logoPath","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyConsentDocumentLink","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyUploadGranularity","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyUploadBatchingEnabled","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyTariff","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"featureToggles","description":null,"args":[],"type":{"kind":"OBJECT","name":"FeatureToggles","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accessControls","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AccessControls","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"showChatBot","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"capacity","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"OBJECT","name":"ReportingYear","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"sector","description":null,"args":[],"type":{"kind":"OBJECT","name":"AccountSector","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tenantId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"unrestrictedDocuments","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isSupplierRequiredForDocument","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"customImpactDashboard","description":null,"args":[],"type":{"kind":"OBJECT","name":"Dashboard","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"ID","description":"The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\\"4\\"`) or integer (such as `4`) input value will be accepted as an ID.","fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"Int","description":"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.","fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AccountDepartmentInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"departmentId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AccountInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AccountType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tenantId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accessControls","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AccessControlsInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"featureToggles","description":null,"type":{"kind":"INPUT_OBJECT","name":"FeatureTogglesInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"logoPath","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyConsentDocumentLink","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyUploadGranularity","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"children","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"showChatBot","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"capacity","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"NamedEntityInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sectorId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"unrestrictedDocuments","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"customImpactDashboardId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AccountPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AccountSector","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AccountSurveyContributor","description":null,"fields":[{"name":"account","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"userGroup","description":null,"args":[],"type":{"kind":"OBJECT","name":"UserGroup","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"surveys","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ReceivedSurvey","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"SurveyContributorInterface","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"AccountType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ENTERPRISE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TEAM","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ENGAGE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"Accuracy","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"EST","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACT","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"Address","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"address1","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"address2","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"address3","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"city","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buildingType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coordinates","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"phone1","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Country","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AddressInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address1","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address2","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address3","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"city","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"coordinates","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"phone1","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"countryId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AggregationCommand","description":null,"fields":null,"inputFields":[{"name":"functions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AggregationFunction","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"partitions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"PartitionCommand","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AggregationFunction","description":null,"fields":null,"inputFields":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"aggregationType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AggregationType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"AggregationType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"SUM","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"AVG","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MIN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MAX","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"COUNT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"NONE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"Alias","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"OBJECT","name":"Account","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"aliasType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"parentItem","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AliasParentItem","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AliasBatchResult","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"aliasType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"parentItem","description":null,"args":[],"type":{"kind":"OBJECT","name":"AliasParentItem","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"energyType","description":null,"args":[],"type":{"kind":"ENUM","name":"TransactionType","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AliasBatchResults","description":null,"fields":[{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getParentResponses","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AliasBatchResult","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AliasInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"aliasType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"energyType","description":null,"type":{"kind":"ENUM","name":"TransactionType","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AliasParentItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"typeId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"AliasType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"WASTESTREAM","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTETREATMENTPROCESS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTECONTRACTOR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTECARRIER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CONTAINERTYPESIZE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTEIN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTEOUT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LOCATIONPOINT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"METER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORTSUBTYPE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUELTYPE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORTFUELTYPE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"JOURNEYTARGET","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"UNIT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACCURACY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CURRENCY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIALORIGIN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TARIFF","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"COUNTERPARTY","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AliasValueBatchInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"aliasValues","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AliasValueInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AliasValueInput","description":null,"fields":null,"inputFields":[{"name":"aliasType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"energyType","description":null,"type":{"kind":"ENUM","name":"TransactionType","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AliasesPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"AliasBatchResult","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AllLearnSubscriptions","description":null,"fields":[{"name":"subscriptions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"bundleShow","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"bundleHidden","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"mandatoryBundleId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AnomalyThreshold","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"thresholdPercentage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"utilityType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UtilityType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"monthlyVarianceDetectionEnabled","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"annuallyVarianceDetectionEnabled","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"Float","description":"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).","fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnomalyThresholdInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"thresholdPercentage","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"utilityType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UtilityTypeInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"monthlyVarianceDetectionEnabled","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"annuallyVarianceDetectionEnabled","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AnomalyThresholdsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AnomalyThreshold","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Answer","description":null,"fields":[{"name":"givenAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerBreakdownQuestionInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"BreakdownInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerChoiceQuestionInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerDateQuestionInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerFloatQuestionInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerInput","description":null,"fields":null,"inputFields":[{"name":"value","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerIntegerQuestionInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerMultipleChoiceQuestionInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerOpenEndedQuestionInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerOpenEndedRichQuestionInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerReportingQuestionInput","description":null,"fields":null,"inputFields":[{"name":"choice","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerChoiceQuestionInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"multipleChoice","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerMultipleChoiceQuestionInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"yesNo","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerYesNoQuestionInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"openEnded","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerOpenEndedQuestionInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"openEndedRich","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerOpenEndedRichQuestionInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"int","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerIntegerQuestionInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"float","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerFloatQuestionInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerDateQuestionInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"breakdown","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerBreakdownQuestionInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sequenceRepeatable","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerSequenceRepeatableQuestionInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerSequenceRepeatableQuestionInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SequenceRepeatableQuestionRowInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AnswerYesNoQuestionInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"AntivirusStatus","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"CLEAN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ERROR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INFECTED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PENDING","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"ApiConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"factorName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"unitFrom","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"unitTo","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"factorValue","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"source","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Aspect","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"author","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Scope","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Tag","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"activity","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"aspects","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"impacts","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"legislations","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Legislation","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"likelihoodNoControl","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"severityNoControl","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"significanceNoControl","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"emergencyConditions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"controlMeasures","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"likelihoodControl","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"severityControl","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"significanceControl","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reviewDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"task","description":null,"args":[],"type":{"kind":"OBJECT","name":"Task","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"editor","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"editedDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceNotes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AspectEvidenceNotes","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"activeTasks","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"owner","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AspectEvidenceInput","description":null,"fields":null,"inputFields":[{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AspectEvidenceNotes","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AspectInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"authorId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Scope","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"activity","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"aspects","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"impacts","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"legislationIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"likelihoodNoControl","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"severityNoControl","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"emergencyConditions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"controlMeasures","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"likelihoodControl","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"severityControl","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"reviewDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"taskId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"editorId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"createdDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"editedDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"evidenceNotes","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AspectEvidenceInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"activeTasks","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ownerId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AspectOption","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AspectOptionType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isGlobal","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"referenced","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AspectOptionInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AspectOptionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"AspectOptionType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ACTIVITY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ASPECT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"IMPACT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EMERGENCY_CONDITION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CONTROL_MEASURE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"STATUS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DEPARTMENTS","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"AspectsAlerts","description":null,"fields":[{"name":"expired","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Aspect","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"approaching","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Aspect","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AspectsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Aspect","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Asset","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Code","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"externalId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"gicsCode","description":null,"args":[],"type":{"kind":"OBJECT","name":"Code","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleted","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"lastUpdatedAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetLocation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"factors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AssetFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AssetFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"referenceLink","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"factorYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleted","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AssetFactorInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"assetId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"referenceLink","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"factorYear","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"deleted","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AssetFactorPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AssetFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AssetInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"externalId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"gicsCodeId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"deleted","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"assetLocation","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AssetPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Asset","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AssignAccountLicenceInput","description":null,"fields":null,"inputFields":[{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"licenceId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AssignLicenceInput","description":null,"fields":null,"inputFields":[{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"licenceId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AttachContentInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"linkId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"synopsis","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AttachDocumentInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"linkId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"documentId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AttachLegislationContentInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"linkId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"content","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"LegislationContentInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AttachmentQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"AuditEvent","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"service","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AuditEventService","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"entityId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"entity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AuditEventEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"OBJECT","name":"Account","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"payload","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSJSON","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"AuditEventEntity","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"FORM_CAMPAIGN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FORM_SUBMISSION","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"AuditEventInput","description":null,"fields":null,"inputFields":[{"name":"service","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AuditEventService","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"entityId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"entity","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AuditEventEntity","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"payload","description":null,"type":{"kind":"SCALAR","name":"AWSJSON","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"AuditEventService","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"FORM_SERVICE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"Banner","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"url","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"BannerType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"thumbnail","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"visible","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"BannerType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"VIDEO","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SCORM","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"HYPERLINK","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"BooleanFilter","description":null,"fields":null,"inputFields":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"values","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DataType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Breakdown","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"figures","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"partition","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"BreakdownInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"figures","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"partition","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"BreakdownQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"questions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"QuestionUnion","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"reportedBreakdown","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Breakdown","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"BuildEnergyRatingType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"DEC","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EPC","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"BuildingEnergyRating","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"A","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"B","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"C","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"D","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"E","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"F","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"G","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"BuildingEnergyRatingRow","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"heatingFuelType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"nominatedDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dataProvider","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rating","description":null,"args":[],"type":{"kind":"ENUM","name":"BuildingEnergyRating","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"score","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buildingEnvironment","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"gia","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"issueDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"certificateValidTo","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"certificateReferenceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"resurveyed","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"comments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"BuildEnergyRatingType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"block","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"BuildingEnergyRatingsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"BuildingEnergyRatingRow","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"BuildingType","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"BulkEstatesConfigurationInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"estatesConfigurations","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateEstatesConfigurationInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"BulkGasCompositionInput","description":null,"fields":null,"inputFields":[{"name":"assetId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"higherHeatingValue","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"higherHeatingUnit","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"o2MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"n2MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"co2MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"h2MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"h2sMolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ch4MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"c2h6MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"c3h8MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"c4h10MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"c5h12MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"c6h14MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"c7h16MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"c8h18MolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"c9PlusMolePercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"BulkUpdateExclusionInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userIds","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"courseId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"operation","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"BulkUpdateExclusionOperation","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"BulkUpdateExclusionOperation","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ADD","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REMOVE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"BuyProductsInput","description":null,"fields":null,"inputFields":[{"name":"items","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"paymentMethod","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"couponId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"BuySubscriptionInput","description":null,"fields":null,"inputFields":[{"name":"items","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"paymentMethod","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"couponId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INTERFACE","name":"CarbonConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fromUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"toUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"CarbonConversionFactorType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"note","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"EnergyCarbonConversionFactor","ofType":null},{"kind":"OBJECT","name":"TransportConversionFactor","ofType":null},{"kind":"OBJECT","name":"WasteCarbonConversionFactor","ofType":null}]},{"kind":"ENUM","name":"CarbonConversionFactorType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ELECTRICITY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIALS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INTERFACE","name":"Chapter","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"number","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"synopsis","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"chapters","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ManagementSystemChapter","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"content","description":null,"args":[],"type":{"kind":"OBJECT","name":"ManagementSystemPageContent","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"ManagementSystemChapter","ofType":null}]},{"kind":"OBJECT","name":"ChoiceQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"variants","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"canSpecifyOwnChoice","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportedChoice","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Code","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"code","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ColumnMapper","description":null,"fields":[{"name":"mappings","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Mapping","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"ColumnMapperInput","description":null,"fields":null,"inputFields":[{"name":"mappings","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"MappingInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ColumnSplitter","description":null,"fields":[{"name":"quantity","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"OBJECT","name":"DateColumnSplitter","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ContainerSize","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"volume","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"volumeUnit","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"weight","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"weightUnit","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ContainerType","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"sizes","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ContainerSize","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ContainerTypeSizePage","description":null,"fields":[{"name":"count","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasNextPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasPreviousPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isFirstPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isLastPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"totalItemCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"typeSizes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"Page","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ContractorsPage","description":null,"fields":[{"name":"count","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasNextPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasPreviousPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isFirstPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isLastPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"totalItemCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"wasteContractors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteContractor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"Page","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Country","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"numericCode","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"alpha2Code","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Course","description":null,"fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"metaData","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"CourseMetaData","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"userCourseMetaData","description":null,"args":[{"name":"userId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"UserCourseMetaData","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"assessment","description":null,"args":[],"type":{"kind":"OBJECT","name":"Evaluation","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"Evaluation","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"licence","description":null,"args":[],"type":{"kind":"OBJECT","name":"Licence","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isEngage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"bundleIdList","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"CourseCategory","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"WASTE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ENERGY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ENVIRONMENTAL_SOCIAL_GOVERNANCE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CIRCULAR_ECONOMY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"HEALTH_AND_SAFETY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"HEALTH_AND_WELLBEING","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"CourseMetaData","description":null,"fields":[{"name":"link","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"viewed","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"thumbnail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"cpd","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"passScore","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"categories","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"CourseCategory","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"isEngage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"openIframe","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"url","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"timeToComplete","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":true,"deprecationReason":"Not used"},{"name":"progress","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":true,"deprecationReason":"Not used"},{"name":"duration","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":true,"deprecationReason":"Not used"},{"name":"views","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":true,"deprecationReason":"Not used"},{"name":"size","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":true,"deprecationReason":"Not used"},{"name":"highQualityLink","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":true,"deprecationReason":"Not used"},{"name":"lowQualityLink","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":true,"deprecationReason":"Not used"},{"name":"downloadLink","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":true,"deprecationReason":"Not used"}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"CourseProgress","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"NOTSTARTED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INPROGRESS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"COMPLETE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"CreateAddressBatchResponse","description":null,"fields":[{"name":"success","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Address","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"errors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"CreateContainerTypeInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"volume","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"volumeUnitId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"weight","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"weightUnitId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"CreateDocumentFolderInput","description":null,"fields":null,"inputFields":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"CreateDocumentRecordInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"key","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"supplierId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"referenceId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"library","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DocumentLibrary","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"reviewDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"managementSystemCode","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"managementSystemId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"managementSystemChapterId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"source","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Source","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"link","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"reviewDateStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"folderId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"expirationDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"CreateEstatesConfigurationInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"forecastYear","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"cityStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tenure","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tenureStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"floorSpace","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"floorSpaceStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationStartDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationStartDateStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationBreakDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationBreakDateStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationEndDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationEndDateStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesCondition","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesConditionStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesStatComp","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesStatCompStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesEpc","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesEpcStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesGovSystem","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesGovSystemStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationYearPropertyMilestone","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationYearPropertyMilestoneStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"estateChange","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"estateChangeStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountDesnz","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountDesnzStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountIcs","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountIcsStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountGbe","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountGbeStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountSeahorse","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountSeahorseStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountDsit","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountDsitStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountUksa","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountUksaStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountFacilitated","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountFacilitatedStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountVoid","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountVoidStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsRequired","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsRequiredStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsFacilitated","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsFacilitatedStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsVoid","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsVoidStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceFacilitated","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceFacilitatedStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceActual","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceActualStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerDesk","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerDeskStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerHeadcount","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerHeadcountStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"source","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sourceStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"capitalInvestmentCostFitOut","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"capitalInvestmentCostFitOutStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dilaps","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dilapsStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityTotalCheck","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityTotalCheckStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"CreateEvaluationInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"EvaluationType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"questions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"QuestionInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scale","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"ScaleInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"CreateGasCompositionInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"gasCompositions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"BulkGasCompositionInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"CreateLicenceInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"productId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"CreateNormalisersErrors","description":null,"fields":[{"name":"errors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"UNION","name":"CreateNormalisersResponse","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"Normalisers","ofType":null},{"kind":"OBJECT","name":"CreateNormalisersErrors","ofType":null}]},{"kind":"INPUT_OBJECT","name":"CreateTagInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"applicationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isSystemLevelTag","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"legislationTag","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"CreateTargetErrors","description":null,"fields":[{"name":"errors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"UNION","name":"CreateTargetResponse","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"Target","ofType":null},{"kind":"OBJECT","name":"CreateTargetErrors","ofType":null}]},{"kind":"INPUT_OBJECT","name":"CreateTranspositionInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"transpositionName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"columnMapper","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"ColumnMapperInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"CreateUserInput","description":null,"fields":null,"inputFields":[{"name":"username","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"password","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"roles","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UserRole","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"first_name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"last_name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"account_id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accessLevel","description":null,"type":{"kind":"ENUM","name":"Scope","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"allowedLocationsIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"allowedTagsIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"jobTitle","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"department","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"phone","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"mobile","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"profilePicture","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"disableAccountSelector","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userGroupId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"CreateUsersResponse","description":null,"fields":[{"name":"success","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"errors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Dashboard","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"area","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DashboardArea","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"provider","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DashboardProvider","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"providerDashboardId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"thumbnailType","description":null,"args":[],"type":{"kind":"ENUM","name":"ThumbnailType","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"thumbnailUrl","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"sheets","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DashboardSheet","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"DashboardArea","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"LEARN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"COMPLY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DATA","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SURVEY","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"DashboardFilter","description":null,"fields":[{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DashboardFilterType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"label","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"defaultValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"relativeDateDefault","description":null,"args":[],"type":{"kind":"ENUM","name":"RelativeDateDefault","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isHidden","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dataset","description":null,"args":[],"type":{"kind":"OBJECT","name":"DashboardFilterDataset","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DashboardFilterDataset","description":null,"fields":[{"name":"datasetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"columnName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DashboardFilterDatasetInput","description":null,"fields":null,"inputFields":[{"name":"datasetName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"columnName","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DashboardFilterInput","description":null,"fields":null,"inputFields":[{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DashboardFilterType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"label","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"defaultValue","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"relativeDateDefault","description":null,"type":{"kind":"ENUM","name":"RelativeDateDefault","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isHidden","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dataset","description":null,"type":{"kind":"INPUT_OBJECT","name":"DashboardFilterDatasetInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"DashboardFilterType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"FROM_DATE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TO_DATE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"YEAR_1","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"YEAR_2","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PERIOD_1","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PERIOD_2","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"STANDALONE_YEAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LOCATION_OCCUPATION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTUAL_OR_ESTIMATED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LOCATIONS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TAGS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DEPARTMENTS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"COUNTRIES","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REGIONS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"METERS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SCOPES","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SOURCES","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"UNITS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIALS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_TYPES","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PURPOSES_OF_TRAVEL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_TYPES","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LOCATION_CUSTOM_ATTRIBUTES","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_STREAMS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_CONTRACTORS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_CARRIERS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PROJECT_PHASES","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BUSINESS_UNIT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_IN_OUT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"UPLOAD_REFERENCES","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DashboardInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"area","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DashboardArea","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"provider","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DashboardProvider","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"providerDashboardId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"thumbnailType","description":null,"type":{"kind":"ENUM","name":"ThumbnailType","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sheets","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DashboardSheetInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"DashboardProvider","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"QUICKSIGHT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CUSTOM","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"DashboardSheet","description":null,"fields":[{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DashboardFilter","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"tiles","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DashboardTile","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"units","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"withCarbonComponents","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"withVat","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DashboardSheetInput","description":null,"fields":null,"inputFields":[{"name":"title","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DashboardFilterInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tiles","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DashboardTileInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"units","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"withCarbonComponents","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"withVat","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DashboardSubscriptionInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"subscriptions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DashboardTile","description":null,"fields":[{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DashboardTileType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"colSpan","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rowSpan","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"colors","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DashboardTileData","description":null,"fields":[{"name":"dataPoints","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataPoint","ofType":null}}}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DashboardTileInput","description":null,"fields":null,"inputFields":[{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DashboardTileType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"colSpan","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"rowSpan","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"DashboardTileType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"SECTION_TITLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ELECTRICITY_CONSUMPTION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ELECTRICITY_CONSUMPTION_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ELECTRICITY_COST","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ELECTRICITY_COST_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ELECTRICITY_GROSS_CARBON_EMISSIONS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ELECTRICITY_GROSS_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ELECTRICITY_NET_CARBON_EMISSIONS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ELECTRICITY_NET_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"AVERAGE_ELECTRICITY_CHARGE_PER_KILOWATT_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"AVERAGE_ELECTRICITY_CHARGE_PER_KILOWATT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"AVERAGE_ELECTRICITY_CHARGE_PER_KILOWATT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_CONSUMPTION_BY_LOCATION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_CONSUMPTION_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_CONSUMPTION_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_CONSUMPTION_BY_COUNTRY_AND_SCOPE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_COST_AND_CONSUPMTION_OVER_TIME","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_GROSS_CARBON_EMISSIONS_BY_SCOPE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_GROSS_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_GROSS_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_NET_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY_NET_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_CARBON_EMISSIONS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_CARBON_COST_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_SCOPE_PIE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_SOURCE_BAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_SCOPE_AND_SOURCE_TABLE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_DATA_TYPE_BAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_WTT_AND_TD_EMISSIONS_BY_SOURCE_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_SCOPE_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_COST_BY_SCOPE_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_RESOURCE_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_COST_BY_RESOURCE_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_SCOPE_FOR_PERIOD_1_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_SCOPE_FOR_PERIOD_2_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_SOURCE_FOR_PERIOD_1_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_SOURCE_FOR_PERIOD_2_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"RESOURCES_USED_BY_SCOPE_TABLE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"RESOURCES_USED_BY_LOCATION_TABLE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PROPORTION_OF_ACT_VS_EST_PIE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"QUANTITY_AND_CO2E_BY_LOCATION_AND_METER_TABLE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_COUNTRY_BAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_COUNTRY_AND_SCOPE_TABLE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_COUNTRY_MAP","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOP_CARBON_EMISSIONS_BY_COUNTRY_TABLE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOP_3_CARBON_EMISSION_COUNTRIES_TABLE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BOTTOM_3_CARBON_EMISSION_COUNTRIES_TABLE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ENERGY_CONSUMPTION_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ENERGY_GROSS_CARBON_EMISSIONS_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ENERGY_NET_CARBON_EMISSIONS_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ENERGY_COST_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ENERGY_COST_AND_CONSUMPTION_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ENERGY_CARBON_EMISSIONS_BY_SCOPE_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ENERGY_CONSUMPTION_PER_LOCATION_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ENERGY_CONSUMPTION_BY_SCOPE_AND_TARIFF_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ENERGY_CONSUMPTION_YEAR_ON_YEAR_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ENERGY_COST_YEAR_ON_YEAR_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ENERGY_GROSS_CARBON_EMISSIONS_YEAR_ON_YEAR_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_ENERGY_NET_CARBON_EMISSIONS_YEAR_ON_YEAR_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MONTHLY_ENERGY_CONSUMPTION_YEAR_ON_YEAR_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ANNUAL_ENERGY_FIGURES_PER_LOCATION_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_WASTE_WEIGHT_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_WASTE_COST_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_WASTE_CARBON_EMISSIONS_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PERCENTAGE_DIVERTED_FROM_DISPOSAL_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_AND_WEIGHT_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_HIERARCHY_BY_TYPE_DONUT_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_CARBON_EMISSIONS_BY_SCOPE_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_BY_WASTE_STREAM_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_CONSUMPTION_BY_LOCATION_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_WASTE_WEIGHT_YEAR_ON_YEAR_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_WASTE_CARBON_EMISSIONS_YEAR_ON_YEAR_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_WASTE_COST_YEAR_ON_YEAR_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TOTAL_WASTE_COST_PER_TONNAGE_YEAR_ON_YEAR_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ANNUAL_WASTE_GENERATION_AND_COST_PER_LOCATION_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MONTHLY_WASTE_GENERATION_YEAR_ON_YEAR_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MONTHLY_WASTE_GENERATION_AND_COST_YEAR_ON_YEAR_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_WEIGHT_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_BY_WASTE_STREAM_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_STREAM_COST_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_WEIGHT_OVER_TIME_BY_WASTE_STREAM_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_OVER_TIME_BY_WASTE_STREAM_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_WEIGHT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_WEIGHT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_WEIGHT_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_CARBON_EMISSIONS_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_WEIGHT_BY_TREATMENT_PROCESS_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_CARBON_EMISSIONS_BY_TREATMENT_PROCESS_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_PER_TONNAGE_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_PER_TONNAGE_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_PER_TONNAGE_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_BY_TREATMENT_PROCESS_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_COST_PER_TONNAGE_BY_TREATMENT_PROCESS_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_DISPOSAL_PERCENTAGE_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_RECYCING_PERCENTAGE_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_DISPOSAL_PERCENTAGE_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_RECYCING_PERCENTAGE_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_DISPOSAL_PERCENTAGE_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_RECYCING_PERCENTAGE_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_DISPOSAL_PERCENTAGE_BY_WASTE_STREAM_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_RECYCING_PERCENTAGE_BY_WASTE_STREAM_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_DISPOSAL_PERCENTAGE_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_RECYCLING_PERCENTAGE_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_REUSE_PERCENTAGE_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_OTHER_RECOVERY_PERCENTAGE_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_REUSE_PERCENTAGE_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_OTHER_RECOVERY_PERCENTAGE_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_REUSE_PERCENTAGE_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_OTHER_RECOVERY_PERCENTAGE_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_REUSE_PERCENTAGE_BY_WASTE_STREAM_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE_OTHER_RECOVERY_PERCENTAGE_BY_WASTE_STREAM_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_CONSUMPTION_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_CONSUMPTION_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_CONSUMPTION_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_COST_AND_CONSUMPTION_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_COST_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_AVERAGE_CHARGE_PER_KILOWATT_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_AVERAGE_CHARGE_PER_KILOWATT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS_AVERAGE_CHARGE_PER_KILOWATT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_CONSUMPTION_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_CONSUMPTION_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_CONSUMPTION_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_COST_AND_CONSUMPTION_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_COST_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_AVERAGE_CHARGE_PER_KILOWATT_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_AVERAGE_CHARGE_PER_KILOWATT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL_AVERAGE_CHARGE_PER_KILOWATT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_CONSUMPTION_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_CONSUMPTION_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_CONSUMPTION_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_COST_AND_CONSUMPTION_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_COST_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_AVERAGE_CHARGE_PER_KILOWATT_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_AVERAGE_CHARGE_PER_KILOWATT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_AVERAGE_CHARGE_PER_KILOWATT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_WEIGHT_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_WEIGHT_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_WEIGHT_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_WEIGHT_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_CARBON_EMISSIONS_BY_CONTRACTOR_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_WEIGHT_BY_TYPE_AND_ORIGIN_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_CARBON_EMISSIONS_BY_TYPE_AND_ORIGIN_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_WEIGHT_AND_CONSUMPTION_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_COST_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_COST_PER_WEIGHT_EMISSIONS_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_COST_PER_WEIGHT_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_COST_PER_WEIGHT_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_CARBON_EMISSIONS_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_COST_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_COST_AND_CARBON_EMISSIONS_BY_LOCATION_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIAL_CARBON_EMISSIONS_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_AMOUNT_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_AMOUNT_BY_MATERIAL_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_AMOUNT_BY_PURCHASE_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_AMOUNT_BY_SUPPLIER_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_AMOUNT_BY_SUPPLIER_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_AMOUNT_BY_MATERIAL_TYPE_WITH_LAYERS_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_AMOUNT_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_AMOUNT_AND_CARBON_BY_LOCATION_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_CARBON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_CARBON_BY_MATERIAL_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_CARBON_BY_PURCHASE_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_CARBON_BY_SUPPLIER_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_CARBON_BY_SUPPLIER_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SPEND_BASED_MATERIAL_CARBON_BY_MATERIAL_TYPE_WITH_LAYERS_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_WEIGHT_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_WEIGHT_BY_MATERIAL_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_WEIGHT_BY_PURCHASE_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_WEIGHT_BY_SUBCONTRACTOR_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_WEIGHT_BY_SUBCONTRACTOR_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_WEIGHT_BY_MATERIAL_TYPE_WITH_LAYERS_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_WEIGHT_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_WEIGHT_AND_CARBON_BY_LOCATION_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_CARBON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_CARBON_BY_MATERIAL_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_CARBON_BY_PURCHASE_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_CARBON_BY_SUBCONTRACTOR_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_CARBON_BY_SUBCONTRACTOR_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVITY_BASED_MATERIAL_CARBON_BY_MATERIAL_TYPE_WITH_LAYERS_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GENERAL_MATERIAL_WEIGHT_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GENERAL_MATERIAL_CARBON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GENERAL_MATERIAL_WEIGHT_BY_MATERIAL_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GENERAL_MATERIAL_CARBON_BY_MATERIAL_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GENERAL_MATERIAL_WEIGHT_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GENERAL_MATERIAL_WEIGHT_AND_CARBON_BY_LOCATION_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_CARBON_EMISSIONS_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_COST_PERIOD_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_CARBON_EMISSIONS_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_COST_BY_LOCATION_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_CARBON_EMISSIONS_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_COST_BY_TAG_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_CARBON_EMISSIONS_BY_TRANSPORT_TYPE_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_COST_BY_TRANSPORT_TYPE_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_CARBON_EMISSIONS_BY_FUEL_TYPE_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_COST_BY_FUEL_TYPE_PERIOD_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_EMISSIONS_AND_COST_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ESTATES_REPORT_GRID_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SCOPE_1_CARBON_SAVINGS_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"AVERAGE_FLARING_FROM_UPSTREAM_OPERATIONS_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FLARING_INTENSITY_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CURRENT_YEAR_CARBON_INTENSITY_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PAST_YEAR_CARBON_INTENSITY_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_INTENSITY_REDUCTION_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PAST_YEAR_EMISSIONS_BY_SCOPE_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CURRENT_YEAR_EMISSIONS_BY_SCOPE_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_EMISSIONS_BY_SCOPE_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SCOPE_1_CARBON_SAVINGS_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_INTENSITY_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CARBON_INTENSITY_REDUCTION_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"AVERAGE_FLARING_FROM_UPSTREAM_OPERATIONS_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FLARING_INTENSITY_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_WITHDRAWAL_PERCENTAGE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_DISCHARGE_PERCENTAGE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_WITHDRAWAL_PERCENTAGE_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_DISCHARGE_PERCENTAGE_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BOARD_ATTENDANCE_RATE_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BOARD_FEMALE_REPRESENTATION_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EXECUTIVE_FEMALE_REPRESENTATION_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BOARD_ATTENDANCE_RATE_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BOARD_FEMALE_REPRESENTATION_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EXECUTIVE_FEMALE_REPRESENTATION_OVER_TIME_LINE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_TOTAL_CONSUMPTION_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_TOTAL_TREATMENT_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_TOTAL_COST_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_TOTAL_EMISSIONS_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_COST_CONSUMPTION_TREATMENT_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_CARBON_EMISSIONS_BY_SCOPE_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_COST_CONSUMPTION_EMISSIONS_PER_LOCATION_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_CONSUMPTION_YEAR_ON_YEAR_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_EMISSIONS_YEAR_ON_YEAR_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_COST_YEAR_ON_YEAR_COMPARISON_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_ANNUAL_CONSUMPTION_OVER_TIME_COMPARISON_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_COST_CONSUMPTION_EMISSIONS_PER_LOCATION_COMPARISON_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_TOTAL_DISTANCE_TRAVELED_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_TOTAL_COST_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_TOTAL_EMISSIONS_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_EMISSIONS_PER_LOCATION_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_EMISSIONS_PER_PURPOSE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_EMISSIONS_PER_TYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_EMISSIONS_PER_SUBTYPE_PIE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_TRAVEL_ACTIVITY_PER_LOCATION_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_TOTAL_DISTANCE_TRAVELED_YEAR_ON_YEAR_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_TOTAL_EMISSIONS_YEAR_ON_YEAR_KPI_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_CARBON_OVER_TIME_YEAR_ON_YEAR_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_CARBON_AND_DISTANCE_TRAVELED_OVER_TIME_BAR_TILE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT_ANNUAL_FIGURES_PER_LOCATION_YEAR_ON_YEAR_TABLE_TILE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"DataAccessControls","description":null,"fields":[{"name":"waste","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"electricity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gas","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"water","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materials","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuel","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transport","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"refrigerants","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"heatSteam","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"buildingEnergyRatings","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hotelStays","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"investment","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scope3ActivityBasedMaterials","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope3SpendBasedMaterials","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coreEstate","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"oilAndGas","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"insite","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DataAccessControlsInput","description":null,"fields":null,"inputFields":[{"name":"waste","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"electricity","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"gas","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"water","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"materials","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fuel","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"transport","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"refrigerants","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"heatSteam","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"buildingEnergyRatings","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"hotelStays","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"investment","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"oilProduction","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"salesData","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"liquidFuels","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scope3SpendBasedMaterials","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scope3ActivityBasedMaterials","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"coreEstate","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"oilAndGas","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"insite","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INTERFACE","name":"DataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"ElectricityDataAnomaly","ofType":null},{"kind":"OBJECT","name":"FuelDataAnomaly","ofType":null},{"kind":"OBJECT","name":"GasDataAnomaly","ofType":null},{"kind":"OBJECT","name":"HeatAndSteamDataAnomaly","ofType":null},{"kind":"OBJECT","name":"HotelStayDataAnomaly","ofType":null},{"kind":"OBJECT","name":"MaterialDataAnomaly","ofType":null},{"kind":"OBJECT","name":"RefrigerantDataAnomaly","ofType":null},{"kind":"OBJECT","name":"TransportDataAnomaly","ofType":null},{"kind":"OBJECT","name":"WasteDataAnomaly","ofType":null},{"kind":"OBJECT","name":"WaterDataAnomaly","ofType":null}]},{"kind":"UNION","name":"DataAnomalyItem","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"ElectricityDataAnomaly","ofType":null},{"kind":"OBJECT","name":"GasDataAnomaly","ofType":null},{"kind":"OBJECT","name":"HeatAndSteamDataAnomaly","ofType":null},{"kind":"OBJECT","name":"WaterDataAnomaly","ofType":null},{"kind":"OBJECT","name":"WasteDataAnomaly","ofType":null},{"kind":"OBJECT","name":"FuelDataAnomaly","ofType":null},{"kind":"OBJECT","name":"MaterialDataAnomaly","ofType":null},{"kind":"OBJECT","name":"HotelStayDataAnomaly","ofType":null},{"kind":"OBJECT","name":"RefrigerantDataAnomaly","ofType":null},{"kind":"OBJECT","name":"TransportDataAnomaly","ofType":null}]},{"kind":"OBJECT","name":"DataAnomalyPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"DataAnomalyItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataImportBatch","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"failedReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rowsUploaded","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalRowsExpected","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rollbackUser","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"timeStamp","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"lastUpdated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"errors","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportError","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"errorsCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isLegacy","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importType","description":null,"args":[],"type":{"kind":"ENUM","name":"ImportType","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"approved","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transposition","description":null,"args":[],"type":{"kind":"OBJECT","name":"Transposition","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"externalActionUrl","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"anomaliesCount","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rollbackReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"anomalyCount","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isOverwriting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataImportBatchGridPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataImportBatchPage","description":null,"fields":[{"name":"count","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasNextPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasPreviousPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isFirstPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isLastPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"totalItemCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"batches","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"Page","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataImportError","description":null,"fields":[{"name":"message","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fieldName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"recordUniqueId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"actionRequired","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"possibleAliases","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataOverwritingKeyMapping","description":null,"fields":[{"name":"key","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"label","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataOverwritingStrategy","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DataOverwritingStrategyStatus","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"statusExplanation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"statusProgress","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"key","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"batchType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"batchId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfRowsAnalyzing","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfRowsAfterMerge","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfDuplicatesFound","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfBatchesWithDuplicates","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"overwritingNeeded","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"batchesSuitableForOverwriting","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TransactionImportBatchOverview","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"mergedFileS3Key","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"mergedFileUrl","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdBy","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"lastUpdatedAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scheduledExecutionAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scheduledExecutionBy","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"executedAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"executionError","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"executionCloudWatchLogGroup","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"DataOverwritingStrategyStatus","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"INITIATED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ANALYZING","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MERGING","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"USER_REVIEW","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CANCELLED_BY_USER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EXECUTION_SCHEDULED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EXECUTED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FAILED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ABORTED","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"DataPoint","description":null,"fields":[{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dimension","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataQualityBreakdownItem","description":null,"fields":[{"name":"utility","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dataQuality","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dataCompleteness","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataQualityPercentage","description":null,"fields":[{"name":"overallDataQuality","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"overallDataCompleteness","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dataQualityBreakdown","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataQualityBreakdownItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataTrackerConfig","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"supplier","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Supplier","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"frequency","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Frequency","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"recurrence","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"meters","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergySource","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DataTrackerConfigInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"supplierId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"frequency","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Frequency","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"recurrence","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationIds","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"metersIds","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataTrackerConfigsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataTrackerConfig","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataTrackerValidationResult","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dataTrackerConfigId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"supplierName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"meters","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"utility","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"validationType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DataTrackerValidationType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isIgnored","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"note","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"frequency","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Frequency","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DataTrackerValidationResultInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"note","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isIgnored","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DataTrackerValidationResultsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"DataTrackerValidationResult","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"DataTrackerValidationType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"FREQUENCY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"RECURRENCE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"DataType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"text","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"number","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"set","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"boolean","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DatasetFilters","description":null,"fields":null,"inputFields":[{"name":"from","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"to","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"year1","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"year2","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"period1","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"period2","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"standaloneYear","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"meters","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"countries","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"regions","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"actualOrEstimated","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationOccupation","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scopes","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sources","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"units","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteStreams","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteContractors","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteCarriers","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"projectPhases","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"materials","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"transportTypes","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fuelTypes","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"businessUnit","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"waterInOut","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"uploadReferences","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"purposesOfTravel","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DatasetRefreshLogRecord","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"datasetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"timestamp","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"trigger","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DatasetRefreshTrigger","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DatasetRefreshStatus","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"error","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"DatasetRefreshStatus","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"SKIPPED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SCHEDULED_FOR_REFRESH","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SCHEDULING_FAILED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REFRESHING","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REFRESHED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REFRESH_FAILED","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"DatasetRefreshTrigger","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"BATCH_IMPORTED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BATCH_ROLLED_BACK","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PERIODIC_REFRESH","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"DateColumnSplitter","description":null,"fields":[{"name":"columnName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"start","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"end","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startTime","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endTime","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DateFilter","description":null,"fields":null,"inputFields":[{"name":"field","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"ENUM","name":"FilterStrategy","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DataType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dateFrom","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dateTo","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"condition1","description":null,"type":{"kind":"INPUT_OBJECT","name":"DateFilter","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"condition2","description":null,"type":{"kind":"INPUT_OBJECT","name":"DateFilter","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"conditions","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DateFilter","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"operator","description":null,"type":{"kind":"ENUM","name":"JoinOperator","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DateQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportedDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"DeleteTranspositionInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"DiscountType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"percentage","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"fixed","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"DocumentArea","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"CONSIGNMENTNOTE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CONSIGNMENTNOTEEA","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTETRANSFERNOTE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SALESORDER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EVIDENCE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTEPERMIT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTECARRIERLICENCE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTECONTRACTORREPORT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRAVELRECEIPT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"AUDITREPORT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ASPECTSANDIMPACTS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CERTIFICATE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"COMMUNICATIONS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LEGISLATION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MANAGEMENTSYSTEMS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"POLICIES","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REPORTINGFRAMEWORKS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"STANDARDS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRAINING","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LCAREPORTS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BILL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LICENCESANDPERMITS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INVOICE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"OTHER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"METERREADING","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SUPPLIERAGREEMENT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FORMUPLOAD","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CUSTOM","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"DocumentFolder","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"empty","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parent","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"DocumentLibrary","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"WASTE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GOVERNANCE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INVEST","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CUSTOM","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"DocumentRecord","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"link","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"key","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"source","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Source","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"documentArea","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DocumentArea","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"library","description":null,"args":[],"type":{"kind":"ENUM","name":"DocumentLibrary","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reviewDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reviewDateStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"supplierId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"supplierName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"referenceId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"antivirusStatus","description":null,"args":[],"type":{"kind":"ENUM","name":"AntivirusStatus","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"managementSystemCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"managementSystemId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"managementSystemChapterId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createdBy","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdByName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"updatedAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"updatedBy","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"updatedByName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Tag","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"folderId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"folders","description":null,"args":[],"type":{"kind":"OBJECT","name":"DocumentRecordFoldersPath","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"expirationDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DocumentRecordFoldersPath","description":null,"fields":[{"name":"parent","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"child","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"DocumentsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EWC","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"code","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hazardous","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"editable","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ElectricityConsumptionDataPoint","description":null,"fields":[{"name":"time","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"ElectricityConsumptionTimeGranularity","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"TOTAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MONTH","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"HALF_HOUR","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"ElectricityConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"genKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tdKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttGenKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttTdKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttTradeKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"genKgCo2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tdKgCo2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttGenKgCo2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttTdKgCo2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttTradeKgCo2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"genKgCh4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tdKgCh4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttGenKgCh4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttTdKgCh4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttTradeKgCh4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"genKgN2o","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tdKgN2o","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttGenKgN2o","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttTdKgN2o","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttTradeKgN2o","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ElectricityConversionFactorPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ElectricityConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ElectricityDataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"ElectricityTransactionPageItem","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"DataAnomaly","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ElectricityTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ElectricityTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ElectricityTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"chargePerKilowatt","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tariff","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tariffId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"supplier","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startTime","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endTime","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reading","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"quantity","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"ENUM","name":"Accuracy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCostVat","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"comment","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"energySource","description":null,"args":[],"type":{"kind":"OBJECT","name":"EnergySource","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"activity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgCO2Scope2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgCO2Scope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgCH4Scope2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgCH4Scope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgN2OScope2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgN2OScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"marketBasedCarbonScope2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"marketBasedCarbonScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tdScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttGenScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttTdScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYearOfFactors","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"factorsArePrivate","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"EmailInput","description":null,"fields":null,"inputFields":[{"name":"external","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"replacements","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EmissionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"factorKey","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"sourceName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"factorYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountingMethod","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"emissionSource","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"emissionSourceType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"subtype1","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"subtype2","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"subtype3","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fromUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fromUnitToStandardUnitConversionFactor","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"toGhgUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"method","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accountName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope1Emissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope2Emissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope3Emissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"EmissionFactorInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sourceName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"factorYear","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountingMethod","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"emissionSource","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"emissionSourceType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"subtype1","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"subtype2","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"subtype3","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fromUnit","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fromUnitToStandardUnitConversionFactor","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"toGhgUnit","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"method","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scope1Emissions","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scope2Emissions","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scope3Emissions","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"deprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EmissionFactorPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EmissionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EmissionsDatabasePage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EmissionsDatabasePageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"datasetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EmissionsDatabasePageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"recordNo","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"platforms","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"releaseValves","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dateOfEntryIntoDatabase","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dataEntryByName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"recordDataDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetField","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"typeOfFuelConsumption","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"units","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"oilProductionBbl","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasProductionKscf","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasExportKscf","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasInjectionKscf","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasImport","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasInjected","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasKscf","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"flareGasKscf","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fuelUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"quantityConsumed","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"operationalControl","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"mboeAllPerDay","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"mboeGasPerDay","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasCO2eT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasCO2T","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasCH4T","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasN2OT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"flareCO2eT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"flareCO2T","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"flareCH4T","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"flareN2OT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ventingCO2eT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ventingCH4T","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"liqFCO2eT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"liqFCO2EmissionsT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"liqFCH4EmissionsCO2","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"liqFN2OEmissionsT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"liqFCH4EmissionsT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"liqFN2OEmissionsTonnesN2O","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fugitiveCO2e","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fugitiveCH4T","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasCompositionRecordUsed","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"naturalGasSalesVolume","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"crudeOilSalesVolume","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"naturalGasSalesVolumeUnit","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"soldProductsCO2eT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"soldProductsCO2T","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"soldProductsCH4T","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"soldProductsN2OT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ghgScope1EmissionsT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ghgScope2EmissionsT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ghgScope3EmissionsT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"waterProductionBbl","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"prodWaterOverboardBwpd","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"oilInWaterPpm","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dataMarker","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"codeForCheckingNewDataEntry","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"monthAvWaterLimitPPM1","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"monthAverageLimitP65","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"oilDischargeBpd","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"noxT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"soxT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pm25T","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"coT","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EnergyCarbonConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fromUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"toUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"CarbonConversionFactorType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"note","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"CarbonConversionFactor","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EnergyIn","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dateCreated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"aliases","description":null,"args":[{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Alias","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"LocationPoint","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"EnergyInInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dateCreated","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EnergyOut","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dateCreated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"aliases","description":null,"args":[{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Alias","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"LocationPoint","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"EnergyOutInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dateCreated","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EnergySource","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationPoint","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergySourceLocationPoint","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"inOut","description":null,"args":[],"type":{"kind":"ENUM","name":"InOut","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isGeneration","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"meterCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"hardwareProviderName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"operatorProviderName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isDeleted","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyConsentRequestDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyConsentStatus","description":null,"args":[],"type":{"kind":"ENUM","name":"N3rgyConsentStatus","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyConsentErrorMessage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyIsIndirectSource","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isReadingMeter","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"initialReading","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EnergySourceBatchPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergySource","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"EnergySourceInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"typeId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"inOut","description":null,"type":{"kind":"ENUM","name":"InOut","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isGeneration","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"meterCode","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"hardwareProviderName","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"operatorProviderName","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyConsentStatus","description":null,"type":{"kind":"ENUM","name":"N3rgyConsentStatus","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyIsIndirectSource","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isReadingMeter","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"initialReading","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EnergySourceLocationPoint","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dateCreated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"aliases","description":null,"args":[{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Alias","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"LocationPoint","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EstatesConfiguration","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"city","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"forecastYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"cityStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tenure","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tenureStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"floorSpace","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"floorSpaceStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupationStartDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupationStartDateStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupationBreakDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupationBreakDateStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupationEndDateStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesCondition","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesConditionStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesStatComp","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesStatCompStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesEpc","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesEpcStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesGovSystem","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesGovSystemStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationYearPropertyMilestone","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationYearPropertyMilestoneStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estateChange","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estateChangeStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountDesnz","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountDesnzStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountIcs","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountIcsStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountGbe","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountGbeStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountSeahorse","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountSeahorseStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountDsit","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountDsitStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountUksa","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountUksaStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountTotal","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountTotalStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountFacilitated","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountFacilitatedStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountVoid","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountVoidStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsRequired","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsRequiredStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsFacilitated","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsFacilitatedStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsVoid","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsVoidStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceFacilitated","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceFacilitatedStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceActual","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceActualStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostNonRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostNonRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostTotal","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostTotalStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerDesk","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerDeskStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerHeadcount","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerHeadcountStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"source","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"sourceStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"capitalInvestmentCostFitOut","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"capitalInvestmentCostFitOutStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dilaps","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dilapsStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzNonRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzNonRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzTotal","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzTotalStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsNonRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsNonRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsTotal","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsTotalStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeNonRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeNonRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeTotal","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeTotalStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseNonRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseNonRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseTotal","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseTotalStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitNonRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitNonRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitTotal","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitTotalStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaNonRent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaNonRentStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaTotal","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaTotalStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityTotalCheck","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityTotalCheckStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"EstatesConfigurationPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EstatesConfiguration","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Evaluation","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"EvaluationType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"questions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Question","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"scale","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Scale","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"EvaluationType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ASSESSMENT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REACTION","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"ExportProgress","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transactionType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rowsProcessingProgress","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadProgress","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"exportStatus","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"ExportStatus","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"filename","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"errorMessage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"lastUpdatedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rowsProcessed","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ExportProgressPayload","description":null,"fields":[{"name":"items","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ExportProgress","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"ExportStatus","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"INITIATED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"IN_PROGRESS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"READY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"COMPLETED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FAILED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DELETED_BY_USER","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"FILTEREXPRESSION","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"GREATER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GREATEREQUAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LESS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LESSEQUAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EQUAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"NOTEQUAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"NONE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"FeatureToggles","description":null,"fields":[{"name":"enableGlobalEmissionFactors","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"FeatureTogglesInput","description":null,"fields":null,"inputFields":[{"name":"enableGlobalEmissionFactors","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"FilterData","description":null,"fields":[{"name":"label","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"FilterStrategy","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"equals","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"notEqual","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"lessThan","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"lessThanOrEqual","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"greaterThan","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"greaterThanOrEqual","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"contains","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"notContains","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"startsWith","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"endsWith","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"inRange","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"blank","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"notBlank","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"Filters","description":null,"fields":null,"inputFields":[{"name":"text","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"TextFilter","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"number","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"NumberFilter","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DateFilter","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"set","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SetFilter","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"search","description":null,"type":{"kind":"INPUT_OBJECT","name":"SearchFilter","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"boolean","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"BooleanFilter","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"FloatQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportedFloat","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Flow","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"progress","description":null,"args":[],"type":{"kind":"OBJECT","name":"Progress","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"thumbnailUrl","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalEstimate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"FlowSubscription","description":null,"fields":[{"name":"flow","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Flow","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"Frequency","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"Daily","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"Weekly","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"Monthly","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"Quarterly","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"Annually","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"FuelConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"unit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelActivity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"comKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttKgCO2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"comKgCo2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"comKgCh4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"comKgN20","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"gjGross","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"gjNet","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kWhGross","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kWhNet","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"densityKg","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"densityM3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"densityT","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"FuelConversionFactorPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FuelConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"FuelDataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"FuelTransactionPageItem","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"DataAnomaly","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"FuelTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FuelTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"FuelTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"quantity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"unit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"supplier","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fuelActivityName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope1","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionScope3WTT","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgCO2Scope1","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgCO2Scope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgCH4Scope1","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgCH4Scope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgN2OScope1","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgN2OScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"energyConsumption","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"activity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"comment","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Fund","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Code","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"externalId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"lastUpdatedAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deleted","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"FundFMV","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fundId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fundName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleted","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"FundFMVInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fundId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"deleted","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"FundFMVPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FundFMV","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"FundInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"currencyId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"externalId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"deleted","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"FundPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Fund","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GasComposition","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"higherHeatingValue","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"higherHeatingUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"components","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GasCompositionComponent","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"gasMolWt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelMixWtC","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"molCMol","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"co2MolFraction","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ch4MolFraction","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"boeConv","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GasCompositionComponent","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"component","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"compositionId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"molePercentage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"molecularWeight","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"weight","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"weightPercentage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"coefficientCarbon","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"weightPercentageCarbon","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"weightPercentageCarbonMixture","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"molCarbonMolGas","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"GasCompositionComponentInput","description":null,"fields":null,"inputFields":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"molePercentage","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GasCompositionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GasComposition","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GasCompositionUncertainty","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"co2MolMean","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"co2MolURel","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ch4MolMean","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ch4MolURel","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"molCMolGasMean","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"molCMolGasURel","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"mwMean","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"mwURel","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wtCMean","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wtCURel","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"boeConvMean","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updatedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GasCompositionUncertaintyPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GasCompositionUncertainty","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GasConversionFactorPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NaturalGasConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GasDataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"GasTransactionPageItem","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"DataAnomaly","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GasTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GasTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GasTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reading","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"quantity","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"ENUM","name":"Accuracy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCostVat","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"supplier","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"comment","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"energySource","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergySource","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"activity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope1","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionCO2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionN2O","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionCH4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYearOfFactors","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"GetAllDataInput","description":null,"fields":null,"inputFields":[{"name":"courseId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GetDatasetRefreshStatusResponse","description":null,"fields":[{"name":"lastRefresh","description":null,"args":[],"type":{"kind":"OBJECT","name":"DatasetRefreshLogRecord","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"current","description":null,"args":[],"type":{"kind":"OBJECT","name":"DatasetRefreshLogRecord","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GetEmissionsByScopeAndSourceResponse","description":null,"fields":[{"name":"totalNet","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalGross","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"emissions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ScopeSourceEmissions","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GetPossibleDataOverwritingKeysResponse","description":null,"fields":[{"name":"keys","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataOverwritingKeyMapping","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"defaultKey","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GetSuppliersPageResult","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Supplier","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"GetTagsByAccountIdInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"applicationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"GetTranspositionsInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"includeSystemLevel","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GetUserInfoByAccountIdResponse","description":null,"fields":[{"name":"users","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"paginationToken","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"GetValueInput","description":null,"fields":null,"inputFields":[{"name":"key","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"courseId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GovApiInfo","description":null,"fields":[{"name":"path","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"lastModified","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"GovApiInfoInput","description":null,"fields":null,"inputFields":[{"name":"path","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"lastModified","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"GovernanceAccessControls","description":null,"fields":[{"name":"legislation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"tagLevelLegislation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"policies","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"systems","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"targets","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"frameworks","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"agreements","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"GovernanceAccessControlsInput","description":null,"fields":null,"inputFields":[{"name":"legislation","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagLevelLegislation","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"policies","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"systems","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"targets","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"frameworks","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"agreements","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"GovernanceItemType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"LEGISLATION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"POLICY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MANAGEMENT_SYSTEM","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REPORTING_FRAMEWORK","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"VOLUNTARY_AGREEMENT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ASPECT","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"HazardousWasteTransactions","description":null,"fields":[{"name":"count","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"wasteTransactions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"WasteTransactionPageItem","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"HeatAndSteamDataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"HeatSteamTransactionPageItem","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"DataAnomaly","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"HeatConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"genKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tdKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttGenKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttTdKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"genKgCo2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tdKgCo2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"genKgCh4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tdKgCh4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"genKgN2o","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tdKgN2o","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"HeatConversionFactorPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"HeatConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"HeatSteamTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"HeatSteamTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"HeatSteamTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tariff","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tariffId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"supplier","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startTime","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endTime","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"quantity","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"ENUM","name":"Accuracy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCostVat","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"comment","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"energySource","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergySource","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"activity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionCO2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionN2O","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionCH4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"marketBasedCarbonScope2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"marketBasedCarbonScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYearOfFactors","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"HotelStayDataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"HotelStaysTransactionPageItem","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"DataAnomaly","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"HotelStaysConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"unit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"kgCO2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"HotelStaysConversionFactorPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"HotelStaysConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"HotelStaysTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"HotelStaysTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"HotelStaysTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hotelNights","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"homeWorkingDays","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uploadReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tariff","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dataProvider","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"ENUM","name":"Accuracy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYearOfHSFactors","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYearOfWFHFactors","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ImpactDashboardData","description":null,"fields":[{"name":"targetTotalEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"targetScopeBreakdown","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"PieChartData","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"targetEmissionsByScope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TimeSeriesDataPoint","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"targetEmissionsBySource","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TimeSeriesDataPoint","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"baselineTotalEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"baselineScopeBreakdown","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"PieChartData","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"baselineEmissionsByScope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TimeSeriesDataPoint","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"baselineEmissionsBySource","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TimeSeriesDataPoint","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"currentPeriodTotalEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currentPeriodScopeBreakdown","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"PieChartData","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"currentPeriodEmissionsByScope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TimeSeriesDataPoint","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"currentPeriodEmissionsBySource","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TimeSeriesDataPoint","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ImportLocationWithLocationPointsBatchResponse","description":null,"fields":[{"name":"success","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"errors","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ImportResult","description":null,"fields":[{"name":"created","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleted","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"ImportType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"File","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"Ftp","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"InOut","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"IN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"OUT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BOTH","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"InSiteBreeam","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"propertyId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"buildingId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"streetName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"town","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"localAuthority","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"latitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"longitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"easting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"northing","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coordinateReferenceSystem","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uprn","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"landArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"usage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ancientMonument","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specialScientificInterest","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentOrganisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userEmail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"securityClassification","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reasonForArchivingARecord","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"listedBuilding","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"constructionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buildingCondition","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buildingConditionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"breeamRating","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"breeamCertificateRefNo","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteBreeamsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteBreeam","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteDec","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"propertyId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"buildingId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"streetName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"town","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"localAuthority","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"latitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"longitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"easting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"northing","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coordinateReferenceSystem","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uprn","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"landArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"usage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ancientMonument","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specialScientificInterest","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentOrganisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userEmail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"securityClassification","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reasonForArchivingARecord","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"listedBuilding","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"constructionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buildingCondition","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buildingConditionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buildingRating","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"certificateReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"expiryDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"operationalRating","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"operatingRatingValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"certificateIssueDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"outOfScopeReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteDecsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteDec","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteDisposal","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"propertyId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"contractId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"streetName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"town","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"localAuthority","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"latitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"longitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"easting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"northing","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coordinateReferenceSystem","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uprn","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"landArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"usage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ancientMonument","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specialScientificInterest","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentOrganisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userEmail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"securityClassification","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reasonForArchivingARecord","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"acquisitionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"physicalConstraints","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"contractFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"contractFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"valueType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"valuationDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"capitalExpenditure","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"futureDisposalDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"futurePropertyDisposalValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"costMaintainingSurplusProperty","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"pfiEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"surplusStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"disposalDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"statusOfSale","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"datePropertyDisposalReceiptClaimed","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"disposalMethod","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"disposalProceeds","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"embargoPeriodStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reasonForPropertyDisposal","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalSurplusLandArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatedHousingCapacity","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteDisposalsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteDisposal","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteEpc","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"propertyId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"buildingId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"streetName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"town","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"localAuthority","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"latitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"longitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"easting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"northing","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coordinateReferenceSystem","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uprn","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"landArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"usage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ancientMonument","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specialScientificInterest","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentOrganisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userEmail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"securityClassification","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reasonForArchivingARecord","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"listedBuilding","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"constructionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buildingCondition","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buildingConditionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyRating","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyRatingValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"certificateReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"expiryDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"certificateIssueDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"outOfScopeReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteEpcsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteEpc","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteLandParcel","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"propertyId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"streetName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"town","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"localAuthority","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"latitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"longitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"easting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"northing","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coordinateReferenceSystem","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uprn","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"landArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"usage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ancientMonument","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specialScientificInterest","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentOrganisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userEmail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"securityClassification","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reasonForArchivingARecord","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"conservationArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"titleNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteLandParcelsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteLandParcel","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteLease","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"propertyId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"contractId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"streetName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"town","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"localAuthority","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"latitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"longitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"easting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"northing","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coordinateReferenceSystem","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uprn","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"landArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"usage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ancientMonument","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specialScientificInterest","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentOrganisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userEmail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"securityClassification","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reasonForArchivingARecord","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"acquisitionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"physicalConstraints","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"contractFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"contractFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"valueType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"valuationDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"capitalExpenditure","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"futureDisposalDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"futurePropertyDisposalValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"costMaintainingSurplusProperty","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"pfiEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"landlordName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"licence","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupancyAgreementExpiryDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"earliestLeaseOccupancyAgreementBreakDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"actualLeaseOccupancyAgreementBreakDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"leaseOccupancyAgreementBreakNoticeTerm","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupancyAgreementLastBreakDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupancyAgreementBreakPenalty","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postExpiryOccupancyAgreementStatus","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupancyPaymentFrequency","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rentReviewFrequency","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"repairLiability","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupancyAgreementReviewDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupancyAgreementStartDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteLeasesPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteLease","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteOccupancyFact","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"propertyId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"contractId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"streetName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"town","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"localAuthority","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"latitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"longitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"easting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"northing","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coordinateReferenceSystem","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uprn","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"landArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"usage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ancientMonument","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specialScientificInterest","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentOrganisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userEmail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"securityClassification","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reasonForArchivingARecord","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"acquisitionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"physicalConstraints","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"contractFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"contractFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"valueType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"valuationDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"capitalExpenditure","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"futureDisposalDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"futurePropertyDisposalValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"costMaintainingSurplusProperty","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"pfiEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupationId","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rates","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"unitaryCharge","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalOperationalCosts","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalPropertyCosts","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteOccupancyFactsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteOccupancyFact","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteOccupation","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"propertyId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"contractId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"streetName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"town","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"localAuthority","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"latitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"longitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"easting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"northing","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coordinateReferenceSystem","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uprn","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"landArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"usage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ancientMonument","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specialScientificInterest","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentOrganisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userEmail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"securityClassification","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reasonForArchivingARecord","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"acquisitionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"physicalConstraints","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"contractFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"contractFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"valueType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"valuationDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"capitalExpenditure","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"futureDisposalDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"futurePropertyDisposalValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"costMaintainingSurplusProperty","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"pfiEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tenure","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteOccupationsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteOccupation","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteVacantSpace","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"propertyId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"contractId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"primaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"secondaryPropertyNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"streetName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"town","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"localAuthority","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"latitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"longitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"easting","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"northing","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"coordinateReferenceSystem","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uprn","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"propertyFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"landArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"usage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ancientMonument","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specialScientificInterest","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentOrganisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userEmail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"securityClassification","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reasonForArchivingARecord","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"acquisitionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"physicalConstraints","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"contractFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"contractFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"valueType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"valuationDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"capitalExpenditure","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"futureDisposalDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"futurePropertyDisposalValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"costMaintainingSurplusProperty","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"pfiEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"vacantSpaceFloorArea","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"vacantSpaceFloorAreaMeasurement","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"vacationDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"availableStartDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"availabilityEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupyingOrganisation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupierContactName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"occupierContactEmail","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InSiteVacantSpacesPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteVacantSpace","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InitiateDataUploadResponse","description":null,"fields":[{"name":"signedUrl","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"batchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InitiateLearnFileUploadResponse","description":null,"fields":[{"name":"url","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"contentPath","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"InsertOrganisationalHierarchyInput","description":null,"fields":null,"inputFields":[{"name":"ancestorId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"descendantId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"InsertOrganisationalUnitLocationAttachmentInput","description":null,"fields":null,"inputFields":[{"name":"organisationalUnitId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"IntegerQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportedInt","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"IntelligenceSubscription","description":null,"fields":[{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"subscriptions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"IntelligenceSubscriptionInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"subscriptions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InvestmentTransaction","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatch","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fund","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Fund","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fundCommitment","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fundOwnership","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fundRevenue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"asset","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Asset","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetFactorName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"assetFactorValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"assetFactorYear","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"assetFactorLink","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"assetRevenue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"assetRevenueDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"assetValuation","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentFund","description":null,"args":[],"type":{"kind":"OBJECT","name":"Fund","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentFundCommitment","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentFundOwnership","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatedFactorName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatedFactorValue","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"financedEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"comment","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fundCurrencyCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentFundCurrencyCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currencyCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"InvestmentTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InvestmentTransaction","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"JoinOperator","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"AND","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"OR","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"KnowledgeBase","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"publicToken","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"lastModified","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"versionNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"hasExpired","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"KnowledgeBaseDetails","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"externalID","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"synopsis","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"demoMode","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"KnowledgeBaseDetailsInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"externalID","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"synopsis","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"demoMode","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"LearnBundle","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"restricted","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"courses","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"isEngage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"LearnBundleEngage","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"restricted","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"courses","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"isBundleHidden","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isbBundleShow","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isMandatoryBundle","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isEngage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"LearnBundleEngageFull","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"restricted","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"courses","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Course","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"isBundleHidden","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isbBundleShow","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isMandatoryBundle","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isEngage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"LearnContentMetaDataInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"cpd","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"passScore","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"contentPath","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"LearnContentType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"categories","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"CourseCategory","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"assessmentId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"reactionId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isEngage","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"openIframe","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"url","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"LearnContentType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"PDF","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"VIDEO","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SCORM","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"URL","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"LearnSubscriptionInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"subscriptions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"bundleShow","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"bundleHidden","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"mandatoryBundleId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Legislation","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"synopsis","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"links","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"applicability","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"countries","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"LegislationCountryCode","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"LegislationType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"args":[],"type":{"kind":"ENUM","name":"RagStatus","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reviewDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"lastFlaggedForReview","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"lastClearedReviewFlag","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"apiData","description":null,"args":[],"type":{"kind":"OBJECT","name":"GovApiInfo","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tag","description":null,"args":[],"type":{"kind":"OBJECT","name":"Tag","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Tag","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"departmentIds","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"regions","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"tasks","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Task","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"priority","description":null,"args":[],"type":{"kind":"ENUM","name":"LegislationPriority","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"LegislationAlerts","description":null,"fields":[{"name":"expired","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Legislation","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"approaching","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Legislation","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"flagged","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Legislation","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"LegislationContentInput","description":null,"fields":null,"inputFields":[{"name":"applicability","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"reviewDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"type":{"kind":"ENUM","name":"RagStatus","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"priority","description":null,"type":{"kind":"ENUM","name":"LegislationPriority","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"lastClearedReviewFlag","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"departmentIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"regionIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"LegislationCountryCode","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ENG","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SCO","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"NIR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GBR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EUR","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"LegislationCreateInput","description":null,"fields":null,"inputFields":[{"name":"legislation","description":null,"type":{"kind":"INPUT_OBJECT","name":"LegislationInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"LegislationInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"synopsis","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"links","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"countries","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"LegislationCountryCode","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"LegislationType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"lastFlaggedForReview","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"apiData","description":null,"type":{"kind":"INPUT_OBJECT","name":"GovApiInfoInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"priority","description":null,"type":{"kind":"ENUM","name":"LegislationPriority","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"LegislationPriority","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"HIGH","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MEDIUM","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"NOTE_WORTHY","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"LegislationType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"LEGAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"VOLUNTARY","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"Licence","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"LicenceStatus","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"productId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ownerId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"updatedAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"LicenceStatus","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"NEW","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ACTIVATED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EXPIRED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BLOCKED","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"LinkButton","description":null,"fields":[{"name":"text","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"link","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"LiquidFuelEmissionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"unit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"totalKgCO2ePerUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"kgCO2eOfCO2PerUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"kgCO2eOfCH4PerUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"kgCO2eOfN2OPerUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"kgCH4PerUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"kgN2OPerUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"LiquidFuelTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LiquidFuelTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"LiquidFuelTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelConsumptionType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"volume","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"operationalControl","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"originalRowNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope1GhgEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope2GhgEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope3GhgEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"co2eEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"co2Emissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ch4InCo2Emissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"n2oInCo2Emissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ch4Emissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"n2oEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Location","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"address","description":null,"args":[],"type":{"kind":"OBJECT","name":"Address","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"OBJECT","name":"Account","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wasteOut","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wasteIn","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Tag","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"code","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buildingType","description":null,"args":[],"type":{"kind":"OBJECT","name":"BuildingType","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"tenure","description":null,"args":[],"type":{"kind":"OBJECT","name":"Tenure","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"args":[],"type":{"kind":"OBJECT","name":"Region","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"floorSpace","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"sharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"leaseRenewalDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"attributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSJSON","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"latitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"longitude","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"picture","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"enableProject","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displayOnImpactDashboard","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"LocationMetadataOptionInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"LocationMetadataOptionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"LocationMetadataOptionType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"REGION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TENURE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BUILDINGTYPE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"LocationMetadataOptions","description":null,"fields":[{"name":"tenures","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Tenure","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"buildingTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"BuildingType","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"regions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Region","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INTERFACE","name":"LocationPoint","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dateCreated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"aliases","description":null,"args":[{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Alias","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"EnergyIn","ofType":null},{"kind":"OBJECT","name":"EnergyOut","ofType":null},{"kind":"OBJECT","name":"EnergySourceLocationPoint","ofType":null}]},{"kind":"INPUT_OBJECT","name":"LocationPointInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dateCreated","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"LocationWithLocationPointsInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address1","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address2","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address3","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"city","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"coordinates","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"phone1","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"countryId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteOutId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteInId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"code","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"buildingType","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tenure","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"floorSpace","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sharedEmissionPercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"leaseRenewalDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"attributes","description":null,"type":{"kind":"SCALAR","name":"AWSJSON","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"enableProject","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"displayOnImpactDashboard","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"LocationsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"SCALAR","name":"Long","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ManagementSystem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"synopsis","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"GovernanceItemType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortCode","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"chapters","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ManagementSystemChapter","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"content","description":null,"args":[],"type":{"kind":"OBJECT","name":"ManagementSystemPageContent","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ManagementSystemChapter","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"number","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"synopsis","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"content","description":null,"args":[],"type":{"kind":"OBJECT","name":"ManagementSystemPageContent","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"chapters","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ManagementSystemChapter","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"Chapter","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ManagementSystemPageContent","description":null,"fields":[{"name":"headerButton","description":null,"args":[],"type":{"kind":"OBJECT","name":"LinkButton","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Mapping","description":null,"fields":[{"name":"columnName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transposition","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"MappingInput","description":null,"fields":null,"inputFields":[{"name":"columnName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"transposition","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"MarketCarbonConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"supplierId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"supplierName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"tariff","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"renewablePercentage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isGlobal","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountIds","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"generationFactor","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"wellToTankForGenerationFactor","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wellToTankForTransmissionAndDistributionFactor","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"transmissionAndDistributionFactor","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"MarketCarbonConversionFactorInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"supplierId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tariff","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"renewablePercentage","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isGlobal","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"generationFactor","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wellToTankForGenerationFactor","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wellToTankForTransmissionAndDistributionFactor","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"transmissionAndDistributionFactor","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"MaterialConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"material","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"origin","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"activity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"kgCO2e","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"MaterialConversionFactorPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"MaterialConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"MaterialDataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"MaterialsTransactionPageItem","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"DataAnomaly","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"MaterialsTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"MaterialsTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"MaterialsTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"activity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"material","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"origin","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"supplier","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"productCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"ENUM","name":"Accuracy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"unitsQuantity","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"weight","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"quantityUnit","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCostVat","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope1","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialSubcategory","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"materialDetails","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"materialDescription","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"subcontractor","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"distanceToLocation","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"percentRecycledContent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfDeliveries","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"certificationOrigin","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"MetadataInput","description":null,"fields":null,"inputFields":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"references","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"MultipleChoiceQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"variants","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"canSpecifyOwnChoice","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportedChoices","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Mutation","description":null,"fields":[{"name":"createProject","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"ProjectInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Project","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateProject","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"ProjectInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Project","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteProject","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createAccount","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AccountInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteAccount","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createDepartment","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AccountDepartmentInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteDepartment","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"departmentId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateAccount","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AccountInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadLogo","description":null,"args":[{"name":"input","description":null,"type":{"kind":"INPUT_OBJECT","name":"UploadLogoInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"publishAccountChanges","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importAssets","description":null,"args":[{"name":"assets","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AssetInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ImportResult","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importAssetConversionFactors","description":null,"args":[{"name":"assetFactors","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AssetFactorInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ImportResult","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createAuditEvent","description":null,"args":[{"name":"event","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AuditEventInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AuditEvent","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteDataImportBatch","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"DataImportBatch","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rollBackDataImportBatch","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"rollbackReason","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createDashboard","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DashboardInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"updateDashboard","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DashboardInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"saveDashboardSubscriptions","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DashboardSubscriptionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createPreSignedUploadLink","description":null,"args":[{"name":"key","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"batchType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scheduleDataOverwritingExecution","description":null,"args":[{"name":"strategyId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"batchId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"batchType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataOverwritingStrategy","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"cancelDataOverwritingExecution","description":null,"args":[{"name":"strategyId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"batchType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataOverwritingStrategy","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"initiateDataOverwriting","description":null,"args":[{"name":"key","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"batchType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"customDuplicationKey","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataOverwritingStrategy","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"publishDataOverwritingStrategyUpdate","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"batchType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataOverwritingStrategy","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"initiateDataUpload","description":null,"args":[{"name":"transactionType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isDirectActivity","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"transpositionId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InitiateDataUploadResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createNormalisers","description":null,"args":[{"name":"normalisers","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"NormaliserInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"CreateNormalisersResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateNormaliser","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"NormaliserInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"UpdateNormaliserResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"upsertCustomWasteHierarchy","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpsertCustomWasteHierarchyInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteHierarchy","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteCustomWasteHierarchy","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createAlias","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AliasInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Alias","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createAliases","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AliasInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Alias","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"updateAlias","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AliasInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Alias","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteAliasByIdAndType","description":null,"args":[{"name":"aliasId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"aliasType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createTarget","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"TargetInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"CreateTargetResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateTarget","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"TargetInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"UpdateTargetResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateTransactionDataImportBatchStatus","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createContainerType","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateContainerTypeInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ContainerType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLocationExport","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createMarketCarbonConversionFactor","description":null,"args":[{"name":"factor","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"MarketCarbonConversionFactorInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"MarketCarbonConversionFactor","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateMarketCarbonConversionFactor","description":null,"args":[{"name":"factor","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"MarketCarbonConversionFactorInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"MarketCarbonConversionFactor","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteMarketCarbonConversionFactor","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"MarketCarbonConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"setAccountReportingYear","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"reportingYearId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"ReportingYear","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"approveUpload","description":null,"args":[{"name":"batchId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"triggerN3rgyImport","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"TriggerN3rgyImportInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"N3rgyImportStatusInfo","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"triggerExportTransactions","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"transactionType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ExportProgress","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"publishExportProgress","description":null,"args":[{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"ExportProgressPayload","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"upsertEmissionFactors","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"EmissionFactorInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteEmissionFactor","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteMyExport","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignoreDataAnomalies","description":null,"args":[{"name":"anomalyIds","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataAnomalyPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignoreFilteredDataAnomalies","description":null,"args":[{"name":"varianceReason","description":null,"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataAnomalyPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createAnomalyThreshold","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnomalyThresholdInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AnomalyThreshold","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateAnomalyThreshold","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnomalyThresholdInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AnomalyThreshold","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteAnomalyThreshold","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createDataTrackerConfig","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DataTrackerConfigInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataTrackerConfig","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateDataTrackerConfig","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DataTrackerConfigInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataTrackerConfig","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteDataTrackerConfig","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"updateDataTrackerValidationResults","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DataTrackerValidationResultInput","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"DataTrackerValidationResult","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"getZippedFileExport","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"ZippedFileExportInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createDocumentRecord","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateDocumentRecordInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteDocumentRecord","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteDocumentRecords","description":null,"args":[{"name":"ids","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"createDocumentFolder","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateDocumentFolderInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateDocumentFolder","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpdateDocumentFolderInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteDocumentFolders","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ids","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"initiateDromoUpload","description":null,"args":[{"name":"transactionType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dromoId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isDirectActivity","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"sendEmail","description":null,"args":[{"name":"input","description":null,"type":{"kind":"INPUT_OBJECT","name":"EmailInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createEnergySources","description":null,"args":[{"name":"energySources","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"EnergySourceInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergySource","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"updateEnergySource","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpdateEnergySource","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"EnergySource","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deleteEnergySource","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createEstatesConfiguration","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateEstatesConfigurationInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"updateEstatesConfiguration","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpdateEstatesConfigurationInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deleteEstatesConfiguration","description":null,"args":[{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"forecastYear","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deleteFlowSubscription","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"flowId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FlowSubscription","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createFlowSubscription","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"flowId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FlowSubscription","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importFunds","description":null,"args":[{"name":"funds","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"FundInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ImportResult","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importFundFMVs","description":null,"args":[{"name":"fundFMVs","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"FundFMVInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ImportResult","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createAspectOption","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AspectOptionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AspectOption","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteAspectOption","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AspectOptionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createLegislation","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"LegislationCreateInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Legislation","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateLegislation","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"LegislationCreateInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Legislation","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"savePolicy","description":null,"args":[{"name":"policy","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SavePolicyInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Policy","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createAspect","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AspectInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Aspect","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteAspect","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"setManagementSystemSubscription","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"subscriptions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"attachDocumentToManagementSystem","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AttachDocumentInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"attachDocumentToLegislation","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AttachDocumentInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"attachContentToManagementSystem","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AttachContentInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"attachContentToLegislation","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AttachLegislationContentInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"saveIntelligenceSubscriptions","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"IntelligenceSubscriptionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"IntelligenceSubscription","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createKnowledgeBase","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"KnowledgeBaseDetailsInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"KnowledgeBaseDetails","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateKnowledgeBase","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"KnowledgeBaseDetailsInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"KnowledgeBaseDetails","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"saveLearnSubscriptions","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"LearnSubscriptionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"AllLearnSubscriptions","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"saveLearnContentMetadata","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"LearnContentMetaDataInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Course","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"updateUserCourseProgress","description":null,"args":[{"name":"input","description":null,"type":{"kind":"INPUT_OBJECT","name":"UpdateUserCourseProgressInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"UserCourseMetaData","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"saveBanner","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SaveBannerInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Banner","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteBanner","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"saveLearnBundle","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SaveLearnBundleInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"LearnBundle","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createEvaluation","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateEvaluationInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Evaluation","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"completeEvaluation","description":null,"args":[{"name":"answers","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"evaluationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"courseId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"saveUserExclusion","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SaveUserExclusionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserExclusion","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"bulkUpdateExclusions","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"BulkUpdateExclusionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteLearnSubscription","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createBatchLicences","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateLicenceInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Licence","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"assignAccountLicence","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AssignAccountLicenceInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Licence","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assignBatchAccountLicence","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AssignAccountLicenceInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Licence","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"assignBatchLicences","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AssignLicenceInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Licence","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"trigerLicencesPaid","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Account","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deleteUserLicences","description":null,"args":[{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createAddress","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AddressInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Address","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createAddressBatch","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AddressInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"CreateAddressBatchResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateAddress","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AddressInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Address","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createEnergyIn","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"EnergyInInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergyIn","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateEnergyIn","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"EnergyInInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergyIn","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteEnergyIn","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createEnergyOut","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"EnergyOutInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergyOut","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateEnergyOut","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"EnergyOutInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergyOut","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteEnergyOut","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createLocationWithLocationPoints","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"LocationWithLocationPointsInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createLocationWithLocationPointsBatch","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"LocationWithLocationPointsInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ImportLocationWithLocationPointsBatchResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateLocationWithLocationPoints","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpdateLocationWithLocationPointsInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createLocationMetadataOption","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"LocationMetadataOptionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateLocationPoint","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"LocationPointInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INTERFACE","name":"LocationPoint","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createWasteIn","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteInInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateWasteIn","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteInInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"attachWasteInEwc","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteInEwcInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"detachWasteInEwc","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteInEwcInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"attachWasteInEwcPermitUpload","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteInEwcPermitUploadInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"detachWasteInEwcPermitUpload","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteInEwcPermitUploadInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createWasteInPermit","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteInPermitInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteInPermit","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateWasteInPermit","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteInPermitInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteInPermit","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteWasteInPermit","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"attachWasteInPermitTreatmentProcess","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteInPermitTreatmentProcessInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detachWasteInPermitTreatmentProcess","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createWasteOut","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteOutInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateWasteOut","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteOutInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"attachWasteInEWCAndTreatmentProcess","description":null,"args":[{"name":"input","description":null,"type":{"kind":"INPUT_OBJECT","name":"WasteInEWCTreatmentProcessInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detachWasteInEWCAndTreatmentProcess","description":null,"args":[{"name":"input","description":null,"type":{"kind":"INPUT_OBJECT","name":"WasteInEWCTreatmentProcessInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deleteLocationPoint","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteLocations","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationIds","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"upsertLocations","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpsertLocationsInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadLocationPicture","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UploadLocationPictureInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"buyProducts","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"BuyProductsInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Response","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"buySubscription","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"BuySubscriptionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Response","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createTemplate","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"TemplateInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Template","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateTemplate","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"TemplateInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Template","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadOcrDocument","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"OcrDocumentInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"markOcrDataAsReviewed","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createGasComposition","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateGasCompositionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importOilProducingAssets","description":null,"args":[{"name":"oilProducingAssets","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"OilProducingAssetInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ImportResult","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateOilProducingAsset","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpdateOilProducingAssetInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"upsertOrganisationalUnits","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"inputs","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpsertOrganisationalUnitInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"insertOrganisationalHierarchies","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"inputs","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"InsertOrganisationalHierarchyInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"insertOrganisationalUnitLocationAttachments","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"inputs","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"InsertOrganisationalUnitLocationAttachmentInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteOrganisationalHierarchy","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ancestorId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"descendantId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteOrganisationalUnitLocationAttachment","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnitId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"answerReportingQuestions","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AnswerReportingQuestionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"QuestionUnion","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"createProjectScheme","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SchemeInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Scheme","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"editProjectScheme","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SchemeEditInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Scheme","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteProjectScheme","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"setValue","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SetValueInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createSupplier","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SupplierInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Supplier","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateSupplier","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SupplierInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Supplier","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"upsertSuppliers","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"suppliers","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpsertSuppliersInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createSurveyTemplate","description":null,"args":[{"name":"template","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SurveyTemplateInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplate","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateSurveyTemplate","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"template","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SurveyTemplateInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplate","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateSurvey","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"survey","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SurveyInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Survey","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteSurveyTemplate","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteSurvey","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createSurveyTemplateSubscription","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"templateId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplateSubscription","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteSurveyTemplateSubscription","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"templateId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplateSubscription","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createSurvey","description":null,"args":[{"name":"survey","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SurveyInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Survey","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"setSurveySubmission","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"surveyId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"submission","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SurveySubmissionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveySubmission","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"setSurveyContributorTag","description":null,"args":[{"name":"surveyId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deleteSurveySubmission","description":null,"args":[{"name":"submissionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createSurveyQuestionCategory","description":null,"args":[{"name":"category","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SurveyQuestionCategoryInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyQuestionCategory","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateSurveyQuestionCategory","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SurveyQuestionCategoryInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyQuestionCategory","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteSurveyQuestionCategory","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyQuestionCategory","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateSurveyQuestion","description":null,"args":[{"name":"question","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SurveyQuestionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyQuestion","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"sendFeedbackOnSurveySubmission","description":null,"args":[{"name":"submissionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"SurveySubmissionFeedbackStatus","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"feedback","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveySubmission","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"unlockContributor","description":null,"args":[{"name":"campaignId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UnlockContributorResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createTag","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateTagInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Tag","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"updateTag","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpdateTagInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Tag","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"updateLocationTag","description":null,"args":[{"name":"input","description":null,"type":{"kind":"INPUT_OBJECT","name":"UpdateLocationTagInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createTask","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"TaskInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Task","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createTaskEvidence","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"TaskEvidenceInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Task","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateTask","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"TaskInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Task","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteTask","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Task","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createTransposition","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateTranspositionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Transposition","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteTransposition","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DeleteTranspositionInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Transposition","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createUser","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateUserInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createUsers","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"CreateUserInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"CreateUsersResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteUser","description":null,"args":[{"name":"username","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateUser","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UpdateUserInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateUserProfile","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UserProfileInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateUserRoles","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UserRolesInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"publishUserChanges","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"resendEmail","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"ResendEmailInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ResendEmailResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"setUserDisabled","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"disabled","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"resetUserPassword","description":null,"args":[{"name":"username","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"password","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"uploadProfilePicture","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UploadProfilePictureInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createUserAccessPolicy","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UserAccessPolicyInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserAccessPolicy","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateUserAccessPolicy","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UserAccessPolicyInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserAccessPolicy","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteUserAccessPolicy","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createUserGroup","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UserGroupInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserGroup","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createUserGroups","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"inputs","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UserGroupInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateUserGroup","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"UserGroupInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserGroup","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deleteUserGroup","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createWasteStream","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteStreamInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteStream","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"editWasteStream","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteStreamInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteStream","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createWasteContractor","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteContractorInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteContractor","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updateWasteContractor","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"WasteContractorInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteContractor","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"MysqlUser","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"firstName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"lastName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"email","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isDisabled","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accessLevel","description":null,"args":[],"type":{"kind":"ENUM","name":"Scope","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"allowedLocations","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"allowedTags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"role","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"jobTitle","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"phone","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"mobile","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"department","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"profilePicture","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"lastActiveAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalTimeSpentMs","description":null,"args":[],"type":{"kind":"SCALAR","name":"Long","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accountName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"readonly","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isExternalUser","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"disableAccountSelector","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userGroupName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"N3rgyConsentStatus","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"REQUESTED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FAILED_TO_REQUEST","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GRANTED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REJECTED","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"N3rgyImportStatusInfo","description":null,"fields":[{"name":"mpxn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfUploadedMeterReadings","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"missingDataTimestamps","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"errorMessage","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"NamedEntity","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"NamedEntityInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"NaturalGasConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"consumptionKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wttKgCo2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Normaliser","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"OBJECT","name":"Location","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"quantity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"OBJECT","name":"NormaliserType","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"NormaliserInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"quantity","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"NormaliserType","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scopes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Scope","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Normalisers","description":null,"fields":[{"name":"normalisers","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Normaliser","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"NormalisersPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Normaliser","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Notification","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"message","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isVisible","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"NumberFilter","description":null,"fields":null,"inputFields":[{"name":"field","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"ENUM","name":"FilterStrategy","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DataType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filter","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterTo","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"condition1","description":null,"type":{"kind":"INPUT_OBJECT","name":"NumberFilter","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"condition2","description":null,"type":{"kind":"INPUT_OBJECT","name":"NumberFilter","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"conditions","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"NumberFilter","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"operator","description":null,"type":{"kind":"ENUM","name":"JoinOperator","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"OcrDocumentInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"parserId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fileContent","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"utility","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"OcrUtility","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"OcrOutput","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"utility","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"OcrUtility","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedBy","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"quantity","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reading","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tariff","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"OcrUtility","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ELECTRICITY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"HEATSTEAM","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"OilProducingAsset","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"countryName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"operation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"OilProducingAssetOperation","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"jointVenture","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"equityShare","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasConsumption","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"flaredGas","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"liquidFuelCombustion","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fugitiveEmissions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"releaseValves","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"platforms","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"products","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"OilProducingAssetProducts","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updatedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createdBy","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"updatedBy","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"OilProducingAssetInput","description":null,"fields":null,"inputFields":[{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"operation","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"OilProducingAssetOperation","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"jointVenture","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"equityShare","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasConsumption","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"flaredGas","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"liquidFuelCombustion","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fugitiveEmissions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"releaseValves","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"platforms","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"products","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"OilProducingAssetProducts","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"OilProducingAssetOperation","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"OWNER_OPERATED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"THIRD_PARTY","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"OilProducingAssetPage","description":null,"fields":[{"name":"items","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OilProducingAsset","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"OilProducingAssetProducts","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"OIL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"OIL_GAS","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"OilTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OilTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"OilTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"oilProductionBbl","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasExportKscf","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"waterProductionBbl","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasProductionKscf","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasInjectionKscf","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasKscf","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"flareGasKscf","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"prodWaterOverboardBwpd","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"oilInWaterPpm","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"mBoeAllPerDay","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"mBoeGasPerDay","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasT","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"flareGasT","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ventingT","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fugitiveEmissionsT","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"gasCompositionId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope1GhgEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope2GhgEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope3GhgEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"monthlyAverageWaterLimitPPM1","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"monthlyAverageWaterLimitP65","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"oilDischargeBpd","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherParticulatesT","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dataMarker","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasTCO2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasTCO2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasTCH4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasTN2O","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"flareGasTCO2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"flareGasTCO2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"flareGasTCH4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"flareGasTN2O","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ventingTCO2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ventingTCH4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fugitiveEmissionsTCO2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fugitiveEmissionsTCO2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fugitiveEmissionsTCH4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherParticulatesTNOx","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherParticulatesTSOx","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherParticulatesTCO","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherParticulatesTpm25","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"OpenEndedQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportedText","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"OpenEndedRichQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportedText","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"OrganisationalHierarchiesPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OrganisationalHierarchy","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"OrganisationalHierarchy","description":null,"fields":[{"name":"ancestor","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OrganisationalUnit","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"descendant","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OrganisationalUnit","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"depth","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"OrganisationalUnit","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"OrganisationalUnitLocationAttachment","description":null,"fields":[{"name":"organisationalUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OrganisationalUnit","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"OrganisationalUnitLocationAttachmentsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OrganisationalUnitLocationAttachment","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"OrganisationalUnitsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OrganisationalUnit","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INTERFACE","name":"Page","description":null,"fields":[{"name":"count","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasNextPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasPreviousPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isFirstPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isLastPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"totalItemCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"ContainerTypeSizePage","ofType":null},{"kind":"OBJECT","name":"ContractorsPage","ofType":null},{"kind":"OBJECT","name":"DataImportBatchPage","ofType":null},{"kind":"OBJECT","name":"SupplierPage","ofType":null},{"kind":"OBJECT","name":"WasteStreamsPaged","ofType":null}]},{"kind":"OBJECT","name":"PaginatedCourses","description":null,"fields":[{"name":"isLastPage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"pageNo","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"pageCount","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalItemCount","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"section","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"data","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Course","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"learnBundleList","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LearnBundleEngage","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"PartitionCommand","description":null,"fields":null,"inputFields":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"partitionFunction","description":null,"type":{"kind":"ENUM","name":"PartitionFunction","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"alias","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"PartitionFunction","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"MONTH","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"YEAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FINANCIAL_YEAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"QUARTER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PERIOD","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"PieChartData","description":null,"fields":[{"name":"series","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"PieChartItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"drilldown","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"PieChartDrilldownItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"PieChartDrilldownItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"relativeValue","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"absoluteValue","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"PieChartItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"relativeValue","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"absoluteValue","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Policy","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"version","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reviewDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"PolicyOverview","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"version","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reviewDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Product","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"stripeId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"price","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"productType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"image","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"active","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ProductContent","description":null,"fields":[{"name":"itemList","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Product","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"bundlesList","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LearnBundleEngageFull","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"coursesList","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Course","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"managementSystemList","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Legislation","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ProductPage","description":null,"fields":[{"name":"content","description":null,"args":[],"type":{"kind":"OBJECT","name":"ProductContent","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"pageCount","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"count","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfElements","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"hasPreviousPage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isLastPage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isFirstPage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Progress","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"remainingEstimate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Project","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"owners","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"priority","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"ProjectPriority","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scheme","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Scheme","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"impact","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"cost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currencyId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"baselineStartDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"frequency","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"plannedBenefit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"plannedCostChange","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"plannedCO2eChange","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tasks","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Task","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceNotes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ProjectEvidenceNotes","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"meters","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergySource","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"ProjectEvidenceInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ProjectEvidenceNotes","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"ProjectInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"owners","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"priority","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"ProjectPriority","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"schemeId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"impact","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"cost","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"currencyId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"baselineStartDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"frequency","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"plannedBenefit","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"plannedCostChange","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"plannedCO2eChange","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"evidenceNotes","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"ProjectEvidenceInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"meters","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"ProjectPriority","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"LOW","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MEDIUM","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"HIGH","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"PromotionCode","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"code","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DiscountType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"discount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"couponId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ProuctLicenceCount","description":null,"fields":[{"name":"productId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"count","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"ProuctLicenceStatusCount","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ProuctLicenceStatusCount","description":null,"fields":[{"name":"status","description":null,"args":[],"type":{"kind":"ENUM","name":"LicenceStatus","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"count","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"PublicUserInfo","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"first_name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"last_name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"profilePicture","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"PurchaseType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"DIRECT_PURCHASED_DIRECTLY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DIRECT_BROKER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DIRECT_INTERCOMPANY_TRADE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INDIRECT_PURCHASED_BY_SUBCONTRACTOR_OR_CONTRACTOR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INDIRECT_BACKCHARGED_BY_CLIENT_OR_LANDLORD","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INDIRECT_FREE_ISSUE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"Query","description":null,"fields":[{"name":"getProject","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Project","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getProjects","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Project","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getProjectFilters","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAccountInfo","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAccounts","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AccountPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAssetsPageByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AssetPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAssetsPageByAccountIdFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAssetFactorsByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AssetFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getGicsCodes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Code","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAuditByEntityId","description":null,"args":[{"name":"entityId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AuditEvent","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getBuildingEnergyRatingsByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"BuildingEnergyRatingsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getBuildingEnergyRatingsFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"getElectricityConversionFactors","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ElectricityConversionFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getElectricityConversionFactorsFilter","description":null,"args":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getFuelConversionFactors","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FuelConversionFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getFuelConversionFactorsFilter","description":null,"args":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getGasConversionFactors","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GasConversionFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getGasConversionFactorsFilter","description":null,"args":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getHeatConversionFactors","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"HeatConversionFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getHeatConversionFactorsFilter","description":null,"args":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getRefrigerantConversionFactors","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"RefrigerantConversionFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getRefrigerantConversionFactorsFilter","description":null,"args":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getWaterConversionFactors","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WaterConversionFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWaterConversionFactorsFilter","description":null,"args":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getHotelStaysConversionFactors","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"HotelStaysConversionFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getHotelStaysConversionFactorsFilter","description":null,"args":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getMaterialConversionFactors","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"MaterialConversionFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getMaterialConversionFactorsFilter","description":null,"args":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getTransportConversionFactors","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TransportConversionFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getTransportConversionFactorsFilter","description":null,"args":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDashboard","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Dashboard","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllDashboards","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Dashboard","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDashboardSubscriptions","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getSubscribedDashboards","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Dashboard","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getEmissionsPercentageBreakdownByScope","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnitIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"from","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"to","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"excludeScope","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"PieChartData","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getTotalEmissions","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnitIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"from","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"to","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"excludeScope","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getEmissionsBySource","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnitIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"timeGranularity","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TimeGranularity","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"from","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"to","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"excludeScope","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TimeSeriesDataPoint","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getEmissionsByScope","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnitIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"timeGranularity","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TimeGranularity","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"from","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"to","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"excludeScope","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TimeSeriesDataPoint","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getEmissionsByScopeAndSource","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"from","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"to","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"excludeScope","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GetEmissionsByScopeAndSourceResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getEmissionsNetAndGross","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"timeGranularity","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TimeGranularity","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"from","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"to","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"excludeScope","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TimeSeriesDataPoint","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataQualityPercentage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"from","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"to","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataQualityPercentage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getTotalConsumption","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"from","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"to","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getDashboardTileData","description":null,"args":[{"name":"datasetName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"datasetFilters","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"DatasetFilters","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"aggregation","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AggregationCommand","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DashboardTileData","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteTransactionsReportingPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"hiddenColumns","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteTransactionReportingPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteTransactionsReportingPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDatasetRefreshStatus","description":null,"args":[{"name":"datasetName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GetDatasetRefreshStatusResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getTransportTransactionReportingPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"hiddenColumns","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TransportTransactionReportingPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getTransportTransactionReportingPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getEmissionsDatabasePage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EmissionsDatabasePage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getEmissionsDatabaseFilters","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getImpactDashboardData","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"targetStartDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"targetEndDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"baselineStartDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"baselineEndDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"currentPeriodStartDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"currentPeriodEndDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDate","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"excludeScope","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnitIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ImpactDashboardData","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getPossibleDataOverwritingKeys","description":null,"args":[{"name":"batchType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GetPossibleDataOverwritingKeysResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWaterTransactionPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"hiddenColumns","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WaterTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWaterTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataImportBatchesByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"search","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatchPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataImportBatchesPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatchGridPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataImportBatchById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"DataImportBatch","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getDataImportBatchImportFileUrl","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getCarbonConversionFactorsByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ewcId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INTERFACE","name":"CarbonConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getMarketCarbonConversionFactors","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"MarketCarbonConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getEnergySourceByAccountIdAndType","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"ENUM","name":"TransactionType","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergySourceBatchPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getEnergySourcePageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getEnergySourceById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergySource","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getEnergySourcesByIds","description":null,"args":[{"name":"ids","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergySource","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getContainerTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ContainerType","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteHierarchiesByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteHierarchy","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteHierarchiesPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteHierarchyPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDefaultWasteHierarchyByWasteTreatmentId","description":null,"args":[{"name":"treatmentProcessId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"WasteHierarchy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getTransportTransactionPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"hiddenColumns","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TransportTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getTransportTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAliasesPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"aliasType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"energyType","description":null,"type":{"kind":"ENUM","name":"TransactionType","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AliasesPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAliasByIdAndType","description":null,"args":[{"name":"aliasId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"aliasType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"AliasType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"energyType","description":null,"type":{"kind":"ENUM","name":"TransactionType","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Alias","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getNormaliserById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Normaliser","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getNormalisersByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Normaliser","ofType":null}}}},"isDeprecated":true,"deprecationReason":"Use `getNormalisersPage` instead."},{"name":"getNormalisersPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NormalisersPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getNormalisersPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getNormaliserTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NormaliserType","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getTargetTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getTargetTopics","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TargetTopic","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getTargetsByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Target","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"getTargetById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Target","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getAllUnits","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllJourneyTargets","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllFuelTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllTransportFuelTypes","description":null,"args":[{"name":"typeId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllTransportSubTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllTransportTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TransportType","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllAccuracyTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllCurrencyTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getMaterialsByAccountID","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllMaterialOriginTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getFuelTransactionPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FuelTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getFuelTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getReportingYears","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ReportingYear","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getBatchErrorsByBatchId","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportError","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAccountSectors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AccountSector","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAccountSectorById","description":null,"args":[{"name":"sectorId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AccountSector","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getElectricityConsumption","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"from","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"to","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"timeGranularity","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"ElectricityConsumptionTimeGranularity","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnitIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ElectricityConsumptionDataPoint","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"downloadMyExport","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getApiConversionFactors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ApiConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getEmissionFactorsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EmissionFactorPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getEmissionFactorsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataAnomaliesByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataAnomalyPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataAnomaliesFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAnomalyThreshold","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AnomalyThreshold","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAnomalyThresholds","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AnomalyThresholdsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataTrackerAnomalyFilters","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataTrackerConfig","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataTrackerConfig","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataTrackerConfigs","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataTrackerConfigsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataTrackerConfigFilters","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataTrackerValidationResults","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isIgnored","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataTrackerValidationResultsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDataTrackerValidationFilters","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDocumentRecordsForReview","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDocumentRecordById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDocumentRecordsByIds","description":null,"args":[{"name":"ids","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDocumentsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDocumentsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"library","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDocumentUploadLink","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"documentId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"mimeType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDocumentFolders","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentFolder","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getDocumentFolder","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentFolder","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDocumentDownloadLink","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"documentId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getDromoSchema","description":null,"args":[{"name":"transactionType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"SCALAR","name":"AWSJSON","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getElectricityTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ElectricityTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllEnergyType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"getEstatesConfiguration","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"0","isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":"25","isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":"[]","isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":"{}","isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EstatesConfigurationPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getEstatesConfigurationById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"EstatesConfiguration","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getEstatesConfigurationFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getFlowSubscriptions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FlowSubscription","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getFlows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Flow","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getFundsByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FundPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getFundsFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getFundFMVsByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FundFMVPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getFundFMVsFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getGasTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GasTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getEnergyTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"energyType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllLegislation","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Legislation","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getLegislationById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Legislation","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getPoliciesByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"PolicyOverview","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAspectsByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AspectsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAspectById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Aspect","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getPolicyById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Policy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getManagementSystemById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ManagementSystem","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAvailableManagementSystems","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"ENUM","name":"GovernanceItemType","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ManagementSystem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getManagementSystemSubscription","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllManagementSystems","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ManagementSystem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getLegislationAlerts","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LegislationAlerts","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAspectsAlerts","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AspectsAlerts","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAspectOptions","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"ENUM","name":"AspectOptionType","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"AspectOption","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAspectFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getHeatSteamTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"HeatSteamTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getHeatSteamTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"energyType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getHotelStaysTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"HotelStaysTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getHotelStaysTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAvailableKnowledgeBases","description":null,"args":[{"name":"accessToken","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"KnowledgeBase","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getLandbotId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteLandParcelsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteLandParcelsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteLandParcelsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteBreeamsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteBreeamsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteBreeamsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteDecsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteDecsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteDecsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteEpcsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteEpcsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteEpcsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteLeasesPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteLeasesPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteLeasesPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteDisposalsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteDisposalsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteDisposalsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteVacantSpacesPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteVacantSpacesPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteVacantSpacesPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteOccupationsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteOccupationsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteOccupationsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteOccupancyFactsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InSiteOccupancyFactsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInSiteOccupancyFactsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getIntelligenceSubscriptions","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getKnowledgeBasesForAccount","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"KnowledgeBaseDetails","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllKnowledgeBases","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"KnowledgeBaseDetails","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getInvestmentTransactionsByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"InvestmentTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getInvestmentTransactionsFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllLearnSubscriptions","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"AllLearnSubscriptions","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getAvailableCourses","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"pageNumber","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ownedCourses","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"PaginatedCourses","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllCourses","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"PaginatedCourses","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLearnProgressLogByUserId","description":null,"args":[{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"type":{"kind":"ENUM","name":"CourseProgress","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserCourseMetaData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"searchCourses","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"searchTerm","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"pageNumber","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"section","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"PaginatedCourses","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getCourseById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Course","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getUserCourse","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"bundleId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"courseId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Course","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getScormCourseById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Course","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getBanner","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Banner","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getBanners","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"includeHidden","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Banner","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"initiateLearnFileUpload","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"InitiateLearnFileUploadResponse","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"initiateScormFileUpload","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"files","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"ScormFileMetadata","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"InitiateLearnFileUploadResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllLearnBundles","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"LearnBundle","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getBundleById","description":null,"args":[{"name":"bundleId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LearnBundleEngage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLearnBundleById","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"bundleId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LearnBundleEngage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLearnBundlesForAccount","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LearnBundleEngage","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllEvaluations","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Evaluation","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getEvaluationById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Evaluation","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getExclusionByUserId","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserExclusion","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getExclusionsByAccountId","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserExclusion","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getLearnWorldsUrl","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAccountLicences","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Licence","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getProductLicences","description":null,"args":[{"name":"productId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Licence","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getLicencesByProductAndAccount","description":null,"args":[{"name":"productId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Licence","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAccountProductLicencesCount","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ProuctLicenceCount","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllAddresses","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Address","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"getEnergyInById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergyIn","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getEnergyOutById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EnergyOut","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLocationById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLocationPointById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INTERFACE","name":"LocationPoint","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteDestinationById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteDestination","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteInById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteInsByAccountId","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteInPermitById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteInPermit","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteOutById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteOutsByAccountId","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getLocationOperationTypeById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllLocationOperationTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getLocationTypeByName","description":null,"args":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteInEwcById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteInEwc","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllFacilityPermitTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getFacilityPermitTypeById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLocationsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"withCoordinatesOnly","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LocationsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLocationsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllCountries","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Country","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getLocationMetadataOptionsForAccount","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LocationMetadataOptions","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getProductsPaged","description":null,"args":[{"name":"page","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"size","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"ProductPage","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getPromotionCode","description":null,"args":[{"name":"code","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"PromotionCode","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getMaterialsTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"MaterialsTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getMaterialsTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getS3C1ActivityBasedMaterialTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"S3C1ActivityBasedMaterialTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getS3C1ActivityBasedMaterialTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getS3C1SpendBasedMaterialTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"S3C1SpendBasedMaterialTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getS3C1SpendBasedMaterialTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getTemplateById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Template","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllTemplates","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Template","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getOcrDataForAccount","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"utility","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"OcrUtility","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OcrOutput","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getUncertaintiesBackground","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UncertaintiesBackground","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getGasComposition","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GasCompositionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getGasCompositionUncertainties","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GasCompositionUncertaintyPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getOilTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OilTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getSalesDataTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SalesDataTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getSalesDataTransactionFilters","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getGasCompositionFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getGasCompositionUncertaintiesFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getOilTransactionFilters","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getOilProducingAssetsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sortBy","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sortOrder","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OilProducingAssetPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLiquidFuelTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LiquidFuelTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getLiquidFuelTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getLiquidFuelEmissionFactors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"LiquidFuelEmissionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getOrganisationalUnitsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OrganisationalUnitsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getOrganisationalHierarchiesPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OrganisationalHierarchiesPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getOrganisationalUnitLocationAttachmentsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"OrganisationalUnitLocationAttachmentsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getOrganisationalUnitsForFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"source","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getProjectCategories","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getProjectCategoriesByIds","description":null,"args":[{"name":"ids","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getQuicksightDashboard","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"QuicksightDashboardInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getUploadSummaryDashboard","description":null,"args":[{"name":"uploadType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"batchId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getQuicksightPreloaderDashboard","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getRefrigerantTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"RefrigerantTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getRefrigerantTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getRefrigerantGasTypes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getRefrigerantGasGroups","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getReportingQuestions","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"frameworkId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"chapterId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"QuestionUnion","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getReportProgressChapterBreakdown","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"frameworkId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ReportProgress","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getReportProgressGroupBreakdown","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"frameworkId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"groupId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ReportProgress","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getProjectScheme","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Scheme","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getProjectSchemes","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Scheme","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getProjectSchemesPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SchemePage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getProjectSchemesByIds","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ids","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Scheme","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getValue","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"GetValueInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllCourseData","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"GetAllDataInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"ScormKeyValue","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"getSuppliers","description":null,"args":[{"name":"page","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"orderDir","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterExpression","description":null,"type":{"kind":"ENUM","name":"FILTEREXPRESSION","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterValue","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterBy","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"utility","description":null,"type":{"kind":"ENUM","name":"TransactionType","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SupplierPage","ofType":null}},"isDeprecated":true,"deprecationReason":"Does not support Filters and SortCommand\'s"},{"name":"getSuppliersPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GetSuppliersPageResult","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getSupplier","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Supplier","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getSurveyTemplates","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplate","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getSurveyTemplatesByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplate","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getSurveysPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveysPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getReceivedSurveysPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ReceivedSurveysPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getReceivedSurveysPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getSurveysPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getQuestions","description":null,"args":[{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyQuestionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getQuestionsFilter","description":null,"args":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getSurveyLatest","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Survey","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getSurveyById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Survey","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getReceivedSurveyById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userGroupId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"ReceivedSurvey","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getSurveyTemplateSubscriptions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplateSubscription","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getSurveySubmissionById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveySubmission","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getMySurveyContributors","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"SurveyContributor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getMySurveyContributorById","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"contributorAccountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"contributorUserId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"contributorUserGroupId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"SurveyContributor","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getSurveyQuestionCategories","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyQuestionCategory","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getTagsByAccountId","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"GetTagsByAccountIdInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Tag","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getTaskById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Task","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getTasksByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Task","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getTasksByUserId","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Task","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getTranspositionById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Transposition","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getTranspositionsByAccountId","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"GetTranspositionsInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Transposition","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"getNotifications","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Notification","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getUserInfoById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getUsersByIds","description":null,"args":[{"name":"ids","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"getUserInfoByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"paginationToken","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":"null","isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"GetUserInfoByAccountIdResponse","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getUserRoles","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Role","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getUsers","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getUsersFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getUserAccessPoliciesPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserAccessPoliciesPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getUserGroupsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserGroupsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getUserGroupById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserGroup","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteStreamsByAccountId","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterValue","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteStreamsPaged","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllEWCs","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EWC","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getContainerTypeSizePage","description":null,"args":[{"name":"page","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"orderDir","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterValue","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ContainerTypeSizePage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllWasteTreatmentProcesses","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteTreatmentProcess","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteTreatmentProcessById","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteTreatmentProcess","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getAllWasteContractors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteContractor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteContractorsPaged","description":null,"args":[{"name":"page","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"orderDir","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterExpression","description":null,"type":{"kind":"ENUM","name":"FILTEREXPRESSION","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterValue","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterBy","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ContractorsPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteTransactionsPage","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"offset","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"limit","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sort","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SortCommand","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filters","description":null,"type":{"kind":"INPUT_OBJECT","name":"Filters","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"hiddenColumns","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteTransactionPage","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getWasteTransactionsPageFilter","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"FilterData","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"getAliasByValueBatch","description":null,"args":[{"name":"input","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"AliasValueBatchInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"AliasBatchResults","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"getCountMissingConsignmentNotes","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getCountMissingWasteTransferNotes","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getHazardousWasteTransactions","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"HazardousWasteTransactions","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"getHazardousWasteTransactionsWithNoLinkedConsignmentNotes","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"HazardousWasteTransactions","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Question","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"text","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"answers","description":null,"args":[{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"courseId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Answer","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"QuestionDisplaySettings","description":null,"fields":[{"name":"colSpan","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"showFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"QuestionInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"text","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"QuestionSequence","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"questions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"QuestionUnion","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"QuestionSequenceRepeatable","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportedRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SequenceRepeatableQuestionRow","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"questions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"QuestionUnion","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"UNION","name":"QuestionUnion","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"ChoiceQuestion","ofType":null},{"kind":"OBJECT","name":"MultipleChoiceQuestion","ofType":null},{"kind":"OBJECT","name":"YesNoQuestion","ofType":null},{"kind":"OBJECT","name":"OpenEndedQuestion","ofType":null},{"kind":"OBJECT","name":"OpenEndedRichQuestion","ofType":null},{"kind":"OBJECT","name":"IntegerQuestion","ofType":null},{"kind":"OBJECT","name":"FloatQuestion","ofType":null},{"kind":"OBJECT","name":"DateQuestion","ofType":null},{"kind":"OBJECT","name":"QuestionSequence","ofType":null},{"kind":"OBJECT","name":"QuestionSequenceRepeatable","ofType":null},{"kind":"OBJECT","name":"BreakdownQuestion","ofType":null},{"kind":"OBJECT","name":"AttachmentQuestion","ofType":null}]},{"kind":"INPUT_OBJECT","name":"QuicksightDashboardInput","description":null,"fields":null,"inputFields":[{"name":"username","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dashboardId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"RagStatus","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"NOTAPPLICABLE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INDIRECTLYAPPLICABLE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"NONCOMPLIANT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"COMPLIANCERISK","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"COMPLIANT","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"ReceivedSurvey","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"template","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplate","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"submission","description":null,"args":[],"type":{"kind":"OBJECT","name":"SurveySubmission","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deadlineDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"owner","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"lockedBy","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"feedbackEnabled","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"automatedScoring","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isIndividualContributor","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isUserGroupContributor","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ReceivedSurveysPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ReceivedSurvey","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"RefrigerantConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"kgCO2e","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"gasName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasGroupName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"RefrigerantConversionFactorPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"RefrigerantConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"RefrigerantDataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"RefrigerantTransactionPageItem","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"DataAnomaly","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"RefrigerantTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"RefrigerantTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"RefrigerantTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"gasGroup","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gasType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dataProvider","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"quantity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"quantityUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Accuracy","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"comment","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope1","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Region","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"RelativeDateDefault","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"TODAY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"YESTERDAY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"START_OF_CURRENT_YEAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"END_OF_CURRENT_YEAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"START_OF_LAST_YEAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"END_OF_LAST_YEAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"START_OF_CURRENT_MONTH","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"END_OF_CURRENT_MONTH","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"START_OF_LAST_MONTH","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"END_OF_LAST_MONTH","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"START_OF_CURRENT_QUARTER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"END_OF_CURRENT_QUARTER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"START_OF_LAST_QUARTER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"END_OF_LAST_QUARTER","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"ReportProgress","description":null,"fields":[{"name":"totalProgress","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"subProgressBreakdown","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ReportSubProgressBreakdownItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ReportSubProgressBreakdownItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"progress","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INTERFACE","name":"ReportingQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"AttachmentQuestion","ofType":null},{"kind":"OBJECT","name":"BreakdownQuestion","ofType":null},{"kind":"OBJECT","name":"ChoiceQuestion","ofType":null},{"kind":"OBJECT","name":"DateQuestion","ofType":null},{"kind":"OBJECT","name":"FloatQuestion","ofType":null},{"kind":"OBJECT","name":"IntegerQuestion","ofType":null},{"kind":"OBJECT","name":"MultipleChoiceQuestion","ofType":null},{"kind":"OBJECT","name":"OpenEndedQuestion","ofType":null},{"kind":"OBJECT","name":"OpenEndedRichQuestion","ofType":null},{"kind":"OBJECT","name":"QuestionSequence","ofType":null},{"kind":"OBJECT","name":"QuestionSequenceRepeatable","ofType":null},{"kind":"OBJECT","name":"YesNoQuestion","ofType":null}]},{"kind":"OBJECT","name":"ReportingYear","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"ResendEmailInput","description":null,"fields":null,"inputFields":[{"name":"username","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"password","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ResendEmailResponse","description":null,"fields":[{"name":"username","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Response","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"RioModule","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"HOME","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ENGAGE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GOVERNANCE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DATA","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SURVEYS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REPORTING","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INTELLIGENCE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CONFIGURATION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DOCUMENTS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TASKS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SUPPORT","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"Role","description":null,"fields":[{"name":"role","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UserRole","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"permissions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserPermissions","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"restrictedAccess","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"readonly","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"S3C1ActivityBasedMaterialTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"S3C1ActivityBasedMaterialTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"S3C1ActivityBasedMaterialTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationCountry","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationRegion","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"factorSet","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"subtype1","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"subtype2","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"subtype3","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"weight","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"weightUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"weightInKg","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"weightUnitToKgConversionFactor","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"unitsQuantity","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"supplier","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"factorKey","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scope3Emission","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"emissionFactorValue","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"productCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"materialDescription","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"percentRecycledContent","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"distanceToSite","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfDeliveries","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"originOfCertification","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"origin","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"subcontractor","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"S3C1SpendBasedMaterialTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"S3C1SpendBasedMaterialTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"S3C1SpendBasedMaterialTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locationCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"country","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"supplier","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"factorSet","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"subtype1","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"subtype2","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"subtype3","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"amount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"factorCurrencyAmount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"factorCurrencyCode","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"standardCurrencyAmount","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"factorKey","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scope3Emission","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"emissionFactorValue","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SalesDataTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SalesDataTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SalesDataTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"assetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"volumeNaturalGas","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"volumeNaturalGasUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"volumeCrudeOilBbl","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"naturalGasSalesVolumeM3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"crudeOilSalesVolumeM3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"soldProductEmissionsCO2e","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"soldProductEmissionsCO2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"soldProductEmissionsCH4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"soldProductEmissionsN2O","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope1GhgEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope2GhgEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"scope3GhgEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SaveBannerInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"url","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"BannerType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"thumbnail","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"visible","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SaveLearnBundleInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"restricted","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"courses","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isEngage","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SavePolicyInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"version","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"reviewDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SaveUserExclusionInput","description":null,"fields":null,"inputFields":[{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"exclusions","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Scale","description":null,"fields":[{"name":"min","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"max","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"ScaleInput","description":null,"fields":null,"inputFields":[{"name":"min","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"max","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Scheme","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SchemeEditInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"categoryId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SchemeInput","description":null,"fields":null,"inputFields":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"categoryId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SchemePage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Scheme","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"Scope","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ACCOUNT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TAG","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LOCATION","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"ScopeSourceEmissions","description":null,"fields":[{"name":"scope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"source","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"gross","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"net","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"ScormFileMetadata","description":null,"fields":null,"inputFields":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"lastModified","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"lastModifiedDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"webkitRelativePath","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"size","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"ScormKeyValue","description":null,"fields":[{"name":"key","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SearchFilter","description":null,"fields":null,"inputFields":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SequenceRepeatableQuestionAnswer","description":null,"fields":[{"name":"questionId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SequenceRepeatableQuestionAnswerInput","description":null,"fields":null,"inputFields":[{"name":"questionId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SequenceRepeatableQuestionRow","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"answers","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SequenceRepeatableQuestionAnswer","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SequenceRepeatableQuestionRowInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answers","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SequenceRepeatableQuestionAnswerInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SetFilter","description":null,"fields":null,"inputFields":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DataType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"values","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SetValueInput","description":null,"fields":null,"inputFields":[{"name":"key","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"courseId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SortCommand","description":null,"fields":null,"inputFields":[{"name":"field","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"Source","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"S3","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"URL","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"Subscription","description":null,"fields":[{"name":"accountUpdated","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Account","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dataOverwritingStrategyUpdated","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"batchType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"DataOverwritingStrategy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"exportProgressUpdated","description":null,"args":[{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"ExportProgressPayload","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"licencesPaid","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"Account","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"setSurveySubmissionUpdated","description":null,"args":[{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"surveyId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"SurveySubmission","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userUpdated","description":null,"args":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Supplier","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"address","description":null,"args":[],"type":{"kind":"OBJECT","name":"Address","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"utility","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"SupplierType","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"materials","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wasteCarrierLicenceDocument","description":null,"args":[],"type":{"kind":"OBJECT","name":"WasteCarrierLicenceDocument","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SupplierInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"addressId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"utility","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"materialIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SupplierPage","description":null,"fields":[{"name":"count","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasNextPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasPreviousPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isFirstPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isLastPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"totalItemCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"suppliers","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Supplier","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"Page","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"SupplierType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"Supplier","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"Contractor","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"Subcontractor","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"Carrier","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"Broker","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"Haulier","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"Survey","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"owner","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"template","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplate","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"contributors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"UNION","name":"SurveyContributor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"SurveyStatus","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"submissions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveySubmission","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"automatedScoring","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deadlineDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"feedbackEnabled","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isIndividualContributor","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isUserGroupContributor","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dashboardId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"sendToAllUsers","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SurveyAnswer","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"questionId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"answer","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"url","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"verified","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"verifiedNotes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SurveyAnswerInput","description":null,"fields":null,"inputFields":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"UNION","name":"SurveyContributor","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"AccountSurveyContributor","ofType":null}]},{"kind":"INTERFACE","name":"SurveyContributorInterface","description":null,"fields":[{"name":"surveys","description":null,"args":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ReceivedSurvey","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"AccountSurveyContributor","ofType":null}]},{"kind":"INPUT_OBJECT","name":"SurveyInput","description":null,"fields":null,"inputFields":[{"name":"ownerAccountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"surveyTemplateId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"automatedScoring","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"deadlineDate","description":null,"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"contributors","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"individualContributors","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userGroups","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notifyByEmail","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"feedbackEnabled","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dashboardId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sendToAllUsers","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SurveyQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"title","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"SurveyQuestionType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"required","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"payload","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"options","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyQuestionOption","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createdDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"template","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplate","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"args":[],"type":{"kind":"OBJECT","name":"SurveyQuestionCategory","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isKeyMetric","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SurveyQuestionCategory","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"parentCategory","description":null,"args":[],"type":{"kind":"OBJECT","name":"SurveyQuestionCategory","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SurveyQuestionCategoryInput","description":null,"fields":null,"inputFields":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"parentCategoryId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SurveyQuestionInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scores","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SurveyQuestionOptionInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isKeyMetric","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SurveyQuestionOption","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"score","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isNotApplicableMarker","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isDataMissingMarker","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SurveyQuestionOptionInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"score","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isNotApplicableMarker","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isDataMissingMarker","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SurveyQuestionPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyQuestion","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"SurveyQuestionType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"text","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"dropdown","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"radiogroup","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagbox","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"checkbox","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"imagepicker","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"boolean","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"signaturepad","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"multipletext","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"rating","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ranking","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"comment","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"file","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"expression","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"SurveyStatus","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"active","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"complete","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"SurveySubmission","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"owner","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"SurveySubmissionStatus","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"answers","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyAnswer","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"submittedDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"survey","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ReceivedSurvey","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"version","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"feedback","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userGroupId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"surveyId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deletedAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deletedByUserId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"deletedByUser","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"SurveySubmissionFeedbackStatus","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"requires_changes","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"approved","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SurveySubmissionInput","description":null,"fields":null,"inputFields":[{"name":"surveyId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"SurveySubmissionStatusInput","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"answers","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"SurveyAnswerInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"version","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"SurveySubmissionStatus","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"in_progress","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ready_for_review","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"requires_changes","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"approved","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"SurveySubmissionStatusInput","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"in_progress","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ready_for_review","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"SurveyTemplate","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"owner","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"questions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyQuestion","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"version","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"formContent","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSJSON","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createdDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"expiryDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"SurveyTemplateInput","description":null,"fields":null,"inputFields":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ownerId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"expiryDate","description":null,"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"formContent","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSJSON","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"version","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SurveyTemplateSubscription","description":null,"fields":[{"name":"account","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"template","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"SurveyTemplate","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"SurveysPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Survey","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Tag","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"tagName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"OBJECT","name":"Account","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"applicationId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isSystemLevelTag","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"legislationTag","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Target","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"Scope","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"topic","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TargetTopic","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"normaliserType","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isRelative","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"baselineStartDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"baselineEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"status","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"configurationErrors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"TargetInput","description":null,"fields":null,"inputFields":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"typeId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"topicId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"normaliserTypeId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isRelative","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"baselineStartDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"baselineEndDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"TargetTopic","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"unit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"utility","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Task","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"author","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TaskCategory","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"subject","description":null,"args":[],"type":{"kind":"ENUM","name":"TaskSubject","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"item","description":null,"args":[],"type":{"kind":"UNION","name":"TaskItem","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"owners","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"User","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"priority","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TaskPriority","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dueDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"completedAt","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isCompleted","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"evidence","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TaskEvidence","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"args":[],"type":{"kind":"ENUM","name":"Scope","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Tag","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"projectId","description":null,"args":[],"type":{"kind":"OBJECT","name":"Project","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"TaskCategory","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ENGAGE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GOVERNANCE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DATA","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REPORTING","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DOCUMENTS","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"TaskEvidence","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"taskId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TaskEvidenceType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DocumentRecord","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"TaskEvidenceInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"taskId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"evidenceType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TaskEvidenceType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"documents","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"TaskEvidenceType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"AUDIT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REPORT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"OBSERVATION","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"TaskInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"category","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TaskCategory","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"subject","description":null,"type":{"kind":"ENUM","name":"TaskSubject","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itemId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"owners","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"priority","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TaskPriority","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dueDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"completedAt","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isCompleted","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"type":{"kind":"ENUM","name":"Scope","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"projectId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"UNION","name":"TaskItem","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"Legislation","ofType":null},{"kind":"OBJECT","name":"Aspect","ofType":null},{"kind":"OBJECT","name":"Target","ofType":null}]},{"kind":"ENUM","name":"TaskPriority","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"HIGH","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MEDIUM","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LOW","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"TaskSubject","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"LEGISLATION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"POLICIES","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MANAGEMENTSYSTEMS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TARGETS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ASPECTS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"Template","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"parserId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"TemplateInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"parserId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Tenure","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"TextFilter","description":null,"fields":null,"inputFields":[{"name":"field","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"ENUM","name":"FilterStrategy","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filterType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"DataType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"filter","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"condition1","description":null,"type":{"kind":"INPUT_OBJECT","name":"TextFilter","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"condition2","description":null,"type":{"kind":"INPUT_OBJECT","name":"TextFilter","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"conditions","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"TextFilter","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"operator","description":null,"type":{"kind":"ENUM","name":"JoinOperator","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"ThumbnailType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"COMPLY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ELECTRICITY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INTEL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LEARN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIALS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MIXED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRAVEL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"ENUM","name":"TimeGranularity","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"YEAR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MONTH","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DATE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"TimeSeriesDataPoint","description":null,"fields":[{"name":"dimension","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"time","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"TransactionImportBatchOverview","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dromoId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"TransactionType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ELECTRICITY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FUEL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"GAS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MATERIALS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"OIL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"S3C1ACTIVITYBASEDMATERIAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"S3C1SPENDBASEDMATERIAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"OILGASSALES","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TRANSPORT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"HOTELSTAYS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"HEATSTEAM","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"REFRIGERANT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INVESTMENT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LIQUIDFUEL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"COREESTATE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EMISSIONSDATABASE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"TransportConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fromUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"toUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"CarbonConversionFactorType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"note","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"transportType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transportSubtype","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fuelType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"CarbonConversionFactor","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"TransportConversionFactorPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TransportConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"TransportDataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"TransportTransaction","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"DataAnomaly","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"TransportTransaction","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"date","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"OBJECT","name":"Location","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"subtype","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fuelType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purpose","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"origin","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"destination","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"volume","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"volumeUnit","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"distance","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"distanceUnit","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"ENUM","name":"Accuracy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"freight","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carrier","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dataProvider","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"activity","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"cost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"costVat","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"documentReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionsScope1","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionsScope2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionsScope3Indirect","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionsScope3WTT","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionsScope3TD","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionsScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionCO2","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionN2O","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionCH4","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfJourneys","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"journeyDistance","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"TransportTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TransportTransaction","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"TransportTransactionReportingPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"TransportTransaction","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"datasetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"TransportType","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"subtypes","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"Transposition","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transpositionName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"OBJECT","name":"Account","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"columnMapper","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"ColumnMapper","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"columnSplitter","description":null,"args":[],"type":{"kind":"OBJECT","name":"ColumnSplitter","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isHalfHourly","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isHeadless","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"defaultValues","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"TranspositionDefaultValue","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"TranspositionDefaultValue","description":null,"fields":[{"name":"columnName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"TriggerN3rgyImportInput","description":null,"fields":null,"inputFields":[{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"onlyIncludeAccountIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"excludeAccountIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"onlyIncludeMpxns","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"excludeMpxns","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"TypeDisposal","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"COMBUSTION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WTT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CONVERSION","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"UncertaintiesBackground","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"activity","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"asset","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UnlockContributorResponse","description":null,"fields":[{"name":"campaignId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpdateDocumentFolderInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpdateEnergySource","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"meterId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"typeId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"inOut","description":null,"type":{"kind":"ENUM","name":"InOut","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isGeneration","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"meterCode","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"hardwareProviderName","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"operatorProviderName","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyConsentStatus","description":null,"type":{"kind":"ENUM","name":"N3rgyConsentStatus","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"n3rgyIsIndirectSource","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isReadingMeter","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"initialReading","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpdateEstatesConfigurationInput","description":null,"fields":null,"inputFields":[{"name":"locationId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"forecastYear","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"cityStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tenure","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tenureStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"floorSpace","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"floorSpaceStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationStartDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationStartDateStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationBreakDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationBreakDateStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationEndDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"occupationEndDateStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesCondition","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesConditionStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesStatComp","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesStatCompStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesEpc","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesEpcStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesGovSystem","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"facilitiesGovSystemStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationYearPropertyMilestone","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationYearPropertyMilestoneStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"estateChange","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"estateChangeStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountDesnz","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountDesnzStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountIcs","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountIcsStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountGbe","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountGbeStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountSeahorse","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"desnzEntityHeadcountSeahorseStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountDsit","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountDsitStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountUksa","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dsitEntityHeadcountUksaStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountFacilitated","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountFacilitatedStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountVoid","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"totalHeadcountVoidStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsRequired","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsRequiredStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsFacilitated","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsFacilitatedStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsVoid","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"itEnabledWorkSettingsVoidStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceFacilitated","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceFacilitatedStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceActual","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"officeAttendanceActualStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerDesk","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerDeskStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerHeadcount","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerHeadcountStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"source","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sourceStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"capitalInvestmentCostFitOut","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"capitalInvestmentCostFitOutStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dilaps","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dilapsStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDesnzTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityIcsTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityGbeTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntitySeahorseTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityDsitTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaNonRent","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaNonRentStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaTotal","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityUksaTotalStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityTotalCheck","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"runningCostPerEntityTotalCheckStatus","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpdateLocationLocationPointInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"operation","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UpdateLocationPointOperation","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"UpdateLocationPointOperation","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"CREATE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DELETE","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpdateLocationTagInput","description":null,"fields":null,"inputFields":[{"name":"tagId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationsId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpdateLocationWithLocationPointsInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address1","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address2","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address3","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"city","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"postcode","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"coordinates","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"phone1","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"countryId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteIn","description":null,"type":{"kind":"INPUT_OBJECT","name":"UpdateLocationLocationPointInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteOut","description":null,"type":{"kind":"INPUT_OBJECT","name":"UpdateLocationLocationPointInput","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"code","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"buildingType","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tenure","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"region","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"floorSpace","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sharedEmissionPercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"leaseRenewalDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"attributes","description":null,"type":{"kind":"SCALAR","name":"AWSJSON","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"enableProject","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"displayOnImpactDashboard","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UpdateNormaliserError","description":null,"fields":[{"name":"error","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"UNION","name":"UpdateNormaliserResponse","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"Normaliser","ofType":null},{"kind":"OBJECT","name":"UpdateNormaliserError","ofType":null}]},{"kind":"INPUT_OBJECT","name":"UpdateOilProducingAssetInput","description":null,"fields":null,"inputFields":[{"name":"field","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"operation","description":null,"type":{"kind":"ENUM","name":"OilProducingAssetOperation","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"products","description":null,"type":{"kind":"ENUM","name":"OilProducingAssetProducts","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"jointVenture","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"equityShare","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fuelGasConsumption","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"flaredGas","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"liquidFuelCombustion","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"fugitiveEmissions","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"releaseValves","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"platforms","description":null,"type":{"kind":"SCALAR","name":"Int","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpdateTagInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"applicationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isSystemLevelTag","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"legislationTag","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UpdateTargetErrors","description":null,"fields":[{"name":"errors","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"UNION","name":"UpdateTargetResponse","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":null,"possibleTypes":[{"kind":"OBJECT","name":"Target","ofType":null},{"kind":"OBJECT","name":"UpdateTargetErrors","ofType":null}]},{"kind":"INPUT_OBJECT","name":"UpdateUserCourseProgressInput","description":null,"fields":null,"inputFields":[{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"courseId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"courseProgress","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"CourseProgress","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpdateUserInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"email","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"previousEmail","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"first_name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"last_name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"account_id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accessLevel","description":null,"type":{"kind":"ENUM","name":"Scope","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"allowedLocationsIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"allowedTagsIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"jobTitle","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"department","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"phone","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"mobile","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"profilePicture","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"disableAccountSelector","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userGroupId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UploadLocationPictureInput","description":null,"fields":null,"inputFields":[{"name":"fileName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"contentType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"imageData","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UploadLogoInput","description":null,"fields":null,"inputFields":[{"name":"fileName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"contentType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"imageData","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UploadProfilePictureInput","description":null,"fields":null,"inputFields":[{"name":"fileName","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"contentType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"imageData","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"userId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpsertCustomWasteHierarchyInput","description":null,"fields":null,"inputFields":[{"name":"wasteHierarchyId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"treatmentProcessId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"prevention","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"preparingForReuse","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"recycling","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"otherRecovery","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"disposal","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"unknown","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteInId","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isGlobal","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpsertLocationsInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address1","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address2","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address3","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"city","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"postCode","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"phone1","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"countryId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteIn","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteOut","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"regionId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tenureId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"buildingTypeId","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationCode","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"floorSpace","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"sharedEmissionPercentage","description":null,"type":{"kind":"SCALAR","name":"Float","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"tagIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"departmentIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"leaseRenewalDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpsertOrganisationalUnitInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UpsertSuppliersInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"SCALAR","name":"ID","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address1","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address2","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"address3","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"city","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"postCode","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"phone1","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"countryId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"utility","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TransactionType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"materialIds","description":null,"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"User","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"email","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"username","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"roles","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UserRole","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"role","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Role","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"first_name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"last_name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"jobTitle","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"department","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"phone","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"mobile","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"profilePicture","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"OBJECT","name":"Account","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"disabled","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"last_active_at","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"total_time_spent_ms","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accessLevel","description":null,"args":[],"type":{"kind":"ENUM","name":"Scope","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"allowedLocations","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Location","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"allowedTags","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"OBJECT","name":"Tag","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"disableAccountSelector","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"userGroupName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UserAccessPoliciesPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserAccessPolicy","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UserAccessPolicy","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"effect","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UserAccessPolicyEffect","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"resourceType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UserAccessPolicyResourceType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"resources","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"lastUpdatedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"UserAccessPolicyEffect","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ALLOW","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"DENY","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UserAccessPolicyInput","description":null,"fields":null,"inputFields":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"effect","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UserAccessPolicyEffect","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"resourceType","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UserAccessPolicyResourceType","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"resources","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"UserAccessPolicyResourceType","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"LOCATION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"TAG","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ORGANISATIONAL_UNIT","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"UserCourseMetaData","description":null,"fields":[{"name":"courseProgress","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"CourseProgress","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"lastUpdatedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"course","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Course","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UserExclusion","description":null,"fields":[{"name":"userId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"exclusions","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UserGroup","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"createdAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"lastUpdatedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accessPolicies","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserAccessPolicy","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"accessPolicyNames","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UserGroupInput","description":null,"fields":null,"inputFields":[{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accessPolicies","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UserGroupsPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"UserGroup","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UserPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"MysqlUser","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UserPermissions","description":null,"fields":[{"name":"user","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"allowedRoles","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UserRole","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"allowedRioModules","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"RioModule","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"allowedTaskCategories","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"TaskCategory","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"data","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"governance","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"document","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"documentFolder","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"tag","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transposition","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"email","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"notification","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"licence","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"learn","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"dashboard","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"task","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ocr","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"intelligence","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"readonlyAllowedRoles","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UserRole","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"project","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"projectCategory","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"scheme","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"survey","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"dataTracker","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"dataTrackerAnomalies","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"flows","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"invest","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"dataOverwriting","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"dataAnalysis","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"insite","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UserProfileInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"account_id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"first_name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"last_name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"email","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"previousEmail","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"jobTitle","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"department","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"phone","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"mobile","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"profilePicture","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"UserRole","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"SYSADMIN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BUSINESSADMIN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BUSINESS","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EMSCHAMPION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EMSCHAMPIONANALYSECONTRIBUTOR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CONTRIBUTOR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EMSCONTRIBUTOR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"ANALYSECHAMPION","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"INDIVIDUAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BUSINESSREADONLY","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"MENTOR","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"LEARNER","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EXECUTIVE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WASTEADMIN","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"CONSULTANT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"EMPLOYEE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SURVEYSONLY","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UserRolesInput","description":null,"fields":null,"inputFields":[{"name":"roles","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"UserRole","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"username","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"UtilityType","description":null,"fields":[{"name":"transactionType","description":null,"args":[],"type":{"kind":"ENUM","name":"TransactionType","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isDefault","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"UtilityTypeInput","description":null,"fields":null,"inputFields":[{"name":"transactionType","description":null,"type":{"kind":"ENUM","name":"TransactionType","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isDefault","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"VarianceReason","description":null,"fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"ONSITE_WORK","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"HEADCOUNT","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"FLOORSPACE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"WATER_LEAK","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"OTHER_OPERATIONAL","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"BELOW_THRESHOLD","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"SUPPLIER_DATA_ISSUE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"NO_ACTION_REQUIRED","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"PENDING_SUPPLIER_RESPONSE","description":null,"isDeprecated":false,"deprecationReason":null},{"name":"OTHER","description":null,"isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"VarianceTimeseries","description":null,"fields":[{"name":"error","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"data","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"VarianceTimeseriesDataItem","ofType":null}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"VarianceTimeseriesDataItem","description":null,"fields":[{"name":"dimension","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"time","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteCarbonConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fromUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"toUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"value","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"scope","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"CarbonConversionFactorType","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"note","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ewcId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"defraEquivalent","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"treatmentProcessCategoryId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"CarbonConversionFactor","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteCarrierLicenceDocument","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"fileName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"referenceId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteContractor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"address","description":null,"args":[],"type":{"kind":"OBJECT","name":"Address","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"WasteContractorInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"addressId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteDataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"WasteTransactionPageItem","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"DataAnomaly","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteDestination","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"wasteFrom","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"wasteTo","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteHierarchy","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"treatmentProcess","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ewc","description":null,"args":[],"type":{"kind":"OBJECT","name":"EWC","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isGlobal","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"prevention","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"preparingForReuse","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"recycling","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"disposal","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"unknown","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherRecovery","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"PublicUserInfo","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wasteIn","description":null,"args":[],"type":{"kind":"OBJECT","name":"NamedEntity","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"dateCreated","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteHierarchyPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteHierarchy","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"WasteInEWCTreatmentProcessInput","description":null,"fields":null,"inputFields":[{"name":"treatmentProcessId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteInEWCId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteInEwc","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"wasteIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ewc","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"EWC","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"WasteInEwcInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteInId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ewcId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"WasteInEwcPermitUploadInput","description":null,"fields":null,"inputFields":[{"name":"wasteInEwcPermitId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"uploadedDocumentId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"WasteInInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dateCreated","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"permitRequired","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteInPermit","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"wasteIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"weightAccepted","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"weightAcceptedUnit","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"permitType","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"NamedEntity","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"issueDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"expiryDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"WasteInPermitInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteInId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"weightAccepted","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"weightAcceptedUnitId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"permitTypeId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"issueDate","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"expiryDate","description":null,"type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"WasteInPermitTreatmentProcessInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"wasteInPermitId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"treatmentProcessId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"WasteOutInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"locationId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isActive","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"dateCreated","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteStream","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ewc","description":null,"args":[],"type":{"kind":"OBJECT","name":"EWC","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isHazardous","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"account","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"WasteStreamInput","description":null,"fields":null,"inputFields":[{"name":"id","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"ewcId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"isHazardous","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteStreamsPaged","description":null,"fields":[{"name":"count","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"page","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageSize","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"pageCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"totalItemCount","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasNextPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"hasPreviousPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isFirstPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isLastPage","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"wasteStreams","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteStream","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"Page","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteTransactionPageItem","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"wasteOut","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wasteOutId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wasteStream","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"ewc","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isHazardous","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"treatmentProcess","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wasteIn","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"individualCollectionDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"periodStartDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"periodEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfContainers","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"numberOfCollections","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"quantity","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"quantityUnitName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"ENUM","name":"Accuracy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"gateFee","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"managementFee","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"binHire","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"binExchangeFee","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"transportCharge","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"liftCharge","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"equipmentHire","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"miscCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"miscCostRate","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"rebate","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"penalty","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"consignmentNoteId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wasteTransferNote","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wtnDocumentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"consignmentNoteEA","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"salesOrder","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wasteContractor","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"containerTypeSize","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"labourCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"wasteCarrier","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCostVat","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmission","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"location","description":null,"args":[],"type":{"kind":"OBJECT","name":"Location","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"projectPhase","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteTransactionReportingPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WasteTransactionPageItem","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"datasetName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WasteTreatmentProcess","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"orderNumber","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"wasteTreatmentProcessCategoryId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"preventionDefraWasteTreatmentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"preparingForReuseDefraWasteTreatmentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"recyclingDefraWasteTreatmentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherRecoveryDefraWasteTreatmentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"disposalDefraWasteTreatmentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"unknownDefraWasteTreatmentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"ID","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WaterConversionFactor","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYear","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"supplyKgCo2e","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"treatmentKgCo2e","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Float","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WaterConversionFactorPage","description":null,"fields":[{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WaterConversionFactor","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WaterDataAnomaly","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDate","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reason","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"ignored","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"uploadedIn","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"DataImportBatch","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"transaction","description":null,"args":[],"type":{"kind":"OBJECT","name":"WaterTransaction","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"user","description":null,"args":[],"type":{"kind":"OBJECT","name":"User","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"detectedAt","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"AWSDateTime","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"varianceReason","description":null,"args":[],"type":{"kind":"ENUM","name":"VarianceReason","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"varianceTimeseries","description":null,"args":[],"type":{"kind":"OBJECT","name":"VarianceTimeseries","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"notes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"percentDiff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"DataAnomaly","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WaterTransaction","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"startDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"endDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"supplier","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"waterIn","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"waterOut","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCost","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"totalCostVat","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reading","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"accuracy","description":null,"args":[],"type":{"kind":"ENUM","name":"Accuracy","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tariff","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"currency","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"comment","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"energySource","description":null,"args":[],"type":{"kind":"OBJECT","name":"EnergySource","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatch","description":null,"args":[],"type":{"kind":"OBJECT","name":"TransactionImportBatchOverview","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"invoiceNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"evidenceReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"otherReference","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"meterName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationPointActive","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationPointDateCreated","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationPointName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCode","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationEndDate","description":null,"args":[],"type":{"kind":"SCALAR","name":"AWSDateTime","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationSharedEmissionPercentage","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"locationCustomAttributes","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"importBatchFileName","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"inEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"outEmissions","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"carbonEmissionsScope3","description":null,"args":[],"type":{"kind":"SCALAR","name":"Float","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tags","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"departments","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingYearOfFactors","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"purchaseType","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"organisationalUnits","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"estimatesScenario","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"WaterTransactionPage","description":null,"fields":[{"name":"totalRows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Int","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"rows","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"WaterTransaction","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"YesNoQuestion","description":null,"fields":[{"name":"id","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"formulation","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"shortFormulation","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"reportingFrameworkChapterId","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"materialityMetricId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"parentId","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"reportedAnswer","description":null,"args":[],"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"displaySettings","description":null,"args":[],"type":{"kind":"OBJECT","name":"QuestionDisplaySettings","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"order","description":null,"args":[],"type":{"kind":"SCALAR","name":"Int","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"tableOfContentsNumber","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[{"kind":"INTERFACE","name":"ReportingQuestion","ofType":null}],"enumValues":null,"possibleTypes":null},{"kind":"INPUT_OBJECT","name":"ZippedFileExportInput","description":null,"fields":null,"inputFields":[{"name":"files","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"INPUT_OBJECT","name":"NamedEntityInput","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null},{"name":"accountId","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"ID","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}],"interfaces":null,"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__Schema","description":"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.","fields":[{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"types","description":"A list of all types supported by this server.","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"queryType","description":"The type that query operations will be rooted at.","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"mutationType","description":"If this server supports mutation, the type that mutation operations will be rooted at.","args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"subscriptionType","description":"If this server support subscription, the type that subscription operations will be rooted at.","args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"directives","description":"A list of all directives supported by this server.","args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Directive","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__Type","description":"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\\n\\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.","fields":[{"name":"kind","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"__TypeKind","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"name","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"specifiedByUrl","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"fields","description":null,"args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false","isDeprecated":false,"deprecationReason":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Field","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"interfaces","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"possibleTypes","description":null,"args":[],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"enumValues","description":null,"args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false","isDeprecated":false,"deprecationReason":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__EnumValue","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"inputFields","description":null,"args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false","isDeprecated":false,"deprecationReason":null}],"type":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}},"isDeprecated":false,"deprecationReason":null},{"name":"ofType","description":null,"args":[],"type":{"kind":"OBJECT","name":"__Type","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"__TypeKind","description":"An enum describing what kind of type a given `__Type` is.","fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"SCALAR","description":"Indicates this type is a scalar.","isDeprecated":false,"deprecationReason":null},{"name":"OBJECT","description":"Indicates this type is an object. `fields` and `interfaces` are valid fields.","isDeprecated":false,"deprecationReason":null},{"name":"INTERFACE","description":"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.","isDeprecated":false,"deprecationReason":null},{"name":"UNION","description":"Indicates this type is a union. `possibleTypes` is a valid field.","isDeprecated":false,"deprecationReason":null},{"name":"ENUM","description":"Indicates this type is an enum. `enumValues` is a valid field.","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_OBJECT","description":"Indicates this type is an input object. `inputFields` is a valid field.","isDeprecated":false,"deprecationReason":null},{"name":"LIST","description":"Indicates this type is a list. `ofType` is a valid field.","isDeprecated":false,"deprecationReason":null},{"name":"NON_NULL","description":"Indicates this type is a non-null. `ofType` is a valid field.","isDeprecated":false,"deprecationReason":null}],"possibleTypes":null},{"kind":"OBJECT","name":"__Field","description":"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"args","description":null,"args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false","isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"isDeprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__InputValue","description":"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"type","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__Type","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"defaultValue","description":"A GraphQL-formatted string representing the default value for this input value.","args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isDeprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__EnumValue","description":"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isDeprecated","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"deprecationReason","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"OBJECT","name":"__Directive","description":"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\\n\\nIn some cases, you need to provide options to alter GraphQL\'s execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.","fields":[{"name":"name","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"description","description":null,"args":[],"type":{"kind":"SCALAR","name":"String","ofType":null},"isDeprecated":false,"deprecationReason":null},{"name":"isRepeatable","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"isDeprecated":false,"deprecationReason":null},{"name":"locations","description":null,"args":[],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"ENUM","name":"__DirectiveLocation","ofType":null}}}},"isDeprecated":false,"deprecationReason":null},{"name":"args","description":null,"args":[{"name":"includeDeprecated","description":null,"type":{"kind":"SCALAR","name":"Boolean","ofType":null},"defaultValue":"false","isDeprecated":false,"deprecationReason":null}],"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"OBJECT","name":"__InputValue","ofType":null}}}},"isDeprecated":false,"deprecationReason":null}],"inputFields":null,"interfaces":[],"enumValues":null,"possibleTypes":null},{"kind":"ENUM","name":"__DirectiveLocation","description":"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.","fields":null,"inputFields":null,"interfaces":null,"enumValues":[{"name":"QUERY","description":"Location adjacent to a query operation.","isDeprecated":false,"deprecationReason":null},{"name":"MUTATION","description":"Location adjacent to a mutation operation.","isDeprecated":false,"deprecationReason":null},{"name":"SUBSCRIPTION","description":"Location adjacent to a subscription operation.","isDeprecated":false,"deprecationReason":null},{"name":"FIELD","description":"Location adjacent to a field.","isDeprecated":false,"deprecationReason":null},{"name":"FRAGMENT_DEFINITION","description":"Location adjacent to a fragment definition.","isDeprecated":false,"deprecationReason":null},{"name":"FRAGMENT_SPREAD","description":"Location adjacent to a fragment spread.","isDeprecated":false,"deprecationReason":null},{"name":"INLINE_FRAGMENT","description":"Location adjacent to an inline fragment.","isDeprecated":false,"deprecationReason":null},{"name":"VARIABLE_DEFINITION","description":"Location adjacent to a variable definition.","isDeprecated":false,"deprecationReason":null},{"name":"SCHEMA","description":"Location adjacent to a schema definition.","isDeprecated":false,"deprecationReason":null},{"name":"SCALAR","description":"Location adjacent to a scalar definition.","isDeprecated":false,"deprecationReason":null},{"name":"OBJECT","description":"Location adjacent to an object type definition.","isDeprecated":false,"deprecationReason":null},{"name":"FIELD_DEFINITION","description":"Location adjacent to a field definition.","isDeprecated":false,"deprecationReason":null},{"name":"ARGUMENT_DEFINITION","description":"Location adjacent to an argument definition.","isDeprecated":false,"deprecationReason":null},{"name":"INTERFACE","description":"Location adjacent to an interface definition.","isDeprecated":false,"deprecationReason":null},{"name":"UNION","description":"Location adjacent to a union definition.","isDeprecated":false,"deprecationReason":null},{"name":"ENUM","description":"Location adjacent to an enum definition.","isDeprecated":false,"deprecationReason":null},{"name":"ENUM_VALUE","description":"Location adjacent to an enum value definition.","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_OBJECT","description":"Location adjacent to an input object type definition.","isDeprecated":false,"deprecationReason":null},{"name":"INPUT_FIELD_DEFINITION","description":"Location adjacent to an input object field definition.","isDeprecated":false,"deprecationReason":null}],"possibleTypes":null}],"directives":[{"name":"aws_cognito_user_pools","description":"To specify that the field is AMAZON_COGNITO_USER_POOLS authorized.","isRepeatable":false,"locations":["OBJECT","FIELD_DEFINITION"],"args":[]},{"name":"aws_iam","description":"To specify that the field is AWS_IAM authorized.","isRepeatable":false,"locations":["OBJECT","FIELD_DEFINITION"],"args":[]},{"name":"aws_subscribe","description":"Specify multiple mutations which trigger a subscription.","isRepeatable":false,"locations":["FIELD_DEFINITION"],"args":[{"name":"mutations","description":null,"type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"LIST","name":null,"ofType":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}}}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}]},{"name":"include","description":"Directs the executor to include this field or fragment only when the `if` argument is true.","isRepeatable":false,"locations":["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],"args":[{"name":"if","description":"Included when true.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}]},{"name":"skip","description":"Directs the executor to skip this field or fragment when the `if` argument is true.","isRepeatable":false,"locations":["FIELD","FRAGMENT_SPREAD","INLINE_FRAGMENT"],"args":[{"name":"if","description":"Skipped when true.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"Boolean","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}]},{"name":"deprecated","description":"Marks an element of a GraphQL schema as no longer supported.","isRepeatable":false,"locations":["FIELD_DEFINITION","ARGUMENT_DEFINITION","INPUT_FIELD_DEFINITION","ENUM_VALUE"],"args":[{"name":"reason","description":"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).","type":{"kind":"SCALAR","name":"String","ofType":null},"defaultValue":"\\"No longer supported\\"","isDeprecated":false,"deprecationReason":null}]},{"name":"specifiedBy","description":"Exposes a URL that specifies the behaviour of this scalar.","isRepeatable":false,"locations":["SCALAR"],"args":[{"name":"url","description":"The URL that specifies the behaviour of this scalar.","type":{"kind":"NON_NULL","name":null,"ofType":{"kind":"SCALAR","name":"String","ofType":null}},"defaultValue":null,"isDeprecated":false,"deprecationReason":null}]}]}}');var lOe=t(50277),sOe=t.n(lOe),cOe=t(16288),dOe=t.n(cOe);function uOe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pOe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uOe(Object(t),!0).forEach(function(n){mOe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uOe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mOe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const fOe={Mutation:{uploadDataFile:async(e,n,t)=>{let{file:a,url:r}=n,{cache:i}=t;const o={"Content-Type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};return r||(o.Authorization=localStorage.getItem("ACCESS_TOKEN")),yOe({url:r,headers:o,file:a,cache:i})}}},yOe=async e=>{let{url:n,headers:t,file:a}=e;try{const e=await dOe()({method:"PUT",url:n,headers:t,data:a}),r={status:e.status,fileUploaded:200===e.status};return de.v4(n=>{n.setTag("action","document_uploading"),de.wd("Upload document",{extra:pOe({},e)})}),r}catch(e){console.error(e),de.v4(t=>{t.setTag("action","document_uploading"),de.Cp(e,{extra:{url:n,error:e}})})}},gOe=[{query:w_,data:{wasteContractorsGridPage:1}},{query:R_,data:{wasteContractorsGridSearch:""}},{query:D_,data:{wasteContractorsGridTotalPages:1}}],bOe={Mutation:{setWasteContractorsGridPage:async(e,n,t)=>{let{page:a}=n,{cache:r}=t;return r.writeQuery({query:w_,data:{wasteContractorsGridPage:a}}),a},setWasteContractorsGridSearch:async(e,n,t)=>{let{search:a}=n,{cache:r}=t;return r.writeQuery({query:R_,data:{wasteContractorsGridSearch:a}}),a},setWasteContractorsGridTotalPages:async(e,n,t)=>{let{totalPages:a}=n,{cache:r}=t;return r.writeQuery({query:D_,data:{wasteContractorsGridTotalPages:a}}),a}}},hOe=[{query:G1,data:{suppliersGridPage:1}},{query:q1,data:{suppliersGridSearch:""}},{query:$1,data:{suppliersGridTotalPages:1}}],vOe={Mutation:{setSuppliersGridPage:async(e,n,t)=>{let{page:a}=n,{cache:r}=t;return r.writeQuery({query:G1,data:{suppliersGridPage:a}}),a},setSuppliersGridSearch:async(e,n,t)=>{let{search:a}=n,{cache:r}=t;return r.writeQuery({query:q1,data:{suppliersGridSearch:a}}),a},setSuppliersGridTotalPages:async(e,n,t)=>{let{totalPages:a}=n,{cache:r}=t;return r.writeQuery({query:$1,data:{suppliersGridTotalPages:a}}),a}}},xOe=[{query:XM,data:{wasteStreamGridPage:1}},{query:tV,data:{wasteStreamGridSearch:""}},{query:eV,data:{wasteStreamGridTotalPages:1}}],TOe={Mutation:{setWasteStreamGridPage:async(e,n,t)=>{let{page:a}=n,{cache:r}=t;return r.writeQuery({query:XM,data:{wasteStreamGridPage:a}}),a},setWasteStreamGridSearch:async(e,n,t)=>{let{search:a}=n,{cache:r}=t;return r.writeQuery({query:tV,data:{wasteStreamGridSearch:a}}),a},setWasteStreamGridTotalPages:async(e,n,t)=>{let{totalPages:a}=n,{cache:r}=t;return r.writeQuery({query:eV,data:{wasteStreamGridTotalPages:a}}),a}}};var OOe=t(82829);const kOe=e=>{const n=e.name.split("."),t=n[n.length-1];return"html"===t||"css"===t||"js"===t?OOe.contentType(e.name):"binary/octet-stream"},jOe={Mutation:{uploadLearnContent:async(e,n,t)=>{let{url:a,id:r,thumbnail:i,content:o,type:l,presignedLinks:s}=n,{cache:c}=t;if((l===Vt.US.Pdf||l===Vt.US.Video)&&o instanceof File){const e={"Content-Type":kOe(o)};await yOe({url:a,headers:e,file:o,cache:c})}else o&&o.length&&o.length>1&&"string"!=typeof o&&await(async(e,n,t)=>{await Promise.all(n.map(async(n,a)=>{const r=e[a],i={"Content-Type":kOe(r)};await yOe({url:n,headers:i,file:r,cache:t})}))})(o,s,c);if(i instanceof File){const e="".concat(r,".jpg"),n="".concat(kn("REACT_APP_LEARN_THUMBNAIL_UPLOAD"),"/").concat(e);await yOe({url:n,cache:c,file:i,headers:{"Content-Type":kOe(i),Authorization:localStorage.getItem("ACCESS_TOKEN")}})}}}},COe={query:_e,data:{currentAccountId:(()=>{const e=localStorage.getItem("CURRENT_ACCOUNT")||null;if(e)return e;const n=localStorage.getItem("ID_TOKEN"),t=n?(0,Jb.A)(n):null;return(null==t?void 0:t.name)||null})()}},SOe={Mutation:{setCurrentAccountId:(e,n,t)=>{let{currentAccountId:a}=n,{cache:r}=t;var i;a&&(i=a,localStorage.setItem("CURRENT_ACCOUNT",i),r.writeQuery({query:_e,data:{currentAccountId:a}}))}}},NOe=sOe()(tt,fOe,bOe,vOe,TOe,jOe,SOe),wOe=[COe,...Zn,...gOe,...hOe,...xOe],DOe=(e,n)=>{if(!e)return;const t=Object.keys(e),a={};return t.forEach(t=>{if(t!==n){const r=e[t];r instanceof Date?a[t]=r:Array.isArray(r)?a[t]=r.map(e=>Array.isArray(e)||"object"==typeof e?DOe(e,n):e):a[t]="object"==typeof r&&null!==r?DOe(r,n):r}}),a},AOe=new tOe.D({typePolicies:{InitiateLearnFileUploadResponse:{keyFields:["url"]},Role:{keyFields:["role"]},CourseMetaData:{keyFields:["link"]},PieChartItem:{keyFields:["id","absoluteValue","relativeValue"]},SurveyTemplateSubscription:{keyFields:["account",["id"],"template",["id"]]},AccountFormContributor:{keyFields:["account",["id"]]},ExportProgressPayload:{keyFields:["userId"]}},possibleTypes:(e=>{const n={};return e.__schema.types.forEach(e=>{e.possibleTypes&&(n[e.name]=e.possibleTypes.map(e=>e.name))}),n})(oOe)});wOe.forEach(e=>{let{query:n,data:t}=e;return AOe.writeQuery({query:n,data:t})});const ROe=new aOe.C((e,n)=>(e.variables&&(e.variables=DOe(e.variables,"__typename")),n(e).map(e=>e))),POe={type:"AMAZON_COGNITO_USER_POOLS",jwtToken:async()=>{try{const e=await y.N.currentSession();if(e)return e.getIdToken().getJwtToken()}catch(e){}}},LOe=kn("REACT_APP_GRAPHQL_URI"),IOe=kn("REACT_APP_AWS_REGION"),EOe=new rOe.R({connectToDevTools:!0,link:aOe.C.from([ROe,new iOe.G,(0,nOe.S)(e=>{let{networkError:n,operation:t}=e;const a=t.getContext();n&&a&&a.response&&(401===a.response.status||403===a.response.status)&&"GetUserByUsername"!==(null==t?void 0:t.operationName)&&EOe.mutate({mutation:Y})}),(0,XTe.createAuthLink)({url:LOe,region:IOe,auth:POe}),(0,eOe.createSubscriptionHandshakeLink)({url:LOe,region:IOe,auth:POe})]),cache:AOe,resolvers:NOe,typeDefs:"\n    extend type Query {\n        wasteTransactionGridColumns: [Column!]\n        electricityTransactionGridColumns: [Column!]\n        gasTransactionGridColumns: [Column!]\n        transportTransactionGridColumns: [Column!]\n        idToken: IdToken!\n        loginError: String\n        currentAccountId: String\n    }\n    \n    type Column {\n        id: String!\n        defaultName: String!\n        displayName: String!\n        display: Boolean!\n        width: Int!\n        dataType: String!\n    }\n    \n    type IdToken {\n        sub: String!\n        aud: String!\n        event_id: String\n        auth_time: Int!\n        exp: Int!\n        iat: Int!\n        email: String!\n        roles: [String!]!\n        given_name: String\n        name: String\n        family_name: String\n        isAuthed: Boolean\n    }\n\n    extend type Mutation {\n        setWasteTransactionGridColumns(columns: [Column!]): [Column!]\n    }\n\n    type WasteTreatmentProcessHierarchy {\n        wasteTreatmentProcessName: String!\n        prevention: Number\n        preparingForReuse: Number\n        recycling: Number\n        otherRecovery: Number\n        disposal: Number\n        reference: string\n    }\n"}),_Oe=EOe;function FOe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function BOe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?FOe(Object(t),!0).forEach(function(n){UOe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):FOe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function UOe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function MOe(e){var n,t,a;let{gridRef:r}=e;const i=null===(n=r.current)||void 0===n?void 0:n.gridApi,{canCreateOrganisationalUnitLocationAttachment:o}=oxe(),l=function(){const{canCreateOrganisationalUnitLocationAttachment:e}=oxe(),[n,t]=(0,g.useState)(),a=rt();if((0,g.useEffect)(()=>{(async()=>{const e=await async function(e){let{request:n,response:t,queryProvider:a,limit:r=1e3}=e,i=[...Object.keys(t)],o=0;const l=Object.fromEntries(Object.values(t).map(e=>[e,[]]));for(;i.length>0;){const{data:e}=await _Oe.query({query:a(i),variables:BOe(BOe({},n),{},{limit:r,offset:o}),fetchPolicy:"network-only"});o+=r;const s=[];for(const n of i){const a=e[n];l[t[n]].push(...a.rows),a.totalRows>o&&s.push(n)}i=s}return l}({request:{accountId:a},response:{getOrganisationalUnitsPage:"organisationalUnits",getLocationsPage:"locations"},queryProvider:qTe});t(e)})()},[a]),e)return n}(),s=kve($Te,"getOrganisationalUnitLocationAttachmentsPage"),c=o&&i&&l;return(0,Ze.jsxs)(Jve,{children:[(0,Ze.jsx)(N$,{filtersApplied:null===(t=r.current)||void 0===t?void 0:t.filtersApplied,resetGridState:null===(a=r.current)||void 0===a?void 0:a.resetGridState}),i&&(0,Ze.jsx)($P,{fetchRows:s,gridApi:i,defaultExportFileName:"location-attachments"}),c&&(0,Ze.jsx)(ZTe,{data:l,gridApi:i})]})}function VOe(){const e=(0,g.useRef)(null),n=Ove({columnDefs:(0,g.useMemo)(()=>[{headerName:"Organisational unit",field:"organisationalUnit.name",sortable:!0,filter:"agTextColumnFilter"},{headerName:"Location",field:"location.name",sortable:!0,filter:"agTextColumnFilter"},bTe(e=>(0,Ze.jsx)(YTe,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?HTe(Object(t),!0).forEach(function(n){KTe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):HTe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},e)))],[]),serverSideDatasource:jve($Te,"getOrganisationalUnitLocationAttachmentsPage")}),t=rt(),a="".concat(t,"_Organisation_LocationAttachments");return(0,Ze.jsx)(f.Page,{title:{content:"Location attachments",actionButton:(0,Ze.jsx)(MOe,{gridRef:e})},children:(0,Ze.jsx)(Yve,{ref:e,gridKey:a,gridOptions:n})})}var zOe,GOe,$Oe,WOe,qOe,JOe,YOe;function HOe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const KOe=(0,D.J1)(zOe||(zOe=HOe(["\n  fragment UserGroupFields on UserGroup {\n    id\n    name\n    description\n    accountId\n    createdAt\n    lastUpdatedAt\n    accessPolicyNames\n    accessPolicies {\n      id\n      name\n    }\n  }\n"]))),QOe=(0,D.J1)(GOe||(GOe=HOe(["\n  query GetUserGroupsPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n    getUserGroupsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        ...UserGroupFields\n      }\n      totalRows\n    }\n  }\n  ","\n"])),KOe),ZOe=(0,D.J1)($Oe||($Oe=HOe(["\n  mutation CreateUserGroup($accountId: ID!, $input: UserGroupInput!) {\n    createUserGroup(accountId: $accountId, input: $input) {\n      ...UserGroupFields\n    }\n  }\n  ","\n"])),KOe),XOe=(0,D.J1)(WOe||(WOe=HOe(["\n  mutation UpdateUserGroup($accountId: ID!, $id: ID!, $input: UserGroupInput!) {\n    updateUserGroup(accountId: $accountId, id: $id, input: $input) {\n      ...UserGroupFields\n    }\n  }\n  ","\n"])),KOe),eke=(0,D.J1)(qOe||(qOe=HOe(["\n  mutation DeleteUserGroup($accountId: ID!, $id: ID!) {\n    deleteUserGroup(accountId: $accountId, id: $id)\n  }\n"]))),nke=(0,D.J1)(JOe||(JOe=HOe(["\n  mutation CreateUserGroups($accountId: ID!, $inputs: [UserGroupInput!]!) {\n    createUserGroups(accountId: $accountId, inputs: $inputs)\n  }\n"]))),tke=(0,D.J1)(YOe||(YOe=HOe(["\n  query GetUserAccessPolicyOptions($accountId: ID!, $offset: Int, $limit: Int) {\n    getUserAccessPoliciesPage(accountId: $accountId, offset: $offset, limit: $limit) {\n      rows {\n        value: id\n        label: name\n      }\n      totalRows\n    }\n  }\n"])));var ake;const rke=(0,f.styled)(f.Grid)(ake||(ake=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  gap: 8px;\n"])));function ike(e){let{data:n,onEditClick:t,onDeleteClick:a}=e;const r=(0,g.useCallback)(()=>{t(n)},[t,n]),i=(0,g.useCallback)(()=>{a(n)},[a,n]);return(0,Ze.jsxs)(rke,{children:[(0,Ze.jsx)(f.IconButton,{children:(0,Ze.jsx)(f.Icons.Edit,{onClick:r})}),(0,Ze.jsx)(f.IconButton,{children:(0,Ze.jsx)(f.Icons.Delete,{onClick:i})})]})}function oke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function lke(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?oke(Object(t),!0).forEach(function(n){ske(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oke(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ske(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const cke=t.p+"user-groups-template-bd9ec8ca03977a713575.xlsx";var dke;const uke=(0,D.J1)(dke||(dke=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetUserAccessPolicyOptions(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getUserAccessPoliciesPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        value: id\n        label: name\n      }\n      totalRows\n    }\n  }\n"])));function pke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function mke(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pke(Object(t),!0).forEach(function(n){fke(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pke(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function fke(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const yke=[{key:"name",type:"string",label:"Name",validators:[{validate:"required"}]},{key:"description",type:"string",label:"Description"},{key:"accessPolicy1",type:"select",label:"Attach access policy 1",selectOptions:[]},{key:"accessPolicy2",type:"select",label:"Attach access policy 2",selectOptions:[]},{key:"accessPolicy3",type:"select",label:"Attach access policy 3",selectOptions:[]},{key:"accessPolicy4",type:"select",label:"Attach access policy 4",selectOptions:[]},{key:"accessPolicy5",type:"select",label:"Attach access policy 5",selectOptions:[]}];function gke(e){var n,t,a,r;let{gridRef:i,onCreateClick:o,allowManage:l}=e;const s=function(){const e=rt(),n=Ed({query:uke,request:{accountId:e},response:"getUserAccessPoliciesPage"}),t=new Map,a=new Set;return async(e,r)=>{if("init"===r){t.clear(),a.clear();const e=await n();for(const{id:n,name:r}of e)t.set(r.toLowerCase(),n),a.add(n)}return e}}(),[c]=(0,Ot.n)(nke),d=(0,f.useTheme)(),u=function(){const[e,n]=(0,g.useState)(),t=rt(),a=Ed({query:tke,request:{accountId:t},response:"getUserAccessPoliciesPage"});return(0,g.useEffect)(()=>{(async()=>{const e=await a();n({accessPolicies:e})})()},[]),e}(),p=(0,g.useMemo)(()=>yke.map(e=>{var n;return"select"===e.type&&e.key.startsWith("accessPolicy")?mke(mke({},e),{},{selectOptions:null!==(n=null==u?void 0:u.accessPolicies)&&void 0!==n?n:[]}):e}),[u]);return(0,Ze.jsxs)(Jve,{children:[(0,Ze.jsx)(N$,{filtersApplied:null===(n=i.current)||void 0===n?void 0:n.filtersApplied,resetGridState:null===(t=i.current)||void 0===t?void 0:t.resetGridState}),l&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(zP.A,{title:"Create new user group",children:(0,Ze.jsx)(f.IconButton,{color:"primary",variant:"outlined",onClick:o,children:(0,Ze.jsx)(f.Icons.Add,{color:d.sys.color.primary})})}),(0,Ze.jsx)(qxe,{importIdentifier:"User groups",fields:p,gridApi:null!==(a=null===(r=i.current)||void 0===r?void 0:r.gridApi)&&void 0!==a?a:void 0,mutation:c,validator:s,tooltip:"Bulk upload user groups",formatRow:e=>({name:e.name,description:e.description,accessPolicies:[e.accessPolicy1,e.accessPolicy2,e.accessPolicy3,e.accessPolicy4,e.accessPolicy5].filter(Boolean)}),templateUrl:cke})]})]})}const bke=e=>{let{value:n,onChange:t,error:a,defaultOptions:r,disabled:i}=e;const{loading:o,options:l}=function(){const e=rt(),[n,t]=(0,g.useState)([]),[a,r]=(0,g.useState)(!1),i=(0,g.useRef)(0),[o]=(0,gs._)(uke,{notifyOnNetworkStatusChange:!0});return(0,g.useEffect)(()=>{(async()=>{var n,a;r(!0);const l=[],s=await o({variables:{accountId:e,sort:[{field:"name",order:"asc"}],offset:i.current,limit:Za}});if(null==s||null===(n=s.data)||void 0===n||!n.getUserAccessPoliciesPage)return;const c=null!==(a=s.data.getUserAccessPoliciesPage.totalRows)&&void 0!==a?a:0;for(l.push(...s.data.getUserAccessPoliciesPage.rows);l.length<c&&i.current<=c;){var d;const n=await o({variables:{accountId:e,offset:i.current,sort:[{field:"name",order:"asc"}],limit:Za}});if(null==n||null===(d=n.data)||void 0===d||null===(d=d.getUserAccessPoliciesPage)||void 0===d||!d.rows)return;l.push(...n.data.getUserAccessPoliciesPage.rows),i.current+=Za}t(l),r(!1)})()},[]),(0,g.useMemo)(()=>({options:n,loading:a}),[n,a])}();return(0,Ze.jsx)(f.AutoComplete,{isMulti:!0,label:"Select your access policies",options:l,onChange:t,isLoading:o,error:null==a?void 0:a.toString(),value:n,defaultValue:Array.isArray(r)?r:[],disabled:i,placeholder:"Start typing to search for an access policy"})};function hke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vke(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hke(Object(t),!0).forEach(function(n){xke(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hke(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xke(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Tke={name:"",description:"",accessPolicies:[]};function Oke(e){let{onSubmit:n,defaultValues:t,disabled:a}=e;const[r,i]=(0,g.useState)(t||Tke),[o,l]=(0,g.useState)({}),s=(0,g.useCallback)(e=>{i(n=>vke(vke({},n),{},{[e.target.name]:e.target.value}))},[]),c=(0,g.useCallback)(()=>{const e={};r.name||(e.name="Name is required"),r.accessPolicies.length||(e.accessPolicies="At least one policy has to be selected"),0===Object.keys(e).length?n(r):l(e)},[r,n]);return(0,Ze.jsxs)(f.Grid,{container:!0,direction:"column",justifyContent:"space-between",gap:2,children:[(0,Ze.jsx)(f.TextField,{label:"Name",name:"name",value:r.name,onChange:s,error:!!o.name,disabled:a}),(0,Ze.jsx)(f.TextField,{label:"Description",name:"description",value:r.description,onChange:s,disabled:a}),(0,Ze.jsx)(bke,{label:"Access policies",name:"accessPolicies",value:r.accessPolicies,onChange:(d="accessPolicies",e=>{i(n=>vke(vke({},n),{},{[d]:Array.isArray(e)?e.map(e=>e.value):e.value}))}),disabled:a}),(0,Ze.jsx)(f.Button,{variant:"contained",color:"primary",onClick:c,disabled:a,children:"Submit"})]});var d}function kke(e){let{open:n,onClose:t,onCompleted:a,onError:r}=e;const[i,{loading:o}]=(0,Ot.n)(ZOe),l=rt(),s=(0,g.useCallback)(e=>{i({onCompleted:()=>{a()},onError:e=>{r(e)},variables:{input:e,accountId:l}})},[i,a,l,r]);return(0,Ze.jsx)(f.Modal,{title:"Configure your new user group",open:n,onClose:t,children:(0,Ze.jsx)(Oke,{onSubmit:s,disabled:o})})}function jke(e){let{open:n,group:t,onClose:a,onCompleted:r,onError:i}=e;const o=rt(),[l,{loading:s}]=(0,Ot.n)(XOe),c=(0,g.useCallback)(e=>{t&&l({onCompleted:()=>{r()},onError:e=>{i(e)},variables:{id:t.id,input:e,accountId:o}})},[l,o,t,r,i]),d=(0,g.useMemo)(()=>{if(t)return{name:t.name,description:t.description,accessPolicies:t.accessPolicies.map(e=>e.id)}},[t]);return(0,Ze.jsx)(f.Modal,{title:"Update your access policy",open:n,onClose:a,children:(0,Ze.jsx)(Oke,{onSubmit:c,defaultValues:d,disabled:s})})}function Cke(e){let{group:n,onClose:t,onCompleted:a,onError:r}=e;const[i,{loading:o}]=(0,Ot.n)(eke),l=rt(),s=(0,g.useCallback)(()=>{n&&i({onCompleted:()=>{a()},onError:e=>{r(e)},variables:{id:n.id,accountId:l}})},[i,a,r,n,l]);return(0,Ze.jsx)(Z$,{title:"Delete user group",body:'Are you sure you want to delete the user group "'.concat(null==n?void 0:n.name,'"? This group may be undeletable until it is dereferenced from all users.'),closeButtonText:"No, cancel",confirmButtonText:"Yes, delete it",open:!!n,disabled:o,onClose:t,onConfirm:s})}function Ske(){var e;const n=(0,g.useRef)(null),t=rt(),{canManageUserGroup:a}=oxe(),[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)(null),[s,c]=(0,g.useState)(null),{showNotification:d}=vt(),u="".concat(t,"_Organisation_AccessPolicies"),p=(e=>{let{onEditClick:n,onDeleteClick:t,allowManage:a}=e;const r=(0,g.useMemo)(()=>{const e=[{headerName:"Name",field:"name",sortable:!0,filter:"agTextColumnFilter"},{headerName:"Description",field:"description",sortable:!0,filter:"agTextColumnFilter"},{headerName:"Access policies",field:"accessPolicyNames",sortable:!0,filter:"agTextColumnFilter"},{headerName:"Created at",field:"createdAt",sortable:!0,filter:"agTextColumnFilter",valueFormatter:ua},{headerName:"Last updated at",field:"lastUpdatedAt",sortable:!0,filter:"agTextColumnFilter",valueFormatter:ua}];return a&&e.push({field:"actions",sortable:!1,filter:!1,resizable:!1,maxWidth:200,cellRenderer:e=>(0,Ze.jsx)(ike,lke(lke({},e),{},{onEditClick:n,onDeleteClick:t}))}),e},[a,n,t]);return Ove({columnDefs:r,serverSideDatasource:jve(QOe,"getUserGroupsPage")})})({allowManage:a,onDeleteClick:e=>{l(e)},onEditClick:e=>{c(e)}}),m=(0,g.useCallback)(()=>{i(e=>!e)},[]),y=(0,g.useCallback)(()=>{c(null)},[]),b=(0,g.useCallback)(e=>{console.error(e),d(e.message,"danger")},[d]),h=(0,g.useCallback)(()=>{var e;d("Success","success"),i(!1),c(null),l(null),null===(e=n.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.refreshServerSide({purge:!0})},[d,c,i]);return(0,Ze.jsxs)(f.Page,{title:{content:"User groups",actionButton:(0,Ze.jsx)(gke,{gridRef:n,onCreateClick:m,allowManage:a,gridApi:null===(e=n.current)||void 0===e?void 0:e.gridApi})},children:[(0,Ze.jsx)(Yve,{ref:n,gridKey:u,gridOptions:p}),(0,Ze.jsx)(kke,{open:r,onClose:m,onCompleted:h,onError:b}),(0,Ze.jsx)(jke,{open:!!s,group:s,onClose:y,onCompleted:h,onError:b}),(0,Ze.jsx)(Cke,{group:o,onClose:()=>l(null),onError:b,onCompleted:h})]})}var Nke,wke,Dke,Ake;function Rke(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Pke=(0,D.J1)(Nke||(Nke=Rke(["\n  query GetEmissionFactorsPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n    getEmissionFactorsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        factorKey\n        sourceName\n        factorYear\n        accountingMethod\n        startDate\n        endDate\n        emissionSource\n        emissionSourceType\n        scope\n        type\n        subtype1\n        subtype2\n        subtype3\n        fromUnit\n        fromUnitToStandardUnitConversionFactor\n        toGhgUnit\n        region\n        method\n        accountId\n        accountName\n        scope1Emissions\n        scope2Emissions\n        scope3Emissions\n        notes\n        deprecated\n        deprecationReason\n      }\n    }\n  }\n"]))),Lke=(0,D.J1)(wke||(wke=Rke(["\n  query GetEmissionFactorsPageFilter($accountId: ID!, $field: String!) {\n    getEmissionFactorsPageFilter(accountId: $accountId, field: $field) {\n      value\n      label\n    }\n  }\n"]))),Ike=(0,D.J1)(Dke||(Dke=Rke(["\n  mutation DeleteEmissionFactor($id: ID!) {\n    deleteEmissionFactor(id: $id)\n  }\n"]))),Eke=(0,D.J1)(Ake||(Ake=Rke(["\n  mutation UpsertEmissionFactors($input: [EmissionFactorInput!]!) {\n    upsertEmissionFactors(input: $input)\n  }\n"]))),_ke=[{key:"sourceName",type:"string",label:"Source name",validators:[{validate:"required"}],description:'Ex. "DEFRA UK"'},{key:"factorYear",type:"string",label:"Factor year",validators:[{validate:"required"}],description:'Ex. "2024"'},{key:"accountingMethod",type:"select",label:"Accounting method",validators:[{validate:"required"}],description:'Ex. "Location-Based"',selectOptions:[{label:"Location-Based",value:"Location-Based"}]},{key:"startDate",type:["date",{locale:"en-GB"}],label:"Start date",description:'Ex. "01/01/2024"',validators:[{validate:"required"}]},{key:"endDate",type:["date",{locale:"en-GB"}],label:"End date",description:'Ex. "01/01/2024"',validators:[{validate:"required"}]},{key:"emissionSource",type:"select",label:"Emission source",description:'Ex. "Materials"',selectOptions:[{label:"Materials",value:"Materials"}],validators:[{validate:"required"}]},{key:"emissionSourceType",type:"select",label:"Emission source type",description:'Ex. "Material Type"',selectOptions:[{label:"Material Type",value:"Material Type"}],validators:[{validate:"required"}]},{key:"scope",type:"select",selectOptions:[{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"}],label:"Scope",description:'Ex. "1"',validators:[{validate:"required"}]},{key:"type",type:"string",label:"Type",description:'Ex. "Metal"',validators:[{validate:"required"}]},{key:"subtype1",type:"string",label:"Subtype 1",description:'Ex. "Glazing by thickness of glass - Per m2"',validators:[{validate:"required"}]},{key:"subtype2",type:"string",label:"Subtype 2",description:'Ex. "Multi layer safety glass, not a filled core - no frame"'},{key:"subtype3",type:"string",label:"Subtype 3",description:'Ex. "10 mm of glass, ex frame"'},{key:"fromUnit",type:"string",label:"From unit",description:'Ex. "m2"',validators:[{validate:"required"}]},{key:"fromUnitToStandardUnitConversionFactor",type:["number","default"],label:"From unit to kg conversion factor",description:'Ex. "2345.23"'},{key:"toGhgUnit",type:"select",label:"To GHG unit",description:'Ex. "kgCO2e"',selectOptions:[{label:"kgCO2e",value:"kgCO2e"}],validators:[{validate:"required"}]},{key:"region",type:"select",label:"Region",description:'Ex. "Global"',selectOptions:[{label:"Global",value:"Global"}],validators:[{validate:"required"}]},{key:"accountId",type:"select",label:"Only for current account",description:"If true, the emission factor will only be used for the currently selected account (recommended)",defaultValue:"Yes",selectOptions:[{label:"Yes",value:"Yes"},{label:"No",value:"No"}]},{key:"scope1Emissions",type:["number","default"],label:"Scope 1 emissions",description:'Ex. "56.7"'},{key:"scope2Emissions",type:["number","default"],label:"Scope 2 emissions",description:'Ex. "56.7"'},{key:"scope3Emissions",type:["number","default"],label:"Scope 3 emissions",description:'Ex. "56.7"'},{key:"notes",type:"string",label:"Notes",description:"Enter notes (optional)"}],Fke=t.p+"activity-based-factors-template-0ce5feae6ca8c7df2086.xlsx",Bke=t.p+"spend-based-factors-template-fce67b38eefb89eafa4b.xlsx",Uke=(e,n)=>{if(1!==e.length&&2!==e.length)throw new Error("validateDates expects 2 date fields");return n.map(n=>{const[t,a]=function(e,n){return n.map(n=>(0,zt.get)(e,n).resultValue)}(n.row,e),r=Wt()(t,Ga),i=Wt()(a,Ga);return i.isBefore(r)?Dge({message:"End date should be equal to or greater than start date.",level:"error"},n,e):i.diff(r,"years",!0)>1?Dge({message:"Date range cannot exceed 1 year.",level:"error"},n,e):Age(n,e)})};function Mke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Vke(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Mke(Object(t),!0).forEach(function(n){zke(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Mke(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zke(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Gke(e,n){return n.map(n=>{const t=Vke({},n);return e.some(e=>Rge(n.row[e].resultValue))?Age(n,e):e.forEach(n=>{Dge({message:"At least one of ".concat(e.join(", ")," should be present."),level:"error"},t,[n])}),t})}function $ke(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.map(n=>{const a=Vke({},n);return e.forEach(e=>{let[r,...i]=e;Rge(n.row[r].resultValue)?i.forEach(e=>{const i=Rge(n.row[e].resultValue),o=!t.allowZeroValues&&0===n.row[e].resultValue;!i||o?Dge({message:"When ".concat(r," is present, ").concat(e," must be specified."),level:"error"},a,[e]):Age(n,[e])}):Age(n,i)}),a})}function Wke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function qke(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Wke(Object(t),!0).forEach(function(n){Jke(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Wke(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Jke(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Yke(e){return!e||""===e||"null"===e||"undefined"===e||""===e.toString().trim()}function Hke(e,n){return n.map(n=>{var t;return null===(t=(0,zt.get)(e,n))||void 0===t?void 0:t.toString().trim()}).join("/")}function Kke(e,n,t){if(n.length<2)throw new Error("Dependency validation requires at least 2 fields");const a=function(e){return e.flatMap(e=>Array.isArray(e)?e:[e])}(n),r=function(e){return e.reduce((e,n)=>{const t=Array.isArray(n)?n:[n];return e.flatMap(e=>t.map(n=>[...e,n]))},[[]])}(n);if(!r.some(n=>n.every(n=>e.every(e=>!Yke((0,zt.get)(e,n))))))throw new Error("Some required fields are missing");const i={};return r.forEach(n=>{e.forEach(e=>{i[Hke(e,n).toLowerCase()]=!0})}),t.map(e=>{const t=qke({},e),o=r.filter(n=>n.every(n=>!Yke((0,zt.get)(e.row,"".concat(n,".resultValue")))));if(0===o.length)return t;if(o.some(n=>{const t=Hke(e.row,n.map(e=>"".concat(e,".resultValue")));return i[t.toLowerCase()]}))Age(t,a);else{const e=n.map(e=>Array.isArray(e)?e.map(zt.capitalize).join(" or "):(0,zt.capitalize)(e));Dge({message:"Incorrect value combination for ".concat(e.join(", "),"."),level:"error"},t,a)}return t})}function Qke(e){let{records:n,fields:t,condition:a,message:r,strategy:i}=e;return n.map(e=>{let n=!0;for(const o of t){const t=e.row;t[o]&&(("allow"===i?!Yke(t[o].value)&&!a(t):Yke(t[o].value)&&a(t))&&(Dge({message:r||"allow"===i?"Must be left empty":"Required",level:"error"},e,[o]),n=!1))}return n&&Age(e,t),e})}function Zke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Xke(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function eje(e){return null==e||"string"==typeof e&&""===e.trim()}function nje(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"quantity (m3)";const a="reading",r=new Map;return e.forEach(e=>{r.set(e.meterId.toLowerCase(),e)}),n.map(e=>{var n,i,o;const l=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Zke(Object(t),!0).forEach(function(n){Xke(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Zke(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},e),s=e.row,c=null===(n=s["meter name"])||void 0===n||null===(n=n.resultValue)||void 0===n||null===(n=n.toString())||void 0===n?void 0:n.trim();if(!c)return l;const d=r.get(c.toLowerCase());if(!d)return l;const u=null===(i=s[t])||void 0===i?void 0:i.resultValue,p=null===(o=s[a])||void 0===o?void 0:o.resultValue,m=!eje(u),f=!eje(p);let y=!0;const g=[t,a];return d.isReadingMeter?f||(Dge({message:'Reading is required for reading meter "'.concat(c,'".'),level:"error"},l,[a]),y=!1):m||(Dge({message:'Quantity is required for consumption meter "'.concat(c,'".'),level:"error"},l,[t]),y=!1),y&&Age(l,g),l})}var tje,aje;function rje(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ije(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rje(Object(t),!0).forEach(function(n){oje(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rje(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function oje(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function lje(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const sje=(0,f.styled)("div")(tje||(tje=lje(["\n  display: flex;\n  align-items: flex-end;\n  gap: 16px;\n  margin-left: 22px;\n"]))),cje=(0,f.styled)(f.Select)(aje||(aje=lje(["\n  width: 250px;\n"]))),dje=["1","2","3"].map(e=>n=>(e=>Qke(qke({strategy:"require"},e)))({records:n,fields:["scope".concat(e,"Emissions")],condition:n=>{var t;return(null===(t=n.scope.value)||void 0===t?void 0:t.toString())===e}}));function uje(e){let{gridApi:n}=e;const t=rt(),{showNotification:a}=vt(),[r,i]=(0,g.useState)("Activity-Based"),[o]=(0,Ot.n)(Eke),l=function(e){const{allCountries:n}=ku();return(0,g.useMemo)(()=>{if("Spend-Based"===e&&(!n||0===n.length))return[];const t=(0,zt.cloneDeep)(_ke);if("Spend-Based"===e){const e=_ke.findIndex(e=>"fromUnit"===e.key),a=_ke.findIndex(e=>"fromUnitToStandardUnitConversionFactor"===e.key),r=_ke.findIndex(e=>"region"===e.key);-1!==e&&(t[e]={key:"fromUnit",type:"select",label:"Currency",description:'Ex. "EUR"',selectOptions:[{label:"USD",value:"USD"},{label:"EUR",value:"EUR"},{label:"GBP",value:"GBP"}],validators:[{validate:"required"}]}),-1!==r&&(t[r]={key:"region",type:"select",label:"Country/Region",description:'Ex. "Global", use "Global" if not country specific',selectOptions:n.map(e=>({label:e.name,value:e.name})),validators:[{validate:"required"}]}),-1!==a&&t.splice(a,1)}return t},[n,e])}(r),s=(0,g.useCallback)(async e=>{try{const i=e.map(qo);await Promise.all(GU()(i,1e3).map(async e=>o({variables:{input:e.map(e=>{var n;return ije(ije({},e),{},{accountId:"Yes"===(null!==(n=e.accountId)&&void 0!==n?n:"Yes")?t:null,method:r})})}}))),n.refreshServerSide({purge:!0}),a("The emission factors have been uploaded!","success")}catch(e){a("Error uploading emission factors: ".concat(e.message),"danger")}},[n,a,o,t,r]);return(0,Ze.jsxs)(sje,{children:[(0,Ze.jsx)(cje,{label:"What type would you like to upload?",value:r,options:[{label:"Activity-Based",value:"Activity-Based"},{label:"Spend-Based",value:"Spend-Based"}],onChange:e=>i(e.value)}),(0,Ze.jsx)(Vxe,{templateUrl:"Activity-Based"===r?Fke:Bke,importIdentifier:"Emission factors",onResults:s,fields:l,bulkRowHooks:dje,tooltip:"Upload",disabled:0===l.length},r)]})}var pje,mje;function fje(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function yje(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fje(Object(t),!0).forEach(function(n){gje(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fje(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function gje(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function bje(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hje=(0,f.styled)("div")(pje||(pje=bje(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  gap: 32px;\n"]))),vje=(0,f.styled)("div")(mje||(mje=bje(["\n  width: 100%;\n  display: flex;\n  gap: 16px;\n"]))),xje=e=>{var n,t,a,r;let{onClose:i,emissionFactor:o,onSuccess:l}=e;const{showNotification:s}=vt(),{control:c,handleSubmit:d,formState:{isDirty:u}}=(0,Rw.mN)({defaultValues:{scope1Emissions:(null===(n=o.scope1Emissions)||void 0===n?void 0:n.toString())||"",scope2Emissions:(null===(t=o.scope2Emissions)||void 0===t?void 0:t.toString())||"",scope3Emissions:(null===(a=o.scope3Emissions)||void 0===a?void 0:a.toString())||"",fromUnitToStandardUnitConversionFactor:(null==o||null===(r=o.fromUnitToStandardUnitConversionFactor)||void 0===r?void 0:r.toString())||"",deprecated:o.deprecated,deprecationReason:o.deprecationReason||""}}),[p,{loading:m}]=(0,Ot.n)(Eke,{onCompleted:()=>{s("Emission factor updated successfully","success"),l(),i()},onError:e=>{s("Failed to update emission factor: ".concat(e.message),"danger")}}),y=()=>{m||i()},g="Activity-Based"===o.method,b=!m&&u;return(0,Ze.jsx)(f.Modal,{open:!0,onClose:y,title:"Edit emission factor",children:(0,Ze.jsx)("form",{onSubmit:d(async e=>{let{fromUnitToStandardUnitConversionFactor:n,scope1Emissions:t,scope2Emissions:a,scope3Emissions:r,deprecated:i,deprecationReason:l}=e;const s=yje(yje({},(0,zt.omit)(o,["factorKey","accountName"])),{},{fromUnitToStandardUnitConversionFactor:n?Number(n):null,scope1Emissions:t?Number(t):null,scope2Emissions:a?Number(a):null,scope3Emissions:r?Number(r):null,deprecated:i,deprecationReason:l});await p({variables:{input:[s]}})}),children:(0,Ze.jsxs)(hje,{children:[(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(f.Text,{typescale:"label",size:"large",children:"Factor Key:"}),(0,Ze.jsx)(f.Text,{typescale:"body",size:"large",children:o.factorKey})]}),(0,Ze.jsx)(Rw.xI,{name:"scope1Emissions",control:c,rules:1===o.scope?{required:"Scope 1 emissions is required"}:void 0,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(f.TextField,yje(yje({},n),{},{type:"number",label:"Scope 1 emissions",fullWidth:!0,error:!(null==t||!t.message),helperText:null==t?void 0:t.message}))}}),(0,Ze.jsx)(Rw.xI,{name:"scope2Emissions",control:c,rules:2===o.scope?{required:"Scope 2 emissions is required"}:void 0,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(f.TextField,yje(yje({},n),{},{type:"number",label:"Scope 2 emissions",fullWidth:!0,error:!(null==t||!t.message),helperText:null==t?void 0:t.message}))}}),(0,Ze.jsx)(Rw.xI,{name:"scope3Emissions",control:c,rules:3===o.scope?{required:"Scope 3 emissions is required"}:void 0,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(f.TextField,yje(yje({},n),{},{type:"number",label:"Scope 3 emissions",fullWidth:!0,error:!(null==t||!t.message),helperText:null==t?void 0:t.message}))}}),(0,Ze.jsx)(Rw.xI,{name:"fromUnitToStandardUnitConversionFactor",control:c,render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,yje(yje({},n),{},{type:"number",label:g?"From unit (".concat(o.fromUnit,") to kg conversion factor"):"Currency (".concat(o.fromUnit,") to £ conversion factor"),fullWidth:!0}))}}),(0,Ze.jsx)(Rw.xI,{name:"deprecated",control:c,render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.Checkbox,yje(yje({},n),{},{disabled:o.deprecated,label:"Deprecated",checked:n.value}))}}),(0,Ze.jsx)(Rw.xI,{name:"deprecationReason",control:c,render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextArea,yje(yje({},n),{},{label:"Deprecation reason",fullWidth:!0}))}}),(0,Ze.jsxs)(vje,{children:[(0,Ze.jsx)(f.Button,{fullWidth:!0,variant:"outlined",onClick:y,disabled:m,children:"Cancel"}),(0,Ze.jsx)(f.Button,{fullWidth:!0,variant:"contained",type:"submit",disabled:!b,loading:m,children:"Update"})]})]})})})};var Tje,Oje;function kje(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const jje=(0,f.styled)(f.Grid)(Tje||(Tje=kje(["\n  display: flex;\n  align-items: center;\n  gap: 8px;\n"]))),Cje=(0,f.styled)(f.AgGrid)(Oje||(Oje=kje(["\n  height: calc(100vh - 216px); // header + page title height;\n  padding-bottom: 2px; // border bottom and shadow to show properly\n"]))),Sje=()=>{var e,n,t;const a=(0,g.useRef)(null),r=(0,N.m)(),i=rt(),o=rc().data.find(e=>e.startsWith("createEmissionFactor")),{showNotification:l}=vt(),[s,c]=(0,g.useState)(null),[d,u]=(0,g.useState)(null),[p]=(0,Ot.n)(Ike,{onCompleted:()=>{var e;l("Emission factor deleted successfully","success"),c(null),null===(e=a.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.refreshServerSide({purge:!0})},onError:e=>{l("Failed to emission factor","danger"),de.Cp(e)}}),m=(0,g.useCallback)(async e=>{try{const{data:{getEmissionFactorsPageFilter:n}}=await r.query({query:Lke,variables:{accountId:i,field:e.colDef.colId||e.colDef.field}});e.success(n.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){l("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning")}},[i,r,l]),y=(0,g.useCallback)(e=>{u(e)},[]),b=(0,g.useCallback)(()=>{s&&p({variables:{id:s}})},[s,p]),h=(0,g.useCallback)(()=>{var e;null===(e=a.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.refreshServerSide({purge:!0})},[]),v=(0,g.useCallback)(()=>{u(null)},[]),[x]=Jm(Pke,{notifyOnNetworkStatusChange:!0,fetchPolicy:"network-only"}),T=(0,g.useMemo)(()=>[{headerName:"Factor Key",field:"factorKey",filter:"agTextColumnFilter"},{headerName:"Source Name",field:"sourceName",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Factor Year",field:"factorYear",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Accounting Method",field:"accountingMethod",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)||"-"}},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)||"-"}},{headerName:"Emission Source",field:"emissionSource",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Emission Source Type",field:"emissionSourceType",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Scope",field:"scope",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Type",field:"type",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Subtype 1",field:"subtype1",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Subtype 2",field:"subtype2",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Subtype 3",field:"subtype3",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"From Unit",field:"fromUnit",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"From Unit to standard unit conversion factor",field:"fromUnitToStandardUnitConversionFactor",filter:"agNumberColumnFilter",width:350},{headerName:"To GHG Unit",field:"toGhgUnit",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Scope 1 Emissions",field:"scope1Emissions",filter:"agNumberColumnFilter"},{headerName:"Scope 2 Emissions",field:"scope2Emissions",filter:"agNumberColumnFilter"},{headerName:"Scope 3 Emissions",field:"scope3Emissions",filter:"agNumberColumnFilter"},{headerName:"Region",field:"region",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Method",field:"method",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Account",field:"accountName",filter:"agSetColumnFilter",filterParams:{values:m,valueFormatter:la}},{headerName:"Deprecated",field:"deprecated",filter:"agSetColumnFilter",valueFormatter:zo,filterParams:Go()},{headerName:"Deprecation Reason",field:"deprecationReason",filter:"agTextColumnFilter"},{headerName:"ID",field:"id",filter:"agTextColumnFilter"},{field:"actions",cellRenderer:e=>(0,Ze.jsx)(jje,{children:o&&(0,Ze.jsx)(f.IconButton,{onClick:()=>y(e.data),children:(0,Ze.jsx)(f.Icons.Edit,{})})})}],[y,m,o]),O=(0,g.useMemo)(()=>({columnDefs:T,rowModelType:"serverSide",serverSideDatasource:{async getRows(e){try{const{startRow:n=0,endRow:t=25,sortModel:a,filterModel:r}=e.request,o=await x({variables:{accountId:i,offset:n,limit:t-n,sort:oa(a),filters:ia(r)}});if(o.error||!o.data)throw o.error||new Error("No data returned from query");const{rows:l,totalRows:s}=o.data.getEmissionFactorsPage;e.success({rowData:l,rowCount:s})}catch(n){e.fail(),de.Cp(n)}}},pagination:!0,paginationPageSize:20}),[i,T,x]);return(0,Ze.jsxs)(f.Page,{title:{content:"Emission Factors (New)",actionButton:(0,Ze.jsxs)(jje,{children:[(0,Ze.jsx)(N$,{filtersApplied:null===(e=a.current)||void 0===e?void 0:e.filtersApplied,resetGridState:null===(n=a.current)||void 0===n?void 0:n.resetGridState}),(null===(t=a.current)||void 0===t?void 0:t.gridApi)&&o&&(0,Ze.jsx)(uje,{gridApi:a.current.gridApi})]})},children:[(0,Ze.jsx)(Cje,{ref:a,gridKey:"".concat(i,"EmissionFactorsNewGridV2"),gridOptions:O}),(0,Ze.jsx)(Z$,{open:!!s,onClose:()=>c(null),onConfirm:b,title:"Delete Emission Factor",body:"Are you sure you want to delete this emission factors?",confirmButtonText:"Delete"}),d&&(0,Ze.jsx)(xje,{onClose:v,emissionFactor:d,onSuccess:h})]})};var Nje,wje;function Dje(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Aje(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dje(Object(t),!0).forEach(function(n){Rje(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dje(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Rje(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Pje(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Lje=(0,Ge.default)(ze.In)(Nje||(Nje=Pje(["\n  cursor: pointer;\n"]))),Ije=Ge.default.div(wje||(wje=Pje(["\n  display: flex;\n  gap: 8px;\n  align-items: center;\n"])));var Eje,_je;function Fje(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Bje=(0,D.J1)(Eje||(Eje=Fje(["\n  query GetAssetFactorsByAccountId(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters!\n  ) {\n    getAssetFactorsByAccountId(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        assetId\n        assetName\n        value\n        referenceLink\n        factorYear\n        name\n      }\n    }\n  }\n"]))),Uje=(0,D.J1)(_je||(_je=Fje(["\n  mutation ImportAssetConversionFactors($assetFactors: [AssetFactorInput!]!, $accountId: ID!) {\n    importAssetConversionFactors(assetFactors: $assetFactors, accountId: $accountId) {\n      created\n      updated\n      deleted\n    }\n  }\n"]))),Mje=()=>{const e=(0,N.m)();return(0,g.useCallback)(async n=>{const{data:t}=await e.query({query:Bje,variables:n,fetchPolicy:"network-only"});return t.getAssetFactorsByAccountId},[e])},Vje=()=>(0,Ot.n)(Uje);var zje;function Gje(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gje(Object(t),!0).forEach(function(n){Wje(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gje(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Wje(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const qje=Ge.default.div(zje||(zje=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n"]))),Jje={pagination:!0,paginationPageSize:25,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}};function Yje(e){let{accountId:n,onGridReady:t,onDelete:a,onEdit:r}=e;const[i,o]=(0,g.useState)(null),l=(e=>{let{onDelete:n,onEdit:t}=e;return(0,g.useMemo)(()=>[{headerName:"ID",field:"id",filter:"agTextColumnFilter"},{headerName:"Asset Name",field:"assetName",filter:"agTextColumnFilter"},{headerName:"Factor Name",field:"name",filter:"agTextColumnFilter"},{headerName:"Factor Value",field:"value",filter:"agNumberColumnFilter"},{headerName:"Factor Year",field:"factorYear",filter:"agNumberColumnFilter"},{headerName:"Reference Link",field:"referenceLink",filter:"agTextColumnFilter",cellRenderer:e=>(0,Ze.jsx)(VJ,{value:e.value})},{headerName:"Actions",field:"actions",filter:!1,sortable:!1,cellRenderer:e=>(0,Ze.jsxs)(Ije,{children:[t&&(0,Ze.jsx)(f.IconButton,{onClick:()=>t(e.data),title:"Edit","aria-label":"Edit",children:(0,Ze.jsx)(f.Icons.Edit,{})}),(0,Ze.jsx)(Lje,{title:"Delete",icon:"trash-alt",onClick:()=>n(Aje(Aje({},(0,zt.omit)(e.data,["__typename","assetName"])),{},{deleted:!0}))})]})}],[n,t])})({onDelete:e=>{o(e)},onEdit:r}),s=Mje();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(qje,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,$je($je({},Jje),{},{columnDefs:l,onGridReady:e=>{t(e),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{const{startRow:t,sortModel:a,filterModel:r}=e.request,{rows:i,totalRows:o}=await s({accountId:n,offset:t||0,limit:Jje.paginationPageSize,sort:oa(a),filters:ia(r)});e.success({rowData:i,rowCount:o})}catch(n){de.Cp(n),e.fail()}}})}}))}),(0,Ze.jsx)(Z$,{open:!!i,onClose:()=>o(null),onConfirm:async()=>{i&&(await a(i),o(null))},title:"Delete asset conversion factor",body:"This will permanently delete the asset conversion factor. Do you want to proceed?",confirmButtonText:"Delete"})]})}const Hje=JSON.parse('[{"key":"assetId","type":"select","label":"Asset ID","validators":[{"validate":"required"}],"description":"ID of the asset","selectOptions":[]},{"key":"name","type":"string","label":"Factor name","validators":[{"validate":"required"}],"description":"Name of the conversion factor"},{"key":"value","type":["number","plain"],"label":"Factor value","validators":[{"validate":"required"}],"description":"The actual value of the factor"},{"key":"factorYear","type":["number","plain"],"label":"Factor year","validators":[{"validate":"required"}],"description":"Year for which this factor applies"},{"key":"referenceLink","type":"string","label":"Reference link","validators":[{"validate":"required"}],"description":"Reference URL or link to the factor source"},{"key":"id","type":"string","label":"ID (optional)","validators":[],"description":"Leave empty to create new. Provide existing record ID to update."}]'),Kje=t.p+"asset-conversion-factors-template-f42815cb175f09b45401.xlsx",Qje=["id"];function Zje(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Xje(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Zje(Object(t),!0).forEach(function(n){eCe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Zje(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function eCe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function nCe(e){let{onCompleted:n}=e;const t=Pu(),a=_u(),{showNotification:r}=vt(),[i]=Vje(),{assets:o,loading:l}=_y(),s=(0,g.useCallback)(async e=>{const a=e.map(e=>{const n=e,{id:t}=n,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,Qje);return t&&String(t).trim()?Xje(Xje({},a),{},{id:String(t).trim()}):a});await i({variables:{assetFactors:a,accountId:null==t?void 0:t.id},onError:e=>{r("Failed to import asset factors: ".concat(e.message))},onCompleted:e=>{var t;const{created:a=0,updated:i=0}=null!==(t=null==e?void 0:e.importAssetConversionFactors)&&void 0!==t?t:{},o=[];a&&o.push("".concat(a," created")),i&&o.push("".concat(i," updated")),r(o.length?o.join(", "):"Asset factors imported successfully"),n()}})},[r,n,i,null==t?void 0:t.id]);if(!a)throw new Error("Configuration is not ready");const c={id:(null==a?void 0:a.id)||"",name:Vo(a),email:null==a?void 0:a.email,companyId:null==t?void 0:t.id,companyName:null==t?void 0:t.name},d=(0,g.useMemo)(()=>Hje.map(e=>"assetId"===e.key?Xje(Xje({},e),{},{selectOptions:o.map(e=>({label:e.externalId?"".concat(e.externalId," - ").concat(e.name):e.name,value:e.id,alternateMatches:[e.name]}))}):e),[o]);return l?(0,Ze.jsx)(f.Loader,{size:32}):(0,Ze.jsx)(VU.A,{licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:c,style:QU.style,settings:Xje(Xje({},QU.settings),{},{importIdentifier:"Asset Conversion Factors",uploadStep:Xje(Xje({},QU.settings.uploadStep),{},{helpText:$U("".concat(kn("REACT_APP_BASE_URL")).concat(Kje))})}),fields:d,onResults:s,children:"+ Upload"})}function tCe(e){var n,t,a,r;let{assetFactor:i,accountId:o,assets:l,open:s,onClose:c,onCompleted:d}=e;const[u,p]=(0,g.useState)(i.assetId),[m,y]=(0,g.useState)(i.name||""),[b,h]=(0,g.useState)(String(null!==(n=i.value)&&void 0!==n?n:"")),[v,x]=(0,g.useState)(String(null!==(t=i.factorYear)&&void 0!==t?t:"")),[T,O]=(0,g.useState)(i.referenceLink||""),[k,{loading:j}]=Vje(),{showNotification:C}=vt();(0,g.useEffect)(()=>{var e,n;s&&(p(i.assetId),y(i.name||""),h(String(null!==(e=i.value)&&void 0!==e?e:"")),x(String(null!==(n=i.factorYear)&&void 0!==n?n:"")),O(i.referenceLink||""))},[s,i]);const S=(0,g.useCallback)(async()=>{try{const e=parseFloat(b),n=parseInt(v,10);if(!T.trim())return void C("Please enter a reference link","danger");if(isNaN(e))return void C("Please enter a valid factor value","danger");if(isNaN(n))return void C("Please enter a valid factor year","danger");await k({variables:{accountId:o,assetFactors:[{id:i.id,assetId:u,name:m.trim(),value:e,factorYear:n,referenceLink:T.trim()}]}}),C("Asset conversion factor updated successfully","success"),d(),c()}catch(e){C("Failed to update asset conversion factor: ".concat(e instanceof Error?e.message:"Unknown error"),"danger")}},[i,o,u,m,b,v,T,k,d,c,C]),N=(0,g.useCallback)(()=>{var e,n;p(i.assetId),y(i.name||""),h(String(null!==(e=i.value)&&void 0!==e?e:"")),x(String(null!==(n=i.factorYear)&&void 0!==n?n:"")),O(i.referenceLink||""),c()},[i,c]),w=u!==i.assetId||m!==(i.name||"")||b!==String(null!==(a=i.value)&&void 0!==a?a:"")||v!==String(null!==(r=i.factorYear)&&void 0!==r?r:"")||T!==(i.referenceLink||""),D=m.trim()&&b.trim()&&v.trim()&&T.trim()&&!isNaN(parseFloat(b))&&!isNaN(parseInt(v,10)),A=l.map(e=>({label:e.externalId?"".concat(e.externalId," - ").concat(e.name):e.name,value:e.id}));return(0,Ze.jsx)(f.Modal,{open:s,onClose:N,title:"Edit Asset Conversion Factor",children:(0,Ze.jsxs)(f.Grid,{container:!0,direction:"column",gap:3,children:[(0,Ze.jsx)(f.Select,{label:"Asset",value:u,onChange:e=>p(e.value),options:A,required:!0}),(0,Ze.jsx)(f.TextField,{label:"Factor Name",value:m,onChange:e=>y(e.target.value),fullWidth:!0,required:!0}),(0,Ze.jsx)(f.TextField,{label:"Factor Value",type:"number",value:b,onChange:e=>h(e.target.value),fullWidth:!0,required:!0}),(0,Ze.jsx)(f.TextField,{label:"Factor Year",type:"number",value:v,onChange:e=>x(e.target.value),fullWidth:!0,required:!0}),(0,Ze.jsx)(f.TextField,{label:"Reference Link",value:T,onChange:e=>O(e.target.value),fullWidth:!0}),(0,Ze.jsxs)(f.Grid,{container:!0,gap:2,justifyContent:"flex-end",children:[(0,Ze.jsx)(f.Button,{variant:"text",onClick:N,disabled:j,children:"Cancel"}),(0,Ze.jsx)(f.Button,{onClick:S,disabled:j||!w||!D,children:"Save"})]})]})})}function aCe(e){let{accountId:n}=e;const t=Mje(),[a,r]=(0,g.useState)(),[i,o]=(0,g.useState)(null),[l]=Vje(),{showNotification:s}=vt(),{assets:c}=_y(),d=(0,g.useCallback)(async e=>{try{var t;await l({variables:{assetFactors:[e],accountId:n}}),s("Asset factor deleted successfully","success"),null==a||null===(t=a.api)||void 0===t||t.refreshServerSide({purge:!0})}catch(e){s("Failed to delete asset factor: ".concat(e),"danger")}},[l,n,s,a]),u=(0,g.useCallback)(e=>{o(e)},[]),p=(0,g.useCallback)(()=>{var e;null==a||null===(e=a.api)||void 0===e||e.refreshServerSide({purge:!0})},[a]),m=(0,g.useCallback)(()=>{o(null)},[]);return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{icon:"calculator",iconColor:"primary",title:"Asset Conversion Factors",children:[(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(MP,{fetchRows:t,gridApi:null==a?void 0:a.api,defaultExportFileName:"asset-conversion-factors",columnsToSkip:["Actions"],label:"Export"})}),(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(nCe,{onCompleted:()=>{var e;return null==a||null===(e=a.api)||void 0===e?void 0:e.refreshServerSide({purge:!0})}})})]}),(0,Ze.jsx)(Yje,{accountId:n,onGridReady:r,onDelete:d,onEdit:u}),i&&(0,Ze.jsx)(tCe,{assetFactor:i,accountId:n,assets:c,open:!0,onClose:m,onCompleted:p})]})}var rCe,iCe,oCe;function lCe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const sCe=(0,D.J1)(rCe||(rCe=lCe(["\n  query GetFundFMVsByAccountId(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getFundFMVsByAccountId(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        fundId\n        fundName\n        accountId\n        value\n        startDate\n        endDate\n      }\n    }\n  }\n"]))),cCe=(0,D.J1)(iCe||(iCe=lCe(["\n  mutation ImportFundFMVs($fundFMVs: [FundFMVInput!]!, $accountId: ID!) {\n    importFundFMVs(fundFMVs: $fundFMVs, accountId: $accountId) {\n      deleted\n      created\n      updated\n    }\n  }\n"]))),dCe=(0,D.J1)(oCe||(oCe=lCe(["\n  query GetFundFMVsFilter($field: String!, $accountId: ID!) {\n    getFundFMVsFilter(field: $field, accountId: $accountId) {\n      label\n      value\n    }\n  }\n"])));var uCe,pCe;function mCe(){const[e]=(0,gs._)(sCe,{fetchPolicy:"network-only"});return async n=>{var t;const a=await e({variables:n});if(null===(t=a.data)||void 0===t||!t.getFundFMVsByAccountId)throw new Error("Failed to fetch fund FMVs");const{rows:r,totalRows:i}=a.data.getFundFMVsByAccountId;return{rows:r,totalRows:i||0}}}function fCe(){return(0,Ot.n)(cCe)}function yCe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gCe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yCe(Object(t),!0).forEach(function(n){bCe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yCe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function bCe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function hCe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const vCe=(0,Ge.default)(ze.In)(uCe||(uCe=hCe(["\n  cursor: pointer;\n"]))),xCe=Ge.default.div(pCe||(pCe=hCe(["\n  display: flex;\n  gap: 8px;\n  align-items: center;\n"])));var TCe;function OCe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kCe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?OCe(Object(t),!0).forEach(function(n){jCe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):OCe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jCe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const CCe=Ge.default.div(TCe||(TCe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n"]))),SCe={pagination:!0,paginationPageSize:25,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}};function NCe(e){let{accountId:n,onGridReady:t,onDeleteFundFMV:a,onEdit:r}=e;const i=mCe(),o=(e=>{let{onDelete:n,onEdit:t}=e;const a=rt(),{showNotification:r}=vt(),[i]=(0,gs._)(dCe,{fetchPolicy:"network-only"}),o=(0,g.useCallback)(async e=>{try{var n;const t=e.colDef.field||e.colDef.colId;if(!t)throw new Error("Unfilterable column");const r=((null===(n=(await i({variables:{accountId:a,field:t}})).data)||void 0===n?void 0:n.getFundFMVsFilter)||[]).map(e=>e.value?JSON.stringify(Gt().omit(e,"__typename")):e.value);e.success(r)}catch(n){r("Couldn't load filter values for column ".concat(e.colDef.field,": ").concat(n),"danger")}},[i,a,r]);return(0,g.useMemo)(()=>[{headerName:"ID",field:"id",filter:"agTextColumnFilter"},{headerName:"Fund",field:"fundName",filter:"agSetColumnFilter",filterParams:{values:o,valueFormatter:la,cache:!1,refreshValuesOnOpen:!0}},{headerName:"Start Date",field:"startDate",valueFormatter:da,filter:"agDateColumnFilter"},{headerName:"End Date",field:"endDate",valueFormatter:da,filter:"agDateColumnFilter"},{headerName:"Value",field:"value",filter:"agNumberColumnFilter"},{headerName:"Actions",field:"actions",filter:!1,sortable:!1,cellRenderer:e=>(0,Ze.jsxs)(xCe,{children:[t&&(0,Ze.jsx)(f.IconButton,{onClick:()=>t(e.data),title:"Edit","aria-label":"Edit",children:(0,Ze.jsx)(f.Icons.Edit,{})}),(0,Ze.jsx)(vCe,{title:"Delete",icon:"trash-alt",onClick:()=>n(gCe(gCe({},(0,zt.omit)(e.data,["__typename","fundName","accountId"])),{},{deleted:!0}))})]})}],[o,n,t])})({onDelete:a,onEdit:r}),l=(0,g.useCallback)(e=>{t(e),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{const{startRow:t,sortModel:a,filterModel:r}=e.request,{rows:o,totalRows:l}=await i({accountId:n,offset:t||0,limit:SCe.paginationPageSize,sort:oa(a),filters:ia(r)});e.success({rowData:o,rowCount:l})}catch(n){e.fail()}}})},[i,n,t]);return(0,Ze.jsx)(CCe,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,kCe(kCe({},SCe),{},{columnDefs:o,onGridReady:l}))})}const wCe=JSON.parse('{"O":[{"key":"startDate","type":["date",{"displayFormat":"dd/MM/yyyy"}],"label":"Start date (dd/mm/yyyy)","validators":[{"validate":"required"}]},{"key":"endDate","type":["date",{"displayFormat":"dd/MM/yyyy"}],"label":"End date (dd/mm/yyyy)","validators":[{"validate":"required"}],"description":"If left empty, the fund FMV is valid indefinitely"},{"key":"value","type":["number","plain"],"label":"Value","validators":[{"validate":"required"}]},{"key":"fundId","type":"select","label":"Fund","validators":[{"validate":"required"}],"selectOptions":[]},{"key":"id","type":"string","label":"ID (optional)","validators":[],"description":"Leave empty to create new. Provide existing record ID to update."}]}'),DCe=["id"];function ACe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function RCe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ACe(Object(t),!0).forEach(function(n){PCe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ACe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function PCe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function LCe(e){let{onCompleted:n}=e;const t=Pu(),a=rt(),r=_u(),{data:i}=function(){const e=rt(),{data:{getFundsByAccountId:n=[]}={},loading:t,error:a}=(0,h.IT)(Sy,{variables:{accountId:e,limit:1e3,filters:{set:[{values:["0"],filterType:"set",field:"deleted"}]}},fetchPolicy:"network-only"}),r=n.rows;return{data:(0,zt.orderBy)(r,["name"],["asc"]),loading:t,error:a}}(),{showNotification:o}=vt(),[l]=fCe(),s=(0,g.useCallback)(e=>{const t=e.map(e=>{const{id:n}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,DCe);return n&&String(n).trim()?RCe(RCe({},t),{},{id:String(n).trim()}):t});l({variables:{fundFMVs:t,accountId:a},onCompleted:()=>{o("Import completed"),n()}})},[l,a,o,n]);if(!r)throw new Error("Configuration is not ready");const c={id:(null==r?void 0:r.id)||"",name:Vo(r),email:null==r?void 0:r.email,companyId:a,companyName:null==t?void 0:t.name},d=(0,g.useMemo)(()=>wCe.O.map(e=>"fundId"===e.key?RCe(RCe({},e),{},{selectOptions:i.map(e=>({label:e.name,value:e.id}))}):e),[i]);return(0,Ze.jsx)(VU.A,{licenseKey:kn("REACT_APP_DROMO_LICENSE_KEY"),user:c,style:QU.style,settings:RCe(RCe({},QU.settings),{},{importIdentifier:"Investment Fund FMVs"}),fields:d,onResults:s,children:"+ Upload fund FMVs"})}function ICe(e){var n,t;let{fundFMV:a,accountId:r,onClose:i,onCompleted:o}=e;const[l,s]=(0,g.useState)(a.startDate||""),[c,d]=(0,g.useState)(a.endDate||""),[u,p]=(0,g.useState)(String(null!==(n=a.value)&&void 0!==n?n:"")),[m,{loading:y}]=fCe(),{showNotification:b}=vt(),h=(0,g.useCallback)(async()=>{try{const e=parseFloat(u);if(isNaN(e))return void b("Please enter a valid value","danger");await m({variables:{accountId:r,fundFMVs:[{id:a.id,fundId:a.fundId,startDate:l,endDate:c,value:e}]}}),b("Fund FMV updated successfully","success"),o(),i()}catch(e){b("Failed to update fund FMV: ".concat(e instanceof Error?e.message:"Unknown error"),"danger")}},[a,r,l,c,u,m,o,i,b]),v=l!==(a.startDate||"")||c!==(a.endDate||"")||u!==String(null!==(t=a.value)&&void 0!==t?t:""),x=l.trim()&&c.trim()&&u.trim()&&!isNaN(parseFloat(u));return(0,Ze.jsx)(f.Modal,{open:!0,onClose:i,title:"Edit Fund FMV",children:(0,Ze.jsxs)(f.Grid,{container:!0,direction:"column",gap:3,children:[(0,Ze.jsx)(f.TextField,{label:"Fund",value:a.fundName,disabled:!0,fullWidth:!0}),(0,Ze.jsx)(f.DatePicker,{label:"Start Date",value:l,onChange:e=>s(e),format:"DD/MM/YYYY"}),(0,Ze.jsx)(f.DatePicker,{label:"End Date",value:c,onChange:e=>d(e),format:"DD/MM/YYYY"}),(0,Ze.jsx)(f.TextField,{label:"Value",type:"number",value:u,onChange:e=>p(e.target.value),fullWidth:!0,required:!0}),(0,Ze.jsxs)(f.Grid,{container:!0,gap:2,justifyContent:"flex-end",children:[(0,Ze.jsx)(f.Button,{variant:"text",onClick:i,disabled:y,children:"Cancel"}),(0,Ze.jsx)(f.Button,{onClick:h,disabled:y||!v||!x,children:"Save"})]})]})})}function ECe(){const e=rt(),n=mCe(),[t,a]=(0,g.useState)(),[r,i]=(0,g.useState)(null),o=function(){const e=rt(),[n]=(0,Ot.n)(cCe);return async(t,a)=>{await n({variables:{fundFMVs:[t],accountId:e},onCompleted:()=>{null==a||a()}})}}(),l=(0,g.useCallback)(e=>{o(e,()=>{var e;null==t||null===(e=t.api)||void 0===e||e.refreshServerSide({purge:!0})})},[o,t]),s=(0,g.useCallback)(e=>{i(e)},[]),c=(0,g.useCallback)(()=>{var e;null==t||null===(e=t.api)||void 0===e||e.refreshServerSide({purge:!0})},[t]),d=(0,g.useCallback)(()=>{i(null)},[]),u=(0,g.useCallback)(()=>{var e;null==t||null===(e=t.api)||void 0===e||e.refreshServerSide({purge:!0})},[t]);return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsxs)(bh,{icon:"business-time",iconColor:"primary",title:"Fund FMVs management",children:[(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(MP,{fetchRows:n,gridApi:null==t?void 0:t.api,defaultExportFileName:"fund-fmvs",columnsToSkip:["Actions"],label:"Export"})}),(0,Ze.jsx)(ze.fv,{span:4,container:!0,item:!0,children:(0,Ze.jsx)(LCe,{onCompleted:u})})]}),(0,Ze.jsx)(NCe,{accountId:e,onGridReady:a,onDeleteFundFMV:l,onEdit:s}),r&&(0,Ze.jsx)(ICe,{fundFMV:r,accountId:e,onClose:d,onCompleted:c})]})}var _Ce,FCe,BCe,UCe,MCe;function VCe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const zCe=Ge.default.div(_Ce||(_Ce=VCe(["\n  height: 100%;\n  overflow: hidden;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),GCe=Ge.default.div(FCe||(FCe=VCe(["\n  flex: 1 1 auto;\n  background-color: ",";\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"])),e=>e.theme.colors.basic.white),$Ce=(0,Ge.default)(ze.KH)(BCe||(BCe=VCe(["\n  overflow: auto;\n"]))),WCe=(0,Ge.default)(ze.fI)(UCe||(UCe=VCe(["\n  height: 100%;\n"]))),qCe=(0,Ge.default)(ze.fv)(MCe||(MCe=VCe(["\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),JCe=(0,Ye.Ay)(e=>{var n,t,a,r;const{massUploadFunction:i,setCreateMutation:o,intl:l}=e,s=rc(),{licenceService:c,learnService:d}=s,u=Pu(),p=rt(),f=oc(),y=f.configuration.root,g=f.configuration.menu.organisation,b=[Vt.gG.Sysadmin,Vt.gG.Businessadmin,Vt.gG.Consultant,Vt.gG.Business].includes(s.role)&&(null==u||null===(n=u.accessControls)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.oilAndGas),h=oxe(),v=(null==u||null===(t=u.accessControls)||void 0===t?void 0:t.organisation)&&(h.canGetOrganisationalUnit||h.canGetOrganisationalHierarchy||h.canGetOrganisationalUnitLocationAttachment||h.canGetUserAccessPolicy||h.canGetUserGroup),x=d.createCourse,T=d.createCourse||c.createLicence||c.assignLicence,O=d.createCourse,k=x||T||O;return(0,Ze.jsx)(zCe,{children:(0,Ze.jsxs)(WCe,{container:!0,item:!0,children:[(0,Ze.jsx)(qCe,{container:!0,item:!0,span:3,children:(0,Ze.jsxs)($Ce,{id:"pic",name:"configuration-menu",inline:!0,size:"md",icon:"cog",text:(0,Ze.jsx)(Je.A,{id:"pages.configuration.nav.heading"}),children:[!!s.allowedRioModules.includes(Vt.zB.Configuration)&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--accounts",to:"../configuration/accountconfig/accounts",base:"configuration/accountconfig",children:(0,Ze.jsxs)(ze.C8,{text:"Account Configuration",dropdown:!0,children:[!!s.user.includes("createAll")&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--accounts",to:"accountconfig/accounts",base:"configuration/accountconfig/accounts",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.accounts"})})}),(0,Ze.jsxs)(Ze.Fragment,{children:[!!s.data.find(e=>e.startsWith("getLocation"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--locations",to:"../configuration/accountconfig/locations",base:"configuration/accountconfig/locations",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.locations"})})}),!!s.data.find(e=>e.startsWith("createEnergySource"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--meters",to:"../configuration/accountconfig/meters",base:"configuration/accountconfig/meters",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.meters"})})}),!!s.data.find(e=>e.startsWith("createNormaliser"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--normalisers",to:"../configuration/accountconfig/normalisers",base:"configuration/accountconfig/normalisers",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.normalisers"})})}),Boolean(s.scheme.find(e=>e.startsWith("get")))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--schemes",to:"../configuration/accountconfig/schemes",base:"configuration/accountconfig/schemes",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.schemes"})})}),!!s.tag.find(e=>e.startsWith("create"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--tags",to:"../configuration/accountconfig/tags",base:"configuration/accountconfig/tags",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.tags"})})}),!!s.user.find(e=>e.startsWith("create"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--users",to:"../configuration/accountconfig/users",base:"configuration/accountconfig/users",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.users"})})})]})]})}),b&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--api",to:"../configuration/api/conversion-factors",base:"configuration/api",children:(0,Ze.jsxs)(ze.C8,{text:"American Petroleum Institute",dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"configuration-menu__item--api-conversion-factors",to:"../configuration/api/conversion-factors",base:"configuration/api/conversion-factors",children:(0,Ze.jsx)(ze.nc,{text:"Conversion Factors"})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--uncertainties-background",to:"../configuration/api/uncertainties-background",base:"configuration/api/uncertainties-background",children:(0,Ze.jsx)(ze.nc,{text:"Uncertainties Background"})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--gas-compositions",to:"../configuration/api/gas-compositions",base:"configuration/api/gas-compositions",children:(0,Ze.jsx)(ze.nc,{text:"Gas Composition"})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--gas-composition-uncertainties",to:"../configuration/api/gas-composition-uncertainties",base:"configuration/api/gas-composition-uncertainties",children:(0,Ze.jsx)(ze.nc,{text:"Gas Composition Uncertainties"})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--oil-producing-assets",to:"../configuration/api/location-asset-data",base:"configuration/api/location-asset-data",children:(0,Ze.jsx)(ze.nc,{text:"Oil Producing Assets"})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--liquid-fuel-conversion-factors",to:"../configuration/api/liquid-fuel-conversion-factors",base:"configuration/api/liquid-fuel-conversion-factors",children:(0,Ze.jsx)(ze.nc,{text:"Liquid Fuel Conversion Factors"})})]})}),!(null==u||null===(a=u.accessControls)||void 0===a||null===(a=a.data)||void 0===a||!a.coreEstate)&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--core-estates",to:"../configuration/core-estates/estates",base:"configuration/core-estates",children:(0,Ze.jsx)(ze.C8,{text:"Core Estates",dropdown:!0,children:(0,Ze.jsx)(XN,{name:"configuration-menu__item--estates",to:"../configuration/core-estates/estates",base:"configuration/core-estates/estates",children:(0,Ze.jsx)(ze.nc,{text:"Estates Configuration"})})})}),!!s.invest.find(e=>e.startsWith("import"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--funds",to:"../configuration/portfoliomanagement/funds",base:"configuration/portfoliomanagement",children:(0,Ze.jsxs)(ze.C8,{text:"Portfolio Management",dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"configuration-menu__item--funds",to:"../configuration/portfoliomanagement/funds",base:"configuration/portfoliomanagement/funds",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.funds"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--fund-fmvs",to:"../configuration/portfoliomanagement/fund-fmvs",base:"configuration/portfoliomanagement/fund-fmvs",children:(0,Ze.jsx)(ze.nc,{text:"Fund FMVs"})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--assets",to:"../configuration/portfoliomanagement/asset-management",base:"configuration/portfoliomanagement/asset-management",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.assetManagement"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--assets",to:"../configuration/portfoliomanagement/asset-conversion-factors",base:"configuration/portfoliomanagement/asset-conversion-factors",children:(0,Ze.jsx)(ze.nc,{text:"Asset Conversion Factors"})})]})}),s.data.find(e=>e.startsWith("getCarbonConversionFactor"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--carbon-conversion-factors",to:"../configuration/carbonconversionfactors/location",base:"configuration/carbonconversionfactors",children:(0,Ze.jsxs)(ze.C8,{text:l.formatMessage({id:"pages.configuration.nav.carbonConversionFactors"}),dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"configuration-menu__item--carbon-conversion-factors",to:"../configuration/carbonconversionfactors/location",base:"configuration/carbonconversionfactors/location",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.locationBased"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--market-carbon-conversion-factors",to:"../configuration/carbonconversionfactors/market",base:"configuration/carbonconversionfactors/market",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.marketBased"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--emission-factors-new",to:"../configuration/carbonconversionfactors/emission-factors-new",base:"configuration/carbonconversionfactors/emission-factors-new",children:(0,Ze.jsx)(ze.nc,{text:"Emission Factors (New)"})})]})}),s.dashboard.includes("createAll")&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--dashboards",to:"../configuration/dashboardconfig/dashboards",base:"configuration/dashboardconfig",children:(0,Ze.jsxs)(ze.C8,{text:"Dashboard Configuration",dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"configuration-menu__item--dashboards",to:"../configuration/dashboardconfig/dashboards",base:"configuration/dashboardconfig/dashboards",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.dashboards.list"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--dashboardSubscriptions",to:"../configuration/dashboardconfig/subscriptions",base:"configuration/dashboardconfig/subscriptions",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.dashboards.subscriptions"})})})]})}),Boolean(s.dataTracker.find(e=>e.startsWith("get")))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--dataTracker",to:"../configuration/datatracker/frequency-recurrence",base:"configuration/datatracker",children:(0,Ze.jsxs)(ze.C8,{text:"Data Tracker Configuration",dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"configuration-menu__item--dataTracker",to:"../configuration/datatracker/frequency-recurrence",base:"configuration/datatracker/frequency-recurrence",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.dataTracker.container.header.missing"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--dataTracker",to:"../configuration/datatracker/anomaliesthresholds",base:"configuration/datatracker/anomaliesthresholds",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.dataTracker.container.header.anomaly"})})})]})}),k&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--learnconfig",to:"../configuration/learnconfig/learncontent",base:"configuration/learnconfig",children:(0,Ze.jsxs)(ze.C8,{text:"Engage Configuration",dropdown:!0,children:[x&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--learn",to:"../configuration/learnconfig/learncontent",base:"configuration/learnconfig/learncontent",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.learnContent"})})}),T&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--learnSubscriptions",to:"../configuration/learnconfig/learnsubscriptions",base:"configuration/learnconfig/learnsubscriptions",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.learnSubscriptions"})})}),O&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--learnEvaluations",to:"../configuration/learnconfig/evaluations",base:"configuration/learnconfig/evaluations",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.evaluations"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--learnBanners",to:"../configuration/learnconfig/banners",base:"configuration/learnconfig/banners",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.engageBanners"})})})]})}),s.flows.find(e=>e.startsWith("configureFlows"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--flows",to:"../configuration/flows/flows",base:"configuration/flows",children:(0,Ze.jsxs)(ze.C8,{text:"Flows",dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"configuration-menu__item--flows",to:"../configuration/flows/flows",base:"configuration/flows/flows",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.flows.configuration"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--flows-subscriptions",to:"../configuration/flows/subscriptions",base:"configuration/flows/subscriptions",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.flows.subscriptions"})})})]})}),s.governance.includes("createLegislationAll")&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--govconfig",to:"../configuration/governanceconfig/managementsubscriptions",base:"configuration/governanceconfig",children:(0,Ze.jsxs)(ze.C8,{text:"Governance Configuration",dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"configuration-menu__item--legislation",to:"../configuration/governanceconfig/legislation",base:"configuration/governanceconfig/legislation",children:(0,Ze.jsx)(ze.nc,{text:"Legislation"})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--mss",to:"../configuration/governanceconfig/managementsubscriptions",base:"configuration/governanceconfig/managementsubscriptions",children:(0,Ze.jsx)(ze.nc,{text:"Management Systems Subscriptions"})})]})}),s.intelligence.includes("getAllKnowledgeBasesAll")&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--intelconfig",to:"../configuration/intelligenceconfig/knowledgebases",base:"configuration/intelligenceconfig",children:(0,Ze.jsxs)(ze.C8,{text:"Intelligence Configuration",dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"configuration-menu__item--kbs",to:"../configuration/intelligenceconfig/knowledgebases",base:"configuration/intelligenceconfig/knowledgebases",children:(0,Ze.jsx)(ze.nc,{text:"Knowledge Bases"})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--kbsubscriptions",to:"../configuration/intelligenceconfig/kbsubscriptions",base:"configuration/intelligenceconfig/kbsubscriptions",children:(0,Ze.jsx)(ze.nc,{text:"KB Subscriptions"})})]})}),s.ocr.includes("createTemplateAll")&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--ocr",to:"../configuration/ocr",base:"configuration/ocr",children:(0,Ze.jsx)(ze.C8,{text:"OCR Templates"})}),s.data.find(e=>e.startsWith("createSupplier"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--mySuppliers",to:"../configuration/suppliers",base:"configuration/suppliers",children:(0,Ze.jsx)(ze.C8,{text:l.formatMessage({id:"pages.configuration.nav.suppliers"})})}),s.survey.find(e=>e.startsWith("createSurveyTemplate"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--surveys",to:"../configuration/surveys/templates",base:"configuration/surveys",children:(0,Ze.jsxs)(ze.C8,{text:"Surveys",dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"configuration-menu__item--form",to:"../configuration/surveys/templates",base:"configuration/surveys/templates",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.formTemplates"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--survey-subscriptions-link",to:"../configuration/surveys/subscriptions",base:"configuration/surveys/subscriptions",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.formSubscriptions"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--survey-questions-link",to:"../configuration/surveys/questions",base:"configuration/surveys/questions",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.questions"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--survey-questions-categories-link",to:"../configuration/surveys/question-categories",base:"configuration/surveys/question-categories",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.questionsCategories"})})})]})}),s.data.find(e=>e.startsWith("createWasteStream"))&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--wasteconfig",to:"../configuration/wasteconfig/containertypes",base:"configuration/wasteconfig",children:(0,Ze.jsxs)(ze.C8,{text:"Waste Configuration",dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"configuration-menu__item--waste",to:"../configuration/wasteconfig/containertypes",base:"configuration/wasteconfig/containertypes",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.containerTypes"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--wastestream",to:"../configuration/wasteconfig/wastestream",base:"configuration/wasteconfig/wastestream",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.wasteStreams"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--wasteHierarchy",to:"../configuration/wasteconfig/wastehierarchies",base:"configuration/wasteconfig/wastehierarchies",children:(0,Ze.jsx)(ze.nc,{text:l.formatMessage({id:"pages.configuration.nav.wasteHierarchies"})})}),(0,Ze.jsx)(XN,{name:"configuration-menu__item--wasteHierarchyNew",to:"../configuration/wasteconfig/waste-hierarchies-new",base:"configuration/wasteconfig/waste-hierarchies-new",children:(0,Ze.jsx)(ze.nc,{text:"Waste Hierarchies (New)"})})]})}),v&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--organization",to:"../".concat(y,"/").concat(g.organisationalUnits),base:"".concat(y,"/").concat(g.root),children:(0,Ze.jsxs)(ze.C8,{text:"Organisation",dropdown:!0,children:[h.canGetOrganisationalUnit&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--organisational_units",to:"../".concat(y,"/").concat(g.organisationalUnits),base:"".concat(y,"/").concat(g.organisationalUnits),children:(0,Ze.jsx)(ze.nc,{text:"Organisational Units"})}),h.canGetOrganisationalHierarchy&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--organisational_hierarchies",to:"../".concat(y,"/").concat(g.organisationalHierarchies),base:"".concat(y,"/").concat(g.organisationalHierarchies),children:(0,Ze.jsx)(ze.nc,{text:"Organisational Hierarchies"})}),h.canGetOrganisationalUnitLocationAttachment&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--organisational_unit_location_attachments",to:"../".concat(y,"/").concat(g.locationAttachments),base:"".concat(y,"/").concat(g.locationAttachments),children:(0,Ze.jsx)(ze.nc,{text:"Location Attachments"})}),h.canGetUserAccessPolicy&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--access_policies",to:"../".concat(y,"/").concat(g.accessPolicies),base:"".concat(y,"/").concat(g.accessPolicies),children:(0,Ze.jsx)(ze.nc,{text:"Access Policies"})}),h.canGetUserGroup&&(0,Ze.jsx)(XN,{name:"configuration-menu__item--user_groups",to:"../".concat(y,"/").concat(g.userGroups),base:"".concat(y,"/").concat(g.userGroups),children:(0,Ze.jsx)(ze.nc,{text:"User Groups"})})]})})]})}),(0,Ze.jsx)(ze.fv,{container:!0,inline:!0,span:9,children:(0,Ze.jsx)(GCe,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:f.configuration.menu.accounts,element:(0,Ze.jsx)(fE,{})}),(0,Ze.jsx)(m.qh,{path:"api/conversion-factors",element:(0,Ze.jsx)(Qhe,{})}),(0,Ze.jsx)(m.qh,{path:"api/uncertainties-background",element:(0,Ze.jsx)(lve,{})}),(0,Ze.jsx)(m.qh,{path:"api/gas-compositions",element:(0,Ze.jsx)(Yge,{})}),(0,Ze.jsx)(m.qh,{path:"api/gas-composition-uncertainties",element:(0,Ze.jsx)(cbe,{})}),(0,Ze.jsx)(m.qh,{path:"core-estates/estates",element:null!=u&&null!==(r=u.accessControls)&&void 0!==r&&null!==(r=r.data)&&void 0!==r&&r.coreEstate?(0,Ze.jsx)(Zbe,{}):(0,Ze.jsx)(m.C5,{to:f.configuration.menu.accounts})}),(0,Ze.jsx)(m.qh,{path:"api/location-asset-data",element:(0,Ze.jsx)(zhe,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:"api/liquid-fuel-conversion-factors",element:(0,Ze.jsx)(bve,{})}),(0,Ze.jsx)(m.qh,{path:"api",element:(0,Ze.jsx)(m.C5,{to:"api/conversion-factors"})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.tracker.frequency,element:(0,Ze.jsx)(fpe,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.tracker.anomolies,element:(0,Ze.jsx)(tme,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.locations,element:(0,Ze.jsx)(FM,{accountId:p,massUploadFunction:i,setCreateMutation:o})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.meters,element:(0,Ze.jsx)(iK,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.normalisers,element:(0,Ze.jsx)(l7,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.schemes,element:(0,Ze.jsx)(j$,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.tags,element:(0,Ze.jsx)(vG,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.users,element:(0,Ze.jsx)(KP,{accountId:p,massUploadFunction:i,setCreateMutation:o})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.portfolio.assets,element:(0,Ze.jsx)(wfe,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.portfolio.assetConversionFactors,element:(0,Ze.jsx)(aCe,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.portfolio.funds,element:(0,Ze.jsx)(Jfe,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.portfolio.fundFMVs,element:(0,Ze.jsx)(ECe,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.aliases.waste,element:(0,Ze.jsx)(_8,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.aliases.meters,element:(0,Ze.jsx)(B8,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.aliases.transport,element:(0,Ze.jsx)(M8,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.aliases.location,element:(0,Ze.jsx)(z8,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.aliases.others,element:(0,Ze.jsx)($8,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.emissionFactorsNew,element:(0,Ze.jsx)(Sje,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(f.configuration.factors.location,"/*"),element:(0,Ze.jsx)(wre,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.factors.market,element:(0,Ze.jsx)(Sie,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.suppliers,element:(0,Ze.jsx)(I4,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.contractors,element:(0,Ze.jsx)(CF,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.containerTypes,element:(0,Ze.jsx)(Noe,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.surveys.templates,element:(0,Ze.jsx)(f_,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.surveys.subscriptions,element:(0,Ze.jsx)(Ace,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.surveys.questions,element:(0,Ze.jsx)(vde,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.surveys.categories,element:(0,Ze.jsx)(pue,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.flows.root,element:(0,Ze.jsx)(ime,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.wasteStream,element:(0,Ze.jsx)(lz,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.hierarchies,element:(0,Ze.jsx)(RJ,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.hierarchiesNew,element:(0,Ze.jsx)(bq,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.dashboards.root,element:(0,Ze.jsx)(B9,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.dashboards.subscriptions,element:(0,Ze.jsx)(RX,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:"".concat(f.configuration.menu.dashboards.subscriptions,"/:accountId"),element:(0,Ze.jsx)(s0,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.flows.subscriptions,element:(0,Ze.jsx)(Ume,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(f.configuration.menu.flows.subscriptions,"/:accountId"),element:(0,Ze.jsx)(efe,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.learn.content,element:(0,Ze.jsx)(SZ,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.learn.subscriptions,element:(0,Ze.jsx)(qZ,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(f.configuration.menu.learn.subscriptions,"/:accountId"),element:(0,Ze.jsx)(O1,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.learn.assignLicense,element:(0,Ze.jsx)(Mw,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.learn.createLicense,element:(0,Ze.jsx)(OD,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.learn.evaluations,element:(0,Ze.jsx)(xX,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.learn.banners,element:(0,Ze.jsx)(pge,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.governance.legislation,element:(0,Ze.jsx)(ble,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:"".concat(f.configuration.menu.governance.legislation,"/:legislationId"),element:(0,Ze.jsx)(Ule,{accountId:p})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.governance.management,element:(0,Ze.jsx)(Qle,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(f.configuration.menu.governance.management,"/:accountId"),element:(0,Ze.jsx)(bse,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.intelligence.knowledgebases,element:(0,Ze.jsx)(_ee,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.intelligence.subscriptions,element:(0,Ze.jsx)(jse,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(f.configuration.menu.intelligence.subscriptions,"/:accountId"),element:(0,Ze.jsx)(qse,{})}),(0,Ze.jsx)(m.qh,{path:f.configuration.menu.ocr,element:(0,Ze.jsx)(Ine,{})}),(0,Ze.jsx)(m.qh,{path:g.organisationalUnits,element:(0,Ze.jsx)(Kxe,{})}),(0,Ze.jsx)(m.qh,{path:g.organisationalHierarchies,element:(0,Ze.jsx)(BTe,{})}),(0,Ze.jsx)(m.qh,{path:g.locationAttachments,element:(0,Ze.jsx)(VOe,{})}),(0,Ze.jsx)(m.qh,{path:g.accessPolicies,element:(0,Ze.jsx)(sxe,{})}),(0,Ze.jsx)(m.qh,{path:g.userGroups,element:(0,Ze.jsx)(Ske,{})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:f.configuration.menu.accounts})})]})})})]})},p)});var YCe;const HCe=(0,D.J1)(YCe||(YCe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetKnowledgeBasesForAccount($accountId: ID!) {\n    getKnowledgeBasesForAccount(accountId: $accountId) {\n      id\n      externalID\n      title\n      synopsis\n      demoMode\n    }\n  }\n"])));var KCe;const QCe=(0,D.J1)(KCe||(KCe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetLandbotId {\n    getLandbotId\n  }\n"])));var ZCe,XCe,eSe,nSe,tSe=t(3892),aSe=t(77654),rSe=t(41991);function iSe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const oSe=(0,Ge.default)(ze.DZ)(ZCe||(ZCe=iSe(["\n  display: flex;\n  align-items: center;\n  font-size: 16px;\n  ","\n"])),e=>e.active?"\n    color: white;\n  ":""),lSe=(0,Ge.default)(ze.To)(XCe||(XCe=iSe(["\n  padding-top: 10px;\n  overflow: hidden;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n  ","\n"])),e=>e.active?"\n    color: white;\n  ":""),sSe=(0,Ge.css)(eSe||(eSe=iSe(["\n  &:before {\n    top: -1px;\n    left: 0;\n    right: 0;\n    height: 1px;\n    content: '';\n    opacity: 1;\n    position: absolute;\n    transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n    background-color: rgba(0, 0, 0, 0.12);\n  }\n"]))),cSe=(0,Ge.css)(nSe||(nSe=iSe(["\n  padding: 16px 24px;\n  cursor: pointer;\n  text-align: left;\n  text-overflow: ellipsis;\n  word-wrap: break-word;\n  overflow-wrap: break-word;\n  white-space: initial;\n  overflow: visible;\n  font-style: initial;\n  font-size: 16px;\n  line-height: 1.4em;\n  font-family: 'Proxima Nova', Helvetica, Arial, sans-serif;\n  font-weight: 600;\n  background-color: ",";\n  color: #4d505b;\n"])),e=>e.active?e.theme.colors.tertiary.light.background:"white");var dSe,uSe;function pSe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const mSe=(0,Ge.default)(tSe.A)(dSe||(dSe=pSe(["\n  min-width: 100%;\n  & > .MuiAccordionSummary-root {\n    background-color: ",";\n  }\n  & .MuiAccordionSummary-root,\n  & .MuiAccordionSummary-root.Mui-expanded {\n    min-height: 64px;\n    padding: 16px 24px;\n  }\n  & .MuiAccordionDetails-root {\n    padding-top: 0;\n    display: flex;\n    flex-direction: column !important;\n  }\n  & .MuiAccordionSummary-content,\n  & .MuiAccordionSummary-content.Mui-expanded {\n    margin: 0;\n  }\n"])),e=>e.active?e.theme.colors.tertiary.light.background:"white"),fSe=(0,Ge.default)(ze.In)(uSe||(uSe=pSe(["\n  position: absolute;\n  top: 30px;\n  right: 60px;\n  cursor: pointer;\n"]))),ySe=e=>{let{heading:n,summary:t,children:a,defaultExpanded:r,active:i,editable:o=!1,onEdit:l=()=>{}}=e;const[s,c]=(0,g.useState)(r);return(0,Ze.jsxs)(mSe,{active:i,expanded:s,children:[(0,Ze.jsxs)(aSe.A,{expandIcon:(0,Ze.jsx)(ze.In,{icon:"chevron-down",size:"md",onClick:()=>{c(!s)}}),id:"panel1a-header",children:[o&&(0,Ze.jsx)(fSe,{icon:"pencil-alt",onClick:l}),(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(oSe,{active:i,children:n}),!s&&t&&(0,Ze.jsx)(lSe,{active:i,source:t})]})]}),(0,Ze.jsx)(rSe.A,{children:g.Children.map(a,e=>e)})]})};var gSe;const bSe=Ge.default.iframe(gSe||(gSe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  height: 100%;\n"]))),hSe=e=>{let{accountId:n,kbId:t,accessToken:a,landbotId:r,fullName:i}=e;return(0,g.useEffect)(()=>{const e=t?"H-1220830-V6QWNXTLPPYJS8O3":"H-752857-L6DAXUHW9TJ2J7Q1";document.getElementById("myLandbot").src="https://chats.landbot.io/v3/".concat(e,"/index.html?accountid=").concat(n,"&jwt=").concat(a,"&kbtoken=").concat(t,"&apistage=").concat(kn("REACT_APP_INTELLIGENCE_API_STAGE"),"&fullname=").concat(i)},[n,t,a,r,i]),(0,Ze.jsx)(bSe,{id:"myLandbot"})};var vSe,xSe,TSe,OSe,kSe,jSe,CSe,SSe,NSe,wSe,DSe,ASe,RSe,PSe;function LSe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ISe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?LSe(Object(t),!0).forEach(function(n){ESe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):LSe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ESe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function _Se(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const FSe=Ge.default.div(vSe||(vSe=_Se(["\n  display: flex;\n  flex-direction: column;\n  height: 110%;\n"]))),BSe=Ge.default.div(xSe||(xSe=_Se(["\n  display: flex;\n  align-items: start;\n  justify-content: space-between;\n  margin: 0 "," ","\n    ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.md.spacing),USe=(0,Ge.default)(ze.fI)(TSe||(TSe=_Se(["\n  padding-right: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.dark.background),MSe=(0,Ge.default)(ze.vj)(OSe||(OSe=_Se(["\n  flex: 1 1 auto;\n  form > div {\n    background: none;\n    border: 0;\n    border-radius: 0;\n  }\n"]))),VSe=Ge.default.div(kSe||(kSe=_Se(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  padding: ",";\n  width: 40%;\n"])),e=>e.theme.geometry.sm.spacing),zSe=Ge.default.div(jSe||(jSe=_Se(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  padding: ",";\n  width: 60%;\n  height: 90vh;\n"])),e=>e.theme.geometry.sm.spacing),GSe=Ge.default.div(CSe||(CSe=_Se(["\n  padding: ",";\n  margin-bottom: ",";\n  max-height: 20vh;\n  overflow-y: scroll;\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.normal.background),$Se=Ge.default.div(SSe||(SSe=_Se(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n"]))),WSe=(0,Ge.default)(ze.GQ)(NSe||(NSe=_Se(["\n  margin-right: ",";\n  display: inline-flex;\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.sm.spacing),qSe=Ge.default.div(wSe||(wSe=_Se(["\n  display: flex;\n  align-items: center;\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),JSe=Ge.default.div(DSe||(DSe=_Se(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  background-color: ",";\n  border-bottom: 1px solid ",";\n  width: 100%;\n  padding: ",";\n"])),e=>e.theme.colors.basic.white,e=>e.theme.colors.overlay.normal.background,e=>e.theme.geometry.sm.spacing),YSe=Ge.default.div(ASe||(ASe=_Se(["\n  background-color: ",";\n  width: 100%;\n  padding: ",";\n"])),e=>e.theme.colors.basic.white,e=>e.theme.geometry.sm.spacing),HSe=Ge.default.div(RSe||(RSe=_Se(["\n  display: flex;\n  width: 100%;\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),KSe=Ge.default.div(PSe||(PSe=_Se(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),QSe=(0,Ye.Ay)(()=>{const[e,n]=(0,g.useState)(""),t=(0,m.g)(),a=rt(),{currentUser:r}=rc(),i=localStorage.getItem("ACCESS_TOKEN"),{data:o,loading:l}=(0,h.IT)(HCe,{variables:{accountId:a}}),{data:s}=(0,h.IT)(QCe),c=ot(),d=["primary","secondary","tertiary","quaternary"],u=(null==o?void 0:o.getKnowledgeBasesForAccount)||[],f=u.find(e=>e.externalID===t.id),y=(e=>c?e:e.filter(e=>!e.demoMode))(u),b=((e,n)=>{if(!n)return e;const t=new gf.vj("id");return t.addIndex("title"),t.addDocuments(e),t.search(n)})(y.map((e,n)=>ISe(ISe({},e),{},{colour:d[n%d.length]})),e);return(0,Ze.jsxs)(FSe,{name:"Intelligence",children:[(0,Ze.jsx)(ige,{name:"Intelligence_Header",title:"Intelligence",breadcrumbs:[{title:"Intelligence"}],icon:"brain",iconColor:"primary"}),l&&(0,Ze.jsx)(KSe,{children:(0,Ze.jsx)(ze.Ip,{})}),!l&&o&&(0,Ze.jsxs)(BSe,{children:[(0,Ze.jsxs)(VSe,{children:[(0,Ze.jsxs)(YSe,{children:[(0,Ze.jsx)(HSe,{children:(0,Ze.jsxs)(qSe,{children:[(0,Ze.jsx)(WSe,{inline:!0,height:"50px",size:"xl",circleColor:"primary",iconColor:"primary",icon:"crosshairs"}),(0,Ze.jsx)(ze.DZ,{name:"KB__Title",inline:!0,children:"Knowledge Bases"})]})}),(0,Ze.jsx)(HSe,{children:(0,Ze.jsx)(USe,{container:!0,item:!0,itemAlign:"center",children:(0,Ze.jsx)(MSe,{name:"IntelligenceBots__Search",value:e,onChange:e=>n(e.target.value),hideButton:!0})})})]}),b.map(e=>{const n=e.externalID===(null==f?void 0:f.externalID);return(0,Ze.jsx)(ySe,{defaultExpanded:!1,active:n,heading:(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(WSe,{inline:!0,height:"50px",size:"lg",icon:"robot",circleColor:n?"white":e.colour,iconColor:n?"white":e.colour})," ",e.title]}),summary:e.synopsis,children:(0,Ze.jsxs)($Se,{children:[(0,Ze.jsx)(GSe,{children:(0,Ze.jsx)(ze.To,{name:"LegislationItem__Synopsis",source:e.synopsis})}),(0,Ze.jsxs)(p.Link,{to:"/intelligence/".concat(e.externalID),children:[(0,Ze.jsx)(ze.In,{icon:"external-link-alt"})," Start Consultation"]})]})},e.externalID)})]}),(0,Ze.jsxs)(zSe,{children:[(0,Ze.jsxs)(JSe,{children:[(0,Ze.jsx)(WSe,{inline:!0,height:"50px",size:"lg",icon:"robot",circleColor:(null==f?void 0:f.colour)||"primary",iconColor:(null==f?void 0:f.colour)||"primary"}),(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(ze.DZ,{children:(null==f?void 0:f.title)||"Choose a Knowledge Base to get started..."}),f&&(0,Ze.jsx)(ze.EY,{children:"Rio's guide to ".concat(f.title)})]})]}),(0,Ze.jsx)(hSe,{kbId:null==f?void 0:f.externalID,accountId:a,accessToken:i,landbotId:null==s?void 0:s.getLandbotId,fullName:"".concat(null==r?void 0:r.first_name," ").concat(null==r?void 0:r.last_name)})]})]})]})});var ZSe;const XSe=Ge.default.div(ZSe||(ZSe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"]))),eNe=()=>(0,Ze.jsx)(XSe,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(QSe,{})}),(0,Ze.jsx)(m.qh,{path:"/:id",element:(0,Ze.jsx)(QSe,{})})]})});var nNe;const tNe=(0,D.J1)(nNe||(nNe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getNotifications {\n    getNotifications {\n      id\n      title\n      message\n      isVisible\n    }\n  }\n"])));var aNe,rNe;function iNe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const oNe=(0,Ge.default)(Tn)(aNe||(aNe=iNe(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),lNe=Ge.default.div(rNe||(rNe=iNe(["\n  padding-right: ",";\n  padding-left: ",";\n"])),e=>e.padding,e=>e.padding);class sNe extends g.Component{constructor(e){super(e),this.dismissBanner=e=>{const n=this.state.dismissedBanners;n.push(e),this.setState({dismissedBanners:n},localStorage.setItem("DISMISSED_BANNERS",n))},this.state={dismissedBanners:[]},this.staticBanners=e.staticBanners||[];try{const e=localStorage.getItem("DISMISSED_BANNERS")||[];Array.isArray(e)?this.state.dismissedBanners=e:this.state.dismissedBanners=e.split(","),this.userNotifications=this.props.client.query({query:tNe}).then(e=>this.setState({notifications:[...this.staticBanners,...e.data.getNotifications]})).catch(console.log)}catch(e){console.log(e)}}render(){return(0,Ze.jsx)(lNe,{id:"".concat(this.props.id||"","__UserBannersSection--container"),name:"".concat(this.props.id||"","__UserBannersSection--container"),padding:this.props.padding||0,children:this.state.notifications&&this.state.notifications.length>0&&this.state.notifications.map(e=>this.state.dismissedBanners.includes(e.id)?null:(0,Ze.jsx)(oNe,{id:"UserBannersSection__NotificationBanner--".concat(e.id),name:"UserBannersSection__NotificationBanner--".concat(e.id),icon:e.icon||"info-circle",color:e.color||"quinary",title:e.title,body:e.message,dismissable:!0,onDismiss:()=>this.dismissBanner(e.id)},e.id))})}}const cNe=(0,Ib.W)(sNe);var dNe,uNe,pNe,mNe,fNe,yNe,gNe,bNe;function hNe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const vNe=(0,Ge.default)(ze.fv)(dNe||(dNe=hNe(["\n  opacity: ",";\n  border: 1px solid ",";\n  background-color: ",";\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"])),e=>e.disabled?"0.5":"1",e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white),xNe=(0,Ge.default)(ze.fI)(uNe||(uNe=hNe(["\n  padding: 0 0 60% 0;\n  flex: 0 0 auto;\n  background: "," url(",") center center no-repeat;\n  background-size: cover;\n  position: relative;\n  &:hover .overlay {\n    opacity: 1;\n    div {\n      display: block;\n    }\n  }\n"])),e=>{let{theme:n}=e;return n.colors.overlay.light.background},e=>{let{src:n}=e;return n}),TNe=(0,Ge.default)(ze.GQ)(pNe||(pNe=hNe(["\n  display: inline-flex;\n  flex: 0 0 auto;\n  background: ",";\n  margin-right: ",";\n  margin-top: -",";\n"])),e=>{let{theme:n}=e;return n.colors.basic.white},e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.xl.spacing),ONe=(0,Ge.default)(ze.DZ)(mNe||(mNe=hNe(["\n  margin-top: -",";\n"])),e=>e.theme.geometry.xs.spacing),kNe=(0,Ge.default)(ze.fv)(fNe||(fNe=hNe(["\n  padding: ",";\n  border-top: 1px solid ",";\n  background: ",";\n  position: relative;\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.normal.background,e=>{let{theme:n}=e;return n.colors.basic.white}),jNe=Ge.default.div(yNe||(yNe=hNe(["\n  position: absolute;\n  right: ",";\n  top: ",";\n  flex: 0 0 auto;\n  opacity: 0.7;\n  display: inline-block;\n  background: ",";\n  padding: "," ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background,e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.sm.spacing),CNe=Ge.default.div(gNe||(gNe=hNe(["\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  transition: 0.5s ease;\n  background-color: ",";\n"])),e=>e.theme.colors[e.color].normal.background),SNe=Ge.default.div(bNe||(bNe=hNe(["\n  position: absolute;\n  width: 80%;\n  top: 50%;\n  left: 50%;\n  color: white;\n  font-size: 20px;\n  -webkit-transform: translate(-50%, -50%);\n  -ms-transform: translate(-50%, -50%);\n  transform: translate(-50%, -50%);\n  text-align: center;\n  display: none;\n"]))),NNe=e=>{let{title:n,icon:t,iconColor:a,comingSoon:r,image:i,fullAccess:o,description:l}=e;return(0,Ze.jsxs)(vNe,{name:"SubjectTile SubjectTile--".concat(n),container:!0,item:!0,disabled:r||!o,children:[(0,Ze.jsxs)(xNe,{name:"SubjectTile__Thumbnail",container:!0,item:!0,distribution:"between",src:i,children:[l&&(0,Ze.jsx)(CNe,{className:"overlay",color:a,children:(0,Ze.jsx)(SNe,{children:l})}),r&&(0,Ze.jsx)(jNe,{children:(0,Ze.jsx)(ze.EY,{align:"center",size:"xs",color:"white",children:"Upgrade here"})})]}),(0,Ze.jsx)(kNe,{container:!0,item:!0,vdistribution:"between",children:(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(TNe,{name:"SubjectTile__Icon",height:"70px",size:"lg",icon:t,iconColor:a,circleColor:a}),(0,Ze.jsx)(ONe,{name:"SubjectTile__Title",size:"lg",color:"dark",children:n})]})})]})},wNe=t.p+"Electricity-49febb196ce7a615957d.jpg",DNe=t.p+"Fuel-d4021baf7ad0eac58e79.jpg",ANe=t.p+"Gas-30926961250fe0344fcf.jpg",RNe=t.p+"Materials-f697c01499c0a01bfd23.jpg",PNe=t.p+"Waste-e4f9374af0a0304b6ba5.jpg",LNe=t.p+"Water-7d70703a81c532cd3774.jpg",INe=t.p+"Transport-29e190ae4b4f635c2360.jpg",ENe=t.p+"Safety-ce5658366fd22e90f38f.jpg",_Ne=t.p+"Employees-59034ce2a3671b22c03b.jpg",FNe=t.p+"Engagement-de52b7531e97f51dc5f8.jpg",BNe=t.p+"Ethics-a3336a74419ed09a2f90.jpg";var UNe;const MNe={electricity:wNe,fuel:DNe,gas:ANe,materials:RNe,waste:PNe,water:LNe,transport:INe,refrigerants:t.p+"Refrigerants-03f6f20be5be80a14e3a.jpg",heatSteam:t.p+"HeatSteam-875a0b0570c6ad6a9353.jpg",safety:ENe,employees:_Ne,engagement:FNe,ethics:BNe,biodiversity:t.p+"Biodiversity-45409e5dac8277a204d7.jpg",buildingEnergyRatings:t.p+"BuildingEnergyRatings-de82a25dac95635bc58d.jpg",hotelStays:t.p+"HotelStays-a705d2474679be20f6b7.jpg"},VNe=Ge.default.div(UNe||(UNe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n\n  // Fallbacks for IE\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-self: flex-center;\n\n  // CSS grid for real browsers\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n  grid-gap: ",";\n\n  padding-top: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.lg.spacing),zNe=(0,Ye.Ay)(e=>{let{items:n,fullAccess:t,intl:a}=e;return(0,Ze.jsx)(VNe,{children:n.map(e=>{const n=t[e.title],r=e.comingSoon||!n?"/contact":"/data/".concat(e.title);return(0,Ze.jsx)(p.Link,{name:"DataSubjectsGrid__Link__".concat(e.id),to:r,children:(0,Ze.jsx)(NNe,{fullAccess:n,title:a.formatMessage({id:"pages.data.subjects.".concat(e.title)}),image:MNe[e.title],comingSoon:e.comingSoon||!n,icon:e.icon,iconColor:e.iconColor,description:e.description},e.id)},e.id)})})});var GNe,$Ne,WNe,qNe;function JNe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const YNe=(0,Ge.default)(ze.fI)(GNe||(GNe=JNe(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  background: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.overlay.normal.background,e=>e.styleSelected?e.theme.colors.overlay.light.background:"none"),HNe=(0,Ge.default)(ze.fI)($Ne||($Ne=JNe(["\n  opacity: ",";\n"])),e=>e.disabled?"0.5":"1"),KNe=(0,Ge.default)(ze.GQ)(WNe||(WNe=JNe(["\n  display: inline-flex;\n  flex: 0 0 auto;\n  margin-right: ",";\n"])),e=>e.theme.geometry.sm.spacing),QNe=Ge.default.div(qNe||(qNe=JNe(["\n  flex: 0 0 auto;\n  opacity: 0.7;\n  display: inline-block;\n  background: ",";\n  padding: "," ",";\n  margin-left: ",";\n"])),e=>e.theme.colors.text.dark.background,e=>e.theme.geometry.xxs.spacing,e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.xs.spacing),ZNe=e=>{let{botId:n,title:t,icon:a,iconColor:r,comingSoon:i,fullAccess:o}=e;return(0,Ze.jsx)(YNe,{name:"BotRow--".concat(n),container:!0,itemAlign:"center",children:(0,Ze.jsxs)(HNe,{container:!0,item:!0,itemAlign:"center",distribution:"between",disabled:i||!o,children:[(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(KNe,{height:"30px",size:"md",icon:a,iconColor:r,circleColor:r}),(0,Ze.jsx)(ze.EY,{weight:"bold",color:"dark",inline:!0,name:"BotRow__Title--".concat(n),size:"md",children:t})]}),i&&(0,Ze.jsx)(QNe,{children:(0,Ze.jsx)(ze.EY,{inline:!0,size:"xs",color:"white",children:"Upgrade here"})})]})})};var XNe;const ewe=Ge.default.div(XNe||(XNe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n  overflow: auto;\n  background: ",";\n  margin-top: ",";\n"])),e=>e.theme.colors.basic.white,e=>e.theme.geometry.md.spacing),nwe=(0,Ye.Ay)(e=>{let{items:n,fullAccess:t,intl:a}=e;return(0,Ze.jsx)(ewe,{children:n.map(e=>{const n=t[e.title],r=e.comingSoon||!n?"/contact":"/data/".concat(e.title);return(0,Ze.jsx)(p.Link,{name:"DataSubjectsList__Link__".concat(e.id),to:r,children:(0,Ze.jsx)(ZNe,{fullAccess:n,botId:e.id,title:a.formatMessage({id:"pages.data.subjects.".concat(e.title.toLowerCase())}),icon:e.icon,iconColor:e.iconColor,comingSoon:e.comingSoon||!n},e.id)},e.id)})})}),twe=JSON.parse('[{"id":"2be76209-c61e-4904-99f6-3e2d9da80794","demo":false,"title":"waste","icon":"trash","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your business waste data here."},{"id":"c5a3d2b7-b798-49a7-9d2b-70e71439c808","demo":false,"title":"electricity","icon":"bolt","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your business electricity data here."},{"id":"893fcaab-a2df-49d1-aea8-d522bff5b785","demo":false,"title":"gas","icon":"burn","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your metered natural gas data here. Please view the Fuels section for other gasses."},{"id":"69b15ee6-aec3-46fb-8956-60867138cc5a","demo":false,"title":"water","icon":"tint","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your business water data here."},{"id":"c7236a8a-25a5-4d7a-878d-57f3cb25c949","demo":false,"title":"transport","icon":"truck","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your business travel data here, including cars, trains, flights, and more."},{"id":"066f7800-1cdd-4e5d-81f4-cbdf727bc40e","demo":false,"title":"fuel","icon":"gas-pump","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your fuels data, including gaseous fuels (except Natural Gas), liquid fuels, solid fuels, and bioenergy."},{"id":"2da77908-7ac4-4ca4-a84c-6f51c0dbce45","demo":false,"title":"buildingEnergyRatings","icon":"fa-solid fa-building","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your building energy ratings data."},{"id":"ea53e04a-a75f-4590-bdee-e4b9214c0b35","demo":false,"title":"refrigerants","icon":"temperature-low","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your data for fugitive emissions including refrigerants and other gases that have global warming potential."},{"id":"9b3890bf-3cc8-4847-b8f6-a72d385be5cf","demo":false,"title":"heatSteam","icon":"fire","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your purchased heat/steam and district heat and steam data."},{"id":"d90b5eb3-eb67-4de0-9274-e62620bcf1e5","demo":false,"title":"materials","icon":"box","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your Materials data here."},{"id":"570bde73-ca02-4266-9375-c0a89de7507e","demo":false,"title":"hotelStays","icon":"bed","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your Hotel stays and Home working data here."},{"id":"f8a2b3c4-d5e6-4f7a-8b9c-0d1e2f3a4b5c","demo":false,"title":"liquid-fuels","icon":"oil-can","iconColor":"quaternary","comingSoon":false,"description":"Upload and analyse your liquid fuel consumption data here."},{"id":"c5ba1e0c-52cd-4159-88f0-bb030d921d7b","demo":true,"title":"safety","icon":"book-medical","iconColor":"quaternary","comingSoon":true},{"id":"cb37f489-778a-4328-822b-5ec5f6304a70","demo":true,"title":"employees","icon":"user-friends","iconColor":"quaternary","comingSoon":true},{"id":"0e81642b-9187-4725-bd3b-d187c912c4ed","demo":true,"title":"engagement","icon":"thumbs-up","iconColor":"quaternary","comingSoon":true},{"id":"51900c6c-ee66-4bfd-8c73-348032c596c8","demo":true,"title":"ethics","icon":"business-time","iconColor":"quaternary","comingSoon":true},{"id":"bd00d203-28bd-43a6-88e5-1e322452b63e","demo":true,"title":"biodiversity","icon":"tree","iconColor":"quaternary","comingSoon":true}]');var awe,rwe,iwe,owe,lwe,swe;function cwe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const dwe=Ge.default.div(awe||(awe=cwe(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),uwe=Ge.default.div(rwe||(rwe=cwe(["\n  overflow: auto;\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.lg.spacing),pwe=(0,Ge.default)(ze.fI)(iwe||(iwe=cwe(["\n  padding-right: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.dark.background),mwe=(0,Ge.default)(ze.vj)(owe||(owe=cwe(["\n  flex: 1 1 auto;\n  form > div {\n    background: none;\n    border: 0;\n    border-radius: 0;\n  }\n"]))),fwe=(0,Ge.default)(ze.Yq)(lwe||(lwe=cwe(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.md.spacing),ywe=(0,Ge.default)(Tn)(swe||(swe=cwe(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),gwe=(0,Ye.Ay)(e=>{let{fullAccess:n,intl:t}=e;const[a,r]=(0,g.useState)(""),[i,o]=(0,g.useState)(!0),l=((e,n)=>{if(!n)return e;const t=new gf.vj("id");return t.addIndex("title"),t.addDocuments(e),t.search(n)})(ot()?twe:twe.filter(e=>!e.demo),a),s=l.length>0;return(0,Ze.jsxs)(dwe,{name:"DataSubjects",children:[(0,Ze.jsx)(ige,{name:"DataSubjects",title:t.formatMessage({id:"pages.data.heading"}),breadcrumbs:[{title:t.formatMessage({id:"pages.data.breadcrumbs.one"})},{title:t.formatMessage({id:"pages.data.breadcrumbs.two"})}],icon:"chart-line",iconColor:"quaternary"}),(0,Ze.jsxs)(uwe,{children:[(0,Ze.jsxs)(pwe,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(mwe,{name:"DataSubjects__Search",value:a,onChange:e=>r(e.target.value),hideButton:!0}),(0,Ze.jsx)(fwe,{name:"DataSubjects__ShowGrid",size:"md",color:i?"primary":"normal",weight:i?"bold":"normal",underline:!1,onClick:()=>o(!i),inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"th"})}),(0,Ze.jsx)(fwe,{name:"DataSubjects__ShowList",size:"md",color:i?"normal":"primary",weight:i?"normal":"bold",underline:!1,onClick:()=>o(!i),inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"th-list"})})]}),!Object.values(n).some(e=>!0===e)&&(0,Ze.jsx)(ywe,{name:"DataContainer_Access_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Data",body:"Currently Data is not included in your subscription, if you’d like access to Data please contact Rio AI Ltd or get in touch with your Business Admin."}),(0,Ze.jsx)(cNe,{id:"data"}),!!s&&i&&(0,Ze.jsx)(zNe,{items:l,fullAccess:n}),!!s&&!i&&(0,Ze.jsx)(nwe,{items:l,fullAccess:n}),!s&&(0,Ze.jsx)(nv,{name:"DataSubjects__NoResults",title:"There are no results for this search."})]})]})}),bwe=[10,25,50,100,200].map(e=>({label:"".concat(e," rows"),value:e.toString()}));function hwe(e){let{value:n,onChange:t}=e;return(0,Ze.jsx)(ze.l6,{placeholder:"Show",value:n.toString(),options:bwe,onChange:e=>{const{value:n}=e.target.select,a=Number(n);t(a)}})}var vwe,xwe,Twe;function Owe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kwe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Owe(Object(t),!0).forEach(function(n){jwe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Owe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jwe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Cwe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Swe=(0,Ge.default)(ze.fv)(vwe||(vwe=Cwe(["\n  flex: 1;\n"]))),Nwe=(0,Ge.default)(ze.fv)(xwe||(xwe=Cwe(["\n  flex: 1;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),wwe=Ge.default.div(Twe||(Twe=Cwe(["\n  flex: 1;\n  overflow: auto;\n  & .ag-paging-panel {\n    justify-content: flex-start;\n  }\n  /* reduce ag-grid default header line-height and padding */\n  & .ag-header-cell {\n    line-height: normal;\n    padding: 8px;\n  }\n\n  /* make header separator height proportional to header height */\n  & .ag-header-cell:after,\n  & .ag-header-group-cell:after {\n    height: 50%;\n  }\n\n  /* set icons height to their real absolute value to ensure proper vertical alignment */\n  & .ag-header-cell-menu-button .ag-icon-menu,\n  & .ag-header-cell-label .ag-header-icon {\n    height: 16px;\n  }\n\n  /* make header text wrap, without breaking words and without ellipsis */\n  & .ag-header-cell-label .ag-header-cell-text {\n    height: auto;\n    overflow: visible;\n    overflow-wrap: normal;\n    text-overflow: clip;\n    white-space: normal;\n  }\n"]))),Dwe={pagination:!0,paginationPageSize:25,paginationPageSizeSelector:!1,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}},getRowId:e=>e.data.id};function Awe(e){let{config:n,title:t,breadcrumbs:a,uploadLink:r,fetchRows:i,defaultExportFileName:o}=e;const l=rt(),s=kwe(kwe({},Dwe),n),c=rc(),[d,u]=(0,g.useState)(null),[p,m]=(0,g.useState)(s.paginationPageSize),[f,y]=(0,g.useState)(),b=(0,g.useMemo)(()=>({async getRows(e){try{const{startRow:n,sortModel:t,filterModel:a}=e.request;for(const e in a)if(a[e].filterType===Vt.pe.Set){const n=a[e].values;n.includes(null)&&n.push(" ")}const{rows:r,totalRows:o}=await i({accountId:l,offset:n,limit:p,sort:oa(t),filters:ia(a)});e.success({rowData:r,rowCount:o})}catch(n){e.fail(),u(n)}}}),[l,i,u,p]),h=(0,g.useCallback)(e=>{y(e.api)},[]),v=(0,g.useCallback)(e=>{m(e),f&&f.setGridOption("paginationPageSize",e)},[f,m]),x=(0,g.useCallback)(async()=>{await i({accountId:l,offset:0,limit:p,sort:[]}),u(null)},[i,u,l,p]),T=(0,g.useCallback)((e,n)=>{let t=[...e.defaultItems||[]];return n.role===Vt.gG.Contributor&&(t=t.filter(e=>!["export","separator"].includes(e))),t},[]);return(0,Ze.jsxs)(Swe,{container:!0,item:!0,children:[(0,Ze.jsx)(ige,{name:t,title:t,breadcrumbs:a,icon:"chart-line",iconColor:"quaternary",children:(0,Ze.jsxs)(HF,{container:!0,item:!0,distribution:"center",vdistribution:"center",itemAlign:"center",children:[(0,Ze.jsx)(ze.fv,{span:4,children:(0,Ze.jsx)(hwe,{value:p,onChange:v})}),(0,Ze.jsx)(ze.fv,{span:4,children:(0,Ze.jsx)(SD,{gridApi:f})}),!!c.data.find(e=>e.startsWith("exportTransactions"))&&!!o&&(0,Ze.jsx)(ze.fv,{span:4,children:(0,Ze.jsx)(MP,{fetchRows:i,gridApi:f,defaultExportFileName:o,label:"Export Data"})}),!!r&&(0,Ze.jsx)(ze.fv,{span:4,children:(0,Ze.jsx)(ze.$n,{component:"routerLink",to:r,children:"Upload Data"})})]})}),d?(0,Ze.jsx)(ub,{error:d,name:d.message,retry:x}):(0,Ze.jsx)(Nwe,{container:!0,item:!0,children:(0,Ze.jsx)(wwe,{className:"ag-theme-alpine",id:"transactions",children:(0,Ze.jsx)(Vw.W6,kwe(kwe({},s),{},{paginationPageSize:p,cacheBlockSize:p,serverSideDatasource:b,onGridReady:h,getContextMenuItems:e=>T(e,c)}))})})]})}var Rwe,Pwe,Lwe;function Iwe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ewe=(0,f.styled)(f.Grid)(Rwe||(Rwe=Iwe(["\n  & > button,\n  & > a {\n    width: 100%;\n  }\n"]))),_we=(0,f.styled)(f.Grid)(Pwe||(Pwe=Iwe(["\n  display: flex;\n  justify-content: flex-end;\n  align-items: center;\n  gap: 8px;\n"]))),Fwe=(0,f.styled)(f.AgGrid)(Lwe||(Lwe=Iwe(["\n  height: calc(100vh - 216px); // header + page title height;\n  padding-bottom: 2px; // border bottom and shadow to show properly\n"]))),Bwe=["columnDefs"],Uwe=["accountId"];var Mwe;function Vwe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function zwe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Vwe(Object(t),!0).forEach(function(n){Gwe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Vwe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Gwe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function $we(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(0,f.setAgGridLicenseKey)(kn("REACT_APP_AG_GRID_LICENSE_KEY"));const Wwe=(0,f.styled)("span")(Mwe||(Mwe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: fit-content;\n"]))),qwe={pagination:!0,paginationPageSize:25,paginationPageSizeSelector:[10,25,50,100],cacheBlockSize:100,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}},Jwe=e=>{var n,t,a,r;let{title:i,breadcrumbs:o,config:{columnDefs:l},uploadLink:s,fetchRows:c,defaultExportFileName:d,transactionType:u,extraButtons:p}=e,m=$we(e.config,Bwe);const y=rt(),b=rc(),h=(0,g.useRef)(null),v=(0,g.useMemo)(()=>!!b.data.find(e=>e.startsWith("exportTransactions")),[b]),x="function"==typeof c?c:e=>{let{accountId:n}=e,t=$we(e,Uwe);return c.fetchData({variables:zwe({accountId:n},t)})},T={crumbs:o,content:i,actionButton:(0,Ze.jsxs)(_we,{wrap:"wrap",container:!0,size:6,children:[p,"function"!=typeof c&&(0,Ze.jsx)(f.IconButton,{variant:"contained",onClick:()=>c.setVariant("regular"===c.variant?"reporting":"regular"),color:"reporting"===c.variant?"primary":"secondary",children:(0,Ze.jsx)(f.Icons.BoltSharp,{})}),(0,Ze.jsx)(N$,{filtersApplied:null===(n=h.current)||void 0===n?void 0:n.filtersApplied,resetGridState:null===(t=h.current)||void 0===t?void 0:t.resetGridState}),v&&!!d&&(null===(a=h.current)||void 0===a?void 0:a.gridApi)&&(0,Ze.jsx)($P,{fetchRows:x,gridApi:null===(r=h.current)||void 0===r?void 0:r.gridApi,defaultExportFileName:d,isBackendExport:u&&![Vt.D_.Investment,"BUILDING_ENERGY_RATINGS",Vt.D_.Emissionsdatabase].includes(u),transactionType:u}),!!s&&(0,Ze.jsx)(zP.A,{title:"Upload",children:(0,Ze.jsx)(Wwe,{children:(0,Ze.jsx)(f.IconButton,{variant:"contained",to:s,children:(0,Ze.jsx)(f.CustomIcons.Upload,{width:"20px",height:"20px",color:"onPrimary"})})})})]})},O=(0,g.useCallback)((e,n)=>{let t=[...e.defaultItems||[]];return n.role===Vt.gG.Contributor&&(t=t.filter(e=>!["export","separator"].includes(e))),t},[]),k=(0,g.useMemo)(()=>zwe(zwe(zwe({},qwe),m),{},{columnDefs:null==l?void 0:l.map(e=>zwe(zwe({},e),{},{headerName:e.headerName?Gi(e.headerName):e.headerName})),serverSideDatasource:{async getRows(e){try{const{startRow:n=0,endRow:t=25,sortModel:a,filterModel:r}=e.request,i=(0,zt.cloneDeep)(r);for(const e in i)if(i[e].filterType===Vt.pe.Set){const n=i[e].values;n.includes(null)&&n.push(" ")}const{rows:o,totalRows:l}=await x({accountId:y,offset:n,limit:t-n,sort:oa(a),filters:ia(i)});e.success({rowData:o,rowCount:l})}catch(n){e.fail(),de.Cp(n)}}},getContextMenuItems:e=>O(e,b)}),[c]);return(0,Ze.jsx)(f.Page,{title:T,children:(0,Ze.jsx)(Fwe,{ref:h,gridKey:"".concat(y).concat(d,"GridV2"),gridOptions:k})})};var Ywe=t(33140),Hwe=t.n(Ywe),Kwe=t(51998),Qwe=t.n(Kwe);const Zwe={headerName:"Occupation End Date",field:"locationEndDate",filter:"agDateColumnFilter",valueFormatter:ca,hide:!0,cellStyle:{textAlign:"center"}},Xwe=(e,n,t)=>{let a="".concat(e,"?reportingYear=").concat(n);return t&&(a+="&type=".concat(t)),a},eDe=e=>{let{value:n,data:t,to:a,type:r}=e;return n?t.factorsArePrivate?(0,Ze.jsx)(d$,{component:"a",href:"https://www.iea.org/data-and-statistics/data-product/emissions-factors-2021",target:"_blank",rel:"noopener noreferrer",children:n}):(0,Ze.jsx)(u$,{to:Xwe(a,n,r),children:n}):null},nDe=e=>{let{value:n,data:t}=e;return n&&t.tariffId?(0,Ze.jsx)(u$,{to:"/configuration/carbonconversionfactors/market?selectedRows=".concat(t.tariffId),children:n}):""},tDe=e=>{let{value:n}=e;return n?(0,Ze.jsx)(u$,{to:"/documents/all?search=".concat(n),children:n}):""},aDe=e=>{let{data:n}=e;const t=Os(),{showNotification:a}=vt(),r=(0,g.useCallback)(async()=>{try{const e=(e=>{switch(e){case"WasteTransactionPageItem":return Vt.D_.Waste;case"ElectricityTransactionPageItem":return Vt.D_.Electricity;case"GasTransactionPageItem":return Vt.D_.Gas;case"HeatSteamTransactionPageItem":return Vt.D_.Heatsteam;case"WaterTransaction":return Vt.D_.Water;case"FuelTransactionPageItem":return Vt.D_.Fuel;case"TransportTransaction":return Vt.D_.Transport;case"MaterialsTransactionPageItem":return Vt.D_.Materials;case"S3C1ActivityBasedMaterialTransactionPageItem":return Vt.D_.S3C1Activitybasedmaterial;case"S3C1SpendBasedMaterialTransactionPageItem":return Vt.D_.S3C1Spendbasedmaterial;case"HotelStaysTransactionPageItem":return Vt.D_.Hotelstays;case"OilTransactionPageItem":return Vt.D_.Oil;case"SalesDataTransactionPageItem":return Vt.D_.Oilgassales;case"LiquidFuelTransactionPageItem":return Vt.D_.Liquidfuel;case"RefrigerantTransactionPageItem":return Vt.D_.Refrigerant;case"InvestmentTransaction":return Vt.D_.Investment;default:throw new Error("Unknown __typename: ".concat(e))}})(n.__typename);await t(n.importBatchFileName,e,n.importBatchId)}catch(e){a("Export failed. Please contact support.")}},[t,n,a]);return null!=n&&n.importBatchId?(0,Ze.jsx)(d$,{onClick:r,children:n.importBatchFileName}):""},rDe=e=>{let{value:n}=e;return n?(0,Ze.jsx)(u$,{to:"/v2/documents/all?search=".concat(n),children:n}):""};function iDe(){const[e]=(0,gs._)(Qwe()),n=Pu(),t=null==n?void 0:n.id,a=null==n?void 0:n.accessControls.customFields,{showNotification:r}=vt(),i=(0,g.useMemo)(()=>async n=>{try{const{data:{getEnergyTransactionsPageFilter:a}}=await e({variables:{accountId:t,field:n.colDef.colId||n.colDef.field,energyType:Vt.D_.Electricity}});return n.success(a)}catch(e){r("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning")}},[r,t,e]);return(0,g.useMemo)(()=>({rowSelection:"multiple",getRowId:ba("id"),components:{uploadReference:aDe,documentReference:tDe,tariffReference:nDe,factorReference:eDe},columnDefs:[{headerName:"Meter Name",field:"meterName",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},{headerName:"Location",field:"locationName",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va,refreshValuesOnOpen:!1}},{headerName:"Location Code",field:"energySource.locationPoint.location.code",colId:"locationCode",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},...Do(Vt.D_.Electricity,null==n?void 0:n.accessControls),{headerName:"Shared Emission Percentage",field:"locationSharedEmissionPercentage",filter:"agNumberColumnFilter"},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter"},Zwe,{headerName:"Tags",field:"tags",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},{headerName:"Departments",field:"departments",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},{headerName:"Supplier",field:"supplier",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},{headerName:"Tariff",field:"tariff",cellRenderer:"tariffReference",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},{headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},initialSort:"desc"},{headerName:"Start Time",field:"startTime",cellStyle:{textAlign:"center"},filter:"agTextColumnFilter"},{headerName:"End Date",field:"endDate",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"}},{headerName:"End Time",field:"endTime",cellStyle:{textAlign:"center"},filter:"agTextColumnFilter"},{headerName:"Quantity (kWh)",field:"quantity",filter:"agNumberColumnFilter"},{headerName:"Reading",field:"reading",filter:"agNumberColumnFilter"},{headerName:"Act/Est",field:"accuracy",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},Bo,{headerName:"Charge/kWh",field:"chargePerKilowatt",filter:"agNumberColumnFilter"},{headerName:"Total Cost",field:"totalCost",filter:"agNumberColumnFilter"},{headerName:"Total Cost (VAT)",field:"totalCostVat",filter:"agNumberColumnFilter"},{headerName:"Currency Code",field:"currency",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},{headerName:"Total Scope 2 Location-Based emissions (kgCO2e)",field:"carbonScope2",filter:"agNumberColumnFilter",headerTooltip:"This shows how much CO2e was emitted utilising the standard grid location-based factor"},{headerName:"Total Scope 3 Location-Based emissions (kgCO2e)",field:"carbonScope3",filter:"agNumberColumnFilter",headerTooltip:"This column calculates the total scope 3 kgCO2e from WTT & T&D if you have uploaded direct (scope 2) electricity or the total CO2e from WTT, T&D + the transaction's emissions if it is an indirect (Scope 3) upload"},{headerName:"Scope 2 CO2 in kgCO2e (Location-Based)",field:"kgCO2Scope2",filter:"agNumberColumnFilter",headerTooltip:"This shows how much CO2 was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",initialHide:!0},{headerName:"Scope 3 CO2 in kgCO2e (Location-Based) from indirect and T&D emission sources",field:"kgCO2Scope3",filter:"agNumberColumnFilter",headerTooltip:"This scope 3 column calculates the total CO2 in kgCO2e from T&D if you have uploaded direct (scope 2) electricity. If you uploaded indirect (scope 3) electricity, this is the total CO2e from T&D + the transaction's scope 3 emissions",initialHide:!0},{headerName:"Scope 2 CH4 in kgCO2e (Location-Based)",field:"kgCH4Scope2",filter:"agNumberColumnFilter",headerTooltip:"This shows how much CH4 was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",initialHide:!0},{headerName:"Scope 3 CH4 in kgCO2e (Location-Based) from indirect and T&D emission sources",field:"kgCH4Scope3",filter:"agNumberColumnFilter",headerTooltip:"This scope 3 column calculates the total CH4 in kgCO2e from T&D if you have uploaded direct (scope 2) electricity. If you uploaded indirect (scope 3) electricity, this is the total CO2e from T&D + the transaction's scope 3 emissions",initialHide:!0},{headerName:"Scope 2 N2O in KgCO2e (Location-Based)",field:"kgN2OScope2",filter:"agNumberColumnFilter",headerTooltip:"This shows how much N2O was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",initialHide:!0},{headerName:"Scope 3 N2O in kgCO2e (Location-Based) from indirect and T&D emission sources",field:"kgN2OScope3",filter:"agNumberColumnFilter",headerTooltip:"This scope 3 column calculates the total N2O in kgCO2e from T&D if you have uploaded direct (scope 2) electricity. If you uploaded indirect (scope 3) electricity, this is the total CO2e from T&D + the transaction's scope 3 emissions",initialHide:!0},{headerName:"Total Scope 2 Market-Based Emissions (kgCO2e)",field:"marketBasedCarbonScope2",filter:"agNumberColumnFilter",headerTooltip:"This shows how much CO2e was emitted where the tariff indicates a market-based factor is applied"},{headerName:"Scope 3 Market-Based emissions (kgCO2e)",field:"marketBasedCarbonScope3",filter:"agNumberColumnFilter",headerTooltip:"This shows how much scope 3 CO2e was emitted where the tariff indicates a market-based factor is applied"},{headerName:"Scope 3 T&D emissions (kgCO2e)",field:"tdScope3",filter:"agNumberColumnFilter",headerTooltip:"This shows the Scope 3 Transmission & Distribution (T&D) emissions associated with grid losses (the energy loss that occurs in getting the electricity from the power plant to the organisations that purchase it)."},{headerName:"Scope 3 WTT of Generation emissions (kgCO2e)",field:"wttGenScope3",filter:"agNumberColumnFilter",headerTooltip:"This shows Well-to-tank (WTT) emissions associated with the generation of electricity for the consumer. WTT emissions are from the  extraction, refining, and transportation of primary fuels before their use in the generation of electricity."},{headerName:"Scope 3  WTT of T&D emissions (kgCO2e)",field:"wttTdScope3",filter:"agNumberColumnFilter",headerTooltip:"This shows Well-to-tank (WTT) emissions associated with the grid loses of energy when the electricity is distributed to the consumer.  WTT emissions are from the  extraction, refining, and transportation of primary fuels before their use in the generation of electricity."},{headerName:"Activity",headerTooltip:"This shows if the activity falls under your organisation's direct (company owned emission sources) or indirect (non company owned, employee, contractor or third party emission sources) activities",field:"activity",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},{headerName:"Comment",field:"comment",filter:"agTextColumnFilter"},{headerName:"Invoice Number",field:"invoiceNumber",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va},cellRenderer:"documentReference"},{headerName:"Country",field:"energySource.locationPoint.location.address.country.name",colId:"country",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},{headerName:"Region",field:"energySource.locationPoint.location.region.name",colId:"region",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},{headerName:"Evidence Reference",field:"evidenceReference",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va},cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va},cellRenderer:"documentReference"},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:ha,keyCreator:va}},{headerName:"Factors used",headerTooltip:"The factor set applied to this transaction, click the link to see the factors for this year in more detail",field:"reportingYearOfFactors",cellRenderer:"factorReference",cellRendererParams:{to:"/configuration/carbonconversionfactors/location/electricity"},filter:!1},...Ho(wo(Vt.D_.Electricity,a))],reactiveCustomComponents:!0}),[a,i])}const oDe=[{title:"Data",to:".."},{title:"Electricity Transactions"}];function lDe(){const[e]=(0,gs._)(Hwe(),{fetchPolicy:"network-only"}),n=iDe(),t=(0,g.useCallback)(async n=>{const{data:{getElectricityTransactionsPage:{totalRows:t,rows:a}}}=await e({variables:n});return{rows:a,totalRows:t}},[e]);return(0,Ze.jsx)(Awe,{title:"Electricity Transactions",defaultExportFileName:"electricity-export",breadcrumbs:oDe,uploadLink:"../electricity/uploads",config:n,fetchRows:t})}var sDe,cDe;function dDe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const uDe=(0,D.J1)(sDe||(sDe=dDe(["\n  query GetRefrigerantTransactionsPage(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getRefrigerantTransactionsPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        locationName\n        locationSharedEmissionPercentage\n        locationCustomAttributes\n        location {\n          ...LocationFields\n        }\n        quantityUnit {\n          id\n          name\n        }\n        locationCode\n        locationEndDate\n        gasType\n        gasGroup\n        date\n        quantity\n        accuracy\n        carbonScope1\n        tags\n        dataProvider\n        comment\n        evidenceReference\n        otherReference\n        currency\n        totalCost\n        purchaseType\n        organisationalUnits\n        estimatesScenario\n      }\n    }\n  }\n  ","\n"])),nm),pDe=(0,D.J1)(cDe||(cDe=dDe(["\n  query GetRefrigerantTransactionsPageFilter($accountId: ID!, $field: String!) {\n    getRefrigerantTransactionsPageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));function mDe(){const e=(0,N.m)(),n=Pu(),t=null==n?void 0:n.id,a=null==n?void 0:n.accessControls.customFields,{showNotification:r}=vt(),i=async n=>{try{const{data:{getRefrigerantTransactionsPageFilter:a}}=await e.query({query:pDe,variables:{accountId:t,field:n.colDef.colId||n.colDef.field}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){r("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Location",field:"locationName",filterParams:{values:i,valueFormatter:la}},{colId:"locationCode",headerName:"Location Code",field:"locationCode",filterParams:{values:i,valueFormatter:la}},...Do(Vt.D_.Refrigerant,null==n?void 0:n.accessControls),{headerName:"Shared Emission Percentage",field:"locationSharedEmissionPercentage",filter:"agNumberColumnFilter"},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter"},Zwe,{headerName:"Date",field:"date",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter",initialSort:"desc"},{headerName:"Gas Type",field:"gasType",filterParams:{values:i,valueFormatter:la}},{headerName:"Gas Group",field:"gasGroup",filterParams:{values:i,valueFormatter:la}},{headerName:"Quantity",field:"quantity",filter:"agNumberColumnFilter"},{colId:"unitName",headerName:"Quantity Unit",field:"quantityUnit.name",filterParams:{values:i,valueFormatter:la}},{headerName:"Act/Est",field:"accuracy",filterParams:{values:i,valueFormatter:la}},Bo,{headerName:"Tags",field:"tags",filterParams:{values:i,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:i,valueFormatter:la}},{headerName:"Data Provider",field:"dataProvider",filterParams:{values:i,valueFormatter:la}},{headerName:"Total Scope 1 emissions (kgCO2e)",field:"carbonScope1",filter:"agNumberColumnFilter",headerTooltip:"These column calculates in CO2e total emissions related to the direct leakage of gases from air-conditioning, refrigeration units or the release to the atmosphere of other gases that have global warming potential (GWP)."},{headerName:"Comment",field:"comment",filter:"agTextColumnFilter"},{headerName:"Country",field:"location.address.country.name",colId:"country",filterParams:{values:i,valueFormatter:la}},{headerName:"Region",field:"location.region.name",colId:"region",filterParams:{values:i,valueFormatter:la}},{headerName:"Evidence Reference",field:"evidenceReference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filterParams:{values:i,valueFormatter:la}},{headerName:"Total Cost",field:"totalCost",filter:"agNumberColumnFilter"},{headerName:"Currency Code",field:"currency",filterParams:{values:i,valueFormatter:la}},...Ho(wo(Vt.D_.Refrigerant,a))],reactiveCustomComponents:!0}}function fDe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function yDe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fDe(Object(t),!0).forEach(function(n){gDe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fDe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function gDe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function bDe(){const e=(0,N.m)(),n=mDe();return(0,Ze.jsx)(Awe,{title:"Refrigerants and Other Gases Transactions",defaultExportFileName:"refrigerants-export",breadcrumbs:[{title:"Data",to:".."},{title:"Refrigerants and Other Gases Transactions"}],uploadLink:"../refrigerants/uploads",config:yDe(yDe({},n),{},{components:{tariffReference:nDe,uploadReference:aDe,documentReference:tDe,factorReference:eDe}}),fetchRows:async n=>{const{data:{getRefrigerantTransactionsPage:{totalRows:t,rows:a}}}=await e.query({query:uDe,variables:n,fetchPolicy:"network-only"});return{rows:a,totalRows:t}}})}var hDe=t(78122),vDe=t.n(hDe),xDe=t(60180),TDe=t.n(xDe);function ODe(){const e=(0,N.m)(),n=Pu(),t=null==n?void 0:n.id,a=null==n?void 0:n.accessControls.customFields,{showNotification:r}=vt(),i=async n=>{try{const{data:{getEnergyTransactionsPageFilter:a}}=await e.query({query:TDe(),variables:{accountId:t,energyType:Vt.D_.Heatsteam,field:n.colDef.colId||n.colDef.field}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){r("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Meter Name",field:"meterName",filterParams:{values:i,valueFormatter:la}},{headerName:"Location",field:"locationName",filterParams:{values:i,valueFormatter:la}},{colId:"locationCode",headerName:"Location Code",field:"energySource.locationPoint.location.code",filterParams:{values:i,valueFormatter:la}},...Do(Vt.D_.Heatsteam,null==n?void 0:n.accessControls),{headerName:"Shared Emission Percentage",field:"locationSharedEmissionPercentage",filter:"agNumberColumnFilter"},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter"},Zwe,{headerName:"Tags",field:"tags",filterParams:{values:i,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:i,valueFormatter:la}},{headerName:"Supplier",field:"supplier",filterParams:{values:i,valueFormatter:la,filter:"agSetColumnFilter"}},{headerName:"Tariff",field:"tariff",cellRenderer:"tariffReference",filterParams:{values:i,valueFormatter:la,filter:"agSetColumnFilter"}},{headerName:"Start Date",field:"startDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter",initialSort:"desc"},{headerName:"Start Time",field:"startTime",cellStyle:{textAlign:"center"},filter:"agTextColumnFilter"},{headerName:"End Date",field:"endDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter"},{headerName:"End Time",field:"endTime",cellStyle:{textAlign:"center"},filter:"agTextColumnFilter"},{headerName:"Quantity (kWh)",field:"quantity",filter:"agNumberColumnFilter"},{headerName:"Act/Est",field:"accuracy",filterParams:{values:i,valueFormatter:la}},Bo,{headerName:"Total Cost",field:"totalCost",filter:"agNumberColumnFilter"},{headerName:"Total Cost (VAT)",field:"totalCostVat",filter:"agNumberColumnFilter"},{headerName:"Currency Code",field:"currency",filterParams:{values:i,valueFormatter:la}},{headerName:"Carbon Emission Scope 2 (kgCO2e)",field:"carbonScope2",filter:"agNumberColumnFilter",headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Carbon Emission Scope 3 (kgCO2e)",field:"carbonScope3",filter:"agNumberColumnFilter",headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Scope 2 kgCO2e (Market Based)",field:"marketBasedCarbonScope2",filter:"agNumberColumnFilter",headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Scope 3 kgCO2e (Market Based)",field:"marketBasedCarbonScope3",filter:"agNumberColumnFilter",headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"kg CO2e of CO2",headerTooltip:"This shows how much CO2 was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",field:"carbonEmissionCO2",filter:"agNumberColumnFilter"},{headerName:"kg CO2e of N2O",headerTooltip:"This shows how much N2O was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",field:"carbonEmissionN2O",filter:"agNumberColumnFilter"},{headerName:"kg CO2e of CH4",headerTooltip:"This shows how much CH4 was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",field:"carbonEmissionCH4",filter:"agNumberColumnFilter"},{headerName:"Activity",headerTooltip:"This shows if the activity falls under your organisation's direct (company owned emission sources) or indirect (non company owned, employee, contractor or third party emission sources) activities",field:"activity",filterParams:{values:i,valueFormatter:la}},{headerName:"Comment",field:"comment",filter:"agTextColumnFilter"},{headerName:"Invoice Number",field:"invoiceNumber",filterParams:{values:i,valueFormatter:la}},{headerName:"Country",field:"energySource.locationPoint.location.address.country.name",colId:"country",filterParams:{values:i,valueFormatter:la}},{headerName:"Region",field:"energySource.locationPoint.location.region.name",colId:"region",filterParams:{values:i,valueFormatter:la}},{headerName:"Evidence Reference",field:"evidenceReference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filterParams:{values:i,valueFormatter:la}},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:i,valueFormatter:la}},{headerName:"Factors used",headerTooltip:"The factor set applied to this transaction, click the link to see the factors for this year in more detail",field:"reportingYearOfFactors",cellRenderer:"factorReference",cellRendererParams:{to:"/configuration/carbonconversionfactors/location/heat"},filter:!1},...Ho(wo(Vt.D_.Heatsteam,a))],reactiveCustomComponents:!0}}function kDe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jDe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kDe(Object(t),!0).forEach(function(n){CDe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kDe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function CDe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const SDe=[{title:"Data",to:".."},{title:"Heat and Steam"}];function NDe(){const e=(0,N.m)(),n=ODe();return(0,Ze.jsx)(Awe,{title:"Heat and Steam",defaultExportFileName:"heatsteam-export",breadcrumbs:SDe,uploadLink:"../heatSteam/uploads",config:jDe(jDe({},n),{},{components:{tariffReference:nDe,uploadReference:aDe,documentReference:tDe,factorReference:eDe}}),fetchRows:async n=>{const{data:{getHeatSteamTransactionsPage:{totalRows:t,rows:a}}}=await e.query({query:vDe(),variables:n,fetchPolicy:"network-only"});return{rows:a,totalRows:t}}})}var wDe,DDe=t(45867),ADe=t.n(DDe),RDe=t(47520),PDe=t.n(RDe);const LDe=(0,Ge.default)(ze.fI)(wDe||(wDe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  background: white;\n"])));function IDe(e){let{text:n,color:t,children:a}=e;const[r,i]=(0,g.useState)(!1);return(0,Ze.jsx)(LDe,{span:12,item:!0,children:(0,Ze.jsx)(ze.nD,{onToggle:()=>i(e=>!e),open:r,size:"md",text:n,color:t,children:a})})}var EDe;const _De=(0,D.J1)(EDe||(EDe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAllTransportTypes {\n    getAllTransportTypes {\n      id\n      name\n    }\n  }\n"])));function FDe(e){let{value:n,onChange:t}=e;const{data:a,loading:r,error:i}=(0,h.IT)(_De);return(0,Ze.jsx)(ze.l6,{placeholder:"Please select type of transport",value:n,options:Ti(null==a?void 0:a.getAllTransportTypes),error:i,isLoading:r,onChange:t})}var BDe;const UDe=(0,D.J1)(BDe||(BDe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAllFuelTypes {\n    getAllFuelTypes {\n      id\n      name\n    }\n  }\n"])));function MDe(e){let{value:n,onChange:t}=e;const{data:a,loading:r,error:i}=(0,h.IT)(UDe);return(0,Ze.jsx)(ze.l6,{placeholder:"Please select type of fuel",value:n,options:Ti(null==a?void 0:a.getAllFuelTypes),error:i,isLoading:r,onChange:t})}var VDe;const zDe=(0,D.J1)(VDe||(VDe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAllTransportSubTypes {\n    getAllTransportSubTypes {\n      id\n      name\n    }\n  }\n"])));function GDe(e){let{value:n,onChange:t}=e;const{data:a,loading:r,error:i}=(0,h.IT)(zDe);return(0,Ze.jsx)(ze.l6,{placeholder:"Please select a subtype",value:n,options:Ti(null==a?void 0:a.getAllTransportSubTypes),error:i,isLoading:r,onChange:t})}var $De;const WDe=(0,D.J1)($De||($De=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAllAccuracyTypes {\n    getAllAccuracyTypes {\n      id\n      name\n    }\n  }\n"])));var qDe,JDe=function(e){return e.Act="ea50d0b7-6a27-11eb-bd03-06b5345f8dda",e.Est="ea50d410-6a27-11eb-bd03-06b5345f8dda",e}(JDe||{});function YDe(e){let{value:n,onChange:t,error:a}=e;const{data:r,loading:i,error:o}=(0,h.IT)(WDe);return(0,Ze.jsx)(ze.l6,{placeholder:"Actual/Estimated",value:n||JDe.Act,options:Ti(null==r?void 0:r.getAllAccuracyTypes),isLoading:i,onChange:t,error:o?o.message:a})}const HDe=(0,D.J1)(qDe||(qDe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getContainerTypeSizes($page: Int = 1, $pageSize: Int!, $filterValue: String) {\n    getContainerTypeSizePage(page: $page, pageSize: $pageSize, filterValue: $filterValue) {\n      count\n      hasNextPage\n      hasPreviousPage\n      isFirstPage\n      isLastPage\n      pageCount\n      totalItemCount\n      page\n      pageSize\n      typeSizes {\n        id\n        name\n      }\n    }\n  }\n"])));function KDe(e){var n;let{value:t,onChange:a,error:r}=e;const{data:i,loading:o,error:l}=(0,h.IT)(HDe,{variables:{page:1,pageSize:Za}}),s=Ti(null==i||null===(n=i.getContainerTypeSizePage)||void 0===n?void 0:n.typeSizes),c=r||(l?l.message:null);return(0,Ze.jsx)(ze.l6,{placeholder:"Please select type of container",value:t,options:s,error:c,isLoading:o,onChange:e=>{let{target:{select:n}}=e;a(n.value,n.label)}})}function QDe(e){let{value:n,onChange:t,error:a,label:r}=e;const{loading:i,data:o,fetchMore:l,error:s}=(0,h.IT)(HDe,{notifyOnNetworkStatusChange:!0,variables:{page:1,pageSize:Za}}),c=(0,g.useMemo)(()=>Ti(null==o?void 0:o.getContainerTypeSizePage.typeSizes),[o]),d=(0,g.useCallback)(async(e,n,t)=>{const a={filterValue:t,page:Math.floor(n/e)+1,pageSize:Za},r=await l({variables:a});return{total:r.data.getContainerTypeSizePage.totalItemCount,options:Ti(r.data.getContainerTypeSizePage.typeSizes)}},[l]);return(0,Ze.jsx)(f.AutoComplete,{label:r,options:c,loadMore:d,isLoading:i,value:n,error:a,onChange:e=>t(e),loadMoreSize:Za,helperText:a||(null==s?void 0:s.message),placeholder:"Please select type of container"})}const ZDe={label:"Loading...",value:"",disabled:!0},XDe={label:"No energy sources found",value:"",disabled:!0};function eAe(e){let{value:n,error:t,name:a,onChange:r,label:i="Energy type",disabled:o,onEnergySourceLoadComplete:l}=e;const{data:s,loading:c,error:d}=(0,h.IT)(bY,{onCompleted:l?e=>l(e.getAllEnergyType||[]):void 0}),u=((null==s?void 0:s.getAllEnergyType)||[]).map(e=>({value:null==e?void 0:e.id,label:null==e?void 0:e.name})).sort((e,n)=>{var t;return(null===(t=e.label)||void 0===t?void 0:t.localeCompare(n.label||""))||1});return c||d||0!==u.length||u.unshift(XDe),(0,Ze.jsx)(f.Select,{name:a,label:i,value:n,options:c?[ZDe]:u,isLoading:c,error:Boolean(t),helperText:t||"",disabled:o,onChange:e=>r(e)})}var nAe,tAe,aAe;function rAe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const iAe=(0,f.styled)(f.Button)(nAe||(nAe=rAe(["\n  width: 100%;\n"]))),oAe=(0,f.styled)("div")(tAe||(tAe=rAe(["\n  width: 100%;\n  display: flex;\n  gap: 16px;\n"]))),lAe=(0,f.styled)("div")(aAe||(aAe=rAe(["\n  width: 50%;\n"]))),sAe=e=>{var n;let{onError:t,onSuccess:a,energyType:r}=e;const{state:i,changeMeterName:o,changeMeterType:l,changeLocation:s,isValidData:c,changeFieldValue:d,waterMeterType:u,toggleWaterMeterIn:p,toggleWaterMeterOut:m}=CY(),[y,b]=(0,g.useState)(!r),h=rt(),v=(0,g.useCallback)(e=>{if(b(!0),!r)return;const n=e.find(e=>e.name.toLowerCase()===r.toLowerCase());n&&l({label:n.name,value:n})},[r,l]),[x,{called:T,loading:O}]=(0,Ot.n)(mY,{onCompleted:e=>{let{createEnergySources:n}=e;const[t]=n,r="The Meter ".concat(t.name," was created successfully");a(r,t)},onError:e=>{t("Something went wrong. If the problem persists, contact support. ".concat(e),"danger")}}),k=(0,g.useCallback)(e=>{d({fieldName:"startDate",value:e})},[d]),j=(0,g.useCallback)(e=>{d({fieldName:"endDate",value:e})},[d]);return(0,Ze.jsxs)(f.Grid,{container:!0,columns:12,rowGap:3,columnGap:2,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{label:"What do you want to call this meter?",value:i.meterName.value||"",error:Boolean(i.meterName.error),helperText:i.meterName.error,onChange:e=>o({value:e.target.value})})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(eAe,{label:"What is the meter type?",value:(null===(n=i.typeId)||void 0===n||null===(n=n.value)||void 0===n?void 0:n.id)||"",onChange:e=>l({label:e.label,value:{id:e.value,name:e.label}}),error:i.typeId.error,disabled:Boolean(r),onEnergySourceLoadComplete:r?v:void 0})}),"Water"===i.typeId.value.name&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Checkbox,{name:"in",id:"create-meter-in",label:"".concat(i.typeId.value.name," In"),onChange:()=>p(),checked:i.meterIn,value:i.meterIn})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Checkbox,{id:"create-meter-out",name:"out",label:"".concat(i.typeId.value.name," Out"),onChange:()=>m(),checked:i.meterOut,value:i.meterOut})})]}),("Electricity"===i.typeId.value.name||"Heat & Steam"===i.typeId.value.name)&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Checkbox,{label:"Renewable energy generating meter",id:"is-generating-meter",name:"isGeneration",onChange:()=>d({fieldName:"isGeneration",value:!i.isGeneration}),checked:i.isGeneration||!1,value:i.isGeneration||!1})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(ZW,{label:"Which location is this meter at?",value:i.locationId,onChange:s,error:i.locationId.error})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{value:i.code||"",label:"Meter code",onChange:e=>d({fieldName:"code",value:e.target.value})})}),(0,Ze.jsxs)(f.Grid,{size:12,children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:"Has this meter closed?"}),(0,Ze.jsxs)(oAe,{children:[(0,Ze.jsx)(lAe,{children:(0,Ze.jsx)(f.DatePicker,{name:"startDate",label:"Start date",onChange:e=>k(new Date(e)),value:i.startDate?new Date(i.startDate):void 0})}),(0,Ze.jsx)(lAe,{children:(0,Ze.jsx)(f.DatePicker,{name:"endDate",label:"End date",onChange:e=>j(new Date(e)),value:i.endDate?new Date(i.endDate):void 0})})]})]}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(iAe,{name:"create-energyMeter__button--create",color:"primary",variant:"contained",disabled:!c||T||!y,loading:O,onClick:()=>{x({variables:{energySources:[{id:(0,Ai.A)(),name:i.meterName.value,locationId:i.locationId.value,typeId:i.typeId.value.id,accountId:h,inOut:u,isGeneration:"Electricity"===i.typeId.value.name||"Heat & Steam"===i.typeId.value.name?i.isGeneration||!1:null,meterCode:i.code,hardwareProviderName:i.hardwareProviderName,operatorProviderName:i.operatorProviderName,startDate:i.startDate,endDate:i.endDate}]}})},children:"Add meter"})})]})};function cAe(e){const{onSuccess:n,onDismiss:t,energyType:a}=e,[r,i]=(0,g.useState)(!1),{showNotification:o}=vt(),l=rt(),s=(0,g.useCallback)((e,n)=>{o(e,n),i(!1)},[o]);return(0,Ze.jsxs)(f.Modal,{maxWidth:"700px",open:!0,onClose:t,title:"Add new meter",children:[!r&&(0,Ze.jsx)(sAe,{onSuccess:(e,t)=>{n(t)},onError:o,energyType:a}),r&&(0,Ze.jsx)(TU,{accountId:l,onSuccess:s})]})}const dAe=[{order:"asc",field:"name"}],uAe="Create new meter...";function pAe(e){let{type:n,onChange:t,onMeterCreated:a,accountId:r,value:i,label:o,error:l,createNew:s}=e;const c=rc(),[d,u]=(0,g.useState)(!1),p=c.data.some(e=>e.startsWith("createEnergySource")),{data:m,loading:y,fetchMore:b}=(0,h.IT)(Hc,{variables:{type:n,limit:Za,accountId:r,sort:dAe},skip:!r,notifyOnNetworkStatusChange:!0}),v=(0,g.useMemo)(()=>{var e;return Ti((null==m||null===(e=m.getEnergySourceByAccountIdAndType)||void 0===e?void 0:e.rows)||[])},[m]);return(0,Ze.jsxs)(Ze.Fragment,{children:[d&&(0,Ze.jsx)(cAe,{energyType:n,onDismiss:()=>u(!1),onSuccess:e=>{t({value:e.id,label:e.name}),null==a||a(e),u(!1)}}),(0,Ze.jsx)(f.AutoComplete,{label:o,value:i,error:l,options:v,createOption:p&&s?uAe:void 0,loadMore:async(e,n,t)=>{const a={accountId:r,offset:n,limit:e};t&&(a.filters={text:[{filterType:Vt.pe.Text,type:Vt.II.Contains,filter:t,field:"name"}]});const i=await b({variables:a});return{total:i.data.getEnergySourceByAccountIdAndType.totalRows,options:Ti(i.data.getEnergySourceByAccountIdAndType.rows)}},isLoading:y,onChange:e=>{e.value===uAe?u(!0):t(e)},placeholder:"Begin typing to find meters"})]})}var mAe;const fAe=(0,D.J1)(mAe||(mAe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAllTransportFuelTypes {\n    getAllTransportFuelTypes {\n      id\n      name\n    }\n  }\n"])));function yAe(e){let{value:n,onChange:t}=e;const{data:a,loading:r,error:i}=(0,h.IT)(fAe);return(0,Ze.jsx)(ze.l6,{placeholder:"Please select type of fuel",value:n,options:Ti(null==a?void 0:a.getAllTransportFuelTypes),error:i,isLoading:r,onChange:t})}var gAe;const bAe=(0,D.J1)(gAe||(gAe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAllJourneyTargets {\n    getAllJourneyTargets {\n      id\n      name\n    }\n  }\n"])));function hAe(e){let{value:n,onChange:t}=e;const{data:a,loading:r,error:i}=(0,h.IT)(bAe);return(0,Ze.jsx)(ze.l6,{placeholder:"Please select purpose of journey",value:n,options:Ti(null==a?void 0:a.getAllJourneyTargets),error:i,isLoading:r,onChange:t})}var vAe;const xAe=(0,D.J1)(vAe||(vAe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getAllUnits {\n    getAllUnits {\n      id\n      name\n    }\n  }\n"])));function TAe(e){let{value:n,onChange:t,possibleOptions:a,error:r,placeholder:i}=e;const{data:o,loading:l,error:s}=(0,h.IT)(xAe),c=Ti(null==o?void 0:o.getAllUnits).filter(e=>null==a?void 0:a.includes(e.label));return(0,Ze.jsx)(ze.l6,{placeholder:i||"Please select unit of measurement",value:n,options:c,error:s||r,isLoading:l,onChange:t})}const OAe=e=>{let{value:n,label:t,onChange:a,placeholder:r,possibleOptions:i,error:o}=e;const{data:l,loading:s,error:c}=(0,h.IT)(xAe),d=Ti(null==l?void 0:l.getAllUnits).filter(e=>null==i?void 0:i.includes(e.label)),u=c||o,p=u instanceof tW.K4?u.message:u;return(0,Ze.jsx)(f.Select,{placeholder:r||"Please select unit of measurement",value:n,label:t,isLoading:s,options:d,error:!!u,helperText:p||"",onChange:e=>a(e)})};var kAe;const jAe=(0,D.J1)(kAe||(kAe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getAllCurrencyTypes {\n    getAllCurrencyTypes {\n      id\n      name\n    }\n  }\n"])));function CAe(e){let{name:n,value:t,onChange:a,isMulti:r,currencyId:i,isDisabled:o}=e;const{data:l,loading:s,error:c}=(0,h.IT)(jAe),d=((null==l?void 0:l.getAllCurrencyTypes)||[]).find(e=>e.id===i),u=d&&xi(d);return(0,Ze.jsxs)(Ze.Fragment,{children:[s&&(0,Ze.jsx)("div",{children:"Loading..."}),!s&&l&&(0,Ze.jsx)(ze.l6,{name:n,placeholder:"Please select currency",isMulti:r,value:t||u,options:Ti(null==l?void 0:l.getAllCurrencyTypes),error:c,isLoading:s,onChange:a,isDisabled:o})]})}const SAe=e=>{let{name:n,value:t,onChange:a,label:r,errorMessage:i}=e;const{data:o,loading:l,error:s}=(0,h.IT)(jAe),c=Ti(null==o?void 0:o.getAllCurrencyTypes);return(0,Ze.jsx)(f.Select,{name:n,placeholder:"Please select currency",value:t,options:c,error:!!s||!!i,helperText:s&&s.message||i||"",isLoading:l,label:r,onChange:e=>a(e)})};function NAe(e){let{value:n,onChange:t,accountId:a}=e;const{data:r,loading:i,error:o}=(0,h.IT)(C5,{variables:{accountId:a}});return(0,Ze.jsx)(ze.l6,{placeholder:"Please select material",value:n,options:Ti(null==r?void 0:r.getMaterialsByAccountID),error:o,isLoading:i,onChange:t})}var wAe;const DAe=(0,D.J1)(wAe||(wAe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAllMaterialOriginTypes {\n    getAllMaterialOriginTypes {\n      id\n      name\n    }\n  }\n"])));function AAe(e){let{value:n,onChange:t}=e;const{data:a,loading:r,error:i}=(0,h.IT)(DAe);return(0,Ze.jsx)(ze.l6,{placeholder:"Please select origin of material",value:n,options:Ti(null==a?void 0:a.getAllMaterialOriginTypes),error:i,isLoading:r,onChange:t})}var RAe;const PAe=(0,D.J1)(RAe||(RAe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getMarketCarbonConversionFactors($accountId: ID) {\n    getMarketCarbonConversionFactors(accountId: $accountId) {\n      id\n      tariff\n    }\n  }\n"])));function LAe(e){var n;let{value:t,onChange:a,accountId:r,valueAsLabel:i}=e;const{data:o,loading:l,error:s}=(0,h.IT)(PAe,{variables:{accountId:r}});return(0,Ze.jsx)(ze.l6,{placeholder:"Please select a tariff",value:t,options:null==o||null===(n=o.getMarketCarbonConversionFactors)||void 0===n?void 0:n.map(e=>({label:e.tariff,value:i?e.tariff:e.id})),error:s,isLoading:l,onChange:a,isClearable:!0})}const IAe=e=>{var n,t;let{value:a,onChange:r,label:i,accountId:o,valueAsLabel:l}=e;const{data:s,loading:c,error:d}=(0,h.IT)(PAe,{variables:{accountId:o}}),u=(null==s||null===(n=s.getMarketCarbonConversionFactors)||void 0===n?void 0:n.map(e=>({label:e.tariff,value:l?e.tariff:e.id})))||[];return(0,Ze.jsx)(f.Select,{placeholder:"Please select a tariff",value:a,label:i,options:u,error:!!d,isLoading:c,helperText:null!==(t=null==d?void 0:d.message)&&void 0!==t?t:"",onChange:e=>r(e)})};function EAe(e){let{transactionType:n,aliasType:t,onChange:a,value:r,accountId:i,possibleOptions:o=[]}=e;const l=e=>{let{target:{select:n}}=e;a(n.value,n.label)};switch(t){case Vt.VT.Accuracy:return(0,Ze.jsx)(YDe,{onChange:l,value:r});case Vt.VT.Transport:return(0,Ze.jsx)(FDe,{onChange:l,value:r});case Vt.VT.Locationpoint:return(0,Ze.jsx)(nY,{value:r,onChange:l,createNew:!0});case Vt.VT.Wastein:return(0,Ze.jsx)(iY,{onChange:l,value:r,createNew:!0,createNewAccessor:"wasteIn."});case Vt.VT.Wasteout:return(0,Ze.jsx)(aY,{onChange:l,value:r,createNew:!0,createNewAccessor:"wasteOut."});case Vt.VT.Wastestream:return(0,Ze.jsx)(qne,{onChange:e=>a(e.id,e.name),value:r,createNew:!0});case Vt.VT.Containertypesize:return(0,Ze.jsx)(KDe,{onChange:a,value:r});case Vt.VT.Wastecontractor:return(0,Ze.jsx)(Bre,{onChange:l,value:r,accountId:i,utility:Vt.D_.Waste,filter:e=>e.type.includes(Vt.d.Contractor)});case Vt.VT.Wastecarrier:return(0,Ze.jsx)(Bre,{onChange:l,value:r,accountId:i,utility:Vt.D_.Waste,filter:e=>e.type.includes(Vt.d.Carrier)});case Vt.VT.Meter:return(0,Ze.jsx)(pAe,{type:n,onChange:e=>a(e.value,e.label),value:r,label:"Select meter",accountId:i,createNew:!0});case Vt.VT.Wastetreatmentprocess:return(0,Ze.jsx)(aq,{onChange:l,value:r});case Vt.VT.Fueltype:return(0,Ze.jsx)(MDe,{onChange:l,value:r});case Vt.VT.Transportfueltype:return(0,Ze.jsx)(yAe,{onChange:l,value:r});case Vt.VT.Transportsubtype:return(0,Ze.jsx)(GDe,{onChange:l,value:r});case Vt.VT.Journeytarget:return(0,Ze.jsx)(hAe,{onChange:l,value:r});case Vt.VT.Unit:return(0,Ze.jsx)(TAe,{onChange:l,value:r,possibleOptions:o});case Vt.VT.Currency:return(0,Ze.jsx)(CAe,{onChange:l,value:r});case Vt.VT.Tariff:return(0,Ze.jsx)(LAe,{onChange:l,value:r,accountId:i});case Vt.VT.Material:return(0,Ze.jsx)(NAe,{onChange:l,value:r,accountId:i});case Vt.VT.Materialorigin:return(0,Ze.jsx)(AAe,{onChange:l,value:r});case Vt.VT.Counterparty:return(0,Ze.jsx)(Bre,{onChange:l,value:r,accountId:i,utility:n});default:return null}}const _Ae=["transactionType","aliasType","unknownString","value","onChange","accountId","possibleOptions"];var FAe,BAe,UAe,MAe,VAe,zAe,GAe,$Ae;function WAe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function qAe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?WAe(Object(t),!0).forEach(function(n){JAe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):WAe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function JAe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function YAe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const HAe=(0,Ge.keyframes)(FAe||(FAe=YAe(["\n  from {\n    height:0;\n    overflow:hidden;\n    padding: 0px ",";\n    opacity:0;\n  }\n  to {\n    height: auto;\n    padding: ",";\n    opacity:1;\n  }\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>"".concat(e.theme.geometry.md.spacing)),KAe=(0,Ge.css)(BAe||(BAe=YAe(["\n  "," 0.2s;\n"])),HAe),QAe=(0,Ge.default)(ze.fI)(UAe||(UAe=YAe(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  align-items: start;\n  animation: ",";\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background,KAe),ZAe=(0,Ge.default)(ze.In)(MAe||(MAe=YAe(["\n  color: ",";\n  transition: opacity 0.2s, transform 0.2s;\n  transform: ",";\n  opacity: ",";\n"])),e=>e.theme.colors.success.normal.background,e=>e.matched&&!e.loading?"":"rotate(-180deg) scale(.5)",e=>e.matched&&!e.loading?"1":"0"),XAe=(0,Ge.default)(ze.In)(VAe||(VAe=YAe(["\n  color: ",";\n  transition: opacity 0.2s, transform 0.2s;\n  transform: ",";\n  opacity: ",";\n"])),e=>e.theme.colors.danger.normal.background,e=>e.matched||e.loading?"rotate(-180deg) scale(.5)":"",e=>e.matched||e.loading?"0":"1"),eRe=Ge.default.div(zAe||(zAe=YAe(["\n  position: absolute;\n  top: 100%;\n  left: 0;\n"]))),nRe=(0,Ge.default)(ze.fv)(GAe||(GAe=YAe(["\n  position: relative;\n"]))),tRe=(0,Ge.default)(ze.fv)($Ae||($Ae=YAe(["\n  margin-left: auto;\n"]))),aRe=e=>{let{transactionType:n,aliasType:t,unknownString:a,value:r,onChange:i,accountId:o,possibleOptions:l}=e,s=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,_Ae);return(0,Ze.jsxs)(QAe,qAe(qAe({container:!0},s),{},{children:[(0,Ze.jsx)(nRe,{item:!0,span:1,children:(0,Ze.jsx)(eRe,{children:r?(0,Ze.jsx)(ZAe,{matched:r,icon:"check"}):(0,Ze.jsx)(XAe,{matched:r,icon:"times"})})}),(0,Ze.jsx)(ze.fv,{item:!0,span:4,children:(0,Ze.jsx)(ze.EY,{children:a})}),(0,Ze.jsx)(tRe,{item:!0,span:4,children:(0,Ze.jsx)(EAe,{transactionType:n,aliasType:t,value:r,accountId:o,onChange:i,possibleOptions:l})})]}))},rRe=[[Vt.VT.Wastestream,"Waste Stream",Vt.D_.Waste],[Vt.VT.Wastetreatmentprocess,"Treatment Process",Vt.D_.Waste],[Vt.VT.Containertypesize,"Container Type",Vt.D_.Waste],[Vt.VT.Wastecontractor,"Waste Contractor",Vt.D_.Waste],[Vt.VT.Wastecarrier,"Waste Carrier",Vt.D_.Waste],[Vt.VT.Wastein,"Waste In Location",Vt.D_.Waste],[Vt.VT.Wasteout,"Waste Out Location",Vt.D_.Waste],[Vt.VT.Meter,"Meter Name",Vt.D_.Electricity],[Vt.VT.Meter,"Meter Name",Vt.D_.Gas],[Vt.VT.Meter,"Meter Name",Vt.D_.Water],[Vt.VT.Meter,"Meter Name",Vt.D_.Heatsteam],[Vt.VT.Locationpoint,"Location",Vt.D_.Transport],[Vt.VT.Locationpoint,"Location",Vt.D_.Fuel],[Vt.VT.Locationpoint,"Location",Vt.D_.Materials],[Vt.VT.Locationpoint,"Location",Vt.D_.Hotelstays],[Vt.VT.Transport,"Type",Vt.D_.Transport],[Vt.VT.Fueltype,"Fuel Type",Vt.D_.Fuel],[Vt.VT.Transportfueltype,"Fuel Type",Vt.D_.Transport],[Vt.VT.Transportsubtype,"Subtype",Vt.D_.Transport],[Vt.VT.Journeytarget,"Purpose Of Journey",Vt.D_.Transport],[Vt.VT.Unit,"Quantity units",Vt.D_.Fuel],[Vt.VT.Unit,"Quantity Weight Units",Vt.D_.Materials],[Vt.VT.Accuracy,"Act/Est",Vt.D_.Fuel],[Vt.VT.Currency,"Currency",Vt.D_.Waste],[Vt.VT.Currency,"Currency",Vt.D_.Electricity],[Vt.VT.Currency,"Currency",Vt.D_.Heatsteam],[Vt.VT.Currency,"Currency",Vt.D_.Gas],[Vt.VT.Currency,"Currency",Vt.D_.Water],[Vt.VT.Currency,"Currency",Vt.D_.Transport],[Vt.VT.Currency,"Currency",Vt.D_.Fuel],[Vt.VT.Currency,"Currency",Vt.D_.Materials],[Vt.VT.Currency,"Currency",Vt.D_.Hotelstays],[Vt.VT.Tariff,"Tariff",Vt.D_.Electricity],[Vt.VT.Tariff,"Tariff",Vt.D_.Heatsteam],[Vt.VT.Tariff,"Tariff",Vt.D_.Hotelstays],[Vt.VT.Material,"Material",Vt.D_.Materials],[Vt.VT.Materialorigin,"Origin",Vt.D_.Materials],[Vt.VT.Counterparty,"Supplier",Vt.D_.Materials],[Vt.VT.Counterparty,"Data Provider",Vt.D_.Hotelstays],[Vt.VT.Counterparty,"Supplier",Vt.D_.Electricity],[Vt.VT.Counterparty,"Supplier",Vt.D_.Gas],[Vt.VT.Counterparty,"Supplier",Vt.D_.Heatsteam],[Vt.VT.Counterparty,"Supplier",Vt.D_.Water],[Vt.VT.Counterparty,"Supplier",Vt.D_.Fuel],[Vt.VT.Counterparty,"Data Provider",Vt.D_.Transport]],iRe=(e,n)=>{const t=rRe.find(t=>{let[,a,r]=t;return a===e&&n===r});if(t){const[e]=t;return e}return null};var oRe;const lRe=(0,Ge.default)(ze.EY)(oRe||(oRe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin: auto;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),sRe=e=>{let{accountId:n,aliases:t,setAliases:a,transactionType:r,valuesToAlias:i}=e;return(0,Ze.jsxs)(g.Fragment,{children:[(0,Ze.jsxs)(lRe,{weight:"bold",children:["Currently viewing ",i.length," out of ",i.length," aliasable items"]}),Gt()(i).groupBy(e=>e.error.fieldName).map((e,i)=>{const o=iRe(i,r),l=t.filter(e=>e.aliasType===o),s=l.length===e.length;return(0,Ze.jsx)(IDe,{text:"".concat(i," ","(".concat(l.length," of ").concat(e.length," matched)")),color:s?"success":"danger",children:e.map(e=>{var t;const o=l.find(n=>n.aliasType===e.aliasType&&n.name===e.error.value),s=o?{value:o.parentId,label:o.parentName}:null;return(0,Ze.jsx)(aRe,{transactionType:r,aliasType:e.aliasType,unknownString:e.error.value,value:s,accountId:n,possibleOptions:null==e||null===(t=e.error)||void 0===t?void 0:t.possibleAliases,onChange:(t,i)=>{const o=(0,Ai.A)();a(a=>[...a.filter(n=>n.aliasType!==e.aliasType||n.name!==e.error.value),{id:o,accountId:n,parentId:t,parentName:i,name:e.error.value||"",aliasType:e.aliasType,energyType:r}])}},[i,e.error.value].join("-"))})},i)}).value()]})};var cRe,dRe,uRe,pRe,mRe,fRe,yRe,gRe,bRe,hRe,vRe,xRe;function TRe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ORe=Ge.default.div(cRe||(cRe=TRe(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),kRe=Ge.default.div(dRe||(dRe=TRe(["\n  overflow: auto;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),jRe=(0,Ge.default)(ze.$n)(uRe||(uRe=TRe(["\n  flex: 0 0 auto;\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),CRe=Ge.default.div(pRe||(pRe=TRe(["\n  background: white;\n  display: flex;\n  flex-direction: column;\n  height: auto;\n"]))),SRe=(0,Ge.default)(ze.fI)(mRe||(mRe=TRe(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.text.light.background),NRe=(0,Ge.default)(ze.fI)(fRe||(fRe=TRe(["\n  flex: 0 0 auto;\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),wRe=Ge.default.div(yRe||(yRe=TRe(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),DRe=(0,Ge.default)(ze.fI)(gRe||(gRe=TRe(["\n  padding-top: ",";\n"])),e=>e.theme.geometry.lg.spacing),ARe=(0,Ge.default)(ze.$n)(bRe||(bRe=TRe(["\n  margin-right: ",";\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),RRe=Ge.default.div(hRe||(hRe=TRe(["\n  flex: 1 1 auto;\n  overflow: auto;\n  padding: ",";\n"])),e=>e.theme.geometry.sm.spacing),PRe=(0,Ge.default)(ze.Ip)(vRe||(vRe=TRe(["\n  margin: 10px auto;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),LRe=(0,Ge.default)(ze.EY)(xRe||(xRe=TRe(["\n  margin: auto;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),IRe=()=>{const[e,n]=(0,g.useState)([]),{subject:t,id:a}=(0,m.g)(),r=rt(),i=(0,m.Zp)(),[o,l]=(0,g.useState)(!1),[{batch:s,valuesToAlias:c},{loading:d,error:u,refetch:p}]=function(e,n,t){var a;const r={id:n},{data:i,error:o,loading:l,refetch:s}=(0,h.IT)(V7,{variables:r,fetchPolicy:"network-only",notifyOnNetworkStatusChange:!0}),c=(null==i?void 0:i.getDataImportBatchById)||null,d=Gt()(null==c?void 0:c.errors).filter(e=>!!e.actionRequired).uniqBy(e=>[e.fieldName,e.value].join()).value(),u={GetAliasBatchInput:{accountId:e,aliasValues:d.map(e=>({name:e.value,aliasType:iRe(e.fieldName,t),energyType:t}))}},{data:p,error:m,loading:f,refetch:y}=(0,h.IT)(M7,{variables:u,skip:l||!!o,notifyOnNetworkStatusChange:!0}),g=(null==p||null===(a=p.getAliasByValueBatch)||void 0===a?void 0:a.getParentResponses)||[],b=Gt()(d).map(e=>({error:e,aliasType:iRe(e.fieldName,t)})).filter(e=>{let{error:n,aliasType:t}=e;return!(null!=g&&g.find(e=>e.aliasType===t&&n.value===e.name))}).value()||[];return[{batch:c,valuesToAlias:b},{loading:l||f,error:o||m,refetch:async()=>{await s(r),await y(u)}}]}(r,a,null==t?void 0:t.toUpperCase()),f=(0,g.useMemo)(()=>"".concat(r,"-").concat(a,"-").concat(null==t?void 0:t.toUpperCase()),[r,a,t]),{clearStorageItem:y}=((e,n,t)=>{const{showNotification:a}=vt();return(0,g.useEffect)(()=>{try{const n=localStorage.getItem(e),a=n?JSON.parse(n||""):[];a.length&&t(a)}catch(e){a("Failed to load aliases from storage")}},[e,a,t]),(0,g.useEffect)(()=>()=>{localStorage.setItem(e,JSON.stringify(n))},[e,n]),{clearStorageItem:()=>{localStorage.removeItem(e)}}})(f,e,n),[b]=(0,Ot.n)(U7),{showNotification:v}=vt(),x=async()=>{await b({variables:{id:a}}),i("/data/".concat(t,"/uploads")),y()},[T]=(0,Ot.n)(B7,{onCompleted:x,onError:e=>{v(e.message,"danger")}}),O=ADe()(t),k=c.length>0&&e.length<c.length,j=null==t?void 0:t.toUpperCase(),C=c.length?"Confirm Aliases":"Re-Submit Batch",S=c.length?"Are you sure these Aliases are correct?":"";return(0,Ze.jsxs)(ORe,{children:[o&&(0,Ze.jsx)(ze.aF,{onDismiss:()=>l(!1),show:!0,height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(wRe,{children:[(0,Ze.jsx)(DRe,{item:!0,children:(0,Ze.jsx)(ze.DZ,{children:C})}),(0,Ze.jsx)(DRe,{item:!0,children:(0,Ze.jsx)(ze.EY,{children:S})}),(0,Ze.jsxs)(DRe,{container:!0,distribution:"around",children:[(0,Ze.jsx)(ARe,{color:"info",onClick:()=>l(!1),children:"Cancel"}),(0,Ze.jsx)(ARe,{onClick:()=>{e.length?T({variables:{input:e.map(e=>PDe()(e,"parentName"))}}):x()},children:"Confirm"})]})]})}),(0,Ze.jsx)(ige,{name:"back",title:"".concat(O," Upload Aliases"),breadcrumbs:[{title:"Data",to:"/data"},{title:O,to:"/data/".concat(t)},{title:"Uploads",to:"/data/".concat(t,"/uploads")},{title:"Aliases"}],icon:"chart-line",iconColor:"quaternary",children:(0,Ze.jsx)(ze.$n,{inline:!0,component:"routerLink",color:"info",to:"/data/".concat(t,"/uploads"),children:"Back to Uploads"})}),(0,Ze.jsx)(kRe,{children:(0,Ze.jsxs)(CRe,{children:[(0,Ze.jsx)(SRe,{container:!0,distribution:"between",itemAlign:"center",children:(0,Ze.jsx)(ze.EY,{children:"To help keep your data consistent we need to match some unrecognized entries to existing types. Please review each item and either match it to an existing type, or create a new type."})}),d&&(0,Ze.jsx)(RRe,{children:(0,Ze.jsx)(PRe,{})}),u&&(0,Ze.jsx)(ub,{error:u,retry:p}),s&&!d&&!u&&!!c.length&&(0,Ze.jsx)(sRe,{accountId:r,aliases:e,transactionType:j,setAliases:n,valuesToAlias:c,batch:s}),s&&!d&&!u&&!c.length&&(0,Ze.jsx)(LRe,{weight:"bold",children:"All items has been aliased"}),(0,Ze.jsxs)(NRe,{itemAlign:"center",distribution:"end",vdistributon:"center",container:!0,children:[(0,Ze.jsx)(jRe,{inline:!0,color:"info",onClick:()=>{i("/data/".concat(t,"/uploads"))},children:"Cancel"}),(0,Ze.jsx)(jRe,{inline:!0,disabled:k,onClick:()=>{l(!0)},children:"Confirm"})]})]})})]})};var ERe;const _Re=(0,D.J1)(ERe||(ERe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  mutation DeleteTransposition($ID: ID!) {\n    deleteTransposition(input: { id: $ID }) {\n      id\n    }\n  }\n"]))),FRe=JSON.parse('["Individual Collection Date","Waste In Location","Waste Out Location","Waste Stream","Waste Contractor","Waste Carrier","Treatment Process","Number Of Collections","Number Of Containers","Container Type","Quantity","Unit Of Weight","Act/Est","Gate Fee","Management Fee","Bin Hire","Bin Exchange","Transport Charge","Lift Charge","Equipment Hire","Labour Cost","Misc Cost","Misc Cost Rate","Rebate","Penalty","Currency","Notes","Reference","Waste Transfer Note ID","Consignment Note (EA) ID","Consignment Note (SEPA) ID","Sales Order ID","Invoice Number","Evidence Reference","Reference","Other Reference"]'),BRe=JSON.parse('["Meter Name","Tariff","Start Date (dd/mm/yyyy)","Start time (HH:mm)","End Date (dd/mm/yyyy)","End time (HH:mm)","Quantity (kWh)","Act/Est","Charge/kWh","Total Cost","Currency","Supplier","Comment","Invoice Number","Evidence Reference","Other Reference"]'),URe=JSON.parse('["Meter Name","Tariff","Start Date (dd/mm/yyyy)","Start time (HH:mm)","End Date (dd/mm/yyyy)","End time (HH:mm)","Quantity (kWh)","Act/Est","Charge/kWh","Total Cost","Currency","Supplier","Comment","Invoice Number","Evidence Reference","Other Reference"]'),MRe=JSON.parse('["Meter Name","Start Date (dd/mm/yyyy)","End Date (dd/mm/yyyy)","Quantity (kWh)","Act/Est","Charge/kWh","Total Cost","Supplier","Currency","Comment","Invoice Number","Evidence Reference","Other Reference"]'),VRe=JSON.parse('["Meter name","Start Date (dd/mm/yyyy)","End Date (dd/mm/yyyy)","Reading","Quantity (m3)","Act/Est","Tariff (£/m3)","Currency","Supplier","Comment","Invoice Number","Evidence Reference","Other Reference"]'),zRe=JSON.parse('["Date","Location","Reference","Type","Subtype","Origin of Travel","Destination of Travel","Volume","Unit of Volume","Number of Journeys","Journey Distance","Total Distance","Unit of Distance","Freight (tonne.km)","Data Provider","Carrier","Purpose of Journey","Fuel Type","Cost of Journey","Currency","Document Reference","Notes"]'),GRe=JSON.parse('["Location","Date (dd/mm/yyyy)","Fuel Type","Quantity","Quantity units","Act/Est","Total cost","Currency","Supplier","Comment","Invoice Number","Evidence Reference","Other Reference"]'),$Re=JSON.parse('["Location","Date (dd/mm/yyyy)","Material","Origin","Supplier","Product Code","Quantity (number of units)","Quantity (weight)","Quantity (weight) units","Total Cost","Currency","Notes","Reference","Invoice Number","Evidence Reference","Other Reference"]'),WRe=JSON.parse('["Start Date (DD/MM/YYYY)","End Date (DD/MM/YYYY)","Location","Hotel Nights","Home Working Days","Hotel stay / Home working country","Data Provider","Tariff","Total Cost","Currency","Notes","Reference","Invoice Number","Evidence Reference","Other Reference"]'),qRe=JSON.parse('["Location","End Date (dd/mm/yyyy)","Gas Type","Gas Group","Quantity","Quantity Unit","Act/Est","Total Cost","Comment","Evidence Reference","Other Reference","Currency"]'),JRe="DEFAULT_TRANSPOSITION",YRe={WASTE:FRe,ELECTRICITY:BRe,GAS:MRe,WATER:VRe,TRANSPORT:zRe,FUEL:GRe,[Vt.D_.Heatsteam]:URe,[Vt.D_.Materials]:$Re,[Vt.D_.Hotelstays]:WRe,[Vt.D_.Refrigerant]:qRe};var HRe,KRe,QRe,ZRe;function XRe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ePe=Ge.default.div(HRe||(HRe=XRe(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex: 1 1 auto;\n"]))),nPe=Ge.default.div(KRe||(KRe=XRe(["\n  flex: ",";\n  display: flex;\n  flex-direction: column;\n"])),e=>e.noflex?"0 0 auto":"1 1 auto"),tPe=Ge.default.div(QRe||(QRe=XRe(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex: 1 1 auto;\n  background: ",";\n  margin-top: ",";\n"])),e=>{let{theme:n}=e;return n.colors.inputs.normal.background},e=>{let{theme:n}=e;return n.geometry.md.spacing}),aPe=(0,Ge.default)(ze.aF)(ZRe||(ZRe=XRe(["\n  z-index: 999 !important;\n"])));class rPe extends g.Component{constructor(e){super(e),this.handleChange=e=>{const{onTemplateChange:n=()=>{}}=this.props;this.setState({templateSelected:!0}),n(e)},this.deleteFunction=(e,n)=>{const{onTemplateChange:t=()=>{}}=this.props;n({variables:{ID:e}}),t({target:{value:null}})},this.onDismiss=()=>{this.setState({showModal:!1,idToBeDeleted:""})},this.deleteModal=e=>{const n=this.state.idToBeDeleted;return(0,Ze.jsx)(aPe,{name:"PickTemplate__DeleteModal",size:"sm",show:!0,dismissable:!0,onDismiss:this.onDismiss,children:(0,Ze.jsx)(fN,{name:"deleteTranspositions",notification:{show:!1},headingText:"Delete Transposition",bodyText:"Are you sure you want to delete this transposition?",onConfirmAction:()=>{this.deleteFunction(n,e),this.onDismiss()},onCancelAction:this.onDismiss})})},this.onDelete=(e,n)=>{e.preventDefault(),this.setState({showModal:!0,idToBeDeleted:n})},this.state={templateSelected:!1,showModal:!1,idToBeDeleted:""}}render(){const{loading:e,error:n,transpositions:t,value:a,defaultValue:r,refetch:i,permissions:o}=this.props,l=!!o.transposition.find(e=>e.startsWith("delete"));if(e)return(0,Ze.jsx)(ePe,{children:(0,Ze.jsx)(ze.Ip,{size:"lg"})});if(n)return(0,Ze.jsx)(ePe,{children:(0,Ze.jsx)(ze.EY,{children:"error"})});const s=t.map(e=>({label:e.transpositionName,value:e.id,hiddenIcon:e.isHalfHourly}));return s.unshift({value:JRe,label:"Default",hiddenIcon:!0}),s.unshift({value:r,label:"New Template...",hiddenIcon:!0}),(0,Ze.jsxs)(nPe,{noflex:this.state.templateSelected,children:[(0,Ze.jsx)(Qe.s,{mutation:_Re,onCompleted:i,children:e=>(0,Ze.jsxs)(Ze.Fragment,{children:[this.state.showModal&&this.deleteModal(e),(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(ze.Nl,{id:"uploadContainer__SelectTemplate",name:"uploadContainer__SelectTemplate",fileName:this.props.fileName,templateLabel:"Choose a template",size:"md",value:a,options:s,onChange:this.handleChange,onDelete:this.onDelete,canDelete:l})})]})}),!this.state.templateSelected&&(0,Ze.jsx)(tPe,{children:(0,Ze.jsx)(ze.EY,{size:"lg",weight:"bold",children:"Choose template..."})})]})}}const iPe=uv(rPe);var oPe,lPe,sPe,cPe;function dPe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function uPe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dPe(Object(t),!0).forEach(function(n){pPe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dPe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function pPe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function mPe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const fPe={[Vt.D_.Waste]:["Waste In Location","Waste Out Location","Waste Stream","Waste Contractor","Container Type","Treatment Process"],[Vt.D_.Electricity]:["Meter Name","Start Date (dd/mm/yyyy)","End Date (dd/mm/yyyy)","Quantity (kWh)","Act/Est"],[Vt.D_.Gas]:["Meter Name","Start Date (dd/mm/yyyy)","End Date (dd/mm/yyyy)","Quantity (kWh)","Act/Est"],[Vt.D_.Water]:["Meter Name","Start Date (dd/mm/yyyy)","End Date (dd/mm/yyyy)","Act/Est","Quantity (m3)","Tariff (£/m3)"],[Vt.D_.Transport]:["Date","Location","Type","Subtype","Origin of Travel","Destination of Travel","Purpose of Journey","Fuel Type","Notes"],[Vt.D_.Fuel]:["Location","Date (dd/mm/yyyy)","Quantity","Quantity units"],[Vt.D_.Materials]:["Location","Date (dd/mm/yyyy)","Material","Origin"],[Vt.D_.Hotelstays]:["StartDate","EndDate","Location","Hotel stay / Home working country","Data Provider"],[Vt.D_.Heatsteam]:["Meter Name","Start Date (dd/mm/yyyy)","End Date (dd/mm/yyyy)","Quantity (kWh)","Act/Est"],[Vt.D_.Refrigerants]:["Location","End Date (dd/mm/yyyy)","Gas Type","Gas Group","Quantity","Act/Est"]},yPe=(e,n)=>e.map(e=>({name:e,required:fPe[n].includes(e)})),gPe={[Vt.D_.Waste]:yPe(FRe,Vt.D_.Waste),[Vt.D_.Electricity]:yPe(BRe,Vt.D_.Electricity),[Vt.D_.Gas]:yPe(MRe,Vt.D_.Gas),[Vt.D_.Water]:yPe(VRe,Vt.D_.Water),[Vt.D_.Transport]:yPe(zRe,Vt.D_.Transport),[Vt.D_.Fuel]:yPe(GRe,Vt.D_.Fuel),[Vt.D_.Materials]:yPe($Re,Vt.D_.Materials),[Vt.D_.Hotelstays]:yPe(WRe,Vt.D_.Hotelstays),[Vt.D_.Heatsteam]:yPe(URe,Vt.D_.Heatsteam),[Vt.D_.Refrigerants]:yPe(qRe,Vt.D_.Refrigerants)},bPe=Ge.default.div(oPe||(oPe=mPe(["\n  ",";\n"])),e=>{let{theme:n}=e;return"\n    padding: ".concat(n.geometry.md.spacing,";\n    background: ").concat(n.colors.overlay.light.background,";\n    margin: ").concat(n.geometry.md.spacing," 0; \n    overflow: hidden;\n  ")}),hPe=Ge.default.div(lPe||(lPe=mPe(["\n  ",";\n"])),e=>{let{theme:n}=e;return"\n    padding: ".concat(n.geometry.md.spacing," ").concat(n.geometry.sm.spacing,"; \n    align-self: stretch;\n    background: ").concat(n.colors.basic.white,";\n    margin-top: ").concat(n.geometry.md.spacing,"; \n  ")}),vPe=Ge.default.div(sPe||(sPe=mPe(["\n  text-align: right;\n"]))),xPe=(0,Ge.default)(ze.$n)(cPe||(cPe=mPe(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.xs.spacing),TPe=(e,n)=>n.dittoColumn||n.ignored?e:e+1,OPe=e=>{const n=((e,n)=>{if(!n)return e.map(e=>({userColumn:e,dittoColumn:null,ignored:null}));const{mappings:t,ignored:a}=n,r=a.map(e=>e.toUpperCase().trim()),i=t.map(e=>e.columnName.toUpperCase().trim());return e.map(e=>{const n=String(e).toUpperCase().trim(),a=-1!==r.indexOf(n),o=i.indexOf(n);return{userColumn:e,dittoColumn:-1!==o?t[o].transposition:null,ignored:a}})})(e.headers,e.transpositions),[t,a]=(0,g.useState)(n),[r,i]=(0,g.useState)(e.templateName||e.defaultTemplateValue),[o,l]=(0,g.useState)(!1),{readOnly:s,defaultTemplateValue:c,onSave:d=()=>{},transpositionNames:u}=e,p=t.reduce(TPe,0),m=gPe[e.type].filter(e=>e.required).filter(e=>!t.find(n=>n.dittoColumn===e.name))&&!e.isHalfHourly,f=u&&!u.find(e=>e===r);return(0,Ze.jsxs)("div",{children:[(0,Ze.jsxs)(bPe,{children:[(0,Ze.jsx)(ze.Vo,{name:"TranspositionSection-HeadingEdit",size:"lg",readOnly:s,inline:!0,placeholder:r,color:s?"dark":"tertiary",onEditChange:()=>{l(!0)},editing:o,onChange:e=>i(e.target.value)}),(0,Ze.jsx)(ze.EY,{name:"TranspositionSection-MappedColsText",color:"dark",children:s?"Here are your mapped columns":"Create a template to map your excel columns to Rio’s columns. We’ll remember this for next time."}),(0,Ze.jsx)(hPe,{children:(0,Ze.jsx)(ze.FN,{show:3,scroll:3,name:"TranspositionSection__Carousel",responsive:[{breakpoint:1250,settings:{slidesToShow:1,slidesToScroll:1}},{breakpoint:1660,settings:{slidesToShow:2,slidesToScroll:2}}],children:t.map((n,r)=>{return(0,Ze.jsx)(ze.ao,{title:n.userColumn,name:"transposition-section__transposition-column__".concat(n.userColumn),value:n.dittoColumn||"Unmatched",ignored:n.ignored,options:(i=e.type,(0,zt.sortBy)(gPe[i],"name").map(e=>({value:e.name,label:e.name}))).filter(e=>!t.find(n=>n.dittoColumn===e.value)),width:"250px",onMatch:e=>a(n=>[...n.slice(0,r),uPe(uPe({},n[r]),{},{dittoColumn:e.target.value}),...n.slice(r+1)]),onIgnore:e=>a(n=>[...n.slice(0,r),uPe(uPe({},n[r]),{},{dittoColumn:null,ignored:e.target.checked}),...n.slice(r+1)]),readOnly:e.readOnly,match:t[r].dittoColumn,ignoreLabel:"Ignore column"},"transposition-section__transposition-column__".concat(n.userColumn,"__").concat(r));var i})})})]}),!p&&!!m.length&&(0,Ze.jsx)(ze.EY,{color:"danger",children:"There are columns missing from your upload. ".concat(m.map(e=>e.name).join(", ")," are required fields and need to be matched. Note, this applies to every row in your upload.")}),(0,Ze.jsx)(vPe,{children:(0,Ze.jsx)(xPe,{name:"TranspositionSection-Upload-Button",inline:!0,disabled:p||!s&&r===c||!s&&!f||!!m.length,color:p||!s&&r===c||!s&&!f?"danger":"success",onClick:n=>((n,a,i,o)=>(e.readOnly||!o&&r!==i)&&a({transpositionName:r,transposition:t}))(0,d,c,p),children:p&&"".concat(p," not matched or ignored")||!s&&r===c&&"Give your template a name"||!s&&!f&&"Name already exists"||s&&"Upload"||"Save & Upload"})})]})};var kPe,jPe,CPe;function SPe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const NPe=(0,D.J1)(kPe||(kPe=SPe(["\n  query GetTranspositionByAccountId($accId: ID!, $type: TransactionType!) {\n    getTranspositionsByAccountId(input: { accountId: $accId, includeSystemLevel: true, type: $type }) {\n      id\n      transpositionName\n      isHalfHourly\n    }\n  }\n"]))),wPe=(0,D.J1)(jPe||(jPe=SPe(["\n  query GetTranspositionById($id: ID!) {\n    getTranspositionById(id: $id) {\n      id\n      transpositionName\n      isHalfHourly\n      columnMapper {\n        mappings {\n          columnName\n          transposition\n        }\n        ignored\n      }\n    }\n  }\n"]))),DPe=(0,D.J1)(CPe||(CPe=SPe(["\n  mutation CreateTransposition(\n    $id: ID!\n    $name: String!\n    $mappings: [MappingInput!]!\n    $ignored: [String!]!\n    $accountId: String\n    $type: TransactionType!\n  ) {\n    createTransposition(\n      input: {\n        id: $id\n        accountId: $accountId\n        transpositionName: $name\n        columnMapper: { mappings: $mappings, ignored: $ignored }\n        type: $type\n      }\n    ) {\n      id\n      transpositionName\n      columnMapper {\n        mappings {\n          columnName\n          transposition\n        }\n        ignored\n      }\n    }\n  }\n"])));var APe;const RPe=Ge.default.div(APe||(APe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: row;\n  justify-content: center;\n  height: 100%;\n"]))),PPe=e=>{let{template:n,onConfirm:t,headers:a,type:r}=e;const i=n===JRe,{data:o,error:l,loading:s}=(0,h.IT)(wPe,{variables:{id:n},skip:i,fetchPolicy:"network-only"});if(s)return(0,Ze.jsx)(RPe,{children:(0,Ze.jsx)(ze.Ip,{name:"viewTranspositionSection-loading",size:"md"})});if(l)return(0,Ze.jsx)(RPe,{children:(0,Ze.jsx)(ze.EY,{name:"viewTranspositionSection-error",children:"error"})});const c=i?(e=>{const n={id:JRe,transpositionName:"Default",columnMapper:{mappings:YRe[e].map(e=>({columnName:e,transposition:e})),ignored:[]}};return"TRANSPORT"===e&&n.columnMapper.mappings.push({columnName:"Distance",transposition:"Total Distance"}),n})(r):o.getTranspositionById;return(0,Ze.jsx)(OPe,{type:r,name:"viewTranspositionSection-TranspositionSection",readOnly:!0,onSave:()=>t(c),headers:a,templateName:c.transpositionName,transpositions:c.columnMapper,isHalfHourly:c.isHalfHourly},n)};function LPe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function IPe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?LPe(Object(t),!0).forEach(function(n){EPe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):LPe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function EPe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var _Pe,FPe;function BPe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const UPe="New template name...",MPe=Ge.default.div(_Pe||(_Pe=BPe(["\n  display: flex;\n  flex: 1 1 auto;\n  justify-content: center;\n  height: 100%;\n"]))),VPe=Ge.default.div(FPe||(FPe=BPe(["\n  display: flex;\n  flex: 1;\n  flex-direction: column;\n"])));class zPe extends g.Component{constructor(e){super(e),this.onTemplateChange=e=>e.target.value===UPe?this.setState({template:null,createTemplate:!0}):this.setState({template:e.target.value,createTemplate:!1}),this.onTranspositionSave=(e,n)=>{const{accountId:t}=this.props;this.setState({transposition:e.transposition});const a=(0,Ai.A)();n({variables:{id:a,name:e.transpositionName||a,mappings:e.transposition.reduce((e,n)=>(n.dittoColumn&&e.push({columnName:n.userColumn.trim(),transposition:n.dittoColumn.trim()}),e),[]),ignored:e.transposition.reduce((e,n)=>(n.ignored&&e.push(n.userColumn),e),[]),accountId:t,type:this.state.type}})},this.onTranspositionConfirm=e=>{this.props.onTemplateSelect(e)},this.state={template:null,createTemplate:!1,transposition:null,type:e.type}}render(){const{transpositions:e,headers:n,fileName:t,accountId:a,loading:r,error:i,refetch:o}=this.props,{template:l,createTemplate:s}=this.state;return(0,Ze.jsxs)(VPe,{children:[(0,Ze.jsx)(iPe,{fileName:t,name:"pickTemplate",defaultValue:UPe,value:l,onTemplateChange:this.onTemplateChange,accountId:a,transpositions:e,error:i,loading:r,refetch:o}),l&&!s&&(0,Ze.jsx)(PPe,{name:"viewTranspositionSection",onConfirm:this.onTranspositionConfirm,headers:n,template:l,type:this.state.type}),!l&&s&&(0,Ze.jsx)(Qe.s,{mutation:DPe,onCompleted:e=>{this.onTranspositionConfirm(!!e&&e.createTransposition)},children:(t,a)=>{let{error:r,loading:i}=a;return i?(0,Ze.jsx)(MPe,{children:(0,Ze.jsx)(ze.Ip,{name:"createTemplate-Loading",size:"lg"})}):r?(0,Ze.jsx)(MPe,{children:(0,Ze.jsx)(ze.EY,{name:"createTemplate-error",children:"Template name already exists. Please try again with a different name."})}):(0,Ze.jsx)(OPe,{name:"TranspositionSection",defaultTemplateValue:UPe,headers:n,onSave:e=>{this.onTranspositionSave(e,t)},transpositionNames:e.map(e=>e.transpositionName),type:this.state.type})}})]})}}const GPe=($Pe=zPe,(0,$e.U)(NPe,{options:e=>({variables:{accId:e.accountId,type:e.type},fetchPolicy:"network-only"}),props:e=>{let{ownProps:n,data:t}=e;return t.loading?{loading:!0}:t.error?{error:t.error}:IPe(IPe({},n),{},{refetch:t.refetch,transpositions:t.getTranspositionsByAccountId})}})($Pe));var $Pe,WPe,qPe,JPe,YPe,HPe;function KPe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const QPe={ELECTRICITY:{header:"Does this electricity data relate to the account holder’s direct activities?",text:"This question allows Rio to determine which carbon emission scope your data relates to.\nSelect 'yes' if this data relates to electricity purchased and consumed directly by your company for its own buildings and operations (scope 2 and 3).\nSelect 'no' if the data relates to activities of contractors or other third parties (scope 3)."},GAS:{header:"Does this gas data relate to the account holder’s direct activities?",text:"This question allows Rio to determine which carbon emission scope your data relates to.\nSelect 'yes' if the data relates to gas purchased and consumed directly by your company for its own buildings and operations (scope 1 and 3).\nSelect 'no' if the data relates to activities of contractors or other third parties (scope 3)."},TRANSPORT:{header:"Does this data relate to the account holder’s owned and controlled vehicles?",text:"This question allows Rio to determine which carbon emission scope your data relates to.\nSelect 'yes' if the data relates to company-owned vehicles (scope 1, 2, and 3).\nSelect 'no' if the data relates to third party operated and/or owned vehicles, or commuting (scope 3)"},FUEL:{header:"Does this data relate to the account holder’s direct activities?",text:"This question allows Rio to determine which carbon emission scope your data relates to. \nSelect 'yes' if the data relates to fuels purchased and consumed directly by your company for its own buildings, operations and transport (scope 1 and 3). \nSelect 'no' if the data relates to activities of contractors or other third parties (scope 3)."},HEATSTEAM:{header:"Does this heat and steam data relate to the account holder's direct activities?",text:"This question allows Rio to determine which carbon emission scope your data relates to. Select 'yes' if this data relates to heat or steam purchased and consumed directly by your company for its own buildings and operations (scope 2 and 3). Select 'no' if the data relates to activities of contractors or other third parties (scope 3)."}},ZPe=Ge.default.div(WPe||(WPe=KPe(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: stretch;\n  height: 100%;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),XPe=(0,Ge.default)(ze.fI)(qPe||(qPe=KPe(["\n  width: 100%;\n  flex-flow: row nowrap;\n  justify-content: center;\n"]))),eLe=(0,Ge.default)(ze.$n)(JPe||(JPe=KPe(["\n  width: 100%;\n"]))),nLe=(0,Ge.default)(ze.fv)(YPe||(YPe=KPe(["\n  padding: ",";\n  min-width: 200px;\n"])),e=>e.theme.geometry.xs.spacing),tLe=(0,Ge.default)(ze.DZ)(HPe||(HPe=KPe(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),aLe=e=>{let{type:n,onConfirm:t}=e;return(0,Ze.jsxs)(ZPe,{children:[(0,Ze.jsx)(tLe,{size:"lg",children:QPe[n].header}),(0,Ze.jsx)(tLe,{size:"md",children:QPe[n].text}),(0,Ze.jsxs)(XPe,{container:!0,children:[(0,Ze.jsx)(nLe,{span:4,children:(0,Ze.jsx)(eLe,{name:"create-energyMeter__button--create",color:"success",onClick:()=>t(!0),children:"Yes"})}),(0,Ze.jsx)(nLe,{span:4,children:(0,Ze.jsx)(eLe,{name:"create-energyMeter__button--create",color:"info",onClick:()=>t(!1),children:"No"})})]})]})};function rLe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function iLe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rLe(Object(t),!0).forEach(function(n){oLe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rLe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function oLe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const{Electricity:lLe,Gas:sLe,Transport:cLe,Fuel:dLe}=Vt.D_,uLe=e=>{let{template:n,transactionType:t,onComplete:a,onDismiss:r}=e;const i=rt(),[o,l]=(0,g.useState)({transpositionHeaders:null,error:null,file:null,transpositionId:null,showIsDirectActivityModal:!1,isDirectActivity:null}),s=e=>l(n=>iLe(iLe({},n),e)),{file:c,transpositionId:d,showIsDirectActivityModal:u,transpositionHeaders:p}=o||{},[m,{loading:f}]=uy(),y=[lLe,sLe,cLe,dLe].includes(t),b=(e,n)=>e&&null===n;var h;h=f,(0,g.useEffect)(()=>{const e=e=>{if(h)return e.preventDefault(),e.returnValue="",""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[h]);const v=async e=>{const{isDirectActivity:n,transpositionId:r=d}=e||{};if(r&&s({transpositionId:r}),y&&c&&r&&!u)s({showIsDirectActivityModal:!0});else if(((e,n,t,a)=>{const r=!n||null!==t,i=!b(e,a);return e&&r&&i})(c,u,n,r)){const e={transactionType:t,fileName:null==c?void 0:c.name};null!==n&&(e.isDirectActivity=n),r&&r!==JRe&&(e.transpositionId=r);try{s({transpositionId:r,isDirectActivity:n}),await m(iLe(iLe({},e),{},{file:c})),a()}catch(e){s({error:e})}finally{s({file:null,showIsDirectActivityModal:!1})}}},x=GPe;return(0,Ze.jsx)(VR,{isUploading:f,errors:null,size:"lg",template:n,onFileInput:async e=>{let[n]=e;const t=await(a=n,new Promise((e,n)=>{const t=new FileReader;t.onloadend=()=>{const n=function(e){const n=(0,Lr.LF)(e,{type:"array"}),t=n.Sheets[n.SheetNames[0]];if(!t["!ref"])return[];const a=Lr.Wp.decode_range(t["!ref"]);let r;const i=a.s.r,o=[];for(r=a.s.c;r<=a.e.c;r+=1){const e=t[Lr.Wp.encode_cell({c:r,r:i})];e&&o.push(e.v)}return o}(t.result);e(n)},t.onerror=n,t.readAsArrayBuffer(a)}));var a;s({file:n,transpositionHeaders:t})},onDismiss:r,children:u?(0,Ze.jsx)(aLe,{onConfirm:e=>{v({isDirectActivity:e})},type:t}):b(c,d)&&(0,Ze.jsx)(x,{fileName:null==c?void 0:c.name,headers:p,template:n,onTemplateSelect:e=>{v({transpositionId:e.id})},accountId:i,type:t})})};var pLe,mLe,fLe,yLe,gLe,bLe,hLe,vLe;function xLe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const TLe=(0,D.J1)(pLe||(pLe=xLe(["\n  query GetDataImportBatchImportFileUrl($id: ID!) {\n    getDataImportBatchImportFileUrl(id: $id)\n  }\n"]))),OLe=(0,D.J1)(mLe||(mLe=xLe(["\n  query GetDataImportBatchesPage(\n    $accountId: ID!\n    $type: TransactionType!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getDataImportBatchesPage(\n      accountId: $accountId\n      type: $type\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        status\n        fileName\n        user {\n          id\n          first_name\n          last_name\n        }\n        lastUpdated\n        rowsUploaded\n        isLegacy\n        approved\n        transposition {\n          transpositionName\n        }\n        anomalyCount\n        externalActionUrl\n        rollbackUser {\n          id\n          first_name\n          last_name\n        }\n        rollbackReason\n        isOverwriting\n      }\n    }\n  }\n"]))),kLe=(0,D.J1)(fLe||(fLe=xLe(["\n  mutation deleteBatch($id: ID!) {\n    deleteDataImportBatch(id: $id) {\n      id\n    }\n  }\n"]))),jLe=(0,D.J1)(yLe||(yLe=xLe(["\n  mutation RollBackDataImportBatch($id: ID!, $rollbackReason: String) {\n    rollBackDataImportBatch(id: $id, rollbackReason: $rollbackReason)\n  }\n"]))),CLe=(0,D.J1)(gLe||(gLe=xLe(["\n  mutation UploadOcrDocument(\n    $id: ID!\n    $accountId: String!\n    $parserId: String!\n    $fileName: String!\n    $fileContent: String!\n    $utility: OcrUtility!\n  ) {\n    uploadOcrDocument(\n      input: {\n        id: $id\n        accountId: $accountId\n        parserId: $parserId\n        fileName: $fileName\n        fileContent: $fileContent\n        utility: $utility\n      }\n    )\n  }\n"]))),SLe=(0,D.J1)(bLe||(bLe=xLe(["\n  query GetAllTemplates {\n    getAllTemplates {\n      id\n      name\n      parserId\n    }\n  }\n"]))),NLe=(0,D.J1)(hLe||(hLe=xLe(["\n  query GetUploadSummaryDashboardUrl($uploadType: TransactionType!, $batchId: ID!, $accountId: String!) {\n    getUploadSummaryDashboard(uploadType: $uploadType, batchId: $batchId, accountId: $accountId)\n  }\n"]))),wLe=(0,D.J1)(vLe||(vLe=xLe(["\n  mutation ApproveUpload($batchId: ID!) {\n    approveUpload(batchId: $batchId) {\n      id\n      errorsCount\n      fileName\n      status\n      timeStamp\n      importType\n      rowsUploaded\n      anomalyCount\n      approved\n      transposition {\n        transpositionName\n      }\n    }\n  }\n"])));var DLe=t(72168),ALe=t.n(DLe);const RLe=JSON.parse('{"USD":"$","CAD":"CA$","EUR":"€","AED":"AED","AFN":"Af","ALL":"ALL","AMD":"AMD","ARS":"AR$","AUD":"AU$","AZN":"man.","BAM":"KM","BDT":"Tk","BGN":"BGN","BHD":"BD","BIF":"FBu","BND":"BN$","BOB":"Bs","BRL":"R$","BWP":"BWP","BYN":"Br","BZD":"BZ$","CDF":"CDF","CHF":"CHF","CLP":"CL$","CNY":"CN¥","COP":"CO$","CRC":"₡","CVE":"CV$","CZK":"Kč","DJF":"Fdj","DKK":"Dkr","DOP":"RD$","DZD":"DA","EEK":"Ekr","EGP":"EGP","ERN":"Nfk","ETB":"Br","GBP":"£","GEL":"GEL","GHS":"GH₵","GNF":"FG","GTQ":"GTQ","HKD":"HK$","HNL":"HNL","HRK":"kn","HUF":"Ft","IDR":"Rp","ILS":"₪","INR":"Rs","IQD":"IQD","IRR":"IRR","ISK":"Ikr","JMD":"J$","JOD":"JD","JPY":"¥","KES":"Ksh","KHR":"KHR","KMF":"CF","KRW":"₩","KWD":"KD","KZT":"KZT","LBP":"LB£","LKR":"SLRs","LTL":"Lt","LVL":"Ls","LYD":"LD","MAD":"MAD","MDL":"MDL","MGA":"MGA","MKD":"MKD","MMK":"MMK","MOP":"MOP$","MUR":"MURs","MXN":"MX$","MYR":"RM","MZN":"MTn","NAD":"N$","NGN":"₦","NIO":"C$","NOK":"Nkr","NPR":"NPRs","NZD":"NZ$","OMR":"OMR","PAB":"B/.","PEN":"S/.","PHP":"₱","PKR":"PKRs","PLN":"zł","PYG":"₲","QAR":"QR","RON":"RON","RSD":"din.","RUB":"RUB","RWF":"RWF","SAR":"SR","SDG":"SDG","SEK":"Skr","SGD":"S$","SOS":"Ssh","SYP":"SY£","THB":"฿","TND":"DT","TOP":"T$","TRY":"TL","TTD":"TT$","TWD":"NT$","TZS":"TSh","UAH":"₴","UGX":"USh","UYU":"$U","UZS":"UZS","VEF":"Bs.F","VND":"₫","XAF":"FCFA","XOF":"CFA","YER":"YR","ZAR":"R","ZMK":"ZK","ZWL":"ZWL$"}');var PLe,LLe,ILe;function ELe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _Le=Ge.default.td(PLe||(PLe=ELe(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  border-right: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.overlay.normal.background),FLe=Ge.default.div(LLe||(LLe=ELe(["\n  width: ","px;\n"])),e=>e.width),BLe=(0,Ge.default)(p.Link)(ILe||(ILe=ELe(["\n  font-family: inherit;\n  display: inline-block;\n  color: inherit;\n  opacity: 1;\n  &:hover {\n    text-decoration: none;\n  }\n  text-decoration: underline;\n  font-size: ",";\n"])),e=>e.theme.fonts.sm.size),ULe=e=>{const n=Wt()(e).local().format("DD/MM/YYYY");return"Invalid date"===n?"-":n},MLe=(e,n)=>{if(n.currency){const t=RLe[n.currency]||"";return null!==e?ALe().formatMoney(e,t):"-"}return null!==e?ALe().formatMoney(e):"-"},VLe=e=>null!==e||void 0!==e?e:"-",zLe=e=>{let{id:n,rowData:t,columnHeaderModel:a}=e;return(0,Ze.jsx)("tr",{name:"wasteTransaction-row--".concat(n),"data-id":n,children:a.map(e=>{const a=e.field?(0,zt.get)(t,e.field):t[e.id];if(!e.display)return null;const r="".concat(n,"-").concat(e.id);let i;switch(e.dataType){case"boolean":i=(0,Ze.jsx)(ze.Sc,{id:"".concat(e.id,"__checkBox--").concat(n),name:"".concat(e.id,"__checkBox--").concat(n),size:"md",disabled:!0,checked:a});break;case"time":i=(0,Ze.jsx)(ze.EY,{children:a});break;case"date":i=(0,Ze.jsx)(ze.EY,{children:ULe(a)});break;case"currency":i=(0,Ze.jsx)(ze.EY,{children:MLe(a,t)});break;case"number":i=(0,Ze.jsx)(ze.EY,{children:a?VLe(a):"-"});break;case"linkToDocument":i=(0,Ze.jsx)(BLe,{to:"/documents/all?search=".concat(a),children:a});break;default:i=(0,Ze.jsx)(ze.EY,{children:a||"-"})}return(0,Ze.jsx)(_Le,{children:(0,Ze.jsx)(FLe,{width:e.width,children:i})},r)})})};var GLe,$Le,WLe;function qLe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const JLe=Ge.default.table(GLe||(GLe=qLe(["\n  tr:nth-child(even) {\n    background: ",";\n  }\n"])),e=>e.theme.colors.overlay.light.background),YLe=Ge.default.th($Le||($Le=qLe(["\n  padding: ",";\n  background: ",";\n  border-bottom: 1px solid ",";\n  border-right: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.light.background,e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.overlay.normal.background),HLe=Ge.default.div(WLe||(WLe=qLe(["\n  width: ","px;\n"])),e=>e.width),KLe=e=>{const{columnHeaderModel:n,data:t,onDocumentClick:a=()=>{}}=e;return(0,Ze.jsxs)(JLe,{children:[(0,Ze.jsx)("thead",{children:(0,Ze.jsx)("tr",{children:n.map(e=>e.display?(0,Ze.jsx)(YLe,{children:(0,Ze.jsx)(HLe,{width:e.width,children:(0,Ze.jsx)(ze.EY,{inline:!0,name:"wasteTransaction-row__".concat(e.id),size:"md",weight:"bold",children:e.displayName})})},e.id):null)})}),(0,Ze.jsx)("tbody",{children:t.map(e=>(0,Ze.jsx)(zLe,{id:e.id,rowData:e,columnHeaderModel:n,onDocumentClick:a},e.id))})]})};var QLe,ZLe,XLe,eIe,nIe;function tIe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const aIe=(0,Ge.default)(ze.DZ)(QLe||(QLe=tIe(["\n  text-align: center;\n  margin-top: ",";\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.md.spacing),rIe=Ge.default.div(ZLe||(ZLe=tIe(["\n  width: 100%;\n  padding-bottom: 15px;\n  overflow-y: auto;\n"]))),iIe=Ge.default.div(XLe||(XLe=tIe(["\n  text-align: center;\n  margin: ",";\n"])),e=>e.theme.geometry.md.spacing),oIe=(0,Ge.default)(ze.Ip)(eIe||(eIe=tIe(["\n  margin: 0 auto;\n"]))),lIe=(0,Ge.default)(ze.$n)(nIe||(nIe=tIe(["\n  width: 240px;\n"])));function sIe(e){const{formData:n={},onConfirm:t=()=>{},onBack:a=()=>{},dataSection:r}=e,[i,o]=Mm(r),[l,{data:s,loading:c}]=o;return(0,g.useEffect)(()=>{l(n,i)},[]),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(aIe,{children:"Data preview"}),(0,Ze.jsxs)(rIe,{children:[c&&(0,Ze.jsx)(oIe,{}),!c&&(0,Ze.jsx)(KLe,{columnHeaderModel:i,data:s})]}),(0,Ze.jsxs)(iIe,{children:[(0,Ze.jsx)(lIe,{onClick:a,color:"info",style:{marginRight:"20px"},disabled:c,inline:!0,children:"Back"}),(0,Ze.jsx)(lIe,{onClick:t,disabled:c,inline:!0,children:"Confirm data import to RIO"})]})]})}var cIe;const dIe=Ge.default.div(cIe||(cIe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n"]))),uIe="Direct",pIe="Indirect",mIe=e=>e.data.activity===uIe;function fIe(e){const{onUploadCompleted:n=()=>{},onError:t=()=>{},formData:a={},dataSection:r}=e,[i,o]=Mm(r),[l,{data:s}]=o,[c]=uy();return(0,g.useEffect)(()=>{l(a,i)},[]),(0,g.useEffect)(()=>{i.length&&s.length&&(async()=>{const e=((e,n)=>{const t=new Map(n.map(e=>{let{defaultName:n,id:t}=e;return[t,n]}));return e.map(e=>{const n={};return(0,zt.forIn)(e,(e,a)=>{t.get(a)&&((0,zt.isDate)(e)?n[t.get(a)]=Ht(e):(0,zt.isObject)(e)?n[t.get(a)]=(0,zt.get)(e,"name"):n[t.get(a)]=e)}),n})})(s,i),{sheetName:o,fileName:l}=(e=>{let{startDate:n,endDate:t,uploadReference:a}=e;const r="DD-MM-YYYY",i=t?"—".concat(Ht(t,r)):"",o="".concat(Ht(n,r)).concat(i),l=a.replace(/[^a-zA-Z0-9]/g," ");return{sheetName:o,fileName:"".concat(o," ").concat(l)}})(a),d=Vr(e,l,"xlsx",o),u="WASTE"===r;try{await c({file:d,fileName:d.name,transactionType:r,isDirectActivity:!u&&mIe(a)}),n()}catch(e){t(e)}})()},[s,i]),(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(dIe,{children:[(0,Ze.jsx)(ze.DZ,{children:"Data uploading"}),(0,Ze.jsx)(ze.Ip,{})]})})}var yIe,gIe,bIe,hIe,vIe,xIe,TIe,OIe,kIe,jIe,CIe,SIe,NIe,wIe,DIe,AIe,RIe;function PIe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const LIe=Ge.default.div(yIe||(yIe=PIe(["\n  min-height: 550px;\n"]))),IIe=(0,Ge.default)(ze.DZ)(gIe||(gIe=PIe(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing),EIe=(0,Ge.default)(ze.fv)(bIe||(bIe=PIe(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),_Ie=(0,Ge.default)(ze.fv)(hIe||(hIe=PIe(["\n  margin: 8px 0;\n  padding: ",";\n  display: flex;\n  justify-content: flex-start;\n  align-items: center;\n  flex-direction: row;\n\n  & small {\n    font-size: 14px;\n  }\n"])),e=>e.theme.geometry.xs.spacing),FIe=(0,Ge.default)(ze.JU)(vIe||(vIe=PIe(["\n  padding-left: 20px;\n"]))),BIe=(0,Ge.default)(FIe)(xIe||(xIe=PIe(["\n  font-size: 12px;\n"]))),UIe=Ge.default.div(TIe||(TIe=PIe(["\n  display: flex;\n  align-items: center;\n"]))),MIe=Ge.default.div(OIe||(OIe=PIe(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n"]))),VIe=Ge.default.div(kIe||(kIe=PIe(["\n  text-align: center;\n  margin: ",";\n"])),e=>e.theme.geometry.md.spacing),zIe=(0,Ge.default)(ze.l6)(jIe||(jIe=PIe(["\n  text-transform: capitalize;\n"]))),GIe=(0,Ge.default)(ze.lr)(CIe||(CIe=PIe(["\n  .DayPickerInput-Overlay {\n    top: -150px;\n    left: 50%;\n  }\n"]))),$Ie=(0,Ge.default)(ze.AG)(SIe||(SIe=PIe(["\n  .DayPickerInput-Overlay {\n    top: -150px;\n    left: 50%;\n  }\n"]))),WIe=Ge.default.div(NIe||(NIe=PIe(["\n  text-align: left;\n  margin: 18px 0;\n"]))),qIe=Ge.default.div(wIe||(wIe=PIe(["\n  text-align: center;\n  color: #ff909a;\n"]))),JIe=(0,Ge.default)(ze.Ip)(DIe||(DIe=PIe(["\n  margin: 0 auto;\n"]))),YIe=Ge.default.div(AIe||(AIe=PIe(["\n  display: ",";\n"])),e=>{let{isVisible:n}=e;return n?"block":"none"}),HIe=(0,Ge.default)(ze.fI)(RIe||(RIe=PIe(["\n  padding: 18px 0;\n"])));function KIe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function QIe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?KIe(Object(t),!0).forEach(function(n){ZIe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):KIe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ZIe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function XIe(e){const{form:n,onSubmit:t=()=>{},children:a,showEndDate:r,showSubmitButton:i=!0,showTime:o}=e,{handleSubmit:l,setValue:s,watch:c,register:d,control:u,formState:{isValid:p,errors:m}}=n||{},f=(e=>{var n;return"maxLength"===(null===(n=e.uploadReference)||void 0===n?void 0:n.type)?"Upload reference max length is 80 characters":e.data?"Please fill all mandatory fields":void 0})(m);(0,g.useEffect)(()=>{d("dataFormInputStrategy"),d("dataFormRowsFillingStrategy"),d("data.currency"),d("startDate",{required:!0}),d("endDate"),d("startTime"),d("endTime")},[d]);const[y,b,h,v,x,T,O]=c(["dataFormRowsFillingStrategy","dataFormInputStrategy","startDate","endDate","startTime","endTime","dateFrequency"]),k=b===Va.Single,j=b===Va.Aggregated,C=y===za.Distributed,S=!k&&!j,N=y===za.Replicated,w=!(0,zt.isNil)(b)||S,D=C,A=N||!(0,zt.isNil)(O),R=!(0,zt.isNil)(h)&&""!==h,P=(C&&!(0,zt.isNil)(O)&&R||N&&h)&&(!r||v),L=y===za.Distributed||r,I=!p&&P,E=Object.entries($a).map(e=>{let[,n]=e;return{label:(0,zt.capitalize)(n),value:n}});return S&&s("dataFormInputStrategy",Va.Single),(0,Ze.jsx)("form",{onSubmit:l(t),children:(0,Ze.jsx)(ze.hh,{children:(0,Ze.jsxs)(LIe,{children:[(0,Ze.jsx)(IIe,{children:"Direct Data Upload"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(WIe,{children:"Is this data entry for a single transaction or for aggregated set of data?"})}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(_Ie,{item:!0,span:6,children:[(0,Ze.jsx)(ze.Sc,{size:"md",id:"isSingle",checked:k||S,value:Va.Single,onChange:()=>s("dataFormInputStrategy",Va.Single)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsxs)(FIe,{labelFor:"isSingle",children:["Single ",(0,Ze.jsx)("br",{})," ",(0,Ze.jsxs)("small",{children:["(i.e. single commuter journey, ",(0,Ze.jsx)("br",{})," regular waste collection ",(0,Ze.jsx)("br",{})," or meter reading)"]})]})})]}),(0,Ze.jsxs)(_Ie,{item:!0,span:6,children:[(0,Ze.jsx)(ze.Sc,{size:"md",id:"isAggregated",name:"Aggregated__Container",checked:j,value:Va.Aggregated,onChange:()=>s("dataFormInputStrategy",Va.Aggregated)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsxs)(FIe,{labelFor:"isAggregated",children:["Aggregated data ",(0,Ze.jsx)("br",{})," ",(0,Ze.jsxs)("small",{children:["(i.e annual waste tonnage, ",(0,Ze.jsx)("br",{}),"quarterly energy bill)"]})]})})]})]}),w&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WIe,{children:["Do you want this data entry to be ",k||S?"replicated":"distributed"," in your database and reports?"]})}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(_Ie,{item:!0,span:6,children:[(0,Ze.jsx)(ze.Sc,{size:"md",id:"isReplicated",checked:C,onChange:()=>s("dataFormRowsFillingStrategy",za.Distributed)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{labelFor:"isReplicated",children:"Yes"})})]}),(0,Ze.jsxs)(_Ie,{item:!0,span:6,children:[(0,Ze.jsx)(ze.Sc,{size:"md",id:"isNotReplicated",checked:N,onChange:()=>s("dataFormRowsFillingStrategy",za.Replicated)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{labelFor:"isNotReplicated",children:"No"})})]})]})]}),D&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(EIe,{item:!0,children:(0,Ze.jsx)(UIe,{children:(0,Ze.jsxs)(FIe,{children:["Frequency of data to be ",k?"replicated":"distributed",":"]})})})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(EIe,{item:!0,children:(0,Ze.jsx)(Rw.xI,{name:"dateFrequency",render:e=>{let{field:n}=e;return(0,Ze.jsx)(zIe,QIe(QIe({},n),{},{onChange:function(){let{target:{value:e}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.onChange(e)},options:E}))},control:u})})})]}),A&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Start date"})}),(0,Ze.jsx)(GIe,{onDayClick:e=>s("startDate",e),name:"startDate",selectedDate:h,disabledDatesAfter:v,box:!0})]})}),o&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Start time (optional)"})}),(0,Ze.jsx)($Ie,{onTimeChange:e=>s("startTime",e),name:"startTime",selectedTime:x||null,box:!0})]})}),L&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"End date"})}),(0,Ze.jsx)(GIe,{onDayClick:e=>s("endDate",e),name:"endDate",selectedDate:v,disabledDatesBefore:h,box:!0})]})}),o&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"End time (optional)"})}),(0,Ze.jsx)($Ie,{onTimeChange:e=>s("endTime",e),name:"endTime",selectedTime:T||null,box:!0})]})})]})]}),P&&a,I&&(0,Ze.jsx)(qIe,{children:f}),P&&i&&(0,Ze.jsx)(VIe,{children:(0,Ze.jsx)(ze.$n,{type:"submit",inline:!0,children:"Confirm data entry"})})]})})})}const eEe=["value","onChange","name","error","trigger","onCreateNew","mapper","options"];function nEe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function tEe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nEe(Object(t),!0).forEach(function(n){aEe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nEe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function aEe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function rEe(e){const{value:n,onChange:t,name:a,error:r,trigger:i=()=>{},onCreateNew:o=()=>{},mapper:l=()=>{},options:s=[]}=e,c=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,eEe);return(0,Ze.jsx)(ze.l6,tEe(tEe({},c),{},{name:a,error:r,onChange:function(){let{target:{value:e}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:n}=e;if("createNew"===n)return o(a);t(e),i()},options:s,value:n&&l(n)}))}const iEe=["value","onChange","error","label","options","onCreateNew","disabled","helperText"];function oEe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function lEe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?oEe(Object(t),!0).forEach(function(n){sEe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oEe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function sEe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const cEe=e=>{const{value:n,onChange:t,error:a,label:r,options:i=[],onCreateNew:o=()=>{},disabled:l,helperText:s}=e,c=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,iEe),d=(0,g.useCallback)(e=>{if("createNew"===e.value&&o)return o(e.label);t(e)},[t,o]),u="string"==typeof n?n:null==n?void 0:n.value;return(0,Ze.jsx)(f.Select,lEe(lEe({},c),{},{value:u,label:r,error:!!a,disabled:l,options:i,helperText:a||s,onChange:d}))},dEe=["data","financial","reference"];function uEe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pEe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uEe(Object(t),!0).forEach(function(n){mEe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uEe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mEe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const fEe=e=>{const{form:n,onSubmit:t=()=>{}}=e,{setValue:a,control:r,register:i,watch:o}=n;(0,g.useEffect)(()=>{i("isFinancialDataRequired"),i("isReferenceDataRequired")},[i]);const l=rt(),[s,c]=o(["isFinancialDataRequired","isReferenceDataRequired"]),d=e=>a("isFinancialDataRequired",e),u=e=>a("isReferenceDataRequired",e),p=(0,g.useCallback)(e=>{let{data:n,financial:a,reference:r}=e,i=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,dEe);const o=pEe(pEe({},i),{},{data:n});s&&(o.data=pEe(pEe({},o.data),a)),c&&(o.data=pEe(pEe({},o.data),r)),t(o)},[t,s,c]);return(0,Ze.jsx)(XIe,{onSubmit:p,form:n,children:(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsx)(WIe,{children:"Please enter the following mandatory transactional waste data:"})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Waste-Out Location"})}),(0,Ze.jsx)(Rw.xI,{name:"data.wasteOut",render:e=>{var n;let{field:t,fieldState:r}=e;return(0,Ze.jsx)(aY,{value:t.value,onChange:e=>a("data.wasteOut",e.target.select),error:null===(n=r.error)||void 0===n?void 0:n.message,createNewModalSize:11,createNew:!0})},rules:{required:"Waste-Out Location is required"},defaultValue:null,control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Waste Stream"})}),(0,Ze.jsx)(Rw.xI,{name:"data.wasteStream",render:e=>{var n;let{field:t,fieldState:r}=e;return(0,Ze.jsx)(qne,{createNew:!0,value:t.value,onChange:e=>a("data.wasteStream",{value:e.id,label:e.name}),createNewModalSize:11,error:null===(n=r.error)||void 0===n?void 0:n.message})},rules:{required:"Waste Stream is required"},defaultValue:null,control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Waste-In Location"})}),(0,Ze.jsx)(Rw.xI,{name:"data.wasteIn",render:e=>{var n;let{field:t,fieldState:r}=e;return(0,Ze.jsx)(iY,{value:t.value,onChange:e=>a("data.wasteIn",e.target.select),error:null===(n=r.error)||void 0===n?void 0:n.message,createNewModalSize:11,createNew:!0})},rules:{required:"Waste-In Location is required"},defaultValue:null,control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Waste Contractor"})}),(0,Ze.jsx)(Rw.xI,{name:"data.wasteContractor",render:e=>{var n;let{field:t,fieldState:r}=e;return(0,Ze.jsx)(Bre,{value:t.value,onChange:e=>a("data.wasteContractor",e.target.select),accountId:l,error:null===(n=r.error)||void 0===n?void 0:n.message,filter:e=>e.type.includes(Vt.d.Contractor),includeEmpty:!0,utility:Vt.D_.Waste})},rules:{required:"Waste Contractor is required"},defaultValue:null,control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Waste Carrier"})}),(0,Ze.jsx)(Rw.xI,{name:"data.wasteCarrier",render:e=>{let{field:n}=e;return(0,Ze.jsx)(Bre,{value:n.value,onChange:e=>a("data.wasteCarrier",e.target.select),accountId:l,filter:e=>e.type.includes(Vt.d.Carrier),includeEmpty:!0,utility:Vt.D_.Waste})},defaultValue:null,control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Container Type Size"})}),(0,Ze.jsx)(Rw.xI,{name:"data.containerTypeSize",render:e=>{var n;let{field:t,fieldState:r}=e;return(0,Ze.jsx)(KDe,{value:t.value,onChange:(e,n)=>a("data.containerTypeSize",{value:e,label:n}),error:null===(n=r.error)||void 0===n?void 0:n.message})},rules:{required:"Container Type Size is required"},defaultValue:null,control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Number Of Collections"})}),(0,Ze.jsx)(Rw.xI,{name:"data.numberOfCollections",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Quantity"})}),(0,Ze.jsx)(Rw.xI,{name:"data.quantity",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(lD,pEe({error:null===(n=a.error)||void 0===n?void 0:n.message},t))},rules:{required:"Quantity is required"},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Unit of Weight"})}),(0,Ze.jsx)(Rw.xI,{name:"data.unitOfWeight",render:e=>{var n;let{field:t,fieldState:r}=e;return(0,Ze.jsx)(TAe,{onChange:e=>a("data.unitOfWeight",e.target.select),value:t.value,possibleOptions:["kg","t"],error:null===(n=r.error)||void 0===n?void 0:n.message,placeholder:"Please select unit of weight"})},rules:{required:"Unit of Weight is required"},defaultValue:null,control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Number Of Containers"})}),(0,Ze.jsx)(Rw.xI,{name:"data.numberOfContainers",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Treatment Process"})}),(0,Ze.jsx)(Rw.xI,{name:"data.treatmentProcess",render:e=>{var n;let{field:t,fieldState:r}=e;return(0,Ze.jsx)(aq,{value:t.value,onChange:e=>a("data.treatmentProcess",e.target.select),error:null===(n=r.error)||void 0===n?void 0:n.message})},rules:{required:"Treatment Process is required"},control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Act/Est"})}),(0,Ze.jsx)(Rw.xI,{name:"data.accuracy",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,pEe(pEe({},t),{},{options:[{value:Vt.C.Act,label:Vt.C.Act},{value:Vt.C.Est,label:Vt.C.Est}],error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Act/Est is required"},control:r})]})}),(0,Ze.jsxs)(HIe,{container:!0,itemAlign:"center",children:[(0,Ze.jsx)("div",{style:{width:"50%"},children:"Do you want to add Financial data?"}),(0,Ze.jsx)("div",{children:(0,Ze.jsxs)(ze.fI,{container:!0,align:"center",children:[(0,Ze.jsxs)(_Ie,{item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:s,onChange:()=>d(!0)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Yes"})})]}),(0,Ze.jsxs)(_Ie,{item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:!s,onChange:()=>d(!1)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"No"})})]})]})})]}),(0,Ze.jsxs)(YIe,{isVisible:s,children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Gate Fee"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.gateFee",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Management Fee"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.managementFee",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Bin Hire"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.binHire",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Bin Exchange Fee"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.binExchangeFee",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Lift Charge"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.liftCharge",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Labour Cost"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.labourCost",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Equipment Hire"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.equipmentHire",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Misc Cost"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.miscCost",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Misc Cost Rate"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.miscCostRate",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Transport Charge"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.transportCharge",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Rebate"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.rebate",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Penalty"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.penalty",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Currency"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.currency",render:e=>{let{field:n}=e;return(0,Ze.jsx)(CAe,{value:n.value,onChange:e=>a("financial.currency",e.target.select)})},control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Notes"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.notes",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,pEe({},n))},defaultValue:"",control:r})]})})]}),(0,Ze.jsxs)(HIe,{container:!0,itemAlign:"center",children:[(0,Ze.jsx)("div",{style:{width:"50%"},children:"Do you want to add any references?"}),(0,Ze.jsx)("div",{children:(0,Ze.jsxs)(ze.fI,{container:!0,align:"center",children:[(0,Ze.jsxs)(_Ie,{item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:c,onChange:()=>u(!0)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Yes"})})]}),(0,Ze.jsxs)(_Ie,{item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:!c,onChange:()=>u(!1)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"No"})})]})]})})]}),(0,Ze.jsxs)(YIe,{isVisible:c,children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Waste Transfer Note ID"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.wasteTransferNote",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Consignment Note (SEPA) ID "})}),(0,Ze.jsx)(Rw.xI,{name:"reference.consignmentNoteId",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Consignment Note (EA) ID"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.consignmentNoteEA",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Invoice Number"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.invoiceNumber",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Sales Order ID"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.salesOrder",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Reference"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Evidence Reference"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.evidenceReference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,pEe({},n))},defaultValue:"",control:r})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Other Reference"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.otherReference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,pEe({},n))},defaultValue:"",control:r})]})})]}),e.children]})})};function yEe(e){const{onSuccess:n,onDismiss:t,showModal:a,energyType:r}=e,[i,o]=(0,g.useState)(!1),[l,s]=(0,g.useState)(null),[c,d]=(0,g.useState)(null),{showNotification:u}=vt(),p=rt();return(0,Ze.jsxs)(ze.aF,{span:5,size:"md",show:!0,name:"CreateWasteStream__Modal--create",dismissable:!0,onDismiss:t,children:[!i&&(0,Ze.jsx)(FY,{onSuccess:function(e,t,a){let{id:r,name:i,locationPoint:o}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n("data.energySource",{id:r,name:i,locationPoint:o})},onError:u,showModal:a,accountId:p,defaultEnergyType:r,disableType:!0,onCreateClick:()=>o(!0),locationData:l,onMeterNameChange:d,createItem:{value:c}}),i&&(0,Ze.jsx)(TU,{accountId:p,onSuccess:(e,n,t,a)=>{u(e,n),s(a),o(!1)}})]})}const gEe=["data","financial","reference"];function bEe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function hEe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?bEe(Object(t),!0).forEach(function(n){vEe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bEe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function vEe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function xEe(e){var n;const{form:t={},onSubmit:a=()=>{},dataSection:r}=e,{setValue:i,control:o,trigger:l,register:s,watch:c}=t,[d,u]=(0,g.useState)(!1),[p]=(0,g.useState)(t.getValues("data.currency")),m=rc(),f=rt(),{data:y,loading:b}=nd(r),{data:h,loading:v}=Ru(),x=m.data.find(e=>e.startsWith("createEnergySource"));(0,g.useEffect)(()=>{s("isReferenceDataRequired")},[s]);const[T]=c(["isReferenceDataRequired"]),O={"data.energySource":()=>u(!0)},k=e=>O[e]&&O[e](),j=e=>i("isReferenceDataRequired",e),C=function(){let{id:e,name:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:n,value:{id:e,name:n}}},S=function(){let{id:e,name:n,locationPoint:t,inOut:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:n,value:{id:e,name:n,locationPoint:t,inOut:a}}},N=y.map(S);x&&N.unshift({label:"Create new ...",value:{id:"createNew"}});const w=[{id:"ACT",name:"ACT"},{id:"EST",name:"EST"}].map(C),D=[{id:uIe,name:uIe},{id:pIe,name:pIe}].map(C),A=h.map(C),R={id:uIe,name:uIe},P=null===(n=A.find(e=>e.label===p))||void 0===n?void 0:n.value,L=b||v;return(0,Ze.jsxs)(XIe,{onSubmit:e=>{var n,t;let{data:r,financial:i,reference:o}=e,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,gEe);const s=hEe(hEe({},l),{},{data:hEe(hEe({},r),{},{accuracy:(null==r||null===(n=r.accuracy)||void 0===n?void 0:n.name)||"ACT",activity:r.activity.name,currency:(null==i||null===(t=i.currency)||void 0===t?void 0:t.name)||p})});T&&(s.data=hEe(hEe({},s.data),o)),a(s)},form:t,showEndDate:!0,showTime:!0,children:[L&&(0,Ze.jsx)(JIe,{}),!L&&(0,Ze.jsxs)("div",{children:[d&&(0,Ze.jsx)(yEe,{energyType:r,onSuccess:(e,n)=>{const t=S(n);i(e,t),l(),u(!1)},onDismiss:u,showModal:d,accountId:f}),(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsxs)(WIe,{children:["Please enter the following transactional ",r.toLowerCase()," data:"]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Meter Name"})}),(0,Ze.jsx)(Rw.xI,{name:"data.energySource",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,hEe(hEe({},t),{},{onCreateNew:k,mapper:S,options:N,error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Meter Name is required"},defaultValue:null,control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Tariff (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.tariff",render:e=>{let{field:n}=e;return(0,Ze.jsx)(LAe,hEe(hEe({},n),{},{accountId:f,valueAsLabel:!0}))},defaultValue:null,control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Quantity (kWh)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.quantity",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(lD,hEe(hEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Quantity is required"},control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Total Cost (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.totalCost",render:e=>{let{field:n}=e;return(0,Ze.jsx)(oD,hEe({},n))},control:o,defaultValue:""})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Currency"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.currency",render:e=>{let{field:n}=e;return(0,Ze.jsx)(rEe,hEe(hEe({},n),{},{mapper:C,options:A}))},defaultValue:P,control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Act/Est (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.accuracy",render:e=>{let{field:n}=e;return(0,Ze.jsx)(rEe,hEe(hEe({},n),{},{mapper:C,options:w}))},defaultValue:null,control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Supplier (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.supplier",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(Bre,{accountId:f,value:t.value,onChange:e=>i("data.supplier",e.target.select),error:null===(n=a.error)||void 0===n?void 0:n.message,utility:r,isClearable:!0})},defaultValue:null,control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Charge/kWh (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.charge/kwh",render:e=>{let{field:n}=e;return(0,Ze.jsx)(lD,hEe({},n))},defaultValue:"",control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Activity"})}),(0,Ze.jsx)(Rw.xI,{name:"data.activity",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,hEe(hEe({},t),{},{mapper:C,options:D,error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Activity is required"},defaultValue:R,control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Comment (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.comment",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,hEe({},n))},control:o,defaultValue:""})]})}),(0,Ze.jsxs)(HIe,{container:!0,itemAlign:"center",children:[(0,Ze.jsx)("div",{style:{width:"50%"},children:"Do you want to add any references?"}),(0,Ze.jsx)("div",{children:(0,Ze.jsxs)(ze.fI,{container:!0,align:"center",children:[(0,Ze.jsxs)(_Ie,{item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:T,onChange:()=>j(!0)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Yes"})})]}),(0,Ze.jsxs)(_Ie,{item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:!T,onChange:()=>j(!1)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"No"})})]})]})})]}),(0,Ze.jsxs)(YIe,{isVisible:T,children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Invoice Number (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.invoiceNumber",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,hEe({},n))},defaultValue:"",control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Evidence Reference (optional) "})}),(0,Ze.jsx)(Rw.xI,{name:"reference.evidenceReference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,hEe({},n))},defaultValue:"",control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Other Reference (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.otherReference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,hEe({},n))},defaultValue:"",control:o})]})})]}),e.children]})]})}const TEe=["value","onChange","name","trigger","mapper","error"];function OEe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kEe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?OEe(Object(t),!0).forEach(function(n){jEe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):OEe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jEe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function CEe(e){const{value:n,onChange:t,name:a,trigger:r=()=>{},mapper:i=()=>{},error:o}=e,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,TEe);return(0,Ze.jsx)(nY,kEe(kEe({},l),{},{name:a,createNewModalSize:4,onChange:function(){let{target:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t({name:e.select.label,id:e.select.value}),r()},value:n&&i(n),error:o,createNew:!0}))}const SEe=["data","financial","reference"];function NEe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wEe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?NEe(Object(t),!0).forEach(function(n){DEe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):NEe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function DEe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function AEe(e){var n;const{form:t={},onSubmit:a=()=>{},dataSection:r}=e,{setValue:i,control:o,watch:l,getValues:s,getFieldState:c,formState:d}=t,[u]=(0,g.useState)(t.getValues("data.currency")),{data:p,refetch:m}=ym(),f=gm(),y=bm(),{data:b}=Ru(),h=rt(),[v]=l(["isReferenceDataRequired"]),x=(0,g.useCallback)(e=>i("isReferenceDataRequired",e),[i]),T=(0,g.useCallback)(()=>x(!0),[x]),O=(0,g.useCallback)(()=>x(!1),[x]),k=function(){let{id:e,name:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:n,value:{id:e,name:n}}},j=[{id:uIe,name:"Yes"},{id:pIe,name:"No"}].map(k),C=(0,g.useMemo)(()=>({id:"L",name:"L"}),[]),S=[C,{id:"t",name:"t"}].map(k),N=(0,g.useMemo)(()=>({id:"km",name:"km"}),[]),w=[N,{id:"mi",name:"mi"},{id:"passenger.km",name:"passenger.km"}].map(k),D=b.map(k),A=null===(n=D.find(e=>e.label===u))||void 0===n?void 0:n.value,R=t.getValues().data,P=!(null!=R&&R.distance||null!=R&&R.volume||R.journeyDistance),L=!(null!=R&&R.distance||null!=R&&R.freight||R.journeyDistance),I=!(null!=R&&R.volume||null!=R&&R.freight),E=(null==R?void 0:R.distance)&&"Distance Unit is required",_=(0,g.useCallback)(()=>{const e=t.getValues().data.journeyDistance,n=t.getValues().data.numberOfJourneys;i("data.distance",e*n)},[t,i]),F=(0,g.useCallback)(e=>{i("data.numberOfJourneys",e),_()},[_,i]),B=(0,g.useCallback)(e=>{i("data.journeyDistance",e||null),_()},[_,i]),U=(0,g.useCallback)(e=>{i("data.type",e),i("data.subtype",null),m({typeId:e.id})},[m,i]),M=(0,g.useCallback)((e,n)=>{const{isTouched:t}=c(e,d);return{required:{value:t,message:n}}},[c,d]),V=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{id:"purposeOfJourneyLabel",children:"Purpose of Journey"})}),(0,Ze.jsx)(Rw.xI,{name:"data.purpose",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,wEe(wEe({"aria-labelledby":"purposeOfJourneyLabel",mapper:k,options:null==f?void 0:f.map(k)},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Purpose of Journey is required "},defaultValue:null,control:o})]})}),[o,f]),z=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{id:"accountHolderOwnedAndControlled",children:"Account holder’s owned and controlled vehicles"})}),(0,Ze.jsx)(Rw.xI,{name:"data.activity",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,wEe(wEe({mapper:k,options:j},t),{},{"aria-labelledby":"accountHolderOwnedAndControlled",error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Account holder's owned and controlled vehicles is required"},control:o})]})}),[j,o]),G=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{id:"locationLabel",children:"Location"})}),(0,Ze.jsx)(Rw.xI,{name:"data.location",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(CEe,wEe(wEe({},t),{},{mapper:k,labelledBy:"locationLabel",error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Location is required"},defaultValue:null,control:o})]})}),[o]),$=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{id:"typeSelect",children:"Type"})}),(0,Ze.jsx)(Rw.xI,{name:"data.type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,wEe(wEe({},t),{},{onChange:e=>{t.onChange(e),U(e)},options:null==y?void 0:y.map(k),mapper:k,"aria-labelledby":"typeSelect",error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Type is required"},defaultValue:null,control:o})]})}),[o,y,U]),W=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{id:"subtypeSelect",children:"Subtype"})}),(0,Ze.jsx)(Rw.xI,{name:"data.subtype",render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(rEe,wEe(wEe({},a),{},{mapper:k,options:null===(n=y.find(e=>{let{id:n}=e;return n===(null==R?void 0:R.type.id)}))||void 0===n?void 0:n.subtypes.map(k),"aria-labelledby":"subtypeSelect",error:null===(t=r.error)||void 0===t?void 0:t.message}))},rules:{required:"Subtype is required"},defaultValue:null,control:o})]})}),[y,R,o]),q=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{id:"fuelSelect",children:"Fuel Type"})}),(0,Ze.jsx)(Rw.xI,{name:"data.fuelType",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,wEe(wEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message,mapper:k,options:null==p?void 0:p.map(k),"aria-labelledby":"fuelSelect"}))},rules:{required:"Fuel Type is required"},defaultValue:null,control:o})]})}),[p,o]),J=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{id:"dataProviderSelect",children:"Data Provider (Optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.dataProvider",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(Bre,{accountId:h,value:t.value,onChange:e=>i("data.dataProvider",e.target.select),error:null===(n=a.error)||void 0===n?void 0:n.message,utility:Vt.D_.Transport})},defaultValue:null,control:o})]})}),[o,i]),Y=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{labelFor:"originOfTravel",children:"Origin of Travel"})}),(0,Ze.jsx)(Rw.xI,{name:"data.origin",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ze.ks,wEe(wEe({id:"originOfTravel"},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Origin of Travel is required"},control:o,defaultValue:""})]})}),[o]),H=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{labelFor:"destinationOfTravel",children:"Destination of Travel"})}),(0,Ze.jsx)(Rw.xI,{name:"data.destination",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ze.ks,wEe(wEe({id:"destinationOfTravel"},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},control:o,defaultValue:"",rules:{required:"Destination of Travel is required"}})]})}),[o]),K=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsxs)(MIe,{children:[(0,Ze.jsxs)(FIe,{labelFor:"fuelVolume",children:["Fuel Volume",L?"":" (optional)"]}),(0,Ze.jsx)(BIe,{children:"If no Volume figure is entered you will need to provide a value for 'Journey Distance'"})]}),(0,Ze.jsx)(Rw.xI,{name:"data.volume",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(lD,wEe(wEe({},t),{},{id:"fuelVolume",error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:!!L&&"Fuel Volume is required"},defaultValue:null,control:o})]})}),[o,L]),Q=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsxs)(FIe,{children:["Volume Unit ",!s("data.volume")&&"(optional)"]})}),(0,Ze.jsx)(Rw.xI,{name:"data.volumeUnit",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,wEe(wEe({},t),{},{mapper:k,options:S,error:null===(n=a.error)||void 0===n?void 0:n.message}))},defaultValue:C,control:o,rules:M("data.volumeUnit","Unit of Volume is required")})]})}),[o,C,M,s,S]),Z=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{labelFor:"numberOfJourneys",children:"Number of Journeys"})}),(0,Ze.jsx)(Rw.xI,{name:"data.numberOfJourneys",control:o,defaultValue:1,rules:{required:!1},render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(oD,wEe(wEe({},t),{},{id:"numberOfJourneys",error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>{t.onChange(e),F(e)}}))}})]})}),[o,F]),X=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsxs)(FIe,{labelFor:"journeyDistance",children:["Journey Distance",I?"":" (optional)"]})}),(0,Ze.jsx)(Rw.xI,{name:"data.journeyDistance",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(lD,wEe(wEe({},t),{},{id:"journeyDistance",onChange:e=>{t.onChange(e),B(e)},error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:I},defaultValue:null,control:o})]})}),[o,B,I]),ee=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsxs)(FIe,{labelFor:"totalDistance",children:["Total Distance",I?"":" (optional)"]})}),(0,Ze.jsx)(Rw.xI,{name:"data.distance",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(oD,wEe(wEe({},t),{},{id:"totalDistance",error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:I},defaultValue:null,control:o})]})}),[o,I]),ne=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsxs)(FIe,{id:"distanceUnitLabel",children:["Distance Unit",E?"":" (optional)"]})}),(0,Ze.jsx)(Rw.xI,{name:"data.distanceUnit",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,wEe(wEe({"aria-labelledby":"distanceUnitLabel"},t),{},{mapper:k,options:w,error:null===(n=a.error)||void 0===n?void 0:n.message}))},defaultValue:N,control:o,rules:M("data.distance","Unit of Distance is required")})]})}),[o,N,w,M,E]),te=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsxs)(FIe,{children:["Freight (tonne.km)",P?"":" (optional)"]})}),(0,Ze.jsx)(Rw.xI,{name:"data.freight",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(lD,wEe(wEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:P},defaultValue:"",control:o})]})}),[o,P]),ae=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsxs)(FIe,{children:["Carrier",null!=R&&R.freight?"":" (optional)"]})}),(0,Ze.jsx)(Rw.xI,{name:"data.carrier",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ze.ks,wEe(wEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},control:o,defaultValue:"",rules:M("data.freight","Carrier is required")})]})}),[null==R?void 0:R.freight,o,M]),re=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Cost (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.cost",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(oD,wEe(wEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},control:o,defaultValue:""})]})}),[o]),ie=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Currency"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.currency",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,wEe(wEe({},t),{},{mapper:k,options:D,error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Currency is required"},defaultValue:A,control:o})]})}),[o,A,D]),oe=(0,g.useCallback)(()=>(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Notes (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.notes",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ze.ks,wEe(wEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},control:o,defaultValue:""})]})}),[o]),le=(0,g.useCallback)(()=>(0,Ze.jsxs)(HIe,{container:!0,itemAlign:"center",children:[(0,Ze.jsx)("div",{style:{width:"50%"},children:"Do you want to add any references?"}),(0,Ze.jsx)("div",{children:(0,Ze.jsxs)(ze.fI,{container:!0,align:"center",children:[(0,Ze.jsxs)(_Ie,{item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:v,onChange:T}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Yes"})})]}),(0,Ze.jsxs)(_Ie,{item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:!v,onChange:O}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"No"})})]})]})})]}),[O,v,T]),se=(0,g.useCallback)(()=>(0,Ze.jsxs)(YIe,{isVisible:!0,children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Reference"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.reference",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ze.ks,wEe(wEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},defaultValue:"",control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Document Reference"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.documentReference",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ze.ks,wEe(wEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},defaultValue:"",control:o})]})})]}),[o]);return(0,Ze.jsxs)(XIe,{onSubmit:e=>{var n,t,r;let{data:i,financial:o,reference:l}=e,s=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,SEe);const c=wEe(wEe({},s),{},{data:wEe(wEe({},i),{},{activity:i.activity.id,location:i.location.name,type:i.type.name,subtype:i.subtype.name,fuelType:i.fuelType.name,volumeUnit:i.volume?null===(n=i.volumeUnit)||void 0===n?void 0:n.name:null,distanceUnit:i.journeyDistance?null===(t=i.distanceUnit)||void 0===t?void 0:t.name:null,dataProvider:i.dataProvider?i.dataProvider:null,purpose:i.purpose.name,currency:(null==o||null===(r=o.currency)||void 0===r?void 0:r.name)||u,volume:i.volume&&Number(i.volume),freight:i.freight&&Number(i.freight),distance:i.distance&&Number(i.distance),journeyDistance:i.journeyDistance&&Number(i.journeyDistance)})});v&&(c.data=wEe(wEe({},c.data),l)),a(c)},form:t,showSubmitButton:!!l("data.activity"),children:[(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsxs)(WIe,{children:["Please enter the following transactional ",r.toLowerCase()," data:"]})}),G(),V(),!!l("data.purpose")&&z(),!!l("data.activity")&&(0,Ze.jsxs)(Ze.Fragment,{children:[$(),!!l("data.type")&&W(),q(),J(),K(),!!l("data.volume")&&Q(),Y(),H(),Z(),X(),!!l("data.journeyDistance")&&ee(),!!l("data.journeyDistance")&&ne(),te(),ae(),re(),ie(),oe(),le(),v&&se(),e.children]})]})}const REe=["data","financial","reference"];function PEe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function LEe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?PEe(Object(t),!0).forEach(function(n){IEe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):PEe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function IEe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function EEe(e){var n;const{form:t,onSubmit:a=()=>{},dataSection:r}=e,{setValue:i,control:o,trigger:l,register:s,watch:c}=t,[d,u]=(0,g.useState)(!1),[p]=(0,g.useState)(t.getValues("data.currency")),m=rt(),f=rc(),{data:y,loading:b}=nd(r),{data:h,loading:v}=Ru(),x=f.data.find(e=>e.startsWith("createEnergySource"));(0,g.useEffect)(()=>{s("isReferenceDataRequired")},[s]);const[T]=c(["isReferenceDataRequired"]),O={"data.energySource":()=>u(!0)},k=e=>O[e]&&O[e](),j=e=>i("isReferenceDataRequired",e),C=e=>{let{id:n,name:t}=e;return{label:t,value:{id:n,name:t}}},S=e=>{let{id:n,name:t,locationPoint:a,inOut:r}=e;return{label:t,value:{id:n,name:t,locationPoint:a,inOut:r}}},N=(0,g.useMemo)(()=>[{id:Vt.C.Act,name:Vt.C.Act},{id:Vt.C.Est,name:Vt.C.Est}].map(C),[C]),w=y.map(S);x&&w.unshift({label:"Create new ...",value:{id:"createNew"}});const D=h.map(C),A={id:Vt.C.Act,name:Vt.C.Act},R=null===(n=D.find(e=>e.label===p))||void 0===n?void 0:n.value,P=b||v,L=()=>{var e,n;const a=(null===(e=t.getValues().data)||void 0===e?void 0:e.totalCost)||0,r=(null===(n=t.getValues().data)||void 0===n?void 0:n.quantity)||0;a>0&&r>0&&i("data.tariff",a/r)},I=()=>{var e,n;const a=(null===(e=t.getValues().data)||void 0===e?void 0:e.tariff)||0,r=(null===(n=t.getValues().data)||void 0===n?void 0:n.quantity)||0;a>0&&r>0&&i("data.totalCost",a*r)};return(0,Ze.jsxs)(XIe,{onSubmit:e=>{var n,t;let{data:r,financial:i,reference:o}=e,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,REe);const s=LEe(LEe({},l),{},{data:LEe(LEe({},r),{},{accuracy:(null==r||null===(n=r.accuracy)||void 0===n?void 0:n.name)||"ACT",currency:(null==i||null===(t=i.currency)||void 0===t?void 0:t.name)||p})});T&&(s.data=LEe(LEe({},s.data),o)),a(s)},form:t,showEndDate:!0,children:[P&&(0,Ze.jsx)(JIe,{}),!P&&(0,Ze.jsxs)("div",{children:[d&&(0,Ze.jsx)(yEe,{energyType:r,onSuccess:(e,n)=>{const t=S(n);i(e,t),l(),u(!1)},onDismiss:u,showModal:d,accountId:m}),(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsxs)(WIe,{children:["Please enter the following transactional ",r.toLowerCase()," data:"]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Meter Name"})}),(0,Ze.jsx)(Rw.xI,{name:"data.energySource",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,LEe({onCreateNew:k,mapper:S,options:w,error:null===(n=a.error)||void 0===n?void 0:n.message},t))},rules:{required:"Meter Name is required"},control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Reading (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.reading",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(oD,LEe(LEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},defaultValue:"",control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Supplier (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.supplier",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(Bre,{accountId:m,value:t.value,onChange:e=>i("data.supplier",e.target.select),error:null===(n=a.error)||void 0===n?void 0:n.message,utility:Vt.D_.Water})},control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Quantity (m3)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.quantity",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(lD,LEe(LEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>{t.onChange(e),(e=>{i("data.quantity",e),L(),I()})(e)}}))},rules:{required:"Quantity is required"},defaultValue:"",control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Act/Est"})}),(0,Ze.jsx)(Rw.xI,{name:"data.accuracy",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,LEe(LEe({},t),{},{mapper:C,options:N,error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Act/Est is required"},defaultValue:A,control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Tariff (cost per m3) (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.tariff",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(oD,LEe(LEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>{t.onChange(e),(e=>{i("data.tariff",e),I()})(e)}}))},defaultValue:"",control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Total Cost (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.totalCost",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(oD,LEe(LEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>{t.onChange(e),(e=>{i("data.totalCost",e),L()})(e)}}))},defaultValue:"",control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Currency"})}),(0,Ze.jsx)(Rw.xI,{name:"financial.currency",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rEe,LEe(LEe({},t),{},{mapper:C,options:D,error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Currency is required"},defaultValue:R,control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Comment (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"data.comment",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,LEe({},n))},control:o,defaultValue:""})]})}),(0,Ze.jsxs)(HIe,{container:!0,itemAlign:"center",children:[(0,Ze.jsx)("div",{style:{width:"50%"},children:"Do you want to add any references?"}),(0,Ze.jsx)("div",{children:(0,Ze.jsxs)(ze.fI,{container:!0,align:"center",children:[(0,Ze.jsxs)(_Ie,{item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:T,onChange:()=>j(!0)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Yes"})})]}),(0,Ze.jsxs)(_Ie,{item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:!T,onChange:()=>j(!1)}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"No"})})]})]})})]}),(0,Ze.jsxs)(YIe,{isVisible:T,children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Invoice Number (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.invoiceNumber",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,LEe({},n))},defaultValue:"",control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Evidence Reference (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.evidenceReference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,LEe({},n))},defaultValue:"",control:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Other Reference (optional)"})}),(0,Ze.jsx)(Rw.xI,{name:"reference.otherReference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,LEe({},n))},defaultValue:"",control:o})]})})]}),e.children]})]})}function _Ee(e){let{value:n,error:t,name:a,placeholder:r,isMulti:i,onChange:o,disabled:l}=e;const{allCountries:s}=ku(),c=(0,g.useMemo)(()=>Gt()(s).map(e=>({value:e.id,label:e.name})).orderBy(["label"],["asc"]),[s]);return(0,Ze.jsx)(ze.l6,{isMulti:i,name:a,placeholder:r||"Please select the country",value:n,options:c,error:t,onChange:o,isDisabled:l})}const FEe=e=>{let{name:n,value:t,error:a,label:r,onChange:i,disabled:o,placeholder:l}=e;const{allCountries:s,loading:c,error:d}=ku(),u=a||d,p=u instanceof tW.K4?u.message:u,m=(0,g.useMemo)(()=>Gt()(s).map(e=>({value:e.id,label:e.name})).orderBy(["label"],["asc"]).value(),[s]);return(0,Ze.jsx)(f.Select,{name:n,placeholder:l||"Please select the country",value:t,label:r,isLoading:c,helperText:null!=p?p:"",options:m,error:!!u,onChange:e=>i(e),disabled:o})},BEe=["data"];function UEe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function MEe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?UEe(Object(t),!0).forEach(function(n){VEe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):UEe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function VEe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const zEe="Either Hotel nights either Home working days are required";function GEe(e){var n,t;let{form:a,onSubmit:r,children:i}=e;const{control:o,setValue:l}=a,s=rt(),[c,d]=(0,g.useState)(!1),u=()=>d(e=>!e),p=a.getValues(),m=(0,g.useCallback)(e=>{let{data:n}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,BEe);const a=MEe(MEe({},t),{},{data:n});r(a)},[r]);return(0,Ze.jsxs)(XIe,{onSubmit:m,form:a,showEndDate:!0,children:[(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsx)(WIe,{children:"Please enter the following transactional hotel stays data:"})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Location",children:(0,Ze.jsx)(Rw.xI,{name:"data.location",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(nY,{value:t.value,onChange:e=>l("data.location",e.target.select),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Location is required"},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Hotel stay / Home working country",children:(0,Ze.jsx)(Rw.xI,{name:"data.country",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(_Ee,{value:t.value,onChange:e=>l("data.country",e.target.select),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Country is required"},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Hotel nights",children:(0,Ze.jsx)(Rw.xI,{name:"data.hotelNights",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(oD,MEe(MEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:(null===(n=p.data)||void 0===n||!n.homeWorkingDays)&&zEe},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Home working days",children:(0,Ze.jsx)(Rw.xI,{name:"data.homeWorkingDays",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(oD,MEe(MEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:(null===(t=p.data)||void 0===t||!t.hotelNights)&&zEe},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Data provider",children:(0,Ze.jsx)(Rw.xI,{name:"data.dataProvider",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(Bre,{accountId:s,value:t.value,onChange:e=>l("data.dataProvider",e.target.select),error:null===(n=a.error)||void 0===n?void 0:n.message,utility:Vt.D_.Hotelstays})},rules:{required:"Data provider is required"},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Electricity tariff (optional)",children:(0,Ze.jsx)(Rw.xI,{name:"data.electricityTariff",render:e=>{let{field:n}=e;return(0,Ze.jsx)(LAe,{accountId:s,value:n.value,onChange:e=>l("data.electricityTariff",e.target.select)})},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Total cost (optional)",children:(0,Ze.jsx)(Rw.xI,{name:"data.totalCost",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(oD,MEe(MEe({},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Currency (optional)",children:(0,Ze.jsx)(Rw.xI,{name:"data.currency",render:e=>{let{field:n}=e;return(0,Ze.jsx)(CAe,{value:n.value,onChange:e=>l("data.currency",e.target.select)})},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Notes (optional)",children:(0,Ze.jsx)(Rw.xI,{name:"data.notes",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,MEe({},n))},control:o})})}),(0,Ze.jsxs)(ze.hh.Row,{children:[(0,Ze.jsx)(ze.hh.Column,{span:6,children:"Do you want to add any references?"}),(0,Ze.jsx)(ze.hh.Column,{span:3,children:(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:c,onChange:u}),(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{children:"Yes"})})]})}),(0,Ze.jsx)(ze.hh.Column,{span:3,children:(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,children:[(0,Ze.jsx)(ze.Sc,{size:"md",checked:!c,onChange:u}),(0,Ze.jsx)(FIe,{children:"No"})]})})]}),(0,Ze.jsxs)(YIe,{isVisible:c,children:[(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Reference (optional)",children:(0,Ze.jsx)(Rw.xI,{name:"data.reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,MEe({},n))},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Invoice number (optional)",children:(0,Ze.jsx)(Rw.xI,{name:"data.invoiceNumber",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,MEe({},n))},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Evidence reference (optional)",children:(0,Ze.jsx)(Rw.xI,{name:"data.evidenceReference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,MEe({},n))},control:o})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Other reference (optional)",children:(0,Ze.jsx)(Rw.xI,{name:"data.otherReference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(ze.ks,MEe({},n))},control:o})})})]}),i]})}var $Ee,WEe,qEe;function JEe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const YEe=Ge.default.div($Ee||($Ee=JEe(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing);function HEe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function KEe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?HEe(Object(t),!0).forEach(function(n){QEe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):HEe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function QEe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ZEe(e){const{onDismiss:n=()=>{},onComplete:t=()=>{},onError:a=()=>{},dataSection:r}=e,[i,o]=(0,g.useState)(!0),[l,s]=(0,g.useState)(!1),[c,d]=(0,g.useState)(!1),[u,p]=(0,g.useState)(),m=(0,Rw.mN)({mode:"onSubmit",reValidateMode:"onBlur",defaultValues:{data:{currency:"GBP"}}}),{reset:f,control:y}=m;(0,g.useEffect)(()=>()=>{f()},[]);const b=()=>{o(!0),s(!1),d(!1)},h=()=>n(),v=(e=>{switch(e){case Vt.D_.Waste:return fEe;case Vt.D_.Electricity:case Vt.D_.Gas:case Vt.D_.Heatsteam:return xEe;case Vt.D_.Water:return EEe;case Vt.D_.Transport:return AEe;case Vt.D_.Hotelstays:return GEe;default:throw new Error("Undefined section: ".concat(e))}})(r);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.aF,{show:i,size:"md",onDismiss:h,children:(0,Ze.jsx)(YEe,{children:(0,Ze.jsxs)(v,{form:m,onSubmit:e=>{p(e),o(!1),s(!0),d(!1)},dataSection:r,children:[(0,Ze.jsx)(ze.fI,{children:(0,Ze.jsx)(WIe,{children:"Upload Reference"})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(EIe,{item:!0,children:[(0,Ze.jsx)(UIe,{children:(0,Ze.jsx)(FIe,{labelFor:"uploadReference",children:"Please input a description to this upload which will be used to identify it in the Upload log. This could be your organisation name, relevant tag, department, region, or location."})}),(0,Ze.jsx)(Rw.xI,{name:"uploadReference",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ze.ks,KEe(KEe({id:"uploadReference"},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},defaultValue:"",control:y,rules:{required:"Upload Reference is required",maxLength:80}})]})})]})})}),(0,Ze.jsx)(ze.aF,{show:l,onDismiss:b,size:"xl",children:(0,Ze.jsx)(YEe,{children:(0,Ze.jsx)(sIe,{formData:u,onBack:b,onConfirm:()=>{o(!1),s(!1),d(!0)},dataSection:r})})}),(0,Ze.jsx)(ze.aF,{show:c,onDismiss:h,size:"lg",children:(0,Ze.jsx)(YEe,{children:(0,Ze.jsx)(fIe,{formData:u,onUploadCompleted:()=>{o(!1),s(!1),d(!1),t(),n()},onError:e=>{b(),a(e)},dataSection:r})})})]})}var XEe,e_e;function n_e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(0,Ge.default)(ze.DZ)(WEe||(WEe=JEe(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing),Ge.default.div(qEe||(qEe=JEe(["\n  text-align: center;\n  margin: ",";\n"])),e=>e.theme.geometry.md.spacing);const t_e=(0,D.J1)(XEe||(XEe=n_e(["\n  query GetOcrDataForAccount($accountId: String!, $utility: OcrUtility!) {\n    getOcrDataForAccount(accountId: $accountId, utility: $utility) {\n      id\n      accountId\n      fileName\n      uploadedAt\n      uploadedBy {\n        first_name\n        last_name\n      }\n      utility\n      meterName\n      invoiceNumber\n      quantity\n      startDate\n      endDate\n      totalCost\n      tariff\n      reading\n    }\n  }\n"]))),a_e=(0,D.J1)(e_e||(e_e=n_e(["\n  mutation MarkAsreviewed($id: ID!) {\n    markOcrDataAsReviewed(id: $id)\n  }\n"])));var r_e,i_e;function o_e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const l_e=(0,Ge.default)(ze.$n)(r_e||(r_e=o_e(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),s_e=Ge.default.div(i_e||(i_e=o_e(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  padding: ",";\n  z-index: 1000;\n"])),e=>e.theme.geometry.md.spacing);var c_e,d_e;function u_e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const p_e=(0,D.J1)(c_e||(c_e=u_e(["\n  mutation InitiateDromoUpload(\n    $transactionType: TransactionType!\n    $accountId: ID!\n    $fileName: String!\n    $dromoId: ID!\n    $isDirectActivity: Boolean\n  ) {\n    initiateDromoUpload(\n      transactionType: $transactionType\n      accountId: $accountId\n      fileName: $fileName\n      dromoId: $dromoId\n      isDirectActivity: $isDirectActivity\n    )\n  }\n"]))),m_e=(0,D.J1)(d_e||(d_e=u_e(["\n  query GetDromoSchema($transactionType: TransactionType!, $accountId: ID!) {\n    getDromoSchema(transactionType: $transactionType, accountId: $accountId)\n  }\n"])));function f_e(e){return e?JSON.parse(e):{fields:[],data:{}}}const y_e=t.p+"gas-template-911bc6b53c57aeee5ca1.xlsx",g_e=t.p+"electricity-template-23c4f6d86b3b9221c524.xlsx",b_e=t.p+"heatsteam-template-a90d2d97a54543f099de.xlsx",h_e=e=>(e=>Qke(qke({strategy:"allow"},e)))({records:e,fields:["estimates scenario"],condition:e=>["act/est","accuracy"].some(n=>{var t;return["est","estimate"].includes(null===(t=e[n])||void 0===t?void 0:t.value.toLowerCase())}),message:'"Estimates Scenario" must be empty when "Act/Est" is set to any value other than \'EST\'.'});function v_e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function x_e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v_e(Object(t),!0).forEach(function(n){T_e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v_e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function T_e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const O_e=[kn("REACT_APP_BASE_URL"),y_e].join(""),k_e=[kn("REACT_APP_BASE_URL"),g_e].join(""),j_e=[kn("REACT_APP_BASE_URL"),b_e].join("");function C_e(e,n){var t;const a=(null==e||null===(t=e.metersConfig)||void 0===t?void 0:t.map(e=>({meterId:e.meterId,isReadingMeter:e.readingMeter||!1})))||[];return x_e(x_e({},WU),{},{bulkRowHooks:[e=>Uke(["start date (dd/mm/yyyy)","end date (dd/mm/yyyy)"],e),a.length>0?e=>nje(a,e,n):e=>Gke([n,"reading"],e),h_e]})}const S_e=t.p+"advanced-hotel-stays-template-620eebbb6672b6984cd6.xlsx";function N_e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function w_e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?N_e(Object(t),!0).forEach(function(n){D_e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N_e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function D_e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const A_e="Hotel Stays & Home Working",R_e=[kn("REACT_APP_BASE_URL"),S_e].join("");const P_e=t.p+"materials-template-754e70e397116b45ec27.xlsx";function L_e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function I_e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L_e(Object(t),!0).forEach(function(n){E_e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L_e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function E_e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const __e="Materials",F_e=[kn("REACT_APP_BASE_URL"),P_e].join(""),B_e=t.p+"refrigerants-template-cb3d1ec11c310adc2456.xlsx";function U_e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function M_e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?U_e(Object(t),!0).forEach(function(n){V_e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):U_e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function V_e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const z_e="Refrigerants & Other Gases",G_e=[kn("REACT_APP_BASE_URL"),B_e].join(""),$_e=t.p+"water-template-13050fdcfcef30382329.xlsx";function W_e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function q_e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?W_e(Object(t),!0).forEach(function(n){J_e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W_e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function J_e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Y_e="Water",H_e=[kn("REACT_APP_BASE_URL"),$_e].join(""),K_e=t.p+"transport-template-ab53f153c036691e288a.xlsx";function Q_e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Z_e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Q_e(Object(t),!0).forEach(function(n){X_e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q_e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function X_e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const eFe="Transport",nFe=[kn("REACT_APP_BASE_URL"),K_e].join(""),tFe=t.p+"fuel-template-cea3b5511a4b2b2a6c8b.xlsx";function aFe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function rFe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?aFe(Object(t),!0).forEach(function(n){iFe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):aFe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function iFe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const oFe="Fuel",lFe=[kn("REACT_APP_BASE_URL"),tFe].join(""),sFe=t.p+"waste-template-c8a79ef1c4e9a08943f5.xlsx",cFe=t.p+"waste-template-with-project-phase-13808e4d14c9a77687db.xlsx";function dFe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function uFe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dFe(Object(t),!0).forEach(function(n){pFe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dFe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function pFe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const mFe="Waste";function fFe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function yFe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fFe(Object(t),!0).forEach(function(n){gFe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fFe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function gFe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const bFe="Investment Transactions",hFe=t.p+"oil-production-template-5fe777093b4fb664a85f.xlsx";function vFe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xFe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vFe(Object(t),!0).forEach(function(n){TFe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vFe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function TFe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const OFe=[kn("REACT_APP_BASE_URL"),hFe].join(""),kFe=xFe(xFe({},WU),{},{bulkRowHooks:[]}),jFe=t.p+"sales-data-template-a50d5457ec095de10159.xlsx";function CFe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function SFe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?CFe(Object(t),!0).forEach(function(n){NFe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):CFe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function NFe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const wFe=[kn("REACT_APP_BASE_URL"),jFe].join(""),DFe=SFe(SFe({},WU),{},{bulkRowHooks:[]}),AFe=t.p+"s3c1-activity-based-materials-template-32618e8126e62ba03ca8.xlsx";function RFe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function PFe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?RFe(Object(t),!0).forEach(function(n){LFe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):RFe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function LFe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const IFe=[kn("REACT_APP_BASE_URL"),AFe].join("");function EFe(e,n){var t,a,r,i,o,l,s,c,d,u;const p=(null===(t=n.region)||void 0===t?void 0:t.value)||(null===(a=n.country)||void 0===a?void 0:a.value)||"Global",m=null===(r=n["factor set"])||void 0===r?void 0:r.value,f=null!==(i=n["end date (dd/mm/yyyy)"])&&void 0!==i&&i.value&&Wt()(null===(o=n["end date (dd/mm/yyyy)"])||void 0===o?void 0:o.value,"DD/MM/YYYY").isValid()?Number(Wt()(null===(l=n["end date (dd/mm/yyyy)"])||void 0===l?void 0:l.value,"DD/MM/YYYY").format("YYYY")):0,y="Materials",g=null===(s=n["material type"])||void 0===s?void 0:s.value,b=null===(c=n["subtype 1"])||void 0===c?void 0:c.value,h=null===(d=n["subtype 2"])||void 0===d?void 0:d.value,v=null===(u=n["subtype 3"])||void 0===u?void 0:u.value;return Object.entries(n).map(n=>{let[t,a]=n;try{if("country"===t)return a.selectOptions=Object.keys(e[f]||{}).map(e=>({value:e,label:e})),[t,a];var r,i,o,l,s;if("factor set"===t)return a.selectOptions=Object.keys((null===(r=e[f])||void 0===r?void 0:r[p])||{}).map(e=>({value:e,label:e})),[t,a];if("material type"===t)return a.selectOptions=Object.keys((null===(i=e[f])||void 0===i||null===(i=i[p])||void 0===i||null===(i=i[m])||void 0===i?void 0:i[y])||{}).map(e=>({value:e,label:e})),[t,a];if("subtype 1"===t)return a.selectOptions=Object.keys((null===(o=e[f])||void 0===o||null===(o=o[p])||void 0===o||null===(o=o[m])||void 0===o||null===(o=o[y])||void 0===o?void 0:o[g])||{}).map(e=>({value:e,label:e})),[t,a];if("subtype 2"===t)return a.selectOptions=Object.keys((null===(l=e[f])||void 0===l||null===(l=l[p])||void 0===l||null===(l=l[m])||void 0===l||null===(l=l[y])||void 0===l||null===(l=l[g])||void 0===l||null===(l=l[b])||void 0===l?void 0:l.subtypes2)||{}).map(e=>({value:e,label:e})),[t,a];if("subtype 3"===t)return a.selectOptions=Object.keys((null===(s=e[f])||void 0===s||null===(s=s[p])||void 0===s||null===(s=s[m])||void 0===s||null===(s=s[y])||void 0===s||null===(s=s[g])||void 0===s||null===(s=s[b])||void 0===s||null===(s=s.subtypes2)||void 0===s||null===(s=s[h])||void 0===s?void 0:s.subtypes3)||{}).map(e=>({value:e,label:e})),[t,a];if("weight unit"===t){var c,d,u;let n={};const r=null===(c=e[f])||void 0===c||null===(c=c[p])||void 0===c||null===(c=c[m])||void 0===c||null===(c=c[y])||void 0===c||null===(c=c[g])||void 0===c?void 0:c[b];return h||v||!r||(n=r.fromUnits),h&&!v&&null!=r&&null!==(d=r.subtypes2)&&void 0!==d&&d[h]&&(n=r.subtypes2[h].fromUnits),h&&v&&null!=r&&null!==(u=r.subtypes2)&&void 0!==u&&null!==(u=u[h])&&void 0!==u&&null!==(u=u.subtypes3)&&void 0!==u&&u[v]&&(n=r.subtypes2[h].subtypes3[v]),a.selectOptions=Object.keys(n).map(e=>({value:e,label:e})),[t,a]}}catch(e){return a.selectOptions=[],[t,a]}return[t,a]}).reduce((e,n)=>{let[t,a]=n;return e[t]=a,e},{})}const _Fe={message:"This field is required.",level:"error"};function FFe(e){for(const n of["subtype 2","subtype 3"]){const t=e.row[n];t&&(t.selectOptions&&t.selectOptions.length>0&&!Rge(t.resultValue)?Dge(_Fe,e,[n]):Age(e,[n]))}}const BFe="Activity based materials";const UFe=t.p+"s3c1-spend-based-materials-template-1fa614a7ae117096787b.xlsx";function MFe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function VFe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?MFe(Object(t),!0).forEach(function(n){zFe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):MFe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zFe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const GFe=[kn("REACT_APP_BASE_URL"),UFe].join(""),$Fe="Spend based materials";const WFe=t.p+"liquid-fuels-template-a295e1323c29323a4de5.xlsx";function qFe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function JFe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qFe(Object(t),!0).forEach(function(n){YFe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qFe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function YFe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const HFe=[kn("REACT_APP_BASE_URL"),WFe].join(""),KFe="Liquid Fuels";function QFe(e,n,t){const a=Pu();switch(e){case Vt.D_.Refrigerant:return M_e(M_e({},WU),{},{settings:M_e(M_e({},WU.settings),{},{importIdentifier:z_e,title:"Upload ".concat(z_e),uploadStep:M_e(M_e({},WU.settings.uploadStep),{},{helpText:$U(G_e)})}),bulkRowHooks:[h_e]});case Vt.D_.Hotelstays:return w_e(w_e({},WU),{},{settings:w_e(w_e({},WU.settings),{},{importIdentifier:A_e,title:"Upload ".concat(A_e),uploadStep:w_e(w_e({},WU.settings.uploadStep),{},{helpText:$U(R_e)})}),bulkRowHooks:[e=>function(e,n){return n.map(n=>{const t=Vke({},n);return e.some(e=>{const t=n.row[e].resultValue;return"number"==typeof t&&!Number.isNaN(t)&&t>0})?Age(n,e):e.forEach(n=>{Dge({message:"At least one of ".concat(e.join(", ")," should have a value greater than 0."),level:"error"},t,[n])}),t})}(["hotel nights","home working days"],e),e=>Uke(["start date (dd/mm/yyyy)","end date (dd/mm/yyyy)"],e),h_e]});case Vt.D_.Materials:return function(e){return I_e(I_e({},WU),{},{settings:I_e(I_e({},WU.settings),{},{importIdentifier:__e,title:"Upload ".concat(__e),uploadStep:I_e(I_e({},WU.settings.uploadStep),{},{helpText:$U(F_e)})}),bulkRowHooks:[n=>Kke(null==e?void 0:e.materialMaterialOrigin,["material","origin"],n),h_e]})}(n);case Vt.D_.Electricity:return function(e){return x_e(x_e({},C_e(e,"quantity (kwh)")),{},{settings:x_e(x_e({},WU.settings),{},{importIdentifier:"Electricity",title:"Upload Electricity",uploadStep:x_e(x_e({},WU.settings.uploadStep),{},{helpText:$U(k_e)})})})}(n);case Vt.D_.Gas:return function(e){return x_e(x_e({},C_e(e,"quantity (kwh)")),{},{settings:x_e(x_e({},WU.settings),{},{importIdentifier:"Gas",title:"Upload Gas",uploadStep:x_e(x_e({},WU.settings.uploadStep),{},{helpText:$U(O_e)})})})}(n);case Vt.D_.Heatsteam:return function(e){return x_e(x_e({},C_e(e,"quantity (kwh)")),{},{settings:x_e(x_e({},WU.settings),{},{importIdentifier:"Heat & Steam",title:"Upload Heat & Steam",uploadStep:x_e(x_e({},WU.settings.uploadStep),{},{helpText:$U(j_e)})})})}(n);case Vt.D_.Water:return function(e){var n;const t=(null==e||null===(n=e.metersConfig)||void 0===n?void 0:n.map(e=>({meterId:e.meterId,isReadingMeter:e.readingMeter||!1})))||[];return q_e(q_e({},WU),{},{settings:q_e(q_e({},WU.settings),{},{importIdentifier:Y_e,title:"Upload ".concat(Y_e),uploadStep:q_e(q_e({},WU.settings.uploadStep),{},{helpText:$U(H_e)})}),bulkRowHooks:[e=>Uke(["start date (dd/mm/yyyy)","end date (dd/mm/yyyy)"],e),t.length>0?e=>nje(t,e,"quantity (m3)"):e=>Gke(["quantity (m3)","reading"],e),h_e]})}(n);case Vt.D_.Transport:return function(e){return Z_e(Z_e({},WU),{},{settings:Z_e(Z_e({},WU.settings),{},{importIdentifier:eFe,title:"Upload ".concat(eFe),uploadStep:Z_e(Z_e({},WU.settings.uploadStep),{},{helpText:$U(nFe)})}),bulkRowHooks:[e=>$ke([["volume","unit of volume"],["freight (tonne.km)","carrier"],["total distance","unit of distance"],["journey distance","unit of distance"]],e),e=>Gke(["volume","freight (tonne.km)","journey distance","total distance"],e),n=>Kke(null==e?void 0:e.typeSubType,["type","subtype"],n),n=>Kke(null==e?void 0:e.subTypeFuelType,["subtype","fuel type"],n),n=>Kke(null==e?void 0:e.typeSubTypeFuelTypeVolumeDistanceUnit.map(e=>Z_e(Z_e({},e),{},{"unit of distance":e["unit of volume"]})),["type","subtype","fuel type",["unit of volume","unit of distance"]],n),h_e]})}(n);case Vt.D_.Fuel:return function(e){return rFe(rFe({},WU),{},{settings:rFe(rFe({},WU.settings),{},{importIdentifier:oFe,title:"Upload ".concat(oFe),uploadStep:rFe(rFe({},WU.settings.uploadStep),{},{helpText:$U(lFe)})}),bulkRowHooks:[n=>Kke(null==e?void 0:e.fuelTypeQuantityUnit,["quantity units","fuel type"],n),e=>$ke([["total cost","currency"]],e),h_e]})}(n);case Vt.D_.Waste:return function(e){var n;const t=null==e||null===(n=e.accessControls.customFields)||void 0===n?void 0:n.includes("WasteTransaction.projectPhase"),a=[kn("REACT_APP_BASE_URL"),t?cFe:sFe].join("");return uFe(uFe({},WU),{},{settings:uFe(uFe({},WU.settings),{},{importIdentifier:mFe,title:"Upload ".concat(mFe),uploadStep:uFe(uFe({},WU.settings.uploadStep),{},{helpText:$U(a)})}),bulkRowHooks:[h_e]})}(a);case Vt.D_.Investment:return yFe(yFe({},WU),{},{settings:yFe(yFe({},WU.settings),{},{importIdentifier:bFe,title:"Upload ".concat(bFe),templateDownloadFilename:"investment-transactions.csv"})});case Vt.D_.Oil:return xFe(xFe({},kFe),{},{settings:xFe(xFe({},WU.settings),{},{importIdentifier:"Oil",title:"Upload Production",uploadStep:xFe(xFe({},WU.settings.uploadStep),{},{helpText:$U(OFe)})})});case Vt.D_.Oilgassales:return SFe(SFe({},DFe),{},{settings:SFe(SFe({},WU.settings),{},{importIdentifier:"OILGASSALES",title:"Upload Sales Data",uploadStep:SFe(SFe({},WU.settings.uploadStep),{},{helpText:$U(wFe)})})});case Vt.D_.S3C1Activitybasedmaterial:return function(e){return PFe(PFe({},WU),{},{settings:PFe(PFe({},WU.settings),{},{importIdentifier:BFe,title:"Upload ".concat(BFe),uploadStep:PFe(PFe({},WU.settings.uploadStep),{},{helpText:$U(IFe)}),reviewStep:PFe(PFe({},WU.settings.reviewStep),{},{helpText:"Please complete the fields from left to right for the dropdown options to load properly. If there are no options available, it could mean that for the current input there are no matching emission factors. In many cases for Subtype 3 there are no options available even with correct inputs - in these cases it should be skipped."})}),bulkRowHooks:[n=>function(e,n){return e.map(e=>{const t=PFe(PFe({},e),{},{region:"Global"});return t.row=EFe(n,t.row),FFe(t),t})}(n,e),h_e]})}(t);case Vt.D_.S3C1Spendbasedmaterial:return function(e){return VFe(VFe({},WU),{},{settings:VFe(VFe({},WU.settings),{},{importIdentifier:$Fe,title:"Upload ".concat($Fe),uploadStep:VFe(VFe({},WU.settings.uploadStep),{},{helpText:$U(GFe)}),reviewStep:VFe(VFe({},WU.settings.reviewStep),{},{helpText:"Please complete the fields from left to right for the dropdown options to load properly. If there are no options available, it could mean that for the current input there are no matching emission factors. In many cases for Subtype 3 there are no options available even with correct inputs - in these cases it should be skipped."})}),bulkRowHooks:[n=>function(e,n){return e.map(e=>{const t=VFe({},e);return t.row=EFe(n,t.row),FFe(t),t})}(n,e),h_e]})}(t);case Vt.D_.Liquidfuel:return JFe(JFe({},WU),{},{bulkRowHooks:[],settings:JFe(JFe({},WU.settings),{},{importIdentifier:KFe,title:"Upload ".concat(KFe),uploadStep:JFe(JFe({},WU.settings.uploadStep),{},{helpText:$U(HFe)})})});default:throw new Error("No dromo configuration for ".concat(e))}}const ZFe=e=>{let{transactionType:n,showDromoButton:t}=e;const{showNotification:a}=vt(),r=Pu(),i=rt(),o=_u(),[l]=(0,Ot.n)(p_e),s=Fy(),c=(0,g.useRef)(null),[d,u]=(0,g.useState)(!1),[p,m]=(0,g.useState)(!1),[f,y]=(0,g.useState)(!1),[b,v]=(0,g.useState)(!1),x=(0,g.useMemo)(()=>QPe[n]&&!f,[f,n]),{data:T,loading:O,error:k,refetch:j}=(0,h.IT)(m_e,{variables:{transactionType:n,accountId:i},notifyOnNetworkStatusChange:!0,onError:()=>{a("Could not retrieve Dromo Schema for ".concat(n),"danger")}}),{fields:C,data:S}=f_e(null==T?void 0:T.getDromoSchema),N=QFe(n,S),w=(0,g.useCallback)((e,t)=>{const a="".concat(n,"_").concat((new Date).toISOString());l({variables:{transactionType:n,accountId:i,fileName:t.filename||a,dromoId:t.id,isDirectActivity:p}}),y(!1)},[i,l,p,n]);(0,g.useEffect)(()=>{var e;!x&&b&&(null===(e=c.current)||void 0===e||e.open())},[b,f,x,c,T]);const D=kn("REACT_APP_DROMO_LICENSE_KEY");if(!D)return a("Dromo license key not found","danger"),null;if(!N)return null;N.fields=C;const A={id:(null==o?void 0:o.id)||"",name:"".concat(null==o?void 0:o.first_name," ").concat(null==o?void 0:o.last_name),email:null==o?void 0:o.email,companyId:i,companyName:null==r?void 0:r.name},R=()=>(0,Ze.jsx)(l_e,{inline:!0,name:"DromoUploaderButton__uploadDataButton",component:"button",onClick:()=>{k?j():O||(u(!0),v(!0))},children:"Upload Data"});return x||O?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(R,{}),x&&(0,Ze.jsx)(ze.aF,{show:d,size:"lg",height:"fit-content",onDismiss:()=>u(!1),children:(0,Ze.jsx)(aLe,{onConfirm:e=>{m(e),u(!1),y(!0)},type:n})}),O&&(0,Ze.jsx)(s_e,{children:(0,Ze.jsx)(ze.Ip,{})})]}):(0,Ze.jsx)(VU.A,{licenseKey:D,settings:N.settings,fields:N.fields,user:A,style:t?N.style:{display:"none"},onResults:s?w:()=>{},onCancel:()=>y(!1),ref:c,bulkRowHooks:N.bulkRowHooks,children:"Upload Data"})};var XFe;const eBe=Ge.default.div(XFe||(XFe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  position: absolute;\n  width: 18px;\n  height: 18px;\n  border-radius: 9px;\n  background-color: red;\n  top: 0px;\n  right: 0px;\n  font-size: 10px;\n  color: white;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n"]))),nBe=e=>{let{count:n}=e;return(0,Ze.jsx)(eBe,{children:n})};var tBe,aBe,rBe;function iBe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const oBe=(0,Ge.default)(ze.$n)(tBe||(tBe=iBe(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),lBe=Ge.default.div(aBe||(aBe=iBe(["\n  position: relative;\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),sBe=(0,Ge.default)(ze.fI)(rBe||(rBe=iBe(["\n  flex: 0 1 auto;\n"]))),cBe=uv(e=>{var n;const t=(0,m.zy)(),a=(0,g.useMemo)(()=>t.pathname.startsWith("/v2"),[t]),{dataSection:r,onFileUploadClick:i=()=>{},onDirectUploadClick:o=()=>{},permissions:l,onOcrClick:s,allowOcr:c,gridApi:d,isDirectActivityValue:u}=e,p=function(e){switch(e){case Vt.D_.Hotelstays:return"Hotel Stays";case Vt.D_.Heatsteam:return"Heat and Steam";case Vt.D_.Oilgassales:return"Sales Data";default:return zt.capitalize(e)}}(r),f=Pu(),y=null==f?void 0:f.id,{data:b}=(0,h.IT)(t_e,{variables:{accountId:y,utility:p.toUpperCase()},pollInterval:3e3,skip:!c}),v=null==b?void 0:b.getOcrDataForAccount.length,x=[Vt.D_.Waste,Vt.D_.Electricity,Vt.D_.Gas,Vt.D_.Transport,Vt.D_.Water,Vt.D_.Heatsteam,Vt.D_.Hotelstays],T=[Vt.D_.Fuel,Vt.D_.Materials],O=[Vt.D_.Refrigerant,Vt.D_.Hotelstays,Vt.D_.Electricity,Vt.D_.Gas,Vt.D_.Heatsteam,Vt.D_.Materials,Vt.D_.Water,Vt.D_.Transport,Vt.D_.Fuel,Vt.D_.Waste,Vt.D_.Investment,Vt.D_.Oil,Vt.D_.Liquidfuel,Vt.D_.Oilgassales],k=l.data.find(e=>e.startsWith("createImportBatch")),j=(null==f||null===(n=f.accessControls)||void 0===n?void 0:n.dromoUpload)||!1,C=O.includes(r)&&j&&k,S=[...x].includes(r),N=[...x,...T].includes(r)&&!C&&k,w="".concat(p," Data Uploads"),D=(0,g.useMemo)(()=>[{title:"Data",to:".."},{title:w}],[w]);return(0,Ze.jsx)(ige,{name:"Uploads",title:w,breadcrumbs:D,icon:"chart-line",iconColor:"quaternary",children:(0,Ze.jsxs)(sBe,{container:!0,distribution:"center",vdistribution:"center",itemAlign:"center",children:[(0,Ze.jsx)(SD,{inline:!0,gridApi:null==d?void 0:d.api}),(0,Ze.jsxs)(oBe,{inline:!0,component:"routerLink",color:"info",to:"../".concat((e=>{switch(e){case Vt.D_.Refrigerant:return"refrigerants";case Vt.D_.Heatsteam:return"heatSteam";case Vt.D_.Hotelstays:return"hotelStays";case Vt.D_.Oilgassales:return"salesData";default:return e.toLowerCase()}})(r),"/view"),children:["View ",p," Transactions"]}),c&&!!l.ocr.find(e=>e.startsWith("getData"))&&(0,Ze.jsxs)(lBe,{children:[(0,Ze.jsx)(ze.$n,{inline:!0,component:"routerLink",color:"info",to:"ocr",children:"Review OCR"}),!!v&&v>0&&(0,Ze.jsx)(nBe,{count:v})]}),!a&&!!l.data.find(e=>e.startsWith("createImportBatch"))&&S&&(0,Ze.jsx)(oBe,{inline:!0,name:"DataUploadContainer__directDataUploadButton",component:"button",onClick:o,children:"Direct Data Upload"}),c&&!!l.ocr.find(e=>e.startsWith("uploadDocument"))&&(0,Ze.jsx)(oBe,{inline:!0,name:"DataUploadContainer__uploadInvoiceButton",component:"button",onClick:s,children:"Upload Invoice"}),C&&(0,Ze.jsx)(ZFe,{transactionType:r,isDirectActivity:u,showDromoButton:C}),N&&(0,Ze.jsx)(oBe,{inline:!0,name:"DataUploadContainer__uploadButton",component:"button",onClick:i,children:"Upload Data"})]})})}),dBe=e=>{let{onDismiss:n,rollBackFunction:t}=e;return(0,Ze.jsx)(ze.aF,{name:"wasteDataUploadContainer__uploadModal",size:"sm",show:!0,dismissable:!0,onDismiss:n,height:"auto",maxHeight:"90vh",children:(0,Ze.jsx)(fN,{name:"confirmRollback",notification:{show:!1},headingText:"Start Rollback",bodyText:"Are you sure you want to roll back this data?",onConfirmAction:()=>{t(),n()},onCancelAction:n})})};var uBe,pBe,mBe,fBe;function yBe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const gBe=(0,Ge.default)(ze.fv)(uBe||(uBe=yBe(["\n  display: flex;\n  height: 100%;\n  width: 100%;\n"]))),bBe=(0,Ge.default)(ze.h$)(pBe||(pBe=yBe(["\n  min-height: 40vh;\n  display: flex;\n  flex: 1;\n  & > div {\n    width: 100%;\n  }\n"]))),hBe=(0,Ge.default)(ze.fI)(mBe||(mBe=yBe(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),vBe=Ge.default.div(fBe||(fBe=yBe(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"])));function xBe(e){let{onComplete:n,dataSection:t}=e;const a=rt(),{token:r}=at(),[i,o]=(0,g.useState)(null),[l,s]=(0,g.useState)(!1),{data:c,loading:d}=(0,h.IT)(SLe),[u,{error:p,loading:m}]=(0,Ot.n)(CLe),f=al(),[y,{error:b,loading:v}]=(0,Ot.n)(e3),x=async(e,n)=>{const t=e[0],a=new FileReader;a.readAsDataURL(t),a.onload=()=>{const e={name:t.name,type:t.type,base64:a.result.split(",")[1],file:t};n(e)}},T=e=>{s(!0);const n=(0,Ai.A)();f(a,n,e.file),u({variables:{id:n,accountId:a,parserId:i,fileName:e.name,fileContent:e.base64,utility:t}}),y({variables:{id:n,userId:r.sub,accountId:a,fileName:e.name,key:v3(a,n),category:"Bill",source:"S3",library:t,referenceId:e.name.split(".")[0]}})},O=c&&c.getAllTemplates?c.getAllTemplates:[],k=m||v,j=!p&&!b;return(0,g.useEffect)(()=>{l&&!k&&j&&n("Your document is now being processed with OCR.","success")},[k,j,n,l]),(0,Ze.jsxs)(gBe,{children:[(0,Ze.jsx)(hBe,{children:(0,Ze.jsx)(ze.DZ,{align:"center",children:"OCR Document Upload"})}),(d||k)&&(0,Ze.jsx)(vBe,{children:(0,Ze.jsx)(ze.Ip,{})}),c&&!d&&!k&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(hBe,{children:[(0,Ze.jsx)(ze.EY,{children:"Select Template"}),(0,Ze.jsx)(ze.l6,{options:O.map(e=>({label:e.name,value:e.parserId})),value:i,onChange:e=>o(e.target.value)})]}),i&&(0,Ze.jsx)(hBe,{children:(0,Ze.jsx)(ze.bT,{accept:xr.allowedDocument.mimeType,onChange:e=>{x([...e],T)},children:e=>(0,Ze.jsx)(bBe,{buttonText:"Select files",onClick:e,onDrop:e=>{x([...e],T)},background:!0})})})]})]})}var TBe=t(14538);const OBe=["id","dashboardurl","accountId","onDashboardInit","parameters"];function kBe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jBe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kBe(Object(t),!0).forEach(function(n){CBe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kBe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function CBe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const SBe=e=>Object.entries(e).map(e=>{let[n,t]=e;return{Name:n,Values:[t]}}),NBe={label:"Loading...",value:"",disabled:!0},wBe={label:"No legislations found",value:"",disabled:!0};function DBe(e){let{value:n,error:t,name:a,onChange:r,disabled:i}=e;const{legislations:o,error:l,loading:s}=Ss(),c=o.map(e=>({value:e.id,label:e.title})).sort((e,n)=>e.label.localeCompare(n.label));return s||t||0!==c.length||c.unshift(wBe),(0,Ze.jsx)(f.Select,{name:a,label:"Legislation",placeholder:"Please select the legislation item",value:n,options:s?[NBe]:c,error:Boolean(t||l),helperText:t||(null==l?void 0:l.message)||void 0,onChange:r,disabled:i})}var ABe;const RBe=(0,D.J1)(ABe||(ABe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetProjects($accountId: ID!) {\n    getProjects(accountId: $accountId) {\n      id\n      name\n    }\n  }\n"]))),PBe={label:"Loading...",value:"",disabled:!0},LBe={label:"No projects found",value:"",disabled:!0};function IBe(e){let{accountId:n,name:t,value:a,onChange:r,disabled:i}=e;const{data:o,loading:l,error:s}=(0,h.IT)(RBe,{variables:{accountId:n}}),c=((null==o?void 0:o.getProjects)||[]).map(e=>({value:e.id,label:e.name||""}));return l||s||0!==c.length||c.unshift(LBe),(0,Ze.jsx)(f.Select,{name:t,label:"Project",value:a||"",options:l?[PBe]:c,error:Boolean(s),helperText:null==s?void 0:s.message,onChange:r,disabled:i})}const EBe={label:"Loading...",value:"",disabled:!0},_Be={label:"No targets found",value:"",disabled:!0};function FBe(e){let{value:n,error:t,name:a,onChange:r,disabled:i}=e;const{targets:o,loading:l,error:s}=yd(),c=o.filter(Boolean).map(e=>({value:e.id,label:e.name})).sort((e,n)=>e.label.localeCompare(n.label));return l||t||0!==c.length||c.unshift(_Be),(0,Ze.jsx)(f.Select,{name:a,label:"Target",placeholder:"Please select the target",value:n,options:l?[EBe]:c,error:Boolean(t||s),helperText:t||(null==s?void 0:s.message)||void 0,onChange:r,disabled:i})}var BBe;const UBe=(0,D.J1)(BBe||(BBe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetBasicUsers($accountId: String!, $offset: Int, $limit: Int = 25, $sort: [SortCommand!], $filters: Filters) {\n    getUsers(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        id\n        accountId\n        firstName\n        lastName\n      }\n      totalRows\n    }\n  }\n"])));function MBe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function VBe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?MBe(Object(t),!0).forEach(function(n){zBe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):MBe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zBe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const GBe=e=>e.map(e=>({value:e.id,label:"".concat(e.firstName," ").concat(e.lastName)})),$Be=e=>{let{accountId:n,value:t,onChange:a,isMultiple:r=!0,loading:i,label:o="Users",disabled:l,scope:s,locationIds:c,tagIds:d,error:u}=e;const{options:p,loading:m,loadMore:y,error:b}=(e=>{let{accountId:n,onQueryCompleted:t,scope:a,locationIds:r,tagIds:i}=e;const o=(0,g.useMemo)(()=>({text:[{filterType:Vt.pe.Text,field:"fullName",type:Vt.II.Contains,filter:""},{filterType:Vt.pe.Text,operator:Vt.h6.Or,condition1:{filterType:Vt.pe.Text,field:"accountId",type:Vt.II.Equals,filter:n},condition2:{filterType:Vt.pe.Text,field:"role",type:Vt.II.Equals,filter:Vt.gG.Consultant}}],set:[...a===Vt.HG.Location&&null!=r&&r.length?[{filterType:Vt.pe.Set,field:"allowedLocations",values:r}]:[],...a===Vt.HG.Tag&&null!=i&&i.length?[{filterType:Vt.pe.Set,field:"allowedTags",values:i}]:[]]}),[n,a,r,i]),{data:l,refetch:s,loading:c,error:d,fetchMore:u}=(0,h.IT)(UBe,{variables:{accountId:n,offset:0,limit:Za,filters:o,sort:[{field:"firstName",order:"asc"}]},onCompleted:t,notifyOnNetworkStatusChange:!0});return{options:(0,g.useMemo)(()=>{var e;return GBe((null==l||null===(e=l.getUsers)||void 0===e?void 0:e.rows)||[])},[JSON.stringify(l)]),loadMore:async(e,n,t)=>{var a;const r=t?VBe(VBe({},o),{},{text:[VBe(VBe({},o.text[0]),{},{filter:t}),...o.text.slice(1)]}):o,{data:i}=await u({variables:{offset:n,limit:e,filters:r}}),l=null==i||null===(a=i.getUsers)||void 0===a?void 0:a.totalRows,s=null==i?void 0:i.getUsers.rows;return{total:l,options:GBe(s)}},loading:c,refetch:s,error:d}})({accountId:n,scope:s,locationIds:c,tagIds:d}),v=(0,g.useMemo)(()=>(null==t?void 0:t.map(e=>"string"==typeof t?e:{value:e.value||e.id,label:e.label||"".concat(e.firstName||e.first_name," ").concat(e.lastName||e.last_name)}))||[],[t]);return(0,Ze.jsx)(f.AutoComplete,{label:o,isMulti:r,loadMore:y,isLoading:m||i,disabled:i||l,onChange:a,value:v,error:(null==b?void 0:b.message)||u,options:p})},WBe=JSON.parse('[{"label":"Engage","value":"ENGAGE"},{"label":"Governance","value":"GOVERNANCE"},{"label":"Data","value":"DATA"},{"label":"Reporting","value":"REPORTING"},{"label":"Documents","value":"DOCUMENTS"}]'),qBe=JSON.parse('[{"id":"HIGH","name":"High","icon":"exclamation-triangle","colour":"danger","label":"High","value":"HIGH"},{"id":"MEDIUM","name":"Medium","icon":"exclamation-circle","colour":"warning","label":"Medium","value":"MEDIUM"},{"id":"LOW","name":"Low","icon":"exclamation-circle","colour":"text","label":"Low","value":"LOW"}]'),JBe=JSON.parse('{"DATA":[{"label":"Waste","value":"WASTE"},{"label":"Electricity","value":"ELECTRICITY"},{"label":"Gas","value":"GAS"},{"label":"Water","value":"WATER"},{"label":"Transport","value":"TRANSPORT"}],"GOVERNANCE":[{"label":"Legislation","value":"LEGISLATION"},{"label":"Policies","value":"POLICIES"},{"label":"Management Systems","value":"MANAGEMENTSYSTEMS"},{"label":"Targets","value":"TARGETS"},{"label":"Aspects & Impacts","value":"ASPECTS"},{"label":"H&S Risk Register","value":"RISKREGISTER"}]}');function YBe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function HBe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?YBe(Object(t),!0).forEach(function(n){KBe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):YBe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function KBe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const QBe=e=>{var n,t;let{isSubmitting:a,task:r,setTask:i,accountId:o,isEditing:l,disabled:s={},projectId:c="",hasProjectsAccess:d=!1,errors:u}=e;const p=pf(),m=(0,g.useCallback)(e=>{var n;"projectId"===e.target.name&&(e.target.select=e.target.value),i(n=>HBe(HBe({},n),{},{[e.target.name]:e.target.value})),"subject"===e.target.name&&(null!==(n=r.item)&&void 0!==n&&n.id||null!=r&&r.itemId)&&i(e=>HBe(HBe({},e),{},{itemId:null,item:null}))},[i,r]),y=(0,g.useCallback)((e,n,t)=>{i(a=>HBe(HBe(HBe({},a),t||{}),{},{[e]:n}))},[i]),b=r.itemId||(null===(n=r.item)||void 0===n?void 0:n.id);return(0,Ze.jsxs)(f.Grid,{container:!0,columns:12,rowSpacing:3,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{label:"Task Name","data-cy":"TaskDetails__Input--name",disabled:a,onChange:e=>m(e),name:"name",value:r.name,error:Boolean(u.name),helperText:u.name})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextArea,{label:"Description",rows:4,"data-cy":"TaskDetails__Input--description",disabled:a,onChange:e=>m(e),name:"description",value:r.description,error:Boolean(u.description),helperText:u.description})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Select,{label:"Scope",name:"scope",options:p,value:r.scope,onChange:e=>{let{value:n}=e;return y("scope",n)},disabled:s.scope||a})}),r.scope===Ce&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(C3,{label:"Location(s)",name:"locationIds",value:r.locationIds,onChange:e=>y("locationIds",(null==e?void 0:e.map(e=>e.value))||[]),disabled:s.locations||a})}),r.scope===Ne&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(A3,{label:"Tag(s)",name:"tagIds",accountId:o,value:r.tagIds||[],onChange:e=>y("tagIds",(null==e?void 0:e.map(e=>e.value))||[]),disabled:s.tags||a})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Select,{label:"Priority",name:"priority",disabled:a,onChange:e=>{let{value:n}=e;return y("priority",n)},value:r.priority,options:qBe,error:Boolean(u.priority),helperText:u.priority})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Select,{label:"Category",name:"category",disabled:s.category||a,onChange:e=>{let{value:n}=e;return y("category",n,{subject:null,itemId:null,item:null})},value:r.category,options:WBe,error:Boolean(u.category),helperText:u.category})}),r.category&&JBe[r.category]&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Select,{label:"Subject",name:"subject",onChange:e=>{let{value:n}=e;return y("subject",n)},value:null===(t=r.subject)||void 0===t?void 0:t.toUpperCase(),options:JBe[r.category],disabled:s.subject||a,error:Boolean(u.subject),helperText:u.subject})}),r.subject===Vt.AR.Aspects&&!b&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:"Related item (Please go to your Aspect and Impact Register to create a task relating to a single aspect or impact.)"})}),r.subject===Vt.AR.Legislation&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(DBe,{name:"itemId",onChange:e=>{let{value:n}=e;return y("itemId",n)},value:b||"",disabled:s[Vt.AR.Legislation]||a})}),r.subject===Vt.AR.Targets&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(FBe,{name:"itemId",onChange:e=>{let{value:n}=e;return y("itemId",n)},value:b||"",disabled:a})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)($Be,{label:"Owners",onChange:e=>{m({target:{value:e,name:"owners"}})},value:r.owners||[],accountId:o,error:u.owner})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.DatePicker,{label:"Due Date",disabled:a,onChange:e=>{m({target:{value:e?new Date(e).toISOString():void 0,name:"dueDate"}})},name:"dueDate",value:r.dueDate?new Date(r.dueDate):void 0,error:u.dueDate})}),d?(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(IBe,{name:"projectId",accountId:o,onChange:e=>{let{value:n}=e;return y("projectId",n)},value:r.projectId||c||"",disabled:a})}):null,l&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Checkbox,{label:"Completed",checked:r.isCompleted,value:r.isCompleted,onChange:()=>i(HBe(HBe({},r),{},{isCompleted:!r.isCompleted}))})})]})};var ZBe=t(95196),XBe=t.n(ZBe);const eUe="Required field",nUe=function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const t={},a=!!e.name,r=!!e.description,i=!!qBe.find(n=>n.id===e.priority),o=!!e.priority,l=!!WBe.find(n=>n.value===e.category),s="GOVERNANCE"===e.category||"DATA"===e.category?!!JBe[e.category].find(n=>n.value===e.subject):null===e.subject,c=!!e.owners.length,d=Wt()(e.dueDate).isValid();return a||(t.name=eUe),r||(t.description=eUe),i||(t.priority="Invalid value"),o||(t.priority=eUe),l||(t.category=eUe),s||(t.subject=eUe),c||n||(t.owner=eUe),d||(t.dueDate=eUe),t};var tUe;function aUe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function rUe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?aUe(Object(t),!0).forEach(function(n){iUe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):aUe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function iUe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const oUe=(0,f.styled)(f.Button)(tUe||(tUe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-top: 32px;\n  width: 100%;\n"]))),lUe=e=>{let{accountId:n,onDismiss:t,onComplete:a,sourcePage:r,defaultValues:i,disabled:o={},projectId:l,hasProjectsAccess:s=!1,open:c}=e;const d=(0,g.useMemo)(()=>({scope:(null==i?void 0:i.scope)||null,locationIds:(null==i?void 0:i.locationIds)||[],tagIds:(null==i?void 0:i.tagIds)||[],name:(null==i?void 0:i.name)||"",description:(null==i?void 0:i.description)||"",category:(null==i?void 0:i.category)||null,subject:(null==i?void 0:i.subject)||null,item:(null==i?void 0:i.item)||void 0,itemId:(null==i?void 0:i.itemId)||null,accountId:(null==i?void 0:i.accountId)||"",owners:(null==i?void 0:i.owners)||[],dueDate:(null==i?void 0:i.dueDate)||(new Date).toISOString(),priority:(null==i?void 0:i.priority)||null,isCompleted:(null==i?void 0:i.isCompleted)||!1,projectId:l||null}),[i,l]),[u,p]=(0,g.useState)(d),[m,{loading:y}]=(0,Ot.n)(XBe(),{onCompleted:e=>{a({message:"Task has been created.",colour:"success"},e),t(),p(d)},update(e,n){let{data:t}=n;if(!l)return;const a=t.createTask,r=e.readQuery({query:ld,variables:{id:l}}),i=null==r?void 0:r.getProject;e.writeQuery({query:ld,variables:{id:l},data:{getProject:rUe(rUe({},i),{},{tasks:[...(null==i?void 0:i.tasks)||[],a]})}})},onError:()=>{a({message:"Something went wrong! Please try again later.",colour:"danger"})}}),b=(0,g.useMemo)(()=>({name:"",description:"",priority:"",category:"",subject:"",owner:"",dueDate:""}),[]),[h,v]=(0,g.useState)(b),x=(0,g.useCallback)(async()=>{var e;const t=nUe(u);if(!(0,zt.isEmpty)(t))return void v(rUe(rUe({},b),t));v(b);const a=(0,Ai.A)(),r=u.scope===Ne?u.tagIds:[];m({variables:rUe(rUe({id:a,createdAt:(new Date).toISOString()},u),{},{accountId:n,itemId:u.itemId||(null===(e=u.item)||void 0===e?void 0:e.id)||null,locationIds:u.scope===Ce?u.locationIds:[],tagIds:r,owners:u.owners.map(e=>e.value)||[]}),refetchQueries:["GetTasksByAccountId","GetLegislationById"]})},[n,m,b,u]);return(0,Ze.jsxs)(f.Modal,{open:c,onClose:()=>t(),title:"Create New Task",children:[(0,Ze.jsx)(QBe,{task:u,setTask:p,accountId:n,sourcePage:r,disabled:o,isSubmitting:y,isEditing:void 0,projectId:l,hasProjectsAccess:s,errors:h}),(0,Ze.jsx)(oUe,{loading:y,disabled:y,variant:"contained","data-cy":"CreateTaskModal__submit",onClick:()=>x(),children:"Submit"})]})};var sUe,cUe,dUe,uUe;function pUe(e){switch(e.toUpperCase()){case"ACTION REQUIRED":return vR.ACTION_REQUIRED;case"EXTERNAL ACTION REQUIRED":return vR.EXTERNAL_ACTION_REQUIRED;case"COMPLETED":return vR.DONE;case"INITIATED":case"PROCESSING":default:return vR.PENDING;case"FAILED":return vR.FAILED;case"ROLLED BACK":return vR.ABANDONED;case"DELETED":return vR.DELETED}}function mUe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const fUe=(0,f.styled)(f.Modal)(sUe||(sUe=mUe(["\n  & > div {\n    min-height: 98vh;\n    min-width: 98vw;\n    display: flex;\n    flex-direction: column;\n  }\n"]))),yUe=(0,f.styled)("div")(cUe||(cUe=mUe(["\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex: 1;\n"]))),gUe=(0,f.styled)(e=>{const{id:n,dashboardurl:t,accountId:a,onDashboardInit:r,parameters:i={}}=e,o=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,OBe);return(0,g.useEffect)(()=>{!async function(){const e=document.getElementById(n);if(!e)return;const o={url:t,container:e,scrolling:"yes",height:"100%",width:"100%"},l={toolbarOptions:{undoRedo:!1,export:!0},parameters:SBe(jBe(jBe({},i),{},{accountId:a,ucAccountId:a.toUpperCase()}))},s=await(0,TBe.createEmbeddingContext)(),{embedDashboard:c}=s,d=await c(o,l);null==r||r(d)}()},[]),(0,Ze.jsx)("div",jBe({id:n},o))})(dUe||(dUe=mUe(["\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  height: 100%;\n  flex: 1;\n  & > iframe {\n    flex: 1;\n  }\n"]))),bUe=(0,f.styled)("div")(uUe||(uUe=mUe(["\n  display: flex;\n  width: 100%;\n  height: 100%;\n  justify-content: space-between;\n  align-items: center;\n  padding: 12px 0;\n  flex: 0;\n"]))),hUe=e=>{let{batch:n,accountId:t,uploadType:a,onDismiss:r,refetchBatches:i}=e;const{approved:o,id:l,lastUpdated:s,status:c,anomaliesCount:d}=n,u=rc(),p=!!d&&!o,m=u.data.find(e=>e.startsWith("approveUpload")),{showNotification:y}=vt(),{data:b,loading:v,error:x,refetch:T}=(0,h.IT)(NLe,{variables:{uploadType:a,batchId:l,accountId:t},notifyOnNetworkStatusChange:!0,fetchPolicy:"network-only"}),[O,{loading:k}]=function(){const{showNotification:e}=vt();return(0,Ot.n)(jLe,{onCompleted:()=>{e("The data has been successfully rolled back!")},onError:()=>{e("Something went wrong. The data wasn't rolled back.","danger")}})}(),[j,{loading:C}]=function(){const{showNotification:e}=vt();return(0,Ot.n)(wLe,{onCompleted:()=>{e("Approved!")},onError:()=>{e("Something went wrong. The data wasn't approved.","danger")}})}(),[S,N]=(0,g.useState)(!1),w=(0,g.useCallback)(()=>{N(!0)},[]),D=(0,g.useCallback)(()=>{N(!1)},[]),A=(0,g.useCallback)(e=>{let{message:n,colour:t}=e;y(n,t)},[y]),R=(0,g.useCallback)(async()=>{window.confirm("Are you sure you want to rollback the data?")&&(await O({variables:{id:l}}),r(),i())},[O,l,i,r]),P=(0,g.useCallback)(async()=>{p&&window.confirm("This batch has ".concat(d," anomalies, do you want to approve it?"))&&(await j({variables:{batchId:l}}),i()),r()},[j,l,p,r,i,d]),L=v||k||C,I=pUe(c)===vR.DONE,E=(_=s,Wt()().diff(Wt()(_),"minutes")>15);var _;const F=I&&E;return(0,Ze.jsxs)(fUe,{open:!0,title:"Upload summary",onClose:r,children:[(0,Ze.jsx)(yUe,{children:x?(0,Ze.jsx)(f.LoadFailed,{title:"Something went wrong loading summary dashboard. Please contact us to solve this problem.",error:x,retry:()=>T({uploadType:a,batchId:l})}):v?(0,Ze.jsx)(f.Loader,{}):(0,Ze.jsx)(gUe,{parameters:{ImportBatchId:l},id:"QuickViewModal__".concat(l),accountId:t,dashboardurl:b.getUploadSummaryDashboard},"QuickSightFrameStyled__".concat(l))}),(0,Ze.jsxs)(bUe,{children:[(0,Ze.jsx)(f.Button,{color:"tertiary",disabled:L,onClick:r,children:"Close"}),F&&(0,Ze.jsx)(f.Button,{color:"tertiary",disabled:L,onClick:R,children:"Roll back"}),(0,Ze.jsx)(f.Button,{variant:"contained",color:"secondary",disabled:L,onClick:w,children:"Create task"}),p&&m&&(0,Ze.jsx)(f.Button,{variant:"contained",color:"primary",disabled:L,onClick:P,children:"Approve upload"})]}),(0,Ze.jsx)(lUe,{open:S,accountId:t,onComplete:A,onDismiss:D})]})};var vUe,xUe,TUe;function OUe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const kUe=Ge.default.div(vUe||(vUe=OUe(["\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  padding: 30px 20px;\n"]))),jUe=(0,Ge.default)(ze.$n)(xUe||(xUe=OUe(["\n  margin: 0 5px;\n"]))),CUe=Ge.default.div(TUe||(TUe=OUe(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  padding: 30px 30px 0px 30px;\n"]))),SUe=e=>{let{onDismissClick:n,onConfirmClick:t}=e;return(0,Ze.jsxs)(ze.aF,{size:"sm",show:!0,dismissable:!0,onDismiss:n,height:"auto",maxHeight:"90vh",children:[(0,Ze.jsx)(CUe,{children:"Are you sure you want to delete this data upload attempt?"}),(0,Ze.jsxs)(kUe,{children:[(0,Ze.jsx)(jUe,{color:"info",onClick:n,children:"Cancel"}),(0,Ze.jsx)(jUe,{onClick:t,color:"danger",children:"Confirm"})]})]})};var NUe,wUe,DUe,AUe,RUe;function PUe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function LUe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?PUe(Object(t),!0).forEach(function(n){IUe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):PUe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function IUe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function EUe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _Ue=(0,Ge.default)(ze.v3)(NUe||(NUe=EUe(["\n  height: auto;\n"]))),FUe=(0,Ge.default)(ze.DZ)(wUe||(wUe=EUe(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),BUe=Ge.default.div(DUe||(DUe=EUe(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),UUe=Ge.default.ul(AUe||(AUe=EUe(["\n  list-style-type: disc;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),MUe=Ge.default.li(RUe||(RUe=EUe(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.md.spacing);function VUe(e){let{errors:n,errorsCount:t}=e;const a=n.filter(Boolean).reduce((e,n)=>{var t;const a=null===(t=n.rows)||void 0===t?void 0:t.split(",");return null!=a&&a.length?e.concat(a.map(e=>LUe(LUe({},n),{},{row:e}))):e.concat([n])},[]),r=Object.keys(Gt()(a).groupBy("row").value()).length;return(0,Ze.jsxs)(_Ue,{size:"md",wrap:!0,children:[(0,Ze.jsxs)(FUe,{size:"lg",children:["Showing ",t," errors in ",r," rows:"]}),Gt()(a).groupBy("row").map((e,n)=>(0,Ze.jsxs)(BUe,{children:[(0,Ze.jsxs)(ze.DZ,{size:"md",children:["Row ",n,":"]}),Gt()(e).filter(Boolean).groupBy(e=>Gt().capitalize(e.fieldName)||"Other errors").map((e,n)=>(0,Ze.jsxs)(UUe,{children:[(0,Ze.jsxs)(ze.DZ,{size:"sm",children:[n,":"]}),e.map(e=>{var n,t;return(0,Ze.jsxs)(MUe,{children:[null!==(n=e.message)&&void 0!==n&&n.includes("Something unexpected happened")||null!==(t=e.message)&&void 0!==t&&t.includes("0 rows")?(0,Ze.jsx)(ze.EY,{weight:e.actionRequired?"normal":"bold",children:e.message}):(0,Ze.jsx)(ze.EY,{weight:e.actionRequired?"normal":"bold",children:"You've provided: \"".concat(e.value,'". ').concat(e.message)}),e.actionRequired&&(0,Ze.jsx)(ze.EY,{children:"Field can be aliased."})]},JSON.stringify(e))})]},n)).value()]},n)).value()]})}var zUe;const GUe=(0,Ge.default)(ze.v3)(zUe||(zUe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: auto;\n  overflow: auto;\n"])));function $Ue(e){let{error:n}=e;return(0,Ze.jsx)(GUe,{children:n})}var WUe,qUe,JUe,YUe,HUe,KUe,QUe,ZUe;function XUe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const eMe=Ge.default.div(WUe||(WUe=XUe(["\n  padding: ",";\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  pre {\n    width: 100%;\n  }\n"])),e=>e.theme.geometry.md.spacing),nMe=(0,Ge.default)(ze.DZ)(qUe||(qUe=XUe(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing),tMe=((0,Ge.default)(ze.DZ)(JUe||(JUe=XUe(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Ge.default.div(YUe||(YUe=XUe(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Ge.default.ul(HUe||(HUe=XUe(["\n  list-style-type: disc;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),Ge.default.li(KUe||(KUe=XUe(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.md.spacing),Ge.default.div(QUe||(QUe=XUe(["\n  height: 100%;\n  display: flex;\n  align-items: center;\n  padding: ",";\n"])),e=>e.theme.geometry.sm.spacing)),aMe=(0,Ge.default)(ze.Ip)(ZUe||(ZUe=XUe(["\n  padding: ",";\n"])),e=>e.theme.geometry.sm.spacing);function rMe(e){let{batchId:n}=e;const{data:t,error:a,loading:r,refetch:i}=(0,h.IT)(V7,{variables:{id:n},fetchPolicy:"network-only",notifyOnNetworkStatusChange:!0}),{getDataImportBatchById:o}=t||{};return(0,Ze.jsxs)(eMe,{children:[r&&(0,Ze.jsx)(tMe,{children:(0,Ze.jsx)(aMe,{})}),a&&(0,Ze.jsx)(ub,{error:a,retry:i}),o&&!r&&!a&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(nMe,{size:"lg",children:"Batch Errors"}),o.failedReason?(0,Ze.jsx)($Ue,{error:o.failedReason}):(0,Ze.jsx)(VUe,{errors:o.errors,errorsCount:o.errorsCount})]})]})}const iMe=e=>{let{data:n}=e;const t=(0,N.m)();return n.fileName?(0,Ze.jsx)(d$,{onClick:()=>(async e=>{const{data:{getDataImportBatchImportFileUrl:n}}=await t.query({query:TLe,variables:{id:e}});n&&await Ar(n)})(n.id),children:n.fileName}):null},oMe=e=>{let{data:n,rollBackStatusLink:t}=e;const{token:a}=at(),r=rc(),i=n.userId===a.sub,o="Completed"===n.status&&((e,n,t)=>{var a,r;return!(null===(a=e.data)||void 0===a||!a.find(e=>{var t,a;return(null==e||null===(t=e.startsWith)||void 0===t?void 0:t.call(e,n))&&!(null!=e&&null!==(a=e.endsWith)&&void 0!==a&&a.call(e,"Own"))}))||(null===(r=e.data)||void 0===r?void 0:r.includes("".concat(n,"Own")))&&t})(r,"rollbackImportBatch",i);return(0,Ze.jsx)(Ze.Fragment,{children:o&&t(n.id)})};var lMe,sMe;function cMe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const dMe=Ge.default.div(lMe||(lMe=cMe(["\n  display: flex;\n  align-items: center;\n"]))),uMe=(0,Ge.default)(ze.In)(sMe||(sMe=cMe(["\n  margin: 0 10px;\n"]))),pMe=e=>{var n;let{data:t,download:a,defineStatusProps:r,statusLink:i,onActionClick:o,onDataClick:l,onErrorClick:s}=e;const c=rl(),d=(0,Ge.useTheme)(),u=(0,f.useTheme)(),p=c?u:d,{token:m}=at(),y=rc(),g=(null==t||null===(n=t.user)||void 0===n||null===(n=n.id)||void 0===n?void 0:n.toLowerCase())===m.sub,b=pUe(t.status),h=r(b,p,t.isLegacy,s,l,o);return(0,Ze.jsx)(dMe,{children:(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(uMe,{icon:null==h?void 0:h.icon,color:null==h?void 0:h.iconColor}),i(b,t.isLegacy,"Uploads",()=>s(t.id),()=>l(t.id),()=>o(t.id),h,null==a?void 0:a[t.id],y,g)]})})};var mMe;const fMe=(0,Ge.default)(ze.In)(mMe||(mMe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  @-webkit-keyframes eye {\n    0%,\n    10% {\n      fill: rgba(197, 204, 215, 56);\n    }\n    11%,\n    20% {\n      fill: rgba(187, 194, 215, 56);\n    }\n    21%,\n    30% {\n      fill: rgba(167, 184, 215, 56);\n    }\n    31%,\n    40% {\n      fill: rgba(157, 174, 215, 56);\n    }\n    41%,\n    50% {\n      fill: rgba(147, 164, 215, 56);\n    }\n    51%,\n    60% {\n      fill: rgba(137, 154, 215, 56);\n    }\n    61%,\n    70% {\n      fill: rgba(127, 144, 215, 56);\n    }\n    71%,\n    80% {\n      fill: rgba(137, 154, 215, 56);\n    }\n    81%,\n    90% {\n      fill: rgba(147, 164, 215, 56);\n    }\n    91%,\n    100% {\n      fill: rgba(157, 174, 215, 56);\n    }\n  }\n  @-moz-keyframes eye {\n    0%,\n    10% {\n      fill: rgba(197, 204, 215, 56);\n    }\n    11%,\n    20% {\n      fill: rgba(187, 194, 215, 56);\n    }\n    21%,\n    30% {\n      fill: rgba(167, 184, 215, 56);\n    }\n    31%,\n    40% {\n      fill: rgba(157, 174, 215, 56);\n    }\n    41%,\n    50% {\n      fill: rgba(147, 164, 215, 56);\n    }\n    51%,\n    60% {\n      fill: rgba(137, 154, 215, 56);\n    }\n    61%,\n    70% {\n      fill: rgba(127, 144, 215, 56);\n    }\n    71%,\n    80% {\n      fill: rgba(137, 154, 215, 56);\n    }\n    81%,\n    90% {\n      fill: rgba(147, 164, 215, 56);\n    }\n    91%,\n    100% {\n      fill: rgba(157, 174, 215, 56);\n    }\n  }\n  @keyframes eye {\n    0%,\n    10% {\n      fill: rgba(197, 204, 215, 56);\n    }\n    11%,\n    20% {\n      fill: rgba(187, 194, 215, 56);\n    }\n    21%,\n    30% {\n      fill: rgba(167, 184, 215, 56);\n    }\n    31%,\n    40% {\n      fill: rgba(157, 174, 215, 56);\n    }\n    41%,\n    50% {\n      fill: rgba(147, 164, 215, 56);\n    }\n    51%,\n    60% {\n      fill: rgba(137, 154, 215, 56);\n    }\n    61%,\n    70% {\n      fill: rgba(127, 144, 215, 56);\n    }\n    71%,\n    80% {\n      fill: rgba(137, 154, 215, 56);\n    }\n    81%,\n    90% {\n      fill: rgba(147, 164, 215, 56);\n    }\n    91%,\n    100% {\n      fill: rgba(157, 174, 215, 56);\n    }\n  }\n"])));function yMe(e){let{showDeleteButton:n,isCompleted:t,onDeleteClick:a,handleQuickViewClick:r}=e;const{title:i,color:o,cursor:l,onClick:s}=function(e){return{title:"Quick View",color:"#47d3c8",cursor:"pointer",onClick:e}}(r);return(0,Ze.jsxs)(Ze.Fragment,{children:[n&&(0,Ze.jsx)(ze.In,{icon:"times",size:"md",color:"#83838e",cursor:"pointer",onClick:a}),t&&(0,Ze.jsx)(fMe,{icon:"eye",title:i,size:"md",color:o,cursor:l,onClick:s})]})}const gMe=e=>{let{data:n,onDeleteClick:t,onQuickViewClick:a}=e;const{token:r}=at(),i=rc(),o=n.userId===r.sub,l="Completed"===n.status,s=["Failed","Action Required","Rolled Back"].includes(n.status)&&((e,n,t)=>!!e.data.find(e=>e.startsWith(n)&&!e.endsWith("Own"))||e.data.includes("".concat(n,"Own"))&&t)(i,"deleteImportBatch",o);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(yMe,{showDeleteButton:s,isCompleted:l,onDeleteClick:()=>t(n.id),approved:n.approved,handleQuickViewClick:()=>a(n.id)})})},bMe=e=>{var n;let{data:t}=e;const a=null==t||null===(n=t.transposition)||void 0===n?void 0:n.transpositionName;return(0,Ze.jsx)(Ze.Fragment,{children:a||"Default Template"})};var hMe;function vMe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xMe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vMe(Object(t),!0).forEach(function(n){TMe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vMe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function TMe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const OMe=(0,Ge.default)(ze.fI)(hMe||(hMe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n  height: 100%;\n  display: flex;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),kMe=function(e){let{fetchRows:n,setGridApi:t,download:a,rollBackStatusLink:r,statusLink:i,onErrorClick:o,onDataClick:l,onActionClick:s,onDeleteClick:c,onQuickViewClick:d,defineStatusProps:u}=e;const p=Dd({autoFit:!0}),m=[{colId:"lastUpdated",sort:"desc",sortIndex:0}],f={fileName:e=>(0,Ze.jsx)(iMe,xMe({},e)),status:e=>(0,Ze.jsx)(pMe,xMe(xMe({},e),{},{download:a,onErrorClick:o,onDataClick:l,onActionClick:s,defineStatusProps:u,statusLink:i})),rollback:e=>(0,Ze.jsx)(oMe,xMe(xMe({},e),{},{rollBackStatusLink:r})),summary:e=>(0,Ze.jsx)(gMe,xMe(xMe({},e),{},{onDeleteClick:c,onQuickViewClick:d})),transposition:e=>(0,Ze.jsx)(bMe,xMe({},e))},[y,b]=(0,g.useState)(!1),h={pagination:!0,paginationPageSizeSelector:!1,paginationPageSize:25,rowModelType:"serverSide",rowHeight:100,defaultColDef:{resizable:!1,sortable:!0,filter:!0,cellStyle:{paddingLeft:"10px",height:"auto",wordBreak:"break-word",lineHeight:"20px"}},columnDefs:[{headerName:"Status",field:"status",filter:"agTextColumnFilter",cellRenderer:"status"},{headerName:"Filename",field:"fileName",filter:"agTextColumnFilter",cellRenderer:"fileName"},{headerName:"User First Name",field:"user.first_name",filter:"agTextColumnFilter"},{headerName:"User Last Name",field:"user.last_name",filter:"agTextColumnFilter"},{headerName:"Last Updated Date",field:"lastUpdated",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Xt(new Date(n))}},{headerName:"Rows",field:"rowsUploaded",filter:"agTextColumnFilter",maxWidth:120},{headerName:"Template used",cellRenderer:"transposition",filter:!1,sortable:!1,maxWidth:130},{headerName:"Rollback",filter:!1,sortable:!1,cellRenderer:"rollback",maxWidth:100},{headerName:"Summary",sortable:!1,filter:!1,cellRenderer:"summary",cellStyle:{marginLeft:"20px"},maxWidth:100}],rowStyle:{width:"100%",display:"flex",alignItems:"center"}};return function(e,n,t,a){const[r,i]=(0,g.useState)(null),[o,l]=(0,g.useState)(null),s=(0,g.useCallback)(n=>{const{startRow:t,sortModel:r,filterModel:i}=null==n?void 0:n.request,o=ia(i);return e({offset:t||0,limit:a.paginationPageSize,sort:oa(r),filters:o})},[e,a.paginationPageSize]),c=(0,g.useCallback)(()=>{var e;null===(e=n.api)||void 0===e||e.setGridOption("serverSideDatasource",{async getRows(e){try{const n=await s(e);i(n);const{rows:t,totalRows:a}=n;return e.success({rowData:t,rowCount:a}),{rows:t,totalRows:a}}catch(n){throw e.fail(),n}}})},[n.api,s]);(0,g.useEffect)(()=>{if(t)return c(),()=>{var e;null==n||null===(e=n.api)||void 0===e||e.destroy()}},[t,c,n.api]),(0,g.useEffect)(()=>{if(!r||o)return;const e=setInterval(async()=>{var e;return null==n||null===(e=n.api)||void 0===e?void 0:e.refreshServerSide()},1e4);return l(e),()=>{o&&clearInterval(o)}},[r,o,n.api])}(n,p,y,h),(0,Ze.jsx)(OMe,{children:(0,Ze.jsx)(nD,xMe(xMe({},h),{},{cacheBlockSize:h.paginationPageSize,onFirstDataRendered:p.onFirstDataRendered,onFilterChanged:p.onFilterChanged,onSortChanged:p.onSortChanged,onColumnVisible:p.onSaveGridColumnState,onColumnPinned:p.onSaveGridColumnState,onColumnResized:p.onSaveGridColumnState,onColumnMoved:p.onSaveGridColumnState,onColumnRowGroupChanged:p.onSaveGridColumnState,onColumnValueChanged:p.onSaveGridColumnState,onColumnPivotChanged:p.onSaveGridColumnState,components:f,onGridReady:e=>{e.api.applyColumnState({state:m}),p.onGridReady(e),t({api:e.api}),b(!0)}}))})};var jMe,CMe,SMe,NMe,wMe,DMe;function AMe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function RMe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?AMe(Object(t),!0).forEach(function(n){PMe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):AMe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function PMe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function LMe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const IMe=Ge.default.div(jMe||(jMe=LMe(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),EMe=Ge.default.div(CMe||(CMe=LMe(["\n  overflow: auto;\n  height: 100%;\n"]))),_Me=Ge.default.div(SMe||(SMe=LMe(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),FMe=Ge.default.div(NMe||(NMe=LMe(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),BMe=(0,Ge.default)(ze.Yq)(wMe||(wMe=LMe(["\n  opacity: unset;\n  font-size: 14px;\n  font-family: unset;\n"]))),UMe=(0,Ge.default)(ze.EY)(DMe||(DMe=LMe(["\n  opacity: unset;\n  font-size: 14px;\n  font-family: unset;\n  text-decoration: none;\n  color: unset;\n  cursor: default;\n"]))),MMe={pollForBatch:null,isFileUploadModalVisible:!1,isDataFormModalVisible:!1,showConfirmRollbackModal:!1,showOcrModal:!1,showErrorModal:{show:!1,id:null},deleteConfirmation:!1,batchIdToDelete:null,currentPage:1,downloading:{},rollbackFunction:()=>{}},VMe=e=>{var n,t;const a={params:(0,m.g)()},r=(0,m.zy)(),i=(0,m.Zp)(),o=(0,N.m)(),l=rt(),{showNotification:s}=vt(),[c,d]=(0,g.useState)([]),[u,p]=(0,g.useState)(),[f,y]=(0,g.useState)(null),[b,h]=(0,g.useState)(MMe),{dataSection:v}=e,x=(0,g.useCallback)(async e=>{const{data:{getDataImportBatchesPage:{rows:n,totalRows:t}}}=await o.query({query:OLe,variables:RMe(RMe({},e),{},{accountId:l,type:v}),fetchPolicy:"network-only"});return d(n),{rows:n,totalRows:t}},[l,o,v,d]),T=(0,g.useCallback)(()=>{var e;return null==u||null===(e=u.api)||void 0===e?void 0:e.refreshServerSide({purge:!0})},[u]),[O]=(0,Ot.n)(jLe,{onCompleted:()=>{T(),h(RMe(RMe({},b),{},{showConfirmRollbackModal:!1})),s("Batch roll back succeeded","success")},onError:()=>{h(RMe(RMe({},b),{},{showConfirmRollbackModal:!1})),s("Error rolling back batch","danger")}}),[k]=(0,Ot.n)(kLe,{onCompleted:()=>{T(),s("Batch deleted","success")},onError:()=>{s("Error deleting batch","danger")}}),j=Os();(0,g.useEffect)(()=>()=>{localStorage.removeItem(jd)},[]);const C=()=>{T(),h(RMe(RMe({},b),{},{isFileUploadModalVisible:!1}))},S=e=>{h(RMe(RMe({},b),{},{showConfirmRollbackModal:!0,rollbackFunction:()=>{O({variables:{id:e}}),s("Batch roll back has been started","success")}}))},w=()=>{k({variables:{id:b.batchIdToDelete}}),s("Batch deletion has been started","success")},D=()=>h(RMe(RMe({},b),{},{isFileUploadModalVisible:!1,isDataFormModalVisible:!1,showConfirmRollbackModal:!1,showOcrModal:!1})),A=(e,n,t)=>!!e.data.find(e=>e.startsWith(n)&&!e.endsWith("Own"))||e.data.includes("".concat(n,"Own"))&&t,R=(e,n)=>{switch(e){case vR.DONE:return"Success";case vR.FAILED:return"Error";default:return n}};return(0,Ze.jsxs)(IMe,{children:[(0,Ze.jsx)(cBe,{dataSection:v,match:a,onDirectUploadClick:()=>h(RMe(RMe({},b),{},{isFileUploadModalVisible:!1,isDataFormModalVisible:!0})),onFileUploadClick:()=>h(RMe(RMe({},b),{},{isFileUploadModalVisible:!0,isDataFormModalVisible:!1})),onOcrClick:()=>h(RMe(RMe({},b),{},{showOcrModal:!0})),allowOcr:e.showInvoiceUpload,gridApi:u}),(0,Ze.jsx)(EMe,{children:(0,Ze.jsxs)(FMe,{children:[b.isFileUploadModalVisible&&(0,Ze.jsx)(uLe,{onComplete:()=>{C(),s("Upload started! Please check back for progress...","success")},template:e.template,transactionType:v,onDismiss:D}),b.isDataFormModalVisible&&(0,Ze.jsx)(ZEe,{onComplete:()=>{C(),s("Upload has completed","success")},onError:()=>{s("Upload has failed","danger")},onDismiss:D,dataSection:v}),b.showOcrModal&&(0,Ze.jsx)(ze.aF,{show:!0,size:"lg",onDismiss:D,children:(0,Ze.jsx)(xBe,{dataSection:e.dataSection,onComplete:(e,n)=>{s(e,n),h(RMe(RMe({},b),{},{showOcrModal:!1}))}})}),b.showConfirmRollbackModal&&(0,Ze.jsx)(dBe,{onDismiss:D,rollBackFunction:b.rollbackFunction}),b.deleteConfirmation&&(0,Ze.jsx)(SUe,{onConfirmClick:()=>{setTimeout(w,300),h(RMe(RMe({},b),{},{deleteConfirmation:!1}))},onDismissClick:()=>{h(RMe(RMe({},b),{},{deleteConfirmation:!1}))}}),(null===(n=b.showErrorModal)||void 0===n?void 0:n.show)&&(null===(t=b.showErrorModal)||void 0===t?void 0:t.id)&&(0,Ze.jsx)(ze.aF,{size:"lg",height:"auto",maxHeight:"90vh",show:!0,onDismiss:()=>h(RMe(RMe({},b),{},{showErrorModal:{show:!1,id:null}})),children:(0,Ze.jsx)(rMe,{batchId:b.showErrorModal.id})}),f&&(0,Ze.jsx)(hUe,{batch:c.find(e=>e.id===f),uploadType:v,onDismiss:()=>{y(null)},refetchBatches:()=>{o.refetchQueries({include:[OLe]})},accountId:l}),(0,Ze.jsx)(_Me,{children:(0,Ze.jsx)(EMe,{children:(0,Ze.jsx)(kMe,{dataSection:v,download:b.downloading,fetchRows:x,setGridApi:p,gridApi:u,defineStatusProps:(e,n,t,a,r,i)=>{switch(e){case vR.DONE:return{icon:"check",iconColor:n.colors.success.normal.background,linkText:t?"Migrated":"Export Data",onClick:a};case vR.PENDING:return{icon:"clock",iconColor:n.colors.text.normal.background,linkText:"In Progress"};case vR.ABANDONED:return{icon:"undo",iconColor:n.colors.neutral.dark.background,linkText:"Rolled Back"};case vR.FAILED:return{icon:"minus-circle",iconColor:n.colors.danger.normal.background,linkText:"View Errors",onClick:r};case vR.ACTION_REQUIRED:return{icon:"exclamation-circle",iconColor:n.colors.warning.normal.background,linkText:"Action Required",onClick:i};default:return{icon:"",iconColor:"",linkText:""}}},statusLink:(e,n,t,a,r,i,o,l,s,c)=>{const d=A(s,"exportImportBatch",c),u=A(s,"editImportBatch",c),p=e===vR.DONE&&d,m=e===vR.ACTION_REQUIRED&&u,f=e===vR.FAILED;return((e,n)=>(e===vR.DONE||e===vR.FAILED||e===vR.ACTION_REQUIRED)&&!n)(e,n)&&(p||m||f)?(0,Ze.jsx)(BMe,{name:"".concat(t,"__statusLink"),component:"a",disabled:l,onClick:e===vR.FAILED&&a||e===vR.DONE&&r||e===vR.ACTION_REQUIRED&&i,children:l?"Downloading":null==o?void 0:o.linkText}):(0,Ze.jsx)(UMe,{name:"".concat(t,"__statusText"),children:R(e,null==o?void 0:o.linkText)})},rollBackStatusLink:e=>(0,Ze.jsx)(ze.Yq,{name:"Uploads__rollBackLink",onClick:()=>S(e),children:"Roll Back"}),onDataClick:async e=>{j("".concat(v," export"),v,e)},onErrorClick:e=>{h(RMe(RMe({},b),{},{showErrorModal:{show:!0,id:e}}))},onQuickViewClick:y,onRollBackClick:S,onDeleteClick:e=>{h(RMe(RMe({},b),{},{deleteConfirmation:!0,batchIdToDelete:e}))},onActionClick:e=>i("".concat(r.pathname,"/alias/").concat(e))})})})]})})]})};function zMe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function GMe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?zMe(Object(t),!0).forEach(function(n){$Me(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):zMe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function $Me(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const WMe=function(e){return(0,Ze.jsx)(VMe,GMe(GMe({},e),{},{template:{fileName:sFe,type:xR.Static,url:sFe},dataSection:Vt.D_.Waste}))};function qMe(e){let{value:n,data:t}=e;const{wtnDocumentId:a}=t;return n?a?(0,Ze.jsx)(u$,{to:"/v2/documents/all/".concat(a),children:n}):n:""}function JMe(e){let{fetchFilters:n}=e;const t=Pu(),a=rt(),r=null==t?void 0:t.accessControls.customFields,{showNotification:i}=vt(),o=(0,g.useCallback)(async e=>{try{const t=await n({variables:{accountId:a,field:e.colDef.colId||e.colDef.field}});e.success(t.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){i("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning")}},[a,i,n]);return(0,g.useMemo)(()=>({getRowId:ba("id"),columnDefs:[{headerName:"Individual Collection Date",field:"individualCollectionDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter",sort:"desc",headerTooltip:"Individual Collection Date"},{headerName:"Waste-Out Location",field:"wasteOut",filter:"agSetColumnFilter",filterParams:{values:o,valueFormatter:la}},{headerName:"Location Code",field:"locationCode",filter:"agSetColumnFilter",filterParams:{values:o,valueFormatter:la}},...Do(Vt.D_.Waste,null==t?void 0:t.accessControls),{headerName:"Shared Emission Percentage",field:"locationSharedEmissionPercentage",filter:"agNumberColumnFilter"},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter",valueFormatter:ga},Zwe,{headerName:"Waste-In Location",field:"wasteIn",filter:"agSetColumnFilter",filterParams:{values:o,valueFormatter:la}},{headerName:"Tags",field:"tags",filterParams:{values:o,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:o,valueFormatter:la}},{headerName:"Waste Stream",field:"wasteStream",filterParams:{values:o,valueFormatter:la}},{headerName:"EWC",field:"ewc",filterParams:{values:o,valueFormatter:la}},{headerName:"Waste Contractor",field:"wasteContractor",filterParams:{values:o,valueFormatter:la}},{headerName:"Hazardous",field:"isHazardous",valueFormatter:zo,filter:"agSetColumnFilter",filterParams:Go()},{headerName:"Waste Carrier",field:"wasteCarrier",filterParams:{values:o,valueFormatter:la}},{headerName:"Treatment Process",field:"treatmentProcess",filterParams:{values:o,valueFormatter:la}},{headerName:"Number Of Collections",field:"numberOfCollections",filter:"agNumberColumnFilter"},{headerName:"Number Of Containers",field:"numberOfContainers",filter:"agNumberColumnFilter"},{headerName:"Container Type Size",field:"containerTypeSize",filterParams:{values:o,valueFormatter:la}},{headerName:"Quantity",field:"quantity",filter:"agNumberColumnFilter"},{headerName:"Unit Of Weight",field:"quantityUnitName",filterParams:{values:o,valueFormatter:la}},{headerName:"Act/Est",field:"accuracy",filterParams:{values:o,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return"ACT"===n?"Act":"Est"}},Bo,{headerName:"Gate Fee",field:"gateFee",filter:"agNumberColumnFilter"},{headerName:"Management Fee",field:"managementFee",filter:"agNumberColumnFilter"},{headerName:"Bin Hire",field:"binHire",filter:"agNumberColumnFilter"},{headerName:"Bin Exchange Fee",field:"binExchangeFee",filter:"agNumberColumnFilter"},{headerName:"Transport Charge",field:"transportCharge",filter:"agNumberColumnFilter"},{headerName:"Lift Charge",field:"liftCharge",filter:"agNumberColumnFilter"},{headerName:"Equipment Hire",field:"equipmentHire",filter:"agNumberColumnFilter"},{headerName:"Labour Cost",field:"labourCost",filter:"agNumberColumnFilter"},{headerName:"Misc Cost",field:"miscCost",filter:"agNumberColumnFilter"},{headerName:"Misc Cost Rate",field:"miscCostRate",filter:"agNumberColumnFilter"},{headerName:"Rebate",field:"rebate",filter:"agNumberColumnFilter"},{headerName:"Penalty",field:"penalty",filter:"agNumberColumnFilter"},{headerName:"Total Cost",field:"totalCost",filter:"agNumberColumnFilter"},{headerName:"Total Cost (VAT)",field:"totalCostVat",filter:"agNumberColumnFilter"},{headerName:"Currency Code",field:"currency",filterParams:{values:o,valueFormatter:la}},{headerName:"Notes",field:"notes",filter:"agTextColumnFilter"},{headerName:"Reference",field:"reference",filter:"agTextColumnFilter"},{headerName:"Waste Transfer Note ID",field:"wasteTransferNote",filter:"agTextColumnFilter",cellRenderer:qMe},{headerName:"Consignment Note (SEPA) ID",field:"consignmentNoteId",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Consignment Note (EA) ID",field:"consignmentNoteEA",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Sales Order ID",field:"salesOrder",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Invoice Number",field:"invoiceNumber",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Country",field:"location.address.country.name",colId:"country",filterParams:{values:o,valueFormatter:la}},{headerName:"Region",field:"location.region.name",colId:"region",filterParams:{values:o,valueFormatter:la}},{headerName:"Evidence Reference",field:"evidenceReference",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Carbon Emission Scope 3 (kgCO2e)",headerTooltip:"These are the indirect emissions associated with the uploaded activity data",field:"carbonEmission",filter:"agNumberColumnFilter"},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:o,valueFormatter:la}},...null!=r&&r.includes("WasteTransaction.projectPhase")?[{headerName:"Project Phase",sortable:!1,field:"projectPhase",filterParams:{values:o,valueFormatter:la}}]:[],...Ho(wo(Vt.D_.Waste,r))],reactiveCustomComponents:!0}),[r,o])}const YMe=e=>{let{defaultVariant:n,exportFileName:t}=e;return df({defaultVariant:n,exportFileName:t,enableHiddenColumns:!0,datasetName:"WasteTransactionPage",regularQuery:cm,reportingQuery:dm,regularFiltersQuery:um,reportingFiltersQuery:pm,mapping:{regular:{data:"getWasteTransactionsPage",filters:"getWasteTransactionsPageFilter"},reporting:{data:"getWasteTransactionsReportingPage",filters:"getWasteTransactionsReportingPageFilter"}}})};function HMe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function KMe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?HMe(Object(t),!0).forEach(function(n){QMe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):HMe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function QMe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ZMe=[{title:"Data",to:".."},{title:"Waste Transactions"}],XMe="waste-export";function eVe(){const e=YMe({defaultVariant:"regular",exportFileName:XMe}),n=JMe({fetchFilters:e.fetchFilters}),t=(0,g.useCallback)(async n=>{const{totalRows:t,rows:a}=await e.fetchData({variables:n});return{rows:a,totalRows:t}},[]);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Awe,{title:"Waste Transactions",defaultExportFileName:XMe,breadcrumbs:ZMe,uploadLink:"../waste/uploads",config:KMe(KMe({},n),{},{components:{uploadReference:aDe,documentReference:tDe}}),fetchRows:t})})}function nVe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function tVe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nVe(Object(t),!0).forEach(function(n){aVe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nVe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function aVe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const rVe=function(e){return(0,Ze.jsx)(VMe,tVe(tVe({},e),{},{dataSection:Vt.D_.Electricity,template:{columns:BRe,fileName:"electricity-template",type:xR.Dynamic},showInvoiceUpload:!0}))};function iVe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function oVe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?iVe(Object(t),!0).forEach(function(n){lVe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):iVe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function lVe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const sVe=function(e){return(0,Ze.jsx)(VMe,oVe(oVe({},e),{},{dataSection:Vt.D_.Heatsteam,template:{columns:URe,fileName:"heatsteam-template",type:xR.Dynamic}}))};function cVe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dVe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cVe(Object(t),!0).forEach(function(n){uVe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cVe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function uVe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const pVe=function(e){return(0,Ze.jsx)(VMe,dVe(dVe({},e),{},{dataSection:Vt.D_.Gas,template:{columns:MRe,fileName:"gas-template",type:xR.Dynamic},showInvoiceUpload:!0}))};function mVe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function fVe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mVe(Object(t),!0).forEach(function(n){yVe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mVe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function yVe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function gVe(){return gVe=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},gVe.apply(null,arguments)}const bVe=function(e){let n=gVe({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,Ze.jsx)(VMe,fVe(fVe({},n),{},{dataSection:Vt.D_.Water,template:{columns:VRe,fileName:"water-template",type:xR.Dynamic},showInvoiceUpload:!0}))};var hVe=t(86768),vVe=t.n(hVe),xVe=t(330),TVe=t.n(xVe);function OVe(){const e=(0,N.m)(),n=Pu(),t=null==n?void 0:n.id,a=null==n?void 0:n.accessControls.customFields,{showNotification:r}=vt(),i=async n=>{try{const{data:{getEnergyTransactionsPageFilter:a}}=await e.query({query:TVe(),variables:{accountId:t,field:n.colDef.colId||n.colDef.field,energyType:Vt.D_.Gas}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){r("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Meter Name",field:"meterName",filterParams:{values:i,valueFormatter:la}},{headerName:"Location",field:"locationName",filterParams:{values:i,valueFormatter:la}},{field:"energySource.locationPoint.location.code",headerName:"Location Code",colId:"locationCode",filterParams:{values:i,valueFormatter:la}},...Do(Vt.D_.Gas,null==n?void 0:n.accessControls),{headerName:"Shared Emission Percentage",field:"locationSharedEmissionPercentage",filter:"agNumberColumnFilter"},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter"},Zwe,{headerName:"Tags",field:"tags",filterParams:{values:i,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:i,valueFormatter:la}},{headerName:"Supplier",field:"supplier",filterParams:{values:i,valueFormatter:la}},{headerName:"Start Date",field:"startDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter",initialSort:"desc"},{headerName:"End Date",field:"endDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter"},{headerName:"Quantity (kWh)",field:"quantity",filter:"agNumberColumnFilter"},{headerName:"Reading",field:"reading",filter:"agNumberColumnFilter"},{headerName:"Act/Est",field:"accuracy",filterParams:{values:i,valueFormatter:la}},Bo,{headerName:"Total Cost",field:"totalCost",filter:"agNumberColumnFilter"},{headerName:"Total Cost (VAT)",field:"totalCostVat",filter:"agNumberColumnFilter"},{headerName:"Currency Code",field:"currency",filterParams:{values:i,valueFormatter:la}},{headerName:"Total Scope 1 emissions (kgCO2e)",field:"carbonScope1",filter:"agNumberColumnFilter",headerTooltip:"This column shows the total scope 1 emissions associated with the direct combustion of natural gas at a site or in an asset owned or controlled by your organisation."},{headerName:"Total Scope 3 emissions (kgCO2e)",field:"carbonScope3",filter:"agNumberColumnFilter",headerTooltip:"The column shows the scope 3 emissions of your natural gas consumption. If you have uploaded direct (scope 1) natural gas, this scope 3 total shows the Well-to-tank (WTT) emissions of your consumption. WTT emissions are those associated with extraction, refining and transportation of the raw fuel sources to an organisation's site (or asset), prior to combustion. If you uploaded indirect (scope 3) natural gas, this column shows the total scope 3 emissions associated with combustion and WTT"},{headerName:"Scope 1 CO2 in kgCO2e",headerTooltip:"This shows how much CO2 was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",field:"carbonEmissionCO2",filter:"agNumberColumnFilter"},{headerName:"Scope 1 N2O in kgCO2e",headerTooltip:"This shows how much N2O was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",field:"carbonEmissionN2O",filter:"agNumberColumnFilter"},{headerName:"Scope 1 CH4 in kgCO2e",headerTooltip:"This shows how much CH4 was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",field:"carbonEmissionCH4",filter:"agNumberColumnFilter"},{headerName:"Activity",headerTooltip:"This shows if the activity falls under your organisation's direct (company owned emission sources) or indirect (non company owned, employee, contractor or third party emission sources) activities",field:"activity",filterParams:{values:i,valueFormatter:la}},{headerName:"Comment",field:"comment",filter:"agTextColumnFilter"},{headerName:"Invoice Number",field:"invoiceNumber",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Country",field:"energySource.locationPoint.location.address.country.name",colId:"country",filterParams:{values:i,valueFormatter:la}},{headerName:"Region",field:"energySource.locationPoint.location.region.name",colId:"region",filterParams:{values:i,valueFormatter:la}},{headerName:"Evidence Reference",field:"evidenceReference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:i,valueFormatter:la}},{headerName:"Factors used",headerTooltip:"The factor set applied to this transaction, click the link to see the factors for this year in more detail",field:"reportingYearOfFactors",cellRenderer:"link",cellRendererParams:{to:"/configuration/carbonconversionfactors/location/gas"},filterParams:{values:i,valueFormatter:la}},...Ho(wo(Vt.D_.Gas,a))],reactiveCustomComponents:!0}}function kVe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jVe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kVe(Object(t),!0).forEach(function(n){CVe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kVe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function CVe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const SVe=[{title:"Data",to:".."},{title:"Gas Transactions"}];function NVe(){const e=(0,N.m)(),n=OVe();return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Awe,{title:"Gas Transactions",defaultExportFileName:"gas-export",breadcrumbs:SVe,uploadLink:"../gas/uploads",config:jVe(jVe({},n),{},{components:{uploadReference:aDe,documentReference:tDe,link:eDe}}),fetchRows:async n=>{const{data:{getGasTransactionsPage:{totalRows:t,rows:a}}}=await e.query({query:vVe(),variables:n,fetchPolicy:"network-only"});return{rows:a,totalRows:t}}})})}var wVe;const DVe=(0,D.J1)(wVe||(wVe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  fragment EnergySourceFields on EnergySource {\n    id\n    name\n    locationPoint {\n      location {\n        code\n        region {\n          id\n          name\n        }\n        address {\n          country {\n            name\n            alpha2Code\n          }\n        }\n      }\n    }\n  }\n"])));var AVe,RVe,PVe,LVe;function IVe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const EVe=(0,D.J1)(AVe||(AVe=IVe(["\n  query GetWaterTransactionsPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n    $hiddenColumns: [String!]\n  ) {\n    getWaterTransactionPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n      hiddenColumns: $hiddenColumns\n    ) {\n      totalRows\n      rows {\n        id\n        startDate\n        endDate\n        waterIn\n        waterOut\n        totalCost\n        totalCostVat\n        reading\n        accuracy\n        tariff\n        inEmissions\n        outEmissions\n        carbonEmissionsScope3\n        comment\n        currency\n        invoiceNumber\n        evidenceReference\n        otherReference\n        meterName\n        importBatchFileName\n        importBatchId\n        locationName\n        locationCode\n        locationEndDate\n        locationSharedEmissionPercentage\n        locationCustomAttributes\n        locationPointName\n        tags\n        supplier\n        departments\n        reportingYearOfFactors\n        energySource {\n          ...EnergySourceFields\n        }\n        purchaseType\n        organisationalUnits\n        estimatesScenario\n      }\n    }\n  }\n  ","\n"])),DVe);(0,D.J1)(RVe||(RVe=IVe(["\n  {\n    waterTransactionGridColumns @client {\n      id\n      displayName\n      display\n      width\n      dataType\n      field\n      filterable\n    }\n  }\n"]))),(0,D.J1)(PVe||(PVe=IVe(["\n  mutation SwapWaterTransactionColumnDisplay($id: String!) {\n    swapWaterTransactionColumnDisplay(id: $id) @client\n  }\n"]))),(0,D.J1)(LVe||(LVe=IVe(["\n  mutation SetWaterTransactionGridTotalPages($totalPages: Int!) {\n    setWaterTransactionGridTotalPages(totalPages: $totalPages) @client\n  }\n"])));var _Ve=t(59802),FVe=t.n(_Ve);function BVe(){const e=(0,N.m)(),n=Pu(),t=null==n?void 0:n.id,a=null==n?void 0:n.accessControls.customFields,{showNotification:r}=vt(),i=async n=>{try{const{data:{getWaterTransactionsPageFilter:a}}=await e.query({query:FVe(),variables:{accountId:t,field:n.colDef.colId||n.colDef.field}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){r("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Meter Name",field:"meterName",filterParams:{values:i,valueFormatter:la}},{headerName:"Location",field:"locationName",filterParams:{values:i,valueFormatter:la}},{headerName:"Location Code",field:"locationCode",filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:la}},...Do(Vt.D_.Water,null==n?void 0:n.accessControls),{headerName:"Shared Emission Percentage",field:"locationSharedEmissionPercentage",filter:"agNumberColumnFilter"},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter"},Zwe,{headerName:"Tags",field:"tags",filterParams:{values:i,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:i,valueFormatter:la}},{headerName:"Supplier",field:"supplier",filterParams:{values:i,valueFormatter:la}},{headerName:"Start Date",field:"startDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter"},{headerName:"End Date",field:"endDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter"},{headerName:"Water In (m³)",field:"waterIn",filter:"agNumberColumnFilter"},{headerName:"Water Out (m³)",field:"waterOut",filter:"agNumberColumnFilter"},{headerName:"Reading",field:"reading",filter:"agNumberColumnFilter"},{headerName:"Actual/Estimated",field:"accuracy",filterParams:{values:i,valueFormatter:la},valueFormatter:e=>{let{value:n}=e;return"ACT"===n?"Actual":"Estimated"}},Bo,{headerName:"Tariff",field:"tariff",filterParams:{values:i,valueFormatter:la}},{headerName:"Total Cost",field:"totalCost",filter:"agNumberColumnFilter"},{headerName:"Total Cost (VAT)",field:"totalCostVat",filter:"agNumberColumnFilter"},{headerName:"Currency Code",field:"currency",filterParams:{values:i,valueFormatter:la}},{headerName:"Emissions from Water Supply (kgCO2e)",headerTooltip:"Emissions from Water Supply (kgCO2e)",field:"inEmissions",filter:"agNumberColumnFilter"},{headerName:"Emissions from Water Treatment (kgCO2e)",headerTooltip:"Emissions from Water Treatment (kgCO2e)",field:"outEmissions",filter:"agNumberColumnFilter"},{headerName:"Total Scope 3 emissions (kgCO2e)",headerTooltip:"These are the indirect emissions associated with the uploaded activity data",field:"carbonEmissionsScope3",filter:"agNumberColumnFilter"},{headerName:"Comment",field:"comment",filter:"agTextColumnFilter"},{headerName:"Invoice Number",field:"invoiceNumber",filter:"agTextColumnFilter",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Country",field:"energySource.locationPoint.location.address.country.name",colId:"country",filterParams:{values:i,valueFormatter:la}},{headerName:"Region",field:"energySource.locationPoint.location.region.name",colId:"region",filterParams:{values:i,valueFormatter:la}},{headerName:"Evidence Reference",field:"evidenceReference",filter:"agTextColumnFilter",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:i,valueFormatter:la}},{headerName:"Factors used",headerTooltip:"The factor set applied to this transaction, click the link to see the factors for this year in more detail",field:"reportingYearOfFactors",cellRenderer:"factorReference",cellRendererParams:{to:"/configuration/carbonconversionfactors/location/water"},filter:!1},...Ho(wo(Vt.D_.Water,a))],reactiveCustomComponents:!0}}function UVe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function MVe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?UVe(Object(t),!0).forEach(function(n){VVe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):UVe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function VVe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const zVe=[{title:"Data",to:".."},{title:"Water Transactions"}];function GVe(){const e=(0,N.m)(),n=BVe();return(0,Ze.jsx)(Awe,{title:"Water Transactions",defaultExportFileName:"water-export",breadcrumbs:zVe,uploadLink:"../water/uploads",config:MVe(MVe({},n),{},{components:{uploadReference:aDe,documentReference:tDe,factorReference:eDe}}),fetchRows:async n=>{const{data:{getWaterTransactionPage:{totalRows:t,rows:a}}}=await e.query({query:EVe,variables:n,fetchPolicy:"network-only"});return{rows:a,totalRows:t}}})}function $Ve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function WVe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$Ve(Object(t),!0).forEach(function(n){qVe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$Ve(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function qVe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function JVe(e){let{fetchFilters:n}=e;const t=rt(),a=Pu(),r=null==a?void 0:a.accessControls.customFields,{showNotification:i}=vt(),o=async e=>{try{const a=await n({variables:{accountId:t,field:e.colDef.colId||e.colDef.field}});e.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){i("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Date",field:"date",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter",headerTooltip:"Date",sort:"desc"},{headerName:"Location",field:"location.name",colId:"locationName",filterParams:{values:o,valueFormatter:la}},{headerName:"Location Code",field:"locationCode",filterParams:{values:o,valueFormatter:la}},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter",valueFormatter:ga},...Do(Vt.D_.Transport,null==a?void 0:a.accessControls),WVe(WVe({},Zwe),{},{field:"location.endDate"}),{headerName:"Tags",field:"tags",filterParams:{values:o,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:o,valueFormatter:la}},{headerName:"Data Provider",field:"dataProvider",filterParams:{values:o,valueFormatter:la}},{headerName:"Type",field:"type",filter:"agSetColumnFilter",filterParams:{values:o,valueFormatter:la}},{headerName:"Sub Type",field:"subtype",filter:"agSetColumnFilter",filterParams:{values:o,valueFormatter:la}},{headerName:"Fuel Type",field:"fuelType",filterParams:{values:o,valueFormatter:la}},{headerName:"Origin of Travel",field:"origin",filterParams:{values:o,valueFormatter:la}},{headerName:"Destination of Travel",field:"destination",filterParams:{values:o,valueFormatter:la}},{headerName:"Volume",field:"volume",filter:"agNumberColumnFilter"},{headerName:"Volume Unit",field:"volumeUnit",filterParams:{values:o,valueFormatter:la}},{headerName:"Number of Journeys",field:"numberOfJourneys",filter:"agNumberColumnFilter"},{headerName:"Journey Distance",field:"journeyDistance",filter:"agNumberColumnFilter"},{headerName:"Total Distance",field:"distance",filter:"agNumberColumnFilter"},{headerName:"Distance Unit",field:"distanceUnit",filterParams:{values:o,valueFormatter:la}},{headerName:"Freight (tonne.km)",field:"freight",filter:"agNumberColumnFilter"},{headerName:"Carrier",field:"carrier",filterParams:{values:o,valueFormatter:la}},{headerName:"Purpose of Journey",field:"purpose",filterParams:{values:o,valueFormatter:la}},{headerName:"Cost",field:"cost",filter:"agNumberColumnFilter"},{headerName:"Cost (VAT)",field:"costVat",filter:"agNumberColumnFilter"},{headerName:"Currency Code",field:"currency",filterParams:{values:o,valueFormatter:la}},{headerName:"Act/Est",field:"accuracy",filterParams:{values:o,valueFormatter:la}},Bo,{headerName:"Total Scope 1 emissions - fuel use (kgCO2e)",headerTooltip:"These are the direct emissions associated with the uploaded activity data",field:"carbonEmissionsScope1",filter:"agNumberColumnFilter"},{headerName:"Scope 2 emissions for EV electricity' (kgCO2e)",headerTooltip:"These are the indirect emissions associated with the uploaded activity data",field:"carbonEmissionsScope2",filter:"agNumberColumnFilter"},{headerName:"Scope 3 emissions from fuel use (kgCO2e)",headerTooltip:"These are the indirect emissions associated with the uploaded activity data",field:"carbonEmissionsScope3Indirect",filter:"agNumberColumnFilter"},{headerName:"Scope 3 WTT emissions (kgCO2e)",headerTooltip:"This column calculates the scope 3 (indirect) Well-to-tank (WTT) emissions associated with extraction, refining and transportation of the raw fuels before they are used to power the transport mode",field:"carbonEmissionsScope3WTT",filter:"agNumberColumnFilter"},{headerName:"Scope 3 T&D emissions (kgCO2e) associated with EV electricity",headerTooltip:"This column calculates the scope 3 (indirect) Transmission and Distribution (T&D) emissions associated with losses of the electricity used by electric vehicles, which occur between the power station and their site(s)/public recharging points",field:"carbonEmissionsScope3TD",filter:"agNumberColumnFilter"},{headerName:"Total Scope 3 emissions (kgCO2e)",headerTooltip:"This column is the sum of all scope 3 (indirect) emissions associated with this transport transaction (Fuel use, WTT, and T&D)",field:"carbonEmissionsScope3",filter:"agNumberColumnFilter"},{headerName:"Scope 1 CO2 in kgCO2e from direct fuel use",headerTooltip:"This shows how much CO2 was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",field:"carbonEmissionCO2",filter:"agNumberColumnFilter"},{headerName:"Scope 1 N2O in kgCO2e from direct fuel use",headerTooltip:"This shows how much N2O was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",field:"carbonEmissionN2O",filter:"agNumberColumnFilter"},{headerName:"Scope 1 CH4 in kgCO2e from direct fuel use",headerTooltip:"This shows how much CH4 was emitted in terms of CO2e (Converted to CO2e via the IPCC's Global warming potentials to show emissions from various GHGs in a common unit of CO2e)",field:"carbonEmissionCH4",filter:"agNumberColumnFilter"},{headerName:"Activity",headerTooltip:"This shows if the activity falls under your organisation's direct (company owned emission sources) or indirect (non company owned, employee, contractor or third party emission sources) activities",field:"activity",filterParams:{values:o,valueFormatter:la}},{headerName:"Document Reference",field:"documentReference",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Notes",field:"notes",filter:"agTextColumnFilter"},{headerName:"Country",field:"location.address.country.name",colId:"country",filterParams:{values:o,valueFormatter:la}},{headerName:"Region",field:"location.region.name",colId:"region",filterParams:{values:o,valueFormatter:la}},{headerName:"Reference",field:"reference",filter:"agTextColumnFilter"},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:o,valueFormatter:la}},...Ho(wo(Vt.D_.Transport,r))],reactiveCustomComponents:!0}}var YVe,HVe,KVe,QVe,ZVe,XVe,eze,nze;function tze(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const aze=(0,D.J1)(YVe||(YVe=tze(["\n  fragment TransportTransactionFields on TransportTransaction {\n    id\n    date\n    location {\n      ...LocationFields\n    }\n    locationCode\n    locationSharedEmissionPercentage\n    locationCustomAttributes\n    type\n    subtype\n    fuelType\n    purpose\n    reference\n    origin\n    destination\n    volume\n    volumeUnit\n    distance\n    numberOfJourneys\n    journeyDistance\n    distanceUnit\n    freight\n    carrier\n    dataProvider\n    activity\n    cost\n    costVat\n    currency\n    accuracy\n    documentReference\n    carbonEmissionsScope1\n    carbonEmissionsScope2\n    carbonEmissionsScope3Indirect\n    carbonEmissionsScope3WTT\n    carbonEmissionsScope3\n    carbonEmissionCO2\n    carbonEmissionN2O\n    carbonEmissionCH4\n    carbonEmissionsScope3TD\n    notes\n    importBatchId\n    importBatchFileName\n    tags\n    departments\n    purchaseType\n    organisationalUnits\n    estimatesScenario\n  }\n  ","\n"])),nm),rze=(0,D.J1)(HVe||(HVe=tze(["\n  query GetTransportTransactionPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n    $hiddenColumns: [String!]\n  ) {\n    getTransportTransactionPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n      hiddenColumns: $hiddenColumns\n    ) {\n      totalRows\n      rows {\n        ...TransportTransactionFields\n      }\n    }\n  }\n  ","\n"])),aze),ize=(0,D.J1)(KVe||(KVe=tze(["\n  query GetTransportTransactionsPageFilter($accountId: ID!, $field: String!) {\n    getTransportTransactionsPageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"]))),oze=(0,D.J1)(QVe||(QVe=tze(["\n  query GetTransportTransactionReportingPageFilter($accountId: ID!, $field: String!) {\n    getTransportTransactionReportingPageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"]))),lze=(0,D.J1)(ZVe||(ZVe=tze(["\n  query GetTransportTransactionReportingPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n    $hiddenColumns: [String!]\n  ) {\n    getTransportTransactionReportingPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n      hiddenColumns: $hiddenColumns\n    ) {\n      totalRows\n      datasetName\n      rows {\n        ...TransportTransactionFields\n      }\n    }\n  }\n  ","\n"])),aze),sze=((0,D.J1)(XVe||(XVe=tze(["\n  {\n    transportTransactionGridColumns @client {\n      id\n      displayName\n      display\n      width\n      dataType\n      field\n      filterable\n    }\n  }\n"]))),(0,D.J1)(eze||(eze=tze(["\n  mutation SwapTransportTransactionColumnDisplay($id: String!) {\n    swapTransportTransactionColumnDisplay(id: $id) @client\n  }\n"]))),(0,D.J1)(nze||(nze=tze(["\n  mutation SetWaterTransactionGridTotalPages($totalPages: Int!) {\n    setTransportTransactionGridTotalPages(totalPages: $totalPages) @client\n  }\n"]))),e=>{let{defaultVariant:n,exportFileName:t}=e;return df({defaultVariant:n,exportFileName:t,enableHiddenColumns:!0,datasetName:"TransportTransactionPage",regularQuery:rze,reportingQuery:lze,regularFiltersQuery:ize,reportingFiltersQuery:oze,mapping:{regular:{data:"getTransportTransactionPage",filters:"getTransportTransactionsPageFilter"},reporting:{data:"getTransportTransactionReportingPage",filters:"getTransportTransactionReportingPageFilter"}}})});function cze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cze(Object(t),!0).forEach(function(n){uze(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cze(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function uze(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const pze=[{title:"Data",to:".."},{title:"Transport Transactions"}],mze="transport-export",fze=function(){const{fetchData:e,fetchFilters:n}=sze({defaultVariant:"regular",exportFileName:mze}),t=JVe({fetchFilters:n}),a=(0,g.useCallback)(async n=>{const{totalRows:t,rows:a}=await e({variables:n});return{rows:a,totalRows:t}},[]);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Awe,{title:"Transport Transactions",defaultExportFileName:mze,breadcrumbs:pze,uploadLink:"../transport/uploads",config:dze(dze({},t),{},{components:{uploadReference:aDe,documentReference:tDe}}),fetchRows:a})})};function yze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yze(Object(t),!0).forEach(function(n){bze(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yze(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function bze(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function hze(){return hze=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},hze.apply(null,arguments)}function vze(e){let n=hze({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,Ze.jsx)(VMe,gze(gze({},n),{},{dataSection:Vt.D_.Transport,template:{type:xR.Static,fileName:"advanced-transport-template",url:K_e}}))}var xze,Tze;function Oze(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const kze=(0,D.J1)(xze||(xze=Oze(["\n  query GetFuelTransactionsPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n    getFuelTransactionPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        locationName\n        locationCode\n        locationEndDate\n        locationSharedEmissionPercentage\n        tags\n        date\n        fuelActivityName\n        fuelType\n        quantity\n        unit\n        accuracy\n        totalCost\n        currency\n        carbonScope1\n        carbonScope3\n        carbonEmissionScope3WTT\n        kgCO2Scope1\n        kgCO2Scope3\n        kgCH4Scope1\n        kgCH4Scope3\n        kgN2OScope1\n        kgN2OScope3\n        energyConsumption\n        activity\n        comment\n        invoiceNumber\n        evidenceReference\n        otherReference\n        importBatchId\n        importBatchFileName\n        departments\n        supplier\n        location {\n          ...LocationFields\n        }\n        purchaseType\n        organisationalUnits\n        estimatesScenario\n      }\n    }\n  }\n  ","\n"])),nm);(0,D.J1)(Tze||(Tze=Oze(["\n  query GetRefrigerantTransactionsPageFilter($accountId: ID!, $field: String!) {\n    getRefrigerantTransactionsPageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));var jze=t(83785),Cze=t.n(jze);function Sze(){const e=(0,N.m)(),n=Pu(),t=null==n?void 0:n.id,a=null==n?void 0:n.accessControls.customFields,{showNotification:r}=vt(),i=async n=>{try{const{data:{getFuelTransactionsPageFilter:a}}=await e.query({query:Cze(),variables:{accountId:t,field:n.colDef.colId||n.colDef.field}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){r("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Location",field:"locationName",filterParams:{values:i,valueFormatter:la}},{headerName:"Location Code",field:"locationCode",filterParams:{values:i,valueFormatter:la}},...Do(Vt.D_.Fuel,null==n?void 0:n.accessControls),{headerName:"Shared Emission Percentage",field:"locationSharedEmissionPercentage",filter:"agNumberColumnFilter"},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter"},Zwe,{headerName:"Tags",field:"tags",filterParams:{values:i,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:i,valueFormatter:la}},{headerName:"Supplier",field:"supplier",filterParams:{values:i,valueFormatter:la}},{headerName:"Date",field:"date",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter",initialSort:"desc"},{headerName:"Fuel Activity",field:"fuelActivityName",filterParams:{values:i,valueFormatter:la}},{headerName:"Fuel Type",field:"fuelType",filterParams:{values:i,valueFormatter:la}},{headerName:"Quantity",field:"quantity",filter:"agNumberColumnFilter",headerTooltip:"Quantity"},{headerName:"Quantity Units",field:"unit",filterParams:{values:i,valueFormatter:la}},{headerName:"Energy (kWh)",field:"energyConsumption",filter:"agNumberColumnFilter"},{headerName:"Act/Est",field:"accuracy",filterParams:{values:i,valueFormatter:la}},Bo,{headerName:"Total Cost",field:"totalCost",filter:"agNumberColumnFilter"},{headerName:"Currency",field:"currency",filterParams:{values:i,valueFormatter:la}},{headerName:"Carbon Emission Scope 1 (kgCO2e)",field:"carbonScope1",filter:"agNumberColumnFilter",headerTooltip:"These are the direct emissions associated with the uploaded activity data"},{headerName:"Carbon Emission Scope 3 (kgCO2e)",field:"carbonScope3",filter:"agNumberColumnFilter",headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Scope 3 WTT",field:"carbonEmissionScope3WTT",filter:"agNumberColumnFilter",headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Scope 1 kgCO2",field:"kgCO2Scope1",filter:"agNumberColumnFilter",initialHide:!0,headerTooltip:"These are the direct emissions associated with the uploaded activity data"},{headerName:"Scope 3 kgCO2",field:"kgCO2Scope3",filter:"agNumberColumnFilter",initialHide:!0,headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Scope 1 kgCH4",field:"kgCH4Scope1",filter:"agNumberColumnFilter",initialHide:!0,headerTooltip:"These are the direct emissions associated with the uploaded activity data"},{headerName:"Scope 3 kgCH4",field:"kgCH4Scope3",filter:"agNumberColumnFilter",initialHide:!0,headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Scope 1 kgN2O",field:"kgN2OScope1",filter:"agNumberColumnFilter",initialHide:!0,headerTooltip:"These are the direct emissions associated with the uploaded activity data"},{headerName:"Scope 3 kgN2O",field:"kgN2OScope3",filter:"agNumberColumnFilter",initialHide:!0,headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Activity",headerTooltip:"This shows if the activity falls under your organisation's direct (company owned emission sources) or indirect (non company owned, employee, contractor or third party emission sources) activities",field:"activity",filterParams:{values:i,valueFormatter:la}},{headerName:"Comment",field:"comment",filter:"agTextColumnFilter"},{headerName:"Invoice Number",field:"invoiceNumber",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Country",field:"location.address.country.name",colId:"country",filterParams:{values:i,valueFormatter:la}},{headerName:"Region",field:"location.region.name",colId:"region",filterParams:{values:i,valueFormatter:la}},{headerName:"Evidence Reference",field:"evidenceReference",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filter:"agTextColumnFilter",cellRenderer:"documentReference"},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:i,valueFormatter:la}},...Ho(wo(Vt.D_.Fuel,a))],reactiveCustomComponents:!0}}function Nze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Nze(Object(t),!0).forEach(function(n){Dze(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Nze(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Dze(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Aze=[{title:"Data",to:".."},{title:"Fuel Transactions"}];function Rze(){const e=(0,N.m)(),n=Sze();return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Awe,{title:"Fuel Transactions",defaultExportFileName:"fuel-export",breadcrumbs:Aze,uploadLink:"../fuel/uploads",config:wze(wze({},n),{},{components:{uploadReference:aDe,documentReference:tDe}}),fetchRows:async n=>{const{data:{getFuelTransactionPage:{totalRows:t,rows:a}}}=await e.query({query:kze,variables:n,fetchPolicy:"network-only"});return{rows:a,totalRows:t}}})})}function Pze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Lze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pze(Object(t),!0).forEach(function(n){Ize(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pze(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ize(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Eze(){return Eze=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Eze.apply(null,arguments)}function _ze(e){let n=Eze({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,Ze.jsx)(VMe,Lze(Lze({},n),{},{dataSection:Vt.D_.Fuel,dromoConfiguration:WU.fuel,template:{columns:GRe,fileName:"fuel-template",type:xR.Dynamic}}))}var Fze;const Bze=(0,D.J1)(Fze||(Fze=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetMaterialsTransactionsPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getMaterialsTransactionsPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        locationName\n        locationCode\n        locationEndDate\n        locationSharedEmissionPercentage\n        locationCustomAttributes\n        date\n        activity\n        material\n        origin\n        supplier\n        productCode\n        unitsQuantity\n        weight\n        quantityUnit\n        totalCost\n        totalCostVat\n        currency\n        accuracy\n        notes\n        reference\n        invoiceNumber\n        evidenceReference\n        otherReference\n        tags\n        carbonScope3\n        carbonScope1\n        importBatchId\n        importBatchFileName\n        departments\n        location {\n          ...LocationFields\n        }\n        materialSubcategory\n        materialDetails\n        materialDescription\n        subcontractor\n        distanceToLocation\n        purchaseType\n        percentRecycledContent\n        numberOfDeliveries\n        certificationOrigin\n        organisationalUnits\n        estimatesScenario\n      }\n    }\n  }\n  ","\n"])),nm);var Uze=t(91512),Mze=t.n(Uze);function Vze(){const e=(0,N.m)(),n=Pu(),t=null==n?void 0:n.id,a=null==n?void 0:n.accessControls.customFields,{showNotification:r}=vt(),i=async n=>{try{const{data:{getMaterialsTransactionsPageFilter:a}}=await e.query({query:Mze(),variables:{accountId:t,field:n.colDef.colId||n.colDef.field}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){r("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Location",field:"locationName",filterParams:{values:i,valueFormatter:la}},{headerName:"Location Code",field:"locationCode",filterParams:{values:i,valueFormatter:la}},...Do(Vt.D_.Materials,null==n?void 0:n.accessControls),{headerName:"Shared Emission Percentage",field:"locationSharedEmissionPercentage",filter:"agNumberColumnFilter"},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter"},Zwe,{headerName:"Date",field:"date",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter",initialSort:"desc"},{headerName:"Activity",headerTooltip:"This shows if the activity falls under your organisation's direct (company owned emission sources) or indirect (non company owned, employee, contractor or third party emission sources) activities",field:"activity",filterParams:{values:i,valueFormatter:la}},{headerName:"Material",field:"material",filterParams:{values:i,valueFormatter:la}},{headerName:"Material Subcategory",field:"materialSubcategory",filter:"agTextColumnFilter"},{headerName:"Material Description",field:"materialDescription",filter:"agTextColumnFilter"},{headerName:"Material Details",field:"materialDetails",filter:"agTextColumnFilter"},{headerName:"Origin",field:"origin",filterParams:{values:i,valueFormatter:la}},{headerName:"Supplier",field:"supplier",filterParams:{values:i,valueFormatter:la}},{headerName:"Subcontractor",field:"subcontractor",filterParams:{values:i,valueFormatter:la}},{headerName:"Product Code",field:"productCode",filterParams:{values:i,valueFormatter:la}},{headerName:"Units Quantity",field:"unitsQuantity",filter:"agNumberColumnFilter"},{headerName:"Weight",field:"weight",filter:"agNumberColumnFilter"},{headerName:"Quantity Unit",field:"quantityUnit",filterParams:{values:i,valueFormatter:la}},{headerName:"Distance to Location (km)",field:"distanceToLocation",filter:"agNumberColumnFilter"},{headerName:"Total Cost",field:"totalCost",filter:"agNumberColumnFilter"},{headerName:"Total Cost (VAT)",field:"totalCostVat",filter:"agNumberColumnFilter"},{headerName:"Carbon Emission Scope 1 (kgCO2e)",field:"carbonScope1",filter:"agNumberColumnFilter",hide:!0,headerTooltip:"These are the direct emissions associated with the uploaded activity data"},{headerName:"Embodied Carbon (kgCO2e)",field:"carbonScope3",filter:"agNumberColumnFilter",headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Currency Code",field:"currency",filterParams:{values:i,valueFormatter:la}},{headerName:"Act/Est",field:"accuracy",filterParams:{values:i,valueFormatter:la}},Bo,{headerName:"Tags",field:"tags",filterParams:{values:i,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:i,valueFormatter:la}},{headerName:"Notes",field:"notes",filter:"agTextColumnFilter"},{headerName:"Reference",field:"reference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Invoice Number",field:"invoiceNumber",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Country",field:"location.address.country.name",colId:"country",filterParams:{values:i,valueFormatter:la}},{headerName:"Region",field:"location.region.name",colId:"region",filterParams:{values:i,valueFormatter:la}},{headerName:"Evidence Reference",field:"evidenceReference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:i,valueFormatter:la}},...Ho(wo(Vt.D_.Materials,a)),{headerName:"% Recycled Content",field:"percentRecycledContent",filter:"agNumberColumnFilter"},{headerName:"Number of Deliveries",field:"numberOfDeliveries",filter:"agNumberColumnFilter"},{headerName:"Origin of Certification",field:"certificationOrigin",filter:"agSetColumnFilter",filterParams:{values:Ma.certificationOrigins}}],reactiveCustomComponents:!0}}function zze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Gze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?zze(Object(t),!0).forEach(function(n){$ze(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):zze(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function $ze(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Wze=()=>{const e=(0,N.m)(),n=Vze();return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Awe,{title:"Materials Transactions",defaultExportFileName:"materials-export",breadcrumbs:[{title:"Data",to:".."},{title:"Materials Transactions"}],uploadLink:"../materials/uploads",config:Gze(Gze({},n),{},{components:{documentReference:tDe,uploadReference:aDe}}),fetchRows:async n=>{const{data:{getMaterialsTransactionsPage:{totalRows:t,rows:a}}}=await e.query({query:Bze,variables:n,fetchPolicy:"network-only"});return{rows:a,totalRows:t}}})})};function qze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Jze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qze(Object(t),!0).forEach(function(n){Yze(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qze(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Yze(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Hze=function(e){return(0,Ze.jsx)(VMe,Jze(Jze({},e),{},{dataSection:Vt.D_.Materials,template:[{columns:$Re,type:xR.Dynamic,name:"Simple",fileName:"simple-materials-template"},{type:xR.Static,name:"Advanced",fileName:"advanced-materials-template",url:P_e}]}))};var Kze,Qze,Zze,Xze,eGe;function nGe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function tGe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nGe(Object(t),!0).forEach(function(n){aGe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nGe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function aGe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function rGe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const iGe=(0,Ge.default)(ze.JU)(Kze||(Kze=rGe(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),oGe=Ge.default.div(Qze||(Qze=rGe(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),lGe=(0,Ge.default)(ze.DZ)(Zze||(Zze=rGe(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),sGe=(0,Ge.default)(ze.fv)(Xze||(Xze=rGe(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),cGe=(0,Ge.default)(ze.lr)(eGe||(eGe=rGe(["\n  .DayPickerInput-Overlay {\n    top: -354px;\n    left: 50%;\n  }\n"]))),dGe=e=>{let{heading:n,isSubmitting:t,upload:a,setUpload:r}=e;const i=e=>{r(tGe(tGe({},a),{},{[e.target.name]:e.target.value}))};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(lGe,{size:"lg",children:n}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(sGe,{item:!0,children:[(0,Ze.jsx)(oGe,{children:(0,Ze.jsx)(iGe,{children:"Meter Name"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"meterName",value:a.meterName,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(sGe,{item:!0,children:[(0,Ze.jsx)(oGe,{children:(0,Ze.jsx)(iGe,{children:"Invoice Number"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"invoiceNumber",value:a.invoiceNumber,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(sGe,{item:!0,children:[(0,Ze.jsx)(oGe,{children:(0,Ze.jsx)(iGe,{children:"Quantity"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"quantity",value:a.quantity,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(sGe,{item:!0,children:[(0,Ze.jsx)(oGe,{children:(0,Ze.jsx)(iGe,{children:"Start Date"})}),(0,Ze.jsx)(cGe,{disabled:t,onDayClick:e=>{i({target:{value:e?e.toISOString():e,name:"startDate"}})},name:"startDate",selectedDate:a.startDate?new Date(a.startDate):a.startDate,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(sGe,{item:!0,children:[(0,Ze.jsx)(oGe,{children:(0,Ze.jsx)(iGe,{children:"End Date"})}),(0,Ze.jsx)(cGe,{disabled:t,onDayClick:e=>{i({target:{value:e?e.toISOString():e,name:"endDate"}})},name:"endDate",selectedDate:a.endDate?new Date(a.endDate):a.endDate,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(sGe,{item:!0,children:[(0,Ze.jsx)(oGe,{children:(0,Ze.jsx)(iGe,{children:"Total Cost"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"totalCost",value:a.totalCost,box:!0})]})})]})};var uGe,pGe,mGe,fGe,yGe;function gGe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function bGe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gGe(Object(t),!0).forEach(function(n){hGe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gGe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hGe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function vGe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const xGe=(0,Ge.default)(ze.JU)(uGe||(uGe=vGe(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),TGe=Ge.default.div(pGe||(pGe=vGe(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),OGe=(0,Ge.default)(ze.DZ)(mGe||(mGe=vGe(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),kGe=(0,Ge.default)(ze.fv)(fGe||(fGe=vGe(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),jGe=(0,Ge.default)(ze.lr)(yGe||(yGe=vGe(["\n  .DayPickerInput-Overlay {\n    top: -354px;\n    left: 50%;\n  }\n"]))),CGe=e=>{let{heading:n,isSubmitting:t,upload:a,setUpload:r}=e;const i=e=>{r(bGe(bGe({},a),{},{[e.target.name]:e.target.value}))};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(OGe,{size:"lg",children:n}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kGe,{item:!0,children:[(0,Ze.jsx)(TGe,{children:(0,Ze.jsx)(xGe,{children:"Meter Name"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"meterName",value:a.meterName,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kGe,{item:!0,children:[(0,Ze.jsx)(TGe,{children:(0,Ze.jsx)(xGe,{children:"Invoice Number"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"invoiceNumber",value:a.invoiceNumber,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kGe,{item:!0,children:[(0,Ze.jsx)(TGe,{children:(0,Ze.jsx)(xGe,{children:"Reading"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"reading",value:a.reading,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kGe,{item:!0,children:[(0,Ze.jsx)(TGe,{children:(0,Ze.jsx)(xGe,{children:"Quantity"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"quantity",value:a.quantity,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kGe,{item:!0,children:[(0,Ze.jsx)(TGe,{children:(0,Ze.jsx)(xGe,{children:"Tariff"})}),(0,Ze.jsx)(ze.ks,{disabled:t,onChange:e=>i(e),name:"tariff",value:a.tariff,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kGe,{item:!0,children:[(0,Ze.jsx)(TGe,{children:(0,Ze.jsx)(xGe,{children:"Start Date"})}),(0,Ze.jsx)(jGe,{disabled:t,onDayClick:e=>{i({target:{value:e?e.toISOString():e,name:"startDate"}})},name:"startDate",selectedDate:a.startDate?new Date(a.startDate):a.startDate,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kGe,{item:!0,children:[(0,Ze.jsx)(TGe,{children:(0,Ze.jsx)(xGe,{children:"End Date"})}),(0,Ze.jsx)(jGe,{disabled:t,onDayClick:e=>{i({target:{value:e?e.toISOString():e,name:"endDate"}})},name:"endDate",selectedDate:a.endDate?new Date(a.endDate):a.endDate,box:!0})]})})]})};var SGe,NGe;function wGe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const DGe=Ge.default.div(SGe||(SGe=wGe(["\n  padding: 20px;\n"]))),AGe=(0,Ge.default)(ze.fv)(NGe||(NGe=wGe(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),RGe=e=>{let{onDismiss:n,selectedUpload:t,onComplete:a,utility:r}=e;const[i,o]=(0,g.useState)(t),l=(0,N.m)();return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,onDismiss:()=>n(),children:(0,Ze.jsxs)(DGe,{children:[r!==Vt.D_.Water&&(0,Ze.jsx)(dGe,{heading:"Review OCR Results",upload:i,setUpload:o}),r===Vt.D_.Water&&(0,Ze.jsx)(CGe,{heading:"Review OCR Results",upload:i,setUpload:o}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(AGe,{item:!0,children:(0,Ze.jsx)(ze.$n,{onClick:async()=>{try{const e=r===Vt.D_.Water?((e,n)=>{const t=[];return t.push([e.meterName,e.startDate,e.endDate,e.reading,e.quantity,"act",e.tariff,"GBP","",e.invoiceNumber.toString(),"",n.split(".")[0]]),t})(i,t.fileName):((e,n)=>{const t=[];return t.push([e.meterName,e.startDate,e.endDate,e.quantity,"act",e.totalCost,"GBP","",e.invoiceNumber,"",n.split(".")[0]]),t})(i,t.fileName),o=r===Vt.D_.Water?await Mr(e,t.fileName,VRe):await Mr(e,t.fileName,MRe),{data:{initiateDataUpload:{signedUrl:s}}}=await l.mutate({mutation:ny(),variables:{transactionType:r.toUpperCase(),accountId:i.accountId,fileName:o.name,isDirectActivity:!0}});await l.mutate({mutation:Xf(),variables:{file:o,fileName:o.name,accId:i.accountId,url:s}}),await l.mutate({mutation:a_e,variables:{id:t.id},refetchQueries:["GetOcrDataForAccount"]}),a({colour:"success",message:"Transaction uploaded. Check uploads page to view progress."}),n()}catch(e){a({colour:"danger",message:"Something went wrong. Please try again later or contact support."})}},children:"Accept Results"})})})]})})};var PGe,LGe,IGe,EGe;function _Ge(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const FGe=Ge.default.div(PGe||(PGe=_Ge(["\n  flex: 1 1 auto;\n  background-color: ",";\n  overflow-x: hidden;\n"])),e=>e.theme.colors.basic.white),BGe=(0,Ge.default)(ze.fI)(LGe||(LGe=_Ge(["\n  padding: ",";\n  background: ",";\n  border-top: 1px solid ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.sm.spacing," ").concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.light.background,e=>e.theme.colors.text.light.background,e=>e.theme.colors.text.light.background),UGe=(0,Ge.default)(ze.fI)(IGe||(IGe=_Ge(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n  background-color: white;\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background),MGe=Ge.default.div(EGe||(EGe=_Ge(["\n  background-color: ",";\n  color: white;\n  padding: 5px 10px;\n  text-align: center;\n  display: inline-block;\n  border-radius: 20px;\n  cursor: pointer;\n"])),e=>e.theme.colors[e.colour].normal.background);function VGe(e){let{ocrData:n,onEdit:t}=e;return(0,Ze.jsxs)(UGe,{name:"upload-row--".concat(n.id),container:!0,itemAlign:"center",id:n.id,children:[(0,Ze.jsx)(ze.fv,{span:2,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{align:"left",name:"upload-row__date--".concat(n.id),children:(a=n.uploadedAt,Wt()(a).local().format("DD/MM/YYYY"))})}),(0,Ze.jsx)(ze.fv,{span:2,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{align:"left",name:"upload-row__name--".concat(n.id),children:n.fileName})}),(0,Ze.jsx)(ze.fv,{span:3,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{align:"left",name:"upload-user--".concat(n.id),children:"".concat(n.uploadedBy.first_name," ").concat(n.uploadedBy.last_name)})}),(0,Ze.jsx)(ze.fv,{span:2,container:!0,item:!0,children:(0,Ze.jsx)(p.Link,{to:"/documents/all/".concat(n.id),target:"__blank",children:(0,Ze.jsx)(ze.In,{name:"upload-row__link",icon:"external-link-alt"})})}),(0,Ze.jsx)(ze.fv,{span:2.5,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{align:"left",name:"upload-row__subject--".concat(n.id),children:(0,Ze.jsx)(MGe,{colour:"primary",onClick:()=>t(n),children:"Review Upload"})})})]});var a}function zGe(e){let{uploads:n,onEdit:t}=e;return(0,Ze.jsxs)(FGe,{children:[(0,Ze.jsxs)(BGe,{container:!0,align:"between",children:[(0,Ze.jsx)(ze.fv,{span:2,item:!0,container:!0,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"Upload Date"})}),(0,Ze.jsx)(ze.fv,{span:2,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"File Name"})}),(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"User"})}),(0,Ze.jsx)(ze.fv,{span:2,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"Document Link"})}),(0,Ze.jsx)(ze.fv,{span:2.5,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"Review"})})]}),n&&n.map(e=>(0,Ze.jsx)(VGe,{ocrData:e,onEdit:t},e.id))]})}var GGe,$Ge;function WGe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const qGe=Ge.default.div(GGe||(GGe=WGe(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),JGe=Ge.default.div($Ge||($Ge=WGe(["\n  overflow: auto;\n  margin: 32px 48px 0 48px;\n  padding-right: ",";\n"])),e=>e.theme.geometry.sm.spacing),YGe=e=>{let{utility:n}=e;const t=rt(),{showNotification:a}=vt(),[r,i]=(0,g.useState)(null),o=(0,h.IT)(t_e,{variables:{accountId:t,utility:n},pollInterval:5e3}),l=(0,g.useCallback)(e=>{let{getOcrDataForAccount:n}=e;return n.length?(0,Ze.jsx)(JGe,{children:(0,Ze.jsx)(zGe,{uploads:n,onEdit:e=>i(e)})}):(0,Ze.jsx)(nv,{title:"There are currently no OCR results to review."})},[]),s=(0,g.useCallback)(e=>a(e,"success"),[a]),c=(0,g.useCallback)(()=>i(null),[i]),d=zt.startCase(n.toLowerCase()),u="".concat(d," OCR Review"),p="/data/".concat(n.toLowerCase(),"/uploads");return(0,Ze.jsxs)(qGe,{children:[(0,Ze.jsx)(ige,{name:"Ocr_Header",title:u,breadcrumbs:[{title:"Data",to:".."},{title:"".concat(d," Data Uploads"),to:p},{title:u}],icon:"microscope",iconColor:"quaternary",children:(0,Ze.jsxs)(ze.$n,{inline:!0,component:"routerLink",color:"info",to:p,children:["View ",zt.startCase(n.toLowerCase())," Uploads"]})}),(0,Ze.jsx)(pb,{result:o,data:l}),r&&(0,Ze.jsx)(RGe,{onDismiss:c,selectedUpload:r,onComplete:s,utility:n})]})};var HGe,KGe;function QGe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ZGe=(0,D.J1)(HGe||(HGe=QGe(["\n  query GetBuildingEnergyRatingsByAccountId(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getBuildingEnergyRatingsByAccountId(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        location {\n          id\n          name\n          code\n          endDate\n          tags {\n            id\n            tagName\n          }\n          departments {\n            id\n            name\n          }\n          address {\n            country {\n              id\n              name\n            }\n          }\n        }\n        heatingFuelType\n        nominatedDate\n        rating\n        score\n        dataProvider\n        buildingEnvironment\n        gia\n        issueDate\n        certificateValidTo\n        certificateReferenceNumber\n        otherReference\n        resurveyed\n        comments\n        type\n        block\n      }\n    }\n  }\n"]))),XGe=(0,D.J1)(KGe||(KGe=QGe(["\n  query GetBuildingEnergyRatingsFilter($accountId: ID!, $field: String!) {\n    getBuildingEnergyRatingsFilter(accountId: $accountId, field: $field)\n  }\n"])));function e$e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function n$e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?e$e(Object(t),!0).forEach(function(n){t$e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):e$e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function t$e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a$e(){const e=rt(),{showNotification:n}=vt(),[t]=(0,gs._)(XGe),a=(0,g.useCallback)(async a=>{try{var r;const n=(null===(r=a.colDef.refData)||void 0===r?void 0:r.filterBy)||a.colDef.field,{data:i}=await t({variables:{accountId:e,field:n}});null!=i&&i.getBuildingEnergyRatingsFilter&&a.success(i.getBuildingEnergyRatingsFilter)}catch(e){n("Couldn't load filter values for column \"".concat(a.colDef.headerName,'"'),"warning")}},[e,n,t]);return(0,g.useMemo)(()=>({getRowId:ba("id"),columnDefs:[{headerName:"Location",field:"location.name",filterParams:{values:a}},{headerName:"Block",field:"block",filterParams:{values:a}},{headerName:"Location Code",field:"location.code",refData:{filterBy:"locationCode"},filterParams:{values:a}},n$e(n$e({},Zwe),{},{field:"location.endDate"}),{headerName:"Rating",field:"rating",filterParams:{values:a}},{headerName:"Score",field:"score",filter:"agNumberColumnFilter"},{headerName:"Type of heating fuel",field:"heatingFuelType",filterParams:{values:a}},{headerName:"Data Provider",field:"dataProvider",filterParams:{values:a,valueFormatter:la}},{headerName:"Department(s)",field:"location.departments",refData:{filterBy:"location.departments.name"},valueFormatter:e=>{let{value:n}=e;return Array.isArray(n)?n.map(e=>{let{name:n}=e;return n}).join(", "):""},filterParams:{values:a,valueFormatter:la}},{headerName:"Tag(s)",field:"location.tags",refData:{filterBy:"location.tags.tagName"},valueFormatter:e=>{let{value:n}=e;return Array.isArray(n)?n.filter(Boolean).map(e=>{let{tagName:n}=e;return n}).join(", "):""},filterParams:{values:a,valueFormatter:la}},{headerName:"Country",field:"location.address.country.name",filterParams:{values:a}},{headerName:"Region",field:"location.region.name",filterParams:{values:a}},{headerName:"Nominated date",field:"nominatedDate",filter:"agDateColumnFilter",valueFormatter:ca},{headerName:"Issue date",field:"issueDate",filter:"agDateColumnFilter",valueFormatter:ca},{headerName:"Valid to",field:"certificateValidTo",filter:"agDateColumnFilter",valueFormatter:ca},{headerName:"Certificate Reference number",field:"certificateReferenceNumber",filter:"agTextColumnFilter"},{headerName:"Building environment",field:"buildingEnvironment",filter:"agTextColumnFilter"},{headerName:"GIA",field:"gia",filter:"agNumberColumnFilter"},{headerName:"Resurveyed",field:"resurveyed",filter:!1,valueFormatter:sa},{headerName:"Other Reference",field:"otherReference",filter:"agTextColumnFilter"},{headerName:"Comments",field:"comments",filter:"agTextColumnFilter"},{headerName:"Type",field:"type",filterParams:{values:a}}]}),[a])}function r$e(){return Jm(ZGe)}const i$e=[{title:"Data",to:".."},{title:"Building Energy Ratings"}],o$e=()=>{const e=a$e(),[n]=r$e(),t=(0,g.useCallback)(async e=>{const{data:t}=await n({variables:e});if(t){const{getBuildingEnergyRatingsByAccountId:{totalRows:e,rows:n}}=t;return{rows:n,totalRows:e}}throw new Error("Couldn't fetch building energy ratings")},[n]);return(0,Ze.jsx)(Awe,{title:"Building Energy Ratings",defaultExportFileName:"building-energy-ratings",breadcrumbs:i$e,config:e,fetchRows:t})};var l$e;const s$e=(0,D.J1)(l$e||(l$e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetHotelStaysTransactionsPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getHotelStaysTransactionsPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      rows {\n        id\n        startDate\n        endDate\n        hotelNights\n        homeWorkingDays\n        totalCost\n        currency\n        notes\n        reference\n        invoiceNumber\n        evidenceReference\n        otherReference\n        carbonScope3\n        uploadReference\n        importBatchId\n        importBatchFileName\n        country\n        tariff\n        dataProvider\n        accuracy\n        tags\n        departments\n        location {\n          ...LocationFields\n        }\n        locationSharedEmissionPercentage\n        locationCustomAttributes\n        reportingYearOfHSFactors\n        reportingYearOfWFHFactors\n        purchaseType\n        organisationalUnits\n        estimatesScenario\n      }\n      totalRows\n    }\n  }\n  ","\n"])),nm);var c$e;const d$e=(0,D.J1)(c$e||(c$e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetHotelStaysTransactionsPageFilter($accountId: ID!, $field: String!) {\n    getHotelStaysTransactionsPageFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));function u$e(){var e;const n=(0,N.m)(),t=rt(),{showNotification:a}=vt(),r=Pu(),i=null==r||null===(e=r.accessControls)||void 0===e?void 0:e.customFields,o=(0,g.useCallback)(async e=>{try{const{data:{getHotelStaysTransactionsPageFilter:a}}=await n.query({query:d$e,variables:{accountId:t,energyType:Vt.D_.Hotelstays,field:e.colDef.colId||e.colDef.field}});e.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){a("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning")}},[t,n,a]),l=(0,g.useCallback)(e=>{let{value:n}=e;return Ht(n)},[]);return(0,g.useMemo)(()=>({getRowId:ba("id"),columnDefs:[{headerName:"Start Date",field:"startDate",valueFormatter:l,cellStyle:{textAlign:"center"},filter:"agDateColumnFilter",initialSort:"desc"},{headerName:"End Date",field:"endDate",valueFormatter:l,cellStyle:{textAlign:"center"},filter:"agDateColumnFilter"},{headerName:"Location",colId:"locationName",field:"location.name",filterParams:{values:o,valueFormatter:la}},...Do(Vt.D_.Hotelstays,null==r?void 0:r.accessControls),{headerName:"Hotel Nights",field:"hotelNights",filter:"agNumberColumnFilter"},{headerName:"Home Working Days",field:"homeWorkingDays",filter:"agNumberColumnFilter"},{headerName:"Hotel stay / Home working country",field:"country",filterParams:{values:o,valueFormatter:la}},{headerName:"Electricity Tariff",field:"tariff",filterParams:{values:o,valueFormatter:la}},{headerName:"Data Provider",field:"dataProvider",filterParams:{values:o,valueFormatter:la}},{headerName:"Total Cost",field:"totalCost",filter:"agNumberColumnFilter"},{headerName:"Currency Code",field:"currency",filterParams:{values:o,valueFormatter:la}},{headerName:"Act/Est",field:"accuracy",filterParams:{values:o,valueFormatter:la}},Bo,{headerName:"Notes",field:"notes",filter:"agTextColumnFilter"},{headerName:"Reference",field:"reference",filterParams:{values:o,valueFormatter:la}},{headerName:"Invoice Number",field:"invoiceNumber",filterParams:{values:o,valueFormatter:la}},{headerName:"Evidence Reference",field:"evidenceReference",filterParams:{values:o,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filterParams:{values:o,valueFormatter:la}},{headerName:"Region",field:"location.region.name",colId:"region",filter:"agSetColumnFilter",filterParams:{values:o,valueFormatter:la}},{headerName:"Carbon Emission Scope 3 (kgCO2e)",field:"carbonScope3",filter:"agNumberColumnFilter",headerTooltip:"These are the indirect emissions associated with the uploaded activity data"},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:o,valueFormatter:la}},{headerName:"Tags",field:"tags",filterParams:{values:o,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:o,valueFormatter:la}},{headerName:"Hotel Nights Factors used",field:"reportingYearOfHSFactors",cellRenderer:"link",cellRendererParams:{to:"/configuration/carbonconversionfactors/location/hotel-stays",type:"HOTEL"},filterParams:{values:o,valueFormatter:la},headerTooltip:"The factor set applied to this transaction, click the link to see the factors for this year in more detail"},{headerName:"Work From Home Factors used",field:"reportingYearOfWFHFactors",cellRenderer:"link",cellRendererParams:{to:"/configuration/carbonconversionfactors/location/hotel-stays",type:"WORK_FROM_HOME"},filterParams:{values:o,valueFormatter:la},headerTooltip:"The factor set applied to this transaction, click the link to see the factors for this year in more detail"},...Ho(wo(Vt.D_.Hotelstays,i))],reactiveCustomComponents:!0}),[l,o,i])}function p$e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function m$e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p$e(Object(t),!0).forEach(function(n){f$e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p$e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function f$e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const y$e="Hotel stays and Home working",g$e=[{title:"Data",to:".."},{title:y$e}];function b$e(){const e=(0,N.m)(),n=u$e(),t=(0,g.useMemo)(()=>m$e(m$e({},n),{},{components:{tariffReference:nDe,uploadReference:aDe,link:eDe}}),[n]),a=(0,g.useCallback)(async n=>{const{data:{getHotelStaysTransactionsPage:{totalRows:t,rows:a}}}=await e.query({query:s$e,variables:n,fetchPolicy:"network-only"});return{rows:a,totalRows:t}},[e]);return(0,Ze.jsx)(Awe,{title:y$e,breadcrumbs:g$e,config:t,fetchRows:a,uploadLink:"../hotelStays/uploads",defaultExportFileName:"Hotel Stays & Home Work Exports"})}const h$e=function(){return(0,Ze.jsx)(VMe,{dataSection:Vt.D_.Hotelstays,template:[{columns:WRe,name:"Simple",fileName:"Hotelstays-template",type:xR.Dynamic},{name:"Advanced",fileName:"advanced-hotel-stays-template",url:S_e,type:xR.Static}]})};var v$e=t(85533),x$e=t(99217),T$e=t(93688),O$e=t(54391),k$e=t(99405),j$e=t(63568),C$e=t(6446),S$e=t(94446),N$e=t(18321),w$e=t(63595),D$e=t(29280),A$e=t(40868),R$e=t(38607),P$e=t(88527),L$e=t(8292),I$e=t(7775),E$e=t(93085),_$e=t(67510),F$e=t(85804),B$e=t(99495),U$e=t(23370);const M$e=e=>{switch(e){case"overview":return(0,Ze.jsx)(v$e.A,{});case"waste":return(0,Ze.jsx)(x$e.A,{});case"electricity":return(0,Ze.jsx)(T$e.A,{});case"gas":return(0,Ze.jsx)(O$e.A,{});case"water":return(0,Ze.jsx)(k$e.A,{});case"transport":return(0,Ze.jsx)(j$e.A,{});case"fuel":return(0,Ze.jsx)(C$e.A,{});case"buildingEnergyRatings":return(0,Ze.jsx)(S$e.A,{});case"refrigerants":return(0,Ze.jsx)(N$e.A,{});case"heatSteam":return(0,Ze.jsx)(w$e.A,{});case"materials":return(0,Ze.jsx)(D$e.A,{});case"hotelStays":return(0,Ze.jsx)(A$e.A,{});case"safety":return(0,Ze.jsx)(R$e.A,{});case"employees":return(0,Ze.jsx)(P$e.A,{});case"community":return(0,Ze.jsx)(L$e.A,{});case"business":return(0,Ze.jsx)(I$e.A,{});case"biodiversity":return(0,Ze.jsx)(E$e.A,{});case"oilProduction":return(0,Ze.jsx)(_$e.A,{});case"salesData":return(0,Ze.jsx)(F$e.A,{});case"liquidFuels":return(0,Ze.jsx)(B$e.A,{});case"emissionsDatabase":return(0,Ze.jsx)(U$e.A,{})}};var V$e,z$e,G$e,$$e,W$e,q$e,J$e,Y$e,H$e,K$e,Q$e,Z$e,X$e,eWe,nWe,tWe,aWe,rWe,iWe,oWe,lWe,sWe,cWe,dWe,uWe,pWe,mWe;function fWe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yWe=Ge.default.div(V$e||(V$e=fWe(["\n  padding: 32px 24px;\n  margin-bottom: ",";\n  height: fit-content;\n  width: 100%;\n  background-color: ",";\n  font-family: 'Akkurat', Helvetica, Arial, sans-serif;\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.primary.normal.text),gWe=Ge.default.div(z$e||(z$e=fWe(["\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  margin-bottom: 20px;\n"]))),bWe=Ge.default.div(G$e||(G$e=fWe(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  color: ",";\n  font-size: ",";\n  font-weight: ",";\n  &:hover {\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.regularText.text,e=>e.theme.fonts.sm.size,e=>e.theme.fonts.weight.bold),hWe=Ge.default.div($$e||($$e=fWe(["\n  margin-right: 10px;\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  width: 224px;\n"]))),vWe=Ge.default.div(W$e||(W$e=fWe(["\n  display: block;\n  border-bottom: 1px solid #dedede;\n  margin-right: 22px;\n\n  &.Mui-selected {\n    color: #000 !important;\n  }\n\n  button {\n    font-size: ",";\n    padding: 0;\n    text-align: center;\n    max-width: 112px;\n    width: 100%;\n    color: #46464f;\n    text-transform: none;\n  }\n"])),e=>e.theme.fonts.sm.size),xWe=(Ge.default.div(q$e||(q$e=fWe(["\n  display: flex;\n\n  .Mui-selected {\n    color: #2e3eff !important;\n  }\n\n  .MuiTabs-indicator {\n    background-color: #2e3eff !important;\n  }\n\n  button {\n    font-size: ",";\n    padding: 0;\n    margin-right: 16px;\n    text-align: center;\n    max-width: 89px;\n    width: 100%;\n    color: #46464f;\n    text-transform: none;\n  }\n"])),e=>e.theme.fonts.sm.size),(0,Ge.default)(ze.oz)(J$e||(J$e=fWe(["\n  &.Mui-selected {\n    color: #1b1b1f !important;\n  }\n"])))),TWe=Ge.default.div(Y$e||(Y$e=fWe(["\n  display: flex;\n  align-items: center;\n  width: 100%;\n"]))),OWe=Ge.default.div(H$e||(H$e=fWe(["\n  font-size: ",";\n  text-transform: uppercase;\n  vertical-align: middle;\n"])),e=>e.theme.fonts.xs.size),kWe=Ge.default.div(K$e||(K$e=fWe(["\n  font-size: ",";\n"])),e=>e.theme.fonts.sm.size),jWe=Ge.default.div(Q$e||(Q$e=fWe(["\n  font-size: ",";\n"])),e=>e.theme.fonts.xxl.size),CWe=Ge.default.div(Z$e||(Z$e=fWe(["\n  margin-bottom: 15px;\n\n  .MuiAccordionSummary-expandIconWrapper {\n    color: ",";\n  }\n"])),e=>e.theme.colors.regularText.text),SWe=Ge.default.div(X$e||(X$e=fWe(["\n  font-size: ",";\n\n  &:before {\n    content: '';\n    display: inline-block;\n    width: 15px;\n    height: 15px;\n    border-radius: 7.5px;\n    background-color: ",";\n    margin-right: 10px;\n    position: relative;\n    top: 3px;\n  }\n"])),e=>e.theme.fonts.sm.size,e=>e.theme.colors.danger.normal.background),NWe=Ge.default.div(eWe||(eWe=fWe(["\n  font-size: ",";\n\n  &:before {\n    content: '';\n    display: inline-block;\n    width: 15px;\n    height: 15px;\n    border-radius: 7.5px;\n    background-color: ",";\n    margin-right: 10px;\n    position: relative;\n    top: 3px;\n  }\n"])),e=>e.theme.fonts.sm.size,e=>e.theme.colors.warning.light.background),wWe=Ge.default.div(nWe||(nWe=fWe(["\n  max-width: 450px;\n  flex-shrink: 0;\n"]))),DWe=Ge.default.div(tWe||(tWe=fWe(["\n  max-width: 450px;\n  background-color: ",";\n  box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);\n  height: fit-content;\n  margin-bottom: 20px;\n  align-items: flex-start;\n  display: flex;\n  flex-direction: column;\n"])),e=>e.theme.colors.primary.normal.text),AWe=Ge.default.div(aWe||(aWe=fWe(["\n  width: 100%;\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-start;\n  align-items: center;\n  padding: 0.5em 1em;\n  font-size: ",";\n  &:first-child {\n    background-color: ",";\n    color: ",";\n  }\n  &:hover {\n    background-color: ",";\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.fonts.sm.size,e=>e.theme.colors.redesignPrimary.background,e=>e.theme.colors.regularText.text,e=>e.theme.colors.redesignPrimary.background,e=>e.theme.colors.regularText.text),RWe=(0,Ge.default)(p.Link)(rWe||(rWe=fWe(["\n  display: block;\n  text-decoration: none;\n  margin-left: 10px;\n  flex-shrink: 3;\n"]))),PWe=Ge.default.div(iWe||(iWe=fWe(["\n  display: flex;\n  margin-right: 10px;\n  align-items: center;\n  justify-content: flex-start;\n  svg {\n    font-size: 20px;\n  }\n"]))),LWe=Ge.default.div(oWe||(oWe=fWe(["\n  width: 40px;\n  height: 40px;\n  color: ",";\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-direction: column;\n  ","\n  svg {\n    font-size: 20px;\n  }\n"])),e=>e.theme.colors.regularText.text,e=>e.isDisabledAccess&&"\n    &:before {\n      color: ".concat(e.theme.colors.basic.black,";\n      background-color: ").concat(e.theme.colors.redesignTertiary.background,";\n      content: 'Upgrade';\n      font-weight: bold;\n      text-align: center;\n      font-size: 10px;\n      padding: 0 3px;\n      border-radius: 8px;\n      margin-top: -1em;\n    }\n  ")),IWe=Ge.default.div(lWe||(lWe=fWe(["\n  color: ",";\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  &:hover {\n    cursor: pointer;\n  }\n  svg {\n    font-size: 14px;\n  }\n"])),e=>e.theme.colors.regularText.text),EWe=(0,Ge.default)(kWe)(sWe||(sWe=fWe(["\n  font-weight: ",";\n"])),e=>e.theme.fonts.weight.bold),_We=Ge.default.div(cWe||(cWe=fWe(["\n  width: 77px;\n  height: 74px;\n  border-radius: 8px;\n  border: 1px solid #F3F0F4\n  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1), 0px 8px 12px 6px rgba(0, 0, 0, 0.05);\n  box-shadow: 0 1px 3px rgb(0 0 0 /0.1);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  svg {\n    font-size: 48px;\n    color: ",";\n  }\n"])),e=>e.theme.colors.regularText.text),FWe=Ge.default.div(dWe||(dWe=fWe(["\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  align-items: flex-start;\n  margin-top: 25px;\n  gap: 16px;\n"]))),BWe=Ge.default.div(uWe||(uWe=fWe(["\n  gap: 6px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n  &:hover {\n    cursor: pointer;\n  }\n"]))),UWe=(0,Ge.default)(OWe)(pWe||(pWe=fWe(["\n  width: 80px;\n  text-align: center;\n  font-size: 12px;\n  font-weight: 400;\n  line-height: 16px;\n  text-transform: none;\n  color: #000;\n"]))),MWe=(Ge.default.span(mWe||(mWe=fWe(["\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n"]))),e=>{let{iconName:n,label:t,to:a,isDisabledAccess:r,show:i}=e;const o=M$e(n),l=(0,m.Zp)();return(0,Ze.jsxs)(AWe,{onClick:()=>l(a),children:[(0,Ze.jsx)(LWe,{isDisabledAccess:r,children:o}),!i&&(0,Ze.jsx)(RWe,{to:a,children:(0,Ze.jsx)(Je.A,{id:t})})]})}),VWe=e=>{let{show:n,onClick:t}=e;return(0,Ze.jsxs)(IWe,{onClick:t,children:[(0,Ze.jsx)(PWe,{children:(0,Ze.jsx)(ze.In,{size:"0.5x",icon:n?"chevron-right":"chevron-left"})}),(0,Ze.jsx)(EWe,{children:n?"Show":"Hide"})]})},zWe=e=>{let{activeAccessControls:n,inactiveAccessControls:t}=e;const[a,r]=(0,g.useState)(!1);return(0,Ze.jsxs)(wWe,{children:[(0,Ze.jsxs)(DWe,{children:[(0,Ze.jsx)(MWe,{iconName:"overview",label:"pages.data.subjects.overview",to:"data",isDisabledAccess:!1,show:a}),n.map((e,n)=>(0,Ze.jsx)(MWe,{iconName:e,label:"pages.data.subjects.".concat(e),to:"./".concat(e,"/view"),isDisabledAccess:!1,show:a},"".concat(e," - ").concat(n))),t.map((e,n)=>(0,Ze.jsx)(MWe,{iconName:e,label:"pages.data.subjects.".concat(e),to:"contact",isDisabledAccess:!0,show:a},"".concat(e," - ").concat(n)))]}),(0,Ze.jsx)(VWe,{show:a,onClick:()=>r(!a)})]})};var GWe,$We,WWe,qWe,JWe,YWe,HWe=t(11475),KWe=t(86822);function QWe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ZWe=(0,D.J1)(GWe||(GWe=QWe(["\n  fragment DataAnomalyFields on DataAnomaly {\n    id\n    type\n    reason\n    ignored\n    uploadedIn {\n      id\n      fileName\n    }\n    user {\n      id\n      first_name\n      last_name\n    }\n    detectedAt\n    varianceTimeseries {\n      error\n      data {\n        dimension\n        value\n        time\n      }\n    }\n    varianceReason\n    notes\n    locationName\n    meterName\n    percentDiff\n    startDate\n    endDate\n    __typename\n  }\n"]))),XWe=(0,D.J1)($We||($We=QWe(["\n  query GetDataAnomaliesByAccountId(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getDataAnomaliesByAccountId(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        ...DataAnomalyFields\n      }\n    }\n  }\n  ","\n"])),ZWe),eqe=(0,D.J1)(WWe||(WWe=QWe(["\n  mutation IgnoreDataAnomalies($anomalyIds: [ID!]!, $varianceReason: VarianceReason, $notes: String) {\n    ignoreDataAnomalies(anomalyIds: $anomalyIds, varianceReason: $varianceReason, notes: $notes) {\n      totalRows\n      rows {\n        ...DataAnomalyFields\n      }\n    }\n  }\n  ","\n"])),ZWe),nqe=(0,D.J1)(qWe||(qWe=QWe(["\n  mutation IgnoreFilteredDataAnomalies($varianceReason: VarianceReason, $notes: String, $accountId: ID!, $filters: Filters!) {\n    ignoreFilteredDataAnomalies(varianceReason: $varianceReason, notes: $notes, accountId: $accountId, filters: $filters) {\n      totalRows\n      rows {\n        ...DataAnomalyFields\n      }\n    }\n  }\n  ","\n"])),ZWe),tqe=((0,D.J1)(JWe||(JWe=QWe(["\n  query GetDataAnomaliesByAccountIdCount($accountId: ID!) {\n    getDataAnomaliesByAccountId(accountId: $accountId) {\n      totalRows\n    }\n  }\n"]))),(0,D.J1)(YWe||(YWe=QWe(["\n  query GetDataAnomaliesFilter($accountId: ID!, $field: String!, $filters: Filters) {\n    getDataAnomaliesFilter(accountId: $accountId, field: $field, filters: $filters)\n  }\n"]))));function aqe(){return(0,gs._)(XWe)}function rqe(){const{showNotification:e}=vt();return(0,Ot.n)(eqe,{refetchQueries:["GetDataAnomaliesByAccountId","GetDataAnomaliesByAccountIdCount"],onCompleted:()=>{e("Those anomalies have been accepted, they will now appear under accepted variances","success")},onError:n=>{e("Anomalies haven't been accepted due to this error: ".concat(n),"danger")}})}function iqe(){return(0,gs._)(tqe,{fetchPolicy:"network-only"})}var oqe=t(86425),lqe=t(3835),sqe=t(77275),cqe=t(98528),dqe=t(60419);const uqe=e=>{let{title:n="Confrimation required",body:t="",agreeButtonCaption:a="Agree",disagreeButtonCaption:r="Disagree",onAgree:i,onDisagree:o,onClose:l}=e;const[s,c]=g.useState(!0),d=()=>{c(!1),l&&l(),o&&o()};return(0,Ze.jsxs)(oqe.A,{open:s,onClose:d,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,Ze.jsx)(lqe.A,{id:"alert-dialog-title",children:n}),(0,Ze.jsx)(sqe.A,{children:(0,Ze.jsx)(cqe.A,{id:"alert-dialog-description",children:t})}),(0,Ze.jsxs)(dqe.A,{children:[(0,Ze.jsx)(KWe.A,{onClick:d,children:r}),(0,Ze.jsx)(KWe.A,{onClick:()=>{c(!1),l&&l(),i&&i()},autoFocus:!0,children:a})]})]})};function pqe(e,n,t){if(e){const a=e.paginationGetCurrentPage()*n,r=a+n-1,i=[];for(let n=a;n<=r;n++){const t=e.getDisplayedRowAtIndex(n);t&&i.push(t)}i.forEach(e=>{t?e.setSelected(!1):e.isSelected()||e.setSelected(!0)})}}function mqe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function fqe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mqe(Object(t),!0).forEach(function(n){yqe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mqe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function yqe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const gqe=e=>{var n,t,a;let{data:r}=e;return r.startDate||(null===(n=r.transaction)||void 0===n?void 0:n.startDate)||(null===(t=r.transaction)||void 0===t?void 0:t.individualCollectionDate)||(null===(a=r.transaction)||void 0===a?void 0:a.date)},bqe=e=>{var n,t,a;let{data:r}=e;return r.endDate||(null===(n=r.transaction)||void 0===n?void 0:n.endDate)||(null===(t=r.transaction)||void 0===t?void 0:t.individualCollectionDate)||(null===(a=r.transaction)||void 0===a?void 0:a.date)},hqe=e=>{let{data:n}=e;return"".concat(n.user.first_name," ").concat(n.user.last_name)},vqe=e=>{let{data:n}=e;return"".concat(n.locationName?n.locationName:"")},xqe=e=>{let{data:n}=e;return"".concat(n.meterName?n.meterName:"")},Tqe=e=>{let{data:n}=e;return n.uploadedIn.fileName};var Oqe,kqe,jqe;function Cqe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Sqe=Ge.default.div(Oqe||(Oqe=Cqe(["\n  & .grid-body {\n    display: flex;\n    flex-direction: column;\n    min-height: 300px;\n  }\n  & .ag-root-wrapper {\n    flex: 1;\n  }\n  .ag-root-wrapper-body {\n    flex: 1;\n  }\n"]))),Nqe=Ge.default.div(kqe||(kqe=Cqe(["\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),wqe=Ge.default.div(jqe||(jqe=Cqe(["\n  margin-right: 10px;\n"]))),Dqe={resizable:!0};function Aqe(e){let{accountId:n,onError:t,showPlaceholder:a}=e;const r=(0,eg.A)(),[i]=aqe(),o=(0,g.useRef)(),[l,s]=(0,g.useState)(!1),[c,d]=(0,g.useState)(!1),u=rc(),p=(0,g.useCallback)(()=>s(e=>!e),[]),[m]=rqe(),f=(0,g.useCallback)(e=>{o.current=e.api,e.api.setFilterModel({ignored:{values:["0"],filterType:"set"}})},[]),y=(0,g.useMemo)(()=>({getRows:async e=>{let{request:r,success:o,fail:l}=e;const s=oa(r.sortModel),c=ia(r.filterModel);try{const{data:e,error:t}=await i({variables:{accountId:n,sort:s,filters:c,limit:10,offset:r.startRow||0}});if(!e)throw new Error("Error in get getDataAnomalies");if(t)throw t;if(!e.getDataAnomaliesByAccountId.rows.length&&!Object.keys(r.filterModel).length)return a();o({rowData:e.getDataAnomaliesByAccountId.rows,rowCount:e.getDataAnomaliesByAccountId.totalRows})}catch(e){t(e),l()}}}),[i,n,t,a]),b=(0,g.useCallback)(()=>{if(!o.current)throw new Error("Anomalies are not ready");const e=o.current.getSelectedRows();m({variables:{anomalyIds:e.map(e=>e.id)},onCompleted:()=>{var e;null===(e=o.current)||void 0===e||e.refreshServerSide()}})},[m]),h=(()=>{const e=rt(),{showNotification:n}=vt(),t=(0,eg.A)(),[a]=iqe(),r=(0,g.useCallback)(e=>t.formatMessage({id:"pages.dataAnomalies.transactionTypes.".concat(e)}),[t]),i=(0,g.useCallback)(e=>{let{data:n}=e;return r(n.__typename)},[r]),o=(0,g.useCallback)(async t=>{try{var i;const{field:n}=t.colDef;if(!n)throw new Error("Unfilterable column");const o=t.api.getFilterModel(),l=(null===(i=(await a({variables:{accountId:e,field:n,filters:ia(o)}})).data)||void 0===i?void 0:i.getDataAnomaliesFilter)||[];t.success(l.map(e=>"transactionType"===n?r(e):e))}catch(e){if(e instanceof Error&&"Virtual list has not been created."===e.message)return;n("Couldn't load filter values for column ".concat(t.colDef.field,": ").concat(e),"danger")}},[a,e,n,r]),l=(0,g.useMemo)(()=>({values:o,cache:!1}),[o]),s=(0,g.useMemo)(()=>fqe(fqe({},l),{},{valueFormatter:pa}),[l]);return(0,g.useMemo)(()=>[{headerName:"Utility",valueGetter:i,field:"transactionType",filterParams:l,filter:"agSetColumnFilter",checkboxSelection:!0,sortable:!0},{headerName:"Start date",valueGetter:gqe,valueFormatter:ca,filter:!1,sortable:!1},{headerName:"End date",valueGetter:bqe,valueFormatter:ca,filter:!1,sortable:!1},{headerName:"Detected time",field:"detectedAt",valueFormatter:ua,initialSort:"desc",filter:"agDateColumnFilter",sortable:!0},{headerName:"Location",field:"locationName",valueGetter:vqe,filter:"agSetColumnFilter",filterParams:l,sortable:!0},{headerName:"Meter",field:"meterName",valueGetter:xqe,filter:"agSetColumnFilter",filterParams:l,sortable:!0},{headerName:"Reason",field:"reason",minWidth:400,filter:"agTextColumnFilter",sortable:!0},{headerName:"Notes",field:"notes",minWidth:400,filter:"agTextColumnFilter",cellEditor:"agTextCellEditor",sortable:!0,editable:!0},{headerName:"Uploader",field:"user",valueGetter:hqe,filterParams:l,filter:"agSetColumnFilter",sortable:!0},{headerName:"Filename",field:"uploadedIn",valueGetter:Tqe,filterParams:l,filter:"agSetColumnFilter",sortable:!0},{headerName:"Accepted",field:"ignored",valueFormatter:sa,filterParams:s,filter:"agSetColumnFilter",sortable:!0,hide:!0},{headerName:"% Variance",field:"percentDiff",filterParams:l,filter:"agNumberColumnFilter",sortable:!0}],[l,i,s])})();return(0,Ze.jsxs)(Sqe,{className:"ag-theme-alpine",children:[u.dataTrackerAnomalies.find(e=>e.startsWith("ignoreDataAnomalies"))&&(0,Ze.jsxs)(Nqe,{children:[(0,Ze.jsx)(wqe,{children:(0,Ze.jsx)(KWe.A,{variant:"outlined",onClick:()=>pqe(o.current,10),disabled:!o.current,title:r.formatMessage({id:"pages.data.overview.selectAll"}),children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.selectAllButtonText"})})}),c&&(0,Ze.jsx)(wqe,{children:(0,Ze.jsx)(KWe.A,{variant:"outlined",onClick:()=>pqe(o.current,10,!0),disabled:!o.current,title:r.formatMessage({id:"pages.data.overview.deselectAll"}),children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.deselectAllButtonText"})})}),(0,Ze.jsx)(wqe,{children:(0,Ze.jsx)(KWe.A,{variant:"outlined",onClick:p,title:r.formatMessage({id:"pages.data.overview.acceptInfo"}),children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.accept"})})})]}),(0,Ze.jsx)(Vw.W6,{suppressRowClickSelection:!0,pagination:!0,paginationPageSize:10,cacheBlockSize:10,rowModelType:"serverSide",serverSideDatasource:y,className:"grid-body",rowSelection:"multiple",onGridReady:f,defaultColDef:Dqe,getRowId:ba("id"),noRowsOverlayComponent:Pqe,columnDefs:h,onSelectionChanged:()=>{if(!o.current)throw new Error("Anomalies are not ready");const e=o.current.getSelectedRows();d(!(null==e||!e.length))}}),l&&(0,Ze.jsx)(uqe,{title:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.confirmationDialog.title"}),agreeButtonCaption:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.confirmationDialog.agree"}),disagreeButtonCaption:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.confirmationDialog.disagree"}),onAgree:b,onClose:p})]})}const{Vr:Rqe}=r,Pqe=()=>(0,Ze.jsx)(Gh,{title:"Nothing to display...",description:"If any validation or anomalies are found they will be displayed here.",icon:["rio","clipboard-check-custom"]}),Lqe=()=>{const e=rt(),[n,t]=(0,g.useState)(null),[a,r]=(0,g.useState)(!1),i=(0,g.useCallback)(()=>r(!0),[]),o=(0,g.useCallback)(e=>{t(e)},[]);return n?(0,Ze.jsx)(Rqe,{error:n}):a?(0,Ze.jsx)(Pqe,{}):(0,Ze.jsx)(Aqe,{accountId:e,onError:o,showPlaceholder:i})},Iqe=()=>(0,Ze.jsx)(CWe,{children:(0,Ze.jsxs)(TL.A,{children:[(0,Ze.jsx)(OL.A,{expandIcon:(0,Ze.jsx)(ze.In,{icon:"chevron-down"}),"aria-controls":"panel1a-content",children:(0,Ze.jsx)(NWe,{children:"Anomalies found in your data"})}),(0,Ze.jsx)(kL.A,{children:(0,Ze.jsx)(Lqe,{})})]})});var Eqe,_qe=t(46484);const Fqe=(0,D.J1)(Eqe||(Eqe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetDataTrackerValidationFilters($accountId: ID!, $field: String!) {\n    getDataTrackerValidationFilters(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));function Bqe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Uqe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Bqe(Object(t),!0).forEach(function(n){Mqe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Bqe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Mqe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Vqe(e){let{setGridApi:n,fetchRows:t,onCellEditingStopped:a,onCellEditingStarted:r,showPlaceholder:i,onSelectionChanged:o,onFilterChanged:l}=e;const s=rt(),c=(0,N.m)(),{showNotification:d}=vt(),u=async e=>{try{const{data:{getDataTrackerValidationFilters:n}}=await c.query({query:Fqe,variables:{accountId:s,field:e.colDef.colId||e.colDef.field}});e.success(n.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){d("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning"),de.Cp(n)}},p=Dd({autoFit:!0}),m={pagination:!0,paginationPageSizeSelector:!1,paginationPageSize:25,rowSelection:"multiple",rowModelType:"serverSide",enableCellChangeFlash:!0,tooltipShowDelay:500,defaultColDef:{resizable:!0,sortable:!0,filter:!0,cellStyle:{paddingTop:"5px",paddingBottom:"5px",height:"auto",wordBreak:"break-word",lineHeight:"20px"},autoHeight:!0},columnDefs:[{headerName:"Utility",headerTooltip:"Resource for which data is expected",checkboxSelection:!0,filterParams:{values:u,valueFormatter:la},field:"utility",minWidth:150},{headerName:"Supplier",headerTooltip:"Upload supplier",filter:"agTextColumnFilter",filterParams:Uqe({},{buttons:["reset","apply"],closeOnApply:!0}),field:"supplierName",minWidth:200},{headerName:"Start Date",headerTooltip:"Start date of the expected time frame",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},field:"startDate",minWidth:200},{headerName:"End Date",headerTooltip:"End date of the expected time frame",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},field:"endDate",minWidth:200},{headerName:"Location",filterParams:{values:u,valueFormatter:la},field:"locations",minWidth:200},{headerName:"Meter",filterParams:{values:u,valueFormatter:la},field:"meters",minWidth:200},{headerName:"Reason",headerTooltip:"Notification reason",filter:"agTextColumnFilter",filterParams:Uqe({},{buttons:["reset","apply"],closeOnApply:!0}),field:"reason",minWidth:300},{headerName:"Notes",headerTooltip:"Notification notes can be left here",filter:"agTextColumnFilter",filterParams:Uqe({},{buttons:["reset","apply"],closeOnApply:!0}),field:"note",editable:!0,cellEditor:"agTextCellEditor",valueGetter:e=>{let{data:{note:n}}=e;return n},valueSetter:e=>e.newValue!==e.oldValue,minWidth:200},{headerName:"Uploader",headerTooltip:"Username",valueGetter:()=>"-",field:"emptyField",sortable:!1,filter:!1,minWidth:200},{headerName:"Filename",headerTooltip:"Filename",valueGetter:()=>"-",field:"emptyField2",sortable:!1,filter:!1,minWidth:200}],rowStyle:{width:"100%",display:"flex",alignItems:"center"},rowHeight:58};return(0,Ze.jsx)(nD,Uqe(Uqe({},m),{},{suppressRowClickSelection:!0,cacheBlockSize:m.paginationPageSize,onFirstDataRendered:p.onFirstDataRendered,onFilterChanged:e=>{p.onFilterChanged(e),null==l||l()},onSortChanged:p.onSortChanged,onColumnVisible:p.onSaveGridColumnState,onColumnPinned:p.onSaveGridColumnState,onColumnResized:p.onSaveGridColumnState,onColumnMoved:p.onSaveGridColumnState,onColumnRowGroupChanged:p.onSaveGridColumnState,onColumnValueChanged:p.onSaveGridColumnState,onColumnPivotChanged:p.onSaveGridColumnState,onCellEditingStopped:a,onCellEditingStarted:r,onSelectionChanged:o,onGridReady:e=>{p.onGridReady(e),n({api:e.api}),e.api.setGridOption("serverSideDatasource",{async getRows(e){try{const{startRow:n,sortModel:a,filterModel:r}=e.request,o=ia(r),{rows:l,totalRows:s}=await t({offset:n||0,limit:m.paginationPageSize,sort:oa(a),filters:o});if(e.success({rowData:l,rowCount:s}),0===s&&(0,zt.isEmpty)(o))return i()}catch(n){e.fail(),de.Cp(n)}}})}}))}var zqe,Gqe,$qe;function Wqe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function qqe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Wqe(Object(t),!0).forEach(function(n){Jqe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Wqe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Jqe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Yqe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Hqe=Ge.default.div(zqe||(zqe=Yqe(["\n  display: flex;\n  height: 450px;\n  border-radius: 5px;\n\n  .ag-theme-alpine {\n    .utility-header-class {\n      .ag-header-cell-label {\n        padding-left: 10px;\n      }\n    }\n    .ag-paging-panel {\n      justify-content: flex-end;\n    }\n  }\n"]))),Kqe=Ge.default.div(Gqe||(Gqe=Yqe(["\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Qqe=Ge.default.div($qe||($qe=Yqe(["\n  margin-right: 10px;\n"]))),Zqe=(0,Ye.Ay)(e=>{let{intl:n}=e;const t=rt(),a=(0,N.m)(),{showNotification:r}=vt(),[i,o]=(0,g.useState)(),[l,s]=(0,g.useState)(!1),[c,d]=(0,g.useState)(!1),[u,p]=(0,g.useState)(!1),[m,f]=(0,g.useState)(!1),[y,b]=(0,g.useState)(null),h=(0,g.useCallback)(()=>f(!0),[]),v=rc(),x=(0,g.useCallback)(()=>{var e;return null==i||null===(e=i.api)||void 0===e?void 0:e.refreshServerSide({purge:!0})},[i]),[T]=(0,Ot.n)(Bt),O=(0,g.useCallback)(e=>{b(e.node)},[b]),k=g.useCallback(async e=>{if(null===y)return;const n=e.newValue||null;if(n!==e.oldValue)try{y.updateData(qqe(qqe({},y.data),{},{note:e.newValue})),await T({variables:{input:[{id:e.data.id,accountId:t,note:n}]}}),y.setSelected(!1),r("The data tracker result note has been successfully updated!")}catch(n){y.updateData(qqe(qqe({},y.data),{},{note:e.oldValue})),r("Something went wrong. The data tracker result note wasn't updated.","danger")}},[t,T,r,y]),j=g.useCallback(()=>{const e=null==i?void 0:i.api.getSelectedRows();0!==(null==e?void 0:e.length)&&d(!0)},[i]),C=v.dataTracker.find(e=>e.startsWith("updateDataTrackerValidationResults")),S=(0,g.useCallback)(()=>{if(null!=i&&i.api){const e=i.api.getFilterModel();s(e&&Object.keys(e).length>0)}},[i]);return(0,Ze.jsxs)(_qe.A,{flexDirection:"column",children:[c&&(0,Ze.jsx)(uqe,{title:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.confirmationDialog.title"}),agreeButtonCaption:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.confirmationDialog.agree"}),disagreeButtonCaption:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.confirmationDialog.disagree"}),onAgree:async()=>{const e=null==i?void 0:i.api.getSelectedRows();if(null!=e&&e.length)try{await T({variables:{input:null==e?void 0:e.map(e=>{let{id:n}=e;return{id:n.toString(),accountId:t,isIgnored:!0}})}}),r("The data tracker result(-s) has been successfully updated!"),x()}catch(e){r("Something went wrong. The data tracker result(-s) wasn't updated.","danger")}},onClose:()=>d(!1)}),m?(0,Ze.jsx)(Pqe,{}):(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(Kqe,{children:[!!C&&(0,Ze.jsx)(Qqe,{children:(0,Ze.jsx)(KWe.A,{variant:"outlined",onClick:()=>pqe(null==i?void 0:i.api,25),disabled:!i,title:n.formatMessage({id:"pages.data.overview.selectAll"}),children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.selectAllButtonText"})})}),u&&(0,Ze.jsx)(Qqe,{children:(0,Ze.jsx)(KWe.A,{variant:"outlined",onClick:()=>pqe(null==i?void 0:i.api,25,!0),disabled:!i,title:n.formatMessage({id:"pages.data.overview.deselectAll"}),children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.deselectAllButtonText"})})}),(0,Ze.jsx)(Qqe,{children:(0,Ze.jsx)(N$,{filtersApplied:l,resetGridState:()=>{var e;null==i||null===(e=i.api)||void 0===e||e.setFilterModel(null),s(!1)}})}),!!C&&(0,Ze.jsx)(KWe.A,{variant:"outlined",onClick:j,title:n.formatMessage({id:"pages.data.overview.acceptInfo"}),children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.accept"})})]}),(0,Ze.jsx)(Hqe,{children:(0,Ze.jsx)(Vqe,{fetchRows:async e=>{const{data:{getDataTrackerValidationResults:{rows:n,totalRows:r}}}=await a.query({query:Ft,variables:qqe(qqe({},e),{},{accountId:t,isIgnored:!1}),fetchPolicy:"network-only"});return{rows:n,totalRows:r}},setGridApi:o,onCellEditingStopped:k,onCellEditingStarted:O,showPlaceholder:h,onSelectionChanged:()=>{const e=null==i?void 0:i.api.getSelectedRows();p(!(null==e||!e.length))},onFilterChanged:S},"MissingTransactionsGrid")})]})]})}),Xqe=Zqe;var eJe,nJe;function tJe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const aJe=(0,Ge.default)("li")(eJe||(eJe=tJe(["\n  margin-left: 15px;\n"]))),rJe=(0,Ge.default)("div")(nJe||(nJe=tJe(["\n  margin-left: 20px;\n"]))),iJe=()=>(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(CWe,{children:(0,Ze.jsxs)(TL.A,{children:[(0,Ze.jsx)(OL.A,{expandIcon:(0,Ze.jsx)(ze.In,{icon:"chevron-down"}),"aria-controls":"panel1a-content",children:(0,Ze.jsx)(SWe,{children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.missingTransactions"})})}),(0,Ze.jsx)(kL.A,{children:(0,Ze.jsx)(Xqe,{})})]})}),(0,Ze.jsx)(Iqe,{})]}),oJe=(0,Ye.Ay)(()=>{const[e,n]=(0,g.useState)(null),t=Boolean(e),a=t?"simple-popover":void 0;return(0,Ze.jsxs)(yWe,{children:[(0,Ze.jsxs)(gWe,{children:[(0,Ze.jsx)(jWe,{children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.dataCollection"})}),(0,Ze.jsxs)(bWe,{"aria-describedby":a,onClick:e=>{n(e.currentTarget)},children:[(0,Ze.jsx)(hWe,{children:(0,Ze.jsx)(ze.In,{icon:"info-circle"})}),(0,Ze.jsx)(Je.A,{id:"pages.data.overview.about"})]}),(0,Ze.jsx)(oo.Ay,{id:a,open:t,anchorEl:e,onClose:()=>{n(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},sx:{marginRight:"50px",marginTop:"10px"},children:(0,Ze.jsxs)(HWe.A,{sx:{p:2,maxWidth:"900px"},children:["The Rio platform automatically performs checks against data that is being uploaded alongside identifying missing data from your suppliers, locations and meters.",(0,Ze.jsx)("p",{children:"Checks performed include:"}),(0,Ze.jsxs)(rJe,{children:[(0,Ze.jsxs)("ul",{children:[(0,Ze.jsx)("li",{children:"Identifying missing data,or rows of data based on:"}),(0,Ze.jsxs)("ul",{children:[(0,Ze.jsx)(aJe,{children:"Supplier"}),(0,Ze.jsx)(aJe,{children:"Locations"}),(0,Ze.jsx)(aJe,{children:"Meters"})]})]}),(0,Ze.jsxs)("ul",{children:[(0,Ze.jsx)("li",{children:"Finding locations with data being uploaded outside of their open/closed dates"}),(0,Ze.jsx)("li",{children:"Finding meters with zero data being provided"}),(0,Ze.jsx)("li",{children:"Time-period analysis, uploaded data is checked against the same period for previous months or previous year (for seasonality)"})]})]})]})})]}),(0,Ze.jsx)(iJe,{})]})}),lJe=()=>(0,Ze.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ze.jsx)("path",{d:"M11 7H13V9H11V7ZM11 11H13V17H11V11ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z",fill:"#2E3EFF"})}),sJe=()=>(0,Ze.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",children:[(0,Ze.jsx)("rect",{width:"64",height:"64"}),(0,Ze.jsx)("path",{d:"M44.5259 28.177C44.2455 28.177 43.9675 28.1851 43.692 28.1979V10.432C43.692 4.23979 33.2049 1 22.846 1C12.487 1 2 4.23979 2 10.432V42.541H2.01772C2.40285 48.5076 12.6812 51.6278 22.846 51.6278C24.5903 51.6278 26.3339 51.5275 28.0347 51.3436C30.4261 58.1243 36.912 63 44.5251 63C54.1605 63 62 55.1895 62 45.5881C62.0008 35.9883 54.1613 28.177 44.5259 28.177ZM22.846 5.81634C33.246 5.81634 38.8578 9.09226 38.8578 10.432C38.8578 11.7718 33.246 15.0477 22.846 15.0477C12.4451 15.0477 6.83423 11.7718 6.83423 10.432C6.83423 9.09226 12.4451 5.81634 22.846 5.81634ZM6.83423 16.6828C10.8571 18.7836 16.8709 19.864 22.846 19.864C28.8211 19.864 34.8333 18.7836 38.8578 16.6828V21.1941C38.8578 22.5339 33.246 25.8098 22.846 25.8098C12.4451 25.8098 6.83423 22.5339 6.83423 21.1941V16.6828ZM27.0816 46.6092C25.7699 46.7336 24.368 46.8115 22.846 46.8115C12.4451 46.8115 6.83423 43.5355 6.83423 42.1958V37.6997C10.8571 39.7997 16.8709 40.8801 22.846 40.8801C24.5033 40.8801 26.1574 40.7878 27.7769 40.6225C27.3056 42.1974 27.0493 43.8631 27.0493 45.5889C27.0493 45.9309 27.0614 46.2712 27.0816 46.6092ZM22.846 36.0638C12.4451 36.0638 6.83423 32.7879 6.83423 31.4489V27.4449C10.8571 29.5457 16.8709 30.6261 22.846 30.6261C28.8211 30.6261 34.8333 29.5457 38.8578 27.4449V29.1226C35.4134 30.3034 32.4524 32.5254 30.3576 35.4136C28.2297 35.8069 25.7296 36.0638 22.846 36.0638ZM44.5259 58.1845C37.5549 58.1845 31.8836 52.5341 31.8836 45.5889C31.8836 38.6446 37.5549 32.9942 44.5259 32.9942C51.4952 32.9942 57.1666 38.6446 57.1666 45.5889C57.1666 52.5341 51.4952 58.1845 44.5259 58.1845Z",fill:"#0B4EE6"}),(0,Ze.jsx)("path",{d:"M44.3504 43.9324C42.3302 43.6922 41.3045 43.4039 41.3045 42.4934C41.3045 41.1353 43.1311 40.9327 44.2192 40.9327C45.5098 40.9327 46.9379 41.5573 47.4028 42.3253L47.5868 42.632L50.536 41.2667L50.3559 40.8991C49.3182 38.7779 47.4788 38.1373 46.0586 37.8762V36H42.611V37.8658C39.5731 38.339 37.7729 40.0511 37.7729 42.4934C37.7729 46.5125 41.5373 46.9329 44.0264 47.2108C46.2891 47.4798 47.3436 48.0235 47.3436 48.922C47.3436 50.6605 44.8889 50.7958 44.1352 50.7958C42.4478 50.7958 40.822 49.959 40.3548 48.8491L40.1988 48.4792L37 49.8357L37.1576 50.2048C38.0577 52.3157 39.9859 53.6449 42.6094 53.9765V56H46.057V53.8748C48.5741 53.5641 51 51.9537 51 48.9212C51.0008 44.7516 46.9987 44.2583 44.3504 43.9324Z",fill:"#0B4EE6"})]}),cJe=["buildingEnergyRatings"],dJe=e=>{let{kind:n,to:t}=e;const a=(0,m.Zp)(),r=M$e(n),i=!cJe.includes(n);return(0,Ze.jsxs)(BWe,{onClick:i?()=>a(t):()=>{},children:[(0,Ze.jsx)(_We,{children:r}),(0,Ze.jsx)(UWe,{children:(0,Ze.jsx)(Je.A,{id:"pages.data.subjects.".concat(n)})})]})},uJe=e=>{let{activeAccessControls:n,isPortfolio:t}=e;const a=(0,m.Zp)();return t?(0,Ze.jsx)(FWe,{children:(0,Ze.jsxs)(BWe,{onClick:()=>a("./investment/uploads"),children:[(0,Ze.jsx)(_We,{children:(0,Ze.jsx)(sJe,{})}),(0,Ze.jsx)(UWe,{children:"Funds & Assets"})]})}):(0,Ze.jsx)(FWe,{children:null==n?void 0:n.filter(e=>!cJe.includes(e)).map((e,n)=>(0,Ze.jsx)(dJe,{kind:e,to:"/data/".concat(e,"/uploads")},"".concat(e," - ").concat(n)))})},pJe={organization:{label:"Organisation",value:"/organisation"},portfolio:{label:"Portfolio",value:"/portfolio"},api:{label:"American Petroleum Institute",value:"/api"}},mJe=["Organisation","Portfolio","American Petroleum Institute"],fJe=e=>localStorage.setItem("UPLOAD_CURRENT_TAB",e),yJe=e=>localStorage.setItem("UPLOAD_CURRENT_TAB_V2",e),gJe=e=>{let{activeAccessControls:n}=e;const t=localStorage.getItem("UPLOAD_CURRENT_TAB")||null,a=Pu(),r=!(null!=a&&a.accessControls.data.investment),i=r?pJe.organization.value:t,[o,l]=(0,g.useState)(i),s=r?[pJe.organization]:Object.values(pJe);return(0,g.useEffect)(()=>{r&&fJe(pJe.organization.value)},[r]),(0,Ze.jsxs)(yWe,{children:[(0,Ze.jsx)(gWe,{children:(0,Ze.jsx)(jWe,{children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.uploadHeader"})})}),(0,Ze.jsxs)(TWe,{children:[(0,Ze.jsx)(vWe,{style:{width:"".concat(r?"112px":"224px")},children:(0,Ze.jsx)(ze.tU,{variant:"standard",value:o,children:s.map(e=>{let{label:n,value:t}=e;return(0,Ze.jsx)(xWe,{label:n,onClick:()=>{return l(e=t),fJe(e);var e},value:t},n)})})}),(0,Ze.jsx)(lJe,{})]}),(0,Ze.jsx)(ze.Kp,{value:o,index:pJe.organization.value,children:(0,Ze.jsx)(uJe,{activeAccessControls:n})}),!r&&(0,Ze.jsx)(ze.Kp,{value:o,index:pJe.portfolio.value,children:(0,Ze.jsx)(uJe,{isPortfolio:!0})})]})},bJe=["waste","electricity","gas","water","transport","fuel","buildingEnergyRatings","refrigerants","heatSteam","materials","hotelStays","safety","employees","community","business","biodiversity","oilProduction","salesData","liquidFuels","emissionsDatabase"];var hJe,vJe;function xJe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const TJe=Ge.default.div(hJe||(hJe=xJe(["\n  padding: "," ",";\n  display: flex;\n  flex-direction: row;\n  align-items: flex-start;\n  height: 100%;\n  overflow: auto;\n  font-family: 'Akkurat', Helvetica, Arial, sans-serif;\n"])),e=>e.theme.geometry.lg.spacing,e=>e.theme.geometry.md.spacing),OJe=Ge.default.div(vJe||(vJe=xJe(["\n  display: flex;\n  flex-direction: column;\n  flex-grow: 2;\n  min-width: 100px;\n  margin-left: ",";\n"])),e=>e.theme.geometry.md.spacing);function kJe(){const{data:e}=Td(),n=Object.entries(e.data).reduce((e,n)=>{let[t,a]=n;return bJe.includes(t)&&a&&e.push(t),e},[]),t=Object.entries(e.data).reduce((e,n)=>{let[t,a]=n;return bJe.includes(t)&&!a&&e.push(t),e},[]);return(0,Ze.jsxs)(TJe,{children:[(0,Ze.jsx)(zWe,{activeAccessControls:n,inactiveAccessControls:t}),(0,Ze.jsxs)(OJe,{children:[(0,Ze.jsx)(oJe,{}),(0,Ze.jsx)(gJe,{activeAccessControls:n})]})]})}function jJe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function CJe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jJe(Object(t),!0).forEach(function(n){SJe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jJe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function SJe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const NJe=function(e){return(0,Ze.jsx)(VMe,CJe(CJe({},e),{},{dataSection:Vt.D_.Refrigerant,template:{columns:qRe,fileName:"refrigerants-template",type:xR.Dynamic}}))};var wJe,DJe;function AJe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const RJe=(0,D.J1)(wJe||(wJe=AJe(["\n  query GetInvestmentTransactionsByAccountId(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getInvestmentTransactionsByAccountId(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        date\n        fundCommitment\n        fundOwnership\n        fundRevenue\n        fund {\n          id\n          name\n        }\n        asset {\n          id\n          name\n        }\n        assetFactorName\n        assetFactorValue\n        assetFactorYear\n        assetFactorLink\n        assetRevenue\n        assetRevenueDate\n        assetValuation\n        parentFund {\n          id\n          name\n        }\n        parentFundCommitment\n        parentFundOwnership\n        comment\n        importBatch {\n          id\n          fileName\n        }\n        financedEmissions\n        fundCurrencyCode\n        parentFundCurrencyCode\n        currencyCode\n      }\n    }\n  }\n"]))),PJe=(0,D.J1)(DJe||(DJe=AJe(["\n  query GetInvestmentTransactionsFilter($accountId: ID!, $field: String!) {\n    getInvestmentTransactionsFilter(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])));function LJe(){const[e]=(0,gs._)(PJe),n=rt(),{showNotification:t}=vt(),a=async a=>{try{const{data:{getInvestmentTransactionsFilter:t}}=await e({variables:{accountId:n,field:a.colDef.colId||a.colDef.field}});a.success(t.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){t("Couldn't load filter values for column \"".concat(a.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Date",field:"date",valueFormatter:da,filter:"agDateColumnFilter",initialSort:"desc"},{headerName:"Parent Fund",field:"parentFund.name",colId:"parentFund",filterParams:{values:a,valueFormatter:la},hide:!0},{headerName:"Parent Fund Commitment",field:"parentFundCommitment",filter:"agNumberColumnFilter",valueFormatter:ya,hide:!0},{headerName:"Parent Fund Currency",field:"parentFundCurrencyCode",filterParams:{values:a,valueFormatter:la},hide:!0},{headerName:"Parent Fund Ownership",field:"parentFundOwnership",filter:"agNumberColumnFilter",hide:!0,valueFormatter:fa},{headerName:"Fund",field:"fund.name",colId:"fund",filterParams:{values:a,valueFormatter:la}},{headerName:"Fund Commitment",field:"fundCommitment",filter:"agNumberColumnFilter",valueFormatter:ya,hide:!0},{headerName:"Fund Currency",field:"fundCurrencyCode",filterParams:{values:a,valueFormatter:la}},{headerName:"Fund Ownership",field:"fundOwnership",filter:"agNumberColumnFilter",valueFormatter:fa},{headerName:"Fund Revenue",field:"fundRevenue",filter:"agNumberColumnFilter",hide:!0},{headerName:"Asset",field:"asset.name",colId:"asset",filterParams:{values:a,valueFormatter:la}},{headerName:"Asset Revenue",field:"assetRevenue",filter:"agNumberColumnFilter",valueFormatter:ya},{headerName:"Asset Valuation",field:"assetValuation",filter:"agNumberColumnFilter"},{headerName:"Investment Currency",field:"currencyCode",filterParams:{values:a,valueFormatter:la}},{headerName:"Asset Revenue Date",field:"assetRevenueDate",valueFormatter:da,filter:"agDateColumnFilter"},{headerName:"Estimated Factor Name",field:"assetFactorName",filter:"agTextColumnFilter"},{headerName:"Estimated Factor Value",field:"assetFactorValue",filter:"agNumberColumnFilter"},{headerName:"Asset Factor Year",field:"assetFactorYear",filter:"agNumberColumnFilter"},{headerName:"Asset Factor Reference",field:"assetFactorLink",filter:"agTextColumnFilter",cellRenderer:e=>(0,Ze.jsx)(VJ,{value:e.value})},{headerName:"Financed Emissions (tCO2e)",field:"financedEmissions",filter:"agNumberColumnFilter",valueFormatter:fa},{headerName:"Comment",field:"comment",filter:"agTextColumnFilter"}]}}function IJe(){const[e]=(0,gs._)(RJe,{fetchPolicy:"network-only"}),n=LJe(),t=(0,g.useCallback)(async n=>{const{data:{getInvestmentTransactionsByAccountId:{totalRows:t,rows:a}}}=await e({variables:n});return{rows:a,totalRows:t}},[e]);return(0,Ze.jsx)(Awe,{title:"Investment Transactions",defaultExportFileName:"investment-transactions",breadcrumbs:[{title:"Data",to:".."},{title:"Investment Transactions"}],uploadLink:"../investment/uploads",config:n,fetchRows:t})}function EJe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function _Je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?EJe(Object(t),!0).forEach(function(n){FJe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):EJe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function FJe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function BJe(e){return(0,Ze.jsx)(VMe,_Je(_Je({},e),{},{dataSection:Vt.D_.Investment}))}var UJe,MJe=t(97586),VJe=t.n(MJe),zJe=t(94573),GJe=t.n(zJe);const $Je=(0,f.styled)(f.Text)(UJe||(UJe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  text-decoration: underline;\n  cursor: pointer;\n"])));var WJe,qJe;function JJe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const YJe=(0,f.styled)("div")(WJe||(WJe=JJe(["\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n"]))),HJe=(0,f.styled)("div")(qJe||(qJe=JJe(["\n  display: flex;\n  gap: 2px;\n"]))),KJe=e=>{let{uncertaintyId:n,onClose:t}=e;const a=rt(),{data:r,loading:i,error:o,refetch:l}=(0,h.IT)(Zge,{variables:{accountId:a,filters:{text:[{field:"id",type:"equals",filterType:"text",filter:n}]}},fetchPolicy:"network-only"}),s=null==r?void 0:r.getGasCompositionUncertainties.rows[0];return(0,Ze.jsxs)(f.Modal,{open:!!n,onClose:t,title:"Uncertainty Used",children:[i&&(0,Ze.jsx)(f.Loader,{}),!i&&o&&(0,Ze.jsx)(f.LoadFailed,{title:"Failed to load uncertainty",retry:l,error:o}),!i&&!o&&r&&!s&&(0,Ze.jsx)(f.Text,{children:"No uncertainty found"}),!i&&!o&&s&&(0,Ze.jsxs)(YJe,{children:[(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"ID:"}),(0,Ze.jsx)(f.Text,{children:s.id})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"Date:"}),(0,Ze.jsx)(f.Text,{children:s.date})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"Asset:"}),(0,Ze.jsx)(f.Text,{children:s.assetName})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"CO2 Mol Mean:"}),(0,Ze.jsx)(f.Text,{children:s.co2MolMean})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"CO2 Mol U Rel:"}),(0,Ze.jsx)(f.Text,{children:s.co2MolURel})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"CH4 Mol Mean:"}),(0,Ze.jsx)(f.Text,{children:s.ch4MolMean})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"CH4 Mol U Rel:"}),(0,Ze.jsx)(f.Text,{children:s.ch4MolURel})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"Mol C/Mol Gas Mean:"}),(0,Ze.jsx)(f.Text,{children:s.molCMolGasMean})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"Mol C/Mol Gas U Rel:"}),(0,Ze.jsx)(f.Text,{children:s.molCMolGasURel})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"MW Mean:"}),(0,Ze.jsx)(f.Text,{children:s.mwMean})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"MW U Rel:"}),(0,Ze.jsx)(f.Text,{children:s.mwURel})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"Wt C Mean:"}),(0,Ze.jsx)(f.Text,{children:s.wtCMean})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"Wt C U Rel:"}),(0,Ze.jsx)(f.Text,{children:s.wtCURel})]}),(0,Ze.jsxs)(HJe,{children:[(0,Ze.jsx)(f.Text,{weight:500,children:"Boe Conv Mean:"}),(0,Ze.jsx)(f.Text,{children:s.boeConvMean})]})]})]})},QJe=[{label:"Data",to:"/v2/data"},{label:"Production"}],ZJe=()=>{const[e,n]=(0,g.useState)(null),[t]=(0,gs._)(VJe(),{fetchPolicy:"network-only"}),a=function(e){let{onUncertaintyUsedClick:n}=e;const t=rt(),a=(0,N.m)(),{showNotification:r}=vt(),i=(0,g.useCallback)(async e=>{try{var n;const{data:r}=await a.query({query:GJe(),variables:{accountId:t,field:e.colDef.colId||e.colDef.field}});e.success((null==r||null===(n=r.getOilTransactionFilters)||void 0===n?void 0:n.map(e=>e.value?JSON.stringify(e):e.value))||[])}catch(n){r("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning")}},[t,a,r]),o=(0,g.useMemo)(()=>[{field:"date",headerName:"Date",sortable:!0,filter:"agDateColumnFilter",valueFormatter:e=>Yt(e.value),width:120},{field:"assetName",headerName:"Asset",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:la},width:300},{field:"oilProductionBbl",headerName:"Oil Production (bbl)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:250,cellStyle:{textAlign:"right"}},{field:"gasExportKscf",headerName:"Gas Export (kscf)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:250,cellStyle:{textAlign:"right"}},{field:"waterProductionBbl",headerName:"Water Production (bbl)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:250,cellStyle:{textAlign:"right"}},{field:"gasProductionKscf",headerName:"Gas Production (kscf)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:250,cellStyle:{textAlign:"right"}},{field:"gasInjectionKscf",headerName:"Gas Injection (kscf)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:250,cellStyle:{textAlign:"right"}},{field:"fuelGasKscf",headerName:"Fuel Gas (kscf)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"flareGasKscf",headerName:"Flare Gas (kscf)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"prodWaterOverboardBwpd",headerName:"Water Overboard (bwpd)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:250,cellStyle:{textAlign:"right"}},{field:"oilInWaterPpm",headerName:"Oil in Water (ppm)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:250,cellStyle:{textAlign:"right"}},{field:"mBoeAllPerDay",headerName:"MBOE All/Day",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"mBoeGasPerDay",headerName:"MBOE Gas/Day",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"fuelGasTCO2e",headerName:"Fuel Gas tCO2e",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"fuelGasTCO2",headerName:"Fuel Gas tCO2",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"fuelGasTCH4",headerName:"Fuel Gas tCH4",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"fuelGasTN2O",headerName:"Fuel Gas tN2O",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"flareGasTCO2e",headerName:"Flare Gas tCO2e",type:"numericColumn",valueFormatter:ma,width:200,cellStyle:{textAlign:"right"}},{field:"flareGasTCO2",headerName:"Flare Gas tCO2",type:"numericColumn",valueFormatter:ma,width:200,cellStyle:{textAlign:"right"}},{field:"flareGasTCH4",headerName:"Flare Gas tCH4",type:"numericColumn",valueFormatter:ma,width:200,cellStyle:{textAlign:"right"}},{field:"flareGasTN2O",headerName:"Flare Gas tN2O",type:"numericColumn",valueFormatter:ma,width:200,cellStyle:{textAlign:"right"}},{field:"ventingTCO2e",headerName:"Venting tCO2e",type:"numericColumn",valueFormatter:ma,width:200,cellStyle:{textAlign:"right"}},{field:"ventingTCH4",headerName:"Venting tCH4",type:"numericColumn",valueFormatter:ma,width:200,cellStyle:{textAlign:"right"}},{field:"fugitiveEmissionsTCO2",headerName:"Fugitive Emissions tCO2",type:"numericColumn",valueFormatter:ma,width:200},{field:"fugitiveEmissionsTCO2e",headerName:"Fugitive Emissions tCO2e",type:"numericColumn",valueFormatter:ma,width:230,cellStyle:{textAlign:"right"}},{field:"fugitiveEmissionsTCH4",headerName:"Fugitive Emissions tCH4",type:"numericColumn",valueFormatter:ma,width:230,cellStyle:{textAlign:"right"}},{field:"oilDischargeBpd",headerName:"Oil Discharge (bpd)",type:"numericColumn",valueFormatter:ma,width:200,cellStyle:{textAlign:"right"}},{field:"otherParticulatesTNOx",headerName:"Other Particulates tNOx",type:"numericColumn",valueFormatter:ma,width:230,cellStyle:{textAlign:"right"}},{field:"otherParticulatesTSOx",headerName:"Other Particulates tSOx",type:"numericColumn",valueFormatter:ma,width:230,cellStyle:{textAlign:"right"}},{field:"otherParticulatesTCO",headerName:"Other Particulates tCO",type:"numericColumn",valueFormatter:ma,width:230,cellStyle:{textAlign:"right"}},{field:"otherParticulatesTpm25",headerName:"Other Particulates tPM2.5",type:"numericColumn",valueFormatter:ma,width:250,cellStyle:{textAlign:"right"}},{field:"scope1GhgEmissions",headerName:"Scope 1 GHG Emissions",type:"numericColumn",valueFormatter:ma,width:230,cellStyle:{textAlign:"right"}},{field:"scope2GhgEmissions",headerName:"Scope 2 GHG Emissions",type:"numericColumn",valueFormatter:ma,width:230,cellStyle:{textAlign:"right"}},{field:"scope3GhgEmissions",headerName:"Scope 3 GHG Emissions",type:"numericColumn",valueFormatter:ma,width:230,cellStyle:{textAlign:"right"}},{field:"gasCompositionId",headerName:"Uncertainty ID",type:"text",sortable:!0,filter:"agTextColumnFilter",width:230,cellRenderer:e=>(0,Ze.jsx)($Je,{onClick:()=>n(e.value),children:e.value})},{field:"notes",headerName:"Notes",sortable:!0,filter:"agTextColumnFilter",width:200},{field:"dataMarker",headerName:"Data Marker",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:i,valueFormatter:la},width:180},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:i,valueFormatter:la}}],[i,n]);return{getRowId:ba("id"),columnDefs:o,defaultColDef:{resizable:!0,sortable:!0,filter:!0}}}({onUncertaintyUsedClick:(0,g.useCallback)(e=>{n(e)},[])}),r=(0,g.useCallback)(async e=>{const{data:{getOilTransactionsPage:{totalRows:n,rows:a}}}=await t({variables:e});return{rows:a,totalRows:n}},[t]);return(0,Ze.jsxs)(Ze.Fragment,{children:[e&&(0,Ze.jsx)(KJe,{uncertaintyId:e,onClose:()=>n(null)}),(0,Ze.jsx)(Jwe,{title:"Production Transactions",defaultExportFileName:"oil-production-export",breadcrumbs:QJe,uploadLink:"../oilProduction/uploads",config:a,fetchRows:r,transactionType:Vt.D_.Oil})]})};var XJe,eYe,nYe,tYe=t(9632),aYe=t(14176),rYe=t(45640),iYe=t(80696),oYe=t(61939);function lYe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const sYe=(0,f.styled)(f.Grid)(XJe||(XJe=lYe(["\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n"]))),cYe=(0,f.styled)(f.Grid)(eYe||(eYe=lYe(["\n  display: flex;\n  align-items: center;\n  width: 100%;\n  justify-content: space-between;\n"]))),dYe=(0,f.styled)(f.Text)(nYe||(nYe=lYe(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.error}),uYe=(e,n)=>{const t=new Date(e),[a,r]=n.split(":");return t.setHours(a),t.setMinutes(r),t};function pYe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function mYe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pYe(Object(t),!0).forEach(function(n){fYe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pYe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function fYe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const yYe="true"===kn("REACT_APP_IS_SAVE_DRAFT_FEATURE_ENABLED"),gYe=e=>{var n;const{form:t,onSubmit:a=()=>{},children:r,showEndDate:i,dateLabels:o={},showSubmitButton:l=!0,showTime:s,transactionType:c}=e,{handleSubmit:d,getValues:u,setValue:p,reset:m,watch:y,register:b,control:h,trigger:v,formState:{isValid:x,errors:T}}=t||{},O=(e=>{var n;return"maxLength"===(null===(n=e.uploadReference)||void 0===n?void 0:n.type)?"Upload reference max length is 80 characters":e.data?"Please fill all mandatory fields":void 0})(T),k=rt(),{showNotification:j}=vt(),C="data_form_draft_".concat(c,"_").concat(k);(0,g.useEffect)(()=>{b("dataFormInputStrategy",{defaultValue:Va.Single}),b("dataFormRowsFillingStrategy",{defaultValue:za.Distributed}),b("startDate",{defaultValue:null,required:!0}),b("endDate",{defaultValue:null,validate:e=>{if(!e||!u("startDate"))return!0;const n=uYe(u("startDate"),u("startTime")||"12:00"),t=uYe(e,u("endTime")||"12:00");return Wt()(t).isBefore(Wt()(n))?"End date ".concat(s?"(and time) ":"","has to be the same or after the start date"):!(Wt()(t).diff(Wt()(n),"years",!0)>1)||"Date range cannot exceed 1 year"}}),b("startTime",{defaultValue:null}),b("endTime",{defaultValue:null})},[b,u,s]);const[S,N,w,D,A,R,P]=y(["endTime","endDate","startTime","startDate","dateFrequency","dataFormInputStrategy","dataFormRowsFillingStrategy"]),L=R===Va.Single,I=R===Va.Aggregated,E=P===za.Distributed,_=!L&&!I,F=P===za.Replicated,B=!(0,zt.isNil)(R)||_,U=E,M=F||!(0,zt.isNil)(A),V=!(0,zt.isNil)(D)&&""!==D,z=(E&&!(0,zt.isNil)(A)&&V||F&&D)&&(!i||N),G=E||i,$=!x&&z,W=Object.entries($a).map(e=>{let[,n]=e;return{label:(0,zt.capitalize)(n),value:n}});return _&&p("dataFormInputStrategy",Va.Single),(0,Ze.jsx)("form",{onSubmit:d(a),children:(0,Ze.jsxs)(sYe,{container:!0,children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:"Is this data entry for a single transaction or for aggregated set of data?"}),(0,Ze.jsxs)(cYe,{container:!0,children:[(0,Ze.jsx)(f.Grid,{size:5.5,children:(0,Ze.jsx)(f.Checkbox,{name:"Single_Container",checked:L||_,value:Va.Single,onChange:()=>p("dataFormInputStrategy",Va.Single),label:"Single (i.e. single commuter journey, regular waste collection or meter reading)"})}),(0,Ze.jsx)(f.Grid,{size:5.5,width:"50%",children:(0,Ze.jsx)(f.Checkbox,{name:"Aggregated_Container",checked:I,value:Va.Aggregated,onChange:()=>p("dataFormInputStrategy",Va.Aggregated),label:"Aggregated data (i.e annual waste tonnage, quarterly energy bill)"})})]}),B&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:L||_?"Should the data you are uploading be replicated at regular intervals (such as monthly or weekly) over a time period that can be specified below?":"Should the data you are uploading be divided into regular intervals (such as monthly or weekly) over a time period that can be specified below?"}),(0,Ze.jsxs)(f.Grid,{container:!0,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Checkbox,{name:"Replicated",checked:E,onChange:()=>p("dataFormRowsFillingStrategy",za.Distributed),label:"Yes"})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Checkbox,{name:"NotReplicated",checked:F,onChange:()=>p("dataFormRowsFillingStrategy",za.Replicated),label:"No"})})]})]}),U&&(0,Ze.jsx)(Rw.xI,{name:"dateFrequency",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,mYe(mYe({},t),{},{label:"Frequency of data to be ".concat(L?"replicated":"distributed",":"),onChange:e=>{p("dateFrequency",e.value)},options:W,error:null===(n=a.error)||void 0===n?void 0:n.message}))},control:h}),M&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.DatePicker,{onChange:e=>(e=>{const n=uYe(e,w||"12:00");p("startDate",n),v("endDate")})(e),name:"startDate",label:o[G?"start":"start-only"]||"Start date",value:D||null}),s&&(0,Ze.jsx)(f.TimePicker,{label:"Start time (optional)",name:"startTime",onChange:e=>(e=>{if(D){const n=uYe(D,e||"12:00");p("startDate",n),v("endDate")}p("startTime",e)})(e),value:w}),G&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.DatePicker,{name:"endDate",label:o.end||"End date",disabled:!D,value:N,onChange:e=>(e=>{const n=uYe(e,S||"12:00");p("endDate",n),v("endDate")})(e),error:null==T||null===(n=T.endDate)||void 0===n?void 0:n.message}),s&&(0,Ze.jsx)(f.TimePicker,{name:"endTime",label:"End time (optional)",value:S,onChange:e=>(e=>{if(u(N)){const n=uYe(N,e||"12:00");p("endDate",n),v("endDate")}p("endTime",e)})(e)})]})]}),z&&r,$&&(0,Ze.jsx)(dYe,{typescale:"body",size:"medium",children:O}),z&&l&&(0,Ze.jsx)(f.Button,{type:"submit",variant:"contained",children:"Confirm data entry"}),z&&yYe&&(0,Ze.jsx)(f.Button,{variant:"outlined",onClick:()=>{try{localStorage.setItem(C,JSON.stringify(u())),j("Draft saved successfully","success")}catch(e){j("Failed to save draft","danger")}},children:"Save draft"}),yYe&&(0,Ze.jsx)(f.Button,{variant:"outlined",onClick:()=>{try{const e=localStorage.getItem(C);if(!e)return void j("No draft found","warning");m(JSON.parse(e)),j("Draft loaded successfully","success")}catch(e){j("Failed to load draft","danger")}},children:"Load latest draft"})]})})};var bYe,hYe,vYe,xYe;function TYe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const OYe=(0,f.styled)(f.Grid)(bYe||(bYe=TYe(["\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  gap: 24px;\n  width: 100%;\n"]))),kYe=((0,f.styled)("div")(hYe||(hYe=TYe(["\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n"]))),(0,f.styled)("div")(vYe||(vYe=TYe(["\n  display: ",";\n  flex-direction: column;\n  gap: 24px;\n  width: 100%;\n"])),e=>{let{isVisible:n}=e;return n?"flex":"none"})),jYe=(0,f.styled)(f.TextField)(xYe||(xYe=TYe(["\n  width: 100%;\n"]))),CYe=["onChange","trigger","type","value","label","withNegative"];function SYe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function NYe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?SYe(Object(t),!0).forEach(function(n){wYe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):SYe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function wYe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const DYe=e=>{const{onChange:n=()=>{},trigger:t=()=>{},type:a="text",value:r="",label:i,withNegative:o=!1}=e,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,CYe),s=(0,g.useCallback)(e=>{const{target:{value:a}}=e,r=o?Sa:Ca;return(0,zt.isEmpty)(a)?(n("",e),void t()):r(a)&&a?(n(a,e),void t()):void e.preventDefault()},[n,t,o]);return(0,Ze.jsx)(jYe,NYe(NYe({},l),{},{onChange:s,value:String(r),label:i,type:a}))},AYe=e=>(0,Ze.jsx)(DYe,NYe(NYe({},e),{},{withNegative:!0}));function RYe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function PYe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?RYe(Object(t),!0).forEach(function(n){LYe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):RYe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function LYe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function IYe(e){var n;let{form:t,accuracyAs:a="act/est"}=e;const{watch:r,control:i,setValue:o}=t,l=null===(n=r("data.".concat(a)))||void 0===n?void 0:n.value;return(0,g.useEffect)(()=>{l!==Vt.C.Est&&o("data.estimates scenario","")},[l]),l===Vt.C.Est&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.estimates scenario",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,PYe(PYe({},t),{},{label:"Estimates Scenario",options:Ma.estimatesScenarios.map(e=>({label:e,value:e})),error:null===(n=a.error)||void 0===n?void 0:n.message,onClear:()=>t.onChange("")}))},control:i})})}function EYe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function _Ye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?EYe(Object(t),!0).forEach(function(n){FYe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):EYe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function FYe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const BYe=e=>{const{form:n,onSubmit:t=()=>{},dataSection:a}=e,{setValue:r,control:i,register:o,watch:l}=n;(0,g.useEffect)(()=>{o("isFinancialDataRequired"),o("isReferenceDataRequired")},[o]);const[s,c]=l(["isFinancialDataRequired","isReferenceDataRequired"]),d=e=>r("isFinancialDataRequired",e),u=e=>r("isReferenceDataRequired",e),p=(0,g.useCallback)(e=>{const{data:n,startDate:a,endDate:r,dataFormRowsFillingStrategy:i,dateFrequency:o,dataFormInputStrategy:l}=e,s=wr(n,{startDate:a,endDate:r,dateField:["individual collection date"],divideFields:["quantity"],dataFormRowsFillingStrategy:i,dateFrequency:o,dataFormInputStrategy:l});t(e,s)},[t]),m=Pu(),y=(Ma.projectPhases[(null==m?void 0:m.id)||"default"]||Ma.projectPhases.default).map(e=>({value:e,label:e})),b=Fu();return(0,Ze.jsxs)(gYe,{onSubmit:p,form:n,transactionType:Vt.D_.Waste,dateLabels:{"start-only":"Individual collection date",start:"Individual collection start date",end:"Individual collection end date"},children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"small",children:"Please enter the following mandatory transactional waste data:"}),(0,Ze.jsx)(Rw.xI,{name:"data.waste out location",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(XW,_Ye(_Ye({},t),{},{value:null==t?void 0:t.value,label:"Waste-out location",onChange:e=>r("data.waste out location",e),error:null===(n=a.error)||void 0===n?void 0:n.message,createNew:!0}))},rules:{required:"Waste-out location is required"},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.waste stream",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(Kne,_Ye(_Ye({},t),{},{label:"Waste stream",value:null==t?void 0:t.value,onChange:e=>r("data.waste stream",e),error:null===(n=a.error)||void 0===n?void 0:n.message,createNew:!0}))},rules:{required:"Waste stream is required"},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.waste in location",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(eq,_Ye(_Ye({},t),{},{createNew:!0,value:null==t?void 0:t.value,label:"Waste-in location",error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>r("data.waste in location",e)}))},rules:{required:"Waste-in location is required"},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.waste contractor",render:e=>{var n;let{field:t,fieldState:i}=e;return(0,Ze.jsx)(w3,{value:null==t?void 0:t.value,label:"Waste contractor",utility:a,supplierType:Vt.d.Contractor,onChange:e=>r("data.waste contractor",e),error:null===(n=i.error)||void 0===n?void 0:n.message})},rules:{required:"Waste contractor is required"},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.waste carrier",render:e=>{let{field:n}=e;return(0,Ze.jsx)(w3,{value:null==n?void 0:n.value,label:"Waste carrier",utility:a,onChange:e=>r("data.waste carrier",e),supplierType:Vt.d.Carrier})},rules:{required:"Waste carrier is required"},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.container type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(QDe,{value:null==t?void 0:t.value,label:"Container type size",onChange:e=>r("data.container type",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Container type size is required"},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.number of collections",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Number of collections"},n))},rules:{required:"Number of collections is required"},defaultValue:1,control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.quantity",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(AYe,_Ye({label:"Quantity",error:null===(n=a.error)||void 0===n?void 0:n.message},t))},rules:{required:"Quantity is required"},control:i}),b.has("WasteTransaction.purchaseType")&&(0,Ze.jsx)(Rw.xI,{name:"data.purchase type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Purchase type".concat(b.isRequired("WasteTransaction.purchaseType")?"":" (optional)"),value:null==t?void 0:t.value,options:No(),onChange:e=>r("data.purchase type",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:b.isRequired("WasteTransaction.purchaseType")?{required:"Required"}:{},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.unit of weight",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(OAe,{label:"Unit of weight",onChange:e=>r("data.unit of weight",e),value:null==t?void 0:t.value,possibleOptions:["kg","t"],error:null===(n=a.error)||void 0===n?void 0:n.message,placeholder:"Please select unit of weight"})},rules:{required:"Unit of Weight is required"},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.number of containers",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Number of containers",error:null===(n=a.error)||void 0===n?void 0:n.message},t))},rules:{required:"Number of containers is required"},defaultValue:1,control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.treatment process",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(rq,{value:null==t?void 0:t.value,label:"Treatment process",onChange:e=>r("data.treatment process",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Treatment process is required"},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.act/est",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Act/Est",value:null==t?void 0:t.value,options:[{value:Vt.C.Act,label:"Act"},{value:Vt.C.Est,label:"Est"}],onChange:e=>r("data.act/est",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Act/Est is required"},control:i}),(0,Ze.jsx)(IYe,{form:n}),b.has("WasteTransaction.projectPhase")&&(0,Ze.jsx)(Rw.xI,{name:"data.project phase",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Project phase".concat(b.isRequired("WasteTransaction.projectPhase")?"":" (optional)"),value:null==t?void 0:t.value,options:y,onChange:e=>r("data.project phase",e.value),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:b.isRequired("WasteTransaction.projectPhase")?{required:"Required"}:{},control:i}),(0,Ze.jsxs)(OYe,{container:!0,children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:"Do you want to add financial data?"}),(0,Ze.jsxs)(f.Grid,{container:!0,children:[(0,Ze.jsx)(f.Checkbox,{name:"Financial",label:"Yes",checked:!!s,onChange:()=>d(!0)}),(0,Ze.jsx)(f.Checkbox,{name:"NoFinancial",label:"No",checked:!s,onChange:()=>d(!1)})]})]}),(0,Ze.jsxs)(kYe,{isVisible:s,children:[(0,Ze.jsx)(Rw.xI,{name:"data.gate fee",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Gate fee (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.management fee",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Management fee (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.bin hire",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Bin hire (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.bin exchange",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Bin exchange fee (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.lift charge",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Lift charge (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.labour cost",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Labour cost (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.equipment hire",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Equipment hire (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.misc cost",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Misc cost (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.misc cost rate",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Misc cost rate (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.transport charge",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Transport charge (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.rebate",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Rebate (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.penalty",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,_Ye({label:"Penalty (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.currency",render:e=>{let{field:n}=e;return(0,Ze.jsx)(SAe,{label:"Currency (optional)",value:null==n?void 0:n.value,onChange:e=>r("data.currency",e)})},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.notes",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,_Ye({label:"Notes (optional)"},n))},control:i})]}),(0,Ze.jsxs)(OYe,{container:!0,children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:"Do you want to add any references?"}),(0,Ze.jsxs)(f.Grid,{container:!0,children:[(0,Ze.jsx)(f.Checkbox,{name:"Reference",label:"Yes",checked:!!c,onChange:()=>u(!0)}),(0,Ze.jsx)(f.Checkbox,{name:"NoReference",label:"No",checked:!c,onChange:()=>u(!1)})]})]}),(0,Ze.jsxs)(kYe,{isVisible:c,children:[(0,Ze.jsx)(Rw.xI,{name:"data.waste transfer note id",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,_Ye({label:"Waste transfer note ID (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.consignment note (sepa) id",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,_Ye({label:"Consignment note (SEPA) ID (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.consignment note (ea) id",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,_Ye({label:"Consignment note (EA) ID (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.invoice number",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,_Ye({label:"Invoice number (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.sales order id",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,_Ye({label:"Sales order ID (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,_Ye({label:"Reference (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.evidence reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,_Ye({label:"Evidence reference (optional)"},n))},control:i}),(0,Ze.jsx)(Rw.xI,{name:"data.other reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,_Ye({label:"Other reference (optional)"},n))},control:i})]}),e.children]})},UYe=(e,n)=>{const{data:t}=(0,h.IT)(UY,{variables:{id:null==e?void 0:e.value},skip:!(null!=e&&e.value)});return{validateFields:(a,r)=>{if(null==e||!e.value||null==t||!t.getEnergySourceById)return{quantityError:null,readingError:null};const i=t.getEnergySourceById.isReadingMeter,o=null!=a&&""!==a;if(i&&(null==r||""===r))return{quantityError:null,readingError:"Reading is required for reading meter '".concat(e.label,"'.")};if(!i&&!o){const t=n===Vt.D_.Water?"Quantity (m3)":"Quantity (kWh)";return{quantityError:"".concat(t," is required for consumption meter '").concat(e.label,"'."),readingError:null}}return{quantityError:null,readingError:null}}}};var MYe,VYe,zYe;function GYe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $Ye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?GYe(Object(t),!0).forEach(function(n){WYe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):GYe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function WYe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function qYe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const JYe=(0,f.styled)("div")(MYe||(MYe=qYe(["\n  width: 100%;\n  margin-top: 16px;\n  height: 4px;\n"]))),YYe=(0,f.styled)(f.LinearProgress)(VYe||(VYe=qYe(["\n  width: 100%;\n"]))),HYe=(0,f.styled)("div")(zYe||(zYe=qYe(["\n  display: flex;\n  gap: 16px\n  margin-left: 16px;\n  flex-shrink: 0;\n"])));function KYe(e){const{form:n,onSubmit:t=()=>{},dataSection:a}=e,{setValue:r,control:i,register:o,watch:l}=n,[s]=(0,g.useState)(n.getValues("data.currency")),c=rt(),{data:d,loading:u}=Ru(),[p]=l(["data.meter name"]),{validateFields:m}=UYe(p,a);(0,g.useEffect)(()=>{o("isReferenceDataRequired")},[o]);const[y]=l(["isReferenceDataRequired"]),b=(0,g.useCallback)(()=>r("isReferenceDataRequired",!0),[r]),h=(0,g.useCallback)(()=>r("isReferenceDataRequired",!1),[r]),v=(0,g.useCallback)(e=>{const{data:n,startDate:a,endDate:r,dataFormRowsFillingStrategy:i,dateFrequency:o,dataFormInputStrategy:l}=e,s=wr(n,{startDate:a,endDate:r,dateField:["start date (dd/mm/yyyy)","end date (dd/mm/yyyy)"],divideFields:["quantity (m3)"],dataFormRowsFillingStrategy:i,dateFrequency:o,dataFormInputStrategy:l});t(e,s)},[t]),x=(0,g.useMemo)(()=>[{value:Vt.C.Act,label:"Act"},{value:Vt.C.Est,label:"Est"}],[]),T=(0,g.useMemo)(()=>d.map(e=>({value:e.id,label:e.name})),[d]),O=(0,g.useMemo)(()=>T.find(e=>e.label===s),[s,T]),k=Fu(),j=u;return(0,Ze.jsxs)(gYe,{transactionType:Vt.D_.Water,onSubmit:v,form:n,showEndDate:!0,children:[j&&(0,Ze.jsx)(JYe,{children:(0,Ze.jsx)(YYe,{})}),(0,Ze.jsxs)(f.Grid,{container:!0,columns:12,rowGap:4,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsxs)(f.Text,{typescale:"body",size:"large",children:["Please enter the following transactional ",a.toLowerCase()," data:"]})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.meter name",render:e=>{var n;let{field:t,fieldState:i}=e;return(0,Ze.jsx)(pAe,$Ye($Ye({},t),{},{accountId:c,label:"Meter name",value:null==t?void 0:t.value,type:a,createNew:!0,onChange:async e=>{r("data.meter name",e)},error:null===(n=i.error)||void 0===n?void 0:n.message}))},rules:{required:"Meter name is required"},control:i})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.reading",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(DYe,$Ye($Ye({},t),{},{label:"Reading (optional)",error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{validate:e=>{const t=n.getValues("data.quantity (m3)"),{readingError:a}=m(t,e);return a||!0}},defaultValue:"",control:i})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.supplier",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(w3,{label:"Supplier (optional)",onChange:e=>{r("data.supplier",e)},error:null===(n=a.error)||void 0===n?void 0:n.message,utility:Vt.D_.Water,value:null==t?void 0:t.value})},control:i})}),k.has("WaterTransaction.purchaseType")&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.purchase type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Purchase type".concat(k.isRequired("WaterTransaction.purchaseType")?"":" (optional)"),value:null==t?void 0:t.value,options:No(),onChange:e=>r("data.purchase type",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:k.isRequired("WaterTransaction.purchaseType")?{required:"Required"}:{},control:i})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.quantity (m3)",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(AYe,$Ye($Ye({},t),{},{label:"Quantity (m3)",error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>{t.onChange(e)}}))},rules:{validate:e=>{const t=n.getValues("data.reading"),{quantityError:a}=m(e,t);return a||!0}},control:i})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.act/est",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,$Ye($Ye({},t),{},{label:"Act/Est",value:null==t?void 0:t.value,options:x,error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>{const n=(t=e,x.find(e=>e.value===t.value)||{});var t;r("data.act/est",n)}}))},rules:{required:"Act/Est is required"},control:i})}),(0,Ze.jsx)(IYe,{form:n}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.tariff (£/m3)",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(DYe,$Ye($Ye({},t),{},{label:"Tariff (cost per m3) (optional)",error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>{t.onChange(e)}}))},control:i})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.total cost",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(DYe,$Ye($Ye({},t),{},{label:"Total cost (optional)",error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>{t.onChange(e)}}))},defaultValue:"",control:i})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.currency",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,$Ye($Ye({},t),{},{label:"Currency",value:t.value,options:T,error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>r("data.currency",e)}))},defaultValue:O,control:i})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.comment",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,$Ye($Ye({},n),{},{label:"Comment"}))},control:i,defaultValue:""})}),(0,Ze.jsxs)(f.Grid,{container:!0,size:12,alignItems:"center",justifyContent:"space-between",children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"large",children:"Do you want to add any references?"}),(0,Ze.jsxs)(HYe,{children:[(0,Ze.jsx)(f.Checkbox,{label:"Yes",checked:Boolean(y),onChange:b}),(0,Ze.jsx)(f.Checkbox,{label:"No",checked:!Boolean(y),onChange:h})]})]}),y&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.invoice number",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,$Ye($Ye({},n),{},{label:"Invoice number (optional)"}))},defaultValue:"",control:i})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.evidence reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,$Ye($Ye({},n),{},{label:"Evidence reference (optional)"}))},defaultValue:"",control:i})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.other reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,$Ye($Ye({},n),{},{label:"Other reference (optional)"}))},defaultValue:"",control:i})})]}),e.children]})]})}function QYe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ZYe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?QYe(Object(t),!0).forEach(function(n){XYe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):QYe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function XYe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const eHe=e=>{var n;const{form:t={},onSubmit:a=()=>{},dataSection:r=Vt.D_.Electricity}=e,{setValue:i,control:o,register:l,watch:s}=t,[c]=(0,g.useState)(t.getValues("data.currency")),d=rt(),{data:u,loading:p}=Ru(),[m]=s(["data.meter name"]),{validateFields:y}=UYe(m,r);(0,g.useEffect)(()=>{l("isReferenceDataRequired")},[l]);const[b]=s(["isReferenceDataRequired"]),h=e=>i("isReferenceDataRequired",e),v=[{value:"ACT",label:"Act"},{value:"EST",label:"Est"}],x=[{value:uIe,label:uIe},{value:pIe,label:pIe}],T=null===(n=u||[])||void 0===n?void 0:n.map(xi),O=T.find(e=>e.label===c),k=p,j=Fu(),C=j.has("".concat(r,"Transaction.purchaseType")),S=j.isRequired("".concat(r,"Transaction.purchaseType"));return(0,Ze.jsxs)(gYe,{onSubmit:e=>{const{data:n,startDate:t,endDate:r,dataFormRowsFillingStrategy:i,dateFrequency:o,dataFormInputStrategy:l}=e,s=wr(n,{startDate:t,endDate:r,dateField:["start date (dd/mm/yyyy)","end date (dd/mm/yyyy)"],divideFields:["quantity (kwh)","total cost"],dataFormRowsFillingStrategy:i,dateFrequency:o,dataFormInputStrategy:l});a(e,s)},form:t,showEndDate:!0,showTime:!0,transactionType:r,children:[k&&(0,Ze.jsx)(f.LinearProgress,{}),!k&&(0,Ze.jsx)(f.Grid,{container:!0,children:(0,Ze.jsxs)(kYe,{isVisible:!0,children:[(0,Ze.jsxs)(f.Text,{typescale:"title",size:"small",children:["Please enter the following transactional ",r.toLowerCase()," data:"]}),(0,Ze.jsx)(Rw.xI,{name:"data.meter name",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(pAe,ZYe(ZYe({},t),{},{accountId:d,label:"Meter name",value:null==t?void 0:t.value,type:r,createNew:!0,onChange:e=>{i("data.meter name",e)},error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Meter name is required"},control:o}),(0,Ze.jsx)(Rw.xI,{name:"data.tariff",render:e=>{let{field:n}=e;return(0,Ze.jsx)(IAe,ZYe(ZYe({},n),{},{value:null==n?void 0:n.value,label:"Tariff (optional)",onChange:e=>i("data.tariff",e),accountId:d}))},control:o}),(0,Ze.jsx)(Rw.xI,{name:"data.quantity (kwh)",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(AYe,ZYe(ZYe({label:"Quantity (kWh)"},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{validate:e=>{const n=t.getValues("data.reading"),{quantityError:a}=y(e,n);return a||!0}},control:o}),(0,Ze.jsx)(Rw.xI,{name:"data.reading",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(AYe,ZYe(ZYe({label:"Reading"},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{validate:e=>{const n=t.getValues("data.quantity (kwh)"),{readingError:a}=y(n,e);return a||!0}},control:o}),(0,Ze.jsx)(Rw.xI,{name:"data.total cost",render:e=>{let{field:n}=e;return(0,Ze.jsx)(DYe,ZYe({label:"Total cost (optional)"},n))},control:o}),(0,Ze.jsx)(Rw.xI,{name:"data.currency",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.AutoComplete,ZYe(ZYe({},n),{},{label:"Currency",value:null==n?void 0:n.value,options:T,defaultValue:O,onChange:e=>i("data.currency",e)}))},defaultValue:null==O?void 0:O.label,control:o}),(0,Ze.jsx)(Rw.xI,{name:"data.act/est",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,ZYe(ZYe({},t),{},{value:null==t?void 0:t.value,label:"Act/Est",onChange:e=>i("data.act/est",e),options:v,error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Act/Est is required"},control:o}),(0,Ze.jsx)(IYe,{form:t}),(0,Ze.jsx)(Rw.xI,{name:"data.supplier",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(w3,ZYe(ZYe({},t),{},{utility:r,label:"Supplier (optional)",value:null==t?void 0:t.value,error:null===(n=a.error)||void 0===n?void 0:n.message,supplierType:Vt.d.Supplier,onChange:e=>i("data.supplier",e)}))},control:o}),(0,Ze.jsx)(Rw.xI,{name:"data.charge/kwh",render:e=>{let{field:n}=e;return(0,Ze.jsx)(AYe,ZYe({label:"Charge/kWh (optional)"},n))},control:o}),(0,Ze.jsx)(Rw.xI,{name:"activity",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,ZYe(ZYe({},t),{},{value:null==t?void 0:t.value,label:"Activity",onChange:e=>i("activity",e.value),options:x,error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Activity is required"},control:o}),C&&(0,Ze.jsx)(Rw.xI,{name:"data.purchase type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,ZYe(ZYe({},t),{},{label:"Purchase type".concat(S?"":" (optional)"),value:null==t?void 0:t.value,options:No(),onChange:e=>i("data.purchase type",e),error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:S?{required:"Required"}:{},control:o}),(0,Ze.jsx)(Rw.xI,{name:"data.comment",render:e=>{let{field:n}=e;return(0,Ze.jsx)(jYe,ZYe({label:"Comment (optional)"},n))},control:o}),(0,Ze.jsxs)(OYe,{container:!0,children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:"Do you want to add any references?"}),(0,Ze.jsxs)(f.Grid,{container:!0,children:[(0,Ze.jsx)(f.Checkbox,{name:"Reference",label:"Yes",checked:!!b,onChange:()=>h(!0)}),(0,Ze.jsx)(f.Checkbox,{name:"NoReference",label:"No",checked:!b,onChange:()=>h(!1)})]})]}),(0,Ze.jsxs)(kYe,{isVisible:b,children:[(0,Ze.jsx)(Rw.xI,{name:"data.invoice number",render:e=>{let{field:n}=e;return(0,Ze.jsx)(jYe,ZYe({label:"Invoice number (optional)"},n))},control:o}),(0,Ze.jsx)(Rw.xI,{name:"data.evidence reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(jYe,ZYe({label:"Evidence reference (optional)"},n))},control:o}),(0,Ze.jsx)(Rw.xI,{name:"data.other reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(jYe,ZYe({label:"Other reference (optional)"},n))},control:o})]}),e.children]})})]})};var nHe;function tHe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function aHe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tHe(Object(t),!0).forEach(function(n){rHe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tHe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rHe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const iHe=(0,f.styled)("div")(nHe||(nHe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  gap: 16px\n  margin-left: 16px;\n  flex-shrink: 0;\n"])));function oHe(e){const{form:n,onSubmit:t,dataSection:a}=e,{setValue:r,control:i,watch:o,getValues:l,getFieldState:s,formState:c}=n,[d]=(0,g.useState)(n.getValues("data.currency")),{data:u,refetch:p}=ym(),m=gm(),y=bm(),{data:b}=Ru(),h=Fu(),[v]=o(["isReferenceDataRequired"]),x=(0,g.useCallback)(e=>r("isReferenceDataRequired",e),[r]),T=(0,g.useCallback)(()=>x(!0),[x]),O=(0,g.useCallback)(()=>x(!1),[x]),k=(0,g.useCallback)(e=>{const{data:n,startDate:a,endDate:r,dataFormRowsFillingStrategy:i,dateFrequency:o,dataFormInputStrategy:l}=e;n.volume||(n["unit of volume"]=void 0);const s=wr(n,{startDate:a,endDate:r,dataFormInputStrategy:l,dateFrequency:o,dataFormRowsFillingStrategy:i,dateField:["date"],divideFields:["volume","number of journeys","journey distance","distance","total distance","freight (tonne.km)"]}).map(e=>aHe(aHe({},e),{},{"freight (tonne.km)":e["freight (tonne/km)"]}));t(e,s)},[t]),j=(0,g.useMemo)(()=>({value:uIe,label:"Yes"}),[]),C=(0,g.useMemo)(()=>[j,{value:pIe,label:"No"}],[j]),S=(0,g.useMemo)(()=>({value:"L",label:"L"}),[]),N=(0,g.useMemo)(()=>[S,{value:"t",label:"t"}],[S]),w=(0,g.useMemo)(()=>({value:"km",label:"km"}),[]),D=(0,g.useMemo)(()=>[w,{value:"mi",label:"mi"},{value:"passenger.km",label:"passenger.km"}],[w]),A=(0,g.useMemo)(()=>b.map(xi),[b]),R=(0,g.useMemo)(()=>{var e;return null===(e=A.find(e=>e.label===d))||void 0===e?void 0:e.value},[d,A]),P=n.getValues().data,L=!(null!=P&&P.distance||null!=P&&P.volume||null!=P&&P["journey distance"]),I=!(null!=P&&P.distance||null!=P&&P["freight (tonne/km)"]||null!=P&&P["journey distance"]),E=!(null!=P&&P.volume||null!=P&&P["freight (tonne/km)"]),_=(null==P?void 0:P.distance)&&"Distance Unit is required",F=(0,g.useCallback)(()=>{var e,t;const a=null===(e=n.getValues().data)||void 0===e?void 0:e["journey distance"],i=null===(t=n.getValues().data)||void 0===t?void 0:t["number of journeys"];void 0!==a&&void 0!==i&&r("data.distance",Number(a)*Number(i))},[n,r]),B=(0,g.useCallback)(e=>{r("data.number of journeys",Number.isNaN(e)?1:Number(e)),F()},[F,r]),U=(0,g.useCallback)(e=>{r("data.journey distance",Number.isNaN(e)?0:Number(e)),F()},[F,r]),M=(0,g.useCallback)(e=>{r("data.type",e),r("data.subtype",null),p({typeId:e.value})},[p,r]),V=(0,g.useCallback)((e,n)=>{const{isTouched:t}=s(e,c);return{required:{value:t,message:n}}},[s,c]),z=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.purpose of journey",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,aHe(aHe({},t),{},{label:"Purpose of journey",options:null==m?void 0:m.map(xi),value:t.value,onChange:e=>r("data.purpose of journey",e),error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Purpose of journey is required "},control:i})}),[i,m,r]),G=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"activity",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,aHe(aHe({},t),{},{label:"Account holder's owned and controlled vehicles",options:C,value:t.value,onChange:e=>r("activity",e.value),error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Account holder's owned and controlled vehicles is required"},control:i})}),[C,i,r]),$=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.location",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ZW,aHe(aHe({},t),{},{createNew:!0,label:"Location",value:t.value,error:null===(n=a.error)||void 0===n?void 0:n.message,onChange:e=>r("data.location",e)}))},rules:{required:"Location is required"},control:i})}),[i,r]),W=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,aHe(aHe({},t),{},{label:"Type",options:null==y?void 0:y.map(xi),value:t.value,onChange:e=>{r("data.type",e),M(e)},error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Type is required"},control:i})}),[i,y,r,M]),q=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.subtype",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(cEe,aHe(aHe({},a),{},{label:"Subtype",options:null===(n=y.find(e=>{var n;let{id:t}=e;return t===(null==P||null===(n=P.type)||void 0===n?void 0:n.value)}))||void 0===n?void 0:n.subtypes.map(xi),value:a.value,onChange:e=>r("data.subtype",e),error:null===(t=i.error)||void 0===t?void 0:t.message}))},rules:{required:"Subtype is required"},control:i})}),[i,y,null==P?void 0:P.type,r]),J=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.fuel type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,aHe(aHe({},t),{},{label:"Fuel type",options:null==u?void 0:u.map(xi),value:t.value,onChange:e=>r("data.fuel type",e),error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Fuel type is required"},control:i})}),[i,u,r]),Y=(0,g.useCallback)(()=>h.has("TransportTransaction.purchaseType")?(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.purchase type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.AutoComplete,aHe(aHe({},t),{},{label:"Purchase type".concat(h.isRequired("TransportTransaction.purchaseType")?"":" (optional)"),options:No(),value:t.value,onChange:e=>r("data.purchase type",e),error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:h.isRequired("TransportTransaction.purchaseType")?{required:"Required"}:{},control:i})}):null,[i,h,r]),H=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.data provider",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(w3,{label:"Data provider (optional)",value:t.value,onChange:e=>r("data.data provider",e),error:null===(n=a.error)||void 0===n?void 0:n.message,utility:Vt.D_.Transport})},control:i})}),[i,r]),K=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.origin of travel",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(f.TextField,aHe(aHe({},a),{},{value:a.value,label:"Origin of travel",id:"origin of travel",onChange:e=>r("data.origin of travel",e.target.value),error:Boolean(null===(n=i.error)||void 0===n?void 0:n.message),helperText:null===(t=i.error)||void 0===t?void 0:t.message}))},rules:{required:"Origin of travel is required"},control:i,defaultValue:""})}),[i,r]),Q=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.destination of travel",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(f.TextField,aHe(aHe({},a),{},{value:a.value,label:"Destination of travel",id:"destination of travel",onChange:e=>r("data.destination of travel",e.target.value),error:Boolean(null===(n=i.error)||void 0===n?void 0:n.message),helperText:null===(t=i.error)||void 0===t?void 0:t.message}))},control:i,defaultValue:"",rules:{required:"Destination of travel is required"}})}),[i,r]),Z=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.volume",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(AYe,aHe(aHe({},a),{},{label:"Fuel volume".concat(I?"":" (optional)"),value:a.value,onChange:e=>r("data.volume",e),id:"volume",error:Boolean(null===(n=i.error)||void 0===n?void 0:n.message),helperText:(null===(t=i.error)||void 0===t?void 0:t.message)||"If no Volume figure is entered you will need to provide a value for 'Journey distance'"}))},rules:{required:!!I&&"Fuel volume is required"},control:i})}),[i,I,r]),X=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.unit of volume",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,aHe(aHe({},t),{},{label:"Volume unit ".concat(l("data.unit of volume")?"":"(optional)"),options:N,value:t.value,onChange:e=>r("data.unit of volume",e),error:null===(n=a.error)||void 0===n?void 0:n.message}))},defaultValue:S,control:i,rules:V("data.unit of volume","Unit of Volume is required")})}),[i,S,V,l,r,N]),ee=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.number of journeys",control:i,defaultValue:1,rules:{required:!1},render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(DYe,aHe(aHe({},a),{},{id:"number of journeys",label:"Number of journeys",error:Boolean(null===(n=i.error)||void 0===n?void 0:n.message),helperText:null===(t=i.error)||void 0===t?void 0:t.message,value:a.value,onChange:e=>{r("data.number of journeys",e),B(e)}}))}})}),[i,B,r]),ne=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.journey distance",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(AYe,aHe(aHe({},a),{},{label:"Journey Distance".concat(E?"":" (optional)"),id:"journey distance",value:a.value,onChange:e=>{r("data.journey distance",e),U(e)},error:Boolean(null===(n=i.error)||void 0===n?void 0:n.message),helperText:null===(t=i.error)||void 0===t?void 0:t.message}))},rules:{required:E},control:i})}),[i,U,E,r]),te=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.distance",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(DYe,aHe(aHe({},a),{},{label:"Total distance".concat(E?"":" (optional)"),id:"totalDistance",value:a.value,onChange:e=>{r("data.distance",e),U(e)},error:Boolean(null===(n=i.error)||void 0===n?void 0:n.message),helperText:null===(t=i.error)||void 0===t?void 0:t.message}))},rules:{required:E},control:i})}),[i,U,E,r]),ae=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.unit of distance",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,aHe(aHe({},t),{},{label:"Distance unit".concat(_?"":" (optional)"),options:D,value:t.value,onChange:e=>r("data.unit of distance",e),error:null===(n=a.error)||void 0===n?void 0:n.message}))},defaultValue:w,control:i,rules:V("data.unit of distance","Unit of distance is required")})}),[i,w,D,V,_,r]),re=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.freight (tonne/km)",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(AYe,aHe(aHe({},a),{},{label:"Freight (tonne/km)".concat(L?"":" (optional)"),error:Boolean(null===(n=i.error)||void 0===n?void 0:n.message),helperText:null===(t=i.error)||void 0===t?void 0:t.message,value:a.value,onChange:e=>{r("data.freight (tonne/km)",e)}}))},rules:{required:L},defaultValue:"",control:i})}),[i,L,r]),ie=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.carrier",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(f.TextField,aHe(aHe({},a),{},{label:"Carrier".concat(null!=P&&P["freight (tonne/km)"]?"":" (optional)"),value:a.value,onChange:e=>{r("data.carrier",e.target.value)},error:Boolean(null===(n=i.error)||void 0===n?void 0:n.message),helperText:null===(t=i.error)||void 0===t?void 0:t.message}))},control:i,defaultValue:"",rules:V("data.freight (tonne/km)","Carrier is required")})}),[i,V,P,r]),oe=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.cost of journey",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(DYe,aHe(aHe({},a),{},{label:"Cost (optional)",value:a.value,onChange:e=>r("data.cost of journey",e),error:Boolean(null===(n=i.error)||void 0===n?void 0:n.message),helperText:null===(t=i.error)||void 0===t?void 0:t.message}))},control:i,defaultValue:""})}),[i,r]),le=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.currency",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.AutoComplete,aHe(aHe({},t),{},{label:"Currency",onChange:e=>r("data.currency",e),value:t.value,options:A,error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Currency is required"},defaultValue:R,control:i})}),[i,R,A,r]),se=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.act/est",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,aHe(aHe({},t),{},{label:"Act/Est",options:[{value:"ACT",label:"ACT"},{value:"EST",label:"EST"}],value:t.value,onChange:e=>r("data.act/est",e),error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Act/Est is required"},defaultValue:{value:"ACT",label:"ACT"},control:i})}),[i,r]),ce=(0,g.useCallback)(()=>(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.notes",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(f.TextField,aHe(aHe({},a),{},{label:"Notes (optional)",value:a.value,onChange:e=>{r("data.notes",e.target.value)},error:Boolean(null===(n=i.error)||void 0===n?void 0:n.message),helperText:null===(t=i.error)||void 0===t?void 0:t.message}))},control:i,defaultValue:""})}),[i,r]),de=(0,g.useCallback)(()=>(0,Ze.jsxs)(f.Grid,{container:!0,size:12,alignItems:"center",justifyContent:"space-between",children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"large",children:"Do you want to add any references?"}),(0,Ze.jsxs)(iHe,{children:[(0,Ze.jsx)(f.Checkbox,{label:"Yes",checked:Boolean(v),onChange:T}),(0,Ze.jsx)(f.Checkbox,{label:"No",checked:!Boolean(v),onChange:O})]})]}),[O,v,T]),ue=(0,g.useCallback)(()=>(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.reference",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(f.TextField,aHe(aHe({},a),{},{label:"Reference",value:a.value,onChange:e=>r("data.reference",e.target.value),helperText:null===(n=i.error)||void 0===n?void 0:n.message,error:Boolean(null===(t=i.error)||void 0===t?void 0:t.message)}))},defaultValue:"",control:i})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"data.document reference",render:e=>{var n,t;let{field:a,fieldState:i}=e;return(0,Ze.jsx)(f.TextField,aHe(aHe({},a),{},{label:"Document reference",value:a.value,onChange:e=>r("data.document reference",e.target.value),helperText:null===(n=i.error)||void 0===n?void 0:n.message,error:Boolean(null===(t=i.error)||void 0===t?void 0:t.message)}))},defaultValue:"",control:i})})]}),[i,r]);return(0,Ze.jsxs)(gYe,{onSubmit:k,form:n,showSubmitButton:!!o("activity"),dateLabels:{"start-only":"Date"},transactionType:Vt.D_.Transport,children:[(0,Ze.jsxs)(f.Text,{typescale:"body",size:"large",children:["Please enter the following transactional ",a.toLowerCase()," data:"]}),$(),z(),!!o("data.purpose of journey")&&G(),!!o("activity")&&(0,Ze.jsxs)(Ze.Fragment,{children:[W(),!!o("data.type")&&q(),J(),Y(),H(),Z(),!!o("data.volume")&&X(),K(),Q(),ee(),ne(),!!o("data.journey distance")&&te(),!!o("data.journey distance")&&ae(),re(),ie(),se(),(0,Ze.jsx)(IYe,{form:n}),oe(),le(),ce(),de(),v&&ue(),e.children]})]})}function lHe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function sHe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?lHe(Object(t),!0).forEach(function(n){cHe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):lHe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function cHe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const dHe="Either Hotel nights either Home working days are required",uHe=e=>{var n,t,a;let{form:r,onSubmit:i,children:o,dataSection:l}=e;const s=rt(),c=Pu(),d=null==c||null===(n=c.accessControls)||void 0===n?void 0:n.customFields,{control:u,setValue:p}=r,m=r.getValues(),[y,b]=(0,g.useState)(!1),h=()=>b(e=>!e),v=(0,g.useCallback)(e=>{const{data:n,startDate:t,endDate:a,dataFormRowsFillingStrategy:r,dateFrequency:o,dataFormInputStrategy:l}=e,s=wr(n,{startDate:t,endDate:a,dataFormInputStrategy:l,dateFrequency:o,dataFormRowsFillingStrategy:r,dateField:["start date (dd/mm/yyyy)","end date (dd/mm/yyyy)"],divideFields:["hotel nights","home working days","total cost"]});i(e,s)},[i]);return(0,Ze.jsxs)(gYe,{onSubmit:v,form:r,showEndDate:!0,transactionType:Vt.D_.Hotelstays,children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"small",children:"Please enter the following transactional hotel stays data:"}),(0,Ze.jsx)(Rw.xI,{name:"data.location",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ZW,{value:null==t?void 0:t.value,label:"Location",onChange:e=>p("data.location",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Location is required"},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.hotel stay / home working country",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(FEe,{value:null==t?void 0:t.value,label:"Hotel stay / Home working country",onChange:e=>p("data.hotel stay / home working country",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Country is required"},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.hotel nights",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(DYe,sHe(sHe({label:"Hotel nights"},t),{},{error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:(null===(t=m.data)||void 0===t||!t["home working days"])&&dHe},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.home working days",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(DYe,sHe(sHe({},t),{},{label:"Home working days",error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:(null===(a=m.data)||void 0===a||!a["hotel nights"])&&dHe},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.data provider",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(w3,{value:null==t?void 0:t.value,label:"Data provider",onChange:e=>p("data.data provider",e),error:null===(n=a.error)||void 0===n?void 0:n.message,utility:l,supplierType:Vt.d.Supplier})},rules:{required:"Data provider is required"},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.tariff",render:e=>{let{field:n}=e;return(0,Ze.jsx)(IAe,{accountId:s,value:null==n?void 0:n.value,label:"Electricity tariff (optional)",onChange:e=>p("data.tariff",e)})},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.total cost",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(DYe,sHe(sHe({},t),{},{label:"Total cost (optional)",error:null===(n=a.error)||void 0===n?void 0:n.message}))},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.currency",render:e=>{let{field:n}=e;return(0,Ze.jsx)(SAe,{value:null==n?void 0:n.value,label:"Currency (optional)",onChange:e=>p("data.currency",e)})},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.act/est",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,sHe(sHe({},t),{},{label:"Act/Est",options:[{value:"ACT",label:"ACT"},{value:"EST",label:"EST"}],value:t.value,onChange:e=>p("data.act/est",e),error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Act/Est is required"},defaultValue:{value:"ACT",label:"ACT"},control:u}),(0,Ze.jsx)(IYe,{form:r}),(null==d?void 0:d.includes("HotelStaysTransaction.purchaseType"))&&(0,Ze.jsx)(Rw.xI,{name:"data.purchase type",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.Select,sHe(sHe({},n),{},{label:"Purchase type",options:No(),onChange:e=>p("data.purchase type",e)}))},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.notes",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,sHe(sHe({},n),{},{label:"Notes (optional)"}))},control:u}),(0,Ze.jsxs)(OYe,{container:!0,children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:"Do you want to add any references?"}),(0,Ze.jsxs)(f.Grid,{container:!0,children:[(0,Ze.jsx)(f.Checkbox,{name:"Reference",label:"Yes",checked:!!y,onChange:h}),(0,Ze.jsx)(f.Checkbox,{name:"NoReference",label:"No",checked:!y,onChange:h})]})]}),(0,Ze.jsxs)(kYe,{isVisible:y,children:[(0,Ze.jsx)(Rw.xI,{name:"data.reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,sHe({label:"Reference (optional)"},n))},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.invoice number",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,sHe({label:"Invoice number (optional)"},n))},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.evidence reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,sHe(sHe({},n),{},{label:"Evidence reference (optional)"}))},control:u}),(0,Ze.jsx)(Rw.xI,{name:"data.other reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,sHe(sHe({},n),{},{label:"Other reference (optional)"}))},control:u})]}),o]})};var pHe,mHe,fHe,yHe,gHe,bHe,hHe,vHe=t(29147),xHe=t.n(vHe);function THe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const OHe=(0,D.J1)(pHe||(pHe=THe(["\n  mutation initiateDromoUpload(\n    $transactionType: TransactionType!\n    $accountId: ID!\n    $fileName: String!\n    $dromoId: ID!\n    $isDirectActivity: Boolean\n  ) {\n    initiateDromoUpload(\n      transactionType: $transactionType\n      accountId: $accountId\n      fileName: $fileName\n      dromoId: $dromoId\n      isDirectActivity: $isDirectActivity\n    )\n  }\n"]))),kHe=(0,D.J1)(mHe||(mHe=THe(["\n  query getDromoSchema($transactionType: TransactionType!, $accountId: ID!) {\n    getDromoSchema(transactionType: $transactionType, accountId: $accountId)\n  }\n"]))),jHe=((0,D.J1)(fHe||(fHe=THe(["\n  mutation createPreSignedUploadLink($key: ID!, $accountId: ID!, $batchType: TransactionType!) {\n    createPreSignedUploadLink(key: $key, accountId: $accountId, batchType: $batchType)\n  }\n"]))),(0,D.J1)(yHe||(yHe=THe(["\n  mutation initiateDataOverwriting($key: ID!, $batchType: TransactionType!, $accountId: ID!) {\n    initiateDataOverwriting(key: $key, batchType: $batchType, accountId: $accountId) {\n      ...DataOverwritingStrategyFields\n    }\n  }\n  ","\n"])),xHe()),(0,D.J1)(gHe||(gHe=THe(["\n  mutation scheduleDataOverwritingExecution(\n    $strategyId: ID!\n    $accountId: ID!\n    $batchId: ID!\n    $batchType: TransactionType!\n  ) {\n    scheduleDataOverwritingExecution(\n      strategyId: $strategyId\n      accountId: $accountId\n      batchId: $batchId\n      batchType: $batchType\n    ) {\n      ...DataOverwritingStrategyFields\n    }\n  }\n  ","\n"])),xHe()),(0,D.J1)(bHe||(bHe=THe(["\n  subscription dataOverwritingStrategyUpdated($id: ID!, $batchType: TransactionType!) {\n    dataOverwritingStrategyUpdated(id: $id, batchType: $batchType) {\n      ...DataOverwritingStrategyFields\n    }\n  }\n  ","\n"])),xHe()),(0,D.J1)(hHe||(hHe=THe(["\n  query GetEmissionFactorsPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n    getEmissionFactorsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        id\n        factorKey\n        sourceName\n        factorYear\n        accountingMethod\n        emissionSource\n        emissionSourceType\n        scope\n        type\n        subtype1\n        subtype2\n        subtype3\n        fromUnit\n        toGhgUnit\n        accountId\n        region\n      }\n      totalRows\n    }\n  }\n"])))),CHe=e=>{let{enabled:n=!1,scopes:t,methods:a}=e;const r=rt(),{showNotification:i}=vt(),[o,l]=(0,g.useState)(!1),[s,c]=(0,g.useState)([]),[d]=(0,gs._)(jHe,{variables:{accountId:r,filters:{boolean:[{values:[!1],field:"deprecated",filterType:Vt.pe.Set}],set:[null!=t&&t.length?{values:t.map(e=>e.toString()),field:"scope",filterType:Vt.pe.Set}:null,null!=a&&a.length?{values:a.map(e=>e),field:"method",filterType:Vt.pe.Set}:null].filter(Boolean)}}}),u=(0,g.useCallback)(e=>{let{limit:n,offset:t}=e;return{limit:n,offset:t,accountId:r}},[r]),p=(0,g.useCallback)(e=>e.getEmissionFactorsPage.rows,[]),m=(0,g.useCallback)(e=>e.getEmissionFactorsPage.totalRows,[]),f=(0,g.useMemo)(()=>function(e,n,t,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1e3,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:10;return Si(function*(){const o=n({limit:r,offset:0}),l=yield Ci(e({variables:o}));if(!l.data)return;const s=a(l.data),c=t(l.data),d=Math.ceil(s/r);for(const e of c)yield e;if(d<=1)return;const u=Array.from({length:d-1},(e,n)=>(n+1)*r);for(let a=0;a<u.length;a+=i){const o=u.slice(a,a+i).map(async a=>{const i=n({limit:r,offset:a}),o=await e({variables:i});return{offset:a,items:o.data?t(o.data):[]}}),l=yield Ci(Promise.all(o));for(const e of l.sort((e,n)=>e.offset-n.offset))for(const n of e.items)yield n}})}(d,u,p,m,500),[d,u,p,m]),y=(0,g.useCallback)(async()=>{try{l(!0),c([]);const e=[],n=await $r(f());for(const t of n)e.push(t);c(e),l(!1)}catch(e){i("Error fetching emission factors","danger"),l(!1)}},[f,i]);(0,g.useLayoutEffect)(()=>{n&&y()},[n,y]);const b=(0,g.useMemo)(()=>function(e){const n={};for(const t of e){const{factorYear:e,region:a,sourceName:r,emissionSource:i,type:o,subtype1:l,subtype2:s,subtype3:c,fromUnit:d,toGhgUnit:u}=t;n[e]||(n[e]={}),n[e][a]||(n[e][a]={}),n[e][a][r]||(n[e][a][r]={}),n[e][a][r][i]||(n[e][a][r][i]={}),n[e][a][r][i][o]||(n[e][a][r][i][o]={});const p=n[e][a][r][i][o];p[l]||(p[l]={subtypes2:null,fromUnits:{}});const m=p[l];if(s){m.subtypes2||(m.subtypes2={}),m.subtypes2[s]||(m.subtypes2[s]={subtypes3:null,fromUnits:{}});const e=m.subtypes2[s];if(c){e.subtypes3||(e.subtypes3={}),e.subtypes3[c]||(e.subtypes3[c]={});const n=e.subtypes3[c];n[d]||(n[d]={toGhgUnits:{}}),n[d].toGhgUnits[u]||(n[d].toGhgUnits[u]={})}else e.fromUnits[d]||(e.fromUnits[d]={toGhgUnits:{}}),e.fromUnits[d].toGhgUnits[u]||(e.fromUnits[d].toGhgUnits[u]={})}else m.fromUnits[d]||(m.fromUnits[d]={toGhgUnits:{}}),m.fromUnits[d].toGhgUnits[u]||(m.fromUnits[d].toGhgUnits[u]={})}return n}(s),[s]);return{areEmissionFactorsLoading:o,emissionFactors:s,fetchEmissionFactors:y,validEmissionFactorCombinationTree:b}};function SHe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function NHe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?SHe(Object(t),!0).forEach(function(n){wHe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):SHe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function wHe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const DHe=e=>{var n,t,a,r;let{form:i,onSubmit:o,children:l}=e;const{control:s,setValue:c,watch:d}=i,u=i.getValues(),{validEmissionFactorCombinationTree:p,areEmissionFactorsLoading:m}=CHe({enabled:!0,scopes:[3],methods:["Activity-Based"]}),[y,b,h,v,x,T]=d(["endDate","data.factor set","data.material type","data.subtype 1","data.subtype 2","data.subtype 3"]),O=y?new Date(y).getFullYear():null;(0,g.useEffect)(()=>{c("data.factor set",""),c("data.material type",""),c("data.subtype 1",""),c("data.subtype 2",""),c("data.subtype 3","")},[O]);const k=O?null==p?void 0:p[O]:null,j=k?null==k?void 0:k.Global:null,C=j?null==j||null===(n=j[null==b?void 0:b.value])||void 0===n?void 0:n.Materials:null,S=C?null==C?void 0:C[null==h?void 0:h.value]:null,N=S?null==S||null===(t=S[null==v?void 0:v.value])||void 0===t?void 0:t.subtypes2:null,w=N?null===(a=N[null==x?void 0:x.value])||void 0===a?void 0:a.subtypes3:null,D=S&&null!=v&&v.value&&!N&&!w?S[null==v?void 0:v.value].fromUnits:N&&null!=x&&x.value&&!w?N[null==x?void 0:x.value].fromUnits:w&&null!=T&&T.value?w[null==T?void 0:T.value]:null,A=j?Object.keys(j||{}).map(e=>({value:e,label:e})):[],R=C?Object.keys(C||{}).map(e=>({value:e,label:e})):[],P=S?Object.keys(S||{}).map(e=>({value:e,label:e})):[],L=N?Object.keys(N||{}).map(e=>({value:e,label:e})):[],I=w?Object.keys(w||{}).map(e=>({value:e,label:e})):[],E=D?Object.keys(D||{}).map(e=>({value:e,label:e})):[],[_,F]=(0,g.useState)(!1),B=()=>F(e=>!e),U=Fu(),M=(0,g.useCallback)(e=>{const{data:n,startDate:t,endDate:a,dataFormRowsFillingStrategy:r,dateFrequency:i,dataFormInputStrategy:l}=e,s=wr(n,{startDate:t,endDate:a,dataFormInputStrategy:l,dateFrequency:i,dataFormRowsFillingStrategy:r,dateField:["start date (dd/mm/yyyy)","end date (dd/mm/yyyy)"],divideFields:["weight","total cost"]});o(e,s)},[o]);return(0,Ze.jsxs)(gYe,{onSubmit:M,form:i,showEndDate:!0,transactionType:Vt.D_.S3C1Activitybasedmaterial,children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"small",children:"Please enter the following transactional activity based material data:"}),(0,Ze.jsx)(Rw.xI,{name:"data.location",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ZW,{value:null==t?void 0:t.value,label:"Location",onChange:e=>c("data.location",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Location is required"},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.factor set",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Factor set",value:null==t?void 0:t.value,disabled:m,options:A,helperText:m||A.length?"":"There are no available factor sets for the selected year",onChange:e=>{c("data.factor set",e),c("data.material type",""),c("data.subtype 1",""),c("data.subtype 2",""),c("data.subtype 3","")},error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Factor set is required"},control:s}),b&&(0,Ze.jsx)(Rw.xI,{name:"data.material type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Material type",value:null==t?void 0:t.value,disabled:m,options:R,onChange:e=>{c("data.material type",e),c("data.subtype 1",""),c("data.subtype 2",""),c("data.subtype 3","")},error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Material type is required"},control:s}),h&&(0,Ze.jsx)(Rw.xI,{name:"data.subtype 1",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Subtype 1",value:null==t?void 0:t.value,options:P,onChange:e=>{c("data.subtype 1",e),c("data.subtype 2",""),c("data.subtype 3","")},error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Subtype 1 is required"},control:s}),v&&L.length>0&&(0,Ze.jsx)(Rw.xI,{name:"data.subtype 2",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Subtype 2",value:null==t?void 0:t.value,options:L,onChange:e=>{c("data.subtype 2",e),c("data.subtype 3","")},error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Subtype 2 is required"},control:s}),x&&I.length>0&&(0,Ze.jsx)(Rw.xI,{name:"data.subtype 3",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Subtype 3",value:null==t?void 0:t.value,options:I,onChange:e=>c("data.subtype 3",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Subtype 3 is required"},control:s}),U.has("S3C1ActivityBasedMaterialTransaction.materialDescription")&&(0,Ze.jsx)(Rw.xI,{name:"data.material description",render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.TextField,NHe(NHe({},a),{},{label:"Material description".concat(U.isRequired("S3C1ActivityBasedMaterialTransaction.materialDescription")?"":" (optional)"),helperText:null===(n=r.error)||void 0===n?void 0:n.message,error:!(null===(t=r.error)||void 0===t||!t.message)}))},rules:U.isRequired("S3C1ActivityBasedMaterialTransaction.materialDescription")?{required:"Required"}:{},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.units quantity",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(DYe,NHe(NHe({},t),{},{label:"Number of units",error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Number of units is required"},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.weight",render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(DYe,NHe(NHe({label:"Quantity"},a),{},{error:null===(n=r.error)||void 0===n?void 0:n.message,helperText:null===(t=r.error)||void 0===t?void 0:t.message}))},rules:{required:(null===(r=u.data)||void 0===r||!r.weight)&&"Quantity is required"},control:s}),(null==E?void 0:E.length)>0&&(0,Ze.jsx)(Rw.xI,{name:"data.weight unit",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Units of measurement",value:null==t?void 0:t.value,options:E,onChange:e=>c("data.weight unit",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Units of measurement is required"},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.accuracy",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Act/Est",value:null==t?void 0:t.value,options:[{value:Vt.C.Act,label:"Act"},{value:Vt.C.Est,label:"Est"}],onChange:e=>c("data.accuracy",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Act/Est is required"},control:s}),(0,Ze.jsx)(IYe,{form:i,accuracyAs:"accuracy"}),U.has("S3C1ActivityBasedMaterialTransaction.origin")&&(0,Ze.jsx)(Rw.xI,{name:"data.origin",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Origin".concat(U.isRequired("S3C1ActivityBasedMaterialTransaction.origin")?"":" (optional)"),value:null==t?void 0:t.value,options:Ma.materialOrigins.map(e=>({value:e,label:e})),onChange:e=>c("data.origin",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:U.isRequired("S3C1ActivityBasedMaterialTransaction.origin")?{required:"Required"}:{},control:s}),U.has("S3C1ActivityBasedMaterialTransaction.originOfCertification")&&(0,Ze.jsx)(Rw.xI,{name:"data.origin of certification",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Origin of certification".concat(U.isRequired("S3C1ActivityBasedMaterialTransaction.originOfCertification")?"":" (optional)"),value:null==t?void 0:t.value,options:Ma.certificationOrigins.map(e=>({value:e,label:e})),onChange:e=>c("data.origin of certification",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:U.isRequired("S3C1ActivityBasedMaterialTransaction.originOfCertification")?{required:"Required"}:{},control:s}),U.has("S3C1ActivityBasedMaterialTransaction.percentRecycledContent")&&(0,Ze.jsx)(Rw.xI,{name:"data.percent recycled content",render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(DYe,NHe(NHe({},a),{},{label:"% Recycled content".concat(U.isRequired("S3C1ActivityBasedMaterialTransaction.percentRecycledContent")?"":" (optional)"),helperText:null===(n=r.error)||void 0===n?void 0:n.message,error:!(null===(t=r.error)||void 0===t||!t.message),min:0,max:100}))},rules:U.isRequired("S3C1ActivityBasedMaterialTransaction.percentRecycledContent")?{required:"Required"}:{},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.supplier",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(w3,{value:null==t?void 0:t.value,label:"Supplier",onChange:e=>c("data.supplier",e),error:null===(n=a.error)||void 0===n?void 0:n.message,utility:Vt.D_.Materials,supplierType:Vt.d.Supplier})},rules:{required:"Supplier is required"},control:s}),U.has("S3C1ActivityBasedMaterialTransaction.subcontractor")&&(0,Ze.jsx)(Rw.xI,{name:"data.subcontractor",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(w3,{value:null==t?void 0:t.value,label:"Subcontractor".concat(U.isRequired("S3C1ActivityBasedMaterialTransaction.subcontractor")?"":" (optional)"),onChange:e=>c("data.subcontractor",e),error:null===(n=a.error)||void 0===n?void 0:n.message,utility:Vt.D_.Materials,supplierType:Vt.d.Subcontractor})},rules:U.isRequired("S3C1ActivityBasedMaterialTransaction.subcontractor")?{required:"Required"}:{},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.total cost",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(DYe,NHe(NHe({},t),{},{label:"Total cost (optional)",error:null===(n=a.error)||void 0===n?void 0:n.message}))},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.currency",render:e=>{let{field:n}=e;return(0,Ze.jsx)(SAe,{value:null==n?void 0:n.value,label:"Currency (optional)",onChange:e=>c("data.currency",e)})},control:s}),U.has("S3C1ActivityBasedMaterialTransaction.distanceToSite")&&(0,Ze.jsx)(Rw.xI,{name:"data.distance to site",render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(DYe,NHe(NHe({},a),{},{label:"Distance to location".concat(U.isRequired("S3C1ActivityBasedMaterialTransaction.distanceToSite")?"":" (optional)"),helperText:null===(n=r.error)||void 0===n?void 0:n.message,error:!(null===(t=r.error)||void 0===t||!t.message)}))},rules:U.isRequired("S3C1ActivityBasedMaterialTransaction.distanceToSite")?{required:"Required"}:{},control:s}),U.has("S3C1ActivityBasedMaterialTransaction.numberOfDeliveries")&&(0,Ze.jsx)(Rw.xI,{name:"data.number of deliveries",render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(DYe,NHe(NHe({},a),{},{label:"Number of deliveries".concat(U.isRequired("S3C1ActivityBasedMaterialTransaction.numberOfDeliveries")?"":" (optional)"),helperText:null===(n=r.error)||void 0===n?void 0:n.message,error:!(null===(t=r.error)||void 0===t||!t.message),integer:!0}))},rules:U.isRequired("S3C1ActivityBasedMaterialTransaction.numberOfDeliveries")?{required:"Required"}:{},control:s}),U.has("S3C1ActivityBasedMaterialTransaction.productCode")&&(0,Ze.jsx)(Rw.xI,{name:"data.product code",render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.TextField,NHe(NHe({},a),{},{label:"Product code".concat(U.isRequired("S3C1ActivityBasedMaterialTransaction.productCode")?"":" (optional)"),helperText:null===(n=r.error)||void 0===n?void 0:n.message,error:!(null===(t=r.error)||void 0===t||!t.message)}))},rules:U.isRequired("S3C1ActivityBasedMaterialTransaction.productCode")?{required:"Required"}:{},control:s}),U.has("S3C1ActivityBasedMaterialTransaction.purchaseType")&&(0,Ze.jsx)(Rw.xI,{name:"data.purchase type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,NHe(NHe({},t),{},{label:"Purchase type".concat(U.isRequired("S3C1ActivityBasedMaterialTransaction.purchaseType")?"":" (optional)"),value:null==t?void 0:t.value,options:No(),onChange:e=>c("data.purchase type",e),error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:U.isRequired("S3C1ActivityBasedMaterialTransaction.purchaseType")?{required:"Purchase type is required"}:void 0,control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.notes",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,NHe(NHe({},n),{},{label:"Notes (optional)"}))},control:s}),(0,Ze.jsxs)(OYe,{container:!0,children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:"Do you want to add any references?"}),(0,Ze.jsxs)(f.Grid,{container:!0,children:[(0,Ze.jsx)(f.Checkbox,{name:"Reference",label:"Yes",checked:!!_,onChange:B}),(0,Ze.jsx)(f.Checkbox,{name:"NoReference",label:"No",checked:!_,onChange:B})]})]}),(0,Ze.jsxs)(kYe,{isVisible:_,children:[(0,Ze.jsx)(Rw.xI,{name:"data.reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,NHe({label:"Reference (optional)"},n))},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.invoice number",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,NHe({label:"Invoice number (optional)"},n))},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.evidence reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,NHe(NHe({},n),{},{label:"Evidence reference (optional)"}))},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.other reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,NHe(NHe({},n),{},{label:"Other reference (optional)"}))},control:s})]}),l]})};function AHe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function RHe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?AHe(Object(t),!0).forEach(function(n){PHe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):AHe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function PHe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const LHe=e=>{var n,t,a,r;let{form:i,onSubmit:o,children:l}=e;const{control:s,setValue:c,watch:d}=i,u=i.getValues(),{validEmissionFactorCombinationTree:p,areEmissionFactorsLoading:m}=CHe({enabled:!0,scopes:[3],methods:["Spend-Based"]}),[y,b,h,v,x,T]=d(["endDate","data.country","data.factor set","data.material type","data.subtype 1","data.subtype 2"]),O=y?new Date(y).getFullYear():null,k="object"==typeof b&&null!=(null==b?void 0:b.label)?String(b.label):"string"==typeof b?b:void 0;(0,g.useEffect)(()=>{c("data.country",""),c("data.factor set",""),c("data.material type",""),c("data.subtype 1",""),c("data.subtype 2",""),c("data.subtype 3","")},[O]),(0,g.useEffect)(()=>{c("data.factor set",""),c("data.material type",""),c("data.subtype 1",""),c("data.subtype 2",""),c("data.subtype 3","")},[k]);const j=O?null==p?void 0:p[O]:null,C=k&&j?null==j?void 0:j[k]:null,S=C?null==C||null===(n=C[null==h?void 0:h.value])||void 0===n?void 0:n.Materials:null,N=S?null==S?void 0:S[null==v?void 0:v.value]:null,w=N?null==N||null===(t=N[null==x?void 0:x.value])||void 0===t?void 0:t.subtypes2:null,D=w?null===(a=w[null==T?void 0:T.value])||void 0===a?void 0:a.subtypes3:null,A=j?Object.keys(j||{}).sort((e,n)=>e.localeCompare(n)).map(e=>({value:e,label:e})):[],R=C?Object.keys(C||{}).map(e=>({value:e,label:e})):[],P=S?Object.keys(S||{}).map(e=>({value:e,label:e})):[],L=N?Object.keys(N||{}).map(e=>({value:e,label:e})):[],I=w?Object.keys(w||{}).map(e=>({value:e,label:e})):[],E=D?Object.keys(D||{}).map(e=>({value:e,label:e})):[],[_,F]=(0,g.useState)(!1),B=()=>F(e=>!e),U=Fu(),M=(0,g.useCallback)(e=>{const{data:n,startDate:t,endDate:a,dataFormRowsFillingStrategy:r,dateFrequency:i,dataFormInputStrategy:l}=e,s=wr(n,{startDate:t,endDate:a,dataFormInputStrategy:l,dateFrequency:i,dataFormRowsFillingStrategy:r,dateField:["start date (dd/mm/yyyy)","end date (dd/mm/yyyy)"],divideFields:["amount"]});o(e,s)},[o]);return(0,Ze.jsxs)(gYe,{onSubmit:M,form:i,showEndDate:!0,transactionType:Vt.D_.S3C1Spendbasedmaterial,children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"small",children:"Please enter the following transactional activity based material data:"}),(0,Ze.jsx)(Rw.xI,{name:"data.location",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(ZW,{value:null==t?void 0:t.value,label:"Location",onChange:e=>c("data.location",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Location is required"},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.country",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Country of spend",value:null==t?void 0:t.value,disabled:m,options:A,helperText:m||A.length||!O?O?"":"Please select an end date first":"There are no available countries for the selected year",onChange:e=>{c("data.country",e),c("data.factor set",""),c("data.material type",""),c("data.subtype 1",""),c("data.subtype 2",""),c("data.subtype 3","")},error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Country is required"},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.supplier",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(w3,{value:null==t?void 0:t.value,label:"Supplier",onChange:e=>c("data.supplier",e),error:null===(n=a.error)||void 0===n?void 0:n.message,utility:Vt.D_.Materials,supplierType:Vt.d.Supplier})},rules:{required:"Supplier is required"},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.factor set",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Factor set",value:null==t?void 0:t.value,disabled:m,options:R,helperText:m||R.length?"":"There are no available factor sets for the selected year",onChange:e=>{c("data.factor set",e),c("data.material type",""),c("data.subtype 1",""),c("data.subtype 2",""),c("data.subtype 3","")},error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Factor set is required"},control:s}),h&&(0,Ze.jsx)(Rw.xI,{name:"data.material type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Material type",value:null==t?void 0:t.value,disabled:m,options:P,onChange:e=>{c("data.material type",e),c("data.subtype 1",""),c("data.subtype 2",""),c("data.subtype 3","")},error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Material type is required"},control:s}),v&&(0,Ze.jsx)(Rw.xI,{name:"data.subtype 1",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Subtype 1",value:null==t?void 0:t.value,options:L,onChange:e=>{c("data.subtype 1",e),c("data.subtype 2",""),c("data.subtype 3","")},error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Subtype 1 is required"},control:s}),x&&I.length>0&&(0,Ze.jsx)(Rw.xI,{name:"data.subtype 2",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Subtype 2",value:null==t?void 0:t.value,options:I,onChange:e=>{c("data.subtype 2",e),c("data.subtype 3","")},error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Subtype 2 is required"},control:s}),T&&E.length>0&&(0,Ze.jsx)(Rw.xI,{name:"data.subtype 3",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Subtype 3",value:null==t?void 0:t.value,options:E,onChange:e=>c("data.subtype 3",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Subtype 3 is required"},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.amount",render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(DYe,RHe(RHe({label:"Amount of spend"},a),{},{error:null===(n=r.error)||void 0===n?void 0:n.message,helperText:null===(t=r.error)||void 0===t?void 0:t.message}))},rules:{required:(null===(r=u.data)||void 0===r||!r.amount)&&"Amount is required"},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.accuracy",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,{label:"Act/Est",value:null==t?void 0:t.value,options:[{value:Vt.C.Act,label:"Act"},{value:Vt.C.Est,label:"Est"}],onChange:e=>c("data.accuracy",e),error:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Act/Est is required"},control:s}),(0,Ze.jsx)(IYe,{form:i,accuracyAs:"accuracy"}),(0,Ze.jsx)(Rw.xI,{name:"data.currency",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(SAe,{value:null==t?void 0:t.value,label:"Currency",onChange:e=>c("data.currency",e),errorMessage:null===(n=a.error)||void 0===n?void 0:n.message})},rules:{required:"Currency is required"},control:s}),U.has("S3C1SpendBasedMaterialTransaction.purchaseType")&&(0,Ze.jsx)(Rw.xI,{name:"data.purchase type",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(cEe,RHe(RHe({},t),{},{label:"Purchase type".concat(U.isRequired("S3C1SpendBasedMaterialTransaction.purchaseType")?"":" (optional)"),value:null==t?void 0:t.value,options:No(),onChange:e=>c("data.purchase type",e),error:null===(n=a.error)||void 0===n?void 0:n.message}))},rules:{required:"Purchase type is required"},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.notes",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,RHe(RHe({},n),{},{label:"Notes (optional)"}))},control:s}),(0,Ze.jsxs)(OYe,{container:!0,children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:"Do you want to add any references?"}),(0,Ze.jsxs)(f.Grid,{container:!0,children:[(0,Ze.jsx)(f.Checkbox,{name:"Reference",label:"Yes",checked:!!_,onChange:B}),(0,Ze.jsx)(f.Checkbox,{name:"NoReference",label:"No",checked:!_,onChange:B})]})]}),(0,Ze.jsxs)(kYe,{isVisible:_,children:[(0,Ze.jsx)(Rw.xI,{name:"data.reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,RHe({label:"Reference (optional)"},n))},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.invoice number",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,RHe({label:"Invoice number (optional)"},n))},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.evidence reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,RHe(RHe({},n),{},{label:"Evidence reference (optional)"}))},control:s}),(0,Ze.jsx)(Rw.xI,{name:"data.other reference",render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.TextField,RHe(RHe({},n),{},{label:"Other reference (optional)"}))},control:s})]}),l]})};var IHe;function EHe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function _He(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?EHe(Object(t),!0).forEach(function(n){FHe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):EHe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function FHe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const BHe=(0,f.styled)("div")(IHe||(IHe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n"]))),UHe=e=>{let{startDate:n,endDate:t,uploadReference:a}=e;const r="DD-MM-YYYY",i=t?"—".concat(Ht(t,r)):"",o="".concat(Ht(n,r)).concat(i),l=a.replace(/[^a-zA-Z0-9]/g," ");return"".concat(o," ").concat(l)},MHe=e=>{let{onDismiss:n,dataSection:t,onSubmit:a,open:r}=e;const[,i]=(0,g.useState)(),{showNotification:o}=vt(),l=(0,Rw.mN)({mode:"onSubmit",reValidateMode:"onBlur",defaultValues:{uploadReference:""}}),{reset:s,control:c}=l;(0,g.useEffect)(()=>{r||s()},[r,s]);const d=(0,g.useCallback)((e,n)=>{n.length>=1e5?o("Number of rows cannot exceed 100,000","warning"):(i(e),a(n,{fileName:UHe(e),isDirectActivity:t!==Vt.D_.Waste&&(null==e?void 0:e.activity)===uIe}))},[o,a,t]),u=(e=>{switch(e){case Vt.D_.Waste:return BYe;case Vt.D_.Electricity:case Vt.D_.Gas:case Vt.D_.Heatsteam:return eHe;case Vt.D_.Water:return KYe;case Vt.D_.Transport:return oHe;case Vt.D_.Hotelstays:return uHe;case Vt.D_.S3C1Activitybasedmaterial:return DHe;case Vt.D_.S3C1Spendbasedmaterial:return LHe;default:return null}})(t);return u?(0,Ze.jsx)(f.Modal,{title:"Direct data upload",open:r,viewportHeight:90,onClose:()=>n(),children:(0,Ze.jsx)(u,{form:l,onSubmit:d,dataSection:t,children:(0,Ze.jsxs)(BHe,{children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:"Upload reference"}),(0,Ze.jsx)(Rw.xI,{name:"uploadReference",render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(jYe,_He(_He({},t),{},{error:!!a.error,helperText:!!a.error&&(null===(n=a.error)||void 0===n?void 0:n.message),label:"Enter a brief description for this upload, such as your organization name, relevant tag, department, region, or location."}))},defaultValue:"",control:c,rules:{required:"Upload reference is required",maxLength:80}})]})})}):null};var VHe,zHe;function GHe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(0,f.styled)("div")(VHe||(VHe=GHe(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  padding: 4px;\n  z-index: 1000;\n"])));const $He=(0,f.styled)(f.Button)(zHe||(zHe=GHe(["\n  height: 40px;\n"]))),WHe=kn("REACT_APP_DROMO_LICENSE_KEY"),qHe=e=>{var n,t;let{transactionType:a,iconOnly:r,onCompleted:i,onSubmit:o}=e;const{showNotification:l}=vt(),s=rt(),c=Fy(),{data:d}=function(e){return(0,h.IT)(kHe,e)}({variables:{transactionType:a,accountId:s},notifyOnNetworkStatusChange:!0,onError:()=>{l("Could not retrieve Dromo Schema for ".concat(a),"danger")}}),u=Pu(),p=_u(),[m]=function(e){return(0,Ot.n)(OHe,e)}({onCompleted:i}),y=(0,g.useRef)(null),[b,v]=(0,g.useState)(!1),x=(0,g.useRef)(null),{validEmissionFactorCombinationTree:T,areEmissionFactorsLoading:O}=CHe({enabled:a===Vt.D_.S3C1Activitybasedmaterial||a===Vt.D_.S3C1Spendbasedmaterial,scopes:[3],methods:[a===Vt.D_.S3C1Activitybasedmaterial?"Activity-Based":"Spend-Based"]}),k=(0,g.useMemo)(()=>"".concat(a,"_").concat((new Date).toISOString()),[a]),{fields:j,data:C}=(0,g.useMemo)(()=>f_e(null==d?void 0:d.getDromoSchema),[null==d?void 0:d.getDromoSchema]),S=QFe(a,C,T),N=(0,g.useCallback)(async(e,n)=>{if(!n.id)return l("Sorry, we couldn't upload your data. Please try again later.","danger");await m({variables:{transactionType:a,accountId:s,fileName:n.filename||k,dromoId:n.id,isDirectActivity:x.current}}),x.current=null},[s,m,a,l,k]),w=(0,g.useCallback)(()=>{v(!0)},[]),D=(0,g.useCallback)(()=>{v(!1)},[]),A=(0,g.useCallback)(async()=>{var e;await Qo(()=>!!y.current,100,5e3),null===(e=y.current)||void 0===e||e.open()},[]),R=(0,g.useCallback)(()=>{var e;null===(e=y.current)||void 0===e||null===(e=e.dromo)||void 0===e||e.close()},[]),P=(0,g.useCallback)(async(e,n)=>{const t=await o(e,n.filename||k,x.current);if(t)return t.abort&&setTimeout(R,500),t.validation?t.validation:void 0},[o,R,k]),L=(0,g.useCallback)(()=>{QPe[a]?w():A()},[a,A,w]),I={id:(null==p?void 0:p.id)||"",name:"".concat(null==p?void 0:p.first_name," ").concat(null==p?void 0:p.last_name),email:null==p?void 0:p.email,companyId:s,companyName:null==u?void 0:u.name};return(0,Ze.jsxs)(Ze.Fragment,{children:[r?(0,Ze.jsx)(f.IconButton,{variant:"contained",name:"DromoUploaderButton__uploadDataButton",onClick:c?L:void 0,disabled:O||!c,children:(0,Ze.jsx)(f.CustomIcons.Upload,{color:"onPrimary"})}):(0,Ze.jsx)($He,{variant:"contained",name:"DromoUploaderButton__uploadDataButton",startIcon:(0,Ze.jsx)(f.CustomIcons.Upload,{color:"onPrimary"}),onClick:c?A:void 0,disabled:O||!c,children:"Upload"}),(0,Ze.jsx)(Z$,{open:b,title:null===(n=QPe[a])||void 0===n?void 0:n.header,body:null===(t=QPe[a])||void 0===t?void 0:t.text,onClose:()=>{D()},onCloseButtonClick:()=>{x.current=!1,D(),A()},onConfirm:()=>{x.current=!0,D(),A()},confirmButtonText:"Yes",closeButtonText:"No"}),!(null==j||!j.length)&&S&&(0,Ze.jsx)(VU.A,{licenseKey:WHe,settings:S.settings,fields:j,user:I,style:{display:"none"},onResults:N,onCancel:()=>{x.current=null},ref:y,bulkRowHooks:S.bulkRowHooks,beforeFinish:P,children:"Upload Data"})]})};var JHe,YHe,HHe,KHe,QHe;function ZHe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function XHe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ZHe(Object(t),!0).forEach(function(n){eKe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ZHe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function eKe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function nKe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const tKe=(0,f.styled)("div")(JHe||(JHe=nKe(["\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  padding: 16px;\n  border-radius: 16px;\n  border: 1px solid ",";\n  background-color: ",";\n"])),e=>e.theme.ref.palette.neutral[70],e=>e.theme.ref.palette.neutral[90]),aKe=(0,f.styled)(f.Text)(YHe||(YHe=nKe(["\n  margin-bottom: 16px;\n"]))),rKe=(0,f.styled)("div")(HHe||(HHe=nKe(["\n  margin-bottom: 16px;\n"]))),iKe=(0,f.styled)("ul")(KHe||(KHe=nKe(["\n  list-style-type: disc;\n  margin-bottom: 12px;\n"]))),oKe=(0,f.styled)("li")(QHe||(QHe=nKe(["\n  margin-left: 20px;\n"])));function lKe(e){let{errors:n,errorsCount:t}=e;const a=(0,g.useMemo)(()=>n.filter(Boolean).reduce((e,n)=>{var t;const a=null===(t=n.rows)||void 0===t?void 0:t.split(",");return null!=a&&a.length?e.concat(a.map(e=>XHe(XHe({},n),{},{row:e}))):e.concat([n])},[]),[n]),r=(0,g.useMemo)(()=>Object.keys(Gt()(a).groupBy("row").value()).length,[a]),i=(0,g.useMemo)(()=>Gt()(a).groupBy("row").map((e,n)=>(0,Ze.jsxs)(rKe,{children:[(0,Ze.jsxs)(f.Text,{typescale:"title",size:"large",children:["Row ",n,":"]}),Gt()(e).filter(Boolean).groupBy(e=>Gt().capitalize(e.fieldName||"")||"Other errors").map((e,n)=>(0,Ze.jsxs)(iKe,{children:[(0,Ze.jsxs)(f.Text,{typescale:"title",size:"medium",children:[n,":"]}),e.map(e=>{var n,t;return(0,Ze.jsxs)(oKe,{children:[null!==(n=e.message)&&void 0!==n&&n.includes("Something unexpected happened")||null!==(t=e.message)&&void 0!==t&&t.includes("0 rows")?(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",weight:e.actionRequired?"normal":"bold",children:e.message}):(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",weight:e.actionRequired?"normal":"bold",children:"You've provided: \"".concat(e.value,'". ').concat(e.message)}),e.actionRequired&&(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:"Field can be aliased."})]},JSON.stringify(e))})]},n)).value()]},n)).value(),[a]);return(0,Ze.jsxs)(tKe,{children:[(0,Ze.jsxs)(aKe,{typescale:"body",size:"large",children:["Showing ",t," errors in ",r," rows:"]}),i]})}var sKe,cKe,dKe,uKe,pKe;function mKe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const fKe=(0,f.styled)("div")(sKe||(sKe=mKe(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n"]))),yKe=(0,f.styled)("div")(cKe||(cKe=mKe(["\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  padding: 16px;\n  border-radius: 16px;\n  border: 1px solid ",";\n  background-color: ",";\n"])),e=>e.theme.ref.palette.neutral[70],e=>e.theme.ref.palette.neutral[90]),gKe=(0,f.styled)(f.Text)(dKe||(dKe=mKe(["\n  text-align: center;\n  margin-bottom: 16px;\n"]))),bKe=(0,f.styled)("div")(uKe||(uKe=mKe(["\n  width: 100%;\n  height: 100%;\n  display: flex;\n  align-items: center;\n  padding: 16px;\n"]))),hKe=(0,f.styled)(f.LinearProgress)(pKe||(pKe=mKe(["\n  width: 100%;\n"])));function vKe(e){let{batchId:n,withTitle:t=!0}=e;const{data:a,error:r,loading:i,refetch:o}=(0,h.IT)(V7,{variables:{id:n},fetchPolicy:"network-only",notifyOnNetworkStatusChange:!0}),{getDataImportBatchById:l}=a||{};return(0,Ze.jsxs)(fKe,{children:[i&&(0,Ze.jsx)(bKe,{children:(0,Ze.jsx)(hKe,{variant:"indeterminate"})}),r&&(0,Ze.jsx)(f.LoadFailed,{title:"Something went wrong",error:r,retry:o}),!i&&!r&&l&&(0,Ze.jsxs)(Ze.Fragment,{children:[t&&(0,Ze.jsx)(gKe,{typescale:"title",size:"medium",children:"Batch Errors"}),l.failedReason?(0,Ze.jsx)(yKe,{children:(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:l.failedReason})}):(0,Ze.jsx)(lKe,{errors:l.errors,errorsCount:l.errorsCount})]})]})}var xKe;const TKe=(0,f.styled)(f.Text)(xKe||(xKe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  text-decoration: underline;\n  cursor: pointer;\n"]))).withComponent("span"),OKe=e=>{let{data:n}=e;const t=(0,N.m)(),{showNotification:a}=vt(),r=(0,g.useCallback)(async()=>{try{const{data:{getDataImportBatchImportFileUrl:e}}=await t.query({query:TLe,variables:{id:n.id}});e&&await Ar(e)}catch(e){a("Something went wrong. ".concat(e),"danger")}},[t,n,a]);return n.fileName?n.isOverwriting?n.fileName:(0,Ze.jsx)(TKe,{size:"medium",typescale:"body",title:"Click to download your source file",onClick:r,children:n.fileName}):null};var kKe,jKe;function CKe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const SKe=(0,f.styled)("span")(kKe||(kKe=CKe(["\n  display: inline-flex;\n  place-items: center;\n  ","\n"])),e=>e.isV2?"padding-top: 8px;":""),NKe=(0,f.styled)("span")(jKe||(jKe=CKe(["\n  display: inline-flex;\n  place-items: center;\n  margin: 0 10px;\n"]))),wKe={[vR.DONE]:"Click to export data",[vR.ACTION_REQUIRED]:"Click to proceed",[vR.EXTERNAL_ACTION_REQUIRED]:"Click to proceed",[vR.FAILED]:"Click to view errors"},DKe=e=>{var n;let{data:t,download:a,defineStatusProps:r,done:i,pending:o,abandoned:l,failed:s,actionRequired:c,statusLink:d,onActionClick:u,onDataClick:p,onErrorClick:m}=e;const y=st(),g=(0,Sg.A)(),b=(0,f.useTheme)(),h=y?b:g,{token:v}=at(),x=rc(),T=(null==t||null===(n=t.user)||void 0===n||null===(n=n.id)||void 0===n?void 0:n.toLowerCase())===v.sub,O=pUe(t.status),k=r(t,h,m,p,u);return(0,Ze.jsxs)(SKe,{isV2:y,title:wKe[O],children:[(0,Ze.jsxs)(NKe,{children:[O===vR.DONE&&i,O===vR.ACTION_REQUIRED&&c,O===vR.ABANDONED&&l,O===vR.FAILED&&s,O===vR.PENDING&&o,O===vR.EXTERNAL_ACTION_REQUIRED&&c]}),d(O,!!t.isLegacy,()=>m(t),()=>p(t),()=>u(t),k,null==a?void 0:a[t.id],x,T,O===vR.ACTION_REQUIRED)]})};var AKe;const RKe=(0,f.styled)(f.Text)(AKe||(AKe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}([""]))).withComponent("span"),PKe=e=>{let{data:n,onDeleteClick:t,onRollbackClick:a}=e;const{token:r}=at(),i=rc(),o=(0,g.useMemo)(()=>{var e;return(null===(e=n.user)||void 0===e?void 0:e.id)===r.sub},[n,r]),l=(0,g.useMemo)(()=>["Failed","Action Required","Rolled Back"].includes(n.status)&&!!i.data.find(e=>e.startsWith("deleteImportBatch")&&!e.endsWith("Own"))||i.data.includes("deleteImportBatchOwn")&&o,[i,n.status,o]),s="Completed"===n.status&&((e,n,t)=>{var a,r;return!(null===(a=e.data)||void 0===a||!a.find(e=>{var t,a;return(null==e||null===(t=e.startsWith)||void 0===t?void 0:t.call(e,n))&&!(null!=e&&null!==(a=e.endsWith)&&void 0!==a&&a.call(e,"Own"))}))||(null===(r=e.data)||void 0===r?void 0:r.includes("".concat(n,"Own")))&&t})(i,"rollbackImportBatch",o);return s?(0,Ze.jsx)(RKe,{onClick:()=>a(n.id),sx:{textDecoration:"underline",cursor:"pointer"},children:"Roll Back"}):l?(0,Ze.jsx)(RKe,{onClick:()=>t(n.id),sx:{textDecoration:"underline",cursor:"pointer"},children:"Delete"}):null};var LKe,IKe;function EKe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _Ke=(0,f.styled)("div")(LKe||(LKe=EKe(["\n  display: flex;\n  justify-content: flex-end;\n  gap: 8px;\n"]))),FKe=(0,f.styled)(f.AgGrid)(IKe||(IKe=EKe(["\n  height: calc(100vh - 216px); // header + page title height\n  padding-bottom: 2px; // border bottom and shadow to show properly\n\n  "," {\n    height: calc(100vh - 268px); // header + page title height in lg\n  }\n"])),e=>{let{theme:n}=e;return n.breakpoints.down("lg")});function BKe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function UKe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?BKe(Object(t),!0).forEach(function(n){MKe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):BKe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function MKe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function VKe(e){const[n,t]=(0,g.useState)(null),[a,r]=(0,g.useState)(null),[i,o]=(0,g.useState)(null),[l,s]=(0,g.useState)(null),c=(0,N.m)(),d=(0,m.Zp)(),u=rt(),p=Os();return{confirmQuickViewId:a,confirmRollbackId:i,confirmDeleteId:n,erroredRowId:l,handleErrorClick:(0,g.useCallback)(e=>s((null==e?void 0:e.id)||null),[s]),handleDeleteClick:(0,g.useCallback)(e=>{t(e)},[t]),handleQuickviewClick:(0,g.useCallback)(e=>{r(e)},[r]),handleRollbackClick:(0,g.useCallback)(e=>{o(e)},[o]),handleDownloadClick:(0,g.useCallback)(async n=>{const t=new Date,a="".concat(t.toLocaleDateString()," - ").concat(t.toLocaleTimeString()," - ").concat(e.toLowerCase()," export"),r=n.fileName||a;await p(r,e,n.id)},[p,e]),handleActionClick:(0,g.useCallback)(e=>d("".concat(location.pathname,"/alias/").concat(e.id)),[d]),fetchRows:(0,g.useCallback)(async n=>{const{data:{getDataImportBatchesPage:{rows:t,totalRows:a}}}=await c.query({query:OLe,variables:UKe(UKe({},n),{},{accountId:u,type:e}),fetchPolicy:"network-only"});return{rows:t,totalRows:a}},[u,c,e])}}const zKe=e=>{let{data:n,onSummaryClick:t}=e;const a=(0,f.useTheme)(),r=(0,g.useCallback)(()=>{t(n.id)},[t,n]);return"Completed"!==n.status?null:(0,Ze.jsx)(f.Icons.Visibility,{onClick:r,sx:{color:a.sys.color.primary,marginTop:"12px",cursor:"pointer"}})};var GKe;const $Ke=(0,f.styled)(f.Text)(GKe||(GKe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}([""]))).withComponent("span"),WKe=(e,n,t)=>!!e.data.find(e=>e.startsWith(n)&&!e.endsWith("Own"))||e.data.includes("".concat(n,"Own"))&&t,qKe=(e,n)=>{switch(e){case vR.DONE:return"Success";case vR.FAILED:return"Error";default:return n}},JKe=(e,n,t,a,r,i,o,l,s,c)=>{const d=WKe(l,"exportImportBatch",s),u=WKe(l,"editImportBatch",s),p=e===vR.DONE&&d,m=e===vR.ACTION_REQUIRED&&u,y=e===vR.FAILED;return e===vR.EXTERNAL_ACTION_REQUIRED&&u?(0,Ze.jsx)($Ke,{size:"medium",typescale:"body",sx:{textDecoration:"underline",cursor:"pointer"},onClick:null==i?void 0:i.onClick,children:null==i?void 0:i.linkText}):c||((e,n)=>(e===vR.DONE||e===vR.FAILED||e===vR.ACTION_REQUIRED)&&!n)(e,!!n)&&(p||m||y)?(0,Ze.jsx)(f.Text,{size:"medium",typescale:"body",sx:{textDecoration:"underline",cursor:"pointer"},onClick:()=>{switch(e){case vR.FAILED:return t();case vR.DONE:return a();case vR.ACTION_REQUIRED:return r()}},children:o?"Downloading":null==i?void 0:i.linkText}):(0,Ze.jsx)(f.Text,{size:"medium",typescale:"body",children:qKe(e,null==i?void 0:i.linkText)})};var YKe,HKe,KKe,QKe,ZKe,XKe;function eQe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const nQe=(0,D.J1)(YKe||(YKe=eQe(["\n  mutation createPreSignedUploadLink($key: ID!, $accountId: ID!, $batchType: TransactionType!) {\n    createPreSignedUploadLink(key: $key, accountId: $accountId, batchType: $batchType)\n  }\n"]))),tQe=(0,D.J1)(HKe||(HKe=eQe(["\n  mutation initiateDataOverwriting(\n    $key: ID!\n    $batchType: TransactionType!\n    $accountId: ID!\n    $customDuplicationKey: [String!]!\n  ) {\n    initiateDataOverwriting(\n      key: $key\n      batchType: $batchType\n      accountId: $accountId\n      customDuplicationKey: $customDuplicationKey\n    ) {\n      ...DataOverwritingStrategyFields\n    }\n  }\n  ","\n"])),xHe()),aQe=(0,D.J1)(KKe||(KKe=eQe(["\n  mutation scheduleDataOverwritingExecution(\n    $strategyId: ID!\n    $accountId: ID!\n    $batchId: ID!\n    $batchType: TransactionType!\n  ) {\n    scheduleDataOverwritingExecution(\n      strategyId: $strategyId\n      accountId: $accountId\n      batchId: $batchId\n      batchType: $batchType\n    ) {\n      ...DataOverwritingStrategyFields\n    }\n  }\n  ","\n"])),xHe()),rQe=(0,D.J1)(QKe||(QKe=eQe(["\n  mutation CancelDataOverwritingExecution($strategyId: ID!, $accountId: ID!, $batchType: TransactionType!) {\n    cancelDataOverwritingExecution(strategyId: $strategyId, accountId: $accountId, batchType: $batchType) {\n      ...DataOverwritingStrategyFields\n    }\n  }\n  ","\n"])),xHe()),iQe=(0,D.J1)(ZKe||(ZKe=eQe(["\n  subscription dataOverwritingStrategyUpdated($id: ID!, $batchType: TransactionType!) {\n    dataOverwritingStrategyUpdated(id: $id, batchType: $batchType) {\n      ...DataOverwritingStrategyFields\n    }\n  }\n  ","\n"])),xHe()),oQe=(0,D.J1)(XKe||(XKe=eQe(["\n  query GetPossibleDataOverwritingKeys($batchType: TransactionType!) {\n    getPossibleDataOverwritingKeys(batchType: $batchType) {\n      keys {\n        key\n        label\n      }\n      defaultKey\n    }\n  }\n"]))),lQe="Failed to analyse historical data for duplicates, please try again later",sQe=[Vt.D_.Waste,Vt.D_.Electricity,Vt.D_.Gas,Vt.D_.Heatsteam,Vt.D_.Water,Vt.D_.Refrigerant,Vt.D_.Materials,Vt.D_.Fuel,Vt.D_.Transport];const cQe=[{field:"meter name",headerName:"Meter name",filter:"agSetColumnFilter"},{field:"tariff",headerName:"Tariff",filter:"agSetColumnFilter"},{field:"start date (dd/mm/yyyy)",headerName:"Start date (dd/mm/yyyy)",filter:"agDateColumnFilter",valueFormatter:da,sort:"asc"},{field:"start time (hh:mm)",headerName:"Start time (hh:mm)"},{field:"end date (dd/mm/yyyy)",headerName:"End date (dd/mm/yyyy)",filter:"agDateColumnFilter",valueFormatter:da},{field:"end time (hh:mm)",headerName:"End time (hh:mm)"},{field:"quantity (kwh)",headerName:"Quantity (kWh)",filter:"agNumberColumnFilter"},{field:"act/est",headerName:"Act/Est",filter:"agSetColumnFilter"},{field:"estimates scenario",headerName:"Estimates Scenario",filter:"agSetColumnFilter"},{field:"total cost",headerName:"Total cost",filter:"agNumberColumnFilter"},{field:"charge/kwh",headerName:"Charge/kWh",filter:"agNumberColumnFilter"},{field:"currency",headerName:"Currency",filter:"agSetColumnFilter"},{field:"comment",headerName:"Comment",filter:"agTextColumnFilter"},{field:"supplier",headerName:"Supplier",filter:"agSetColumnFilter"},{field:"invoice number",headerName:"Invoice number",filter:"agTextColumnFilter"},{field:"evidence reference",headerName:"Evidence reference",filter:"agTextColumnFilter"},{field:"other reference",headerName:"Other reference",filter:"agTextColumnFilter"}];let dQe=function(e){return e.Options="options",e.Values="values",e.Labels="labels",e}({});const uQe=[{field:"meter name",headerName:"Meter",filter:"agSetColumnFilter"},{field:"start date (dd/mm/yyyy)",headerName:"Start date",valueFormatter:da,sort:"asc"},{field:"end date (dd/mm/yyyy)",headerName:"End date",valueFormatter:da},{field:"reading",headerName:"Reading"},{field:"quantity (m3)",headerName:"Quantity (m³)"},{field:"act/est",headerName:"Act/Est",filter:"agSetColumnFilter"},{field:"estimates scenario",headerName:"Estimates Scenario",filter:"agSetColumnFilter"},{field:"tariff (£/m3)",headerName:"Tariff (£/m³)"},{field:"total cost",headerName:"Total cost"},{field:"currency",headerName:"Currency",filter:"agSetColumnFilter"},{field:"comment",headerName:"Comment"},{field:"supplier",headerName:"Supplier",filter:"agSetColumnFilter"},{field:"invoice number",headerName:"Invoice number"},{field:"evidence reference",headerName:"Evidence reference"},{field:"other reference",headerName:"Other reference"}],pQe=[{field:"individual collection date",headerName:"Individual collection date",filter:"agDateColumnFilter",valueFormatter:da,sort:"asc"},{field:"waste in location",headerName:"Waste in location",filter:"agSetColumnFilter"},{field:"waste out location",headerName:"Waste out location",filter:"agSetColumnFilter"},{field:"waste stream",headerName:"Waste stream",filter:"agSetColumnFilter"},{field:"waste contractor",headerName:"Waste contractor",filter:"agSetColumnFilter"},{field:"waste carrier",headerName:"Waste carrier",filter:"agSetColumnFilter"},{field:"treatment process",headerName:"Treatment process",filter:"agSetColumnFilter"},{field:"number of collections",headerName:"Number of collections",filter:"agNumberColumnFilter"},{field:"number of containers",headerName:"Number of containers",filter:"agNumberColumnFilter"},{field:"container type",headerName:"Container type",filter:"agSetColumnFilter"},{field:"quantity",headerName:"Quantity",filter:"agNumberColumnFilter"},{field:"unit of weight",headerName:"Unit of weight",filter:"agSetColumnFilter"},{field:"act/est",headerName:"Act/Est",filter:"agSetColumnFilter"},{field:"estimates scenario",headerName:"Estimates Scenario",filter:"agSetColumnFilter"},{field:"gate fee",headerName:"Gate fee",filter:"agNumberColumnFilter"},{field:"management fee",headerName:"Management fee",filter:"agNumberColumnFilter"},{field:"bin hire",headerName:"Bin hire",filter:"agNumberColumnFilter"},{field:"bin exchange",headerName:"Bin exchange",filter:"agNumberColumnFilter"},{field:"transport charge",headerName:"Transport charge",filter:"agNumberColumnFilter"},{field:"lift charge",headerName:"Lift charge",filter:"agNumberColumnFilter"},{field:"equipment hire",headerName:"Equipment hire",filter:"agNumberColumnFilter"},{field:"labour cost",headerName:"Labour cost",filter:"agNumberColumnFilter"},{field:"misc cost",headerName:"Misc cost",filter:"agNumberColumnFilter"},{field:"misc cost rate",headerName:"Misc cost rate",filter:"agNumberColumnFilter"},{field:"rebate",headerName:"Rebate",filter:"agNumberColumnFilter"},{field:"penalty",headerName:"Penalty",filter:"agNumberColumnFilter"},{field:"notes",headerName:"Notes",filter:"agTextColumnFilter"},{field:"project phase",headerName:"Project phase",filter:"agTextColumnFilter"},{field:"reference",headerName:"Reference",filter:"agTextColumnFilter"},{field:"waste transfer note id",headerName:"Waste transfer note ID",filter:"agTextColumnFilter"},{field:"consignment note (ea) id",headerName:"Consignment note (EA) ID",filter:"agTextColumnFilter"},{field:"consignment note (sepa) id",headerName:"Consignment note (SEPA) ID",filter:"agTextColumnFilter"},{field:"sales order id",headerName:"Sales order ID",filter:"agTextColumnFilter"},{field:"invoice number",headerName:"Invoice number",filter:"agTextColumnFilter"},{field:"evidence reference",headerName:"Evidence reference",filter:"agTextColumnFilter"},{field:"other reference",headerName:"Other reference",filter:"agTextColumnFilter"},{field:"currency",headerName:"Currency",filter:"agSetColumnFilter"}],mQe=[{field:"date (dd/mm/yyyy)",headerName:"Date",filter:"agDateColumnFilter",valueFormatter:da,sort:"asc"},{field:"location",headerName:"Location",filter:"agSetColumnFilter"},{field:"material",headerName:"Material",filter:"agSetColumnFilter"},{field:"origin",headerName:"Origin",filter:"agSetColumnFilter"},{field:"supplier",headerName:"Supplier",filter:"agSetColumnFilter"},{field:"product code",headerName:"Product code",filter:"agTextColumnFilter"},{field:"quantity (number of units)",headerName:"Quantity (units)",filter:"agSetColumnFilter"},{field:"quantity (weight)",headerName:"Quantity (weight)",filter:"agNumberColumnFilter"},{field:"quantity (weight) units",headerName:"Weight units",filter:"agSetColumnFilter"},{field:"total cost",headerName:"Total cost",filter:"agNumberColumnFilter"},{field:"currency",headerName:"Currency",filter:"agSetColumnFilter"},{field:"notes",headerName:"Notes",filter:"agTextColumnFilter"},{field:"reference",headerName:"Reference",filter:"agTextColumnFilter"},{field:"invoice number",headerName:"Invoice number",filter:"agTextColumnFilter"},{field:"evidence reference",headerName:"Evidence reference",filter:"agTextColumnFilter"},{field:"other reference",headerName:"Other reference",filter:"agTextColumnFilter"},{field:"material subcategory",headerName:"Material subcategory",filter:"agTextColumnFilter"},{field:"material details",headerName:"Material details",filter:"agTextColumnFilter"},{field:"material description",headerName:"Material description",filter:"agTextColumnFilter"},{field:"subcontractor",headerName:"Subcontractor",filter:"agTextColumnFilter"},{field:"distance to location",headerName:"Distance to location",filter:"agNumberColumnFilter"},{field:"percent recycled content",headerName:"% recycled content",filter:"agNumberColumnFilter"},{field:"number of deliveries",headerName:"Number of deliveries",filter:"agNumberColumnFilter"},{field:"origin of certification",headerName:"Origin of certification",filter:"agTextColumnFilter"}],fQe=[{field:"location",headerName:"Location",filter:"agSetColumnFilter"},{field:"end date (dd/mm/yyyy)",headerName:"Date (dd/mm/yyyy)",filter:"agDateColumnFilter",valueFormatter:da,sort:"asc"},{field:"gas type",headerName:"Gas type",filter:"agSetColumnFilter"},{field:"gas group",headerName:"Gas group",filter:"agSetColumnFilter"},{field:"quantity",headerName:"Quantity",filter:"agNumberColumnFilter"},{field:"unit",headerName:"Unit",filter:"agSetColumnFilter"},{field:"act/est",headerName:"Act/Est",filter:"agSetColumnFilter"},{field:"estimates scenario",headerName:"Estimates Scenario",filter:"agSetColumnFilter"},{field:"total cost",headerName:"Total cost",filter:"agNumberColumnFilter"},{field:"comment",headerName:"Comment",filter:"agTextColumnFilter"},{field:"evidence reference",headerName:"Evidence reference",filter:"agTextColumnFilter"},{field:"other reference",headerName:"Other reference",filter:"agTextColumnFilter"},{field:"currency",headerName:"Currency",filter:"agSetColumnFilter"}],yQe=[{field:"date",headerName:"Date",valueFormatter:da,filter:"agDateColumnFilter",sort:"asc"},{field:"location",headerName:"Location",filter:"agSetColumnFilter"},{field:"type",headerName:"Type",filter:"agSetColumnFilter"},{field:"subtype",headerName:"Subtype",filter:"agSetColumnFilter"},{field:"origin of travel",headerName:"Origin of travel",filter:"agTextColumnFilter"},{field:"destination of travel",headerName:"Destination of travel",filter:"agTextColumnFilter"},{field:"volume",headerName:"Volume",filter:"agNumberColumnFilter"},{field:"unit of volume",headerName:"Unit of volume",filter:"agSetColumnFilter"},{field:"data provider",headerName:"Data provider",filter:"agSetColumnFilter"},{field:"distance",headerName:"Distance",filter:"agNumberColumnFilter"},{field:"number of journeys",headerName:"Number of journeys",filter:"agNumberColumnFilter"},{field:"journey distance",headerName:"Journey distance",filter:"agNumberColumnFilter"},{field:"unit of distance",headerName:"Unit of distance",filter:"agSetColumnFilter"},{field:"freight (tonne/km)",headerName:"Freight (tonne.km)",filter:"agNumberColumnFilter"},{field:"carrier",headerName:"Carrier",filter:"agSetColumnFilter"},{field:"purpose of journey",headerName:"Purpose of journey",filter:"agSetColumnFilter"},{field:"fuel type",headerName:"Fuel type",filter:"agSetColumnFilter"},{field:"act/est",headerName:"Act/Est",filter:"agSetColumnFilter"},{field:"estimates scenario",headerName:"Estimates Scenario",filter:"agSetColumnFilter"},{field:"document reference",headerName:"Document reference",filter:"agTextColumnFilter"},{field:"notes",headerName:"Notes",filter:"agTextColumnFilter"},{field:"currency",headerName:"Currency",filter:"agSetColumnFilter"},{field:"cost of journey",headerName:"Total cost",filter:"agNumberColumnFilter"},{field:"reference",headerName:"Reference",filter:"agTextColumnFilter"}],gQe=[{field:"start date (dd/mm/yyyy)",headerName:"Start date",valueFormatter:da,filter:"agDateColumnFilter",sort:"asc"},{field:"end date (dd/mm/yyyy)",headerName:"End date",valueFormatter:da,filter:"agDateColumnFilter"},{field:"location",headerName:"Location",filter:"agSetColumnFilter"},{field:"hotel nights",headerName:"Hotel nights",filter:"agNumberColumnFilter"},{field:"home working days",headerName:"Home working days",filter:"agNumberColumnFilter"},{field:"hotel stay / home working country",headerName:"Country",filter:"agSetColumnFilter"},{field:"data provider",headerName:"Data provider",filter:"agSetColumnFilter"},{field:"tariff",headerName:"Tariff",filter:"agSetColumnFilter"},{field:"act/est",headerName:"Act/Est",filter:"agSetColumnFilter"},{field:"estimates scenario",headerName:"Estimates Scenario",filter:"agSetColumnFilter"},{field:"total cost",headerName:"Total cost",filter:"agNumberColumnFilter"},{field:"currency",headerName:"Currency",filter:"agSetColumnFilter"},{field:"notes",headerName:"Notes",filter:"agTextColumnFilter"},{field:"reference",headerName:"Reference",filter:"agTextColumnFilter"},{field:"invoice number",headerName:"Invoice number",filter:"agTextColumnFilter"},{field:"evidence reference",headerName:"Evidence reference",filter:"agTextColumnFilter"},{field:"other reference",headerName:"Other reference",filter:"agTextColumnFilter"},{field:"purchase type",headerName:"Purchase type",filter:"agSetColumnFilter"}],bQe=[{field:"date (dd/mm/yyyy)",headerName:"Date",valueFormatter:da,filter:"agDateColumnFilter",sort:"asc"},{field:"location",headerName:"Location",filter:"agSetColumnFilter"},{field:"quantity",headerName:"Quantity",filter:"agNumberColumnFilter"},{field:"quantity units",headerName:"Quantity units",filter:"agSetColumnFilter"},{field:"act/est",headerName:"Act/Est",filter:"agSetColumnFilter"},{field:"total cost",headerName:"Total cost",filter:"agSetColumnFilter"},{field:"currency",headerName:"Currency",filter:"agSetColumnFilter"},{field:"supplier",headerName:"Supplier",filter:"agSetColumnFilter"},{field:"evidence reference",headerName:"Evidence reference",filter:"agSetColumnFilter"},{field:"other reference",headerName:"Other reference",filter:"agNumberColumnFilter"},{field:"purchase type",headerName:"Purchase type",filter:"agSetColumnFilter"},{field:"estimates scenario",headerName:"Estimates scenario",filter:"agTextColumnFilter"},{field:"comment",headerName:"Comment",filter:"agTextColumnFilter"}],hQe=[{field:"start date (dd/mm/yyyy)",headerName:"Start date",valueFormatter:da,filter:"agDateColumnFilter",sort:"asc"},{field:"end date (dd/mm/yyyy)",headerName:"End date",valueFormatter:da,filter:"agDateColumnFilter"},{field:"location",headerName:"Location",filter:"agSetColumnFilter"},{field:"factor set",headerName:"Factor set",filter:"agSetColumnFilter"},{field:"material type",headerName:"Material type",filter:"agSetColumnFilter"},{field:"subtype 1",headerName:"Subtype 1",filter:"agSetColumnFilter"},{field:"subtype 2",headerName:"Subtype 2",filter:"agSetColumnFilter"},{field:"subtype 3",headerName:"Subtype 3",filter:"agSetColumnFilter"},{field:"weight unit",headerName:"Weight unit",filter:"agSetColumnFilter"},{field:"weight",headerName:"Weight",filter:"agSetColumnFilter"},{field:"units quantity",headerName:"Units quantity",filter:"agNumberColumnFilter"},{field:"accuracy",headerName:"Act/Est",filter:"agSetColumnFilter"},{field:"estimates scenario",headerName:"Estimates Scenario",filter:"agSetColumnFilter"},{field:"total cost",headerName:"Total cost",filter:"agNumberColumnFilter"},{field:"currency",headerName:"Currency",filter:"agSetColumnFilter"},{field:"supplier",headerName:"Supplier",filter:"agSetColumnFilter"},{field:"notes",headerName:"Notes",filter:"agTextColumnFilter"},{field:"reference",headerName:"Reference",filter:"agTextColumnFilter"},{field:"invoice number",headerName:"Invoice number",filter:"agTextColumnFilter"},{field:"evidence reference",headerName:"Evidence reference",filter:"agTextColumnFilter"},{field:"other reference",headerName:"Other reference",filter:"agTextColumnFilter"}],vQe=[{field:"start date (dd/mm/yyyy)",headerName:"Start date",valueFormatter:da,filter:"agDateColumnFilter",sort:"asc"},{field:"end date (dd/mm/yyyy)",headerName:"End date",valueFormatter:da,filter:"agDateColumnFilter"},{field:"location",headerName:"Location",filter:"agSetColumnFilter"},{field:"country",headerName:"Country",filter:"agSetColumnFilter"},{field:"supplier",headerName:"Supplier",filter:"agSetColumnFilter"},{field:"factor set",headerName:"Factor set",filter:"agSetColumnFilter"},{field:"material type",headerName:"Material type",filter:"agSetColumnFilter"},{field:"subtype 1",headerName:"Subtype 1",filter:"agSetColumnFilter"},{field:"subtype 2",headerName:"Subtype 2",filter:"agSetColumnFilter"},{field:"subtype 3",headerName:"Subtype 3",filter:"agSetColumnFilter"},{field:"amount",headerName:"Amount of spend",filter:"agNumberColumnFilter"},{field:"currency",headerName:"Currency",filter:"agSetColumnFilter"},{field:"amount",headerName:"Amount of spend",filter:"agNumberColumnFilter"},{field:"accuracy",headerName:"Act/Est",filter:"agSetColumnFilter"},{field:"estimates scenario",headerName:"Estimates scenario",filter:"agSetColumnFilter"},{field:"purchase type",headerName:"Purchase type",filter:"agSetColumnFilter"},{field:"notes",headerName:"Notes",filter:"agTextColumnFilter"},{field:"reference",headerName:"Reference",filter:"agTextColumnFilter"},{field:"invoice number",headerName:"Invoice number",filter:"agTextColumnFilter"},{field:"evidence reference",headerName:"Evidence reference",filter:"agTextColumnFilter"},{field:"other reference",headerName:"Other reference",filter:"agTextColumnFilter"}],xQe={[Vt.D_.Electricity]:cQe,[Vt.D_.Gas]:cQe,[Vt.D_.Heatsteam]:cQe,[Vt.D_.Water]:uQe,[Vt.D_.Waste]:pQe,[Vt.D_.Materials]:mQe,[Vt.D_.Refrigerant]:fQe,[Vt.D_.Transport]:yQe,[Vt.D_.Hotelstays]:gQe,[Vt.D_.Fuel]:bQe,[Vt.D_.S3C1Activitybasedmaterial]:hQe,[Vt.D_.S3C1Spendbasedmaterial]:vQe},TQe=e=>{let{type:n,options:t,customFields:a,mode:r}=e;if(!xQe[n])throw new Error("No column definitions found for type: ".concat(n));const i=[...xQe[n]];return[wo(n,a,{withDromoCasing:!0}),Ao(n,a),Fo(n,a),_o(n,a,{withDromoCasing:!0}),Eo(n,a,{withDromoCasing:!0}),Io(n,a,{withDromoCasing:!0}),Po(n,a,{withDromoCasing:!0}),Lo(n,a,{withDromoCasing:!0})].forEach(e=>{e&&i.push(e)}),i.map(e=>{const n=Gt().cloneDeep(e),a=e.field;var i;return"agSetColumnFilter"===e.filter&&r===dQe.Options&&(n.valueFormatter=e=>{let{value:n}=e;return null==n?void 0:n.label}),"agSetColumnFilter"===e.filter&&t[a]&&r===dQe.Values&&(n.refData=(0,zt.mapValues)(null===(i=t[a])||void 0===i?void 0:i.index,e=>e.label)),n})};var OQe,kQe,jQe,CQe,SQe,NQe,wQe;function DQe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const AQe=(0,f.styled)("div")(OQe||(OQe=DQe(["\n  width: 100%;\n  padding-bottom: 15px;\n  overflow-y: auto;\n"]))),RQe=(0,f.styled)("div")(kQe||(kQe=DQe(["\n  min-height: 350px;\n"]))),PQe=(0,f.styled)(f.AgGrid)(jQe||(jQe=DQe(["\n  flex: 1;\n  height: calc(100vh - 316px); // header + page title height\n"]))),LQe=(0,f.styled)("div")(CQe||(CQe=DQe(["\n  margin-top: 32px;\n  width: 100%;\n  display: flex;\n  gap: 16px;\n"]))),IQe=(0,f.styled)("div")(SQe||(SQe=DQe(["\n  width: 100%;\n  margin-top: 16px;\n"]))),EQe=(0,f.styled)(f.LinearProgress)(NQe||(NQe=DQe(["\n  width: 100%;\n"]))),_Qe=(0,f.styled)(f.Button)(wQe||(wQe=DQe(["\n  width: 50%;\n"])));function FQe(e){let{onConfirm:n,onBack:t,data:a,type:r,mode:i,isUploading:o}=e;const{loading:l,options:s,error:c}=xu({type:r,skip:i!==dQe.Values}),d=Pu(),u=(0,g.useMemo)(()=>({columnDefs:TQe({type:r,options:s,mode:i,customFields:null==d?void 0:d.accessControls.customFields}),rowData:a,pagination:!0,paginationPageSize:25,paginationPageSizeSelector:!1,suppressLoadingOverlay:!0,defaultColDef:{sortable:!0,filter:"agTextColumnFilter",cellDataType:"text"}}),[r,a,s,null==d?void 0:d.accessControls.customFields,i]);return(0,Ze.jsxs)(Ze.Fragment,{children:[l&&(0,Ze.jsx)(IQe,{children:(0,Ze.jsx)(EQe,{})}),c&&(0,Ze.jsx)(f.LoadFailed,{error:c}),!l&&!c&&(0,Ze.jsx)(AQe,{children:(0,Ze.jsx)(RQe,{children:(0,Ze.jsx)(PQe,{gridKey:"ImportPayloadPreview",gridOptions:u})})}),(0,Ze.jsxs)(LQe,{children:[(0,Ze.jsx)(_Qe,{onClick:t,variant:"outlined",disabled:o||l,children:"Back"}),(0,Ze.jsx)(_Qe,{onClick:n,variant:"contained",disabled:o||l,children:"Confirm data import to Rio"})]})]})}var BQe,UQe,MQe,VQe,zQe,GQe,$Qe=t(70316);function WQe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const qQe=5000000001,JQe=(0,f.styled)("div")(BQe||(BQe=WQe(["\n  position: fixed;\n  left: 15%;\n  bottom: 16px;\n  width: 70%;\n  height: auto;\n  background: ",";\n  border-radius: 16px;\n  padding: 16px;\n  box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.3);\n  z-index: ",";\n"])),e=>e.theme.sys.color.surface,5e9),YQe=(0,f.styled)(f.Icons.Check)(UQe||(UQe=WQe(["\n  cursor: pointer;\n"]))),HQe=(0,f.styled)(f.Icons.Warning)(MQe||(MQe=WQe(["\n  cursor: pointer;\n"]))),KQe=(0,f.styled)(f.Grid)(VQe||(VQe=WQe(["\n  position: relative;\n  align-items: center;\n  height: 48px;\n"]))),QQe=(0,f.styled)(f.LinearProgress)(zQe||(zQe=WQe(["\n  width: 100%;\n"]))),ZQe=(0,f.styled)("ul")(GQe||(GQe=WQe(["\n  margin: 16px;\n  list-style: initial;\n"]))),XQe=e=>e.status===Vt.GV.Failed?"error":eZe(e.status)?"success":"primary";function eZe(e){return[Vt.GV.Executed,Vt.GV.Aborted,Vt.GV.CancelledByUser].includes(e)}function nZe(e){let{strategy:n,onComplete:t,onShowError:a}=e;return eZe(n.status)?(0,Ze.jsx)(YQe,{onClick:t,color:"success"}):n.status===Vt.GV.Failed?(0,Ze.jsx)(HQe,{onClick:a,color:"error"}):(0,Ze.jsx)(Ze.Fragment,{})}function tZe(e){var n,t;let{strategy:a,error:r,onComplete:i}=e;const[o,l]=(0,g.useState)(!1),[s,c]=(0,g.useState)(!1);if(!a)return null;const d=r||(a.executionError?new Error(a.executionError):null);return(0,$Qe.createPortal)((0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(JQe,{children:(0,Ze.jsxs)(KQe,{columns:12,container:!0,columnGap:2,children:[(0,Ze.jsxs)(f.Grid,{flexGrow:1,size:10,children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",textAlign:"center",children:a.statusExplanation}),(0,Ze.jsx)(QQe,{value:a.statusProgress||0,color:XQe(a),variant:a.statusProgress?"determinate":"indeterminate"})]}),(0,Ze.jsx)(f.Grid,{flexGrow:0,flexShrink:1,container:!0,justifyContent:"flex-end",children:(0,Ze.jsx)(nZe,{strategy:a,onComplete:i,onShowError:()=>l(!0)})})]})}),(0,Ze.jsx)(f.Modal,{open:o,onClose:()=>{l(!1),i()},title:"Error details",style:{zIndex:qQe},children:(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:null==d?void 0:d.message})}),(0,Ze.jsx)(f.Modal,{open:s,onClose:()=>c(!1),title:"".concat(a.numberOfDuplicatesFound||0," duplicates found"),style:{zIndex:qQe},children:!(null===(n=a.batchesSuitableForOverwriting)||void 0===n||!n.length)&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:"We have automatically merged the following uploads for you:"}),(0,Ze.jsx)(ZQe,{children:null===(t=a.batchesSuitableForOverwriting)||void 0===t?void 0:t.map(e=>(0,Ze.jsx)("li",{children:(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:e.fileName})},e.id))})]})})]}),document.body)}const aZe={mode:dQe.Options,data:[]};var rZe,iZe,oZe;function lZe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const sZe=(0,f.styled)(f.Modal)(rZe||(rZe=lZe(["\n  .ModalClassName {\n    width: 100%;\n    max-width: 984px;\n    padding-bottom: 72px;\n    z-index: 2147483650;\n  }\n\n  .TitleClassName {\n    margin-bottom: 29px;\n\n    & > h2 {\n      padding-top: 40px;\n      text-align: center;\n    }\n  }\n"]))),cZe=(0,f.styled)("div")(iZe||(iZe=lZe(["\n  display: flex;\n  flex-direction: row;\n  gap: 16px;\n  ","\n"])),e=>{let{fullWidth:n}=e;return n?"\n    width: 100%;\n    button {\n      flex: 1;  \n    }\n  ":"\n  justify-content: center;\n  "}),dZe=(0,f.styled)(f.Text)(oZe||(oZe=lZe(["\n  min-width: 100%;\n  text-align: center;\n  margin-bottom: 32px;\n  max-width: 650px;\n"]))),uZe=e=>{let{open:n,disabled:t,title:a,body:r="",closeButtonText:i="Close",onClose:o,onCloseButtonClick:l,closeButtonTestId:s,withFullWidthButtons:c,choices:d,style:u,children:p}=e;const m=(0,g.useCallback)(()=>{l?l():null==o||o()},[l,o]),y=(0,g.useMemo)(()=>d.map((e,n)=>(0,Ze.jsx)(f.Button,{onClick:()=>{null==o||o(),e.onAccept()},color:e.color||"primary",variant:e.variant||"contained","data-testid":e.testId,disabled:t,children:e.text},n)),[d,o,t]);return(0,Ze.jsxs)(sZe,{open:n,title:a,style:u,onClose:o,titleClassName:"TitleClassName",modalSurfaceProps:{className:"ModalClassName"},children:[(0,Ze.jsx)(dZe,{typescale:"body",size:"medium",children:r}),p,(0,Ze.jsxs)(cZe,{fullWidth:c,children:[(0,Ze.jsx)(f.Button,{onClick:m,variant:"outlined",color:"primary","data-testid":s,disabled:t,children:i}),y]})]})};var pZe;const mZe=(0,f.styled)(TL.A)(pZe||(pZe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  & {\n    margin-bottom: 16px;\n  }\n"])));function fZe(e){let{open:n,loading:t,batchType:a,permittedToOverwriting:r,onDismiss:i,onConfirm:o}=e;const[l,s]=(0,g.useState)(null),[c,d]=(0,g.useState)({}),{data:u,networkStatus:p}=function(e){return(0,h.IT)(oQe,e)}({variables:{batchType:a},skip:!r,notifyOnNetworkStatusChange:!0});(0,g.useEffect)(()=>{var e;p===hq.pT.ready&&!l&&null!=u&&u.getPossibleDataOverwritingKeys.defaultKey&&s(null!==(e=null==u?void 0:u.getPossibleDataOverwritingKeys.defaultKey)&&void 0!==e?e:[])},[p,l,u]);const m=(0,g.useCallback)(e=>{e.length>0&&d({}),s(e.map(e=>e.value))},[]),y=(0,g.useMemo)(()=>{const e=(null==u?void 0:u.getPossibleDataOverwritingKeys.keys.map(e=>({value:e.key,label:e.label})))||[];return{defaultOptions:(null==u?void 0:u.getPossibleDataOverwritingKeys.defaultKey)||[],allOptions:e}},[u]),b=(0,g.useCallback)(()=>{0!==(null==l?void 0:l.length)?o({customDuplicationKey:l||(null==u?void 0:u.getPossibleDataOverwritingKeys.defaultKey)||[]}):d({customDuplicationKey:"Duplication key should not be empty"})},[o,l,u]);return(0,Ze.jsx)(uZe,{open:n,disabled:t,title:"Would you like us to check your upload for duplicates against historical data?",body:"If any are found, you’ll have the option to review and automatically overwrite them.",choices:[{onAccept:b,text:"Yes, let’s check"}],onCloseButtonClick:i,closeButtonTestId:"close-button",closeButtonText:"No, I don’t want to check",style:{zIndex:2147483650},children:(0,Ze.jsxs)(mZe,{children:[(0,Ze.jsx)(OL.A,{expandIcon:(0,Ze.jsx)(f.Icons.Settings,{}),"aria-controls":"panel1a-content",children:(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:"Customise your duplication key:"})}),(0,Ze.jsx)(kL.A,{children:y.defaultOptions.length>0&&(0,Ze.jsx)(f.AutoComplete,{isMulti:!0,error:c.customDuplicationKey,options:y.allOptions,defaultValue:y.defaultOptions||[],value:l||[],onChange:m,slotProps:{popper:{style:{zIndex:999999999999999}}}})})]})})}var yZe,gZe;function bZe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hZe=(0,f.styled)("div")(yZe||(yZe=bZe(["\n  width: 100%;\n  margin-top: 16px;\n  height: 4px;\n"]))),vZe=(0,f.styled)(f.LinearProgress)(gZe||(gZe=bZe(["\n  width: 100%;\n"])));function xZe(){return(0,Ze.jsx)(hZe,{children:(0,Ze.jsx)(vZe,{})})}var TZe,OZe,kZe,jZe;function CZe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function SZe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?CZe(Object(t),!0).forEach(function(n){NZe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):CZe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function NZe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function wZe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const DZe=(0,f.styled)(f.Button)(TZe||(TZe=wZe(["\n  height: 40px;\n"]))),AZe=(0,f.styled)("span")(OZe||(OZe=wZe(["\n  height: fit-content;\n"]))),RZe=(0,f.styled)(f.Modal)(kZe||(kZe=wZe(["\n  margin-bottom: 20px;\n"]))),PZe=(0,f.styled)(f.Modal)(jZe||(jZe=wZe(["\n  z-index: 5000000001;\n"])));(0,f.setAgGridLicenseKey)(kn("REACT_APP_AG_GRID_LICENSE_KEY"));const LZe={getRowId:e=>e.data.id,pagination:!0,paginationPageSize:25,paginationPageSizeSelector:[10,25,50,100],cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}}},IZe=(e,n,t,a,r)=>{switch(pUe(e.status)){case vR.DONE:return{icon:"check",iconColor:n.palette.success.main,linkText:e.isLegacy?"Migrated":"Export data",onClick:()=>t(e)};case vR.PENDING:return{icon:"clock",iconColor:n.palette.grey[400],linkText:"In progress"};case vR.ABANDONED:return{icon:"undo",iconColor:n.palette.info.main,linkText:"Rolled back"};case vR.FAILED:return{icon:"minus-circle",iconColor:n.palette.error.main,linkText:"View errors",onClick:a};case vR.ACTION_REQUIRED:return{icon:"exclamation-circle",iconColor:n.palette.warning.main,linkText:"Action required",onClick:r};case vR.EXTERNAL_ACTION_REQUIRED:return{icon:"exclamation-circle",iconColor:n.palette.warning.main,linkText:"Action required",onClick:()=>window.open(e.externalActionUrl||"","_blank")};default:return{icon:"",iconColor:"",linkText:""}}},EZe=e=>{var n,t,a,r;let{gridKey:i,title:o,breadcrumbs:l,config:s,uploadLink:c,dataType:d,extraButtons:u}=e;const{confirmDeleteId:p,confirmQuickViewId:y,confirmRollbackId:b,handleRollbackClick:h,handleDeleteClick:v,handleQuickviewClick:x,erroredRowId:T,handleErrorClick:O,handleDownloadClick:k,handleActionClick:j,fetchRows:C}=VKe(d),[S,w]=(0,g.useState)([]),[D,A]=(0,g.useState)(!1),R=rt(),P=(0,g.useRef)(null),L=null===(n=P.current)||void 0===n?void 0:n.gridApi,I=(0,f.useTheme)(),E=rc(),_=()=>null==L?void 0:L.refreshServerSide(),{dataPreview:F,setDataPreview:B,resetPreviewState:U,dataPreviewOpen:M,setDataPreviewOpen:V}=function(){const[e,n]=(0,g.useState)(aZe),[t,a]=(0,g.useState)(!1),r=(0,g.useCallback)(()=>{n(aZe),a(!1)},[n]);return{dataPreview:e,setDataPreview:n,resetPreviewState:r,dataPreviewOpen:t,setDataPreviewOpen:a}}(),z=function(e){let{transactionType:n}=e;const t=rc(),a=(0,g.useRef)(null),r=rt(),i=Pu(),{showNotification:o}=vt(),[l,s]=(0,g.useState)(!1),c=(0,g.useCallback)(e=>{a.current=e},[]),d=(0,g.useMemo)(()=>sQe.includes(n)&&!!t.dataOverwriting.find(e=>e.startsWith("createDataOverwriteStrategy"))&&!(null==i||!i.accessControls.dataOverwriting),[t,i,n]),[u,p]=(0,g.useState)(null),[m,f]=(0,g.useState)(!1),y=(0,g.useRef)(null),[b]=(0,Ot.n)(tQe),[h]=(0,Ot.n)(aQe),[v]=(0,Ot.n)(rQe),[x]=(0,Ot.n)(nQe),T=(0,g.useCallback)(e=>{console.error(e),o(lQe,"danger"),(0,de.Cp)(e)},[o]),O=(0,g.useCallback)(async e=>{try{if(!y.current)throw new Error("No overwriting strategy found");await h({variables:{accountId:r,batchId:e,batchType:n,strategyId:y.current.id}})}catch(e){T(e)}},[h,T,r,n]),k=(0,g.useCallback)(async()=>{if(!y.current)throw new Error("No overwriting strategy found");await v({variables:{accountId:r,batchType:n,strategyId:y.current.id}})},[v,r,n]);!function(e){(0,as.R)(iQe,e)}({variables:{id:u,batchType:n},skip:!u,onError:T,onData:async e=>{var n;let{data:t}=e;null!=t&&null!==(n=t.data)&&void 0!==n&&n.dataOverwritingStrategyUpdated&&(y.current=t.data.dataOverwritingStrategyUpdated)}});const j=(0,g.useCallback)(async(e,t)=>{try{var a;f(!0);const i=(0,Ai.A)(),o={batchType:n,key:i,accountId:r,customDuplicationKey:t},l=await x({variables:o});if(null==l||null===(a=l.data)||void 0===a||!a.createPreSignedUploadLink)throw new Error(lQe);const s=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4,t=arguments.length>2?arguments[2]:void 0;if(!Array.isArray(e))throw new Error("Payload must be an array.");if(void 0!==t&&e.length>t)throw new Error("Payload too large: ".concat(e.length," items > max ").concat(t));if(e.length<=n)try{const n=JSON.stringify(e);return Buffer.from(n,"utf8")}catch(e){throw new Error("Failed to serialize payload: ".concat(e instanceof Error?e.message:String(e)))}const a=[];a.push((new TextEncoder).encode("["));let r=!0;for(let t=0;t<e.length;t+=n){const i=e.slice(t,t+n);let o;try{o=JSON.stringify(i)}catch(e){throw new Error("Failed to serialize chunk at index ".concat(t,": ").concat(e instanceof Error?e.message:String(e)))}const l=o.slice(1,-1).trim();l&&(r||a.push((new TextEncoder).encode(",")),a.push((new TextEncoder).encode(l)),r=!1)}a.push((new TextEncoder).encode("]"));const i=a.reduce((e,n)=>e+n.length,0),o=new Uint8Array(i);let l=0;for(const e of a)o.set(e,l),l+=e.length;return Buffer.from(o)}(e.map(e=>Gt().mapValues(e,e=>e instanceof Date?Wt()(e).format("YYYY-MM-DD"):e)));await dOe().put(l.data.createPreSignedUploadLink,s,{headers:{"Content-Type":"application/json"}});const{data:c}=await b({variables:o});if(null!=c&&c.initiateDataOverwriting&&(p(c.initiateDataOverwriting.id),y.current=c.initiateDataOverwriting),await Qo(()=>{if(null!=y&&y.current){const{overwritingNeeded:e,status:n}=y.current;return n===Vt.GV.Failed||null!=e}return!1},1e3),!y.current)throw new Error(lQe);if(y.current.status===Vt.GV.Failed)return{message:y.current.statusExplanation,mergedData:null,strategy:y.current};const{batchesSuitableForOverwriting:d,numberOfDuplicatesFound:u}=y.current;if(!u)return{message:"No duplicates were found in your upload",mergedData:null,strategy:y.current};await Qo(()=>{var e;return null!==(null===(e=y.current)||void 0===e?void 0:e.mergedFileUrl)},1e3);const m=await dOe().get(y.current.mergedFileUrl);if(200!==m.status)throw new Error(lQe);const g=(d||[]).map(e=>{let{fileName:n}=e;return n}).join(", ");return{message:g.length?"We have merged the following historical uploads with your current upload: ".concat(g,". Duplicates have been overwritten by the latter."):"We have found ".concat(u," duplicate(s) in your current upload and deduplicated them. Please make sure to check the data before submitting."),strategy:y.current,mergedData:m.data}}catch(e){throw T(e),e}finally{f(!1)}},[x,b,r,n,T]),C=(0,g.useCallback)(()=>{y.current=null,a.current=null,p(null)},[]),S=(0,g.useCallback)(e=>{d&&s(e)},[d]);return{strategyLoading:m,initiateDataOverwriting:j,permittedToOverwriting:d,scheduleDataOverwritingExecution:O,cancelDataOverwritingExecution:k,overwritingStrategy:y,dismissOverwritingUi:C,promptOpen:l,promptResponse:a,setPromptResponse:c,setPromptOpen:S}}({transactionType:d}),G=()=>A(!1),{uploadDirectData:$,prepareDirectDataUpload:W,directDataUploadInProgress:q,isUploading:J}=(e=>{let{onComplete:n,dataType:t,dataOverwritingFlow:a}=e;const[r]=uy(),[i,o]=(0,g.useState)(!1),{showNotification:l}=vt(),[s,c]=(0,g.useState)(null),[d,u]=(0,g.useState)(null),[p,m]=(0,g.useState)(!1),f=(0,g.useCallback)(async e=>{if(!d)throw new Error("File name is not set");m(!0);try{var i;const c=Dr(e,"label"),u=await async function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD",a=arguments.length>3?arguments[3]:void 0;if(!e.length)throw new Error("No rows provided");const r=a||Object.keys(e[0]),i=Array.isArray(r)?r:Object.keys(r),o=[(Array.isArray(r)?r:Object.values(r)).map(e=>'"'.concat(e,'"')).join(","),...e.map(e=>i.map(n=>{const a=e[n];if(Ua(a))return Wt()(a).format(t);if(null==a)return'""';const r=String(a).replace(/"/g,'""');return'"'.concat(r,'"')}).join(","))].join("\n"),l=new Blob([o],{type:"text/csv;charset=utf-8;"});return new File([l],"".concat(n,".csv"),{type:"text/csv;charset=utf-8;",lastModified:(new Date).getTime()})}(c,d,Ma.ImportPayload.DATE_FORMAT);o(!0);const{batchId:p}=await r({file:u,isDirectActivity:s,fileName:u.name,transactionType:t});null!==(i=a.overwritingStrategy)&&void 0!==i&&null!==(i=i.current)&&void 0!==i&&i.overwritingNeeded&&await a.scheduleDataOverwritingExecution(p),n(),l("Upload has started","success"),m(!1)}catch(e){l("Failed to upload data: ".concat(e),"danger"),(0,de.Cp)(e),m(!1)}finally{o(!1)}},[r,n,a,l,t,d,s]),y=(0,g.useCallback)(e=>{let{fileName:n,isDirectActivity:t}=e;n&&u(n),null!=t&&c(t)},[]);return{directDataUploadInProgress:i,uploadDirectData:f,prepareDirectDataUpload:y,isUploading:p}})({dataType:d,dataOverwritingFlow:z,onComplete:()=>{G(),_(),U()}}),Y=[Vt.D_.Waste,Vt.D_.Electricity,Vt.D_.Gas,Vt.D_.Transport,Vt.D_.Water,Vt.D_.Heatsteam,Vt.D_.Hotelstays,Vt.D_.S3C1Activitybasedmaterial,Vt.D_.S3C1Spendbasedmaterial].includes(d),H=(0,g.useMemo)(()=>{var e;return SZe(SZe(SZe({},LZe),s),{},{components:{fileName:OKe,status:e=>(0,Ze.jsx)(DKe,SZe(SZe({},e),{},{done:(0,Ze.jsx)(tYe.A,{onClick:()=>k(e.data),sx:{color:I.palette.success.main,cursor:"pointer"}}),actionRequired:(0,Ze.jsx)(aYe.A,{onClick:()=>j(e.data),sx:{color:I.palette.warning.main,cursor:"pointer"}}),abandoned:(0,Ze.jsx)(rYe.A,{sx:{color:I.palette.info.main}}),failed:(0,Ze.jsx)(iYe.A,{onClick:()=>O(e.data),sx:{color:I.palette.error.main,cursor:"pointer"}}),pending:(0,Ze.jsx)(oYe.A,{sx:{color:I.palette.grey[400]}}),onErrorClick:O,onDataClick:k,onActionClick:j,defineStatusProps:IZe,statusLink:JKe})),summary:e=>(0,Ze.jsx)(zKe,SZe(SZe({},e),{},{onSummaryClick:x})),actions:e=>(0,Ze.jsx)(PKe,SZe(SZe({},e),{},{onDeleteClick:v,onRollbackClick:h}))},columnDefs:null==s||null===(e=s.columnDefs)||void 0===e?void 0:e.map(e=>SZe(SZe({},e),{},{headerName:e.headerName?Gi(e.headerName):e.headerName}))})},[oa,ia]),{setLoading:K}=(0,f.usePageLoadingContext)(),{setError:Q}=(0,f.usePageErrorContext)(),Z=(0,g.useMemo)(()=>SZe(SZe({},H),{},{onGridReady:e=>{e.api.setGridOption("serverSideDatasource",{async getRows(e){try{const{startRow:n=0,endRow:t=25,sortModel:a,filterModel:r}=e.request;for(const e in r)if(r[e].filterType===Vt.pe.Set){const n=r[e].values;n.includes(null)&&n.push(" ")}K(!0);const{rows:i,totalRows:o}=await C({offset:n,limit:t-n,sort:oa(a),filters:ia(r)});return w(i),e.success({rowData:i,rowCount:o}),{rows:i,totalRows:o}}catch(n){e.fail(),Q(new Error(n))}finally{K(!1)}}})}}),[C,H,Q,K,w]),X=(0,m.zy)(),ee=(0,g.useMemo)(()=>X.pathname.split("/").slice(0,4).concat("view").join("/"),[X.pathname]);((e,n)=>{const t=(0,g.useRef)();(0,g.useEffect)(()=>{t.current=e},[e]),(0,g.useEffect)(()=>{{const e=setInterval(()=>{t.current&&t.current()},n);return()=>clearInterval(e)}},[n])})(()=>{_()},3e4);const ne=(0,N.m)(),te=function(e){let{dataOverwritingFlow:n,onDromoPayloadReady:t,onDataPreviewOpen:a}=e;return(0,g.useCallback)(async(e,r,i)=>{var o,l,s,c;const{overwritingStrategy:d,permittedToOverwriting:u}=n;if(u)if(t(e,r,i),n.setPromptOpen(!0),await Qo(()=>null!==n.promptResponse.current,1e3),!1!==n.promptResponse.current){if(await Qo(()=>{if(null!=d&&d.current){const{overwritingNeeded:e,status:n}=d.current;return n===Vt.GV.Failed||null!=e}return!1},1e3),(null==d||null===(o=d.current)||void 0===o?void 0:o.status)===Vt.GV.Failed)return n.setPromptResponse(null),{abort:!1,validation:{cancel:!0,message:"".concat(d.current.statusExplanation,'. Click "No, I don\'t want to check" to proceed with the upload.')}};if(!1!==(null===(l=n.overwritingStrategy)||void 0===l||null===(l=l.current)||void 0===l?void 0:l.overwritingNeeded))return await Qo(()=>{var e;return(null===(e=d.current)||void 0===e?void 0:e.status)===Vt.GV.UserReview},1e3),a(),await Qo(()=>{var e;return(null===(e=d.current)||void 0===e?void 0:e.status)!==Vt.GV.UserReview},1e3),(null===(s=d.current)||void 0===s?void 0:s.status)===Vt.GV.CancelledByUser?{abort:!1,validation:{cancel:!0,message:"Warning: you are uploading potential duplicates, please confirm to proceed..."}}:(null===(c=d.current)||void 0===c?void 0:c.status)===Vt.GV.ExecutionScheduled?{abort:!0,validation:{cancel:!0,message:"Data overwriting scheduled, you will be redirected to the upload page soon..."}}:void 0}else n.setPromptResponse(null)},[n,t,a])}({dataOverwritingFlow:z,onDromoPayloadReady:(e,n,t)=>{W({fileName:n,isDirectActivity:t}),B({data:e,mode:dQe.Values})},onDataPreviewOpen:()=>{V(!0)}}),ae={crumbs:l,content:o,actionButton:(0,Ze.jsxs)(_Ke,{children:[u,(0,Ze.jsx)(DZe,{variant:"text",color:"primary",startIcon:(0,Ze.jsx)(f.Icons.TableView,{}),to:ee,disabled:!L,children:"View transactions"}),(0,Ze.jsx)(N$,{filtersApplied:null===(t=P.current)||void 0===t?void 0:t.filtersApplied,resetGridState:null===(a=P.current)||void 0===a?void 0:a.resetGridState}),!!E.data.find(e=>e.startsWith("createImportBatch"))&&Y&&(0,Ze.jsx)(zP.A,{title:"Manually enter data into Rio",children:(0,Ze.jsx)(AZe,{children:(0,Ze.jsx)(f.IconButton,{variant:"contained",onClick:()=>A(!0),children:(0,Ze.jsx)(f.Icons.Create,{fontSize:"small"})})})}),!!c&&(0,Ze.jsx)(zP.A,{title:"Bulk upload your data using our uploader",children:(0,Ze.jsx)(AZe,{children:(0,Ze.jsx)(f.IconButton,{children:(0,Ze.jsx)(qHe,{iconOnly:!0,onSubmit:te,transactionType:d,onCompleted:_})})})})]})},{showNotification:re}=vt(),[ie]=(0,Ot.n)(kLe,{onCompleted:()=>{null==L||L.refreshServerSide({purge:!0}),v(null),re("Batch deleted","success")},onError:()=>{re("Error deleting batch","danger")}}),[oe]=(0,Ot.n)(jLe,{onCompleted:()=>{null==L||L.refreshServerSide({purge:!0}),h(null),re("Batch roll back succeeded","success")},onError:()=>{re("Error rolling back batch","danger")}}),le=(0,g.useCallback)(e=>{oe({variables:{id:b,rollbackReason:e}}),re("Rollback has been started","success")},[b,oe,re]),se=(0,g.useCallback)(()=>{ie({variables:{id:p}}),re("Batch deletion has been started","success")},[p,ie,re]),ce=(0,g.useMemo)(()=>S.find(e=>e.id===y),[S,y]),ue=(0,g.useCallback)(async e=>{let{customDuplicationKey:n}=e;z.setPromptResponse(!0);const t=(a=F.data,Dr(a,"value"));var a;const{mergedData:r,strategy:i,message:o}=await z.initiateDataOverwriting(t,n);z.setPromptOpen(!1),re(o,"success"),i.overwritingNeeded&&B({mode:dQe.Values,data:r}),(i.overwritingNeeded||D)&&V(!0)},[z,re,F,B,V,D]),pe=(0,g.useCallback)(()=>{z.setPromptResponse(!1),z.setPromptOpen(!1),D&&V(!0)},[z,V,D]);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(f.Page,{title:ae,children:[y&&ce&&(0,Ze.jsx)(hUe,{batch:ce,uploadType:d,onDismiss:()=>{x(null)},refetchBatches:()=>{ne.refetchQueries({include:[OLe]})},accountId:R}),(0,Ze.jsx)(Z$,{open:Boolean(b),onClose:()=>h(null),title:"Start rollback",body:"Are you sure you want to roll back this data?",onConfirm:le,confirmButtonText:"Confirm",closeButtonText:"Cancel",withTextArea:!0,textAreaLabel:"Rollback reason (Optional)"}),(0,Ze.jsx)(Z$,{open:Boolean(p),title:"Are you sure you want to delete this data upload attempt?",onConfirm:se,onClose:()=>v(null),withFullWidthButtons:!0}),T&&(0,Ze.jsx)(RZe,{open:!0,onClose:()=>{O(null)},collapsibleChildren:(0,Ze.jsx)(vKe,{batchId:T,withTitle:!1}),title:"There's been errors on your upload, please review the details"}),(0,Ze.jsx)(FKe,{ref:P,gridKey:i,gridOptions:Z},R),(0,Ze.jsx)(MHe,{open:D,onDismiss:G,dataSection:d,onSubmit:(e,n)=>{z.setPromptOpen(!0),W(n),B({data:e,mode:dQe.Options}),z.permittedToOverwriting||V(!0)}}),(0,Ze.jsx)(tZe,{strategy:null===(r=z.overwritingStrategy)||void 0===r?void 0:r.current,onComplete:()=>{z.dismissOverwritingUi(),_()}}),(0,Ze.jsx)(fZe,{loading:z.strategyLoading,open:z.promptOpen,batchType:d,onDismiss:pe,onConfirm:ue,permittedToOverwriting:z.permittedToOverwriting}),(0,Ze.jsx)(PZe,{open:M&&!z.promptOpen,onClose:()=>{V(!1),z.dismissOverwritingUi()},maxWidth:"99vw",title:"Data preview",children:(0,Ze.jsx)(FQe,{type:d,onBack:async()=>{var e,n;U(),(D||(null===(e=z.overwritingStrategy)||void 0===e||null===(e=e.current)||void 0===e?void 0:e.status)===Vt.GV.ExecutionScheduled)&&z.dismissOverwritingUi(),null!==(n=z.overwritingStrategy)&&void 0!==n&&n.current&&await z.cancelDataOverwritingExecution()},onConfirm:()=>$(F.data),isUploading:J,mode:F.mode,data:F.data})}),(0,Ze.jsx)(f.Modal,{open:q,title:"Data uploading",children:(0,Ze.jsx)(xZe,{})})]})})};function _Ze(){return{columnDefs:[{headerName:"Status",field:"status",filter:"agTextColumnFilter",cellRenderer:"status"},{headerName:"Filename",field:"fileName",filter:"agTextColumnFilter",cellRenderer:"fileName"},{headerName:"User",field:"uploadUserFullName",filter:"agTextColumnFilter",valueGetter:e=>{var n,t;const a=(null===(n=e.data)||void 0===n||null===(n=n.user)||void 0===n?void 0:n.first_name)||"",r=(null===(t=e.data)||void 0===t||null===(t=t.user)||void 0===t?void 0:t.last_name)||"";return"".concat(a," ").concat(r).trim()}},{headerName:"Last Updated Date",field:"lastUpdated",filter:"agDateColumnFilter",sort:"desc",initialSortIndex:1,valueFormatter:e=>{let{value:n,data:t}=e;const a="Rolled Back"===(null==t?void 0:t.status);return"".concat(a?"Rolled Back at":""," ").concat(Xt(new Date(n)))}},{headerName:"Rows",field:"rowsUploaded",filter:"agTextColumnFilter"},{headerName:"Rollback User",field:"rollbackUserFullName",filter:"agTextColumnFilter",valueGetter:e=>{var n,t,a;const r=null===(n=e.data)||void 0===n||null===(n=n.rollbackUser)||void 0===n?void 0:n.first_name,i=null===(t=e.data)||void 0===t||null===(t=t.rollbackUser)||void 0===t?void 0:t.last_name;return"Rolled Back"===(null===(a=e.data)||void 0===a?void 0:a.status)&&(r||i)?"".concat(r," ").concat(i):""}},{headerName:"Rollback Reason",field:"rollbackReason",filter:"agTextColumnFilter"},{headerName:"Anomalies Found",field:"anomalyCount",filter:"agNumberColumnFilter"},{headerName:"Summary",cellRenderer:"summary",sortable:!1,filter:!1},{headerName:"Actions",cellRenderer:"actions",sortable:!1,filter:!1}]}}const FZe=[{label:"Data",to:".."},{label:"Production",to:"/data/oilProduction/view"},{label:"Uploads"}],BZe=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"oilUploadGridV2",title:"Here's your upload history",breadcrumbs:FZe,uploadLink:"../oilProduction/uploads",config:e,dataType:Vt.D_.Oil})},UZe=()=>(0,Ze.jsx)(BZe,{});var MZe=t(72801),VZe=t.n(MZe),zZe=t(14558),GZe=t.n(zZe);const $Ze={lineHeight:"21px",wordBreak:"inherit",display:"inline-block",alignItems:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},WZe=[{label:"Data",to:"/v2/data"},{label:"Sales Data"}],qZe=()=>{const[e]=(0,gs._)(VZe(),{fetchPolicy:"network-only"}),n=function(){const e=(0,N.m)(),n=rt(),{showNotification:t}=vt(),a=(0,g.useCallback)(async a=>{try{var r;const t=a.colDef.field||a.colDef.colId;if(!t)throw new Error("Unfilterable column");const i=((null===(r=(await e.query({query:GZe(),variables:{accountId:n,field:t}})).data)||void 0===r?void 0:r.getSalesDataTransactionFilters)||[]).map(e=>e.value?JSON.stringify(e):e.value);a.success(i)}catch(e){t("Couldn't load filter values for column ".concat(a.colDef.field,": ").concat(e),"danger"),a.success([])}},[e,n,t]);return(0,g.useMemo)(()=>({rowHeight:56,getRowId:ba("id"),columnDefs:[{field:"date",headerName:"Date",valueFormatter:e=>Yt(e.value),filter:"agDateColumnFilter",width:120,cellStyle:$Ze},{field:"assetName",headerName:"Asset",filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:150,cellStyle:$Ze},{field:"volumeNaturalGas",headerName:"Natural gas sales volume",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:250,cellStyle:{textAlign:"right"}},{field:"volumeNaturalGasUnit",headerName:"Natural gas sales volume unit",filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:260,cellStyle:$Ze},{field:"volumeCrudeOilBbl",headerName:"Crude Oil Volume (Bbl)",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:250,cellStyle:{textAlign:"right"}},{field:"naturalGasSalesVolumeM3",headerName:"Natural Gas Sales Volume (m³)",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:280,cellStyle:{textAlign:"right"}},{field:"crudeOilSalesVolumeM3",headerName:"Crude Oil Sales Volume (m³)",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:280,cellStyle:{textAlign:"right"}},{field:"soldProductEmissionsCO2e",headerName:"Sold Product Emissions (tCO2e)",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:300,cellStyle:{textAlign:"right"}},{field:"soldProductEmissionsCO2",headerName:"Sold Product CO2 (t)",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:220,cellStyle:{textAlign:"right"}},{field:"soldProductEmissionsCH4",headerName:"Sold Product CH4 (t)",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:220,cellStyle:{textAlign:"right"}},{field:"soldProductEmissionsN2O",headerName:"Sold Product N2O (t)",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:220,cellStyle:{textAlign:"right"}},{field:"scope1GhgEmissions",headerName:"Scope 1 GHG Emissions (tCO2e)",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:300,cellStyle:{textAlign:"right"}},{field:"scope2GhgEmissions",headerName:"Scope 2 GHG Emissions (tCO2e)",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:300,cellStyle:{textAlign:"right"}},{field:"scope3GhgEmissions",headerName:"Scope 3 GHG Emissions (tCO2e)",type:"numericColumn",filter:"agNumberColumnFilter",valueFormatter:ma,width:300,cellStyle:{textAlign:"right"}},{field:"notes",headerName:"Notes",width:200,cellStyle:$Ze},{field:"tags",headerName:"Tags",filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:150,cellStyle:$Ze},{field:"departments",headerName:"Departments",filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:150,cellStyle:$Ze},{field:"importBatchFileName",headerName:"Import File",filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:200,cellStyle:$Ze}],defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0},cellStyle:{height:"auto"}},rowStyle:{width:"100%",display:"flex",alignItems:"center"}}),[a])}(),t=(0,g.useCallback)(async n=>{const{data:{getSalesDataTransactionsPage:{totalRows:t,rows:a}}}=await e({variables:n});return{rows:a,totalRows:t}},[e]);return(0,Ze.jsx)(Jwe,{title:"Sales Data Transactions",defaultExportFileName:"sales-data-export",breadcrumbs:WZe,uploadLink:"../salesData/uploads",config:n,fetchRows:t,transactionType:Vt.D_.Oilgassales})},JZe=()=>(0,Ze.jsx)(qZe,{}),YZe=[{label:"Data",to:".."},{label:"Sales Data",to:"/data/salesData/view"},{label:"Uploads"}],HZe=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"salesDataUploadGridV2",title:"Here's your upload history",breadcrumbs:YZe,uploadLink:"../salesData/uploads",config:e,dataType:Vt.D_.Oilgassales})},KZe=()=>(0,Ze.jsx)(HZe,{});var QZe,ZZe;function XZe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const eXe=(0,D.J1)(QZe||(QZe=XZe(["\n  query GetLiquidFuelTransactionsPageFilter($accountId: ID!, $field: String!) {\n    getLiquidFuelTransactionsPageFilter(accountId: $accountId, field: $field) {\n      value\n      label\n    }\n  }\n"]))),nXe=(0,D.J1)(ZZe||(ZZe=XZe(["\n  query GetLiquidFuelTransactionsPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getLiquidFuelTransactionsPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        assetName\n        date\n        fuelConsumptionType\n        fuelType\n        fuelUnit\n        volume\n        operationalControl\n        notes\n        tags\n        departments\n        importBatchFileName\n        co2eEmissions\n        co2Emissions\n        ch4InCo2Emissions\n        n2oInCo2Emissions\n        ch4Emissions\n        n2oEmissions\n        scope1GhgEmissions\n        scope2GhgEmissions\n        scope3GhgEmissions\n      }\n    }\n  }\n"])));function tXe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function aXe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tXe(Object(t),!0).forEach(function(n){rXe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tXe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rXe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const iXe=[{label:"Data",to:".."},{label:"Liquid fuels"}],oXe={uploadReference:aDe,documentReference:rDe},lXe=()=>{const e=function(){const e=(0,N.m)(),n=Pu(),t=null==n?void 0:n.id,{showNotification:a}=vt(),r=async n=>{try{const{data:{getLiquidFuelTransactionsPageFilter:a}}=await e.query({query:eXe,variables:{accountId:t,field:n.colDef.colId||n.colDef.field}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){a("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Asset",field:"assetName",filter:"agSetColumnFilter",filterParams:{valueFormatter:la,values:r}},{headerName:"Date",field:"date",valueFormatter:da,filter:"agDateColumnFilter",sortable:!0},{headerName:"Fuel consumption type",field:"fuelConsumptionType",filter:"agSetColumnFilter",filterParams:{valueFormatter:la,values:r},width:250},{headerName:"Fuel type",field:"fuelType",filter:"agSetColumnFilter",filterParams:{valueFormatter:la,values:r}},{headerName:"Fuel unit",field:"fuelUnit",filter:"agSetColumnFilter",filterParams:{valueFormatter:la,values:r}},{headerName:"Quantity consumed",field:"volume",filter:"agNumberColumnFilter",width:250,sortable:!0},{headerName:"Operational Control",field:"operationalControl",filter:"agSetColumnFilter",width:300,filterParams:{valueFormatter:la,values:r}},{headerName:"Tags",field:"tags",filterParams:{values:r,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:r,valueFormatter:la}},{headerName:"Liq F CO2e (tonnes)",field:"co2eEmissions",filter:"agNumberColumnFilter"},{headerName:"Liq F CO2 (tonnes)",field:"co2Emissions",filter:"agNumberColumnFilter"},{headerName:"CH4 in CO2 emissions (t)",field:"ch4InCo2Emissions",filter:"agNumberColumnFilter"},{headerName:"N2O in CO2 emissions (t)",field:"n2oInCo2Emissions",width:250,filter:"agNumberColumnFilter"},{headerName:"CH4 emissions (t)",field:"ch4Emissions",filter:"agNumberColumnFilter"},{headerName:"N2O emissions (t)",field:"n2oEmissions",filter:"agNumberColumnFilter"},{headerName:"Scope 1 GHG emissions (tCO2e)",field:"scope1GhgEmissions",filter:"agNumberColumnFilter",width:300},{headerName:"Scope 2 GHG emissions (tCO2e)",field:"scope2GhgEmissions",filter:"agNumberColumnFilter",width:300},{headerName:"Scope 3 GHG emissions (tCO2e)",field:"scope3GhgEmissions",filter:"agNumberColumnFilter",width:300},{headerName:"Notes",field:"notes",filter:"agTextColumnFilter",minWidth:200,cellStyle:{textOverflow:"ellipsis"}},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:r,valueFormatter:la}}]}}(),[n]=Jm(nXe,{fetchPolicy:"network-only"}),t=(0,g.useCallback)(async e=>{const{data:{getLiquidFuelTransactionsPage:{totalRows:t,rows:a}}}=await n({variables:e});return{rows:a,totalRows:t}},[n]);return(0,Ze.jsx)(Jwe,{title:"Your liquid fuel data",defaultExportFileName:"liquid-fuel-export",breadcrumbs:iXe,uploadLink:"../liquid-fuels/uploads",config:aXe(aXe({},e),{},{components:oXe}),fetchRows:t,transactionType:Vt.D_.Liquidfuel})};function sXe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function cXe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sXe(Object(t),!0).forEach(function(n){dXe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sXe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dXe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const uXe=function(e){const n=QFe(Vt.D_.Liquidfuel);return(0,Ze.jsx)(VMe,cXe(cXe({},e),{},{dataSection:Vt.D_.Liquidfuel,dromoConfiguration:n,template:{name:"Liquid Fuels Template",fileName:"liquid-fuels-template",url:WFe,type:xR.Static}}))};var pXe=t(70359),mXe=t.n(pXe),fXe=t(12505),yXe=t.n(fXe);const gXe=[{label:"Data",to:"/v2/data"},{label:"Emissions Database"}],bXe=()=>{const[e]=Jm(mXe(),{fetchPolicy:"network-only"}),n=function(){const e=rt(),{showNotification:n}=vt(),[t]=(0,gs._)(yXe()),a=(0,g.useCallback)(async a=>{try{var r;const{data:n}=await t({variables:{accountId:e,field:a.colDef.colId||a.colDef.field}});a.success((null==n||null===(r=n.getEmissionsDatabaseFilters)||void 0===r?void 0:r.map(e=>e.value?JSON.stringify(e):e.value))||[])}catch(e){n("Couldn't load filter values for column \"".concat(a.colDef.headerName,'"'),"warning")}},[e,t,n]),r=(0,g.useMemo)(()=>[{field:"recordDataDate",headerName:"Date",sortable:!0,filter:"agDateColumnFilter",valueFormatter:e=>Yt(e.value),width:120,pinned:"left"},{field:"assetField",headerName:"Asset / Field",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:200,pinned:"left"},{field:"location",headerName:"Location",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:200,pinned:"left"},{field:"recordNo",headerName:"Record No",sortable:!0,filter:"agTextColumnFilter",width:120},{field:"country",headerName:"Country",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:150},{field:"platforms",headerName:"Platforms",sortable:!0,filter:"agTextColumnFilter",width:150},{field:"releaseValves",headerName:"Release Valves",sortable:!0,filter:"agTextColumnFilter",width:150},{field:"dataEntryByName",headerName:"Data Entry By",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:150},{field:"dateOfEntryIntoDatabase",headerName:"Date of Entry",sortable:!0,filter:"agDateColumnFilter",valueFormatter:e=>Yt(e.value),width:150},{field:"oilProductionBbl",headerName:"Oil Production (bbl)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"gasProductionKscf",headerName:"Gas Production (kscf)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"gasExportKscf",headerName:"Gas Export (kscf)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:160,cellStyle:{textAlign:"right"}},{field:"gasInjectionKscf",headerName:"Gas Injection (kscf)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:170,cellStyle:{textAlign:"right"}},{field:"gasImport",headerName:"Gas Import",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:130,cellStyle:{textAlign:"right"}},{field:"gasInjected",headerName:"Gas Injected",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:140,cellStyle:{textAlign:"right"}},{field:"waterProductionBbl",headerName:"Water Production (bbl)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"typeOfFuelConsumption",headerName:"Fuel Consumption Type",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:180},{field:"fuelType",headerName:"Fuel Type",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:120},{field:"fuelUnits",headerName:"Fuel Units",sortable:!0,filter:"agTextColumnFilter",width:120},{field:"quantityConsumed",headerName:"Quantity Consumed",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:160,cellStyle:{textAlign:"right"}},{field:"fuelGasKscf",headerName:"Fuel Gas (kscf)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:150,cellStyle:{textAlign:"right"}},{field:"flareGasKscf",headerName:"Flare Gas (kscf)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:150,cellStyle:{textAlign:"right"}},{field:"operationalControl",headerName:"Operational Control",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:160},{field:"units",headerName:"Units",sortable:!0,filter:"agTextColumnFilter",width:100},{field:"mboeAllPerDay",headerName:"Mboe (all)/day",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:140,cellStyle:{textAlign:"right"}},{field:"mboeGasPerDay",headerName:"Mboe (gas)/day",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:140,cellStyle:{textAlign:"right"}},{field:"dataMarker",headerName:"Data Marker",sortable:!0,filter:"agSetColumnFilter",filterParams:{values:a,valueFormatter:la},width:130},{field:"notes",headerName:"Notes",sortable:!0,filter:"agTextColumnFilter",width:200},{field:"ghgScope1EmissionsT",headerName:"Scope 1 GHG Emissions (tCO2e)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:220,cellStyle:{textAlign:"right"}},{field:"ghgScope2EmissionsT",headerName:"Scope 2 GHG Emissions (tCO2e)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:220,cellStyle:{textAlign:"right"}},{field:"ghgScope3EmissionsT",headerName:"Scope 3 GHG Emissions (tCO2e)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:220,cellStyle:{textAlign:"right"}},{field:"fuelGasCO2eT",headerName:"Fuel Gas CO2e (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:160,cellStyle:{textAlign:"right"}},{field:"fuelGasCO2T",headerName:"Fuel Gas CO2 (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:160,cellStyle:{textAlign:"right"}},{field:"fuelGasCH4T",headerName:"Fuel Gas CH4 (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:160,cellStyle:{textAlign:"right"}},{field:"fuelGasN2OT",headerName:"Fuel Gas N2O (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:160,cellStyle:{textAlign:"right"}},{field:"flareCO2eT",headerName:"Flare CO2e (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:140,cellStyle:{textAlign:"right"}},{field:"flareCO2T",headerName:"Flare CO2 (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:140,cellStyle:{textAlign:"right"}},{field:"flareCH4T",headerName:"Flare CH4 (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:140,cellStyle:{textAlign:"right"}},{field:"flareN2OT",headerName:"Flare N2O (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:140,cellStyle:{textAlign:"right"}},{field:"ventingCO2eT",headerName:"Venting CO2e (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:150,cellStyle:{textAlign:"right"}},{field:"ventingCH4T",headerName:"Venting CH4 (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:150,cellStyle:{textAlign:"right"}},{field:"liqFCO2eT",headerName:"Liquid Fuel CO2e (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:170,cellStyle:{textAlign:"right"}},{field:"liqFCO2EmissionsT",headerName:"Liquid Fuel CO2 (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:170,cellStyle:{textAlign:"right"}},{field:"liqFCH4EmissionsCO2",headerName:"Liquid Fuel CH4 (CO2)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"liqFN2OEmissionsT",headerName:"Liquid Fuel N2O (tCO2)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"liqFCH4EmissionsT",headerName:"Liquid Fuel CH4 (tCH4)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"liqFN2OEmissionsTonnesN2O",headerName:"Liquid Fuel N2O (tonnes N2O)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:200,cellStyle:{textAlign:"right"}},{field:"fugitiveCO2e",headerName:"Fugitive CO2e",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:140,cellStyle:{textAlign:"right"}},{field:"fugitiveCH4T",headerName:"Fugitive CH4 (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:150,cellStyle:{textAlign:"right"}},{field:"gasCompositionRecordUsed",headerName:"Gas Composition Record Used",sortable:!0,filter:"agTextColumnFilter",width:220},{field:"naturalGasSalesVolume",headerName:"Natural Gas Sales Volume",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:190,cellStyle:{textAlign:"right"}},{field:"crudeOilSalesVolume",headerName:"Crude Oil Sales Volume",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"naturalGasSalesVolumeUnit",headerName:"Natural Gas Sales Unit",sortable:!0,filter:"agTextColumnFilter",width:170},{field:"soldProductsCO2eT",headerName:"Sold Products CO2e (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"soldProductsCO2T",headerName:"Sold Products CO2 (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"soldProductsCH4T",headerName:"Sold Products CH4 (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"soldProductsN2OT",headerName:"Sold Products N2O (t)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:180,cellStyle:{textAlign:"right"}},{field:"prodWaterOverboardBwpd",headerName:"Prod. Water Overboard (bwpd)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:200,cellStyle:{textAlign:"right"}},{field:"oilInWaterPpm",headerName:"Oil in Water (ppm)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:160,cellStyle:{textAlign:"right"}},{field:"monthAvWaterLimitPPM1",headerName:"Month Av Water Limit PPM-1 (PPM)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:230,cellStyle:{textAlign:"right"}},{field:"monthAverageLimitP65",headerName:"Month Average Limit P-65 (PPM)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:220,cellStyle:{textAlign:"right"}},{field:"oilDischargeBpd",headerName:"Oil Discharge (bpd)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:160,cellStyle:{textAlign:"right"}},{field:"noxT",headerName:"NOx (tonnes)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:130,cellStyle:{textAlign:"right"}},{field:"soxT",headerName:"SOx (tonnes)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:130,cellStyle:{textAlign:"right"}},{field:"pm25T",headerName:"PM2.5 (tonnes)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:140,cellStyle:{textAlign:"right"}},{field:"coT",headerName:"CO (tonnes)",sortable:!0,filter:"agNumberColumnFilter",type:"numericColumn",valueFormatter:ma,width:120,cellStyle:{textAlign:"right"}},{field:"codeForCheckingNewDataEntry",headerName:"Code for Checking New Data Entry",sortable:!0,filter:"agTextColumnFilter",width:240}],[a]);return{getRowId:ba("id"),columnDefs:r,defaultColDef:{resizable:!0,sortable:!0,filter:!0}}}(),t=(0,g.useCallback)(async n=>{const{data:{getEmissionsDatabasePage:{totalRows:t,rows:a}}}=await e({variables:n});return{rows:a,totalRows:t}},[e]);return(0,Ze.jsx)(Jwe,{title:"Emissions Database",defaultExportFileName:"emissions-database-export",breadcrumbs:gXe,config:n,fetchRows:t,transactionType:Vt.D_.Emissionsdatabase})};function hXe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vXe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hXe(Object(t),!0).forEach(function(n){xXe(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hXe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xXe(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const TXe={scope3ActivityBasedMaterials:"s3c1-activity-based-materials",scope3SpendBasedMaterials:"s3c1-spend-based-materials",liquidFuels:"liquid-fuels",inSiteLeases:"insite-leases",inSiteBreeams:"insite-breeams",inSiteLandParcels:"insite-land-parcels"},OXe=Object.entries(TXe).reduce((e,n)=>{let[t,a]=n;return vXe(vXe({},e),{},{[a]:t})},{}),kXe=["oilProduction","salesData","liquidFuels","emissionsDatabase"],jXe=e=>TXe[e]||e,CXe=(e,n)=>{const t=(e=>OXe[e]||e)(e);return!(!e.startsWith("insite-")||!n.insite)||!(!kXe.includes(t)||!n.oilAndGas)||n[t]};var SXe;const NXe=Ge.default.div(SXe||(SXe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),wXe=e=>{let{dataAccessControls:n}=e;const{subject:t}=(0,m.g)();if(CXe(t,n))switch(t){case"waste":return(0,Ze.jsx)(eVe,{});case"electricity":return(0,Ze.jsx)(lDe,{});case"gas":return(0,Ze.jsx)(NVe,{});case"water":return(0,Ze.jsx)(GVe,{});case"transport":return(0,Ze.jsx)(fze,{});case"fuel":return(0,Ze.jsx)(Rze,{});case"materials":return(0,Ze.jsx)(Wze,{});case"refrigerants":return(0,Ze.jsx)(bDe,{});case"heatSteam":return(0,Ze.jsx)(NDe,{});case"buildingEnergyRatings":return(0,Ze.jsx)(o$e,{});case"hotelStays":return(0,Ze.jsx)(b$e,{});case"investment":return(0,Ze.jsx)(IJe,{});case"oilProduction":return(0,Ze.jsx)(ZJe,{});case"liquid-fuels":return(0,Ze.jsx)(lXe,{});case"salesData":return(0,Ze.jsx)(JZe,{});case"emissionsDatabase":return(0,Ze.jsx)(bXe,{});default:return null}return(0,Ze.jsx)(m.C5,{to:"data"})},DXe=e=>{let{dataAccessControls:n}=e;const{subject:t}=(0,m.g)();if(CXe(t,n))switch(t){case"waste":return(0,Ze.jsx)(WMe,{});case"electricity":return(0,Ze.jsx)(rVe,{});case"gas":return(0,Ze.jsx)(pVe,{});case"water":return(0,Ze.jsx)(bVe,{});case"transport":return(0,Ze.jsx)(vze,{});case"fuel":return(0,Ze.jsx)(_ze,{});case"materials":return(0,Ze.jsx)(Hze,{});case"hotelStays":return(0,Ze.jsx)(h$e,{});case"heatSteam":return(0,Ze.jsx)(sVe,{});case"refrigerants":return(0,Ze.jsx)(NJe,{});case"investment":return(0,Ze.jsx)(BJe,{});case"oilProduction":return(0,Ze.jsx)(UZe,{});case"liquid-fuels":return(0,Ze.jsx)(uXe,{});case"salesData":return(0,Ze.jsx)(KZe,{});default:return null}return(0,Ze.jsx)(m.C5,{to:"data"})},AXe=e=>{let{dataAccessControls:n}=e;const{subject:t}=(0,m.g)();if(CXe(t,n))switch(t){case"electricity":case"gas":case"water":case"heatSteam":return(0,Ze.jsx)(YGe,{utility:t.toUpperCase()});default:return null}return(0,Ze.jsx)(m.C5,{to:"data"})},RXe=()=>{const{data:e}=Td(),n=e.data,t=()=>(0,Ze.jsx)(m.C5,{to:"./view"}),a=(r=e).dataTracker?(0,Ze.jsx)(kJe,{}):(0,Ze.jsx)(gwe,{fullAccess:r.data});var r;return(0,Ze.jsx)(NXe,{children:n?(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"",element:a}),(0,Ze.jsx)(m.qh,{path:":subject/view",element:(0,Ze.jsx)(wXe,{dataAccessControls:n})}),(0,Ze.jsx)(m.qh,{path:":subject/uploads",element:(0,Ze.jsx)(DXe,{dataAccessControls:n})}),(0,Ze.jsx)(m.qh,{path:":subject/uploads/ocr",element:(0,Ze.jsx)(AXe,{dataAccessControls:n})}),(0,Ze.jsx)(m.qh,{path:":subject/uploads/alias/:id",element:(0,Ze.jsx)(IRe,{})}),(0,Ze.jsx)(m.qh,{path:":subject/",element:(0,Ze.jsx)(t,{})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:"/data"})})]}):(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"",element:a}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:"/data"})})]})})},PXe=e=>"./".concat(e.id,"/").concat(e.name,"?providerDashboardId=").concat(e.providerDashboardId),LXe=e=>"FOLDER"===e.type?"./".concat(e.id,"?providerDashboardId=").concat(e.providerDashboardId):PXe(e);var IXe,EXe,_Xe,FXe,BXe,UXe,MXe;function VXe(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const zXe=(0,Ge.default)(ze.fv)(IXe||(IXe=VXe(["\n  border: 1px solid ",";\n  background-color: ",";\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"])),e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white),GXe=(0,Ge.default)(ze.fI)(EXe||(EXe=VXe(["\n  padding: 0 0 75% 0;\n  display: block;\n  width: 100%;\n  height: auto;\n  background: "," url(",") center center no-repeat;\n  background-size: contain;\n"])),e=>{let{theme:n}=e;return n.colors.overlay.light.background},e=>{let{src:n}=e;return n}),$Xe=(0,Ge.default)(ze.GQ)(_Xe||(_Xe=VXe(["\n  background: #fff;\n  display: inline-flex;\n  flex: 0 0 auto;\n  margin-right: ",";\n"])),e=>e.theme.geometry.sm.spacing),WXe=(0,Ge.default)(ze.fv)(FXe||(FXe=VXe(["\n  padding: ",";\n  border-top: 1px solid ",";\n  background: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.normal.background,e=>{let{theme:n}=e;return n.colors.basic.white}),qXe=Ge.default.div(BXe||(BXe=VXe(["\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  transition: 0.5s ease;\n  background-color: ",";\n"])),e=>e.theme.colors[e.color].normal.background),JXe=Ge.default.div(UXe||(UXe=VXe(["\n  position: absolute;\n  width: 80%;\n  top: 50%;\n  left: 50%;\n  color: white;\n  font-size: 20px;\n  -webkit-transform: translate(-50%, -50%);\n  -ms-transform: translate(-50%, -50%);\n  transform: translate(-50%, -50%);\n  text-align: center;\n  display: none;\n"]))),YXe=Ge.default.div(MXe||(MXe=VXe(["\n  position: relative;\n\n  &:hover .overlay {\n    opacity: 1;\n    div {\n      display: block;\n    }\n  }\n"]))),HXe=e=>{let{title:n,subject:t,reportId:a,description:r,thumbnail:i}=e,o="chart-line",l="quaternary";return"LEARN"===t?(o="graduation-cap",l="secondary"):"COMPLY"===t&&(o="pencil-alt",l="tertiary"),(0,Ze.jsxs)(zXe,{name:"ReportTile ReportTile--".concat(a),container:!0,item:!0,children:[(0,Ze.jsxs)(YXe,{children:[(0,Ze.jsx)(GXe,{name:"ReportTile__DashboardThumbnail",container:!0,item:!0,distribution:"between",src:i}),(0,Ze.jsx)(qXe,{className:"overlay",color:l,children:(0,Ze.jsx)(JXe,{children:r})})]}),(0,Ze.jsx)(WXe,{container:!0,item:!0,vdistribution:"between",children:(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)($Xe,{name:"ReportTile__Icon",height:"50px",size:"lg",icon:o,iconColor:l,circleColor:l}),(0,Ze.jsx)(ze.DZ,{name:"ReportTile__Title",size:"lg",color:"dark",weight:"light",children:n})]})})]})};var KXe;const QXe=Ge.default.div(KXe||(KXe=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n\n  // Fallbacks for IE\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-self: flex-center;\n\n  // CSS grid for real browsers\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n  grid-gap: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.lg.spacing),ZXe=e=>{let{items:n}=e;return(0,Ze.jsx)(QXe,{children:n.map(e=>(0,Ze.jsx)(p.Link,{name:"ReportingReportsGrid__Link ReportingReportsGrid__Link__".concat(e.id),to:LXe(e),children:(0,Ze.jsx)(HXe,{reportId:e.providerDashboardId,title:e.name,subject:e.area,description:e.description,thumbnail:e.thumbnailUrl},e.id)},e.id))})};var XXe,e0e,n0e,t0e,a0e,r0e;function i0e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const o0e=(0,Ge.default)(ze.fI)(XXe||(XXe=i0e(["\n  margin-top: ",";\n  border: 1px solid ",";\n  background-color: ",";\n  overflow: hidden;\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white),l0e=Ge.default.div(e0e||(e0e=i0e(["\n  margin-left: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),s0e=(0,Ge.default)(ze.DZ)(n0e||(n0e=i0e(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),c0e=(0,Ge.default)(ze.EY)(t0e||(t0e=i0e(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),d0e=(0,Ge.default)(ze.EY)(a0e||(a0e=i0e(["\n  margin-right: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),u0e=Ge.default.div(r0e||(r0e=i0e(["\n  width: 192px;\n  height: 142px;\n  display: block;\n  background: "," url(",") center center no-repeat;\n  background-size: cover;\n  flex: 0 0 auto;\n  border: 1px solid ",";\n"])),e=>{let{theme:n}=e;return n.colors.overlay.light.background},e=>{let{src:n}=e;return n},e=>{let{theme:n}=e;return n.colors.overlay.normal.background}),p0e=e=>{let{reportId:n,title:t,type:a,description:r,thumbnail:i}=e;return(0,Ze.jsxs)(o0e,{name:"ReportRow ReportRow--".concat(n),container:!0,itemAlign:"center",children:[(0,Ze.jsx)(u0e,{name:"ReportRow__Thumbnail",src:i}),(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,distribution:"between",itemAlign:"center",children:[(0,Ze.jsxs)(l0e,{children:[(0,Ze.jsx)(s0e,{size:"lg",weight:"normal",color:"dark",name:"ReportRow__Title",children:t}),(0,Ze.jsxs)(c0e,{name:"ReportRow__Category",size:"md",color:"normal",children:["Category: ",a]}),(0,Ze.jsxs)(ze.EY,{name:"ReportRow__LastModified",size:"md",color:"normal",children:["Description: ",r]})]}),(0,Ze.jsx)(d0e,{size:"lg",color:"normal",children:(0,Ze.jsx)(ze.In,{icon:"chevron-right"})})]})]})};var m0e;const f0e=Ge.default.div(m0e||(m0e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n  overflow: auto;\n"]))),y0e=e=>{let{items:n}=e;return(0,Ze.jsx)(f0e,{children:n.map(e=>(0,Ze.jsx)(p.Link,{name:"ReportingReportsList__Link ReportingReportsList__Link--".concat(e.id),to:LXe(e),children:(0,Ze.jsx)(p0e,{reportId:e.providerDashboardId,title:e.name,description:e.description,type:e.area,thumbnail:e.thumbnailUrl},e.id)},e.id))})};var g0e,b0e;function h0e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const v0e="32px",x0e="md",T0e=(0,Ge.default)(ze.fv)(g0e||(g0e=h0e(["\n  padding: ",";\n  cursor: pointer;\n"])),e=>e.theme.geometry.xs.spacing),O0e=(0,Ge.default)(ze.fI)(b0e||(b0e=h0e([""]))),k0e=e=>{let{showComply:n,showData:t,showLearn:a,onClick:r}=e;return(0,Ze.jsxs)(O0e,{container:!0,children:[(0,Ze.jsx)(T0e,{onClick:()=>r("Learn"),children:(0,Ze.jsx)(ze.GQ,{icon:"graduation-cap",height:v0e,iconColor:a?"secondary":"normal",size:x0e,circleColor:a?"secondary":"normal",name:"Reports-ShowLearn-".concat(a)})}),(0,Ze.jsx)(T0e,{onClick:()=>r("Comply"),children:(0,Ze.jsx)(ze.GQ,{icon:"pencil-alt",height:v0e,iconColor:n?"tertiary":"normal",size:x0e,circleColor:n?"tertiary":"normal",name:"Reports-ShowComply-".concat(n)})}),(0,Ze.jsx)(T0e,{onClick:()=>r("Data"),children:(0,Ze.jsx)(ze.GQ,{icon:"chart-line",height:v0e,iconColor:t?"quaternary":"normal",size:x0e,circleColor:t?"quaternary":"normal",name:"Reports-ShowData-".concat(t)})})]})};var j0e,C0e,S0e,N0e,w0e;function D0e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const A0e=Ge.default.div(j0e||(j0e=D0e(["\n  overflow: auto;\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.lg.spacing),R0e=(0,Ge.default)(ze.fI)(C0e||(C0e=D0e(["\n  padding-right: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.dark.background),P0e=(0,Ge.default)(ze.vj)(S0e||(S0e=D0e(["\n  flex: 1 1 auto;\n  form > div {\n    background: none;\n    border: 0;\n    border-radius: 0;\n  }\n"]))),L0e=(0,Ge.default)(ze.Yq)(N0e||(N0e=D0e(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.md.spacing),I0e=Ge.default.div(w0e||(w0e=D0e(["\n  padding: 10px 0px 0px 10px;\n"]))),E0e=function(e){let{dashboards:n,filterOnClick:t,subjectFilters:a}=e;const[r,i,o=[]]=hf(n,["name"]),{showGrid:l,showList:s,isGrid:c,isList:d}=hy();return(0,Ze.jsxs)(A0e,{children:[(0,Ze.jsxs)(ze.fI,{container:!0,children:[(0,Ze.jsxs)(R0e,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(P0e,{name:"ReportingReports__Search",value:r,onChange:e=>i(e.target.value),hideButton:!0}),(0,Ze.jsx)(L0e,{name:"ReportingReports__ShowGrid",size:"md",color:c?"primary":"normal",weight:l?"bold":"normal",underline:!1,onClick:l,inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"th"})}),(0,Ze.jsx)(L0e,{name:"ReportingReports__ShowList",size:"md",color:d?"primary":"normal",weight:s?"bold":"normal",underline:!1,onClick:s,inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"th-list"})})]}),(0,Ze.jsx)(I0e,{children:(0,Ze.jsx)(k0e,{onClick:t,showLearn:a.showLearn,showComply:a.showComply,showData:a.showData})})]}),o.length>0&&c&&(0,Ze.jsx)(ZXe,{items:o}),o.length>0&&d&&(0,Ze.jsx)(y0e,{items:o}),!o.length>0&&(0,Ze.jsx)(nv,{name:"ReportingReports__NoResults",title:"There are no results for this search."})]})};var _0e,F0e;function B0e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function U0e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B0e(Object(t),!0).forEach(function(n){M0e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B0e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function M0e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function V0e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const z0e=Ge.default.div(_0e||(_0e=V0e(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),G0e=(0,Ge.default)(Tn)(F0e||(F0e=V0e(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),$0e=["b1f7fc4e-714d-4271-bb3f-d736dff38a14","608877fc-83e7-4487-b5a4-493e0ba05903"],W0e=[{id:"0f7db846-67a6-4d3e-807d-67c3ef5f4f30",name:"Patron Capital - Carbon Report"},{id:"65236e34-ca0d-42e1-a8f1-b7c71ca08555",name:"Patron Capital - Dalton Park"},{id:"1a8ee51b-e5c9-483a-85d6-86e9117e0aa1",name:"Patron Capital - MK Gateway"},{id:"3e75ba9e-3c96-4396-b1b7-ba4f64680907",name:"Patron Capital - GRESB"}],q0e=(0,Ye.Ay)(e=>{let{intl:n}=e;const t=rt(),{folderId:a}=(0,m.g)(),[r,i]=(0,g.useState)({showLearn:!0,showComply:!0,showData:!0}),o=Pu(),l=(null==o?void 0:o.type)===Vt.CO.Engage,{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(JL,{variables:{accountId:t}}),[p,f]=(0,g.useState)(s),y=(0,g.useMemo)(()=>[{title:n.formatMessage({id:"pages.reporting.breadcrumbs.one"}),to:"/reporting"},{title:n.formatMessage({id:"pages.reporting.breadcrumbs.two"}),to:"/reporting"}],[n]);(0,g.useEffect)(()=>{if(!c)if($0e.includes(o.id)){const e=null==s?void 0:s.getSubscribedDashboards.filter(e=>!W0e.map(e=>{let{id:n}=e;return n}).includes(e.id));f({getSubscribedDashboards:e})}else f(s)},[c,s,o]);const b=null==p?void 0:p.getSubscribedDashboards.filter(e=>(null==e?void 0:e.folderId)===a).filter(e=>{const n=!!r.showLearn&&"LEARN"===e.area,t=!!r.showComply&&"COMPLY"===e.area,a=!!r.showData&&"DATA"===e.area;return n||a||t}).sort((e,n)=>e.name.toLowerCase()>n.name.toLowerCase()?1:e.name.toLowerCase()<n.name.toLowerCase()?-1:0);return(0,Ze.jsxs)(z0e,{name:"ReportingReports",children:[(0,Ze.jsx)(ige,{name:"ReportingReports",title:n.formatMessage({id:"pages.reporting.heading"}),breadcrumbs:y,icon:"chart-line",iconColor:"quaternary"}),l&&(0,Ze.jsx)(G0e,{name:"ComplyContainer_Access_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Reporting",body:"Currently Reporting is not included in your subscription, if you’d like access to Reporting please contact Rio AI Ltd or get in touch with your Business Admin."}),!l&&c&&(0,Ze.jsx)(Vg,{name:"ReportingReports__Loading"}),!l&&d&&(0,Ze.jsx)(ze.Kw,{error:d,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"ReportingReports__error",icon:a,title:n,body:t,retry:u})}}),!l&&s&&(0,Ze.jsx)(E0e,{dashboards:b,accountId:t,subjectFilters:r,filterOnClick:e=>{const n=U0e({},r);"Learn"===e?n.showLearn=!r.showLearn:"Comply"===e?n.showComply=!r.showComply:"Data"===e&&(n.showData=!r.showData),i(U0e({},n))}})]})}),J0e=()=>{const e=rt(),{data:n,loading:t,error:a}=(0,h.IT)(JL,{variables:{accountId:e},notifyOnNetworkStatusChange:!0}),[r,i]=(0,g.useState)(n);return(0,g.useEffect)(()=>{if(!t){const t=[{id:"0f7db846-67a6-4d3e-807d-67c3ef5f4f30",name:"Patron Capital - Carbon Report"},{id:"65236e34-ca0d-42e1-a8f1-b7c71ca08555",name:"Patron Capital - Dalton Park"},{id:"1a8ee51b-e5c9-483a-85d6-86e9117e0aa1",name:"Patron Capital - MK Gateway"},{id:"3e75ba9e-3c96-4396-b1b7-ba4f64680907",name:"Patron Capital - GRESB"}];if(["b1f7fc4e-714d-4271-bb3f-d736dff38a14","608877fc-83e7-4487-b5a4-493e0ba05903"].includes(e)){const e=null==n?void 0:n.getSubscribedDashboards.filter(e=>!t.map(e=>{let{id:n}=e;return n}).includes(e.id));i({getSubscribedDashboards:e})}else i(n)}},[t,n,e]),[r,t,a]};function Y0e(){return Ps("ESTATES_DASHBOARD","4836705a-96db-464f-97e7-6af6e775c5a6")}var H0e;const K0e=(0,qi.Ay)("div")(H0e||(H0e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  min-width: 250px;\n  max-width: 260px;\n  height: max-content;\n  overflow: auto;\n  margin-right: 24px;\n  flex-shrink: 0;\n"]))),Q0e=e=>{let{dashboards:n}=e;const t=(0,m.zy)(),{pathname:a}=t,r=Y0e(),i=(0,g.useMemo)(()=>{const e=[...n].sort(Ta).filter(e=>"Quicksight Preloader"!==e.name).map(e=>{const n=encodeURIComponent(e.name);return{to:"/v2/reporting/".concat(n,"/").concat(e.id,"?providerDashboardId=").concat(e.providerDashboardId),item:e.name,isActive:a.includes("/".concat(n,"/")),onClick:()=>window.scrollTo({top:0})}}),t={to:"/v2/reporting/overview",item:"Overview",isActive:"/v2/reporting/overview"===a,onClick:()=>window.scrollTo({top:0})},i=[];return r&&i.push({to:"/v2/reporting/estates",item:"Estates",isActive:"/v2/reporting/estates"===a,onClick:()=>window.scrollTo({top:0})}),[t,...e,...i]},[n,a,r]);return(0,Ze.jsx)(K0e,{children:(0,Ze.jsx)(f.NavigationDrawer,{items:i})})};var Z0e;const X0e=(0,f.styled)("div")(Z0e||(Z0e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n"])));var e1e;const n1e=(0,f.styled)("div")(e1e||(e1e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  overflow-x: auto;\n  gap: 24px;\n  margin-bottom: 48px;\n  width: 100%;\n"]))),t1e=[{headerName:"Scope",field:"scope"},{headerName:"Source",field:"source"},{headerName:"Gross carbon emissions",field:"gross",aggFunc:"sum",valueFormatter:e=>{let{value:n}=e;return vi(n||0)}},{headerName:"Net carbon emissions",field:"net",aggFunc:"sum",valueFormatter:e=>{let{value:n}=e;return vi(n||0)}}];var a1e;const r1e=(0,f.styled)(f.AgGrid)(a1e||(a1e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n  height: 276px;\n\n  && .ag-layout-normal {\n    min-height: 100px;\n  }\n\n  & .ag-root-wrapper {\n    border-radius: 16px;\n    border: ",";\n  }\n\n  & .ag-row-footer > div:first-child:after {\n    content: 'Total';\n    font-family: ",";\n    font-size: ","px;\n    color: ",";\n    font-weight: 600;\n  }\n"])),e=>{let{tableBorder:n,theme:t}=e;return n?"1px solid ".concat(t.sys.color.outlineVariant):"none"},e=>e.theme.sys.typescale.label.medium.family,e=>e.theme.sys.typescale.label.medium.size,e=>{let{theme:n}=e;return n.sys.color.onSurface}),i1e=e=>{let{emissions:n}=e;const t=(0,g.useRef)(),a=(0,g.useCallback)(e=>{t.current=e.api},[]),r=(0,g.useMemo)(()=>({onGridReady:a,rowData:n,columnDefs:t1e,defaultColDef:{flex:1,minWidth:150},grandTotalRow:"bottom",groupIncludeTotalFooter:!0}),[n,a]);return(0,Ze.jsx)(r1e,{tableBorder:!1,gridKey:"emissionsByScopeSourceGridV2",gridOptions:r})};var o1e=t(31883);const l1e={"Scope 1":"governance","Scope 2":"economic","Scope 3":"environmental",Electricity:"electricity",Water:"water",Waste:"waste","Natural Gas":"gas",Transport:"transport",Gas:"gas",HeatSteam:"heatAndSteam",Fuel:"fuel","Home working":"workFromHome","Refrigerants and Other Gases":"refrigerants",Materials:"materials","Hotel stays":"hotelStays"},s1e=e=>l1e[e],c1e={HeatSteam:"Heat and Steam"},d1e=e=>c1e[e]||e,u1e=e=>Gt()(e).map(e=>({value:e.absoluteValue,color:s1e(e.id),name:d1e(e.id)})).orderBy(["name"]).value();function p1e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function m1e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p1e(Object(t),!0).forEach(function(n){f1e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p1e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function f1e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const y1e=e=>Gt()(e).orderBy(["dimension"]).map(e=>m1e(m1e({},e),{},{dimension:d1e(e.dimension)})).value();function g1e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function b1e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g1e(Object(t),!0).forEach(function(n){h1e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g1e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function h1e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const v1e=e=>{const n=e.reduce((e,n)=>{const t=e[n.dimension];return b1e(b1e({},e),{},t?{[n.dimension]:b1e(b1e({},t),{},{value:t.value+(n.value||0)})}:{[n.dimension]:{color:s1e(n.dimension)||"primary",value:n.value||0,name:d1e(n.dimension)}})},{});return Object.values(n)},x1e=(e,n)=>{if(n)return n;switch(e){case Vt.RA.Locations:return"Locations";case Vt.RA.Tags:return"Tags";case Vt.RA.Departments:return"Departments";case Vt.RA.Countries:return"Countries";case Vt.RA.Regions:return"Regions";case Vt.RA.Meters:return"Meters";case Vt.RA.ActualOrEstimated:return"Accuracy";case Vt.RA.LocationOccupation:return"Location occupation";case Vt.RA.Scopes:return"Scope";case Vt.RA.Sources:return"Source";case Vt.RA.Units:return"Units";case Vt.RA.FromDate:return"From";case Vt.RA.ToDate:return"To";case Vt.RA.LocationCustomAttributes:return"Location custom attributes";case Vt.RA.Year_1:return"Year 1";case Vt.RA.Year_2:return"Year 2";case Vt.RA.Period_1:return"Period 1";case Vt.RA.Period_2:return"Period 2";case Vt.RA.StandaloneYear:return"Year";case Vt.RA.WasteStreams:return"Waste streams";case Vt.RA.WasteContractors:return"Waste contractors";case Vt.RA.WasteCarriers:return"Waste carriers";case Vt.RA.ProjectPhases:return"Project phases";case Vt.RA.FuelTypes:return"Fuel types";case Vt.RA.TransportTypes:return"Transport types";case Vt.RA.Materials:return"Materials";case Vt.RA.BusinessUnit:return"Business unit";case Vt.RA.WaterInOut:return"Water in/out";case Vt.RA.UploadReferences:return"Upload references";case Vt.RA.PurposesOfTravel:return"Purpose of travel";default:return}},T1e=e=>{switch(e){case Vt.RA.FromDate:return"from";case Vt.RA.ToDate:return"to";case Vt.RA.Locations:return"locations";case Vt.RA.Tags:return"tags";case Vt.RA.Departments:return"departments";case Vt.RA.Countries:return"countries";case Vt.RA.Regions:return"regions";case Vt.RA.Meters:return"meters";case Vt.RA.ActualOrEstimated:return"actualOrEstimated";case Vt.RA.LocationOccupation:return"locationOccupation";case Vt.RA.Scopes:return"scopes";case Vt.RA.Sources:return"sources";case Vt.RA.Units:return"units";case Vt.RA.LocationCustomAttributes:return"locationCustomAttributes";case Vt.RA.Year_1:return"year1";case Vt.RA.Year_2:return"year2";case Vt.RA.Period_1:return"period1";case Vt.RA.Period_2:return"period2";case Vt.RA.StandaloneYear:return"standaloneYear";case Vt.RA.WasteStreams:return"wasteStreams";case Vt.RA.WasteContractors:return"wasteContractors";case Vt.RA.WasteCarriers:return"wasteCarriers";case Vt.RA.ProjectPhases:return"projectPhases";case Vt.RA.FuelTypes:return"fuelTypes";case Vt.RA.TransportTypes:return"transportTypes";case Vt.RA.Materials:return"materials";case Vt.RA.BusinessUnit:return"businessUnit";case Vt.RA.WaterInOut:return"waterInOut";case Vt.RA.UploadReferences:return"uploadReferences";case Vt.RA.PurposesOfTravel:return"purposesOfTravel";default:return}},O1e=e=>e.includes(Ma.YearToCompareType.CALENDAR)?Ma.YearToCompareType.CALENDAR:Ma.YearToCompareType.FINANCIAL,k1e=e=>Number(e.split(" ")[0]),j1e=["Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Jan","Feb","Mar"],C1e=e=>{let{filter:{type:n,label:t}}=e;const{filters:a,setFilter:r}=J1e(),i=(0,g.useMemo)(()=>{const e=n===Vt.RA.Year_1,t=Wt()().year(),a=e?5:6;return[...Array.from({length:a},(e,n)=>"".concat(t-5+n," ").concat(Ma.YearToCompareType.CALENDAR," Year")),...Array.from({length:a},(e,n)=>"".concat(t-5+n," ").concat(Ma.YearToCompareType.FINANCIAL," Year"))].map(e=>({value:e,label:e})).sort((e,n)=>e.label.includes(Ma.YearToCompareType.CALENDAR)||n.label.includes(Ma.YearToCompareType.CALENDAR)?-1:1).sort((e,n)=>{const t=k1e(e.label);return k1e(n.label)-t})},[n]),o=(0,g.useMemo)(()=>n===Vt.RA.Year_1?a.year1:a.year2,[n,a.year1,a.year2]),l=(0,g.useCallback)((e,n)=>{if(a.year1&&a.year2)if("year1"===e){const e=k1e(n),t=k1e(a.year2),i=O1e(n),o=O1e(a.year2);if(e&&t&&(e>=t||i!==o)){const n=i!==o?i:o;r("year2","".concat(e>=t?e+1:t," ").concat(n," Year"))}}else{const e=k1e(a.year1),t=k1e(n),i=O1e(a.year1),o=O1e(n);if(e&&t&&(e>=t||i!==o)){const n=i!==o?o:i;r("year1","".concat(e>=t?t-1:e," ").concat(n," Year"))}}},[a.year1,a.year2,r]),s=(0,g.useCallback)(e=>{n===Vt.RA.Year_1?(r("year1",e.value),l("year1",e.value)):(r("year2",e.value),l("year2",e.value))},[n,r,l]);return(0,g.useEffect)(()=>{l("year1",a.year1)},[null==a?void 0:a.year1]),(0,g.useEffect)(()=>{l("year2",a.year2)},[null==a?void 0:a.year2]),(0,Ze.jsx)(f.Select,{disableSorting:!0,label:x1e(n,t),value:o,options:i,onChange:s})},S1e=(e,n)=>{if(e===Z1e.Year){const e=Wt()().year()-("period1"===n?2:1);return"".concat(Wt()().year(e).startOf("year").format("YYYY-MM-DD")," - ").concat(Wt()().year(e).endOf("year").format("YYYY-MM-DD"))}if(e===Z1e.Quarter){const e=Wt()().year()-("period1"===n?1:0),t=Wt()().quarter();return"".concat(Wt()().year(e).quarter(t).startOf("quarter").format("YYYY-MM-DD")," - ").concat(Wt()().year(e).quarter(t).endOf("quarter").format("YYYY-MM-DD"))}if(e===Z1e.Month){const e=Wt()().year()-("period1"===n?1:0),t=Wt()().month();return"".concat(Wt()().year(e).month(t).startOf("month").format("YYYY-MM-DD")," - ").concat(Wt()().year(e).month(t).endOf("month").format("YYYY-MM-DD"))}if(e===Z1e.HalfYear){const e=Wt()().year()-("period1"===n?1:0),t=Wt()().month()<6?1:2;return"".concat(Wt()().year(e).month(6*(t-1)).startOf("month").format("YYYY-MM-DD")," - ").concat(Wt()().year(e).month(6*(t-1)+5).endOf("month").format("YYYY-MM-DD"))}return null},N1e=(e,n)=>{const t=Wt()().year();return e===Z1e.Year?Array.from({length:n},(e,n)=>{const a=t-5+n;return{value:"".concat(Wt()().year(a).startOf("year").format("YYYY-MM-DD")," - ").concat(Wt()().year(a).endOf("year").format("YYYY-MM-DD")),label:"".concat(a)}}):e===Z1e.Quarter?Array.from({length:n},(e,n)=>{const a=t-5+n,r=Array.from({length:4},(e,n)=>{const t=n+1;return{value:"".concat(Wt()().year(a).quarter(t).startOf("quarter").format("YYYY-MM-DD")," - ").concat(Wt()().year(a).quarter(t).endOf("quarter").format("YYYY-MM-DD")),label:"".concat(a," Q").concat(t)}});return r}).flat():e===Z1e.Month?Array.from({length:n},(e,n)=>{const a=t-5+n,r=Array.from({length:12},(e,n)=>{const t=n;return{value:"".concat(Wt()().year(a).month(t).startOf("month").format("YYYY-MM-DD")," - ").concat(Wt()().year(a).month(t).endOf("month").format("YYYY-MM-DD")),label:"".concat(a," ").concat(Wt()().month(t).format("MMM"))}});return r}).flat():e===Z1e.HalfYear?Array.from({length:n},(e,n)=>{const a=t-5+n,r=Array.from({length:2},(e,n)=>{const t=n+1;return{value:"".concat(Wt()().year(a).month(6*(t-1)).startOf("month").format("YYYY-MM-DD")," - ").concat(Wt()().year(a).month(6*(t-1)+5).endOf("month").format("YYYY-MM-DD")),label:"".concat(a," H").concat(t)}});return r}).flat():[]},w1e=e=>{let{filter:{type:n,label:t}}=e;const{setFilter:a,periodGranularity:r,filters:i}=J1e(),o=(0,g.useMemo)(()=>{const e=n===Vt.RA.Period_1;return r?N1e(r,e?5:6):[]},[n,r]),l=(0,g.useMemo)(()=>r?N1e(r,6):[],[r]),s=(0,g.useCallback)(()=>{r&&(a("period1",S1e(r,"period1")),a("period2",S1e(r,"period2")))},[r,a]),c=(0,g.useCallback)(e=>{n===Vt.RA.Period_1?a("period1",e.value):a("period2",e.value)},[n,a]),d=(0,g.useMemo)(()=>n===Vt.RA.Period_1?i.period1:i.period2,[n,i.period1,i.period2]),u=(0,g.useCallback)(e=>{if(!i.period1||!i.period2)return;const n=l.findIndex(e=>e.value===i.period1),t=l.findIndex(e=>e.value===i.period2);if(!(-1===n||-1===t||n<t))if("period1"===e){const e=n+1;e<l.length?a("period2",l[e].value):(a("period1",i.period2),a("period2",i.period1))}else{const e=t-1;e>=0?a("period1",l[e].value):(a("period1",i.period2),a("period2",i.period1))}},[l,i.period1,i.period2,a]);return(0,g.useEffect)(()=>{u("period1")},[i.period1,u]),(0,g.useEffect)(()=>{u("period2")},[i.period2,u]),(0,g.useEffect)(()=>{s()},[r]),(0,Ze.jsx)(f.Select,{disableSorting:!0,label:x1e(n,t),value:d,options:o,onChange:c})},D1e=()=>{const{periodGranularity:e,setPeriodGranularity:n}=J1e();return(0,Ze.jsx)(f.Select,{label:"Granularity",value:e,options:Object.values(Z1e).map(e=>({label:(0,zt.capitalize)(e.replace("-"," ")),value:e})),onChange:e=>n(e.value)})};var A1e=t(5255),R1e=t(52076);const P1e="print-dashboard-sheet";function L1e(e){let{name:n,onError:t,onSuccess:a}=e;setTimeout(async()=>{try{const e=document.getElementById(P1e);if(!e)throw new Error("Dashboard sheet element not found");const t=await(0,R1e.Ay)(e,{scale:2}),r=t.toDataURL("image/png"),i=444.46,o=i/t.width*t.height,l=new A1e.Ay("p","px",[i,o],!0),s=l.internal.pageSize.getWidth(),c=8,d=s-2*c,u=t.height*d/t.width;l.addImage(r,"PNG",c,c,d,u),l.save("".concat(n,".pdf")),null==a||a()}catch(e){null==t||t(e)}},1500)}function I1e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function E1e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I1e(Object(t),!0).forEach(function(n){_1e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I1e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _1e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const F1e={from:null,to:null,year1:null,year2:null,period1:null,period2:null,standaloneYear:null,locations:null,tags:null,departments:null,countries:null,regions:null,meters:null,actualOrEstimated:null,locationOccupation:null,scopes:null,sources:null,units:null,wasteStreams:null,wasteContractors:null,wasteCarriers:null,projectPhases:null,businessUnit:null,waterInOut:null,uploadReferences:null,purposesOfTravel:null};let B1e=function(e){return e.WTT="WTT",e.TD="TD",e}({});const U1e=(e,n,t)=>"dashboard-filters-".concat(e,"-").concat(n,"-").concat(t),M1e=(e,n,t)=>{const a=U1e(e,n,t);localStorage.removeItem(a)},V1e=(e,n,t)=>{try{const a=U1e(e,n,t),r=localStorage.getItem(a);return r?JSON.parse(r):null}catch(a){return console.warn("Failed to retrieve cached filters:",a),M1e(e,n,t),null}},z1e=(e,n,t)=>"dashboard-unit-".concat(e,"-").concat(n,"-").concat(t),G1e=(e,n,t)=>"dashboard-with-vat-".concat(e,"-").concat(n,"-").concat(t),$1e=(e,n,t)=>"dashboard-carbon-components-".concat(e,"-").concat(n,"-").concat(t),W1e=(e,n,t)=>"dashboard-period-granularity-".concat(e,"-").concat(n,"-").concat(t),q1e=(0,g.createContext)({dashboardId:"",dashboardName:"",activeSheet:null,setActiveSheetByIndex:()=>{},setActiveSheetByTitle:()=>{},setFilters:()=>{},setFilter:()=>{},partitionFunctionForYearComparison:null,resetFilters:()=>{},selectedUnit:"",setSelectedUnit:()=>{},withVat:!1,setWithVat:()=>{},selectedCarbonComponents:null,setSelectedCarbonComponents:()=>{},areFiltersOpen:!0,setAreFiltersOpen:()=>{},isAnyFilterActive:!1,filters:F1e,queryVariablesFilters:F1e,activeFilters:{},pdfExportFilters:{},periodGranularity:null,setPeriodGranularity:()=>{},downloadPdf:()=>{},isExportingPdf:!1,doesSheetHaveMultipleUnits:!1,doesSheetHaveVatCalculation:!1,doesSheetHavePeriodFilters:!1,doesSheetHaveYearComparisonFilters:!1,doesSheetHaveCarbonComponents:!1}),J1e=()=>(0,g.useContext)(q1e),Y1e=e=>{const{isExportingPdf:n}=J1e();return n&&e.current?e.current.getBoundingClientRect().width-120:void 0},H1e=(e,n)=>e||(n===Vt.WP.Today?Wt()().format(Ga):n===Vt.WP.StartOfCurrentMonth?Wt()().startOf("month").format(Ga):n===Vt.WP.EndOfCurrentMonth?Wt()().endOf("month").format(Ga):n===Vt.WP.StartOfCurrentYear?Wt()().startOf("year").format(Ga):n===Vt.WP.EndOfCurrentYear?Wt()().endOf("year").format(Ga):n===Vt.WP.StartOfCurrentQuarter?Wt()().startOf("quarter").format(Ga):n===Vt.WP.EndOfCurrentQuarter?Wt()().endOf("quarter").format(Ga):n===Vt.WP.StartOfLastYear?Wt()().subtract(1,"year").startOf("year").format(Ga):n===Vt.WP.EndOfLastYear?Wt()().subtract(1,"year").endOf("year").format(Ga):n===Vt.WP.StartOfLastQuarter?Wt()().subtract(1,"quarter").startOf("quarter").format(Ga):n===Vt.WP.EndOfLastQuarter?Wt()().subtract(1,"quarter").endOf("quarter").format(Ga):n===Vt.WP.StartOfLastMonth?Wt()().subtract(1,"month").startOf("month").format(Ga):n===Vt.WP.EndOfLastMonth?Wt()().subtract(1,"month").endOf("month").format(Ga):""),K1e=e=>{const n=E1e({},F1e);return e.forEach(e=>{switch(e.type){case Vt.RA.FromDate:n.from=H1e(e.defaultValue,e.relativeDateDefault||Vt.WP.StartOfCurrentMonth);break;case Vt.RA.ToDate:n.to=H1e(e.defaultValue,e.relativeDateDefault||Vt.WP.EndOfCurrentMonth);break;case Vt.RA.Year_1:n.year1=e.defaultValue||"".concat(Wt()().year()-2," ").concat(Ma.YearToCompareType.CALENDAR," Year");break;case Vt.RA.Year_2:n.year2=e.defaultValue||"".concat(Wt()().year()-1," ").concat(Ma.YearToCompareType.CALENDAR," Year");break;case Vt.RA.Period_1:n.period1=S1e(Z1e.Quarter,"period1");break;case Vt.RA.Period_2:n.period2=S1e(Z1e.Quarter,"period2");break;case Vt.RA.StandaloneYear:n.standaloneYear=e.defaultValue||"2024"}}),n},Q1e=["from","to","period1","period2","year1","year2","standaloneYear"];let Z1e=function(e){return e.Year="year",e.HalfYear="half-year",e.Quarter="quarter",e.Month="month",e}({});const X1e=e=>{var n,t;let{dashboard:a,children:r}=e;const i=rt(),[o,l]=(0,g.useState)((null==a||null===(n=a.sheets)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.title)||""),[s,c]=(0,g.useState)(!0),[d,u]=(0,g.useState)(!1),[p,m]=(0,g.useState)(null),[f,y]=(0,g.useState)(""),[b,h]=(0,g.useState)(null),[v,x]=(0,g.useState)(!1),{showNotification:T}=vt(),[O,k]=(0,g.useState)(()=>{var e;const n=null==a||null===(e=a.sheets)||void 0===e?void 0:e[0];if(!a||null==n||!n.filters||!i)return F1e;return V1e(i,a.id,n.title)||K1e(n.filters)}),j=(0,g.useCallback)(e=>{var n;const t=null==e?void 0:e.filters,r=(null==e||null===(n=e.units)||void 0===n?void 0:n[0])||"",o=null==t?void 0:t.some(e=>e.type===Vt.RA.Period_1||e.type===Vt.RA.Period_2);if(!(t&&e&&i&&null!=a&&a.id))return;l(e.title);const s=V1e(i,a.id,e.title);k(s||K1e(t));const c=((e,n,t)=>{const a=z1e(e,n,t),r=localStorage.getItem(a);return null!=r?r:null})(i,a.id,e.title);y(c||r);const d=((e,n,t)=>{const a=G1e(e,n,t),r=localStorage.getItem(a);return r?JSON.parse(r):null})(i,a.id,e.title);var u;x(d||null!==(u=e.withVat)&&void 0!==u&&u);const p=((e,n,t)=>{const a=$1e(e,n,t),r=localStorage.getItem(a);return r?JSON.parse(r):null})(i,a.id,e.title);h(p);const f=((e,n,t)=>{const a=W1e(e,n,t),r=localStorage.getItem(a);return r?JSON.parse(r):null})(i,a.id,e.title);m(f||(o?Z1e.Month:null))},[a,i]),C=(0,g.useCallback)(e=>{var n;const t=null==a||null===(n=a.sheets)||void 0===n?void 0:n[e];t&&j(t)},[j,null==a?void 0:a.sheets]),S=(0,g.useCallback)(e=>{var n;const t=null==a||null===(n=a.sheets)||void 0===n?void 0:n.find(n=>n.title===e);t&&j(t)},[j,null==a?void 0:a.sheets]),N=(0,g.useCallback)(e=>{y(e),null!=a&&a.id&&((e,n,t,a)=>{const r=z1e(e,n,t);localStorage.setItem(r,a)})(i,a.id,o,e)},[i,null==a?void 0:a.id,o]),w=(0,g.useCallback)(e=>{const n="true"===e;x(n),null!=a&&a.id&&((e,n,t,a)=>{const r=G1e(e,n,t);localStorage.setItem(r,JSON.stringify(a))})(i,a.id,o,n)},[i,null==a?void 0:a.id,o]),D=(0,g.useCallback)(e=>{h(e),null!=a&&a.id&&((e,n,t,a)=>{const r=$1e(e,n,t);localStorage.setItem(r,JSON.stringify(a))})(i,a.id,o,e)},[i,null==a?void 0:a.id,o]),A=(0,g.useCallback)(e=>{m(e),null!=a&&a.id&&((e,n,t,a)=>{const r=W1e(e,n,t);localStorage.setItem(r,JSON.stringify(a))})(i,a.id,o,e)},[i,null==a?void 0:a.id,o]),R=(0,g.useMemo)(()=>{var e;const n=null==a||null===(e=a.sheets)||void 0===e||null===(e=e.find(e=>e.title===o))||void 0===e?void 0:e.filters;return n?K1e(n):E1e({},F1e)},[o,a]),P=(0,g.useMemo)(()=>Object.entries(O).reduce((e,n)=>{let[t,a]=n;const r=Array.isArray(a)&&0===a.length,i=null===R[t];return r&&i||(0,zt.isEqual)(a,R[t])||(e[t]=a),e},{}),[O,R]),L=(0,g.useMemo)(()=>Object.keys(P).length>0,[P]),I=(0,g.useCallback)((e,n)=>{k(t=>E1e(E1e({},t),{},{[e]:n}))},[]),E=(0,g.useCallback)(e=>{const n=!e||0===e.length;if(o&&null!=a&&a.id&&i){if(p&&A(Z1e.Quarter),n)return M1e(i,null==a?void 0:a.id,o),void k(R);((e,n,t,a)=>{const r=U1e(e,n,t),i=V1e(e,n,t);i&&(a.forEach(e=>{delete i[e]}),localStorage.setItem(r,JSON.stringify(i)))})(i,null==a?void 0:a.id,o,e),(null!=e&&e.includes("period1")||null!=e&&e.includes("period2"))&&A(Z1e.Quarter),k(n=>E1e(E1e({},n),e.reduce((e,n)=>(e[n]=R[n],e),{})))}},[R,o,null==a?void 0:a.id,i,p,A]),_=(0,g.useMemo)(()=>{var e,n,t;const r=null!==(e=null==a||null===(n=a.sheets)||void 0===n?void 0:n.findIndex(e=>e.title===o))&&void 0!==e?e:-1,i=null==a||null===(t=a.sheets)||void 0===t?void 0:t[r];return i&&-1!==r?{sheet:i,index:r}:null},[o,a]),F=(0,g.useMemo)(()=>{var e,n;const t=null!==(e=null==_||null===(n=_.sheet)||void 0===n?void 0:n.filters)&&void 0!==e?e:[],a=new Set(t.map(e=>T1e(e.type)).filter(e=>void 0!==e)),r=E1e({},P);for(const e of Q1e)if(a.has(e)){const n=O[e];(Array.isArray(n)?n.length>0:null!=n&&""!==n)&&(r[e]=n)}return r},[P,null==_||null===(t=_.sheet)||void 0===t?void 0:t.filters,O]),B=(0,g.useMemo)(()=>Object.fromEntries(Object.entries(O).map(e=>{let[n,t]=e;return[n,Array.isArray(t)&&0===t.length?null:t]})),[O]),U=(0,g.useMemo)(()=>O.year1&&O.year2?O1e(O.year1)===Ma.YearToCompareType.CALENDAR?Vt.v7.Year:Vt.v7.FinancialYear:null,[O.year1,O.year2]),M=(0,g.useCallback)(()=>{u(!0),T("Generating PDF, please wait until it's ready","success"),L1e({name:"".concat(null==a?void 0:a.name," - ").concat(null==_?void 0:_.sheet.title),onSuccess:()=>u(!1),onError:e=>{T("Error downloading PDF: ".concat(e.message),"danger"),u(!1)}})},[T,null==a?void 0:a.name,null==_?void 0:_.sheet.title]);(0,g.useLayoutEffect)(()=>{if(null!=a&&a.id&&i){var e;const t=(null==a||null===(e=a.sheets)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.title)||"";if(t){S(t);const e=V1e(i,a.id,t);var n;O.from||e||k(K1e((null===(n=a.sheets)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.filters)||[])),!O.from&&e&&k(e)}}},[null==a?void 0:a.id,i]),(0,g.useLayoutEffect)(()=>{o&&null!=a&&a.id&&i&&(O.from&&O.to||O.year1&&O.year2)&&((e,n,t,a)=>{const r=U1e(e,n,t);localStorage.setItem(r,JSON.stringify(a))})(i,a.id,o,O)},[O,o,null==a?void 0:a.id,i]);const V=(0,g.useMemo)(()=>{var e;return null!==(e=(null==_?void 0:_.sheet.units)&&(null==_?void 0:_.sheet.units.length)>1)&&void 0!==e&&e},[_]),z=(0,g.useMemo)(()=>{var e;return null!==(e=null==_?void 0:_.sheet.withVat)&&void 0!==e&&e},[_]),G=(0,g.useMemo)(()=>{var e;return null!==(e=null==_?void 0:_.sheet.filters.some(e=>e.type===Vt.RA.Period_1||e.type===Vt.RA.Period_2))&&void 0!==e&&e},[_]),$=(0,g.useMemo)(()=>{var e;return null!==(e=null==_?void 0:_.sheet.filters.some(e=>e.type===Vt.RA.Year_1||e.type===Vt.RA.Year_2))&&void 0!==e&&e},[_]),W=(0,g.useMemo)(()=>{var e;return null!==(e=null==_?void 0:_.sheet.withCarbonComponents)&&void 0!==e&&e},[_]);return(0,Ze.jsx)(q1e.Provider,{value:{dashboardId:(null==a?void 0:a.id)||"",dashboardName:(null==a?void 0:a.name)||"",activeSheet:_,setActiveSheetByIndex:C,setActiveSheetByTitle:S,filters:O,queryVariablesFilters:B,activeFilters:P,pdfExportFilters:F,partitionFunctionForYearComparison:U,setFilters:k,setFilter:I,selectedUnit:f,setSelectedUnit:N,withVat:v,setWithVat:w,selectedCarbonComponents:b,setSelectedCarbonComponents:D,isAnyFilterActive:L,resetFilters:E,areFiltersOpen:s,setAreFiltersOpen:c,downloadPdf:M,isExportingPdf:d,periodGranularity:p,setPeriodGranularity:A,doesSheetHaveMultipleUnits:V,doesSheetHaveVatCalculation:z,doesSheetHavePeriodFilters:G,doesSheetHaveYearComparisonFilters:$,doesSheetHaveCarbonComponents:W},children:r})},e2e=e=>{var n,t,a;return null==e||""===(null==e||null===(n=e.trim)||void 0===n?void 0:n.call(e))||"null"===(null==e||null===(t=e.trim)||void 0===t?void 0:t.call(e))||"undefined"===(null==e||null===(a=e.trim)||void 0===a?void 0:a.call(e))},n2e=(e,n)=>null!==e&&!e.includes(n),t2e=(e,n)=>{const t="number"==typeof e?String(e):e;return e2e(t)?n:t},a2e=(e,n)=>{let t=0;return t="number"==typeof e?e:Number(t2e(e,"0")),Number(t)?e:Number(t2e(n,"0"))},r2e=e=>{let{co2eValue:n,wttValue:t,tdValue:a,selectedCarbonComponents:r}=e,i=o2e(n);const o=n2e(r,B1e.WTT),l=n2e(r,B1e.TD);return o&&(i-=o2e(t)),l&&(i-=o2e(a)),i},i2e=function(e){let n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||Number.isNaN(e))return 0;if("string"==typeof e){if("null"===e||"undefined"===e||""===e)return 0;n=Number(e)}else n=e;if(isNaN(n))return 0;const r=Number.isInteger(n)?n.toString():parseFloat(n.toFixed(t)).toString();if(a){const e=r.split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}return Number(r)},o2e=(e,n)=>{let t=0;return t="number"==typeof e?e:Number(i2e(Number(t2e(e,"0")),"t"===(null==n?void 0:n.originalUnit)?4:2)),"t"===(null==n?void 0:n.originalUnit)&&"kg"===(null==n?void 0:n.targetUnit)&&(t*=1e3),"kg"===(null==n?void 0:n.originalUnit)&&"t"===(null==n?void 0:n.targetUnit)&&(t/=1e3),"km"===(null==n?void 0:n.originalUnit)&&"mi"===(null==n?void 0:n.targetUnit)&&(t*=.621371),"mi"===(null==n?void 0:n.originalUnit)&&"km"===(null==n?void 0:n.targetUnit)&&(t/=.621371),"L"===(null==n?void 0:n.originalUnit)&&"m3"===(null==n?void 0:n.targetUnit)&&(t/=1e3),"m3"===(null==n?void 0:n.originalUnit)&&"L"===(null==n?void 0:n.targetUnit)&&(t*=1e3),null!=n&&n.withVat&&(t*=1.2),null!=n&&n.percentageOverTotal&&(t=n.percentageOverTotal?Number(t)/n.percentageOverTotal*100:0,t=Number(t.toFixed(2))),null!=n&&n.percentageOverTotal&&(t=n.percentageOverTotal?Number(t)/n.percentageOverTotal*100:0,t=Number(t.toFixed(2))),t},l2e=e=>t2e(e,"N/A"),s2e=e=>Wt()(e,"YYYY/MM").format("MMM YYYY"),c2e=(e,n)=>Wt()(null==e?void 0:e.Date,"MMM YYYY").toDate().getTime()-Wt()(null==n?void 0:n.Date,"MMM YYYY").toDate().getTime(),d2e=(e,n)=>null!=n&&n.percentageOverTotal?"".concat(i2e(Number(e)/n.percentageOverTotal*100,2,!0)).concat(n.suppressPercentageSign?"":"%"):i2e(e,"t"===(null==n?void 0:n.selectedUnit)?4:2,!0),u2e=new Intl.NumberFormat([],{notation:"compact"}),p2e=e=>Number.isNaN(Number(e))?0:u2e.format(Number(e)),m2e=e=>e?"(VAT included)":"(VAT excluded)",f2e=e=>{if(!e||e.length===Object.values(B1e).length)return"";let n=" ";return n2e(e,B1e.WTT)&&(n+="- WTT"),n2e(e,B1e.TD)&&(n+="- T&D"),n},y2e=e=>Gt().capitalize(Gt().startCase(e).toLowerCase());function g2e(e,n){if(!e)return[];const t=Array.isArray(e)?e[0]:e;return null==t||"object"!=typeof t?[]:Object.keys(t).filter(e=>{var t;return!(null!=n&&null!==(t=n.excludeKeys)&&void 0!==t&&t.includes(e))}).map(e=>{let t=e;return null!=n&&n.removeSuffixFromLabels&&t.endsWith(null==n?void 0:n.removeSuffixFromLabels)&&(t=t.slice(0,-(null==n?void 0:n.removeSuffixFromLabels.length))),null!=n&&n.removePrefixFromLabels&&t.startsWith(null==n?void 0:n.removePrefixFromLabels)&&(t=t.slice(null==n?void 0:n.removePrefixFromLabels.length)),{valueKey:e,labelKey:t}})}function b2e(e,n,t,a,r){if(!e)return null;const i=new Map,o=new Set;for(const r of e){const e=n.map(e=>r[e]).join("||");if(!i.has(e)){const t={};for(const e of n)t[e]=r[e],o.add(e);i.set(e,t)}const l=i.get(e),s=r[t],c=r[a],d="".concat(t).concat(s).concat(a);o.add(d),"number"==typeof l[d]&&"number"==typeof c?l[d]=l[d]+c:l[d]=c;for(const[e,i]of Object.entries(r))n.includes(e)||e===t||e===a||"number"!=typeof i||(o.add(e),l[e]=("number"==typeof l[e]?l[e]:0)+i)}const l=Array.from(o);return Array.from(i.values()).map(e=>{for(const n of l)n in e||(e[n]=(e[n],0));if(r){let t=0;for(const[a,r]of Object.entries(e))n.includes(a)||"number"!=typeof r||(t+=r);e[r]=t,o.add(r)}return e})}const h2e=e=>e?e.dataPoints.map(e=>e.reduce((e,n)=>(e[n.dimension]=n.value,e),{})):null;function v2e(e){if("number"==typeof e)return Number.isFinite(e)?e:0;if("string"==typeof e){const n=Number(e);return Number.isFinite(n)?n:0}return 0}function x2e(e){return null==e?"":String(e)}const T2e=e=>"Act"===e||"ACT"===e?"Actual":"Est"===e||"EST"===e?"Estimated":"N/A";var O2e;const k2e=(0,f.styled)(f.SimplePieDonutChart)(O2e||(O2e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  & {\n    width: 100%;\n    height: 100%;\n\n    svg {\n      width: 100% !important;\n      height: 100% !important;\n    }\n  }\n\n  & div[data-highcharts-chart] {\n    overflow: visible !important;\n  }\n\n  & > div:first-child {\n    display: flex;\n    justify-content: center;\n    width: 100%;\n    height: 100%;\n    overflow: visible !important;\n\n    & > div:first-child {\n      display: flex;\n      justify-content: center;\n      justify-content: center;\n      height: 100% !important;\n      overflow: visible !important;\n    }\n  }\n\n  "," {\n    & {\n      position: static;\n      flex-direction: column;\n      gap: 24px;\n    }\n  }\n"])),e=>{let{theme:n}=e;return n.breakpoints.down("md")});function j2e(e){let{scopeBreakdown:n,title:t,border:a}=e;const r=(0,f.useTheme)(),i=(0,o1e.A)(r.breakpoints.down("md")),o=(0,o1e.A)(r.breakpoints.down("lg")),l=(0,g.useMemo)(()=>({chart:{width:i?320:o?480:600,height:i?140:o?160:212}}),[i,o]),s=(0,g.useMemo)(()=>Gt()(n.series).map(e=>({value:e.absoluteValue,name:e.id,color:s1e(e.id)})).orderBy(["name"],["asc"]).value(),[n]);return(0,Ze.jsx)(k2e,{title:t,size:f.ChartSize.Fluid,data:s,unit:"tCO2e",customOptions:l,border:a})}var C2e;const S2e=(0,D.J1)(C2e||(C2e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getReportingOverview(\n    $accountId: ID!\n    $from: AWSDate!\n    $to: AWSDate!\n    $baselineFrom: AWSDate!\n    $baselineTo: AWSDate!\n    $timeGranularity: TimeGranularity!\n  ) {\n    getTotalEmissions(accountId: $accountId, from: $from, to: $to)\n\n    baselineTotalEmissions: getTotalEmissions(accountId: $accountId, from: $baselineFrom, to: $baselineTo)\n\n    getEmissionsPercentageBreakdownByScope(accountId: $accountId, from: $from, to: $to) {\n      series {\n        id\n        relativeValue\n        absoluteValue\n      }\n      drilldown {\n        id\n        parentId\n        relativeValue\n        absoluteValue\n      }\n    }\n    getEmissionsBySource(accountId: $accountId, timeGranularity: $timeGranularity, from: $from, to: $to) {\n      dimension\n      time\n      value\n    }\n    getEmissionsByScopeAndSource(accountId: $accountId, from: $from, to: $to) {\n      totalNet\n      totalGross\n      emissions {\n        scope\n        source\n        gross\n        net\n      }\n    }\n    getEmissionsNetAndGross(accountId: $accountId, timeGranularity: $timeGranularity, from: $from, to: $to) {\n      dimension\n      time\n      value\n    }\n  }\n"])));function N2e(){return[Wt()().subtract(1,"year").startOf("month"),Wt()().add(-1,"month").endOf("month")]}const[w2e,D2e]=N2e(),A2e=w2e.clone().add(-1,"year"),R2e=D2e.clone().add(-1,"year"),P2e=w2e.toDate(),L2e=D2e.toDate();function I2e(){var e,n,t,a;const r=rt(),{data:i,loading:o}=(0,h.IT)(S2e,{variables:{accountId:r,timeGranularity:Vt.iG.Month,to:D2e.format("YYYY-MM-DD"),from:w2e.format("YYYY-MM-DD"),baselineFrom:A2e.format("YYYY-MM-DD"),baselineTo:R2e.format("YYYY-MM-DD")}});return o||!i?null:(0,Ze.jsxs)(X0e,{id:P1e,children:[(0,Ze.jsxs)(n1e,{children:[(0,Ze.jsx)(f.KpiChart,{slot:!0,title:"Total carbon (tCO2e)",unit:"tCO2e",round:0,metric:{startDate:P2e,endDate:L2e,value:i.getTotalEmissions},baseline:{value:i.baselineTotalEmissions,startDate:A2e.toDate(),endDate:R2e.toDate()},size:f.ChartSize.STall}),(0,Ze.jsx)(f.SimplePieDonutChart,{title:"Emissions by Scope",border:!0,unit:"tCO2e",size:f.ChartSize.Md,startDate:P2e,endDate:L2e,data:u1e(i.getEmissionsPercentageBreakdownByScope.series)})]}),(0,Ze.jsx)(n1e,{children:(0,Ze.jsx)(f.StackedChart,{title:"Emissions by Source",data:y1e(i.getEmissionsBySource),size:f.ChartSize.Xl,colors:l1e,unit:"tCO2e",startDate:P2e,endDate:L2e,dataLabels:{enabled:!1}})}),(0,Ze.jsx)(n1e,{children:(0,Ze.jsx)(f.ChartContainer,{border:!0,title:"Carbon Emissions by Scope & Source",size:f.ChartSize.Fluid,startDate:P2e,endDate:L2e,noData:!(null!=i&&null!==(e=i.getEmissionsByScopeAndSource)&&void 0!==e&&null!==(e=e.emissions)&&void 0!==e&&e.length)||(null==i||null===(n=i.getEmissionsByScopeAndSource)||void 0===n||null===(n=n.emissions)||void 0===n||null===(t=n.every)||void 0===t?void 0:t.call(n,e=>!e.net&&!e.gross)),children:(0,Ze.jsx)(i1e,{emissions:(null==i||null===(a=i.getEmissionsByScopeAndSource)||void 0===a?void 0:a.emissions)||[]})})}),(0,Ze.jsx)(n1e,{children:(0,Ze.jsx)(f.ColumnChart,{title:"Gross & Net Emissions",data:(null==i?void 0:i.getEmissionsNetAndGross)||[],size:f.ChartSize.Xl,unit:"tCO2e",startDate:P2e,endDate:L2e,dataLabels:{enabled:!1}})})]})}var E2e=t(85255),_2e=t(59434);const F2e={apiKey:kn("REACT_APP_GOOGLE_MAP_API_KEY"),mapIds:{impactLocations:kn("REACT_APP_IMPACT_LOCATIONS_MAP_ID")}};var B2e;const U2e=(0,D.J1)(B2e||(B2e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetLocationsWithCoordinates($accountId: ID!) {\n    getLocationsPage(accountId: $accountId, withCoordinatesOnly: true, offset: 0, limit: 100) {\n      rows {\n        id\n        name\n        description\n        picture\n        latitude\n        longitude\n        address {\n          address1\n          address2\n          address3\n          city\n          postcode\n          country {\n            name\n          }\n        }\n        wasteIn {\n          id\n          name\n        }\n        wasteOut {\n          id\n          name\n        }\n        enableProject\n        displayOnImpactDashboard\n      }\n    }\n  }\n"]))),M2e=t.p+"pin-map-cce3c0177e4f38b9d92b.svg",V2e=(0,f.styled)("div")(e=>{let{width:n,height:t}=e;return{flexShrink:0,width:n||"115px",height:t||"188px",backgroundColor:"#f0f0f0",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center"}}),z2e=(0,f.styled)("img")(e=>{let{width:n,height:t}=e;return{flexShrink:0,width:n||"115px",height:t||"188px",objectFit:"cover",borderRadius:"3px"}}),G2e=e=>{let{width:n,height:t}=e;return(0,Ze.jsx)(V2e,{width:n,height:t,children:(0,Ze.jsx)(f.Text,{size:"small",typescale:"title",children:"No picture"})})},$2e=e=>{let{src:n,width:t,height:a}=e;return n?(0,Ze.jsx)(z2e,{src:n,width:t,height:a}):(0,Ze.jsx)(G2e,{width:t,height:a})},W2e={"Scope 1":"Scope 1 (direct) emissions occur from combustion in sources which are directly owned or controlled by your organisation.","Scope 2":"Scope 2 (indirect) emissions occur from purchased electricity, heat, and steam where the energy has been generated at another facility, but is consumed by your organisation.","Scope 3":"Scope 3 (indirect) emissions are all other indirect emissions which occur within your organisation’s value chain."},q2e="tCO2e",J2e=f.ChartSize.S,Y2e=f.ChartSize.Md,H2e=f.ChartSize.Xl,K2e="Target total emissions",Q2e="Current period total emissions";var Z2e,X2e;function e5e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const n5e='\n{\n  text: [\n    {\n      filterType: text,\n      operator: OR,\n      condition1: {\n        filterType: text,\n        type: equals,\n        filter: "'.concat(K2e,'",\n      },\n      condition2: {\n        filterType: text,\n        type: equals,\n        filter: "').concat(Q2e,'",\n      },\n      conditions: [\n        {\n          filterType: text,\n          type: equals,\n          filter: "').concat(K2e,'",\n        },\n        {\n          filterType: text,\n          type: equals,\n          filter: "').concat(Q2e,'",\n        },\n      ],\n      field: "name",\n    },\n  ],\n}'),t5e=(0,D.J1)(Z2e||(Z2e=e5e(["\n  query getImpactDashboardData(\n    $accountId: ID!\n    $locationId: ID\n    $targetStartDate: AWSDate!\n    $targetEndDate: AWSDate!\n    $baselineStartDate: AWSDate!\n    $baselineEndDate: AWSDate!\n    $currentPeriodStartDate: AWSDate!\n    $currentPeriodEndDate: AWSDate!\n    $excludeScope: Int\n    $organisationalUnitIds: [ID!]\n  ) {\n    analysis: getImpactDashboardData(\n      accountId: $accountId\n      locationId: $locationId\n      targetStartDate: $targetStartDate\n      targetEndDate: $targetEndDate\n      baselineStartDate: $baselineStartDate\n      baselineEndDate: $baselineEndDate\n      currentPeriodStartDate: $currentPeriodStartDate\n      currentPeriodEndDate: $currentPeriodEndDate\n      excludeScope: $excludeScope\n      organisationalUnitIds: $organisationalUnitIds\n    ) {\n      targetTotalEmissions\n\n      baselineTotalEmissions\n\n      currentPeriodTotalEmissions\n\n      targetScopeBreakdown {\n        ...ScopeBreakdownFields\n      }\n\n      targetEmissionsByScope {\n        ...TimeSeriesDataPointFields\n      }\n\n      targetEmissionsBySource {\n        ...TimeSeriesDataPointFields\n      }\n\n      baselineScopeBreakdown {\n        ...ScopeBreakdownFields\n      }\n\n      baselineEmissionsByScope {\n        ...TimeSeriesDataPointFields\n      }\n\n      baselineEmissionsBySource {\n        ...TimeSeriesDataPointFields\n      }\n\n      currentPeriodScopeBreakdown {\n        ...ScopeBreakdownFields\n      }\n\n      currentPeriodEmissionsByScope {\n        ...TimeSeriesDataPointFields\n      }\n\n      currentPeriodEmissionsBySource {\n        ...TimeSeriesDataPointFields\n      }\n    }\n\n    normalizers: getNormalisersPage(\n      accountId: $accountId\n      filters: ","\n    ) {\n      rows {\n        name\n        quantity\n      }\n    }\n  }\n\n  fragment ScopeBreakdownFields on PieChartData {\n    series {\n      id\n      relativeValue\n      absoluteValue\n    }\n    drilldown {\n      id\n      parentId\n      relativeValue\n      absoluteValue\n    }\n  }\n\n  fragment TimeSeriesDataPointFields on TimeSeriesDataPoint {\n    dimension\n    time\n    value\n  }\n"])),n5e),a5e=(0,D.J1)(X2e||(X2e=e5e(["\n  query getElectricityConsumption(\n    $accountId: ID!\n    $from: String!\n    $to: String!\n    $timeGranularity: ElectricityConsumptionTimeGranularity!\n    $locationId: String\n    $organisationalUnitIds: [ID!]\n  ) {\n    getElectricityConsumption(\n      accountId: $accountId\n      from: $from\n      to: $to\n      timeGranularity: $timeGranularity\n      locationId: $locationId\n      organisationalUnitIds: $organisationalUnitIds\n    ) {\n      time\n      value\n    }\n  }\n"])));function r5e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i5e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r5e(Object(t),!0).forEach(function(n){o5e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r5e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o5e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l5e(){const e=Pu();return(0,g.useMemo)(()=>{var n,t;if(!e)return null;let a=null==e?void 0:e.reportingYear;null!==(n=a)&&void 0!==n&&n.startDate&&null!==(t=a)&&void 0!==t&&t.endDate||(a={startDate:"1000-01-01T00:00:00.000Z",endDate:"1000-12-31T23:59:59.000Z"});const r=Wt()(a.startDate).utc().format("MM"),i=Wt()(a.startDate).utc().format("DD"),o=Wt()(a.endDate).utc().format("MM"),l=Wt()(a.endDate).utc().format("DD"),s=Wt()(),c="".concat(r,"-").concat(i),d="".concat(o,"-").concat(l);return Number(s.format("MM"))>=Number(r)?{targetStartDate:Wt()(c,"MM-DD").add(-1,"year").toDate(),targetEndDate:Wt()(d,"MM-DD").toDate(),baselineStartDate:Wt()(c,"MM-DD").add(-2,"year").toDate(),baselineEndDate:Wt()(d,"MM-DD").add(-1,"year").toDate(),currentPeriodStartDate:Wt()(c,"MM-DD").toDate(),currentPeriodEndDate:s.toDate()}:{targetStartDate:Wt()(c,"MM-DD").add(-2,"year").toDate(),targetEndDate:Wt()(d,"MM-DD").add(-1,"year").toDate(),baselineStartDate:Wt()(c,"MM-DD").add(-3,"year").toDate(),baselineEndDate:Wt()(d,"MM-DD").add(-2,"years").toDate(),currentPeriodStartDate:Wt()(c,"MM-DD").add(-1,"year").toDate(),currentPeriodEndDate:s.toDate()}},[e])}var s5e,c5e,d5e;function u5e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const p5e=(0,f.styled)("div")(s5e||(s5e=u5e(["\n  display: flex;\n  padding: 16px 16px 20px 16px;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 8px;\n  align-self: stretch;\n  width: 626px;\n  max-width: 626px;\n  border-radius: 16px;\n  border: 1px solid ",";\n  background: ",";\n  box-shadow: 0px 8px 12px 2px rgba(0, 0, 0, 0.05), 0px 2x 2px 0px rgba(0, 0, 0, 0.1);\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.surface}),m5e=(0,f.styled)(f.Text)(c5e||(c5e=u5e(["\n  line-height: 24px;\n  margin-bottom: 8px;\n"]))),f5e=(0,f.styled)(f.Text)(d5e||(d5e=u5e(["\n  line-height: 16px;\n"]))),y5e=e=>{let{title:n,text:t}=e;return(0,Ze.jsxs)(p5e,{children:[(0,Ze.jsx)(m5e,{typescale:"body",size:"large",children:n}),(0,Ze.jsx)(f5e,{typescale:"body",size:"small",children:t})]})};var g5e,b5e,h5e=t(25573);function v5e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function x5e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v5e(Object(t),!0).forEach(function(n){T5e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v5e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function T5e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O5e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const k5e=(0,f.styled)("div")(g5e||(g5e=O5e(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  height: 100%;\n"]))),j5e=(0,f.styled)(f.Button)(b5e||(b5e=O5e(["\n  position: absolute;\n  top: 24px;\n  right: 28px;\n"]))),C5e=e=>{let{locationId:n,startDate:t,endDate:a,organisationalUnitIds:r}=e;const i=rt(),[o,l]=(0,g.useState)(null),{chartTheme:s}=(0,f.useAgChartsTheme)(),{loading:c,data:d,error:u}=(0,h.IT)(a5e,{variables:{accountId:i,from:Wt()(t).format("YYYY-MM-DD"),to:Wt()(a).format("YYYY-MM-DD"),locationId:n,organisationalUnitIds:r,timeGranularity:Vt.gb.Month}}),{loading:p,data:m,error:y}=(0,h.IT)(a5e,{variables:{accountId:i,from:Wt()(o).format("YYYY-MM-DD"),to:Wt()(o).endOf("month").format("YYYY-MM-DD"),locationId:n,organisationalUnitIds:r,timeGranularity:Vt.gb.HalfHour},skip:!o}),b=(0,g.useMemo)(()=>null==d?void 0:d.getElectricityConsumption.map(e=>x5e(x5e({},e),{},{time:Wt()(e.time,"YYYY/MM").toDate()})),[d]),v=(0,g.useMemo)(()=>null!=m&&m.getElectricityConsumption&&o?((e,n)=>{const t=e.reduce((e,n)=>{const t=Wt()(n.time.substring(0,17).replace("T"," "),"YYYY-MM-DD HH:mm").format("YYYY-MM-DD HH:mm");return x5e(x5e({},e),{},{[t]:n.value})},{});return(e=>{const n=Wt()(e).startOf("month").add(30,"minutes"),t=Wt()(e).add(1,"month").startOf("month"),a=[];for(;n.isBefore(t)||n.isSame(t,"minute");)a.push(n.format("YYYY-MM-DD HH:mm")),n.add(30,"minutes");return a})(n).map(e=>({time:new Date(e),value:t[e]||0}))})(m.getElectricityConsumption,o):[],[m,o]),x=(0,g.useMemo)(()=>({theme:s,data:b,series:[{type:"bar",xKey:"time",yKey:"value",yName:"Kwh",fillOpacity:1,listeners:{nodeClick:e=>{"nodeClick"===e.type&&l(Wt()(e.datum.time,"YYYY-MM-DD").startOf("month").toDate())}},tooltip:{renderer:e=>({heading:Wt()(e.datum.time,"YYYY-MM-DD").format("YYYY/MM")})}}],axes:[{type:"category",position:"bottom",label:{formatter:e=>Wt()(e.value).format("YYYY/MM")}},{type:"number",position:"left"}]}),[s,b]),T=(0,g.useMemo)(()=>({theme:s,data:v,zoom:{enabled:!0,enableScrolling:!0,enableSelecting:!1},navigator:{enabled:!0},series:[{type:"bar",xKey:"time",yKey:"value",yName:"Kwh",fillOpacity:1,tooltip:{renderer:e=>({heading:Wt()(e.datum[e.xKey]).format("MMM D - HH:mm")})}}],axes:[{type:"time",position:"bottom",nice:!1,min:null==o?void 0:o.getTime(),max:Wt()(o).endOf("month").toDate().getTime()},{type:"number",position:"left"}]}),[o,s,v]),O=c||p,k=u||y;return(0,Ze.jsxs)(f.ChartContainer,{size:f.ChartSize.Xl,startDate:t,endDate:a,children:[O?(0,Ze.jsx)(k5e,{children:(0,Ze.jsx)(f.Loader,{})}):null,!O&&k?(0,Ze.jsx)(k5e,{children:(0,Ze.jsxs)(f.Text,{textAlign:"center",children:["Error: ",k.message]})}):null,O||k?null:(0,Ze.jsx)(Ze.Fragment,{children:o?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(j5e,{startIcon:(0,Ze.jsx)(f.Icons.ArrowBack,{}),onClick:()=>l(null),children:"Back to yearly view"}),(0,Ze.jsx)(h5e.ui,{options:T})]}):(0,Ze.jsx)(h5e.ui,{options:x})})]})};var S5e,N5e,w5e;function D5e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const A5e=(0,f.styled)("div")(S5e||(S5e=D5e(["\n  border: ",";\n  border-radius: 16px;\n  padding: 20px;\n  margin-bottom: 0px;\n  max-width: 100%;\n  width: 100%;\n"])),e=>{let{theme:n}=e;return"1px solid ".concat(n.sys.color.outlineVariant)}),R5e=(0,f.styled)("div")(N5e||(N5e=D5e(["\n  display: flex;\n  justify-content: start;\n  align-items: center;\n  gap: 8px;\n  cursor: pointer;\n"]))),P5e=(0,f.styled)("div")(e=>{let{visible:n}=e;return{width:"100%",position:"relative",display:n?"block":"none",marginTop:16}}),L5e=(0,f.styled)(f.Icons.ChevronRight)(w5e||(w5e=D5e(["\n  transform: ",";\n"])),e=>{let{areFiltersOpen:n}=e;return n?"rotate(-90deg)":"rotate(90deg)"}),I5e=(0,g.forwardRef)(function(e,n){let{open:t=!1,onToggle:a,children:r}=e;const[i,o]=(0,g.useState)(t),l=a?t:i;return(0,Ze.jsxs)(A5e,{ref:n,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsxs)(R5e,{onClick:()=>a?a():o(!i),children:[(0,Ze.jsx)(f.Text,{typescale:"title",children:"Filters"}),(0,Ze.jsx)(f.IconButton,{children:(0,Ze.jsx)(L5e,{areFiltersOpen:l})})]})}),(0,Ze.jsx)(P5e,{visible:l,children:r})]})});I5e.displayName="DashboardFilterPanel";var E5e,_5e,F5e=t(60517);function B5e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const U5e=(0,f.styled)(f.Text)(E5e||(E5e=B5e(["\n  margin-bottom: 24px;\n  font-size: 24px;\n"]))),M5e=(0,f.styled)(f.KpiChart)(_5e||(_5e=B5e(["\n  & ."," {\n    font-size: 20px;\n    font-weight: 400;\n    color: #5c5757;\n  }\n"])),f.chartClassNames.chartContainerTitle),V5e=(0,f.styled)("div")({marginBottom:48}),z5e=(0,f.styled)("div")({marginBottom:20,display:"flex",justifyContent:"right"}),G5e=(0,f.styled)("div")({marginBottom:48}),$5e=(0,f.styled)("div")({position:"relative"}),W5e=(0,f.styled)(F5e.A)(e=>{let{theme:n}=e;return{position:"absolute",backgroundColor:"rgba(255, 255, 255, 0.5)",zIndex:n.zIndex.drawer+1}}),q5e=(0,f.styled)(f.LinearProgress)({height:2,marginBottom:48});function J5e(e){var n,t;let{locationId:a}=e;const[r,i]=(0,g.useState)(null),{data:o,loading:l,error:s}=function(e){let{organisationalUnitIds:n,locationId:t}=e;const a=rt(),r=l5e(),i=(0,g.useMemo)(()=>r?Gne()(r,e=>Wt()(e).format("YYYY-MM-DD")):null,[r]),[o,l]=(0,g.useState)(),s=(0,g.useRef)(!1),c=(0,g.useRef)(),[d,{error:u}]=(0,gs._)(t5e);return(0,g.useEffect)(()=>{a&&i&&(async()=>{const e=i5e({accountId:a,organisationalUnitIds:n,locationId:t,excludeScope:[tr,nr].includes(a)?3:void 0},i);if(s.current)c.current=e;else{let n;try{do{s.current=!0;const t=c.current||e;c.current=void 0,n=(await d({variables:t})).data}while(c.current);l(n)}finally{s.current=!1}}})()},[n,t,a,i]),{loading:s.current,error:u,data:(0,g.useMemo)(()=>o?i5e(i5e({},o.analysis),{},{normalizers:o.normalizers}):void 0,[o])}}({locationId:a,organisationalUnitIds:r}),c=null==o?void 0:o.normalizers.rows,d=null==c||null===(n=c.find(e=>{let{name:n}=e;return n===K2e}))||void 0===n?void 0:n.quantity,u=null==c||null===(t=c.find(e=>{let{name:n}=e;return n===Q2e}))||void 0===t?void 0:t.quantity,p=Ps("IMPACT_NORMALIZED_CARBON_TILES",nr,...pr.filter(e=>e!==ar)),m=Ps("HH_ELECTRICITY_TILE",nr,ir,or,rr,...pr),y=l5e();if(s)return(0,Ze.jsx)(G5e,{children:(0,Ze.jsx)(f.LoadFailed,{title:"Something went wrong",error:s})});if(!y)return null;const b={value:null!=o&&o.targetTotalEmissions&&d?1e3*o.targetTotalEmissions/d:null,startDate:y.targetStartDate,endDate:y.targetEndDate},h={value:null!=o&&o.currentPeriodTotalEmissions&&u?1e3*o.currentPeriodTotalEmissions/u:null,startDate:y.currentPeriodStartDate,endDate:y.currentPeriodEndDate},v={value:(null==o?void 0:o.targetTotalEmissions)||null,startDate:y.targetStartDate,endDate:y.targetEndDate},x={value:(null==o?void 0:o.currentPeriodTotalEmissions)||null,startDate:y.currentPeriodStartDate,endDate:y.currentPeriodEndDate};return(0,Ze.jsxs)(Ze.Fragment,{children:[!a&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(z5e,{children:(0,Ze.jsx)(STe,{disabled:!r,hint:"Clear filters",color:"secondary",icon:(0,Ze.jsx)(f.Icons.FilterAltOff,{}),onClick:()=>i(null)})}),(0,Ze.jsx)(V5e,{children:(0,Ze.jsx)(I5e,{children:(0,Ze.jsx)(f.Grid,{container:!0,size:12,spacing:2,children:(0,Ze.jsx)(f.Grid,{size:4,children:(0,Ze.jsx)(ko,{source:"location",onChange:i,value:r})})})})})]}),l&&(0,Ze.jsx)(q5e,{}),(0,Ze.jsxs)($5e,{children:[(0,Ze.jsx)(W5e,{open:l,transitionDuration:0,color:"#fff"}),p&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(U5e,{typescale:"title",size:"large",children:"Normalised Carbon per M2 of Produced Volumetric Unit"}),(0,Ze.jsxs)(n1e,{children:[(0,Ze.jsx)(M5e,{title:"Total Carbon (kgCO2e per m2)",size:J2e,unit:q2e,metric:b,explanations:W2e,titleTypescale:"title"}),(0,Ze.jsx)(M5e,{title:"Total Carbon (kgCO2e per m2)",size:J2e,unit:q2e,metric:h,baseline:b,explanations:W2e,titleTypescale:"title"})]})]}),(0,Ze.jsx)(U5e,{typescale:"title",size:"large",children:"Total Carbon"}),(0,Ze.jsxs)(n1e,{children:[(0,Ze.jsx)(M5e,{title:"Total Carbon (tCO2e)",size:J2e,unit:q2e,metric:v,titleTypescale:"title"}),(0,Ze.jsx)(M5e,{title:"Total Carbon (tCO2e)",size:J2e,unit:q2e,metric:x,baseline:v,explanations:W2e,titleTypescale:"title"})]}),(0,Ze.jsx)(U5e,{typescale:"title",size:"large",children:"Emissions by Scope (tCO2e)"}),(0,Ze.jsxs)(n1e,{children:[(0,Ze.jsx)(f.DonutChart,{size:Y2e,unit:q2e,data:u1e((null==o?void 0:o.targetScopeBreakdown.series)||[]),startDate:y.targetStartDate,endDate:y.targetEndDate,explanations:W2e,dataLabels:{enabled:!0}}),(0,Ze.jsx)(f.DonutChart,{size:Y2e,unit:q2e,data:u1e((null==o?void 0:o.currentPeriodScopeBreakdown.series)||[]),startDate:y.currentPeriodStartDate,endDate:y.currentPeriodEndDate,explanations:W2e,dataLabels:{enabled:!0}})]}),(0,Ze.jsxs)(n1e,{children:[(0,Ze.jsx)(f.StackedChart,{enableLegend:!0,size:H2e,unit:q2e,data:y1e((null==o?void 0:o.targetEmissionsByScope)||[]),startDate:y.targetStartDate,endDate:y.targetEndDate,colors:l1e,explanations:W2e,dataLabels:{enabled:!1}}),(0,Ze.jsx)(f.StackedChart,{enableLegend:!0,size:H2e,unit:q2e,data:y1e((null==o?void 0:o.currentPeriodEmissionsByScope)||[]),startDate:y.currentPeriodStartDate,endDate:y.currentPeriodEndDate,colors:l1e,explanations:W2e,dataLabels:{enabled:!1}})]}),(0,Ze.jsx)(U5e,{typescale:"title",size:"large",children:"Emissions by Source"}),(0,Ze.jsxs)(n1e,{children:[(0,Ze.jsx)(f.SimplePieDonutChart,{size:Y2e,unit:q2e,data:v1e((null==o?void 0:o.targetEmissionsBySource)||[]),startDate:y.targetStartDate,endDate:y.targetEndDate,explanations:W2e,dataLabels:{enabled:!1}}),(0,Ze.jsx)(f.SimplePieDonutChart,{size:Y2e,unit:q2e,data:v1e((null==o?void 0:o.currentPeriodEmissionsBySource)||[]),startDate:y.currentPeriodStartDate,endDate:y.currentPeriodEndDate,explanations:W2e,dataLabels:{enabled:!1}})]}),(0,Ze.jsxs)(n1e,{children:[(0,Ze.jsx)(f.StackedChart,{enableLegend:!0,size:H2e,unit:q2e,data:y1e((null==o?void 0:o.targetEmissionsBySource)||[]),startDate:y.targetStartDate,endDate:y.targetEndDate,explanations:W2e,colors:l1e,dataLabels:{enabled:!1}}),(0,Ze.jsx)(f.StackedChart,{enableLegend:!0,size:H2e,unit:q2e,data:y1e((null==o?void 0:o.currentPeriodEmissionsBySource)||[]),startDate:y.currentPeriodStartDate,endDate:y.currentPeriodEndDate,explanations:W2e,colors:l1e,dataLabels:{enabled:!1}})]}),m&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(U5e,{typescale:"title",size:"large",children:"Half Hourly Electricity Consumption"}),(0,Ze.jsxs)(n1e,{children:[(0,Ze.jsx)(C5e,{startDate:y.targetStartDate,endDate:y.targetEndDate,locationId:a,organisationalUnitIds:r}),(0,Ze.jsx)(C5e,{startDate:y.currentPeriodStartDate,endDate:y.currentPeriodEndDate,locationId:a,organisationalUnitIds:r})]})]}),(0,Ze.jsxs)(n1e,{children:[(0,Ze.jsx)(y5e,{title:"Scope 1",text:W2e["Scope 1"]}),(0,Ze.jsx)(y5e,{title:"Scope 2",text:W2e["Scope 2"]})]}),(0,Ze.jsx)(n1e,{children:(0,Ze.jsx)(y5e,{title:"Scope 3",text:W2e["Scope 3"]})})]})]})}var Y5e;const H5e=(0,D.J1)(Y5e||(Y5e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetImpactLocationData($accountId: ID!, $locationId: ID!, $filters: Filters!) {\n    location: getLocationById(id: $locationId) {\n      id\n      name\n      code\n      picture\n      description\n      address {\n        address1\n        address2\n        address3\n        city\n        postcode\n        country {\n          name\n        }\n      }\n    }\n    lcaReports: getDocumentsPage(accountId: $accountId, limit: 100, filters: $filters) {\n      totalRows\n      rows {\n        id\n        referenceId\n        fileName\n      }\n    }\n  }\n"])));var K5e,Q5e;function Z5e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const X5e=(0,f.styled)("div")(K5e||(K5e=Z5e(["\n  display: flex;\n  border: 1px solid ",";\n  border-radius: 16px;\n  overflow: hidden;\n  padding: 24px;\n  margin-bottom: 24px;\n  background-color: ",";\n  gap: 24px;\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.surface}),e3e=(0,f.styled)("div")(Q5e||(Q5e=Z5e(["\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n"]))),n3e=(0,f.styled)("div")({maxWidth:"100%",overflowX:"hidden"}),t3e=(0,f.styled)("div")({display:"flex",flexDirection:"column",gap:"4px"}),a3e=(0,f.styled)(f.Button)({marginTop:20,alignSelf:"flex-start"}),r3e=(0,f.styled)("div")({display:"flex",gap:3}),i3e=(0,f.styled)(p.Link)({textDecoration:"underline",display:"block"}),o3e=e=>{let{description:n}=e;return n?(0,Ze.jsx)(t3e,{children:n.split("\n").slice(0,5).map((e,n)=>(0,Ze.jsxs)(f.Text,{size:"small",children:["•"," ",e]},n))}):null},l3e=e=>{let{address:n}=e;return n?(0,Ze.jsxs)(f.Text,{size:"medium",color:"onSurfaceVariant",children:[[n.address1,n.address2,n.address3,[n.city,n.postcode].filter(Boolean).join(" ")].filter(Boolean).join(", "),", ",n.country.name]}):null},s3e=()=>{const{locationId:e}=(0,m.g)(),n=(0,m.Zp)(),{location:t,lcaReports:a,loading:r}=function(e){let{locationId:n}=e;const t=rt(),{data:a,loading:r}=(0,h.IT)(H5e,{variables:{accountId:t,locationId:n,filters:{set:[{field:"locations",filterType:Vt.pe.Set,values:[n]},{field:"library",filterType:Vt.pe.Set,values:[Vt.zM.Governance]},{field:"category",filterType:Vt.pe.Set,values:[Ma.DocumentCategory.LCAReports]}]}},skip:!n||!t});return{location:null==a?void 0:a.location,lcaReports:null==a?void 0:a.lcaReports.rows,loading:r}}({locationId:e}),i={content:r?"Location Impact Dashboard":"".concat(null==t?void 0:t.name," Impact Dashboard")};return(0,Ze.jsx)(f.Page,{title:i,children:(0,Ze.jsxs)(n3e,{children:[!r&&t&&(0,Ze.jsxs)(X5e,{children:[(0,Ze.jsx)($2e,{src:t.picture,width:200,height:200}),(0,Ze.jsxs)(e3e,{children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"large",color:"onSurfaceVariant",children:t.name}),t.code&&(0,Ze.jsxs)(f.Text,{size:"small",color:"textSecondary",children:["Code: ",t.code]}),(0,Ze.jsx)(l3e,{address:t.address}),(0,Ze.jsx)(o3e,{description:t.description}),a&&a.length>0&&(0,Ze.jsxs)(r3e,{children:[(0,Ze.jsx)(f.Text,{size:"medium",color:"onSurfaceVariant",children:"LCA Report:"}),a.map(e=>(0,Ze.jsx)(f.Text,{size:"medium",color:"onSurfaceVariant",children:(0,Ze.jsx)(i3e,{to:"/documents/all/".concat(e.id),children:e.referenceId||e.fileName})},e.id))]}),(0,Ze.jsx)(a3e,{variant:"outlined",onClick:()=>{n("/impact")},children:"Back to map"})]})]}),(0,Ze.jsx)(J5e,{locationId:e})]})})},c3e=(0,f.styled)("div")(e=>{let{active:n=!1,height:t}=e;return{backgroundColor:"white",height:t?"".concat(t,"px"):"210px",border:"1px solid ".concat(n?"#2e3eff":"#c7c5d0"),borderRadius:"5px",boxShadow:"2px 2px 8px rgba(0, 0, 0, 0.2)",padding:"10px",display:"flex",gap:"10px"}}),d3e=(0,f.styled)("div")({display:"flex",flexDirection:"column",padding:"1px",overflow:"auto"}),u3e=(0,f.styled)("div")({width:"100%",flexShrink:0,paddingTop:5}),p3e=(0,f.styled)(f.Button)({fontSize:"12px",fontWeight:"bold",padding:"6px 20px",color:"#46464f",width:"100%","&.MuiButton-outlined:hover":{outline:"1px solid #c8c5ca",backgroundColor:"#efefef"},"&.MuiButton-outlined:focus":{outline:"1px solid #c8c5ca",backgroundColor:"#efefef"},"&.MuiButton-outlined:active":{outline:"1px solid #c8c5ca",backgroundColor:"#efefef"}}),m3e=(0,f.styled)(f.Text)({marginBottom:"6px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),f3e=(0,f.styled)("div")({overflow:"auto",flex:1}),y3e=e=>{let{location:n,onCardClick:t,onOpenLocationClick:a,active:r,omitWrapper:i,omitOpenLocationButton:o,locationPictureSize:l,containerHeight:s}=e;const[c,d]=(0,g.useState)(),u=(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)($2e,{src:n.picture,width:null==l?void 0:l.width,height:null==l?void 0:l.height}),(0,Ze.jsxs)(d3e,{children:[(0,Ze.jsxs)(f3e,{children:[(0,Ze.jsx)(m3e,{typescale:"title",size:"medium",children:n.name}),n.description?(0,Ze.jsx)(o3e,{description:n.description}):(0,Ze.jsx)(l3e,{address:n.address})]}),!o&&(0,Ze.jsx)(u3e,{children:(0,Ze.jsx)(p3e,{variant:"outlined",onClick:()=>null==a?void 0:a(n),children:"Open Project"})})]})]});return i?u:(0,Ze.jsx)(c3e,{height:s,active:r,onMouseDown:d,onMouseUp:e=>{(e=>{const n=Math.abs(((null==c?void 0:c.clientX)||0)-e.clientX),t=Math.abs(((null==c?void 0:c.clientY)||0)-e.clientY);return n>2||t>2})(e)||null==t||t(n)},children:u})},g3e=(0,f.styled)(_2e.Fu)({display:"flex",gap:"12px",padding:"1px"});function b3e(e){let{active:n,location:t,onClick:a,shouldOpenInfoWindow:r}=e;const i=n?32:24,o=n?9999:1,[l,s]=(0,_2e.vH)(),[c,d]=(0,g.useState)(!1);(0,g.useEffect)(()=>{n&&r&&d(!0),n||d(!1)},[n,r]);const u=(0,g.useCallback)(()=>{null==a||a(t)},[a,t]);return(0,g.useEffect)(()=>{r||d(!1)},[r]),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(_2e.J8,{position:{lat:t.latitude,lng:t.longitude},onClick:u,zIndex:o,ref:l,children:(0,Ze.jsx)("img",{src:M2e,alt:"pin",width:i,height:i})}),c&&(0,Ze.jsx)(g3e,{shouldFocus:!1,headerDisabled:!0,anchor:s,onClose:()=>d(!1),children:(0,Ze.jsx)(y3e,{location:t,omitWrapper:!0,omitOpenLocationButton:!0,locationPictureSize:{height:130}})})]})}function h3e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function v3e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h3e(Object(t),!0).forEach(function(n){x3e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h3e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function x3e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const T3e=(0,f.styled)("div")({width:"100%",height:"800px",border:"1px solid #C7C5D0",borderRadius:"16px",marginBottom:"48px",padding:"32px"}),O3e=(0,f.styled)("div")(e=>{let{isListOpen:n}=e;return{width:"100%",height:n?"530px":"700px",borderRadius:"16px",overflow:"hidden"}}),k3e=(0,f.styled)(f.Text)({marginBottom:"24px",fontSize:"24px"}),j3e=e=>{let{latitude:n,longitude:t}=e;return{lat:n,lng:t}},C3e=(0,f.styled)("div")({display:"flex",flexDirection:"column"}),S3e=(0,f.styled)("div")({display:"flex",alignItems:"center",justifyContent:"space-between"}),N3e=(0,f.styled)("div")({display:"flex",alignItems:"center",justifyContent:"space-between"}),w3e=(0,f.styled)(f.Icons.ArrowForward)(e=>{let{disabled:n,isBack:t}=e;return{opacity:n?.5:1,cursor:n?"default":"pointer",pointerEvents:n?"none":"auto",transform:t?"rotate(180deg)":"rotate(0deg)"}}),D3e=(0,f.styled)("div")(e=>{let{isListOpen:n}=e;return{display:"flex",alignItems:"center",cursor:"pointer",marginTop:"20px",marginBottom:n?"12px":"0"}}),A3e=(0,f.styled)("div")({padding:"0 6px 12px 6px"}),R3e={mapId:F2e.mapIds.impactLocations,cameraControl:!1,zoomControl:!0,gestureHandling:"greedy",zoomControlOptions:{position:_2e.HF.TOP_RIGHT},fullscreenControl:!1,streetViewControl:!1,mapTypeControl:!1,defaultZoom:10},P3e={lat:51.5072,lng:.1276},L3e=e=>e*Math.PI/180,I3e=(e,n)=>{const t=L3e(n.lat-e.lat),a=L3e(n.lng-e.lng),r=L3e(e.lat),i=L3e(n.lat),o=Math.sin(t/2),l=Math.sin(a/2),s=o*o+Math.cos(r)*Math.cos(i)*l*l;return 12742e3*Math.asin(Math.sqrt(s))},E3e=(0,f.styled)(f.Icons.ChevronRight)(e=>{let{isListOpen:n}=e;return{transform:n?"rotate(90deg)":"rotate(0deg)"}}),_3e=e=>"impactMap_center_".concat(e),F3e=e=>"impactMap_isListOpen_".concat(e);function B3e(){const{locations:e,loading:n}=function(){let{excludeWasteInLocations:e}={excludeWasteInLocations:!0};const n=rt(),{showNotification:t}=vt(),{data:a,loading:r,error:i}=(0,h.IT)(U2e,{variables:{accountId:n},onError:()=>{t("Error at loading the locations, refresh the page to try again","danger")}});return{locations:(0,g.useMemo)(()=>{const n=((null==a?void 0:a.getLocationsPage.rows)||[]).filter(e=>e.displayOnImpactDashboard);return e?n.filter(e=>!e.wasteIn||!!e.wasteIn&&!!e.wasteOut):n},[a,e]),loading:r,error:i}}(),t=rt(),[a,r]=(0,g.useState)(()=>localStorage.getItem(_3e(t))?JSON.parse(localStorage.getItem(_3e(t))||"{}"):P3e),[i,o]=(0,g.useState)(),[l,s]=(0,g.useState)(()=>{const e=localStorage.getItem(F3e(t));return"true"===e||"false"!==e}),[c,d]=(0,g.useState)(0),[u,p]=(0,g.useState)(3),y=c>=e.length-u,b=0===c,v=(0,g.useCallback)(()=>{var e;const n=null===(e=x.current)||void 0===e||null===(e=e.innerSlider)||void 0===e||null===(e=e.props)||void 0===e?void 0:e.slidesToShow;"number"==typeof n&&p(n)},[]),x=(0,g.useRef)(null),T=(0,g.useMemo)(()=>({dots:!1,speed:300,slidesToShow:3,slidesToScroll:3,infinite:!1,arrows:!1,onInit:v,onReInit:v,beforeChange(e,n){d(n)},responsive:[{breakpoint:1400,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:800,settings:{slidesToShow:1,slidesToScroll:1}}]}),[v]),O=(0,m.Zp)(),k=(n,t)=>{var a;n.id===(null==i?void 0:i.id)?o(void 0):(o(n),null===(a=x.current)||void 0===a||a.slickGoTo(e.findIndex(e=>n===e)),null!=t&&t.shouldCenter&&r(j3e(n)))};return(0,g.useEffect)(()=>{var n;if(localStorage.getItem(_3e(t)))return void r(JSON.parse(localStorage.getItem(_3e(t))||"{}"));if(0===e.length)return;let a=!1;return null===(n=navigator.geolocation)||void 0===n||n.getCurrentPosition(n=>{if(a)return;const t={lat:n.coords.latitude,lng:n.coords.longitude},i=e.reduce((e,n,a,r)=>I3e(t,j3e(n))<I3e(t,j3e(r[e]))?a:e,0),o=e[i];var l;o&&(r(j3e(o)),null===(l=x.current)||void 0===l||l.slickGoTo(i))},e=>{console.error("Error getting geolocation",e)},{enableHighAccuracy:!0,maximumAge:6e4,timeout:5e3}),()=>{a=!0}},[]),(0,g.useEffect)(()=>{localStorage.setItem(_3e(t),JSON.stringify(a))},[a,t]),(0,g.useEffect)(()=>{var n;localStorage.setItem(F3e(t),String(l)),l&&i&&(null===(n=x.current)||void 0===n||n.slickGoTo(e.findIndex(e=>e.id===i.id)))},[l,t]),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(k3e,{typescale:"title",size:"large",children:"Projects"}),(0,Ze.jsxs)(T3e,{children:[(0,Ze.jsx)(O3e,{isListOpen:l,children:(0,Ze.jsx)(_2e.T5,v3e(v3e({},R3e),{},{onCameraChanged:e=>r(e.detail.center),center:a,children:e.map((e,n)=>(0,Ze.jsx)(b3e,{active:e.id===(null==i?void 0:i.id),onClick:k,location:e,shouldOpenInfoWindow:!0},n))}))}),(0,Ze.jsxs)(C3e,{children:[(0,Ze.jsxs)(S3e,{children:[(0,Ze.jsxs)(D3e,{isListOpen:l,onClick:()=>s(!l),tabIndex:0,children:[(0,Ze.jsx)(E3e,{isListOpen:l,color:"primary"}),(0,Ze.jsx)(f.Text,{size:"medium",typescale:"title",children:"List"})]}),l&&(0,Ze.jsxs)(N3e,{children:[(0,Ze.jsx)(w3e,{color:"primary",isBack:!0,disabled:b,onClick:()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.slickPrev()}}),(0,Ze.jsx)(w3e,{color:"primary",disabled:y,onClick:()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.slickNext()}})]})]}),l&&(0,Ze.jsxs)(Ze.Fragment,{children:[n&&(0,Ze.jsx)(f.Loader,{}),!n&&e.length>0&&(0,Ze.jsx)(yb.A,v3e(v3e({ref:e=>x.current=e},T),{},{children:e.map((e,n)=>(0,Ze.jsx)(A3e,{children:(0,Ze.jsx)(y3e,{active:e.id===(null==i?void 0:i.id),location:e,onCardClick:e=>k(e,{shouldCenter:!0}),omitOpenLocationButton:!e.enableProject,onOpenLocationClick:()=>(e=>{O("/impact/location/".concat(e.id))})(e),locationPictureSize:{width:115,height:130},containerHeight:153})},n))})),!n&&0===e.length&&(0,Ze.jsx)(f.Text,{textAlign:"center",size:"large",color:"secondary",children:"No locations found"})]})]})]})]})}const U3e=e=>{let{filter:{type:n,label:t}}=e;const{filters:a,setFilter:r}=J1e(),i=(0,g.useMemo)(()=>n===Vt.RA.FromDate?a.from:a.to,[n,a.from,a.to]),o=(0,g.useCallback)(e=>{n===Vt.RA.FromDate?r("from",Wt()(e).format("YYYY-MM-DD")):r("to",Wt()(e).format("YYYY-MM-DD"))},[n,r]);return(0,Ze.jsx)(f.DatePicker,{label:x1e(n,t),value:i,onChange:o})};var M3e;const V3e=(0,D.J1)(M3e||(M3e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query getDashboardTileData(\n    $accountId: ID!\n    $datasetName: String!\n    $datasetFilters: DatasetFilters!\n    $aggregation: AggregationCommand!\n  ) {\n    getDashboardTileData(\n      accountId: $accountId\n      datasetName: $datasetName\n      datasetFilters: $datasetFilters\n      aggregation: $aggregation\n    ) {\n      dataPoints {\n        dimension\n        value\n      }\n    }\n  }\n"]))),z3e=e=>{let{filter:{type:n,label:t}}=e;const{filters:a,setFilter:r}=J1e(),i=(0,g.useCallback)(e=>{const n="All"===e.value?null:e.value;r("locationOccupation",n)},[r]),o=(0,g.useMemo)(()=>a.locationOccupation?a.locationOccupation:"All",[a.locationOccupation]);return(0,Ze.jsx)(f.Select,{label:x1e(n,t),value:o,disableSorting:!0,options:[{label:"All",value:"All"},{label:"Exclude out of occupancy",value:"Exclude out of occupancy"}],onChange:i})},G3e=e=>{let{filter:{type:n,label:t}}=e;const{filters:a,setFilter:r}=J1e(),i=(0,g.useCallback)(e=>{const n="All"===e.value?null:e.value;r("actualOrEstimated",n)},[r]),o=(0,g.useMemo)(()=>a.actualOrEstimated?a.actualOrEstimated:"All",[a.actualOrEstimated]);return(0,Ze.jsx)(f.Select,{label:x1e(n,t),value:o,disableSorting:!0,options:[{label:"All",value:"All"},{label:"Actual",value:"ACT"},{label:"Estimated",value:"EST"}],onChange:i})},$3e=e=>{let{filter:{type:n,label:t}}=e;const{filters:a,setFilter:r}=J1e(),i=(0,g.useCallback)(e=>{const n="All"===e.value?null:e.value;r("businessUnit",n)},[r]),o=(0,g.useMemo)(()=>[{label:"All",value:"All"},{label:"Bapco Energies Corporate",value:"Bapco Energies Corporate"},{label:"Bapco Upstream",value:"Bapco Upstream"},{label:"Bapco Refining",value:"Bapco Refining"},{label:"Bapco Gas",value:"Bapco Gas"},{label:"Bapco Tazweed",value:"Bapco Tazweed"}],[]);return(0,Ze.jsx)(f.Select,{label:x1e(n,t),value:a.businessUnit||"All",disableSorting:!0,options:o,onChange:i})},W3e=e=>{let{filter:{type:n,label:t}}=e;const{filters:a,setFilter:r}=J1e(),i=(0,g.useCallback)(e=>{const n="All"===e.value?null:e.value;r("standaloneYear",n)},[r]),o=(0,g.useMemo)(()=>[{label:"2024",value:"2024"},{label:"2025",value:"2025"}],[]);return(0,Ze.jsx)(f.Select,{label:x1e(n,t),value:a.standaloneYear,disableSorting:!0,options:o,onChange:i})},q3e=e=>{let{filter:{type:n,label:t}}=e;const{filters:a,setFilter:r}=J1e(),i=(0,g.useCallback)(e=>{const n="All"===e.value?null:e.value;r("waterInOut",n)},[r]),o=(0,g.useMemo)(()=>a.waterInOut?a.waterInOut:"All",[a.waterInOut]);return(0,Ze.jsx)(f.Select,{label:x1e(n,t),value:o,disableSorting:!0,options:[{label:"All",value:"All"},{label:'In (does not include "Both")',value:"IN"},{label:'Out (does not include "Both")',value:"OUT"},{label:'Both (not specifically "In" or "Out")',value:"BOTH"}],onChange:i})};var J3e,Y3e;function H3e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function K3e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Q3e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Z3e=(0,f.styled)(f.Icons.FilterAltOff)(J3e||(J3e=Q3e(["\n  width: 15px;\n  height: 15px;\n"]))),X3e=(0,f.styled)("div")(Y3e||(Y3e=Q3e(["\n  position: absolute;\n  top: -6px;\n  right: -6px;\n  display: flex;\n  justify-content: flex-end;\n  align-items: center;\n  cursor: pointer;\n  z-index: 1;\n  padding: 6px;\n"]))),e4e=e=>{let{filter:n}=e;const{activeFilters:t,resetFilters:a}=J1e(),r=T1e(n.type),i=t[r];return r&&i?(0,Ze.jsx)(X3e,{children:(0,Ze.jsx)(Z3e,{onClick:()=>{a([r])}})}):null},n4e=e=>{var n,t;let{filter:a}=e;const r=rt(),{filters:i,setFilter:o}=J1e(),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(V3e,{variables:{accountId:r,datasetName:null===(n=a.dataset)||void 0===n?void 0:n.datasetName,datasetFilters:{from:i.from,to:i.to,year1:i.year1,year2:i.year2,period1:i.period1,period2:i.period2},aggregation:{functions:[],partitions:[{field:(null===(t=a.dataset)||void 0===t?void 0:t.columnName)||a.type}]}},skip:!a.dataset}),u=(0,g.useMemo)(()=>l?l.getDashboardTileData.dataPoints.map(e=>({value:e[0].value,label:e[0].value})):[],[l]),p=(0,g.useMemo)(()=>{const e=T1e(a.type);return e?i[e]:null},[i,a.type]),m=(0,g.useCallback)(e=>{const n=T1e(a.type);n&&o(n,e)},[o,a.type]),y=(0,g.useMemo)(()=>({isLoading:s,error:c,refetch:d,selectedOptions:p,setSelectedOptions:m,selectableOptions:u,label:x1e(a.type,a.label),channel:x1e(a.type,a.label)}),[s,c,d,p,m,u,a.label,a.type]);let b=null;return a.type===Vt.RA.FromDate||a.type===Vt.RA.ToDate?b=(0,Ze.jsx)(U3e,{filter:a}):a.type===Vt.RA.Year_1||a.type===Vt.RA.Year_2?b=(0,Ze.jsx)(C1e,{filter:a}):a.type===Vt.RA.Period_1||a.type===Vt.RA.Period_2?b=(0,Ze.jsx)(w1e,{filter:a}):a.type===Vt.RA.LocationOccupation?b=(0,Ze.jsx)(z3e,{filter:a}):a.type===Vt.RA.ActualOrEstimated?b=(0,Ze.jsx)(G3e,{filter:a}):a.type===Vt.RA.WaterInOut?b=(0,Ze.jsx)(q3e,{filter:a}):a.type===Vt.RA.BusinessUnit?b=(0,Ze.jsx)($3e,{filter:a}):a.type===Vt.RA.StandaloneYear?b=(0,Ze.jsx)(W3e,{filter:a}):[Vt.RA.Locations,Vt.RA.Tags,Vt.RA.Departments,Vt.RA.Countries,Vt.RA.Regions,Vt.RA.Meters,Vt.RA.Scopes,Vt.RA.Sources,Vt.RA.Units,Vt.RA.LocationCustomAttributes,Vt.RA.WasteStreams,Vt.RA.WasteContractors,Vt.RA.WasteCarriers,Vt.RA.ProjectPhases,Vt.RA.TransportTypes,Vt.RA.FuelTypes,Vt.RA.Materials,Vt.RA.UploadReferences,Vt.RA.PurposesOfTravel].includes(a.type)&&(b=(0,Ze.jsx)(f.SetFilter,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H3e(Object(t),!0).forEach(function(n){K3e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H3e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},y))),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(e4e,{filter:a}),b]})},t4e=()=>{const{selectedUnit:e,setSelectedUnit:n,activeSheet:t}=J1e(),a=(0,g.useMemo)(()=>{var e;return(null==t||null===(e=t.sheet.units)||void 0===e?void 0:e.map(e=>({label:e,value:e})))||[]},[t]);return(0,g.useEffect)(()=>{e&&!a.some(n=>n.value===e)&&n(a[0].value)},[a,n,e]),(0,Ze.jsx)(f.Select,{label:"Display unit",value:e,options:a,onChange:e=>n(e.value)})},a4e=()=>{const{withVat:e,setWithVat:n}=J1e();return(0,Ze.jsx)(f.Select,{label:"VAT",value:e?"true":"false",options:[{label:"Excluded",value:"false"},{label:"Included",value:"true"}],onChange:e=>n(e.value)})},r4e=()=>{const{selectedCarbonComponents:e,setSelectedCarbonComponents:n}=J1e();return(0,Ze.jsx)(f.SetFilter,{isLoading:!1,error:void 0,refetch:()=>{},channel:"carbon-components",label:"Energy supply emissions",selectedOptions:e,selectableOptions:[{label:"Well to tank",value:B1e.WTT},{label:"Transmission and distribution",value:B1e.TD}],setSelectedOptions:e=>n(e),noneSelectedLabel:"None"})};var i4e,o4e,l4e,s4e;function c4e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const d4e=(0,f.styled)("div")(i4e||(i4e=c4e(["\n  gap: 8px;\n  border: ",";\n  border-radius: 16px;\n  padding: 20px;\n  margin-bottom: 16px;\n  width: 100%;\n"])),e=>{let{theme:n}=e;return"1px solid ".concat(n.sys.color.outlineVariant)}),u4e=(0,f.styled)("div")(o4e||(o4e=c4e(["\n  display: flex;\n  flex-direction: row;\n  align-items: baseline;\n  gap: 8px;\n"]))),p4e=(0,f.styled)("div")(l4e||(l4e=c4e(["\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  margin-bottom: 16px;\n  width: 100%;\n"]))),m4e=(0,f.styled)(f.Grid)(s4e||(s4e=c4e(["\n  position: relative;\n"]))),f4e=e=>Object.entries(e).sort((e,n)=>{let[t]=e,[a]=n;const r=Q1e.indexOf(t),i=Q1e.indexOf(a);return-1!==r&&-1!==i?r-i:-1!==r?-1:-1!==i?1:t.localeCompare(a)}),y4e=(0,g.memo)(e=>{let{filters:n}=e;const{areFiltersOpen:t,setAreFiltersOpen:a,isExportingPdf:r,pdfExportFilters:i,activeSheet:o,dashboardName:l,doesSheetHaveMultipleUnits:s,doesSheetHaveVatCalculation:c,doesSheetHavePeriodFilters:d,doesSheetHaveCarbonComponents:u}=J1e(),p=(0,g.useRef)(null),[m,y]=(0,g.useState)(4);(0,g.useEffect)(()=>{const e=p.current;if(!e)return;const n=new ResizeObserver(e=>{var n,t;const{width:a}=null!==(n=null===(t=e[0])||void 0===t?void 0:t.contentRect)&&void 0!==n?n:{width:0};y(a>1100?3:4)});return n.observe(e),()=>n.disconnect()},[]);const b=(0,g.useCallback)(e=>{var t,a;return x1e(null===(t=n.find(n=>T1e(n.type)===e))||void 0===t?void 0:t.type,null===(a=n.find(n=>T1e(n.type)===e))||void 0===a?void 0:a.label)},[n]);return 0===n.length||n.every(e=>e.isHidden)?null:r?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(p4e,{children:[(0,Ze.jsxs)(f.Text,{typescale:"display",children:[l," report"]}),(0,Ze.jsxs)(f.Text,{typescale:"title",children:[null==o?void 0:o.sheet.title," sheet"]})]}),(0,Ze.jsxs)(d4e,{children:[(0,Ze.jsx)(f.Text,{typescale:"title",children:"Filters"}),f4e(i).map(e=>{let[n,t]=e;return(0,Ze.jsxs)(u4e,{children:[(0,Ze.jsxs)(f.Text,{typescale:"title",weight:"bold",children:[b(n),":"]}),(0,Ze.jsx)(f.Text,{typescale:"body",children:Array.isArray(t)?t.join(", "):null==t?void 0:t.toString()})]},n)})]})]}):(0,Ze.jsx)(I5e,{ref:p,open:t,onToggle:()=>a(!t),children:t&&(0,Ze.jsx)(f.Grid,{container:!0,size:12,spacing:2,children:t&&(0,Ze.jsxs)(Ze.Fragment,{children:[d&&(0,Ze.jsx)(m4e,{size:m,children:(0,Ze.jsx)(D1e,{})}),n.map(e=>(0,Ze.jsx)(m4e,{size:m,children:(0,Ze.jsx)(n4e,{filter:e})},e.type)),s&&(0,Ze.jsx)(m4e,{size:m,children:(0,Ze.jsx)(t4e,{})}),c&&(0,Ze.jsx)(m4e,{size:m,children:(0,Ze.jsx)(a4e,{})}),u&&(0,Ze.jsx)(m4e,{size:m,children:(0,Ze.jsx)(r4e,{})})]})})})});var g4e,b4e;function h4e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}y4e.displayName="DashboardFilters";const v4e=(0,f.styled)("div")(g4e||(g4e=h4e(["\n  width: 100%;\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n"]))),x4e=(0,f.styled)(f.Text)(b4e||(b4e=h4e(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),T4e=()=>(0,Ze.jsx)(v4e,{children:(0,Ze.jsx)(x4e,{typescale:"body",textAlign:"center",size:"large",children:"No data for the applied filters"})});var O4e,k4e,j4e,C4e,S4e,N4e,w4e;function D4e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const A4e=(0,f.styled)("div")(O4e||(O4e=D4e(["\n  display: flex;\n  flex-direction: column;\n  border: ",";\n  border-radius: 16px;\n  overflow: hidden;\n  padding: 24px;\n  height: 100%;\n"])),e=>{let{theme:n,noData:t}=e;return"1px ".concat(t?"dashed":"solid"," ").concat(n.sys.color.outlineVariant)}),R4e=(0,f.styled)("div")(k4e||(k4e=D4e(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  width: 100%;\n"]))),P4e=(0,f.styled)("div")(j4e||(j4e=D4e(["\n  display: flex;\n  gap: 8px;\n  justify-content: space-between;\n"]))),L4e=(0,f.styled)(f.Text)(C4e||(C4e=D4e(["\n  width: 100%;\n  color: ",";\n  margin-bottom: 16px;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),I4e=(0,f.styled)(f.Icons.ReportProblemOutlined)(S4e||(S4e=D4e(["\n  fill: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.error}),E4e=(0,f.styled)("div")(N4e||(N4e=D4e(["\n  display: flex;\n  align-items: center;\n  gap: 8px;\n"]))),_4e=(0,f.styled)("div")(w4e||(w4e=D4e(["\n  width: 100%;\n  height: calc(100vh - 120px);\n"]))),F4e=g.forwardRef((e,n)=>{let{title:t,actions:a,enableFullscreen:r,onExport:i,noData:o,children:l,loading:s,error:c,retry:d}=e;const[u,p]=(0,g.useState)(!1),m=(0,g.useCallback)(()=>p(!0),[]),y=(0,g.useCallback)(()=>p(!1),[]),b=(0,g.useMemo)(()=>s?(0,Ze.jsx)(R4e,{children:(0,Ze.jsx)(f.Loader,{size:40})}):c?(0,Ze.jsx)(R4e,{children:(0,Ze.jsx)(f.LoadFailed,{withNoIcon:!0,error:c,retry:d})}):o?(0,Ze.jsx)(R4e,{children:(0,Ze.jsx)(T4e,{})}):null,[c,s,o,d]),h=(0,g.useMemo)(()=>i||r?(0,Ze.jsxs)(Ze.Fragment,{children:[i&&(0,Ze.jsx)(zP.A,{title:"Export to Excel",children:(0,Ze.jsx)(f.IconButton,{onClick:i,size:"small",children:(0,Ze.jsx)(f.Icons.Download,{fontSize:"small"})})}),r&&(0,Ze.jsx)(zP.A,{title:"Fullscreen",children:(0,Ze.jsx)(f.IconButton,{onClick:m,size:"small",children:(0,Ze.jsx)(f.Icons.OpenInFull,{fontSize:"small"})})})]}):null,[i,r,m]),v=a||h?(0,Ze.jsxs)(Ze.Fragment,{children:[a,h]}):null;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(A4e,{noData:!s&&!c&&o,ref:n,children:[(t||v)&&(0,Ze.jsxs)(P4e,{children:[(0,Ze.jsx)(L4e,{typescale:"title",oneLine:!0,children:t}),(0,Ze.jsxs)(E4e,{children:[c&&(0,Ze.jsx)(I4e,{}),v]})]}),b||l]}),r&&u&&(0,Ze.jsxs)(f.Dialog,{open:!0,onClose:y,children:[(0,Ze.jsxs)(P4e,{children:[(0,Ze.jsx)(L4e,{typescale:"title",oneLine:!0,children:t}),(0,Ze.jsxs)(E4e,{children:[i&&(0,Ze.jsx)(zP.A,{title:"Export to Excel",children:(0,Ze.jsx)(f.IconButton,{onClick:i,size:"small",children:(0,Ze.jsx)(f.Icons.Download,{fontSize:"small"})})}),a,(0,Ze.jsx)(zP.A,{title:"Close fullscreen",children:(0,Ze.jsx)(f.IconButton,{onClick:y,size:"small",children:(0,Ze.jsx)(f.Icons.CloseFullscreen,{fontSize:"small"})})})]})]}),(0,Ze.jsx)(_4e,{children:l})]})]})});var B4e,U4e,M4e,V4e,z4e,G4e,$4e,W4e,q4e,J4e;function Y4e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}F4e.displayName="TileContainer";const H4e=(0,f.styled)(f.Text)(B4e||(B4e=Y4e(["\n  width: 100%;\n  line-height: 46px;\n  text-align: center;\n  font-size: 36px;\n  cursor: default;\n  overflow: hidden;\n  text-overflow: ellipsis;\n"]))),K4e=(0,f.styled)("span")(U4e||(U4e=Y4e(["\n  font-size: 20px;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),Q4e=(0,f.styled)("div")(M4e||(M4e=Y4e(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: space-between;\n"]))),Z4e=(0,f.styled)("div")(V4e||(V4e=Y4e(["\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  justify-content: flex-start;\n  gap: 2px;\n"]))),X4e=(0,f.styled)(f.Text)(z4e||(z4e=Y4e(["\n  font-size: 12px;\n  font-weight: 600;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),e6e=(0,f.styled)(f.Text)(G4e||(G4e=Y4e(["\n  font-size: 16px;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),n6e=(0,f.styled)(f.Icons.ArrowUpward)($4e||($4e=Y4e(["\n  color: ",";\n"])),e=>{let{iconColor:n}=e;return n}),t6e=(0,f.styled)(f.Icons.ArrowDownward)(W4e||(W4e=Y4e(["\n  color: ",";\n"])),e=>{let{iconColor:n}=e;return n}),a6e=(0,f.styled)("div")(q4e||(q4e=Y4e(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n  gap: 2px;\n"]))),r6e=(0,f.styled)(f.Text)(J4e||(J4e=Y4e(["\n  font-size: 24px;\n  font-weight: 500;\n  color: ",";\n"])),e=>{let{textColor:n}=e;return n}),i6e=e=>{let{value1:n,value2:t,doesMoreMeanPositive:a=!1}=e;const r=(0,f.useTheme)(),i=r.palette.success.main,o=r.palette.error.main,l=r.sys.color.onSurfaceVariant,s=n?(t-n)/n*100:0,c=s>0,d=s<0,u=(0,g.useMemo)(()=>c?(0,Ze.jsx)(n6e,{iconColor:a?i:o}):d?(0,Ze.jsx)(t6e,{iconColor:a?o:i}):null,[c,a,d,i,o]),p=(0,g.useMemo)(()=>c?a?i:o:d?a?o:i:l,[c,d,i,o,a,l]);return(0,Ze.jsxs)(a6e,{children:[(0,Ze.jsxs)(r6e,{textColor:p,children:[d2e(s),"%"]}),u]})},o6e=e=>{var n;let{tile:t}=e;const a=rt(),{queryVariablesFilters:r}=J1e(),{data:i,loading:o,error:l,refetch:s}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:r,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Sum}],partitions:[]}}}),c=h2e(null==i?void 0:i.getDashboardTileData),d=o2e((null==c||null===(n=c[0])||void 0===n?void 0:n.Quantity)||"0"),u=Number.isNaN(d)||null===d,p=u?null:d2e(d);return(0,Ze.jsx)(F4e,{title:t.title||"Total consumption (kWh)",loading:o,error:l,retry:s,noData:u,children:(0,Ze.jsx)(H4e,{children:p})})},l6e=e=>{var n;let{tile:t}=e;const a=rt(),{queryVariablesFilters:r}=J1e(),{data:i,loading:o,error:l,refetch:s}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:r,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],partitions:[]}}}),c=h2e(null==i?void 0:i.getDashboardTileData),d=o2e((null==c||null===(n=c[0])||void 0===n?void 0:n.TotalCost)||"0"),u=Number.isNaN(d)||null===d,p=u?null:d2e(d);return(0,Ze.jsx)(F4e,{title:t.title||"Total cost (£)",loading:o,error:l,retry:s,noData:u,children:(0,Ze.jsx)(H4e,{children:p})})};var s6e;const c6e=(0,f.styled)(f.AgGrid)(s6e||(s6e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  height: calc(100% - ","px);\n  padding-bottom: 2px;\n"])),e=>{let{pivotModeEnabled:n}=e;return n?30:40});function d6e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function u6e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d6e(Object(t),!0).forEach(function(n){p6e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d6e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function p6e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const m6e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l}=J1e(),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Sum},{field:"TotalCost",aggregationType:Vt.DF.Sum},{field:"CO2e",aggregationType:Vt.DF.Sum},{field:"MarketOrLocationCO2e",aggregationType:Vt.DF.Sum},{field:"GrossVsNetCarbonDifference",aggregationType:Vt.DF.Sum}],partitions:[{field:"Country"},{field:"LocationCode"},{field:"LocationName"}]}}}),p=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==s?void 0:s.getDashboardTileData))||void 0===e?void 0:e.map(e=>u6e(u6e({},e),{},{Quantity:o2e(e.Quantity),TotalCost:o2e(e.TotalCost),CO2e:o2e(e.CO2e),MarketOrLocationCO2e:o2e(e.MarketOrLocationCO2e),GrossVsNetCarbonDifference:o2e(e.GrossVsNetCarbonDifference)}))},[s]),m=Boolean(p&&0===p.length),f=(0,g.useMemo)(()=>[{headerName:"Country",field:"Country",rowGroup:!0,hide:!0},{headerName:"Location code",field:"LocationCode",rowGroup:!0,hide:!0},{headerName:"Location name",field:"LocationName",rowGroup:!0,hide:!0},{headerName:"Consumption (kWh)",field:"Quantity",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Cost (£)",field:"TotalCost",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Location-based emissions (kgCO2e)",field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Market-based emissions (kgCO2e)",field:"MarketOrLocationCO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Difference (Location vs Market-based)",field:"GrossVsNetCarbonDifference",aggFunc:"sum",valueFormatter:e=>d2e(e.value)}],[]);return(0,Ze.jsx)(F4e,{title:n.title||"Consumption by location",loading:c,error:d,retry:u,noData:m,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-ElectricityConsumptionPerLocationTile"),gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:f,rowData:p}})})},f6e=e=>{var n;let{tile:t}=e;const a=rt(),{queryVariablesFilters:r}=J1e(),{data:i,loading:o,error:l,refetch:s}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:r,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[]}}}),c=h2e(null==i?void 0:i.getDashboardTileData),d=o2e((null==c||null===(n=c[0])||void 0===n?void 0:n.CO2e)||"0"),u=Number.isNaN(d)||null===d,p=u?null:d2e(d);return(0,Ze.jsx)(F4e,{title:t.title||"Total location-based carbon (kgCO2e)",loading:o,error:l,retry:s,noData:u,children:(0,Ze.jsx)(H4e,{children:p})})},y6e=e=>{var n;let{tile:t}=e;const a=rt(),{queryVariablesFilters:r}=J1e(),{data:i,loading:o,error:l,refetch:s}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:r,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"MarketOrLocationCO2e",aggregationType:Vt.DF.Sum}],partitions:[]}}}),c=h2e(null==i?void 0:i.getDashboardTileData),d=o2e((null==c||null===(n=c[0])||void 0===n?void 0:n.MarketOrLocationCO2e)||"0"),u=Number.isNaN(d)||null===d,p=u?null:d2e(d);return(0,Ze.jsx)(F4e,{title:t.title||"Total market-based carbon (kgCO2e)",loading:o,error:l,retry:s,noData:u,children:(0,Ze.jsx)(H4e,{children:p})})};function g6e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function b6e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g6e(Object(t),!0).forEach(function(n){h6e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g6e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function h6e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const v6e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,activeSheet:r,dashboardId:i}=J1e(),o=(0,g.useRef)(null),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Sum},{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Country"},{field:"Scope"}]}}}),u=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==l?void 0:l.getDashboardTileData))||void 0===e?void 0:e.map(e=>b6e(b6e({},e),{},{Quantity:o2e(e.Quantity),CO2e:o2e(e.CO2e)}))},[l]),p=Boolean(u&&0===u.length),m=(0,g.useMemo)(()=>[{headerName:"Country",field:"Country",rowGroup:!0,hide:!0},{headerName:"Scope",field:"Scope",aggFunc:"sum"},{headerName:"Consumption (kWh)",field:"Quantity",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Location-based carbon emissions (kgCO2e)",field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value)}],[]);return(0,Ze.jsx)(F4e,{title:n.title||"Consumption by country and scope",loading:s,error:c,retry:d,noData:p,ref:o,children:(0,Ze.jsx)(c6e,{gridKey:"".concat(t,"-").concat(i,"-").concat(r,"-ElectricityConsumptionByCountryAndScopeTile"),gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:m,rowData:u}})})};var x6e;const T6e=(0,f.styled)("div")(x6e||(x6e=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: grid;\n  width: 100%;\n  height: 100%;\n"])));function O6e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function k6e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O6e(Object(t),!0).forEach(function(n){j6e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O6e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function j6e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const C6e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,withVat:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Sum},{field:"TotalCost",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Accuracy"}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors),y=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==s?void 0:s.getDashboardTileData))||void 0===n?void 0:n.map(e=>k6e(k6e({},e),{},{Quantity:o2e(e.Quantity),TotalCost:o2e(e.TotalCost,{withVat:i}),Date:s2e(e.Month),Accuracy:T2e(e.Accuracy)})),["Date"],"Accuracy","Quantity"))||void 0===e?void 0:e.sort(c2e)},[s,i]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:p,legend:m,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"AccuracyActualQuantity",yName:"Actual Quantity (kWh)",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Actual Quantity (kWh)",value:d2e(e.datum.AccuracyActualQuantity)},{label:"Estimated Quantity (kWh)",value:d2e(e.datum.AccuracyEstimatedQuantity)},{label:"Total Quantity (kWh)",value:d2e((e.datum.AccuracyActualQuantity||0)+(e.datum.AccuracyEstimatedQuantity||0))}]})}},{type:"bar",xKey:"Date",yKey:"AccuracyEstimatedQuantity",yName:"Estimated Quantity (kWh)",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Estimated Quantity (kWh)",value:d2e(e.datum.AccuracyEstimatedQuantity)},{label:"Actual Quantity (kWh)",value:d2e(e.datum.AccuracyActualQuantity)},{label:"Total Quantity (kWh)",value:d2e((e.datum.AccuracyActualQuantity||0)+(e.datum.AccuracyEstimatedQuantity||0))}]})}},{type:"line",xKey:"Date",yKey:"TotalCost",yName:"Cost (£)",tooltip:{renderer:e=>({data:[{label:"Cost (£)",value:d2e(e.datum.TotalCost)}]})}}],axes:[{type:"number",position:"left",keys:["AccuracyActualQuantity","AccuracyEstimatedQuantity"],label:{formatter:e=>p2e(e.value)}},{type:"number",position:"right",keys:["TotalCost"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[y,p,l,m]);return(0,Ze.jsx)(F4e,{title:n.title||"Electricity cost and consumption (kWh) over time ".concat(m2e(i)),loading:c,error:d,retry:u,noData:b,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},r?"exporting-pdf":void 0)};function S6e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function N6e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?S6e(Object(t),!0).forEach(function(n){w6e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):S6e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function w6e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const D6e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),{queryVariablesFilters:r}=J1e(),i=Y1e(a),{data:o,loading:l,error:s,refetch:c}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:r,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Scope"}]}}}),{chartTheme:d,legendTheme:u}=(0,f.useAgChartsTheme)(n.colors),p=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==o?void 0:o.getDashboardTileData))||void 0===n?void 0:n.map(e=>N6e(N6e({},e),{},{CO2e:o2e(e.CO2e),Scope:o2e(e.Scope),Date:s2e(e.Month)})),["Date"],"Scope","CO2e"))||void 0===e?void 0:e.sort(c2e)},[o]),m=Boolean(p&&0===p.length),y=(0,g.useMemo)(()=>({theme:d,legend:u,width:i,data:p||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"Scope2CO2e",yName:"Scope 2",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Scope 2",value:d2e(e.datum.Scope2CO2e)},{label:"Scope 3",value:d2e(e.datum.Scope3CO2e)},{label:"Total CO2e",value:d2e(e.datum.Scope2CO2e+e.datum.Scope3CO2e)}]})}},{type:"bar",xKey:"Date",yKey:"Scope3CO2e",yName:"Scope 3",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Scope 2",value:d2e(e.datum.Scope2CO2e)},{label:"Scope 3",value:d2e(e.datum.Scope3CO2e)},{label:"Total CO2e",value:d2e(e.datum.Scope2CO2e+e.datum.Scope3CO2e)}]})}}],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[p,d,i,u]);return(0,Ze.jsx)(F4e,{title:n.title||"Location-based carbon emissions by scope",loading:l,error:s,retry:c,noData:m,ref:a,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:y})})})};function A6e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function R6e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?A6e(Object(t),!0).forEach(function(n){P6e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A6e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function P6e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const L6e=e=>{var n,t;let{tile:a}=e;const r=rt(),{queryVariablesFilters:i,selectedUnit:o,selectedCarbonComponents:l}=J1e(),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:r,datasetFilters:i,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum},{field:"TotalWtt(kgCO2e)",aggregationType:Vt.DF.Sum},{field:"Td(kgCO2e)",aggregationType:Vt.DF.Sum}],partitions:[]}}}),p=null===(n=h2e(null==s?void 0:s.getDashboardTileData))||void 0===n?void 0:n.map(e=>R6e(R6e({},e),{},{CO2e:r2e({co2eValue:e.CO2e,wttValue:e["TotalWtt(kgCO2e)"],tdValue:e["Td(kgCO2e)"],selectedCarbonComponents:l})})),m=o2e(null==p||null===(t=p[0])||void 0===t?void 0:t.CO2e,{originalUnit:"kg",targetUnit:o}),f=Number.isNaN(m)||null===m,y=f?null:d2e(m,{selectedUnit:o});return(0,Ze.jsx)(F4e,{title:a.title||"Total carbon (".concat(o,"CO2e").concat(f2e(l),")"),loading:c,error:d,retry:u,noData:f,children:(0,Ze.jsx)(H4e,{children:y})})};function I6e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function E6e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I6e(Object(t),!0).forEach(function(n){_6e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I6e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _6e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const F6e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,selectedUnit:i,selectedCarbonComponents:o}=J1e(),l=(0,g.useRef)(null),s=Y1e(l),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum},{field:"TotalWtt(kgCO2e)",aggregationType:Vt.DF.Sum},{field:"Td(kgCO2e)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Type"}]}}}),{chartTheme:m,legendTheme:y,agChartColorMap:b}=(0,f.useAgChartsTheme)(n.colors),v=(0,g.useMemo)(()=>({Electricity:b[f.AgChartColor.BLUE_1],Finances:b[f.AgChartColor.YELLOW_1],Gas:b[f.AgChartColor.GREEN_1],"Home Working":b[f.AgChartColor.PINK_3],"Hotel Stays":b[f.AgChartColor.BLUE_4],Materials:b[f.AgChartColor.GREY_1],"Refrigerants and Other Gases":b[f.AgChartColor.BLUE_3],Waste:b[f.AgChartColor.PURPLE_1],Water:b[f.AgChartColor.PINK_1],Fuel:b[f.AgChartColor.BLACK_1],"Heat and Steam":b[f.AgChartColor.RED_1],Transport:b[f.AgChartColor.YELLOW_1]}),[b]),x=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==c?void 0:c.getDashboardTileData))||void 0===n||null===(n=n.map(e=>E6e(E6e({},e),{},{CO2e:o2e(r2e({co2eValue:e.CO2e,wttValue:e["TotalWtt(kgCO2e)"],tdValue:e["Td(kgCO2e)"],selectedCarbonComponents:o}),{originalUnit:"kg",targetUnit:i}),Date:s2e(e.Month),Type:e.Type})))||void 0===n?void 0:n.sort((e,n)=>e.Type.toLowerCase().localeCompare(n.Type.toLowerCase())),["Date"],"Type","CO2e"))||void 0===e?void 0:e.sort(c2e)},[c,i,o]),T=(0,g.useMemo)(()=>g2e(x,{excludeKeys:["Date"],removeSuffixFromLabels:"CO2e",removePrefixFromLabels:"Type"}),[x]),O=Boolean(x&&0===x.length),k=(0,g.useMemo)(()=>({theme:m,width:s,data:x||[],zoom:{enabled:!0},series:[...T.map(e=>{let{labelKey:n,valueKey:t}=e;return{type:"bar",xKey:"Date",yKey:t,yName:n,stacked:!0,fillOpacity:1,fill:v[n],tooltip:{renderer:e=>({title:e.yName,data:[{label:"".concat(i,"CO2e").concat(f2e(o)),value:"".concat(d2e(e.datum[t],{selectedUnit:i}))}]})}}})],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:E6e({position:"right"},y)}),[x,m,s,T,y,v,i,o]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon by source (".concat(i,"CO2e").concat(f2e(o),")"),loading:d,error:u,retry:p,noData:O,ref:l,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:k})})},r?"exporting-pdf":void 0)};function B6e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function U6e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B6e(Object(t),!0).forEach(function(n){M6e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B6e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function M6e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const V6e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),{queryVariablesFilters:r,selectedUnit:i,selectedCarbonComponents:o}=J1e(),l=Y1e(a),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:r,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum},{field:"TotalWtt(kgCO2e)",aggregationType:Vt.DF.Sum},{field:"Td(kgCO2e)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Scope"}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors||[f.AgChartColor.PINK_1,f.AgChartColor.BLUE_1,f.AgChartColor.GREEN_1]),y=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==s?void 0:s.getDashboardTileData))||void 0===e||null===(e=e.map(e=>U6e(U6e({},e),{},{CO2e:o2e(r2e({co2eValue:e.CO2e,wttValue:e["TotalWtt(kgCO2e)"],tdValue:e["Td(kgCO2e)"],selectedCarbonComponents:o}),{originalUnit:"kg",targetUnit:i}),Scope:"Scope ".concat(e.Scope)})))||void 0===e?void 0:e.sort((e,n)=>Number(e.Scope)-Number(n.Scope))},[s,i,o]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>(null==y?void 0:y.reduce((e,n)=>e+Number(n.CO2e),0))||1,[y]),x=(0,g.useMemo)(()=>({theme:p,legend:m,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"pie",fillOpacity:1,angleKey:"CO2e",calloutLabelKey:"Scope",sectorLabelKey:"CO2e",sectorLabel:{color:"white",fontWeight:"bold",formatter:e=>{let{value:n}=e;return d2e(n,{percentageOverTotal:v})}},tooltip:{renderer:e=>({data:[{label:"".concat(i,"CO2e").concat(f2e(o)),value:d2e(e.datum.CO2e,{selectedUnit:i})}]})}}]}),[y,p,l,v,i,m,o]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon emissions by scope",loading:c,error:d,retry:u,noData:b,ref:a,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:x})})})};function z6e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function G6e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?z6e(Object(t),!0).forEach(function(n){$6e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z6e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function $6e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const W6e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,selectedUnit:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Accuracy"}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors),y=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==s?void 0:s.getDashboardTileData))||void 0===n?void 0:n.map(e=>G6e(G6e({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:i}),Date:s2e(e.Month),Accuracy:e.Accuracy})),["Date"],"Accuracy","CO2e"))||void 0===e||null===(e=e.reduce((e,n)=>[...e,{Date:String(n.Date),AccuracyActCO2e:(Number(n.AccuracyACTCO2e)||0)+(Number(n.AccuracyActCO2e)||0),AccuracyEstCO2e:(Number(n.AccuracyESTCO2e)||0)+(Number(n.AccuracyEstCO2e)||0)}],[]))||void 0===e?void 0:e.sort(c2e)},[s,i]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:p,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"AccuracyActCO2e",yName:"Actual ".concat(i,"CO2e"),stacked:!0,fillOpacity:1},{type:"bar",xKey:"Date",yKey:"AccuracyEstCO2e",yName:"Estimated ".concat(i,"CO2e"),stacked:!0,fillOpacity:1}],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:G6e({position:"right"},m)}),[y,p,l,i,m]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon by data type (".concat(i,"CO2e)"),loading:c,error:d,retry:u,noData:b,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},r?"exporting-pdf":void 0)};function q6e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function J6e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q6e(Object(t),!0).forEach(function(n){Y6e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q6e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Y6e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const H6e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,selectedUnit:s,selectedCarbonComponents:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum},{field:"TotalWtt(kgCO2e)",aggregationType:Vt.DF.Sum},{field:"Td(kgCO2e)",aggregationType:Vt.DF.Sum},{field:"MarketBasedCO2e",aggregationType:Vt.DF.Sum},{field:"MarketTd(kgCO2e)",aggregationType:Vt.DF.Sum},{field:"MarketTotalWtt(kgCO2e)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Scope"},{field:"Type"}]}}}),f=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==d?void 0:d.getDashboardTileData))||void 0===e||null===(e=e.map(e=>J6e(J6e({},e),{},{CO2e:o2e(r2e({co2eValue:e.CO2e,wttValue:e["TotalWtt(kgCO2e)"],tdValue:e["Td(kgCO2e)"],selectedCarbonComponents:c}),{originalUnit:"kg",targetUnit:s}),MarketBasedCO2e:o2e(a2e(r2e({co2eValue:e.CO2e,wttValue:e["MarketTotalWtt(kgCO2e)"],tdValue:e["MarketTd(kgCO2e)"],selectedCarbonComponents:c}),r2e({co2eValue:e.CO2e,wttValue:e["TotalWtt(kgCO2e)"],tdValue:e["Td(kgCO2e)"],selectedCarbonComponents:c})),{originalUnit:"kg",targetUnit:s})})))||void 0===e?void 0:e.sort((e,n)=>e.Scope===n.Scope?e.Type.toLowerCase().localeCompare(n.Type.toLowerCase()):e.Scope.toLowerCase().localeCompare(n.Scope.toLowerCase()))},[d,s,c]),y=Boolean(f&&0===f.length),b=(0,g.useMemo)(()=>[{headerName:"Scope",field:"Scope",rowGroup:!0,hide:!0},{headerName:"Type",field:"Type"},{headerName:"Gross carbon emissions (".concat(s,"CO2e").concat(f2e(c),")"),field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:s})},{headerName:"Net carbon emissions (".concat(s,"CO2e").concat(f2e(c),")"),field:"MarketBasedCO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:s})}],[s,c]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon emissions by scope and source",loading:u,error:p,retry:m,noData:y,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-ElectricityConsumptionPerLocationTile"),gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:b,rowData:f}})})};function K6e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Q6e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?K6e(Object(t),!0).forEach(function(n){Z6e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):K6e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Z6e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const X6e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,selectedUnit:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"TotalWtt(kgCO2e)",aggregationType:Vt.DF.Sum},{field:"Td(kgCO2e)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Type"}]}}}),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==c?void 0:c.getDashboardTileData))||void 0===e||null===(e=e.map(e=>Q6e(Q6e({},e),{},{"TotalWtt(kgCO2e)":o2e(e["TotalWtt(kgCO2e)"],{originalUnit:"kg",targetUnit:s}),"Td(kgCO2e)":o2e(e["Td(kgCO2e)"],{originalUnit:"kg",targetUnit:s})})).filter(e=>0!==Number(e["TotalWtt(kgCO2e)"])||0!==Number(e["Td(kgCO2e)"])))||void 0===e?void 0:e.sort((e,n)=>e.Type.toLowerCase().localeCompare(n.Type.toLowerCase()))},[c,s]),f=Boolean(m&&0===m.length),y=(0,g.useMemo)(()=>[{headerName:"Type",field:"Type"},{headerName:"Well to Tank (".concat(s,"CO2e)"),field:"TotalWtt(kgCO2e)",aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:s})},{headerName:"Transmission & Distribution (".concat(s,"CO2e)"),field:"Td(kgCO2e)",aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:s})}],[s]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon WTT and TD emissions by source",loading:d,error:u,retry:p,noData:f,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-CarbonWttAndTdEmissionsBySourceTableTile"),gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:y,rowData:m}})})};function e7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function n7e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?e7e(Object(t),!0).forEach(function(n){t7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):e7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function t7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const a7e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,selectedUnit:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Type"},{field:"Country"}]}}}),{chartTheme:p,legendTheme:m,agChartColorMap:y}=(0,f.useAgChartsTheme)(n.colors),b=(0,g.useMemo)(()=>({Electricity:y[f.AgChartColor.BLUE_1],Finances:y[f.AgChartColor.YELLOW_1],Gas:y[f.AgChartColor.GREEN_1],"Home Working":y[f.AgChartColor.PINK_3],"Hotel Stays":y[f.AgChartColor.BLUE_4],Materials:y[f.AgChartColor.GREY_1],"Refrigerants and Other Gases":y[f.AgChartColor.BLUE_3],Waste:y[f.AgChartColor.PURPLE_1],Water:y[f.AgChartColor.PINK_1],Fuel:y[f.AgChartColor.BLACK_1],"Heat and Steam":y[f.AgChartColor.RED_1],Transport:y[f.AgChartColor.YELLOW_1]}),[y]),v=(0,g.useMemo)(()=>{var e;return b2e(null===(e=h2e(null==s?void 0:s.getDashboardTileData))||void 0===e||null===(e=e.map(e=>n7e(n7e({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:i}),Type:e.Type,Country:e.Country})))||void 0===e?void 0:e.sort((e,n)=>Number(n.CO2e)-Number(e.CO2e)),["Country"],"Type","CO2e","TotalCO2e")},[s,i]),x=(0,g.useMemo)(()=>g2e(v,{excludeKeys:["Country","TotalCO2e"],removeSuffixFromLabels:"CO2e",removePrefixFromLabels:"Type"}),[v]),T=Boolean(v&&0===v.length),O=(0,g.useMemo)(()=>({theme:p,width:l,data:v||[],zoom:{enabled:!0},series:[...x.map(e=>{let{labelKey:n,valueKey:t}=e;return{type:"bar",xKey:"Country",yKey:t,yName:n,stacked:!0,fillOpacity:1,fill:b[n],tooltip:{renderer:e=>{let{datum:t,yKey:a}=e;return{data:[{label:"".concat(n," ").concat(i,"CO2e"),value:d2e(Number(t[a]),{selectedUnit:i})},{label:"Total ".concat(i,"CO2e"),value:d2e(Number(t.TotalCO2e),{selectedUnit:i})}]}}}}})],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:n7e({position:"right"},m)}),[v,p,l,i,x,m,b]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon by country (".concat(i,"CO2e)"),loading:c,error:d,retry:u,noData:T,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:O})})},r?"exporting-pdf":void 0)};function r7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i7e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r7e(Object(t),!0).forEach(function(n){o7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const l7e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,selectedUnit:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Country"},{field:"Scope"}]}}}),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==c?void 0:c.getDashboardTileData))||void 0===e||null===(e=e.map(e=>i7e(i7e({},e),{},{Country:e.Country,Scope:e.Scope,CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:s})})))||void 0===e?void 0:e.sort((e,n)=>e.Scope===n.Scope?e.Country.toLowerCase().localeCompare(n.Country.toLowerCase()):e.Scope.toLowerCase().localeCompare(n.Scope.toLowerCase()))},[c,s]),f=Boolean(m&&0===m.length),y=(0,g.useMemo)(()=>[{headerName:"Country",field:"Country",rowGroup:!0,hide:!0},{headerName:"Scope",field:"Scope"},{headerName:"".concat(s,"CO2e"),field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:s})}],[s]);return(0,Ze.jsx)(F4e,{title:n.title||"Emissions by country and scope",loading:d,error:u,retry:p,noData:f,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-CarbonEmissionsByCountryAndScopeTableTile"),gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:y,rowData:m}})})},s7e={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[[[3.0871,-54.4014],[3.407,-54.3486],[3.5662,-54.3224],[3.5714,-54.5157],[3.407,-54.5279],[3.2236,-54.5414],[3.0871,-54.4014]]]},properties:{name:"Bouvet Island"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[25.2703,-17.7989],[26.1873,-19.5021],[27.6166,-20.5719],[27.7788,-21.1231],[28.123,-21.5265],[28.9194,-21.7879],[29.3608,-22.1966],[28.2714,-22.6602],[27.0526,-23.648],[26.7949,-24.2778],[26.0025,-24.7193],[25.5853,-25.5825],[25.3317,-25.7424],[24.4722,-25.7662],[23.4396,-25.3063],[23.0327,-25.3248],[22.5598,-26.1926],[21.661,-26.8299],[21.2827,-26.8663],[20.7004,-26.8181],[20.8245,-26.0714],[20.6983,-25.63],[20.4129,-25.096],[19.9995,-24.752],[20.0143,-22.0939],[20.9363,-21.9709],[20.9991,-21.6023],[20.9992,-21.4074],[20.9993,-20.8507],[20.9994,-20.5666],[20.9995,-20.1422],[20.9999,-18.3196],[21.463,-18.3043],[21.7196,-18.256],[23.1849,-18.0102],[23.668,-18.4216],[24.3074,-18.0188],[25.2628,-17.7914],[25.2703,-17.7989]]]},properties:{name:"Botswana"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[31.7869,52.1115],[30.9112,52.0252],[30.5778,51.675],[30.5213,51.3278],[30.1126,51.4902],[29.3584,51.4228],[29.0542,51.6149],[28.7544,51.4177],[28.2365,51.6329],[27.7579,51.5175],[27.1051,51.7564],[25.3462,51.9465],[24.4673,51.8703],[23.6174,51.5095],[23.5477,51.6914],[23.6455,52.0553],[23.1783,52.2831],[23.8616,52.7073],[23.9162,52.9048],[23.8116,53.255],[23.5887,53.6959],[23.5147,53.9566],[24.4754,53.9309],[24.8359,54.149],[25.6697,54.195],[25.761,54.5791],[25.7708,54.7943],[25.9578,54.9506],[26.1932,55.0034],[26.3111,55.1325],[26.6447,55.1608],[26.7404,55.2639],[26.6304,55.6807],[27.6312,55.8737],[28.1546,56.1698],[30.7426,55.6294],[30.9746,54.6727],[31.8888,53.8522],[32.2832,53.7654],[32.5875,53.4898],[32.526,53.3094],[31.3967,53.0369],[31.7869,52.1115]]]},properties:{name:"Belarus"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-87.6804,17.3598],[-87.8544,17.1216],[-88.0451,17.259],[-87.8529,17.5203],[-87.6804,17.3598]]],[[[-88.9128,15.9001],[-89.1806,15.9683],[-89.1972,16.2896],[-89.147,17.8095],[-88.3168,18.4888],[-88.1381,18.1966],[-88.2692,16.8235],[-88.9128,15.9001]]]]},properties:{name:"Belize"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[44.812,39.6317],[45.6126,38.9511],[46.1407,38.8449],[46.5458,38.8781],[47.9849,39.664],[48.2959,39.3917],[48.1125,38.8555],[48.5934,38.4644],[48.8878,38.4412],[48.9806,37.8463],[49.3825,37.5063],[50.087,37.3942],[51.0059,36.7758],[51.8799,36.5928],[53.8846,36.9251],[53.9068,37.3399],[54.2432,37.3273],[54.7706,37.5063],[55.3309,38.0319],[56.7141,38.2659],[57.2392,38.2153],[57.5183,37.9459],[58.2749,37.6987],[59.3708,37.5063],[59.5306,37.1849],[60.3349,36.6789],[61.0913,36.5821],[61.2741,35.6051],[60.8534,34.3412],[60.5205,34.0684],[60.799,33.4155],[60.6222,33.069],[60.8565,32.1149],[60.8832,31.5377],[61.6443,31.3638],[61.8061,31.0542],[61.6934,30.7331],[60.873,29.8585],[61.8091,28.6605],[62.7458,28.2253],[62.8319,27.3052],[63.1741,27.1781],[63.1929,26.8423],[63.0911,26.6676],[62.4742,26.5693],[61.8842,26.2036],[61.6105,25.195],[57.5287,25.767],[56.9532,26.942],[56.4839,27.1427],[56.0946,27.0537],[55.9736,26.7682],[54.8176,26.5647],[53.6711,26.7478],[52.3164,27.6817],[51.4145,27.9721],[50.0673,30.0967],[49.5687,30.0989],[49.0414,30.3363],[48.4844,29.9791],[47.7508,31.0984],[47.7857,31.7734],[47.4435,32.3096],[46.2417,32.9842],[45.5675,33.8898],[45.5289,34.4408],[46.0875,35.1508],[46.0584,35.6666],[45.1379,36.4692],[44.7931,37.1763],[44.6485,37.4271],[44.4629,37.8096],[44.2847,37.9314],[44.4142,38.2972],[44.05,39.3628],[44.3729,39.452],[44.5021,39.717],[44.812,39.6317]]]},properties:{name:"Iran"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[13.7142,46.5227],[13.684,46.4375],[13.511,46.3484],[13.4969,46.0513],[13.5971,45.8195],[13.5962,45.8079],[13.7847,45.7428],[13.9032,45.6358],[13.836,45.5875],[13.7221,45.595],[13.5798,45.787],[13.4503,45.704],[13.3525,45.7354],[13.0988,45.6445],[12.2277,45.3255],[12.3306,45.1606],[12.3991,44.7926],[12.2699,44.63],[12.3843,44.2247],[12.4503,44.1622],[12.7507,43.9697],[13.1726,43.7503],[13.6421,43.4741],[13.743,43.2941],[13.7462,43.2888],[13.7521,43.2777],[13.7575,43.2673],[13.7642,43.2555],[13.7675,43.2502],[13.7742,43.2399],[13.7777,43.2352],[13.7907,43.1989],[13.8039,43.1717],[13.8108,43.1631],[13.8179,43.1451],[13.8291,43.1268],[13.8418,43.1032],[13.8455,43.0944],[13.8467,43.0801],[13.8495,43.0667],[13.9157,42.8946],[14.0154,42.6893],[14.1469,42.5306],[14.254,42.4448],[14.7796,42.07],[15.1382,41.927],[16.0491,41.9056],[16.0404,41.7331],[16.0247,41.4256],[16.5423,41.2294],[17.389,40.8919],[17.9006,40.6819],[18.0975,40.5154],[18.4343,40.1839],[18.3281,39.8804],[18.102,39.937],[17.7635,40.2955],[16.8673,40.3978],[16.6443,40.1191],[16.5399,39.7215],[17.0251,39.4836],[17.11,39.0493],[16.8907,38.9271],[16.7476,38.8823],[16.5724,38.7103],[16.5821,38.4698],[15.8327,37.931],[15.6528,38.1424],[15.919,38.5068],[16.2138,38.8104],[16.0932,39.0487],[15.756,39.9235],[15.6449,40.0428],[15.094,40.1788],[14.7762,40.5698],[14.4813,40.6426],[14.0321,40.8988],[13.7608,41.2232],[12.7733,41.4163],[12.3087,41.7331],[11.7338,42.1581],[11.4499,42.3777],[10.7057,42.9419],[10.2998,43.5819],[10.2581,43.8151],[10.1435,43.9754],[10.0188,44.0445],[9.5113,44.2167],[8.633,44.3798],[8.1354,43.9389],[7.5298,43.784],[7.7142,44.0615],[6.8874,44.3613],[6.9484,44.6547],[7.0658,44.7135],[6.6301,45.1099],[7.1311,45.2671],[7.1047,45.4685],[6.8024,45.7786],[7.0449,45.9224],[7.8641,45.9168],[7.8771,45.927],[8.3847,46.4522],[8.7139,46.0973],[8.9121,45.8304],[9.1594,46.1696],[9.2485,46.2338],[9.3475,46.472],[10.0507,46.335],[10.1739,46.5798],[10.4528,46.5307],[10.4697,46.8549],[10.9817,46.8074],[11.1643,46.9657],[11.6272,47.0133],[11.8572,47.0038],[12.136,47.0807],[12.2407,47.0692],[12.2117,46.8968],[12.4779,46.6798],[12.6906,46.657],[12.7314,46.6343],[13.5042,46.5663],[13.7142,46.5227]],[[12.3624,41.8843],[12.3911,41.869],[12.5186,41.8784],[12.4897,41.9547],[12.4327,41.9402],[12.3624,41.8843]],[[12.453,43.8945],[12.4624,43.8938],[12.4688,43.8966],[12.4874,43.8965],[12.4931,43.9069],[12.47,43.973],[12.4504,43.8972],[12.453,43.8945]]],[[[13.2265,38.1933],[14.1835,38.0194],[15.3432,38.1648],[15.2581,37.8072],[15.0915,37.3577],[15.2479,37.0747],[15.0004,36.7028],[14.5732,36.7696],[14.3376,37.002],[14.0362,37.106],[12.8965,37.5771],[12.6447,37.6388],[12.5503,37.9303],[12.9773,38.0402],[13.2265,38.1933]]],[[[12.1937,36.8246],[11.9944,36.6104],[11.76,36.8816],[11.856,36.9636],[12.1937,36.8246]]],[[[9.5207,39.1815],[8.6124,38.9578],[8.3658,39.0693],[8.393,39.4465],[8.5023,39.713],[8.4666,40.1984],[8.3998,40.4076],[8.2316,40.795],[8.8027,40.931],[9.3804,41.196],[9.7494,40.6581],[9.628,40.1984],[9.6511,39.5493],[9.5207,39.1815]]]]},properties:{name:"Italy"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-2.3643,49.2882],[-2.014,49.2781],[-1.9469,49.1354],[-2.2715,49.1496],[-2.3643,49.2882]]]},properties:{name:"Jersey"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-78.2914,18.2884],[-78.0766,18.4752],[-77.4957,18.4829],[-76.915,18.3837],[-76.3799,18.0417],[-76.4044,17.9423],[-77.4957,17.8484],[-78.2914,18.2884]]]},properties:{name:"Jamaica"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[39.2009,32.1543],[37.0883,31.5014],[37.9246,30.5466],[37.4562,30.0187],[36.7808,29.8457],[36.081,29.223],[34.957,29.3567],[34.9601,29.359],[34.9666,29.3638],[34.9608,29.3683],[34.9642,29.3734],[34.9622,29.3799],[34.9662,29.3879],[34.9604,29.3984],[34.9681,29.4029],[34.9749,29.4098],[34.9708,29.4219],[34.9731,29.4313],[34.9668,29.4462],[34.9764,29.4623],[34.9751,29.4701],[34.9771,29.4738],[34.9915,29.5015],[34.9938,29.5101],[35,29.5161],[35,29.524],[34.9982,29.5287],[34.9911,29.5349],[34.9782,29.5418],[35.476,31.4905],[35.5551,32.389],[35.6716,32.6911],[36.8551,32.3662],[38.7925,33.3747],[39.2009,32.1543]]]},properties:{name:"Jordan"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[143.7459,42.7022],[143.2036,42.1068],[142.9945,42.1068],[141.8174,42.5459],[141.0993,42.4226],[140.6396,42.4965],[140.4363,42.2295],[140.9257,41.8218],[140.1806,41.5037],[139.8677,42.3012],[140.4815,43.2037],[141.3431,43.391],[141.7074,44.4718],[141.6927,45.172],[141.922,45.3698],[143.6403,44.2562],[145.1581,43.9917],[145.2182,43.1959],[143.7459,42.7022]]],[[[142.3139,27.64],[142.2605,27.3207],[141.974,27.5119],[142.1367,27.7013],[142.3139,27.64]]],[[[141.3843,41.3148],[141.4656,40.6779],[141.9617,39.9522],[141.9127,39.3419],[141.4592,38.4797],[140.9518,38.091],[141.0202,37.2545],[140.6044,36.3526],[140.7576,35.7614],[140.3355,35.2033],[139.8772,34.9981],[139.847,35.2989],[140.0474,35.5553],[139.8713,35.5787],[139.2019,35.1931],[138.9179,34.7682],[138.8207,34.7851],[138.7345,35.13],[138.1493,34.6372],[137.4608,34.6762],[136.735,34.9873],[136.654,34.5805],[136.8518,34.5186],[136.8251,34.3817],[136.373,34.171],[135.7332,33.502],[135.1309,33.9027],[135.1434,34.3064],[135.4375,34.5805],[135.2971,34.6852],[134.9658,34.5805],[134.7432,34.7231],[134.2243,34.6772],[134.2243,34.3503],[134.491,34.2284],[134.8237,34.4083],[134.9082,34.3112],[134.6652,34.1592],[134.65,33.8435],[134.2243,33.4048],[134.1674,33.2633],[133.7255,33.5211],[133.362,33.4095],[132.8394,32.79],[132.396,33.0202],[132.4776,33.2633],[132.3856,33.4772],[132.7772,33.9829],[132.7523,34.1208],[132.4453,34.2682],[132.2094,33.9829],[132.2703,33.8237],[132.1182,33.7695],[131.8767,33.9829],[130.9728,33.9651],[131.1571,33.6347],[131.6728,33.6428],[131.6913,33.2633],[131.9458,32.8316],[131.5257,32.0747],[131.3905,31.502],[130.8656,31.1442],[130.6665,31.4888],[130.5626,31.2684],[130.2842,31.2779],[130.1614,32.1463],[129.9792,32.252],[130.0512,32.4653],[130.1883,32.5441],[130.2633,32.3751],[130.4852,32.3881],[130.4599,32.5245],[130.6204,32.581],[130.4164,33.0226],[130.1883,33.1315],[130.1883,32.7764],[129.78,32.7169],[129.5281,33.3202],[129.8479,33.5638],[130.145,33.5906],[130.4633,33.8723],[130.8524,33.9651],[130.9359,34.3818],[131.5257,34.5557],[131.8033,34.6874],[132.902,35.5294],[134.2243,35.5441],[135.162,35.7225],[135.4529,35.4853],[135.9832,35.6504],[136.0372,36.0428],[136.6944,36.7816],[136.7192,37.2545],[136.8244,37.3689],[137.2308,37.4549],[137.2348,37.3314],[136.9482,37.1061],[137.2679,36.803],[138.3599,37.2545],[139.3692,38.1345],[139.7816,38.867],[140.0439,39.668],[139.7196,39.9522],[139.9682,40.1985],[139.9278,40.6275],[140.2332,40.8438],[140.3716,41.1996],[140.7139,40.9245],[141.1719,40.9888],[141.1952,41.212],[140.8212,41.207],[140.9694,41.4952],[141.3843,41.3148]]],[[[141.4516,45.128],[141.2428,45.0076],[141.0125,45.1926],[141.1655,45.3497],[141.4516,45.128]]],[[[138.5999,38.058],[138.2952,37.8091],[138.2018,38.0174],[138.4719,38.2694],[138.5999,38.058]]],[[[133.4804,36.2723],[133.3682,36.0854],[133.2079,36.1234],[133.0802,35.9376],[132.8788,36.0841],[133.2778,36.4247],[133.4804,36.2723]]],[[[131.3757,25.7243],[131.066,25.7087],[131.1244,25.9636],[131.3461,26.0201],[131.3757,25.7243]]],[[[131.1503,30.505],[130.9761,30.4341],[130.8236,30.6856],[131.0942,30.8134],[131.1503,30.505]]],[[[130.6362,30.224],[130.4351,30.1966],[130.3349,30.3737],[130.4617,30.4917],[130.7217,30.3928],[130.6362,30.224]]],[[[129.34,34.4432],[129.3736,34.0703],[129.0985,34.1138],[129.2238,34.6098],[129.5626,34.7815],[129.5177,34.5074],[129.34,34.4432]]],[[[129.5144,28.4103],[129.4426,28.0497],[129.2902,28.0849],[129.1927,28.335],[129.5144,28.4103]]],[[[129.0434,32.7774],[128.7058,32.5712],[128.5822,32.6539],[129.0065,32.9667],[129.0434,32.7774]]],[[[128.0224,26.4734],[127.8872,26.2837],[127.735,26.3854],[127.883,26.6917],[128.0096,26.6917],[128.0224,26.4734]]],[[[124.1338,24.3741],[123.9283,24.1489],[123.6603,24.4046],[123.7167,24.4693],[124.1338,24.3741]]],[[[123.2932,24.4998],[123.1436,24.3506],[122.6928,24.4117],[122.8343,24.5471],[123.2932,24.4998]]]]},properties:{name:"Japan"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[35.9477,4.62],[36.9621,4.3833],[38.1026,3.6459],[38.9731,3.5158],[39.5667,3.5224],[39.9305,3.8858],[40.708,4.2326],[41.2328,3.9616],[41.9101,3.9823],[41.0171,2.6734],[41.0554,-.8786],[41.5645,-1.6558],[41.4558,-1.766],[40.8487,-2.2733],[40.2335,-2.7873],[39.6021,-4.2684],[39.2042,-4.6703],[37.7537,-3.6303],[37.5178,-2.9658],[36.2553,-2.2733],[35.6903,-1.9633],[35.4478,-1.8303],[35.3306,-1.766],[33.934,-.9999],[33.9422,-.8786],[34.0186,.252],[34.5428,1.1019],[34.9796,1.7951],[34.8669,2.5352],[34.5428,3.1339],[34.4095,3.6353],[33.9945,4.2144],[34.3785,4.62],[35.5088,4.62],[35.9477,4.62]]]},properties:{name:"Kenya"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[80.2456,42.2209],[80.0734,42.1059],[79.6793,41.8428],[79.2841,41.7331],[78.9227,41.6328],[78.124,41.0801],[76.8949,40.9933],[76.3508,40.3902],[75.7474,40.329],[75.5366,40.5992],[74.004,40.0502],[73.8806,39.5608],[73.6582,39.4651],[73.4844,39.4679],[72.2515,39.2305],[71.4569,39.5692],[70.8614,39.4289],[70.4856,39.5952],[69.5209,39.5656],[69.3322,39.7854],[69.5137,40.0502],[69.6253,40.1138],[70.0058,40.2165],[70.5257,40.0502],[70.6555,40.0502],[70.9676,40.2285],[71.7869,40.2283],[72.7923,40.7655],[71.8407,41.3602],[71.2273,41.179],[70.6296,41.3903],[70.4493,41.5111],[70.4682,41.7331],[71.0708,42.1059],[71.177,42.1716],[70.9402,42.2592],[71.0385,42.3929],[71.555,42.7757],[73.3125,42.5357],[73.7513,43.0076],[74.2231,43.1398],[75.4801,42.8656],[77.0929,42.9409],[78.8408,42.7334],[79.8198,42.3929],[80.2456,42.2209]]]},properties:{name:"Kyrgyzstan"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[104.4386,10.4245],[103.6272,10.5957],[103.5771,11.0007],[103.1292,10.9936],[102.9109,11.6472],[102.9011,11.7642],[102.7276,12.1572],[102.7756,12.435],[102.524,12.6873],[102.5082,13.006],[102.3986,13.1639],[102.4114,13.5271],[103.1615,14.3049],[105.2001,14.3427],[106.0246,13.9409],[106.0779,14.3576],[106.6894,14.4307],[106.9803,14.3702],[107.5561,14.6866],[107.407,14.1765],[107.5795,13.4943],[107.4792,12.4166],[105.9956,11.599],[106.102,10.9073],[105.2582,10.9203],[104.4386,10.4245]]]},properties:{name:"Cambodia"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[159.2966,-31.6438],[159.1312,-31.6991],[158.8469,-31.3638],[159.0007,-31.2949],[159.2966,-31.6438]]],[[[155.9704,-17.2969],[155.973,-17.556],[155.7584,-17.5196],[155.6617,-17.345],[155.8034,-17.2219],[155.9704,-17.2969]]],[[[143.3715,-12.6082],[143.8063,-14.3006],[144.5405,-14.2989],[145.232,-14.9531],[145.5013,-16.4924],[145.9725,-17.1891],[146.4035,-18.9198],[149.0378,-20.302],[149.0683,-20.4459],[148.7901,-20.6295],[149.249,-21.1971],[149.7084,-22.3402],[150.0021,-22.1271],[150.7057,-22.5271],[150.9186,-23.4939],[152.6114,-25.0964],[152.8872,-25.2023],[153.285,-25.029],[153.0982,-26.3843],[153.1753,-27.2224],[153.4694,-27.6758],[153.5647,-28.7456],[152.8692,-31.5895],[152.4464,-32.4572],[151.5009,-33.2363],[150.2193,-35.8375],[149.8727,-37.5021],[149.3792,-37.7606],[147.7855,-37.9714],[146.3968,-38.788],[146.2835,-39.0539],[145.0217,-38.4085],[144.887,-37.9609],[144.6176,-38.2848],[143.432,-38.777],[142.3993,-38.3878],[141.4856,-38.3568],[140.4176,-37.883],[139.8416,-37.2501],[139.7534,-36.5051],[139.3294,-35.8924],[138.8109,-35.5927],[138.2753,-35.5625],[138.4692,-34.8268],[138.128,-34.2953],[137.5221,-35.1263],[136.9587,-35.1346],[137.0529,-34.9514],[137.4216,-34.7907],[137.5221,-34.1005],[137.8794,-33.508],[137.9169,-32.8395],[137.5221,-33.0944],[136.0338,-34.4602],[135.9271,-34.8001],[135.6967,-34.8212],[135.4824,-34.6888],[134.8275,-33.4176],[134.3206,-33.0516],[134.1826,-32.6088],[133.6319,-32.2527],[132.2258,-31.9878],[131.2217,-31.5341],[129.2891,-31.663],[127.2572,-32.2475],[125.8716,-32.3456],[124.3256,-33.0179],[123.8423,-33.6636],[123.286,-33.9514],[120.033,-33.9575],[119.378,-34.4489],[117.8687,-35.073],[116.654,-35.0256],[116.0491,-34.81],[115.0278,-34.0106],[115.0605,-33.7253],[115.6402,-33.1935],[115.7013,-31.8384],[115.0463,-30.3686],[114.8743,-29.2035],[114.2243,-28.1324],[113.7431,-26.8072],[113.8982,-26.2244],[114.1168,-26.3553],[114.1982,-26.0276],[113.4607,-24.3896],[113.9093,-22.1271],[114.0134,-21.9227],[114.2925,-22.4072],[114.5846,-21.9122],[115.2139,-21.5393],[115.4685,-21.5224],[115.8755,-21.1998],[116.6373,-20.5215],[117.5124,-20.6781],[119.1302,-20.0296],[119.7266,-19.9948],[121.0812,-19.5399],[122.2487,-18.1397],[122.1926,-17.3851],[122.3787,-17.012],[122.8903,-16.6285],[123.426,-17.1848],[123.6661,-17.1235],[123.7459,-16.9045],[123.4248,-16.524],[123.42,-16.11],[124.3935,-16.25],[124.5049,-15.3163],[124.9746,-15.1558],[125.2466,-14.4512],[125.6992,-14.472],[125.9939,-14.2521],[126.0438,-13.9079],[126.5201,-14.1004],[126.8112,-13.8389],[127.3487,-13.9719],[128.0612,-14.6176],[128.2075,-15.0149],[128.5841,-14.8256],[129.536,-14.8953],[129.4737,-14.2464],[130.1384,-13.3701],[130.4102,-12.6682],[131.0988,-12.2102],[132.0646,-12.2717],[132.5565,-12.0334],[132.5268,-11.6283],[132.0463,-11.4709],[131.9684,-11.2603],[135.123,-12.2306],[135.8323,-12.1924],[136.496,-11.9267],[136.813,-12.4018],[136.5071,-13.0754],[135.9222,-13.4949],[136.167,-13.8234],[135.5535,-14.5414],[135.4682,-14.8617],[136.3046,-15.5358],[136.835,-15.5487],[136.881,-15.6719],[136.6733,-15.7347],[136.7543,-15.8652],[137.5221,-16.1578],[139.9767,-17.6244],[140.7841,-17.4143],[141.3251,-16.2907],[141.5836,-15.2458],[141.5086,-13.89],[141.7907,-12.7449],[141.7342,-12.2479],[142.1218,-11.1308],[142.4452,-10.8017],[142.7381,-11.1191],[142.901,-11.8067],[143.3715,-12.6082]]],[[[149.3052,-15.9431],[149.1402,-16.2252],[148.9648,-16.1924],[149.1548,-15.7879],[149.3052,-15.9431]]],[[[149.2777,-17.0875],[149.0543,-17.1564],[148.9714,-16.9853],[149.0282,-16.8454],[149.2765,-16.8752],[149.2777,-17.0875]]],[[[148.3998,-40.4443],[148.1487,-40.5268],[147.8945,-40.1393],[147.8945,-39.7542],[148.2461,-39.9791],[148.3998,-40.4443]]],[[[145.5098,-40.871],[146.175,-41.1528],[146.8238,-41.129],[146.9568,-41.0118],[148.1511,-40.8069],[148.278,-41.0944],[148.2549,-41.9098],[147.8895,-42.7506],[147.9785,-42.9314],[147.8895,-43.1614],[147.5227,-43.046],[147.4265,-43.2354],[146.8859,-43.5748],[146.0882,-43.5296],[145.4941,-42.9411],[145.2782,-42.5438],[145.3213,-42.1548],[144.8812,-41.6283],[144.6774,-41.129],[144.7947,-40.6765],[145.5098,-40.871]]],[[[144.1221,-40.0012],[143.9274,-40.1309],[143.847,-39.92],[143.963,-39.5844],[144.1125,-39.6906],[144.1221,-40.0012]]],[[[143.618,-9.687],[143.3843,-9.8851],[143.1337,-9.7773],[143.373,-9.5873],[143.618,-9.687]]],[[[142.3386,-10.7332],[142.1641,-10.8484],[142.0643,-10.5364],[141.9054,-10.4878],[141.9453,-10.2793],[142.2907,-10.0598],[142.4221,-10.159],[142.1947,-10.3637],[142.3386,-10.7332]]],[[[139.4754,-16.6758],[139.2364,-16.7256],[139.1597,-16.6319],[139.3119,-16.4637],[139.544,-16.3972],[139.6519,-16.4731],[139.4754,-16.6758]]],[[[138.2414,-35.8657],[138.0753,-35.9737],[137.7635,-35.804],[138.0132,-35.6618],[138.2414,-35.8657]]],[[[137.7266,-35.8128],[137.5253,-36.022],[136.6355,-35.9795],[136.6141,-35.7793],[137.3114,-35.5824],[137.5997,-35.5867],[137.7266,-35.8128]]],[[[136.8058,-13.8258],[136.8024,-14.2601],[136.4606,-14.2217],[136.3797,-13.6939],[136.6855,-13.6875],[136.8058,-13.8258]]],[[[130.4534,-11.2221],[130.6917,-11.3805],[131.1161,-11.2597],[131.417,-11.2588],[131.4688,-11.6059],[130.943,-11.9338],[130.6937,-11.7998],[130.2008,-11.7619],[130.1512,-11.7057],[130.2545,-11.3476],[130.4534,-11.2221]]],[[[123.7093,-12.6268],[123.6241,-12.7447],[123.4844,-12.6569],[123.4103,-12.4125],[123.5695,-12.3123],[123.7093,-12.6268]]],[[[122.3117,-16.9294],[122.074,-16.9798],[121.8675,-16.856],[121.9528,-16.7655],[122.2908,-16.7555],[122.3117,-16.9294]]],[[[113.7008,-26.0876],[113.5801,-26.0937],[113.4135,-25.6794],[113.4904,-25.5869],[113.7618,-25.8839],[113.7008,-26.0876]]],[[[113.5749,-26.4047],[113.2979,-26.4047],[113.1899,-26.1588],[113.3362,-26.0519],[113.5749,-26.4047]]]]},properties:{name:"Australia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-70.1872,12.5799],[-70.173,12.7716],[-69.7737,12.4417],[-69.7655,12.2842],[-70.1872,12.5799]]]},properties:{name:"Aruba"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[48.5735,41.8254],[48.6559,41.7331],[49.5501,40.732],[50.1459,40.4007],[49.5004,40.0607],[49.2098,39.2264],[48.9454,38.9508],[48.8878,38.4412],[48.5934,38.4644],[48.1125,38.8555],[48.2959,39.3917],[47.9849,39.664],[46.5458,38.8781],[46.4532,39.4681],[45.8952,39.8651],[45.9149,40.1148],[45.9168,40.2364],[45.6126,40.4017],[45.4264,40.634],[45.4846,40.9218],[45.0131,41.2966],[46.5337,41.1855],[46.5821,41.3432],[46.2829,41.7331],[46.4205,41.9043],[46.7291,41.7331],[47.6587,41.2176],[48.5735,41.8254]]],[[[46.1407,38.8449],[45.6126,38.9511],[44.812,39.6317],[44.7683,39.7141],[45.6126,39.5652],[45.9781,39.2712],[46.1407,38.8449]]]]},properties:{name:"Azerbaijan"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[19.0221,44.8554],[19.3512,44.8891],[19.1422,44.422],[19.4971,44.0991],[19.4764,43.6372],[19.2241,43.5275],[18.7067,43.1554],[18.4381,42.5557],[18.1539,42.6893],[17.4508,43.1769],[16.5443,43.9742],[16.4384,44.0425],[16.1724,44.2092],[16.1322,44.4545],[15.7367,44.9356],[15.84,45.2245],[16.2537,45.0676],[17.1412,45.1633],[17.4433,45.1597],[17.8339,45.0615],[18.019,45.1294],[18.5297,45.0875],[18.7408,45.0207],[18.8337,44.8701],[19.0221,44.8554]]]},properties:{name:"Bosnia and Herzegovina"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-59.7048,13.2272],[-59.5985,13.3256],[-59.3407,13.1483],[-59.4786,12.9895],[-59.6562,13.0331],[-59.7048,13.2272]]]},properties:{name:"Barbados"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[92.6068,21.9712],[92.6238,21.4616],[92.3081,21.3804],[92.2021,21.1507],[91.7732,22.2937],[91.4733,22.6557],[90.6837,22.0496],[89.4416,21.7456],[89.0628,21.9257],[88.9238,23.0935],[88.6343,23.6942],[88.6844,24.2282],[88.1499,24.6608],[88.8173,25.3069],[88.2105,25.8776],[88.5924,26.3771],[89.1233,26.2142],[89.7217,26.0307],[90.0071,25.3633],[92.2478,25.0052],[92.1082,24.5094],[91.453,24.0284],[91.2736,23.6319],[91.6475,23.1403],[92.0094,23.5264],[92.1892,23.5198],[92.6068,21.9712]]]},properties:{name:"Bangladesh"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[6.021,50.7543],[6.3156,50.497],[6.405,50.3233],[6.1377,50.13],[6.0249,50.1828],[5.7463,49.8536],[5.8181,49.5463],[5.7346,49.5457],[5.4709,49.4972],[5.3935,49.6171],[5.1537,49.7179],[4.9694,49.8018],[4.7928,50.147],[4.4325,49.9416],[4.2331,49.9578],[4.1409,49.9788],[4.0278,50.3583],[3.7407,50.358],[3.6555,50.4617],[3.6151,50.4904],[3.3897,50.5453],[3.2453,50.713],[3.0985,50.779],[3.0187,50.7735],[3.0149,50.7736],[3.0112,50.7702],[3.0059,50.7661],[2.9833,50.7572],[2.9722,50.7502],[2.9642,50.75],[2.9566,50.7529],[2.9401,50.7453],[2.938,50.7402],[2.9442,50.732],[2.9372,50.73],[2.9306,50.7262],[2.93,50.7117],[2.9223,50.7028],[2.9116,50.7031],[2.9092,50.6945],[2.9004,50.6933],[2.8864,50.7057],[2.8701,50.7029],[2.8633,50.7083],[2.607,50.9127],[2.546,51.0894],[2.7491,51.1618],[3.1107,51.3123],[3.3658,51.3698],[3.3807,51.2743],[3.8563,51.2111],[3.9777,51.2251],[4.2348,51.3483],[4.242,51.354],[4.2437,51.3747],[4.2796,51.376],[4.6695,51.4264],[4.7599,51.5025],[5.1022,51.429],[5.2377,51.2616],[5.5663,51.2208],[5.7983,51.0599],[5.7661,51.0087],[5.6876,50.8119],[5.8191,50.7146],[6.021,50.7543]]]},properties:{name:"Belgium"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[.2293,14.9897],[.1942,14.5692],[.4331,14.031],[.7453,13.7626],[.9463,13.5898],[1.0371,13.0366],[1.5993,12.6512],[2.1167,12.6689],[2.1412,12.269],[2.4051,11.8998],[2.0416,11.5059],[1.4594,11.3946],[.9122,10.9965],[.7453,11.019],[-.142,11.139],[-.6868,10.9912],[-1.8933,10.9871],[-2.7279,10.9884],[-2.7863,10.8872],[-2.9125,10.6685],[-2.7863,10.0094],[-2.6869,9.4907],[-2.7863,9.5629],[-3.198,9.8618],[-3.3739,9.8912],[-3.6098,9.9307],[-4.3699,9.6182],[-4.812,9.777],[-5.117,10.2222],[-5.5189,10.4333],[-5.2335,11.6898],[-4.5928,12.2275],[-4.1467,13.1869],[-3.4208,13.2926],[-2.6484,14.1311],[-2.1123,14.2218],[-1.8933,14.4694],[-1.7859,14.5221],[-.721,15.0452],[.2293,14.9897]]]},properties:{name:"Burkina Faso"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[28.5789,43.7387],[28.498,43.4341],[28.0602,43.3164],[27.8826,42.8384],[27.7205,42.3929],[27.9411,42.1059],[28.0355,41.9831],[27.0597,42.0883],[26.9492,42.0002],[26.5615,41.9263],[26.3579,41.7111],[25.9486,41.3203],[25.9064,41.3076],[25.2247,41.2646],[25.1794,41.3102],[24.784,41.3602],[24.4917,41.5436],[24.0597,41.5221],[23.6242,41.3757],[23.4604,41.4025],[22.9276,41.3385],[22.9683,41.5198],[22.9254,41.7331],[22.8672,42.0222],[22.6425,42.1059],[22.5104,42.1552],[22.3602,42.3112],[22.4615,42.6485],[22.4428,42.8255],[22.5155,42.8685],[22.7484,42.8898],[23.0062,43.1929],[22.7475,43.3866],[22.667,43.4027],[22.4069,43.7517],[22.5361,44.0455],[22.6752,44.2157],[22.9664,44.0983],[22.9972,43.8079],[23.1554,43.8123],[23.6304,43.791],[24.112,43.6999],[24.3235,43.6977],[24.6548,43.7236],[25.2964,43.6554],[25.5445,43.6428],[25.6722,43.6881],[26.3582,44.0372],[26.3818,44.0386],[27.2713,44.1263],[27.6954,43.9873],[28.5789,43.7387]]]},properties:{name:"Bulgaria"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[50.3613,26.1572],[50.4618,26.2513],[50.6533,26.1748],[50.616,25.8703],[50.4541,25.9299],[50.3613,26.1572]]]},properties:{name:"Bahrain"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[29.4233,-4.4475],[29.0406,-2.7438],[29.1824,-2.638],[29.7073,-2.7799],[30.0189,-2.4386],[30.5433,-2.4132],[30.472,-2.8532],[30.806,-3.0324],[30.8015,-3.2214],[30.0119,-4.2813],[29.4233,-4.4475]]]},properties:{name:"Burundi"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[3.5631,11.7331],[3.7869,10.624],[3.5493,9.9526],[3.407,9.7552],[2.7788,8.8841],[2.7094,6.3757],[1.6287,6.2345],[1.7479,6.3304],[1.5719,6.8296],[1.6158,8.974],[1.3304,9.9647],[.9463,10.2593],[.7968,10.3989],[.8005,10.6685],[.9122,10.9965],[1.4594,11.3946],[2.0416,11.5059],[2.4051,11.8998],[2.4326,12.2297],[2.8313,12.3625],[3.407,11.8673],[3.5631,11.7331]]]},properties:{name:"Benin"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-62.979,17.9891],[-62.8672,17.912],[-62.7774,17.9639],[-62.6999,17.8746],[-62.866,17.8245],[-62.979,17.9891]]]},properties:{name:"Saint Barthélemy"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-65.2669,32.2352],[-65.1432,32.1305],[-64.5569,32.4167],[-64.5745,32.5468],[-64.3621,32.4789],[-64.8349,32.1658],[-65.1885,32.0922],[-65.2669,32.2352]]]},properties:{name:"Bermuda"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[115.1546,4.9128],[115.1809,4.6253],[114.8561,4.647],[114.6759,4.1459],[114.0715,4.5889],[114.9395,4.9924],[115.1546,4.9128]],[[115.0116,4.8917],[115.0194,4.8894],[115.0208,4.8858],[115.0139,4.8753],[115.0228,4.8731],[115.0228,4.8704],[115.0148,4.8563],[115.0184,4.8524],[115.0227,4.8354],[115.0173,4.8184],[115.0173,4.8131],[115.0317,4.7987],[115.0341,4.7979],[115.0359,4.8044],[115.0306,4.8176],[115.0314,4.8232],[115.0448,4.8388],[115.0531,4.86],[115.0293,4.8796],[115.0284,4.8951],[115.0116,4.8917]]]},properties:{name:"Brunei"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-58.1635,-20.1625],[-58.2561,-19.7822],[-59.1211,-19.2995],[-59.9788,-19.3035],[-61.658,-19.6476],[-62.2348,-20.5542],[-62.6104,-22.1424],[-62.6452,-22.2505],[-63.1001,-22.0135],[-63.774,-22.0199],[-64.3371,-22.6392],[-64.7318,-22.1889],[-66.1231,-21.8884],[-67.1775,-22.8047],[-67.8122,-22.812],[-67.9519,-22.1424],[-68.1699,-21.5829],[-68.186,-21.287],[-68.3472,-21.0169],[-68.7187,-20.3202],[-68.4825,-19.3753],[-68.8976,-18.9789],[-69.0894,-18.1169],[-69.4726,-17.499],[-69.5634,-17.2192],[-68.8869,-16.3343],[-69.2396,-16.0733],[-69.3798,-15.6492],[-69.1901,-15.2484],[-69.3052,-14.785],[-68.8868,-14.1931],[-68.9523,-12.9637],[-68.7259,-12.4796],[-69.5103,-10.9543],[-68.5679,-11.0587],[-66.6161,-9.9352],[-65.4168,-9.8233],[-65.2426,-11.4858],[-64.4633,-12.3126],[-63.4294,-12.6018],[-61.7725,-13.4912],[-61.0701,-13.5338],[-60.5969,-13.7761],[-60.1059,-16.1795],[-58.4129,-16.4288],[-58.3443,-17.1387],[-57.8067,-17.6314],[-57.6125,-18.2358],[-58.0283,-19.5601],[-57.9822,-19.9775],[-58.1635,-20.1625]]]},properties:{name:"Bolivia"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-67.1775,-22.8047],[-67.0288,-23.0701],[-67.3388,-23.9728],[-68.1852,-24.386],[-68.5056,-24.7511],[-68.4182,-25.0728],[-68.5762,-25.3721],[-68.4207,-26.0951],[-68.5625,-26.4666],[-68.3337,-26.93],[-68.7444,-27.191],[-69.0586,-27.6623],[-69.6223,-28.4279],[-69.9632,-29.3913],[-69.8858,-30.2257],[-70.5245,-31.3244],[-70.0282,-32.9751],[-69.7883,-33.4437],[-69.8573,-34.177],[-70.4916,-35.194],[-70.4275,-36.05],[-71.0288,-36.5279],[-71.1446,-36.85],[-71.0074,-38.3952],[-70.8969,-38.6298],[-71.3805,-38.9559],[-71.6473,-39.7234],[-71.8698,-41.0051],[-71.7579,-42.0332],[-72.1151,-42.3196],[-72.0854,-42.897],[-71.774,-43.2167],[-71.8492,-43.481],[-71.5891,-43.6776],[-71.6484,-43.8615],[-71.7271,-44.2778],[-71.2402,-44.6116],[-71.7838,-44.8667],[-71.4171,-45.2791],[-71.7062,-45.6759],[-71.8582,-47.009],[-72.4113,-47.8215],[-72.3592,-48.2851],[-72.5453,-48.6615],[-73.3904,-49.2987],[-73.4824,-49.619],[-73.5128,-50.1948],[-73.3262,-50.5264],[-73.1348,-50.6998],[-72.7285,-50.6302],[-72.3501,-50.7088],[-72.3194,-51.5264],[-71.8645,-51.952],[-69.9918,-52.0205],[-68.7018,-52.3124],[-69.2271,-52.2196],[-69.4436,-52.3513],[-69.1363,-52.6596],[-68.7018,-52.5998],[-68.6086,-52.6495],[-68.6082,-53.5411],[-68.6075,-54.8934],[-68.6158,-54.9019],[-68.399,-54.9469],[-67.754,-54.9019],[-67.6519,-54.9064],[-67.3051,-55.1588],[-68.3668,-55.5442],[-69.4001,-55.5008],[-70.7663,-54.871],[-71.2784,-54.946],[-73.2332,-54.0189],[-73.8055,-53.2904],[-73.346,-53.2318],[-73.3566,-52.9965],[-74.8772,-52.1327],[-74.954,-51.4749],[-74.7321,-51.1646],[-74.9112,-50.7134],[-74.5482,-50.1266],[-74.8052,-50.1022],[-75.2986,-50.3995],[-75.5487,-49.0989],[-75.3736,-48.8505],[-75.4213,-48.3697],[-74.5858,-48.1136],[-74.2009,-47.5096],[-74.4279,-46.8667],[-75.3599,-46.8124],[-75.4953,-46.6339],[-74.4965,-45.4889],[-74.2857,-44.2389],[-73.7298,-43.9727],[-73.6399,-44.5323],[-73.4196,-44.6435],[-72.6044,-42.2863],[-72.8183,-41.733],[-73.1808,-41.8254],[-73.2645,-42.3159],[-73.624,-42.6409],[-73.6999,-43.1792],[-73.9552,-43.3108],[-74.1693,-43.1982],[-74.1247,-42.4395],[-73.7858,-41.7002],[-73.8086,-40.574],[-73.3248,-39.3449],[-73.5163,-37.3961],[-72.2518,-35.0886],[-71.5136,-32.6493],[-71.6509,-30.8281],[-71.3907,-29.8674],[-71.4575,-28.943],[-70.6623,-26.2968],[-70.4799,-25.0536],[-70.5185,-23.2234],[-70.2163,-21.8582],[-70.1569,-20.0275],[-70.3762,-18.3536],[-69.9206,-18.183],[-69.7443,-17.665],[-69.4726,-17.499],[-69.0894,-18.1169],[-68.8976,-18.9789],[-68.4825,-19.3753],[-68.7187,-20.3202],[-68.3472,-21.0169],[-68.186,-21.287],[-68.1699,-21.5829],[-67.9519,-22.1424],[-67.8122,-22.812],[-67.1775,-22.8047]]],[[[-67.4254,-55.5888],[-67.3754,-55.983],[-67.5914,-55.8994],[-67.7233,-55.7422],[-67.7233,-55.3884],[-67.4254,-55.5888]]],[[[-68.5111,-56.3814],[-68.5101,-56.5589],[-69.0158,-56.5093],[-68.9102,-56.3725],[-68.5111,-56.3814]]],[[[-69.0718,-55.7921],[-69.1137,-55.9825],[-69.5704,-55.7994],[-69.4497,-55.6961],[-69.0718,-55.7921]]],[[[-72.9266,-42.8634],[-73.1143,-42.885],[-73.1932,-42.7366],[-73.0779,-42.4871],[-72.9238,-42.4746],[-72.9906,-42.7002],[-72.9266,-42.8634]]],[[[-74.736,-47.9138],[-75.2478,-48.0023],[-75.2288,-47.8864],[-74.8877,-47.7275],[-74.736,-47.9138]]],[[[-78.9289,-33.5366],[-78.7724,-33.8838],[-79.0279,-33.823],[-79.1771,-33.5871],[-78.9289,-33.5366]]],[[[-79.6161,-26.3664],[-79.8105,-26.4758],[-80.1288,-26.3703],[-79.9074,-26.1932],[-79.6161,-26.3664]]],[[[-105.1993,-26.4128],[-105.2813,-26.6869],[-105.5616,-26.448],[-105.4088,-26.2983],[-105.1993,-26.4128]]]]},properties:{name:"Chile"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[15.5075,7.5275],[14.5004,6.0684],[14.5544,5.3255],[15.1777,3.8331],[16.0122,2.9309],[16.192,2.2205],[16.0227,1.7813],[14.5151,2.1889],[13.299,2.1706],[11.8459,2.2795],[11.3346,2.1739],[10.1506,2.1693],[9.8215,2.3478],[9.9418,3.1147],[9.5717,3.8991],[9.0721,4.0643],[8.5392,4.7005],[8.5638,4.8182],[8.9762,5.9087],[10.0174,6.8872],[10.6677,6.9687],[11.3091,6.5958],[11.7815,7.0341],[12.2559,8.3308],[12.7578,8.8108],[13.6915,10.8135],[14.5709,11.6606],[14.6064,12.1066],[14.2342,12.4916],[14.0854,13.0781],[14.4197,13.0406],[14.8196,12.5718],[15.11,11.7138],[15.1229,10.7159],[15.5186,10.0058],[14.3073,9.9856],[14.0726,9.6656],[14.6321,8.9454],[15.2028,8.553],[15.5075,7.5275]]]},properties:{name:"Cameroon"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[130.6238,42.45],[130.0276,42.8517],[129.4314,42.3929],[128.2927,41.948],[128.0305,41.4865],[126.716,41.6181],[126.0071,40.978],[124.3583,40],[124.171,39.8251],[123.3093,39.7567],[121.8493,39.1658],[121.5895,39.6445],[122.1101,40.5153],[121.2806,40.8325],[119.5759,39.8584],[118.9333,39.2514],[118.0196,39.1777],[117.6997,38.9261],[117.719,38.4562],[118.7738,38.0871],[119.0286,37.4139],[119.2678,37.2265],[119.682,37.2329],[120.8565,37.7417],[122.3952,37.3245],[122.2813,36.9096],[121.3184,36.6931],[120.1931,36.0618],[119.3091,34.9226],[119.4466,34.6765],[120.2355,34.2007],[120.8933,32.697],[121.7869,31.7912],[121.7599,30.9648],[120.8367,30.2761],[121.7266,30.0425],[122.094,30.1116],[122.1758,29.9153],[121.6241,29.0011],[121.4865,28.3922],[120.857,27.8813],[120.5222,27.256],[119.8793,26.5848],[119.6043,25.7465],[118.91,24.8786],[116.4097,23.009],[114.2348,22.5558],[114.0376,22.5037],[113.626,22.7011],[113.5509,22.2145],[113.5331,22.1856],[113.2517,21.9123],[113.0244,22.068],[112.6755,21.7496],[110.6701,21.3622],[110.339,20.9293],[110.4282,20.4521],[110.1936,20.3096],[109.9482,20.392],[109.7699,20.728],[109.8039,21.4003],[108.7886,21.7088],[108.0236,21.5489],[106.7942,22.0576],[106.6447,22.8138],[105.3207,23.2985],[104.0941,22.6352],[103.37,22.7152],[102.9794,22.5457],[102.5296,22.6804],[102.1439,22.4007],[101.6416,22.2745],[101.7015,21.2366],[101.2992,21.2567],[101.1432,21.5641],[100.9638,21.6867],[100.2985,21.5455],[99.8935,22.0023],[99.3116,22.1851],[99.4242,22.9783],[98.9544,23.2538],[98.7357,24.0311],[97.6624,23.9718],[97.6323,24.7947],[98.6174,25.8964],[98.7586,26.6967],[98.6505,27.4662],[98.3001,27.67],[98.0277,28.1945],[97.6607,28.4374],[97.3471,28.2081],[96.4079,28.4508],[96.5583,28.8405],[96.2042,29.0341],[96.0434,29.4013],[95.4413,29.1482],[94.4925,29.2273],[93.3732,28.6225],[93.2491,28.5107],[92.697,28.0134],[92.5723,27.901],[91.6421,27.7585],[91.3732,27.9617],[90.0071,28.1425],[89.5442,28.0925],[89.1233,27.5369],[88.9233,27.2728],[88.7725,28.0233],[88.1351,27.8819],[87.2191,27.8565],[87.0575,27.9138],[86.6441,28.0606],[86.0082,27.9649],[85.6902,28.2767],[85.1957,28.3587],[85.1125,28.6226],[84.5559,28.7241],[84.0841,29.255],[83.6232,29.2272],[83.2769,29.5084],[81.7779,30.3959],[81.4846,30.4064],[81.1786,30.0816],[81.0369,30.2028],[80.2176,30.583],[80.2241,30.6046],[80.2058,30.6217],[80.2061,30.6279],[80.2201,30.6353],[80.2218,30.6396],[80.2064,30.6634],[80.1928,30.6743],[80.2044,30.6848],[80.2244,30.6883],[80.2383,30.7087],[80.2545,30.7176],[80.2554,30.7378],[80.2475,30.7563],[80.2385,30.7621],[80.2269,30.7622],[80.2208,30.7651],[80.2144,30.7763],[80.2025,30.7824],[80.1945,30.7983],[80.18,30.8069],[80.165,30.804],[80.1519,30.7916],[80.139,30.7844],[80.0915,30.7919],[80.0753,30.8041],[80.0453,30.813],[80.0258,30.8423],[80.0006,30.867],[79.992,30.8796],[79.9765,30.8862],[79.9683,30.8862],[79.9526,30.8744],[79.4224,31.064],[79.1149,31.3794],[78.8882,31.2723],[78.769,31.9377],[78.6791,32.0931],[78.4736,32.2395],[78.398,32.5232],[78.7005,32.6471],[78.9227,32.3637],[79.2537,32.5233],[79.5132,32.7273],[79.3416,33.1356],[79.1467,33.1883],[78.9227,33.3924],[78.9826,33.9808],[79.4735,34.1377],[80.0029,34.6687],[80.2549,35.3651],[79.3089,35.9267],[77.9244,35.4936],[77.318,35.4964],[76.1908,35.877],[75.8285,36.6678],[75.3164,36.9453],[74.5646,37.0309],[74.5722,37.2118],[74.8899,37.2341],[75.096,37.4764],[74.7852,38.5064],[73.7953,38.664],[73.6582,39.4651],[73.8806,39.5608],[74.004,40.0502],[75.5366,40.5992],[75.7474,40.329],[76.3508,40.3902],[76.8949,40.9933],[78.124,41.0801],[78.9227,41.6328],[79.2841,41.7331],[79.6793,41.8428],[80.0734,42.1059],[80.2456,42.2209],[80.2371,42.3929],[80.6646,43.3477],[80.2882,44.9512],[81.5111,45.2789],[82.375,45.2653],[82.4415,45.832],[83.0421,47.0395],[84.825,46.9384],[85.3679,47.0945],[85.7846,48.2473],[87.3126,49.0997],[87.825,49.1833],[88.164,48.5182],[88.8093,48.1353],[89.1233,48.0475],[90.0071,47.8003],[90.8926,46.7843],[90.9625,46.1517],[90.7868,45.5843],[90.9154,45.324],[92.697,45.042],[93.6971,44.8837],[95.0889,44.3062],[96.5054,42.8216],[99.3602,42.5821],[100.937,42.6407],[101.5726,42.45],[101.7629,42.3929],[103.412,41.8982],[104.7319,41.7331],[104.9939,41.6306],[105.3061,41.7331],[106.4412,42.1059],[107.315,42.3929],[109.382,42.4713],[110.2689,42.7433],[111.7456,43.6738],[111.5444,44.3827],[111.8923,44.9111],[113.6553,44.836],[114.6043,45.3288],[115.8268,45.5901],[116.9594,46.3931],[118.2867,46.7064],[119.7421,46.8031],[119.5494,47.2549],[118.4115,47.9874],[117.8818,47.99],[117.3447,47.7443],[115.7462,47.8633],[115.726,48.3132],[116.7209,49.8498],[117.8074,49.5794],[119.1095,50.0654],[119.9519,51.4479],[120.6644,52.0663],[120.6094,52.4875],[120.1502,52.6928],[120.208,52.7974],[120.9957,53.2739],[123.3487,53.5256],[125.4695,53.0542],[126.48,52.1446],[127.6584,49.7757],[129.5609,49.3475],[130.3126,48.931],[131.1145,47.7422],[131.9987,47.7036],[134.6067,48.3298],[134.6406,47.6454],[134.1834,47.2206],[133.8238,46.2524],[133.0211,45.139],[131.8756,45.2894],[131.2039,44.8571],[131.1583,43.1226],[130.46,42.6893],[130.5711,42.6363],[130.6238,42.45]]],[[[121.6525,39.0179],[121.5156,38.7935],[121.1792,38.8744],[121.3766,39.0768],[121.6525,39.0179]]],[[[116.8984,20.7791],[116.9517,20.5385],[116.6036,20.6042],[116.4792,20.751],[116.8984,20.7791]]],[[[110.6812,20.139],[110.9933,19.6819],[110.6583,19.3126],[110.4176,18.6723],[110.3237,18.6723],[109.5218,18.21],[108.8271,18.4595],[108.7016,18.6723],[108.6957,19.3258],[109.4167,19.8652],[109.6572,19.9902],[110.037,19.9477],[110.1603,20.0432],[110.5712,20.0432],[110.6812,20.139]]],[[[109.2882,21.0897],[109.1969,20.9009],[108.9371,20.9479],[108.9618,21.1177],[109.1447,21.2118],[109.2882,21.0897]]]]},properties:{name:"China"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[121.6339,24.001],[120.7859,21.9547],[120.0743,23.0877],[120.3462,24.001],[120.7267,24.6108],[121.2063,25.1118],[121.526,25.2491],[121.7688,25.1615],[121.928,24.9948],[121.6339,24.001]]]]},properties:{name:"Taiwan"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-66.8698,1.2256],[-67.053,1.2347],[-67.1246,1.7233],[-67.4033,2.0748],[-67.9063,1.7868],[-68.1691,1.952],[-68.4389,1.7354],[-69.7411,1.7222],[-69.8199,1.1472],[-69.2979,1.0299],[-69.1631,.7249],[-70.0018,.5188],[-70.0201,.252],[-70.0325,.0707],[-70.0455,-.1179],[-69.6569,-.5135],[-69.5206,-.8786],[-69.4207,-1.1466],[-69.517,-1.766],[-69.6069,-2.2733],[-69.9534,-4.2305],[-70.5831,-3.7195],[-70.1573,-2.707],[-70.8922,-2.3015],[-72.9094,-2.42],[-74.2103,-.8786],[-74.5531,-.4725],[-75.2882,-.0937],[-76.1433,.3503],[-77.1784,.3755],[-78.7509,1.3888],[-78.8299,1.46],[-78.9409,1.6692],[-78.649,1.8523],[-78.5197,2.4711],[-77.8031,2.6963],[-77.1966,3.6179],[-77.1966,3.8358],[-77.4736,4.1128],[-77.3908,5.1931],[-77.3768,6.5361],[-77.893,7.2218],[-77.2491,7.9096],[-77.3675,8.6728],[-76.8545,8.1711],[-76.7509,8.6538],[-75.6626,9.543],[-75.4211,10.6021],[-74.9272,10.994],[-73.2096,11.361],[-71.6858,12.3922],[-71.2438,12.2088],[-71.3241,11.8457],[-71.9211,11.6612],[-72.7638,10.6322],[-73.3126,9.2426],[-72.8017,9.0532],[-72.4152,8.3431],[-72.3943,7.4355],[-71.9631,7.0539],[-70.0816,6.9418],[-69.3548,6.1185],[-67.5876,6.2176],[-67.4644,5.9946],[-67.8207,5.1931],[-67.8354,4.4178],[-67.3557,3.4424],[-67.721,2.8964],[-67.2208,2.3424],[-66.8698,1.2256]]],[[[-81.6496,12.1222],[-81.7201,12.0434],[-82.0257,12.1255],[-82.0559,12.2338],[-81.8332,12.3566],[-81.6496,12.1222]]]]},properties:{name:"Colombia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-109.4225,10.3676],[-109.3337,10.4888],[-109.0251,10.3615],[-109.2315,10.1217],[-109.4225,10.3676]]]},properties:{name:"Clipperton Island"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-83.6929,10.9389],[-83.2913,10.2475],[-82.5646,9.572],[-82.9148,9.3744],[-82.7781,8.9311],[-82.9936,8.3047],[-82.9004,8.0398],[-83.2399,8.5852],[-83.5973,8.5528],[-83.7582,9.0982],[-84.72,9.8332],[-85.1356,9.6863],[-85.6179,9.9526],[-85.788,10.3238],[-85.6948,11.0803],[-84.6235,11.0333],[-83.9461,10.7432],[-83.6929,10.9389]]],[[[-86.8714,5.5178],[-87.139,5.3445],[-87.2699,5.4705],[-87.1732,5.6042],[-86.8876,5.6556],[-86.8714,5.5178]]]]},properties:{name:"Costa Rica"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-80.7927,23.2314],[-80.3015,22.9185],[-80.1475,23.0896],[-80.0102,22.9185],[-79.6882,22.8847],[-79.6882,22.7549],[-79.237,22.4071],[-78.1189,22.1349],[-77.9062,22.2326],[-77.6506,21.7738],[-77.3719,21.7581],[-76.9956,21.52],[-75.7122,21.0869],[-75.5304,20.8008],[-74.7817,20.6089],[-74.2065,20.1628],[-75.141,19.9082],[-77.6514,19.8409],[-77.4936,20.1126],[-77.1257,20.4183],[-77.2683,20.6525],[-77.4936,20.6717],[-78.2602,20.8656],[-78.6391,21.52],[-78.8347,21.6068],[-79.2225,21.555],[-79.6882,21.682],[-80.5515,22.0569],[-81.8095,22.1806],[-82.0464,22.3689],[-81.6881,22.4685],[-81.8095,22.6605],[-82.8384,22.5965],[-83.0706,22.4898],[-83.3656,22.2078],[-83.8897,22.1742],[-84.0947,21.9151],[-84.4389,21.8999],[-84.3845,22.4228],[-83.8897,22.7202],[-83.3556,22.9185],[-82.3231,23.1525],[-81.8095,23.149],[-81.1668,23.0847],[-80.7927,23.2314]]],[[[-78.1494,22.4968],[-78.069,22.3098],[-78.3505,22.3118],[-78.5818,22.5031],[-78.4575,22.6604],[-78.1494,22.4968]]],[[[-82.6183,21.5187],[-82.8466,21.4411],[-83.1218,21.5187],[-83.0307,21.8254],[-82.8353,21.9283],[-82.496,21.733],[-82.6183,21.5187]]]]},properties:{name:"Cuba"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-22.6286,16.0611],[-22.8344,15.9359],[-23.0065,16.0611],[-22.8765,16.2542],[-22.7028,16.2196],[-22.6286,16.0611]]],[[[-23.0363,15.1297],[-23.157,15.0276],[-23.319,15.1183],[-23.2308,15.4072],[-23.0734,15.3733],[-23.0363,15.1297]]],[[[-23.4074,14.9603],[-23.5034,14.8595],[-23.8304,15.0653],[-23.6342,15.2625],[-23.4074,14.9603]]],[[[-24.2242,14.8452],[-24.4445,14.7451],[-24.5924,14.9295],[-24.3733,15.1233],[-24.2242,14.8452]]],[[[-24.9271,17.1146],[-25.2871,16.8756],[-25.3939,17.0384],[-25.0606,17.2238],[-24.9271,17.1146]]]]},properties:{name:"Cape Verde"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[1.7258,42.5044],[1.4956,42.4736],[1.4426,42.6037],[1.7861,42.5737],[1.7258,42.5044]]]},properties:{name:"Andorra"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[56.2658,25.6247],[56.3647,25.5033],[56.3742,24.9804],[56.1415,24.8043],[55.851,24.8578],[55.8942,24.1886],[55.5272,23.8382],[55.2083,22.7083],[52.6453,22.9764],[51.5906,24.243],[52.1447,24.0061],[54.08,24.2199],[56.0846,26.0505],[56.0871,26.0513],[56.2658,25.6247]]]},properties:{name:"United Arab Emirates"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[74.8899,37.2341],[74.5722,37.2118],[74.5646,37.0309],[73.6393,36.9034],[73.2944,36.8773],[72.3359,36.7654],[71.2997,36.1094],[71.6228,35.1948],[71.2242,34.7534],[70.9817,34.0291],[69.9165,33.9708],[70.2571,33.3559],[69.5333,33.0026],[69.2828,32.1149],[68.9944,31.6561],[68.2247,31.7982],[67.8555,31.6214],[67.5736,31.2768],[66.9026,31.2606],[66.4208,30.9063],[66.2579,29.8854],[65.2412,29.5782],[62.4953,29.403],[60.873,29.8585],[61.6934,30.7331],[61.8061,31.0542],[61.6443,31.3638],[60.8832,31.5377],[60.8565,32.1149],[60.6222,33.069],[60.799,33.4155],[60.5205,34.0684],[60.8534,34.3412],[61.2741,35.6051],[62.2905,35.2271],[62.7395,35.2921],[63.2646,35.8341],[64.4207,36.2878],[64.8799,37.0996],[65.7703,37.4986],[66.5537,37.3548],[67.7787,37.1796],[67.8555,37.0629],[68.0528,36.9765],[68.9042,37.2831],[69.2866,37.1431],[69.4312,37.4764],[70.1791,37.5831],[70.2538,37.9541],[70.8413,38.4213],[71.3126,38.2515],[71.3153,37.9763],[71.5601,37.8039],[71.5235,37.4764],[71.4851,36.9595],[71.8083,36.7149],[73.2944,37.4584],[73.8567,37.2769],[74.5767,37.4012],[74.8899,37.2341]]]},properties:{name:"Afghanistan"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-61.999,17.1139],[-61.6956,17.2266],[-61.5387,17.0178],[-61.9731,16.969],[-61.999,17.1139]]]},properties:{name:"Antigua and Barbuda"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-63.2563,18.1237],[-63.128,18.1817],[-63.0849,18.248],[-62.9099,18.3163],[-62.9461,18.2326],[-63.1074,18.1429],[-63.2563,18.1237]]]},properties:{name:"Anguilla"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[20.0763,42.5558],[20.2649,42.3929],[20.4701,42.2156],[20.5181,42.1059],[20.5943,41.8773],[20.5629,41.8461],[20.5607,41.7331],[20.5578,41.5819],[20.5017,41.3172],[20.5977,41.092],[20.8378,40.9277],[20.9802,40.8557],[21.0561,40.6167],[20.7785,40.3488],[20.6129,40.0797],[20.3833,39.9827],[20.3913,39.7885],[20.3023,39.8127],[20.01,39.6918],[19.9824,39.7035],[19.9957,39.8519],[19.885,40.0039],[19.5715,40.1747],[19.3188,40.645],[19.4425,41.0005],[19.5178,41.2687],[19.5573,41.5777],[19.5353,41.7331],[19.5201,41.8403],[19.3725,41.8441],[19.3841,42.1059],[19.3924,42.2956],[19.488,42.3929],[19.6623,42.5469],[19.831,42.4664],[20.0763,42.5558]]]},properties:{name:"Albania"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[46.5458,38.8781],[46.1407,38.8449],[45.9781,39.2712],[45.6126,39.5652],[44.7683,39.7141],[44.3752,40.001],[43.6539,40.1304],[43.7018,40.7773],[43.4696,41.0573],[43.4738,41.1233],[45.0131,41.2966],[45.4846,40.9218],[45.4264,40.634],[45.6126,40.4017],[45.9168,40.2364],[45.9149,40.1148],[45.8952,39.8651],[46.4532,39.4681],[46.5458,38.8781]]]},properties:{name:"Armenia"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[23.983,-10.9113],[24.0347,-12.3467],[23.8836,-12.9513],[22.0281,-13.0808],[22.1075,-16.3334],[23.4299,-17.6345],[21.7196,-17.9666],[19.0299,-17.8279],[18.2636,-17.3914],[14.0264,-17.3778],[13.2413,-16.9985],[11.7509,-17.2525],[11.7666,-15.9191],[12.2657,-14.7705],[12.5454,-13.4814],[13.6519,-12.2049],[13.8308,-10.9113],[13.0383,-9.1111],[13.368,-8.6957],[13.3455,-8.3207],[12.4007,-6.2987],[12.8501,-5.9411],[16.4629,-5.9179],[17.0219,-7.2667],[17.7714,-8.0899],[19.2527,-7.9545],[19.8263,-6.9975],[20.4216,-6.9498],[20.7264,-7.2513],[21.6619,-7.309],[21.9191,-8.4515],[21.8433,-9.4449],[22.2739,-10.3412],[22.2761,-11.0428],[23.0649,-11.0941],[23.983,-10.9113]]],[[[12.1955,-5.7639],[11.9892,-4.9993],[12.7888,-4.4786],[13.1018,-4.6851],[12.5746,-5.0613],[12.4994,-5.6868],[12.1955,-5.7639]]]]},properties:{name:"Angola"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-62.6452,-22.2505],[-61.9084,-23.0815],[-60.9507,-23.795],[-59.9462,-24.0628],[-57.6904,-25.2889],[-57.6289,-25.5065],[-58.5741,-27.253],[-56.4174,-27.5161],[-56.1084,-27.3439],[-55.7448,-27.4423],[-55.4625,-27.0428],[-54.7923,-26.5932],[-54.5941,-25.5923],[-53.8961,-25.7766],[-53.6653,-26.3689],[-53.8273,-27.051],[-55.6513,-28.1901],[-57.619,-30.1759],[-58.1316,-31.8015],[-58.1303,-33.0265],[-58.3743,-33.136],[-58.4914,-33.4943],[-58.4834,-33.702],[-58.4566,-34.4633],[-57.2109,-35.3391],[-57.3462,-35.9249],[-56.7541,-36.4367],[-56.7878,-37.0294],[-57.6193,-38.1231],[-57.9886,-38.3253],[-60.6751,-38.9478],[-61.8092,-38.9887],[-61.9758,-39.1231],[-62.1663,-39.0175],[-62.1826,-39.0117],[-62.1998,-39.0113],[-62.2164,-39.0164],[-62.2304,-39.0265],[-62.2405,-39.0406],[-62.2456,-39.0571],[-62.2454,-39.0745],[-62.1117,-39.7951],[-62.3525,-40.3306],[-62.1751,-40.5378],[-62.7461,-41.0215],[-63.6197,-41.1504],[-65.0042,-40.8392],[-65.1398,-41.0948],[-65.0425,-41.8371],[-64.6583,-42.3566],[-64.8868,-42.7454],[-64.5576,-43.016],[-65.2511,-43.6178],[-65.3166,-43.8615],[-65.2571,-44.331],[-65.647,-44.7515],[-65.5962,-45.0064],[-66.9428,-45.263],[-67.5674,-46.0023],[-67.4974,-46.4579],[-67.392,-46.5923],[-67.1426,-46.7074],[-66.9428,-46.8651],[-65.9098,-47.116],[-65.7435,-47.3694],[-65.9201,-48.0645],[-66.9428,-48.6064],[-67.5227,-49.016],[-67.6201,-49.3262],[-67.8641,-49.94],[-68.8488,-50.3421],[-69.0991,-50.67],[-68.9347,-51.6166],[-68.5314,-52.1567],[-68.399,-52.2936],[-68.4322,-52.3975],[-68.7018,-52.3124],[-69.9918,-52.0205],[-71.8645,-51.952],[-72.3194,-51.5264],[-72.3501,-50.7088],[-72.7285,-50.6302],[-73.1348,-50.6998],[-73.3262,-50.5264],[-73.5128,-50.1948],[-73.4824,-49.619],[-73.3904,-49.2987],[-72.5453,-48.6615],[-72.3592,-48.2851],[-72.4113,-47.8215],[-71.8582,-47.009],[-71.7062,-45.6759],[-71.4171,-45.2791],[-71.7838,-44.8667],[-71.2402,-44.6116],[-71.7271,-44.2778],[-71.6484,-43.8615],[-71.5891,-43.6776],[-71.8492,-43.481],[-71.774,-43.2167],[-72.0854,-42.897],[-72.1151,-42.3196],[-71.7579,-42.0332],[-71.8698,-41.0051],[-71.6473,-39.7234],[-71.3805,-38.9559],[-70.8969,-38.6298],[-71.0074,-38.3952],[-71.1446,-36.85],[-71.0288,-36.5279],[-70.4275,-36.05],[-70.4916,-35.194],[-69.8573,-34.177],[-69.7883,-33.4437],[-70.0282,-32.9751],[-70.5245,-31.3244],[-69.8858,-30.2257],[-69.9632,-29.3913],[-69.6223,-28.4279],[-69.0586,-27.6623],[-68.7444,-27.191],[-68.3337,-26.93],[-68.5625,-26.4666],[-68.4207,-26.0951],[-68.5762,-25.3721],[-68.4182,-25.0728],[-68.5056,-24.7511],[-68.1852,-24.386],[-67.3388,-23.9728],[-67.0288,-23.0701],[-67.1775,-22.8047],[-66.1231,-21.8884],[-64.7318,-22.1889],[-64.3371,-22.6392],[-63.774,-22.0199],[-63.1001,-22.0135],[-62.6452,-22.2505]]],[[[-63.622,-42.7699],[-64.1122,-42.8904],[-64.2681,-42.7552],[-64.2271,-42.627],[-64.4189,-42.4845],[-64.0614,-42.3769],[-64.082,-42.1686],[-63.7576,-42.0628],[-63.6078,-42.2787],[-63.622,-42.7699]]],[[[-63.999,-54.7849],[-64.2264,-54.9118],[-64.4464,-54.7703],[-64.1295,-54.5903],[-63.999,-54.7849]]],[[[-68.6075,-54.8934],[-68.6082,-53.5411],[-68.6086,-52.6495],[-68.3954,-52.9204],[-68.4324,-53.2536],[-67.4603,-53.9586],[-66.2523,-54.5256],[-65.3835,-54.6442],[-65.3179,-54.7799],[-65.3917,-54.898],[-66.4723,-55.0265],[-68.0502,-54.846],[-68.6075,-54.8934]]]]},properties:{name:"Argentina"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-171.0195,-14.3773],[-170.6403,-14.1571],[-170.5857,-14.2729],[-170.7849,-14.5267],[-171.0195,-14.3773]]]},properties:{name:"American Samoa"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[16.9403,48.6172],[16.9498,48.5358],[16.8511,48.4386],[16.9762,48.1722],[17.0667,48.1187],[17.1608,48.0067],[16.9914,47.72],[16.4215,47.6653],[16.6462,47.4466],[16.4338,47.3529],[16.4594,47.0441],[16.1138,46.8691],[15.9962,46.8354],[15.7864,46.7075],[15.65,46.7058],[15.402,46.6535],[15.0651,46.6521],[14.6746,46.4507],[14.5652,46.3725],[14.4345,46.4429],[13.7142,46.5227],[13.5042,46.5663],[12.7314,46.6343],[12.6906,46.657],[12.4779,46.6798],[12.2117,46.8968],[12.2407,47.0692],[12.136,47.0807],[11.8572,47.0038],[11.6272,47.0133],[11.1643,46.9657],[10.9817,46.8074],[10.4697,46.8549],[10.145,46.851],[9.6071,47.0608],[9.6206,47.1516],[9.5307,47.2706],[9.5587,47.5419],[9.9678,47.5462],[9.9995,47.483],[10.1784,47.2701],[10.419,47.3881],[10.4544,47.5558],[10.8862,47.5368],[10.9912,47.3961],[11.0165,47.3964],[11.4214,47.4449],[11.4102,47.4953],[11.6329,47.5924],[11.8572,47.602],[12.0607,47.6187],[12.338,47.6971],[12.575,47.6323],[12.6958,47.6822],[13.0461,47.5205],[12.9593,47.8754],[12.8758,47.9626],[12.8602,47.9966],[12.7516,48.1128],[12.9447,48.2067],[13.177,48.2944],[13.4564,48.5588],[13.4633,48.5544],[13.4751,48.556],[13.4765,48.5633],[13.4855,48.5624],[13.4916,48.5648],[13.4938,48.5692],[13.5042,48.573],[13.5063,48.5765],[13.5031,48.5837],[13.5066,48.5896],[13.5097,48.59],[13.7271,48.513],[13.7961,48.7136],[13.8395,48.7716],[14.691,48.5843],[15.0403,48.9668],[15.5424,48.9077],[15.7536,48.8522],[16.9403,48.6172]]]},properties:{name:"Austria"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-68.5308,12.3126],[-68.4701,12.411],[-68.1175,12.2437],[-68.111,12.0789],[-68.2476,12.0769],[-68.5308,12.3126]]]},properties:{name:"Bonaire, Sint Eustatius and Saba"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-29.149,-20.4968],[-29.4064,-20.6874],[-29.5118,-20.4398],[-29.4459,-20.2808],[-29.149,-20.4968]]],[[[-29.1999,.9741],[-29.2323,.683],[-29.5286,.9462],[-29.464,1.1052],[-29.1999,.9741]]],[[[-56.4774,1.9459],[-56.0897,1.9331],[-55.8909,2.4178],[-55.0333,2.5492],[-54.5879,2.3221],[-54.1804,2.1379],[-53.7392,2.2956],[-52.966,2.2123],[-52.5292,2.588],[-51.6555,4.056],[-51.4718,4.3036],[-51.1503,3.9792],[-50.7314,2.3536],[-49.9735,1.5367],[-50.1581,.5286],[-49.671,.252],[-49.5423,.0707],[-48.4877,-.3838],[-48.6017,-.8786],[-48.7243,-1.4109],[-48.4925,-1.3663],[-48.0778,-.8786],[-47.896,-.6648],[-47.2356,-.6835],[-46.6886,-.8786],[-45.6863,-1.2363],[-45.4124,-1.4762],[-44.7663,-1.5308],[-44.6547,-1.766],[-44.5033,-2.2733],[-44.3967,-2.6305],[-43.4509,-2.4341],[-41.5256,-2.8667],[-40.024,-2.8996],[-38.5537,-3.7185],[-37.1805,-4.8144],[-35.5716,-5.2793],[-35.2181,-5.7609],[-34.9246,-6.7583],[-34.9096,-8.0417],[-35.4473,-9.2894],[-37.0799,-11.0563],[-38.088,-12.5827],[-38.8672,-13.2038],[-39.0183,-14.6246],[-38.9357,-15.9485],[-39.1746,-17.4734],[-39.6543,-18.5131],[-39.8568,-19.5645],[-40.7067,-20.8939],[-41.1183,-21.9585],[-42.2084,-22.8766],[-44.4428,-23.1122],[-45.3959,-23.8004],[-46.33,-24.0058],[-48.1332,-25.2447],[-48.5494,-26.0651],[-48.4988,-27.6248],[-48.8159,-28.4568],[-49.817,-29.5314],[-50.7132,-30.9112],[-50.8901,-30.9417],[-50.8869,-30.5116],[-51.3091,-30.7064],[-51.9917,-31.5832],[-52.6172,-32.9915],[-53.378,-33.7504],[-53.5095,-33.3089],[-53.3047,-32.9751],[-53.1514,-32.7404],[-53.83,-32.0405],[-55.5446,-30.9301],[-55.7448,-30.9943],[-55.9687,-31.002],[-56.1653,-30.6435],[-56.8071,-30.1365],[-57.3474,-30.2723],[-57.619,-30.1759],[-55.6513,-28.1901],[-53.8273,-27.051],[-53.6653,-26.3689],[-53.8961,-25.7766],[-54.5941,-25.5923],[-54.3851,-24.0606],[-54.6633,-23.8829],[-55.3922,-23.8396],[-55.8971,-22.3237],[-56.4163,-22.1247],[-57.0908,-22.2421],[-57.8684,-22.0614],[-57.863,-20.9629],[-58.1635,-20.1625],[-57.9822,-19.9775],[-58.0283,-19.5601],[-57.6125,-18.2358],[-57.8067,-17.6314],[-58.3443,-17.1387],[-58.4129,-16.4288],[-60.1059,-16.1795],[-60.5969,-13.7761],[-61.0701,-13.5338],[-61.7725,-13.4912],[-63.4294,-12.6018],[-64.4633,-12.3126],[-65.2426,-11.4858],[-65.4168,-9.8233],[-66.6161,-9.9352],[-68.5679,-11.0587],[-69.5103,-10.9543],[-70.5742,-10.9321],[-70.631,-9.6918],[-71.3377,-9.9639],[-72.0116,-9.9595],[-72.3919,-9.5555],[-72.9782,-9.3412],[-73.0739,-8.8492],[-73.8818,-7.5555],[-73.712,-6.95],[-73.1725,-6.3431],[-72.6878,-5.0578],[-71.899,-4.564],[-70.8737,-4.2367],[-69.9534,-4.2305],[-69.6069,-2.2733],[-69.517,-1.766],[-69.4207,-1.1466],[-69.5206,-.8786],[-69.6569,-.5135],[-70.0455,-.1179],[-70.0325,.0707],[-70.0201,.252],[-70.0018,.5188],[-69.1631,.7249],[-69.2979,1.0299],[-69.8199,1.1472],[-69.7411,1.7222],[-68.4389,1.7354],[-68.1691,1.952],[-67.9063,1.7868],[-67.4033,2.0748],[-67.1246,1.7233],[-67.053,1.2347],[-66.8698,1.2256],[-66.2879,.8221],[-65.6926,.9257],[-65.4471,.8038],[-64.2898,1.4973],[-63.4774,2.2297],[-63.5034,2.3999],[-64.0031,2.6686],[-64.5692,4.1305],[-62.9241,3.7234],[-62.4283,4.0929],[-61.0145,4.5424],[-60.7041,4.8701],[-60.7318,5.1961],[-60.1578,5.1926],[-60.0054,4.5779],[-59.642,4.1358],[-59.9399,2.6147],[-59.511,1.7084],[-58.8112,1.2685],[-57.2818,1.9505],[-56.4774,1.9459]]],[[[-51.2522,-31.6331],[-51.4852,-31.7964],[-51.6325,-31.7099],[-51.4244,-31.4022],[-51.2522,-31.6331]]]]},properties:{name:"Brazil"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-73.1493,20.9629],[-73.6893,20.9268],[-73.7181,21.0135],[-73.3883,21.2411],[-73.0939,21.1267],[-73.1493,20.9629]]],[[[-74.0223,22.1938],[-74.0715,22.0152],[-74.5221,22.1416],[-74.3805,22.2736],[-74.0223,22.1938]]],[[[-74.9795,23.2998],[-75.0108,23.0301],[-75.3351,23.169],[-75.2003,23.3688],[-74.9795,23.2998]]],[[[-76.5124,25.3883],[-76.8707,25.3176],[-76.8752,25.5264],[-76.5767,25.6062],[-76.5124,25.3883]]],[[[-77.0504,26.3037],[-77.1951,26.2581],[-77.2769,26.4217],[-77.4308,26.6343],[-77.4133,26.8136],[-77.022,26.582],[-77.0395,26.4217],[-77.0504,26.3037]]],[[[-77.0938,25.9844],[-77.2876,25.8603],[-77.428,26.0231],[-77.3605,26.1749],[-77.1485,26.1845],[-77.0938,25.9844]]],[[[-77.5251,23.9231],[-77.6502,23.7113],[-77.8477,23.8001],[-77.864,24.0619],[-77.6502,24.2187],[-77.5251,23.9231]]],[[[-77.6868,24.3623],[-77.891,24.1782],[-78.4268,24.6332],[-78.1335,25.1679],[-77.9749,25.0498],[-77.6868,24.3623]]],[[[-77.6902,25.8231],[-77.8002,25.7253],[-78.0892,25.7283],[-78.1598,25.7985],[-78.1081,25.8748],[-77.7586,25.945],[-77.6902,25.8231]]],[[[-78.4492,26.6183],[-78.696,26.4226],[-78.9533,26.5993],[-78.5452,26.7947],[-78.4492,26.6183]]]]},properties:{name:"Bahamas"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[91.6421,27.7585],[91.6596,27.5403],[92.0573,27.3683],[92.1079,26.8583],[90.0071,26.7529],[89.7443,26.7397],[89.1233,26.8977],[89.0273,26.9609],[88.9233,27.2728],[89.1233,27.5369],[89.5442,28.0925],[90.0071,28.1425],[91.3732,27.9617],[91.6421,27.7585]]]},properties:{name:"Bhutan"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[44.6336,-12.299],[44.5193,-12.4303],[44.2599,-12.2072],[44.4497,-12.0245],[44.6336,-12.299]]],[[[43.8492,-12.2743],[43.7563,-12.504],[43.5732,-12.476],[43.5401,-12.2329],[43.6108,-12.1556],[43.8492,-12.2743]]],[[[43.3976,-11.3608],[43.4694,-11.8271],[43.2213,-11.7449],[43.2747,-11.3832],[43.3976,-11.3608]]]]},properties:{name:"Comoros"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-62.9797,17.4048],[-62.846,17.5142],[-62.6684,17.3285],[-62.6529,17.2963],[-62.6847,17.2366],[-62.8002,17.2452],[-62.9797,17.4048]]]},properties:{name:"Saint Kitts and Nevis"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[130.6238,42.45],[130.6749,42.2836],[129.8444,41.7331],[129.5878,40.8241],[127.6243,39.7112],[127.5348,39.3078],[128.3613,38.6149],[128.0712,38.3378],[127.159,38.287],[126.6658,37.833],[126.6505,37.8017],[126.6544,37.7888],[126.6201,37.788],[126.6084,37.7824],[126.5949,37.7701],[126.578,37.7691],[126.5577,37.7866],[126.5283,37.803],[126.5163,37.8069],[126.5062,37.8141],[126.4733,37.8168],[126.4582,37.8393],[126.423,37.8529],[126.4055,37.8779],[126.4164,37.9],[126.4147,37.9058],[126.4109,37.9084],[126.3926,37.8852],[126.3372,37.8757],[126.2816,37.8473],[126.2724,37.8469],[126.2639,37.8432],[126.2106,37.8635],[126.2114,37.8545],[126.2085,37.8498],[126.1937,37.8455],[126.1567,37.8347],[126.1518,37.8219],[126.1444,37.8082],[126.1333,37.7972],[126.1196,37.7899],[126.1043,37.7868],[126.096,37.7869],[125.7654,37.9466],[125.3655,37.8399],[124.9484,38.1557],[124.9571,38.5202],[125.2639,38.7013],[125.3446,39.432],[125.0612,39.5911],[124.6655,39.4497],[124.3583,40],[126.0071,40.978],[126.716,41.6181],[128.0305,41.4865],[128.2927,41.948],[129.4314,42.3929],[130.0276,42.8517],[130.6238,42.45]]]},properties:{name:"North Korea"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-68.7404,12.0681],[-68.8129,12.0275],[-68.9567,12.072],[-69.0009,12.1451],[-68.9327,12.1936],[-68.7926,12.1652],[-68.7404,12.0681]]],[[[-68.9581,12.2085],[-69.0259,12.1305],[-69.2531,12.282],[-69.3065,12.5395],[-69.0997,12.4728],[-68.9581,12.2085]]]]},properties:{name:"Curaçao"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[105.425,-10.5147],[105.7299,-10.3025],[105.8258,-10.3326],[105.6829,-10.6863],[105.425,-10.5147]]]},properties:{name:"Christmas Island"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[33.6251,34.8511],[32.9417,34.6418],[32.559,34.6875],[32.3694,34.8511],[32.4435,35.0778],[33.0172,35.3338],[34.0072,35.4317],[34.1708,35.5577],[34.543,35.6809],[34.5581,35.641],[34.0609,35.3269],[33.9628,35.3196],[33.9299,35.06],[33.6251,34.8511]]]},properties:{name:"Cyprus"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[14.8234,50.8706],[15.1816,50.9574],[15.5353,50.7794],[16.1073,50.6621],[16.3325,50.5925],[16.5803,50.1428],[16.8633,50.1981],[16.9079,50.4495],[17.4296,50.2545],[18.0351,50.0658],[18.5757,49.9104],[18.8516,49.5172],[18.4036,49.3967],[18.3224,49.3151],[17.6469,48.8543],[17.3967,48.8133],[16.9403,48.6172],[15.7536,48.8522],[15.5424,48.9077],[15.0403,48.9668],[14.691,48.5843],[13.8395,48.7716],[13.5516,48.9678],[13.4167,48.98],[13.1709,49.1736],[12.6338,49.4762],[12.5938,49.5422],[12.4015,49.7584],[12.551,49.9051],[12.2608,50.0582],[12.1607,50.2198],[12.1009,50.318],[12.5838,50.4071],[12.9481,50.4043],[13.5018,50.6336],[13.6522,50.7304],[14.1512,50.8516],[14.3179,51.0547],[14.4912,51.0435],[14.6188,50.8578],[14.8234,50.8706]]]},properties:{name:"Czechia"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[9.4222,54.832],[9.4685,54.8172],[9.4919,54.8226],[9.7781,54.7277],[9.7944,54.5625],[10.1685,54.4328],[10.1742,54.3457],[10.7138,54.3051],[11.0064,54.3232],[10.8413,53.9919],[10.9037,53.9568],[11.5618,54.0281],[11.9985,54.175],[12.2011,54.2447],[12.2855,54.275],[13.2531,54.5684],[13.548,54.4363],[13.3194,54.1935],[14.2263,53.9287],[14.2131,53.8665],[14.0982,53.7654],[14.2675,53.6978],[14.4122,53.3296],[14.1437,52.9614],[14.1567,52.8956],[14.4364,52.6799],[14.5651,52.6245],[14.5344,52.395],[14.6009,52.2721],[14.7552,52.07],[14.7167,52.0012],[14.7299,51.5818],[14.9742,51.3639],[14.8234,50.8706],[14.6188,50.8578],[14.4912,51.0435],[14.3179,51.0547],[14.1512,50.8516],[13.6522,50.7304],[13.5018,50.6336],[12.9481,50.4043],[12.5838,50.4071],[12.1009,50.318],[12.1607,50.2198],[12.2608,50.0582],[12.551,49.9051],[12.4015,49.7584],[12.5938,49.5422],[12.6338,49.4762],[13.1709,49.1736],[13.4167,48.98],[13.5516,48.9678],[13.8395,48.7716],[13.7961,48.7136],[13.7271,48.513],[13.5097,48.59],[13.5066,48.5896],[13.5031,48.5837],[13.5063,48.5765],[13.5042,48.573],[13.4938,48.5692],[13.4916,48.5648],[13.4855,48.5624],[13.4765,48.5633],[13.4751,48.556],[13.4633,48.5544],[13.4564,48.5588],[13.177,48.2944],[12.9447,48.2067],[12.7516,48.1128],[12.8602,47.9966],[12.8758,47.9626],[12.9593,47.8754],[13.0461,47.5205],[12.6958,47.6822],[12.575,47.6323],[12.338,47.6971],[12.0607,47.6187],[11.8572,47.602],[11.6329,47.5924],[11.4102,47.4953],[11.4214,47.4449],[11.0165,47.3964],[10.9912,47.3961],[10.8862,47.5368],[10.4544,47.5558],[10.419,47.3881],[10.1784,47.2701],[9.9995,47.483],[9.9678,47.5462],[9.5587,47.5419],[9.4956,47.5515],[9.1822,47.6559],[8.6705,47.6849],[8.6634,47.6859],[8.6138,47.8011],[8.5101,47.7762],[8.5149,47.6272],[8.4264,47.5675],[7.8941,47.5864],[7.7138,47.5394],[7.6341,47.5611],[7.589,47.5899],[7.546,47.7436],[7.5814,47.9145],[7.5773,48.1157],[7.5779,48.1214],[7.6807,48.2573],[7.9596,48.7186],[8.2326,48.9666],[8.0684,48.9993],[7.9107,49.0452],[7.6357,49.054],[7.3688,49.1615],[7.2643,49.1338],[7.1011,49.156],[6.7235,49.2188],[6.557,49.4192],[6.3671,49.4695],[6.3801,49.5511],[6.475,49.8213],[6.1377,50.13],[6.405,50.3233],[6.3156,50.497],[6.021,50.7543],[6.0869,50.9131],[5.8771,51.0321],[6.1748,51.1845],[6.0727,51.2426],[6.2244,51.365],[5.9532,51.7478],[6.1678,51.9008],[6.4078,51.8281],[6.6817,51.9324],[6.7605,52.1186],[7.0657,52.2414],[7.0041,52.3996],[6.6979,52.4863],[6.7097,52.6278],[7.0062,52.6388],[7.0927,52.8382],[7.2028,53.1133],[7.2089,53.2431],[7.2643,53.3255],[7.0927,53.3725],[7.4917,53.68],[7.8099,53.7077],[8.0913,53.6381],[8.1422,53.555],[8.0613,53.506],[8.1956,53.4092],[8.5549,53.5251],[8.5204,53.6062],[8.6133,53.7654],[8.6872,53.8919],[8.8326,54.0239],[8.8448,54.2663],[8.6359,54.9117],[8.889,54.8915],[9.1131,54.8736],[9.2736,54.8117],[9.4222,54.832]]],[[[8.7077,53.9405],[8.4781,53.8105],[8.3246,53.8376],[8.4763,54.0527],[8.7077,53.9405]]],[[[8.0547,54.2508],[7.9827,53.9925],[7.6358,54.2677],[7.8982,54.3426],[8.0547,54.2508]]]]},properties:{name:"Germany"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[43.2603,11.4606],[42.9681,10.9974],[41.8348,11.0448],[41.816,11.6292],[42.4043,12.4686],[42.6867,12.4073],[43.1261,12.7101],[43.3732,12.1093],[42.7821,11.6427],[43.2603,11.4606]]]},properties:{name:"Djibouti"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[15.1629,55.0937],[15.094,54.9962],[14.948,55.0011],[14.6968,55.1306],[14.774,55.2754],[14.948,55.2179],[15.1629,55.0937]]],[[[12.525,55.9115],[12.5828,55.808],[12.5841,55.722],[12.7503,55.6491],[12.6192,55.5715],[12.5018,55.6274],[12.3635,55.5938],[12.2196,55.4251],[12.2912,55.207],[11.9573,54.6835],[11.3756,54.8133],[11.4797,55.0525],[11.2262,55.3129],[11.2326,55.6431],[11.5259,55.8584],[11.9424,55.8223],[12.1495,56.095],[12.5176,56.0562],[12.525,55.9115]]],[[[10.8837,55.0372],[10.8037,54.8744],[10.4282,54.8835],[10.3072,54.8835],[9.7656,55.369],[10.0455,55.5688],[10.6948,55.5438],[10.8837,55.0372]]],[[[9.4222,54.832],[9.2736,54.8117],[9.1131,54.8736],[8.889,54.8915],[8.6359,54.9117],[8.1897,55.5629],[8.1837,55.8223],[8.1907,56.5531],[8.6728,56.527],[8.889,56.7146],[9.3048,56.693],[9.0659,56.9285],[8.889,56.9243],[8.7173,56.7262],[8.3249,56.8385],[8.6317,57.1018],[8.889,57.1206],[10.283,57.5981],[10.4957,57.3511],[10.199,56.6836],[10.8182,56.4896],[10.8509,56.3228],[9.9457,55.7305],[9.6721,55.7121],[9.8384,54.999],[9.6229,54.8818],[9.4222,54.832]]]]},properties:{name:"Denmark"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-61.5123,15.5686],[-61.2352,15.5425],[-61.2355,15.2169],[-61.3652,15.1829],[-61.5123,15.5686]]]},properties:{name:"Dominica"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-71.7536,18.0307],[-71.8766,18.5572],[-71.6752,19.1658],[-71.7579,19.702],[-71.0165,19.8737],[-70.1124,19.6603],[-69.6952,19.3275],[-69.285,19.281],[-69.3763,19.0976],[-68.7534,18.908],[-68.4468,18.57],[-68.6771,18.2116],[-69.7448,18.4306],[-70.3492,18.2502],[-70.8751,18.3096],[-71.4373,17.7791],[-71.7536,18.0307]]]},properties:{name:"Dominican Republic"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[8.6421,36.9412],[8.3435,36.5284],[8.4128,35.1988],[8.2407,34.6847],[7.5356,33.8878],[7.7925,33.2741],[8.6877,32.3104],[9.0952,31.9812],[9.5516,30.2464],[9.4464,30.0952],[9.8055,29.2946],[9.9363,27.8899],[9.8837,26.6543],[9.4591,26.143],[9.9784,25.3828],[10.1392,24.8009],[10.4325,24.5274],[11.6027,24.2015],[11.9985,23.5127],[8.7142,21.6026],[7.4448,20.8222],[5.8191,19.4689],[4.243,19.1389],[3.5631,19.0665],[3.407,19.0499],[3.2945,19.0379],[3.182,19.8421],[1.8141,20.3039],[1.235,20.7351],[.9463,21.2628],[.7453,21.3959],[.5578,21.5201],[-1.7859,23.0319],[-1.8933,23.1012],[-2.7863,23.6772],[-3.3739,24.0562],[-4.8333,24.9976],[-8.6667,27.3127],[-8.6666,27.662],[-8.6296,28.5136],[-8.3109,28.8968],[-7.1492,29.458],[-5.5291,29.6274],[-4.9056,30.1258],[-3.8126,30.6884],[-3.5844,31.5104],[-3.0082,31.7988],[-2.7778,32.0677],[-1.2332,32.2639],[-1.1187,32.5223],[-1.5962,33.2215],[-1.8091,34.6952],[-2.2097,35.0846],[-1.8933,35.1581],[-1.7859,35.183],[-1.5608,35.2352],[-.8764,35.7128],[-.0547,35.8673],[.7453,36.3212],[.9549,36.4402],[2.5173,36.6076],[2.9693,36.7924],[3.407,36.8057],[3.5631,36.8104],[3.8798,36.9112],[4.7588,36.8859],[5.3146,36.6516],[6.1198,36.8823],[6.4162,37.063],[6.9707,36.8953],[7.353,37.0632],[7.8867,36.8665],[8.6421,36.9412]]]},properties:{name:"Algeria"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-80.2733,-3.4262],[-80.2896,-3.4106],[-80.0893,-2.9775],[-80.7308,-2.2506],[-80.8365,-1.3353],[-80.6015,-.8786],[-80.0197,.252],[-80.009,.7931],[-78.7509,1.3888],[-77.1784,.3755],[-76.1433,.3503],[-75.2882,-.0937],[-75.511,-.2279],[-75.2664,-.8786],[-75.6084,-1.582],[-75.7923,-1.766],[-76.3212,-2.2733],[-76.5151,-2.4592],[-78.0291,-3.2721],[-79.0222,-4.799],[-80.2973,-4.3463],[-80.2733,-3.4262]]],[[[-89.3141,-.8786],[-89.3676,-.9753],[-89.6306,-.9132],[-89.5928,-.8786],[-89.2874,-.599],[-89.189,-.6522],[-89.3141,-.8786]]],[[[-90.2343,-.7503],[-90.3987,-.7812],[-90.5575,-.6282],[-90.2875,-.3823],[-90.162,-.5731],[-90.2343,-.7503]]],[[[-90.2194,-1.247],[-90.4877,-1.4671],[-90.6339,-1.3532],[-90.5386,-1.1297],[-90.2194,-1.247]]],[[[-90.5618,-.1994],[-90.6005,-.4734],[-90.9233,-.2625],[-90.8506,-.1152],[-90.5618,-.1994]]],[[[-91.0745,-.8786],[-91.1901,-.9842],[-91.3584,-.8786],[-91.2651,-.5463],[-91.5239,-.3004],[-91.3957,.0588],[-90.9264,-.6562],[-91.0745,-.8786]]]]},properties:{name:"Ecuador"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[27.3516,57.5182],[26.4549,57.5549],[25.0463,58.0401],[24.8341,57.9728],[24.3528,57.8766],[24.5109,58.2945],[23.9606,58.2911],[23.5211,58.5818],[23.5183,59.1406],[23.7306,59.2373],[25.8302,59.5641],[26.0153,59.6195],[26.7594,59.4994],[28.0419,59.4701],[28.1202,59.3526],[27.357,58.7871],[27.6449,57.981],[27.3516,57.5182]]],[[[23.0127,58.8772],[22.8917,58.6388],[23.1995,58.6473],[23.16,58.4714],[22.4883,58.1535],[22.1153,58.1784],[21.9044,58.4282],[22.4604,58.6315],[22.6103,59.053],[23.0127,58.8772]]]]},properties:{name:"Estonia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[34.2198,31.3217],[34.2688,31.2205],[34.5937,30.3802],[34.9051,29.4932],[34.3905,28.0194],[34.1419,27.8534],[33.2866,28.5757],[32.6275,29.7499],[32.4577,29.6796],[32.7278,28.8485],[33.572,27.8321],[34.0863,26.4969],[35.3875,24.2632],[35.6218,23.1455],[34.9524,22.7943],[34.5937,22.2811],[34.2134,22.2],[34.0865,22.0025],[33.1826,22.0017],[25,22],[25,24.9875],[25,25.5268],[25,26.8805],[24.9948,29.1507],[24.7452,30.1337],[24.9888,30.7293],[24.892,31.3739],[25.1472,31.6497],[27.1871,31.3899],[29.0734,30.8521],[31.0638,31.5733],[31.9143,31.4752],[32.7141,31.0714],[34.2198,31.3217]]]},properties:{name:"Egypt"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-8.6666,27.662],[-8.6667,27.3127],[-8.8245,26.0382],[-11.9441,25.882],[-12.022,23.6542],[-13.0409,22.8389],[-13.0576,21.3647],[-16.825,21.3191],[-17.0513,20.7716],[-16.9587,21.7111],[-15.7411,23.8954],[-14.9633,24.6788],[-14.4726,26.0925],[-13.6084,26.7669],[-13.173,27.667],[-8.6666,27.662]]]},properties:{name:"Western Sahara"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[28.0777,36.1182],[27.8606,35.9226],[27.7226,35.9288],[27.6996,36.1182],[27.7048,36.2643],[28.0929,36.3913],[28.0777,36.1182]]],[[[27.0088,37.7299],[26.6951,37.45],[26.2824,37.492],[26.2357,37.6322],[26.6264,37.6111],[26.5842,37.7779],[26.8644,37.8529],[27.0088,37.7299]]],[[[26.0328,40.7303],[25.6324,40.8628],[25.1395,40.9907],[24.8135,40.8581],[24.6926,40.6531],[24.5139,40.9053],[23.8677,40.7787],[23.7651,40.7579],[23.7569,40.6346],[23.6512,40.3129],[23.2995,40.2157],[23.0042,40.3503],[22.6824,40.529],[22.664,40.4916],[22.5589,40.1747],[22.6646,39.9748],[22.9159,39.6029],[23.0946,39.3836],[22.9625,38.9755],[22.7999,38.8142],[23.3778,38.5258],[23.4604,38.4988],[23.4977,38.7546],[24.0531,38.4939],[23.9884,38.3775],[23.6556,38.3521],[23.6904,38.3403],[23.9905,38.2351],[23.9836,38.0911],[24.0433,37.7052],[23.7436,37.8538],[23.6722,37.9418],[23.597,38.0152],[23.4604,38.024],[23.1797,37.9516],[23.12,37.73],[23.1935,37.5912],[23.3192,37.6097],[23.313,37.7614],[23.4336,37.7616],[23.4162,37.4558],[22.8171,37.4458],[22.9808,37.0479],[22.9735,36.7312],[22.3987,36.7163],[22.0867,36.9279],[21.813,36.8056],[21.6802,37.3774],[21.4883,37.5912],[21.2096,37.8627],[21.3511,38.1021],[21.8645,38.2852],[22.373,38.1422],[23.1175,38.0606],[23.1262,38.1684],[22.8945,38.2198],[22.6083,38.3587],[22.0551,38.3922],[21.8517,38.3745],[21.2055,38.3544],[20.768,38.8622],[21.1086,39.0461],[20.7033,39.0501],[20.4778,39.2748],[20.01,39.6918],[20.3023,39.8127],[20.3913,39.7885],[20.3833,39.9827],[20.6129,40.0797],[20.7785,40.3488],[21.0561,40.6167],[20.9802,40.8557],[21.7874,40.9311],[21.9294,41.1004],[22.2162,41.1705],[22.3321,41.1203],[22.8792,41.3407],[22.9276,41.3385],[23.4604,41.4025],[23.6242,41.3757],[24.0597,41.5221],[24.4917,41.5436],[24.784,41.3602],[25.1794,41.3102],[25.2247,41.2646],[25.9064,41.3076],[25.9486,41.3203],[26.3579,41.7111],[26.5923,41.4201],[26.0328,40.7303]]],[[[26.3896,39.3419],[26.4805,39.1632],[26.4268,38.9834],[26.1649,39.0105],[26.1649,39.1914],[26.0217,39.0983],[25.8524,39.205],[25.9117,39.2784],[26.3896,39.3419]]],[[[24.0973,35.5568],[24.3174,35.3538],[24.928,35.4069],[25.4907,35.2983],[26.2086,35.1708],[26.1133,35.0322],[25.5506,34.9908],[24.875,34.9554],[24.7225,35.0925],[24.2875,35.176],[23.6393,35.2486],[23.5541,35.3592],[23.6489,35.491],[24.0973,35.5568]]],[[[26.1554,38.3107],[26.0119,38.1529],[25.9174,38.2494],[25.9902,38.3889],[25.8343,38.5419],[26.0035,38.6018],[26.1625,38.5512],[26.1554,38.3107]]],[[[25.7442,40.3674],[25.5042,40.2894],[25.4107,40.4392],[25.5042,40.602],[25.7231,40.5587],[25.7442,40.3674]]],[[[25.6114,37.1296],[25.6419,36.8851],[25.4413,36.8597],[25.3632,37.0238],[25.1663,36.9122],[25.0262,36.9996],[25.1428,37.1707],[25.6114,37.1296]]],[[[25.6088,36.4028],[25.4913,36.2191],[25.1951,36.4505],[25.4428,36.5758],[25.6088,36.4028]]],[[[25.2632,40.0608],[25.289,39.7529],[24.9851,39.8112],[24.978,39.996],[25.2632,40.0608]]],[[[25.0724,37.9127],[24.9876,37.6671],[24.6661,37.8695],[24.869,38.012],[25.0724,37.9127]]],[[[24.5977,38.1182],[24.4072,37.9119],[24.0932,38.0951],[24.2194,38.1912],[24.5977,38.1182]]],[[[24.5907,40.0422],[24.3493,39.977],[24.1553,40.2273],[23.8854,40.2974],[23.8604,40.5728],[24.2109,40.3959],[24.5907,40.0422]]],[[[24.0937,38.9901],[23.8864,38.8942],[23.784,39.104],[24.1162,39.2788],[24.0937,38.9901]]],[[[24.0296,40.1756],[24.0599,39.9279],[23.7817,39.9659],[23.6895,40.2006],[24.0296,40.1756]]],[[[23.1388,36.3676],[23.0534,36.0275],[22.8546,36.1415],[22.8384,36.3676],[23.1388,36.3676]]],[[[21.2434,37.1953],[20.9354,37.1004],[20.7617,37.2426],[21.1453,37.3813],[21.2434,37.1953]]],[[[20.9506,37.7489],[20.8642,37.6089],[20.5468,37.8293],[20.6797,38.0053],[20.9506,37.7489]]],[[[20.8474,38.6571],[20.4881,38.5244],[20.5649,38.8161],[20.7219,38.9069],[20.8474,38.6571]]],[[[20.709,38.4519],[20.709,38.0598],[20.3827,38.2101],[20.525,38.4293],[20.709,38.4519]]],[[[19.8831,39.5638],[19.7308,39.56],[19.5448,39.7784],[19.7873,39.8571],[19.9233,39.7814],[19.8831,39.5638]]]]},properties:{name:"Greece"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[43.1261,12.7101],[42.6867,12.4073],[42.4043,12.4686],[41.6307,13.3913],[40.8941,14.0891],[40.0851,14.5456],[39.0217,14.5899],[38.5391,14.4413],[37.9201,14.8128],[37.5268,14.2588],[37.2972,14.3876],[36.5603,14.2577],[36.4673,15.1054],[36.8653,16.1186],[37.0295,17.0223],[38.2556,17.6008],[38.5696,18.005],[39.6434,15.3839],[39.9153,15.3649],[41.2338,14.532],[43.1261,12.7101]]],[[[40.8196,15.8159],[40.8516,15.5192],[40.5282,15.5556],[40.5469,15.7454],[40.8196,15.8159]]],[[[40.3757,16.5021],[40.0675,16.2685],[40.0397,16.615],[40.3431,16.6081],[40.3757,16.5021]]],[[[40.2398,15.9624],[40.2691,15.6519],[39.9571,15.6541],[39.8498,15.974],[40.0853,16.0916],[40.2398,15.9624]]]]},properties:{name:"Eritrea"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[4.391,39.8617],[4.1907,39.7981],[3.9068,39.9986],[4.1586,40.1071],[4.391,39.8617]]],[[[3.0272,39.9286],[3.1413,39.771],[3.3402,39.7851],[3.4469,39.6566],[3.2245,39.3643],[3.0486,39.2718],[2.7901,39.3675],[2.6354,39.5678],[2.5259,39.4609],[2.4094,39.591],[2.7816,39.8511],[3.0272,39.9286]]],[[[-1.786,43.3505],[-1.7694,43.3347],[-1.7289,43.2961],[-1.4389,43.2579],[-.7245,42.9202],[-.3133,42.8494],[.4778,42.7],[.6601,42.691],[.7453,42.7489],[.8582,42.8257],[1.3298,42.6999],[1.4426,42.6037],[1.4956,42.4736],[1.7258,42.5044],[1.731,42.4924],[3.1748,42.4354],[3.0758,41.9496],[2.7785,41.6488],[1.6453,41.1956],[.93,40.9773],[.7453,40.775],[.5152,40.5229],[-.1885,39.722],[-.296,39.3774],[-.0376,38.8864],[.1442,38.7061],[-.4319,38.3781],[-.7621,37.847],[-1.63,37.3752],[-1.7859,37.1805],[-1.8933,37.0464],[-2.0979,36.7908],[-2.7863,36.7642],[-3.1287,36.7509],[-3.3739,36.746],[-3.7775,36.7379],[-4.3798,36.6987],[-5.2524,36.3113],[-5.3392,36.152],[-5.3515,36.1526],[-5.3694,36.1554],[-5.4235,36.1675],[-5.4456,36.0714],[-5.5951,36.0149],[-5.7926,36.0817],[-5.9068,36.176],[-6.0355,36.192],[-6.4087,36.6705],[-6.43,36.7375],[-6.3456,36.7988],[-6.9451,37.1593],[-7.4019,37.1748],[-7.5127,37.5263],[-7.4457,37.694],[-6.9317,38.2084],[-7.108,38.1881],[-7.2758,38.4539],[-7.2031,38.751],[-7.0209,39.0127],[-7.2315,39.2784],[-7.5429,39.6628],[-7.0106,39.7363],[-6.9513,40.2574],[-6.8651,40.2707],[-6.8022,40.5288],[-6.9299,41.0295],[-6.6898,41.2052],[-6.4797,41.2944],[-6.3008,41.5924],[-6.6375,41.8984],[-6.9858,41.9714],[-7.2005,41.8797],[-8.0519,41.8206],[-8.1651,41.8183],[-8.199,42.1544],[-8.8632,41.8721],[-8.786,42.334],[-8.7267,42.6883],[-8.9621,42.6303],[-9.2093,42.979],[-9.1336,43.0807],[-8.9905,43.2731],[-8.6289,43.3347],[-8.3239,43.3866],[-7.6997,43.7351],[-7.6014,43.6731],[-7.0318,43.5445],[-5.8535,43.612],[-4.5123,43.3932],[-3.3739,43.4082],[-3.1533,43.3532],[-2.7863,43.4305],[-2.4592,43.3347],[-2.123,43.3347],[-1.8933,43.3454],[-1.786,43.3505]]],[[[1.5747,39.0405],[1.3846,38.8022],[1.1328,38.8746],[1.2463,39.0789],[1.5747,39.0405]]],[[[-2.9323,35.2776],[-2.9698,35.2933],[-2.9525,35.3198],[-2.9459,35.3141],[-2.9457,35.3077],[-2.932,35.2934],[-2.9359,35.2914],[-2.937,35.2826],[-2.9323,35.2776]]],[[[-5.3434,35.8709],[-5.3819,35.913],[-5.3777,35.916],[-5.365,35.9167],[-5.3489,35.9078],[-5.3363,35.8952],[-5.3252,35.8999],[-5.3146,35.8899],[-5.3019,35.8937],[-5.2978,35.901],[-5.2879,35.9059],[-5.2792,35.8999],[-5.2801,35.8955],[-5.288,35.891],[-5.3062,35.8849],[-5.3196,35.8864],[-5.3281,35.8793],[-5.3378,35.8781],[-5.3434,35.8709]]],[[[-13.4371,29.0022],[-13.7995,28.8585],[-13.877,28.9395],[-13.8555,29.0358],[-13.4611,29.1565],[-13.4371,29.0022]]],[[[-13.9045,28.2315],[-14.2422,28.2011],[-14.0392,28.615],[-13.874,28.7975],[-13.8004,28.6101],[-13.9045,28.2315]]],[[[-15.373,27.8509],[-15.6011,27.7205],[-15.85,27.9717],[-15.7041,28.1628],[-15.4172,28.1572],[-15.373,27.8509]]],[[[-16.4257,28.1504],[-16.7084,28.0082],[-16.9265,28.3522],[-16.5229,28.4185],[-16.3182,28.5798],[-16.2224,28.5306],[-16.4257,28.1504]]],[[[-17.004,28.08],[-17.2554,27.9517],[-17.4329,28.0885],[-17.2817,28.2909],[-17.004,28.08]]],[[[-17.7361,28.5452],[-17.8792,28.4927],[-18.0407,28.7934],[-17.759,28.8716],[-17.7361,28.5452]]],[[[-17.8024,27.8558],[-17.9781,27.5665],[-18.2623,27.7101],[-17.8673,27.9174],[-17.8024,27.8558]]]]},properties:{name:"Spain"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[42.4043,12.4686],[41.816,11.6292],[41.8348,11.0448],[42.9681,10.9974],[42.7628,10.7159],[42.9804,10.0644],[43.9589,9.0545],[45.6126,8.4674],[46.9411,8.0224],[47.8524,7.9151],[45.6126,5.5657],[45.4747,5.4241],[45.2923,5.2367],[44.9162,4.9368],[43.4741,4.7993],[42.8138,4.301],[41.9101,3.9823],[41.2328,3.9616],[40.708,4.2326],[39.9305,3.8858],[39.5667,3.5224],[38.9731,3.5158],[38.1026,3.6459],[36.9621,4.3833],[35.9477,4.62],[35.8294,5.2367],[35.3235,5.413],[35.0325,5.8494],[34.9588,6.4537],[34.5428,6.7418],[33.7557,7.6074],[33.0448,7.899],[33.2485,8.381],[33.8204,8.4168],[34.0937,8.6026],[34.1132,9.4986],[34.4181,10.6735],[34.8021,10.8052],[35.2153,11.9187],[35.6227,12.5064],[36.1342,12.8315],[36.5603,14.2577],[37.2972,14.3876],[37.5268,14.2588],[37.9201,14.8128],[38.5391,14.4413],[39.0217,14.5899],[40.0851,14.5456],[40.8941,14.0891],[41.6307,13.3913],[42.4043,12.4686]]]},properties:{name:"Ethiopia"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[28.8967,69.0426],[28.4782,68.5109],[28.6388,68.2375],[28.8967,68.1515],[29.956,67.6452],[29.1273,66.9908],[29.4643,66.5492],[29.5729,66.4329],[30.0785,65.7704],[29.7547,65.4974],[29.7009,64.9085],[30.0443,64.7388],[30.0598,64.547],[30.0686,64.4375],[30.4884,64.1574],[30.2805,63.8509],[29.9719,63.7572],[31.128,63.2578],[31.5218,62.8942],[31.1863,62.4872],[30.144,61.8522],[27.9913,60.669],[27.8036,60.5486],[27.4542,60.4236],[26.7304,60.4075],[26.4539,60.4877],[23.4699,59.8757],[23.0034,59.8867],[22.9896,60.0826],[22.526,59.9512],[22.2141,60.2235],[21.3727,60.1112],[21.1787,60.7855],[21.4207,61.0455],[21.5937,61.5386],[21.3296,61.9539],[21.116,62.7127],[21.1799,63.0766],[23.0234,63.8509],[23.6173,64.0488],[24.2982,64.547],[24.562,64.777],[24.5412,65.0792],[24.8163,65.0981],[24.9085,64.8645],[25.2608,64.9432],[25.0846,65.5889],[24.6602,65.6676],[24.1551,65.816],[23.7656,66.2739],[23.8453,66.837],[23.4078,68.023],[20.5486,69.06],[21.0332,69.2348],[21.3103,69.3065],[21.5888,69.2786],[21.6919,69.2348],[21.9836,69.0729],[23.0757,68.6756],[24.0289,68.7802],[25.012,68.6429],[25.638,68.9632],[26.0763,69.7256],[27.7472,70.0602],[29.1537,69.588],[28.8967,69.0426]]],[[[22.1562,59.7949],[21.9437,59.6886],[21.847,59.8419],[21.7649,59.9724],[22.0745,60.0004],[22.1562,59.7949]]],[[[21.1062,60.4652],[21.0595,60.2693],[20.7092,60.2983],[20.8791,60.5594],[21.1062,60.4652]]],[[[20.55,60.0961],[20.1365,60.0355],[19.548,60.2237],[19.6324,60.32],[20.1365,60.3373],[20.4009,60.3136],[20.55,60.0961]]]]},properties:{name:"Finland"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[179.6738,-16.4902],[179.9173,-16.6526],[179.7354,-16.757],[179.6784,-16.5883],[179.4587,-16.7284],[178.7776,-16.9537],[178.6168,-16.8573],[178.5993,-16.6408],[179.6622,-16.219],[179.836,-16.3106],[179.6738,-16.4902]]],[[[178.501,-18.1185],[177.9862,-18.2601],[177.3939,-18.1281],[177.2656,-17.9593],[177.4317,-17.6272],[177.6413,-17.4673],[178.1928,-17.3103],[178.5482,-17.6272],[178.501,-18.1185]]],[[[178.2849,-19.1472],[178.1542,-19.3847],[177.988,-19.2959],[177.965,-18.9902],[178.2849,-19.1472]]],[[[-179.9307,-16.8438],[-180,-16.9728],[-180,-16.7973],[-179.9488,-16.8052],[-179.9307,-16.8438]]]]},properties:{name:"Fiji"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-58.3365,-51.3236],[-58.3004,-51.3984],[-57.9228,-51.3727],[-57.7233,-51.6659],[-58.0596,-51.7907],[-58.3365,-51.8246],[-58.4347,-52.0524],[-58.6392,-52.0524],[-59.7554,-52.3821],[-59.6972,-52.1115],[-59.8029,-51.8657],[-60.282,-52.0524],[-60.4624,-52.2166],[-60.7826,-52.166],[-60.8703,-52.0468],[-60.5288,-51.9344],[-60.5288,-51.6823],[-60.4058,-51.6823],[-60.2337,-51.3236],[-59.4376,-51.3236],[-59.2842,-51.4358],[-59.5801,-51.6909],[-59.3968,-51.8047],[-59.0744,-51.694],[-59.0744,-51.5646],[-58.8831,-51.3053],[-58.3365,-51.3236]]],[[[-60.6288,-51.6623],[-61.0179,-51.6852],[-60.9604,-51.4587],[-60.6836,-51.4524],[-60.6288,-51.6623]]]]},properties:{name:"Falkland Islands"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[162.441,11.7853],[162.4662,11.4213],[162.1497,11.5683],[162.1379,11.6753],[162.441,11.7853]]],[[[158.3919,6.8645],[158.3248,6.7299],[158.1289,6.7633],[158.0496,6.9413],[158.2678,7.0729],[158.3919,6.8645]]],[[[155.0335,1.0626],[154.9879,.9026],[154.8092,1.0508],[154.5622,1.124],[154.5513,1.2456],[154.8189,1.2144],[155.0335,1.0626]]],[[[152.0497,7.5599],[152.0173,7.1788],[151.7651,7.3273],[151.9196,7.6092],[152.0497,7.5599]]],[[[139.7787,10.0227],[139.8461,9.6924],[139.6418,9.7071],[139.5233,10.0093],[139.7787,10.0227]]]]},properties:{name:"Micronesia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-7.1612,62.127],[-7.1326,62.2843],[-6.5477,62.3301],[-6.6617,62.127],[-6.8239,61.9419],[-7.1612,62.127]]]},properties:{name:"Faroes"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[55.8498,-21.1858],[55.7858,-21.3757],[55.3304,-21.2876],[55.202,-21.035],[55.4471,-20.8597],[55.6529,-20.9056],[55.8498,-21.1858]]],[[[45.3392,-12.7143],[45.2392,-13.0535],[45.0223,-12.9229],[45.1091,-12.6808],[45.3392,-12.7143]]],[[[9.3497,41.7331],[9.241,41.4735],[8.9872,41.5136],[8.8934,41.7331],[8.7341,42.1059],[8.62,42.3732],[9.4119,42.797],[9.4022,41.8587],[9.3497,41.7331]]],[[[5.8181,49.5463],[5.8934,49.4969],[6.3671,49.4695],[6.557,49.4192],[6.7235,49.2188],[7.1011,49.156],[7.2643,49.1338],[7.3688,49.1615],[7.6357,49.054],[7.9107,49.0452],[8.0684,48.9993],[8.2326,48.9666],[7.9596,48.7186],[7.6807,48.2573],[7.5779,48.1214],[7.5773,48.1157],[7.5814,47.9145],[7.546,47.7436],[7.589,47.5899],[7.5552,47.5646],[7.5109,47.5026],[7.3809,47.4319],[7.1304,47.503],[6.9392,47.4337],[6.8584,47.1672],[6.8602,47.1655],[6.463,46.8511],[6.1381,46.5577],[6.064,46.4162],[6.1256,46.3172],[5.9561,46.1321],[6.1776,46.1816],[6.2414,46.3436],[6.463,46.432],[6.8211,46.4272],[7.0449,45.9224],[6.8024,45.7786],[7.1047,45.4685],[7.1311,45.2671],[6.6301,45.1099],[7.0658,44.7135],[6.9484,44.6547],[6.8874,44.3613],[7.7142,44.0615],[7.5298,43.784],[7.4392,43.749],[7.4374,43.7516],[7.4129,43.7328],[7.4103,43.7293],[7.4147,43.7266],[6.9313,43.4803],[6.463,43.1567],[5.6719,43.1793],[4.2303,43.4602],[4.1011,43.5547],[3.5631,43.341],[3.407,43.279],[3.2405,43.2129],[3.0434,42.8382],[3.0523,42.6893],[3.1748,42.4354],[1.731,42.4924],[1.7258,42.5044],[1.7861,42.5737],[1.4426,42.6037],[1.3298,42.6999],[.8582,42.8257],[.7453,42.7489],[.6601,42.691],[.4778,42.7],[-.3133,42.8494],[-.7245,42.9202],[-1.4389,43.2579],[-1.7289,43.2961],[-1.7694,43.3347],[-1.786,43.3505],[-1.5248,43.5296],[-1.2541,44.4676],[-1.1393,45.4131],[-.7148,45.3284],[-1.1438,45.7955],[-1.1625,46.3242],[-1.7859,46.5279],[-1.8933,46.6465],[-2.0158,46.7818],[-1.9805,47.0287],[-2.4585,47.448],[-2.7863,47.5636],[-3.0916,47.4437],[-3.3739,47.7091],[-3.523,47.8491],[-4.3251,47.8813],[-4.3643,48.158],[-4.6593,48.3933],[-4.4342,48.6204],[-3.6592,48.6594],[-3.3739,48.7307],[-3.1221,48.7936],[-2.7863,48.5849],[-1.9481,48.5389],[-1.5711,48.6265],[-1.7613,49.516],[-1.4101,49.6094],[-1.1196,49.3223],[.2972,49.4299],[.6443,49.4431],[.6911,49.5073],[.7453,49.5183],[.7453,49.5209],[.7453,49.5234],[.1167,49.5391],[.2717,49.7307],[.7453,49.8709],[1.3796,50.0651],[1.6447,50.3504],[1.5785,50.5895],[1.6472,50.8631],[2.0677,51.0066],[2.546,51.0894],[2.607,50.9127],[2.8633,50.7083],[2.8701,50.7029],[2.8864,50.7057],[2.9004,50.6933],[2.9092,50.6945],[2.9116,50.7031],[2.9223,50.7028],[2.93,50.7117],[2.9306,50.7262],[2.9372,50.73],[2.9442,50.732],[2.938,50.7402],[2.9401,50.7453],[2.9566,50.7529],[2.9642,50.75],[2.9722,50.7502],[2.9833,50.7572],[3.0059,50.7661],[3.0112,50.7702],[3.0149,50.7736],[3.0187,50.7735],[3.0985,50.779],[3.2453,50.713],[3.3897,50.5453],[3.6151,50.4904],[3.6555,50.4617],[3.7407,50.358],[4.0278,50.3583],[4.1409,49.9788],[4.2331,49.9578],[4.4325,49.9416],[4.7928,50.147],[4.9694,49.8018],[5.1537,49.7179],[5.3935,49.6171],[5.4709,49.4972],[5.7346,49.5457],[5.8181,49.5463]]],[[[-54.5879,2.3221],[-54.326,2.588],[-54.0163,3.5593],[-54.4353,4.386],[-54.298,5.2363],[-54.0056,5.6025],[-53.8517,5.6949],[-53.066,5.4745],[-52.7219,5.2363],[-51.8475,4.6165],[-51.6555,4.056],[-52.5292,2.588],[-52.966,2.2123],[-53.7392,2.2956],[-54.1804,2.1379],[-54.5879,2.3221]]],[[[-60.7977,14.5053],[-60.9485,14.4332],[-61.1957,14.7745],[-60.8696,14.7984],[-60.7977,14.5053]]],[[[-61.0749,15.9501],[-61.2968,15.7521],[-61.4556,15.9501],[-61.289,16.1336],[-61.0749,15.9501]]],[[[-61.5638,16.1518],[-61.7221,15.9609],[-61.8407,16.2787],[-61.5435,16.3898],[-61.4564,16.5499],[-61.2889,16.2942],[-61.5638,16.1518]]]]},properties:{name:"France"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[13.299,2.1706],[13.3162,1.4466],[14.0479,1.3393],[14.3513,1.0236],[14.008,.0173],[14.4299,-.8786],[14.3759,-1.7141],[14.1596,-2.16],[13.3829,-2.3436],[12.6158,-2.0511],[12.3425,-2.3577],[11.8464,-2.5027],[11.7476,-2.7148],[11.9433,-3.1022],[11.8945,-3.4408],[11.201,-3.9916],[9.7678,-2.5299],[8.9799,-1.2056],[8.9194,-.8786],[9.5261,.1929],[9.4768,.5178],[9.662,1.0598],[11.2847,1.0376],[11.3346,2.1739],[11.8459,2.2795],[13.299,2.1706]]]},properties:{name:"Gabon"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-61.8872,11.9187],[-61.7536,12.2389],[-61.5437,12.3092],[-61.6175,11.9707],[-61.8872,11.9187]]]},properties:{name:"Grenada"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[46.4205,41.9043],[46.2829,41.7331],[46.5821,41.3432],[46.5337,41.1855],[45.0131,41.2966],[43.4738,41.1233],[42.815,41.5555],[42.5152,41.4383],[41.5471,41.5204],[41.6572,41.7331],[41.73,41.8738],[41.6548,42.1059],[41.536,42.3929],[41.2964,42.7667],[40.0103,43.3853],[41.0039,43.4488],[42.4524,43.1829],[43.9013,42.6535],[45.0431,42.6553],[45.6621,42.3929],[45.9086,42.1059],[46.4205,41.9043]]]},properties:{name:"Georgia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-2.7205,49.4438],[-2.4703,49.6425],[-2.3118,49.638],[-2.4045,49.3183],[-2.7205,49.4438]]]},properties:{name:"Guernsey"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[1.1996,6.1124],[1.0504,6.0026],[.9463,5.8001],[.7453,5.7835],[.2362,5.7413],[-1.7859,4.8801],[-1.8933,4.8344],[-2.0007,4.7886],[-2.7863,5.0035],[-3.1058,5.0909],[-2.8322,5.299],[-3.1813,6.7737],[-2.5205,8.2869],[-2.6869,9.4907],[-2.7863,10.0094],[-2.9125,10.6685],[-2.7863,10.8872],[-2.7279,10.9884],[-1.8933,10.9871],[-.6868,10.9912],[-.142,11.139],[-.0713,10.6685],[.3087,10.2935],[.6206,8.2206],[.57,6.8716],[.7453,6.6207],[.9463,6.333],[1.1996,6.1124]]]},properties:{name:"Ghana"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-5.3392,36.152],[-5.3413,36.1247],[-5.3481,36.1135],[-5.3559,36.1252],[-5.3595,36.1458],[-5.3588,36.1497],[-5.3515,36.1526],[-5.3392,36.152]]]},properties:{name:"Gibraltar"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-24.5304,82.9324],[-24.4093,82.8762],[-23.2855,82.9788],[-20.7029,82.6728],[-20.7038,82.5656],[-24.4093,82.1877],[-29.6414,82.1427],[-31.3607,81.9014],[-31.3505,81.7942],[-26.7037,82.0293],[-25.0188,81.9299],[-24.999,81.8272],[-25.3418,81.6662],[-25.3144,81.5637],[-24.4093,81.6406],[-22.7312,82.0151],[-21.4404,82.0356],[-21.1128,81.8798],[-21.2646,81.5342],[-22.182,81.1618],[-22.149,81.0507],[-20.9853,81.223],[-19.8059,81.6237],[-17.4748,81.3867],[-16.1693,81.7027],[-13.5572,81.7367],[-11.8645,81.4732],[-11.8412,81.3761],[-12.0501,81.2256],[-16.15,80.6122],[-16.4702,80.2369],[-18.4958,80.1732],[-18.4906,80.0514],[-17.6459,80.0598],[-17.5098,79.9343],[-17.9872,79.7213],[-19.2888,79.6632],[-19.5438,79.3166],[-19.2253,79.0851],[-19.4133,78.7149],[-20.8328,78.7492],[-21.202,78.2926],[-20.9822,77.9536],[-20.6203,77.8806],[-20.3063,78.068],[-20.2393,77.8355],[-19.4048,77.886],[-19.2569,77.6422],[-20.4562,77.6491],[-20.5382,77.5168],[-18.3317,77.2026],[-18.249,76.8768],[-18.509,76.7507],[-20.403,76.8639],[-20.8252,76.7415],[-21.1093,76.9169],[-21.2599,76.8153],[-21.1539,76.5862],[-21.3334,76.491],[-22.1374,76.8207],[-22.2859,76.6469],[-21.4751,76.3065],[-20.8002,76.5533],[-20.3676,76.4907],[-19.5648,75.7519],[-19.4036,75.4898],[-19.487,75.2248],[-20.453,75.2262],[-20.5773,75.0378],[-20.0158,74.8814],[-19.9334,74.6328],[-19.2983,74.6009],[-19.2908,74.369],[-21.6066,74.1776],[-21.6143,74.0713],[-20.5412,73.825],[-20.6637,73.5018],[-22.3417,73.2677],[-23.6477,73.5041],[-24.1112,73.7424],[-24.4093,73.6884],[-24.5881,73.5084],[-24.4093,73.2662],[-23.6044,73.3098],[-22.1746,72.8266],[-22.4045,72.1564],[-24.4093,72.6197],[-24.7163,73.0444],[-24.8871,72.8232],[-24.7126,72.5973],[-24.4093,72.4509],[-22.7891,71.9446],[-22.4061,71.4146],[-21.7873,71.4592],[-21.7142,71.235],[-21.8837,70.973],[-21.6908,70.5033],[-22.3012,70.4915],[-22.5288,70.7284],[-22.7192,70.4715],[-23.4574,70.4829],[-24.0236,70.6969],[-24.4093,71.0672],[-24.7349,71.2767],[-25.4402,71.3729],[-25.4072,70.6816],[-26.4459,70.4185],[-26.2876,70.2382],[-25.4435,70.3427],[-24.4093,70.2232],[-22.8339,70.0895],[-22.8237,69.984],[-23.3521,69.8338],[-23.8153,69.5235],[-26.5918,68.7098],[-29.3278,68.301],[-29.9246,68.3444],[-30.3883,68.1358],[-31.4976,68.1459],[-32.1596,68.3845],[-32.1755,67.9331],[-33.2563,67.6329],[-33.5693,67.1124],[-34.381,66.5626],[-35.6327,66.2369],[-36.0778,65.9268],[-36.5346,66.0181],[-36.7984,65.586],[-37.0909,65.7371],[-37.7907,65.6315],[-37.6365,66.1909],[-37.829,66.2034],[-38.245,65.692],[-39.6725,65.5714],[-39.8643,65.0151],[-41.0277,65.0016],[-40.9698,64.8671],[-40.5484,64.8728],[-40.4842,64.6577],[-40.5522,64.3781],[-40.9836,64.2925],[-40.6582,63.9687],[-40.8335,63.5446],[-41.4075,63.4999],[-41.2675,63.1684],[-42.2538,62.6127],[-42.3548,61.4764],[-42.7287,61.1172],[-42.8919,60.6246],[-43.3139,60.4483],[-43.1456,60.0556],[-43.6036,59.8993],[-43.7145,60.0889],[-44.0578,60.1286],[-44.1567,59.879],[-45.0497,59.9181],[-45.3466,60.0704],[-45.6719,60.7496],[-45.8693,60.5369],[-46.0752,60.6825],[-45.7814,60.9722],[-45.7946,61.096],[-46.2184,61.0055],[-46.3362,60.7582],[-46.4446,60.9548],[-46.7499,60.7631],[-47.0282,60.6894],[-48.0324,60.7278],[-48.5494,61.4588],[-49.2875,61.562],[-49.3335,61.7886],[-49.1724,61.9553],[-49.3602,62.1364],[-49.5243,62.0358],[-49.4176,61.8013],[-49.5672,61.8106],[-50.5142,62.8611],[-51.0991,63.2159],[-51.3711,63.7806],[-51.7672,63.8783],[-52.1646,64.6577],[-52.4448,65.3604],[-53.1565,65.4725],[-53.6664,66.1379],[-53.6594,66.4304],[-53.3269,66.8604],[-53.5897,66.8855],[-53.7896,67.2589],[-53.7983,67.9389],[-53.6315,68.2638],[-52.9788,68.7395],[-51.6436,68.5612],[-51.2829,68.6939],[-50.8333,69.5984],[-50.9065,69.7122],[-51.2139,69.6055],[-51.6107,69.9891],[-52.3858,70.0919],[-54.0515,70.4609],[-54.3088,70.6749],[-53.9298,70.7999],[-51.203,70.4182],[-50.9137,70.558],[-50.9248,70.7947],[-51.3603,71.0978],[-51.8913,70.9061],[-52.1743,71.1477],[-52.975,71.1948],[-53.3814,71.8271],[-54.123,71.4392],[-55.3981,71.5146],[-55.5916,71.7935],[-55.1204,72.2678],[-55.4181,72.3016],[-55.3,72.5594],[-55.6037,72.6139],[-55.9824,73.0312],[-56.2152,73.4147],[-55.8732,73.5217],[-55.6982,73.0166],[-55.1977,72.8887],[-55.1442,72.9769],[-56.0253,73.9643],[-56.1978,74.4686],[-56.9687,74.8562],[-57.5503,74.887],[-58.8398,75.5776],[-58.8044,75.6888],[-59.3677,75.8821],[-63.2778,76.3524],[-63.9139,76.1182],[-64.332,76.3118],[-65.5026,76.0263],[-66.0459,76.2401],[-66.8312,76.2289],[-67.2235,76.0072],[-68.3758,76.0815],[-69.2535,76.3222],[-68.9588,76.6632],[-70.5125,76.8242],[-70.731,76.929],[-70.7152,77.031],[-68.3758,77.3623],[-66.514,77.4848],[-66.502,77.5903],[-66.8193,77.6859],[-68.3758,77.535],[-69.1155,77.4873],[-71.674,77.8686],[-72.5651,78.2338],[-72.2831,78.5038],[-68.3758,79.027],[-66.0848,79.1524],[-64.7909,79.5435],[-64.513,80.0252],[-66.9557,80.0786],[-67.2451,80.2154],[-67.1247,80.3518],[-63.5449,81.1763],[-62.0161,81.092],[-61.5368,81.4102],[-61.597,81.7588],[-59.3692,82.0882],[-55.173,82.3007],[-54.5609,82.0524],[-54.4875,81.6684],[-54.0033,81.817],[-54.0841,82.1849],[-53.8333,82.2551],[-51.7017,81.7286],[-51.2207,81.8837],[-51.5735,82.4264],[-50.4164,82.4312],[-49.5024,82.2718],[-49.032,82.3538],[-48.4243,82.0743],[-45.823,81.6455],[-45.5096,82.0038],[-45.6244,82.1269],[-45.825,81.9411],[-46.5168,82.1052],[-47.6208,82.2747],[-47.7632,82.478],[-46.77,82.5647],[-46.1292,82.5893],[-46.199,82.761],[-47.1275,82.7809],[-47.1715,82.9864],[-46.77,82.997],[-45.6356,82.8842],[-43.5391,83.2165],[-39.6446,82.9078],[-38.9224,83.012],[-38.9153,83.1172],[-39.3401,83.2382],[-39.3386,83.4149],[-32.5912,83.6315],[-26.8793,83.5214],[-26.147,83.423],[-26.0334,83.1866],[-24.4093,83.1561],[-24.5304,82.9324]]],[[[-17.2649,75.0442],[-17.6003,74.9329],[-17.6953,75.0381],[-17.6481,75.1756],[-17.3607,75.1828],[-17.2649,75.0442]]],[[[-17.3861,81.5452],[-17.6235,81.5387],[-17.9342,81.6715],[-17.8555,81.7566],[-17.411,81.6739],[-17.3861,81.5452]]],[[[-17.5816,77.65],[-18.0207,77.5849],[-18.0786,77.6494],[-17.8382,77.8448],[-17.5374,77.8124],[-17.5816,77.65]]],[[[-17.5804,79.0358],[-18.0817,78.9271],[-18.0431,79.0874],[-17.7734,79.2066],[-17.5804,79.0358]]],[[[-18.5653,75.3622],[-18.3484,75.3142],[-17.9481,75.3339],[-17.9885,75.0448],[-18.1892,75.0098],[-18.8317,75.0354],[-18.8272,75.247],[-18.5653,75.3622]]],[[[-18.3165,78.6781],[-18.3217,78.4218],[-18.624,78.482],[-18.6947,78.5795],[-18.6527,78.6529],[-18.3165,78.6781]]],[[[-18.4531,76.0546],[-18.5643,75.9973],[-19.0874,76.4571],[-19.0731,76.6711],[-18.8351,76.6039],[-18.4531,76.0546]]],[[[-18.719,78.1402],[-18.6553,77.9265],[-19.2828,77.9391],[-19.3204,78.1402],[-18.8862,78.0305],[-18.719,78.1402]]],[[[-18.7015,74.6539],[-18.9369,74.4328],[-19.1717,74.573],[-19.0131,74.7286],[-18.7015,74.6539]]],[[[-18.7265,81.8228],[-19.0254,81.8053],[-19.4416,82.0286],[-19.207,82.1289],[-18.7085,81.9408],[-18.7265,81.8228]]],[[[-22.0096,71.5912],[-22.3027,71.5214],[-22.4128,71.745],[-22.2005,71.8426],[-22.0096,71.5912]]],[[[-39.8943,83.4248],[-40.0202,83.221],[-40.4045,83.3422],[-40.3036,83.4598],[-39.8943,83.4248]]],[[[-52.269,69.4511],[-53.9908,69.3202],[-54.0375,69.5312],[-54.7382,69.6289],[-54.7804,70.0919],[-54.6738,70.185],[-54.2786,70.3043],[-53.6205,70.248],[-53.0825,70.0919],[-52.269,69.8418],[-52.0279,69.8041],[-51.9308,69.741],[-51.9982,69.572],[-52.269,69.4511]]],[[[-53.4106,71.0613],[-53.6342,71.0077],[-53.9188,71.1585],[-53.6118,71.3306],[-53.4106,71.0613]]],[[[-56.7563,73.8478],[-56.9074,73.8149],[-56.9682,73.9902],[-56.8828,74.2048],[-56.5285,74.1965],[-56.7563,73.8478]]],[[[-57.0764,74.4304],[-57.2939,74.3446],[-57.4436,74.4668],[-57.0764,74.7186],[-57.0764,74.4304]]]]},properties:{name:"Greenland"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-16.747,13.0637],[-16.8106,13.3348],[-16.5467,13.5909],[-16.5068,13.5909],[-16.1395,13.5914],[-15.0767,13.7903],[-13.9619,13.512],[-13.8396,13.3348],[-14.0997,13.2862],[-14.2079,13.2305],[-14.383,13.2445],[-14.5538,13.3348],[-15.102,13.5695],[-15.3101,13.3781],[-15.8026,13.3348],[-15.8577,13.1872],[-16.1395,13.1667],[-16.747,13.0637]]]},properties:{name:"Gambia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-11.3795,12.4136],[-11.3138,12.1429],[-10.6468,11.9712],[-9.0923,12.3591],[-8.5611,11.3615],[-8.5566,11.0662],[-7.9785,10.1751],[-8.1218,9.6107],[-7.8783,9.2737],[-7.9101,8.8593],[-7.7092,8.5226],[-8.1489,8.4531],[-8.2025,8.2206],[-8.0418,8.107],[-8.1719,7.6791],[-8.4722,7.5546],[-9.1699,7.3537],[-9.5993,8.3707],[-10.282,8.488],[-10.5938,8.3973],[-10.5221,8.6984],[-10.7248,9.3546],[-11.3001,9.9887],[-12.4355,9.8266],[-13.0138,9.1406],[-13.3027,9.0404],[-13.481,9.5749],[-14.3944,10.2521],[-14.9028,11.0929],[-14.6662,11.4317],[-13.7975,11.7717],[-13.7083,12.6762],[-13.2641,12.649],[-12.4334,12.3458],[-11.3795,12.4136]]]},properties:{name:"Guinea"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[9.8215,2.3478],[10.1506,2.1693],[11.3346,2.1739],[11.2847,1.0376],[9.662,1.0598],[9.4026,1.2325],[9.7791,1.8945],[9.8215,2.3478]]],[[[8.9477,3.6456],[8.6776,3.1916],[8.3963,3.3507],[8.5671,3.4704],[8.6916,3.7949],[8.9007,3.7856],[8.9477,3.6456]]],[[[5.7677,-1.4352],[5.7396,-1.6057],[5.533,-1.591],[5.5092,-1.2886],[5.6073,-1.2091],[5.7677,-1.4352]]]]},properties:{name:"Equatorial Guinea"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-36.1482,-54.3785],[-36.0495,-54.572],[-35.8595,-54.5547],[-35.8709,-54.7898],[-36.2473,-54.8133],[-36.4526,-54.5331],[-36.8273,-54.4593],[-37.2127,-54.2092],[-36.9226,-54.0603],[-36.6745,-54.2796],[-36.1482,-54.3785]]],[[[-37.3814,-54.1483],[-37.6379,-54.2553],[-37.8265,-54.128],[-37.4428,-53.9379],[-37.3814,-54.1483]]],[[[-41.4845,-53.6988],[-41.5768,-53.7952],[-41.9803,-53.6333],[-41.7669,-53.4771],[-41.4845,-53.6988]]]]},properties:{name:"South Georgia and The South Sandwich Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-88.9128,15.9001],[-88.2213,15.7205],[-89.0755,15.0705],[-89.3532,14.4185],[-89.435,14.3466],[-89.6593,14.1495],[-90.0133,13.8384],[-90.1243,13.7409],[-90.1338,13.7454],[-90.7911,13.8738],[-91.0362,13.9216],[-92.2313,14.5333],[-92.1126,15.2942],[-91.8002,15.8454],[-90.4981,16.2084],[-91.1617,17.0796],[-90.9613,17.6841],[-90.0133,17.7907],[-89.6593,17.7984],[-89.435,17.8032],[-89.147,17.8095],[-89.1972,16.2896],[-89.1806,15.9683],[-88.9128,15.9001]]]},properties:{name:"Guatemala"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[144.5399,13.4638],[144.7864,13.5479],[144.866,13.7133],[145.0169,13.6423],[144.6352,13.1516],[144.5399,13.4638]]]},properties:{name:"Guam"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-14.9028,11.0929],[-14.9581,10.9988],[-15.2684,11.2026],[-15.2842,11.6135],[-15.6256,11.6966],[-15.9355,11.4707],[-16.0111,11.7422],[-16.7074,12.3386],[-15.1085,12.6633],[-13.7083,12.6762],[-13.7975,11.7717],[-14.6662,11.4317],[-14.9028,11.0929]]],[[[-15.6251,10.7377],[-15.8016,10.6407],[-15.9372,10.8898],[-15.5471,10.9821],[-15.6251,10.7377]]],[[[-15.8081,11.0723],[-16.0685,10.9738],[-16.2077,11.0476],[-16.2077,11.2233],[-15.9304,11.2239],[-15.8081,11.0723]]]]},properties:{name:"Guinea-Bissau"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-57.134,5.8374],[-57.2815,5.2363],[-57.3549,5.0511],[-57.8536,4.8346],[-58.0157,4.0688],[-57.786,3.6417],[-57.3197,3.3177],[-57.0218,2.6002],[-56.4774,1.9459],[-57.2818,1.9505],[-58.8112,1.2685],[-59.511,1.7084],[-59.9399,2.6147],[-59.642,4.1358],[-60.0054,4.5779],[-60.1578,5.1926],[-60.7318,5.1961],[-61.2634,5.8625],[-61.2089,6.4133],[-60.4378,6.9909],[-60.6142,7.5487],[-59.9947,8.1428],[-59.994,8.5334],[-59.037,7.9339],[-58.3467,6.9418],[-57.2986,6.2066],[-57.134,5.8374]]]},properties:{name:"Guyana"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[114.0376,22.5037],[114.2348,22.5558],[114.2598,22.252],[113.9355,22.1785],[113.8834,22.3116],[114.0376,22.5037]]]},properties:{name:"Hong Kong"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[73.3253,-53.1447],[73.4256,-52.988],[73.7196,-53.023],[73.7196,-53.1581],[73.4531,-53.2566],[73.3253,-53.1447]]]},properties:{name:"Heard Island and Mcdonald Islands"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-83.145,14.9981],[-84.4054,14.6387],[-84.9132,14.7538],[-85.3235,14.1899],[-86.6936,13.744],[-86.7646,13.3165],[-87.3121,12.9829],[-87.5178,13.2785],[-87.8057,13.3959],[-87.8678,13.8204],[-88.5397,13.9656],[-89.3532,14.4185],[-89.0755,15.0705],[-88.2213,15.7205],[-87.7568,15.8825],[-86.7792,15.7641],[-85.9388,15.9862],[-84.9024,15.9532],[-84.3175,15.798],[-83.8765,15.3067],[-83.4621,15.2635],[-83.145,14.9981]]],[[[-86.0956,16.2984],[-86.3235,16.2529],[-86.3901,16.503],[-86.149,16.6249],[-86.0956,16.2984]]]]},properties:{name:"Honduras"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[18.8897,45.9212],[19.0339,45.4868],[19.0053,45.4346],[19.0771,45.3405],[19.4252,45.1677],[19.1373,45.1187],[19.0221,44.8554],[18.8337,44.8701],[18.7408,45.0207],[18.5297,45.0875],[18.019,45.1294],[17.8339,45.0615],[17.4433,45.1597],[17.1412,45.1633],[16.2537,45.0676],[15.84,45.2245],[15.7367,44.9356],[16.1322,44.4545],[16.1724,44.2092],[16.4384,44.0425],[16.5443,43.9742],[17.4508,43.1769],[18.1539,42.6893],[18.4381,42.5557],[18.5252,42.4205],[17.9364,42.6878],[17.6492,42.8889],[17.5813,42.9384],[17.3561,43.0842],[16.9389,43.3334],[16.0165,43.5019],[15.5392,43.8578],[15.3244,43.9473],[15.3244,43.9136],[15.3244,43.9094],[15.3244,43.8762],[15.3244,43.872],[15.3244,43.8665],[15.3244,43.8488],[15.3244,43.8185],[15.3244,43.7913],[15.2224,43.8714],[15.0388,44.1357],[15.2786,44.3661],[14.954,44.5495],[14.9025,44.6902],[14.8813,45.0311],[14.5261,44.9265],[14.2264,45.1538],[13.8453,44.8883],[13.543,45.3405],[13.6513,45.4541],[14.1113,45.4823],[14.1182,45.4812],[14.3909,45.5034],[14.57,45.6729],[15.2264,45.4271],[15.3313,45.7629],[15.4044,45.7927],[15.7064,45.9753],[15.6273,46.086],[15.7915,46.2593],[15.8735,46.2793],[16.3015,46.3783],[16.2421,46.4901],[16.5968,46.4759],[16.8548,46.3504],[16.876,46.3206],[17.2943,45.9885],[17.4433,45.9496],[17.6515,45.8478],[17.9121,45.7908],[18.8213,45.9144],[18.8897,45.9212]]],[[[17.3294,42.9672],[17.2813,42.8579],[16.9818,42.8645],[16.9248,42.9563],[17.0344,43.0844],[17.2145,43.0935],[17.3294,42.9672]]],[[[16.6308,42.2935],[16.3305,42.2716],[16.1233,42.3939],[16.2575,42.4915],[16.5125,42.4661],[16.6308,42.2935]]],[[[15.8854,42.9677],[15.6582,42.908],[15.4565,42.992],[15.5523,43.0512],[15.8748,43.15],[16.0236,43.0999],[15.8854,42.9677]]]]},properties:{name:"Croatia"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-71.7536,18.0307],[-72.1734,18.2281],[-73.8928,18.1341],[-74.4327,18.4518],[-74.2391,18.6521],[-72.8756,18.4506],[-72.3981,18.5879],[-72.8389,19.4889],[-73.3781,19.6946],[-73.2461,19.873],[-72.7983,19.9331],[-71.7579,19.702],[-71.6752,19.1658],[-71.8766,18.5572],[-71.7536,18.0307]]],[[[-72.8109,18.8339],[-72.7474,18.7171],[-73.034,18.743],[-73.3489,18.9417],[-73.2274,18.9926],[-72.8109,18.8339]]]]},properties:{name:"Haiti"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[22.1553,48.4034],[22.8963,47.9541],[22.1808,47.6001],[22.1283,47.5981],[21.659,47.0221],[21.4414,46.6515],[21.1475,46.3359],[20.7756,46.2759],[20.7053,46.1609],[20.2643,46.1264],[20.1365,46.1341],[19.8654,46.1503],[19.6981,46.1879],[19.3027,45.9916],[18.8897,45.9212],[18.8213,45.9144],[17.9121,45.7908],[17.6515,45.8478],[17.4433,45.9496],[17.2943,45.9885],[16.876,46.3206],[16.8548,46.3504],[16.5968,46.4759],[16.3708,46.7222],[16.1138,46.8691],[16.4594,47.0441],[16.4338,47.3529],[16.6462,47.4466],[16.4215,47.6653],[16.9914,47.72],[17.1608,48.0067],[17.2474,48.012],[17.7054,47.759],[17.8939,47.7395],[18.8485,47.8182],[18.7602,47.9145],[18.9284,48.0568],[19.0143,48.0777],[20.0519,48.1677],[20.4639,48.464],[21.4106,48.5497],[22.1211,48.3783],[22.1553,48.4034]]]},properties:{name:"Hungary"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-6.268,54.1023],[-6.2149,53.6334],[-6.0843,53.4842],[-6.1028,53.2108],[-6.1445,52.7377],[-6.4842,52.2218],[-7.8422,51.9542],[-9.6116,51.5096],[-10.2193,51.7677],[-10.1497,52.2477],[-9.3755,52.5878],[-9.4044,52.9687],[-9.0093,53.1408],[-9.8734,53.3329],[-10.1572,53.5751],[-10.0368,53.7783],[-10.1697,54.0152],[-9.9073,54.2643],[-9.1323,54.1624],[-8.4004,54.4797],[-8.6423,54.6824],[-8.2513,55.1317],[-7.3138,55.311],[-7.2561,55.067],[-7.6551,54.7729],[-7.5702,54.6426],[-7.8411,54.3349],[-7.4291,54.1829],[-7.1885,54.3377],[-6.8642,54.3302],[-6.6439,54.18],[-6.595,54.0447],[-6.268,54.1023]]]},properties:{name:"Ireland"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[35.6716,32.6911],[35.5551,32.389],[35.2216,32.5167],[35.0135,32.3104],[35.0826,31.7397],[34.9515,31.4243],[35.476,31.4905],[34.9782,29.5418],[34.9051,29.4932],[34.5937,30.3802],[34.2688,31.2205],[34.4994,31.4912],[34.4909,31.5959],[34.5937,31.7385],[34.7067,31.9416],[34.8436,32.3104],[35.1034,33.0936],[35.6244,33.2423],[35.6716,32.6911]]]},properties:{name:"Israel"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-4.7696,54.0657],[-4.7212,54.2029],[-4.5499,54.3537],[-4.3866,54.3997],[-4.3376,54.2928],[-4.5499,54.1006],[-4.7696,54.0657]]]},properties:{name:"Isle of Man"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[78.398,32.5232],[78.4736,32.2395],[78.5766,32.0593],[78.769,31.9377],[78.8882,31.2723],[79.138,31.003],[79.4224,31.064],[79.9526,30.8744],[80.2176,30.583],[81.0369,30.2028],[80.4172,29.7013],[80.1928,28.9158],[80.3067,28.7183],[83.0809,27.4663],[84.2444,27.4339],[85.2178,26.8066],[87.0575,26.4379],[87.4011,26.3831],[88.0627,26.484],[88.1704,26.852],[88.0432,27.206],[88.1351,27.8819],[88.7725,28.0233],[88.9233,27.2728],[89.0273,26.9609],[89.1233,26.8977],[89.7443,26.7397],[90.0071,26.7529],[92.1079,26.8583],[92.697,26.9058],[93.2491,26.9504],[93.6616,26.9837],[94.2529,27.5398],[95.7527,28.2572],[96.3086,28.1895],[97.0575,27.7441],[96.8989,27.2897],[96.1868,27.1873],[95.203,26.5525],[94.2381,24.0841],[94.0361,23.9215],[93.3872,23.9016],[93.1232,22.3714],[92.6068,21.9712],[92.1892,23.5198],[92.0094,23.5264],[91.6475,23.1403],[91.2736,23.6319],[91.453,24.0284],[92.1082,24.5094],[92.2478,25.0052],[90.0071,25.3633],[89.7217,26.0307],[89.1233,26.2142],[88.5924,26.3771],[88.2105,25.8776],[88.8173,25.3069],[88.1499,24.6608],[88.6844,24.2282],[88.6343,23.6942],[88.9238,23.0935],[89.0628,21.9257],[89.0238,21.887],[88.6191,21.6875],[87.8076,21.7084],[87.3346,21.4676],[86.4061,20.0929],[84.9085,19.1741],[82.6146,17.2281],[82.0003,16.4865],[80.3399,15.5112],[80.1667,14.9797],[80.2595,13.2612],[79.8627,11.8084],[79.7489,10.5292],[78.7661,9.2097],[77.9593,8.4451],[77.5097,8.2855],[76.494,9.1984],[73.438,16.3077],[72.792,19.4375],[72.8081,20.7982],[72.5294,21.9031],[72.3579,21.9557],[72.1176,21.4636],[71.6404,21.0458],[70.9636,20.8337],[70.3921,21.0003],[69.2859,22.2151],[70.0091,22.6016],[70.1621,22.8467],[69.485,22.8793],[68.7003,23.3122],[68.6735,23.6224],[69.218,23.9453],[68.9389,24.2488],[70.0829,24.2255],[69.9677,23.8801],[70.1285,23.6507],[70.316,23.881],[70.9228,23.9726],[70.8701,24.2488],[71.0157,24.7573],[70.716,25.4417],[70.2013,25.93],[70.084,26.4979],[69.5759,26.9485],[70.3421,27.909],[70.9183,27.7815],[71.9298,28.0722],[74.4044,30.8691],[74.65,31.8079],[75.3339,32.3266],[76.5852,33.1567],[77.3152,32.8606],[77.7621,32.9237],[78.398,32.5232]]],[[[93.9514,7.0194],[93.8073,6.808],[93.6389,7.1267],[93.8473,7.2598],[93.9514,7.0194]]],[[[92.7744,11.8045],[92.6556,11.6296],[92.5401,11.8045],[92.8167,13.1674],[92.945,13.6002],[93.087,13.4621],[92.9348,13.0071],[92.9758,12.5434],[92.9348,12.1948],[92.7584,12.0256],[92.7744,11.8045]]],[[[93.0147,8.8774],[92.8391,8.5952],[92.7008,8.6844],[92.8953,9.0924],[93.0147,8.8774]]],[[[92.61,10.6965],[92.5338,10.497],[92.3721,10.523],[92.3637,10.7851],[92.523,10.9194],[92.61,10.6965]]],[[[73.25,8.2245],[73.1115,8.034],[72.8237,8.2237],[73.1579,8.3749],[73.25,8.2245]]],[[[68.9485,23.9873],[68.7147,23.8086],[68.5248,23.9208],[68.7308,24.154],[68.9485,23.9873]]]]},properties:{name:"India"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[72.2496,-7.2082],[72.4022,-7.1035],[72.5587,-7.2509],[72.5618,-7.4562],[72.4008,-7.582],[72.3982,-7.3365],[72.2496,-7.2082]]]},properties:{name:"British Indian Ocean Territory"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[44.7931,37.1763],[45.1379,36.4692],[46.0584,35.6666],[46.0875,35.1508],[45.5289,34.4408],[45.5675,33.8898],[46.2417,32.9842],[47.4435,32.3096],[47.7857,31.7734],[47.7508,31.0984],[48.4844,29.9791],[47.9591,30.0038],[47.2144,30.0133],[46.553,29.1012],[46.4258,29.0612],[46.1115,29.0876],[45.6126,29.1294],[44.663,29.2518],[42.1579,31.0566],[40.4951,31.898],[39.2009,32.1543],[38.7925,33.3747],[41.0138,34.4548],[41.3561,35.6375],[41.3313,36.384],[42.3557,37.108],[42.8718,37.37],[43.4246,37.2753],[44.1298,37.279],[44.3175,37.0426],[44.7931,37.1763]]]},properties:{name:"Iraq"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[179.0015,-49.6501],[178.7724,-49.8507],[178.5452,-49.6947],[178.909,-49.5191],[179.0015,-49.6501]]],[[[175.211,-36.9434],[175.4301,-37.208],[175.5268,-37.1542],[175.4246,-36.7147],[175.4907,-36.6256],[175.8471,-36.9434],[176.1621,-37.6155],[177.2769,-37.9942],[177.9092,-37.5919],[178.3213,-37.5744],[178.4965,-37.7213],[178.3276,-38.3317],[177.8392,-39.0056],[177.0026,-39.2801],[176.9183,-40.0124],[176.066,-41.1167],[175.3236,-41.5785],[174.715,-41.3285],[175.1401,-40.6613],[175.1781,-40.2119],[173.7984,-39.3176],[173.9188,-39.1348],[174.533,-38.8729],[174.6003,-38.7145],[174.8117,-37.7731],[174.3377,-36.4518],[174.0344,-36.3225],[173.3415,-35.512],[173.1236,-35.1608],[173.2284,-34.8726],[173.904,-35.0379],[174.4677,-35.512],[174.4877,-35.9133],[174.5887,-36.0626],[174.8279,-36.712],[175.211,-36.9434]]],[[[172.7362,-40.69],[173.1993,-41.2224],[173.9697,-40.9516],[174.1467,-41.8038],[172.8252,-43.2176],[172.9688,-43.7881],[171.8361,-44.0752],[171.3433,-44.3576],[171.1099,-44.7518],[170.5556,-45.8222],[169.6687,-46.4979],[168.9475,-46.6627],[168.3749,-46.5934],[167.5117,-46.1908],[166.7007,-46.1853],[166.4494,-45.8621],[166.8476,-45.2798],[167.4731,-44.7518],[168.1666,-44.1848],[170.8669,-42.7873],[172.4063,-40.7032],[172.7362,-40.69]]],[[[173.148,-34.7698],[173.012,-34.8214],[172.7207,-34.4944],[173.0069,-34.3878],[172.9857,-34.5219],[173.148,-34.7698]]],[[[168.2008,-47.0612],[167.6336,-47.2661],[167.5502,-47.1551],[167.7658,-46.8901],[167.7198,-46.705],[167.8617,-46.677],[168.1705,-46.8607],[168.2008,-47.0612]]],[[[166.3205,-50.841],[166.1375,-50.9601],[165.8918,-50.8077],[166.1559,-50.5356],[166.3205,-50.841]]],[[[-176.3517,-44.0765],[-176.5996,-44.2034],[-176.7921,-43.9919],[-176.3561,-43.9203],[-176.3517,-44.0765]]],[[[-176.6359,-43.5673],[-176.6389,-43.7018],[-176.9625,-43.6642],[-177.0155,-43.5437],[-176.7712,-43.4085],[-176.6359,-43.5673]]],[[[-178.4544,-30.4002],[-178.4299,-30.7471],[-178.7271,-30.6285],[-178.697,-30.4381],[-178.4544,-30.4002]]]]},properties:{name:"New Zealand"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[56.3742,24.9804],[56.8749,24.2008],[57.2627,23.9326],[58.6784,23.5339],[59.305,22.7683],[59.7246,22.502],[59.749,22.1614],[59.4198,21.5894],[58.5057,20.4815],[58.1107,20.4832],[57.878,20.2393],[57.7116,19.7373],[57.7294,18.9955],[56.8314,18.7324],[56.3286,17.9621],[55.4639,17.7892],[54.987,17.055],[54.0762,16.9726],[53.107,16.6544],[52,19],[54.9485,20.0059],[55.5332,21.6026],[55.623,21.8699],[55.6667,22],[55.2083,22.7083],[55.5272,23.8382],[55.8942,24.1886],[55.851,24.8578],[56.1415,24.8043],[56.3742,24.9804]]],[[[58.7788,20.2184],[58.5562,20.2053],[58.8901,20.6868],[59.0327,20.5538],[58.8419,20.4561],[58.7788,20.2184]]],[[[56.2658,25.6247],[56.0871,26.0513],[56.364,26.1347],[56.2658,25.6247]]]]},properties:{name:"Oman"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-77.3675,8.6728],[-77.2491,7.9096],[-77.893,7.2218],[-78.3561,7.898],[-78.3616,8.3659],[-79.2671,8.954],[-80.3163,8.2753],[-80.1249,7.5415],[-80.6084,7.2851],[-81.9829,8.1676],[-82.7153,8.2748],[-82.9004,8.0398],[-82.9936,8.3047],[-82.7781,8.9311],[-82.9148,9.3744],[-82.5646,9.572],[-82.1142,9.2781],[-82.1606,9.0042],[-81.2964,8.7963],[-79.5888,9.5775],[-78.9287,9.5371],[-78.1197,9.2829],[-77.3675,8.6728]]],[[[-78.781,8.4146],[-78.9039,8.1216],[-79.1048,8.3141],[-78.9004,8.5713],[-78.781,8.4146]]],[[[-81.6151,7.4985],[-81.7789,7.3184],[-81.9587,7.5187],[-81.7272,7.7381],[-81.6151,7.4985]]]]},properties:{name:"Panama"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-69.9534,-4.2305],[-70.8737,-4.2367],[-71.899,-4.564],[-72.6878,-5.0578],[-73.1725,-6.3431],[-73.712,-6.95],[-73.8818,-7.5555],[-73.0739,-8.8492],[-72.9782,-9.3412],[-72.3919,-9.5555],[-72.0116,-9.9595],[-71.3377,-9.9639],[-70.631,-9.6918],[-70.5742,-10.9321],[-69.5103,-10.9543],[-68.7259,-12.4796],[-68.9523,-12.9637],[-68.8868,-14.1931],[-69.3052,-14.785],[-69.1901,-15.2484],[-69.3798,-15.6492],[-69.2396,-16.0733],[-68.8869,-16.3343],[-69.5634,-17.2192],[-69.4726,-17.499],[-69.7443,-17.665],[-69.9206,-18.183],[-70.3762,-18.3536],[-71.2706,-17.7324],[-71.4978,-17.3049],[-75.1079,-15.4055],[-76.235,-14.2095],[-76.2379,-13.3923],[-77.1075,-12.0879],[-77.2567,-11.6027],[-77.5984,-11.2957],[-78.9821,-8.2756],[-79.9678,-6.8066],[-81.0363,-6.0325],[-80.9295,-5.5289],[-81.1436,-5.149],[-81.2324,-4.3904],[-80.2733,-3.4262],[-80.2973,-4.3463],[-79.0222,-4.799],[-78.0291,-3.2721],[-76.5151,-2.4592],[-76.3212,-2.2733],[-75.7923,-1.766],[-75.6084,-1.582],[-75.2664,-.8786],[-75.511,-.2279],[-75.2882,-.0937],[-74.5531,-.4725],[-74.2103,-.8786],[-72.9094,-2.42],[-70.8922,-2.3015],[-70.1573,-2.707],[-70.5831,-3.7195],[-69.9534,-4.2305]]]},properties:{name:"Peru"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[155.9192,-6.7298],[155.7032,-6.8882],[155.2445,-6.602],[154.6647,-5.5612],[155.0348,-5.5601],[155.4671,-6.1312],[155.9192,-6.5093],[155.9192,-6.7298]]],[[[154.7075,-5.4061],[154.5641,-5.4238],[154.4816,-5.2075],[154.6129,-4.9528],[154.731,-5.2106],[154.7075,-5.4061]]],[[[154.1991,-11.4815],[153.9769,-11.4966],[153.8434,-11.3865],[153.9506,-11.2186],[154.2051,-11.2912],[154.1991,-11.4815]]],[[[153.8364,-9.277],[153.6307,-9.5031],[153.5542,-9.3382],[153.5685,-9.133],[153.8052,-9.122],[153.8364,-9.277]]],[[[153.713,-11.5138],[153.6874,-11.6582],[153.3321,-11.5633],[153.2803,-11.4371],[153.3863,-11.3614],[153.713,-11.5138]]],[[[153.0721,-9.1649],[152.827,-9.3065],[152.6431,-9.1305],[152.7584,-8.9624],[153.0721,-9.1649]]],[[[152.654,-3.8377],[153.0189,-4.1505],[153.0268,-4.5844],[152.8729,-4.793],[152.6887,-4.5631],[152.6512,-4.1505],[152.5602,-3.9215],[152.4332,-3.9308],[152.2907,-3.7164],[152.4929,-3.5236],[152.654,-3.8377]]],[[[152.7791,-3.1485],[152.5692,-3.2793],[152.3707,-3.0695],[152.7167,-2.9522],[152.7791,-3.1485]]],[[[151.4771,-5.5212],[151.1822,-5.9341],[149.9341,-6.3042],[148.9713,-6.1273],[148.4082,-5.571],[148.9495,-5.4603],[149.1987,-5.578],[149.9043,-5.4776],[150.0993,-5.5212],[150.466,-5.4361],[150.714,-5.5212],[151.6195,-4.866],[151.5873,-4.2316],[152.1767,-4.1451],[152.3445,-4.7203],[151.9945,-5.0447],[152.0686,-5.3754],[151.9402,-5.5212],[151.4771,-5.5212]]],[[[152.0773,-3.2554],[152.2006,-3.4598],[151.9254,-3.4501],[151.2746,-2.9349],[151.3856,-2.8803],[151.8075,-3.1893],[152.0773,-3.2554]]],[[[151.3415,-9.9479],[151.2365,-10.2085],[150.9062,-10.1224],[150.8864,-10.0152],[151.3415,-9.9479]]],[[[151.023,-2.8145],[150.6524,-2.8372],[150.8226,-2.5295],[151.0564,-2.687],[151.023,-2.8145]]],[[[150.2231,-9.2357],[150.5593,-9.3687],[150.7054,-9.276],[150.8846,-9.5559],[150.8088,-9.6712],[150.2297,-9.4642],[150.1334,-9.294],[150.2231,-9.2357]]],[[[141.0194,-9.1296],[141.0191,-8.5941],[141.019,-8.2445],[140.8902,-6.6579],[140.9999,-5.5208],[141,-2.7849],[141,-2.6087],[144.5226,-3.895],[145.6132,-4.7063],[145.8885,-5.4302],[147.645,-6.2159],[147.7216,-6.6203],[147.0257,-6.8644],[147.1783,-7.3019],[148.1154,-8.1191],[148.5796,-8.9479],[149.2016,-9.0947],[149.4396,-9.528],[149.8839,-9.6781],[149.9092,-9.97],[150.5112,-10.2194],[150.6114,-10.5194],[150.2823,-10.6789],[149.6128,-10.3643],[147.8877,-10.0593],[147.0302,-9.4153],[146.1837,-8.2648],[144.7153,-7.7091],[144.0224,-7.8248],[143.4401,-8.2673],[143.3445,-8.955],[142.7941,-9.234],[141.0194,-9.1296]]],[[[150.5565,-2.669],[150.1644,-2.6868],[150.0071,-2.4738],[150.1888,-2.3563],[150.5155,-2.4882],[150.5565,-2.669]]],[[[150.3047,-5.1354],[149.9896,-5.2158],[149.8801,-5.0624],[150.1617,-4.9033],[150.3047,-5.1354]]],[[[149.8273,-1.5788],[149.6128,-1.6318],[149.4282,-1.4102],[149.5519,-1.2421],[149.8273,-1.5788]]],[[[148.1247,-5.6672],[147.918,-5.8171],[147.692,-5.4815],[147.918,-5.4815],[148.1247,-5.6672]]],[[[147.1952,-2.2054],[146.9684,-2.2163],[146.6056,-2.1052],[146.5614,-2.0248],[146.6361,-1.9726],[147.3562,-1.9772],[147.1952,-2.2054]]],[[[147.2773,-5.4451],[147.1237,-5.4997],[146.9265,-5.2551],[147.0787,-5.1438],[147.2334,-5.2326],[147.2773,-5.4451]]],[[[146.0852,-4.7733],[145.8994,-4.8281],[145.8177,-4.6723],[146.004,-4.4377],[146.1186,-4.5388],[146.0852,-4.7733]]]]},properties:{name:"Papua New Guinea"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[141,-2.6087],[141,-2.7849],[140.9999,-5.5208],[140.8902,-6.6579],[141.019,-8.2445],[141.0191,-8.5941],[141.0194,-9.1296],[139.6527,-8.2242],[138.0183,-8.2334],[138.0749,-7.7967],[138.5287,-7.0576],[137.9026,-5.4377],[137.3299,-5.0153],[135.4366,-4.4563],[134.0279,-3.828],[132.9843,-3.7966],[132.4483,-2.92],[133.2113,-2.3929],[132.431,-2.1467],[131.9076,-1.5438],[131.1531,-1.4128],[130.7478,-.9912],[131.0971,-.8786],[132.5168,-.4211],[133.762,-.7198],[133.857,-.8786],[134.1699,-1.4015],[134.3555,-2.3404],[135.1215,-3.1887],[137.8487,-1.5936],[141,-2.6087]]],[[[136.7028,-1.8337],[136.3807,-1.9596],[136.0103,-1.7117],[136.1796,-1.6502],[136.6722,-1.7337],[136.7028,-1.8337]]],[[[136.4118,-1.1122],[136.3297,-1.288],[135.8664,-1.1994],[135.7721,-.8786],[135.7097,-.7855],[135.8485,-.7237],[136.0431,-.8786],[136.22,-1.0698],[136.4118,-1.1122]]],[[[135.0428,-.9106],[134.9622,-1.1615],[134.7692,-1.1553],[134.7059,-.9938],[134.8537,-.8786],[134.9871,-.8786],[135.0428,-.9106]]],[[[134.7918,-6.5361],[134.1571,-6.8062],[134.1282,-6.235],[134.2335,-5.6965],[134.5107,-5.4001],[134.671,-5.4598],[134.7918,-5.7306],[134.7342,-5.9834],[134.7918,-6.5361]]],[[[132.878,-5.9113],[132.7926,-5.9679],[132.6177,-5.7992],[132.7274,-5.4757],[132.8091,-5.5499],[132.878,-5.9113]]],[[[131.6413,-7.1302],[131.6172,-7.6325],[131.2814,-8.045],[131.0996,-8.0712],[131.0773,-7.7427],[131.1634,-7.7105],[131.2636,-7.3135],[131.3535,-7.344],[131.4364,-7.1152],[131.6413,-7.1302]]],[[[131.1805,-.1179],[131.2427,-.3525],[130.4911,-.526],[130.4911,-.3392],[130.2408,-.3015],[130.2438,-.1179],[130.5256,-.0633],[130.7124,-.1179],[130.873,.0234],[131.1805,-.1179]]],[[[129.5424,-2.8],[130.4791,-3.0764],[130.8132,-3.5021],[130.8177,-3.7784],[129.8004,-3.3317],[129.1405,-3.3606],[128.8638,-3.2681],[128.5035,-3.4098],[128.1367,-3.1482],[128.0364,-3.3124],[127.8956,-3.2257],[128.1986,-2.8853],[129.0463,-2.8],[129.1405,-2.9566],[129.3707,-2.8],[129.5424,-2.8]]],[[[130.4641,-1.9867],[130.1849,-2.0825],[129.8044,-1.9045],[130.0452,-1.7297],[130.3317,-1.6684],[130.4641,-1.9867]]],[[[130.1121,-4.4137],[130.1308,-4.858],[130.0002,-4.7958],[129.8955,-4.5682],[130.0107,-4.3802],[130.1121,-4.4137]]],[[[129.9435,-1.2418],[129.8027,-1.3592],[129.5463,-1.3466],[129.5437,-1.2152],[129.8395,-1.0825],[129.9435,-1.2418]]],[[[129.9033,-7.8182],[129.8011,-8.1062],[129.5254,-7.8828],[129.6895,-7.741],[129.9033,-7.8182]]],[[[129.6687,-6.5658],[129.5318,-6.9486],[129.3441,-6.837],[129.3694,-6.6367],[129.6687,-6.5658]]],[[[128.1375,-.5962],[128.0744,-.6888],[127.6611,.0707],[127.6542,.252],[127.6356,.737],[128.3419,1.4333],[128.6653,1.5285],[128.6909,1.2071],[128.3963,.7703],[128.5436,.4354],[128.0541,.3986],[128.0121,.252],[127.9602,.0707],[128.1375,-.5962]]],[[[128.5643,2.1554],[128.3598,2.0596],[128.2212,2.2568],[128.3573,2.5017],[128.5774,2.6362],[128.6812,2.5017],[128.5643,2.1554]]],[[[128.5983,-1.1836],[128.5427,-1.2665],[128.2216,-1.1392],[128.1674,-.9419],[128.2852,-.9159],[128.5983,-1.1836]]],[[[128.3978,-3.4399],[128.4126,-3.7222],[128.0286,-3.6294],[128.2244,-3.4254],[128.3978,-3.4399]]],[[[128.0776,-1.6743],[127.5978,-1.7293],[127.4354,-1.6659],[127.4054,-1.4761],[127.634,-1.3388],[127.9563,-1.4761],[128.0776,-1.6743]]],[[[127.9018,1.1698],[127.5574,.8969],[127.423,1.0583],[127.4152,1.1698],[127.5525,1.7282],[127.9256,2.0919],[128.0291,1.6494],[127.9018,1.1698]]],[[[127.7813,-5.2153],[127.9353,-5.5008],[127.588,-5.4971],[127.5657,-5.2881],[127.7813,-5.2153]]],[[[127.5969,-.6143],[127.8898,-.7863],[127.7346,-.8786],[127.7274,-.8786],[127.6211,-.7545],[127.4573,-.816],[127.4715,-.6446],[127.3218,-.6749],[127.103,-.4346],[127.1078,-.2914],[127.5259,-.3165],[127.688,-.4747],[127.5969,-.6143]]],[[[127.24,-3.4701],[126.821,-3.7999],[126.352,-3.7],[126.0326,-3.3329],[126.099,-3.1559],[126.352,-3.0964],[126.8752,-3.1076],[127.24,-3.4701]]],[[[126.9145,4.02],[126.7869,3.9151],[126.5624,3.9606],[126.7362,4.2006],[126.656,4.3353],[126.7295,4.5964],[126.8741,4.5233],[126.9503,4.244],[126.9145,4.02]]],[[[126.8214,-6.7672],[126.5579,-6.7672],[126.4506,-6.5777],[126.794,-6.4962],[126.8214,-6.7672]]],[[[126.6625,5.4401],[126.5285,5.3064],[126.4378,5.4526],[126.523,5.7022],[126.6993,5.775],[126.6625,5.4401]]],[[[126.688,-7.7041],[126.4723,-7.9296],[126.352,-7.9226],[125.848,-7.8527],[125.9512,-7.7023],[126.352,-7.6753],[126.5769,-7.5815],[126.688,-7.7041]]],[[[126.048,-1.7592],[126.0326,-2.0564],[125.6222,-1.8309],[125.6782,-1.7749],[126.048,-1.7592]]],[[[125.6825,3.4811],[125.522,3.402],[125.4681,3.4853],[125.5218,3.6003],[125.6825,3.4811]]],[[[125.5586,3.6723],[125.5197,3.6049],[125.4259,3.6215],[125.3794,3.6826],[125.4052,3.7481],[125.5141,3.7392],[125.5586,3.6723]]],[[[125.1281,-1.8957],[124.4547,-1.9904],[124.3065,-1.766],[124.6221,-1.6523],[125.1635,-1.7209],[125.2646,-1.766],[125.1281,-1.8957]]],[[[124.9795,1.1237],[124.2471,.4228],[123.6163,.3077],[120.6846,.4843],[120.2126,.252],[120.1255,.0707],[120.1728,-.7484],[120.3237,-.8786],[120.8602,-1.3421],[121.5654,-.9473],[121.8579,-.8786],[122.9771,-.6159],[123.3408,-.726],[123.3089,-.8786],[122.7457,-1.0869],[121.7172,-2.0886],[122.4409,-3.6697],[123.0816,-4.1828],[122.9862,-5.3197],[122.7302,-5.5155],[122.4999,-5.3696],[122.4154,-4.9715],[122.6224,-4.5947],[121.9035,-4.7502],[121.6749,-4.6471],[120.7748,-2.7805],[120.3042,-3.2254],[120.2894,-5.2903],[119.7709,-5.5801],[119.5409,-5.4177],[119.5018,-3.8519],[118.9632,-3.3302],[118.8499,-2.9709],[119.563,-.8786],[119.7402,-.5736],[119.7744,.0707],[119.8606,.252],[120.0635,.6216],[120.5987,.8708],[120.9464,1.2721],[123.7339,.8724],[125.0099,1.7289],[125.1568,1.5864],[124.9795,1.1237]]],[[[125.1339,-8.2599],[124.5099,-8.4419],[124.3425,-8.3184],[124.6738,-8.1665],[125.0074,-8.1496],[125.1339,-8.2599]]],[[[125.0819,-9.4462],[124.4302,-10.1008],[123.7921,-10.3282],[123.4692,-10.2739],[123.7337,-9.6205],[124.045,-9.343],[124.3535,-9.3971],[124.4772,-9.175],[124.95,-8.9581],[125.1277,-9.0687],[125.0819,-9.4462]]],[[[124.2976,-8.475],[123.9794,-8.6549],[123.9515,-8.4237],[124.1625,-8.2623],[124.2976,-8.475]]],[[[123.9468,-2.1083],[123.6464,-2.2176],[123.6522,-1.9584],[123.8887,-1.8478],[123.9468,-2.1083]]],[[[123.6426,-1.7702],[123.5094,-1.7702],[123.3394,-1.6479],[123.5086,-1.4815],[123.7497,-1.5692],[123.6426,-1.7702]]],[[[123.7389,-8.3574],[123.4021,-8.5397],[123.0603,-8.3984],[123.0889,-8.2549],[123.713,-8.2549],[123.7389,-8.3574]]],[[[123.4912,-1.2722],[123.5135,-1.471],[123.0685,-1.3948],[122.8795,-1.6235],[122.7693,-1.471],[123.1149,-1.1623],[123.4912,-1.2722]]],[[[123.3186,-10.7526],[122.9218,-10.9127],[122.8445,-10.8665],[122.9062,-10.7337],[123.2907,-10.6091],[123.3186,-10.7526]]],[[[120.6213,-8.2574],[121.4625,-8.5841],[122.3064,-8.6088],[122.6035,-8.5187],[122.5602,-8.6907],[120.9999,-8.9618],[120.5599,-8.8153],[119.9016,-8.8297],[119.6931,-8.6439],[119.4114,-8.646],[119.4001,-8.5008],[119.7537,-8.5045],[120.413,-8.2574],[120.6213,-8.2574]]],[[[122.1654,-.2968],[122.1299,-.4312],[121.9389,-.355],[122.08,-.2127],[122.1654,-.2968]]],[[[122.0723,-10.524],[121.8009,-10.7016],[121.6997,-10.5776],[121.8244,-10.3975],[122.0739,-10.3908],[122.0723,-10.524]]],[[[122.067,-5.1713],[122.0544,-5.454],[121.735,-5.3514],[121.8387,-5.1335],[122.067,-5.1713]]],[[[121.9493,-.4103],[121.8823,-.5427],[121.7719,-.4362],[121.8934,-.3195],[121.9493,-.4103]]],[[[120.6492,-10.2134],[120.2576,-10.2626],[119.711,-9.8291],[118.9571,-9.5824],[119.1419,-9.4038],[119.5751,-9.3551],[119.978,-9.3527],[120.2429,-9.5824],[120.7457,-9.9622],[120.6492,-10.2134]]],[[[120.6771,-6.0935],[120.4509,-6.2451],[120.3384,-6.0379],[120.5818,-5.8378],[120.6771,-6.0935]]],[[[118.0921,-8.1333],[118.3212,-8.3434],[118.5009,-8.2603],[118.9646,-8.3627],[119.1702,-8.6774],[118.8012,-8.855],[118.195,-8.8447],[116.9965,-9.0773],[116.783,-8.9597],[116.6906,-8.6065],[116.4604,-8.8606],[116.0999,-8.8871],[116.0517,-8.445],[116.3764,-8.2133],[116.5477,-8.2603],[116.8056,-8.4685],[117.521,-8.4166],[118.109,-8.6384],[118.1576,-8.543],[117.7282,-8.2603],[117.8888,-8.0895],[118.0921,-8.1333]]],[[[109.643,2.076],[109.7189,1.6007],[110.4947,.905],[111.7875,.9963],[112.1786,1.2951],[112.5607,1.5663],[113.6416,1.2735],[114.5414,1.4939],[114.8213,1.9271],[114.8113,2.2131],[115.1387,2.4688],[115.1395,2.8234],[115.4801,3.1051],[115.8436,4.3193],[117.0734,4.3762],[117.7554,4.1668],[117.8959,4.1667],[117.5481,3.513],[117.5543,3.1743],[118.0559,1.7823],[118.7863,1.0052],[117.774,.6638],[117.5885,.252],[117.5129,.0841],[117.4502,-.7924],[117.365,-.8786],[116.4885,-1.766],[116.5064,-2.2733],[116.5119,-2.4285],[116.2024,-3.7304],[114.8134,-4.0478],[114.3456,-3.5118],[113.1529,-3.12],[112.115,-3.4116],[111.6289,-3.0637],[110.4658,-2.9451],[110.1816,-2.2733],[109.967,-1.766],[109.9643,-1.3814],[109.4272,-.9967],[109.3906,-.8786],[109.0401,.252],[108.8866,.7473],[109.042,1.3967],[109.643,2.076]]],[[[118.7224,2.3269],[118.76,2.0697],[118.5013,2.125],[118.5106,2.4988],[118.7224,2.3269]]],[[[107.0461,-5.9273],[108.3472,-6.322],[108.7056,-6.7783],[109.8693,-6.9108],[110.155,-6.8716],[110.4804,-6.9262],[110.6755,-6.5445],[110.9164,-6.4525],[111.2071,-6.6551],[112.5963,-6.9262],[112.7182,-7.0419],[113.002,-6.8819],[113.911,-6.8646],[113.9825,-6.9847],[113.5864,-7.2048],[112.8594,-7.2388],[112.7916,-7.506],[113.2628,-7.7514],[114.1108,-7.6683],[114.6297,-8.1202],[115.4692,-8.1764],[115.6441,-8.4174],[115.4692,-8.5567],[115.1635,-8.665],[114.4693,-8.2485],[114.3798,-8.2485],[114.482,-8.7189],[113.2125,-8.3188],[112.627,-8.4254],[111.1012,-8.2485],[110.6176,-8.1643],[109.8693,-7.8384],[108.2266,-7.784],[107.0461,-7.4491],[106.4949,-7.3635],[106.4498,-6.9944],[105.5433,-6.7661],[105.9583,-5.9881],[106.8785,-6.0856],[107.0461,-5.9273]]],[[[108.292,3.6701],[108.132,3.6365],[107.9074,3.9065],[108.2152,4.2172],[108.3878,3.9614],[108.292,3.6701]]],[[[108.2617,-2.7948],[108.1126,-3.1765],[107.612,-3.1134],[107.6006,-2.7948],[107.6648,-2.5979],[107.8068,-2.549],[108.2617,-2.7948]]],[[[107.648,.9447],[107.411,.8335],[107.2667,1.0292],[107.375,1.1505],[107.6441,1.0482],[107.648,.9447]]],[[[106.3714,-2.2733],[106.582,-2.9165],[106.0495,-2.7466],[105.7373,-2.2733],[105.3193,-1.9868],[105.414,-1.766],[105.6093,-1.5481],[105.9736,-1.6191],[106.0339,-1.766],[106.3714,-2.2733]]],[[[106.5122,3.1842],[106.4163,2.9895],[106.1573,3.3387],[106.3426,3.4309],[106.5122,3.1842]]],[[[105.9748,-3.1274],[105.6646,-5.7527],[104.7093,-5.5988],[104.383,-5.7113],[102.3591,-3.991],[101.0404,-2.4721],[100.9427,-2.2733],[100.6934,-1.766],[100.2783,-.8786],[99.1631,.4309],[98.6906,1.6615],[97.8741,2.2957],[96.9479,3.5275],[95.5685,4.7281],[95.3465,5.1664],[95.4219,5.428],[97.5344,5.0736],[98.4114,4.0921],[99.6667,3.1949],[100.4713,2.3804],[101.5518,2.0194],[102.6702,1.1256],[103.4741,.8441],[103.7046,.0964],[103.5984,-.6624],[103.8633,-.8786],[104.3262,-1.1385],[104.6592,-1.766],[104.9251,-2.213],[105.0451,-2.2733],[105.5831,-2.5431],[105.9748,-3.1274]]],[[[104.7347,-.1246],[104.4905,-.5724],[104.2953,-.5163],[104.4937,-.1329],[104.3405,.1632],[104.4524,.4518],[104.7347,-.1246]]],[[[104.6311,1.1455],[104.6594,.8854],[104.4013,.9806],[104.1714,.8854],[103.7964,.8393],[103.7358,.8982],[103.8862,1.0958],[104.6311,1.1455]]],[[[102.4806,-5.3315],[102.4298,-5.5778],[102.2056,-5.5632],[102.0971,-5.3299],[102.4806,-5.3315]]],[[[100.5247,-3.1488],[100.4948,-3.3303],[100.3367,-3.2822],[100.1827,-2.8695],[99.9877,-2.755],[100.1404,-2.6254],[100.5247,-3.1488]]],[[[99.8006,-2.3453],[99.6017,-2.3663],[99.4535,-2.1449],[99.6201,-1.9584],[99.8006,-2.3453]]],[[[99.2935,-1.7403],[99.0749,-1.7677],[98.7771,-1.5369],[98.6554,-1.0321],[98.8921,-.9809],[99.2935,-1.7403]]],[[[98.5559,-.3306],[98.5307,-.6294],[98.2976,-.5521],[98.4386,-.1462],[98.5559,-.3306]]],[[[97.8792,.9705],[97.7805,.6049],[97.2774,1.202],[97.2224,1.3677],[97.3613,1.4891],[97.6662,1.202],[97.8792,.9705]]],[[[96.4661,2.4402],[96.2482,2.3423],[96.0973,2.5642],[95.7378,2.6674],[95.695,2.8271],[96.0973,2.7676],[96.4661,2.4402]]]]},properties:{name:"Indonesia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-13.9795,65.5766],[-13.7583,65.2412],[-13.955,64.8599],[-14.991,64.2925],[-18.2325,63.4908],[-20.1327,63.5482],[-21.9677,63.883],[-22.1255,64.0406],[-21.7569,64.3256],[-21.37,64.3803],[-22.1039,64.4324],[-22.9771,64.8024],[-22.5479,65.4471],[-23.6334,65.4704],[-23.9554,65.6835],[-22.7011,66.2838],[-21.8994,66.1389],[-20.973,65.5252],[-20.0898,65.9505],[-17.4718,66.0604],[-16.0154,66.4212],[-14.8549,66.0685],[-13.9795,65.5766]]]},properties:{name:"Iceland"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[96.722,-12.1294],[96.7655,-11.9425],[96.91,-11.9769],[97.0362,-12.2452],[96.7881,-12.3034],[96.722,-12.1294]]]},properties:{name:"Cocos (Keeling) Islands"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-56.5765,50.0328],[-56.514,49.9506],[-56.1747,50.0772],[-55.486,49.4964],[-54.8391,49.5075],[-54.3228,49.7405],[-53.5861,49.2583],[-53.7108,48.9673],[-53.6122,48.6333],[-53.2101,48.4958],[-53.6108,47.8203],[-53.548,47.7414],[-53.2551,47.8352],[-52.7355,47.5814],[-53.1183,46.7567],[-54.0635,46.893],[-54.027,47.3325],[-54.1678,47.4615],[-54.5468,47.4398],[-55.5303,46.9241],[-55.7128,47.0319],[-55.2853,47.3492],[-55.2401,47.5781],[-56.0516,47.709],[-58.841,47.6074],[-59.2959,47.7606],[-58.67,48.4096],[-57.1875,50.841],[-56.4434,51.4306],[-55.8965,51.5913],[-55.514,51.4954],[-56.5765,50.0328]]],[[[-67.2702,45.1886],[-67.7647,45.7142],[-67.7815,46.0459],[-67.8174,47.0362],[-68.3747,47.349],[-68.8921,47.206],[-68.9977,47.3552],[-69.2777,47.3844],[-69.8084,46.8614],[-70.3752,45.8014],[-70.8839,45.369],[-71.7863,45.0078],[-74.9771,44.9407],[-76.011,44.2472],[-76.8745,43.668],[-78.7616,43.5853],[-79.0575,43.4429],[-79.0567,43.3347],[-79.0466,42.8794],[-79.241,42.7271],[-82.7186,41.7827],[-82.9607,42.0964],[-82.3027,43.3347],[-82.1811,43.6656],[-82.3354,44.2472],[-82.6251,45.3393],[-85.0831,46.9699],[-88.0434,48.1758],[-89.435,47.9857],[-89.6593,48.0179],[-90.0133,48.0688],[-90.7911,48.1805],[-91.0362,48.1534],[-91.5593,48.1211],[-92.9202,48.5702],[-94.2745,48.6951],[-95.0687,49.2416],[-95.824,49.0008],[-122.8092,49.0215],[-123.1007,49.0215],[-123.4626,49.4002],[-124.6564,49.7725],[-124.5411,49.4832],[-123.4779,48.757],[-123.6216,48.4456],[-124.1405,48.4645],[-125.2315,48.8222],[-127.8586,50.2265],[-128.2026,50.678],[-127.7437,50.9841],[-127.8236,51.3989],[-128.4085,52.2116],[-129.2663,52.7032],[-129.4957,53.1624],[-130.4093,53.5743],[-130.534,54.8067],[-130.4276,54.8695],[-130.4192,54.8695],[-130.2438,54.8695],[-130.1553,54.8695],[-130.1037,54.8695],[-130.0749,54.8695],[-130.0719,54.874],[-130.0594,54.887],[-130.0521,54.9002],[-130.0493,54.903],[-130.0412,54.9186],[-130.0387,54.9364],[-130.0422,54.9541],[-130.0514,54.9696],[-130.0652,54.9812],[-130.082,54.9877],[-130.1001,54.9883],[-130.1071,54.9873],[-130.1148,54.9937],[-130.1311,55.0209],[-130.1376,55.0491],[-130.1517,55.0596],[-130.1617,55.0721],[-130.164,55.0812],[-130.1602,55.0912],[-130.1386,55.1183],[-130.1266,55.1493],[-130.1075,55.1667],[-130.0873,55.1911],[-130.034,55.2271],[-130.0081,55.2493],[-129.9558,55.2807],[-129.9469,55.2902],[-129.9492,55.2946],[-129.9605,55.302],[-129.9714,55.3182],[-129.9943,55.3306],[-130.0015,55.3372],[-130.0049,55.3616],[-130.0151,55.3836],[-130.0163,55.4122],[-130.0118,55.424],[-130.0193,55.4354],[-130.0244,55.4579],[-130.0678,55.4961],[-130.0747,55.5061],[-130.0787,55.5232],[-130.0889,55.5331],[-130.0984,55.5548],[-130.1088,55.5654],[-130.1095,55.5806],[-130.1042,55.6162],[-130.0946,55.6285],[-130.0896,55.6448],[-130.0912,55.6664],[-130.0875,55.6831],[-130.1046,55.6967],[-130.1184,55.703],[-130.1287,55.714],[-130.1366,55.7477],[-130.1308,55.7673],[-130.1131,55.7864],[-130.1072,55.7963],[-130.0699,55.8189],[-130.032,55.8624],[-130.0185,55.8734],[-130.0138,55.8806],[-130.0036,55.887],[-129.9901,55.9158],[-129.994,55.9205],[-130.0002,55.9222],[-130.0061,55.9213],[-130.0102,55.9171],[-131.7547,56.6577],[-133.4872,58.471],[-134.5386,59.1177],[-135.0304,59.5094],[-135.4947,59.7832],[-136.1363,59.635],[-136.2508,59.5094],[-136.5724,59.1992],[-137.0381,59.0793],[-137.4221,58.9656],[-138.0988,59.5094],[-139.0965,60.0754],[-139.1645,60.3358],[-139.9046,60.2219],[-140.8352,60.2915],[-141,60.5156],[-140.999,64.4949],[-140.999,64.7661],[-140.9942,68.2307],[-140.9923,69.6172],[-139.3778,69.5422],[-137.9611,69.1467],[-136.6084,68.9884],[-134.9684,69.4984],[-133.1407,69.4792],[-130.3626,70.0533],[-129.6589,69.7592],[-129.2014,69.7561],[-127.811,70.2888],[-125.7819,69.508],[-124.7253,69.8874],[-123.9277,69.4961],[-122.7378,69.7326],[-121.5173,69.7247],[-117.5206,69.0146],[-114.948,68.755],[-114.4288,68.48],[-114.5186,68.0542],[-114.095,67.8625],[-111.8357,67.7432],[-109.4388,67.9373],[-108.6718,67.6161],[-108.1858,67.871],[-108.3965,68.2454],[-108.2937,68.4449],[-106.4051,68.8372],[-105.5947,68.7064],[-103.9784,68.0309],[-102.4075,67.8603],[-99.1508,67.9024],[-98.5005,68.5568],[-98.7368,69.1683],[-97.5263,69.7122],[-96.4408,69.4904],[-95.9272,69.1323],[-96.4467,68.355],[-95.696,67.5406],[-95.2905,67.9147],[-94.4406,68.2865],[-94.0012,68.7589],[-94.2568,69.3459],[-95.5422,69.5189],[-96.2832,70.3142],[-96.2689,71.0031],[-95.6691,71.4902],[-95.3822,71.9751],[-95.398,73.4821],[-93.2258,74.1045],[-91.1484,73.954],[-90.7357,73.7537],[-92.0829,72.8431],[-93.5219,72.6496],[-94.0476,71.8608],[-93.129,71.3532],[-92.1471,70.5143],[-91.9321,69.6981],[-90.0133,69.1615],[-88.4412,68.8645],[-88.138,68.5301],[-87.9399,67.755],[-87.0639,67.4663],[-86.4941,68.0551],[-85.3995,68.7259],[-85.1384,69.521],[-84.7889,69.8181],[-86.4354,70.2708],[-88.1811,70.4404],[-88.6872,70.6769],[-88.8827,71.2027],[-89.7216,71.6464],[-89.7758,72.1788],[-89.5814,72.4993],[-87.9973,73.5359],[-86.7641,73.7605],[-85.7874,73.6732],[-85.7165,73.5005],[-86.1608,73.0173],[-86.3245,72.4901],[-86.0552,72.0023],[-85.5669,71.7875],[-85.3559,72.7713],[-84.4327,73.3551],[-82.9486,73.6203],[-81.7693,73.5421],[-80.831,73.0294],[-80.2391,72.4191],[-79.8277,72.342],[-78.864,72.4324],[-78.6286,72.5918],[-79.9532,73.0126],[-80.3313,73.2731],[-80.3662,73.5016],[-78.1027,73.5641],[-76.8959,73.2283],[-76.1224,72.6543],[-74.8499,72.1739],[-74.4059,71.626],[-71.9445,71.4616],[-70.4937,70.8428],[-69.008,70.5967],[-67.9682,70.2006],[-67.5952,69.9388],[-67.467,69.5059],[-67.8496,68.9237],[-67.7593,68.7263],[-65.9779,68.069],[-64.7092,67.8345],[-63.1422,67.1183],[-62.0934,66.8906],[-61.8229,66.6387],[-63.8759,65.2494],[-64.7196,65.3706],[-66.2115,66.069],[-66.9466,65.9731],[-67.0573,65.662],[-66.8539,65.2661],[-65.5592,64.582],[-64.5783,63.6743],[-65.0837,62.7371],[-67.3908,63.1229],[-67.2886,62.8874],[-66.354,62.2975],[-66.2703,61.9785],[-70.4062,62.6748],[-72.0739,63.574],[-74.0855,64.2396],[-76.5583,64.2738],[-77.6771,64.5845],[-77.6977,64.9509],[-77.2058,65.27],[-75.4539,65.3396],[-74.3871,65.6222],[-73.8732,66.3804],[-72.7415,67.4922],[-73.4276,68.2274],[-73.7263,68.2726],[-74.3337,68.0068],[-75.1629,68.6727],[-76.1914,68.9253],[-76.802,69.5982],[-77.9055,70.1187],[-78.6401,70.2417],[-79.8116,69.731],[-80.7852,69.9102],[-82.0054,69.6635],[-81.5547,68.9269],[-81.8718,68.2421],[-81.6273,67.3838],[-81.9579,66.9476],[-83.5704,66.4754],[-84.0305,66.0376],[-85.2198,66.3715],[-85.8537,66.353],[-88.0746,64.3328],[-90.0133,63.8897],[-90.6491,63.5232],[-91.0362,63.0553],[-92.0439,62.7129],[-92.6448,62.2673],[-92.8154,61.8699],[-93.8632,61.4412],[-94.526,60.5553],[-94.7573,59.8097],[-94.5633,58.9588],[-93.2035,58.5386],[-92.3943,57.2082],[-91.0362,57.2002],[-90.0133,56.9973],[-88.9249,56.7678],[-87.2257,55.9936],[-85.4401,55.4453],[-82.7271,54.9859],[-81.9936,53.1694],[-81.1298,53.1518],[-80.7269,52.7814],[-81.7804,52.9563],[-81.8014,52.7503],[-80.6083,51.6691],[-79.7291,51.4105],[-79.0711,51.6588],[-78.8132,52.1842],[-79.3486,54.6638],[-77.8159,55.3825],[-76.7132,56.3715],[-77.1515,57.7435],[-78.3083,58.7537],[-77.6812,59.8697],[-78.0104,61.2482],[-77.9943,61.9607],[-77.7448,62.3235],[-76.977,62.4467],[-75.481,62.2637],[-73.6147,62.3018],[-72.2227,61.8358],[-71.162,61.2419],[-69.8858,60.9316],[-69.5644,60.5604],[-69.2923,59.4739],[-67.7417,58.598],[-66.6124,58.7119],[-65.2886,59.7983],[-64.3842,59.9948],[-61.9721,57.7991],[-60.4872,55.8211],[-59.4916,55.1841],[-57.7432,54.6536],[-57.1405,54.0534],[-56.191,53.481],[-55.9106,52.4896],[-56.8548,51.6009],[-58.3277,51.1443],[-60.1202,50.3193],[-66.2184,50.11],[-68.3068,49.082],[-68.9977,48.2561],[-66.6534,49.0046],[-65.1852,49.0974],[-64.7853,48.9734],[-64.6137,48.5881],[-65.3673,47.8865],[-64.9618,47.5552],[-64.6095,46.8288],[-64.4036,46.6956],[-64.0601,46.9239],[-63.4098,46.4767],[-62.2794,46.4139],[-62.4591,46.0575],[-62.7009,45.9843],[-64.3195,46.5303],[-64.0986,46.183],[-63.4742,45.9214],[-62.0915,45.8108],[-60.7162,46.547],[-60.3791,46.2387],[-60.4891,45.9772],[-61.4726,45.2013],[-65.4186,43.69],[-65.8272,43.8294],[-65.891,44.2139],[-65.0052,45.3319],[-67.2702,45.1886]]],[[[-58.863,48.5019],[-59.0496,48.4247],[-59.2231,48.5084],[-59.1352,48.6998],[-58.904,48.7033],[-58.863,48.5019]]],[[[-60.1621,56.3627],[-60.3062,56.1331],[-60.6857,56.2554],[-60.6032,56.3497],[-60.1621,56.3627]]],[[[-61.7247,49.1508],[-62.2186,49.0682],[-63.3233,49.3232],[-64.2525,49.8069],[-64.2813,49.849],[-64.1519,49.9417],[-63.3233,49.8129],[-61.9415,49.3513],[-61.7247,49.1508]]],[[[-64.634,82.8393],[-62.8285,82.2455],[-63.5304,81.8894],[-65.809,81.6127],[-66.3801,81.1774],[-71.1978,79.8647],[-76.8768,79.3447],[-76.969,79.2079],[-76.7239,79.0734],[-75.4125,79.0071],[-75.2548,78.6978],[-76.0256,78.1013],[-78.0005,77.7695],[-78.7169,77.2111],[-78.5193,76.7064],[-79.9227,76.3434],[-82.0678,76.5072],[-85.4058,76.3658],[-88.8467,76.573],[-89.0176,76.6748],[-88.9425,76.8133],[-87.8415,77.2064],[-87.4276,77.7323],[-86.6853,77.768],[-85.3855,77.5307],[-85.2001,77.821],[-86.7618,78.2927],[-87.3589,78.6476],[-88.8949,78.3188],[-90.0133,78.2807],[-91.0362,78.2563],[-92.2878,78.3216],[-93.4558,78.8088],[-92.9526,79.2081],[-92.9775,79.3699],[-95.1843,79.3743],[-96.0661,79.946],[-95.6138,80.6963],[-93.6758,81.2499],[-92.3157,81.214],[-91.0362,80.8467],[-90.0133,80.5777],[-88.8305,80.2772],[-87.794,80.2427],[-86.8415,79.865],[-85.5152,80.2641],[-82.3146,79.9506],[-81.3021,80.5144],[-85.3214,80.5719],[-86.4412,80.9213],[-87.9007,80.7733],[-89.247,80.9846],[-90.0133,81.441],[-90.4005,81.687],[-90.0133,81.8375],[-87.2029,82.0392],[-85.4819,82.401],[-83.2212,82.3593],[-81.2588,82.7922],[-75.554,83.0968],[-64.634,82.8393]]],[[[-64.4904,60.5822],[-64.6757,60.4546],[-64.9297,60.4606],[-64.7762,60.6936],[-64.5538,60.7051],[-64.4904,60.5822]]],[[[-64.6824,61.4667],[-64.8241,61.3185],[-65.4341,61.6079],[-65.2985,61.8063],[-65.096,61.9197],[-64.7749,61.8063],[-64.6824,61.4667]]],[[[-68.0029,60.2987],[-68.3889,60.2024],[-68.3889,60.3594],[-68.1652,60.5739],[-67.8776,60.4617],[-68.0029,60.2987]]],[[[-75.8326,67.2588],[-76.7658,67.2192],[-77.1596,67.3849],[-77.2674,67.7328],[-77.1596,67.8934],[-76.7331,68.2183],[-76.3889,68.3091],[-75.5942,68.3091],[-75.0948,68.1834],[-75.0406,67.6097],[-75.8326,67.2588]]],[[[-76.638,63.4113],[-76.9357,63.3801],[-77.251,63.5979],[-77.1901,63.6594],[-76.7518,63.6104],[-76.638,63.4113]]],[[[-76.9385,69.174],[-77.1576,69.1314],[-77.3486,69.2686],[-77.3131,69.4079],[-77.1576,69.4467],[-76.7579,69.3554],[-76.9385,69.174]]],[[[-77.4909,56.4498],[-77.6975,56.1912],[-77.9406,56.3449],[-77.7018,56.5131],[-77.4909,56.4498]]],[[[-77.5025,64.042],[-77.5602,63.8396],[-77.913,63.9513],[-77.6702,64.1692],[-77.5025,64.042]]],[[[-77.5392,63.2428],[-77.915,63.1115],[-78.3512,63.3036],[-78.4372,63.3997],[-78.3072,63.4675],[-77.7613,63.4387],[-77.5392,63.2428]]],[[[-78.0398,69.6028],[-78.5557,69.4952],[-78.646,69.5597],[-78.3636,69.699],[-77.997,69.7162],[-78.0398,69.6028]]],[[[-78.8433,68.9103],[-79.2693,68.837],[-79.3917,68.8927],[-79.3095,68.9986],[-78.5376,69.3941],[-78.3191,69.2421],[-78.8433,68.9103]]],[[[-78.5227,68.6605],[-78.6028,68.4607],[-78.936,68.4827],[-78.8512,68.7053],[-78.5227,68.6605]]],[[[-78.6262,56.8871],[-78.7017,56.6116],[-78.9507,56.7162],[-78.9553,56.9256],[-78.6262,56.8871]]],[[[-79.0735,56.4461],[-78.708,56.3891],[-78.664,56.1747],[-78.7927,56.0237],[-79.0959,56.0516],[-79.2156,56.1747],[-79.3997,55.9255],[-79.6946,55.8329],[-80.0602,55.8365],[-80.0824,56.1832],[-79.8088,56.0661],[-79.8088,56.3689],[-79.5522,56.5141],[-79.3449,56.4011],[-79.2039,56.6387],[-79.0735,56.4461]]],[[[-78.8122,68.2803],[-79.0089,68.1435],[-79.2415,68.227],[-79.1799,68.3905],[-78.9156,68.4049],[-78.8122,68.2803]]],[[[-78.9366,75.9665],[-79.2229,75.8124],[-79.3987,75.9092],[-79.1078,76.141],[-78.9366,75.9665]]],[[[-79.134,51.9211],[-79.4743,51.8714],[-79.5693,51.9558],[-79.1708,52.181],[-79.134,51.9211]]],[[[-79.4762,61.8566],[-79.6792,61.6126],[-80.1522,61.8203],[-80.1993,62.152],[-79.9465,62.3472],[-79.6762,62.3946],[-79.4022,62.3282],[-79.2964,62.152],[-79.3329,62.0291],[-79.4269,61.9648],[-79.4762,61.8566]]],[[[-94.833,76.9745],[-90.7953,76.5602],[-90.0133,76.6288],[-89.7865,76.3309],[-90.0133,76.0853],[-90.0133,75.9908],[-89.6593,75.8131],[-89.435,75.7129],[-88.9084,75.4624],[-88.6472,75.6199],[-86.4242,75.4013],[-84.0155,75.7922],[-82.6153,75.7929],[-79.8986,75.5356],[-79.6258,75.3944],[-79.4489,74.9901],[-80.602,74.5878],[-82.5764,74.5454],[-83.2128,74.7429],[-84.7803,74.5058],[-89.435,74.6262],[-89.6593,74.6402],[-90.0133,74.6656],[-91.8478,74.9562],[-92.883,76.0794],[-95.0143,76.3256],[-95.6133,76.7282],[-94.833,76.9745]]],[[[-79.8685,53.2163],[-80.1555,53.1964],[-80.1734,53.3762],[-80.0095,53.4618],[-79.8052,53.3969],[-79.8685,53.2163]]],[[[-79.8494,59.9737],[-79.8394,59.7016],[-80.1243,59.7139],[-80.3602,59.5323],[-80.4539,59.6548],[-80.3618,59.8907],[-80.1771,59.8368],[-79.9893,60.0204],[-79.8494,59.9737]]],[[[-85.1864,65.5481],[-84.9418,65.3192],[-84.4343,65.3741],[-82.246,64.6579],[-81.8456,64.5007],[-81.5201,64.1043],[-80.8286,64.0271],[-80.5021,63.7557],[-81.1424,63.4783],[-83.344,64.0817],[-84.8175,63.2434],[-85.3688,63.141],[-85.7767,63.6411],[-86.7482,63.6854],[-86.7996,63.7393],[-86.3666,64.0987],[-86.3026,64.6579],[-85.9173,65.7099],[-84.9339,66.033],[-84.6282,65.6982],[-85.1864,65.5481]]],[[[-83.0197,62.2169],[-83.733,62.1515],[-83.8854,62.452],[-83.4624,62.8497],[-82.1604,62.9751],[-81.9062,62.8897],[-82.0289,62.6718],[-83.0197,62.2169]]],[[[-86.5326,70.092],[-86.5528,69.9828],[-87.1228,70.0126],[-87.1745,70.0681],[-87.0819,70.1622],[-86.5326,70.092]]],[[[-90.0133,77.3929],[-91.0092,77.1827],[-91.1136,77.2544],[-91.1656,77.4586],[-91.1013,77.5717],[-90.97,77.6054],[-90.2109,77.5592],[-90.0133,77.4185],[-90.0133,77.3929]]],[[[-95.4147,77.8092],[-93.9653,77.7465],[-93.5232,77.7717],[-93.3416,77.6694],[-93.5198,77.4673],[-93.9653,77.4561],[-95.9977,77.4895],[-96.2635,77.6327],[-96.055,77.7372],[-95.4147,77.7652],[-95.4147,77.8092]]],[[[-93.5013,74.7845],[-93.9823,74.6497],[-96.2486,74.9573],[-96.3837,75.032],[-96.274,75.2432],[-95.681,75.5192],[-94.7543,75.6115],[-93.5674,75.2432],[-93.5013,74.7845]]],[[[-94.4815,76.0104],[-94.3575,75.7355],[-94.8515,75.7996],[-94.8178,75.942],[-94.4815,76.0104]]],[[[-94.8963,78.1037],[-95.1153,77.9672],[-95.4119,77.9688],[-96.8501,77.7885],[-97.2136,77.9492],[-97.2436,78.1407],[-97.9712,78.2509],[-98.2853,78.6715],[-97.9674,78.8153],[-96.8779,78.697],[-95.4174,78.4959],[-95.0803,78.4207],[-94.8963,78.1037]]],[[[-95.4626,74.6956],[-95.3838,74.4766],[-95.7246,74.4989],[-95.8748,74.6624],[-95.4626,74.6956]]],[[[-96.3969,75.4318],[-96.6837,75.3288],[-96.8415,75.4426],[-96.2946,75.6848],[-95.9934,75.6268],[-95.9554,75.5039],[-96.3969,75.4318]]],[[[-97.88,73.0734],[-97.0126,72.777],[-97.0524,73.0718],[-96.823,73.1717],[-96.4015,72.4342],[-96.8809,71.8208],[-98.6701,71.3129],[-101.8311,72.4226],[-102.6382,72.759],[-102.4485,72.9756],[-101.8311,72.9935],[-101.2478,72.7399],[-100.4041,72.8561],[-100.5413,73.1934],[-101.3264,73.4662],[-100.7734,73.8151],[-97.7582,74.082],[-97.6879,73.8986],[-97.0759,73.6786],[-97.2122,73.4228],[-97.8059,73.2384],[-97.88,73.0734]]],[[[-96.9622,76.4161],[-97.2393,76.3408],[-97.3729,76.5176],[-97.1817,76.6802],[-96.9622,76.4161]]],[[[-97.2386,74.6784],[-97.2929,74.424],[-97.6589,74.5584],[-97.4391,74.7278],[-97.2386,74.6784]]],[[[-97.9147,76.4941],[-97.4178,75.5273],[-97.8048,75.482],[-97.8886,75.1289],[-98.0308,75.0461],[-99.6238,74.979],[-100.2619,75.0499],[-100.4783,75.586],[-102.4592,75.5089],[-102.704,75.7702],[-103.7575,75.8914],[-104.3683,76.1469],[-104.4543,76.5494],[-103.9215,76.635],[-101.9721,75.9686],[-101.7795,76.4066],[-100.6133,76.2143],[-100.5612,76.2998],[-100.7677,76.5772],[-100.7212,76.6632],[-97.9147,76.4941]]],[[[-98.6659,79.8217],[-98.909,79.6889],[-99.8492,79.9269],[-99.8898,79.9752],[-99.8407,80.0331],[-98.9605,80.1096],[-98.6659,79.8217]]],[[[-102.9396,79.2494],[-102.5686,78.8768],[-101.5083,79.0614],[-99.7049,78.5941],[-99.7049,78.3019],[-99.0691,78.1025],[-99.2325,77.8615],[-99.7049,77.8185],[-100.4781,77.8729],[-100.8606,78.1061],[-101.5999,78.2548],[-102.5686,78.2389],[-103.2252,78.3494],[-104.0423,78.2396],[-104.7025,78.3333],[-104.8906,78.4569],[-104.6674,78.5809],[-104.0423,78.5203],[-103.5632,78.5978],[-103.7027,78.8029],[-104.0423,78.8029],[-104.0423,78.9523],[-104.7528,78.8698],[-104.9512,79.0377],[-105.5071,79.0197],[-105.6443,79.1494],[-105.5071,79.253],[-104.0423,79.3838],[-102.9396,79.2494]]],[[[-100.4044,68.7105],[-100.6374,68.4301],[-100.8119,68.4579],[-100.7931,68.6218],[-100.626,68.6835],[-100.7474,68.804],[-100.5105,69.0421],[-100.2316,69.0421],[-100.1209,69.1493],[-99.994,69.0421],[-100.0428,68.7873],[-100.4044,68.7105]]],[[[-100.1155,70.5892],[-100.1401,70.4241],[-100.6654,70.5828],[-100.7013,70.6967],[-100.5447,70.819],[-100.3902,70.6967],[-100.1155,70.5892]]],[[[-105.2221,72.6833],[-104.3428,71.4584],[-104.3357,71.0246],[-103.8412,70.7572],[-101.8355,70.3488],[-101.0933,70.2146],[-100.9141,70.043],[-100.9171,69.9116],[-101.1428,69.712],[-100.8891,69.4933],[-101.1049,69.3543],[-101.3283,69.4937],[-101.3179,69.7102],[-101.8355,69.7051],[-102.3125,69.8289],[-102.7389,69.5621],[-102.7088,69.4625],[-102.2548,69.4756],[-101.7501,69.2359],[-101.8355,69.1418],[-102.7899,68.8376],[-104.7223,68.8869],[-106.1736,69.1765],[-106.6447,69.4203],[-107.472,69.0244],[-109.1225,68.7213],[-112.6339,68.4935],[-113.2259,68.5488],[-113.8908,69.2008],[-116.0305,69.3347],[-117.0197,69.651],[-117.3066,69.9628],[-116.4708,70.1785],[-114.5359,70.312],[-112.6339,70.2603],[-112.4132,70.2756],[-112.3107,70.4562],[-113.9367,70.7106],[-117.1482,70.5476],[-117.9915,70.9246],[-117.9834,71.0259],[-116.8858,71.3185],[-116.9014,71.4244],[-118.0035,71.3903],[-118.9192,71.8132],[-118.2328,72.239],[-118.3273,72.5325],[-117.2304,72.9289],[-114.3876,73.3235],[-114.0156,73.0806],[-114.2225,72.6195],[-113.503,72.7266],[-113.1294,72.959],[-112.6339,72.94],[-111.3353,72.7281],[-111.1915,72.6046],[-111.1886,72.4153],[-110.4109,72.6557],[-110.2948,72.9462],[-109.8232,72.9279],[-108.5943,72.5739],[-108.4309,72.1653],[-107.8917,71.7223],[-107.4532,71.9007],[-108.0046,72.7207],[-108.0476,73.2378],[-106.5375,73.2711],[-106.6812,73.5292],[-106.54,73.6625],[-105.3363,73.7339],[-104.5731,73.4787],[-105.2221,72.6833]]],[[[-101.2059,77.7343],[-102.0822,77.6812],[-102.432,77.7519],[-102.488,77.8373],[-102.4295,77.8894],[-101.758,77.9116],[-101.2025,77.8425],[-101.2059,77.7343]]],[[[-101.6833,68.712],[-101.8306,68.5891],[-102.1469,68.6128],[-102.2525,68.6979],[-101.8306,68.804],[-101.6833,68.712]]],[[[-103.7767,75.2433],[-104.1951,75.0408],[-104.6732,75.121],[-104.7081,75.2433],[-104.3159,75.4419],[-104.0786,75.4379],[-103.7767,75.2433]]],[[[-104.2454,68.4797],[-104.511,68.3328],[-104.7591,68.4994],[-104.5718,68.6179],[-104.2454,68.4797]]],[[[-104.5417,77.17],[-104.917,77.1132],[-105.5118,77.2857],[-105.8716,77.6607],[-105.5118,77.7265],[-104.5268,77.2763],[-104.5417,77.17]]],[[[-108.3209,76.0307],[-107.3727,75.9059],[-106.3451,76.0395],[-105.546,75.8839],[-105.4376,75.659],[-105.858,75.2433],[-106.1079,75.0561],[-108.4827,74.9374],[-108.93,75.0174],[-111.414,74.568],[-112.6341,74.4562],[-113.2271,74.4295],[-114.0031,74.6144],[-113.9991,74.7201],[-112.0824,75.0361],[-112.0807,75.1419],[-112.6341,75.1917],[-113.6837,75.0803],[-114.009,75.4392],[-114.375,75.1365],[-115.0009,74.9954],[-117.3462,75.2316],[-117.3941,75.2935],[-116.6303,76.0423],[-115.6926,76.3877],[-114.3342,76.4672],[-113.7928,76.2331],[-112.6341,76.1889],[-111.0779,75.5522],[-109.0441,75.5375],[-108.9996,75.6525],[-109.5307,75.85],[-109.5904,76.1549],[-110.1009,76.3663],[-109.3993,76.744],[-108.8421,76.8094],[-108.2831,76.2969],[-108.3209,76.0307]]],[[[-109.7381,78.412],[-112.6657,78.3158],[-112.8388,78.4256],[-112.7913,78.4726],[-110.4607,78.7363],[-109.7243,78.5202],[-109.7381,78.412]]],[[[-110.3821,77.5079],[-112.1137,77.3568],[-113.1834,77.594],[-113.2337,77.85],[-112.6441,77.9594],[-110.0182,78.0399],[-110.3821,77.5079]]],[[[-111.5035,68.171],[-111.8802,68.1509],[-111.9607,68.2251],[-111.6133,68.437],[-111.5035,68.171]]],[[[-113.6985,76.892],[-113.6178,76.7117],[-114.6547,76.7444],[-114.7274,76.8039],[-114.6606,76.8648],[-113.6985,76.892]]],[[[-113.7993,77.7334],[-114.3405,77.7072],[-114.7195,77.9061],[-114.3405,78.0948],[-114.3405,78.0127],[-113.6523,77.848],[-113.7993,77.7334]]],[[[-121.3047,74.5393],[-118.9321,74.0881],[-118.1611,74.2722],[-117.1603,74.1672],[-116.9752,74.1142],[-115.5888,73.5649],[-115.5964,73.4622],[-118.7569,72.7354],[-119.4055,72.3395],[-119.9617,72.232],[-120.3803,71.9613],[-120.6059,71.5197],[-121.9312,71.3785],[-122.0624,71.2928],[-122.5414,71.1983],[-122.8087,71.084],[-123.2288,71.1276],[-123.5077,71.3567],[-124.2544,71.7416],[-125.6619,71.963],[-125.7307,72.0537],[-125.6619,72.2569],[-125.5253,72.2802],[-125.1229,72.6513],[-124.964,72.6845],[-124.4509,73.3708],[-123.896,73.736],[-124.5878,74.2423],[-124.5575,74.3379],[-122.8087,74.4603],[-121.3047,74.5393]]],[[[-115.9759,76.929],[-116.1233,76.6379],[-117.0356,76.5275],[-116.9858,76.3726],[-117.1527,76.2903],[-117.7573,76.3284],[-117.9772,76.5058],[-117.9589,76.7079],[-118.1453,76.7722],[-118.5494,76.5058],[-118.642,76.3771],[-119.0739,76.1429],[-119.5321,76.2913],[-119.5562,75.9818],[-119.9432,75.8513],[-120.4099,75.8741],[-120.6347,76.0108],[-121.0154,75.7094],[-121.1406,75.9524],[-122.5985,76.0193],[-122.6834,76.2114],[-122.408,76.3952],[-121.3904,76.5058],[-121.1092,76.733],[-119.9432,77.0218],[-119.0408,77.3289],[-117.1527,77.3603],[-116.4539,77.5506],[-115.7531,77.3612],[-115.7516,77.2575],[-116.1792,77.1285],[-115.9759,76.929]]],[[[-118.3616,75.5448],[-118.5534,75.4962],[-119.145,75.5576],[-119.1932,75.6193],[-118.6909,75.8966],[-118.1422,75.9845],[-117.7591,76.13],[-117.4868,76.082],[-117.767,75.8388],[-118.3616,75.5448]]],[[[-124.8749,70.2862],[-124.9891,69.9567],[-125.2347,70.0163],[-125.2088,70.1956],[-124.8749,70.2862]]],[[[-130.6891,54.4046],[-130.8338,54.2143],[-130.9982,54.5676],[-130.7585,54.6445],[-130.6891,54.4046]]],[[[-131.0971,52.2697],[-131.2355,52.1354],[-131.5019,52.4746],[-131.2355,52.4942],[-131.0971,52.2697]]],[[[-131.5903,52.9486],[-132.1017,52.7488],[-132.2233,52.8573],[-132.4797,53.3343],[-132.9286,53.5556],[-133.1223,53.8956],[-133.085,54.2386],[-132.9016,54.1635],[-131.7587,54.0151],[-131.9297,53.5556],[-131.9061,53.2954],[-131.5903,52.9486]]]]},properties:{name:"Canada"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[27.4436,5.0194],[28.3376,4.3157],[29.7103,4.5969],[30.8545,3.4875],[30.7765,2.5135],[31.2496,2.0752],[30.0157,.8003],[29.8398,.252],[29.7816,.0707],[29.721,-.1179],[29.6422,-.8786],[29.5895,-1.3866],[29.2083,-1.766],[28.9949,-2.2733],[28.9465,-2.3881],[29.0406,-2.7438],[29.4233,-4.4475],[29.3874,-5.0153],[29.5996,-5.587],[29.5926,-6.3587],[30.2771,-7.1145],[30.7712,-8.1922],[29.016,-8.5161],[28.454,-9.2529],[28.6626,-9.794],[28.5408,-10.9113],[28.4861,-11.8258],[29.1044,-12.3704],[29.7932,-12.2818],[29.7527,-13.4086],[29.5569,-13.2535],[29.0399,-13.3796],[28.4077,-12.5205],[27.6036,-12.2134],[27.1699,-11.6261],[26.7612,-11.9646],[26.0386,-11.9177],[25.4764,-11.7233],[25.2205,-11.26],[24.396,-11.3999],[24.1243,-10.9113],[23.983,-10.9113],[23.0649,-11.0941],[22.2761,-11.0428],[22.2739,-10.3412],[21.8433,-9.4449],[21.9191,-8.4515],[21.6619,-7.309],[20.7264,-7.2513],[20.4216,-6.9498],[19.8263,-6.9975],[19.2527,-7.9545],[17.7714,-8.0899],[17.0219,-7.2667],[16.4629,-5.9179],[12.8501,-5.9411],[12.7227,-5.9948],[12.4187,-5.982],[12.1955,-5.7639],[12.4994,-5.6868],[12.5746,-5.0613],[13.1018,-4.6851],[13.4772,-4.7956],[13.7912,-4.4961],[14.2824,-4.3716],[14.4064,-4.4542],[14.4575,-4.7733],[14.6688,-4.8486],[15.1942,-4.3563],[15.86,-3.9206],[16.1709,-3.3396],[16.2257,-2.2733],[16.8321,-1.3121],[17.3029,-.8786],[17.6376,-.5705],[17.7769,.252],[18.1044,2.1845],[18.6251,3.4716],[18.6554,4.3279],[19.4799,5.075],[19.8888,5.0123],[20.6682,4.4533],[22.1795,4.175],[22.9998,4.6994],[23.5054,4.6884],[24.443,5.0286],[24.9587,4.9801],[25.5177,5.3238],[27.4436,5.0194]]]},properties:{name:"Democratic Republic of The Congo"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[22.8755,10.9314],[23.608,9.9187],[23.5994,8.8147],[24.2234,8.6422],[24.321,8.3317],[24.9801,8.016],[25.4062,7.3523],[26.29,6.6847],[26.6049,6.0962],[27.1693,5.6776],[27.4436,5.0194],[25.5177,5.3238],[24.9587,4.9801],[24.443,5.0286],[23.5054,4.6884],[22.9998,4.6994],[22.1795,4.175],[20.6682,4.4533],[19.8888,5.0123],[19.4799,5.075],[18.6554,4.3279],[18.6251,3.4716],[18.392,3.6187],[16.6837,3.5022],[16.192,2.2205],[16.0122,2.9309],[15.1777,3.8331],[14.5544,5.3255],[14.5004,6.0684],[15.5075,7.5275],[15.8854,7.4815],[16.5651,7.8021],[16.883,7.591],[17.6801,7.9654],[18.5893,8.0831],[19.0457,8.6058],[18.9757,8.9098],[20.3063,9.1517],[20.7327,9.3974],[21.6697,10.3052],[21.7863,10.7159],[22.4744,10.9768],[22.8755,10.9314]]]},properties:{name:"Central African Republic"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[18.6251,3.4716],[18.1044,2.1845],[17.7769,.252],[17.6376,-.5705],[17.3029,-.8786],[16.8321,-1.3121],[16.2257,-2.2733],[16.1709,-3.3396],[15.86,-3.9206],[15.1942,-4.3563],[14.6688,-4.8486],[14.4575,-4.7733],[14.4064,-4.4542],[14.2824,-4.3716],[13.7912,-4.4961],[13.4772,-4.7956],[13.1018,-4.6851],[12.7888,-4.4786],[11.9892,-4.9993],[11.201,-3.9916],[11.8945,-3.4408],[11.9433,-3.1022],[11.7476,-2.7148],[11.8464,-2.5027],[12.3425,-2.3577],[12.6158,-2.0511],[13.3829,-2.3436],[14.1596,-2.16],[14.3759,-1.7141],[14.4299,-.8786],[14.008,.0173],[14.3513,1.0236],[14.0479,1.3393],[13.3162,1.4466],[13.299,2.1706],[14.5151,2.1889],[16.0227,1.7813],[16.192,2.2205],[16.6837,3.5022],[18.392,3.6187],[18.6251,3.4716]]]},properties:{name:"Congo"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[9.5587,47.5419],[9.5307,47.2706],[9.476,47.0518],[9.6071,47.0608],[10.145,46.851],[10.4697,46.8549],[10.4528,46.5307],[10.1739,46.5798],[10.0507,46.335],[9.3475,46.472],[9.2485,46.2338],[9.1594,46.1696],[8.9121,45.8304],[8.7139,46.0973],[8.3847,46.4522],[7.8771,45.927],[7.8641,45.9168],[7.0449,45.9224],[6.8211,46.4272],[6.463,46.432],[6.2414,46.3436],[6.1776,46.1816],[5.9561,46.1321],[6.1256,46.3172],[6.064,46.4162],[6.1381,46.5577],[6.463,46.8511],[6.8602,47.1655],[6.8584,47.1672],[6.9392,47.4337],[7.1304,47.503],[7.3809,47.4319],[7.5109,47.5026],[7.5552,47.5646],[7.589,47.5899],[7.6341,47.5611],[7.7138,47.5394],[7.8941,47.5864],[8.4264,47.5675],[8.5149,47.6272],[8.5101,47.7762],[8.6138,47.8011],[8.6634,47.6859],[8.6705,47.6849],[9.1822,47.6559],[9.4956,47.5515],[9.5587,47.5419]]]},properties:{name:"Switzerland"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-5.5189,10.4333],[-5.117,10.2222],[-4.812,9.777],[-4.3699,9.6182],[-3.6098,9.9307],[-3.3739,9.8912],[-3.198,9.8618],[-2.7863,9.5629],[-2.6869,9.4907],[-2.5205,8.2869],[-3.1813,6.7737],[-2.8322,5.299],[-3.1058,5.0909],[-3.3739,5.1348],[-4.0246,5.2415],[-5.595,5.0728],[-7.5231,4.3617],[-7.4568,5.7608],[-8.4496,6.4988],[-8.3267,7.0841],[-8.4722,7.5546],[-8.1719,7.6791],[-8.0418,8.107],[-8.2025,8.2206],[-8.1489,8.4531],[-7.7092,8.5226],[-7.9101,8.8593],[-7.8783,9.2737],[-8.1218,9.6107],[-7.9785,10.1751],[-7.5603,10.415],[-6.9796,10.2777],[-6.3759,10.6631],[-6.0283,10.3127],[-5.5189,10.4333]]]},properties:{name:"Ivory Coast"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-157.7861,-9.075],[-157.9637,-9.1776],[-158.1467,-8.9599],[-158.1209,-8.8361],[-157.8847,-8.8845],[-157.7861,-9.075]]],[[[-159.5685,-21.2758],[-159.6923,-21.3824],[-159.9369,-21.3179],[-159.9866,-21.1757],[-159.6782,-21.1139],[-159.5685,-21.2758]]],[[[-162.9359,-13.4211],[-163.1309,-13.4225],[-163.415,-13.085],[-163.242,-13.0414],[-162.9359,-13.4211]]]]},properties:{name:"Cook Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[46.553,29.1012],[47.4177,28.9797],[47.7643,28.5452],[48.4333,28.5314],[48.9148,27.6301],[49.9616,26.8423],[50.2035,26.3608],[50.1167,25.8365],[50.815,24.7395],[51.3072,24.5064],[51.3465,24.3093],[51.5906,24.243],[52.6453,22.9764],[55.2083,22.7083],[55.6667,22],[55.623,21.8699],[55.5332,21.6026],[54.9485,20.0059],[52,19],[49.0135,18.5638],[48.1849,18.1433],[47.1932,16.9779],[46.7083,17.2521],[45.6126,17.308],[43.3633,17.4977],[43.183,16.6552],[42.7639,16.4046],[42.2907,17.3713],[41.6108,18.1055],[40.533,19.886],[39.3742,20.8823],[38.9569,22.7932],[38.4486,23.6967],[37.45,24.498],[37.1665,25.218],[36.6707,25.724],[35.3225,27.8117],[34.6586,28.1161],[34.957,29.3567],[36.081,29.223],[36.7808,29.8457],[37.4562,30.0187],[37.9246,30.5466],[37.0883,31.5014],[39.2009,32.1543],[40.4951,31.898],[42.1579,31.0566],[44.663,29.2518],[45.6126,29.1294],[46.1115,29.0876],[46.4258,29.0612],[46.553,29.1012]]]},properties:{name:"Saudi Arabia"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[179.9962,70.9763],[179.583,70.8674],[179.2345,70.8757],[178.7808,70.8069],[178.6083,71.0683],[178.8815,71.2158],[179.4381,71.4027],[179.9973,71.5246],[179.9962,70.9763]]],[[[130.6749,42.2836],[130.6238,42.45],[130.5711,42.6363],[130.46,42.6893],[131.1583,43.1226],[131.2039,44.8571],[131.8756,45.2894],[133.0211,45.139],[133.8238,46.2524],[134.1834,47.2206],[134.6406,47.6454],[134.6067,48.3298],[131.9987,47.7036],[131.1145,47.7422],[130.3126,48.931],[129.5609,49.3475],[127.6584,49.7757],[126.48,52.1446],[125.4695,53.0542],[123.3487,53.5256],[120.9957,53.2739],[120.208,52.7974],[120.1502,52.6928],[120.6094,52.4875],[120.6644,52.0663],[119.9519,51.4479],[119.1095,50.0654],[117.8074,49.5794],[116.7209,49.8498],[116.2426,49.9903],[115.4261,49.9355],[114.3649,50.236],[112.887,49.5712],[110.9163,49.2007],[108.8074,49.3345],[107.8553,49.9138],[106.5203,50.3292],[105.4152,50.4519],[103.5057,50.2012],[102.4373,50.5965],[101.9481,51.3734],[98.9786,52.0482],[97.9549,51.1391],[98.1961,50.2828],[97.3304,49.8163],[94.7987,50.0463],[94.1016,50.5591],[92.697,50.77],[92.4372,50.809],[90.0071,50.0358],[89.5277,49.6654],[89.1233,49.6048],[88.2913,49.48],[87.825,49.1833],[87.3126,49.0997],[86.6632,49.68],[86.0644,49.5438],[85.3276,49.658],[83.538,50.9008],[81.6483,50.8179],[80.754,51.2158],[79.9616,51.0371],[78.2111,52.9706],[76.7984,53.8832],[76.5796,54.2755],[75.5425,54.0876],[74.3649,53.5615],[73.6202,53.5211],[73.1022,54.0044],[71.2665,54.2568],[70.7176,55.2085],[69.013,55.3543],[67.9852,54.952],[65.6722,54.6387],[64.8622,54.3622],[61.3583,53.9303],[61.2404,53.6425],[61.6281,53.0971],[60.9869,52.8069],[60.8386,52.2997],[60.2825,51.9603],[61.3899,51.3192],[61.3457,50.9419],[61.1066,50.7718],[59.4875,50.6292],[58.0642,51.0787],[56.5075,50.972],[55.6774,50.6643],[54.9145,50.8104],[54.5327,50.6975],[53.2814,51.483],[52.3307,51.6643],[51.5214,51.544],[50.8212,51.6542],[48.9207,50.6761],[48.573,49.9575],[47.446,50.2984],[46.9351,49.7296],[46.6827,48.4677],[47.2665,47.8148],[48.0285,47.6876],[48.4852,47.4156],[48.8096,46.9554],[48.7942,46.599],[49.2136,46.3332],[48.3519,45.8178],[47.604,45.6259],[46.863,44.6345],[47.3607,43.8888],[47.5658,42.9899],[48.0231,42.3929],[48.3039,42.1059],[48.5218,41.8833],[48.5735,41.8254],[47.6587,41.2176],[46.7291,41.7331],[46.4205,41.9043],[45.9086,42.1059],[45.6621,42.3929],[45.0431,42.6553],[43.9013,42.6535],[42.4524,43.1829],[41.0039,43.4488],[40.0103,43.3853],[38.7996,44.2241],[36.9458,45.1824],[37.9777,45.9863],[38.0723,46.5853],[38.5103,46.9405],[38.231,47.1187],[38.5666,47.6752],[39.756,47.9207],[39.8787,48.3158],[39.7817,48.848],[40.0937,49.271],[39.9709,49.5281],[39.1438,49.8497],[38.0083,49.9928],[37.3983,50.3916],[36.5636,50.2607],[35.6852,50.4062],[35.1589,51.1293],[34.307,51.4173],[34.3442,51.8126],[33.7694,52.2996],[31.7869,52.1115],[31.3967,53.0369],[32.526,53.3094],[32.5875,53.4898],[32.2832,53.7654],[31.8888,53.8522],[30.9746,54.6727],[30.7426,55.6294],[28.1546,56.1698],[27.6908,57.3706],[27.3516,57.5182],[27.6449,57.981],[27.357,58.7871],[28.1202,59.3526],[28.0419,59.4701],[29.3172,60.1181],[28.5672,60.5],[27.7476,60.4578],[27.8036,60.5486],[27.9913,60.669],[30.144,61.8522],[31.1863,62.4872],[31.5218,62.8942],[31.128,63.2578],[29.9719,63.7572],[30.2805,63.8509],[30.4884,64.1574],[30.0686,64.4375],[30.0598,64.547],[30.0443,64.7388],[29.7009,64.9085],[29.7547,65.4974],[30.0785,65.7704],[29.5729,66.4329],[29.4643,66.5492],[29.1273,66.9908],[29.956,67.6452],[28.8967,68.1515],[28.6388,68.2375],[28.4782,68.5109],[28.8967,69.0426],[29.6453,69.3474],[30.0753,69.4717],[30.2617,69.6417],[30.8426,69.5422],[30.9297,69.6195],[30.8654,69.7596],[32.2282,69.7951],[33.6469,69.3004],[36.3959,69.0059],[40.877,67.4097],[40.9794,67.0664],[40.6709,66.6558],[38.9814,66.192],[34.184,66.4059],[35.1704,64.5412],[36.3256,64.0662],[37.1374,63.9503],[37.5223,64.16],[37.0853,64.6282],[37.1902,64.9043],[39.6429,64.7651],[39.9186,64.9561],[40.1409,65.4991],[40.6412,65.835],[42.25,66.3431],[43.9817,66.4973],[44.1706,66.8837],[44.0179,68.1538],[44.4091,68.4926],[45.9114,68.2653],[46.0643,67.9449],[45.4559,67.4089],[47.0008,66.9654],[49.3314,67.9542],[53.298,68.7358],[54.8435,68.3345],[58.404,68.7985],[59.6601,68.5647],[60.4865,68.9586],[60.442,69.3314],[59.2881,69.95],[59.3619,70.1626],[60.7346,69.7979],[64.6961,69.3395],[68.4408,68.5423],[68.6217,68.7039],[68.5329,68.9701],[67.2152,69.7906],[67.2366,71.1079],[69.3769,72.6976],[71.7354,72.7044],[72.4602,72.3494],[72.2713,71.4029],[72.5962,70.6168],[72.6748,69.2239],[73.1332,68.1285],[72.6757,67.5559],[71.4922,66.8091],[70.2403,66.5432],[70.5087,66.3892],[71.798,66.3446],[73.2985,66.8302],[74.0269,67.2874],[74.517,67.8502],[74.7341,68.4802],[75.014,68.6814],[76.4,68.7806],[77.3041,68.1731],[77.5638,68.2629],[77.4465,68.7061],[76.9954,68.9722],[73.9087,69.6016],[73.9252,70.6072],[73.5653,71.4963],[74.9319,72.4185],[75.2424,72.3581],[75.5185,71.6873],[76.1227,71.2727],[77.16,71.2259],[76.7108,71.7767],[78.2618,72.4203],[82.3964,71.6931],[82.7167,71.0218],[83.1657,70.815],[83.1295,71.6767],[81.2609,72.455],[80.9349,73.2703],[85.8455,73.8889],[86.2336,74.1623],[86.192,74.6654],[86.6244,74.8754],[95.1844,76.1808],[96.8181,75.9747],[98.5686,76.151],[100.7834,76.614],[102.6562,77.4333],[104.5472,77.6314],[105.6401,77.4411],[107.3126,76.6255],[111.2225,76.7131],[113.0457,76.3156],[113.5029,75.9571],[113.4201,75.4638],[112.8646,75.0958],[107.4182,73.633],[106.8982,73.3679],[107.0256,73.1779],[109.1608,73.4013],[110.686,73.9045],[112.7292,73.7814],[113.8377,73.4997],[115.6978,73.6525],[117.636,73.5748],[119.3563,73.1501],[121.2509,72.9724],[123.0428,73.0515],[124.284,73.6563],[127.1877,73.4971],[129.0678,72.9295],[129.2629,72.5375],[129.1489,71.9184],[129.2731,71.6075],[129.9087,71.2165],[131.049,70.9136],[132.9632,71.6747],[134.5583,71.4507],[139.1177,71.5684],[139.9969,72.3703],[142.1795,72.77],[148.4814,72.251],[152.7627,70.9087],[158.2213,70.8941],[159.3347,70.6216],[160.2129,69.847],[161.3828,69.5239],[164.1068,69.6802],[166.6541,69.5592],[168.3886,69.8244],[168.6206,69.7125],[168.8372,69.238],[170.0048,68.9403],[170.5578,69.1405],[170.9095,69.7566],[172.1652,70.002],[176.7193,69.7286],[178.6221,69.3595],[179.7432,68.6856],[179.9559,67.3162],[179.8103,65.4272],[179.1361,64.8671],[178.1761,64.3831],[179.1082,63.207],[179.065,62.5938],[176.7371,62.3957],[174.2536,61.8157],[170.5153,60.2446],[168.4208,60.4862],[163.8424,59.7762],[162.4195,58.2071],[162.968,57.4438],[162.951,56.3],[162.1297,55.7562],[161.6682,54.7698],[160.3802,54.1602],[159.7945,53.4023],[158.7737,52.8946],[158.0959,52.0229],[157.2446,51.4472],[156.4905,51.9416],[155.7786,54.4608],[155.7272,55.6758],[156.0364,56.5102],[157.2578,57.7648],[158.6874,58.3422],[161.6927,60.1765],[163.3851,60.9563],[164.1342,62.3923],[163.6561,62.3609],[162.7223,61.5942],[160.7523,60.9377],[160.2363,61.1361],[159.6791,61.7447],[158.2131,61.7836],[157.2974,61.6169],[154.7298,60.0415],[154.5438,59.721],[154.6514,59.3363],[154.3106,59.1655],[151.9522,58.9866],[151.344,59.425],[149.8162,59.614],[148.2633,59.3343],[145.0309,59.3263],[141.8573,58.7491],[135.7775,54.8981],[137.697,53.7632],[138.2982,53.7639],[139.4491,54.1061],[141.0637,53.2194],[141.1846,51.9968],[140.6448,50.8282],[140.4238,49.5567],[139.9505,48.4355],[137.7699,45.9533],[135.0391,43.5659],[133.3857,42.8819],[131.7936,43.0045],[130.6749,42.2836]],[[73.4786,53.86],[73.723,53.8039],[73.8138,54.1065],[73.4388,54.0281],[73.4786,53.86]]],[[[166.6501,54.8319],[166.5906,54.7281],[166.1652,54.9469],[165.8504,55.299],[165.9027,55.3759],[166.2665,55.3136],[166.2171,55.1826],[166.4334,54.9488],[166.6501,54.8319]]],[[[164.2051,58.8131],[163.7877,58.6996],[163.72,58.7597],[163.8509,59.0184],[164.3197,59.1114],[164.6075,59.2435],[164.7632,59.0307],[164.6653,58.8686],[164.2051,58.8131]]],[[[158.3604,76.6476],[157.9497,76.6178],[157.889,76.6755],[158.0828,76.8249],[158.4223,76.7663],[158.3604,76.6476]]],[[[156.4938,50.8867],[156.42,50.6418],[156.1875,50.6428],[155.8912,50.2403],[155.6073,50.1772],[155.4085,50.0019],[155.1865,50.061],[155.2288,50.2336],[155.7289,50.4393],[155.8524,50.651],[156.4938,50.8867]]],[[[155.7858,50.8553],[155.4719,50.7231],[155.2973,50.9106],[155.6449,51.0009],[155.7858,50.8553]]],[[[154.9165,49.3392],[154.706,49.1914],[154.5409,49.3045],[154.7255,49.58],[154.9165,49.3392]]],[[[146.4403,75.5745],[146.9721,75.34],[147.8902,75.4213],[150.7066,75.0449],[150.507,74.8549],[149.114,74.7376],[146.4403,75.1545],[146.3229,75.1949],[146.2658,75.3731],[146.4403,75.5745]]],[[[150.2144,45.9421],[149.6699,45.6062],[149.577,45.6632],[150.0645,46.0962],[150.3738,46.2397],[150.4113,46.1106],[150.2144,45.9421]]],[[[149.2942,76.7884],[149.316,76.5856],[148.9788,76.5878],[148.8857,76.68],[148.9755,76.7752],[149.2942,76.7884]]],[[[139.1009,76.1731],[140.7059,75.7049],[141.0207,76.0599],[141.7878,76.0833],[144.9837,75.5577],[145.0101,75.4635],[144.6004,75.1119],[143.3834,74.8961],[142.532,74.8204],[142.133,74.9936],[140.7059,74.8724],[139.7162,74.9286],[138.9392,74.6615],[138.2309,74.7684],[137.045,75.2611],[137.2451,75.7087],[137.5548,75.9213],[138.5049,76.1401],[139.1009,76.1731]]],[[[143.4824,46.7446],[143.5727,46.3982],[143.4439,46.2889],[143.1663,46.5671],[142.5957,46.6828],[142.06,45.9602],[141.8412,46.5501],[142.0904,47.8449],[142.1556,48.1942],[141.9093,48.7132],[142.1339,49.6014],[142.0652,50.6516],[142.206,51.1814],[141.6632,51.9611],[141.8786,53.0959],[141.8595,53.3932],[142.3801,53.3971],[142.7286,53.736],[142.4494,54.1962],[142.6729,54.3563],[142.9365,54.1028],[143.1762,53.295],[143.0919,53.0959],[143.2945,52.7832],[143.1524,52.0745],[143.2807,51.5226],[144.2659,49.2706],[143.0677,49.1501],[142.5374,47.8449],[143.1224,46.9378],[143.4824,46.7446]]],[[[143.4715,56.3041],[143.2011,56.287],[143.1509,56.3905],[143.4736,56.5562],[143.6132,56.4675],[143.4715,56.3041]]],[[[143.5483,73.4003],[143.2072,73.1882],[140.7059,73.4297],[140.7059,73.5507],[141.1108,73.8288],[142.1034,73.9058],[143.1833,73.6505],[143.5483,73.4003]]],[[[140.7059,73.9426],[140.4556,73.9297],[140.2354,74.0393],[140.2984,74.2149],[140.7059,74.2716],[141.05,74.1907],[141.0734,74.0393],[140.9748,73.989],[140.7059,73.9426]]],[[[137.8863,54.7467],[137.6871,54.676],[137.3793,54.8843],[137.5562,55.1282],[137.8863,55.1266],[138.0625,55.0042],[137.9914,54.8],[137.8863,54.7467]]],[[[137.1123,55.1828],[137.1161,54.8394],[136.9025,54.8416],[136.7915,55.0038],[137.1123,55.1828]]],[[[136.1841,74.0414],[136.179,73.8826],[135.7278,74.0414],[135.6923,74.1284],[135.7665,74.1826],[136.1841,74.0414]]],[[[136.073,75.4394],[135.6046,75.3791],[135.5453,75.4375],[135.658,75.7493],[135.7989,75.8089],[136.0893,75.6475],[136.073,75.4394]]],[[[123.4194,73.3718],[123.1781,73.3336],[123.0671,73.5256],[123.2466,73.716],[123.4194,73.3718]]],[[[120.6889,74.1524],[120.7267,73.9112],[120.2539,74.1349],[120.4311,74.2332],[120.6889,74.1524]]],[[[113.2672,74.2988],[112.8544,74.1066],[112.5141,74.1074],[111.772,74.2699],[111.7296,74.316],[112.0715,74.5334],[112.5141,74.5258],[113.2532,74.402],[113.2672,74.2988]]],[[[107.8406,78.1845],[107.5342,77.9552],[107.4017,78.1333],[107.5614,78.2893],[107.8406,78.1845]]],[[[107.7193,77.2311],[107.3022,77.1709],[107.2358,77.2404],[107.5477,77.4667],[107.7193,77.2311]]],[[[102.9989,79.3069],[102.9629,79.0049],[103.4345,79.1651],[104.1392,78.9859],[104.6229,78.7858],[105.0665,78.8603],[105.3192,78.5861],[104.8884,78.3354],[104.1392,78.2922],[101.2335,78.1585],[100.0011,77.9474],[99.6648,78.0684],[99.6914,78.1076],[101.2335,78.9897],[101.2335,79.0904],[101.6038,79.2177],[101.6576,79.3069],[102.2392,79.2348],[102.2996,79.3825],[102.4684,79.4075],[102.9989,79.3069]]],[[[97.3491,80.3705],[98.037,79.9604],[99.1615,80.0135],[99.8236,79.8713],[100.0212,79.6344],[99.7718,78.9424],[98.4008,78.793],[94.9671,79.0881],[94.1448,79.543],[94.2977,79.8455],[94.1995,79.9542],[92.697,79.7265],[92.0682,79.8426],[91.9828,79.9006],[92.0659,79.9669],[92.697,80.0335],[92.8065,80.5418],[93.073,80.8378],[95.8425,81.2164],[97.4925,80.8099],[97.3491,80.3705]]],[[[96.5787,77.1055],[96.1356,76.9867],[96.0468,77.0523],[96.4981,77.2961],[96.5787,77.1055]]],[[[95.7166,76.5293],[95.3627,76.4593],[95.3051,76.7214],[95.6495,76.6784],[95.7166,76.5293]]],[[[95.2074,76.7409],[95.2107,76.6349],[94.9486,76.5709],[94.748,76.6664],[94.4417,76.548],[94.3569,76.6613],[94.446,76.8473],[95.2074,76.7409]]],[[[91.6152,81.0744],[91.3624,81.0341],[90.177,81.0668],[90.122,81.1305],[90.2109,81.1856],[91.0617,81.2148],[91.5945,81.183],[91.6152,81.0744]]],[[[89.7209,77.1344],[89.3885,77.0937],[89.2568,77.2216],[89.7042,77.3474],[89.7209,77.1344]]],[[[88.9291,77.2058],[89.0054,76.8986],[88.6801,76.9955],[88.5976,77.1375],[88.9291,77.2058]]],[[[86.4772,75.1964],[86.178,75.183],[86.0744,75.2832],[86.2189,75.3963],[86.5524,75.3543],[86.4772,75.1964]]],[[[85.79,74.9463],[85.6884,74.6624],[85.4114,74.769],[85.4423,74.9309],[85.79,74.9463]]],[[[85.2905,74.9815],[85.2707,74.6556],[85.0063,74.6946],[85.0166,74.9102],[85.2905,74.9815]]],[[[82.7731,77.3925],[82.4151,77.3925],[82.3052,77.5101],[82.6754,77.6375],[82.7731,77.3925]]],[[[82.1842,75.3675],[82.2128,75.0836],[81.8092,75.3043],[81.8714,75.4135],[82.1842,75.3675]]],[[[80.1964,80.8439],[79.2602,80.818],[79.2016,80.8819],[79.3042,80.9469],[80.1737,80.9568],[80.1964,80.8439]]],[[[79.5228,72.7714],[79.0944,72.7084],[78.7097,72.8399],[79.0944,73.0877],[79.3465,73.0564],[79.5228,72.7714]]],[[[77.0163,79.6159],[77.0309,79.4465],[76.6165,79.456],[76.5982,79.5591],[76.6892,79.6457],[77.0163,79.6159]]],[[[74.7877,72.8876],[74.4961,72.8503],[74.1352,72.9955],[74.3164,73.1244],[74.6343,73.1095],[74.7877,72.8876]]],[[[70.8998,73.1102],[70.3531,73.0088],[69.9009,73.0347],[69.97,73.3898],[70.7916,73.4971],[71.2866,73.4324],[71.4738,73.2462],[71.44,73.154],[70.8998,73.1102]]],[[[60.6482,75.0826],[60.5357,74.9811],[57.9374,74.0185],[57.6462,73.6944],[56.0805,73.0383],[56.0111,72.8035],[55.5047,72.4354],[55.4097,72.0392],[55.5679,71.7391],[56.2,71.2126],[57.3108,70.7434],[57.2587,70.5796],[53.9065,70.7669],[53.3653,71.2894],[52.9667,71.0505],[51.5364,71.7143],[51.7052,72.0557],[52.631,72.3382],[52.802,72.53],[52.7288,72.7929],[54.0632,73.4463],[54.1002,73.8192],[55.755,74.4466],[56.3957,74.9097],[56.3563,75.0068],[55.9842,74.9811],[55.8588,75.1311],[56.3525,75.1799],[56.5068,74.9907],[56.9112,75.3038],[57.5774,75.3618],[58.9175,75.9046],[61.282,76.272],[64.7371,76.39],[66.3923,76.818],[67.9314,77.0007],[68.5623,76.9228],[68.9223,76.6995],[68.754,76.4897],[67.9314,76.2308],[62.1638,75.4412],[60.6482,75.0826]]],[[[64.7421,80.7443],[63.2269,80.6433],[63.0105,80.7734],[63.0533,80.8217],[64.7421,81.1801],[65.256,81.1284],[65.2985,80.8656],[64.7421,80.7443]]],[[[63.5888,81.5908],[62.9418,81.5651],[62.8257,81.6486],[62.8818,81.7034],[63.5866,81.703],[63.5888,81.5908]]],[[[61.9379,80.6744],[61.0955,80.383],[59.5099,80.4518],[59.3552,80.5111],[59.5099,80.7063],[60.5084,80.8078],[60.4005,81.0167],[61.2035,81.1108],[61.4511,81.0533],[61.3115,80.8546],[61.9268,80.7792],[61.9379,80.6744]]],[[[59.8616,80.0555],[59.8687,79.9288],[59.0246,79.9528],[58.971,80.0168],[59.1336,80.122],[59.8616,80.0555]]],[[[59.3789,81.4929],[59.2856,81.2131],[58.9052,81.3833],[58.9567,81.4437],[59.3789,81.4929]]],[[[59.2392,81.7672],[58.7185,81.619],[58.6887,81.7239],[58.1947,81.6835],[58.0247,81.7496],[58.0666,81.8239],[59.1947,81.8522],[59.2392,81.7672]]],[[[57.887,81.1628],[57.9152,81.0628],[58.6549,81.1059],[58.8513,80.8092],[57.9537,80.7118],[57.9441,80.608],[58.6928,80.3823],[58.693,80.2805],[58.1437,80.1125],[57.2006,80.2366],[56.5837,80.0651],[56.147,80.0903],[55.9987,80.3252],[56.5837,80.3169],[57.2954,80.5415],[57.1448,80.6585],[56.5837,80.6117],[54.8218,80.7516],[54.6711,81.0825],[55.2488,81.0339],[55.3523,80.8959],[56.1414,81.0825],[56.5288,81.1034],[56.4204,81.3017],[56.5837,81.3946],[57.887,81.1628]]],[[[58.4195,81.49],[58.3478,81.3594],[57.8258,81.3603],[57.6595,81.4975],[57.719,81.5521],[58.4195,81.49]]],[[[56.0887,81.2991],[56.074,81.1771],[55.6238,81.193],[55.5703,81.2547],[55.6648,81.3703],[56.0887,81.2991]]],[[[55.3282,80.4653],[55.4145,80.2406],[55.0916,80.2843],[55.0386,80.3916],[54.467,80.3788],[54.3835,80.1556],[54.0764,80.0907],[54.1666,80.3402],[53.9738,80.5357],[54.0094,80.5914],[55.3282,80.4653]]],[[[53.4413,80.3596],[53.6411,80.2738],[53.566,80.1398],[52.9392,80.1428],[52.9005,80.1008],[52.1956,80.2484],[52.2326,80.3477],[52.6935,80.3135],[53.1959,80.3892],[53.2734,80.668],[53.4595,80.618],[53.4413,80.3596]]],[[[50.9457,80.8918],[50.9457,80.7832],[51.3322,80.7871],[51.3624,80.6661],[50.9457,80.5421],[48.8848,80.3571],[48.2444,80.1193],[47.9053,80.1014],[47.634,80.3309],[47.743,80.4806],[48.2279,80.5309],[48.1,80.7261],[48.2559,80.8315],[48.5067,80.5576],[48.879,80.5031],[49.323,80.5893],[49.6696,80.8746],[50.5486,80.7725],[50.9457,80.8918]]],[[[51.2966,80.0142],[51.2119,79.9097],[50.7875,79.9172],[50.7326,79.9781],[50.9434,80.105],[51.2966,80.0142]]],[[[50.7839,81.0254],[50.5768,80.9693],[50.408,81.1223],[50.464,81.2271],[50.7732,81.2173],[50.7839,81.0254]]],[[[50.2024,80.0387],[49.8618,80.031],[49.696,80.1646],[50.1126,80.2555],[50.2024,80.0387]]],[[[50.0416,69.0698],[49.0204,68.6767],[48.3887,68.7546],[48.2164,69.084],[48.544,69.3951],[49.1407,69.4946],[50.0404,69.171],[50.0416,69.0698]]],[[[47.4145,80.2039],[46.8957,80.1688],[46.8642,80.3009],[47.3693,80.3755],[47.4145,80.2039]]],[[[47.4016,80.604],[46.3208,80.4513],[45.4918,80.5364],[45.4429,80.592],[45.4946,80.6449],[47.4042,80.7419],[47.4016,80.604]]],[[[36.0347,65.0758],[35.7619,64.9198],[35.5474,65.0203],[35.7619,65.2178],[36.0347,65.0758]]],[[[22.7921,54.3634],[21.5593,54.3225],[20.3135,54.4022],[20.1365,54.4162],[19.8038,54.4424],[20.1243,54.5992],[20.0733,54.9187],[21.0449,54.9481],[21.2735,55.2457],[21.3903,55.2694],[21.6511,55.18],[22.589,55.0703],[22.8215,54.8264],[22.7921,54.3634]]],[[[-174.767,66.6963],[-174.3756,66.4825],[-174.1416,66.5499],[-173.8895,67.0173],[-173.3363,67.0735],[-171.6973,66.8848],[-170.0108,66.0919],[-171.0349,65.5597],[-172.1842,65.474],[-172.3177,64.8106],[-172.6108,64.6866],[-172.6615,64.4123],[-173.0582,64.2992],[-175.4565,64.8842],[-176.2657,65.445],[-178.3359,65.5331],[-178.868,66.1801],[-179.5633,66.018],[-179.4817,65.5034],[-180,65.0276],[-180,65.213],[-180,65.3972],[-180,65.5801],[-180,65.7618],[-180,65.9421],[-180,66.1212],[-180,66.2991],[-180,66.4757],[-180,66.5336],[-180,66.651],[-180,66.8251],[-180,66.998],[-180,67.1697],[-180,67.3401],[-180,67.5094],[-180,67.6774],[-180,67.8443],[-180,68.01],[-180,68.1745],[-180,68.2648],[-180,68.3378],[-180,68.5],[-180,68.661],[-180,68.8208],[-180,68.9795],[-175.354,67.6315],[-174.9293,67.3214],[-174.767,66.6963]]],[[[-178.2836,71.2987],[-179.1037,70.9697],[-180,70.9748],[-179.9949,71.5296],[-178.6318,71.5065],[-178.2836,71.2987]]]]},properties:{name:"Russian Federation"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[169.0654,-12.2911],[168.6567,-12.4646],[168.582,-12.3865],[168.808,-12.1342],[169.0654,-12.2911]]],[[[166.0288,-10.6189],[165.8587,-10.9636],[165.6911,-10.7777],[165.7618,-10.579],[166.0288,-10.6189]]],[[[162.0684,-10.5134],[162.2098,-10.7511],[161.7851,-10.7345],[161.2908,-10.3389],[161.2908,-10.2071],[162.0684,-10.5134]]],[[[161.664,-9.605],[161.4358,-9.8238],[161.3176,-9.5469],[161.4384,-9.405],[161.664,-9.605]]],[[[161.3,-9.3743],[161.2026,-9.4169],[160.7174,-8.8216],[160.6496,-8.4101],[160.7314,-8.3273],[160.9764,-8.6162],[160.947,-8.8216],[161.1445,-8.9869],[161.3,-9.3743]]],[[[159.7096,-9.3089],[159.9623,-9.4305],[160.331,-9.4158],[160.71,-9.7403],[160.6676,-9.8332],[159.8791,-9.7864],[159.5777,-9.5018],[159.7096,-9.3089]]],[[[160.3505,-11.6083],[160.2583,-11.7928],[159.9092,-11.4825],[160.0953,-11.4172],[160.3505,-11.6083]]],[[[159.7778,-8.3268],[159.6281,-8.4461],[159.1383,-8.1378],[158.5854,-7.7388],[158.5043,-7.6262],[158.5855,-7.5797],[159.6142,-8.1378],[159.7778,-8.3268]]],[[[159.308,-8.9274],[159.3881,-9.2218],[159.0956,-9.2034],[159.0744,-8.9455],[159.308,-8.9274]]],[[[157.1557,-7.9031],[157.2373,-8.1869],[157.4836,-8.0224],[157.8821,-8.3807],[158.1822,-8.5675],[158.2467,-8.8039],[157.9055,-8.7165],[157.7783,-8.5675],[157.0243,-8.24],[156.9471,-7.974],[157.1557,-7.9031]]],[[[158.0137,-7.5081],[157.634,-7.6184],[157.5783,-7.4477],[157.8047,-7.3086],[158.0137,-7.5081]]],[[[157.528,-7.3447],[157.4848,-7.4465],[157.2472,-7.3671],[156.412,-6.7291],[156.5461,-6.6125],[157.095,-6.9582],[157.1494,-7.1226],[157.528,-7.3447]]],[[[156.7189,-7.9385],[156.5763,-7.9495],[156.4976,-7.6445],[156.6205,-7.5695],[156.7945,-7.7328],[156.7189,-7.9385]]],[[[155.9426,-7.1688],[155.8412,-7.4957],[155.5308,-7.3838],[155.435,-7.6161],[155.2505,-7.5775],[155.1611,-7.3125],[155.5058,-7.3295],[155.9426,-7.1688]]]]},properties:{name:"Solomon Islands"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[55.6578,-4.6765],[55.65,-4.8496],[55.1718,-4.5707],[55.3526,-4.4859],[55.6578,-4.6765]]],[[[53.149,-6.3584],[52.8456,-6.3803],[53.0169,-6.047],[53.2077,-6.1346],[53.149,-6.3584]]],[[[46.4807,-9.4728],[46.1499,-9.5654],[46.083,-9.3353],[46.4023,-9.2874],[46.4807,-9.4728]]],[[[-63.4882,15.5918],[-63.5773,15.4115],[-63.7901,15.7552],[-63.5773,15.8927],[-63.4882,15.5918]]]]},properties:{name:"Seychelles"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[38.5696,18.005],[38.2556,17.6008],[37.0295,17.0223],[36.8653,16.1186],[36.4673,15.1054],[36.5603,14.2577],[36.1342,12.8315],[35.6227,12.5064],[35.2153,11.9187],[34.8021,10.8052],[34.4181,10.6735],[34.1132,9.4986],[33.9183,9.5986],[33.8946,10.1882],[33.298,10.7159],[33.1567,11.5649],[33.2446,12.1394],[32.9459,12.2235],[32.3227,11.8954],[32.4186,11.0739],[32.1035,10.7159],[31.2168,9.7703],[30.8069,9.7642],[29.9635,10.2429],[29.6187,10.097],[29.4717,9.7791],[28.977,9.6412],[28.9293,10.1061],[27.9298,10.1398],[27.8156,10.0193],[27.9072,9.6102],[26.5343,9.5362],[25.8244,10.3885],[25.2549,10.3366],[24.7697,9.7561],[24.5255,8.9136],[24.2234,8.6422],[23.5994,8.8147],[23.608,9.9187],[22.8755,10.9314],[22.9543,11.2968],[22.6063,11.6278],[22.3889,12.6326],[21.9575,12.6808],[21.8593,12.8394],[22.2317,13.3473],[22.1293,13.8043],[22.4859,14.1342],[22.4535,14.5476],[22.9335,15.1702],[23.0384,15.6361],[23.941,15.7526],[23.9993,16.1186],[23.9995,17.1753],[24,19.5],[24.0666,19.9725],[24.9765,20.0689],[25,21.6026],[25,22],[33.1826,22.0017],[33.6406,21.7398],[33.9661,21.7899],[34.0865,22.0025],[34.5937,22.003],[36.8825,22.0051],[36.9175,21.6026],[37.1381,21.2085],[37.4135,18.905],[38.5696,18.005]]]},properties:{name:"Sudan"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[20.5486,69.06],[23.4078,68.023],[23.8453,66.837],[23.7656,66.2739],[24.1551,65.816],[24.1623,65.6931],[22.922,65.6743],[22.3981,65.3894],[22.0983,65.442],[21.5436,65.0631],[21.1527,64.7698],[21.2899,64.547],[21.2205,64.2262],[20.1365,63.6328],[19.2865,63.4697],[18.4235,63.0127],[18.3811,62.8492],[17.4629,62.3561],[17.4893,62.137],[17.3451,61.84],[17.4842,61.6791],[17.1739,61.1723],[17.3726,60.6543],[18.6903,60.2312],[19.0245,59.7064],[18.5904,59.049],[17.913,58.8055],[17.5724,58.9509],[17.3896,58.7121],[16.756,58.6265],[16.9569,58.1695],[16.6667,57.9961],[16.7278,57.5476],[16.5007,57.115],[16.7676,56.7915],[16.5072,56.3617],[16.2846,56.5734],[16.0499,56.3219],[15.7826,56.1053],[14.5464,56.0613],[14.1554,55.4493],[13.1754,55.3938],[12.6635,56.0409],[12.8993,56.449],[11.9229,57.5622],[11.4977,57.984],[11.195,58.652],[11.2142,58.9726],[11.4563,58.99],[11.622,58.9296],[11.7167,59.049],[11.8262,59.2378],[11.927,59.7905],[11.8397,59.8408],[12.1495,59.8882],[12.4381,60.0782],[12.5685,60.4347],[12.295,60.9869],[12.6702,61.056],[12.6933,61.4259],[12.1824,61.7672],[12.2994,62.2675],[12.2547,62.331],[12.0525,63.1834],[12.1495,63.4182],[12.2057,63.6188],[12.5221,63.8509],[13.1489,64.0748],[14.0136,64.0734],[14.1092,64.383],[13.8381,64.547],[13.7303,64.6122],[14.326,65.1189],[14.6273,66.0639],[15.454,66.3452],[15.4153,66.5045],[16.3425,67.0642],[16.168,67.4289],[16.7204,67.8874],[17.2661,68.0913],[17.6849,68.0325],[18.0706,68.1372],[18.1259,68.5365],[19.9221,68.3845],[20.3346,69.0186],[20.5486,69.06]]],[[[18.7588,57.2794],[18.2025,56.9712],[18.2209,57.1417],[18.0973,57.2638],[18.1911,57.3863],[18.1109,57.5336],[18.4614,57.8163],[18.7354,57.9249],[19.0979,57.9367],[19.0105,57.7422],[18.8075,57.6524],[18.7588,57.2794]]]]},properties:{name:"Sweden"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[103.723,1.3309],[103.8895,1.394],[103.9327,1.3452],[103.9091,1.2386],[103.832,1.2386],[103.723,1.3309]]]},properties:{name:"Singapore"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-5.4914,-15.9213],[-5.8189,-16.1433],[-5.943,-16.0496],[-5.6955,-15.7865],[-5.4914,-15.9213]]],[[[-9.7092,-40.2449],[-9.7302,-40.4051],[-10.0662,-40.3971],[-10.0977,-40.2569],[-9.8982,-40.1569],[-9.7092,-40.2449]]],[[[-14.1234,-7.9509],[-14.4647,-8.1134],[-14.5561,-7.9362],[-14.3329,-7.7822],[-14.1234,-7.9509]]]]},properties:{name:"Saint Helena, Ascension and Tristan Da Cunha"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[16.5968,46.4759],[16.2421,46.4901],[16.3015,46.3783],[15.8735,46.2793],[15.7915,46.2593],[15.6273,46.086],[15.7064,45.9753],[15.4044,45.7927],[15.3313,45.7629],[15.2264,45.4271],[14.57,45.6729],[14.3909,45.5034],[14.1182,45.4812],[14.1113,45.4823],[13.6513,45.4541],[13.7221,45.595],[13.836,45.5875],[13.9032,45.6358],[13.7847,45.7428],[13.5962,45.8079],[13.5971,45.8195],[13.4969,46.0513],[13.511,46.3484],[13.684,46.4375],[13.7142,46.5227],[14.4345,46.4429],[14.5652,46.3725],[14.6746,46.4507],[15.0651,46.6521],[15.402,46.6535],[15.65,46.7058],[15.7864,46.7075],[15.9962,46.8354],[16.1138,46.8691],[16.3708,46.7222],[16.5968,46.4759]]]},properties:{name:"Slovenia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[43.2137,-22.1543],[43.4715,-21.6025],[44.427,-19.9892],[44.2552,-18.8432],[44.0486,-18.3599],[43.9764,-17.4492],[44.3868,-16.7473],[44.4775,-16.2465],[44.9906,-16.1579],[46.1213,-15.7139],[47.4311,-14.7568],[47.5788,-14.8911],[47.9587,-13.6829],[48.2476,-13.7471],[48.841,-13.2709],[48.8575,-12.48],[49.009,-12.2361],[49.2934,-12.1746],[49.8209,-12.8145],[50.0402,-13.539],[50.4555,-15.3578],[50.1955,-15.928],[49.8548,-15.4876],[49.6896,-15.5414],[49.7518,-16.1579],[49.8396,-16.4548],[49.4612,-17.2579],[49.4847,-17.8103],[49.1547,-18.8432],[48.2422,-21.6025],[47.591,-23.7626],[47.0338,-24.9599],[45.2664,-25.5843],[44.2372,-25.1692],[43.7044,-24.3522],[43.7058,-23.435],[43.2137,-22.1543]]]},properties:{name:"Madagascar"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[171.7561,6.895],[171.546,6.8706],[171.3904,7.1192],[171.6032,7.2327],[171.7561,6.895]]],[[[170.1342,9.2736],[169.9945,9.2386],[169.9067,9.4378],[170.0462,9.5249],[170.3432,9.491],[170.1342,9.2736]]],[[[169.7075,5.813],[169.5108,5.702],[169.4636,5.8357],[169.672,6.1153],[169.8185,6.0168],[169.7075,5.813]]],[[[168.9821,7.4149],[168.8497,7.3168],[168.6817,7.4579],[168.9762,7.7048],[169.057,7.6792],[168.9821,7.4149]]],[[[168.8662,4.5601],[168.661,4.4785],[168.5211,4.6571],[168.587,4.7577],[168.8511,4.7716],[168.8662,4.5601]]],[[[168.2683,5.7334],[168.1779,5.4402],[168.0267,5.4711],[167.9382,5.7812],[168.2683,5.7334]]],[[[166.8366,11.3453],[166.4795,11.3043],[166.5503,11.5014],[166.7992,11.6374],[166.8366,11.3453]]]]},properties:{name:"Marshall Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[22.9276,41.3385],[22.8792,41.3407],[22.3321,41.1203],[22.2162,41.1705],[21.9294,41.1004],[21.7874,40.9311],[20.9802,40.8557],[20.8378,40.9277],[20.5977,41.092],[20.5017,41.3172],[20.5578,41.5819],[20.5607,41.7331],[20.5629,41.8461],[20.5943,41.8773],[20.9223,42.1087],[21.2127,42.1107],[21.443,42.2349],[21.5869,42.2628],[22.3602,42.3112],[22.5104,42.1552],[22.6425,42.1059],[22.8672,42.0222],[22.9254,41.7331],[22.9683,41.5198],[22.9276,41.3385]]]},properties:{name:"North Macedonia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[4.243,19.1389],[4.2092,17.0347],[3.8653,15.7915],[3.407,15.3552],[1.4597,15.2725],[.9463,14.9749],[.7453,14.9791],[.2293,14.9897],[-.721,15.0452],[-1.7859,14.5221],[-1.8933,14.4694],[-2.1123,14.2218],[-2.6484,14.1311],[-3.4208,13.2926],[-4.1467,13.1869],[-4.5928,12.2275],[-5.2335,11.6898],[-5.5189,10.4333],[-6.0283,10.3127],[-6.3759,10.6631],[-6.9796,10.2777],[-7.5603,10.415],[-7.9785,10.1751],[-8.5566,11.0662],[-8.5611,11.3615],[-9.0923,12.3591],[-10.6468,11.9712],[-11.3138,12.1429],[-11.3795,12.4136],[-11.4311,13.0175],[-11.864,13.4525],[-12.2392,14.7594],[-11.8803,14.8646],[-11.5868,15.5771],[-10.9241,15.1701],[-10.4675,15.4386],[-5.6391,15.5124],[-5.3816,16.0758],[-5.6236,16.7004],[-6.1671,21.5201],[-6.5279,24.9366],[-4.8333,24.9976],[-3.3739,24.0562],[-2.7863,23.6772],[-1.8933,23.1012],[-1.7859,23.0319],[.5578,21.5201],[.7453,21.3959],[.9463,21.2628],[1.235,20.7351],[1.8141,20.3039],[3.182,19.8421],[3.2945,19.0379],[3.407,19.0499],[3.5631,19.0665],[4.243,19.1389]]]},properties:{name:"Mali"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[101.1432,21.5641],[100.9577,21.3822],[100.0853,20.3527],[99.5946,20.2881],[98.8831,19.8187],[98.0265,19.6724],[97.8338,19.3888],[97.7543,18.6525],[97.5345,18.396],[97.7527,17.8227],[98.8009,16.2881],[98.255,14.9941],[99.0747,13.843],[99.161,13.1048],[99.6209,11.8668],[98.7537,10.3893],[98.5412,10.3768],[98.6717,11.3316],[98.5438,12.0993],[98.128,12.304],[98.5626,12.6711],[98.5738,13.0363],[98.1283,13.8448],[97.6984,15.8071],[97.1599,16.8995],[96.9675,16.9794],[95.4334,15.8209],[94.4348,15.964],[94.2838,16.3627],[94.5297,17.5142],[94.3263,18.3094],[93.955,18.8288],[93.715,18.6498],[93.5355,18.7713],[93.7593,19.0141],[93.2491,19.9619],[93.0232,19.9866],[92.697,20.4491],[92.2021,21.1507],[92.3081,21.3804],[92.6238,21.4616],[92.6068,21.9712],[93.1232,22.3714],[93.3872,23.9016],[94.0361,23.9215],[94.2381,24.0841],[95.203,26.5525],[96.1868,27.1873],[96.8989,27.2897],[97.0575,27.7441],[97.3443,27.9963],[97.3471,28.2081],[97.6607,28.4374],[98.0277,28.1945],[98.3001,27.67],[98.6505,27.4662],[98.7586,26.6967],[98.6174,25.8964],[97.6323,24.7947],[97.6624,23.9718],[98.7357,24.0311],[98.9544,23.2538],[99.4242,22.9783],[99.3116,22.1851],[99.8935,22.0023],[100.2985,21.5455],[100.9638,21.6867],[101.1432,21.5641]]]},properties:{name:"Myanmar/Burma"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[116.7209,49.8498],[115.726,48.3132],[115.7462,47.8633],[117.3447,47.7443],[117.8818,47.99],[118.4115,47.9874],[119.5494,47.2549],[119.7421,46.8031],[118.2867,46.7064],[116.9594,46.3931],[115.8268,45.5901],[114.6043,45.3288],[113.6553,44.836],[111.8923,44.9111],[111.5444,44.3827],[111.7456,43.6738],[110.2689,42.7433],[109.382,42.4713],[107.315,42.3929],[106.4412,42.1059],[105.3061,41.7331],[104.9939,41.6306],[104.7319,41.7331],[103.412,41.8982],[101.7629,42.3929],[101.5726,42.45],[100.937,42.6407],[99.3602,42.5821],[96.5054,42.8216],[95.0889,44.3062],[93.6971,44.8837],[92.697,45.042],[90.9154,45.324],[90.7868,45.5843],[90.9625,46.1517],[90.8926,46.7843],[90.0071,47.8003],[89.1233,48.0475],[88.8093,48.1353],[88.164,48.5182],[87.825,49.1833],[88.2913,49.48],[89.1233,49.6048],[89.5277,49.6654],[90.0071,50.0358],[92.4372,50.809],[92.697,50.77],[94.1016,50.5591],[94.7987,50.0463],[97.3304,49.8163],[98.1961,50.2828],[97.9549,51.1391],[98.9786,52.0482],[101.9481,51.3734],[102.4373,50.5965],[103.5057,50.2012],[105.4152,50.4519],[106.5203,50.3292],[107.8553,49.9138],[108.8074,49.3345],[110.9163,49.2007],[112.887,49.5712],[114.3649,50.236],[115.4261,49.9355],[116.2426,49.9903],[116.7209,49.8498]]]},properties:{name:"Mongolia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[113.5331,22.1856],[113.5509,22.2145],[113.5533,22.2032],[113.5643,22.1943],[113.5648,22.1893],[113.559,22.1867],[113.5504,22.1841],[113.5331,22.1856]]]},properties:{name:"Macau"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[145.5548,14.967],[145.6383,15.2891],[145.8721,15.3231],[145.7153,14.9178],[145.5548,14.967]]]},properties:{name:"Northern Mariana Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-4.8333,24.9976],[-6.5279,24.9366],[-6.1671,21.5201],[-5.6236,16.7004],[-5.3816,16.0758],[-5.6391,15.5124],[-10.4675,15.4386],[-10.9241,15.1701],[-11.5868,15.5771],[-11.8803,14.8646],[-12.2392,14.7594],[-13.3922,16.0124],[-14.3668,16.5898],[-16.0689,16.4984],[-16.4217,16.2162],[-16.4,16.3836],[-16.4703,16.1801],[-16.5064,16.0758],[-16.0504,17.922],[-16.1516,18.7368],[-16.4264,19.3425],[-16.2798,20.1715],[-16.8251,20.9275],[-17.0513,20.7716],[-16.825,21.3191],[-13.0576,21.3647],[-13.0409,22.8389],[-12.022,23.6542],[-11.9441,25.882],[-8.8245,26.0382],[-8.6667,27.3127],[-4.8333,24.9976]]]},properties:{name:"Mauritania"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-62.2655,16.7143],[-62.2094,16.8665],[-62.1283,16.7441],[-62.1209,16.6755],[-62.1879,16.6416],[-62.2655,16.7143]]]},properties:{name:"Montserrat"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[14.6459,35.9333],[14.4334,35.717],[14.234,35.8815],[14.4119,36.0669],[14.6459,35.9333]]],[[[14.3482,36.0308],[14.2622,36.0067],[14.1727,36.0691],[14.2307,36.0879],[14.3482,36.0308]]]]},properties:{name:"Malta"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[59.9207,-16.6311],[59.8305,-16.7145],[59.6371,-16.6882],[59.5469,-16.5925],[59.5469,-16.3777],[59.8079,-16.5168],[59.9207,-16.6311]]],[[[57.8201,-20.2272],[57.6806,-20.4906],[57.295,-20.474],[57.352,-20.2886],[57.6029,-19.9678],[57.8201,-20.2272]]],[[[56.6337,-10.3004],[56.4859,-10.3535],[56.2872,-10.0508],[56.5007,-9.9448],[56.6337,-10.3004]]]]},properties:{name:"Mauritius"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[73.71,2.9097],[73.5532,2.8675],[73.532,3.0986],[73.5768,3.3129],[73.7724,3.1829],[73.71,2.9097]]],[[[73.6138,1.915],[73.5132,1.897],[73.4939,1.951],[73.5489,2.3858],[73.7555,2.2028],[73.6138,1.915]]],[[[73.5107,5.8299],[73.2603,5.6292],[73.129,5.8511],[73.4245,6.0007],[73.5107,5.8299]]],[[[73.45,.5286],[73.2334,.3392],[73.0536,.5433],[73.1494,.6307],[73.4418,.6343],[73.45,.5286]]],[[[73.2809,-.8992],[73.1341,-.9461],[73.1042,-.8786],[72.9709,-.578],[73.2311,-.578],[73.2778,-.8786],[73.2809,-.8992]]],[[[73.1135,6.9997],[72.9024,6.8634],[72.682,7.1261],[72.8867,7.2046],[73.1135,6.9997]]],[[[73.0821,5.4272],[72.9394,5.228],[72.8077,5.509],[73.1022,5.709],[73.0821,5.4272]]]]},properties:{name:"Maldives"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[34.9596,-11.5733],[34.6477,-11.683],[34.4272,-12.1589],[34.59,-13.2477],[35.1871,-13.8221],[35.8884,-14.9206],[35.7988,-15.8783],[35.3313,-16.3299],[35.2071,-16.8302],[34.6506,-16.4046],[34.3592,-15.9208],[34.5628,-15.1596],[34.4393,-14.5468],[33.6496,-14.4564],[33.2422,-13.9985],[32.8162,-13.5758],[33.0256,-12.7461],[33.4181,-12.4294],[33.2902,-10.9113],[33.6324,-10.4637],[32.9535,-9.4014],[34.1574,-9.6216],[34.4913,-10.0245],[34.6491,-10.9113],[34.9596,-11.5733]]]},properties:{name:"Malawi"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-86.7243,20.493],[-87.0304,20.1789],[-87.0877,20.3151],[-86.9277,20.629],[-86.7243,20.493]]],[[[-97.1461,25.9561],[-97.6605,24.9927],[-97.7995,22.4507],[-97.1874,20.7668],[-96.2089,19.3064],[-95.5126,18.7465],[-94.334,18.242],[-92.3658,18.6267],[-91.525,18.57],[-91.0362,19.0664],[-90.7911,19.3481],[-90.1713,21.0539],[-90.0133,21.0954],[-89.6593,21.1884],[-89.435,21.2474],[-88.205,21.5705],[-87.0275,21.4897],[-86.8074,21.1134],[-87.4043,20.1524],[-87.7328,18.6498],[-87.837,18.4743],[-88.1012,18.6276],[-88.2278,18.4563],[-88.3168,18.4888],[-89.147,17.8095],[-89.435,17.8032],[-89.6593,17.7984],[-90.0133,17.7907],[-90.9613,17.6841],[-91.1617,17.0796],[-90.4981,16.2084],[-91.8002,15.8454],[-92.1126,15.2942],[-92.2313,14.5333],[-93.9772,15.9773],[-94.8804,16.1769],[-96.7674,15.7411],[-100.8916,17.2207],[-101.9017,17.8987],[-103.0395,18.2055],[-104.8583,19.2912],[-105.5735,20.2491],[-105.2503,21.2477],[-105.5393,22.2618],[-108.3362,25.2414],[-109.303,25.748],[-109.4406,26.6009],[-110.468,27.2919],[-110.7126,27.8157],[-112.0317,28.8587],[-112.4559,28.8865],[-112.4243,29.4301],[-113.2073,31.1889],[-113.8855,31.5756],[-114.7204,31.7052],[-114.8459,31.1849],[-114.6152,30.2489],[-112.9819,28.4931],[-112.6547,27.7506],[-111.6015,26.6305],[-111.2092,25.7112],[-110.6464,24.9759],[-110.631,24.3806],[-109.8852,24.029],[-109.5568,23.5705],[-109.5387,23.2777],[-109.7247,23.0591],[-110.026,23.0347],[-110.4614,23.6254],[-112.1424,24.7711],[-112.0994,25.6934],[-112.2911,26.0556],[-113.1841,26.7169],[-114.0845,27.0565],[-114.735,27.6012],[-114.1474,27.8024],[-114.1633,28.5421],[-115.6737,29.8209],[-117.1236,32.5346],[-115.002,32.6693],[-110.9234,31.3386],[-108.5185,31.3352],[-107.9988,31.7599],[-106.4688,31.7164],[-104.9579,30.5767],[-104.4209,29.6204],[-103.4137,29.0808],[-103.0936,29.1084],[-102.5338,29.7138],[-101.3814,29.6713],[-100.7311,29.1117],[-100.2721,28.305],[-99.5889,27.5721],[-99.0549,26.4642],[-98.2152,26.0797],[-97.1461,25.9561]]],[[[-89.5916,22.6071],[-89.7403,22.3668],[-89.9653,22.3878],[-89.835,22.6266],[-89.6579,22.7248],[-89.5916,22.6071]]],[[[-113.1275,29.2853],[-113.193,29.0258],[-113.5937,29.4303],[-113.4045,29.5082],[-113.3401,29.2956],[-113.1275,29.2853]]],[[[-115.0844,28.2245],[-115.138,27.9482],[-115.4617,28.034],[-115.1849,28.3096],[-115.0844,28.2245]]]]},properties:{name:"Mexico"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[117.8959,4.1667],[117.7554,4.1668],[117.0734,4.3762],[115.8436,4.3193],[115.4801,3.1051],[115.1395,2.8234],[115.1387,2.4688],[114.8113,2.2131],[114.8213,1.9271],[114.5414,1.4939],[113.6416,1.2735],[112.5607,1.5663],[112.1786,1.2951],[111.7875,.9963],[110.4947,.905],[109.7189,1.6007],[109.643,2.076],[109.8927,1.7452],[110.931,1.5752],[111.2899,2.6103],[111.3616,2.7531],[112.1786,2.9376],[112.9749,3.193],[114.0715,4.5889],[114.6759,4.1459],[114.8561,4.647],[115.1809,4.6253],[115.1546,4.9128],[115.4643,5.0522],[115.5133,5.4198],[115.9276,5.7279],[116.6864,6.8434],[117.2094,6.8787],[117.5639,6.5633],[117.7781,5.9958],[119.1523,5.2991],[118.9874,5.0505],[118.2168,4.9102],[118.2273,4.7465],[118.6761,4.4497],[117.8959,4.1667]]],[[[117.4104,7.2793],[117.0352,7.0492],[116.9808,7.2621],[117.1402,7.3915],[117.4104,7.2793]]],[[[102.091,6.2409],[103.2234,5.1722],[103.4637,4.5054],[103.4749,2.9794],[103.8553,2.5039],[104.241,1.5689],[104.1831,1.4124],[103.7262,1.4425],[103.4985,1.3149],[103.3195,1.5544],[102.1602,2.2308],[101.3433,2.8563],[101.1733,3.3788],[100.6182,4.2201],[100.5967,4.791],[100.4296,5.2091],[100.2362,5.3984],[100.2982,5.9874],[100.1213,6.4217],[100.2294,6.6479],[100.7624,6.4231],[101.0625,6.1551],[101.1972,5.6487],[101.4768,5.8798],[101.8326,5.8096],[102.091,6.2409]]],[[[99.9522,6.3149],[99.7176,6.1649],[99.6681,6.3568],[99.8637,6.4716],[99.9522,6.3149]]]]},properties:{name:"Malaysia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[32.8915,-26.8583],[32.1337,-26.835],[31.9821,-25.952],[31.9765,-24.3034],[31.3113,-22.4177],[32.1429,-21.5651],[32.9546,-19.9683],[32.7663,-18.9699],[33.0077,-18.2738],[33.0194,-17.3795],[32.8225,-16.6907],[31.1972,-16.04],[30.5713,-15.9585],[30.4183,-15.6176],[30.3073,-14.9824],[31.8523,-14.4588],[33.2422,-13.9985],[33.6496,-14.4564],[34.4393,-14.5468],[34.5628,-15.1596],[34.3592,-15.9208],[34.6506,-16.4046],[35.2071,-16.8302],[35.3313,-16.3299],[35.7988,-15.8783],[35.8884,-14.9206],[35.1871,-13.8221],[34.59,-13.2477],[34.4272,-12.1589],[34.6477,-11.683],[34.9596,-11.5733],[35.8549,-11.4522],[36.4576,-11.7048],[37.4237,-11.6577],[37.9279,-11.3183],[38.5264,-11.3686],[39.7605,-10.9113],[40.3944,-10.5107],[40.5415,-10.5884],[40.5174,-10.9113],[40.3936,-11.4514],[40.6121,-12.3398],[40.5476,-13.5827],[40.7767,-14.9679],[39.9336,-16.3334],[39.032,-16.9959],[37.2608,-17.7392],[36.2902,-18.8289],[35.787,-19.0561],[34.8284,-19.8782],[34.729,-20.4597],[34.9977,-20.7831],[35.2559,-21.6023],[35.5255,-22.3972],[35.4795,-24.1018],[35.027,-24.6372],[33.7149,-25.1251],[32.9295,-25.5292],[32.6816,-25.8667],[32.648,-26.0849],[32.9086,-26.4004],[32.8915,-26.8583]]]},properties:{name:"Mozambique"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[23.4299,-17.6345],[24.5991,-17.4938],[25.2628,-17.7914],[24.3074,-18.0188],[23.668,-18.4216],[23.1849,-18.0102],[21.7196,-18.256],[21.463,-18.3043],[20.9999,-18.3196],[20.9995,-20.1422],[20.9994,-20.5666],[20.9993,-20.8507],[20.9992,-21.4074],[20.9991,-21.6023],[20.9363,-21.9709],[20.0143,-22.0939],[19.9995,-24.752],[19.9434,-28.4086],[19.162,-28.9253],[18.2081,-28.8908],[17.4762,-28.6959],[17.32,-28.29],[17.0144,-28.0716],[16.4556,-28.6347],[15.7299,-27.9936],[15.254,-27.1958],[14.8631,-25.7884],[14.8279,-25.004],[14.485,-24.1025],[14.4948,-22.5568],[13.8909,-21.6023],[12.5735,-19.1047],[11.9214,-18.2655],[11.7509,-17.2525],[13.2413,-16.9985],[14.0264,-17.3778],[18.2636,-17.3914],[19.0299,-17.8279],[21.7196,-17.9666],[23.4299,-17.6345]]]},properties:{name:"Namibia"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[172.1671,-22.2252],[172.2382,-22.5566],[171.9814,-22.5296],[171.943,-22.2584],[172.1671,-22.2252]]],[[[168.1442,-21.6031],[167.9749,-21.6829],[167.8474,-21.5987],[167.7974,-21.368],[168.1463,-21.453],[168.1442,-21.6031]]],[[[167.4577,-21.0543],[167.3421,-21.1873],[167.0069,-20.9174],[167.1424,-20.7425],[167.303,-20.7355],[167.2589,-20.9079],[167.4577,-21.0543]]],[[[166.9325,-22.1296],[166.9472,-22.3244],[166.2347,-22.1604],[164.9671,-21.3204],[164.1152,-20.265],[164.1871,-20.2119],[164.5396,-20.3357],[166.9325,-22.1296]]],[[[163.6947,-19.9618],[163.5126,-19.9923],[163.5123,-19.8762],[163.7564,-19.5852],[163.8436,-19.7765],[163.7931,-19.8762],[163.6947,-19.9618]]],[[[163.2525,-18.483],[163.202,-18.694],[162.8579,-18.4238],[163.0713,-18.3063],[163.2525,-18.483]]],[[[158.6014,-19.9746],[158.2371,-20.043],[158.1715,-19.9178],[158.4364,-19.7314],[158.6014,-19.9746]]]]},properties:{name:"New Caledonia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[14.9984,22.9972],[15.1963,21.6026],[15.9427,20.3452],[15.6327,19.025],[15.5004,16.9853],[14.3535,15.68],[13.5373,14.4407],[13.6346,13.7107],[12.398,13.123],[10.7545,13.3442],[9.3565,12.8289],[7.9448,13.2833],[6.9574,13.0844],[6.3889,13.5974],[5.7132,13.8248],[4.8269,13.7524],[4.184,13.4108],[3.6932,12.4497],[3.5631,11.7331],[3.407,11.8673],[2.8313,12.3625],[2.4326,12.2297],[2.4051,11.8998],[2.1412,12.269],[2.1167,12.6689],[1.5993,12.6512],[1.0371,13.0366],[.9463,13.5898],[.7453,13.7626],[.4331,14.031],[.1942,14.5692],[.2293,14.9897],[.7453,14.9791],[.9463,14.9749],[1.4597,15.2725],[3.407,15.3552],[3.8653,15.7915],[4.2092,17.0347],[4.243,19.1389],[5.8191,19.4689],[7.4448,20.8222],[8.7142,21.6026],[11.9985,23.5127],[13.4242,23.1955],[14.1827,22.692],[14.9984,22.9972]]]},properties:{name:"Niger"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[167.7712,-28.9017],[168.1835,-29.0073],[168.0342,-29.1822],[167.7824,-29.1318],[167.7712,-28.9017]]]},properties:{name:"Norfolk Island"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[13.6346,13.7107],[14.0854,13.0781],[14.2342,12.4916],[14.6064,12.1066],[14.5709,11.6606],[13.6915,10.8135],[12.7578,8.8108],[12.2559,8.3308],[11.7815,7.0341],[11.3091,6.5958],[10.6677,6.9687],[10.0174,6.8872],[8.9762,5.9087],[8.5638,4.8182],[8.1918,4.5512],[6.1424,4.2937],[5.645,4.6124],[5.3273,5.3255],[4.5444,6.2784],[3.8834,6.425],[3.5631,6.4115],[3.407,6.405],[2.7094,6.3757],[2.7788,8.8841],[3.407,9.7552],[3.5493,9.9526],[3.7869,10.624],[3.5631,11.7331],[3.6932,12.4497],[4.184,13.4108],[4.8269,13.7524],[5.7132,13.8248],[6.3889,13.5974],[6.9574,13.0844],[7.9448,13.2833],[9.3565,12.8289],[10.7545,13.3442],[12.398,13.123],[13.6346,13.7107]]]},properties:{name:"Nigeria"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-83.6929,10.9389],[-83.9461,10.7432],[-84.6235,11.0333],[-85.6948,11.0803],[-87.6309,12.9115],[-87.3121,12.9829],[-86.7646,13.3165],[-86.6936,13.744],[-85.3235,14.1899],[-84.9132,14.7538],[-84.4054,14.6387],[-83.145,14.9981],[-83.5184,13.6278],[-83.5441,12.4635],[-83.8427,11.3267],[-83.6929,10.9389]]]},properties:{name:"Nicaragua"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[6.021,50.7543],[5.8191,50.7146],[5.6876,50.8119],[5.7661,51.0087],[5.7983,51.0599],[5.5663,51.2208],[5.2377,51.2616],[5.1022,51.429],[4.7599,51.5025],[4.6695,51.4264],[4.2796,51.376],[4.2437,51.3747],[3.6874,51.5167],[3.8391,51.7583],[4.1278,52.0005],[4.198,52.0541],[4.3742,52.1871],[4.4938,52.3283],[4.5606,52.4374],[4.6097,52.5734],[4.6491,52.7562],[4.7639,53.2074],[5.1644,53.0009],[5.4112,53.1517],[5.5199,53.255],[5.877,53.3821],[6.1913,53.4109],[6.4492,53.4229],[6.8749,53.408],[7.0981,53.255],[7.2089,53.2431],[7.2028,53.1133],[7.0927,52.8382],[7.0062,52.6388],[6.7097,52.6278],[6.6979,52.4863],[7.0041,52.3996],[7.0657,52.2414],[6.7605,52.1186],[6.6817,51.9324],[6.4078,51.8281],[6.1678,51.9008],[5.9532,51.7478],[6.2244,51.365],[6.0727,51.2426],[6.1748,51.1845],[5.8771,51.0321],[6.0869,50.9131],[6.021,50.7543]]],[[[3.3658,51.3698],[4.2348,51.3483],[3.9777,51.2251],[3.8563,51.2111],[3.3807,51.2743],[3.3658,51.3698]]]]},properties:{name:"Netherlands"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[30.8654,69.7596],[30.9297,69.6195],[30.8426,69.5422],[30.2617,69.6417],[30.0753,69.4717],[29.6453,69.3474],[28.8967,69.0426],[29.1537,69.588],[27.7472,70.0602],[26.0763,69.7256],[25.638,68.9632],[25.012,68.6429],[24.0289,68.7802],[23.0757,68.6756],[21.9836,69.0729],[21.6919,69.2348],[21.5888,69.2786],[21.3103,69.3065],[21.0332,69.2348],[20.5486,69.06],[20.3346,69.0186],[19.9221,68.3845],[18.1259,68.5365],[18.0706,68.1372],[17.6849,68.0325],[17.2661,68.0913],[16.7204,67.8874],[16.168,67.4289],[16.3425,67.0642],[15.4153,66.5045],[15.454,66.3452],[14.6273,66.0639],[14.326,65.1189],[13.7303,64.6122],[13.8381,64.547],[14.1092,64.383],[14.0136,64.0734],[13.1489,64.0748],[12.5221,63.8509],[12.2057,63.6188],[12.1495,63.4182],[12.0525,63.1834],[12.2547,62.331],[12.2994,62.2675],[12.1824,61.7672],[12.6933,61.4259],[12.6702,61.056],[12.295,60.9869],[12.5685,60.4347],[12.4381,60.0782],[12.1495,59.8882],[11.8397,59.8408],[11.927,59.7905],[11.8262,59.2378],[11.7167,59.049],[11.622,58.9296],[11.4563,58.99],[11.4085,59.049],[10.9111,59.0499],[10.6697,59.448],[10.502,59.7816],[10.5301,59.5794],[10.3241,59.691],[10.447,59.4335],[10.4489,59.1292],[10.2051,59.0038],[9.8392,59.0442],[9.2921,58.7823],[8.889,58.4734],[8.1852,58.1429],[7.2885,57.9989],[6.4384,58.2907],[5.5556,58.7508],[5.5115,59.0063],[5.7563,59.2668],[5.6747,59.574],[5.8523,59.6292],[5.6053,59.7698],[5.5356,59.4677],[5.5429,59.3359],[5.2682,59.1639],[5.2432,59.4677],[4.9588,60.3744],[5.126,60.8317],[4.6278,60.9062],[4.8476,61.2295],[4.8928,61.7154],[5.1509,61.8975],[5.1092,62.1405],[5.4796,61.9843],[5.4364,62.1798],[5.7295,62.1712],[6.2456,62.6269],[7.004,62.9534],[7.6824,62.9924],[7.8809,63.4079],[8.6235,63.3851],[8.3296,63.5338],[8.3801,63.6655],[8.889,63.6323],[9.0465,63.5245],[9.7046,63.6577],[9.9284,64.0215],[10.7295,64.4134],[11.0527,64.6068],[11.0773,64.9574],[12.1396,65.0203],[12.0265,65.6489],[12.3307,66.1444],[12.8026,66.4914],[13.0668,66.4101],[13.2066,66.746],[13.6302,67.0023],[14.1927,67.1709],[14.7901,67.8194],[15.7675,68.1432],[15.6182,68.3187],[14.5495,68.283],[14.6388,68.713],[15.8247,69.1515],[15.9768,68.7925],[16.4767,68.9513],[17.1721,68.7446],[17.0086,69.3203],[18.5131,69.7278],[18.8896,70.088],[19.7581,70.0822],[19.8665,69.8299],[20.4595,69.7886],[20.6753,70.0573],[21.1304,69.9502],[21.489,70.1871],[22.3418,70.2529],[22.9628,70.6847],[23.7409,70.6295],[25.5574,70.9647],[25.6335,70.556],[27.8602,70.9848],[28.4654,70.7187],[29.2455,70.7613],[30.3277,70.5198],[30.4967,70.2885],[30.1455,69.9302],[30.8654,69.7596]]],[[[24.3547,70.8951],[24.0672,70.8887],[24.018,71.1137],[24.2857,71.1782],[24.3547,70.8951]]],[[[14.0206,68.1948],[13.4925,68.0436],[13.3644,68.1188],[13.9204,68.3658],[14.0206,68.1948]]],[[[13.2331,68.002],[13.0289,67.7984],[12.8363,67.8951],[13.0927,68.1817],[13.2331,68.002]]],[[[9.1976,64.0278],[9.0578,63.8197],[8.6588,63.8945],[8.7361,64.0097],[9.1976,64.0278]]]]},properties:{name:"Norway"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[88.1351,27.8819],[88.0432,27.206],[88.1704,26.852],[88.0627,26.484],[87.4011,26.3831],[87.0575,26.4379],[85.2178,26.8066],[84.2444,27.4339],[83.0809,27.4663],[80.3067,28.7183],[80.1928,28.9158],[80.4172,29.7013],[81.0369,30.2028],[81.1786,30.0816],[81.4846,30.4064],[81.7779,30.3959],[83.2769,29.5084],[83.6232,29.2272],[84.0841,29.255],[84.5559,28.7241],[85.1125,28.6226],[85.1957,28.3587],[85.6902,28.2767],[86.0082,27.9649],[86.6441,28.0606],[87.0575,27.9138],[87.2191,27.8565],[88.1351,27.8819]]]},properties:{name:"Nepal"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[166.7442,-.5586],[166.9388,-.3275],[167.1234,-.4761],[166.8652,-.7265],[166.7442,-.5586]]]},properties:{name:"Nauru"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-170.0501,-19.0977],[-169.8976,-18.8573],[-169.6837,-19.0626],[-169.8271,-19.2469],[-170.0501,-19.0977]]]},properties:{name:"Niue"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[22.5668,49.0884],[22.3828,48.8623],[22.3336,48.7016],[22.1758,48.5744],[22.1553,48.4034],[22.1211,48.3783],[21.4106,48.5497],[20.4639,48.464],[20.0519,48.1677],[19.0143,48.0777],[18.9284,48.0568],[18.7602,47.9145],[18.8485,47.8182],[17.8939,47.7395],[17.7054,47.759],[17.2474,48.012],[17.1608,48.0067],[17.0667,48.1187],[16.9762,48.1722],[16.8511,48.4386],[16.9498,48.5358],[16.9403,48.6172],[17.3967,48.8133],[17.6469,48.8543],[18.3224,49.3151],[18.4036,49.3967],[18.8516,49.5172],[19.1237,49.4201],[19.4674,49.6138],[19.8839,49.2042],[20.1365,49.278],[20.6149,49.4178],[21.3977,49.4338],[22.5668,49.0884]]]},properties:{name:"Slovakia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-10.282,8.488],[-10.6672,7.7454],[-11.4975,6.9234],[-12.7133,7.5119],[-12.9538,8.1236],[-13.2316,8.3453],[-13.3027,9.0404],[-13.0138,9.1406],[-12.4355,9.8266],[-11.3001,9.9887],[-10.7248,9.3546],[-10.5221,8.6984],[-10.5938,8.3973],[-10.282,8.488]]]},properties:{name:"Sierra Leone"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[12.453,43.8945],[12.4504,43.8972],[12.47,43.973],[12.4931,43.9069],[12.4874,43.8965],[12.4688,43.8966],[12.4624,43.8938],[12.453,43.8945]]]},properties:{name:"San Marino"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-12.2392,14.7594],[-11.864,13.4525],[-11.4311,13.0175],[-11.3795,12.4136],[-12.4334,12.3458],[-13.2641,12.649],[-13.7083,12.6762],[-15.1085,12.6633],[-16.7074,12.3386],[-16.747,13.0637],[-16.1395,13.1667],[-15.8577,13.1872],[-15.8026,13.3348],[-15.3101,13.3781],[-15.102,13.5695],[-14.5538,13.3348],[-14.383,13.2445],[-14.2079,13.2305],[-14.0997,13.2862],[-13.8396,13.3348],[-13.9619,13.512],[-15.0767,13.7903],[-16.1395,13.5914],[-16.5068,13.5909],[-17.2351,14.6308],[-17.4539,14.7405],[-17,15.1117],[-16.5087,16.0573],[-16.5006,16.0601],[-16.4217,16.2162],[-16.0689,16.4984],[-14.3668,16.5898],[-13.3922,16.0124],[-12.2392,14.7594]]]},properties:{name:"Senegal"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[41.5645,-1.6558],[41.0554,-.8786],[41.0171,2.6734],[41.9101,3.9823],[42.8138,4.301],[43.4741,4.7993],[44.9162,4.9368],[45.2923,5.2367],[45.4747,5.4241],[45.6126,5.5657],[47.8524,7.9151],[46.9411,8.0224],[45.6126,8.4674],[43.9589,9.0545],[42.9804,10.0644],[42.7628,10.7159],[42.9681,10.9974],[43.2603,11.4606],[44.0533,10.616],[44.6392,10.4017],[45.6371,10.7459],[46.5238,10.7437],[47.4038,11.1335],[49.3662,11.336],[50.8088,11.9173],[51.2139,11.6403],[51.1329,10.6053],[50.7576,9.3318],[48.4946,5.297],[47.6689,4.166],[45.7523,2.3236],[44.4979,1.493],[43.1674,.252],[42.9729,.0707],[42.1985,-.8786],[41.5645,-1.6558]]]},properties:{name:"Somalia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-54.0056,5.6025],[-54.298,5.2363],[-54.4353,4.386],[-54.0163,3.5593],[-54.326,2.588],[-54.5879,2.3221],[-55.0333,2.5492],[-55.8909,2.4178],[-56.0897,1.9331],[-56.4774,1.9459],[-57.0218,2.6002],[-57.3197,3.3177],[-57.786,3.6417],[-58.0157,4.0688],[-57.8536,4.8346],[-57.3549,5.0511],[-57.2815,5.2363],[-57.134,5.8374],[-56.8909,5.9852],[-56.0947,5.8443],[-55.5568,5.9977],[-54.2265,5.8741],[-54.0056,5.6025]]]},properties:{name:"Suriname"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[34.1132,9.4986],[34.0937,8.6026],[33.8204,8.4168],[33.2485,8.381],[33.0448,7.899],[33.7557,7.6074],[34.5428,6.7418],[34.9588,6.4537],[35.0325,5.8494],[35.3235,5.413],[35.8294,5.2367],[35.9477,4.62],[35.5088,4.62],[35.2489,4.9563],[34.5428,4.7504],[34.3785,4.62],[33.9945,4.2144],[33.4753,3.7622],[32.973,3.8481],[32.3907,3.7291],[32.0987,3.5511],[31.8199,3.7886],[31.5619,3.6758],[31.2097,3.7851],[30.9998,3.6956],[30.8545,3.4875],[29.7103,4.5969],[28.3376,4.3157],[27.4436,5.0194],[27.1693,5.6776],[26.6049,6.0962],[26.29,6.6847],[25.4062,7.3523],[24.9801,8.016],[24.321,8.3317],[24.2234,8.6422],[24.5255,8.9136],[24.7697,9.7561],[25.2549,10.3366],[25.8244,10.3885],[26.5343,9.5362],[27.9072,9.6102],[28.0981,9.3663],[28.5512,9.3479],[28.977,9.6412],[29.4717,9.7791],[29.6187,10.097],[29.9635,10.2429],[30.8069,9.7642],[31.2168,9.7703],[32.1035,10.7159],[32.4186,11.0739],[32.3227,11.8954],[32.9459,12.2235],[33.2446,12.1394],[33.1567,11.5649],[33.298,10.7159],[33.8946,10.1882],[33.9183,9.5986],[34.1132,9.4986]]]},properties:{name:"South Sudan"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[6.4432,.2468],[6.6142,.4337],[6.7711,.2443],[6.5052,-.0085],[6.4432,.2468]]]},properties:{name:"São Tomé and Príncipe"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-87.8057,13.3959],[-87.8115,13.3603],[-88.2278,13.1624],[-89.435,13.5306],[-89.6593,13.5991],[-90.0133,13.7071],[-90.1243,13.7409],[-90.0133,13.8384],[-89.6593,14.1495],[-89.435,14.3466],[-89.3532,14.4185],[-88.5397,13.9656],[-87.8678,13.8204],[-87.8057,13.3959]]]},properties:{name:"El Salvador"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-63.189,18.0113],[-63.0744,18.1233],[-62.997,18.0851],[-62.9939,18.0051],[-63.1006,17.9691],[-63.189,18.0113]]]},properties:{name:"Sint-Maarten"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[42.3557,37.108],[41.3313,36.384],[41.3561,35.6375],[41.0138,34.4548],[38.7925,33.3747],[36.8551,32.3662],[35.6716,32.6911],[35.6244,33.2423],[36.5688,34.2017],[36.4058,34.578],[35.9756,34.6334],[35.7849,35.5954],[35.9168,35.9285],[36.2014,35.8768],[36.6168,36.2635],[36.66,36.8332],[36.6788,36.8327],[37.16,36.6767],[37.5855,36.7038],[38.0476,36.8456],[39.2161,36.6749],[40.226,36.9014],[40.7628,37.096],[41.6633,37.1029],[42.1596,37.2329],[42.3557,37.108]]]},properties:{name:"Syria"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[31.9821,-25.952],[32.1337,-26.835],[31.94,-27.2766],[31.5496,-27.3065],[31.2284,-27.2042],[30.8609,-26.7714],[30.9531,-26.2532],[31.338,-25.8256],[31.9821,-25.952]]]},properties:{name:"Eswatini"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-71.487,21.2881],[-71.6267,21.0124],[-71.8048,21.3111],[-71.6644,21.4721],[-71.487,21.2881]]],[[[-71.6517,21.7242],[-71.7664,21.6609],[-72.121,21.9314],[-71.9244,22.0401],[-71.6517,21.7242]]]]},properties:{name:"Turks and Caicos Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[24,19.5],[23.9995,17.1753],[23.9993,16.1186],[23.941,15.7526],[23.0384,15.6361],[22.9335,15.1702],[22.4535,14.5476],[22.4859,14.1342],[22.1293,13.8043],[22.2317,13.3473],[21.8593,12.8394],[21.9575,12.6808],[22.3889,12.6326],[22.6063,11.6278],[22.9543,11.2968],[22.8755,10.9314],[22.4744,10.9768],[21.7863,10.7159],[21.6697,10.3052],[20.7327,9.3974],[20.3063,9.1517],[18.9757,8.9098],[19.0457,8.6058],[18.5893,8.0831],[17.6801,7.9654],[16.883,7.591],[16.5651,7.8021],[15.8854,7.4815],[15.5075,7.5275],[15.2028,8.553],[14.6321,8.9454],[14.0726,9.6656],[14.3073,9.9856],[15.5186,10.0058],[15.1229,10.7159],[15.11,11.7138],[14.8196,12.5718],[14.4197,13.0406],[14.0854,13.0781],[13.6346,13.7107],[13.5373,14.4407],[14.3535,15.68],[15.5004,16.9853],[15.6327,19.025],[15.9427,20.3452],[15.1963,21.6026],[14.9984,22.9972],[16.1947,23.3281],[24,19.5]]]},properties:{name:"Chad"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[77.6118,-38.6497],[77.7596,-38.8443],[77.4076,-38.8389],[77.3545,-38.6388],[77.4064,-38.5375],[77.6118,-38.6497]]],[[[69.1051,-48.7638],[69.4074,-48.9438],[69.4856,-48.8566],[69.7606,-49.173],[70.1501,-49.1668],[70.3549,-49.0702],[70.5111,-49.1506],[70.5015,-49.329],[70.1817,-49.4662],[70.2855,-49.622],[70.1501,-49.6958],[69.4856,-49.6459],[68.8324,-49.6715],[68.7849,-49.0072],[69.1051,-48.7638]]],[[[50.5593,-46.352],[50.6421,-46.5809],[50.2171,-46.4718],[50.1557,-46.3267],[50.5593,-46.352]]]]},properties:{name:"French Southern and Antarctic Lands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[.9122,10.9965],[.8005,10.6685],[.7968,10.3989],[.9463,10.2593],[1.3304,9.9647],[1.6158,8.974],[1.5719,6.8296],[1.7479,6.3304],[1.6287,6.2345],[1.1996,6.1124],[.9463,6.333],[.7453,6.6207],[.57,6.8716],[.6206,8.2206],[.3087,10.2935],[-.0713,10.6685],[-.142,11.139],[.7453,11.019],[.9122,10.9965]]]},properties:{name:"Togo"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[105.2001,14.3427],[103.1615,14.3049],[102.4114,13.5271],[102.3986,13.1639],[102.5082,13.006],[102.524,12.6873],[102.7756,12.435],[102.7276,12.1572],[102.9011,11.7642],[102.9109,11.6472],[102.6947,11.972],[102.3531,11.8911],[102.3439,12.2567],[101.9368,12.5584],[100.9522,12.7195],[100.8061,13.4329],[100.1981,13.4058],[99.9636,12.155],[99.2679,10.3895],[99.2889,9.4351],[99.8671,9.1319],[100.6558,7.1775],[101.5666,6.7747],[102.091,6.2409],[101.8326,5.8096],[101.4768,5.8798],[101.1972,5.6487],[101.0625,6.1551],[100.7624,6.4231],[100.2294,6.6479],[100.1213,6.4217],[98.8763,8.0211],[98.5966,8.1227],[98.289,7.9949],[98.2418,8.8636],[98.7537,10.3893],[99.6209,11.8668],[99.161,13.1048],[99.0747,13.843],[98.255,14.9941],[98.8009,16.2881],[97.7527,17.8227],[97.5345,18.396],[97.7543,18.6525],[97.8338,19.3888],[98.0265,19.6724],[98.8831,19.8187],[99.5946,20.2881],[100.0853,20.3527],[100.4885,20.1911],[100.5125,19.5883],[101.2249,19.5387],[101.3116,18.9891],[101.179,18.5917],[100.9955,17.6658],[101.1487,17.5228],[101.3548,17.6701],[102.0799,18.1552],[102.7248,17.8976],[103.3719,18.4053],[103.9616,18.2846],[104.7439,17.4068],[104.7661,16.548],[105.3708,15.8632],[105.6101,15.563],[105.5365,14.6777],[105.2001,14.3427]]],[[[100.1835,9.6249],[100.0062,9.3116],[99.8344,9.4273],[99.8581,9.6438],[100.1835,9.6249]]]]},properties:{name:"Thailand"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[70.9676,40.2285],[70.6555,40.0502],[70.5257,40.0502],[70.0058,40.2165],[69.6253,40.1138],[69.5137,40.0502],[69.3322,39.7854],[69.5209,39.5656],[70.4856,39.5952],[70.8614,39.4289],[71.4569,39.5692],[72.2515,39.2305],[73.4844,39.4679],[73.6582,39.4651],[73.7953,38.664],[74.7852,38.5064],[75.096,37.4764],[74.8899,37.2341],[74.5767,37.4012],[73.8567,37.2769],[73.2944,37.4584],[71.8083,36.7149],[71.4851,36.9595],[71.5235,37.4764],[71.5601,37.8039],[71.3153,37.9763],[71.3126,38.2515],[70.8413,38.4213],[70.2538,37.9541],[70.1791,37.5831],[69.4312,37.4764],[69.2866,37.1431],[68.9042,37.2831],[68.0528,36.9765],[67.8555,37.0629],[67.7787,37.1796],[68.3151,38.2289],[68.0963,38.8623],[67.5335,39.2951],[67.5514,39.5075],[68.456,39.6133],[69.4317,40.6763],[70.4136,40.9551],[70.6152,40.7776],[70.5038,40.3699],[70.9676,40.2285]]]},properties:{name:"Tajikistan"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-172.4922,-8.5781],[-172.501,-8.5845],[-172.5028,-8.5827],[-172.4974,-8.5773],[-172.4922,-8.5781]]],[[[-172.4922,-8.5781],[-172.4886,-8.5744],[-172.4872,-8.5766],[-172.4922,-8.5781]]],[[[-172.4872,-8.5766],[-172.4824,-8.5736],[-172.4765,-8.5715],[-172.4748,-8.5696],[-172.469,-8.5728],[-172.4659,-8.572],[-172.4649,-8.5746],[-172.479,-8.576],[-172.4872,-8.5766]]],[[[-172.4943,-8.5341],[-172.4863,-8.5425],[-172.4782,-8.5496],[-172.4677,-8.557],[-172.4652,-8.5578],[-172.467,-8.5597],[-172.472,-8.5577],[-172.4816,-8.5513],[-172.4901,-8.5422],[-172.4943,-8.5341]]]]},properties:{name:"Tokelau"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[125.0819,-9.4462],[125.1277,-9.0687],[124.95,-8.9581],[125.2317,-8.6243],[126.352,-8.4368],[127.0499,-8.3337],[127.2463,-8.4341],[126.352,-8.9637],[125.0819,-9.4462]]],[[[124.4772,-9.175],[124.3535,-9.3971],[124.045,-9.343],[124.3038,-9.2066],[124.4772,-9.175]]]]},properties:{name:"Timor-Leste"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[66.5537,37.3548],[65.7703,37.4986],[64.8799,37.0996],[64.4207,36.2878],[63.2646,35.8341],[62.7395,35.2921],[62.2905,35.2271],[61.2741,35.6051],[61.0913,36.5821],[60.3349,36.6789],[59.5306,37.1849],[59.3708,37.5063],[58.2749,37.6987],[57.5183,37.9459],[57.2392,38.2153],[56.7141,38.2659],[55.3309,38.0319],[54.7706,37.5063],[54.2432,37.3273],[53.9068,37.3399],[53.8822,37.5063],[53.923,38.9001],[53.198,39.3832],[53.4719,39.5742],[53.4125,39.8629],[52.7581,40.1148],[52.9824,40.878],[53.8494,40.6472],[54.6972,41.0293],[54.1055,41.4865],[53.9561,41.7331],[53.7339,42.0997],[53.046,42.0246],[52.9106,41.7331],[52.7772,41.4461],[52.4614,41.7331],[52.4322,41.7597],[53.0753,42.1059],[53.2532,42.2017],[54.1353,42.3174],[54.6085,42.1059],[54.8453,42.0001],[55.0793,41.7331],[55.4482,41.3123],[56.0006,41.318],[56.7141,41.2841],[56.9976,41.3132],[57.0023,41.7331],[57.2518,42.0348],[57.9738,42.3929],[58.089,42.45],[58.6272,42.717],[59.2965,42.45],[59.4397,42.3929],[59.7804,42.257],[60.1297,41.7331],[60.3327,41.3003],[61.8085,41.1353],[62.6116,39.8876],[65.419,38.3671],[66.5616,38.0044],[66.6138,37.5063],[66.5537,37.3548]]]},properties:{name:"Turkmenistan"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[11.5643,33.1651],[11.5395,32.5327],[11.3188,32.3104],[10.2329,31.5973],[10.234,30.7743],[9.5516,30.2464],[9.0952,31.9812],[8.6877,32.3104],[7.7925,33.2741],[7.5356,33.8878],[8.2407,34.6847],[8.4128,35.1988],[8.3435,36.5284],[8.6421,36.9412],[9.7533,37.2992],[10.1132,37.1835],[10.4177,36.8321],[10.9207,36.8774],[10.5683,36.1102],[10.9916,35.571],[11.0506,35.1702],[10.1311,34.0606],[10.6992,33.6176],[10.9345,33.7902],[11.2219,33.3328],[11.5643,33.1651]]]},properties:{name:"Tunisia"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-173.5961,-15.9317],[-173.8066,-16.1695],[-174.0395,-15.9118],[-173.6904,-15.8471],[-173.5961,-15.9317]]],[[[-173.8699,-18.7001],[-174.0728,-18.8811],[-174.2448,-18.8352],[-174.1979,-18.7018],[-173.8856,-18.5138],[-173.8699,-18.7001]]],[[[-174.9909,-21.1613],[-175.0842,-21.3447],[-175.4439,-21.0636],[-175.2814,-20.9815],[-174.9909,-21.1613]]],[[[-176.0368,-22.4012],[-176.2261,-22.5309],[-176.4144,-22.2532],[-176.1702,-22.1682],[-176.0368,-22.4012]]]]},properties:{name:"Tonga"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[126.6544,37.7888],[126.6641,37.804],[126.6665,37.8173],[126.667,37.8226],[126.6663,37.8283],[126.6658,37.833],[127.159,38.287],[128.0712,38.3378],[128.3613,38.6149],[128.8236,37.8986],[129.0375,37.6816],[129.2009,37.4058],[129.4412,36.9331],[129.5186,35.8656],[129.2023,35.1948],[128.8027,35.0394],[128.5847,34.7469],[127.8148,34.69],[127.7971,34.6856],[127.7819,34.6755],[127.771,34.661],[127.7655,34.6436],[127.7661,34.6254],[127.7727,34.6083],[127.8149,34.5388],[127.6834,34.4943],[127.6286,34.5807],[127.6431,34.5948],[127.6528,34.6075],[127.6584,34.6224],[127.6594,34.6383],[127.6557,34.6538],[127.6476,34.6675],[127.6359,34.6782],[127.6215,34.6851],[127.6057,34.6875],[127.5551,34.6875],[127.5317,34.7142],[127.5178,34.7255],[127.501,34.7317],[127.483,34.732],[127.466,34.7263],[127.4518,34.7154],[127.4419,34.7004],[127.4384,34.6874],[127.395,34.5008],[127.2719,34.5093],[127.2399,34.6875],[127.1611,34.6875],[127.1542,34.6875],[127.1178,34.6875],[127.028,34.5084],[127.0994,34.3339],[127.088,34.3339],[127.0631,34.3339],[127.0502,34.3339],[127.0414,34.3339],[127.0242,34.3339],[126.8984,34.3339],[126.8882,34.3339],[126.878,34.3339],[126.8162,34.3339],[126.7935,34.3339],[126.7802,34.3339],[126.7328,34.3339],[126.7026,34.3339],[126.7026,34.2869],[126.5757,34.1451],[126.521,34.3339],[126.5312,34.6424],[126.5293,34.6585],[126.5227,34.6733],[126.512,34.6854],[126.4982,34.6938],[126.4825,34.6978],[126.4664,34.6969],[126.4512,34.6912],[126.4457,34.6882],[126.4248,34.6875],[126.4171,34.6875],[126.3924,34.6875],[126.3732,34.6875],[126.3459,34.6875],[126.337,34.6875],[126.3086,34.4783],[126.0558,34.4707],[126.0091,34.6089],[125.9164,34.6875],[126.0099,34.6875],[126.0106,34.7026],[126.0106,34.8607],[126.0106,34.897],[126.2126,35.0549],[126.2089,34.9862],[126.2106,34.9701],[126.2169,34.9552],[126.2273,34.9428],[126.2409,34.9341],[126.2564,34.9299],[126.2726,34.9304],[126.2878,34.9357],[126.3008,34.9452],[126.3104,34.9582],[126.3157,34.9735],[126.3846,35.3457],[126.6634,36.0243],[126.3626,36.7223],[126.3601,36.7229],[126.3456,36.7324],[126.3354,36.7451],[126.3294,36.7603],[126.3283,36.7766],[126.3322,36.7925],[126.3406,36.8065],[126.3528,36.8173],[126.7291,37.0602],[126.6911,37.4068],[126.688,37.4117],[126.6798,37.4245],[126.6756,37.4391],[126.6755,37.4497],[126.6726,37.4673],[126.6641,37.4829],[126.651,37.4949],[126.6348,37.5019],[126.6234,37.503],[126.6192,37.5037],[126.615,37.5033],[126.6103,37.5062],[126.6103,37.5109],[126.6105,37.5227],[126.6051,37.5397],[126.5945,37.5539],[126.5798,37.564],[126.5642,37.5679],[126.5587,37.5702],[126.5529,37.5729],[126.5356,37.5776],[126.5254,37.5776],[126.5182,37.5767],[126.503,37.5736],[126.4847,37.5726],[126.4671,37.5778],[126.4523,37.5886],[126.4419,37.6038],[126.4379,37.6125],[126.4287,37.6226],[126.4175,37.6349],[126.4106,37.6503],[126.4011,37.672],[126.3901,37.6818],[126.3879,37.6927],[126.3802,37.6968],[126.3555,37.7012],[126.3486,37.7106],[126.355,37.7214],[126.3556,37.7477],[126.3661,37.7556],[126.3598,37.7633],[126.3568,37.7803],[126.3694,37.7951],[126.3802,37.7993],[126.3802,37.8019],[126.384,37.8008],[126.3915,37.8045],[126.3959,37.8148],[126.4108,37.8171],[126.4302,37.8241],[126.4377,37.8199],[126.442,37.8096],[126.4617,37.8008],[126.4789,37.7866],[126.4895,37.7835],[126.5028,37.7843],[126.5056,37.7812],[126.5075,37.7794],[126.5202,37.7706],[126.5339,37.766],[126.5396,37.7649],[126.5457,37.765],[126.5754,37.7521],[126.6058,37.7526],[126.6229,37.761],[126.6384,37.7747],[126.6423,37.7768],[126.6474,37.7826],[126.6544,37.7888]]],[[[126.6049,33.2413],[126.2812,33.2101],[126.1661,33.2958],[126.3548,33.4663],[126.7281,33.5472],[126.8894,33.4431],[126.7751,33.2958],[126.6049,33.2413]]],[[[126.4848,37.2841],[126.3746,37.0416],[125.871,37.2254],[126.1092,37.1514],[126.249,37.3667],[126.4848,37.2841]]],[[[125.7708,37.6949],[125.8116,37.5285],[125.7133,37.564],[125.7059,37.5666],[125.6918,37.5765],[125.6815,37.5903],[125.6762,37.6067],[125.6763,37.6239],[125.6818,37.6403],[125.6922,37.654],[125.7065,37.6637],[125.7708,37.6949]]]]},properties:{name:"South Korea"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[47.9591,30.0038],[48.3365,29.7801],[47.882,29.4296],[48.0921,29.2944],[48.4333,28.5314],[47.7643,28.5452],[47.4177,28.9797],[46.553,29.1012],[47.2144,30.0133],[47.9591,30.0038]]]},properties:{name:"Kuwait"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-81.5321,19.4131],[-80.982,19.3761],[-81.0083,19.2749],[-81.4641,19.2261],[-81.5321,19.4131]]]},properties:{name:"Cayman Islands"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[87.3126,49.0997],[85.7846,48.2473],[85.3679,47.0945],[84.825,46.9384],[83.0421,47.0395],[82.4415,45.832],[82.375,45.2653],[81.5111,45.2789],[80.2882,44.9512],[80.6646,43.3477],[80.2371,42.3929],[80.2456,42.2209],[79.8198,42.3929],[78.8408,42.7334],[77.0929,42.9409],[75.4801,42.8656],[74.2231,43.1398],[73.7513,43.0076],[73.3125,42.5357],[71.555,42.7757],[71.0385,42.3929],[70.9402,42.2592],[70.6274,42.1059],[69.8741,41.7331],[69.1476,41.3736],[68.4646,40.6663],[67.8782,41.1359],[66.6943,41.3166],[66.5069,41.7331],[66.4486,41.8377],[66.0488,42.1109],[66.0376,42.3929],[65.9536,42.7934],[65.0384,43.6349],[62.0428,43.6178],[60.8103,44.4097],[58.5043,45.4677],[56.1524,44.8265],[56.0252,42.3929],[56.0005,41.7331],[56.0006,41.318],[55.4482,41.3123],[55.0793,41.7331],[54.8453,42.0001],[54.6085,42.1059],[54.1353,42.3174],[53.2532,42.2017],[53.0753,42.1059],[52.4322,41.7597],[52.5391,42.1059],[52.6277,42.3929],[52.626,42.7096],[51.3899,43.2306],[50.465,44.4641],[51.1379,44.5785],[51.0993,44.975],[51.5158,45.3353],[52.7943,45.464],[53.0812,46.215],[52.9723,46.7786],[51.1616,47.0596],[49.2136,46.3332],[48.7942,46.599],[48.8096,46.9554],[48.4852,47.4156],[48.0285,47.6876],[47.2665,47.8148],[46.6827,48.4677],[46.9351,49.7296],[47.446,50.2984],[48.573,49.9575],[48.9207,50.6761],[50.8212,51.6542],[51.5214,51.544],[52.3307,51.6643],[53.2814,51.483],[54.5327,50.6975],[54.9145,50.8104],[55.6774,50.6643],[56.5075,50.972],[58.0642,51.0787],[59.4875,50.6292],[61.1066,50.7718],[61.3457,50.9419],[61.3899,51.3192],[60.2825,51.9603],[60.8386,52.2997],[60.9869,52.8069],[61.6281,53.0971],[61.2404,53.6425],[61.3583,53.9303],[64.8622,54.3622],[65.6722,54.6387],[67.9852,54.952],[69.013,55.3543],[70.7176,55.2085],[71.2665,54.2568],[73.1022,54.0044],[73.6202,53.5211],[74.3649,53.5615],[75.5425,54.0876],[76.5796,54.2755],[76.7984,53.8832],[78.2111,52.9706],[79.9616,51.0371],[80.754,51.2158],[81.6483,50.8179],[83.538,50.9008],[85.3276,49.658],[86.0644,49.5438],[86.6632,49.68],[87.3126,49.0997]]],[[[73.4786,53.86],[73.4388,54.0281],[73.8138,54.1065],[73.723,53.8039],[73.4786,53.86]]]]},properties:{name:"Kazakhstan"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[107.5561,14.6866],[106.9803,14.3702],[106.6894,14.4307],[106.0779,14.3576],[106.0246,13.9409],[105.2001,14.3427],[105.5365,14.6777],[105.6101,15.563],[105.3708,15.8632],[104.7661,16.548],[104.7439,17.4068],[103.9616,18.2846],[103.3719,18.4053],[102.7248,17.8976],[102.0799,18.1552],[101.3548,17.6701],[101.1487,17.5228],[100.9955,17.6658],[101.179,18.5917],[101.3116,18.9891],[101.2249,19.5387],[100.5125,19.5883],[100.4885,20.1911],[100.0853,20.3527],[100.9577,21.3822],[101.1432,21.5641],[101.2992,21.2567],[101.7015,21.2366],[101.6416,22.2745],[102.1439,22.4007],[102.9271,21.7266],[102.897,21.3822],[103.2157,20.8666],[103.665,20.7839],[104.1421,20.9297],[104.4887,20.719],[104.5298,20.4333],[104.9197,20.0654],[104.6562,19.6942],[104.1919,19.6463],[103.9581,19.3062],[105.1551,18.6727],[105.1906,18.3486],[106.5116,16.9689],[106.74,16.4137],[107.3734,16.1224],[107.2941,15.8632],[107.5938,15.3404],[107.5561,14.6866]]]},properties:{name:"Laos"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[35.6244,33.2423],[35.1034,33.0936],[35.9756,34.6334],[36.4058,34.578],[36.5688,34.2017],[35.6244,33.2423]]]},properties:{name:"Lebanon"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-61.1329,13.8767],[-61.0349,14.0693],[-60.829,14.0373],[-60.9347,13.6443],[-61.1329,13.8767]]]},properties:{name:"Saint Lucia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[9.6071,47.0608],[9.476,47.0518],[9.5307,47.2706],[9.6206,47.1516],[9.6071,47.0608]]]},properties:{name:"Liechtenstein"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[79.7508,7.9286],[79.8337,8.0142],[79.7794,8.5235],[79.9183,8.5541],[79.9225,8.9409],[80.0675,9.0611],[80.0634,9.3925],[80.2181,9.558],[80.0272,9.7745],[80.2852,9.8441],[80.4738,9.5725],[80.8076,9.2901],[81.0332,8.8855],[81.3498,8.4939],[81.473,8.0411],[81.7848,7.5987],[81.8754,7.0229],[81.697,6.4947],[81.322,6.2049],[80.7152,5.9644],[80.2653,6.0023],[80.0643,6.1959],[79.8676,6.8183],[79.8361,7.322],[79.7508,7.9286]]]},properties:{name:"Sri Lanka"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-8.4722,7.5546],[-8.3267,7.0841],[-8.4496,6.4988],[-7.4568,5.7608],[-7.5231,4.3617],[-8.491,4.718],[-9.4809,5.3693],[-10.3175,6.0775],[-10.7788,6.3029],[-11.4975,6.9234],[-10.6672,7.7454],[-10.282,8.488],[-9.5993,8.3707],[-9.1699,7.3537],[-8.4722,7.5546]]]},properties:{name:"Liberia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[27.0327,-29.6171],[27.37,-29.4774],[27.7666,-28.8974],[28.0366,-28.8784],[28.1938,-28.6929],[28.6524,-28.5749],[28.9973,-28.9141],[29.3202,-29.0855],[29.4624,-29.352],[29.1825,-29.665],[29.172,-29.9121],[28.8475,-30.093],[28.4128,-30.1401],[28.1178,-30.6655],[27.7514,-30.5918],[27.3808,-30.2],[27.0327,-29.6171]]]},properties:{name:"Lesotho"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[26.6304,55.6807],[26.7404,55.2639],[26.6447,55.1608],[26.3111,55.1325],[26.1932,55.0034],[25.9578,54.9506],[25.7708,54.7943],[25.761,54.5791],[25.6697,54.195],[24.8359,54.149],[24.4754,53.9309],[23.5147,53.9566],[23.3215,54.2533],[22.7921,54.3634],[22.8215,54.8264],[22.589,55.0703],[21.6511,55.18],[21.3903,55.2694],[21.2735,55.2457],[21.05,55.9115],[21.0642,56.0691],[21.9782,56.3851],[22.6356,56.3682],[22.9205,56.3991],[23.1554,56.3288],[24.1518,56.2533],[24.8485,56.3676],[25.8214,56.0522],[26.0462,55.9441],[26.6304,55.6807]]]},properties:{name:"Lithuania"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[6.1377,50.13],[6.475,49.8213],[6.3801,49.5511],[6.3671,49.4695],[5.8934,49.4969],[5.8181,49.5463],[5.7463,49.8536],[6.0249,50.1828],[6.1377,50.13]]]},properties:{name:"Luxembourg"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[28.1546,56.1698],[27.6312,55.8737],[26.6304,55.6807],[26.0462,55.9441],[25.8214,56.0522],[24.8485,56.3676],[24.1518,56.2533],[23.1554,56.3288],[22.9205,56.3991],[22.6356,56.3682],[21.9782,56.3851],[21.0642,56.0691],[21.073,56.7843],[21.7132,57.54],[22.4918,57.7045],[23.1469,57.3163],[23.477,57.0452],[23.9345,57.0064],[24.1192,57.0863],[24.3819,57.3167],[24.3528,57.8766],[24.8341,57.9728],[25.0463,58.0401],[26.4549,57.5549],[27.3516,57.5182],[27.6908,57.3706],[28.1546,56.1698]]]},properties:{name:"Latvia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[25.1472,31.6497],[24.892,31.3739],[24.9888,30.7293],[24.7452,30.1337],[24.9948,29.1507],[25,26.8805],[25,25.5268],[25,24.9875],[25,22],[25,21.6026],[24.9765,20.0689],[24.0666,19.9725],[24,19.5],[16.1947,23.3281],[14.9984,22.9972],[14.1827,22.692],[13.4242,23.1955],[11.9985,23.5127],[11.6027,24.2015],[10.4325,24.5274],[10.1392,24.8009],[9.9784,25.3828],[9.4591,26.143],[9.8837,26.6543],[9.9363,27.8899],[9.8055,29.2946],[9.4464,30.0952],[9.5516,30.2464],[10.234,30.7743],[10.2329,31.5973],[11.3188,32.3104],[11.5395,32.5327],[11.5643,33.1651],[12.3804,32.8311],[13.3439,32.8653],[15.1861,32.3341],[15.4797,31.7506],[15.8354,31.3853],[17.4555,31.0433],[19.1543,30.3129],[19.6354,30.4643],[20.0481,30.8943],[19.9817,31.8874],[20.2437,32.2947],[20.9944,32.7107],[21.7671,32.9048],[22.9352,32.6696],[23.1522,32.325],[23.4122,32.1894],[24.1654,32.0109],[24.9115,31.9798],[25.1472,31.6497]]]},properties:{name:"Libya"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-5.3434,35.8709],[-5.3282,35.7175],[-5.2469,35.5748],[-4.9374,35.3311],[-4.6931,35.2112],[-4.4183,35.1574],[-4.3025,35.1701],[-4.2979,35.1704],[-4.297,35.1728],[-3.3739,35.2562],[-2.9698,35.2933],[-2.9323,35.2776],[-2.9247,35.2784],[-2.7863,35.1869],[-2.6593,35.103],[-2.2097,35.0846],[-1.8091,34.6952],[-1.5962,33.2215],[-1.1187,32.5223],[-1.2332,32.2639],[-2.7778,32.0677],[-3.0082,31.7988],[-3.5844,31.5104],[-3.8126,30.6884],[-4.9056,30.1258],[-5.5291,29.6274],[-7.1492,29.458],[-8.3109,28.8968],[-8.6296,28.5136],[-8.6666,27.662],[-13.173,27.667],[-12.8629,27.947],[-11.5272,28.3192],[-10.2316,29.3082],[-9.6511,30.2728],[-9.8437,30.6757],[-9.8045,31.4344],[-9.2562,32.1908],[-9.1851,32.6104],[-8.0741,33.4365],[-6.8681,34.0174],[-5.9489,35.701],[-5.3819,35.913],[-5.3434,35.8709]]]},properties:{name:"Morocco"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[7.4392,43.749],[7.4375,43.7471],[7.4345,43.7442],[7.4272,43.737],[7.4249,43.7348],[7.4147,43.7266],[7.4103,43.7293],[7.4129,43.7328],[7.4374,43.7516],[7.4392,43.749]]]},properties:{name:"Monaco"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[28.2114,45.4673],[28.1158,46.1078],[28.2283,46.438],[28.1138,46.8384],[27.3912,47.5894],[27.1926,47.9044],[26.6306,48.2597],[27.6199,48.4649],[28.7544,48.135],[28.9245,47.9859],[29.1968,47.9044],[29.223,47.477],[29.5435,47.3214],[29.9594,46.6108],[29.8609,46.431],[29.0181,46.4516],[29.0061,46.1012],[28.7122,45.8204],[28.2114,45.4673]]]},properties:{name:"Moldova"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[20.0763,42.5558],[19.831,42.4664],[19.6623,42.5469],[19.488,42.3929],[19.3924,42.2956],[19.3841,42.1059],[19.3725,41.8441],[18.5252,42.4205],[18.4381,42.5557],[18.7067,43.1554],[19.2241,43.5275],[20.0639,43.0068],[20.3529,42.8334],[20.0763,42.5558]]]},properties:{name:"Montenegro"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[125.6861,9.6278],[125.8361,9.5882],[126.107,9.9587],[126.1614,9.7729],[125.9535,9.5762],[125.9359,9.3815],[126.1536,9.2283],[126.4463,7.8063],[126.5799,7.2993],[126.1161,6.6926],[125.8266,7.2332],[125.4592,6.8735],[125.6755,6.0802],[125.3546,5.6143],[125.1942,6.0334],[124.8356,5.9022],[124.1152,6.3351],[124.0154,6.9154],[124.1561,7.4061],[123.6916,7.8063],[123.431,7.8063],[123.4058,7.6304],[123.1658,7.4765],[122.8249,7.3662],[122.7577,7.7004],[122.583,7.7118],[122.047,6.93],[121.9491,7.1314],[122.1163,7.7856],[122.8725,8.1648],[123.1658,8.5318],[123.6352,8.5998],[123.8856,8.2461],[124.125,8.2219],[124.3902,8.5589],[124.6849,8.5461],[124.8246,8.9461],[125.1071,8.8939],[125.5349,9.0955],[125.3984,9.7538],[125.5163,10.1026],[125.6199,10.0975],[125.6861,9.6278]]],[[[125.4721,11.804],[125.5206,11.1264],[125.0263,11.1264],[125.2002,10.2724],[124.9086,10.1223],[124.7292,10.4333],[124.7489,10.8159],[124.6181,10.9569],[124.4139,10.915],[124.3469,11.3798],[124.5098,11.5885],[124.6933,11.3616],[124.8277,11.804],[124.692,11.804],[124.2724,12.3896],[124.425,12.5825],[125.2575,12.4981],[125.5018,12.1218],[125.4721,11.804]]],[[[124.554,9.7499],[124.1137,9.5874],[123.7753,9.7499],[124.2086,10.1875],[124.554,10.048],[124.554,9.7499]]],[[[124.4114,13.6703],[124.2144,13.529],[124.0284,13.6647],[124.2093,14.0943],[124.4189,13.7977],[124.4114,13.6703]]],[[[120.8602,18.6314],[121.7969,18.3347],[122.2742,18.3771],[122.1613,17.6999],[122.4768,16.9427],[122.1039,16.255],[121.6409,15.9685],[121.415,15.3049],[121.6132,14.5872],[121.7686,14.1867],[122.0776,13.9676],[122.5338,14.317],[123.0292,14.1058],[123.1517,13.7755],[123.5631,13.9908],[123.8272,13.9235],[123.5822,13.615],[123.758,13.1798],[124.1064,12.9458],[124.0644,12.5893],[123.3668,13.0143],[123.1909,13.409],[122.6648,13.7578],[122.5816,13.7003],[122.6966,13.2475],[122.5944,13.1618],[122.2393,13.5122],[122.0655,13.2257],[121.8268,13.4128],[122.128,13.6221],[121.8851,13.8618],[121.1879,13.6245],[120.6831,13.9667],[120.6373,14.2172],[120.967,14.5872],[120.8672,14.7358],[120.5553,14.7259],[120.5733,14.4607],[120.4062,14.4696],[120.3647,14.6193],[120.0985,14.8397],[119.7507,15.9685],[119.8185,16.2568],[120.1641,16.0803],[120.3786,16.2105],[120.3844,17.616],[120.5963,18.4478],[120.8602,18.6314]]],[[[124.0118,10.4343],[123.4238,9.5791],[123.3245,9.6161],[123.3451,9.751],[123.671,10.4343],[123.9177,11.0284],[124.0218,11.0067],[124.0118,10.4343]]],[[[123.8546,12.2471],[124.0067,11.9178],[123.9277,11.8497],[123.4977,12.1325],[123.2473,12.099],[123.246,12.4994],[123.4715,12.4994],[123.8546,12.2471]]],[[[123.1762,11.5024],[123.1396,11.1284],[123.0299,11.1638],[122.762,10.9007],[122.8632,10.6977],[123.0299,10.9174],[123.2333,10.985],[123.5158,10.8717],[123.5238,10.6787],[123.3623,10.4331],[123.1678,9.9116],[123.1262,9.6261],[123.29,9.3411],[123.1678,9.0711],[122.4225,9.7112],[122.4695,9.9183],[122.8223,10.1131],[122.8339,10.4331],[122.4146,10.65],[121.9947,10.5542],[122.0574,11.6352],[121.9405,11.8141],[122.0507,11.8623],[123.0299,11.5121],[123.1762,11.5024]]],[[[122.7642,12.3937],[122.6602,12.1984],[122.3423,12.4583],[122.661,12.5425],[122.7642,12.3937]]],[[[122.1357,12.5344],[122.0532,12.1977],[121.8693,12.2828],[121.986,12.5711],[121.9377,12.8789],[122.1352,12.9554],[122.111,12.7116],[122.2425,12.6743],[122.1357,12.5344]]],[[[122.1953,6.4803],[122.0017,6.3728],[121.7696,6.608],[122.0303,6.7336],[122.1836,6.6514],[122.1953,6.4803]]],[[[122.14,14.8988],[122.0808,14.7915],[121.7002,14.9294],[121.9476,15.1311],[122.14,14.8988]]],[[[121.6348,19.2069],[121.3886,19.1892],[121.303,19.3081],[121.3427,19.4221],[121.5952,19.4847],[121.6348,19.2069]]],[[[121.5068,12.6039],[121.2253,12.2764],[120.5282,13.2468],[120.3679,13.3761],[120.3679,13.5128],[121.1294,13.4286],[121.3763,13.2468],[121.5068,12.6039]]],[[[121.4029,6.032],[121.2269,5.7985],[120.9035,5.9594],[120.9731,6.0848],[121.4029,6.032]]],[[[120.3661,5.3313],[120.3567,5.0974],[120.1416,5.1384],[119.7954,4.9493],[119.723,5.0221],[120.0211,5.3738],[120.2128,5.4542],[120.3661,5.3313]]],[[[120.304,5.9371],[120.1589,5.7836],[119.8749,5.8961],[120.2134,6.1273],[120.304,5.9371]]],[[[120.2768,12.0826],[120.0136,11.794],[119.8994,11.8578],[119.8289,12.1349],[119.9905,12.2288],[120.2768,12.0826]]],[[[120.2696,13.7973],[120.1287,13.7074],[119.8008,13.951],[120.0259,14.0509],[120.2696,13.7973]]],[[[120.0657,10.621],[120.0883,10.4319],[119.7052,10.5025],[119.7696,10.73],[120.0657,10.621]]],[[[120.046,11.6003],[119.9487,11.4286],[119.6158,11.4672],[119.803,11.7212],[120.046,11.6003]]],[[[117.7595,8.6997],[117.4018,8.4719],[117.2442,8.4954],[117.7595,9.1212],[119.0966,10.4337],[119.1817,10.4337],[119.2374,11.1383],[119.4415,11.3476],[119.6885,11.3603],[119.5746,11.1383],[119.6101,10.4337],[118.8845,9.9421],[118.5119,9.3531],[117.7595,8.6997]]],[[[118.653,7.1332],[118.5864,6.8393],[118.2745,6.9411],[118.2451,7.0498],[118.653,7.1332]]],[[[117.113,8.0559],[117.0351,7.8539],[116.9193,7.9417],[116.9852,8.1737],[117.2447,8.3998],[117.3449,8.1861],[117.113,8.0559]]]]},properties:{name:"Philippines"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[75.3339,32.3266],[74.65,31.8079],[74.4044,30.8691],[71.9298,28.0722],[70.9183,27.7815],[70.3421,27.909],[69.5759,26.9485],[70.084,26.4979],[70.2013,25.93],[70.716,25.4417],[71.0157,24.7573],[70.8701,24.2488],[70.0829,24.2255],[68.9389,24.2488],[68.8662,24.2488],[67.5192,24.0224],[67.3698,24.633],[66.7746,24.8824],[66.35,25.4884],[61.6105,25.195],[61.8842,26.2036],[62.4742,26.5693],[63.0911,26.6676],[63.1929,26.8423],[63.1741,27.1781],[62.8319,27.3052],[62.7458,28.2253],[61.8091,28.6605],[60.873,29.8585],[62.4953,29.403],[65.2412,29.5782],[66.2579,29.8854],[66.4208,30.9063],[66.9026,31.2606],[67.5736,31.2768],[67.8555,31.6214],[68.2247,31.7982],[68.9944,31.6561],[69.2828,32.1149],[69.5333,33.0026],[70.2571,33.3559],[69.9165,33.9708],[70.9817,34.0291],[71.2242,34.7534],[71.6228,35.1948],[71.2997,36.1094],[72.3359,36.7654],[73.2944,36.8773],[73.6393,36.9034],[73.6909,36.7433],[73.2944,36.7238],[72.5938,36.2273],[72.5308,36.0297],[72.6179,35.8638],[73.049,35.8283],[73.2944,35.6086],[73.7126,35.5074],[73.7903,35.2386],[74.0657,35.092],[73.7156,34.7534],[73.4315,34.3917],[73.6386,33.1515],[75.3339,32.3266]]]},properties:{name:"Pakistan"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[19.8038,54.4424],[20.1365,54.4162],[20.3135,54.4022],[21.5593,54.3225],[22.7921,54.3634],[23.3215,54.2533],[23.5147,53.9566],[23.5887,53.6959],[23.8116,53.255],[23.9162,52.9048],[23.8616,52.7073],[23.1783,52.2831],[23.6455,52.0553],[23.5477,51.6914],[23.6174,51.5095],[23.7092,51.2776],[24.096,50.6123],[23.5476,50.2516],[22.6861,49.5732],[22.7088,49.2022],[22.5668,49.0884],[21.3977,49.4338],[20.6149,49.4178],[20.1365,49.278],[19.8839,49.2042],[19.4674,49.6138],[19.1237,49.4201],[18.8516,49.5172],[18.5757,49.9104],[18.0351,50.0658],[17.4296,50.2545],[16.9079,50.4495],[16.8633,50.1981],[16.5803,50.1428],[16.3325,50.5925],[16.1073,50.6621],[15.5353,50.7794],[15.1816,50.9574],[14.8234,50.8706],[14.9742,51.3639],[14.7299,51.5818],[14.7167,52.0012],[14.7552,52.07],[14.6009,52.2721],[14.5344,52.395],[14.5651,52.6245],[14.4364,52.6799],[14.1567,52.8956],[14.1437,52.9614],[14.4122,53.3296],[14.2675,53.6978],[15.3881,54.1589],[16.6991,54.5692],[17.6666,54.7832],[18.2896,54.8068],[18.5417,54.5845],[18.95,54.3583],[19.6389,54.4582],[19.6451,54.4516],[19.3315,54.3523],[19.257,54.2785],[19.8038,54.4424]]]},properties:{name:"Poland"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-56.1805,47.1484],[-56.2609,46.8912],[-55.9808,46.7185],[-56.1685,46.6411],[-56.5198,46.8061],[-56.3798,46.9702],[-56.3849,47.2296],[-56.1805,47.1484]]]},properties:{name:"Saint Pierre and Miquelon"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-128.4739,-24.3403],[-128.4006,-24.2028],[-128.2309,-24.1758],[-128.2155,-24.5814],[-128.385,-24.5115],[-128.4739,-24.3403]]]},properties:{name:"Pitcairn Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-67.2167,18.3365],[-67.0683,18.4872],[-66.4737,18.4709],[-65.9003,18.4404],[-65.626,18.2782],[-65.95,17.9884],[-66.4737,17.9896],[-67.0637,17.9836],[-67.2167,18.3365]]]},properties:{name:"Puerto Rico"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[35.476,31.4905],[34.9515,31.4243],[35.0826,31.7397],[35.0135,32.3104],[35.2216,32.5167],[35.5551,32.389],[35.476,31.4905]]],[[[34.2688,31.2205],[34.2198,31.3217],[34.234,31.3334],[34.4729,31.5726],[34.4909,31.5959],[34.4994,31.4912],[34.2688,31.2205]]]]},properties:{name:"Palestine"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-7.4019,37.1748],[-8.0741,37.053],[-8.8579,37.1415],[-8.7963,37.4429],[-8.7924,37.694],[-8.7351,38.5157],[-9.1747,38.4665],[-9.4452,38.7632],[-9.4165,39.0547],[-9.0403,39.7414],[-8.8949,40.0455],[-8.7749,40.5145],[-8.6531,40.9648],[-8.7764,41.472],[-8.8116,41.6116],[-8.8632,41.8721],[-8.199,42.1544],[-8.1651,41.8183],[-8.0519,41.8206],[-7.2005,41.8797],[-6.9858,41.9714],[-6.6375,41.8984],[-6.3008,41.5924],[-6.4797,41.2944],[-6.6898,41.2052],[-6.9299,41.0295],[-6.8022,40.5288],[-6.8651,40.2707],[-6.9513,40.2574],[-7.0106,39.7363],[-7.5429,39.6628],[-7.2315,39.2784],[-7.0209,39.0127],[-7.2031,38.751],[-7.2758,38.4539],[-7.108,38.1881],[-6.9317,38.2084],[-7.4457,37.694],[-7.5127,37.5263],[-7.4019,37.1748]]],[[[-15.8103,29.9885],[-15.9142,29.8996],[-16.1934,29.9542],[-16.2041,30.0776],[-16.0535,30.2138],[-15.8103,29.9885]]],[[[-16.6542,32.7289],[-16.9703,32.5887],[-17.1775,32.7607],[-16.8521,32.8591],[-16.6542,32.7289]]],[[[-25.1259,37.7314],[-25.5507,37.6875],[-25.6229,37.7689],[-25.5234,37.8623],[-25.099,37.8667],[-25.1259,37.7314]]],[[[-25.6029,37.8163],[-25.7462,37.705],[-25.9489,37.8788],[-25.8024,37.9838],[-25.6029,37.8163]]],[[[-27.0259,38.8346],[-26.9863,38.5909],[-27.3268,38.6063],[-27.4303,38.7367],[-27.0259,38.8346]]],[[[-28.2995,38.5007],[-28.3758,38.4157],[-28.7859,38.4612],[-28.9592,38.6194],[-28.713,38.7097],[-28.2995,38.5007]]],[[[-31.025,39.4895],[-31.1392,39.2852],[-31.3079,39.287],[-31.3542,39.4642],[-31.2793,39.625],[-31.025,39.4895]]]]},properties:{name:"Portugal"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[134.679,7.7471],[134.6162,7.2854],[134.403,7.3024],[134.5227,7.6612],[134.679,7.7471]]],[[[134.2794,6.8402],[133.9897,6.7108],[134.0188,7.0616],[134.1988,7.0905],[134.2794,6.8402]]],[[[131.2904,3.0827],[131.1123,2.7578],[130.9605,3.0182],[131.2545,3.2259],[131.2904,3.0827]]]]},properties:{name:"Palau"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-58.1635,-20.1625],[-57.863,-20.9629],[-57.8684,-22.0614],[-57.0908,-22.2421],[-56.4163,-22.1247],[-55.8971,-22.3237],[-55.3922,-23.8396],[-54.6633,-23.8829],[-54.3851,-24.0606],[-54.5941,-25.5923],[-54.7923,-26.5932],[-55.4625,-27.0428],[-55.7448,-27.4423],[-56.1084,-27.3439],[-56.4174,-27.5161],[-58.5741,-27.253],[-57.6289,-25.5065],[-57.6904,-25.2889],[-59.9462,-24.0628],[-60.9507,-23.795],[-61.9084,-23.0815],[-62.6452,-22.2505],[-62.6104,-22.1424],[-62.2348,-20.5542],[-61.658,-19.6476],[-59.9788,-19.3035],[-59.1211,-19.2995],[-58.2561,-19.7822],[-58.1635,-20.1625]]]},properties:{name:"Paraguay"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[51.3072,24.5064],[50.815,24.7395],[50.8625,24.8402],[50.7772,25.1654],[50.8085,25.5978],[50.8094,25.6029],[51.2627,26.0579],[51.4887,25.9122],[51.5749,25.0543],[51.3072,24.5064]]]},properties:{name:"Qatar"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[28.2114,45.4673],[28.6519,45.2511],[29.2976,45.4112],[29.667,45.3119],[29.6796,45.2118],[29.5569,44.874],[28.9941,44.6796],[28.7122,44.3774],[28.5789,43.7387],[27.6954,43.9873],[27.2713,44.1263],[26.3818,44.0386],[26.3582,44.0372],[25.6722,43.6881],[25.5445,43.6428],[25.2964,43.6554],[24.6548,43.7236],[24.3235,43.6977],[24.112,43.6999],[23.6304,43.791],[23.1554,43.8123],[22.9972,43.8079],[22.9664,44.0983],[22.6752,44.2157],[22.4997,44.6117],[22.0161,44.5992],[22.0124,44.6023],[21.3585,44.8216],[21.4792,45.193],[21.0166,45.3246],[20.6628,45.7941],[20.2643,46.1264],[20.7053,46.1609],[20.7756,46.2759],[21.1475,46.3359],[21.4414,46.6515],[21.659,47.0221],[22.1283,47.5981],[22.1808,47.6001],[22.8963,47.9541],[23.1554,48.1127],[23.4936,47.9678],[24.5608,47.9339],[24.9471,47.7291],[26.0988,47.9788],[26.6306,48.2597],[27.1926,47.9044],[27.3912,47.5894],[28.1138,46.8384],[28.2283,46.438],[28.1158,46.1078],[28.2114,45.4673]]]},properties:{name:"Romania"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[22.6752,44.2157],[22.5361,44.0455],[22.4069,43.7517],[22.667,43.4027],[22.7475,43.3866],[23.0062,43.1929],[22.7484,42.8898],[22.5155,42.8685],[22.4428,42.8255],[22.4615,42.6485],[22.3602,42.3112],[21.5869,42.2628],[21.443,42.2349],[21.2127,42.1107],[20.9223,42.1087],[20.5943,41.8773],[20.5181,42.1059],[20.4701,42.2156],[20.2649,42.3929],[20.0763,42.5558],[20.3529,42.8334],[20.0639,43.0068],[19.2241,43.5275],[19.4764,43.6372],[19.4971,44.0991],[19.1422,44.422],[19.3512,44.8891],[19.0221,44.8554],[19.1373,45.1187],[19.4252,45.1677],[19.0771,45.3405],[19.0053,45.4346],[19.0339,45.4868],[18.8897,45.9212],[19.3027,45.9916],[19.6981,46.1879],[19.8654,46.1503],[20.1365,46.1341],[20.2643,46.1264],[20.6628,45.7941],[21.0166,45.3246],[21.4792,45.193],[21.3585,44.8216],[22.0124,44.6023],[22.0161,44.5992],[22.4997,44.6117],[22.6752,44.2157]]]},properties:{name:"Serbia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[30.5433,-2.4132],[30.0189,-2.4386],[29.7073,-2.7799],[29.1824,-2.638],[29.0406,-2.7438],[28.9465,-2.3881],[28.9949,-2.2733],[29.2083,-1.766],[29.5895,-1.3866],[30.0925,-1.3689],[30.4735,-1.0574],[30.7956,-1.5802],[30.8216,-1.766],[30.8289,-2.1109],[30.6755,-2.2733],[30.5433,-2.4132]]]},properties:{name:"Rwanda"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[148.9425,45.5027],[148.882,45.3125],[148.4784,45.3935],[148.6407,45.5687],[148.9425,45.5027]]],[[[147.1653,44.6366],[147.0266,44.414],[146.8157,44.5694],[146.9151,44.7252],[147.1664,44.7272],[147.2386,44.8552],[147.8835,45.2387],[147.9437,45.4666],[148.2504,45.1744],[147.9142,44.96],[147.6584,44.958],[147.5901,44.8417],[147.1653,44.6366]]],[[[146.3048,44.3015],[145.9094,44.0684],[145.8106,44.133],[146.0545,44.4502],[146.3048,44.3015]]],[[[145.6386,43.8878],[145.5989,43.6582],[145.3799,43.6597],[145.3254,43.841],[145.5652,43.9908],[145.6386,43.8878]]]]},properties:{name:"Kuril Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-75.2511,18.5294],[-74.8958,18.5166],[-74.8365,18.2647],[-75.0892,18.2897],[-75.2511,18.5294]]]},properties:{name:"Navassa Island"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[117.6048,15.2975],[117.6846,15.3492],[117.811,15.2409],[117.9928,15.0852],[117.9236,15.0038],[117.6374,15.0731],[117.6048,15.2975]]]},properties:{name:"Scarborough Reef"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[123.1791,25.6798],[123.5462,25.8885],[123.6814,25.7112],[123.2995,25.5839],[123.1791,25.6798]]]},properties:{name:"Senkaku Islands"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[54.7024,-15.8799],[54.6127,-16.1313],[54.3092,-15.7546],[54.4674,-15.7155],[54.7024,-15.8799]]],[[[47.5513,-11.4763],[47.4245,-11.715],[47.1644,-11.5048],[47.4023,-11.3411],[47.5513,-11.4763]]],[[[42.9694,-17.1823],[42.6813,-17.2191],[42.5171,-17.0453],[42.8528,-16.9499],[42.9694,-17.1823]]],[[[40.4369,-22.1561],[40.3489,-22.5928],[40.1548,-22.3855],[40.1858,-22.2105],[40.4369,-22.1561]]],[[[39.9182,-21.5501],[39.652,-21.6126],[39.549,-21.428],[39.8571,-21.2869],[39.9182,-21.5501]]]]},properties:{name:"Bassas Da India"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[28.977,9.6412],[28.5512,9.3479],[28.0981,9.3663],[27.9072,9.6102],[27.8156,10.0193],[27.9298,10.1398],[28.9293,10.1061],[28.977,9.6412]]]},properties:{name:"Abyei"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[33.1826,22.0017],[34.0865,22.0025],[33.9661,21.7899],[33.6406,21.7398],[33.1826,22.0017]]]},properties:{name:"Bir Tawil (Disputed Territory)"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[53.6461,12.7028],[53.8461,12.6042],[54.0848,12.7012],[54.4634,12.5445],[54.1329,12.3503],[53.7284,12.3021],[53.5462,12.3426],[53.3068,12.5372],[53.3993,12.6551],[53.6461,12.7028]]],[[[52,19],[53.107,16.6544],[52.4364,16.3497],[52.1341,15.654],[51.5872,15.3288],[49.5638,14.7052],[48.6192,14.0676],[45.6726,13.3012],[44.9607,12.7815],[44.1175,12.6413],[43.5481,12.8001],[43.282,13.3288],[42.8826,15.0012],[42.6016,15.3149],[42.7639,16.4046],[43.183,16.6552],[43.3633,17.4977],[45.6126,17.308],[46.7083,17.2521],[47.1932,16.9779],[48.1849,18.1433],[49.0135,18.5638],[52,19]]],[[[42.5415,16.2997],[42.358,16.1296],[42.2473,16.233],[42.2172,16.3172],[42.2973,16.4013],[42.5415,16.2997]]]]},properties:{name:"Yemen"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[38.0254,-46.8953],[37.8873,-47.0414],[37.5201,-46.9346],[37.5976,-46.7765],[38.0254,-46.8953]]],[[[31.9821,-25.952],[31.338,-25.8256],[30.9531,-26.2532],[30.8609,-26.7714],[31.2284,-27.2042],[31.5496,-27.3065],[31.94,-27.2766],[32.1337,-26.835],[32.8915,-26.8583],[32.7946,-27.2265],[32.3221,-28.5947],[31.3118,-29.4248],[30.0787,-31.214],[28.4291,-32.6388],[27.0545,-33.5418],[26.4843,-33.7479],[26.0025,-33.7064],[25.5483,-34.0063],[25.0772,-33.9884],[24.7605,-34.1775],[22.4286,-34.0265],[21.8498,-34.3301],[19.6936,-34.762],[18.7471,-34.1344],[18.3898,-34.0763],[18.4155,-33.6879],[17.8844,-32.9057],[18.2742,-32.6388],[18.2235,-31.8078],[17.3617,-30.4882],[16.8538,-29.1859],[16.4556,-28.6347],[17.0144,-28.0716],[17.32,-28.29],[17.4762,-28.6959],[18.2081,-28.8908],[19.162,-28.9253],[19.9434,-28.4086],[19.9995,-24.752],[20.4129,-25.096],[20.6983,-25.63],[20.8245,-26.0714],[20.7004,-26.8181],[21.2827,-26.8663],[21.661,-26.8299],[22.5598,-26.1926],[23.0327,-25.3248],[23.4396,-25.3063],[24.4722,-25.7662],[25.3317,-25.7424],[25.5853,-25.5825],[26.0025,-24.7193],[26.7949,-24.2778],[27.0526,-23.648],[28.2714,-22.6602],[29.3608,-22.1966],[31.3113,-22.4177],[31.9765,-24.3034],[31.9821,-25.952]],[[27.0327,-29.6171],[27.3808,-30.2],[27.7514,-30.5918],[28.1178,-30.6655],[28.4128,-30.1401],[28.8475,-30.093],[29.172,-29.9121],[29.1825,-29.665],[29.4624,-29.352],[29.3202,-29.0855],[28.9973,-28.9141],[28.6524,-28.5749],[28.1938,-28.6929],[28.0366,-28.8784],[27.7666,-28.8974],[27.37,-29.4774],[27.0327,-29.6171]]]]},properties:{name:"South Africa"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[32.9535,-9.4014],[33.6324,-10.4637],[33.2902,-10.9113],[33.4181,-12.4294],[33.0256,-12.7461],[32.8162,-13.5758],[33.2422,-13.9985],[31.8523,-14.4588],[30.3073,-14.9824],[30.4183,-15.6176],[29.2568,-15.7693],[28.8954,-16.0421],[28.8357,-16.3334],[27.8657,-16.9601],[26.8734,-18.0039],[25.2703,-17.7989],[25.2628,-17.7914],[24.5991,-17.4938],[23.4299,-17.6345],[22.1075,-16.3334],[22.0281,-13.0808],[23.8836,-12.9513],[24.0347,-12.3467],[23.983,-10.9113],[24.1243,-10.9113],[24.396,-11.3999],[25.2205,-11.26],[25.4764,-11.7233],[26.0386,-11.9177],[26.7612,-11.9646],[27.1699,-11.6261],[27.6036,-12.2134],[28.4077,-12.5205],[29.0399,-13.3796],[29.5569,-13.2535],[29.7527,-13.4086],[29.7932,-12.2818],[29.1044,-12.3704],[28.4861,-11.8258],[28.5408,-10.9113],[28.6626,-9.794],[28.454,-9.2529],[29.016,-8.5161],[30.7712,-8.1922],[31.0424,-8.5543],[31.8419,-8.8977],[32.9535,-9.4014]]]},properties:{name:"Zambia"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[31.3113,-22.4177],[29.3608,-22.1966],[28.9194,-21.7879],[28.123,-21.5265],[27.7788,-21.1231],[27.6166,-20.5719],[26.1873,-19.5021],[25.2703,-17.7989],[26.8734,-18.0039],[27.8657,-16.9601],[28.8357,-16.3334],[28.8954,-16.0421],[29.2568,-15.7693],[30.4183,-15.6176],[30.5713,-15.9585],[31.1972,-16.04],[32.8225,-16.6907],[33.0194,-17.3795],[33.0077,-18.2738],[32.7663,-18.9699],[32.9546,-19.9683],[32.1429,-21.5651],[31.3113,-22.4177]]]},properties:{name:"Zimbabwe"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-134.7579,-23.1154],[-134.7909,-23.3127],[-135.1201,-23.1118],[-134.9228,-22.9104],[-134.7579,-23.1154]]],[[[-136.2456,-21.4833],[-136.3384,-21.6367],[-136.6038,-21.5361],[-136.4457,-21.247],[-136.2456,-21.4833]]],[[[-139.9806,-8.8384],[-140.2076,-9.0745],[-140.3476,-8.7899],[-140.1728,-8.6834],[-139.9806,-8.8384]]],[[[-140.1892,-19.6886],[-140.5305,-19.7723],[-140.611,-19.642],[-140.4799,-19.4334],[-140.1892,-19.6886]]],[[[-141.2121,-13.9895],[-141.2349,-14.3925],[-141.3503,-14.3622],[-141.4912,-14.0328],[-141.2121,-13.9895]]],[[[-142.6566,-16.7862],[-142.9553,-16.8839],[-142.9694,-16.5838],[-142.7705,-16.5391],[-142.6566,-16.7862]]],[[[-144.3074,-14.9291],[-144.5782,-15.0848],[-144.7973,-15.0784],[-144.6374,-14.8603],[-144.4682,-14.8155],[-144.3074,-14.9291]]],[[[-145.2975,-17.5118],[-145.41,-17.607],[-145.7677,-17.2639],[-145.5388,-17.2302],[-145.2975,-17.5118]]],[[[-146.2769,-15.6763],[-146.3912,-15.7489],[-146.5943,-15.4177],[-146.4065,-15.2788],[-146.2769,-15.6763]]],[[[-149.2971,-17.5072],[-149.2994,-17.7917],[-149.6171,-17.773],[-149.675,-17.5456],[-149.2971,-17.5072]]]]},properties:{name:"French Polynesia"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[174.9552,-1.4438],[174.8784,-1.5532],[174.6115,-1.0983],[174.7712,-1.0228],[174.9552,-1.4438]]],[[[173.3124,1.339],[172.885,1.2419],[172.7632,1.3067],[173.1087,1.5196],[173.3124,1.339]]],[[[-150.2038,-10.0616],[-150.2717,-10.2322],[-150.3905,-10.1317],[-150.3674,-9.9742],[-150.185,-9.8879],[-150.0565,-9.7159],[-149.9841,-9.8257],[-150.2038,-10.0616]]],[[[-151.6949,-11.5565],[-151.8044,-11.6107],[-151.9819,-11.333],[-151.9549,-11.106],[-151.825,-11.2001],[-151.6949,-11.5565]]],[[[-157.2719,1.7957],[-157.4346,1.7279],[-157.651,1.8745],[-157.4777,2.1201],[-157.2719,1.7957]]],[[[-159.104,3.8492],[-159.3473,3.7047],[-159.5227,3.9568],[-159.3991,4.065],[-159.104,3.8492]]],[[[-171.3732,-3.5481],[-171.4838,-3.8226],[-171.7045,-3.4779],[-171.565,-3.3669],[-171.3732,-3.5481]]]]},properties:{name:"Kiribati"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[41.5471,41.5204],[42.5152,41.4383],[42.815,41.5555],[43.4738,41.1233],[43.4696,41.0573],[43.7018,40.7773],[43.6539,40.1304],[44.3752,40.001],[44.7683,39.7141],[44.812,39.6317],[44.5021,39.717],[44.3729,39.452],[44.05,39.3628],[44.4142,38.2972],[44.2847,37.9314],[44.4629,37.8096],[44.6485,37.4271],[44.7931,37.1763],[44.3175,37.0426],[44.1298,37.279],[43.4246,37.2753],[42.8718,37.37],[42.3557,37.108],[42.1596,37.2329],[41.6633,37.1029],[40.7628,37.096],[40.226,36.9014],[39.2161,36.6749],[38.0476,36.8456],[37.5855,36.7038],[37.16,36.6767],[36.6788,36.8327],[36.66,36.8332],[36.6168,36.2635],[36.2014,35.8768],[35.9168,35.9285],[35.8433,36.3198],[36.178,36.6918],[35.9631,36.903],[35.4678,36.5777],[34.8992,36.7383],[34.3261,36.6099],[33.6143,36.1545],[32.5763,36.0932],[31.8435,36.5909],[30.8497,36.8627],[30.6382,36.8079],[30.3761,36.3065],[29.7811,36.1705],[29.2606,36.3044],[28.5149,36.8091],[27.9346,36.6959],[27.9561,36.9364],[27.4194,37.0671],[27.4107,37.4271],[27.25,37.5028],[27.2646,37.875],[26.4588,38.2949],[26.8499,38.7906],[26.7639,39.1752],[26.7978,39.505],[26.6187,39.5479],[26.2563,39.4912],[26.1284,39.6273],[26.1063,39.9289],[26.3733,40.3468],[27.5063,40.3047],[28.1648,40.3956],[28.8484,40.3813],[28.9912,40.4663],[28.9906,40.5902],[29.5409,40.7025],[29.3425,40.8077],[28.9343,40.9418],[29.1373,41.2447],[29.8656,41.1434],[30.3547,41.1842],[30.9821,41.0726],[31.2957,41.1163],[32.0626,41.5803],[32.4456,41.7331],[32.7361,41.849],[33.3698,42.0073],[34.2289,41.955],[35.0028,42.0121],[35.3818,41.7331],[35.5137,41.636],[35.9494,41.6995],[36.3344,41.3177],[36.7806,41.3414],[37.1523,41.1484],[38.11,40.9585],[39.1793,41.0741],[40.3283,40.9879],[41.2519,41.3299],[41.5471,41.5204]]],[[[26.0328,40.7303],[26.5923,41.4201],[26.3579,41.7111],[26.5615,41.9263],[26.9492,42.0002],[27.0597,42.0883],[28.0355,41.9831],[28.1082,41.7331],[28.153,41.579],[28.1817,41.5641],[28.8484,41.2849],[28.8484,40.9701],[27.9911,41.0183],[27.5657,40.9609],[26.9687,40.5534],[26.7349,40.6429],[26.0328,40.7303]]],[[[26.0736,40.1324],[25.7962,40.0214],[25.6179,40.1527],[26.0253,40.3299],[26.0736,40.1324]]]]},properties:{name:"Türkiye"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-61.633,10.1375],[-61.4993,10.6322],[-61.4387,10.7532],[-60.9865,10.8108],[-61.0316,10.6322],[-61.0278,10.1839],[-61.2816,10.0874],[-61.633,10.1375]]]},properties:{name:"Trinidad and Tobago"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[177.0395,-6.9988],[177.2368,-7.0769],[177.2696,-7.3884],[177.0657,-7.4184],[177.0395,-6.9988]]]},properties:{name:"Tuvalu"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[34.9596,-11.5733],[34.6491,-10.9113],[34.4913,-10.0245],[34.1574,-9.6216],[32.9535,-9.4014],[31.8419,-8.8977],[31.0424,-8.5543],[30.7712,-8.1922],[30.2771,-7.1145],[29.5926,-6.3587],[29.5996,-5.587],[29.3874,-5.0153],[29.4233,-4.4475],[30.0119,-4.2813],[30.8015,-3.2214],[30.806,-3.0324],[30.472,-2.8532],[30.5433,-2.4132],[30.6755,-2.2733],[30.8289,-2.1109],[30.8216,-1.766],[30.7956,-1.5802],[30.4735,-1.0574],[31.8419,-.9999],[33.934,-.9999],[35.3306,-1.766],[35.4478,-1.8303],[35.6903,-1.9633],[36.2553,-2.2733],[37.5178,-2.9658],[37.7537,-3.6303],[39.2042,-4.6703],[39.2074,-4.6813],[38.8561,-6.1048],[39.4608,-6.9615],[39.2874,-8.3571],[39.8111,-9.8797],[40.3944,-10.5107],[39.7605,-10.9113],[38.5264,-11.3686],[37.9279,-11.3183],[37.4237,-11.6577],[36.4576,-11.7048],[35.8549,-11.4522],[34.9596,-11.5733]]],[[[39.7978,-5.4211],[39.5471,-5.4242],[39.713,-4.8848],[39.8457,-4.9639],[39.7978,-5.4211]]],[[[39.5402,-6.3985],[39.3763,-6.4222],[39.1421,-6.1478],[39.2312,-5.8857],[39.4504,-6.0408],[39.5402,-6.3985]]]]},properties:{name:"United Republic of Tanzania"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[38.231,47.1187],[34.4589,46.1535],[34.51,45.8949],[35.228,45.369],[36.2129,45.4559],[36.4191,45.2813],[36.2692,45.0994],[35.4954,45.0545],[34.2033,44.527],[33.6689,44.5026],[33.4795,45.0505],[32.7281,45.4251],[33.3489,46.0144],[31.9721,46.2089],[31.9859,46.6013],[31.017,46.551],[29.9149,45.6926],[29.667,45.3119],[29.2976,45.4112],[28.6519,45.2511],[28.2114,45.4673],[28.7122,45.8204],[29.0061,46.1012],[29.0181,46.4516],[29.8609,46.431],[29.9594,46.6108],[29.5435,47.3214],[29.223,47.477],[29.1968,47.9044],[28.9245,47.9859],[28.7544,48.135],[27.6199,48.4649],[26.6306,48.2597],[26.0988,47.9788],[24.9471,47.7291],[24.5608,47.9339],[23.4936,47.9678],[23.1554,48.1127],[22.8963,47.9541],[22.1553,48.4034],[22.1758,48.5744],[22.3336,48.7016],[22.3828,48.8623],[22.5668,49.0884],[22.7088,49.2022],[22.6861,49.5732],[23.5476,50.2516],[24.096,50.6123],[23.7092,51.2776],[23.6174,51.5095],[24.4673,51.8703],[25.3462,51.9465],[27.1051,51.7564],[27.7579,51.5175],[28.2365,51.6329],[28.7544,51.4177],[29.0542,51.6149],[29.3584,51.4228],[30.1126,51.4902],[30.5213,51.3278],[30.5778,51.675],[30.9112,52.0252],[31.7869,52.1115],[33.7694,52.2996],[34.3442,51.8126],[34.307,51.4173],[35.1589,51.1293],[35.6852,50.4062],[36.5636,50.2607],[37.3983,50.3916],[38.0083,49.9928],[39.1438,49.8497],[39.9709,49.5281],[40.0937,49.271],[39.7817,48.848],[39.8787,48.3158],[39.756,47.9207],[38.5666,47.6752],[38.231,47.1187]]]},properties:{name:"Ukraine"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[33.934,-.9999],[31.8419,-.9999],[30.4735,-1.0574],[30.0925,-1.3689],[29.5895,-1.3866],[29.6422,-.8786],[29.721,-.1179],[29.7816,.0707],[29.8398,.252],[30.0157,.8003],[31.2496,2.0752],[30.7765,2.5135],[30.8545,3.4875],[30.9998,3.6956],[31.2097,3.7851],[31.5619,3.6758],[31.8199,3.7886],[32.0987,3.5511],[32.3907,3.7291],[32.973,3.8481],[33.4753,3.7622],[33.9945,4.2144],[34.4095,3.6353],[34.5428,3.1339],[34.8669,2.5352],[34.9796,1.7951],[34.5428,1.1019],[34.0186,.252],[33.9422,-.8786],[33.934,-.9999]]]},properties:{name:"Uganda"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-.1102,51.5096],[-.0247,51.4856],[.2174,51.4801],[.2309,51.4732],[.2398,51.4687],[.2441,51.467],[.2557,51.4625],[.2776,51.4535],[.2835,51.4539],[.2931,51.4557],[.3094,51.4661],[.3155,51.465],[.3291,51.4508],[.3397,51.4475],[.356,51.4458],[.3697,51.4452],[.4066,51.4433],[.4285,51.4468],[.4336,51.4474],[.4378,51.4474],[.4432,51.45],[.4589,51.4549],[.593,51.4661],[.6269,51.3752],[.7453,51.3644],[.9503,51.3457],[1.2689,51.3419],[1.3465,51.2285],[.964,50.9267],[.8548,50.9237],[.7453,50.9085],[-.0382,50.7995],[-.216,50.8276],[-.9413,50.8252],[-1.0404,50.8049],[-1.2098,50.8064],[-1.3652,50.8801],[-1.3983,50.8896],[-1.692,50.7366],[-1.7407,50.7215],[-1.7859,50.7203],[-1.8933,50.7175],[-1.9642,50.7156],[-2.7863,50.7179],[-2.9478,50.7183],[-3.3739,50.615],[-3.509,50.5165],[-3.4953,50.4324],[-3.5603,50.3856],[-3.7853,50.258],[-4.0693,50.3541],[-4.1622,50.3762],[-4.1576,50.4329],[-4.2186,50.4752],[-5.1343,50.0624],[-5.4569,50.1431],[-4.546,50.9284],[-3.7208,51.2331],[-3.3739,51.2083],[-3.2367,51.1985],[-2.9929,51.3203],[-2.7126,51.5041],[-2.6738,51.5444],[-2.5347,51.6773],[-2.6661,51.6394],[-2.7863,51.5997],[-3.0827,51.5019],[-3.3739,51.3914],[-3.6379,51.4698],[-3.8862,51.6174],[-4.0525,51.7033],[-4.9714,51.6358],[-5.201,51.7973],[-3.931,52.5536],[-4.3644,52.9835],[-4.0074,53.2469],[-3.3739,53.3392],[-3.0842,53.2561],[-3.1107,53.2963],[-3.0899,53.4035],[-2.9286,53.3083],[-2.7863,53.3134],[-2.8267,53.3317],[-2.8322,53.336],[-3.0087,53.4384],[-3.0672,53.5672],[-2.9562,53.6975],[-2.7863,53.7265],[-2.9425,53.8508],[-2.8754,53.9739],[-2.8695,54.1767],[-3.1453,54.0955],[-3.5562,54.5554],[-3.3788,54.8232],[-3.1191,54.9279],[-3.0574,54.9869],[-3.3739,54.9334],[-4.5498,54.7347],[-5.0764,54.8525],[-5.0412,54.9989],[-4.8444,55.3258],[-4.6583,55.5703],[-4.8708,55.6993],[-4.889,55.8748],[-4.7892,55.9521],[-4.5498,55.9233],[-4.5498,55.9356],[-4.6916,56.0002],[-4.7487,56.2033],[-5.2358,55.5504],[-5.7501,55.3713],[-5.665,56.2692],[-6.1561,56.5357],[-5.8807,56.7063],[-5.7146,57.2297],[-5.5044,57.3669],[-5.5662,57.7852],[-5.0712,58.3285],[-3.8391,58.3993],[-4.4321,57.4944],[-3.3739,57.6247],[-2.8015,57.6952],[-1.9158,57.4522],[-2.4253,56.7552],[-2.5116,56.6408],[-2.6789,56.5182],[-3.0519,56.4585],[-3.277,56.3505],[-2.9528,56.3097],[-2.9359,56.3046],[-2.9215,56.2944],[-2.9112,56.2801],[-2.9061,56.2633],[-2.9067,56.2457],[-2.9129,56.2292],[-2.9241,56.2157],[-2.9392,56.2063],[-3.3747,56.0293],[-3.3854,56.0257],[-3.3941,56.0271],[-3.3999,56.0248],[-3.3889,56.0224],[-3.3904,56.0172],[-3.3883,56.0121],[-3.3909,56.0066],[-3.3958,56.0095],[-3.4036,56.0101],[-3.4084,56.0143],[-3.4141,56.0171],[-3.4415,56.0228],[-3.4466,56.0211],[-3.4485,56.0194],[-3.4544,56.0217],[-3.4584,56.0274],[-3.4861,56.0344],[-3.5041,56.0342],[-3.5186,56.0414],[-3.5298,56.0398],[-3.5456,56.0407],[-3.5548,56.0442],[-3.5602,56.0504],[-3.5765,56.0588],[-3.5896,56.0592],[-3.5863,56.0549],[-3.5871,56.0503],[-3.5897,56.0474],[-3.5948,56.046],[-3.6074,56.0466],[-3.6141,56.0543],[-3.6181,56.0557],[-3.6502,56.0529],[-3.6701,56.0466],[-3.6852,56.0481],[-3.7068,56.0557],[-3.7256,56.0697],[-3.7396,56.0781],[-3.7494,56.0801],[-3.7576,56.0826],[-3.7618,56.0839],[-3.7759,56.0937],[-3.7924,56.1055],[-3.8041,56.1104],[-3.8197,56.1109],[-3.8294,56.1028],[-3.8311,56.1047],[-3.8328,56.1066],[-3.8271,56.1099],[-3.8277,56.1143],[-3.835,56.1181],[-3.8489,56.1222],[-3.857,56.1204],[-3.8582,56.118],[-3.8588,56.1101],[-3.864,56.1072],[-3.8591,56.1076],[-3.8566,56.1088],[-3.8541,56.1121],[-3.8557,56.1182],[-3.8486,56.1171],[-3.8382,56.1149],[-3.8409,56.107],[-3.8375,56.1015],[-3.832,56.0992],[-3.8202,56.0991],[-3.6946,56.0239],[-3.5157,56.0023],[-3.4253,55.994],[-3.0776,55.9469],[-2.3666,55.9461],[-2.0343,55.8112],[-1.8933,55.7117],[-1.7859,55.636],[-1.6281,55.5231],[-1.5573,55.3074],[-1.4617,55.0744],[-1.3639,54.9442],[-1.3474,54.8607],[-1.2422,54.7226],[-1.2089,54.5805],[-.7909,54.5595],[-.2143,54.154],[-.1957,53.9739],[-.0491,53.7654],[-.2963,53.7654],[-.4191,53.7196],[-.6984,53.6847],[-.4014,53.6921],[.0174,53.5254],[.2763,53.2308],[.1167,52.9094],[.266,52.8101],[.7453,52.918],[.9463,52.9633],[1.3301,52.9157],[1.6755,52.7427],[1.7405,52.5321],[1.52,52.0943],[1.0564,51.9515],[.9463,51.7343],[.7453,51.6757],[.5908,51.6306],[.6069,51.5176],[.5137,51.5312],[.3815,51.4592],[.2105,51.49],[.097,51.5157],[.0094,51.5071],[-.0794,51.5078],[-.1102,51.5096]],[[-.1102,51.5096],[-.1126,51.5104],[-.1499,51.4855],[-.2445,51.4887],[-.2228,51.4718],[-.1284,51.4851],[-.1102,51.5096]]],[[[.6222,51.5405],[.636,51.5764],[.7453,51.5596],[.788,51.553],[.7902,51.5223],[.7453,51.5272],[.6222,51.5405]]],[[[-1.4369,60.4236],[-1.3351,60.5431],[-1.1501,60.4735],[-1.1498,60.743],[-.8706,60.743],[-1.1669,60.241],[-1.3213,60.1145],[-1.4369,60.4236]]],[[[-1.5322,59.8857],[-1.4423,60.0197],[-1.0717,59.8842],[-1.2856,59.7158],[-1.4423,59.8015],[-1.5322,59.8857]]],[[[-1.4814,50.6951],[-1.3794,50.805],[-1.1285,50.7707],[-1.1278,50.5491],[-1.375,50.5496],[-1.4814,50.6951]]],[[[-2.7829,59.1653],[-3.1724,58.8149],[-3.3753,58.9168],[-3.3179,59.0737],[-2.9554,59.314],[-2.7829,59.1653]]],[[[-2.7829,59.1653],[-2.7888,59.1806],[-2.6063,59.3241],[-2.5143,59.1109],[-2.7118,59.0122],[-2.7829,59.1653]]],[[[-3.0996,53.7385],[-3.0952,53.8286],[-3.0099,53.936],[-2.944,53.7567],[-3.0996,53.7385]]],[[[-4.6228,53.3398],[-4.2798,53.4379],[-4.1506,53.245],[-4.3542,53.1021],[-4.6228,53.3398]]],[[[-7.2561,55.067],[-7.1491,55.0434],[-6.9366,55.1703],[-6.2092,55.2732],[-5.9765,55.0566],[-5.8683,54.6888],[-5.9052,54.6553],[-5.8135,54.6553],[-5.5493,54.6553],[-5.4625,54.4169],[-5.519,54.3612],[-5.6191,54.4588],[-5.6101,54.3089],[-5.9681,54.0619],[-6.268,54.1023],[-6.595,54.0447],[-6.6439,54.18],[-6.8642,54.3302],[-7.1885,54.3377],[-7.4291,54.1829],[-7.8411,54.3349],[-7.5702,54.6426],[-7.6551,54.7729],[-7.2561,55.067]]],[[[-6.7615,57.4256],[-6.4199,57.5571],[-6.301,57.7386],[-5.9506,57.3175],[-5.9931,57.0247],[-6.159,57.0852],[-6.3201,56.86],[-6.4761,56.9838],[-6.2245,57.2117],[-6.3554,57.3175],[-6.7103,57.3175],[-6.7615,57.4256]]],[[[-6.0409,55.6844],[-6.1667,55.6337],[-6.4548,55.7973],[-6.3518,55.8832],[-5.987,55.9516],[-5.987,55.7947],[-6.0409,55.6844]]],[[[-7.2113,57.5922],[-7.1682,57.4962],[-7.3508,57.093],[-7.4517,57.1198],[-7.3672,57.4036],[-7.4517,57.6711],[-7.0812,57.8133],[-7.1589,58.0163],[-6.9642,58.2507],[-6.3092,58.4676],[-6.2033,58.295],[-6.3734,58.0163],[-6.8742,57.7982],[-7.2113,57.5922]]],[[[-7.8718,58.2784],[-7.3775,58.4243],[-7.462,58.1623],[-7.798,58.1889],[-7.8718,58.2784]]],[[[-8.8381,57.9178],[-8.3377,57.8201],[-8.4254,57.6463],[-8.7676,57.7509],[-8.8381,57.9178]]]]},properties:{name:"United Kingdom"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[166.6872,19.471],[166.8216,19.1497],[166.5113,19.2327],[166.3937,19.396],[166.6872,19.471]]],[[[-159.8328,-.262],[-159.8173,-.4786],[-160.2398,-.4453],[-160.0809,-.2405],[-159.8328,-.262]]],[[[-162.1623,6.2639],[-162.2521,6.1459],[-162.6343,6.5266],[-163.1964,6.812],[-162.8348,6.6967],[-162.3237,6.3678],[-162.1623,6.2639]]],[[[-177.1042,28.2133],[-177.5001,28.0922],[-177.5719,28.1537],[-177.4906,28.318],[-177.2633,28.3605],[-177.1042,28.2133]]]]},properties:{name:"United States Minor Outlying Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-53.378,-33.7504],[-53.8632,-34.4342],[-54.9524,-34.9739],[-55.4492,-34.758],[-55.8346,-34.8021],[-56.1532,-34.9257],[-56.3373,-34.8826],[-57.1761,-34.4798],[-57.8338,-34.4414],[-58.2546,-34.0846],[-58.417,-33.4995],[-58.1303,-33.0265],[-58.1316,-31.8015],[-57.619,-30.1759],[-57.3474,-30.2723],[-56.8071,-30.1365],[-56.1653,-30.6435],[-55.9687,-31.002],[-55.7448,-30.9943],[-55.5446,-30.9301],[-53.83,-32.0405],[-53.1514,-32.7404],[-53.3047,-32.9751],[-53.5095,-33.3089],[-53.378,-33.7504]]]},properties:{name:"Uruguay"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[70.9402,42.2592],[71.177,42.1716],[71.0708,42.1059],[70.4682,41.7331],[70.4493,41.5111],[70.6296,41.3903],[71.2273,41.179],[71.8407,41.3602],[72.7923,40.7655],[71.7869,40.2283],[70.9676,40.2285],[70.5038,40.3699],[70.6152,40.7776],[70.4136,40.9551],[69.4317,40.6763],[68.456,39.6133],[67.5514,39.5075],[67.5335,39.2951],[68.0963,38.8623],[68.3151,38.2289],[67.7787,37.1796],[66.5537,37.3548],[66.6138,37.5063],[66.5616,38.0044],[65.419,38.3671],[62.6116,39.8876],[61.8085,41.1353],[60.3327,41.3003],[60.1297,41.7331],[59.7804,42.257],[59.4397,42.3929],[59.2965,42.45],[58.6272,42.717],[58.089,42.45],[57.9738,42.3929],[57.2518,42.0348],[57.0023,41.7331],[56.9976,41.3132],[56.7141,41.2841],[56.0006,41.318],[56.0005,41.7331],[56.0252,42.3929],[56.1524,44.8265],[58.5043,45.4677],[60.8103,44.4097],[62.0428,43.6178],[65.0384,43.6349],[65.9536,42.7934],[66.0376,42.3929],[66.0488,42.1109],[66.4486,41.8377],[66.5069,41.7331],[66.6943,41.3166],[67.8782,41.1359],[68.4646,40.6663],[69.1476,41.3736],[69.8741,41.7331],[70.6274,42.1059],[70.9402,42.2592]]]},properties:{name:"Uzbekistan"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[12.3624,41.8843],[12.4327,41.9402],[12.4897,41.9547],[12.5186,41.8784],[12.3911,41.869],[12.3624,41.8843]]]},properties:{name:"Vatican City"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-61.3573,13.1668],[-61.2124,13.473],[-61.0578,13.3956],[-61.1054,13.0698],[-61.3573,13.1668]]]},properties:{name:"Saint Vincent and The Grenadines"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-59.994,8.5334],[-59.9947,8.1428],[-60.6142,7.5487],[-60.4378,6.9909],[-61.2089,6.4133],[-61.2634,5.8625],[-60.7318,5.1961],[-60.7041,4.8701],[-61.0145,4.5424],[-62.4283,4.0929],[-62.9241,3.7234],[-64.5692,4.1305],[-64.0031,2.6686],[-63.5034,2.3999],[-63.4774,2.2297],[-64.2898,1.4973],[-65.4471,.8038],[-65.6926,.9257],[-66.2879,.8221],[-66.8698,1.2256],[-67.2208,2.3424],[-67.721,2.8964],[-67.3557,3.4424],[-67.8354,4.4178],[-67.8207,5.1931],[-67.4644,5.9946],[-67.5876,6.2176],[-69.3548,6.1185],[-70.0816,6.9418],[-71.9631,7.0539],[-72.3943,7.4355],[-72.4152,8.3431],[-72.8017,9.0532],[-73.3126,9.2426],[-72.7638,10.6322],[-71.9211,11.6612],[-71.3241,11.8457],[-71.9114,11.5009],[-71.5952,10.8613],[-70.322,11.3475],[-70.2244,11.9498],[-70.0181,12.1182],[-69.8586,11.9569],[-69.8887,11.5525],[-69.1734,11.4875],[-68.549,11.2224],[-68.2506,10.6699],[-67.9129,10.5131],[-66.2761,10.6192],[-65.7125,10.2685],[-65.0224,10.1064],[-64.039,10.4236],[-63.7676,10.6644],[-62.4112,10.6783],[-62.3189,10.6204],[-62.6974,10.4323],[-62.383,9.9678],[-61.3003,9.6877],[-60.858,9.3429],[-60.6854,8.6872],[-59.994,8.5334]]],[[[-63.8668,11.2606],[-63.7008,10.9783],[-63.8663,10.879],[-64.1632,10.8692],[-64.4483,11.0041],[-64.1757,11.1584],[-64.0732,11.0298],[-63.8668,11.2606]]]]},properties:{name:"Venezuela"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-64.8273,18.4534],[-64.5684,18.5125],[-64.44,18.4159],[-64.6272,18.2782],[-64.8273,18.4534]]]},properties:{name:"British Virgin Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-65.077,17.6065],[-65.0123,17.8202],[-64.7111,17.8491],[-64.6234,17.6811],[-65.077,17.6065]]]},properties:{name:"Us Virgin Islands"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[108.0236,21.5489],[107.7238,21.3719],[107.4317,20.8393],[106.8152,20.8642],[106.4903,20.2841],[105.8986,19.7262],[105.711,18.9371],[106.7883,17.33],[108.38,15.8786],[108.9017,15.1994],[109.3789,12.8643],[109.0658,11.5804],[107.4511,10.5171],[106.789,10.3884],[106.4598,9.6024],[104.991,8.6881],[104.8492,9.3839],[104.9907,9.979],[104.4386,10.4245],[105.2582,10.9203],[106.102,10.9073],[105.9956,11.599],[107.4792,12.4166],[107.5795,13.4943],[107.407,14.1765],[107.5561,14.6866],[107.5938,15.3404],[107.2941,15.8632],[107.3734,16.1224],[106.74,16.4137],[106.5116,16.9689],[105.1906,18.3486],[105.1551,18.6727],[103.9581,19.3062],[104.1919,19.6463],[104.6562,19.6942],[104.9197,20.0654],[104.5298,20.4333],[104.4887,20.719],[104.1421,20.9297],[103.665,20.7839],[103.2157,20.8666],[102.897,21.3822],[102.9271,21.7266],[102.1439,22.4007],[102.5296,22.6804],[102.9794,22.5457],[103.37,22.7152],[104.0941,22.6352],[105.3207,23.2985],[106.6447,22.8138],[106.7942,22.0576],[108.0236,21.5489]]],[[[104.0837,10.3015],[104.0134,10.1833],[103.9211,10.2872],[103.9706,10.4427],[104.0837,10.3015]]]]},properties:{name:"Vietnam"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[169.5451,-19.6006],[169.4505,-19.7089],[169.1717,-19.4341],[169.2756,-19.2419],[169.5451,-19.6006]]],[[[169.3591,-18.9369],[169.1993,-18.9746],[168.9984,-18.853],[169.0342,-18.6486],[169.1974,-18.6656],[169.3591,-18.9369]]],[[[168.5879,-17.6865],[168.3906,-17.8248],[168.1441,-17.6432],[168.3506,-17.4148],[168.5879,-17.6865]]],[[[168.406,-16.7999],[168.1437,-16.863],[168.0404,-16.6649],[168.1118,-16.551],[168.3718,-16.6504],[168.406,-16.7999]]],[[[168.3271,-16.3668],[168.1915,-16.4172],[167.941,-16.2296],[168.1646,-16.0315],[168.3271,-16.3668]]],[[[168.0146,-15.4002],[167.8673,-15.5386],[167.6182,-15.4341],[167.8009,-15.2574],[167.9876,-15.2345],[168.0146,-15.4002]]],[[[167.7941,-16.5119],[167.4671,-16.5344],[167.3834,-16.2251],[167.1851,-16.0832],[167.2145,-15.9171],[167.6049,-16.2251],[167.7941,-16.5119]]],[[[167.6703,-14.1518],[167.5679,-14.4519],[167.3281,-14.4111],[167.4253,-14.1354],[167.6703,-14.1518]]],[[[167.6132,-13.8992],[167.4784,-14.0795],[167.3037,-13.8348],[167.4843,-13.6113],[167.6132,-13.8992]]],[[[166.825,-15.1545],[166.9491,-15.1609],[166.9847,-14.9575],[167.1171,-14.9507],[167.2905,-15.5612],[167.2301,-15.735],[167.055,-15.6152],[166.778,-15.6407],[166.6537,-15.3919],[166.6773,-15.2426],[166.5505,-14.8535],[166.619,-14.6567],[166.761,-14.833],[166.825,-15.1545]]],[[[166.7624,-13.1032],[166.5578,-13.3178],[166.4214,-13.1446],[166.4616,-13.0012],[166.7322,-12.9822],[166.7624,-13.1032]]]]},properties:{name:"Vanuatu"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[-176.0257,-13.2825],[-176.2605,-13.5069],[-176.3346,-13.2899],[-176.2092,-13.0355],[-176.0257,-13.2825]]]},properties:{name:"Wallis and Futuna"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[179.8851,51.9945],[179.6069,51.8073],[179.3511,51.9293],[179.6774,52.088],[179.8851,51.9945]]],[[[177.76,51.9239],[177.4784,51.8305],[177.3861,51.9458],[177.5436,52.2151],[177.76,51.9239]]],[[[173.1771,52.9586],[173.1834,52.7922],[172.9249,52.7443],[172.7832,52.8909],[172.6093,52.8666],[172.6692,53.0006],[173.1771,52.9586]]],[[[-67.2702,45.1886],[-66.9835,44.9097],[-68.2758,44.2472],[-68.3846,44.1914],[-69.9476,43.7632],[-70.3129,43.3347],[-70.6719,42.9137],[-70.768,42.4816],[-70.7354,42.334],[-70.5614,41.8794],[-70.7074,41.5642],[-72.7517,41.2539],[-72.904,41.1372],[-72.8531,40.845],[-74.0036,40.5421],[-74.1687,39.8466],[-74.5222,39.4016],[-74.8005,39.1919],[-75.2722,39.1532],[-75.1845,38.4685],[-75.6268,37.6941],[-76.0962,38.3308],[-76.2247,39.0578],[-76.3737,39.1491],[-76.3684,37.301],[-75.9375,36.544],[-75.9173,35.6802],[-76.3858,35.2758],[-76.6634,34.7175],[-78.8994,33.5851],[-80.6595,32.163],[-81.0733,31.5811],[-81.3883,30.8222],[-81.3479,30.2933],[-80.5855,28.5131],[-80.1642,26.9557],[-80.1978,25.8115],[-80.549,25.1714],[-81.1091,25.3183],[-82.1535,26.5466],[-82.739,27.775],[-82.8471,29.0099],[-83.8386,29.9165],[-84.289,29.9857],[-85.1412,29.7554],[-86.1958,30.2582],[-88.1274,30.4787],[-89.5133,30.1464],[-89.6035,29.9927],[-89.3631,29.8545],[-89.6524,29.4756],[-90.0133,29.4052],[-90.7805,29.2555],[-91.0362,29.3255],[-91.8794,29.5444],[-92.0339,29.7299],[-92.4404,29.6131],[-93.3831,29.7924],[-94.7819,29.6223],[-95.2861,29.0205],[-97.0261,28.1015],[-97.3091,27.599],[-97.3829,26.9252],[-97.1461,25.9561],[-98.2152,26.0797],[-99.0549,26.4642],[-99.5889,27.5721],[-100.2721,28.305],[-100.7311,29.1117],[-101.3814,29.6713],[-102.5338,29.7138],[-103.0936,29.1084],[-103.4137,29.0808],[-104.4209,29.6204],[-104.9579,30.5767],[-106.4688,31.7164],[-107.9988,31.7599],[-108.5185,31.3352],[-110.9234,31.3386],[-115.002,32.6693],[-117.1236,32.5346],[-117.66,33.4],[-119.5453,34.366],[-120.5355,34.5811],[-120.7439,35.1518],[-121.8039,36.2684],[-121.8909,36.8265],[-122.3564,37.2307],[-122.5427,37.8584],[-123.6126,38.8603],[-123.8577,39.7452],[-124.3149,40.3203],[-124.1112,41.4593],[-124.3579,42.334],[-124.4815,42.8651],[-124.3638,43.3347],[-124.1351,44.2472],[-123.9899,45.9257],[-124.5489,48.0587],[-124.2765,48.2617],[-122.933,48.2411],[-122.8092,49.0215],[-95.824,49.0008],[-95.0687,49.2416],[-94.2745,48.6951],[-92.9202,48.5702],[-91.5593,48.1211],[-91.0362,48.1534],[-90.7911,48.1805],[-90.0133,48.0688],[-89.6593,48.0179],[-89.435,47.9857],[-88.0434,48.1758],[-85.0831,46.9699],[-82.6251,45.3393],[-82.3354,44.2472],[-82.1811,43.6656],[-82.3027,43.3347],[-82.9607,42.0964],[-82.7186,41.7827],[-79.241,42.7271],[-79.0466,42.8794],[-79.0567,43.3347],[-79.0575,43.4429],[-78.7616,43.5853],[-76.8745,43.668],[-76.011,44.2472],[-74.9771,44.9407],[-71.7863,45.0078],[-70.8839,45.369],[-70.3752,45.8014],[-69.8084,46.8614],[-69.2777,47.3844],[-68.9977,47.3552],[-68.8921,47.206],[-68.3747,47.349],[-67.8174,47.0362],[-67.7815,46.0459],[-67.7647,45.7142],[-67.2702,45.1886]]],[[[-69.8183,41.6633],[-69.9354,41.4943],[-70.237,41.7523],[-70.0203,41.8592],[-69.8183,41.6633]]],[[[-81.1897,24.6405],[-81.4693,24.5676],[-81.6764,24.6585],[-81.437,24.8648],[-81.1897,24.6405]]],[[[-89.0385,29.2483],[-89.2514,29.03],[-89.4264,29.2328],[-89.2795,29.4033],[-89.0385,29.2483]]],[[[-119.9832,33.8457],[-120.1181,33.7975],[-120.3402,34.0121],[-119.9445,34.1235],[-119.9832,33.8457]]],[[[-140.9923,69.6172],[-140.9942,68.2307],[-140.999,64.7661],[-140.999,64.4949],[-141,60.5156],[-140.8352,60.2915],[-139.9046,60.2219],[-139.1645,60.3358],[-139.0965,60.0754],[-138.0988,59.5094],[-137.4221,58.9656],[-137.0381,59.0793],[-136.5724,59.1992],[-136.2508,59.5094],[-136.1363,59.635],[-135.4947,59.7832],[-135.0304,59.5094],[-134.5386,59.1177],[-133.4872,58.471],[-131.7547,56.6577],[-130.0102,55.9171],[-130.0093,55.9114],[-130.0119,55.9078],[-130.0242,55.9069],[-130.029,55.9048],[-130.0361,55.8913],[-130.0519,55.8767],[-130.0603,55.863],[-130.0891,55.8321],[-130.112,55.8225],[-130.1282,55.8218],[-130.1397,55.8162],[-130.1491,55.8006],[-130.1693,55.7792],[-130.1752,55.7593],[-130.1663,55.7451],[-130.1636,55.7334],[-130.1689,55.7143],[-130.1403,55.6937],[-130.1269,55.6753],[-130.1276,55.6446],[-130.1377,55.6287],[-130.1403,55.6126],[-130.1493,55.5965],[-130.14,55.5711],[-130.139,55.5535],[-130.1181,55.5273],[-130.115,55.5146],[-130.1061,55.4953],[-130.0619,55.2542],[-130.44,54.8695],[-130.5183,54.8695],[-130.534,54.8695],[-130.534,54.8628],[-130.5257,54.8622],[-130.5164,54.8536],[-130.5073,54.8338],[-130.5216,54.8246],[-130.5248,54.8182],[-130.534,54.8147],[-130.534,54.8105],[-130.534,54.8067],[-130.6423,54.7507],[-131.4035,55.0646],[-131.992,55.6064],[-132.2095,55.5914],[-132.1389,55.1308],[-132.3992,54.8623],[-132.878,54.9285],[-133.5288,55.4766],[-133.7269,56.1541],[-134.067,56.2619],[-134.1955,56.5645],[-134.0599,56.8656],[-133.6383,57.1463],[-133.6492,57.5041],[-133.8447,57.6161],[-134.4763,57.2893],[-134.7914,58.2695],[-135.077,58.6338],[-135.4452,58.3491],[-136.5879,58.3495],[-139.2481,59.3321],[-139.9775,59.7654],[-145.7361,60.2847],[-146.8959,60.8323],[-147.7155,60.9004],[-148.2782,60.7401],[-148.0373,60.3987],[-148.2365,60.041],[-151.4689,59.3299],[-151.5905,60.0891],[-151.2032,60.6379],[-150.6095,60.9727],[-150.7682,61.1379],[-151.6115,60.8802],[-153.8089,59.4121],[-153.9219,59.1562],[-153.6659,58.7197],[-154.4768,58.1019],[-156.0148,57.5013],[-156.7197,57.0129],[-158.2631,56.4289],[-159.0484,55.9308],[-160.3948,55.5631],[-160.681,55.2971],[-161.4111,55.4277],[-161.9879,55.1034],[-162.6444,55.0464],[-162.7133,55.3224],[-162.1446,55.6651],[-160.7428,55.9412],[-158.5296,57.0208],[-157.8319,57.6312],[-157.4129,58.5755],[-158.4358,58.762],[-159.0941,58.5567],[-160.2873,58.9094],[-160.9417,58.6572],[-161.4338,58.6784],[-161.7802,58.9542],[-161.992,59.6625],[-162.2754,59.9612],[-164.0544,59.9629],[-164.7925,60.3086],[-165.7555,61.5051],[-165.5572,62.1509],[-164.3354,63.0738],[-163.1606,63.1419],[-161.1527,63.6774],[-160.9492,63.9765],[-161.0236,64.5972],[-163.003,64.419],[-163.6588,64.5563],[-165.3792,64.5116],[-166.209,64.7067],[-167.1507,65.6045],[-164.4554,66.5191],[-163.2031,66.1033],[-162.0556,66.0908],[-161.4603,66.3159],[-161.8333,66.8187],[-163.3911,67.0937],[-164.355,67.6435],[-165.9368,68.2247],[-166.1372,68.5492],[-165.9563,68.7483],[-163.7403,69.1472],[-162.2064,70.1213],[-159.8727,70.7111],[-158.0854,70.8749],[-156.5917,71.2616],[-156.0296,71.2004],[-155.5742,70.9153],[-153.1711,70.8697],[-151.3528,70.4503],[-148.5162,70.3723],[-145.0148,70.0024],[-143.1852,70.0715],[-140.9923,69.6172]]],[[[-134.6337,56.3747],[-134.915,56.3747],[-135.405,56.908],[-135.4345,57.0361],[-135.8127,57.0551],[-135.883,57.425],[-136.5538,57.9476],[-136.0531,58.2318],[-135.6046,58.209],[-134.9212,57.9476],[-134.9026,57.425],[-134.7098,56.908],[-134.6337,56.3747]]],[[[-146.9694,60.204],[-147.2609,60.0512],[-147.2609,60.3555],[-146.9772,60.4021],[-146.9694,60.204]]],[[[-147.3685,59.857],[-147.6864,59.8094],[-147.8124,59.8909],[-147.4183,60.1161],[-147.3685,59.857]]],[[[-152.5848,58.0209],[-152.5625,57.9173],[-152.3302,57.9173],[-152.3188,57.5046],[-153.7286,57.1143],[-153.5949,56.911],[-153.8361,56.7244],[-154.0232,56.7622],[-153.8072,56.9858],[-153.8532,57.0813],[-154.3715,56.9442],[-154.505,57.0061],[-154.7022,57.4038],[-154.3715,57.6186],[-153.7744,57.5495],[-153.8399,57.8139],[-153.418,57.7503],[-153.2998,57.8924],[-153.3698,58.0166],[-152.8815,58.3418],[-152.5363,58.6297],[-152.5189,58.4237],[-152.1675,58.3129],[-152.1615,58.2119],[-152.5848,58.0209]]],[[[-154.0302,56.5127],[-154.2296,56.3788],[-154.4393,56.5479],[-154.2099,56.7322],[-154.0302,56.5127]]],[[[-155.5039,19.1318],[-155.6363,18.934],[-155.8808,19.03],[-155.8868,19.3317],[-156.0645,19.7297],[-155.8246,20.0258],[-155.8395,20.271],[-155.2752,20.0197],[-155.0799,19.8488],[-155.0864,19.7327],[-154.8084,19.5263],[-154.9698,19.3473],[-155.5039,19.1318]]],[[[-156.5749,21.0277],[-156.4834,20.8988],[-156.2319,20.9447],[-155.9741,20.7916],[-156.0237,20.64],[-156.3758,20.5574],[-156.4734,20.78],[-156.7248,20.937],[-156.5749,21.0277]]],[[[-156.7592,20.7216],[-157.0039,20.6577],[-157.0916,20.919],[-156.9886,21.0559],[-157.3309,21.1305],[-157.314,21.2879],[-156.8217,21.1585],[-156.8809,21.0075],[-156.7592,20.7216]]],[[[-157.6617,21.3113],[-158.1021,21.3025],[-158.2659,21.5706],[-157.9689,21.7011],[-157.6617,21.3113]]],[[[-159.3151,21.9515],[-159.438,21.8529],[-159.8096,22.017],[-159.5848,22.2382],[-159.2953,22.1938],[-159.3151,21.9515]]],[[[-159.4398,55.0989],[-159.6772,54.9481],[-159.7703,55.0969],[-159.7225,55.2509],[-159.4637,55.2712],[-159.4398,55.0989]]],[[[-162.2022,54.3381],[-162.6927,54.297],[-162.6796,54.4941],[-162.2558,54.4585],[-162.2022,54.3381]]],[[[-163.1577,55.1258],[-163.1176,54.9135],[-163.2888,54.6982],[-163.5876,54.6159],[-164.0979,54.6215],[-164.3468,54.4707],[-164.6443,54.3934],[-164.8352,54.4229],[-164.9374,54.5787],[-164.6891,54.6608],[-164.5457,54.886],[-164.2187,54.8949],[-163.8926,55.033],[-163.5387,55.0482],[-163.363,54.9809],[-163.1577,55.1258]]],[[[-165.638,59.9732],[-166.2902,59.7757],[-167.1355,60.0781],[-167.1717,60.1323],[-167.1303,60.1826],[-166.3709,60.3711],[-165.7389,60.306],[-165.638,59.9732]]],[[[-165.7769,54.0967],[-165.8468,53.9993],[-166.0799,54.0133],[-166.1784,54.1223],[-165.9863,54.2616],[-165.8601,54.2553],[-165.7769,54.0967]]],[[[-165.9588,61.5724],[-166.0564,61.3855],[-166.1855,61.4286],[-166.2785,61.6215],[-166.2244,61.7348],[-166.0387,61.7],[-165.9588,61.5724]]],[[[-166.3934,53.6565],[-167.0445,53.4444],[-167.1136,53.489],[-167.0674,53.8859],[-166.7916,53.9907],[-166.3831,53.7556],[-166.3934,53.6565]]],[[[-167.4326,53.2224],[-167.691,53.1901],[-167.8322,53.3117],[-167.7903,53.4018],[-167.4068,53.4039],[-167.4326,53.2224]]],[[[-168.4378,53.0095],[-168.7531,52.9657],[-168.8105,53.0663],[-168.1863,53.532],[-168.0207,53.4027],[-168.3378,53.1728],[-168.4378,53.0095]]],[[[-170.2934,63.6864],[-170.0521,63.4841],[-169.5379,63.3711],[-168.8183,63.3101],[-168.8585,63.1479],[-169.3735,63.1519],[-169.7555,62.9609],[-169.8629,63.0987],[-170.2866,63.1895],[-170.6176,63.3687],[-171.0831,63.4236],[-171.3979,63.323],[-171.7362,63.3687],[-171.8437,63.4841],[-171.7947,63.6294],[-171.5342,63.66],[-170.8959,63.5729],[-170.6443,63.6678],[-170.2934,63.6864]]],[[[-170.141,57.0375],[-170.3448,56.9501],[-170.7134,57.028],[-170.5861,57.1467],[-170.2278,57.1272],[-170.141,57.0375]]],[[[-174.0122,52.127],[-174.459,52.127],[-174.5138,52.1819],[-174.3614,52.3199],[-174.0676,52.3741],[-174.0122,52.127]]],[[[-175.8817,51.9613],[-176.2253,51.8894],[-176.301,52.0951],[-176.0227,52.1711],[-175.8817,51.9613]]],[[[-176.483,51.7738],[-176.7545,51.6424],[-176.9307,51.8314],[-176.7189,51.9623],[-176.483,51.7738]]],[[[-177.7821,51.7965],[-177.9155,51.6188],[-178.1504,51.6563],[-178.0961,51.9444],[-177.7821,51.7965]]]]},properties:{name:"United States"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[-171.5311,-13.9149],[-171.5794,-14.0384],[-171.9186,-14.0083],[-172.0308,-13.8761],[-171.8332,-13.7882],[-171.5311,-13.9149]]],[[[-172.1378,-13.6745],[-172.5407,-13.8272],[-172.764,-13.5574],[-172.2869,-13.4376],[-172.1378,-13.6745]]]]},properties:{name:"Samoa"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[112.5204,16.7931],[112.3207,16.6434],[112.1436,16.916],[112.2708,16.9745],[112.5187,16.901],[112.5204,16.7931]]],[[[111.4671,15.9211],[111.235,15.6204],[111.0326,15.7651],[111.1423,15.9214],[111.4671,15.9211]]]]},properties:{name:"Paracel Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[114.1161,10.9954],[114.1834,11.1959],[114.2851,11.2327],[114.4818,11.0087],[114.3172,10.8856],[114.1161,10.9954]]]},properties:{name:"Spratly Islands"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[78.9227,33.3924],[78.7315,33.6703],[78.7594,34.0457],[78.9227,34.1568],[78.9227,34.3701],[78.6855,34.5165],[78.3085,34.6245],[78.2078,34.7534],[77.9244,35.4936],[79.3089,35.9267],[80.2549,35.3651],[80.0029,34.6687],[79.4735,34.1377],[78.9826,33.9808],[78.9227,33.3924]]]},properties:{name:"Aksai Chin"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[97.3471,28.2081],[97.3443,27.9963],[97.0575,27.7441],[96.3086,28.1895],[95.7527,28.2572],[94.2529,27.5398],[93.6616,26.9837],[93.2491,26.9504],[92.697,26.9058],[92.1079,26.8583],[92.0573,27.3683],[91.6596,27.5403],[91.6421,27.7585],[92.5723,27.901],[92.697,28.0134],[93.2491,28.5107],[93.3732,28.6225],[94.4925,29.2273],[95.4413,29.1482],[96.0434,29.4013],[96.2042,29.0341],[96.5583,28.8405],[96.4079,28.4508],[97.3471,28.2081]]]},properties:{name:"Arunachal Pradesh"}},{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[[[[80.2176,30.583],[79.9526,30.8744],[79.9683,30.8862],[79.9765,30.8862],[79.992,30.8796],[80.0006,30.867],[80.0258,30.8423],[80.0453,30.813],[80.0753,30.8041],[80.0915,30.7919],[80.139,30.7844],[80.1519,30.7916],[80.165,30.804],[80.18,30.8069],[80.1945,30.7983],[80.2025,30.7824],[80.2144,30.7763],[80.2208,30.7651],[80.2269,30.7622],[80.2385,30.7621],[80.2475,30.7563],[80.2554,30.7378],[80.2545,30.7176],[80.2383,30.7087],[80.2244,30.6883],[80.2044,30.6848],[80.1928,30.6743],[80.2064,30.6634],[80.2218,30.6396],[80.2201,30.6353],[80.2061,30.6279],[80.2058,30.6217],[80.2241,30.6046],[80.2176,30.583]]],[[[79.2537,32.5233],[79.1467,33.1883],[79.3416,33.1356],[79.5132,32.7273],[79.2537,32.5233]]],[[[79.4224,31.064],[79.138,31.003],[78.8882,31.2723],[79.1149,31.3794],[79.4224,31.064]]],[[[78.769,31.9377],[78.5766,32.0593],[78.4736,32.2395],[78.6791,32.0931],[78.769,31.9377]]]]},properties:{name:"China/India"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[36.8825,22.0051],[34.5937,22.003],[34.0865,22.0025],[34.2134,22.2],[34.5937,22.2811],[34.9524,22.7943],[35.6218,23.1455],[35.8194,22.8034],[36.8825,22.0051]]]},properties:{name:"Hala'Ib Triangle"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[35.5088,4.62],[34.3785,4.62],[34.5428,4.7504],[35.2489,4.9563],[35.5088,4.62]]]},properties:{name:"Ilemi Triangle"}},{type:"Feature",geometry:{type:"Polygon",coordinates:[[[77.9244,35.4936],[78.2078,34.7534],[78.3085,34.6245],[78.6855,34.5165],[78.9227,34.3701],[78.9227,34.1568],[78.7594,34.0457],[78.7315,33.6703],[78.9227,33.3924],[79.1467,33.1883],[79.2537,32.5233],[78.9227,32.3637],[78.7005,32.6471],[78.398,32.5232],[77.7621,32.9237],[77.3152,32.8606],[76.5852,33.1567],[75.3339,32.3266],[73.6386,33.1515],[73.4315,34.3917],[73.7156,34.7534],[74.0657,35.092],[73.7903,35.2386],[73.7126,35.5074],[73.2944,35.6086],[73.049,35.8283],[72.6179,35.8638],[72.5308,36.0297],[72.5938,36.2273],[73.2944,36.7238],[73.6909,36.7433],[73.6393,36.9034],[74.5646,37.0309],[75.3164,36.9453],[75.8285,36.6678],[76.1908,35.877],[77.318,35.4964],[77.9244,35.4936]]]},properties:{name:"Jammu Kashmir"}}]};function c7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function d7e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c7e(Object(t),!0).forEach(function(n){u7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function u7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const p7e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),{queryVariablesFilters:r,isExportingPdf:i,selectedUnit:o}=J1e(),l=Y1e(a),{chartTheme:s,agChartColorMap:c}=(0,f.useAgChartsTheme)(n.colors),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:r,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Country"}]}}}),y=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==d?void 0:d.getDashboardTileData))||void 0===e?void 0:e.map(e=>d7e(d7e({},e),{},{Country:e.Country,CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:o})}))},[d,o]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:s,width:l,topology:s7e,data:y||[],zoom:{enabled:!0},series:[{type:"map-shape-background"},{type:"map-shape",title:"Carbon emissions",idKey:"Country",colorKey:"CO2e",colorRange:[c[f.AgChartColor.GREEN_1],c[f.AgChartColor.BLUE_1]],colorName:"".concat(o,"CO2e"),tooltip:{renderer:e=>({data:[{label:"".concat(o,"CO2e"),value:d2e(e.datum.CO2e,{selectedUnit:o})}]})}}],gradientLegend:{enabled:!0,position:"right",gradient:{preferredLength:200,thickness:2},scale:{label:{fontSize:10,formatter:e=>p2e(e.value)}}}}),[y,s,l,o,c]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon by country map (".concat(o,"CO2e)"),loading:u,error:p,retry:m,noData:b,ref:a,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},i?"exporting-pdf":void 0)};function m7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function f7e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m7e(Object(t),!0).forEach(function(n){y7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function y7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const g7e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,selectedUnit:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Country"}]}}}),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==c?void 0:c.getDashboardTileData))||void 0===e||null===(e=e.map(e=>f7e(f7e({},e),{},{Country:e.Country,CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:s})})))||void 0===e?void 0:e.sort((e,n)=>Number(n.CO2e)-Number(e.CO2e)).slice(0,3)},[c,s]),f=Boolean(m&&0===m.length),y=(0,g.useMemo)(()=>[{headerName:"Country",field:"Country"},{headerName:"".concat(s,"CO2e"),field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:s})}],[s]);return(0,Ze.jsx)(F4e,{title:n.title||"Top 3 countries by emissions",loading:d,error:u,retry:p,noData:f,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-Top3CarbonEmissionsCountriesTableTile"),gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:y,rowData:m}})})};function b7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function h7e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b7e(Object(t),!0).forEach(function(n){v7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function v7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const x7e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,selectedUnit:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Country"}]}}}),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==c?void 0:c.getDashboardTileData))||void 0===e||null===(e=e.map(e=>h7e(h7e({},e),{},{Country:e.Country,CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:s})})))||void 0===e?void 0:e.sort((e,n)=>Number(n.CO2e)-Number(e.CO2e)).slice(-3)},[c,s]),f=m&&0===m.length,y=(0,g.useMemo)(()=>[{headerName:"Country",field:"Country"},{headerName:"".concat(s,"CO2e"),field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:s})}],[s]);return(0,Ze.jsx)(F4e,{title:n.title||"Bottom 3 countries by emissions",loading:d,error:u,retry:p,noData:f,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-Bottom3CarbonEmissionsCountriesTableTile"),gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:y,rowData:m}})})};function T7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function O7e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?T7e(Object(t),!0).forEach(function(n){k7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function k7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const j7e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,filters:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Sum}],partitions:[{field:"Department1"},{field:"Scope"},{field:"Type"},{field:"Tariff"},{field:"FuelType"},{field:"Unit"}]}}}),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==c?void 0:c.getDashboardTileData))||void 0===e||null===(e=e.map(e=>O7e(O7e({},e),{},{Department:l2e(e.Department1),Scope:l2e(e.Scope),Type:l2e(e.Type),"Tariff/FuelType":"Fuel"===e.Type?l2e(e.FuelType):"Electricity"===e.Type?l2e(e.Tariff):"N/A",Unit:l2e(e.Unit),Quantity:o2e(e.Quantity)})))||void 0===e?void 0:e.sort((e,n)=>e.Department!==n.Department?e.Department.toLowerCase().localeCompare(n.Department.toLowerCase()):e.Scope!==n.Scope?e.Scope.toLowerCase().localeCompare(n.Scope.toLowerCase()):e.Type!==n.Type?e.Type.toLowerCase().localeCompare(n.Type.toLowerCase()):e.Unit!==n.Unit?e.Unit.toLowerCase().localeCompare(n.Unit.toLowerCase()):e["Tariff/FuelType"].toLowerCase().localeCompare(n["Tariff/FuelType"].toLowerCase()))},[c]),f=m&&0===m.length,y=(0,g.useMemo)(()=>[{headerName:"Department",field:"Department",rowGroup:!0,hide:!0},{headerName:"Scope",field:"Scope",rowGroup:!0,hide:!0},{headerName:"Source",field:"Type",rowGroup:!0,hide:!0},{headerName:"Tariff/FuelType",field:"Tariff/FuelType",rowGroup:!0,hide:!0},{headerName:"Unit",field:"Unit"},{headerName:"Quantity",field:"Quantity",aggFunc:"sum",valueFormatter:e=>d2e(e.value)}],[]);return(0,g.useEffect)(()=>{var e;null===(e=r.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[s]),(0,Ze.jsx)(F4e,{title:n.title||"Resource use by scope",loading:d,error:u,retry:p,noData:f,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-ResourcesUsedByScopeTableTile"),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:y,rowData:m}})})};function C7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function S7e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C7e(Object(t),!0).forEach(function(n){N7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):C7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function N7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const w7e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),{queryVariablesFilters:r}=J1e(),i=Y1e(a),{data:o,loading:l,error:s,refetch:c}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:r,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Count}],partitions:[{field:"Accuracy"}]}}}),{chartTheme:d,legendTheme:u}=(0,f.useAgChartsTheme)(n.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.GREEN_1,f.AgChartColor.PINK_1]),p=(0,g.useMemo)(()=>{var e;const n=(null===(e=h2e(null==o?void 0:o.getDashboardTileData))||void 0===e?void 0:e.map(e=>S7e(S7e({},e),{},{Quantity:Number(e.Quantity),Accuracy:T2e(e.Accuracy)})).reduce((e,n)=>{const t=e.find(e=>e.Accuracy===n.Accuracy);return t?t.Quantity+=n.Quantity:e.push({Accuracy:n.Accuracy,Quantity:n.Quantity}),e},[]))||[],t=n.reduce((e,n)=>e+n.Quantity,0);return n.map(e=>S7e(S7e({},e),{},{Percent:t>0?e.Quantity/t*100:0}))},[o]),m=0===p.length,y=(0,g.useMemo)(()=>({theme:d,legend:u,width:i,data:p||[],zoom:{enabled:!0},series:[{type:"pie",fillOpacity:1,angleKey:"Quantity",calloutLabelKey:"Accuracy",sectorLabelKey:"Percent",sectorLabel:{formatter:e=>{let{value:n}=e;return"".concat(n.toFixed(1),"%")}},tooltip:{renderer:e=>{var n;let{datum:t}=e;const a=Number(null!==(n=t.Percent)&&void 0!==n?n:0);return{title:t.Accuracy,content:"".concat(a.toFixed(1),"% (").concat(t.Quantity,")")}}}}]}),[p,d,i,u]);return(0,Ze.jsx)(F4e,{title:n.title||"Proportion of Actual datapoints vs Estimated datapoints",loading:l,error:s,retry:c,noData:m,ref:a,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:y})})})};function D7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function A7e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D7e(Object(t),!0).forEach(function(n){R7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function R7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const P7e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,filters:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Department1"},{field:"Tag1"},{field:"Tag2"},{field:"Tag3"},{field:"Tag4"},{field:"Tag5"},{field:"LocationName"},{field:"Type"},{field:"Unit"}]}}}),{dates:m,rows:f}=(0,g.useMemo)(()=>{var e,n;const t=function(e,n){var t,a,r;const i=null!=e?e:[],o=null!==(t=n.emptyDateLabel)&&void 0!==t?t:"N/A",l=null!==(a=n.fillValue)&&void 0!==a?a:0,s=null!==(r=n.totalKey)&&void 0!==r?r:"TotalQuantity",c=new Set,d=new Map;for(const e of i){const t=x2e(e[n.dateKey]).trim()||o;c.add(t);const a=n.groupBy.map(n=>x2e(e[n]).trim()).join(""),r=v2e(e[n.valueKey]),i=d.get(a);if(!i){const i={};for(const t of n.groupBy)i[String(t)]=e[t];i[t]=r,i[s]=r,d.set(a,i);continue}i[t]=v2e(i[t])+r,i[s]=v2e(i[s])+r}const u=Array.from(c).sort((e,n)=>e.localeCompare(n));for(const e of d.values()){for(const n of u)void 0===e[n]&&(e[n]=l);void 0===e[s]&&(e[s]=l)}return{dates:u,rows:Array.from(d.values())}}(null!==(e=null===(n=h2e(null==c?void 0:c.getDashboardTileData))||void 0===n?void 0:n.map(e=>A7e(A7e({},e),{},{Date:l2e(e.Month),Department:l2e(e.Department1),Tags:[e.Tag1,e.Tag2,e.Tag3,e.Tag4,e.Tag5].filter(e=>!e2e(e)).join(", ")||"N/A",LocationName:l2e(e.LocationName),Type:l2e(e.Type),Unit:l2e(e.Unit),Quantity:o2e(e.Quantity)})))&&void 0!==e?e:[],{groupBy:["Department","Tags","LocationName","Type","Unit"],dateKey:"Date",valueKey:"Quantity",totalKey:"TotalQuantity",fillValue:0});return t.rows.sort((e,n)=>{var t,a,r,i,o,l,s,c,d,u;const p=String(null!==(t=e.Department)&&void 0!==t?t:""),m=String(null!==(a=n.Department)&&void 0!==a?a:"");if(p!==m)return p.toLowerCase().localeCompare(m.toLowerCase());const f=String(null!==(r=e.Tags)&&void 0!==r?r:""),y=String(null!==(i=n.Tags)&&void 0!==i?i:"");if(f!==y)return f.toLowerCase().localeCompare(y.toLowerCase());const g=String(null!==(o=e.LocationName)&&void 0!==o?o:""),b=String(null!==(l=n.LocationName)&&void 0!==l?l:"");if(g!==b)return g.toLowerCase().localeCompare(b.toLowerCase());const h=String(null!==(s=e.Type)&&void 0!==s?s:""),v=String(null!==(c=n.Type)&&void 0!==c?c:"");if(h!==v)return h.toLowerCase().localeCompare(v.toLowerCase());const x=String(null!==(d=e.Unit)&&void 0!==d?d:""),T=String(null!==(u=n.Unit)&&void 0!==u?u:"");return x.toLowerCase().localeCompare(T.toLowerCase())}),t},[c]),y=f&&0===f.length,b=(0,g.useMemo)(()=>[{headerName:"Department",field:"Department",rowGroup:!0,hide:!0},{headerName:"Tags",field:"Tags",rowGroup:!0,hide:!0},{headerName:"Location",field:"LocationName",rowGroup:!0,hide:!0},{headerName:"Type",field:"Type",rowGroup:!0,hide:!0},{headerName:"Unit",field:"Unit"},...m.map(e=>({headerName:s2e(e),field:e,aggFunc:"sum",valueFormatter:e=>d2e(e.value)})),{headerName:"Total quantity",field:"TotalQuantity",aggFunc:"sum",valueFormatter:e=>d2e(e.value)}],[m]);return(0,g.useEffect)(()=>{var e;null===(e=r.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[s]),(0,Ze.jsx)(F4e,{title:n.title||"Resource use by location",loading:d,error:u,retry:p,noData:y,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-ResourcesUsedByLocationTableTile"),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:b,rowData:f}})})};function L7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function I7e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L7e(Object(t),!0).forEach(function(n){E7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function E7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const _7e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,filters:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Sum},{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Tag1"},{field:"Department1"},{field:"LocationName"},{field:"Type"},{field:"Unit"},{field:"MeterName"},{field:"Accuracy"}]}}}),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==c?void 0:c.getDashboardTileData))||void 0===e||null===(e=e.map(e=>I7e(I7e({},e),{},{Tag:l2e(e.Tag1),Department:l2e(e.Department1),LocationName:l2e(e.LocationName),Type:l2e(e.Type),Unit:l2e(e.Unit),MeterName:l2e(e.MeterName),Accuracy:T2e(e.Accuracy),Quantity:o2e(e.Quantity),CO2e:o2e(e.CO2e)})))||void 0===e?void 0:e.sort((e,n)=>e.Tag1!==n.Tag1?e.Tag1.toLowerCase().localeCompare(n.Tag1.toLowerCase()):e.Department!==n.Department?e.Department.toLowerCase().localeCompare(n.Department.toLowerCase()):e.LocationName!==n.LocationName?e.LocationName.toLowerCase().localeCompare(n.LocationName.toLowerCase()):e.Type!==n.Type?e.Type.toLowerCase().localeCompare(n.Type.toLowerCase()):e.Unit!==n.Unit?e.Unit.toLowerCase().localeCompare(n.Unit.toLowerCase()):e.MeterName!==n.MeterName?e.MeterName.toLowerCase().localeCompare(n.MeterName.toLowerCase()):e.Accuracy.toLowerCase().localeCompare(n.Accuracy.toLowerCase()))},[c]),f=Boolean(m&&0===m.length),y=(0,g.useMemo)(()=>[{headerName:"Tag",field:"Tag",rowGroup:!0,hide:!0},{headerName:"Department",field:"Department",rowGroup:!0,hide:!0},{headerName:"Location",field:"LocationName",rowGroup:!0,hide:!0},{headerName:"Type",field:"Type",rowGroup:!0,hide:!0},{headerName:"Unit",field:"Unit",rowGroup:!0,hide:!0},{headerName:"Meter",field:"MeterName",rowGroup:!0,hide:!0},{headerName:"Accuracy",field:"Accuracy",rowGroup:!0,hide:!0},{headerName:"Quantity",field:"Quantity",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"CO2e",field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value)}],[]);return(0,g.useEffect)(()=>{var e;null===(e=r.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[s]),(0,Ze.jsx)(F4e,{title:n.title||"Breakdown including meter name and accuracy",loading:d,error:u,retry:p,noData:f,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-QuantityAndCO2eByLocationAndMeterTableTile"),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:y,rowData:m}})})};var F7e,B7e;function U7e(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const M7e=(0,f.styled)("div")(F7e||(F7e=U7e(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  gap: 6px;\n"]))),V7e=(0,f.styled)(f.Text)(B7e||(B7e=U7e(["\n  font-size: 12px;\n  font-weight: 600;\n  margin-top: 2px;\n  color: ",";\n"])),e=>{let{color:n,theme:t}=e;return"green"===n?t.palette.success.main:"red"===n?t.palette.error.main:t.sys.color.onSurfaceVariant}),z7e=e=>{var n,t;let{cellRendererParams:a,valueKey:r,doesMoreMeanPositive:i=!1,selectedUnit:o=""}=e;const l=(null===(n=a.node)||void 0===n?void 0:n.aggData["pivot_Date_Period 1_".concat(r)])||0,s=(null===(t=a.node)||void 0===t?void 0:t.aggData["pivot_Date_Period 2_".concat(r)])||0,c=(0,g.useMemo)(()=>l&&s?(s-l)/l*100:0,[l,s]),d=(0,g.useMemo)(()=>c>0?i?"green":"red":c<0?i?"red":"green":"none",[c,i]),u=(0,g.useMemo)(()=>c>0?"+":"",[c]);return(0,Ze.jsxs)(M7e,{color:d,children:[d2e(s,{selectedUnit:o})," ",c?(0,Ze.jsxs)(V7e,{color:d,children:[u,c.toFixed(),"%"]}):null]})};function G7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $7e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G7e(Object(t),!0).forEach(function(n){W7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function W7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const q7e=(e,n,t)=>{const{valueColumn:a}=n,{transform:r}=a,{selectedUnit:i,withVat:o}=t;if("numeric"===r.kind){const n={};return r.unitOptions&&(n.originalUnit=r.unitOptions.originalUnit,n.targetUnit=i),"withVat"===r.withVatKey&&(n.withVat=o),o2e(e[r.field],n)}if("percentage"===r.kind)return o2e(e[r.numeratorField],{percentageOverTotal:Number(e[r.denominatorField])});if("costPerWeight"===r.kind){const n=o2e(e[r.costField],r.withVatKey?{withVat:o}:void 0),t=e[r.weightField];if(!t||0===Number(t))return 0;const a=r.weightUnitOptions?o2e(t,{originalUnit:r.weightUnitOptions.originalUnit,targetUnit:i}):Number(t);return a?n/a:0}if("averageChargePerKwh"===r.kind){const n=Number(e[r.costField])||0,t=Number(e[r.quantityField])||0;if(!t)return 0;const a=r.withVatKey&&o?1.2:1;return o2e(String(n/(t*a)))}return 0},J7e=e=>{var n;let{tile:t,config:a}=e;const r=rt(),i=(0,g.useRef)(null),o=(0,g.useRef)(null),{queryVariablesFilters:l,activeSheet:s,dashboardId:c,filters:d,selectedUnit:u,withVat:p}=J1e(),m=(0,g.useMemo)(()=>({functions:a.aggregationFunctions,partitions:[$7e({field:a.periodField,partitionFunction:Vt.v7.Period},a.periodAlias&&{alias:a.periodAlias}),...a.groupPartitionFields.map(e=>{let{field:n}=e;return{field:n}})]}),[a]),{data:f,loading:y,error:b,refetch:v}=(0,h.IT)(V3e,{variables:{accountId:r,datasetFilters:l,datasetName:a.datasetName,aggregation:m}}),x=(0,g.useMemo)(()=>({selectedUnit:u,withVat:p}),[u,p]),T=(0,g.useMemo)(()=>{const e=h2e(null==f?void 0:f.getDashboardTileData);return e?e.map(e=>{var n,t,r;return $7e($7e($7e({},e),{},{Date:l2e(null!==(n=null!==(t=e.Period)&&void 0!==t?t:e[null!==(r=a.periodAlias)&&void 0!==r?r:"Period"])&&void 0!==n?n:"")},Object.fromEntries(a.groupPartitionFields.map(n=>{let{field:t}=n;return[t,l2e(e[t])]}))),{},{[a.valueColumn.field]:q7e(e,a,x)})}).sort((e,n)=>String(e.Date).localeCompare(String(n.Date))):null},[f,a,x]),O=Boolean(T&&0===T.length),k=(0,g.useMemo)(()=>{const e="function"==typeof a.valueColumn.headerName?a.valueColumn.headerName({selectedUnit:u,withVat:p}):a.valueColumn.headerName;return[...a.groupPartitionFields.map(e=>{let{field:n,headerName:t}=e;return{headerName:t,field:n,rowGroup:!0,hide:!0}}),{headerName:"Period",field:"Date",pivot:!0},{headerName:e,field:a.valueColumn.field,aggFunc:"sum",cellRenderer:e=>{var n;return null!==(n=e.colDef)&&void 0!==n&&null!==(n=n.field)&&void 0!==n&&n.includes("Period 2")?(0,Ze.jsx)(z7e,{cellRendererParams:e,valueKey:a.valueColumn.valueKey,selectedUnit:"numeric"===a.valueColumn.transform.kind&&a.valueColumn.transform.unitOptions&&null!=u?u:"",doesMoreMeanPositive:a.valueColumn.doesMoreMeanPositive}):d2e(e.value,{selectedUnit:"numeric"===a.valueColumn.transform.kind&&a.valueColumn.transform.unitOptions?u:void 0})}}]},[a,u,p]),j=null!==(n=t.title)&&void 0!==n?n:"function"==typeof a.defaultTitle?a.defaultTitle({selectedUnit:u,withVat:p}):a.defaultTitle;return(0,g.useEffect)(()=>{var e;null===(e=o.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[d]),(0,Ze.jsx)(F4e,{title:j,loading:y,error:b,retry:v,noData:O,ref:i,children:(0,Ze.jsx)(c6e,{pivotModeEnabled:!0,ref:o,gridKey:"".concat(r,"-").concat(c,"-").concat(s,"-").concat(a.tileTypeId),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:k,rowData:T,pivotMode:!0}})})};function Y7e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function H7e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const K7e=(e,n)=>function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Y7e(Object(t),!0).forEach(function(n){H7e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Y7e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({tileTypeId:e,datasetName:"",periodField:"Date",aggregationFunctions:[],groupPartitionFields:[],valueColumn:{field:"",headerName:"",valueKey:"",transform:{kind:"numeric",field:""}},defaultTitle:""},n),Q7e=e=>({datasetName:"CarbonByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[e],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}},doesMoreMeanPositive:!1},defaultTitle:n=>{var t;return"Emissions by ".concat(e.headerName.toLowerCase()," (").concat(null!==(t=null==n?void 0:n.selectedUnit)&&void 0!==t?t:"kg","CO2e)")}}),Z7e=e=>({datasetName:"CarbonByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],groupPartitionFields:[e],valueColumn:{field:"TotalCost",headerName:"Total cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost",withVatKey:"withVat"},doesMoreMeanPositive:!1},defaultTitle:n=>{var t;return"Cost by ".concat(e.headerName.toLowerCase()," (£) ").concat(m2e(null!==(t=null==n?void 0:n.withVat)&&void 0!==t&&t))}}),X7e={[Vt.Rh.ElectricityConsumptionByLocationPeriodComparisonTableTile]:K7e("ElectricityConsumptionByLocationPeriodComparisonTableTile",{datasetName:"ElectricityByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"Quantity",headerName:"Consumption (kWh)",valueKey:"Quantity",transform:{kind:"numeric",field:"Quantity"}},defaultTitle:"Consumption by location (kWh)"}),[Vt.Rh.ElectricityConsumptionByTagPeriodComparisonTableTile]:K7e("ElectricityConsumptionByTagPeriodComparisonTableTile",{datasetName:"ElectricityByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"Quantity",headerName:"Consumption (kWh)",valueKey:"Quantity",transform:{kind:"numeric",field:"Quantity"}},defaultTitle:"Consumption by tag (kWh)"}),[Vt.Rh.ElectricityCostByLocationPeriodComparisonTableTile]:K7e("ElectricityCostByLocationPeriodComparisonTableTile",{datasetName:"ElectricityByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by location (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.ElectricityCostByTagPeriodComparisonTableTile]:K7e("ElectricityCostByTagPeriodComparisonTableTile",{datasetName:"ElectricityByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by tag (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.ElectricityGrossCarbonEmissionsByLocationPeriodComparisonTableTile]:K7e("ElectricityGrossCarbonEmissionsByLocationPeriodComparisonTableTile",{datasetName:"ElectricityByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Gross emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Gross carbon emissions by location (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.ElectricityGrossCarbonEmissionsByTagPeriodComparisonTableTile]:K7e("ElectricityGrossCarbonEmissionsByTagPeriodComparisonTableTile",{datasetName:"ElectricityByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Gross emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Gross carbon emissions by tag (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.ElectricityNetCarbonEmissionsByLocationPeriodComparisonTableTile]:K7e("ElectricityNetCarbonEmissionsByLocationPeriodComparisonTableTile",{datasetName:"ElectricityByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Net emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Net carbon emissions by location (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.ElectricityNetCarbonEmissionsByTagPeriodComparisonTableTile]:K7e("ElectricityNetCarbonEmissionsByTagPeriodComparisonTableTile",{datasetName:"ElectricityByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Net emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Net carbon emissions by tag (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.CarbonEmissionsByLocationPeriodComparisonTableTile]:K7e("CarbonEmissionsByLocationPeriodComparisonTableTile",Q7e({field:"LocationName",headerName:"Location"})),[Vt.Rh.CarbonEmissionsByTagPeriodComparisonTableTile]:K7e("CarbonEmissionsByTagPeriodComparisonTableTile",Q7e({field:"Tag1",headerName:"Tag"})),[Vt.Rh.CarbonEmissionsByScopePeriodComparisonTableTile]:K7e("CarbonEmissionsByScopePeriodComparisonTableTile",Q7e({field:"Scope",headerName:"Scope"})),[Vt.Rh.CarbonEmissionsByResourcePeriodComparisonTableTile]:K7e("CarbonEmissionsByResourcePeriodComparisonTableTile",Q7e({field:"Type",headerName:"Resource"})),[Vt.Rh.CarbonCostByLocationPeriodComparisonTableTile]:K7e("CarbonCostByLocationPeriodComparisonTableTile",Z7e({field:"LocationName",headerName:"Location"})),[Vt.Rh.CarbonCostByTagPeriodComparisonTableTile]:K7e("CarbonCostByTagPeriodComparisonTableTile",Z7e({field:"Tag1",headerName:"Tag"})),[Vt.Rh.CarbonCostByScopePeriodComparisonTableTile]:K7e("CarbonCostByScopePeriodComparisonTableTile",Z7e({field:"Scope",headerName:"Scope"})),[Vt.Rh.CarbonCostByResourcePeriodComparisonTableTile]:K7e("CarbonCostByResourcePeriodComparisonTableTile",Z7e({field:"Type",headerName:"Resource"})),[Vt.Rh.WasteWeightByLocationPeriodComparisonTableTile]:K7e("WasteWeightByLocationPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"Quantity",headerName:e=>{var n;return"Weight (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t",")")},valueKey:"Quantity",transform:{kind:"numeric",field:"Quantity(t)",unitOptions:{originalUnit:"t",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Weight by location (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t",")")}}),[Vt.Rh.WasteWeightByTagPeriodComparisonTableTile]:K7e("WasteWeightByTagPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"Quantity",headerName:e=>{var n;return"Weight (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t",")")},valueKey:"Quantity",transform:{kind:"numeric",field:"Quantity(t)",unitOptions:{originalUnit:"t",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Weight by tag (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t",")")}}),[Vt.Rh.WasteWeightByContractorPeriodComparisonTableTile]:K7e("WasteWeightByContractorPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"WasteContractor",headerName:"Contractor"}],valueColumn:{field:"Quantity",headerName:e=>{var n;return"Weight (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t",")")},valueKey:"Quantity",transform:{kind:"numeric",field:"Quantity(t)",unitOptions:{originalUnit:"t",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Weight by contractor (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t",")")}}),[Vt.Rh.WasteWeightByTreatmentProcessPeriodComparisonTableTile]:K7e("WasteWeightByTreatmentProcessPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"TreatmentProcess",headerName:"Treatment process"}],valueColumn:{field:"Quantity",headerName:e=>{var n;return"Weight (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t",")")},valueKey:"Quantity",transform:{kind:"numeric",field:"Quantity(t)",unitOptions:{originalUnit:"t",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Weight by treatment process (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t",")")}}),[Vt.Rh.WasteCarbonEmissionsByLocationPeriodComparisonTableTile]:K7e("WasteCarbonEmissionsByLocationPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e(kg)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CO2e(kg)",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e(kg)",transform:{kind:"numeric",field:"CO2e(kg)",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by location (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.WasteCarbonEmissionsByTagPeriodComparisonTableTile]:K7e("WasteCarbonEmissionsByTagPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e(kg)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CO2e(kg)",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e(kg)",transform:{kind:"numeric",field:"CO2e(kg)",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by tag (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.WasteCarbonEmissionsByContractorPeriodComparisonTableTile]:K7e("WasteCarbonEmissionsByContractorPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e(kg)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"WasteContractor",headerName:"Contractor"}],valueColumn:{field:"CO2e(kg)",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e(kg)",transform:{kind:"numeric",field:"CO2e(kg)",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by contractor (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.WasteCarbonEmissionsByTreatmentProcessPeriodComparisonTableTile]:K7e("WasteCarbonEmissionsByTreatmentProcessPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e(kg)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"TreatmentProcess",headerName:"Treatment process"}],valueColumn:{field:"CO2e(kg)",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e(kg)",transform:{kind:"numeric",field:"CO2e(kg)",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by treatment process (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.WasteCostByLocationPeriodComparisonTableTile]:K7e("WasteCostByLocationPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"TotalCost",headerName:"Total cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by location (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.WasteCostByTagPeriodComparisonTableTile]:K7e("WasteCostByTagPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"TotalCost",headerName:"Total cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by tag (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.WasteCostByContractorPeriodComparisonTableTile]:K7e("WasteCostByContractorPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"WasteContractor",headerName:"Contractor"}],valueColumn:{field:"TotalCost",headerName:"Total cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by contractor (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.WasteCostByTreatmentProcessPeriodComparisonTableTile]:K7e("WasteCostByTreatmentProcessPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"TreatmentProcess",headerName:"Treatment process"}],valueColumn:{field:"TotalCost",headerName:"Total cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by treatment process (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.WasteCostPerTonnageByLocationPeriodComparisonTableTile]:K7e("WasteCostPerTonnageByLocationPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum},{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CostPerWeight",headerName:e=>{var n;return"Cost per ".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t"," (£)")},valueKey:"CostPerWeight",transform:{kind:"costPerWeight",costField:"TotalCost(£)",weightField:"Quantity(t)",withVatKey:"withVat",weightUnitOptions:{originalUnit:"t",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n,t;return"Cost per ".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t"," by location (£) ").concat(m2e(null!==(t=null==e?void 0:e.withVat)&&void 0!==t&&t))}}),[Vt.Rh.WasteCostPerTonnageByTagPeriodComparisonTableTile]:K7e("WasteCostPerTonnageByTagPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum},{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CostPerWeight",headerName:e=>{var n;return"Cost per ".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t"," (£)")},valueKey:"CostPerWeight",transform:{kind:"costPerWeight",costField:"TotalCost(£)",weightField:"Quantity(t)",withVatKey:"withVat",weightUnitOptions:{originalUnit:"t",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n,t;return"Cost per ".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t"," by tag (£) ").concat(m2e(null!==(t=null==e?void 0:e.withVat)&&void 0!==t&&t))}}),[Vt.Rh.WasteCostPerTonnageByContractorPeriodComparisonTableTile]:K7e("WasteCostPerTonnageByContractorPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum},{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"WasteContractor",headerName:"Contractor"}],valueColumn:{field:"CostPerWeight",headerName:e=>{var n;return"Cost per ".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t"," (£)")},valueKey:"CostPerWeight",transform:{kind:"costPerWeight",costField:"TotalCost(£)",weightField:"Quantity(t)",withVatKey:"withVat",weightUnitOptions:{originalUnit:"t",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n,t;return"Cost per ".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t"," by contractor (£) ").concat(m2e(null!==(t=null==e?void 0:e.withVat)&&void 0!==t&&t))}}),[Vt.Rh.WasteCostPerTonnageByTreatmentProcessPeriodComparisonTableTile]:K7e("WasteCostPerTonnageByTreatmentProcessPeriodComparisonTableTile",{datasetName:"WasteByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum},{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"TreatmentProcess",headerName:"Treatment process"}],valueColumn:{field:"CostPerWeight",headerName:e=>{var n;return"Cost per ".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t"," (£)")},valueKey:"CostPerWeight",transform:{kind:"costPerWeight",costField:"TotalCost(£)",weightField:"Quantity(t)",withVatKey:"withVat",weightUnitOptions:{originalUnit:"t",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n,t;return"Cost per ".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"t"," by treatment process (£) ").concat(m2e(null!==(t=null==e?void 0:e.withVat)&&void 0!==t&&t))}}),[Vt.Rh.WasteDisposalPercentageByLocationPeriodComparisonTableTile]:K7e("WasteDisposalPercentageByLocationPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"DisposalValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"Percentage",headerName:"% disposal",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"DisposalValue",denominatorField:"Value"}},defaultTitle:"% disposal by location"}),[Vt.Rh.WasteDisposalPercentageByTagPeriodComparisonTableTile]:K7e("WasteDisposalPercentageByTagPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"DisposalValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"Percentage",headerName:"% disposal",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"DisposalValue",denominatorField:"Value"}},defaultTitle:"% disposal by tag"}),[Vt.Rh.WasteDisposalPercentageByWasteStreamPeriodComparisonTableTile]:K7e("WasteDisposalPercentageByWasteStreamPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"DisposalValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"WasteStream",headerName:"Waste stream"}],valueColumn:{field:"Percentage",headerName:"% disposal",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"DisposalValue",denominatorField:"Value"}},defaultTitle:"% disposal by waste stream"}),[Vt.Rh.WasteRecycingPercentageByLocationPeriodComparisonTableTile]:K7e("WasteRecycingPercentageByLocationPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"RecyclingValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"Percentage",headerName:"% recycling",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"RecyclingValue",denominatorField:"Value"},doesMoreMeanPositive:!0},defaultTitle:"% recycling by location"}),[Vt.Rh.WasteRecycingPercentageByTagPeriodComparisonTableTile]:K7e("WasteRecycingPercentageByTagPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"RecyclingValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"Percentage",headerName:"% recycling",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"RecyclingValue",denominatorField:"Value"},doesMoreMeanPositive:!0},defaultTitle:"% recycling by tag"}),[Vt.Rh.WasteRecycingPercentageByWasteStreamPeriodComparisonTableTile]:K7e("WasteRecycingPercentageByWasteStreamPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"RecyclingValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"WasteStream",headerName:"Waste stream"}],valueColumn:{field:"Percentage",headerName:"% recycling",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"RecyclingValue",denominatorField:"Value"},doesMoreMeanPositive:!0},defaultTitle:"% recycling by waste stream"}),[Vt.Rh.WasteReusePercentageByLocationPeriodComparisonTableTile]:K7e("WasteReusePercentageByLocationPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"ReuseValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"Percentage",headerName:"% reuse",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"ReuseValue",denominatorField:"Value"},doesMoreMeanPositive:!0},defaultTitle:"% reuse by location"}),[Vt.Rh.WasteReusePercentageByTagPeriodComparisonTableTile]:K7e("WasteReusePercentageByTagPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"ReuseValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"Percentage",headerName:"% reuse",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"ReuseValue",denominatorField:"Value"},doesMoreMeanPositive:!0},defaultTitle:"% reuse by tag"}),[Vt.Rh.WasteReusePercentageByWasteStreamPeriodComparisonTableTile]:K7e("WasteReusePercentageByWasteStreamPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"ReuseValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"WasteStream",headerName:"Waste stream"}],valueColumn:{field:"Percentage",headerName:"% reuse",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"ReuseValue",denominatorField:"Value"},doesMoreMeanPositive:!0},defaultTitle:"% reuse by waste stream"}),[Vt.Rh.WasteOtherRecoveryPercentageByLocationPeriodComparisonTableTile]:K7e("WasteOtherRecoveryPercentageByLocationPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"OtherRecoveryValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"Percentage",headerName:"% other recovery",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"OtherRecoveryValue",denominatorField:"Value"},doesMoreMeanPositive:!0},defaultTitle:"% other recovery by location"}),[Vt.Rh.WasteOtherRecoveryPercentageByTagPeriodComparisonTableTile]:K7e("WasteOtherRecoveryPercentageByTagPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"OtherRecoveryValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"Percentage",headerName:"% other recovery",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"OtherRecoveryValue",denominatorField:"Value"},doesMoreMeanPositive:!0},defaultTitle:"% other recovery by tag"}),[Vt.Rh.WasteOtherRecoveryPercentageByWasteStreamPeriodComparisonTableTile]:K7e("WasteOtherRecoveryPercentageByWasteStreamPeriodComparisonTableTile",{datasetName:"WasteHierarchyByLocationReport",periodField:"IndividualCollectionDate",periodAlias:"Period",aggregationFunctions:[{field:"OtherRecoveryValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"WasteStream",headerName:"Waste stream"}],valueColumn:{field:"Percentage",headerName:"% other recovery",valueKey:"Percentage",transform:{kind:"percentage",numeratorField:"OtherRecoveryValue",denominatorField:"Value"},doesMoreMeanPositive:!0},defaultTitle:"% other recovery by waste stream"}),[Vt.Rh.GasConsumptionByLocationPeriodComparisonTableTile]:K7e("GasConsumptionByLocationPeriodComparisonTableTile",{datasetName:"GasByLocationReport",periodField:"Date",aggregationFunctions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"Quantity",headerName:"Consumption (kWh)",valueKey:"Quantity",transform:{kind:"numeric",field:"DailyQuantity(kWh)"}},defaultTitle:"Consumption by location (kWh)"}),[Vt.Rh.GasConsumptionByTagPeriodComparisonTableTile]:K7e("GasConsumptionByTagPeriodComparisonTableTile",{datasetName:"GasByLocationReport",periodField:"Date",aggregationFunctions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"Quantity",headerName:"Consumption (kWh)",valueKey:"Quantity",transform:{kind:"numeric",field:"DailyQuantity(kWh)"}},defaultTitle:"Consumption by tag (kWh)"}),[Vt.Rh.GasCarbonEmissionsByLocationPeriodComparisonTableTile]:K7e("GasCarbonEmissionsByLocationPeriodComparisonTableTile",{datasetName:"GasByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by location (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.GasCarbonEmissionsByTagPeriodComparisonTableTile]:K7e("GasCarbonEmissionsByTagPeriodComparisonTableTile",{datasetName:"GasByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by tag (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.GasCostByLocationPeriodComparisonTableTile]:K7e("GasCostByLocationPeriodComparisonTableTile",{datasetName:"GasByLocationReport",periodField:"Date",aggregationFunctions:[{field:"DailyCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"DailyCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by location (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.GasCostByTagPeriodComparisonTableTile]:K7e("GasCostByTagPeriodComparisonTableTile",{datasetName:"GasByLocationReport",periodField:"Date",aggregationFunctions:[{field:"DailyCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"DailyCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by tag (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.GasAverageChargePerKilowattByLocationPeriodComparisonTableTile]:K7e("GasAverageChargePerKilowattByLocationPeriodComparisonTableTile",{datasetName:"GasByLocationReport",periodField:"Date",aggregationFunctions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum},{field:"DailyCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"AverageChargePerKilowatt",headerName:"Average charge per kWh (£)",valueKey:"AverageChargePerKilowatt",transform:{kind:"averageChargePerKwh",costField:"DailyCost(£)",quantityField:"DailyQuantity(kWh)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Average charge per kWh by location (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.GasAverageChargePerKilowattByTagPeriodComparisonTableTile]:K7e("GasAverageChargePerKilowattByTagPeriodComparisonTableTile",{datasetName:"GasByLocationReport",periodField:"Date",aggregationFunctions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum},{field:"DailyCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"AverageChargePerKilowatt",headerName:"Average charge per kWh (£)",valueKey:"AverageChargePerKilowatt",transform:{kind:"averageChargePerKwh",costField:"DailyCost(£)",quantityField:"DailyQuantity(kWh)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Average charge per kWh by tag (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.FuelConsumptionByLocationPeriodComparisonTableTile]:K7e("FuelConsumptionByLocationPeriodComparisonTableTile",{datasetName:"FuelByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(kWh)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"Quantity",headerName:"Consumption (kWh)",valueKey:"Quantity",transform:{kind:"numeric",field:"Quantity(kWh)"}},defaultTitle:"Consumption by location (kWh)"}),[Vt.Rh.FuelConsumptionByTagPeriodComparisonTableTile]:K7e("FuelConsumptionByTagPeriodComparisonTableTile",{datasetName:"FuelByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(kWh)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"Quantity",headerName:"Consumption (kWh)",valueKey:"Quantity",transform:{kind:"numeric",field:"Quantity(kWh)"}},defaultTitle:"Consumption by tag (kWh)"}),[Vt.Rh.FuelCarbonEmissionsByLocationPeriodComparisonTableTile]:K7e("FuelCarbonEmissionsByLocationPeriodComparisonTableTile",{datasetName:"FuelByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by location (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.FuelCarbonEmissionsByTagPeriodComparisonTableTile]:K7e("FuelCarbonEmissionsByTagPeriodComparisonTableTile",{datasetName:"FuelByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by tag (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.FuelCostByLocationPeriodComparisonTableTile]:K7e("FuelCostByLocationPeriodComparisonTableTile",{datasetName:"FuelByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by location (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.FuelCostByTagPeriodComparisonTableTile]:K7e("FuelCostByTagPeriodComparisonTableTile",{datasetName:"FuelByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by tag (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.FuelAverageChargePerKilowattByLocationPeriodComparisonTableTile]:K7e("FuelAverageChargePerKilowattByLocationPeriodComparisonTableTile",{datasetName:"FuelByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(kWh)",aggregationType:Vt.DF.Sum},{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"AverageChargePerKilowatt",headerName:"Average charge per kWh (£)",valueKey:"AverageChargePerKilowatt",transform:{kind:"averageChargePerKwh",costField:"TotalCost(£)",quantityField:"Quantity(kWh)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Average charge per kWh by location (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.FuelAverageChargePerKilowattByTagPeriodComparisonTableTile]:K7e("FuelAverageChargePerKilowattByTagPeriodComparisonTableTile",{datasetName:"FuelByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity(kWh)",aggregationType:Vt.DF.Sum},{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"AverageChargePerKilowatt",headerName:"Average charge per kWh (£)",valueKey:"AverageChargePerKilowatt",transform:{kind:"averageChargePerKwh",costField:"TotalCost(£)",quantityField:"Quantity(kWh)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Average charge per kWh by tag (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.WaterConsumptionByLocationPeriodComparisonTableTile]:K7e("WaterConsumptionByLocationPeriodComparisonTableTile",{datasetName:"WaterByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"Quantity",headerName:"Consumption (m3)",valueKey:"Quantity",transform:{kind:"numeric",field:"Quantity"}},defaultTitle:"Consumption by location (m3)"}),[Vt.Rh.WaterConsumptionByTagPeriodComparisonTableTile]:K7e("WaterConsumptionByTagPeriodComparisonTableTile",{datasetName:"WaterByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"Quantity",headerName:"Consumption (m3)",valueKey:"Quantity",transform:{kind:"numeric",field:"Quantity"}},defaultTitle:"Consumption by tag (m3)"}),[Vt.Rh.WaterCarbonEmissionsByLocationPeriodComparisonTableTile]:K7e("WaterCarbonEmissionsByLocationPeriodComparisonTableTile",{datasetName:"WaterByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by location (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.WaterCarbonEmissionsByTagPeriodComparisonTableTile]:K7e("WaterCarbonEmissionsByTagPeriodComparisonTableTile",{datasetName:"WaterByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by tag (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.WaterCostByLocationPeriodComparisonTableTile]:K7e("WaterCostByLocationPeriodComparisonTableTile",{datasetName:"WaterByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by location (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.WaterCostByTagPeriodComparisonTableTile]:K7e("WaterCostByTagPeriodComparisonTableTile",{datasetName:"WaterByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by tag (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.WaterAverageChargePerKilowattByLocationPeriodComparisonTableTile]:K7e("WaterAverageChargePerKilowattByLocationPeriodComparisonTableTile",{datasetName:"WaterByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity",aggregationType:Vt.DF.Sum},{field:"TotalCost",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CostPerM3",headerName:"Cost per m3 (£)",valueKey:"CostPerM3",transform:{kind:"averageChargePerKwh",costField:"TotalCost",quantityField:"Quantity",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost per m3 by location (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.WaterAverageChargePerKilowattByTagPeriodComparisonTableTile]:K7e("WaterAverageChargePerKilowattByTagPeriodComparisonTableTile",{datasetName:"WaterByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Quantity",aggregationType:Vt.DF.Sum},{field:"TotalCost",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CostPerM3",headerName:"Cost per m3 (£)",valueKey:"CostPerM3",transform:{kind:"averageChargePerKwh",costField:"TotalCost",quantityField:"Quantity",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost per m3 by tag (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.MaterialWeightByLocationPeriodComparisonTableTile]:K7e("MaterialWeightByLocationPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Weight",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"Weight",headerName:e=>{var n;return"Weight (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg",")")},valueKey:"Weight",transform:{kind:"numeric",field:"Weight",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Weight by location (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg",")")}}),[Vt.Rh.MaterialWeightByTagPeriodComparisonTableTile]:K7e("MaterialWeightByTagPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Weight",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"Weight",headerName:e=>{var n;return"Weight (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg",")")},valueKey:"Weight",transform:{kind:"numeric",field:"Weight",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Weight by tag (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg",")")}}),[Vt.Rh.MaterialWeightByContractorPeriodComparisonTableTile]:K7e("MaterialWeightByContractorPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Weight",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"SupplierName",headerName:"Contractor"}],valueColumn:{field:"Weight",headerName:e=>{var n;return"Weight (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg",")")},valueKey:"Weight",transform:{kind:"numeric",field:"Weight",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Weight by contractor (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg",")")}}),[Vt.Rh.MaterialWeightByTypeAndOriginPeriodComparisonTableTile]:K7e("MaterialWeightByTypeAndOriginPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"Weight",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Material",headerName:"Material"},{field:"Origin",headerName:"Origin"}],valueColumn:{field:"Weight",headerName:e=>{var n;return"Weight (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg",")")},valueKey:"Weight",transform:{kind:"numeric",field:"Weight",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Weight by material and origin (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg",")")}}),[Vt.Rh.MaterialCarbonEmissionsByLocationPeriodComparisonTableTile]:K7e("MaterialCarbonEmissionsByLocationPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by location (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.MaterialCarbonEmissionsByTagPeriodComparisonTableTile]:K7e("MaterialCarbonEmissionsByTagPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by tag (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.MaterialCarbonEmissionsByContractorPeriodComparisonTableTile]:K7e("MaterialCarbonEmissionsByContractorPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"SupplierName",headerName:"Contractor"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by contractor (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.MaterialCarbonEmissionsByTypeAndOriginPeriodComparisonTableTile]:K7e("MaterialCarbonEmissionsByTypeAndOriginPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Material",headerName:"Material"},{field:"Origin",headerName:"Origin"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by material and origin (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.MaterialCostByLocationPeriodComparisonTableTile]:K7e("MaterialCostByLocationPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by location (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.MaterialCostByTagPeriodComparisonTableTile]:K7e("MaterialCostByTagPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by tag (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.MaterialCostPerWeightEmissionsByLocationPeriodComparisonTableTile]:K7e("MaterialCostPerWeightEmissionsByLocationPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost",aggregationType:Vt.DF.Sum},{field:"Weight",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CostPerWeight",headerName:e=>{var n;return"Cost (£) per ".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg")},valueKey:"CostPerWeight",transform:{kind:"costPerWeight",costField:"TotalCost",weightField:"Weight",withVatKey:"withVat",weightUnitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n,t;return"Cost (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n)," per ").concat(null!==(t=null==e?void 0:e.selectedUnit)&&void 0!==t?t:"kg"," by location")}}),[Vt.Rh.MaterialCostPerWeightEmissionsByTagPeriodComparisonTableTile]:K7e("MaterialCostPerWeightEmissionsByTagPeriodComparisonTableTile",{datasetName:"MaterialByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost",aggregationType:Vt.DF.Sum},{field:"Weight",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CostPerWeight",headerName:e=>{var n;return"Cost (£) per ".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg")},valueKey:"CostPerWeight",transform:{kind:"costPerWeight",costField:"TotalCost",weightField:"Weight",withVatKey:"withVat",weightUnitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n,t;return"Cost (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n)," per ").concat(null!==(t=null==e?void 0:e.selectedUnit)&&void 0!==t?t:"kg"," by tag")}}),[Vt.Rh.TransportCarbonEmissionsByLocationPeriodComparisonTableTile]:K7e("TransportCarbonEmissionsByLocationPeriodComparisonTableTile",{datasetName:"TransportByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by location (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.TransportCarbonEmissionsByTagPeriodComparisonTableTile]:K7e("TransportCarbonEmissionsByTagPeriodComparisonTableTile",{datasetName:"TransportByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by tag (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.TransportCarbonEmissionsByTransportTypePeriodComparisonTableTile]:K7e("TransportCarbonEmissionsByTransportTypePeriodComparisonTableTile",{datasetName:"TransportByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Type",headerName:"Transport type"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by transport type (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.TransportCarbonEmissionsByFuelTypePeriodComparisonTableTile]:K7e("TransportCarbonEmissionsByFuelTypePeriodComparisonTableTile",{datasetName:"TransportByLocationReport",periodField:"Date",aggregationFunctions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Fuel",headerName:"Fuel type"}],valueColumn:{field:"CO2e",headerName:e=>{var n;return"Carbon emissions (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")},valueKey:"CO2e",transform:{kind:"numeric",field:"CO2e",unitOptions:{originalUnit:"kg",targetUnitKey:"selectedUnit"}}},defaultTitle:e=>{var n;return"Carbon emissions by fuel type (".concat(null!==(n=null==e?void 0:e.selectedUnit)&&void 0!==n?n:"kg","CO2e)")}}),[Vt.Rh.TransportCostByLocationPeriodComparisonTableTile]:K7e("TransportCostByLocationPeriodComparisonTableTile",{datasetName:"TransportByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"LocationName",headerName:"Location"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by location (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.TransportCostByTagPeriodComparisonTableTile]:K7e("TransportCostByTagPeriodComparisonTableTile",{datasetName:"TransportByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Tag1",headerName:"Tag"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by tag (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.TransportCostByTransportTypePeriodComparisonTableTile]:K7e("TransportCostByTransportTypePeriodComparisonTableTile",{datasetName:"TransportByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Type",headerName:"Transport type"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by transport type (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}}),[Vt.Rh.TransportCostByFuelTypePeriodComparisonTableTile]:K7e("TransportCostByFuelTypePeriodComparisonTableTile",{datasetName:"TransportByLocationReport",periodField:"Date",aggregationFunctions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],groupPartitionFields:[{field:"Fuel",headerName:"Fuel type"}],valueColumn:{field:"TotalCost",headerName:"Cost (£)",valueKey:"TotalCost",transform:{kind:"numeric",field:"TotalCost(£)",withVatKey:"withVat"}},defaultTitle:e=>{var n;return"Cost by fuel type (£) ".concat(m2e(null!==(n=null==e?void 0:e.withVat)&&void 0!==n&&n))}})};function e8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function n8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?e8e(Object(t),!0).forEach(function(n){t8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):e8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function t8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const a8e=e=>{let{tile:n,period:t}=e;const a=rt(),r=(0,g.useRef)(null),{queryVariablesFilters:i,selectedUnit:o}=J1e(),l=Y1e(r),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:(0,zt.omit)(i,"Period 1"===t?"period2":"period1"),datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Scope"}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors||[f.AgChartColor.PINK_1,f.AgChartColor.BLUE_1,f.AgChartColor.GREEN_1]),y=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==s?void 0:s.getDashboardTileData))||void 0===e||null===(e=e.map(e=>n8e(n8e({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:o}),Scope:"Scope ".concat(e.Scope)})))||void 0===e?void 0:e.sort((e,n)=>Number(e.Scope)-Number(n.Scope))},[s,o]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>(null==y?void 0:y.reduce((e,n)=>e+Number(n.CO2e),0))||1,[y]),x=(0,g.useMemo)(()=>({theme:p,legend:m,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"pie",fillOpacity:1,angleKey:"CO2e",calloutLabelKey:"Scope",sectorLabelKey:"CO2e",sectorLabel:{color:"white",fontWeight:"bold",formatter:e=>{let{value:n}=e;return d2e(n,{percentageOverTotal:v})}},tooltip:{renderer:e=>({title:e.datum.Scope,data:[{label:"".concat(o,"CO2e"),value:"".concat(d2e(e.datum.CO2e,{percentageOverTotal:v})," (").concat(d2e(e.datum.CO2e,{selectedUnit:o}),")")}]})}}]}),[y,p,l,v,o,m]);return(0,Ze.jsx)(F4e,{title:n.title||"".concat(t," carbon emissions (").concat(o,"CO2e) by scope"),loading:c,error:d,retry:u,noData:b,ref:r,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:x})})})};function r8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r8e(Object(t),!0).forEach(function(n){o8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const l8e=e=>{let{tile:n,period:t}=e;const a=rt(),{queryVariablesFilters:r,isExportingPdf:i,selectedUnit:o}=J1e(),l=(0,g.useRef)(null),s=Y1e(l),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:(0,zt.omit)(r,"Period 1"===t?"period2":"period1"),datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Type"}]}}}),{chartTheme:m,legendTheme:y,agChartColorMap:b}=(0,f.useAgChartsTheme)(n.colors),v=(0,g.useMemo)(()=>({Electricity:b[f.AgChartColor.BLUE_1],Finances:b[f.AgChartColor.YELLOW_1],Gas:b[f.AgChartColor.GREEN_1],"Home Working":b[f.AgChartColor.PINK_3],"Hotel Stays":b[f.AgChartColor.BLUE_4],Materials:b[f.AgChartColor.GREY_1],"Refrigerants and Other Gases":b[f.AgChartColor.BLUE_3],Waste:b[f.AgChartColor.PURPLE_1],Water:b[f.AgChartColor.PINK_1],Fuel:b[f.AgChartColor.BLACK_1],"Heat and Steam":b[f.AgChartColor.RED_1],Transport:b[f.AgChartColor.YELLOW_1]}),[b]),x=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==c?void 0:c.getDashboardTileData))||void 0===n||null===(n=n.map(e=>i8e(i8e({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:o}),Date:s2e(e.Month),Type:e.Type})))||void 0===n?void 0:n.sort((e,n)=>e.Type.toLowerCase().localeCompare(n.Type.toLowerCase())),["Date"],"Type","CO2e"))||void 0===e?void 0:e.sort(c2e)},[c,o]),T=(0,g.useMemo)(()=>g2e(x,{excludeKeys:["Date"],removeSuffixFromLabels:"CO2e",removePrefixFromLabels:"Type"}),[x]),O=Boolean(x&&0===x.length),k=(0,g.useMemo)(()=>({theme:m,width:s,data:x||[],zoom:{enabled:!0},series:[...T.map(e=>{let{labelKey:n,valueKey:t}=e;return{type:"bar",xKey:"Date",yKey:t,yName:n,stacked:!0,fillOpacity:1,fill:v[n],tooltip:{renderer:e=>({title:e.yName,data:[{label:"".concat(o,"CO2e"),value:"".concat(d2e(e.datum[t],{selectedUnit:o}))}]})}}})],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:i8e({position:"right"},y)}),[x,m,s,T,y,v,o]);return(0,Ze.jsx)(F4e,{title:n.title||"".concat(t," carbon by source (").concat(o,"CO2e)"),loading:d,error:u,retry:p,noData:O,ref:l,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:k})})},i?"exporting-pdf":void 0)};function s8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function c8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s8e(Object(t),!0).forEach(function(n){d8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const u8e=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>c8e(c8e({},e),{},{TotalCost:o2e(e.TotalCost,{withVat:c})})).sort((e,n)=>new Date(e.Period).getTime()-new Date(n.Period).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.TotalCost,g=null==f||null===(a=f[1])||void 0===a?void 0:a.TotalCost,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Period,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Period,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total carbon cost ".concat(m2e(c)),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function p8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function m8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p8e(Object(t),!0).forEach(function(n){f8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function f8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const y8e=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>m8e(m8e({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:c})})).sort((e,n)=>new Date(e.Period).getTime()-new Date(n.Period).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.CO2e,g=null==f||null===(a=f[1])||void 0===a?void 0:a.CO2e,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Period,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Period,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total carbon emitted (".concat(c,"CO2e)"),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y,{selectedUnit:c})})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g,{selectedUnit:c})})]})]})})},g8e=e=>{var n;let{tile:t}=e;const a=rt(),{queryVariablesFilters:r}=J1e(),{data:i,loading:o,error:l,refetch:s}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:r,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum}],partitions:[]}}}),c=h2e(null==i?void 0:i.getDashboardTileData),d=o2e((null==c||null===(n=c[0])||void 0===n?void 0:n["DailyQuantity(kWh)"])||"0"),u=Number.isNaN(d)||null===d,p=u?null:d2e(d);return(0,Ze.jsx)(F4e,{title:t.title||"Total energy consumption (kWh)",loading:o,error:l,retry:s,noData:u,children:(0,Ze.jsx)(H4e,{children:p})})},b8e=e=>{var n;let{tile:t}=e;const a=rt(),{queryVariablesFilters:r}=J1e(),{data:i,loading:o,error:l,refetch:s}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:r,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[]}}}),c=h2e(null==i?void 0:i.getDashboardTileData),d=o2e((null==c||null===(n=c[0])||void 0===n?void 0:n.CO2e)||"0"),u=Number.isNaN(d)||null===d,p=u?null:d2e(d);return(0,Ze.jsx)(F4e,{title:t.title||"Total gross carbon (kgCO2e)",loading:o,error:l,retry:s,noData:u,children:(0,Ze.jsx)(H4e,{children:p})})},h8e=e=>{var n;let{tile:t}=e;const a=rt(),{queryVariablesFilters:r}=J1e(),{data:i,loading:o,error:l,refetch:s}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:r,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"MarketOrLocationCO2e",aggregationType:Vt.DF.Sum}],partitions:[]}}}),c=h2e(null==i?void 0:i.getDashboardTileData),d=o2e((null==c||null===(n=c[0])||void 0===n?void 0:n.MarketOrLocationCO2e)||"0"),u=Number.isNaN(d)||null===d,p=u?null:d2e(d);return(0,Ze.jsx)(F4e,{title:t.title||"Total net carbon (kgCO2e)",loading:o,error:l,retry:s,noData:u,children:(0,Ze.jsx)(H4e,{children:p})})},v8e=e=>{var n;let{tile:t}=e;const a=rt(),{queryVariablesFilters:r,withVat:i}=J1e(),{data:o,loading:l,error:s,refetch:c}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:r,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"DailyCost(£)",aggregationType:Vt.DF.Sum}],partitions:[]}}}),d=h2e(null==o?void 0:o.getDashboardTileData),u=o2e((null==d||null===(n=d[0])||void 0===n?void 0:n["DailyCost(£)"])||"0",{withVat:i}),p=Number.isNaN(u)||null===u,m=p?null:d2e(u);return(0,Ze.jsx)(F4e,{title:t.title||"Total cost (£) ".concat(m2e(i)),loading:l,error:s,retry:c,noData:p,children:(0,Ze.jsx)(H4e,{children:m})})};function x8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function T8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x8e(Object(t),!0).forEach(function(n){O8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function O8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const k8e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,withVat:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum},{field:"DailyCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),y=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==s?void 0:s.getDashboardTileData))||void 0===e||null===(e=e.map(e=>T8e(T8e({},e),{},{"DailyQuantity(kWh)":o2e(e["DailyQuantity(kWh)"]),"DailyCost(£)":o2e(e["DailyCost(£)"],{withVat:i}),Date:s2e(e.Month)})))||void 0===e?void 0:e.sort(c2e)},[s,i]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:p,legend:m,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"DailyQuantity(kWh)",yName:"Consumption (kWh)",fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Consumption (kWh)",value:d2e(e.datum["DailyQuantity(kWh)"])}]})}},{type:"line",xKey:"Date",yKey:"DailyCost(£)",yName:"Total cost (£) ".concat(m2e(i)),tooltip:{renderer:e=>({data:[{label:"Total cost (£) ".concat(m2e(i)),value:d2e(e.datum["DailyCost(£)"])}]})}}],axes:[{type:"number",position:"left",keys:["DailyQuantity(kWh)"],label:{formatter:e=>p2e(e.value)}},{type:"number",position:"right",keys:["DailyCost(£)"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[y,p,l,m,i]);return(0,Ze.jsx)(F4e,{title:n.title||"Energy cost and consumption over time",loading:c,error:d,retry:u,noData:b,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},r?"exporting-pdf":void 0)};function j8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function C8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j8e(Object(t),!0).forEach(function(n){S8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function S8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const N8e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r}=J1e(),i=(0,g.useRef)(null),o=Y1e(i),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"CarbonByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Scope"}]}}}),{chartTheme:u,legendTheme:p}=(0,f.useAgChartsTheme)(n.colors||[f.AgChartColor.PINK_1,f.AgChartColor.BLUE_1,f.AgChartColor.GREEN_1]),m=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==l?void 0:l.getDashboardTileData))||void 0===n?void 0:n.map(e=>C8e(C8e({},e),{},{CO2e:o2e(e.CO2e),Date:s2e(e.Month),Scope:e.Scope})),["Date"],"Scope","CO2e","TotalCO2e"))||void 0===e?void 0:e.sort(c2e)},[l]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:u,width:o,data:m||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"Scope1CO2e",yName:"Scope 1",stacked:!0,fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Scope 1",value:d2e(e.datum.Scope1CO2e)},{label:"Total kgCO2e",value:d2e(e.datum.TotalCO2e)}]})}},{type:"bar",xKey:"Date",yKey:"Scope2CO2e",yName:"Scope 2",stacked:!0,fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Scope 2",value:d2e(e.datum.Scope2CO2e)},{label:"Total kgCO2e",value:d2e(e.datum.TotalCO2e)}]})}},{type:"bar",xKey:"Date",yKey:"Scope3CO2e",yName:"Scope 3",stacked:!0,fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Scope 3",value:d2e(e.datum.Scope3CO2e)},{label:"Total kgCO2e",value:d2e(e.datum.TotalCO2e)}]})}}],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:C8e({position:"right"},p)}),[m,u,o,p]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon emissions by scope (kgCO2e)",loading:s,error:c,retry:d,noData:y,ref:i,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},r?"exporting-pdf":void 0)};function w8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function D8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w8e(Object(t),!0).forEach(function(n){A8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function A8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const R8e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,filters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum},{field:"DailyCost(£)",aggregationType:Vt.DF.Sum},{field:"CO2e",aggregationType:Vt.DF.Sum},{field:"MarketOrLocationCO2e",aggregationType:Vt.DF.Sum},{field:"GrossVsNetCO2eDifference",aggregationType:Vt.DF.Sum}],partitions:[{field:"LocationCode"},{field:"LocationName"}]}}}),f=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==d?void 0:d.getDashboardTileData))||void 0===e||null===(e=e.map(e=>D8e(D8e({},e),{},{LocationCode:l2e(e.LocationCode),LocationName:l2e(e.LocationName),"DailyQuantity(kWh)":o2e(e["DailyQuantity(kWh)"]),"DailyCost(£)":o2e(e["DailyCost(£)"],{withVat:c}),CO2e:o2e(e.CO2e),MarketOrLocationCO2e:o2e(e.MarketOrLocationCO2e),GrossVsNetCO2eDifference:o2e(e.GrossVsNetCO2eDifference)})))||void 0===e?void 0:e.sort((e,n)=>e.LocationCode!==n.LocationCode?e.LocationCode.toLowerCase().localeCompare(n.LocationCode.toLowerCase()):e.LocationName!==n.LocationName?e.LocationName.toLowerCase().localeCompare(n.LocationName.toLowerCase()):1)},[d,c]),y=Boolean(f&&0===f.length),b=(0,g.useMemo)(()=>[{headerName:"LocationCode",field:"LocationCode",rowGroup:!0,hide:!0},{headerName:"LocationName",field:"LocationName",rowGroup:!0,hide:!0},{headerName:"Consumption (kWh)",field:"DailyQuantity(kWh)",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Cost (£) ".concat(m2e(c)),field:"DailyCost(£)",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Gross carbon emissions (kgCO2e)",field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Market carbon emissions (kgCO2e)",field:"MarketOrLocationCO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Difference between gross and market carbon emissions (kgCO2e)",field:"GrossVsNetCO2eDifference",aggFunc:"sum",valueFormatter:e=>d2e(e.value)}],[c]);return(0,g.useEffect)(()=>{var e;null===(e=r.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[s]),(0,Ze.jsx)(F4e,{title:n.title||"Consumption by location",loading:u,error:p,retry:m,noData:y,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-ConsumptionPerLocationTableTile"),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:b,rowData:f}})})};function P8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function L8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P8e(Object(t),!0).forEach(function(n){I8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function I8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const E8e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,filters:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum},{field:"CarbonNetEmissionsCO2eMinusWTT",aggregationType:Vt.DF.Sum}],partitions:[{field:"Scope"},{field:"Source"},{field:"TariffOrFuelType"}]}}}),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==c?void 0:c.getDashboardTileData))||void 0===e||null===(e=e.map(e=>L8e(L8e({},e),{},{Scope:l2e(e.Scope),Source:l2e(e.Source),TariffOrFuelType:l2e(e.TariffOrFuelType),"DailyQuantity(kWh)":o2e(e["DailyQuantity(kWh)"]),CarbonNetEmissionsCO2eMinusWTT:o2e(e.CarbonNetEmissionsCO2eMinusWTT,{originalUnit:"kg",targetUnit:"t"})})))||void 0===e?void 0:e.sort((e,n)=>e.Scope!==n.Scope?e.Scope.toLowerCase().localeCompare(n.Scope.toLowerCase()):e.Source!==n.Source?e.Source.toLowerCase().localeCompare(n.Source.toLowerCase()):e.TariffOrFuelType.toLowerCase().localeCompare(n.TariffOrFuelType.toLowerCase()))},[c]),f=Boolean(m&&0===m.length),y=(0,g.useMemo)(()=>[{headerName:"Scope",field:"Scope",rowGroup:!0,hide:!0},{headerName:"Source",field:"Source",rowGroup:!0,hide:!0},{headerName:"Tariff/Fuel type",field:"TariffOrFuelType",rowGroup:!0,hide:!0},{headerName:"Consumption (kWh)",field:"DailyQuantity(kWh)",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Carbon net emissions (tCO2e-WTT)",field:"CarbonNetEmissionsCO2eMinusWTT",aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:"t"})}],[]);return(0,g.useEffect)(()=>{var e;null===(e=r.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[s]),(0,Ze.jsx)(F4e,{title:n.title||"Consumption by source and tariff",loading:d,error:u,retry:p,noData:f,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-EnergyConsumptionPerLocationTableTile"),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:y,rowData:m}})})};function _8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function F8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_8e(Object(t),!0).forEach(function(n){B8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function B8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const U8e=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:c}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>F8e(F8e({},e),{},{"DailyQuantity(kWh)":o2e(e["DailyQuantity(kWh)"]),Date:e.Year})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t["DailyQuantity(kWh)"],g=null==f||null===(a=f[1])||void 0===a?void 0:a["DailyQuantity(kWh)"],b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total consumption (kWh)",loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function M8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function V8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?M8e(Object(t),!0).forEach(function(n){z8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):M8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function z8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const G8e=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c,withVat:d}=J1e(),{data:u,loading:p,error:m,refetch:f}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"DailyCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:c}]}}}),y=null===(n=h2e(null==u?void 0:u.getDashboardTileData))||void 0===n?void 0:n.map(e=>V8e(V8e({},e),{},{"DailyCost(£)":o2e(e["DailyCost(£)"],{withVat:d}),Date:e.Year})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),g=null==y||null===(t=y[0])||void 0===t?void 0:t["DailyCost(£)"],b=null==y||null===(a=y[1])||void 0===a?void 0:a["DailyCost(£)"],v=null==y||null===(r=y[0])||void 0===r?void 0:r.Date,x=null==y||null===(i=y[1])||void 0===i?void 0:i.Date,T=(Number.isNaN(g)||null===g)&&(Number.isNaN(b)||null===b);return(0,Ze.jsx)(F4e,{title:o.title||"Total cost (£) ".concat(m2e(d)),loading:p,error:m,retry:f,noData:T,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]}),(0,Ze.jsx)(i6e,{value1:g,value2:b}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:x}),(0,Ze.jsx)(e6e,{children:d2e(b)})]})]})})};var $8e=t(37563);function W8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function q8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?W8e(Object(t),!0).forEach(function(n){J8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function J8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Y8e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,filters:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors),y=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==s?void 0:s.getDashboardTileData))||void 0===e||null===(e=e.map(e=>q8e(q8e({},e),{},{"DailyQuantity(kWh)":o2e(e["DailyQuantity(kWh)"]),Date:s2e(e.Month)})).reduce((e,n)=>{const t=(0,$8e.m)(e),a=O1e(i.year1),r=k1e(i.year1),o=k1e(i.year2),l=Wt()(n.Date,"MMM YYYY").format("MMM"),s=Wt()(n.Date,"MMM YYYY").year()-(a===Ma.YearToCompareType.CALENDAR?0:Wt()(n.Date,"MMM YYYY").month()<4?1:0),c=t.findIndex(e=>e.Month===l&&null!==e.Year1Quantity);if(-1!==c)return t[c].Year2Quantity=Number(n["DailyQuantity(kWh)"]),t;const d=e.findIndex(e=>e.Month===l&&null!==e.Year2Quantity);return-1!==d?(t[d].Year1Quantity=Number(n["DailyQuantity(kWh)"]),t):[...t,q8e(q8e({},n),{},{Year1Quantity:s===r?Number(n["DailyQuantity(kWh)"]):null,Year2Quantity:s===o?Number(n["DailyQuantity(kWh)"]):null,Month:l})]},[]))||void 0===e?void 0:e.sort((e,n)=>O1e(i.year1)===Ma.YearToCompareType.CALENDAR?Wt()(e.Month,"MMM").toDate().getTime()-Wt()(n.Month,"MMM").toDate().getTime():j1e.indexOf(e.Month)-j1e.indexOf(n.Month))},[s,i.year1,i.year2]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:p,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Month",yKey:"Year1Quantity",yName:"".concat(i.year1," Consumption (kWh)"),fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"".concat(i.year1," Consumption (kWh)"),value:d2e(e.datum.Year1Quantity)},{label:"".concat(i.year2," Consumption (kWh)"),value:d2e(e.datum.Year2Quantity)}]})}},{type:"bar",xKey:"Month",yKey:"Year2Quantity",yName:"".concat(i.year2," Consumption (kWh)"),fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"".concat(i.year1," Consumption (kWh)"),value:d2e(e.datum.Year1Quantity)},{label:"".concat(i.year2," Consumption (kWh)"),value:d2e(e.datum.Year2Quantity)}]})}}],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:q8e({position:"bottom"},m)}),[y,p,l,m,i.year1,i.year2]);return(0,Ze.jsx)(F4e,{title:n.title||"Monthly energy consumption",loading:c,error:d,retry:u,noData:b,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},r?"exporting-pdf":void 0)};function H8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function K8e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H8e(Object(t),!0).forEach(function(n){Q8e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Q8e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Z8e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,filters:s,partitionFunctionForYearComparison:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"DailyCost(£)",aggregationType:Vt.DF.Sum},{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum},{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:c},{field:"LocationName"}]}}}),f=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==d?void 0:d.getDashboardTileData))||void 0===e||null===(e=e.map(e=>K8e(K8e({},e),{},{Date:l2e(e.Year),LocationName:l2e(e.LocationName),"DailyCost(£)":o2e(e["DailyCost(£)"]),"DailyQuantity(kWh)":o2e(e["DailyQuantity(kWh)"]),CO2e:o2e(e.CO2e)})))||void 0===e?void 0:e.sort((e,n)=>e.Date.localeCompare(n.Date))},[d]),y=Boolean(f&&0===f.length),b=(0,g.useMemo)(()=>[{headerName:"Location",field:"LocationName",rowGroup:!0,hide:!0},{headerName:"Year",field:"Date",pivot:!0},{headerName:"Cost (£)",field:"DailyCost(£)",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Consumption (kWh)",field:"DailyQuantity(kWh)",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Gross carbon emissions (kgCO2e)",field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value)}],[]);return(0,g.useEffect)(()=>{var e;null===(e=r.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[s]),(0,Ze.jsx)(F4e,{title:n.title||"Annual figures per location",loading:u,error:p,retry:m,noData:y,ref:a,children:(0,Ze.jsx)(c6e,{pivotModeEnabled:!0,ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-AnnualEnergyFiguresPerLocationTableTile"),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:b,rowData:f,pivotMode:!0}})})};function X8e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function e9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?X8e(Object(t),!0).forEach(function(n){n9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X8e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function n9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const t9e=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:c}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>e9e(e9e({},e),{},{CO2e:o2e(e.CO2e),Date:e.Year})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.CO2e,g=null==f||null===(a=f[1])||void 0===a?void 0:a.CO2e,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total gross carbon emissions (kgCO2e)",loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function a9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function r9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a9e(Object(t),!0).forEach(function(n){i9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function i9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const o9e=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"EnergyByLocationReport",aggregation:{functions:[{field:"MarketOrLocationCO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:c}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>r9e(r9e({},e),{},{MarketOrLocationCO2e:o2e(e.MarketOrLocationCO2e),Date:e.Year})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.MarketOrLocationCO2e,g=null==f||null===(a=f[1])||void 0===a?void 0:a.MarketOrLocationCO2e,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total gross carbon emissions (kgCO2e)",loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function l9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function s9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l9e(Object(t),!0).forEach(function(n){c9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function c9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const d9e=e=>{var n,t;let{tile:a}=e;const r=rt(),{queryVariablesFilters:i,selectedUnit:o}=J1e(),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(V3e,{variables:{accountId:r,datasetFilters:i,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum}],partitions:[]}}}),u=null===(n=h2e(null==l?void 0:l.getDashboardTileData))||void 0===n?void 0:n.map(e=>s9e(s9e({},e),{},{Weight:o2e(e["Quantity(t)"],{originalUnit:"t",targetUnit:o})})),p=Number(null==u||null===(t=u[0])||void 0===t?void 0:t.Weight),m=Number.isNaN(p)||null===p,f=m?null:d2e(p,{selectedUnit:o});return(0,Ze.jsx)(F4e,{title:a.title||"Total weight (".concat(o,")"),loading:s,error:c,retry:d,noData:m,children:(0,Ze.jsx)(H4e,{children:f})})},u9e=e=>{var n;let{tile:t}=e;const a=rt(),{queryVariablesFilters:r,withVat:i}=J1e(),{data:o,loading:l,error:s,refetch:c}=(0,h.IT)(V3e,{variables:{accountId:a,datasetFilters:r,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],partitions:[]}}}),d=h2e(null==o?void 0:o.getDashboardTileData),u=o2e((null==d||null===(n=d[0])||void 0===n?void 0:n["TotalCost(£)"])||"0",{withVat:i}),p=Number.isNaN(u)||null===u,m=p?null:d2e(u);return(0,Ze.jsx)(F4e,{title:t.title||"Total cost (£) ".concat(m2e(i)),loading:l,error:s,retry:c,noData:p,children:(0,Ze.jsx)(H4e,{children:m})})},p9e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a}=J1e(),{data:r,loading:i,error:o,refetch:l}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WasteHierarchyByLocationReport",aggregation:{functions:[{field:"Value",aggregationType:Vt.DF.Sum}],partitions:[{field:"Type"}]}}}),s=h2e(null==r?void 0:r.getDashboardTileData),c=(null==s?void 0:s.reduce((e,n)=>e+o2e(n.Value),0))||0,d=((null==s?void 0:s.reduce((e,n)=>e+(["Unknown","Disposal"].includes(n.Type)?0:o2e(n.Value)),0))||0)/c*100,u=Number.isNaN(d)||null===d,p=u?null:d2e(d,{suppressPercentageSign:!0});return(0,Ze.jsx)(F4e,{title:n.title||"% diverted from disposal",loading:i,error:o,retry:l,noData:u,children:(0,Ze.jsx)(H4e,{children:p?"".concat(p,"%"):null})})};function m9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function f9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m9e(Object(t),!0).forEach(function(n){y9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function y9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const g9e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),{queryVariablesFilters:r,selectedUnit:i}=J1e(),o=Y1e(a),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:r,datasetName:"WasteHierarchyByLocationReport",aggregation:{functions:[{field:"Value",aggregationType:Vt.DF.Sum}],partitions:[{field:"Type"}]}}}),{chartTheme:u,legendTheme:p}=(0,f.useAgChartsTheme)(n.colors),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==l?void 0:l.getDashboardTileData))||void 0===e?void 0:e.map(e=>f9e(f9e({},e),{},{Weight:o2e(e.Value,{originalUnit:"t",targetUnit:i}),Type:"OtherRecovery"===e.Type?"Other recovery":"PreparingForReuse"===e.Type?"Preparing for re-use":e.Type}))},[l,i]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>(null==m?void 0:m.reduce((e,n)=>e+Number(n.Weight),0))||1,[m]),v=(0,g.useMemo)(()=>({theme:u,legend:p,width:o,data:m||[],zoom:{enabled:!0},series:[{type:"pie",fillOpacity:1,angleKey:"Weight",calloutLabelKey:"Type",sectorLabelKey:"Weight",sectorLabel:{color:"white",fontWeight:"bold",formatter:e=>{let{value:n}=e;return d2e(n,{percentageOverTotal:b})}},tooltip:{renderer:e=>({heading:"Weight %",title:e.datum.Type,data:[{value:"".concat(d2e(e.datum.Weight,{percentageOverTotal:b})," (").concat(d2e(e.datum.Weight,{selectedUnit:i})," ").concat(i,")")}]})}}]}),[m,u,o,b,i,p]);return(0,Ze.jsx)(F4e,{title:n.title||"Waste hierarchy",loading:s,error:c,retry:d,noData:y,ref:a,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})})};function b9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function h9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b9e(Object(t),!0).forEach(function(n){v9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function v9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const x9e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,selectedUnit:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"CO2e(kg)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Scope"}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors||[f.AgChartColor.PINK_1,f.AgChartColor.BLUE_1,f.AgChartColor.GREEN_1]),y=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==s?void 0:s.getDashboardTileData))||void 0===n?void 0:n.map(e=>h9e(h9e({},e),{},{CO2e:o2e(e["CO2e(kg)"],{originalUnit:"kg",targetUnit:i}),Date:s2e(e.Month),Scope:e.Scope})),["Date"],"Scope","CO2e","TotalCO2e"))||void 0===e?void 0:e.sort(c2e)},[s,i]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:p,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"Scope1CO2e",yName:"Scope 1 (".concat(i,"CO2e)"),stacked:!0,fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Scope 1 (".concat(i,"CO2e)"),value:d2e(e.datum.Scope1CO2e,{selectedUnit:i})},{label:"Scope 2 (".concat(i,"CO2e)"),value:d2e(e.datum.Scope2CO2e,{selectedUnit:i})},{label:"Scope 3 (".concat(i,"CO2e)"),value:d2e(e.datum.Scope3CO2e,{selectedUnit:i})},{label:"Total ".concat(i,"CO2e"),value:d2e(e.datum.TotalCO2e,{selectedUnit:i})}]})}},{type:"bar",xKey:"Date",yKey:"Scope2CO2e",yName:"Scope 2 (".concat(i,"CO2e)"),stacked:!0,fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Scope 2 (".concat(i,"CO2e)"),value:d2e(e.datum.Scope2CO2e,{selectedUnit:i})},{label:"Scope 1 (".concat(i,"CO2e)"),value:d2e(e.datum.Scope1CO2e,{selectedUnit:i})},{label:"Scope 3 (".concat(i,"CO2e)"),value:d2e(e.datum.Scope3CO2e,{selectedUnit:i})},{label:"Total ".concat(i,"CO2e"),value:d2e(e.datum.TotalCO2e,{selectedUnit:i})}]})}},{type:"bar",xKey:"Date",yKey:"Scope3CO2e",yName:"Scope 3 (".concat(i,"CO2e)"),stacked:!0,fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Scope 3 (".concat(i,"CO2e)"),value:d2e(e.datum.Scope3CO2e,{selectedUnit:i})},{label:"Scope 1 (".concat(i,"CO2e)"),value:d2e(e.datum.Scope1CO2e,{selectedUnit:i})},{label:"Scope 2 (".concat(i,"CO2e)"),value:d2e(e.datum.Scope2CO2e,{selectedUnit:i})},{label:"Total ".concat(i,"CO2e"),value:d2e(e.datum.TotalCO2e,{selectedUnit:i})}]})}}],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:h9e({position:"right"},m)}),[y,p,l,m,i]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon emissions by scope (".concat(i,"CO2e)"),loading:c,error:d,retry:u,noData:b,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},r?"exporting-pdf":void 0)};function T9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function O9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?T9e(Object(t),!0).forEach(function(n){k9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function k9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const j9e=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c,selectedUnit:d,doesSheetHavePeriodFilters:u}=J1e(),{data:p,loading:m,error:f,refetch:y}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:u?Vt.v7.Period:c,alias:"Period"}]}}}),g=null===(n=h2e(null==p?void 0:p.getDashboardTileData))||void 0===n?void 0:n.map(e=>O9e(O9e({},e),{},{Weight:o2e(e["Quantity(t)"],{originalUnit:"t",targetUnit:d}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),b=null==g||null===(t=g[0])||void 0===t?void 0:t.Weight,v=null==g||null===(a=g[1])||void 0===a?void 0:a.Weight,x=null==g||null===(r=g[0])||void 0===r?void 0:r.Date,T=null==g||null===(i=g[1])||void 0===i?void 0:i.Date,O=(Number.isNaN(b)||null===b)&&(Number.isNaN(v)||null===v);return(0,Ze.jsx)(F4e,{title:o.title||"Total waste generated (".concat(d,")"),loading:m,error:f,retry:y,noData:O,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:x}),(0,Ze.jsx)(e6e,{children:d2e(b,{selectedUnit:d})})]}),(0,Ze.jsx)(i6e,{value1:b,value2:v}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:T}),(0,Ze.jsx)(e6e,{children:d2e(v,{selectedUnit:d})})]})]})})};function C9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function S9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C9e(Object(t),!0).forEach(function(n){N9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):C9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function N9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const w9e=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c,selectedUnit:d,doesSheetHavePeriodFilters:u}=J1e(),{data:p,loading:m,error:f,refetch:y}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"CO2e(kg)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:u?Vt.v7.Period:c,alias:"Period"}]}}}),g=null===(n=h2e(null==p?void 0:p.getDashboardTileData))||void 0===n?void 0:n.map(e=>S9e(S9e({},e),{},{CO2e:o2e(e["CO2e(kg)"],{originalUnit:"kg",targetUnit:d}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),b=null==g||null===(t=g[0])||void 0===t?void 0:t.CO2e,v=null==g||null===(a=g[1])||void 0===a?void 0:a.CO2e,x=null==g||null===(r=g[0])||void 0===r?void 0:r.Date,T=null==g||null===(i=g[1])||void 0===i?void 0:i.Date,O=(Number.isNaN(b)||null===b)&&(Number.isNaN(v)||null===v);return(0,Ze.jsx)(F4e,{title:o.title||"Emitted carbon (".concat(d,"CO2e)"),loading:m,error:f,retry:y,noData:O,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:x}),(0,Ze.jsx)(e6e,{children:d2e(b,{selectedUnit:d})})]}),(0,Ze.jsx)(i6e,{value1:b,value2:v}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:T}),(0,Ze.jsx)(e6e,{children:d2e(v,{selectedUnit:d})})]})]})})};function D9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function A9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D9e(Object(t),!0).forEach(function(n){R9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function R9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const P9e=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c,withVat:d,doesSheetHavePeriodFilters:u}=J1e(),{data:p,loading:m,error:f,refetch:y}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:u?Vt.v7.Period:c,alias:"Period"}]}}}),g=null===(n=h2e(null==p?void 0:p.getDashboardTileData))||void 0===n?void 0:n.map(e=>A9e(A9e({},e),{},{"TotalCost(£)":o2e(e["TotalCost(£)"],{withVat:d}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),b=null==g||null===(t=g[0])||void 0===t?void 0:t["TotalCost(£)"],v=null==g||null===(a=g[1])||void 0===a?void 0:a["TotalCost(£)"],x=null==g||null===(r=g[0])||void 0===r?void 0:r.Date,T=null==g||null===(i=g[1])||void 0===i?void 0:i.Date,O=(Number.isNaN(b)||null===b)&&(Number.isNaN(v)||null===v);return(0,Ze.jsx)(F4e,{title:o.title||"Total cost (£) ".concat(d?"(VAT included)":"(VAT excluded)"),loading:m,error:f,retry:y,noData:O,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:x}),(0,Ze.jsx)(e6e,{children:d2e(b)})]}),(0,Ze.jsx)(i6e,{value1:b,value2:v}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:T}),(0,Ze.jsx)(e6e,{children:d2e(v)})]})]})})};function L9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function I9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L9e(Object(t),!0).forEach(function(n){E9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function E9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const _9e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,filters:s,partitionFunctionForYearComparison:c,withVat:d,selectedUnit:u}=J1e(),{data:p,loading:m,error:f,refetch:y}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum},{field:"Quantity(t)",aggregationType:Vt.DF.Sum},{field:"CO2e(kg)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:c},{field:"Country"},{field:"LocationName"}]}}}),b=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==p?void 0:p.getDashboardTileData))||void 0===e||null===(e=e.map(e=>I9e(I9e({},e),{},{Date:l2e(e.Year),Country:l2e(e.Country),LocationName:l2e(e.LocationName),TotalCost:o2e(e["TotalCost(£)"],{withVat:d}),Quantity:o2e(e["Quantity(t)"],{originalUnit:"t",targetUnit:u}),CO2e:o2e(e["CO2e(kg)"],{originalUnit:"kg",targetUnit:u})})))||void 0===e?void 0:e.sort((e,n)=>e.Date.localeCompare(n.Date))},[p,d,u]),v=Boolean(b&&0===b.length),x=(0,g.useMemo)(()=>[{headerName:"Country",field:"Country",rowGroup:!0,hide:!0},{headerName:"Location",field:"LocationName",rowGroup:!0,hide:!0},{headerName:"Year",field:"Date",pivot:!0},{headerName:"Cost (£) ".concat(m2e(d)),field:"TotalCost",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Waste (".concat(u,")"),field:"Quantity",aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:u})},{headerName:"Carbon (".concat(u,"CO2e)"),field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:u})}],[u,d]);return(0,g.useEffect)(()=>{var e;null===(e=r.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[s]),(0,Ze.jsx)(F4e,{title:n.title||"Annual figures per location",loading:m,error:f,retry:y,noData:v,ref:a,children:(0,Ze.jsx)(c6e,{pivotModeEnabled:!0,ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-AnnualWasteGenerationAndCostPerLocationTableTile"),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:x,rowData:b,pivotMode:!0}})})};function F9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function B9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F9e(Object(t),!0).forEach(function(n){U9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function U9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const M9e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,filters:i,selectedUnit:o}=J1e(),l=(0,g.useRef)(null),s=Y1e(l),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:m,legendTheme:y}=(0,f.useAgChartsTheme)(n.colors),b=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==c?void 0:c.getDashboardTileData))||void 0===e||null===(e=e.map(e=>B9e(B9e({},e),{},{Quantity:o2e(e["Quantity(t)"],{originalUnit:"t",targetUnit:o}),Date:s2e(e.Month)})).reduce((e,n)=>{const t=(0,$8e.m)(e),a=O1e(i.year1),r=k1e(i.year1),o=k1e(i.year2),l=Wt()(n.Date,"MMM YYYY").format("MMM"),s=Wt()(n.Date,"MMM YYYY").year()-(a===Ma.YearToCompareType.CALENDAR?0:Wt()(n.Date,"MMM YYYY").month()<4?1:0),c=t.findIndex(e=>e.Month===l&&null!==e.Year1Quantity);if(-1!==c)return t[c].Year2Quantity=Number(n.Quantity),t;const d=e.findIndex(e=>e.Month===l&&null!==e.Year2Quantity);return-1!==d?(t[d].Year1Quantity=Number(n.Quantity),t):[...t,B9e(B9e({},n),{},{Year1Quantity:s===r?Number(n.Quantity):null,Year2Quantity:s===o?Number(n.Quantity):null,Month:l})]},[]))||void 0===e?void 0:e.sort((e,n)=>O1e(i.year1)===Ma.YearToCompareType.CALENDAR?Wt()(e.Month,"MMM").toDate().getTime()-Wt()(n.Month,"MMM").toDate().getTime():j1e.indexOf(e.Month)-j1e.indexOf(n.Month))},[c,i.year1,i.year2,o]),v=Boolean(b&&0===b.length),x=(0,g.useMemo)(()=>({theme:m,width:s,data:b||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Month",yKey:"Year1Quantity",yName:"".concat(i.year1," Waste (").concat(o,")"),fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"".concat(i.year1," Waste (").concat(o,")"),value:d2e(e.datum.Year1Quantity,{selectedUnit:o})},{label:"".concat(i.year2," Waste (").concat(o,")"),value:d2e(e.datum.Year2Quantity,{selectedUnit:o})}]})}},{type:"bar",xKey:"Month",yKey:"Year2Quantity",yName:"".concat(i.year2," Waste (").concat(o,")"),fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"".concat(i.year2," Waste (").concat(o,")"),value:d2e(e.datum.Year2Quantity,{selectedUnit:o})},{label:"".concat(i.year1," Waste (").concat(o,")"),value:d2e(e.datum.Year1Quantity,{selectedUnit:o})}]})}}],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:B9e({position:"bottom"},y)}),[b,m,s,y,i.year1,i.year2,o]);return(0,Ze.jsx)(F4e,{title:n.title||"Monthly waste generation (".concat(o,")"),loading:d,error:u,retry:p,noData:v,ref:l,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:x})})},r?"exporting-pdf":void 0)};function V9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function z9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V9e(Object(t),!0).forEach(function(n){G9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function G9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const $9e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,selectedUnit:i,withVat:o}=J1e(),l=(0,g.useRef)(null),s=Y1e(l),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum},{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:m,legendTheme:y}=(0,f.useAgChartsTheme)(n.colors),b=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==c?void 0:c.getDashboardTileData))||void 0===e||null===(e=e.map(e=>z9e(z9e({},e),{},{Quantity:o2e(e["Quantity(t)"],{originalUnit:"t",targetUnit:i}),TotalCost:o2e(e["TotalCost(£)"],{withVat:o}),Date:s2e(e.Month)})))||void 0===e?void 0:e.sort(c2e)},[c,i,o]),v=Boolean(b&&0===b.length),x=(0,g.useMemo)(()=>({theme:m,legend:y,width:s,data:b||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"Quantity",yName:"Weight (".concat(i,")"),stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Weight (".concat(i,")"),value:d2e(e.datum.Quantity,{selectedUnit:i})}]})}},{type:"line",xKey:"Date",yKey:"TotalCost",yName:"Total cost (£) ".concat(m2e(o)),tooltip:{renderer:e=>({data:[{label:"Total cost (£) ".concat(m2e(o)),value:d2e(e.datum.TotalCost)}]})}}],axes:[{type:"number",position:"left",keys:["Quantity"],label:{formatter:e=>p2e(e.value)}},{type:"number",position:"right",keys:["TotalCost"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[b,m,s,y,i,o]);return(0,Ze.jsx)(F4e,{title:n.title||"Waste generation and cost over time (".concat(i,")"),loading:d,error:u,retry:p,noData:v,ref:l,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:x})})},r?"exporting-pdf":void 0)};function W9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function q9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?W9e(Object(t),!0).forEach(function(n){J9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function J9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Y9e=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,selectedUnit:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors),y=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==s?void 0:s.getDashboardTileData))||void 0===e||null===(e=e.map(e=>q9e(q9e({},e),{},{Quantity:o2e(e["Quantity(t)"],{originalUnit:"t",targetUnit:i}),Date:s2e(e.Month)})))||void 0===e?void 0:e.sort(c2e)},[s,i]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:p,legend:m,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"Quantity",yName:"Weight (".concat(i,")"),stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Weight (".concat(i,")"),value:d2e(e.datum.Quantity,{selectedUnit:i})}]})}}],axes:[{type:"number",position:"left",keys:["Quantity"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[y,p,l,m,i]);return(0,Ze.jsx)(F4e,{title:n.title||"Weight over time (".concat(i,")"),loading:c,error:d,retry:u,noData:b,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},r?"exporting-pdf":void 0)};function H9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function K9e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H9e(Object(t),!0).forEach(function(n){Q9e(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Q9e(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Z9e=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),{queryVariablesFilters:r,withVat:i}=J1e(),o=Y1e(a),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:r,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"WasteStream"}]}}}),{chartTheme:u,legendTheme:p}=(0,f.useAgChartsTheme)(n.colors),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==l?void 0:l.getDashboardTileData))||void 0===e?void 0:e.map(e=>K9e(K9e({},e),{},{Cost:o2e(e["TotalCost(£)"],{withVat:i})})).filter(e=>e.Cost>0)},[l,i]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>(null==m?void 0:m.reduce((e,n)=>e+Number(n.Cost),0))||1,[m]),v=(0,g.useMemo)(()=>({theme:u,legend:p,width:o,data:m||[],zoom:{enabled:!0},series:[{type:"pie",fillOpacity:1,angleKey:"Cost",calloutLabelKey:"WasteStream",sectorLabelKey:"Cost",sectorLabel:{color:"white",fontWeight:"bold",formatter:e=>{let{value:n}=e;return d2e(n,{percentageOverTotal:b})}},tooltip:{renderer:e=>({heading:"Cost %",title:e.datum.WasteStream,data:[{value:"".concat(d2e(e.datum.Cost,{percentageOverTotal:b})," (").concat(d2e(e.datum.Cost)," £)")}]})}}]}),[m,u,o,b,p]);return(0,Ze.jsx)(F4e,{title:n.title||"Cost % by waste stream ".concat(m2e(i)),loading:s,error:c,retry:d,noData:y,ref:a,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})})};function X9e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function een(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?X9e(Object(t),!0).forEach(function(n){nen(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X9e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function nen(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ten=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,withVat:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"WasteStream"}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors),y=(0,g.useMemo)(()=>{var e;return b2e(null===(e=h2e(null==s?void 0:s.getDashboardTileData))||void 0===e||null===(e=e.map(e=>een(een({},e),{},{Cost:o2e(e["TotalCost(£)"],{withVat:i}),Date:s2e(e.Month)})))||void 0===e?void 0:e.sort(c2e),["Date"],"WasteStream","Cost")},[s,i]),b=(0,g.useMemo)(()=>g2e(y,{excludeKeys:["Date"],removeSuffixFromLabels:"Cost",removePrefixFromLabels:"WasteStream"}),[y]),v=Boolean(y&&0===y.length),x=(0,g.useMemo)(()=>({theme:p,width:l,data:y||[],zoom:{enabled:!0},series:[...b.map(e=>{let{labelKey:n,valueKey:t}=e;return{type:"bar",xKey:"Date",yKey:t,yName:n,stacked:!0,fillOpacity:1,tooltip:{renderer:e=>{const a=Object.entries(e.datum).reduce((e,n)=>{let[t,a]=n;return"Date"!==t&&(e+=Number(a)),e},0);return{data:[{label:n,value:d2e(e.datum[t])},{label:"Total cost (£) ".concat(m2e(i)),value:d2e(a)}]}}}}})],axes:[{type:"number",position:"left",min:0,label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:een({position:"bottom"},m)}),[y,p,l,b,m,i]);return(0,Ze.jsx)(F4e,{title:n.title||"Cost by waste stream ".concat(i?"(VAT included)":"(VAT excluded)"),loading:c,error:d,retry:u,noData:v,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:x})})},r?"exporting-pdf":void 0)};function aen(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ren(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?aen(Object(t),!0).forEach(function(n){ien(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):aen(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ien(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const oen=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,selectedUnit:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"Quantity(t)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"WasteStream"}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors),y=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==s?void 0:s.getDashboardTileData))||void 0===n||null===(n=n.map(e=>ren(ren({},e),{},{Quantity:o2e(e["Quantity(t)"],{originalUnit:"t",targetUnit:i}),Date:s2e(e.Month),WasteStream:e.WasteStream})))||void 0===n?void 0:n.sort((e,n)=>e.WasteStream.toLowerCase().localeCompare(n.WasteStream.toLowerCase())),["Date"],"WasteStream","Quantity"))||void 0===e?void 0:e.sort(c2e)},[s,i]),b=(0,g.useMemo)(()=>g2e(y,{excludeKeys:["Date"],removeSuffixFromLabels:"Quantity",removePrefixFromLabels:"WasteStream"}),[y]),v=Boolean(y&&0===y.length),x=(0,g.useMemo)(()=>({theme:p,width:l,data:y||[],zoom:{enabled:!0},series:[...b.map(e=>{let{labelKey:n,valueKey:t}=e;return{type:"bar",xKey:"Date",yKey:t,yName:n,stacked:!0,fillOpacity:1,tooltip:{renderer:e=>{const a=Object.entries(e.datum).reduce((e,n)=>{let[t,a]=n;return"Date"!==t&&(e+=Number(a)),e},0);return{data:[{label:n,value:d2e(e.datum[t],{selectedUnit:i})},{label:"Total weight (".concat(i,")"),value:d2e(a,{selectedUnit:i})}]}}}}})],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:ren({position:"bottom"},m)}),[y,p,l,i,b,m]);return(0,Ze.jsx)(F4e,{title:n.title||"Weight by waste stream (".concat(i,")"),loading:c,error:d,retry:u,noData:v,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:x})})},r?"exporting-pdf":void 0)};function len(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function sen(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?len(Object(t),!0).forEach(function(n){cen(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):len(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function cen(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const den=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c,withVat:d,doesSheetHavePeriodFilters:u,selectedUnit:p}=J1e(),{data:m,loading:f,error:y,refetch:g}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WasteByLocationReport",aggregation:{functions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum},{field:"Quantity(t)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:u?Vt.v7.Period:c,alias:"Period"}]}}}),b=null===(n=h2e(null==m?void 0:m.getDashboardTileData))||void 0===n?void 0:n.map(e=>sen(sen({},e),{},{CostPerWeight:e["Quantity(t)"]?o2e(e["TotalCost(£)"],{withVat:d})/o2e(e["Quantity(t)"],{originalUnit:"t",targetUnit:p}):0,Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),v=null==b||null===(t=b[0])||void 0===t?void 0:t.CostPerWeight,x=null==b||null===(a=b[1])||void 0===a?void 0:a.CostPerWeight,T=null==b||null===(r=b[0])||void 0===r?void 0:r.Date,O=null==b||null===(i=b[1])||void 0===i?void 0:i.Date,k=(Number.isNaN(v)||null===v)&&(Number.isNaN(x)||null===x);return(0,Ze.jsx)(F4e,{title:o.title||"Cost per ".concat(p," (£) ").concat(d?"(VAT included)":"(VAT excluded)"),loading:f,error:y,retry:g,noData:k,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:T}),(0,Ze.jsx)(e6e,{children:d2e(v)})]}),(0,Ze.jsx)(i6e,{value1:v,value2:x}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:O}),(0,Ze.jsx)(e6e,{children:d2e(x)})]})]})})};function uen(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pen(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uen(Object(t),!0).forEach(function(n){men(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uen(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function men(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const fen=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),m=null===(n=h2e(null==c?void 0:c.getDashboardTileData))||void 0===n?void 0:n.map(e=>pen(pen({},e),{},{Quantity:o2e(e.Quantity),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),f=null==m||null===(t=m[0])||void 0===t?void 0:t.Quantity,y=null==m||null===(a=m[1])||void 0===a?void 0:a.Quantity,g=null==m||null===(r=m[0])||void 0===r?void 0:r.Date,b=null==m||null===(i=m[1])||void 0===i?void 0:i.Date,v=(Number.isNaN(f)||null===f)&&(Number.isNaN(y)||null===y);return(0,Ze.jsx)(F4e,{title:o.title||"Total consumption (kWh)",loading:d,error:u,retry:p,noData:v,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:g}),(0,Ze.jsx)(e6e,{children:d2e(f)})]}),(0,Ze.jsx)(i6e,{value1:f,value2:y}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]})]})})};function yen(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gen(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yen(Object(t),!0).forEach(function(n){ben(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yen(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ben(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const hen=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>gen(gen({},e),{},{TotalCost:o2e(e.TotalCost,{withVat:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.TotalCost,g=null==f||null===(a=f[1])||void 0===a?void 0:a.TotalCost,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total cost (£) ".concat(m2e(c)),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function ven(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xen(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ven(Object(t),!0).forEach(function(n){Ten(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ven(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ten(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Oen=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>xen(xen({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.CO2e,g=null==f||null===(a=f[1])||void 0===a?void 0:a.CO2e,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total location-based carbon (".concat(c,"CO2e)"),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function ken(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jen(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ken(Object(t),!0).forEach(function(n){Cen(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ken(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cen(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Sen=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"ElectricityByLocationReport",aggregation:{functions:[{field:"MarketCO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>jen(jen({},e),{},{MarketCO2e:o2e(e.MarketCO2e,{originalUnit:"kg",targetUnit:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.MarketCO2e,g=null==f||null===(a=f[1])||void 0===a?void 0:a.MarketCO2e,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total market-based carbon (".concat(c,"CO2e)"),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function Nen(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wen(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Nen(Object(t),!0).forEach(function(n){Den(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Nen(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Den(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Aen=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WasteHierarchyByLocationReport",aggregation:{functions:[{field:"DisposalValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],partitions:[{field:"IndividualCollectionDate",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>wen(wen({},e),{},{Percentage:o2e(e.DisposalValue,{percentageOverTotal:Number(e.Value)}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.Percentage,g=null==f||null===(a=f[1])||void 0===a?void 0:a.Percentage,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"% disposal",loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y,{selectedUnit:c})})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g,{selectedUnit:c})})]})]})})};function Ren(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Pen(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ren(Object(t),!0).forEach(function(n){Len(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ren(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Len(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Ien=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WasteHierarchyByLocationReport",aggregation:{functions:[{field:"RecyclingValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],partitions:[{field:"IndividualCollectionDate",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>Pen(Pen({},e),{},{Percentage:o2e(e.RecyclingValue,{percentageOverTotal:Number(e.Value)}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.Percentage,g=null==f||null===(a=f[1])||void 0===a?void 0:a.Percentage,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"% recycling",loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y,{selectedUnit:c})})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g,{selectedUnit:c})})]})]})})};function Een(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function _en(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Een(Object(t),!0).forEach(function(n){Fen(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Een(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Fen(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Ben=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r}=J1e(),i=(0,g.useRef)(null),o=Y1e(i),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WasteHierarchyByLocationReport",aggregation:{functions:[{field:"DisposalValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],partitions:[{field:"IndividualCollectionDate",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:u,legendTheme:p}=(0,f.useAgChartsTheme)(n.colors),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==l?void 0:l.getDashboardTileData))||void 0===e||null===(e=e.map(e=>_en(_en({},e),{},{Percentage:o2e(e.DisposalValue,{percentageOverTotal:Number(e.Value)}),Date:s2e(e.Month)})))||void 0===e?void 0:e.sort(c2e)},[l]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:u,legend:p,width:o,data:m||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"Percentage",yName:"% disposal",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"% disposal",value:"".concat(d2e(e.datum.Percentage),"%")}]})}}],axes:[{type:"number",position:"left",keys:["Percentage"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,u,o,p]);return(0,Ze.jsx)(F4e,{title:n.title||"% disposal over time",loading:s,error:c,retry:d,noData:y,ref:i,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},r?"exporting-pdf":void 0)};function Uen(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Men(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Uen(Object(t),!0).forEach(function(n){Ven(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Uen(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ven(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const zen=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r}=J1e(),i=(0,g.useRef)(null),o=Y1e(i),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WasteHierarchyByLocationReport",aggregation:{functions:[{field:"RecyclingValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],partitions:[{field:"IndividualCollectionDate",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:u,legendTheme:p}=(0,f.useAgChartsTheme)(n.colors),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==l?void 0:l.getDashboardTileData))||void 0===e||null===(e=e.map(e=>Men(Men({},e),{},{Percentage:o2e(e.RecyclingValue,{percentageOverTotal:Number(e.Value)}),Date:s2e(e.Month)})))||void 0===e?void 0:e.sort(c2e)},[l]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:u,legend:p,width:o,data:m||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"Percentage",yName:"% recycling",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"% recycling",value:"".concat(d2e(e.datum.Percentage),"%")}]})}}],axes:[{type:"number",position:"left",keys:["Percentage"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,u,o,p]);return(0,Ze.jsx)(F4e,{title:n.title||"% recycling over time",loading:s,error:c,retry:d,noData:y,ref:i,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},r?"exporting-pdf":void 0)};function Gen(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $en(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gen(Object(t),!0).forEach(function(n){Wen(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gen(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Wen(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const qen=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WasteHierarchyByLocationReport",aggregation:{functions:[{field:"ReuseValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],partitions:[{field:"IndividualCollectionDate",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>$en($en({},e),{},{Percentage:o2e(e.ReuseValue,{percentageOverTotal:Number(e.Value)}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.Percentage,g=null==f||null===(a=f[1])||void 0===a?void 0:a.Percentage,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"% reuse",loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y,{selectedUnit:c})})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g,{selectedUnit:c})})]})]})})};function Jen(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Yen(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Jen(Object(t),!0).forEach(function(n){Hen(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Jen(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Hen(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Ken=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WasteHierarchyByLocationReport",aggregation:{functions:[{field:"OtherRecoveryValue",aggregationType:Vt.DF.Sum},{field:"Value",aggregationType:Vt.DF.Sum}],partitions:[{field:"IndividualCollectionDate",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>Yen(Yen({},e),{},{Percentage:o2e(e.OtherRecoveryValue,{percentageOverTotal:Number(e.Value)}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.Percentage,g=null==f||null===(a=f[1])||void 0===a?void 0:a.Percentage,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"% other recovery",loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y,{selectedUnit:c})})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g,{selectedUnit:c})})]})]})})};function Qen(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Zen(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qen(Object(t),!0).forEach(function(n){Xen(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qen(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Xen(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const enn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"GasByLocationReport",aggregation:{functions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),m=null===(n=h2e(null==c?void 0:c.getDashboardTileData))||void 0===n?void 0:n.map(e=>Zen(Zen({},e),{},{Quantity:o2e(e["DailyQuantity(kWh)"]),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),f=null==m||null===(t=m[0])||void 0===t?void 0:t.Quantity,y=null==m||null===(a=m[1])||void 0===a?void 0:a.Quantity,g=null==m||null===(r=m[0])||void 0===r?void 0:r.Date,b=null==m||null===(i=m[1])||void 0===i?void 0:i.Date,v=(Number.isNaN(f)||null===f)&&(Number.isNaN(y)||null===y);return(0,Ze.jsx)(F4e,{title:o.title||"Total consumption (kWh)",loading:d,error:u,retry:p,noData:v,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:g}),(0,Ze.jsx)(e6e,{children:d2e(f)})]}),(0,Ze.jsx)(i6e,{value1:f,value2:y}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]})]})})};function nnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function tnn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nnn(Object(t),!0).forEach(function(n){ann(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ann(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const rnn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"GasByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>tnn(tnn({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.CO2e,g=null==f||null===(a=f[1])||void 0===a?void 0:a.CO2e,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total carbon (".concat(c,"CO2e)"),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function inn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function onn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?inn(Object(t),!0).forEach(function(n){lnn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):inn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function lnn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const snn=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,withVat:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"GasByLocationReport",aggregation:{functions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum},{field:"DailyCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Accuracy"}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors),y=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==s?void 0:s.getDashboardTileData))||void 0===n?void 0:n.map(e=>onn(onn({},e),{},{Quantity:o2e(e["DailyQuantity(kWh)"]),TotalCost:o2e(e["DailyCost(£)"],{withVat:i}),Date:s2e(e.Month),Accuracy:T2e(e.Accuracy)})),["Date"],"Accuracy","Quantity"))||void 0===e?void 0:e.sort(c2e)},[s,i]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:p,legend:m,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"AccuracyActualQuantity",yName:"Actual Quantity (kWh)",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Actual Quantity (kWh)",value:d2e(e.datum.AccuracyActualQuantity)},{label:"Estimated Quantity (kWh)",value:d2e(e.datum.AccuracyEstimatedQuantity)},{label:"Total Quantity (kWh)",value:d2e((e.datum.AccuracyActualQuantity||0)+(e.datum.AccuracyEstimatedQuantity||0))}]})}},{type:"bar",xKey:"Date",yKey:"AccuracyEstimatedQuantity",yName:"Estimated Quantity (kWh)",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Estimated Quantity (kWh)",value:d2e(e.datum.AccuracyEstimatedQuantity)},{label:"Actual Quantity (kWh)",value:d2e(e.datum.AccuracyActualQuantity)},{label:"Total Quantity (kWh)",value:d2e((e.datum.AccuracyActualQuantity||0)+(e.datum.AccuracyEstimatedQuantity||0))}]})}},{type:"line",xKey:"Date",yKey:"TotalCost",yName:"Cost (£)",tooltip:{renderer:e=>({data:[{label:"Cost (£)",value:d2e(e.datum.TotalCost)}]})}}],axes:[{type:"number",position:"left",keys:["AccuracyActualQuantity","AccuracyEstimatedQuantity"],label:{formatter:e=>p2e(e.value)}},{type:"number",position:"right",keys:["TotalCost"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[y,p,l,m]);return(0,Ze.jsx)(F4e,{title:n.title||"Gas cost and consumption (kWh) over time ".concat(m2e(i)),loading:c,error:d,retry:u,noData:b,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},r?"exporting-pdf":void 0)};function cnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dnn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cnn(Object(t),!0).forEach(function(n){unn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function unn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const pnn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"GasByLocationReport",aggregation:{functions:[{field:"DailyCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>dnn(dnn({},e),{},{TotalCost:o2e(e["DailyCost(£)"],{withVat:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.TotalCost,g=null==f||null===(a=f[1])||void 0===a?void 0:a.TotalCost,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total cost (£) ".concat(m2e(c)),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function mnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function fnn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mnn(Object(t),!0).forEach(function(n){ynn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ynn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const gnn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"GasByLocationReport",aggregation:{functions:[{field:"DailyQuantity(kWh)",aggregationType:Vt.DF.Sum},{field:"DailyCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>fnn(fnn({},e),{},{AverageChargePerKilowatt:Number(e["DailyQuantity(kWh)"])?o2e(String(Number(e["DailyCost(£)"])/(Number(e["DailyQuantity(kWh)"])*(c?1.2:1)))):0,Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.AverageChargePerKilowatt,g=null==f||null===(a=f[1])||void 0===a?void 0:a.AverageChargePerKilowatt,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Average charge per kWh (£) ".concat(m2e(c)),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function bnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function hnn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?bnn(Object(t),!0).forEach(function(n){vnn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function vnn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const xnn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"FuelByLocationReport",aggregation:{functions:[{field:"Quantity(kWh)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),m=null===(n=h2e(null==c?void 0:c.getDashboardTileData))||void 0===n?void 0:n.map(e=>hnn(hnn({},e),{},{Quantity:o2e(e.Quantity),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),f=null==m||null===(t=m[0])||void 0===t?void 0:t.Quantity,y=null==m||null===(a=m[1])||void 0===a?void 0:a.Quantity,g=null==m||null===(r=m[0])||void 0===r?void 0:r.Date,b=null==m||null===(i=m[1])||void 0===i?void 0:i.Date,v=(Number.isNaN(f)||null===f)&&(Number.isNaN(y)||null===y);return(0,Ze.jsx)(F4e,{title:o.title||"Total consumption (kWh)",loading:d,error:u,retry:p,noData:v,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:g}),(0,Ze.jsx)(e6e,{children:d2e(f)})]}),(0,Ze.jsx)(i6e,{value1:f,value2:y}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]})]})})};function Tnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Onn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tnn(Object(t),!0).forEach(function(n){knn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function knn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const jnn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"FuelByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>Onn(Onn({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.CO2e,g=null==f||null===(a=f[1])||void 0===a?void 0:a.CO2e,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total carbon (".concat(c,"CO2e)"),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function Cnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Snn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Cnn(Object(t),!0).forEach(function(n){Nnn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Cnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Nnn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const wnn=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,withVat:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"FuelByLocationReport",aggregation:{functions:[{field:"Quantity(kWh)",aggregationType:Vt.DF.Sum},{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors),y=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==s?void 0:s.getDashboardTileData))||void 0===e?void 0:e.map(e=>Snn(Snn({},e),{},{Quantity:o2e(e["Quantity(kWh)"]),TotalCost:o2e(e["TotalCost(£)"],{withVat:i}),Date:s2e(e.Month)}))},[s,i]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:p,legend:m,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"Quantity",yName:"Consumption (kWh)",stacked:!0,fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Consumption (kWh)",value:d2e(e.datum.Quantity)}]})}},{type:"line",xKey:"Date",yKey:"TotalCost",yName:"Cost (£)",tooltip:{renderer:e=>({data:[{label:"Cost (£)",value:d2e(e.datum.TotalCost)}]})}}],axes:[{type:"number",position:"left",keys:["Quantity"],label:{formatter:e=>p2e(e.value)}},{type:"number",position:"right",keys:["TotalCost"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[y,p,l,m]);return(0,Ze.jsx)(F4e,{title:n.title||"Fuel cost and consumption (kWh) over time ".concat(m2e(i)),loading:c,error:d,retry:u,noData:b,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},r?"exporting-pdf":void 0)};function Dnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ann(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dnn(Object(t),!0).forEach(function(n){Rnn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Rnn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Pnn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"FuelByLocationReport",aggregation:{functions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>Ann(Ann({},e),{},{TotalCost:o2e(e["TotalCost(£)"],{withVat:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.TotalCost,g=null==f||null===(a=f[1])||void 0===a?void 0:a.TotalCost,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total cost (£) ".concat(m2e(c)),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function Lnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Inn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Lnn(Object(t),!0).forEach(function(n){Enn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Lnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Enn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const _nn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"FuelByLocationReport",aggregation:{functions:[{field:"Quantity(kWh)",aggregationType:Vt.DF.Sum},{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>Inn(Inn({},e),{},{AverageChargePerKilowatt:Number(e["Quantity(kWh)"])?o2e(String(Number(e["TotalCost(£)"])/(Number(e["Quantity(kWh)"])*(c?1.2:1)))):0,Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.AverageChargePerKilowatt,g=null==f||null===(a=f[1])||void 0===a?void 0:a.AverageChargePerKilowatt,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Average charge per kWh (£) ".concat(m2e(c)),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function Fnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Bnn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fnn(Object(t),!0).forEach(function(n){Unn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Unn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Mnn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s}=J1e(),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),m=null===(n=h2e(null==c?void 0:c.getDashboardTileData))||void 0===n?void 0:n.map(e=>Bnn(Bnn({},e),{},{Quantity:o2e(e.Quantity),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),f=null==m||null===(t=m[0])||void 0===t?void 0:t.Quantity,y=null==m||null===(a=m[1])||void 0===a?void 0:a.Quantity,g=null==m||null===(r=m[0])||void 0===r?void 0:r.Date,b=null==m||null===(i=m[1])||void 0===i?void 0:i.Date,v=(Number.isNaN(f)||null===f)&&(Number.isNaN(y)||null===y);return(0,Ze.jsx)(F4e,{title:o.title||"Total consumption (m³)",loading:d,error:u,retry:p,noData:v,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:g}),(0,Ze.jsx)(e6e,{children:d2e(f)})]}),(0,Ze.jsx)(i6e,{value1:f,value2:y}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]})]})})};function Vnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function znn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Vnn(Object(t),!0).forEach(function(n){Gnn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Vnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Gnn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const $nn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>znn(znn({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.CO2e,g=null==f||null===(a=f[1])||void 0===a?void 0:a.CO2e,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total carbon (".concat(c,"CO2e)"),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function Wnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function qnn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Wnn(Object(t),!0).forEach(function(n){Jnn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Wnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Jnn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Ynn=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,withVat:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"Quantity",aggregationType:Vt.DF.Sum},{field:"TotalCost",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Accuracy"}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors),y=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==s?void 0:s.getDashboardTileData))||void 0===n?void 0:n.map(e=>qnn(qnn({},e),{},{Quantity:o2e(e.Quantity),TotalCost:o2e(e.TotalCost,{withVat:i}),Date:s2e(e.Month),Accuracy:T2e(e.Accuracy)})),["Date"],"Accuracy","Quantity"))||void 0===e?void 0:e.sort(c2e)},[s,i]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:p,legend:m,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"AccuracyActualQuantity",yName:"Actual Quantity (m3)",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Actual Quantity (m3)",value:d2e(e.datum.AccuracyActualQuantity)},{label:"Estimated Quantity (m3)",value:d2e(e.datum.AccuracyEstimatedQuantity)},{label:"Total Quantity (m3)",value:d2e((e.datum.AccuracyActualQuantity||0)+(e.datum.AccuracyEstimatedQuantity||0))}]})}},{type:"bar",xKey:"Date",yKey:"AccuracyEstimatedQuantity",yName:"Estimated Quantity (m3)",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Estimated Quantity (m3)",value:d2e(e.datum.AccuracyEstimatedQuantity)},{label:"Actual Quantity (m3)",value:d2e(e.datum.AccuracyActualQuantity)},{label:"Total Quantity (m3)",value:d2e((e.datum.AccuracyActualQuantity||0)+(e.datum.AccuracyEstimatedQuantity||0))}]})}},{type:"line",xKey:"Date",yKey:"TotalCost",yName:"Cost (£)",tooltip:{renderer:e=>({data:[{label:"Cost (£)",value:d2e(e.datum.TotalCost)}]})}}],axes:[{type:"number",position:"left",keys:["AccuracyActualQuantity","AccuracyEstimatedQuantity"],label:{formatter:e=>p2e(e.value)}},{type:"number",position:"right",keys:["TotalCost"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[y,p,l,m]);return(0,Ze.jsx)(F4e,{title:n.title||"Water cost and consumption (m3) over time ".concat(m2e(i)),loading:c,error:d,retry:u,noData:b,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},r?"exporting-pdf":void 0)};function Hnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Knn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Hnn(Object(t),!0).forEach(function(n){Qnn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Qnn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Znn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>Knn(Knn({},e),{},{TotalCost:o2e(e.TotalCost,{withVat:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.TotalCost,g=null==f||null===(a=f[1])||void 0===a?void 0:a.TotalCost,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total cost (£) ".concat(m2e(c)),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function Xnn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function etn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Xnn(Object(t),!0).forEach(function(n){ntn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xnn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ntn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ttn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"TotalCost",aggregationType:Vt.DF.Sum},{field:"Quantity",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>etn(etn({},e),{},{AverageCostPerM3:Number(e.Quantity)?o2e(String(Number(e.TotalCost)/(Number(e.Quantity)*(c?1.2:1)))):0,Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.AverageCostPerM3,g=null==f||null===(a=f[1])||void 0===a?void 0:a.AverageCostPerM3,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Average cost per m3 (£) ".concat(m2e(c)),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function atn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function rtn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?atn(Object(t),!0).forEach(function(n){itn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):atn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function itn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const otn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"MaterialByLocationReport",aggregation:{functions:[{field:"Weight",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>rtn(rtn({},e),{},{Weight:o2e(e.Weight,{originalUnit:"kg",targetUnit:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.Weight,g=null==f||null===(a=f[1])||void 0===a?void 0:a.Weight,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total weight (".concat(c,")"),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function ltn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function stn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ltn(Object(t),!0).forEach(function(n){ctn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ltn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ctn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const dtn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"MaterialByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>stn(stn({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.CO2e,g=null==f||null===(a=f[1])||void 0===a?void 0:a.CO2e,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total carbon (".concat(c,"CO2e)"),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function utn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ptn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?utn(Object(t),!0).forEach(function(n){mtn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):utn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mtn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ftn=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,withVat:i,selectedUnit:o}=J1e(),l=(0,g.useRef)(null),s=Y1e(l),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"MaterialByLocationReport",aggregation:{functions:[{field:"Weight",aggregationType:Vt.DF.Sum},{field:"TotalCost",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Accuracy"}]}}}),{chartTheme:m,legendTheme:y}=(0,f.useAgChartsTheme)(n.colors),b=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==c?void 0:c.getDashboardTileData))||void 0===n?void 0:n.map(e=>ptn(ptn({},e),{},{Quantity:o2e(e.Quantity,{originalUnit:"kg",targetUnit:o}),TotalCost:o2e(e.TotalCost,{withVat:i}),Date:s2e(e.Month),Accuracy:T2e(e.Accuracy)})),["Date"],"Accuracy","Quantity"))||void 0===e?void 0:e.sort(c2e)},[c,o,i]),v=Boolean(b&&0===b.length),x=(0,g.useMemo)(()=>({theme:m,legend:y,width:s,data:b||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"AccuracyActualQuantity",yName:"Actual Weight (kg)",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Actual Weight (".concat(o,")"),value:d2e(e.datum.AccuracyActualQuantity)},{label:"Estimated Weight (".concat(o,")"),value:d2e(e.datum.AccuracyEstimatedQuantity)},{label:"Total Weight (".concat(o,")"),value:d2e((e.datum.AccuracyActualQuantity||0)+(e.datum.AccuracyEstimatedQuantity||0))}]})}},{type:"bar",xKey:"Date",yKey:"AccuracyEstimatedQuantity",yName:"Estimated Weight (".concat(o,")"),stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Estimated Weight (".concat(o,")"),value:d2e(e.datum.AccuracyEstimatedQuantity)},{label:"Actual Weight (".concat(o,")"),value:d2e(e.datum.AccuracyActualQuantity)},{label:"Total Weight (".concat(o,")"),value:d2e((e.datum.AccuracyActualQuantity||0)+(e.datum.AccuracyEstimatedQuantity||0))}]})}},{type:"line",xKey:"Date",yKey:"TotalCost",yName:"Cost (£)",tooltip:{renderer:e=>({data:[{label:"Cost (£)",value:d2e(e.datum.TotalCost)}]})}}],axes:[{type:"number",position:"left",keys:["AccuracyActualQuantity","AccuracyEstimatedQuantity"],label:{formatter:e=>p2e(e.value)}},{type:"number",position:"right",keys:["TotalCost"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[b,m,s,y,o]);return(0,Ze.jsx)(F4e,{title:n.title||"Material weight (".concat(o,") and cost (£) ").concat(m2e(i)," over time"),loading:d,error:u,retry:p,noData:v,ref:l,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:x})})},r?"exporting-pdf":void 0)};function ytn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gtn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ytn(Object(t),!0).forEach(function(n){btn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ytn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function btn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const htn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"MaterialByLocationReport",aggregation:{functions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>gtn(gtn({},e),{},{TotalCost:o2e(e.TotalCost,{withVat:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.TotalCost,g=null==f||null===(a=f[1])||void 0===a?void 0:a.TotalCost,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total cost (£) ".concat(m2e(c)),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function vtn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xtn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vtn(Object(t),!0).forEach(function(n){Ttn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vtn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ttn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Otn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c,selectedUnit:d}=J1e(),{data:u,loading:p,error:m,refetch:f}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"MaterialByLocationReport",aggregation:{functions:[{field:"TotalCost",aggregationType:Vt.DF.Sum},{field:"Weight",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),y=null===(n=h2e(null==u?void 0:u.getDashboardTileData))||void 0===n?void 0:n.map(e=>xtn(xtn({},e),{},{CostPerWeight:o2e(String(Number(e.Weight)?o2e(String(Number(e.TotalCost)*(c?1.2:1)/(Number(e.Weight)*("kg"===d?1:1e3)))):0)),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),g=null==y||null===(t=y[0])||void 0===t?void 0:t.CostPerWeight,b=null==y||null===(a=y[1])||void 0===a?void 0:a.CostPerWeight,v=null==y||null===(r=y[0])||void 0===r?void 0:r.Date,x=null==y||null===(i=y[1])||void 0===i?void 0:i.Date,T=(Number.isNaN(g)||null===g)&&(Number.isNaN(b)||null===b);return(0,Ze.jsx)(F4e,{title:o.title||"Cost (£) ".concat(m2e(c)," per ").concat(d," by location"),loading:p,error:m,retry:f,noData:T,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]}),(0,Ze.jsx)(i6e,{value1:g,value2:b}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:x}),(0,Ze.jsx)(e6e,{children:d2e(b)})]})]})})};function ktn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jtn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ktn(Object(t),!0).forEach(function(n){Ctn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ktn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ctn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Stn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,selectedUnit:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"TransportByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>jtn(jtn({},e),{},{CO2e:o2e(e.CO2e,{originalUnit:"kg",targetUnit:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.CO2e,g=null==f||null===(a=f[1])||void 0===a?void 0:a.CO2e,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total carbon (".concat(c,"CO2e)"),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function Ntn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wtn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ntn(Object(t),!0).forEach(function(n){Dtn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ntn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Dtn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Atn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,withVat:c}=J1e(),{data:d,loading:u,error:p,refetch:m}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"TransportByLocationReport",aggregation:{functions:[{field:"TotalCost(£)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Period,alias:"Period"}]}}}),f=null===(n=h2e(null==d?void 0:d.getDashboardTileData))||void 0===n?void 0:n.map(e=>wtn(wtn({},e),{},{TotalCost:o2e(e["TotalCost(£)"],{withVat:c}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),y=null==f||null===(t=f[0])||void 0===t?void 0:t.TotalCost,g=null==f||null===(a=f[1])||void 0===a?void 0:a.TotalCost,b=null==f||null===(r=f[0])||void 0===r?void 0:r.Date,v=null==f||null===(i=f[1])||void 0===i?void 0:i.Date,x=(Number.isNaN(y)||null===y)&&(Number.isNaN(g)||null===g);return(0,Ze.jsx)(F4e,{title:o.title||"Total cost (£) ".concat(m2e(c)),loading:u,error:p,retry:m,noData:x,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:b}),(0,Ze.jsx)(e6e,{children:d2e(y)})]}),(0,Ze.jsx)(i6e,{value1:y,value2:g}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]})]})})};function Rtn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ptn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Rtn(Object(t),!0).forEach(function(n){Ltn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Rtn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ltn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Itn=(0,f.styled)("div")({width:"100%",height:"100%","& .ag-header-group-cell-label":{justifyContent:"center"},"& .ag-header-cell, & .ag-header-group-cell":{borderLeft:"1px solid var(--ag-border-color, #babfc7)",borderRight:"1px solid var(--ag-border-color, #babfc7)"}}),Etn={locationName:"locationStatus",tenure:"tenureStatus",floorSpace:"floorSpaceStatus",occupationStartDate:"occupationStartDateStatus",occupationBreakDate:"occupationBreakDateStatus",occupationEndDate:"occupationEndDateStatus",facilitiesCondition:"facilitiesConditionStatus",facilitiesStatComp:"facilitiesStatCompStatus",facilitiesEpc:"facilitiesEpcStatus",facilitiesGovSystem:"facilitiesGovSystemStatus",locationYearPropertyMilestone:"locationYearPropertyMilestoneStatus",estateChange:"estateChangeStatus",desnzEntityHeadcountDesnz:"desnzEntityHeadcountDesnzStatus",desnzEntityHeadcountIcs:"desnzEntityHeadcountIcsStatus",desnzEntityHeadcountGbe:"desnzEntityHeadcountGbeStatus",desnzEntityHeadcountSeahorse:"desnzEntityHeadcountSeahorseStatus",dsitEntityHeadcountDsit:"dsitEntityHeadcountDsitStatus",dsitEntityHeadcountUksa:"dsitEntityHeadcountUksaStatus",totalHeadcountTotal:"totalHeadcountTotalStatus",totalHeadcountFacilitated:"totalHeadcountFacilitatedStatus",totalHeadcountVoid:"totalHeadcountVoidStatus",itEnabledWorkSettingsRequired:"itEnabledWorkSettingsRequiredStatus",itEnabledWorkSettingsFacilitated:"itEnabledWorkSettingsFacilitatedStatus",itEnabledWorkSettingsVoid:"itEnabledWorkSettingsVoidStatus",officeAttendanceFacilitated:"officeAttendanceFacilitatedStatus",officeAttendanceActual:"officeAttendanceActualStatus",runningCostRent:"runningCostRentStatus",runningCostNonRent:"runningCostNonRentStatus",runningCostTotal:"runningCostTotalStatus",runningCostPerDesk:"runningCostPerDeskStatus",runningCostPerHeadcount:"runningCostPerHeadcountStatus",source:"sourceStatus",capitalInvestmentCostFitOut:"capitalInvestmentCostFitOutStatus",dilaps:"dilapsStatus",runningCostPerEntityDesnzRent:"runningCostPerEntityDesnzRentStatus",runningCostPerEntityDesnzNonRent:"runningCostPerEntityDesnzNonRentStatus",runningCostPerEntityDesnzTotal:"runningCostPerEntityDesnzTotalStatus",runningCostPerEntityIcsRent:"runningCostPerEntityIcsRentStatus",runningCostPerEntityIcsNonRent:"runningCostPerEntityIcsNonRentStatus",runningCostPerEntityIcsTotal:"runningCostPerEntityIcsTotalStatus",runningCostPerEntityGbeRent:"runningCostPerEntityGbeRentStatus",runningCostPerEntityGbeNonRent:"runningCostPerEntityGbeNonRentStatus",runningCostPerEntityGbeTotal:"runningCostPerEntityGbeTotalStatus",runningCostPerEntitySeahorseRent:"runningCostPerEntitySeahorseRentStatus",runningCostPerEntitySeahorseNonRent:"runningCostPerEntitySeahorseNonRentStatus",runningCostPerEntitySeahorseTotal:"runningCostPerEntitySeahorseTotalStatus",runningCostPerEntityDsitRent:"runningCostPerEntityDsitRentStatus",runningCostPerEntityDsitNonRent:"runningCostPerEntityDsitNonRentStatus",runningCostPerEntityDsitTotal:"runningCostPerEntityDsitTotalStatus",runningCostPerEntityUksaRent:"runningCostPerEntityUksaRentStatus",runningCostPerEntityUksaNonRent:"runningCostPerEntityUksaNonRentStatus",runningCostPerEntityUksaTotal:"runningCostPerEntityUksaTotalStatus",runningCostPerEntityTotalCheck:"runningCostPerEntityTotalCheckStatus"},_tn=new Set(["city","locationYearPropertyMilestone","locationName"]),Ftn=new Set(["tenure","occupationStartDate","occupationBreakDate","occupationEndDate","floorSpace","facilitiesCondition","facilitiesStatComp","facilitiesEpc","facilitiesGovSystem","estateChange"]),Btn=(e,n,t,a)=>{const r=n[e],i=Ftn.has(e),o=t=>t[e]===r&&(!i||t.locationId===n.locationId),l=a.getRenderedNodes();let s=!0;if(t>0){const e=l.find(e=>e.rowIndex===t-1);null!=e&&e.data&&o(e.data)&&(s=!1)}let c=1;if(s)for(let e=t+1;e<l.length;e++){const n=l.find(n=>n.rowIndex===e);if(null==n||!n.data||!o(n.data))break;c++}return{isFirstInGroup:s,span:c}},Utn=e=>{const n=e.value;if(null==n||""===n)return"N/A";const t=new Date(n);if(isNaN(t.getTime()))return n;const a=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return"".concat(a,"/").concat(r,"/").concat(i)},Mtn=e=>{const n=e.value;return null==n||""===n||isNaN(Number(n))?"N/A":"".concat(Number(n),"%")},Vtn=e=>{const n=e.value;return null==n||""===n||isNaN(Number(n))?"N/A":new Intl.NumberFormat("en-GB",{style:"currency",currency:"GBP",maximumFractionDigits:0}).format(Number(n))},ztn=(e,n,t)=>{const a=Etn[e],r="Total"===n||n.includes("Total"),i=_tn.has(e)||Ftn.has(e),o=a?((e,n)=>t=>{var a;const r=null===(a=t.data)||void 0===a?void 0:a[e],i=n?{fontWeight:"bold"}:{};return"Estimated"===r?Ptn(Ptn({},i),{},{color:"#D32F2F"}):"Current"===r?Ptn(Ptn({},i),{},{color:"#388E3C"}):Object.keys(i).length>0?i:null})(a,r):r?()=>({fontWeight:"bold"}):null,l={field:e,headerName:n};return i?(l.rowSpan=(e=>n=>{var t,a;if(!n.data)return 1;const{isFirstInGroup:r,span:i}=Btn(e,n.data,null!==(t=null===(a=n.node)||void 0===a?void 0:a.rowIndex)&&void 0!==t?t:0,n.api);return r?i:1})(e),l.cellStyle=((e,n)=>t=>{var a,r,i;if(!t.data)return;const{isFirstInGroup:o}=Btn(e,t.data,null!==(a=null===(r=t.node)||void 0===r?void 0:r.rowIndex)&&void 0!==a?a:0,t.api);return o?Ptn({display:"flex",alignItems:"center",borderTop:"1px solid var(--ag-border-color, #babfc7)",borderBottom:"1px solid var(--ag-border-color, #babfc7)",borderRight:"1px solid var(--ag-border-color, #babfc7)",backgroundColor:"#fff"},null!==(i=null==n?void 0:n(t))&&void 0!==i?i:{}):{color:"transparent",borderTop:"none",borderBottom:"none",borderRight:"1px solid var(--ag-border-color, #babfc7)"}})(e,o)):o&&(l.cellStyle=o),Ptn(Ptn({},l),t)},Gtn=(e,n)=>{var t,a;const r=(null!==(t=e.city)&&void 0!==t?t:"").toLowerCase(),i=(null!==(a=n.city)&&void 0!==a?a:"").toLowerCase();return r<i?-1:r>i?1:(Number(e.forecastYear)||0)-(Number(n.forecastYear)||0)},$tn=()=>{const e=rt(),{data:n}=(0,h.IT)(Obe,{variables:{accountId:e},skip:!e,fetchPolicy:"cache-and-network"}),t=(0,g.useMemo)(()=>{var e,t;const a=null!==(e=null==n||null===(t=n.getEstatesConfiguration)||void 0===t?void 0:t.rows)&&void 0!==e?e:[],r=new Date,i=r.getFullYear(),o=r.getMonth()<3?i-1:i,l=a.filter(e=>{const n=Number(e.forecastYear);return!isNaN(n)&&n>=o}),s=l.reduce((e,n)=>{const t=Number(n.forecastYear);return!isNaN(t)&&t<e?t:e},1/0);return l.map(e=>Number(e.forecastYear)===s?Ptn(Ptn({},e),{},{locationYearPropertyMilestone:"Current"}):e)},[n]),a=(0,g.useMemo)(()=>{return[{headerName:"Location, year and property",children:[ztn("city","City",{pinned:"left",sort:"asc",sortIndex:0,sortable:!1,filter:!0,wrapText:!0,autoHeight:!0}),ztn("locationYearPropertyMilestone","Milestone",{pinned:"left"}),ztn("locationName","Location Name",{pinned:"left"}),ztn("forecastYear","Forecast Year",{hide:!0,sort:"asc",sortIndex:1})]},{headerName:"Licence",children:[ztn("tenure","Landlord"),ztn("occupationStartDate","Start",{valueFormatter:Utn}),ztn("occupationBreakDate","Break",{valueFormatter:Utn}),ztn("occupationEndDate","End",{valueFormatter:Utn})]},{headerName:"Facilities",children:[ztn("floorSpace","msq"),ztn("facilitiesCondition","Condition"),ztn("facilitiesStatComp","Stat Comp",{valueFormatter:Mtn}),ztn("facilitiesEpc","EPC"),ztn("facilitiesGovSystem","Gov System")]},ztn("estateChange","Estate Change"),{headerName:"DESNZ Entity Headcount",children:[ztn("desnzEntityHeadcountDesnz","DESNZ"),ztn("desnzEntityHeadcountIcs","ICS"),ztn("desnzEntityHeadcountGbe","GBE"),ztn("desnzEntityHeadcountSeahorse","Seahorse")]},{headerName:"DSIT Entity Headcount",children:[ztn("dsitEntityHeadcountDsit","DSIT"),ztn("dsitEntityHeadcountUksa","UKSA")]},{headerName:"Total Headcount",children:[ztn("totalHeadcountTotal","Total"),ztn("totalHeadcountFacilitated","Facilitated"),ztn("totalHeadcountVoid","Void")]},{headerName:"IT Enabled Work Settings",children:[ztn("itEnabledWorkSettingsRequired","Required"),ztn("itEnabledWorkSettingsFacilitated","Facilitated"),ztn("itEnabledWorkSettingsVoid","Void")]},{headerName:"Office Attendance",children:[ztn("officeAttendanceFacilitated","Facilitated"),ztn("officeAttendanceActual","Actual",{cellStyle:(e="officeAttendanceActualStatus",n=>{var t,a;const r=null===(t=n.data)||void 0===t?void 0:t[e],i=null===(a=n.data)||void 0===a?void 0:a.officeAttendanceActual,o={};return"Estimated"===r?o.color="#D32F2F":"Current"===r&&(o.color="#388E3C"),null==i||isNaN(Number(i))||(o.backgroundColor=((e,n,t,a,r,i,o)=>{const l=Math.max(30,Math.min(40,e));let s,c,d;if(l<=35){const e=(l-30)/5;s=Math.round(r[0]+e*(i[0]-r[0])),c=Math.round(r[1]+e*(i[1]-r[1])),d=Math.round(r[2]+e*(i[2]-r[2]))}else{const e=(l-35)/5;s=Math.round(i[0]+e*(o[0]-i[0])),c=Math.round(i[1]+e*(o[1]-i[1])),d=Math.round(i[2]+e*(o[2]-i[2]))}return"rgba(".concat(s,",").concat(c,",").concat(d,",0.4)")})(Number(i),0,0,0,[248,105,107],[255,235,132],[99,190,123])),Object.keys(o).length>0?o:null}),valueFormatter:Mtn})]},{headerName:"Running Costs",children:[ztn("runningCostRent","Rent",{valueFormatter:Vtn}),ztn("runningCostNonRent","Non-Rent",{valueFormatter:Vtn}),ztn("runningCostTotal","Total",{valueFormatter:Vtn}),ztn("runningCostPerDesk","Per Desk",{valueFormatter:Vtn}),ztn("runningCostPerHeadcount","Per Headcount",{valueFormatter:Vtn})]},ztn("source","Source"),{headerName:"Capital Investment",children:[ztn("capitalInvestmentCostFitOut","Fit Out",{valueFormatter:Vtn}),ztn("dilaps","Dilaps",{valueFormatter:Vtn})]},{headerName:"Running cost per entity based on headcount",children:[{headerName:"DESNZ",children:[ztn("runningCostPerEntityDesnzRent","Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntityDesnzNonRent","Non-Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntityDesnzTotal","Total",{valueFormatter:Vtn})]},{headerName:"ICS",children:[ztn("runningCostPerEntityIcsRent","Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntityIcsNonRent","Non-Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntityIcsTotal","Total",{valueFormatter:Vtn})]},{headerName:"GBE",children:[ztn("runningCostPerEntityGbeRent","Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntityGbeNonRent","Non-Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntityGbeTotal","Total",{valueFormatter:Vtn})]},{headerName:"Seahorse",children:[ztn("runningCostPerEntitySeahorseRent","Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntitySeahorseNonRent","Non-Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntitySeahorseTotal","Total",{valueFormatter:Vtn})]},{headerName:"DSIT",children:[ztn("runningCostPerEntityDsitRent","Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntityDsitNonRent","Non-Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntityDsitTotal","Total",{valueFormatter:Vtn})]},{headerName:"UKSA",children:[ztn("runningCostPerEntityUksaRent","Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntityUksaNonRent","Non-Rent",{valueFormatter:Vtn}),ztn("runningCostPerEntityUksaTotal","Total",{valueFormatter:Vtn})]},ztn("runningCostPerEntityTotalCheck","Total Check",{valueFormatter:Vtn})]},ztn("notes","Notes",{tooltipField:"notes"})];var e},[]),r=(0,g.useCallback)(()=>(e=>{const{rowData:n,columnDefs:t,fileName:a="Export",sheetName:r="Sheet1",sortComparator:i,mergeConfigs:o}=e,l=zr(t),s=(e=>{const n={},t=e=>{for(const a of e)if("children"in a&&a.children)t(a.children);else{const e=a;e.field&&e.valueFormatter&&(n[e.field]=e.valueFormatter)}};return t(e),n})(t),c=i?[...n].sort(i):n,d=l.reduce((e,n)=>Math.max(e,n.groups.length),0),u=[];for(let e=0;e<d;e++)u.push(l.map(n=>{var t;return null!==(t=n.groups[e])&&void 0!==t?t:""}));u.push(l.map(e=>e.headerName));const p=c.map(e=>l.map(n=>{const t=e[n.field],a=s[n.field];return null==t||""===t?"N/A":"function"==typeof a?a({value:t}):t})),m=[...u,...p],f=Lr.Wp.aoa_to_sheet(m),y=[];for(let e=0;e<d;e++){const n=u[e];let t=0;for(;t<n.length;){const a=n[t];if(!a){t++;continue}let r=t;for(;r+1<n.length&&n[r+1]===a;)r++;r>t&&y.push({s:{r:e,c:t},e:{r:e,c:r}}),t=r+1}}if(o){const e=u.length,n=new Map;for(const e of o)for(const t of e.fields)n.set(t,e.groupByField);for(let t=0;t<l.length;t++){const{field:a}=l[t];if(!n.has(a))continue;const r=n.get(a);let i=0;for(;i<c.length;){const n=c[i],o=n[a];let l=i;for(;l+1<c.length;){const e=c[l+1];if(e[a]!==o)break;if(r&&e[r]!==n[r])break;l++}l>i&&y.push({s:{r:e+i,c:t},e:{r:e+l,c:t}}),i=l+1}}}f["!merges"]=y;const g=Lr.Wp.book_new();Lr.Wp.book_append_sheet(g,f,r),(0,Lr._h)(g,"".concat(a,".xlsx"))})({rowData:t,columnDefs:a,fileName:"Estates Report",sheetName:"Estates Report",sortComparator:Gtn,mergeConfigs:[{fields:_tn},{fields:Ftn,groupByField:"locationId"}]}),[t,a]),i=(0,g.useMemo)(()=>({columnDefs:a,rowData:t,suppressRowTransform:!0,autoSizeStrategy:{type:"fitCellContents"},enableBrowserTooltips:!0,defaultColDef:{sortable:!1,resizable:!0,filter:!1,valueFormatter:e=>null==e.value||""===e.value?"N/A":e.value}}),[a,t]);return(0,Ze.jsx)(Itn,{children:(0,Ze.jsx)(F4e,{title:"Estates",enableFullscreen:!0,onExport:r,children:(0,Ze.jsx)(c6e,{gridKey:"estates-report-grid",gridOptions:i})})})},Wtn=(0,f.styled)(f.Text)({padding:"80px 0 0 0",marginBottom:"-15px"}),qtn=e=>{let{tile:n}=e;return(0,Ze.jsx)(Wtn,{typescale:"headline",size:"medium",children:n.title})},Jtn=JSON.parse('{"2024":{"Direct use of energy":{"Total":69414293.5407514,"Bapco Energies Corporate":"","Bapco Upstream":13267248.969999999,"Bapco Refining":43029045,"Bapco Gas":13117999.570751397,"Bapco Tazweed":""},"Indirect use of energy":{"Total":1683388.17,"Bapco Energies Corporate":"","Bapco Upstream":378538.2,"Bapco Refining":907246.8,"Bapco Gas":397603.17,"Bapco Tazweed":""},"Energy savings":{"Total":0,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"CO2e savings":{"Total":0,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Solar power energy savings":{"Total":8700,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":8700,"Bapco Gas":"","Bapco Tazweed":""},"Real-time energy optimiser savings":{"Total":342000,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":342000,"Bapco Gas":"","Bapco Tazweed":""},"Steam trap repair savings":{"Total":65000,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":65000,"Bapco Gas":"","Bapco Tazweed":""},"Advanced Process Control savings":{"Total":24000,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":24000,"Bapco Gas":"","Bapco Tazweed":""},"Energy Consumption Cost":{"Total":"","Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Scope 1 CO2e savings":{"Total":660,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"2017 Emissions":{"Scope 1":{"Total":5723,"Bapco Energies Corporate":"","Bapco Upstream":962.59,"Bapco Refining":3675.17,"Bapco Gas":817.4814051340727,"Bapco Tazweed":""},"Scope 2":{"Total":216,"Bapco Energies Corporate":"","Bapco Upstream":86.72,"Bapco Refining":106.13399999999999,"Bapco Gas":22.842312983414033,"Bapco Tazweed":""},"Total":{"Total":5939,"Bapco Energies Corporate":"","Bapco Upstream":1049.31,"Bapco Refining":3781.304,"Bapco Gas":840.3237181174867,"Bapco Tazweed":""}},"Current Year Emissions":{"Scope 1":{"Total":5628.882390000001,"Bapco Energies Corporate":"","Bapco Upstream":1716.0954,"Bapco Refining":2824.42,"Bapco Gas":1088.36699,"Bapco Tazweed":""},"Scope 2":{"Total":232.41179000000002,"Bapco Energies Corporate":"","Bapco Upstream":79.358,"Bapco Refining":102.54,"Bapco Gas":50.51379,"Bapco Tazweed":""},"Total":{"Total":5861.294179999999,"Bapco Energies Corporate":"","Bapco Upstream":1795.4533999999999,"Bapco Refining":2926.96,"Bapco Gas":1138.88078,"Bapco Tazweed":""}},"2017 Carbon Itensity":{"Carbon intensity (2017)":{"Total":4.29,"Bapco Energies Corporate":"","Bapco Upstream":1.31248738,"Bapco Refining":6.701578815,"Bapco Gas":41.95754603,"Bapco Tazweed":""}},"Current Year Carbon Intensity":{"Carbon intensity (current year)":{"Total":3.86,"Bapco Energies Corporate":"","Bapco Upstream":1.951924868,"Bapco Refining":5.140221036,"Bapco Gas":43.29287531,"Bapco Tazweed":""}},"Carbon Intensity Reduction":{"Reduction in carbon emissions intensity":{"Total":0.1,"Bapco Energies Corporate":"","Bapco Upstream":0.487195151,"Bapco Refining":-0.232983573,"Bapco Gas":0.031825724,"Bapco Tazweed":""}},"Average flaring from Upstream Operations":{"Total":3.2,"Bapco Energies Corporate":"","Bapco Upstream":3.2,"Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Flaring intensity":{"Total":6.8,"Bapco Energies Corporate":"","Bapco Upstream":6.8,"Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Water Withdrawal":{"Seawater":{"Total":0.93,"Bapco Energies Corporate":"","Bapco Upstream":0.004760584827243638,"Bapco Refining":0.9891408471004467,"Bapco Gas":0.94869053,"Bapco Tazweed":""},"Producted water":{"Total":0.053,"Bapco Energies Corporate":"","Bapco Upstream":0.8895390870609408,"Bapco Refining":0,"Bapco Gas":0,"Bapco Tazweed":""},"Groundwater":{"Total":0.015,"Bapco Energies Corporate":"","Bapco Upstream":0.08314830258601649,"Bapco Refining":0.010859152899553356,"Bapco Gas":0,"Bapco Tazweed":""},"Utility Water":{"Total":0.001,"Bapco Energies Corporate":"","Bapco Upstream":0.022552025525799158,"Bapco Refining":0,"Bapco Gas":0.05130947,"Bapco Tazweed":""}},"Water Discharge":{"Seawater":{"Total":0.937,"Bapco Energies Corporate":"","Bapco Upstream":0,"Bapco Refining":0.9937155230282285,"Bapco Gas":0.9099,"Bapco Tazweed":""},"Producted water":{"Total":0.055,"Bapco Energies Corporate":"","Bapco Upstream":0.9765954698997796,"Bapco Refining":0,"Bapco Gas":0.0005,"Bapco Tazweed":""},"Groundwater":{"Total":0.006,"Bapco Energies Corporate":"","Bapco Upstream":0,"Bapco Refining":0.006284476971771476,"Bapco Gas":0,"Bapco Tazweed":""},"Utility Water":{"Total":0.002,"Bapco Energies Corporate":"","Bapco Upstream":0.023404530100220387,"Bapco Refining":0,"Bapco Gas":0.0896,"Bapco Tazweed":""}},"Water consumption cost":{"Total":"","Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of recorded major environmental violations/incidents":{"Total":0,"Bapco Energies Corporate":"","Bapco Upstream":0,"Bapco Refining":0,"Bapco Gas":0,"Bapco Tazweed":""},"Waste generated":{"Total":1048789.1706,"Bapco Energies Corporate":"","Bapco Upstream":1036915,"Bapco Refining":11279.9306,"Bapco Gas":594.24,"Bapco Tazweed":""},"Hazardous waste directed and diverted from dispoal":{"Total":40085.1405,"Bapco Energies Corporate":"","Bapco Upstream":32389.3427,"Bapco Refining":7181.9178,"Bapco Gas":513.88,"Bapco Tazweed":""},"Cost of waste treatement":{"Total":"","Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of FTEs":{"Total":4813,"Bapco Energies Corporate":117,"Bapco Upstream":1025,"Bapco Refining":2887,"Bapco Gas":640,"Bapco Tazweed":144},"Total Employees by Gender":{"Female":{"Total":0.123,"Bapco Energies Corporate":0.41025641,"Bapco Upstream":0.14146341463414633,"Bapco Refining":0.11915483200554208,"Bapco Gas":0.071875,"Bapco Tazweed":0.0625},"Male":{"Total":0.887,"Bapco Energies Corporate":0.58974359,"Bapco Upstream":0.8585365853658536,"Bapco Refining":0.8808451679944579,"Bapco Gas":0.928125,"Bapco Tazweed":0.9375}},"Total Employees by Age Group":{"Under 30 years":{"Total":0.226,"Bapco Energies Corporate":0.21367521367521367,"Bapco Upstream":0.2146341463414634,"Bapco Refining":0.2060962937305161,"Bapco Gas":0.2578125,"Bapco Tazweed":0.5625},"Between 30 - 50 years":{"Total":0.617,"Bapco Energies Corporate":0.6666666666666666,"Bapco Upstream":0.6497560975609756,"Bapco Refining":0.6182888811915483,"Bapco Gas":0.60625,"Bapco Tazweed":0.3611111111111111},"Above 50 years":{"Total":0.157,"Bapco Energies Corporate":0.11965811965811966,"Bapco Upstream":0.13560975609756099,"Bapco Refining":0.17561482507793558,"Bapco Gas":0.1359375,"Bapco Tazweed":0.0763888888888889}},"New Hires by Gender":{"Female":{"Total":0.261,"Bapco Energies Corporate":0.35,"Bapco Upstream":0.1,"Bapco Refining":0.3,"Bapco Gas":0.3333333333333333,"Bapco Tazweed":0.014},"Male":{"Total":0.739,"Bapco Energies Corporate":0.647887323943662,"Bapco Upstream":0.9,"Bapco Refining":0.7,"Bapco Gas":0.6666666666666666,"Bapco Tazweed":0.86}},"New Hires by Age Group":{"Under 30 years":{"Total":0.4097,"Bapco Energies Corporate":0.2535211267605634,"Bapco Upstream":0.3,"Bapco Refining":0.524822695035461,"Bapco Gas":1,"Bapco Tazweed":0.28},"Between 30 - 50 years":{"Total":0.4548,"Bapco Energies Corporate":0.6197183098591549,"Bapco Upstream":0.43333333333333335,"Bapco Refining":0.36879432624113473,"Bapco Gas":0,"Bapco Tazweed":19},"Above 50 years":{"Total":0.1355,"Bapco Energies Corporate":0.1267605633802817,"Bapco Upstream":0.26666666666666666,"Bapco Refining":0.10638297872340426,"Bapco Gas":0,"Bapco Tazweed":0.66}},"Employees Leaving by Gender":{"Female":{"Total":104,"Bapco Energies Corporate":3,"Bapco Upstream":5,"Bapco Refining":93,"Bapco Gas":13,"Bapco Tazweed":8},"Male":{"Total":314,"Bapco Energies Corporate":2,"Bapco Upstream":48,"Bapco Refining":246,"Bapco Gas":10,"Bapco Tazweed":2}},"Total Number of Employees Leaving":{"Total number of employees leaving":{"Total":418,"Bapco Energies Corporate":5,"Bapco Upstream":53,"Bapco Refining":339,"Bapco Gas":3,"Bapco Tazweed":10}},"Turnnover Rate":{"Turnover rate":{"Total":0.1,"Bapco Energies Corporate":0.02564102564102564,"Bapco Upstream":0.0517,"Bapco Refining":0.117,"Bapco Gas":0.0203125,"Bapco Tazweed":0.07}},"Turnover Rate by Gender":{"Female":{"Total":0.23,"Bapco Energies Corporate":0.008547008547008548,"Bapco Upstream":0.005,"Bapco Refining":0.032,"Bapco Gas":0.0046875,"Bapco Tazweed":0.03},"Male":{"Total":0.77,"Bapco Energies Corporate":0.017094017094017096,"Bapco Upstream":0.047,"Bapco Refining":0.085,"Bapco Gas":0.015625,"Bapco Tazweed":0.06}},"Turnover Rate by Age Group":{"Under 30 years":{"Total":0.1,"Bapco Energies Corporate":0,"Bapco Upstream":0.002,"Bapco Refining":0.011,"Bapco Gas":0.0078125,"Bapco Tazweed":""},"Between 30 - 50 years":{"Total":0.49,"Bapco Energies Corporate":0.017094017094017096,"Bapco Upstream":0.02,"Bapco Refining":0.051,"Bapco Gas":0.0125,"Bapco Tazweed":""},"Above 50 years":{"Total":0.41,"Bapco Energies Corporate":0.008547008547008548,"Bapco Upstream":0.03,"Bapco Refining":0.055,"Bapco Gas":0,"Bapco Tazweed":""}},"Employees Taking Parental Leave":{"Female":{"Total":30,"Bapco Energies Corporate":0,"Bapco Upstream":13,"Bapco Refining":13,"Bapco Gas":4,"Bapco Tazweed":0},"Male":{"Total":245,"Bapco Energies Corporate":3,"Bapco Upstream":54,"Bapco Refining":146,"Bapco Gas":42,"Bapco Tazweed":0}},"Employees Returning to Work After Parental Leave":{"Female":{"Total":0.9,"Bapco Energies Corporate":"","Bapco Upstream":1,"Bapco Refining":1,"Bapco Gas":1,"Bapco Tazweed":""},"Male":{"Total":0.91,"Bapco Energies Corporate":1,"Bapco Upstream":1,"Bapco Refining":1,"Bapco Gas":1,"Bapco Tazweed":""}},"Number of training sessions delivered":{"Total":94,"Bapco Energies Corporate":94,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of participating employees":{"Total":3611,"Bapco Energies Corporate":3611,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of BE Talks sessions":{"Total":32,"Bapco Energies Corporate":32,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Empower Program Interns":{"Total":372,"Bapco Energies Corporate":372,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Furas Program Interns":{"Total":112,"Bapco Energies Corporate":112,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of employees in senior management positions":{"Total":20,"Bapco Energies Corporate":29,"Bapco Upstream":14,"Bapco Refining":61,"Bapco Gas":20,"Bapco Tazweed":3},"Number of female employees in senior management positions":{"Total":6,"Bapco Energies Corporate":6,"Bapco Upstream":3,"Bapco Refining":14,"Bapco Gas":2,"Bapco Tazweed":1},"Number of employees enrolled in Women Exectuive Leadership Program":{"Total":32,"Bapco Energies Corporate":32,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Bahrainization rate":{"Total":0.85,"Bapco Energies Corporate":0.79,"Bapco Upstream":0.89,"Bapco Refining":0.71,"Bapco Gas":0.88,"Bapco Tazweed":0.98},"Coverage rate of workforce":{"Total":1,"Bapco Energies Corporate":1,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of hours worked":{"Total":43068089,"Bapco Energies Corporate":"","Bapco Upstream":16801752,"Bapco Refining":23693088,"Bapco Gas":1951486,"Bapco Tazweed":621763},"Lost Time Injury Rate":{"Total":0.023,"Bapco Energies Corporate":"","Bapco Upstream":0,"Bapco Refining":0,"Bapco Gas":0.51,"Bapco Tazweed":0},"Number of H&S courses":{"Total":636,"Bapco Energies Corporate":"","Bapco Upstream":332,"Bapco Refining":260,"Bapco Gas":28,"Bapco Tazweed":""},"Number of discrimination cases":{"Total":0,"Bapco Energies Corporate":"","Bapco Upstream":0,"Bapco Refining":0,"Bapco Gas":0,"Bapco Tazweed":""},"Number of employees volunteering":{"Total":1217,"Bapco Energies Corporate":1217,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Hours of volunteering":{"Total":6054,"Bapco Energies Corporate":6054,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Board attendance rate":{"Total":0.84,"Bapco Energies Corporate":0.84,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Female representation at Board level":{"Total":0.1,"Bapco Energies Corporate":0.1,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Male representation at Board level":{"Total":0.9,"Bapco Energies Corporate":0.9,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Female representation at Executive management level":{"Total":0.333,"Bapco Energies Corporate":0.333,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Male representation at Executive management level":{"Total":0.66,"Bapco Energies Corporate":0.66,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Cybersecurity awareness trained users":{"Total":4800,"Bapco Energies Corporate":4800,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Data privacy and cybersecurity complaints":{"Total":0,"Bapco Energies Corporate":0,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Economic value distributed":{"Total":1525634150,"Bapco Energies Corporate":1525634150,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Revenue Generated":{"Total":9534617850,"Bapco Energies Corporate":9534617850,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""}},"2025":{"Direct use of energy":{"Total":69384293.5407514,"Bapco Energies Corporate":"","Bapco Upstream":13257248.969999999,"Bapco Refining":43019045,"Bapco Gas":13107999.570751397,"Bapco Tazweed":""},"Indirect use of energy":{"Total":1653388.17,"Bapco Energies Corporate":"","Bapco Upstream":368538.2,"Bapco Refining":897246.8,"Bapco Gas":387603.17,"Bapco Tazweed":""},"Energy savings":{"Total":0,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"CO2e savings":{"Total":0,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Solar power energy savings":{"Total":9700,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":9700,"Bapco Gas":"","Bapco Tazweed":""},"Real-time energy optimiser savings":{"Total":352000,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":352000,"Bapco Gas":"","Bapco Tazweed":""},"Steam trap repair savings":{"Total":75000,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":75000,"Bapco Gas":"","Bapco Tazweed":""},"Advanced Process Control savings":{"Total":34000,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":34000,"Bapco Gas":"","Bapco Tazweed":""},"Energy Consumption Cost":{"Total":60000,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Scope 1 CO2e savings":{"Total":994.1176099999993,"Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"2017 Emissions":{"Scope 1":{"Total":5723,"Bapco Energies Corporate":"","Bapco Upstream":962.59,"Bapco Refining":3675.17,"Bapco Gas":817.4814051340727,"Bapco Tazweed":""},"Scope 2":{"Total":216,"Bapco Energies Corporate":"","Bapco Upstream":86.72,"Bapco Refining":106.13399999999999,"Bapco Gas":22.842312983414033,"Bapco Tazweed":""},"Total":{"Total":5939,"Bapco Energies Corporate":"","Bapco Upstream":1049.31,"Bapco Refining":3781.304,"Bapco Gas":840.3237181174867,"Bapco Tazweed":""}},"Current Year Emissions":{"Scope 1":{"Total":4728.882390000001,"Bapco Energies Corporate":"","Bapco Upstream":1416.0954,"Bapco Refining":2524.42,"Bapco Gas":788.36699,"Bapco Tazweed":""},"Scope 2":{"Total":202.41179000000002,"Bapco Energies Corporate":"","Bapco Upstream":69.358,"Bapco Refining":92.54,"Bapco Gas":40.51379,"Bapco Tazweed":""},"Total":{"Total":4931.294179999999,"Bapco Energies Corporate":"","Bapco Upstream":1485.4533999999999,"Bapco Refining":2616.96,"Bapco Gas":828.88078,"Bapco Tazweed":""}},"2017 Carbon Itensity":{"Carbon intensity (2017)":{"Total":4.29,"Bapco Energies Corporate":"","Bapco Upstream":1.31248738,"Bapco Refining":6.701578815,"Bapco Gas":41.95754603,"Bapco Tazweed":""}},"Current Year Carbon Intensity":{"Carbon intensity (current year)":{"Total":3.81,"Bapco Energies Corporate":"","Bapco Upstream":1.851924868498842,"Bapco Refining":5.040221036147068,"Bapco Gas":43.19287531426309,"Bapco Tazweed":""}},"Carbon Intensity Reduction":{"Reduction in carbon emissions intensity":{"Total":0.11188811188811189,"Bapco Energies Corporate":"","Bapco Upstream":0.4871951513723068,"Bapco Refining":-0.23298357326742844,"Bapco Gas":0.03182572401402502,"Bapco Tazweed":""}},"Average flaring from Upstream Operations":{"Total":3,"Bapco Energies Corporate":"","Bapco Upstream":3,"Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Flaring intensity":{"Total":6.5,"Bapco Energies Corporate":"","Bapco Upstream":6.5,"Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Water Withdrawal":{"Seawater":{"Total":0.93,"Bapco Energies Corporate":"","Bapco Upstream":0.004760584827243638,"Bapco Refining":0.9891408471004467,"Bapco Gas":0.94869053,"Bapco Tazweed":""},"Producted water":{"Total":0.053,"Bapco Energies Corporate":"","Bapco Upstream":0.8895390870609408,"Bapco Refining":0,"Bapco Gas":0,"Bapco Tazweed":""},"Groundwater":{"Total":0.015,"Bapco Energies Corporate":"","Bapco Upstream":0.08314830258601649,"Bapco Refining":0.010859152899553356,"Bapco Gas":0,"Bapco Tazweed":""},"Utility Water":{"Total":0.001,"Bapco Energies Corporate":"","Bapco Upstream":0.022552025525799158,"Bapco Refining":0,"Bapco Gas":0.05130947,"Bapco Tazweed":""}},"Water Discharge":{"Seawater":{"Total":0.937,"Bapco Energies Corporate":"","Bapco Upstream":0,"Bapco Refining":0.9937155230282285,"Bapco Gas":0.9099,"Bapco Tazweed":""},"Producted water":{"Total":0.055,"Bapco Energies Corporate":"","Bapco Upstream":0.9765954698997796,"Bapco Refining":0,"Bapco Gas":0.0005,"Bapco Tazweed":""},"Groundwater":{"Total":0.006,"Bapco Energies Corporate":"","Bapco Upstream":0,"Bapco Refining":0.006284476971771476,"Bapco Gas":0,"Bapco Tazweed":""},"Utility Water":{"Total":0.002,"Bapco Energies Corporate":"","Bapco Upstream":0.023404530100220387,"Bapco Refining":0,"Bapco Gas":0.0896,"Bapco Tazweed":""}},"Water consumption cost":{"Total":"","Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of recorded major environmental violations/incidents":{"Total":0,"Bapco Energies Corporate":"","Bapco Upstream":0,"Bapco Refining":0,"Bapco Gas":0,"Bapco Tazweed":""},"Waste generated":{"Total":1048489.1706,"Bapco Energies Corporate":"","Bapco Upstream":1036815,"Bapco Refining":11179.9306,"Bapco Gas":494.24,"Bapco Tazweed":""},"Hazardous waste directed and diverted from dispoal":{"Total":39785.1405,"Bapco Energies Corporate":"","Bapco Upstream":32289.3427,"Bapco Refining":7081.9178,"Bapco Gas":413.88,"Bapco Tazweed":""},"Cost of waste treatement":{"Total":"","Bapco Energies Corporate":"","Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of FTEs":{"Total":4823,"Bapco Energies Corporate":119,"Bapco Upstream":1027,"Bapco Refining":2889,"Bapco Gas":642,"Bapco Tazweed":146},"Total Employees by Gender":{"Female":{"Total":0.123,"Bapco Energies Corporate":0.41025641,"Bapco Upstream":0.14146341463414633,"Bapco Refining":0.11915483200554208,"Bapco Gas":0.071875,"Bapco Tazweed":0.0625},"Male":{"Total":0.887,"Bapco Energies Corporate":0.58974359,"Bapco Upstream":0.8585365853658536,"Bapco Refining":0.8808451679944579,"Bapco Gas":0.928125,"Bapco Tazweed":0.9375}},"Total Employees by Age Group":{"Under 30 years":{"Total":0.226,"Bapco Energies Corporate":0.21367521367521367,"Bapco Upstream":0.2146341463414634,"Bapco Refining":0.2060962937305161,"Bapco Gas":0.2578125,"Bapco Tazweed":0.5625},"Between 30 - 50 years":{"Total":0.617,"Bapco Energies Corporate":0.6666666666666666,"Bapco Upstream":0.6497560975609756,"Bapco Refining":0.6182888811915483,"Bapco Gas":0.60625,"Bapco Tazweed":0.3611111111111111},"Above 50 years":{"Total":0.157,"Bapco Energies Corporate":0.11965811965811966,"Bapco Upstream":0.13560975609756099,"Bapco Refining":0.17561482507793558,"Bapco Gas":0.1359375,"Bapco Tazweed":0.0763888888888889}},"New Hires by Gender":{"Female":{"Total":0.261,"Bapco Energies Corporate":0.35,"Bapco Upstream":0.1,"Bapco Refining":0.3,"Bapco Gas":0.3333333333333333,"Bapco Tazweed":0.014},"Male":{"Total":0.739,"Bapco Energies Corporate":0.647887323943662,"Bapco Upstream":0.9,"Bapco Refining":0.7,"Bapco Gas":0.6666666666666666,"Bapco Tazweed":0.86}},"New Hires by Age Group":{"Under 30 years":{"Total":0.4097,"Bapco Energies Corporate":0.2535211267605634,"Bapco Upstream":0.3,"Bapco Refining":0.524822695035461,"Bapco Gas":1,"Bapco Tazweed":0.28},"Between 30 - 50 years":{"Total":0.4548,"Bapco Energies Corporate":0.6197183098591549,"Bapco Upstream":0.43333333333333335,"Bapco Refining":0.36879432624113473,"Bapco Gas":0,"Bapco Tazweed":19},"Above 50 years":{"Total":0.1355,"Bapco Energies Corporate":0.1267605633802817,"Bapco Upstream":0.26666666666666666,"Bapco Refining":0.10638297872340426,"Bapco Gas":0,"Bapco Tazweed":0.66}},"Employees Leaving by Gender":{"Female":{"Total":104,"Bapco Energies Corporate":3,"Bapco Upstream":5,"Bapco Refining":93,"Bapco Gas":13,"Bapco Tazweed":8},"Male":{"Total":314,"Bapco Energies Corporate":2,"Bapco Upstream":48,"Bapco Refining":246,"Bapco Gas":10,"Bapco Tazweed":2}},"Total Number of Employees Leaving":{"Total number of employees leaving":{"Total":418,"Bapco Energies Corporate":5,"Bapco Upstream":53,"Bapco Refining":339,"Bapco Gas":3,"Bapco Tazweed":10}},"Turnnover Rate":{"Turnover rate":{"Total":0.1,"Bapco Energies Corporate":0.02564102564102564,"Bapco Upstream":0.0517,"Bapco Refining":0.117,"Bapco Gas":0.0203125,"Bapco Tazweed":0.07}},"Turnover Rate by Gender":{"Female":{"Total":0.23,"Bapco Energies Corporate":0.008547008547008548,"Bapco Upstream":0.005,"Bapco Refining":0.032,"Bapco Gas":0.0046875,"Bapco Tazweed":0.03},"Male":{"Total":0.77,"Bapco Energies Corporate":0.017094017094017096,"Bapco Upstream":0.047,"Bapco Refining":0.085,"Bapco Gas":0.015625,"Bapco Tazweed":0.06}},"Turnover Rate by Age Group":{"Under 30 years":{"Total":0.1,"Bapco Energies Corporate":0,"Bapco Upstream":0.002,"Bapco Refining":0.011,"Bapco Gas":0.0078125,"Bapco Tazweed":""},"Between 30 - 50 years":{"Total":0.49,"Bapco Energies Corporate":0.017094017094017096,"Bapco Upstream":0.02,"Bapco Refining":0.051,"Bapco Gas":0.0125,"Bapco Tazweed":""},"Above 50 years":{"Total":0.41,"Bapco Energies Corporate":0.008547008547008548,"Bapco Upstream":0.03,"Bapco Refining":0.055,"Bapco Gas":0,"Bapco Tazweed":""}},"Employees Taking Parental Leave":{"Female":{"Total":30,"Bapco Energies Corporate":0,"Bapco Upstream":13,"Bapco Refining":13,"Bapco Gas":4,"Bapco Tazweed":0},"Male":{"Total":245,"Bapco Energies Corporate":3,"Bapco Upstream":54,"Bapco Refining":146,"Bapco Gas":42,"Bapco Tazweed":0}},"Employees Returning to Work After Parental Leave":{"Female":{"Total":0.9,"Bapco Energies Corporate":"","Bapco Upstream":1,"Bapco Refining":1,"Bapco Gas":1,"Bapco Tazweed":""},"Male":{"Total":0.91,"Bapco Energies Corporate":1,"Bapco Upstream":1,"Bapco Refining":1,"Bapco Gas":1,"Bapco Tazweed":""}},"Number of training sessions delivered":{"Total":97,"Bapco Energies Corporate":97,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of participating employees":{"Total":3629,"Bapco Energies Corporate":3629,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of BE Talks sessions":{"Total":35,"Bapco Energies Corporate":35,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Empower Program Interns":{"Total":380,"Bapco Energies Corporate":380,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Furas Program Interns":{"Total":115,"Bapco Energies Corporate":115,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of employees in senior management positions":{"Total":23,"Bapco Energies Corporate":3,"Bapco Upstream":4,"Bapco Refining":5,"Bapco Gas":5,"Bapco Tazweed":6},"Number of female employees in senior management positions":{"Total":11,"Bapco Energies Corporate":1,"Bapco Upstream":2,"Bapco Refining":2,"Bapco Gas":3,"Bapco Tazweed":3},"Number of employees enrolled in Women Exectuive Leadership Program":{"Total":36,"Bapco Energies Corporate":36,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Bahrainization rate":{"Total":0.86,"Bapco Energies Corporate":0.8,"Bapco Upstream":0.9,"Bapco Refining":0.72,"Bapco Gas":0.89,"Bapco Tazweed":0.99},"Coverage rate of workforce":{"Total":1,"Bapco Energies Corporate":1,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Number of hours worked":{"Total":43068089,"Bapco Energies Corporate":"","Bapco Upstream":16801752,"Bapco Refining":23693088,"Bapco Gas":1951486,"Bapco Tazweed":621763},"Lost Time Injury Rate":{"Total":0.023,"Bapco Energies Corporate":"","Bapco Upstream":0,"Bapco Refining":0,"Bapco Gas":0.51,"Bapco Tazweed":0},"Number of H&S courses":{"Total":636,"Bapco Energies Corporate":"","Bapco Upstream":332,"Bapco Refining":260,"Bapco Gas":28,"Bapco Tazweed":""},"Number of discrimination cases":{"Total":0,"Bapco Energies Corporate":"","Bapco Upstream":0,"Bapco Refining":0,"Bapco Gas":0,"Bapco Tazweed":""},"Number of employees volunteering":{"Total":1217,"Bapco Energies Corporate":1217,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Hours of volunteering":{"Total":6054,"Bapco Energies Corporate":6054,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Board attendance rate":{"Total":0.84,"Bapco Energies Corporate":0.84,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Female representation at Board level":{"Total":0.1,"Bapco Energies Corporate":0.1,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Male representation at Board level":{"Total":0.9,"Bapco Energies Corporate":0.9,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Female representation at Executive management level":{"Total":0.333,"Bapco Energies Corporate":0.333,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Male representation at Executive management level":{"Total":0.66,"Bapco Energies Corporate":0.66,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Cybersecurity awareness trained users":{"Total":4800,"Bapco Energies Corporate":4800,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Data privacy and cybersecurity complaints":{"Total":0,"Bapco Energies Corporate":0,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Economic value distributed":{"Total":1525634150,"Bapco Energies Corporate":1525644150,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""},"Revenue Generated":{"Total":9534617850,"Bapco Energies Corporate":9534627850,"Bapco Upstream":"","Bapco Refining":"","Bapco Gas":"","Bapco Tazweed":""}}}'),Ytn=e=>{var n;let{tile:t}=e;const{filters:a}=J1e(),r=a.standaloneYear,i="All"===(a.businessUnit||"All")?"Total":a.businessUnit,o=d2e((null===(n=Jtn[r])||void 0===n||null===(n=n["Scope 1 CO2e savings"])||void 0===n?void 0:n[i])||0);return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:0===Number(o),children:(0,Ze.jsxs)(H4e,{children:[o,(0,Ze.jsx)(K4e,{children:"Gg"})]})})},Htn=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Scope 1 CO2e savings"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Scope 1 CO2e savings"],m=(0,g.useMemo)(()=>[{Date:"2024",Value:null==u?void 0:u[d]},{Date:"2025",Value:null==p?void 0:p[d]}].filter(e=>!!e.Value),[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Value",yName:"Scope 1 CO2e savings (Gg)",tooltip:{renderer:e=>({data:[{label:"Scope 1 CO2e savings (Gg)",value:d2e(e.datum.Value)}]})}}],axes:[{type:"number",position:"left",keys:["Value"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)},Ktn=e=>{var n;let{tile:t}=e;const{filters:a}=J1e(),r=a.standaloneYear,i="All"===(a.businessUnit||"All")?"Total":a.businessUnit,o=d2e((null===(n=Jtn[r])||void 0===n||null===(n=n["Average flaring from Upstream Operations"])||void 0===n?void 0:n[i])||0);return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:0===Number(o),children:(0,Ze.jsxs)(H4e,{children:[o,(0,Ze.jsx)(K4e,{children:"mmscfd"})]})})},Qtn=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Average flaring from Upstream Operations"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Average flaring from Upstream Operations"],m=(0,g.useMemo)(()=>[{Date:"2024",Value:null==u?void 0:u[d]},{Date:"2025",Value:null==p?void 0:p[d]}].filter(e=>!!e.Value),[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Value",yName:"Average flaring from upstream operations (mmscfd)",tooltip:{renderer:e=>({data:[{label:"Average flaring from upstream operations (mmscf)",value:d2e(e.datum.Value)}]})}}],axes:[{type:"number",position:"left",keys:["Value"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)},Ztn=e=>{var n;let{tile:t}=e;const{filters:a}=J1e(),r=a.standaloneYear,i="All"===(a.businessUnit||"All")?"Total":a.businessUnit,o=d2e((null===(n=Jtn[r])||void 0===n||null===(n=n["Flaring intensity"])||void 0===n?void 0:n[i])||0);return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:0===Number(o),children:(0,Ze.jsxs)(H4e,{children:[o,(0,Ze.jsx)(K4e,{children:"scf/BOE"})]})})},Xtn=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Flaring intensity"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Flaring intensity"],m=(0,g.useMemo)(()=>[{Date:"2024",Value:null==u?void 0:u[d]},{Date:"2025",Value:null==p?void 0:p[d]}].filter(e=>!!e.Value),[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Value",yName:"Flaring intensity (scf/BOE)",tooltip:{renderer:e=>({data:[{label:"Flaring intensity (scf/BOE)",value:d2e(e.datum.Value)}]})}}],axes:[{type:"number",position:"left",keys:["Value"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)},ean=e=>{var n;let{tile:t}=e;const{filters:a}=J1e(),r=a.standaloneYear,i="All"===(a.businessUnit||"All")?"Total":a.businessUnit,o=d2e((null===(n=Jtn[r])||void 0===n||null===(n=n["Current Year Carbon Intensity"])||void 0===n||null===(n=n["Carbon intensity (current year)"])||void 0===n?void 0:n[i])||0);return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:0===Number(o),children:(0,Ze.jsxs)(H4e,{children:[o,(0,Ze.jsx)(K4e,{children:"g/MJ"})]})})},nan=e=>{var n;let{tile:t}=e;const{filters:a}=J1e(),r=a.standaloneYear,i="All"===(a.businessUnit||"All")?"Total":a.businessUnit,o=d2e((null===(n=Jtn[r])||void 0===n||null===(n=n["2017 Carbon Itensity"])||void 0===n||null===(n=n["Carbon intensity (2017)"])||void 0===n?void 0:n[i])||0);return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:0===Number(o),children:(0,Ze.jsxs)(H4e,{children:[o,(0,Ze.jsx)(K4e,{children:"g/MJ"})]})})},tan=e=>{var n;let{tile:t}=e;const{filters:a}=J1e(),r=a.standaloneYear,i="All"===(a.businessUnit||"All")?"Total":a.businessUnit,o=d2e(100*((null===(n=Jtn[r])||void 0===n||null===(n=n["Carbon Intensity Reduction"])||void 0===n||null===(n=n["Reduction in carbon emissions intensity"])||void 0===n?void 0:n[i])||0));return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:0===Number(o),children:(0,Ze.jsxs)(H4e,{children:[o,(0,Ze.jsx)(K4e,{children:"%"})]})})},aan=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Current Year Carbon Intensity"]["Carbon intensity (current year)"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Current Year Carbon Intensity"]["Carbon intensity (current year)"],m=(0,g.useMemo)(()=>[{Date:"2024",Value:null==u?void 0:u[d]},{Date:"2025",Value:null==p?void 0:p[d]}].filter(e=>!!e.Value),[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Value",yName:"Carbon intensity (g/MJ Production)",tooltip:{renderer:e=>({data:[{label:"Carbon intensity (g/MJ Production)",value:d2e(e.datum.Value)}]})}}],axes:[{type:"number",position:"left",keys:["Value"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)},ran=e=>{var n;let{tile:t}=e;const{queryVariablesFilters:a}=J1e(),r=(0,g.useRef)(null),i=Y1e(r),{chartTheme:o}=(0,f.useAgChartsTheme)(t.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),l=a.standaloneYear,s="All"===(a.businessUnit||"All")?"Total":a.businessUnit,c=null===(n=Jtn[l])||void 0===n?void 0:n["2017 Emissions"],d=(0,g.useMemo)(()=>{var e,n,t;return[{Scope:"Scope 1","Total Emissions":null==c||null===(e=c["Scope 1"])||void 0===e?void 0:e[s]},{Scope:"Scope 2","Total Emissions":null==c||null===(n=c["Scope 2"])||void 0===n?void 0:n[s]},{Scope:"Total","Total Emissions":null==c||null===(t=c.Total)||void 0===t?void 0:t[s]}].filter(e=>!!e["Total Emissions"])},[c,s]),u=Boolean(d&&0===d.length),p=(0,g.useMemo)(()=>({theme:o,legend:{enabled:!1},width:i,data:d||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Scope",yKey:"Total Emissions",yName:"Total Emissions",fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Emissions (Gg)",value:d2e(e.datum["Total Emissions"])}]})}}],axes:[{type:"number",position:"left",keys:["Total Emissions"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[d,o,i]);return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:u,ref:r,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:p})})})},ian=e=>{var n;let{tile:t}=e;const{queryVariablesFilters:a}=J1e(),r=(0,g.useRef)(null),i=Y1e(r),{chartTheme:o}=(0,f.useAgChartsTheme)(t.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),l=a.standaloneYear,s="All"===(a.businessUnit||"All")?"Total":a.businessUnit,c=null===(n=Jtn[l])||void 0===n?void 0:n["Current Year Emissions"],d=(0,g.useMemo)(()=>{var e,n,t;return[{Scope:"Scope 1","Total Emissions":null==c||null===(e=c["Scope 1"])||void 0===e?void 0:e[s]},{Scope:"Scope 2","Total Emissions":null==c||null===(n=c["Scope 2"])||void 0===n?void 0:n[s]},{Scope:"Total","Total Emissions":null==c||null===(t=c.Total)||void 0===t?void 0:t[s]}].filter(e=>!!e["Total Emissions"])},[c,s]),u=Boolean(d&&0===d.length),p=(0,g.useMemo)(()=>({theme:o,legend:{enabled:!1},width:i,data:d||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Scope",yKey:"Total Emissions",yName:"Total Emissions",fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Emissions (Gg)",value:d2e(e.datum["Total Emissions"])}]})}}],axes:[{type:"number",position:"left",keys:["Total Emissions"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[d,o,i]);return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:u,ref:r,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:p})})})},oan=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1,f.AgChartColor.GREEN_1]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Current Year Emissions"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Current Year Emissions"],m=(0,g.useMemo)(()=>{var e,n,t,a,r,i;return[{Date:"2024","Scope 1":null==u||null===(e=u["Scope 1"])||void 0===e?void 0:e[d],"Scope 2":null==u||null===(n=u["Scope 2"])||void 0===n?void 0:n[d],Total:null==u||null===(t=u.Total)||void 0===t?void 0:t[d]},{Date:"2025","Scope 1":null==p||null===(a=p["Scope 1"])||void 0===a?void 0:a[d],"Scope 2":null==p||null===(r=p["Scope 2"])||void 0===r?void 0:r[d],Total:null==p||null===(i=p.Total)||void 0===i?void 0:i[d]}].filter(e=>!!e.Total)},[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Scope 1",yName:"Scope 1",tooltip:{renderer:e=>({data:[{label:"Scope 1 emissions (Gg)",value:d2e(e.datum["Scope 1"])}]})}},{type:"line",xKey:"Date",yKey:"Scope 2",yName:"Scope 2",tooltip:{renderer:e=>({data:[{label:"Scope 2 emissions (Gg)",value:d2e(e.datum["Scope 2"])}]})}},{type:"line",xKey:"Date",yKey:"Total",yName:"Total",tooltip:{renderer:e=>({data:[{label:"Total emissions (Gg)",value:d2e(e.datum.Total)}]})}}],axes:[{type:"number",position:"left",keys:["Scope 1","Scope 2","Total"],label:{formatter:e=>p2e(e.value)}},{type:"category",keys:["Date"],position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)},lan=e=>{var n;let{tile:t}=e;const a=(0,g.useRef)(null),{queryVariablesFilters:r}=J1e(),i=Y1e(a),{chartTheme:o,legendTheme:l}=(0,f.useAgChartsTheme)(t.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.BLUE_2,f.AgChartColor.BLACK_1,f.AgChartColor.BLUE_3]),s=r.standaloneYear,c="All"===(r.businessUnit||"All")?"Total":r.businessUnit,d=null===(n=Jtn[s])||void 0===n?void 0:n["Water Withdrawal"],u=(0,g.useMemo)(()=>{var e,n,t,a;return[{Value:null==d||null===(e=d.Seawater)||void 0===e?void 0:e[c],Dimension:"Seawater"},{Value:null==d||null===(n=d["Producted water"])||void 0===n?void 0:n[c],Dimension:"Produced water"},{Value:null==d||null===(t=d.Groundwater)||void 0===t?void 0:t[c],Dimension:"Groundwater"},{Value:null==d||null===(a=d["Utility Water"])||void 0===a?void 0:a[c],Dimension:"Utility water"}].filter(e=>!!e.Value)},[d,c]),p=Boolean(u&&0===u.length),m=(0,g.useMemo)(()=>({theme:o,legend:l,width:i,data:u||[],zoom:{enabled:!0},series:[{type:"pie",fillOpacity:1,angleKey:"Value",calloutLabelKey:"Dimension",sectorLabelKey:"Value",sectorLabel:{color:"white",fontWeight:"bold",formatter:e=>{let{value:n}=e;return"".concat((100*n).toFixed(1),"%")}},tooltip:{renderer:e=>({data:[{label:"".concat(e.datum.Dimension),value:"".concat((100*e.datum.Value).toFixed(1),"%")}]})}}]}),[u,o,i,l]);return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:p,ref:a,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:m})})})},san=e=>{var n;let{tile:t}=e;const a=(0,g.useRef)(null),{queryVariablesFilters:r}=J1e(),i=Y1e(a),{chartTheme:o,legendTheme:l}=(0,f.useAgChartsTheme)(t.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.BLUE_2,f.AgChartColor.BLACK_1,f.AgChartColor.BLUE_3]),s=r.standaloneYear,c="All"===(r.businessUnit||"All")?"Total":r.businessUnit,d=null===(n=Jtn[s])||void 0===n?void 0:n["Water Discharge"],u=(0,g.useMemo)(()=>{var e,n,t,a;return[{Value:null==d||null===(e=d.Seawater)||void 0===e?void 0:e[c],Dimension:"Seawater"},{Value:null==d||null===(n=d["Producted water"])||void 0===n?void 0:n[c],Dimension:"Produced water"},{Value:null==d||null===(t=d.Groundwater)||void 0===t?void 0:t[c],Dimension:"Groundwater"},{Value:null==d||null===(a=d["Utility Water"])||void 0===a?void 0:a[c],Dimension:"Utility water"}].filter(e=>!!e.Value)},[d,c]),p=Boolean(u&&0===u.length),m=(0,g.useMemo)(()=>({theme:o,legend:l,width:i,data:u||[],zoom:{enabled:!0},series:[{type:"pie",fillOpacity:1,angleKey:"Value",calloutLabelKey:"Dimension",sectorLabelKey:"Value",sectorLabel:{color:"white",fontWeight:"bold",formatter:e=>{let{value:n}=e;return"".concat((100*n).toFixed(1),"%")}},tooltip:{renderer:e=>({data:[{label:"".concat(e.datum.Dimension),value:"".concat((100*e.datum.Value).toFixed(1),"%")}]})}}]}),[u,o,i,l]);return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:p,ref:a,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:m})})})},can=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.BLUE_2,f.AgChartColor.BLACK_1,f.AgChartColor.BLUE_3]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Water Withdrawal"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Water Withdrawal"],m=(0,g.useMemo)(()=>[{Date:"2024",Seawater:100*(null==u?void 0:u.Seawater[d]),"Produced water":100*(null==u?void 0:u["Producted water"][d]),Groundwater:100*(null==u?void 0:u.Groundwater[d]),"Utility water":100*(null==u?void 0:u["Utility Water"][d])},{Date:"2025",Seawater:100*(null==p?void 0:p.Seawater[d]),"Produced water":100*(null==p?void 0:p["Producted water"][d]),Groundwater:100*(null==p?void 0:p.Groundwater[d]),"Utility water":100*(null==p?void 0:p["Utility Water"][d])}].filter(e=>!!(e.Seawater||e["Produced water"]||e.Groundwater||e["Utility water"])),[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Seawater",yName:"Seawater (%)",tooltip:{renderer:e=>({data:[{label:"Seawater (%)",value:d2e(e.datum.Seawater)}]})}},{type:"line",xKey:"Date",yKey:"Produced water",yName:"Produced water (%)",tooltip:{renderer:e=>({data:[{label:"Produced water (%)",value:d2e(e.datum["Produced water"])}]})}},{type:"line",xKey:"Date",yKey:"Groundwater",yName:"Groundwater (%)",tooltip:{renderer:e=>({data:[{label:"Groundwater (%)",value:d2e(e.datum.Groundwater)}]})}},{type:"line",xKey:"Date",yKey:"Utility water",yName:"Utility water (%)",tooltip:{renderer:e=>({data:[{label:"Utility water (%)",value:d2e(e.datum["Utility water"])}]})}}],axes:[{type:"number",position:"left",keys:["Seawater","Produced water","Groundwater","Utility water"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)},dan=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.BLUE_2,f.AgChartColor.BLACK_1,f.AgChartColor.BLUE_3]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Water Discharge"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Water Discharge"],m=(0,g.useMemo)(()=>[{Date:"2024",Seawater:100*(null==u?void 0:u.Seawater[d]),"Produced water":100*(null==u?void 0:u["Producted water"][d]),Groundwater:100*(null==u?void 0:u.Groundwater[d]),"Utility water":100*(null==u?void 0:u["Utility Water"][d])},{Date:"2025",Seawater:100*(null==p?void 0:p.Seawater[d]),"Produced water":100*(null==p?void 0:p["Producted water"][d]),Groundwater:100*(null==p?void 0:p.Groundwater[d]),"Utility water":100*(null==p?void 0:p["Utility Water"][d])}].filter(e=>!!(e.Seawater||e["Produced water"]||e.Groundwater||e["Utility water"])),[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Seawater",yName:"Seawater (%)",tooltip:{renderer:e=>({data:[{label:"Seawater (%)",value:d2e(e.datum.Seawater)}]})}},{type:"line",xKey:"Date",yKey:"Produced water",yName:"Produced water (%)",tooltip:{renderer:e=>({data:[{label:"Produced water (%)",value:d2e(e.datum["Produced water"])}]})}},{type:"line",xKey:"Date",yKey:"Groundwater",yName:"Groundwater (%)",tooltip:{renderer:e=>({data:[{label:"Groundwater (%)",value:d2e(e.datum.Groundwater)}]})}},{type:"line",xKey:"Date",yKey:"Utility water",yName:"Utility water (%)",tooltip:{renderer:e=>({data:[{label:"Utility water (%)",value:d2e(e.datum["Utility water"])}]})}}],axes:[{type:"number",position:"left",keys:["Seawater","Produced water","Groundwater","Utility water"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)},uan=e=>{var n;let{tile:t}=e;const{filters:a}=J1e(),r=a.standaloneYear,i="All"===(a.businessUnit||"All")?"Total":a.businessUnit,o=d2e(100*((null===(n=Jtn[r])||void 0===n||null===(n=n["Board attendance rate"])||void 0===n?void 0:n[i])||0));return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:0===Number(o),children:(0,Ze.jsxs)(H4e,{children:[o,(0,Ze.jsx)(K4e,{children:"%"})]})})},pan=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Board attendance rate"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Board attendance rate"],m=(0,g.useMemo)(()=>[{Date:"2024",Value:100*(null==u?void 0:u[d])},{Date:"2025",Value:100*(null==p?void 0:p[d])}].filter(e=>!!e.Value),[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Value",yName:"Board attendance rate (%)",tooltip:{renderer:e=>({data:[{label:"Board attendance rate (%)",value:d2e(e.datum.Value)}]})}}],axes:[{type:"number",position:"left",keys:["Value"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)},man=e=>{var n;let{tile:t}=e;const{filters:a}=J1e(),r=a.standaloneYear,i="All"===(a.businessUnit||"All")?"Total":a.businessUnit,o=d2e(100*((null===(n=Jtn[r])||void 0===n||null===(n=n["Female representation at Board level"])||void 0===n?void 0:n[i])||0));return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:0===Number(o),children:(0,Ze.jsxs)(H4e,{children:[o,(0,Ze.jsx)(K4e,{children:"%"})]})})},fan=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Female representation at Board level"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Female representation at Board level"],m=(0,g.useMemo)(()=>[{Date:"2024",Value:100*(null==u?void 0:u[d])},{Date:"2025",Value:100*(null==p?void 0:p[d])}].filter(e=>!!e.Value),[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Value",yName:"Female representation at Board level (%)",tooltip:{renderer:e=>({data:[{label:"Female representation at Board level (%)",value:d2e(e.datum.Value)}]})}}],axes:[{type:"number",position:"left",keys:["Value"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)},yan=e=>{var n;let{tile:t}=e;const{filters:a}=J1e(),r=a.standaloneYear,i="All"===(a.businessUnit||"All")?"Total":a.businessUnit,o=d2e(100*((null===(n=Jtn[r])||void 0===n||null===(n=n["Female representation at Executive management level"])||void 0===n?void 0:n[i])||0));return(0,Ze.jsx)(F4e,{title:t.title||"",loading:!1,error:null,retry:()=>{},noData:0===Number(o),children:(0,Ze.jsxs)(H4e,{children:[o,(0,Ze.jsx)(K4e,{children:"%"})]})})},gan=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Female representation at Executive management level"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Female representation at Executive management level"],m=(0,g.useMemo)(()=>[{Date:"2024",Value:100*(null==u?void 0:u[d])},{Date:"2025",Value:100*(null==p?void 0:p[d])}].filter(e=>!!e.Value),[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Value",yName:"Female representation at Executive management level (%)",tooltip:{renderer:e=>({data:[{label:"Female representation at Executive management level (%)",value:d2e(e.datum.Value)}]})}}],axes:[{type:"number",position:"left",keys:["Value"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)},ban=e=>{var n,t;let{tile:a}=e;const{filters:r,isExportingPdf:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{chartTheme:s,legendTheme:c}=(0,f.useAgChartsTheme)(a.colors||[f.AgChartColor.BLUE_1,f.AgChartColor.PINK_1]),d="All"===(r.businessUnit||"All")?"Total":r.businessUnit,u=null===(n=Jtn[2024])||void 0===n?void 0:n["Carbon Intensity Reduction"]["Reduction in carbon emissions intensity"],p=null===(t=Jtn[2025])||void 0===t?void 0:t["Carbon Intensity Reduction"]["Reduction in carbon emissions intensity"],m=(0,g.useMemo)(()=>[{Date:"2024",Value:100*(null==u?void 0:u[d])},{Date:"2025",Value:100*(null==p?void 0:p[d])}].filter(e=>!!e.Value),[u,p,d]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:s,legend:c,width:l,data:m||[],zoom:{enabled:!0},series:[{type:"line",xKey:"Date",yKey:"Value",yName:"Carbon intensity reduction (%)",tooltip:{renderer:e=>({data:[{label:"Carbon intensity reduction (%)",value:d2e(e.datum.Value)}]})}}],axes:[{type:"number",position:"left",keys:["Value"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,s,l,c]);return(0,Ze.jsx)(F4e,{title:a.title||"",loading:!1,error:null,retry:()=>{},noData:y,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},i?"exporting-pdf":void 0)};function han(e){let{tile:n,dataset:t,aggregationField:a,title:r,formatter:i}=e;const o=rt(),l=J1e(),{queryVariablesFilters:s}=l,{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:o,datasetFilters:s,datasetName:t,aggregation:{functions:[{field:a,aggregationType:Vt.DF.Sum}],partitions:[]}}}),m=i(l,null==c?void 0:c.getDashboardTileData),f=n.title||("string"==typeof r?r:r(l));return(0,Ze.jsx)(F4e,{title:f,loading:d,error:u,retry:p,noData:null===m,children:(0,Ze.jsx)(H4e,{children:m})})}function van(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xan(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?van(Object(t),!0).forEach(function(n){Tan(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):van(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Tan(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Oan=e=>{const{field:n,type:t}=e;return(a,r)=>{var i;let{selectedUnit:o,withVat:l}=a;const s=h2e(r),c=o2e((null==s||null===(i=s[0])||void 0===i?void 0:i[n])||"0",xan(xan({},["mass","distance","volume"].includes(t)?{originalUnit:e.originalUnit,targetUnit:o}:{}),"money"===t?{withVat:l}:{}));return Number.isNaN(c)||null===c?null:d2e(c,xan({},["mass","distance","volume"].includes(t)?{selectedUnit:o}:{}))}};function kan(e){let{tile:n,dataset:t,aggregationField:a,partitionField:r,title:i,formatter:o}=e;const l=rt(),s=(0,g.useRef)(null),c=J1e(),{queryVariablesFilters:d}=c,u=Y1e(s),{data:p,loading:m,error:y,refetch:b}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:d,datasetName:t,aggregation:{functions:[{field:a,aggregationType:Vt.DF.Sum}],partitions:[{field:r}]}}}),{chartTheme:v,legendTheme:x}=(0,f.useAgChartsTheme)(n.colors),T=o.resolveDataInputs(c,null==p?void 0:p.getDashboardTileData),O=(0,g.useMemo)(()=>o.transformData(T),Object.values(T)),k=Boolean(O&&0===O.length),j=(0,g.useMemo)(()=>o.countTotal(O),[O]),C=o.resolveSeriesInputs(c,null==p?void 0:p.getDashboardTileData),S=o.partitionField,N=(0,g.useMemo)(()=>{const e=o.configureSeries(C);return{theme:v,legend:x,width:u,data:O||[],zoom:{enabled:!0},series:[{type:"pie",fillOpacity:1,angleKey:e.key,calloutLabelKey:S,sectorLabelKey:e.key,sectorLabel:{color:"white",fontWeight:"bold",formatter:e=>{let{value:n}=e;return d2e(n,{percentageOverTotal:j})}},tooltip:{renderer:n=>({title:n.datum[S],data:e.resolveTooltipData(n.datum,j)})}}]}},[O,S,v,u,j,x,...Object.values(C)]),w=n.title||("string"==typeof i?i:i(c));return(0,Ze.jsx)(F4e,{title:w,loading:m,error:y,retry:b,noData:k,ref:s,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:N})})})}function jan(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Can(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jan(Object(t),!0).forEach(function(n){San(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jan(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function San(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Nan=e=>{const{type:n,field:t,label:a,partitionField:r,formatPartitionValue:i}=e,o="money"===n,l=["mass","distance","volume"].includes(n);return{partitionField:r,resolveDataInputs:(e,n)=>{let{selectedUnit:t,withVat:a}=e;return Can(Can(Can({},l?{selectedUnit:t}:{}),o?{withVat:a}:{}),{},{data:n})},transformData:a=>{var o;let{selectedUnit:l,withVat:s,data:c}=a;return null===(o=h2e(c))||void 0===o?void 0:o.map(a=>{const o=i?i(a[r]):a[r];return Can(Can({},a),{},{[r]:l2e(o),Quantity:o2e(a[t],Can(Can({},["mass","distance","volume"].includes(n)?{originalUnit:e.originalUnit,targetUnit:l}:{}),"money"===n?{withVat:s}:{}))})})},countTotal:e=>(null==e?void 0:e.reduce((e,n)=>e+Number(n.Quantity),0))||1,resolveSeriesInputs:e=>{let{selectedUnit:n,withVat:t}=e;return Can(Can({},l?{selectedUnit:n}:{}),o?{withVat:t}:{})},configureSeries:e=>({key:"Quantity",resolveTooltipData:(t,r)=>{const{selectedUnit:i}=e;return[{label:"string"==typeof a?a:a(e),value:"".concat(d2e(t.Quantity,Can({},["mass","distance","volume"].includes(n)?{selectedUnit:i}:{}))," (").concat(d2e(t.Quantity,{percentageOverTotal:r}),")")}]}})}};function wan(e){let{aggregationFields:n,partitionFields:t,title:a,type:r,formatter:i,tile:o,dataset:l}=e;const s=rt(),c=(0,g.useRef)(null),d=(0,g.useRef)(null),u=J1e(),{queryVariablesFilters:p,activeSheet:m,dashboardId:f,filters:y}=u,{data:b,loading:v,error:x,refetch:T}=(0,h.IT)(V3e,{variables:{accountId:s,datasetFilters:p,datasetName:l,aggregation:{functions:n.map(e=>({field:e,aggregationType:Vt.DF.Sum})),partitions:t.map(e=>({field:e}))}}}),O=i.resolveDataInputs(u,null==b?void 0:b.getDashboardTileData),k=(0,g.useMemo)(()=>i.transformData(O),Object.values(O)),j=Boolean(k&&0===k.length),C=i.resolveColumnsInputs(u),S=(0,g.useMemo)(()=>i.configureColumns(C),Object.values(C));(0,g.useEffect)(()=>{var e;null===(e=d.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[y]);const N=o.title||("string"==typeof a?a:a(u));return(0,Ze.jsx)(F4e,{title:N,loading:v,error:x,retry:T,noData:j,ref:c,children:(0,Ze.jsx)(c6e,{ref:d,gridKey:"".concat(s,"-").concat(f,"-").concat(m,"-").concat(r),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},columnDefs:S,rowData:k}})})}function Dan(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Aan(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dan(Object(t),!0).forEach(function(n){Ran(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dan(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ran(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Pan=e=>{let{quantities:n,additionalFields:t,partitionField:a}=e;const r=n.some(e=>{let{type:n}=e;return"money"===n}),i=n.some(e=>{let{type:n}=e;return["mass","distance","volume"].includes(n)});return{resolveDataInputs:(e,n)=>{let{withVat:t,selectedUnit:a}=e;return Aan(Aan(Aan({},r?{withVat:t}:{}),i?{selectedUnit:a}:{}),{},{data:n})},transformData:e=>{var r;let{data:i,selectedUnit:o,withVat:l}=e;return null===(r=h2e(i))||void 0===r||null===(r=r.map(e=>{const r=Aan(Aan({},e),{},{[a]:l2e(e[a])});null==t||t.forEach(n=>r[n]=l2e(e[n]));for(const t of n){const n=t.alias||t.field;["mass","distance","volume"].includes(t.type)?r[n]=o2e(e[t.field],{originalUnit:t.originalUnit,targetUnit:o}):"money"===t.type&&(r[n]=o2e(e[t.field],{withVat:l}))}return r}))||void 0===r?void 0:r.sort((e,n)=>{const r=[...t||[],a].find(t=>e[t]!==n[t]);return r?e[r].toLowerCase().localeCompare(n[r].toLowerCase()):1})},resolveColumnsInputs:e=>{let{withVat:n,selectedUnit:t}=e;return Aan(Aan({},r?{withVat:n}:{}),i?{selectedUnit:t}:{})},configureColumns:e=>{const{selectedUnit:r}=e,i=[...(null==t?void 0:t.map(e=>({headerName:y2e(e),field:e,rowGroup:!0,hide:!0})))||[],{headerName:y2e(a),field:a}];for(const t of n){const n=t.alias||t.field;["mass","distance","volume"].includes(t.type)?i.push({headerName:t.title(e),field:n,aggFunc:"sum",valueFormatter:e=>d2e(e.value,{selectedUnit:r}).toString()}):"money"===t.type&&i.push({headerName:t.title(e),field:n,aggFunc:"sum",valueFormatter:e=>d2e(e.value).toString()})}return i}}};function Lan(e){let{tile:n,title:t,dataset:a,aggregationFields:r,partitionFields:i,formatter:o}=e;const l=rt(),s=J1e(),{queryVariablesFilters:c,isExportingPdf:d}=s,u=(0,g.useRef)(null),p=Y1e(u),{data:m,loading:y,error:b,refetch:v}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:c,datasetName:a,aggregation:{functions:r.map(e=>({field:e,aggregationType:Vt.DF.Sum})),partitions:i.map(e=>({field:"string"==typeof e?e:e[0],partitionFunction:"string"==typeof e?void 0:e[1]}))}}}),{chartTheme:x,legendTheme:T}=(0,f.useAgChartsTheme)(n.colors),O=o.resolveDataInputs(s,null==m?void 0:m.getDashboardTileData),k=(0,g.useMemo)(()=>o.transformData(O),Object.values(O)),j=Boolean(k&&0===k.length),C=o.resolveSeriesInputs(s,null==m?void 0:m.getDashboardTileData),S=o.baselineField,N=(0,g.useMemo)(()=>{var e;const n=o.configureSeries(C),t=null===(e=o.configureOverlay)||void 0===e?void 0:e.call(o,C);return{theme:x,legend:T,width:p,data:k||[],zoom:{enabled:!0},series:[...n.map(e=>({type:"bar",xKey:S,yKey:e.key,yName:e.label,stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:n=>({data:e.resolveTooltipData(n.datum)})}})),...t?[{type:"line",xKey:S,yKey:t.key,yName:t.label,tooltip:{renderer:e=>({data:t.resolveTooltipData(e.datum)})}}]:[]],axes:[{type:"number",position:"left",keys:n.map(e=>{let{key:n}=e;return n}),label:{formatter:e=>p2e(e.value)}},...t?[{type:"number",position:"right",keys:[t.key],label:{formatter:e=>p2e(e.value)}}]:[],{type:"category",position:"bottom"}]}},[S,k,x,p,T,...Object.values(C)]),w=n.title||("string"==typeof t?t:t(s));return(0,Ze.jsx)(F4e,{title:w,loading:y,error:b,retry:v,noData:j,ref:u,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:N})})},d?"exporting-pdf":void 0)}function Ian(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ean(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ian(Object(t),!0).forEach(function(n){_an(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ian(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _an(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Fan=e=>{const{field:n,label:t,type:a,totalCostField:r}=e,i="money"===a||r,o=["mass","distance","volume"].includes(a),l={baselineField:"Date",resolveDataInputs:(e,n)=>{let{withVat:t,selectedUnit:a}=e;return Ean(Ean(Ean({},i?{withVat:t}:{}),o?{selectedUnit:a}:{}),{},{data:n})},transformData:t=>{var i;let{data:o,withVat:l,selectedUnit:s}=t;return null===(i=h2e(o))||void 0===i?void 0:i.map(t=>Ean(Ean(Ean({},t),{},{Quantity:o2e(t[n],Ean(Ean({},["mass","distance","volume"].includes(a)?{originalUnit:e.originalUnit,targetUnit:s}:{}),"money"===a?{withVat:l}:{}))},r?{TotalCost:o2e(t[r],{withVat:l})}:{}),{},{Date:s2e(t.Month)}))},resolveSeriesInputs:e=>{let{withVat:n,selectedUnit:t}=e;return Ean(Ean({},i?{withVat:n}:{}),o?{selectedUnit:t}:{})},configureSeries:e=>{const{selectedUnit:n}=e,r="string"==typeof t?t:t(e);return[{key:"Quantity",label:r,resolveTooltipData:e=>[{label:r,value:d2e(e.Quantity,Ean({},["mass","distance","volume"].includes(a)?{selectedUnit:n}:{})).toString()}]}]}};return r&&(l.configureOverlay=e=>{let{withVat:n}=e;return{key:"TotalCost",label:"Total cost (£) ".concat(m2e(n)),resolveTooltipData:e=>[{label:"Total cost (£) ".concat(m2e(n)),value:d2e(e.TotalCost).toString()}]}}),l},Ban=e=>{const{field:n,labels:t,type:a,totalCostField:r}=e,i="money"===a||r,o=["mass","distance","volume"].includes(a),l={baselineField:"Date",resolveDataInputs:(e,n)=>{let{withVat:t,selectedUnit:a}=e;return Ean(Ean(Ean({},i?{withVat:t}:{}),o?{selectedUnit:a}:{}),{},{data:n})},transformData:t=>{var i,o;let{data:l,withVat:s,selectedUnit:c}=t;return null===(i=b2e(null===(o=h2e(l))||void 0===o?void 0:o.map(t=>Ean(Ean(Ean({},t),{},{Quantity:o2e(t[n],Ean(Ean({},["mass","distance","volume"].includes(a)?{originalUnit:e.originalUnit,targetUnit:c}:{}),"money"===a?{withVat:s}:{}))},r?{TotalCost:o2e(t[r],{withVat:s})}:{}),{},{Date:s2e(t.Month)})),["Date"],"Accuracy","Quantity"))||void 0===i?void 0:i.sort(c2e)},resolveSeriesInputs:e=>{let{withVat:n,selectedUnit:t}=e;return Ean(Ean(Ean({},i?{withVat:n}:{}),o?{selectedUnit:t}:{}),{},{selectedUnit:t})},configureSeries:e=>{const{selectedUnit:n}=e,r=t(e),i=Ean({},["mass","distance","volume"].includes(a)?{selectedUnit:n}:{}),o=e=>({label:r.actual,value:d2e(e.AccuracyACTQuantity,i).toString()}),l=e=>({label:r.estimated,value:d2e(e.AccuracyESTQuantity,i).toString()}),s=e=>({label:r.total,value:d2e(e.AccuracyESTQuantity+e.AccuracyACTQuantity,i).toString()});return[{key:"AccuracyACTQuantity",label:r.actual,resolveTooltipData:e=>[o(e),l(e),s(e)]},{key:"AccuracyESTQuantity",label:r.estimated,resolveTooltipData:e=>[l(e),o(e),s(e)]}]}};return r&&(l.configureOverlay=e=>{let{withVat:n}=e;return{key:"TotalCost",label:"Total cost (£) ".concat(m2e(n)),resolveTooltipData:e=>[{label:"Total cost (£) ".concat(m2e(n)),value:d2e(e.TotalCost).toString()}]}}),l};function Uan(e){switch(e.type){case Vt.Rh.SpendBasedMaterialAmountKpiTile:return(0,Ze.jsx)(han,{tile:e,dataset:"SpendBasedMaterialByLocationReport",aggregationField:"Amount",formatter:Oan({type:"money",field:"Amount"}),title:e=>{let{withVat:n}=e;return"Total amount of spend (£) ".concat(m2e(n))}});case Vt.Rh.SpendBasedMaterialCarbonKpiTile:return(0,Ze.jsx)(han,{tile:e,dataset:"SpendBasedMaterialByLocationReport",aggregationField:"CO2e",formatter:Oan({type:"mass",field:"CO2e",originalUnit:"kg"}),title:e=>{let{selectedUnit:n}=e;return"Total carbon (".concat(n,"CO2e)")}});case Vt.Rh.SpendBasedMaterialAmountByMaterialTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"SpendBasedMaterialByLocationReport",aggregationField:"Amount",partitionField:"PrimaryMaterial",title:e=>{let{withVat:n}=e;return"Amount of spend by type (£) ".concat(m2e(n))},formatter:Nan({type:"money",field:"Amount",label:e=>{let{withVat:n}=e;return"Amount (£) ".concat(m2e(n))},partitionField:"PrimaryMaterial"})});case Vt.Rh.SpendBasedMaterialCarbonByMaterialTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"SpendBasedMaterialByLocationReport",aggregationField:"CO2e",partitionField:"PrimaryMaterial",title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by type (".concat(n,"CO2e)")},formatter:Nan({type:"mass",field:"CO2e",label:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")},originalUnit:"kg",partitionField:"PrimaryMaterial"})});case Vt.Rh.SpendBasedMaterialAmountByPurchaseTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"SpendBasedMaterialByLocationReport",aggregationField:"Amount",partitionField:"PurchaseType",title:e=>{let{withVat:n}=e;return"Amount of spend by purchase type (£) ".concat(m2e(n))},formatter:Nan({type:"money",field:"Amount",label:e=>{let{withVat:n}=e;return"Amount (£) ".concat(m2e(n))},partitionField:"PurchaseType",formatPartitionValue:So})});case Vt.Rh.SpendBasedMaterialCarbonByPurchaseTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"SpendBasedMaterialByLocationReport",aggregationField:"CO2e",partitionField:"PurchaseType",title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by purchase type (".concat(n,"CO2e)")},formatter:Nan({type:"mass",field:"CO2e",label:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")},originalUnit:"kg",partitionField:"PurchaseType",formatPartitionValue:So})});case Vt.Rh.SpendBasedMaterialAmountBySupplierPieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"SpendBasedMaterialByLocationReport",aggregationField:"Amount",partitionField:"SupplierName",title:e=>{let{withVat:n}=e;return"Amount of spend by supplier (£) ".concat(m2e(n))},formatter:Nan({type:"money",field:"Amount",label:e=>{let{withVat:n}=e;return"Amount (£) ".concat(m2e(n))},partitionField:"SupplierName"})});case Vt.Rh.SpendBasedMaterialCarbonBySupplierPieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"SpendBasedMaterialByLocationReport",aggregationField:"CO2e",partitionField:"SupplierName",title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by supplier (".concat(n,"CO2e)")},formatter:Nan({type:"mass",field:"CO2e",label:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")},originalUnit:"kg",partitionField:"SupplierName"})});case Vt.Rh.SpendBasedMaterialAmountBySupplierTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.SpendBasedMaterialAmountBySupplierTableTile,dataset:"SpendBasedMaterialByLocationReport",aggregationFields:["Amount"],partitionFields:["SupplierName"],title:e=>{let{withVat:n}=e;return"Amount of spend by supplier (£) ".concat(m2e(n))},formatter:Pan({quantities:[{type:"money",field:"Amount",title:e=>{let{withVat:n}=e;return"Amount (£) ".concat(m2e(n))}}],partitionField:"SupplierName"})});case Vt.Rh.SpendBasedMaterialCarbonBySupplierTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.SpendBasedMaterialCarbonBySupplierTableTile,dataset:"SpendBasedMaterialByLocationReport",aggregationFields:["CO2e"],partitionFields:["SupplierName"],title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by supplier (".concat(n,"CO2e)")},formatter:Pan({quantities:[{type:"mass",originalUnit:"kg",field:"CO2e",title:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")}}],partitionField:"SupplierName"})});case Vt.Rh.SpendBasedMaterialAmountByMaterialTypeWithLayersTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.SpendBasedMaterialAmountByMaterialTypeWithLayersTableTile,dataset:"SpendBasedMaterialByLocationReport",aggregationFields:["Amount"],partitionFields:["Material"],title:e=>{let{withVat:n}=e;return"Amount of spend by type with layers (£) ".concat(m2e(n))},formatter:Pan({quantities:[{type:"money",field:"Amount",title:e=>{let{withVat:n}=e;return"Amount (£) ".concat(m2e(n))}}],partitionField:"Material"})});case Vt.Rh.SpendBasedMaterialCarbonByMaterialTypeWithLayersTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.SpendBasedMaterialCarbonByMaterialTypeWithLayersTableTile,dataset:"SpendBasedMaterialByLocationReport",aggregationFields:["CO2e"],partitionFields:["Material"],title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by type with layers (".concat(n,"CO2e)")},formatter:Pan({quantities:[{type:"mass",originalUnit:"kg",field:"CO2e",title:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")}}],partitionField:"Material"})});case Vt.Rh.SpendBasedMaterialAmountOverTimeBarTile:return(0,Ze.jsx)(Lan,{tile:e,title:e=>{let{withVat:n}=e;return"Amount of spend over time (£) ".concat(m2e(n))},dataset:"SpendBasedMaterialByLocationReport",aggregationFields:["Amount"],partitionFields:[["Date",Vt.v7.Month]],formatter:Fan({type:"money",field:"Amount",label:e=>{let{withVat:n}=e;return"Amount (£) ".concat(m2e(n))}})});case Vt.Rh.SpendBasedMaterialAmountAndCarbonByLocationTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.SpendBasedMaterialAmountAndCarbonByLocationTableTile,dataset:"SpendBasedMaterialByLocationReport",aggregationFields:["Amount","CO2e"],partitionFields:["LocationName"],title:e=>{let{selectedUnit:n,withVat:t}=e;return"Amount of spend (£) ".concat(m2e(t)," and Carbon emissions (").concat(n,"CO2e) by location")},formatter:Pan({quantities:[{type:"money",field:"Amount",title:e=>{let{withVat:n}=e;return"Amount (£) ".concat(m2e(n))}},{type:"mass",originalUnit:"kg",field:"CO2e",title:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")}}],partitionField:"LocationName"})});default:return null}}function Man(e){switch(e.type){case Vt.Rh.MaterialCarbonEmissionsKpiTile:return(0,Ze.jsx)(han,{tile:e,dataset:"MaterialByLocationReport",aggregationField:"CO2e",formatter:Oan({type:"mass",field:"CO2e",originalUnit:"kg"}),title:e=>{let{selectedUnit:n}=e;return"Total carbon (".concat(n,"CO2e)")}});case Vt.Rh.MaterialCostKpiTile:return(0,Ze.jsx)(han,{tile:e,dataset:"MaterialByLocationReport",aggregationField:"TotalCost",formatter:Oan({type:"money",field:"TotalCost"}),title:e=>{let{withVat:n}=e;return"Total cost (£) ".concat(m2e(n))}});case Vt.Rh.MaterialCostAndCarbonEmissionsByLocationTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.MaterialCostAndCarbonEmissionsByLocationTableTile,dataset:"MaterialByLocationReport",aggregationFields:["TotalCost","CO2e"],partitionFields:["LocationName"],title:e=>{let{selectedUnit:n,withVat:t}=e;return"Cost (£) ".concat(m2e(t)," and carbon emissions (").concat(n,"CO2e) by location")},formatter:Pan({quantities:[{type:"money",field:"TotalCost",title:e=>{let{withVat:n}=e;return"Cost (£) ".concat(m2e(n))}},{type:"mass",field:"CO2e",originalUnit:"kg",title:e=>{let{selectedUnit:n}=e;return"Carbon emissions (".concat(n,"CO2e)")}}],partitionField:"LocationName"})});case Vt.Rh.MaterialCarbonEmissionsOverTimeBarTile:return(0,Ze.jsx)(Lan,{tile:e,title:e=>{let{selectedUnit:n}=e;return"Carbon emissions over time (".concat(n,"CO2e)")},dataset:"MaterialByLocationReport",aggregationFields:["CO2e"],partitionFields:[["Date",Vt.v7.Month]],formatter:Fan({type:"mass",field:"CO2e",label:e=>{let{selectedUnit:n}=e;return"Carbon emissions (".concat(n,"CO2e)")},originalUnit:"kg"})});default:return null}}function Van(e){switch(e.type){case Vt.Rh.ActivityBasedMaterialWeightKpiTile:return(0,Ze.jsx)(han,{tile:e,dataset:"ActivityBasedMaterialByLocationReport",aggregationField:"WeightInKg",formatter:Oan({type:"mass",originalUnit:"kg",field:"WeightInKg"}),title:e=>{let{selectedUnit:n}=e;return"Total weight (".concat(n,")")}});case Vt.Rh.ActivityBasedMaterialCarbonKpiTile:return(0,Ze.jsx)(han,{tile:e,dataset:"ActivityBasedMaterialByLocationReport",aggregationField:"CO2e",formatter:Oan({type:"mass",field:"CO2e",originalUnit:"kg"}),title:e=>{let{selectedUnit:n}=e;return"Total carbon (".concat(n,"CO2e)")}});case Vt.Rh.ActivityBasedMaterialWeightByMaterialTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"ActivityBasedMaterialByLocationReport",aggregationField:"WeightInKg",partitionField:"PrimaryMaterial",title:e=>{let{selectedUnit:n}=e;return"Weight by type (".concat(n,")")},formatter:Nan({type:"mass",originalUnit:"kg",field:"WeightInKg",label:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")},partitionField:"PrimaryMaterial"})});case Vt.Rh.ActivityBasedMaterialCarbonByMaterialTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"ActivityBasedMaterialByLocationReport",aggregationField:"CO2e",partitionField:"PrimaryMaterial",title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by type (".concat(n,"CO2e)")},formatter:Nan({type:"mass",field:"CO2e",label:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")},originalUnit:"kg",partitionField:"PrimaryMaterial"})});case Vt.Rh.ActivityBasedMaterialWeightByPurchaseTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"ActivityBasedMaterialByLocationReport",aggregationField:"WeightInKg",partitionField:"PurchaseType",title:e=>{let{selectedUnit:n}=e;return"Weight by purchase type (".concat(n,")")},formatter:Nan({type:"mass",field:"WeightInKg",originalUnit:"kg",label:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")},partitionField:"PurchaseType",formatPartitionValue:So})});case Vt.Rh.ActivityBasedMaterialCarbonByPurchaseTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"ActivityBasedMaterialByLocationReport",aggregationField:"CO2e",partitionField:"PurchaseType",title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by purchase type (".concat(n,"CO2e)")},formatter:Nan({type:"mass",field:"CO2e",label:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")},originalUnit:"kg",partitionField:"PurchaseType",formatPartitionValue:So})});case Vt.Rh.ActivityBasedMaterialWeightBySubcontractorPieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"ActivityBasedMaterialByLocationReport",aggregationField:"WeightInKg",partitionField:"SubcontractorName",title:e=>{let{selectedUnit:n}=e;return"Weight by subcontractor (".concat(n,")")},formatter:Nan({type:"mass",originalUnit:"kg",field:"WeightInKg",label:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")},partitionField:"SubcontractorName"})});case Vt.Rh.ActivityBasedMaterialCarbonBySubcontractorPieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"ActivityBasedMaterialByLocationReport",aggregationField:"CO2e",partitionField:"SubcontractorName",title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by subcontractor (".concat(n,"CO2e)")},formatter:Nan({type:"mass",field:"CO2e",label:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")},originalUnit:"kg",partitionField:"SubcontractorName"})});case Vt.Rh.ActivityBasedMaterialWeightBySubcontractorTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.ActivityBasedMaterialWeightBySubcontractorTableTile,dataset:"ActivityBasedMaterialByLocationReport",aggregationFields:["WeightInKg"],partitionFields:["SubcontractorName"],title:e=>{let{selectedUnit:n}=e;return"Weight by subcontractor (".concat(n,")")},formatter:Pan({quantities:[{type:"mass",originalUnit:"kg",field:"WeightInKg",title:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")}}],partitionField:"SubcontractorName"})});case Vt.Rh.ActivityBasedMaterialCarbonBySubcontractorTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.ActivityBasedMaterialCarbonBySubcontractorTableTile,dataset:"ActivityBasedMaterialByLocationReport",aggregationFields:["CO2e"],partitionFields:["SubcontractorName"],title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by subcontractor (".concat(n,"CO2e)")},formatter:Pan({quantities:[{type:"mass",originalUnit:"kg",field:"CO2e",title:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")}}],partitionField:"SubcontractorName"})});case Vt.Rh.ActivityBasedMaterialWeightByMaterialTypeWithLayersTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.ActivityBasedMaterialWeightByMaterialTypeWithLayersTableTile,dataset:"ActivityBasedMaterialByLocationReport",aggregationFields:["WeightInKg"],partitionFields:["Material"],title:e=>{let{selectedUnit:n}=e;return"Weight by type with layers (".concat(n,")")},formatter:Pan({quantities:[{type:"mass",originalUnit:"kg",field:"WeightInKg",title:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")}}],partitionField:"Material"})});case Vt.Rh.ActivityBasedMaterialCarbonByMaterialTypeWithLayersTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.ActivityBasedMaterialCarbonByMaterialTypeWithLayersTableTile,dataset:"ActivityBasedMaterialByLocationReport",aggregationFields:["CO2e"],partitionFields:["Material"],title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by type with layers (".concat(n,"CO2e)")},formatter:Pan({quantities:[{type:"mass",originalUnit:"kg",field:"CO2e",title:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")}}],partitionField:"Material"})});case Vt.Rh.ActivityBasedMaterialWeightOverTimeBarTile:return(0,Ze.jsx)(Lan,{tile:e,title:e=>{let{selectedUnit:n}=e;return"Weight over time (".concat(n,")")},dataset:"ActivityBasedMaterialByLocationReport",aggregationFields:["WeightInKg"],partitionFields:[["Date",Vt.v7.Month]],formatter:Fan({type:"mass",originalUnit:"kg",field:"WeightInKg",label:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")}})});case Vt.Rh.ActivityBasedMaterialWeightAndCarbonByLocationTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.ActivityBasedMaterialWeightAndCarbonByLocationTableTile,dataset:"ActivityBasedMaterialByLocationReport",aggregationFields:["WeightInKg","CO2e"],partitionFields:["LocationName"],title:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,") and Carbon emissions (").concat(n,"CO2e) by location")},formatter:Pan({quantities:[{type:"mass",field:"WeightInKg",originalUnit:"kg",title:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")}},{type:"mass",originalUnit:"kg",field:"CO2e",title:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")}}],partitionField:"LocationName"})});default:return null}}function zan(e){switch(e.type){case Vt.Rh.GeneralMaterialWeightKpiTile:return(0,Ze.jsx)(han,{tile:e,dataset:"GeneralMaterialByLocationReport",aggregationField:"Weight",formatter:Oan({type:"mass",originalUnit:"kg",field:"Weight"}),title:e=>{let{selectedUnit:n}=e;return"Total weight (".concat(n,")")}});case Vt.Rh.GeneralMaterialCarbonKpiTile:return(0,Ze.jsx)(han,{tile:e,dataset:"GeneralMaterialByLocationReport",aggregationField:"CO2e",formatter:Oan({type:"mass",field:"CO2e",originalUnit:"kg"}),title:e=>{let{selectedUnit:n}=e;return"Total carbon (".concat(n,"CO2e)")}});case Vt.Rh.GeneralMaterialWeightByMaterialTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"GeneralMaterialByLocationReport",aggregationField:"Weight",partitionField:"Material",title:e=>{let{selectedUnit:n}=e;return"Weight by type (".concat(n,")")},formatter:Nan({type:"mass",originalUnit:"kg",field:"Weight",label:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")},partitionField:"Material"})});case Vt.Rh.GeneralMaterialCarbonByMaterialTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"GeneralMaterialByLocationReport",aggregationField:"CO2e",partitionField:"Material",title:e=>{let{selectedUnit:n}=e;return"Carbon emissions by type (".concat(n,"CO2e)")},formatter:Nan({type:"mass",field:"CO2e",label:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")},originalUnit:"kg",partitionField:"Material"})});case Vt.Rh.GeneralMaterialWeightOverTimeBarTile:return(0,Ze.jsx)(Lan,{tile:e,title:e=>{let{selectedUnit:n}=e;return"Weight over time (".concat(n,")")},dataset:"GeneralMaterialByLocationReport",aggregationFields:["Weight"],partitionFields:[["Date",Vt.v7.Month]],formatter:Fan({type:"mass",originalUnit:"kg",field:"Weight",label:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")}})});case Vt.Rh.GeneralMaterialWeightAndCarbonByLocationTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.GeneralMaterialWeightAndCarbonByLocationTableTile,dataset:"GeneralMaterialByLocationReport",aggregationFields:["Weight","CO2e"],partitionFields:["LocationName"],title:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,") and Carbon emissions (").concat(n,"CO2e) by location")},formatter:Pan({quantities:[{type:"mass",field:"Weight",originalUnit:"kg",title:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")}},{type:"mass",originalUnit:"kg",field:"CO2e",title:e=>{let{selectedUnit:n}=e;return"Carbon (".concat(n,"CO2e)")}}],partitionField:"LocationName"})});default:return null}}function Gan(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $an(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gan(Object(t),!0).forEach(function(n){Wan(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gan(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Wan(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const qan=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,filters:s,withVat:c,doesSheetHavePeriodFilters:d,partitionFunctionForYearComparison:u}=J1e(),{data:p,loading:m,error:f,refetch:y}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"TransportByLocationReport",aggregation:{functions:[{field:"TotalDistance(km)",aggregationType:Vt.DF.Sum},{field:"TotalCost(£)",aggregationType:Vt.DF.Sum},{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:d?Vt.v7.Period:u,alias:"Period"},{field:"Country"},{field:"LocationCode"},{field:"LocationName"}]}}}),b=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==p?void 0:p.getDashboardTileData))||void 0===e||null===(e=e.map(e=>$an($an({},e),{},{Country:l2e(e.Country),LocationCode:l2e(e.LocationCode),LocationName:l2e(e.LocationName),"TotalDistance(km)":o2e(e["TotalDistance(km)"]),"TotalCost(£)":o2e(e["TotalCost(£)"],{withVat:c}),CO2e:o2e(e.CO2e)})))||void 0===e?void 0:e.sort((e,n)=>e.Country!==n.Country?e.Country.toLowerCase().localeCompare(n.Country.toLowerCase()):e.LocationCode!==n.LocationCode?e.LocationCode.toLowerCase().localeCompare(n.LocationCode.toLowerCase()):e.LocationName!==n.LocationName?e.LocationName.toLowerCase().localeCompare(n.LocationName.toLowerCase()):1)},[p,c]),v=Boolean(b&&0===b.length),x=(0,g.useMemo)(()=>[{headerName:"Country",field:"Country",rowGroup:!0,hide:!0},{headerName:"Location Code",field:"LocationCode",rowGroup:!0,hide:!0},{headerName:"Location Name",field:"LocationName",rowGroup:!0,hide:!0},{headerName:"Year",field:"Period",pivot:!0},{headerName:"Cost (£) ".concat(m2e(c)),field:"TotalCost(£)",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Distance (km)",field:"TotalDistance(km)",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Carbon (kgCO2e)",field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value)}],[c]);return(0,g.useEffect)(()=>{var e;null===(e=r.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[s]),(0,Ze.jsx)(F4e,{title:n.title||"Annual figures per location",loading:m,error:f,retry:y,noData:v,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-TransportAnnualFiguresPerLocationYearOnYearTableTile"),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},pivotMode:!0,columnDefs:x,rowData:b}})})};function Jan(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Yan(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Jan(Object(t),!0).forEach(function(n){Han(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Jan(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Han(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Kan=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r}=J1e(),i=(0,g.useRef)(null),o=Y1e(i),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"TransportByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum},{field:"TotalDistance(km)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:u,legendTheme:p}=(0,f.useAgChartsTheme)(n.colors),m=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==l?void 0:l.getDashboardTileData))||void 0===e||null===(e=e.map(e=>Yan(Yan({},e),{},{CO2e:o2e(e.CO2e),"TotalDistance(km)":o2e(e["TotalDistance(km)"]),Date:s2e(e.Month)})))||void 0===e?void 0:e.sort(c2e)},[l]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:u,legend:p,width:o,data:m||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"CO2e",yName:"Carbon emissions (kgCO2e)",stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Carbon emissions (kgCO2e)",value:d2e(e.datum.CO2e)}]})}},{type:"line",xKey:"Date",yKey:"TotalDistance(km)",yName:"Distance traveled (km)",tooltip:{renderer:e=>({data:[{label:"Distance traveled (km)",value:d2e(e.datum["TotalDistance(km)"])}]})}}],axes:[{type:"number",position:"left",keys:["CO2e"],label:{formatter:e=>p2e(e.value)}},{type:"number",position:"right",keys:["TotalDistance(km)"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[m,u,o,p]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon emissions (kgCO2e) and distance traveled (km) over time",loading:s,error:c,retry:d,noData:y,ref:i,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},r?"exporting-pdf":void 0)};function Qan(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Zan(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qan(Object(t),!0).forEach(function(n){Xan(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qan(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Xan(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ern=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,filters:i}=J1e(),o=(0,g.useRef)(null),l=Y1e(o),{data:s,loading:c,error:d,refetch:u}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"TransportByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:p,legendTheme:m}=(0,f.useAgChartsTheme)(n.colors),y=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==s?void 0:s.getDashboardTileData))||void 0===e||null===(e=e.map(e=>Zan(Zan({},e),{},{CO2e:o2e(e.CO2e),Date:s2e(e.Month)})).reduce((e,n)=>{const t=(0,$8e.m)(e),a=O1e(i.year1),r=k1e(i.year1),o=k1e(i.year2),l=Wt()(n.Date,"MMM YYYY").format("MMM"),s=Wt()(n.Date,"MMM YYYY").year()-(a===Ma.YearToCompareType.CALENDAR?0:Wt()(n.Date,"MMM YYYY").month()<4?1:0),c=t.findIndex(e=>e.Month===l&&null!==e.Year1Quantity);if(-1!==c)return t[c].Year2Quantity=Number(n.CO2e),t;const d=e.findIndex(e=>e.Month===l&&null!==e.Year2Quantity);return-1!==d?(t[d].Year1Quantity=Number(n.CO2e),t):[...t,Zan(Zan({},n),{},{Year1Quantity:s===r?Number(n.CO2e):null,Year2Quantity:s===o?Number(n.CO2e):null,Month:l})]},[]))||void 0===e?void 0:e.sort((e,n)=>O1e(i.year1)===Ma.YearToCompareType.CALENDAR?Wt()(e.Month,"MMM").toDate().getTime()-Wt()(n.Month,"MMM").toDate().getTime():j1e.indexOf(e.Month)-j1e.indexOf(n.Month))},[s,i.year1,i.year2]),b=Boolean(y&&0===y.length),v=(0,g.useMemo)(()=>({theme:p,width:l,data:y||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Month",yKey:"Year1Quantity",yName:"".concat(i.year1," Carbon emissions (kgCO2e)"),fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"".concat(i.year1," Carbon emissions (kgCO2e)"),value:d2e(e.datum.Year1Quantity)},{label:"".concat(i.year2," Carbon emissions (kgCO2e)"),value:d2e(e.datum.Year2Quantity)}]})}},{type:"bar",xKey:"Month",yKey:"Year2Quantity",yName:"".concat(i.year2," Carbon emissions (kgCO2e)"),fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"".concat(i.year1," Carbon emissions (kgCO2e)"),value:d2e(e.datum.Year1Quantity)},{label:"".concat(i.year2," Carbon emissions (kgCO2e)"),value:d2e(e.datum.Year2Quantity)}]})}}],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:Zan({position:"bottom"},m)}),[y,p,l,m,i.year1,i.year2]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon emissions (kgCO2e) over time",loading:c,error:d,retry:u,noData:b,ref:o,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:v})})},r?"exporting-pdf":void 0)};function nrn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function trn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nrn(Object(t),!0).forEach(function(n){arn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nrn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function arn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const rrn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c,doesSheetHavePeriodFilters:d}=J1e(),{data:u,loading:p,error:m,refetch:f}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"TransportByLocationReport",aggregation:{functions:[{field:"TotalDistance(km)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:d?Vt.v7.Period:c,alias:"Period"}]}}}),y=null===(n=h2e(null==u?void 0:u.getDashboardTileData))||void 0===n?void 0:n.map(e=>trn(trn({},e),{},{"TotalDistance(km)":o2e(e["TotalDistance(km)"]),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),g=null==y||null===(t=y[0])||void 0===t?void 0:t["TotalDistance(km)"],b=null==y||null===(a=y[1])||void 0===a?void 0:a["TotalDistance(km)"],v=null==y||null===(r=y[0])||void 0===r?void 0:r.Date,x=null==y||null===(i=y[1])||void 0===i?void 0:i.Date,T=(Number.isNaN(g)||null===g)&&(Number.isNaN(b)||null===b);return(0,Ze.jsx)(F4e,{title:o.title||"Total distance traveled (km)",loading:p,error:m,retry:f,noData:T,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]}),(0,Ze.jsx)(i6e,{value1:g,value2:b}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:x}),(0,Ze.jsx)(e6e,{children:d2e(b)})]})]})})};function irn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function orn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?irn(Object(t),!0).forEach(function(n){lrn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):irn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function lrn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const srn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c,doesSheetHavePeriodFilters:d}=J1e(),{data:u,loading:p,error:m,refetch:f}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"TransportByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:d?Vt.v7.Period:c,alias:"Period"}]}}}),y=null===(n=h2e(null==u?void 0:u.getDashboardTileData))||void 0===n?void 0:n.map(e=>orn(orn({},e),{},{CO2e:o2e(e.CO2e),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),g=null==y||null===(t=y[0])||void 0===t?void 0:t.CO2e,b=null==y||null===(a=y[1])||void 0===a?void 0:a.CO2e,v=null==y||null===(r=y[0])||void 0===r?void 0:r.Date,x=null==y||null===(i=y[1])||void 0===i?void 0:i.Date,T=(Number.isNaN(g)||null===g)&&(Number.isNaN(b)||null===b);return(0,Ze.jsx)(F4e,{title:o.title||"Total carbon emitted (kgCO2e)",loading:p,error:m,retry:f,noData:T,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]}),(0,Ze.jsx)(i6e,{value1:g,value2:b}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:x}),(0,Ze.jsx)(e6e,{children:d2e(b)})]})]})})};function crn(e){switch(e.type){case Vt.Rh.TransportTotalDistanceTraveledKpiTile:return(0,Ze.jsx)(han,{dataset:"TransportByLocationReport",aggregationField:"TotalDistance(km)",tile:e,title:()=>"Total distance traveled (km)",formatter:Oan({type:"distance",field:"TotalDistance(km)",originalUnit:"km"})});case Vt.Rh.TransportTotalCostKpiTile:return(0,Ze.jsx)(han,{dataset:"TransportByLocationReport",aggregationField:"TotalCost(£)",tile:e,title:e=>{let{withVat:n}=e;return"Total cost (£) ".concat(m2e(n))},formatter:Oan({type:"money",field:"TotalCost(£)"})});case Vt.Rh.TransportTotalEmissionsKpiTile:return(0,Ze.jsx)(han,{dataset:"TransportByLocationReport",aggregationField:"CO2e",tile:e,title:()=>"Total carbon emitted (kgCO2e)",formatter:Oan({type:"mass",field:"CO2e",originalUnit:"kg"})});case Vt.Rh.TransportEmissionsPerLocationPieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"TransportByLocationReport",aggregationField:"CO2e",partitionField:"LocationName",title:()=>"Breakdown of emissions per location (%)",formatter:Nan({type:"mass",originalUnit:"kg",field:"CO2e",label:()=>"Carbon emissions (kgCO2e)",partitionField:"LocationName"})});case Vt.Rh.TransportEmissionsPerPurposePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"TransportByLocationReport",aggregationField:"CO2e",partitionField:"Purpose",title:()=>"Breakdown of emissions per purpose (%)",formatter:Nan({type:"mass",originalUnit:"kg",field:"CO2e",label:()=>"Carbon emissions (kgCO2e)",partitionField:"Purpose"})});case Vt.Rh.TransportEmissionsPerTypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"TransportByLocationReport",aggregationField:"CO2e",partitionField:"Type",title:()=>"Breakdown of emissions per type (%)",formatter:Nan({type:"mass",originalUnit:"kg",field:"CO2e",label:()=>"Carbon emissions (kgCO2e)",partitionField:"Type"})});case Vt.Rh.TransportEmissionsPerSubtypePieTile:return(0,Ze.jsx)(kan,{tile:e,dataset:"TransportByLocationReport",aggregationField:"CO2e",partitionField:"Subtype",title:()=>"Breakdown of emissions per subtype (%)",formatter:Nan({type:"mass",originalUnit:"kg",field:"CO2e",label:()=>"Carbon emissions (kgCO2e)",partitionField:"Subtype"})});case Vt.Rh.TransportTravelActivityPerLocationTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.WasteConsumptionByLocationTableTile,dataset:"TransportByLocationReportFlat",aggregationFields:["Distance(km)","Volume(L)","TotalCost(£)","CarbonEmissionScope1","CarbonEmissionScope2","CarbonEmissionScope3"],partitionFields:["Country","LocationCode","LocationName"],title:()=>"Annual figures per location",formatter:Pan({quantities:[{type:"distance",title:()=>"Distance (km)",alias:"Distance(km)",field:"Distance(km)",originalUnit:"km"},{type:"money",title:e=>{let{withVat:n}=e;return"Cost (£) ".concat(m2e(n))},alias:"TotalCost",field:"TotalCost(£)"},{type:"volume",title:()=>"Volume (L)",alias:"Volume(L)",field:"Volume(L)",originalUnit:"L"},{type:"mass",title:()=>"Scope 1 emissions (kgCO2e)",alias:"CarbonEmissionScope1",field:"CarbonEmissionScope1",originalUnit:"kg"},{type:"mass",title:()=>"Scope 2 emissions (kgCO2e)",alias:"CarbonEmissionScope2",field:"CarbonEmissionScope2",originalUnit:"kg"},{type:"mass",title:()=>"Scope 3 emissions (kgCO2e)",alias:"CarbonEmissionScope3",field:"CarbonEmissionScope3",originalUnit:"kg"}],partitionField:"LocationName",additionalFields:["Country","LocationCode"]})});case Vt.Rh.TransportTotalDistanceTraveledYearOnYearKpiTile:return(0,Ze.jsx)(rrn,{tile:e});case Vt.Rh.TransportTotalEmissionsYearOnYearKpiTile:return(0,Ze.jsx)(srn,{tile:e});case Vt.Rh.TransportCarbonOverTimeYearOnYearBarTile:return(0,Ze.jsx)(ern,{tile:e});case Vt.Rh.TransportCarbonAndDistanceTraveledOverTimeBarTile:return(0,Ze.jsx)(Kan,{tile:e});case Vt.Rh.TransportAnnualFiguresPerLocationYearOnYearTableTile:return(0,Ze.jsx)(qan,{tile:e});default:return null}}function drn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function urn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?drn(Object(t),!0).forEach(function(n){prn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):drn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function prn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const mrn=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,withVat:i,selectedUnit:o}=J1e(),l=(0,g.useRef)(null),s=Y1e(l),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"Consumption(m3)",aggregationType:Vt.DF.Sum},{field:"TotalCost",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Accuracy"}]}}}),{chartTheme:m,legendTheme:y}=(0,f.useAgChartsTheme)(n.colors),b=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==c?void 0:c.getDashboardTileData))||void 0===n?void 0:n.map(e=>urn(urn({},e),{},{"Consumption(m3)":o2e(e["Consumption(m3)"],{originalUnit:"m3",targetUnit:o}),TotalCost:o2e(e.TotalCost,{withVat:i}),Date:s2e(e.Month),Accuracy:T2e(e.Accuracy)})),["Date"],"Accuracy","Consumption(m3)"))||void 0===e?void 0:e.sort(c2e)},[c,i,o]),v=Boolean(b&&0===b.length),x=(0,g.useMemo)(()=>({theme:m,legend:y,width:s,data:b||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"AccuracyActualConsumption(m3)",yName:"Actual Consumption (".concat(o,")"),stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Actual Consumption (".concat(o,")"),value:d2e(e.datum["AccuracyActualConsumption(m3)"])},{label:"Estimated Consumption (".concat(o,")"),value:d2e(e.datum["AccuracyEstimatedConsumption(m3)"])},{label:"Total Consumption (".concat(o,")"),value:d2e((e.datum["AccuracyActualConsumption(m3)"]||0)+(e.datum["AccuracyEstimatedConsumption(m3)"]||0))}]})}},{type:"bar",xKey:"Date",yKey:"AccuracyEstimatedConsumption(m3)",yName:"Estimated Consumption (".concat(o,")"),stacked:!0,fillOpacity:1,tooltip:{range:"nearest",renderer:e=>({data:[{label:"Estimated Consumption (".concat(o,")"),value:d2e(e.datum["AccuracyEstimatedConsumption(m3)"])},{label:"Actual Consumption (".concat(o,")"),value:d2e(e.datum["AccuracyActualConsumption(m3)"])},{label:"Total Consumption (".concat(o,")"),value:d2e((e.datum["AccuracyActualConsumption(m3)"]||0)+(e.datum["AccuracyEstimatedConsumption(m3)"]||0))}]})}},{type:"line",xKey:"Date",yKey:"TotalCost",yName:"Cost (£)",tooltip:{renderer:e=>({data:[{label:"Total Cost (£) ".concat(m2e(i)),value:d2e(e.datum.TotalCost)}]})}}],axes:[{type:"number",position:"left",keys:["AccuracyActualConsumption(m3)","AccuracyEstimatedConsumption(m3)"],label:{formatter:e=>p2e(e.value)}},{type:"number",position:"right",keys:["TotalCost"],label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}]}),[b,m,s,y,o,i]);return(0,Ze.jsx)(F4e,{title:n.title||"Cost (£) ".concat(m2e(i),", consumption (").concat(o,") over time"),loading:d,error:u,retry:p,noData:v,ref:l,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:x})})},r?"exporting-pdf":void 0)};function frn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function yrn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?frn(Object(t),!0).forEach(function(n){grn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):frn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function grn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const brn=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r}=J1e(),i=(0,g.useRef)(null),o=Y1e(i),{data:l,loading:s,error:c,refetch:d}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month},{field:"Scope"}]}}}),{chartTheme:u,legendTheme:p}=(0,f.useAgChartsTheme)(n.colors||[f.AgChartColor.PINK_1,f.AgChartColor.BLUE_1,f.AgChartColor.GREEN_1]),m=(0,g.useMemo)(()=>{var e,n;return null===(e=b2e(null===(n=h2e(null==l?void 0:l.getDashboardTileData))||void 0===n?void 0:n.map(e=>yrn(yrn({},e),{},{CO2e:o2e(e.CO2e),Date:s2e(e.Month),Scope:e.Scope})),["Date"],"Scope","CO2e","TotalCO2e"))||void 0===e?void 0:e.sort(c2e)},[l]),y=Boolean(m&&0===m.length),b=(0,g.useMemo)(()=>({theme:u,width:o,data:m||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Date",yKey:"Scope1CO2e",yName:"Scope 1 (kgCO2e)",stacked:!0,fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Scope 1 (kgCO2e)",value:d2e(e.datum.Scope1CO2e)},{label:"Scope 2 (kgCO2e)",value:d2e(e.datum.Scope2CO2e)},{label:"Scope 3 (kgCO2e)",value:d2e(e.datum.Scope3CO2e)},{label:"Total kgCO2e",value:d2e(e.datum.TotalCO2e)}]})}},{type:"bar",xKey:"Date",yKey:"Scope2CO2e",yName:"Scope 2 (kgCO2e)",stacked:!0,fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Scope 2 (kgCO2e)",value:d2e(e.datum.Scope2CO2e)},{label:"Scope 1 (kgCO2e)",value:d2e(e.datum.Scope1CO2e)},{label:"Scope 3 (kgCO2e)",value:d2e(e.datum.Scope3CO2e)},{label:"Total kgCO2e",value:d2e(e.datum.TotalCO2e)}]})}},{type:"bar",xKey:"Date",yKey:"Scope3CO2e",yName:"Scope 3 (kgCO2e)",stacked:!0,fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"Scope 3 (kgCO2e)",value:d2e(e.datum.Scope3CO2e)},{label:"Scope 1 (kgCO2e)",value:d2e(e.datum.Scope1CO2e)},{label:"Scope 2 (kgCO2e)",value:d2e(e.datum.Scope2CO2e)},{label:"Total kgCO2e",value:d2e(e.datum.TotalCO2e)}]})}}],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:yrn({position:"bottom"},p)}),[m,u,o,p]);return(0,Ze.jsx)(F4e,{title:n.title||"Carbon emissions by scope (kgCO2e)",loading:s,error:c,retry:d,noData:y,ref:i,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:b})})},r?"exporting-pdf":void 0)};function hrn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vrn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hrn(Object(t),!0).forEach(function(n){xrn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hrn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xrn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Trn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c,doesSheetHavePeriodFilters:d,selectedUnit:u}=J1e(),{data:p,loading:m,error:f,refetch:y}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"Consumption(m3)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:d?Vt.v7.Period:c,alias:"Period"}]}}}),g=null===(n=h2e(null==p?void 0:p.getDashboardTileData))||void 0===n?void 0:n.map(e=>vrn(vrn({},e),{},{"Consumption(m3)":o2e(e["Consumption(m3)"],{originalUnit:"m3",targetUnit:u}),Period:e.Period})).sort((e,n)=>new Date(e.Period).getTime()-new Date(n.Period).getTime()),b=null==g||null===(t=g[0])||void 0===t?void 0:t["Consumption(m3)"],v=null==g||null===(a=g[1])||void 0===a?void 0:a["Consumption(m3)"],x=null==g||null===(r=g[0])||void 0===r?void 0:r.Period,T=null==g||null===(i=g[1])||void 0===i?void 0:i.Period,O=(Number.isNaN(b)||null===b)&&(Number.isNaN(v)||null===v);return(0,Ze.jsx)(F4e,{title:o.title||"Total consumption (".concat(u,")"),loading:m,error:f,retry:y,noData:O,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:x}),(0,Ze.jsx)(e6e,{children:d2e(b)})]}),(0,Ze.jsx)(i6e,{value1:b,value2:v}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:T}),(0,Ze.jsx)(e6e,{children:d2e(v)})]})]})})};function Orn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function krn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Orn(Object(t),!0).forEach(function(n){jrn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Orn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jrn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Crn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c,doesSheetHavePeriodFilters:d}=J1e(),{data:u,loading:p,error:m,refetch:f}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:d?Vt.v7.Period:c,alias:"Period"}]}}}),y=null===(n=h2e(null==u?void 0:u.getDashboardTileData))||void 0===n?void 0:n.map(e=>krn(krn({},e),{},{CO2e:o2e(e.CO2e),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),g=null==y||null===(t=y[0])||void 0===t?void 0:t.CO2e,b=null==y||null===(a=y[1])||void 0===a?void 0:a.CO2e,v=null==y||null===(r=y[0])||void 0===r?void 0:r.Date,x=null==y||null===(i=y[1])||void 0===i?void 0:i.Date,T=(Number.isNaN(g)||null===g)&&(Number.isNaN(b)||null===b);return(0,Ze.jsx)(F4e,{title:o.title||"Total carbon emitted (kgCO2e)",loading:p,error:m,retry:f,noData:T,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:v}),(0,Ze.jsx)(e6e,{children:d2e(g)})]}),(0,Ze.jsx)(i6e,{value1:g,value2:b}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:x}),(0,Ze.jsx)(e6e,{children:d2e(b)})]})]})})};function Srn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Nrn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Srn(Object(t),!0).forEach(function(n){wrn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Srn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function wrn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Drn=e=>{var n,t,a,r,i;let{tile:o}=e;const l=rt(),{queryVariablesFilters:s,partitionFunctionForYearComparison:c,doesSheetHavePeriodFilters:d,withVat:u}=J1e(),{data:p,loading:m,error:f,refetch:y}=(0,h.IT)(V3e,{variables:{accountId:l,datasetFilters:s,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"TotalCost",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:d?Vt.v7.Period:c,alias:"Period"}]}}}),g=null===(n=h2e(null==p?void 0:p.getDashboardTileData))||void 0===n?void 0:n.map(e=>Nrn(Nrn({},e),{},{TotalCost:o2e(e.TotalCost,{withVat:u}),Date:e.Period})).sort((e,n)=>new Date(e.Date).getTime()-new Date(n.Date).getTime()),b=null==g||null===(t=g[0])||void 0===t?void 0:t.TotalCost,v=null==g||null===(a=g[1])||void 0===a?void 0:a.TotalCost,x=null==g||null===(r=g[0])||void 0===r?void 0:r.Date,T=null==g||null===(i=g[1])||void 0===i?void 0:i.Date,O=(Number.isNaN(b)||null===b)&&(Number.isNaN(v)||null===v);return(0,Ze.jsx)(F4e,{title:o.title||"Total cost (£) ".concat(m2e(u)),loading:m,error:f,retry:y,noData:O,children:(0,Ze.jsxs)(Q4e,{children:[(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:x}),(0,Ze.jsx)(e6e,{children:d2e(b)})]}),(0,Ze.jsx)(i6e,{value1:b,value2:v}),(0,Ze.jsxs)(Z4e,{children:[(0,Ze.jsx)(X4e,{children:T}),(0,Ze.jsx)(e6e,{children:d2e(v)})]})]})})};function Arn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Rrn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Arn(Object(t),!0).forEach(function(n){Prn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Arn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Prn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Lrn=e=>{let{tile:n}=e;const t=rt(),{queryVariablesFilters:a,isExportingPdf:r,filters:i,selectedUnit:o}=J1e(),l=(0,g.useRef)(null),s=Y1e(l),{data:c,loading:d,error:u,refetch:p}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:a,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"Consumption(m3)",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:Vt.v7.Month}]}}}),{chartTheme:m,legendTheme:y}=(0,f.useAgChartsTheme)(n.colors),b=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==c?void 0:c.getDashboardTileData))||void 0===e||null===(e=e.map(e=>Rrn(Rrn({},e),{},{"Consumption(m3)":o2e(e["Consumption(m3)"],{originalUnit:"m3",targetUnit:o}),Date:s2e(e.Month)})).reduce((e,n)=>{const t=(0,$8e.m)(e),a=O1e(i.year1),r=k1e(i.year1),o=k1e(i.year2),l=Wt()(n.Date,"MMM YYYY").format("MMM"),s=Wt()(n.Date,"MMM YYYY").year()-(a===Ma.YearToCompareType.CALENDAR?0:Wt()(n.Date,"MMM YYYY").month()<4?1:0),c=t.findIndex(e=>e.Month===l&&null!==e.Year1Quantity);if(-1!==c)return t[c].Year2Quantity=Number(n["Consumption(m3)"]),t;const d=e.findIndex(e=>e.Month===l&&null!==e.Year2Quantity);return-1!==d?(t[d].Year1Quantity=Number(n["Consumption(m3)"]),t):[...t,Rrn(Rrn({},n),{},{Year1Quantity:s===r?Number(n["Consumption(m3)"]):null,Year2Quantity:s===o?Number(n["Consumption(m3)"]):null,Month:l})]},[]))||void 0===e?void 0:e.sort((e,n)=>O1e(i.year1)===Ma.YearToCompareType.CALENDAR?Wt()(e.Month,"MMM").toDate().getTime()-Wt()(n.Month,"MMM").toDate().getTime():j1e.indexOf(e.Month)-j1e.indexOf(n.Month))},[c,i.year1,i.year2,o]),v=Boolean(b&&0===b.length),x=(0,g.useMemo)(()=>({theme:m,width:s,data:b||[],zoom:{enabled:!0},series:[{type:"bar",xKey:"Month",yKey:"Year1Quantity",yName:"".concat(i.year1," Consumption (").concat(o,")"),fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"".concat(i.year1," Consumption (").concat(o,")"),value:d2e(e.datum.Year1Quantity)},{label:"".concat(i.year2," Consumption (").concat(o,")"),value:d2e(e.datum.Year2Quantity)}]})}},{type:"bar",xKey:"Month",yKey:"Year2Quantity",yName:"".concat(i.year2," Consumption (").concat(o,")"),fillOpacity:1,tooltip:{renderer:e=>({data:[{label:"".concat(i.year1," Consumption (").concat(o,")"),value:d2e(e.datum.Year1Quantity)},{label:"".concat(i.year2," Consumption (").concat(o,")"),value:d2e(e.datum.Year2Quantity)}]})}}],axes:[{type:"number",position:"left",label:{formatter:e=>p2e(e.value)}},{type:"category",position:"bottom"}],legend:Rrn({position:"bottom"},y)}),[b,m,s,y,i.year1,i.year2,o]);return(0,Ze.jsx)(F4e,{title:n.title||"Annual consumption (".concat(o,") over time"),loading:d,error:u,retry:p,noData:v,ref:l,children:(0,Ze.jsx)(T6e,{children:(0,Ze.jsx)(h5e.ui,{options:x})})},r?"exporting-pdf":void 0)};function Irn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ern(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Irn(Object(t),!0).forEach(function(n){_rn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Irn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _rn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Frn=e=>{let{tile:n}=e;const t=rt(),a=(0,g.useRef)(null),r=(0,g.useRef)(null),{queryVariablesFilters:i,activeSheet:o,dashboardId:l,filters:s,withVat:c,selectedUnit:d,doesSheetHavePeriodFilters:u,partitionFunctionForYearComparison:p}=J1e(),{data:m,loading:f,error:y,refetch:b}=(0,h.IT)(V3e,{variables:{accountId:t,datasetFilters:i,datasetName:"WaterByLocationReport",aggregation:{functions:[{field:"Consumption(m3)",aggregationType:Vt.DF.Sum},{field:"TotalCost",aggregationType:Vt.DF.Sum},{field:"CO2e",aggregationType:Vt.DF.Sum}],partitions:[{field:"Date",partitionFunction:u?Vt.v7.Period:p,alias:"Period"},{field:"Country"},{field:"LocationCode"},{field:"LocationName"}]}}}),v=(0,g.useMemo)(()=>{var e;return null===(e=h2e(null==m?void 0:m.getDashboardTileData))||void 0===e||null===(e=e.map(e=>Ern(Ern({},e),{},{Country:l2e(e.Country),LocationCode:l2e(e.LocationCode),LocationName:l2e(e.LocationName),Quantity:o2e(e.Quantity,{originalUnit:"m3",targetUnit:d}),TotalCost:o2e(e.TotalCost,{withVat:c}),CO2e:o2e(e.CO2e)})))||void 0===e?void 0:e.sort((e,n)=>e.Country!==n.Country?e.Country.toLowerCase().localeCompare(n.Country.toLowerCase()):e.LocationCode!==n.LocationCode?e.LocationCode.toLowerCase().localeCompare(n.LocationCode.toLowerCase()):e.LocationName!==n.LocationName?e.LocationName.toLowerCase().localeCompare(n.LocationName.toLowerCase()):1)},[m,c,d]),x=Boolean(v&&0===v.length),T=(0,g.useMemo)(()=>[{headerName:"Country",field:"Country",rowGroup:!0,hide:!0},{headerName:"Location Code",field:"LocationCode",rowGroup:!0,hide:!0},{headerName:"Location Name",field:"LocationName",rowGroup:!0,hide:!0},{headerName:"Year",field:"Period",pivot:!0},{headerName:"Consumption (".concat(d,")"),field:"Consumption(m3)",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Cost (£) ".concat(m2e(c)),field:"TotalCost",aggFunc:"sum",valueFormatter:e=>d2e(e.value)},{headerName:"Carbon (kgCO2e)",field:"CO2e",aggFunc:"sum",valueFormatter:e=>d2e(e.value)}],[c,d]);return(0,g.useEffect)(()=>{var e;null===(e=r.current)||void 0===e||null===(e=e.gridApi)||void 0===e||e.resetColumnState()},[s]),(0,Ze.jsx)(F4e,{title:n.title||"Consumption per location",loading:f,error:y,retry:b,noData:x,ref:a,children:(0,Ze.jsx)(c6e,{ref:r,gridKey:"".concat(t,"-").concat(l,"-").concat(o,"-ConsumptionPerLocationTableTile"),disableColumnStateRestoration:!0,gridOptions:{groupHideOpenParents:!0,groupDefaultExpanded:-1,suppressAggFuncInHeader:!0,autoSizeStrategy:{type:"fitCellContents"},autoGroupColumnDef:{cellRendererParams:{suppressCount:!0}},pivotMode:!0,columnDefs:T,rowData:v}})})};function Brn(e){switch(e.type){case Vt.Rh.WaterTotalConsumptionKpiTile:return(0,Ze.jsx)(han,{dataset:"WaterByLocationReport",aggregationField:"Consumption(m3)",tile:e,title:e=>{let{selectedUnit:n}=e;return"Total consumption (".concat(n,")")},formatter:Oan({type:"volume",field:"Consumption(m3)",originalUnit:"m3"})});case Vt.Rh.WaterTotalTreatmentKpiTile:return(0,Ze.jsx)(han,{dataset:"WaterByLocationReport",aggregationField:"Treatment(m3)",tile:e,title:e=>{let{selectedUnit:n}=e;return"Total treatment (".concat(n,")")},formatter:Oan({type:"volume",field:"Treatment(m3)",originalUnit:"m3"})});case Vt.Rh.WaterTotalCostKpiTile:return(0,Ze.jsx)(han,{dataset:"WaterByLocationReport",aggregationField:"TotalCost",tile:e,title:e=>{let{withVat:n}=e;return"Total cost (£) ".concat(m2e(n))},formatter:Oan({type:"money",field:"TotalCost"})});case Vt.Rh.WaterTotalEmissionsKpiTile:return(0,Ze.jsx)(han,{dataset:"WaterByLocationReport",aggregationField:"CO2e",tile:e,title:()=>"Total carbon emitted (kgCO2e)",formatter:Oan({type:"mass",field:"CO2e",originalUnit:"kg"})});case Vt.Rh.WaterCostConsumptionTreatmentOverTimeBarTile:return(0,Ze.jsx)(mrn,{tile:e});case Vt.Rh.WaterCarbonEmissionsByScopeOverTimeBarTile:return(0,Ze.jsx)(brn,{tile:e});case Vt.Rh.WaterCostConsumptionEmissionsPerLocationTableTile:return(0,Ze.jsx)(wan,{tile:e,type:Vt.Rh.WasteConsumptionByLocationTableTile,dataset:"WaterByLocationReport",aggregationFields:["Consumption(m3)","TotalCost","CO2e"],partitionFields:["Country","LocationCode","LocationName"],title:()=>"Consumption per location",formatter:Pan({quantities:[{type:"volume",title:e=>{let{selectedUnit:n}=e;return"Consumption (".concat(n,")")},alias:"Consumption(m3)",field:"Consumption(m3)",originalUnit:"m3"},{type:"money",title:e=>{let{withVat:n}=e;return"Cost (£) ".concat(m2e(n))},alias:"TotalCost",field:"TotalCost"},{type:"mass",title:()=>"Carbon emissions (kgCO2e)",alias:"CO2e",field:"CO2e",originalUnit:"kg"}],partitionField:"LocationName",additionalFields:["Country","LocationCode"]})});case Vt.Rh.WaterConsumptionYearOnYearComparisonKpiTile:return(0,Ze.jsx)(Trn,{tile:e});case Vt.Rh.WaterEmissionsYearOnYearComparisonKpiTile:return(0,Ze.jsx)(Crn,{tile:e});case Vt.Rh.WaterCostYearOnYearComparisonKpiTile:return(0,Ze.jsx)(Drn,{tile:e});case Vt.Rh.WaterAnnualConsumptionOverTimeComparisonBarTile:return(0,Ze.jsx)(Lrn,{tile:e});case Vt.Rh.WaterCostConsumptionEmissionsPerLocationComparisonTableTile:return(0,Ze.jsx)(Frn,{tile:e});default:return null}}const Urn=(0,g.memo)(e=>{let{tile:n}=e;const t=X7e[n.type];if(t)return(0,Ze.jsx)(J7e,{tile:n,config:t});const a=[Van,Uan,Man,zan,crn,Brn];for(const e of a){const t=e(n);if(t)return t}switch(n.type){case Vt.Rh.TotalElectricityConsumption:return(0,Ze.jsx)(o6e,{tile:n});case Vt.Rh.TotalElectricityCost:return(0,Ze.jsx)(l6e,{tile:n});case Vt.Rh.ElectricityConsumptionByLocation:return(0,Ze.jsx)(m6e,{tile:n});case Vt.Rh.TotalElectricityGrossCarbonEmissions:return(0,Ze.jsx)(f6e,{tile:n});case Vt.Rh.TotalElectricityGrossCarbonEmissionsPeriodComparisonKpiTile:return(0,Ze.jsx)(Oen,{tile:n});case Vt.Rh.TotalElectricityNetCarbonEmissions:return(0,Ze.jsx)(y6e,{tile:n});case Vt.Rh.TotalElectricityNetCarbonEmissionsPeriodComparisonKpiTile:return(0,Ze.jsx)(Sen,{tile:n});case Vt.Rh.TotalElectricityConsumptionPeriodComparisonKpiTile:return(0,Ze.jsx)(fen,{tile:n});case Vt.Rh.TotalElectricityCostPeriodComparisonKpiTile:return(0,Ze.jsx)(hen,{tile:n});case Vt.Rh.ElectricityConsumptionByCountryAndScope:return(0,Ze.jsx)(v6e,{tile:n});case Vt.Rh.ElectricityCostAndConsupmtionOverTime:return(0,Ze.jsx)(C6e,{tile:n});case Vt.Rh.ElectricityGrossCarbonEmissionsByScope:return(0,Ze.jsx)(D6e,{tile:n});case Vt.Rh.TotalCarbonEmissions:return(0,Ze.jsx)(L6e,{tile:n});case Vt.Rh.TotalCarbonEmissionsPeriodComparisonKpiTile:return(0,Ze.jsx)(y8e,{tile:n});case Vt.Rh.TotalCarbonCostPeriodComparisonKpiTile:return(0,Ze.jsx)(u8e,{tile:n});case Vt.Rh.CarbonEmissionsBySourceBar:return(0,Ze.jsx)(F6e,{tile:n});case Vt.Rh.CarbonEmissionsByScopePie:return(0,Ze.jsx)(V6e,{tile:n});case Vt.Rh.CarbonEmissionsByDataTypeBar:return(0,Ze.jsx)(W6e,{tile:n});case Vt.Rh.CarbonEmissionsByScopeAndSourceTable:return(0,Ze.jsx)(H6e,{tile:n});case Vt.Rh.CarbonWttAndTdEmissionsBySourceTableTile:return(0,Ze.jsx)(X6e,{tile:n});case Vt.Rh.CarbonEmissionsByCountryBar:return(0,Ze.jsx)(a7e,{tile:n});case Vt.Rh.CarbonEmissionsByCountryAndScopeTable:return(0,Ze.jsx)(l7e,{tile:n});case Vt.Rh.CarbonEmissionsByCountryMap:return(0,Ze.jsx)(p7e,{tile:n});case Vt.Rh.Top_3CarbonEmissionCountriesTable:return(0,Ze.jsx)(g7e,{tile:n});case Vt.Rh.Bottom_3CarbonEmissionCountriesTable:return(0,Ze.jsx)(x7e,{tile:n});case Vt.Rh.CarbonEmissionsByScopeForPeriod_1PieTile:return(0,Ze.jsx)(a8e,{tile:n,period:"Period 1"});case Vt.Rh.CarbonEmissionsByScopeForPeriod_2PieTile:return(0,Ze.jsx)(a8e,{tile:n,period:"Period 2"});case Vt.Rh.CarbonEmissionsBySourceForPeriod_1BarTile:return(0,Ze.jsx)(l8e,{tile:n,period:"Period 1"});case Vt.Rh.CarbonEmissionsBySourceForPeriod_2BarTile:return(0,Ze.jsx)(l8e,{tile:n,period:"Period 2"});case Vt.Rh.ResourcesUsedByScopeTable:return(0,Ze.jsx)(j7e,{tile:n});case Vt.Rh.ResourcesUsedByLocationTable:return(0,Ze.jsx)(P7e,{tile:n});case Vt.Rh.QuantityAndCo2EByLocationAndMeterTable:return(0,Ze.jsx)(_7e,{tile:n});case Vt.Rh.ProportionOfActVsEstPie:return(0,Ze.jsx)(w7e,{tile:n});case Vt.Rh.TotalEnergyConsumptionKpiTile:return(0,Ze.jsx)(g8e,{tile:n});case Vt.Rh.TotalEnergyGrossCarbonEmissionsKpiTile:return(0,Ze.jsx)(b8e,{tile:n});case Vt.Rh.TotalEnergyNetCarbonEmissionsKpiTile:return(0,Ze.jsx)(h8e,{tile:n});case Vt.Rh.TotalEnergyCostKpiTile:return(0,Ze.jsx)(v8e,{tile:n});case Vt.Rh.EnergyCostAndConsumptionBarTile:return(0,Ze.jsx)(k8e,{tile:n});case Vt.Rh.EnergyCarbonEmissionsByScopeBarTile:return(0,Ze.jsx)(N8e,{tile:n});case Vt.Rh.EnergyConsumptionPerLocationTableTile:return(0,Ze.jsx)(R8e,{tile:n});case Vt.Rh.EnergyConsumptionByScopeAndTariffTableTile:return(0,Ze.jsx)(E8e,{tile:n});case Vt.Rh.TotalEnergyConsumptionYearOnYearKpiTile:return(0,Ze.jsx)(U8e,{tile:n});case Vt.Rh.TotalEnergyGrossCarbonEmissionsYearOnYearKpiTile:return(0,Ze.jsx)(t9e,{tile:n});case Vt.Rh.TotalEnergyNetCarbonEmissionsYearOnYearKpiTile:return(0,Ze.jsx)(o9e,{tile:n});case Vt.Rh.TotalEnergyCostYearOnYearKpiTile:return(0,Ze.jsx)(G8e,{tile:n});case Vt.Rh.MonthlyEnergyConsumptionYearOnYearBarTile:return(0,Ze.jsx)(Y8e,{tile:n});case Vt.Rh.AnnualEnergyFiguresPerLocationTableTile:return(0,Ze.jsx)(Z8e,{tile:n});case Vt.Rh.TotalWasteWeightKpiTile:return(0,Ze.jsx)(d9e,{tile:n});case Vt.Rh.TotalWasteCostKpiTile:return(0,Ze.jsx)(u9e,{tile:n});case Vt.Rh.TotalWasteCarbonEmissionsKpiTile:return(0,Ze.jsx)(han,{dataset:"WasteByLocationReport",aggregationField:"CO2e(kg)",tile:n,title:e=>{let{selectedUnit:n}=e;return"Total carbon emitted (".concat(n,"CO2e)")},formatter:Oan({type:"mass",field:"CO2e(kg)",originalUnit:"kg"})});case Vt.Rh.PercentageDivertedFromDisposalKpiTile:return(0,Ze.jsx)(p9e,{tile:n});case Vt.Rh.WasteCostAndWeightOverTimeBarTile:return(0,Ze.jsx)(Lan,{tile:n,title:e=>{let{selectedUnit:n}=e;return"Waste cost and weight over time (".concat(n,")")},dataset:"WasteByLocationReport",aggregationFields:["Quantity(t)","TotalCost(£)"],partitionFields:[["Date",Vt.v7.Month],"Accuracy"],formatter:Ban({type:"mass",field:"Quantity(t)",totalCostField:"TotalCost(£)",labels:e=>{let{selectedUnit:n}=e;return{actual:"Actual Weight (".concat(n,")"),estimated:"Estimated Weight (".concat(n,")"),total:"Total Weight (".concat(n,")")}},originalUnit:"t"})});case Vt.Rh.WasteHierarchyByTypeDonutTile:return(0,Ze.jsx)(g9e,{tile:n});case Vt.Rh.WasteCarbonEmissionsByScopeBarTile:return(0,Ze.jsx)(x9e,{tile:n});case Vt.Rh.WasteByWasteStreamPieTile:return(0,Ze.jsx)(kan,{tile:n,dataset:"WasteByLocationReport",aggregationField:"Quantity(t)",partitionField:"WasteStream",title:e=>{let{selectedUnit:n}=e;return"Weight % by waste stream (".concat(n,")")},formatter:Nan({type:"mass",originalUnit:"t",field:"Quantity(t)",label:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")},partitionField:"WasteStream"})});case Vt.Rh.WasteConsumptionByLocationTableTile:return(0,Ze.jsx)(wan,{tile:n,type:Vt.Rh.WasteConsumptionByLocationTableTile,dataset:"WasteByLocationReport",aggregationFields:["Quantity(t)","TotalCost(£)","CO2e(kg)"],partitionFields:["Country","LocationCode","LocationName"],title:e=>{let{selectedUnit:n}=e;return"Consumption by location (".concat(n,")")},formatter:Pan({quantities:[{type:"mass",title:e=>{let{selectedUnit:n}=e;return"Weight (".concat(n,")")},alias:"Weight",field:"Quantity(t)",originalUnit:"t"},{type:"money",title:e=>{let{withVat:n}=e;return"Cost (£) ".concat(m2e(n))},alias:"TotalCost",field:"TotalCost(£)"},{type:"mass",title:e=>{let{selectedUnit:n}=e;return"Carbon emissions (".concat(n,"CO2e)")},alias:"CO2e",field:"CO2e(kg)",originalUnit:"kg"}],partitionField:"LocationName",additionalFields:["Country","LocationCode"]})});case Vt.Rh.TotalWasteWeightYearOnYearKpiTile:return(0,Ze.jsx)(j9e,{tile:n});case Vt.Rh.TotalWasteCarbonEmissionsYearOnYearKpiTile:return(0,Ze.jsx)(w9e,{tile:n});case Vt.Rh.TotalWasteCostYearOnYearKpiTile:return(0,Ze.jsx)(P9e,{tile:n});case Vt.Rh.TotalWasteCostPerTonnageYearOnYearKpiTile:return(0,Ze.jsx)(den,{tile:n});case Vt.Rh.AnnualWasteGenerationAndCostPerLocationTableTile:return(0,Ze.jsx)(_9e,{tile:n});case Vt.Rh.MonthlyWasteGenerationYearOnYearBarTile:return(0,Ze.jsx)(M9e,{tile:n});case Vt.Rh.MonthlyWasteGenerationAndCostYearOnYearBarTile:return(0,Ze.jsx)($9e,{tile:n});case Vt.Rh.WasteWeightOverTimeBarTile:return(0,Ze.jsx)(Y9e,{tile:n});case Vt.Rh.WasteCostByWasteStreamPieTile:return(0,Ze.jsx)(Z9e,{tile:n});case Vt.Rh.WasteStreamCostOverTimeBarTile:return(0,Ze.jsx)(ten,{tile:n});case Vt.Rh.WasteWeightOverTimeByWasteStreamBarTile:return(0,Ze.jsx)(oen,{tile:n});case Vt.Rh.WasteDisposalPercentagePeriodComparisonKpiTile:return(0,Ze.jsx)(Aen,{tile:n});case Vt.Rh.WasteRecycingPercentagePeriodComparisonKpiTile:return(0,Ze.jsx)(Ien,{tile:n});case Vt.Rh.WasteDisposalPercentageOverTimeBarTile:return(0,Ze.jsx)(Ben,{tile:n});case Vt.Rh.WasteRecyclingPercentageOverTimeBarTile:return(0,Ze.jsx)(zen,{tile:n});case Vt.Rh.WasteReusePercentagePeriodComparisonKpiTile:return(0,Ze.jsx)(qen,{tile:n});case Vt.Rh.WasteOtherRecoveryPercentagePeriodComparisonKpiTile:return(0,Ze.jsx)(Ken,{tile:n});case Vt.Rh.GasConsumptionPeriodComparisonKpiTile:return(0,Ze.jsx)(enn,{tile:n});case Vt.Rh.GasCarbonEmissionsPeriodComparisonKpiTile:return(0,Ze.jsx)(rnn,{tile:n});case Vt.Rh.GasCostAndConsumptionOverTimeBarTile:return(0,Ze.jsx)(snn,{tile:n});case Vt.Rh.GasCostPeriodComparisonKpiTile:return(0,Ze.jsx)(pnn,{tile:n});case Vt.Rh.GasAverageChargePerKilowattPeriodComparisonKpiTile:return(0,Ze.jsx)(gnn,{tile:n});case Vt.Rh.FuelConsumptionPeriodComparisonKpiTile:return(0,Ze.jsx)(xnn,{tile:n});case Vt.Rh.FuelCarbonEmissionsPeriodComparisonKpiTile:return(0,Ze.jsx)(jnn,{tile:n});case Vt.Rh.FuelCostAndConsumptionOverTimeBarTile:return(0,Ze.jsx)(wnn,{tile:n});case Vt.Rh.FuelCostPeriodComparisonKpiTile:return(0,Ze.jsx)(Pnn,{tile:n});case Vt.Rh.FuelAverageChargePerKilowattPeriodComparisonKpiTile:return(0,Ze.jsx)(_nn,{tile:n});case Vt.Rh.WaterConsumptionPeriodComparisonKpiTile:return(0,Ze.jsx)(Mnn,{tile:n});case Vt.Rh.WaterCarbonEmissionsPeriodComparisonKpiTile:return(0,Ze.jsx)($nn,{tile:n});case Vt.Rh.WaterCostAndConsumptionOverTimeBarTile:return(0,Ze.jsx)(Ynn,{tile:n});case Vt.Rh.WaterCostPeriodComparisonKpiTile:return(0,Ze.jsx)(Znn,{tile:n});case Vt.Rh.WaterAverageChargePerKilowattPeriodComparisonKpiTile:return(0,Ze.jsx)(ttn,{tile:n});case Vt.Rh.MaterialWeightPeriodComparisonKpiTile:return(0,Ze.jsx)(otn,{tile:n});case Vt.Rh.MaterialCarbonEmissionsPeriodComparisonKpiTile:return(0,Ze.jsx)(dtn,{tile:n});case Vt.Rh.MaterialWeightAndConsumptionOverTimeBarTile:return(0,Ze.jsx)(ftn,{tile:n});case Vt.Rh.MaterialCostPeriodComparisonKpiTile:return(0,Ze.jsx)(htn,{tile:n});case Vt.Rh.MaterialCostPerWeightEmissionsPeriodComparisonKpiTile:return(0,Ze.jsx)(Otn,{tile:n});case Vt.Rh.TransportCarbonEmissionsPeriodComparisonKpiTile:return(0,Ze.jsx)(Stn,{tile:n});case Vt.Rh.TransportCostPeriodComparisonKpiTile:return(0,Ze.jsx)(Atn,{tile:n});case Vt.Rh.TransportEmissionsAndCostOverTimeBarTile:return(0,Ze.jsx)(Lan,{tile:n,title:e=>{let{selectedUnit:n,withVat:t}=e;return"Carbon emissions (".concat(n,"CO2e) and cost (£) ").concat(m2e(t)," over time")},dataset:"TransportByLocationReport",aggregationFields:["CO2e","TotalCost(£)"],partitionFields:[["Date",Vt.v7.Month]],formatter:Fan({type:"mass",originalUnit:"kg",field:"CO2e",totalCostField:"TotalCost(£)",label:e=>{let{selectedUnit:n}=e;return"Carbon emissions (".concat(n,"CO2e)")}})});case Vt.Rh.EstatesReportGridTile:return(0,Ze.jsx)($tn,{});case Vt.Rh.SectionTitleTile:return(0,Ze.jsx)(qtn,{tile:n});case Vt.Rh.Scope_1CarbonSavingsKpiTile:return(0,Ze.jsx)(Ytn,{tile:n});case Vt.Rh.Scope_1CarbonSavingsOverTimeLineTile:return(0,Ze.jsx)(Htn,{tile:n});case Vt.Rh.AverageFlaringFromUpstreamOperationsKpiTile:return(0,Ze.jsx)(Ktn,{tile:n});case Vt.Rh.AverageFlaringFromUpstreamOperationsOverTimeLineTile:return(0,Ze.jsx)(Qtn,{tile:n});case Vt.Rh.FlaringIntensityKpiTile:return(0,Ze.jsx)(Ztn,{tile:n});case Vt.Rh.FlaringIntensityOverTimeLineTile:return(0,Ze.jsx)(Xtn,{tile:n});case Vt.Rh.CurrentYearCarbonIntensityKpiTile:return(0,Ze.jsx)(ean,{tile:n});case Vt.Rh.PastYearCarbonIntensityKpiTile:return(0,Ze.jsx)(nan,{tile:n});case Vt.Rh.CarbonIntensityReductionKpiTile:return(0,Ze.jsx)(tan,{tile:n});case Vt.Rh.CarbonIntensityOverTimeLineTile:return(0,Ze.jsx)(aan,{tile:n});case Vt.Rh.CarbonIntensityReductionOverTimeLineTile:return(0,Ze.jsx)(ban,{tile:n});case Vt.Rh.PastYearEmissionsByScopeBarTile:return(0,Ze.jsx)(ran,{tile:n});case Vt.Rh.CurrentYearEmissionsByScopeBarTile:return(0,Ze.jsx)(ian,{tile:n});case Vt.Rh.CarbonEmissionsByScopeOverTimeLineTile:return(0,Ze.jsx)(oan,{tile:n});case Vt.Rh.WaterWithdrawalPercentagePieTile:return(0,Ze.jsx)(lan,{tile:n});case Vt.Rh.WaterDischargePercentagePieTile:return(0,Ze.jsx)(san,{tile:n});case Vt.Rh.WaterWithdrawalPercentageOverTimeLineTile:return(0,Ze.jsx)(can,{tile:n});case Vt.Rh.WaterDischargePercentageOverTimeLineTile:return(0,Ze.jsx)(dan,{tile:n});case Vt.Rh.BoardAttendanceRateKpiTile:return(0,Ze.jsx)(uan,{tile:n});case Vt.Rh.BoardAttendanceRateOverTimeLineTile:return(0,Ze.jsx)(pan,{tile:n});case Vt.Rh.BoardFemaleRepresentationPieTile:return(0,Ze.jsx)(man,{tile:n});case Vt.Rh.BoardFemaleRepresentationOverTimeLineTile:return(0,Ze.jsx)(fan,{tile:n});case Vt.Rh.ExecutiveFemaleRepresentationPieTile:return(0,Ze.jsx)(yan,{tile:n});case Vt.Rh.ExecutiveFemaleRepresentationOverTimeLineTile:return(0,Ze.jsx)(gan,{tile:n});default:return null}});var Mrn,Vrn,zrn;function Grn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $rn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Grn(Object(t),!0).forEach(function(n){Wrn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Grn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Wrn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function qrn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Urn.displayName="DashboardTile";const Jrn=140,Yrn=(0,f.styled)("div")(Mrn||(Mrn=qrn(["\n  display: grid;\n  grid-template-columns: repeat(12, 1fr);\n  grid-auto-rows: auto;\n  gap: ","px;\n  padding-bottom: 4px;\n"])),16),Hrn=(0,f.styled)("div")(Vrn||(Vrn=qrn(["\n  position: relative;\n  grid-column: span ",";\n  ","\n"])),e=>e.colSpan,e=>e.height?"height: ".concat(e.height,"px;"):""),Krn=(0,f.styled)("div")(zrn||(zrn=qrn(["\n  position: absolute;\n  bottom: 0;\n  left: 4px;\n  right: 4px;\n  height: ","px;\n  cursor: ns-resize;\n  user-select: none;\n  background: transparent;\n  opacity: 0.3;\n  transition: opacity 0.15s ease;\n  border-radius: 0 0 16px 16px;\n\n  &:hover {\n    background: ",";\n  }\n"])),10,e=>{let{theme:n}=e;return n.sys.color.outlineVariant}),Qrn=[...Object.values(Vt.Rh).filter(e=>"string"==typeof e&&(e.endsWith("TableTile")||e.endsWith("TABLE_TILE"))),Vt.Rh.ElectricityConsumptionByLocation,Vt.Rh.ElectricityConsumptionByCountryAndScope],Zrn=(0,g.memo)(e=>{let{tiles:n,isExportingPdf:t}=e;const[a,r]=(0,g.useState)({}),i=(0,g.useRef)({mousemove:null,mouseup:null});(0,g.useEffect)(()=>()=>{i.current.mousemove&&document.removeEventListener("mousemove",i.current.mousemove),i.current.mouseup&&document.removeEventListener("mouseup",i.current.mouseup)},[]);const o=(0,g.useCallback)(e=>!!Qrn.includes(e.type),[]),l=(0,g.useCallback)(e=>{const n=(e.rowSpan||1)*Jrn,r=a[e.type];return t||o(e)?o(e)?r:n:null!=r?r:n},[a,t,o]),s=(0,g.useCallback)((e,n,t)=>{const a=(e.rowSpan||1)*Jrn,o=i=>{const o=i.clientY-n,l=t+o,s=Math.round(l/Jrn)*Jrn,c=Math.max(a,s);r(n=>$rn($rn({},n),{},{[e.type]:c}))},l=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l),i.current.mousemove=null,i.current.mouseup=null};i.current.mousemove=o,i.current.mouseup=l,document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)},[]);return(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Yrn,{children:n.map(e=>{const n=l(e);return(0,Ze.jsxs)(Hrn,{colSpan:e.colSpan||6,height:n,children:[(0,Ze.jsx)(Urn,{tile:e}),!t&&(0,Ze.jsx)(Krn,{onMouseDown:t=>{var a;t.preventDefault();const r=t.target.parentElement,i=null!==(a=null!=n?n:null==r?void 0:r.offsetHeight)&&void 0!==a?a:Jrn;s(e,t.clientY,i)}})]},e.type)})})})});var Xrn;Zrn.displayName="DashboardTiles";const ein=(0,f.styled)(f.Grid)(Xrn||(Xrn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n"]))),nin=e=>{let{sheet:n}=e;const{isExportingPdf:t}=J1e();return(0,Ze.jsxs)(ein,{id:P1e,container:!0,gap:2,children:[(0,Ze.jsx)(y4e,{filters:n.filters}),(0,Ze.jsx)(Zrn,{tiles:n.tiles,isExportingPdf:t})]})},tin=e=>{let{dashboard:n}=e;const{activeSheet:t,setActiveSheetByIndex:a}=J1e(),r=(0,g.useMemo)(()=>null!=n&&n.sheets?null==n?void 0:n.sheets.map((e,n)=>({label:e.title,value:n,children:(0,Ze.jsx)(nin,{sheet:e})})):[],[n]);return null!=n&&n.sheets&&t?1===(null==n?void 0:n.sheets.length)?(0,Ze.jsx)(nin,{sheet:n.sheets[0]}):(0,Ze.jsx)(f.Tabs,{scrollable:!0,currentTab:t.index,handlerChangeTab:a,tabs:r}):null};function ain(e){let{dashboard:n}=e;return(0,Ze.jsx)(X1e,{dashboard:n,children:(0,Ze.jsx)(tin,{dashboard:n})})}E2e.hF.setLicenseKey(kn("REACT_APP_AG_CHARTS_LICENSE_KEY"));const rin={content:"Your impact dashboard"};function iin(e){let{customDashboard:n}=e;const t=Ps("IMPACT_LOCATIONS_MAP",tr,ir,or,rr,lr,cr,dr,sr,...pr);return(0,Ze.jsxs)(f.Page,{title:rin,children:[t&&(0,Ze.jsx)(B3e,{}),n?(0,Ze.jsx)(ain,{dashboard:n}):(0,Ze.jsx)(J5e,{})]})}var oin,lin;function sin(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const cin=(0,D.J1)(oin||(oin=sin(["\n  query GetQuicksightDashboard($username: String!, $dashboardId: String!, $accountId: String!) {\n    getQuicksightDashboard(input: { username: $username, dashboardId: $dashboardId, accountId: $accountId })\n  }\n"]))),din=(0,D.J1)(lin||(lin=sin(["\n  query GetQuicksightPreloaderDashboard($accountId: String!) {\n    getQuicksightPreloaderDashboard(accountId: $accountId)\n  }\n"])));var uin;const pin="dashboard-preloader-container-id",min="arn:aws:quicksight:eu-west-2:523523762637:theme/985f7adb-d835-4e18-bb87-f94c077d4f6c",fin="reporting-breadcrumbs-id",yin={x:0,y:0,width:0,height:0,zIndex:0},gin=(0,f.styled)("div")(uin||(uin=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  position: absolute;\n\n  ","\n"])),e=>{let{canShow:n,anchorDimensions:t}=e;return n&&0!==t.x?"\n        left: ".concat(t.x,"px;\n        top: ").concat(t.y,"px;\n        width: ").concat(t.width,"px;\n        ").concat(t.height?"height: ".concat(t.height).concat("number"==typeof t.height?"px":"",";"):"","\n        ").concat(t.zIndex?"z-index: ".concat(t.zIndex,";"):"","\n    "):"\n        left: 0px;\n        top: 0px;\n        width: 0px; \n        height: 0px; \n      "}),bin=(0,g.createContext)({isLoading:!0,isLoadingForTheFirstTime:!0,loadingError:void 0,wasInitialEmbeddingSuccessful:!1,dashboardAnchorElementRef:{current:null},handleDashboardAnchoring:()=>{},dashboardParameters:{},setDashboardParameters:()=>{},dashboardInstance:null}),hin=()=>(0,g.useContext)(bin),vin="providerDashboardId",xin=e=>{let{children:n}=e;const t=st(),[a]=(0,p.useSearchParams)(),r=a.get(vin)||kn("REACT_APP_QUICKSIGHT_PRELOADER_DASHBOARD_ID"),i=Zm(r),o=r!==i,l="clean-score"===r,s=(0,g.useRef)(null),c=rt(),d=(0,g.useRef)(null),[u,f]=(0,g.useState)(yin),y=(0,g.useCallback)(()=>{if(!d.current)return void f(yin);const e=d.current.getBoundingClientRect(),n="true"===d.current.dataset.isFullScreen,a=n?5e3:yin.zIndex;let r=0;var i;t||(r=70+((null===(i=document.getElementsByName("ReportingReport__PageHeader"))||void 0===i||null===(i=i[0])||void 0===i?void 0:i.offsetHeight)||112)+0);if(t){var o;const e=90,t=(null===(o=document.getElementById(fin))||void 0===o?void 0:o.offsetHeight)||68,a=16;r=n?56+a:e+t+32+a}const l="calc(100vh - ".concat(r,"px)");f({x:e.x,y:e.y,width:e.width,height:l,zIndex:a})},[t]),[b,v]=(0,g.useState)({}),[x,T]=(0,g.useState)(!1),[O,k]=(0,g.useState)(!1),[j,C]=(0,g.useState)(),[S,N]=(0,g.useState)(null),[w,D]=(0,g.useState)(!1),[A,R]=(0,g.useState)(!1),P=localStorage.getItem("ID_TOKEN"),L=(0,g.useMemo)(()=>{var e;return P&&(null===(e=(0,Jb.A)(P))||void 0===e?void 0:e.sub)||""},[P]),{pathname:I}=(0,m.zy)(),E=(0,g.useMemo)(()=>{if(A)return"";const e=!t,n=I.split("/"),a=I.includes("/reporting/")&&!I.includes("/reporting/overview")&&!I.includes("CleanScore")&&!(e&&"/reporting"===I),r=t?n[n.length-1]:n[2];return a?r:""},[I,A,t]),_=(0,g.useCallback)(async e=>{try{D(!0),C(void 0);const n=await(0,TBe.createEmbeddingContext)(),a={url:e,container:"#".concat(pin),height:"100%",width:"100%",resizeHeightOnSizeChangedEvent:!1},r={parameters:[{Name:"accountId",Values:[c]},{Name:"ucAccountId",Values:[c.toUpperCase()]},...Object.keys(b).map(e=>({Name:e,Values:[b[e].toString()]}))],locale:"en-GB",toolbarOptions:{export:!0,undoRedo:!0,reset:!0},attributionOptions:{overlayContent:!1},themeOptions:t?{themeArn:min}:void 0,onMessage:async e=>{switch(e.eventName){case"SIZE_CHANGED":case"CONTENT_LOADED":T(!1)}}},i=await n.embedDashboard(a,r);R(!0),N(i),D(!1)}catch(e){de.Cp(e),console.error(e),C(e),D(!1)}},[c,b,t]),[F]=(0,gs._)(cin),{loading:B,error:U}=(0,h.IT)(cin,{variables:{accountId:c,username:L,dashboardId:E},fetchPolicy:"network-only",skip:A||!Boolean(E)||!c||!L,onCompleted:async e=>{w||(await _(e.getQuicksightDashboard),y())}}),{loading:M,error:V}=(0,h.IT)(din,{variables:{accountId:c},fetchPolicy:"network-only",skip:A||Boolean(E)||B||!c,onCompleted:async e=>{w||(await _(e.getQuicksightPreloaderDashboard),y())}});(0,g.useLayoutEffect)(()=>{(async()=>{if(A&&!l)try{k(!0),C(void 0),await async function(e){let{retries:n=2,delay:t=500,backoff:a=!1,shouldRetry:r=()=>!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=0,o=t;for(;i<=n;)try{return await e(i)}catch(e){if(!(i<n&&r(e,i)))throw e;await new Promise(e=>setTimeout(e,o)),a&&(o*=2),i++}throw new Error("Retry failed unexpectedly.")}(async e=>{if(Boolean(e)){const{data:e}=await F({variables:{accountId:c,username:L,dashboardId:r}});null!=e&&e.getQuicksightDashboard&&await _(null==e?void 0:e.getQuicksightDashboard)}return S.navigateToDashboard(r,{parameters:Object.keys(b).map(e=>({Name:e,Values:[b[e].toString()]}))})},{retries:2,delay:500,backoff:!0}),t&&(setTimeout(()=>{null==S||S.setTheme(min)},200),setTimeout(()=>{null==S||S.setTheme(min)},2e3),setTimeout(()=>{null==S||S.setTheme(min)},5e3)),k(!1),y()}catch(e){de.Cp(e),console.error(e),k(!1),C(e)}})()},[r,t]);const z=x||O||B||M,G=z&&!A,$=j||U||V,W=0!==u.x||0!==u.y;return(0,g.useEffect)(()=>{const e=(0,zt.throttle)(()=>{0===window.scrollY&&W&&y()},200);return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[y,W]),(0,g.useEffect)(()=>{R(!1)},[c]),(0,Ze.jsxs)(bin.Provider,{value:{isLoading:z,isLoadingForTheFirstTime:G,loadingError:$,wasInitialEmbeddingSuccessful:A,dashboardAnchorElementRef:d,handleDashboardAnchoring:y,dashboardParameters:b,setDashboardParameters:v,dashboardInstance:S},children:[n,(0,Ze.jsx)(gin,{canShow:!o&&!z&&!l&&W,anchorDimensions:u,id:pin,ref:s},"DashboardContainer__".concat(c))]})},Tin=e=>{let{isFullScreen:n}=e;const{dashboardAnchorElementRef:t,handleDashboardAnchoring:a}=hin();return(0,g.useLayoutEffect)(()=>{let e=null;return t.current&&(e=new ResizeObserver(()=>{a()}),e.observe(t.current)),()=>{var n;null===(n=e)||void 0===n||n.disconnect()}},[]),(0,g.useEffect)(()=>()=>{a()},[]),(0,g.useLayoutEffect)(()=>{n&&setTimeout(()=>{a()},500)},[n,a]),(0,Ze.jsx)("div",{style:{width:"100%"},ref:t,"data-is-full-screen":n?"true":"false"})};var Oin,kin,jin,Cin,Sin,Nin,win,Din;function Ain(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Rin=(0,f.styled)("div")(Oin||(Oin=Ain(["\n  width: calc(100% - 274px);\n  min-height: 50vh;\n  gap: 24px;\n"]))),Pin=(0,f.styled)("div")(kin||(kin=Ain(["\n  display: flex;\n  flex-direction: row;\n  width: 100%;\n  height: 100%;\n  overflow-x: auto;\n"]))),Lin=(0,f.styled)("div")(jin||(jin=Ain(["\n  height: 80vh;\n  margin-left: 24px;\n  overflow: scroll;\n"]))),Iin=(0,f.styled)("div")(Cin||(Cin=Ain(["\n  padding-top: 24px;\n  width: 100%;\n"]))),Ein=(0,f.styled)("div")(Sin||(Sin=Ain(["\n  position: relative;\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),_in=(0,f.styled)("img")(Nin||(Nin=Ain(["\n  max-width: 100%;\n"]))),Fin=(0,f.styled)(f.Grid)(win||(win=Ain(["\n  display: flex;\n  flex: 1;\n  justify-content: flex-end;\n  align-items: center;\n  gap: 8px;\n"]))),Bin=(0,f.styled)(f.LinearProgress)(Din||(Din=Ain(["\n  position: absolute;\n  top: 76px;\n  left: 0;\n  width: 100%;\n  transform: translateY(-150%);\n"]))),Uin="https://dashboard-thumbnails-dev.s3.eu-west-1.amazonaws.com/clean-score.png",Min=e=>{let{expandAction:n,closeAction:t,withCrossCloseIcon:a,shouldHideResetButton:r,printAction:i,printing:o}=e;const{dashboardInstance:l}=hin(),{dashboardId:s,resetFilters:c,isAnyFilterActive:d,isExportingPdf:u,downloadPdf:p}=J1e(),m=!!s,y=(0,g.useCallback)(()=>{m?c():null==l||l.reset()},[l,m,c]),b=(0,g.useCallback)(()=>{i?i():m?p():null==l||l.initiatePrint()},[l,m,p,i]);return(0,Ze.jsxs)(Fin,{wrap:"wrap",container:!0,size:12,children:[!r&&(0,Ze.jsx)(f.IconButton,{variant:"contained",color:"secondary",disabled:m&&!d,onClick:()=>y(),title:"Reset filters",children:m?(0,Ze.jsx)(f.Icons.FilterAltOff,{}):(0,Ze.jsx)(f.Icons.LoopRounded,{})}),(0,Ze.jsx)(f.IconButton,{variant:"contained",onClick:()=>b(),title:"Print",disabled:u||o,children:(0,Ze.jsx)(f.Icons.PrintRounded,{})}),n&&(0,Ze.jsx)(f.IconButton,{variant:"contained",onClick:()=>n(),title:"Full screen",children:(0,Ze.jsx)(f.Icons.Fullscreen,{})}),t&&(0,Ze.jsx)(f.IconButton,{variant:"contained",onClick:()=>t(),title:"Exit full screen",children:a?(0,Ze.jsx)(f.Icons.Close,{}):(0,Ze.jsx)(f.Icons.FullscreenExit,{})})]})};function Vin(){const[e,n,t]=J0e(),[a,r]=(0,g.useState)(!1),{isLoadingForTheFirstTime:i,loadingError:o}=hin(),{id:l,name:s}=(0,m.g)(),c="CleanScore"===s,{printReportingOverview:d,printingReportingOverview:u}=function(){const{showNotification:e}=vt(),[n,t]=(0,g.useState)(!1);return{printReportingOverview:()=>{e("Generating PDF, please wait until it's ready","success"),t(!0),L1e({name:"Reporting Overview",onSuccess:()=>t(!1),onError:n=>{e("Error downloading PDF: ".concat(n.message),"danger"),t(!1)}})},printingReportingOverview:n}}(),p=(null==e?void 0:e.getSubscribedDashboards.length)>0,y=(0,g.useMemo)(()=>l?null==e?void 0:e.getSubscribedDashboards.find(e=>e.id===l):null,[e,l]),b=(null==y?void 0:y.provider)===Vt.qT.Custom;return(0,Ze.jsx)(X1e,{dashboard:b?y:void 0,children:(0,Ze.jsx)(f.Page,{loading:n,error:t,title:{content:s?"Your ".concat(s," report"):"Overview",crumbs:[{label:"Reporting",to:"../../reporting"},{label:s||"Overview"}],actionButton:(0,Ze.jsx)(Min,{shouldHideResetButton:!l,printing:u,printAction:l?void 0:d,expandAction:()=>{r(!a)}}),wrapperId:fin},children:(0,Ze.jsxs)(Pin,{children:[p&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Q0e,{dashboards:e.getSubscribedDashboards}),l&&(0,Ze.jsx)(Rin,{children:c?(0,Ze.jsx)(Lin,{children:(0,Ze.jsx)(_in,{src:Uin})}):(0,Ze.jsxs)(Ze.Fragment,{children:[!b&&i&&!o&&(0,Ze.jsx)(f.PreLoader,{themes:[f.LoadingTextTheme.REPORTING,f.LoadingTextTheme.GENERAL]}),!b&&!i&&o&&(0,Ze.jsx)(f.LoadFailed,{title:"Failed to load dashboard",retry:()=>location.reload(),error:o}),!b&&!a&&!i&&!o&&(0,Ze.jsx)(Tin,{}),b&&y&&!a&&(0,Ze.jsx)(tin,{dashboard:y})]})})]}),n?(0,Ze.jsx)(f.Loader,{}):!l&&!c&&(0,Ze.jsx)(I2e,{}),(0,Ze.jsxs)(f.Dialog,{open:a,children:[(0,Ze.jsx)(Min,{shouldHideResetButton:!l,printing:u,printAction:l?void 0:d,closeAction:()=>{r(e=>!e)}}),n&&(0,Ze.jsx)(Bin,{}),(0,Ze.jsxs)(Ein,{children:[l&&!c&&a&&!i&&!b&&(0,Ze.jsx)(Tin,{isFullScreen:!0}),l&&!c&&a&&!i&&b&&(0,Ze.jsx)(Iin,{children:(0,Ze.jsx)(tin,{dashboard:y})}),c&&(0,Ze.jsx)(Lin,{children:(0,Ze.jsx)(_in,{src:Uin})}),!l&&!c&&(0,Ze.jsx)(I2e,{})]})]})]})})})}var zin,Gin,$in,Win,qin;function Jin(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Yin=(0,Ge.default)(ze.fv)(zin||(zin=Jin(["\n  height: 100%;\n  overflow: hidden;\n"]))),Hin=(0,Ge.default)(ze.fv)(Gin||(Gin=Jin(["\n  position: relative;\n"]))),Kin=(0,Ge.default)(ze.$n)($in||($in=Jin(["\n  white-space: nowrap;\n  margin-right: ",";\n"])),e=>e.mr),Qin=Ge.default.div(Win||(Win=Jin(["\n  height: 80vh;\n  overflow: scroll;\n"]))),Zin=Ge.default.img(qin||(qin=Jin(["\n  max-width: 100%;\n"]))),Xin=()=>{var e;const{name:n}=(0,m.g)(),{isLoadingForTheFirstTime:t,loadingError:a,dashboardInstance:r}=hin(),i="CleanScore"===n;return(0,Ze.jsxs)(Yin,{container:!0,children:[(0,Ze.jsx)(ige,{name:"ReportingReport",title:"Report - ".concat(n),breadcrumbs:[{title:"Reporting",to:"/reporting"},{title:"Report"}],icon:"chart-line",iconColor:"quaternary",children:(0,Ze.jsxs)(ze.fI,{container:!0,distribution:"between",children:[(0,Ze.jsx)(Kin,{name:"Reset_filters",inline:!0,mr:"20px",color:"tertiary",onClick:()=>{r&&r.reset()},children:"Reset Filters"}),(0,Ze.jsx)(Kin,{name:"ReportingReport__Button-back",inline:!0,color:"info",component:"routerLink",to:"/reporting",children:"Back to Reports"})]})}),(0,Ze.jsx)(Hin,{item:!0,children:i?(0,Ze.jsx)(Qin,{children:(0,Ze.jsx)(Zin,{src:"https://dashboard-thumbnails-dev.s3.eu-west-1.amazonaws.com/clean-score.png"})}):(0,Ze.jsxs)(Ze.Fragment,{children:[t&&!a&&(0,Ze.jsx)(Vg,{name:"ReportingReport__Loading"}),!t&&!a&&(0,Ze.jsx)(Tin,{}),!t&&a&&(0,Ze.jsx)(Ze.Fragment,{children:a.graphQLErrors&&"Forbidden"===(null===(e=a.graphQLErrors[0])||void 0===e?void 0:e.message)?(0,Ze.jsx)(eb,{name:"ReportingReports__error",error:a}):(0,Ze.jsx)(ub,{name:"ReportingReports__error",retry:()=>location.reload(),error:a})})]})})]})},eon={normal:[{name:"North West (England)",value:515479.6},{name:"Northern Ireland",value:0},{name:"North East (England)",value:300131.9},{name:"Yorkshire and The Humber",value:572430.8},{name:"East Midlands (England)",value:453666},{name:"West Midlands (England)",value:513326.3},{name:"East (England)",value:429710.4},{name:"London",value:26379},{name:"South East (England)",value:13014},{name:"South West (England)",value:383869.1},{name:"Wales",value:196499.33},{name:"Scotland",value:1176}],ha:[{name:"North West (England)",value:51.55},{name:"Northern Ireland",value:0},{name:"North East (England)",value:30.01},{name:"Yorkshire and The Humber",value:57.24},{name:"East Midlands (England)",value:45.37},{name:"West Midlands (England)",value:51.33},{name:"East (England)",value:42.97},{name:"London",value:2.64},{name:"South East (England)",value:1.3},{name:"South West (England)",value:38.39},{name:"Wales",value:19.65},{name:"Scotland",value:.12}]},non=JSON.parse('{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-0.791891321622779,54.5582385423252],[-0.898180943856563,54.5719568624355],[-1.01639413304144,54.5982483853578],[-1.05959649237511,54.6180564196669],[-1.15462417114531,54.6275034986944],[-1.19849239250194,54.6795835308633],[-1.3088508421947,54.780967883289],[-1.31262837676667,54.8117796931329],[-1.36164017162446,54.8982975142585],[-1.35742903230474,54.9663909967755],[-1.41690452560967,55.014391905422],[-1.49457030005263,55.1023998592376],[-1.52493482293934,55.1605144052681],[-1.49919222615189,55.1856363265395],[-1.55436756973493,55.247300683574],[-1.56995760796806,55.291834854682],[-1.54939419416243,55.3217234433974],[-1.61142133180323,55.385168006816],[-1.57884615580075,55.4088976102969],[-1.59548925868755,55.4912718333147],[-1.626519839178,55.5576756012459],[-1.69201921769641,55.6061584391172],[-1.813186225269,55.6337046372378],[-1.88409332954301,55.6944591247616],[-1.96077232432745,55.7332662484133],[-2.03456758533587,55.811183932416],[-2.0861230942702,55.793045271488],[-2.0856391490368,55.7620403330448],[-2.14429584165104,55.7392700694797],[-2.16723105928948,55.7060351656943],[-2.24834586160377,55.6521497554078],[-2.33600510128162,55.6324814828842],[-2.28881057092811,55.5803072667808],[-2.2403065059112,55.5556271692665],[-2.22884551551699,55.509518780902],[-2.18807797549864,55.4621152753329],[-2.34494682160794,55.399313431888],[-2.33752995734802,55.3671909676834],[-2.37891180668306,55.3491694380124],[-2.47539346393945,55.3547399208929],[-2.62665606673464,55.262220938519],[-2.63141420722149,55.2236980857955],[-2.68978972314827,55.1889838768114],[-2.65693941785208,55.1361318311632],[-2.59890282488408,55.1245757167589],[-2.56213639511458,55.0834621700379],[-2.50257438882916,55.0907586762788],[-2.48304985288842,55.0400190767258],[-2.57285163622922,55.0163983334404],[-2.57641404338101,54.8967171106932],[-2.60543022085515,54.8843823124884],[-2.5583066678318,54.8167246166541],[-2.4953568980919,54.8103421048662],[-2.42275637725897,54.8428302557336],[-2.3084868101346,54.7735427980108],[-2.35574349125271,54.6976521794555],[-2.28797868797798,54.6504801041079],[-2.32493776754246,54.6316502370591],[-2.30451453732035,54.5961978460776],[-2.17239803091537,54.5324441161867],[-2.17021302340634,54.4581987855746],[-2.04472952149334,54.4751862741994],[-1.94254323627035,54.4533953549934],[-1.85912998438283,54.4818579033168],[-1.79297648414091,54.4844924296004],[-1.77969652861129,54.5318729948094],[-1.72031664601336,54.5423479518656],[-1.61148472706396,54.5200007878436],[-1.54582496831421,54.4712759743885],[-1.41788675584371,54.4770861945626],[-1.34390824026251,54.4641506390909],[-1.23060453308383,54.5118815664864],[-0.952589374508347,54.4880153432179],[-0.880825023321814,54.4970468612461],[-0.791891321622779,54.5582385423252]]]},"properties":{"ITL125CD":"TLC","ITL125NM":"North East (England)","BNG_E":417317,"BNG_N":575393,"LAT":55.07271,"LONG":-1.73036,"GlobalID":"33c985b2-6025-4a45-822b-dd94a559046b"},"id":1},{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-2.17021302340634,54.4581987855746],[-2.17239803091537,54.5324441161867],[-2.30451453732035,54.5961978460776],[-2.32493776754246,54.6316502370591],[-2.28797868797798,54.6504801041079],[-2.35574349125271,54.6976521794555],[-2.3084868101346,54.7735427980108],[-2.42275637725897,54.8428302557336],[-2.4953568980919,54.8103421048662],[-2.5583066678318,54.8167246166541],[-2.60543022085515,54.8843823124884],[-2.57641404338101,54.8967171106932],[-2.57285163622922,55.0163983334404],[-2.48304985288842,55.0400190767258],[-2.50257438882916,55.0907586762788],[-2.56213639511458,55.0834621700379],[-2.59890282488408,55.1245757167589],[-2.65693941785208,55.1361318311632],[-2.68978972314827,55.1889838768114],[-2.7848482544576,55.1417914408718],[-2.82550257520544,55.1383140722935],[-2.89704669119711,55.0778720526317],[-3.0258749316412,55.0364588169844],[-3.05639300834839,54.9866593513123],[-3.1040230149421,54.9713739064015],[-3.13796409463066,54.9274627324061],[-3.20439217458803,54.9538753136407],[-3.28330649706739,54.9421233213207],[-3.39886993497874,54.8685058326993],[-3.4378546668328,54.8016272630037],[-3.43331644392299,54.7662264678999],[-3.50712873863077,54.7176216618908],[-3.57174335475492,54.6508463234165],[-3.59159259148016,54.5521967526089],[-3.63766913389805,54.5131323966065],[-3.47650486491259,54.3864080548977],[-3.43528528972723,54.3433826122152],[-3.39421568711067,54.2544402207594],[-3.31430579829842,54.1885623821146],[-3.25398110018546,54.1916383628285],[-3.23930826998406,54.1041391370387],[-3.1647913866967,54.0832242589777],[-3.1046483830116,54.1200044185462],[-3.06162191164685,54.18082055095],[-2.99953197208596,54.1532614639095],[-2.9253595496205,54.1502924529874],[-2.88590270016895,54.1975648250651],[-2.83721686204006,54.1741724007201],[-2.79354013238121,54.1285879094222],[-2.82619662102057,54.0869000416773],[-2.88947834494135,54.0664521552798],[-2.91241947640711,54.0337623745692],[-2.90022783303898,53.9920330973712],[-2.86193231841356,53.9646091832096],[-3.0501496964756,53.9192141231351],[-3.05502289109455,53.7619850634633],[-3.00082176254005,53.736711116856],[-2.92913475068414,53.7314577856745],[-3.00236758960063,53.6769572879199],[-3.10051940107972,53.5693935592256],[-3.04145607648159,53.4656287475057],[-2.96929985749059,53.3758042875494],[-2.8781584032105,53.3341988138049],[-2.75247772983128,53.3147354613668],[-2.78896613468561,53.2954509196755],[-2.87838965649441,53.2907828201086],[-2.92857185482182,53.3082489283384],[-2.9953485042943,53.3680057174514],[-3.04032032385677,53.4428974501825],[-3.17760588455519,53.3997272778065],[-3.19057115642075,53.3682434485254],[-3.12234023235646,53.3225416731634],[-3.101136143917,53.2656903057713],[-3.09511108874127,53.261882089401],[-3.09133063807348,53.2594880602806],[-3.09017503265769,53.2588675969056],[-3.02546229105649,53.2483150711708],[-2.949510091719,53.2112797159544],[-2.92783850918185,53.1714114107239],[-2.9950230554338,53.154023960488],[-2.86147506310468,53.0606604001837],[-2.83599558996295,52.997150146825],[-2.7268406065337,52.9832729462979],[-2.63265093996284,52.9966707872024],[-2.53189371702813,52.9472629931384],[-2.38027990140092,52.9987866474815],[-2.38129694046648,53.0525807781467],[-2.31805569446669,53.0814075176033],[-2.24643157183402,53.090307630252],[-2.15554543171792,53.1596534951874],[-2.07021816358765,53.171653125585],[-1.98737982955689,53.2136037474881],[-2.0094248420728,53.2606147236468],[-2.01364994432454,53.3324201566667],[-1.97158630305122,53.5043419938961],[-1.90962083195551,53.5383909865468],[-2.00947078713106,53.6167795111392],[-2.05124217318775,53.6836917586463],[-2.1180850077117,53.6712452241623],[-2.17329132180093,53.7230096469322],[-2.13083482347585,53.7520705652718],[-2.12835851818789,53.7990313038972],[-2.04692463706631,53.8295102819506],[-2.08991499194819,53.8681819729435],[-2.11309296486617,53.915439302302],[-2.18227343100205,53.9354059641897],[-2.23039881478544,53.9815667896336],[-2.29451918094864,53.9744631577094],[-2.35228494459096,54.0105532697488],[-2.37407297715162,54.0490890614635],[-2.4643555540214,54.0430463312627],[-2.46434741774283,54.0752794330057],[-2.56474222741882,54.1268638437646],[-2.46086273483392,54.2267161360628],[-2.32564664212512,54.2414383484097],[-2.30984140863991,54.3243149783909],[-2.36771223910638,54.3560706152439],[-2.2974404079712,54.3768987653342],[-2.30814588994671,54.4197937724531],[-2.24953922329874,54.4519434362394],[-2.17021302340634,54.4581987855746]]]},"properties":{"ITL125CD":"TLD","ITL125NM":"North West (England)","BNG_E":349989,"BNG_N":463422,"LAT":54.06431,"LONG":-2.7656,"GlobalID":"0eff8897-1a46-48cc-80be-503c33840ef3"},"id":2},{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[0.0149702812770375,53.5279599585584],[-0.204422800569946,53.63790004551],[-0.289364002000774,53.7131988210608],[-0.273243784773328,53.7409107089215],[-0.103546755829809,53.6353418765989],[-0.056993793697097,53.6293838088772],[0.0344835459387662,53.6492119952179],[0.141776539465768,53.621985629392],[0.116999388408663,53.6622591249029],[-0.0442714974922277,53.7953832122577],[-0.153965034285028,53.8993206911935],[-0.215056738521342,54.015834896736],[-0.208530564194227,54.0638167130594],[-0.0968016173443425,54.1291365302012],[-0.264452670666596,54.1765101399499],[-0.275394771128287,54.2176691265164],[-0.363890554746246,54.2450950743591],[-0.458807885867095,54.3825610618979],[-0.531109728814527,54.4255089297409],[-0.526459901633784,54.4495194683173],[-0.593332412332016,54.4878372258877],[-0.67027867888638,54.5007549178771],[-0.71218151222954,54.5330922626202],[-0.791891321622779,54.5582385423252],[-0.880825023321814,54.4970468612461],[-0.952589374508347,54.4880153432179],[-1.23060453308383,54.5118815664864],[-1.34390824026251,54.4641506390909],[-1.41788675584371,54.4770861945626],[-1.54582496831421,54.4712759743885],[-1.61148472706396,54.5200007878436],[-1.72031664601336,54.5423479518656],[-1.77969652861129,54.5318729948094],[-1.79297648414091,54.4844924296004],[-1.85912998438283,54.4818579033168],[-1.94254323627035,54.4533953549934],[-2.04472952149334,54.4751862741994],[-2.17021302340634,54.4581987855746],[-2.24953922329874,54.4519434362394],[-2.30814588994671,54.4197937724531],[-2.2974404079712,54.3768987653342],[-2.36771223910638,54.3560706152439],[-2.30984140863991,54.3243149783909],[-2.32564664212512,54.2414383484097],[-2.46086273483392,54.2267161360628],[-2.56474222741882,54.1268638437646],[-2.46434741774283,54.0752794330057],[-2.4643555540214,54.0430463312627],[-2.37407297715162,54.0490890614635],[-2.35228494459096,54.0105532697488],[-2.29451918094864,53.9744631577094],[-2.23039881478544,53.9815667896336],[-2.18227343100205,53.9354059641897],[-2.11309296486617,53.915439302302],[-2.08991499194819,53.8681819729435],[-2.04692463706631,53.8295102819506],[-2.12835851818789,53.7990313038972],[-2.13083482347585,53.7520705652718],[-2.17329132180093,53.7230096469322],[-2.1180850077117,53.6712452241623],[-2.05124217318775,53.6836917586463],[-2.00947078713106,53.6167795111392],[-1.90962083195551,53.5383909865468],[-1.87349262570415,53.5404296508189],[-1.79603746177152,53.5026410934739],[-1.74528551665239,53.4621249958085],[-1.74657253202956,53.426017250077],[-1.65461081618027,53.3929530702989],[-1.66254430742755,53.3660727649314],[-1.61230306160512,53.3432186697883],[-1.59900458569526,53.3113277872523],[-1.53714140318818,53.3047033893617],[-1.40874684512064,53.3419650586082],[-1.38683300477939,53.3176505913393],[-1.2438683827737,53.301569792195],[-1.13871810210376,53.3413828117799],[-1.14603291441165,53.3690411457852],[-1.08043943279743,53.4268678599403],[-0.995669798894032,53.4369266843309],[-0.985978085087804,53.471673371995],[-0.935564625288195,53.5025165293909],[-0.9004706270826,53.4751558672792],[-0.797483349537156,53.4550644469113],[-0.739591684118626,53.5199359490779],[-0.624491104429227,53.5128392148578],[-0.629752674978015,53.4582189924615],[-0.551788631166795,53.4595199872907],[-0.486630004727343,53.4804701677829],[-0.487638685249183,53.5052454943431],[-0.405074524830151,53.5176169033637],[-0.41696297298743,53.5632146898956],[-0.335938821094677,53.5586265922375],[-0.300930360808405,53.6163880602418],[-0.191692269491797,53.5684652895759],[-0.219882527217496,53.5326064916734],[-0.210604976147154,53.4862884751414],[-0.153680016923717,53.4656777580012],[-0.0752620038904992,53.4893357399272],[-0.0652891253341398,53.5185880312365],[0.0149702812770375,53.5279599585584]]]},"properties":{"ITL125CD":"TLE","ITL125NM":"Yorkshire and The Humber","BNG_E":452737,"BNG_N":445838,"LAT":53.90604,"LONG":-1.19878,"GlobalID":"d83d3af4-9631-4736-bb2c-3473ddd636fa"},"id":3},{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[0.0149702812770375,53.5279599585584],[-0.0652891253341398,53.5185880312365],[-0.0752620038904992,53.4893357399272],[-0.153680016923717,53.4656777580012],[-0.210604976147154,53.4862884751414],[-0.219882527217496,53.5326064916734],[-0.191692269491797,53.5684652895759],[-0.300930360808405,53.6163880602418],[-0.335938821094677,53.5586265922375],[-0.41696297298743,53.5632146898956],[-0.405074524830151,53.5176169033637],[-0.487638685249183,53.5052454943431],[-0.486630004727343,53.4804701677829],[-0.551788631166795,53.4595199872907],[-0.629752674978015,53.4582189924615],[-0.624491104429227,53.5128392148578],[-0.739591684118626,53.5199359490779],[-0.797483349537156,53.4550644469113],[-0.9004706270826,53.4751558672792],[-0.935564625288195,53.5025165293909],[-0.985978085087804,53.471673371995],[-0.995669798894032,53.4369266843309],[-1.08043943279743,53.4268678599403],[-1.14603291441165,53.3690411457852],[-1.13871810210376,53.3413828117799],[-1.2438683827737,53.301569792195],[-1.38683300477939,53.3176505913393],[-1.40874684512064,53.3419650586082],[-1.53714140318818,53.3047033893617],[-1.59900458569526,53.3113277872523],[-1.61230306160512,53.3432186697883],[-1.66254430742755,53.3660727649314],[-1.65461081618027,53.3929530702989],[-1.74657253202956,53.426017250077],[-1.74528551665239,53.4621249958085],[-1.79603746177152,53.5026410934739],[-1.87349262570415,53.5404296508189],[-1.90962083195551,53.5383909865468],[-1.97158630305122,53.5043419938961],[-2.01364994432454,53.3324201566667],[-2.0094248420728,53.2606147236468],[-1.98737982955689,53.2136037474881],[-1.87404306112304,53.1953837010505],[-1.81258693659541,53.1543650420164],[-1.82141926984971,53.1357911781773],[-1.75977677847912,53.0387143509213],[-1.76256960898942,52.9996692928129],[-1.82856056786268,52.9751558823607],[-1.85657875821379,52.9233447106857],[-1.81171126944986,52.8805966212323],[-1.77711673567319,52.8837929782468],[-1.62676534855207,52.8544579282665],[-1.58538036585949,52.8315965582062],[-1.61112950153712,52.7814035608609],[-1.66653674723611,52.7847230322657],[-1.70375048971327,52.7299552227781],[-1.6550635927941,52.6987757766166],[-1.59081094061654,52.698024609287],[-1.55280663728848,52.6684622521305],[-1.56069803676403,52.5961193283491],[-1.52244185311375,52.5703281858256],[-1.30714044411013,52.4942446712166],[-1.24074319604153,52.4401350777721],[-1.17212636579044,52.3613009289764],[-1.26228669833728,52.3341934742487],[-1.20923383158981,52.3152040796742],[-1.21585144103408,52.2639110515478],[-1.26685236231198,52.2352486391455],[-1.25498199738882,52.1978310710958],[-1.3318971346503,52.168485056197],[-1.2480850615427,52.0971607919138],[-1.31292004347286,52.0514526634399],[-1.27816401885651,52.0142726693672],[-1.28353449972237,51.9795993829644],[-1.19763689128177,51.9772816472427],[-1.13432869833779,51.997296387881],[-1.12198746604179,52.0451472428701],[-1.04206410377149,52.0739350801836],[-0.967805300661276,52.0709109281604],[-0.908376568151801,52.0222399672463],[-0.831313005313099,52.0720063385771],[-0.880758452631504,52.1262921523493],[-0.832040075305798,52.1312603534096],[-0.701671512157467,52.1933084347047],[-0.668135637658982,52.1950341117758],[-0.63733162156624,52.2273176317195],[-0.653655470981071,52.2682893071709],[-0.541969414284237,52.2899424469085],[-0.466656737619639,52.3389275764],[-0.495946267815481,52.3795155302795],[-0.441509864468212,52.3849964344035],[-0.362408041008102,52.4335312780284],[-0.341590492473876,52.4669426273503],[-0.354345203263394,52.5064950723187],[-0.413602640818525,52.5256796137016],[-0.415381402678347,52.5787426397479],[-0.478814868225147,52.573645147065],[-0.452832300952799,52.6542749156432],[-0.405694618313302,52.6480559479697],[-0.334985138827247,52.6748706355815],[-0.260628419607621,52.6514134409202],[-0.206037616936727,52.6680733124595],[-0.14106199482318,52.6515074247825],[-0.102195958212229,52.6722061953853],[-0.0312706832650579,52.6615327439854],[0.048848482208305,52.6817708046624],[0.0441494759872833,52.7143823496307],[0.142076106979268,52.7399180828341],[0.186323197484379,52.7353486313374],[0.272228339358099,52.7728129925168],[0.267002148567531,52.8157118965235],[0.215079923686474,52.8284803929697],[0.176331510149807,52.874116224234],[0.0883820805446973,52.8951252729192],[0.0516750687059226,52.9171952464905],[0.151425050200805,53.0081071211682],[0.239196633060485,53.0459464174134],[0.348210789726189,53.1091843379926],[0.355627376907466,53.1920584284764],[0.322179964590588,53.2664710597843],[0.187804612702328,53.4377082520006],[0.168164852774028,53.4767973553097],[0.0849958704864657,53.496967055967],[0.0149702812770375,53.5279599585584]]]},"properties":{"ITL125CD":"TLF","ITL125NM":"East Midlands (England)","BNG_E":477748,"BNG_N":322635,"LAT":52.79571,"LONG":-0.84837,"GlobalID":"1ceaa16b-08a7-40ae-b749-c0376b3f68b2"},"id":4},{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-1.3318971346503,52.168485056197],[-1.25498199738882,52.1978310710958],[-1.26685236231198,52.2352486391455],[-1.21585144103408,52.2639110515478],[-1.20923383158981,52.3152040796742],[-1.26228669833728,52.3341934742487],[-1.17212636579044,52.3613009289764],[-1.24074319604153,52.4401350777721],[-1.30714044411013,52.4942446712166],[-1.52244185311375,52.5703281858256],[-1.56069803676403,52.5961193283491],[-1.55280663728848,52.6684622521305],[-1.59081094061654,52.698024609287],[-1.6550635927941,52.6987757766166],[-1.70375048971327,52.7299552227781],[-1.66653674723611,52.7847230322657],[-1.61112950153712,52.7814035608609],[-1.58538036585949,52.8315965582062],[-1.62676534855207,52.8544579282665],[-1.77711673567319,52.8837929782468],[-1.81171126944986,52.8805966212323],[-1.85657875821379,52.9233447106857],[-1.82856056786268,52.9751558823607],[-1.76256960898942,52.9996692928129],[-1.75977677847912,53.0387143509213],[-1.82141926984971,53.1357911781773],[-1.81258693659541,53.1543650420164],[-1.87404306112304,53.1953837010505],[-1.98737982955689,53.2136037474881],[-2.07021816358765,53.171653125585],[-2.15554543171792,53.1596534951874],[-2.24643157183402,53.090307630252],[-2.31805569446669,53.0814075176033],[-2.38129694046648,53.0525807781467],[-2.38027990140092,52.9987866474815],[-2.53189371702813,52.9472629931384],[-2.63265093996284,52.9966707872024],[-2.7268406065337,52.9832729462979],[-2.72843937384749,52.9253018633927],[-2.79884789455756,52.8957587642381],[-2.84101496067848,52.9426237150063],[-2.9288886576968,52.9386788302752],[-2.98202234589558,52.9591982546682],[-3.03512347363092,52.9294624894448],[-3.09595322236249,52.9302818603715],[-3.16788753046969,52.8192666796899],[-3.15842528976348,52.793488103831],[-3.04779141568697,52.7726355742841],[-2.99199278312435,52.7437560385489],[-3.04704782420661,52.6912658409262],[-3.05112433418108,52.6473703199561],[-3.11741414899447,52.5857631475343],[-3.11149542440582,52.5413637648399],[-3.01684357415423,52.5751648644213],[-2.99421971300057,52.5524392755137],[-3.02920219998827,52.501268025898],[-3.11101713479608,52.498934828381],[-3.23555870572831,52.4425418770695],[-3.21954231380943,52.4212465662123],[-3.11060650812059,52.3771928586202],[-3.0008661068012,52.3217658048495],[-3.00577598466957,52.2642595027327],[-3.07303671037743,52.2358769206364],[-3.07209180392951,52.213087287645],[-3.13587330508285,52.1379083922528],[-3.10492212967307,52.1167418938091],[-3.1258949917356,52.0783106756457],[-3.0683134013526,51.9838948193478],[-2.97184633087118,51.9049816267882],[-2.87783522764085,51.9338143761337],[-2.76830730538435,51.880444841636],[-2.73884858634764,51.8366165103794],[-2.65040070567432,51.8261246889383],[-2.60121663304725,51.8562162644087],[-2.53162394037576,51.8607715469017],[-2.43927491603518,51.8973822861564],[-2.49491293332375,51.9810752068267],[-2.39289223171328,52.0129587700424],[-2.32470967818414,52.0035672783312],[-2.32656514420703,51.9758107384483],[-2.25135998124032,51.9665649342157],[-2.18508403441562,51.9905609788574],[-2.18045118695184,52.0422625534122],[-2.11219762720392,52.0153447349971],[-2.03835621126119,52.0046006235229],[-1.98413574037062,52.0358792744237],[-1.86344917989937,52.053417723062],[-1.7676920738422,52.1125783283983],[-1.66382433788403,52.0312666555567],[-1.66575430454863,51.9874888219864],[-1.61234247849955,51.9554034171782],[-1.52530903761447,51.9928568262056],[-1.48780444309778,52.0939574330421],[-1.42585527139589,52.1182494968197],[-1.38539981246728,52.0941455730689],[-1.3318971346503,52.168485056197]]]},"properties":{"ITL125CD":"TLG","ITL125NM":"West Midlands (England)","BNG_E":386293,"BNG_N":295477,"LAT":52.55697,"LONG":-2.2036,"GlobalID":"778f3e42-f79b-410d-a2d4-a8ecce2bfcfd"},"id":5},{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[0.955316883466157,51.6131647784353],[0.874374641083865,51.614150861476],[0.83799748353139,51.5936189646791],[0.866370064397508,51.5589408418077],[0.955316883466157,51.6131647784353]]],[[[0.211576815311689,51.4900222752128],[0.340845314505118,51.4523277375829],[0.433979747212772,51.4614986163648],[0.447625001861972,51.5001580391275],[0.522193879480497,51.5159664821137],[0.54758298196772,51.5476889503497],[0.787770680963095,51.5218312602018],[0.848619668975376,51.5513920080604],[0.80424520359453,51.5893398744431],[0.926546958770398,51.6289482364597],[0.950057791342381,51.683496409888],[0.950572298872485,51.7308319634607],[0.890704052787805,51.7413360345106],[0.848178284675708,51.7157052282464],[0.769185517779274,51.7083592430127],[0.763141441063553,51.7386966987261],[0.852430417976529,51.7416123536087],[0.927476617217011,51.8075545546132],[0.982322645310723,51.8173587219362],[1.02976994835261,51.8003869160919],[1.04268242610963,51.769909603606],[1.12442069290619,51.7754509222182],[1.22496400253739,51.8140797034861],[1.24313871020205,51.8592180305604],[1.19901633333596,51.8847874870654],[1.25891137764335,51.9152815082974],[1.27686640373224,51.9447127043926],[1.36280407325483,51.9625430177576],[1.43095881925985,52.0058519092006],[1.47847779982907,52.0585317123558],[1.57917506486644,52.0867558911587],[1.62231803241683,52.1868984631442],[1.63038742895536,52.2684621108478],[1.67552678155121,52.3134187527658],[1.72771610649078,52.4000777986844],[1.73274227484442,52.4448612301528],[1.76357118981522,52.4816350668861],[1.73285379250645,52.5568485479782],[1.74308394536663,52.6205644485387],[1.69756952021577,52.7235391910612],[1.58671256096868,52.8016594826067],[1.41389396511274,52.8907039347454],[1.30717161426657,52.9307754952351],[1.13605060792138,52.9499754221525],[1.0444304986932,52.9673414353232],[0.903827536894482,52.9619968435296],[0.866611474241805,52.9790259337746],[0.534937821290634,52.9746560478121],[0.490019892682054,52.9478293370796],[0.432668536555114,52.8529890393306],[0.351922628534727,52.8094450848774],[0.267002148567531,52.8157118965235],[0.272228339358099,52.7728129925168],[0.186323197484379,52.7353486313374],[0.142076106979268,52.7399180828341],[0.0441494759872833,52.7143823496307],[0.048848482208305,52.6817708046624],[-0.0312706832650579,52.6615327439854],[-0.102195958212229,52.6722061953853],[-0.14106199482318,52.6515074247825],[-0.206037616936727,52.6680733124595],[-0.260628419607621,52.6514134409202],[-0.334985138827247,52.6748706355815],[-0.405694618313302,52.6480559479697],[-0.452832300952799,52.6542749156432],[-0.478814868225147,52.573645147065],[-0.415381402678347,52.5787426397479],[-0.413602640818525,52.5256796137016],[-0.354345203263394,52.5064950723187],[-0.341590492473876,52.4669426273503],[-0.362408041008102,52.4335312780284],[-0.441509864468212,52.3849964344035],[-0.495946267815481,52.3795155302795],[-0.466656737619639,52.3389275764],[-0.541969414284237,52.2899424469085],[-0.653655470981071,52.2682893071709],[-0.63733162156624,52.2273176317195],[-0.668135637658982,52.1950341117758],[-0.627446652788111,52.1815454683205],[-0.635451654776416,52.1392536208873],[-0.591810331121503,52.1106918880999],[-0.66897597717708,52.0487168407765],[-0.645680806107934,51.9722283113145],[-0.702156753865155,51.909119113469],[-0.583563578497735,51.8703238406752],[-0.560611753444012,51.8301117501207],[-0.581825667306615,51.8069054436194],[-0.709295276544129,51.8205395961038],[-0.669160530446024,51.7659344422225],[-0.550082820807204,51.7305750653227],[-0.539260817248429,51.6380393912766],[-0.500595886737316,51.5996898995638],[-0.39946517299048,51.6134074682185],[-0.316672244970353,51.6405355675681],[-0.191066699360921,51.6638967053238],[-0.163477125868523,51.6881208420383],[-0.0110655316635855,51.6808696803679],[-0.0122596870547121,51.6462286971895],[0.0626225817304307,51.6070398176063],[0.224087730411796,51.6317377623678],[0.264104230272526,51.6088770949816],[0.290289733913774,51.5642993932384],[0.211576815311689,51.4900222752128]]]]},"properties":{"ITL125CD":"TLH","ITL125NM":"East (England)","BNG_E":571245,"BNG_N":262605,"LAT":52.23502,"LONG":0.506332,"GlobalID":"9538fe66-2065-42af-aa8d-cc05002e5239"},"id":6},{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[0.211576815311689,51.4900222752128],[0.290289733913774,51.5642993932384],[0.264104230272526,51.6088770949816],[0.224087730411796,51.6317377623678],[0.0626225817304307,51.6070398176063],[-0.0122596870547121,51.6462286971895],[-0.0110655316635855,51.6808696803679],[-0.163477125868523,51.6881208420383],[-0.191066699360921,51.6638967053238],[-0.316672244970353,51.6405355675681],[-0.39946517299048,51.6134074682185],[-0.500595886737316,51.5996898995638],[-0.476595819817008,51.5580311861359],[-0.483266374938188,51.5066408013912],[-0.510241120496709,51.467500348706],[-0.45646755928571,51.438106680605],[-0.359043730240249,51.4118811454518],[-0.307365443633207,51.3783835460082],[-0.260996427671818,51.3795939518848],[-0.21777747301199,51.3456313944137],[-0.163076717058335,51.3302642201145],[-0.124302262796713,51.2867903756192],[-0.0379200854497904,51.3387247442131],[0.00229471949257023,51.3291388504504],[0.0150093784679093,51.2917860700628],[0.136958108456318,51.3441746058011],[0.155875040956964,51.430876583241],[0.221044799984653,51.478617503161],[0.211576815311689,51.4900222752128]]]},"properties":{"ITL125CD":"TLI","ITL125NM":"London","BNG_E":529614,"BNG_N":178394,"LAT":51.48965,"LONG":-0.13448,"GlobalID":"106b3ef7-7bff-4e21-8341-f99683212df1"},"id":7},{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-1.40115565054014,50.7272153610471],[-1.52379131514764,50.7062618251926],[-1.54894329761731,50.6644335300202],[-1.48518299364819,50.6669477975234],[-1.28552165138244,50.57759928666],[-1.18260622067861,50.5983951860798],[-1.16600493090572,50.644002265374],[-1.09805247534114,50.665226816547],[-1.10970780844137,50.7215633046281],[-1.21755528485512,50.7349656497475],[-1.30946692325857,50.7670054761092],[-1.40115565054014,50.7272153610471]]],[[[-1.04423118218365,50.8316944135723],[-1.07660783193164,50.8367971232421],[-1.08863268658145,50.7777370735639],[-1.03209702078451,50.7867846234214],[-1.04423118218365,50.8316944135723]]],[[[0.902019423826626,51.4164905093793],[0.744691897713629,51.446938796652],[0.731033222347362,51.4013736091197],[0.788106767537405,51.3733917881737],[0.897167768282596,51.3543359759935],[0.951024989787225,51.3734796277168],[0.902019423826626,51.4164905093793]]],[[[-0.500595886737316,51.5996898995638],[-0.539260817248429,51.6380393912766],[-0.550082820807204,51.7305750653227],[-0.669160530446024,51.7659344422225],[-0.709295276544129,51.8205395961038],[-0.581825667306615,51.8069054436194],[-0.560611753444012,51.8301117501207],[-0.583563578497735,51.8703238406752],[-0.702156753865155,51.909119113469],[-0.645680806107934,51.9722283113145],[-0.66897597717708,52.0487168407765],[-0.591810331121503,52.1106918880999],[-0.635451654776416,52.1392536208873],[-0.627446652788111,52.1815454683205],[-0.668135637658982,52.1950341117758],[-0.701671512157467,52.1933084347047],[-0.832040075305798,52.1312603534096],[-0.880758452631504,52.1262921523493],[-0.831313005313099,52.0720063385771],[-0.908376568151801,52.0222399672463],[-0.967805300661276,52.0709109281604],[-1.04206410377149,52.0739350801836],[-1.12198746604179,52.0451472428701],[-1.13432869833779,51.997296387881],[-1.19763689128177,51.9772816472427],[-1.28353449972237,51.9795993829644],[-1.27816401885651,52.0142726693672],[-1.31292004347286,52.0514526634399],[-1.2480850615427,52.0971607919138],[-1.3318971346503,52.168485056197],[-1.38539981246728,52.0941455730689],[-1.42585527139589,52.1182494968197],[-1.48780444309778,52.0939574330421],[-1.52530903761447,51.9928568262056],[-1.61234247849955,51.9554034171782],[-1.66575430454863,51.9874888219864],[-1.64552984349675,51.9222942568441],[-1.68686790516724,51.865499769979],[-1.68193160633868,51.8039930873526],[-1.71948863302901,51.783211828608],[-1.6870208353919,51.7398840237491],[-1.69059536080077,51.6054112343858],[-1.64768626504516,51.5719347094789],[-1.58240025292512,51.4942544255071],[-1.52402343880987,51.4474724287348],[-1.55559663765941,51.3955386540797],[-1.49537262165059,51.3696578986654],[-1.49822987932554,51.3293659541047],[-1.53356185391502,51.3162235803486],[-1.53603185288199,51.2485479818718],[-1.60759078945477,51.2527924070843],[-1.63362097701599,51.2175905587049],[-1.68969464697899,51.2148276707553],[-1.6263412733448,51.1173368735328],[-1.62888498210167,50.9990317656901],[-1.60292975190204,50.9785041796413],[-1.66165999760679,50.9452778925552],[-1.83581730052681,51.0094733419781],[-1.92787590068259,50.9976972353567],[-1.92084101012651,50.9614073112474],[-1.84855553218411,50.8898873570296],[-1.85094373356272,50.8587249577509],[-1.80247295729644,50.8429625299587],[-1.81214229625864,50.8067566681678],[-1.78794920841908,50.7665658737608],[-1.69187957994834,50.7372941957472],[-1.57604818098248,50.7166516769893],[-1.51378626707686,50.753230457766],[-1.34237081129794,50.7859307486969],[-1.30640856372924,50.8406796708424],[-1.13625801592775,50.7750348214876],[-1.11641588726261,50.7880080667879],[-1.15233380516287,50.8411291352156],[-1.02412894889485,50.826322559802],[-0.956186029832178,50.8396935408519],[-0.902039961498244,50.7727948555733],[-0.789194243134213,50.722375479603],[-0.716416006237349,50.7742500454352],[-0.538128372787456,50.8021963388375],[-0.388391469458141,50.8066887279008],[-0.272917302021477,50.8269606192727],[-0.0918783287492784,50.8117026378898],[0.0667733107989352,50.7824834522624],[0.123948852211865,50.7581148441573],[0.258222661568121,50.737650970381],[0.349963764592404,50.8098223697895],[0.42729989655128,50.8321261730249],[0.658637808389318,50.8699506781983],[0.788087914509276,50.9332862809526],[0.959860592482384,50.9126188584193],[0.964140643478175,50.9680805161416],[0.997348035727354,51.0250792561785],[1.07559834449459,51.0634836081353],[1.16546522259503,51.0733668649868],[1.37957862132471,51.1421788484779],[1.40106443053318,51.1651813893069],[1.40303442729352,51.2349840575312],[1.36760031676848,51.3133931462204],[1.43633136690188,51.3426241933446],[1.42492483282119,51.3937887726707],[1.28015673354218,51.3781952983324],[1.1021519589929,51.3724648279207],[0.997763933217489,51.3475622355384],[0.897630039101061,51.3444082927545],[0.764794268508334,51.3630820755324],[0.726436540736452,51.3990184313265],[0.6716996732238,51.3773532049329],[0.616297375930775,51.3779268560425],[0.610866385052462,51.417404290701],[0.635814795441336,51.4462226459689],[0.710285623311776,51.4348165241746],[0.703174915090527,51.4712712929666],[0.481491396074262,51.4871629927932],[0.406564619600801,51.4432964970138],[0.276519122502966,51.4535685006829],[0.221044799984653,51.478617503161],[0.155875040956964,51.430876583241],[0.136958108456318,51.3441746058011],[0.0150093784679093,51.2917860700628],[0.00229471949257023,51.3291388504504],[-0.0379200854497904,51.3387247442131],[-0.124302262796713,51.2867903756192],[-0.163076717058335,51.3302642201145],[-0.21777747301199,51.3456313944137],[-0.260996427671818,51.3795939518848],[-0.307365443633207,51.3783835460082],[-0.359043730240249,51.4118811454518],[-0.45646755928571,51.438106680605],[-0.510241120496709,51.467500348706],[-0.483266374938188,51.5066408013912],[-0.476595819817008,51.5580311861359],[-0.500595886737316,51.5996898995638]]]]},"properties":{"ITL125CD":"TLJ","ITL125NM":"South East (England)","BNG_E":470064,"BNG_N":172924,"LAT":51.45098,"LONG":-0.99309,"GlobalID":"047a2ec4-5248-4cf4-bd26-82e7affc102e"},"id":8},{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-1.66575430454863,51.9874888219864],[-1.66382433788403,52.0312666555567],[-1.7676920738422,52.1125783283983],[-1.86344917989937,52.053417723062],[-1.98413574037062,52.0358792744237],[-2.03835621126119,52.0046006235229],[-2.11219762720392,52.0153447349971],[-2.18045118695184,52.0422625534122],[-2.18508403441562,51.9905609788574],[-2.25135998124032,51.9665649342157],[-2.32656514420703,51.9758107384483],[-2.32470967818414,52.0035672783312],[-2.39289223171328,52.0129587700424],[-2.49491293332375,51.9810752068267],[-2.43927491603518,51.8973822861564],[-2.53162394037576,51.8607715469017],[-2.60121663304725,51.8562162644087],[-2.65040070567432,51.8261246889383],[-2.68045213470349,51.7689294147768],[-2.68379147622247,51.7006275155784],[-2.66890807150658,51.6444487463034],[-2.6687900106744,51.6444175670051],[-2.65899196744982,51.6261538649165],[-2.65725547645622,51.6196703528005],[-2.65874827946541,51.6153910725494],[-2.60999005665618,51.6724091606476],[-2.55827028671273,51.6664201929963],[-2.5852071698116,51.6260118935904],[-2.66389522945569,51.5731525412049],[-2.67384501612315,51.5443988058629],[-2.7354325353046,51.4942913667495],[-2.79942435637146,51.4853858021707],[-2.91302295917806,51.3959849116756],[-2.95023859752553,51.3945056578746],[-3.01123616570036,51.3202919498599],[-3.02189668640386,51.2690266975803],[-3.00233165891691,51.226010615079],[-3.07637887941965,51.2013744825612],[-3.15482147932731,51.2086011484176],[-3.27584819130941,51.1797755022787],[-3.41164398996629,51.183863191301],[-3.44201426749691,51.2065061114039],[-3.55454928781029,51.2330952845833],[-3.62171408877056,51.2167743618655],[-3.7697535302731,51.2376665639481],[-3.95823254769538,51.2192154574896],[-4.08811792350737,51.2174541684383],[-4.20159568165928,51.2003275490687],[-4.22255989135025,51.1177960167932],[-4.21035810392336,51.0519360730821],[-4.25689982262869,51.0382284705341],[-4.30358542731271,50.9973453553117],[-4.37495421036809,50.9901035467705],[-4.42771993299643,51.0133330276088],[-4.52604956486267,51.0221885784511],[-4.5450072931772,50.9330400901018],[-4.56984576322975,50.9037021502053],[-4.5584999365786,50.7882580685442],[-4.62888689958319,50.7503850632162],[-4.68412104820778,50.6956755682151],[-4.75705161075224,50.672008241222],[-4.77043196086056,50.6223799598839],[-4.80003004826747,50.597163131432],[-4.88519880226634,50.5822878109695],[-4.97764037479962,50.54535901689],[-5.02422225891532,50.5386668102749],[-5.04246183545353,50.4441491795785],[-5.07468977721508,50.4169369688917],[-5.1473606618623,50.4031808216834],[-5.15386655699987,50.3461438459321],[-5.23404490586802,50.318403036169],[-5.24262899493606,50.2871605580773],[-5.34081757973173,50.2382510481762],[-5.39165282028383,50.2287110301733],[-5.43363286935838,50.1936716053821],[-5.49525370038061,50.218483252072],[-5.53868843800676,50.216206924246],[-5.6712359724266,50.162682378063],[-5.70982532928711,50.1274666629698],[-5.68903190325079,50.0885157977166],[-5.71697949558696,50.0686729823523],[-5.68289882552719,50.037905587891],[-5.55428256304666,50.0601222645866],[-5.52796933243259,50.1250849159249],[-5.31631260633159,50.0841455934866],[-5.25646626740159,50.0231854239882],[-5.23709469738624,49.9766107201884],[-5.19696383967157,49.9639429471095],[-5.16663255993957,50.0037349819917],[-5.10137981771245,50.0042070558271],[-5.06198662441044,50.0604293863355],[-5.10307701237792,50.0866683971677],[-5.09339101856256,50.1261700731163],[-5.04639839616252,50.1687604300563],[-4.99591306252559,50.1619936544852],[-4.95759464655832,50.202226636039],[-4.91909429561605,50.1961633243133],[-4.8629347859456,50.2359660786629],[-4.78096616157119,50.2374898975204],[-4.78119012187568,50.2901557057444],[-4.75647245112486,50.3311868688618],[-4.69156562205376,50.3468302739362],[-4.53901644433005,50.3237156781775],[-4.38697130300878,50.3656935914224],[-4.28270553294373,50.3568352199554],[-4.22034844245105,50.3260503744981],[-4.18148154490139,50.3771557214475],[-4.1258705200411,50.3569892527957],[-4.11899825525202,50.3193411675659],[-4.03867012135073,50.2929256642254],[-3.99320867773481,50.3068326535854],[-3.92245853527117,50.2969999685511],[-3.85808770705541,50.2607796926889],[-3.82309488792993,50.2172593989121],[-3.77331730784705,50.2240619358548],[-3.72120836451095,50.2028975838067],[-3.65900436911631,50.2363563826297],[-3.64617244970509,50.2830158351637],[-3.61038144806727,50.319242056441],[-3.51792808597184,50.3465052485505],[-3.49323036089794,50.4012701007382],[-3.54470197690165,50.4020991491434],[-3.55316895765202,50.449302878172],[-3.51480198381588,50.4816900252691],[-3.49745375480285,50.5383072811641],[-3.44367293738485,50.6015892906849],[-3.35904176136924,50.6090566421346],[-3.30609307434285,50.6294830066613],[-3.26183126617225,50.6718701175488],[-3.18476687391533,50.684945504526],[-3.09603403295296,50.6852230894165],[-3.01094133233363,50.7000238085488],[-2.92089930437522,50.7318231188605],[-2.79363775591863,50.7179641237133],[-2.65255110326318,50.6700254269659],[-2.47240168316337,50.584523901688],[-2.42336640411731,50.6358967211322],[-2.24218349868671,50.6163693241423],[-2.19751592820478,50.6226780367146],[-2.10349625132467,50.5973207425532],[-2.02634590356957,50.5890017812645],[-1.95133668915064,50.5945562590197],[-1.94082790755989,50.6406895896358],[-1.9711021926418,50.6694130112638],[-1.86518879585138,50.7174528351238],[-1.76682686149852,50.7161068873797],[-1.69187957994834,50.7372941957472],[-1.78794920841908,50.7665658737608],[-1.81214229625864,50.8067566681678],[-1.80247295729644,50.8429625299587],[-1.85094373356272,50.8587249577509],[-1.84855553218411,50.8898873570296],[-1.92084101012651,50.9614073112474],[-1.92787590068259,50.9976972353567],[-1.83581730052681,51.0094733419781],[-1.66165999760679,50.9452778925552],[-1.60292975190204,50.9785041796413],[-1.62888498210167,50.9990317656901],[-1.6263412733448,51.1173368735328],[-1.68969464697899,51.2148276707553],[-1.63362097701599,51.2175905587049],[-1.60759078945477,51.2527924070843],[-1.53603185288199,51.2485479818718],[-1.53356185391502,51.3162235803486],[-1.49822987932554,51.3293659541047],[-1.49537262165059,51.3696578986654],[-1.55559663765941,51.3955386540797],[-1.52402343880987,51.4474724287348],[-1.58240025292512,51.4942544255071],[-1.64768626504516,51.5719347094789],[-1.69059536080077,51.6054112343858],[-1.6870208353919,51.7398840237491],[-1.71948863302901,51.783211828608],[-1.68193160633868,51.8039930873526],[-1.68686790516724,51.865499769979],[-1.64552984349675,51.9222942568441],[-1.66575430454863,51.9874888219864]]]},"properties":{"ITL125CD":"TLK","ITL125NM":"South West (England)","BNG_E":333577,"BNG_N":128616,"LAT":51.05302,"LONG":-2.94905,"GlobalID":"c3c72dfa-dd09-4884-b212-6587c2757ea7"},"id":9},{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-3.09017503265769,53.2588675969056],[-3.12177494453644,53.2484706882161],[-3.1933464090179,53.288980285055],[-3.30355096153455,53.3348726522715],[-3.32734489101776,53.356697279022],[-3.49023696774786,53.3250025742618],[-3.6095823605631,53.2904723406925],[-3.70756956057963,53.2938411938098],[-3.77505210893402,53.3282395843884],[-3.85101152212337,53.2961126550192],[-4.03102873997766,53.2374244359824],[-4.12254050657918,53.2371966595688],[-4.19941972268261,53.2099672597167],[-4.20811988704334,53.1872314917486],[-4.34654804111915,53.1045595362021],[-4.3534953340235,53.0334924148751],[-4.52886576395015,52.9374194901787],[-4.58032191299854,52.9359785154372],[-4.65005599146328,52.9060256401572],[-4.76759420810777,52.797586464316],[-4.644623055652,52.7997436612825],[-4.61127589018767,52.8244708795537],[-4.51480487042661,52.7929669764928],[-4.45706160763392,52.871139486661],[-4.31654481205767,52.9085188146797],[-4.22364269316436,52.9193065282645],[-4.1697524600374,52.9058338558527],[-4.11910313682173,52.8480675409748],[-4.1442023094245,52.8008955250637],[-4.06016091758353,52.7204946709919],[-4.12837192385126,52.6111683000604],[-4.05755647652972,52.5307147004556],[-4.05187380754881,52.4817273974756],[-4.09028526538313,52.3982321131635],[-4.14034181844144,52.322615666916],[-4.20749508262614,52.263672116946],[-4.32490781087039,52.2136508482331],[-4.37750288965228,52.2157864341602],[-4.51861821217753,52.1349963367386],[-4.64130368143714,52.1382582950505],[-4.73150798502387,52.1178941339316],[-4.75941942891069,52.0777580506804],[-4.83798154399858,52.0502984949434],[-4.84912079966488,52.0220828972212],[-4.97251988550628,51.9966946525704],[-4.99992968403784,52.0245325429189],[-5.07484734573979,52.0307612056157],[-5.08542811405377,51.9685514823617],[-5.19332493267861,51.9482826333822],[-5.30013702875879,51.9091087085765],[-5.28254490717664,51.8702190701384],[-5.21762981834464,51.8734479605505],[-5.12842590051533,51.8584571996473],[-5.1034937625494,51.7792088563013],[-5.16025408252089,51.7721306958591],[-5.21480565288077,51.7236865618533],[-5.0946890152052,51.7211427382765],[-5.05118326939394,51.693902058717],[-5.05932965267491,51.6205982514537],[-4.92630403656103,51.5961137733767],[-4.86080230678263,51.6471259261845],[-4.78107642494656,51.6349414740423],[-4.69347661544758,51.6719252176408],[-4.69791777661605,51.7111168599515],[-4.6611201196416,51.7316521891459],[-4.55918662978946,51.7419697469822],[-4.37967140720467,51.7273488500246],[-4.33562718965963,51.6861734212881],[-4.28309240376888,51.6676018189667],[-4.19663874386868,51.6837500913205],[-4.14561677345334,51.654808547862],[-4.16474485145329,51.6252103108218],[-4.23782621509286,51.630979145944],[-4.30920622894354,51.6096183824107],[-4.2913391985379,51.5630829763001],[-4.22737175174291,51.5422550855574],[-4.16188040531125,51.5433295452584],[-4.14352311336311,51.5689633971235],[-4.07414867869458,51.5621675412074],[-3.99954145027406,51.5787555133267],[-3.96131636767036,51.6116313588789],[-3.85110423407492,51.6184292886603],[-3.80264815364537,51.5818044080595],[-3.72173005789416,51.4820092591865],[-3.6416243632329,51.466709833445],[-3.5589612520361,51.4013263058974],[-3.40517518144139,51.3813443932825],[-3.28865659949269,51.3871552585437],[-3.16961189759061,51.4062283331254],[-3.1641183772287,51.4518408397825],[-3.1213109906155,51.490508775003],[-2.99535948097479,51.5363869278832],[-2.90504052688807,51.5324171849628],[-2.74844875395497,51.5801430828779],[-2.71039200015043,51.5836694640183],[-2.65794608894467,51.6221251079351],[-2.66890807150658,51.6444487463034],[-2.68379147622247,51.7006275155784],[-2.68045213470349,51.7689294147768],[-2.65040070567432,51.8261246889383],[-2.73884858634764,51.8366165103794],[-2.76830730538435,51.880444841636],[-2.87783522764085,51.9338143761337],[-2.97184633087118,51.9049816267882],[-3.0683134013526,51.9838948193478],[-3.1258949917356,52.0783106756457],[-3.10492212967307,52.1167418938091],[-3.13587330508285,52.1379083922528],[-3.07209180392951,52.213087287645],[-3.07303671037743,52.2358769206364],[-3.00577598466957,52.2642595027327],[-3.0008661068012,52.3217658048495],[-3.11060650812059,52.3771928586202],[-3.21954231380943,52.4212465662123],[-3.23555870572831,52.4425418770695],[-3.11101713479608,52.498934828381],[-3.02920219998827,52.501268025898],[-2.99421971300057,52.5524392755137],[-3.01684357415423,52.5751648644213],[-3.11149542440582,52.5413637648399],[-3.11741414899447,52.5857631475343],[-3.05112433418108,52.6473703199561],[-3.04704782420661,52.6912658409262],[-2.99199278312435,52.7437560385489],[-3.04779141568697,52.7726355742841],[-3.15842528976348,52.793488103831],[-3.16788753046969,52.8192666796899],[-3.09595322236249,52.9302818603715],[-3.03512347363092,52.9294624894448],[-2.98202234589558,52.9591982546682],[-2.9288886576968,52.9386788302752],[-2.84101496067848,52.9426237150063],[-2.79884789455756,52.8957587642381],[-2.72843937384749,52.9253018633927],[-2.7268406065337,52.9832729462979],[-2.83599558996295,52.997150146825],[-2.86147506310468,53.0606604001837],[-2.9950230554338,53.154023960488],[-2.92783850918185,53.1714114107239],[-2.949510091719,53.2112797159544],[-3.02546229105649,53.2483150711708],[-3.09017503265769,53.2588675969056]]],[[[-4.58367354821708,53.290184678637],[-4.49914962514113,53.2067450849194],[-4.50503080660914,53.1878874186144],[-4.41969908598104,53.1639730773067],[-4.35836917888885,53.1314536594533],[-4.2185537429484,53.185627885891],[-4.21443141010517,53.2051363280978],[-4.10054208511342,53.2547763456606],[-4.04274933974566,53.3112830115811],[-4.11897056790485,53.319235851929],[-4.19905863852834,53.2968277157071],[-4.26466032322636,53.3608023569255],[-4.29271747459422,53.4115942026001],[-4.42539823487589,53.4298722278014],[-4.57270334553612,53.4035799703439],[-4.55513130397222,53.3739198616756],[-4.58367354821708,53.290184678637]]]]},"properties":{"ITL125CD":"TLL","ITL125NM":"Wales","BNG_E":263397,"BNG_N":283889,"LAT":52.43587,"LONG":-4.01089,"GlobalID":"548e3f49-cca7-43ce-bb5e-ad71ff1253d1"},"id":10},{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-5.21090169076064,55.7055598559491],[-5.25999792915359,55.7206549567886],[-5.36481326245821,55.6783151236743],[-5.39526813269949,55.611320856379],[-5.34908329510326,55.5709022085495],[-5.35002632481625,55.5137138467048],[-5.30304213441411,55.4602165740497],[-5.19644010432409,55.4338342188231],[-5.08318374827647,55.4554811107711],[-5.12521231510518,55.5241907691053],[-5.08318027493232,55.5521976836516],[-5.1536466318071,55.5784438913144],[-5.12918696996756,55.613495829438],[-5.1591473106074,55.6750925057123],[-5.21090169076064,55.7055598559491]]],[[[-5.18094180440538,55.9244294442871],[-5.22140622792085,55.9012142195968],[-5.10260549978918,55.7797077986069],[-5.03201305379556,55.7535613610925],[-5.00105106482045,55.769971082016],[-5.07837459850971,55.8813899587204],[-5.18094180440538,55.9244294442871]]],[[[-6.12732346859181,55.9380408332869],[-6.19688705719102,55.9269167927419],[-6.30537511381664,55.8668524449313],[-6.45464598780516,55.8524387613955],[-6.456560402719,55.7824524836236],[-6.51333938532306,55.6994963753271],[-6.48844780496896,55.6710724943341],[-6.41476272034893,55.7060422604897],[-6.34729816457538,55.7841635862399],[-6.25226151859654,55.7710233491837],[-6.33150153084837,55.7419856069515],[-6.25909042877479,55.6575921355175],[-6.30376053900368,55.6487025123136],[-6.33918693765328,55.5910941418117],[-6.26783881647806,55.5790683678979],[-6.19400082724871,55.6329764437287],[-6.14939238466816,55.6255645107685],[-6.03752659951771,55.6759948840758],[-6.04691220445192,55.7636435556967],[-6.10403123771251,55.8128819911965],[-6.13208478025674,55.8897247947355],[-6.12732346859181,55.9380408332869]]],[[[-6.13965968779651,56.1228415729883],[-6.24623639185694,56.0840948630188],[-6.25508292829101,56.0488653920159],[-6.21745225914185,56.0303390859813],[-6.13965968779651,56.1228415729883]]],[[[-5.70754609152299,56.1484844851023],[-5.82237673595947,56.0895558740739],[-5.94998695146609,56.0375358421344],[-5.99437833929795,55.9757162673924],[-6.08686129930068,55.8999831280713],[-6.08736638504845,55.8312940126067],[-6.03585964737483,55.7954542483324],[-5.96375035116964,55.7928145831463],[-5.79306080135819,56.0132107183539],[-5.68757708372335,56.1114193433438],[-5.70754609152299,56.1484844851023]]],[[[-6.72652184836342,56.5405843823839],[-6.81766741516864,56.5430752111201],[-6.87287796323518,56.5189188927023],[-6.9509134551597,56.5290115851984],[-6.98769560881446,56.5039688642883],[-6.96682060654614,56.4581522744503],[-6.89406209697054,56.444758374512],[-6.86746458367415,56.4907155931481],[-6.81163091438906,56.4888570195081],[-6.80475363255336,56.5236462035728],[-6.72652184836342,56.5405843823839]]],[[[-6.12622733517066,56.6555099437105],[-6.2270049761724,56.633437121218],[-6.26287972514866,56.6047451356556],[-6.32376728782468,56.6061610904085],[-6.28203268034019,56.5234181234182],[-6.22988778921953,56.5288077977554],[-6.15977181727592,56.503521976563],[-6.11838448157086,56.4513717244603],[-6.20599342359873,56.3852228557376],[-6.19485369854764,56.3588456076382],[-6.10596848379502,56.3668233822175],[-6.10299361863917,56.3422084962318],[-6.19029857150191,56.3322051040238],[-6.3567246611394,56.343663799897],[-6.3495397103022,56.2848291689494],[-6.30504782705575,56.2672547835961],[-6.25201287494862,56.2860904788709],[-6.04400565993726,56.2930439035663],[-5.99025473935573,56.3203435686131],[-5.87648919830498,56.3250191111814],[-5.83409605790918,56.310871166319],[-5.69677562920051,56.3696971267457],[-5.65262336383264,56.4154722461238],[-5.66156011596821,56.4481851494451],[-5.7966136760538,56.514845962288],[-5.95148996046346,56.5180445735701],[-5.98937144776148,56.5796877218104],[-6.06656016671157,56.6385850999588],[-6.12622733517066,56.6555099437105]]],[[[-6.45345124121321,56.6878148916729],[-6.56567606378342,56.6585932749995],[-6.63701593048795,56.6179205749334],[-6.56671189860839,56.5865007987966],[-6.49415718490454,56.6268254986252],[-6.45345124121321,56.6878148916729]]],[[[-6.11171763096846,56.9245064178611],[-6.20807340046603,56.9049360311962],[-6.16320589839704,56.8721142224272],[-6.11634643985419,56.888664672643],[-6.11171763096846,56.9245064178611]]],[[[-6.30803397022311,57.0535975402376],[-6.39778887952175,57.0426992130785],[-6.45964756412455,57.0071797283015],[-6.31188922849399,56.9348963708466],[-6.2599801725716,56.962379000899],[-6.23833951065639,57.0047568667551],[-6.30803397022311,57.0535975402376]]],[[[-7.44924734520651,57.0251746694028],[-7.49946253111143,57.0141858891707],[-7.53112582882186,56.9474188616292],[-7.44945403485902,56.9467555813812],[-7.40322923798221,56.9869371496818],[-7.44924734520651,57.0251746694028]]],[[[-7.32568245679051,57.4051209993616],[-7.42953329348576,57.388045423682],[-7.40376189256762,57.3592957068048],[-7.39670052165491,57.3014604335375],[-7.43549300849561,57.2365044368198],[-7.41241299758139,57.1496474997464],[-7.37348850631353,57.1039114649842],[-7.23399966119821,57.1040785532429],[-7.26563161995983,57.1931847184746],[-7.22699087242752,57.3233908351075],[-7.27136609212472,57.3241923326403],[-7.26988899214429,57.3790462395322],[-7.32568245679051,57.4051209993616]]],[[[-5.97839010772008,57.4945850996114],[-6.05721303400658,57.459836714714],[-6.08486121148516,57.4213213684379],[-6.08284582213661,57.3522508695649],[-6.05026873848664,57.3283824845843],[-5.99276981352828,57.3581882440775],[-6.03234615260128,57.4294448492211],[-5.97839010772008,57.4945850996114]]],[[[-7.23962803773831,57.4647999827045],[-7.36762037526967,57.4917520708722],[-7.40528105910037,57.472085722633],[-7.39221739432497,57.4240642685304],[-7.23793565294895,57.4017637966499],[-7.23962803773831,57.4647999827045]]],[[[-6.34173046258963,57.7014666395638],[-6.35357217839783,57.6712057593609],[-6.42770448904871,57.6421503004449],[-6.39423759506935,57.6127239755971],[-6.39847905808816,57.5624097670074],[-6.36518715058967,57.515202660943],[-6.44823361058412,57.4860362016879],[-6.5043194340484,57.5340497482609],[-6.56551356049658,57.5482273531915],[-6.63746225746075,57.5022672816996],[-6.59048651969531,57.4489116919335],[-6.63967634651037,57.4427343020501],[-6.71691998334388,57.5136863447414],[-6.78610938655949,57.4375220805666],[-6.74312246374005,57.4176194155505],[-6.7194619607821,57.3716639241057],[-6.56355526898543,57.3386188251443],[-6.57297990686793,57.3884914343712],[-6.53158660972898,57.404353281203],[-6.46780687185908,57.3779718653702],[-6.43532727994443,57.3244912605588],[-6.48278322202102,57.3109793429642],[-6.45149042311158,57.2624271859075],[-6.36296980867077,57.1922074305737],[-6.20967556567633,57.1778059761359],[-6.16329317350294,57.1990857742492],[-6.1019494109198,57.1701115006674],[-6.04975057886596,57.1757619400601],[-5.93180387169076,57.1585537263308],[-5.99775586565346,57.1241107876466],[-6.03764063630621,57.0474207125344],[-6.00182246584785,57.0201507770687],[-5.92382795637895,57.0431689286817],[-5.85444118168507,57.1069885658921],[-5.80463351800149,57.1210258263367],[-5.80096285108261,57.1526439600131],[-5.66936766132999,57.2088896685018],[-5.66708872542593,57.2648337769139],[-5.75345843530521,57.2747009104146],[-5.86366113206409,57.2416117444196],[-5.99387072369783,57.2704189873963],[-6.0558326977032,57.3131675589303],[-6.10891573975881,57.3196953849868],[-6.14621153964635,57.371033341874],[-6.13899024515472,57.5452985278361],[-6.18928024835615,57.6315190069176],[-6.23535224544889,57.6373616674448],[-6.2526237156488,57.6746182718847],[-6.34173046258963,57.7014666395638]]],[[[-7.3111222842175,57.6863449246065],[-7.37590370193799,57.658788303484],[-7.46091827883694,57.6579679276091],[-7.53223376730076,57.5985954173506],[-7.4645630622701,57.5651029745451],[-7.40987179472149,57.5712869395768],[-7.36933931411494,57.502474269765],[-7.31694907359662,57.5245506529599],[-7.17681464746848,57.5083563412161],[-7.13899609192663,57.5257696661059],[-7.10039256769793,57.6079222336017],[-7.06311739023324,57.6403036613688],[-7.19501460810746,57.6908409486704],[-7.27827535982044,57.6642875145352],[-7.3111222842175,57.6863449246065]]],[[[-6.82815322709202,58.204643801702],[-6.93241930378667,58.1878417089994],[-6.94208350916556,58.2188909268176],[-7.03859113805938,58.2327987440001],[-7.13544864779399,58.1228438373468],[-7.10048365055463,58.0701591139598],[-7.03894850173118,58.0337421133025],[-7.09022372233112,57.99490628919],[-7.07994979884332,57.9671202656922],[-6.94387472279696,57.9506904036106],[-6.91843040359009,57.9108412349768],[-7.02314890203309,57.8346744616619],[-7.11949997816631,57.8163295285352],[-6.99266985424681,57.7443541358764],[-6.87504233489946,57.7741953631746],[-6.86288188970532,57.8124233705189],[-6.80686245175423,57.8155845540625],[-6.75558292492095,57.8426398170132],[-6.74454968484115,57.8861257528312],[-6.66574245638554,57.8821256892989],[-6.67388063471026,57.9172226632746],[-6.54128144799867,57.9173249535733],[-6.47154195025196,57.937927910048],[-6.4373771162578,58.0162336705148],[-6.36008938877363,58.0369827009711],[-6.39863948455536,58.1104354734584],[-6.34798274062359,58.1904069710594],[-6.28652204017575,58.2039441878568],[-6.251843140482,58.1802183522442],[-6.17894357201317,58.2038527951781],[-6.20134864416088,58.2477905605769],[-6.28473712953667,58.2067445396995],[-6.32839239218663,58.2616240751465],[-6.18643227672217,58.3479755529637],[-6.21291290558099,58.3716334869007],[-6.16712460829173,58.4296769144002],[-6.18282839494052,58.4679562115944],[-6.27151487470557,58.4988008397582],[-6.30789004938023,58.4767580461697],[-6.43586207615504,58.4345450183109],[-6.54713539941229,58.3650744255361],[-6.66812560288009,58.3497287158585],[-6.82370858317497,58.2817952720053],[-6.74355244706668,58.2119798532017],[-6.82815322709202,58.204643801702]]],[[[-2.03456758533587,55.811183932416],[-2.07690339436692,55.8726280106266],[-2.12565988173364,55.8836546190265],[-2.13738692652476,55.9164548840261],[-2.22370023215499,55.9330029889817],[-2.33715819709701,55.9344848244836],[-2.44525552503395,55.9879121680546],[-2.57018295487758,56.0070821615422],[-2.62043225603374,56.0479754977206],[-2.81312554203663,56.0633018598096],[-2.85487377159978,56.016276101304],[-2.9214664295023,55.9735180257234],[-3.06839303321462,55.9466086279348],[-3.15719603564969,55.981917843242],[-3.29171134374161,55.9791891722812],[-3.35196599482099,56.0015800368501],[-3.38969103059679,55.9897893699212],[-3.5047104743099,55.9979565395031],[-3.66839977553361,56.0467156183916],[-3.48224119283248,56.0338203432555],[-3.40908288162381,56.0161978616082],[-3.29496189153614,56.0529577521595],[-3.17437959615683,56.0626004661124],[-3.15101599569897,56.116699748493],[-3.08422197515844,56.1397073468872],[-2.97216677423337,56.2054454138259],[-2.92469344486672,56.2122041273038],[-2.83646759598554,56.1851280297995],[-2.69295584283694,56.2210701319789],[-2.58878339972878,56.2755544017735],[-2.66038262371551,56.3183236811436],[-2.77743418036487,56.3327366053637],[-2.88129140965178,56.3623407775984],[-2.82434449939238,56.3799261685743],[-2.80359358614587,56.4295389737573],[-2.91811563516902,56.451641592958],[-3.19568711851728,56.3638554800211],[-3.19367190611288,56.3846099509044],[-3.08549128865512,56.4504953055355],[-2.99043387525283,56.4513207483275],[-2.80273638514148,56.4801692181579],[-2.73356377121039,56.4649777040715],[-2.71603748778778,56.4953617640208],[-2.61888720211905,56.5448904462924],[-2.53758557684175,56.5668359026146],[-2.48203177238337,56.6264243219863],[-2.51609065990643,56.6985510999012],[-2.42456007949952,56.7547406709866],[-2.31619437757075,56.8015154969504],[-2.2300671700327,56.8660313964503],[-2.19647210106079,56.9088542823016],[-2.20915358245314,56.96764048985],[-2.09209775082078,57.0679964716408],[-2.04862698998353,57.1283144094158],[-2.0768388229462,57.1775781990949],[-2.04385338424142,57.2432252019561],[-1.96553663070551,57.327896907955],[-1.86509441837235,57.3890633518789],[-1.78038112511705,57.464670742278],[-1.82208914180923,57.5705515725593],[-1.82345683514347,57.6121233064668],[-1.88533788767429,57.6351214860598],[-1.91939604348959,57.6739005621478],[-2.1180893038638,57.7011152899011],[-2.17526852106945,57.6735944598026],[-2.29754875592422,57.6962031526027],[-2.39650245648291,57.6682882311068],[-2.50623590584054,57.6682498600529],[-2.82424097673323,57.6925136483939],[-2.85145147699116,57.7065548290813],[-3.02725011656668,57.6636069041905],[-3.23058875521146,57.7015726019388],[-3.29262075544818,57.7246682551631],[-3.38215765881666,57.7198059688258],[-3.48951632993923,57.6994841552387],[-3.51488616653805,57.668357514661],[-3.62311509969695,57.6352463390142],[-3.64402948126245,57.6631649772723],[-3.78233768201308,57.6241931263205],[-3.83248352224543,57.5972308962699],[-3.9301177765617,57.5858184253474],[-4.0128590527559,57.6010305550754],[-4.03821625403576,57.567991234046],[-4.16988310772966,57.489646567302],[-4.37754973988867,57.4794048475581],[-4.41713521723024,57.50437752893],[-4.23440764972875,57.500776341783],[-4.17493271071284,57.5588998245324],[-3.99418026984981,57.6768151531476],[-4.1612291780861,57.6579398268089],[-4.16589148376907,57.6861408876324],[-4.07318382543195,57.7322623671878],[-4.03641310697851,57.697561513104],[-3.97490098845411,57.6946628360145],[-3.91632248156291,57.7525629366064],[-3.79331743577587,57.8364521673817],[-3.89521220781347,57.8209001525672],[-3.96633927485811,57.8452036339153],[-4.04802693688735,57.8153204624269],[-4.14112209378142,57.8553951948205],[-4.01861369179117,57.8630256981155],[-3.99220805026075,57.9030799578842],[-3.9832737181571,57.9695621766463],[-3.84119059648804,58.0131637923999],[-3.80426880893597,58.0570554970674],[-3.74536155155804,58.068199087613],[-3.66040534318858,58.1115311245609],[-3.50841307954147,58.1718153648497],[-3.38137310598298,58.2703848503104],[-3.22884390524471,58.3045289953868],[-3.10811831883957,58.3711299190509],[-3.0496946543013,58.4518932566393],[-3.11184283858609,58.4758011099614],[-3.12590008143844,58.5273750919458],[-3.06812826320143,58.564071949731],[-3.02451190967768,58.6436777692642],[-3.15754686647441,58.6372073952004],[-3.23875452857638,58.6494529281771],[-3.41265868952103,58.6400354166634],[-3.37062770119101,58.5944192733004],[-3.53584942880138,58.6229762438069],[-3.65789176877068,58.6195531121666],[-3.74994381614654,58.5789733937949],[-3.86357562731323,58.5632970839685],[-3.9328709067765,58.5730569459321],[-4.08457651534891,58.5577171283705],[-4.12609790695417,58.5694025137255],[-4.23796554361005,58.5261840934417],[-4.30588147032392,58.5431742371561],[-4.40922874002423,58.5216550063008],[-4.49915479594041,58.5762344858655],[-4.58054829251093,58.5798857125731],[-4.5932612076552,58.5346274940878],[-4.65420003651836,58.5445191907565],[-4.87251810859524,58.6101034873351],[-5.01579168644655,58.6153298575433],[-5.01554594479704,58.5780504776873],[-5.05058257179878,58.5407711015683],[-5.11347294937963,58.5216440697707],[-5.12493227838426,58.493916043075],[-5.05745913523114,58.4638057146685],[-5.1156250676389,58.4283955822211],[-5.17486892069264,58.3630653782574],[-5.11854647713125,58.2688607938852],[-5.24360049809994,58.2494440788494],[-5.36162453357889,58.217893211551],[-5.27896107104926,58.1142207930082],[-5.28224193723305,58.0737814713884],[-5.35760505529284,58.0681138090985],[-5.40208090736194,58.0968085923977],[-5.44399075503933,58.0620738980199],[-5.35703836040245,58.0263824773993],[-5.30828598317839,57.9876969053514],[-5.1922337511536,57.9574555975834],[-5.17945572195673,57.9410092132349],[-5.29727714480783,57.9103780641886],[-5.30935448517509,57.8784686833943],[-5.42223861061913,57.9092075363278],[-5.45466634136853,57.8509299805983],[-5.53624169148898,57.8679363950551],[-5.56144869721007,57.9177834676019],[-5.61832594672294,57.9243390291369],[-5.65587732033726,57.8890392869785],[-5.58190795585728,57.8360869313554],[-5.62348364449156,57.768318243926],[-5.70050458982514,57.8706948225285],[-5.81402413490596,57.8581772115629],[-5.80139995266349,57.783340809475],[-5.81298294589838,57.7498885002804],[-5.69683366160478,57.7301414177818],[-5.67169801605204,57.7014383698583],[-5.78921134617074,57.6974051211015],[-5.81888072201793,57.6389706750533],[-5.73332887174511,57.6067448387629],[-5.6702454570752,57.5531614580053],[-5.51678055473932,57.5495734178215],[-5.65198155871603,57.5115313365223],[-5.70876855785095,57.5562136604401],[-5.83736546281518,57.5782450745113],[-5.87287766740317,57.4741414220665],[-5.81726909860618,57.4438462378128],[-5.83057584891813,57.389052990739],[-5.78843854447811,57.3463828909576],[-5.68876201136783,57.3784778249551],[-5.63394239020257,57.3800609455738],[-5.61869826380189,57.3375263929095],[-5.68042856871546,57.339075767785],[-5.71820050693424,57.2835542777713],[-5.53486506728848,57.2821667715769],[-5.63599846660008,57.25041877408],[-5.62372427515525,57.2124863830773],[-5.68946379908101,57.1723729092127],[-5.64696121647963,57.1274733817977],[-5.72192509466588,57.1182214544658],[-5.79761808814623,57.06526597423],[-5.72744412590039,57.0183086397618],[-5.82071120153899,57.0118628519032],[-5.86371312565058,56.8842353537174],[-5.75888768942857,56.8785343636528],[-5.75732113188347,56.8480641666102],[-5.86500348867224,56.8106616756343],[-5.8623251322722,56.7781364191883],[-5.90945849578769,56.7497890632938],[-5.97133087224068,56.7723746092446],[-6.06495301861683,56.7586252541726],[-6.1191856295522,56.7654041796059],[-6.22495934390485,56.7206007649364],[-6.18452082427458,56.6873902383363],[-6.1178309316986,56.6966671587028],[-6.03020307396274,56.6803074280434],[-5.84473194650131,56.674343753781],[-5.83977671368727,56.6605807449089],[-6.00401746110046,56.6493519807459],[-6.00097055998957,56.6198111288015],[-5.90771982995657,56.5558029919945],[-5.77140250521469,56.532541039652],[-5.68349015295185,56.4976987380401],[-5.56113339146726,56.5440412744049],[-5.48829257740021,56.6102599237969],[-5.39967648531135,56.6465188921927],[-5.12560786594113,56.8271916668343],[-5.22909544149103,56.7294232079955],[-5.2514705720801,56.667162686165],[-5.3610016443532,56.6036362127777],[-5.40827273064794,56.5606796537577],[-5.42704492859331,56.4956696691291],[-5.40699595336606,56.4589399384464],[-5.48331375945313,56.4359125245084],[-5.53677070491538,56.3583158508867],[-5.57773398847559,56.3331765802058],[-5.59802921232159,56.2520274113573],[-5.54295787882353,56.2395249207057],[-5.55733708167353,56.2038566870944],[-5.50738144278866,56.1823499478623],[-5.70469364728839,55.9625258384427],[-5.67612041828945,55.9591933388501],[-5.67844790976634,55.886623100922],[-5.66445902753637,55.799778166453],[-5.59148545410797,55.7665767511619],[-5.61999622105933,55.7097221071145],[-5.66307152596796,55.6678373244596],[-5.69272925960353,55.5873719547761],[-5.71541276461605,55.5749081865809],[-5.7129178342699,55.4583033934861],[-5.72227692574052,55.4266909757543],[-5.7947118767293,55.392058234773],[-5.80322576215421,55.3048920952193],[-5.75461380192295,55.2896077381027],[-5.69083661310555,55.3066857142021],[-5.60351648269672,55.3075382163166],[-5.5214947539335,55.3598163845915],[-5.55256344450865,55.4178355818009],[-5.54448139688574,55.4677410691527],[-5.48995535457048,55.5300058677883],[-5.46492605282648,55.5854059343128],[-5.48176362027284,55.6436824618952],[-5.45102838420286,55.7071148889272],[-5.39096849717472,55.7512625362428],[-5.31467931347365,55.782650171144],[-5.41951307261804,55.8964589813877],[-5.44954818819314,55.9727081178763],[-5.44815717537295,56.0173195507861],[-5.38375393746794,56.0032148294789],[-5.32954272911849,55.9543505610429],[-5.34910877594276,55.9083158685331],[-5.31239242885885,55.8566040568711],[-5.2030500053585,55.8406502604256],[-5.2421890234865,55.8944308883638],[-5.1664803625721,55.9324010352035],[-5.04472554815256,55.8709643931823],[-4.97783047518659,55.8646358042558],[-4.89578832092172,55.9878594356463],[-4.91025293613236,56.0454702353411],[-4.88000273856419,56.0581683293615],[-4.84086794132882,55.985902893145],[-4.72461949698433,56.0011669007334],[-4.64505385963967,55.9310865773514],[-4.81757705526848,55.9628251289198],[-4.87694317608202,55.9435304669371],[-4.891527791794,55.8359731309847],[-4.85738855095161,55.746882943912],[-4.90305406185517,55.7222008973901],[-4.81533808273687,55.6475101351794],[-4.69701417890925,55.6059218876016],[-4.65740436208644,55.5697820853596],[-4.66409731434978,55.5419381495431],[-4.620345838045,55.4970011383552],[-4.65093567716405,55.440830838042],[-4.74058999799188,55.4228239903609],[-4.77548868418967,55.3593601111688],[-4.84607346648394,55.3246102345555],[-4.8361139824092,55.2831549615175],[-4.85904853824098,55.2322135401876],[-4.94153296269468,55.1640249188707],[-4.99319252229729,55.1405471521024],[-5.01371354041456,55.0885037872264],[-5.05194411637251,55.050397220221],[-5.0551435065576,55.0128601946057],[-4.99078213166036,54.9217557546393],[-5.07056830165024,54.9360514535349],[-5.06082340245594,54.9676951505394],[-5.09740038368603,55.0171985676593],[-5.15778433181836,55.0080068496557],[-5.18611912775582,54.9749079237418],[-5.18531306462216,54.916400127012],[-5.10572775695323,54.8303787525837],[-5.00114320977942,54.7728705872658],[-4.99252770533244,54.7349606862841],[-4.94785032278166,54.7000657719252],[-4.96486915680276,54.6640776451635],[-4.88207872266321,54.6693028209661],[-4.96110987419294,54.8040210741848],[-4.939169641558,54.8308518710815],[-4.81122702893403,54.8642482465544],[-4.78340430706132,54.8349389029638],[-4.70903677604128,54.8240847398676],[-4.60081169678793,54.7769596852111],[-4.57158766205834,54.7381045091755],[-4.50841138586815,54.7090182411956],[-4.39380587684284,54.677463265339],[-4.3669425941919,54.7228625663229],[-4.35449319744665,54.8133613879825],[-4.4122381159587,54.8279812039689],[-4.4256874606691,54.8822846844541],[-4.30724468836978,54.844626828951],[-4.22098392944494,54.8291745172838],[-4.15970093064761,54.7803066399342],[-3.9849919216907,54.7686881922632],[-3.83692988543512,54.8162757439379],[-3.78839761147345,54.8532069578637],[-3.72610375988832,54.876016352636],[-3.59493194424663,54.8839544026013],[-3.54990647573041,54.9733330084433],[-3.47607008352192,54.9667824019146],[-3.330775394889,54.9794595977712],[-3.26911472452693,54.9655089525568],[-3.11873053475892,54.9744244541297],[-3.11757390265339,54.9748505475602],[-3.05639300834839,54.9866593513123],[-3.0258749316412,55.0364588169844],[-2.89704669119711,55.0778720526317],[-2.82550257520544,55.1383140722935],[-2.7848482544576,55.1417914408718],[-2.68978972314827,55.1889838768114],[-2.63141420722149,55.2236980857955],[-2.62665606673464,55.262220938519],[-2.47539346393945,55.3547399208929],[-2.37891180668306,55.3491694380124],[-2.33752995734802,55.3671909676834],[-2.34494682160794,55.399313431888],[-2.18807797549864,55.4621152753329],[-2.22884551551699,55.509518780902],[-2.2403065059112,55.5556271692665],[-2.28881057092811,55.5803072667808],[-2.33600510128162,55.6324814828842],[-2.24834586160377,55.6521497554078],[-2.16723105928948,55.7060351656943],[-2.14429584165104,55.7392700694797],[-2.0856391490368,55.7620403330448],[-2.0861230942702,55.793045271488],[-2.03456758533587,55.811183932416]]],[[[-3.35182866573298,58.9319394116814],[-3.40512284191145,58.9200805109363],[-3.43511134359024,58.8756026053285],[-3.296501034476,58.7779340766508],[-3.18817219784265,58.7770344130947],[-3.13910403303522,58.8015231075909],[-3.21488810859729,58.8406185568399],[-3.21306909101265,58.8779596367689],[-3.35182866573298,58.9319394116814]]],[[[-2.80220890195221,59.0807805890982],[-2.93394841306716,59.0303738496367],[-2.83597634158049,59.0254607974833],[-2.80220890195221,59.0807805890982]]],[[[-3.35628990510188,59.0478488004109],[-3.35579811989467,58.9648620218573],[-3.23034247639343,58.9670451975357],[-3.19875073535455,58.9137694572196],[-3.0268668290085,58.9411830677803],[-2.98347942736216,58.962617607438],[-2.91344660063805,58.8691413282299],[-2.96332230205122,58.849620939697],[-2.98338166100798,58.8121765579162],[-2.93059285790979,58.7942932211701],[-2.88087946793731,58.8522660610665],[-2.77900863376968,58.9162888799487],[-2.71249280804205,58.920665022377],[-2.70823956295436,58.9728853018568],[-2.78785356950702,58.9513396300192],[-2.91893105896559,58.9649651605008],[-3.00439842334219,59.0091011165009],[-3.00592923468611,59.0734159719906],[-3.09531009556557,59.1182584881072],[-3.19828992004681,59.1541189468698],[-3.31530990852461,59.1348383268769],[-3.35778943594402,59.1035942236106],[-3.35628990510188,59.0478488004109]]],[[[-3.0682010801677,59.1951665651733],[-3.11835812848009,59.17266193959],[-3.04010505636203,59.1264751935203],[-2.965639977414,59.135059004843],[-2.97875199033675,59.1631720223725],[-3.0682010801677,59.1951665651733]]],[[[-2.95257742710886,59.3543475325913],[-3.0369183453404,59.3122550448628],[-3.00841893861634,59.2743877272539],[-2.92809161534498,59.2855454594498],[-2.95257742710886,59.3543475325913]]],[[[-1.07965721830233,60.1879362093539],[-1.1479174922677,60.1732210269118],[-1.0749240235678,60.1081860470996],[-1.0502631007239,60.1606585482545],[-1.07965721830233,60.1879362093539]]],[[[-1.27070291287785,60.2357577758082],[-1.3023538419665,60.1488855624313],[-1.274152825931,60.0974970587684],[-1.3177285728705,60.0128498245397],[-1.34694184868252,59.9989339919228],[-1.37907808382909,59.8943929051402],[-1.31885307438073,59.8975151438065],[-1.27026839572518,59.9330508374702],[-1.20043843717109,60.0384164991728],[-1.21685836188833,60.0741397241121],[-1.18819724900589,60.1277448947311],[-1.14908183175821,60.1509592263834],[-1.15400469534866,60.2038999666588],[-1.23139257094865,60.2297457424017],[-1.12502409737741,60.2731224407206],[-1.11819292218845,60.3453022958669],[-1.07549959591459,60.3567350250298],[-1.09336280279183,60.4085312942683],[-1.15136335205299,60.4034003850428],[-1.22766376345946,60.4948136969701],[-1.31148339672881,60.4822033810092],[-1.30565128192613,60.6189495143405],[-1.41132933081384,60.6153386135752],[-1.43456451215942,60.5737832635846],[-1.51831466391848,60.5316963964894],[-1.6107131242509,60.5088668038141],[-1.61226798441089,60.4771501682862],[-1.49627652339582,60.4841218424781],[-1.44939788035094,60.4442878649961],[-1.45275263873404,60.4160140083266],[-1.33866430636206,60.3559637253182],[-1.37018845324094,60.3367210261383],[-1.50542105867654,60.3194736506825],[-1.56918586874331,60.2948786171169],[-1.68958152655901,60.2989150040477],[-1.68968220687181,60.2346024796128],[-1.54074954754347,60.2101697798022],[-1.51056139559084,60.1647017862479],[-1.42225414712558,60.1647444563186],[-1.39453599875981,60.1998743002744],[-1.27070291287785,60.2357577758082]]],[[[-1.04342641592854,60.7316401807911],[-1.12788582354832,60.7266578119685],[-1.12587473029554,60.6924615749818],[-1.18814439728047,60.6349227489354],[-1.2024039341059,60.5669668944988],[-1.16791612619831,60.4991418276405],[-1.04166735401712,60.4899989424274],[-1.00572788321,60.5655124348915],[-1.03092156960853,60.6295015552996],[-0.989223947726648,60.6549844227799],[-1.00938717766991,60.712923141647],[-1.04342641592854,60.7316401807911]]],[[[-0.875920811331636,60.8456753003228],[-0.954934066062826,60.7913444724844],[-0.939173453742349,60.7509138346868],[-0.984261025834677,60.7194221205988],[-0.957037225527502,60.676298599823],[-0.870727920235312,60.702224828331],[-0.802805507457854,60.7584874915457],[-0.823541815469482,60.7896430566489],[-0.787905447936431,60.8260470830142],[-0.875920811331636,60.8456753003228]]]]},"properties":{"ITL125CD":"TLM","ITL125NM":"Scotland","BNG_E":277797,"BNG_N":700481,"LAT":56.18123,"LONG":-3.97028,"GlobalID":"32ff79cd-56d5-4f62-811b-2b3e4c251c41"},"id":11},{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-5.63980565703616,54.2629886432719],[-5.60858887114142,54.2512944002762],[-5.55054113027579,54.3063507320996],[-5.4967641358556,54.3332820510907],[-5.45815125000125,54.3929894909045],[-5.47929553005898,54.4303795944434],[-5.4356139142063,54.457127811339],[-5.52161466863824,54.5976168612403],[-5.53019904968831,54.6449182121535],[-5.57646024935499,54.6751356307944],[-5.72067687547252,54.6670337788185],[-5.74102429190467,54.6776159538106],[-5.85522913160919,54.6335224770354],[-5.91285948795053,54.6479848355848],[-5.84070013154874,54.705219001141],[-5.74424872422853,54.7253427882057],[-5.68804706275384,54.7669586146604],[-5.71431692859883,54.8384420810149],[-5.79760395007116,54.8521544729954],[-5.87805459518433,54.9076396726483],[-5.91898707001459,54.9617533994696],[-5.99166571770805,54.9863956005934],[-5.96479416705047,55.0488349782718],[-6.04244812238582,55.0529667037484],[-6.0284109748082,55.1621367524353],[-6.07413148321216,55.1979701018179],[-6.1459150896172,55.2280094061846],[-6.23618491046875,55.2026761066815],[-6.28942674601603,55.2302465723164],[-6.36802002692282,55.2458111722722],[-6.40930554102057,55.2322799198476],[-6.50461309737399,55.2436866059411],[-6.53624172055231,55.2195414385284],[-6.71027854717151,55.1915556622004],[-6.75262324907807,55.1685470567638],[-6.87472061554582,55.1680703785114],[-6.9654125985202,55.1944495321838],[-6.96675845093961,55.1527156108338],[-7.01449417799302,55.0760345008798],[-7.05954799950252,55.0476027843045],[-7.13081405113029,55.0420123051312],[-7.193842308717,55.0595614626483],[-7.34581158338121,55.0504271671838],[-7.40558090810418,55.0033098726733],[-7.4060907351913,54.9544813490238],[-7.4471873528439,54.934915674574],[-7.44316031457941,54.8712170227346],[-7.48407812861888,54.8237740197135],[-7.54930558585403,54.7893537464456],[-7.54918948339756,54.740485503449],[-7.63662067766314,54.7515008447956],[-7.74493161313278,54.7051987610734],[-7.83668374304635,54.7364274220209],[-7.91367841866587,54.6755965976516],[-7.81325914533255,54.6438839956879],[-7.75147497886599,54.5987990265961],[-7.85051187442265,54.5330034424757],[-7.94972356429179,54.5336450692052],[-8.00596571136953,54.5459418315675],[-8.04175544626199,54.5064922694045],[-8.15924947012895,54.4403151335847],[-8.08413725874874,54.3973973768306],[-8.05739402500478,54.3657415563228],[-8.00028816203084,54.3580955956059],[-7.96165131898819,54.3124348820642],[-7.88818652258611,54.3005416211367],[-7.86046471107513,54.2602601265533],[-7.86024218460512,54.2175535507195],[-7.80367474061294,54.2070152743076],[-7.68542757447256,54.2077593896842],[-7.6104043629189,54.1437969797738],[-7.47932887615282,54.1222484755681],[-7.44233997568184,54.1539028096938],[-7.33945498671651,54.1468352310104],[-7.27976514993974,54.1676268133549],[-7.22084650877722,54.2158112540253],[-7.14495174669456,54.2247154737627],[-7.18883022750182,54.3376489453031],[-7.15331165024891,54.3352650013301],[-7.02907277361944,54.4213258057242],[-6.92379310878419,54.3828964293487],[-6.87595228738454,54.3465223252159],[-6.81616846653069,54.2230075553295],[-6.74110982825868,54.1824530535835],[-6.69185994092017,54.2002286755499],[-6.62971588703464,54.1535378798767],[-6.66888232457386,54.0728376502768],[-6.62383843790942,54.0364871479256],[-6.44352624932341,54.0564653965045],[-6.36355274375571,54.0725925202476],[-6.29088218758648,54.1126750153287],[-6.19809850043,54.098170061891],[-6.15938706237367,54.0649566834428],[-6.09494940355491,54.0626422695916],[-6.06317856379422,54.0228460978972],[-5.89833942067442,54.1040136670771],[-5.87177602642365,54.1676037211965],[-5.89286626873741,54.2054256269818],[-5.8216236976748,54.2433773459281],[-5.63980565703616,54.2629886432719]]]},"properties":{"ITL125CD":"TLN","ITL125NM":"Northern Ireland","BNG_E":86544,"BNG_N":535337,"LAT":54.61502,"LONG":-6.85571,"GlobalID":"9aab521a-2fca-4e2f-a342-5fcc8029c377"},"id":12}]}');function ton(e){const n=1e3,t=1e6;return e>=t?(e/t).toFixed(e%t===0?0:1)+"M":e>=n?(e/n).toFixed(e%n===0?0:1)+"K":e.toString()}function aon(){const e=(0,eg.A)();return{renderer:n=>{let{datum:t}=n;return{heading:t.name,title:e.formatNumber(t.value),data:[]}}}}const ron=(0,f.styled)("div")({width:"100%",borderRadius:10,overflow:"hidden"});function ion(e){let{type:n}=e;const t=eon[n],a=aon();return(0,Ze.jsx)(ron,{children:(0,Ze.jsx)(h5e.ui,{options:{height:700,data:t,topology:non,background:{fill:"#f7f7f8"},series:[{type:"map-shape",idKey:"name",topologyIdKey:"ITL125NM",colorKey:"value",colorRange:["#dbdef9","#c4c8f5","#a1a8f3","#636ff9","#2838ff"],tooltip:a,stroke:"#b1b2bf",highlightStyle:{item:{strokeWidth:1}}}],gradientLegend:{enabled:!0,position:"left",scale:{label:{formatter:e=>{let{value:n}=e;return ton(n)},fontSize:10}}}}})})}const oon=[{name:"East Midlands",value:451166},{name:"East of England",value:427210.4},{name:"Greater London",value:704404.4},{name:"Greater Manchester",value:13529},{name:"Kent & Sussex",value:278174.65},{name:"Kent, Surrey & Sussex",value:10016},{name:"London",value:23879},{name:"Midlands",value:10750},{name:"National",value:49469.2},{name:"North East",value:297631.9},{name:"North East & Scotland",value:926},{name:"North West",value:512979.6},{name:"South Central",value:7199},{name:"South East",value:10514},{name:"South West",value:381369.1},{name:"Wales",value:193999.33},{name:"West Midlands",value:510826.3},{name:"Yorkshire & Humberside",value:569930.8}];function lon(){const e=aon();return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(h5e.ui,{options:{height:400,data:oon,series:[{type:"donut",calloutLabelKey:"name",angleKey:"value",fills:["#d209f4","#0ad7a0","#0315af","#9d3ffa","#fcc708","#1ac8ff","#8a92fa","#ea78fc","#bcedfd","#aaf7e0","#cacef9","#d8b4fb","#faecbd","#f2cef7"],tooltip:e}],legend:{orientation:"vertical",position:"right"}}})})}const son=[{name:"East Midlands",value:448666},{name:"East of England",value:424710.4},{name:"Greater London",value:701904.4},{name:"Greater Manchester",value:11029},{name:"Kent & Sussex",value:275674.65},{name:"Kent, Surrey & Sussex",value:7516},{name:"London",value:21379},{name:"Midlands",value:8250},{name:"National",value:46969.2},{name:"North East",value:295131.9},{name:"North East & Scotland",value:176},{name:"North West",value:510479.6},{name:"South Central",value:4699},{name:"South East",value:8014},{name:"South West",value:378869.1},{name:"Wales",value:191499.33},{name:"West Midlands",value:508326.3},{name:"Yorkshire & Humberside",value:567430.8}];function con(){const e=aon();return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(h5e.ui,{options:{data:son,height:400,tooltip:{mode:"single"},axes:[{type:"category",position:"bottom"},{type:"number",position:"left",label:{formatter:e=>{let{value:n}=e;return ton(n)}}}],series:[{type:"bar",xKey:"name",yKey:"value",fill:"#9d3ffa",tooltip:e}]}})})}const don={total:[{name:"Annual rent for leaseholds",value:25666759.24},{name:"Total Annual Rates",value:149250747.81},{name:"Security Cost",value:187357032.16},{name:"Soft FM Cost",value:531081203.21},{name:"Hard FM Cost (Fixed)",value:302579223.26},{name:"Other Costs",value:84065034.32}],adjusted:[{name:"Annual Rent for leaseholds",value:26642096.09},{name:"Total Annual Rates",value:154922276.23},{name:"Security Cost",value:194476599.38},{name:"Soft FM Cost",value:551262288.94},{name:"Hard FM Cost (Fixed)",value:314077233.75},{name:"Other Costs",value:87259505.62}]};function uon(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pon(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uon(Object(t),!0).forEach(function(n){mon(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uon(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mon(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const fon=["#d209f4","#0ad7a0","#0315af","#9d3ffa","#fcc708","#1ac8ff"];function yon(e){let{type:n}=e;const t=don[n];t.sort((e,n)=>e.value-n.value);let a=0;const r=[];for(const e of t)r.push(pon(pon({},e),{},{lowerValue:a})),a=e.value;r.reverse();const i=(0,eg.A)();return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(h5e.ui,{options:{tooltip:{mode:"compact"},data:r,minHeight:350,axes:[{type:"number",position:"bottom",label:{formatter:e=>{let{value:n}=e;return ton(n)}}},{type:"category",position:"left"}],series:[{type:"range-bar",direction:"horizontal",xKey:"name",yLowKey:"lowerValue",yHighKey:"value",tooltip:{renderer:e=>{let{datum:n}=e;return{title:n.name,data:[{label:"Start",value:i.formatNumber(n.lowerValue)},{label:"End",value:i.formatNumber(n.value)}]}}},itemStyler:e=>{let{datum:n}=e;const a=t.findIndex(e=>{let{name:t}=e;return t===n.name}),r=fon.length-1;return{fill:fon[a>r?a%r:a]}}}]}})})}const gon=(0,f.styled)("div")({display:"flex",flexDirection:"row",width:"100%",height:"100%",overflowX:"auto"}),bon=(0,f.styled)("div")({width:"100%"}),hon=(0,f.styled)("div")(e=>{let{theme:n}=e;return{marginBottom:16,borderRadius:16,border:"1px solid ".concat(n.sys.color.outlineVariant),padding:24}}),von=(0,f.styled)(f.Text)(e=>{let{theme:n}=e;return{width:"100%",color:n.sys.color.onSurfaceVariant,marginBottom:16}});function xon(){const[e,n,t]=J0e();return(0,Ze.jsx)(f.Page,{loading:n,error:t,title:{content:"Your Estates report",crumbs:[{label:"Reporting",to:"../../reporting"},{label:"Estates"}]},children:(0,Ze.jsxs)(gon,{children:[(0,Ze.jsx)(Q0e,{dashboards:(null==e?void 0:e.getSubscribedDashboards)||[]}),(0,Ze.jsxs)(bon,{children:[(0,Ze.jsxs)(hon,{children:[(0,Ze.jsx)(von,{typescale:"title",children:"UK Heatmap (by region)"}),(0,Ze.jsx)(f.Tabs,{tabs:[{label:"Total Floor Area",children:(0,Ze.jsx)(ion,{type:"normal"})},{label:"Total Land Area (ha)",children:(0,Ze.jsx)(ion,{type:"ha"})}]})]}),(0,Ze.jsxs)(hon,{children:[(0,Ze.jsx)(von,{typescale:"title",children:"Total Floor Area, by region (Converted to GIA)"}),(0,Ze.jsx)(lon,{})]}),(0,Ze.jsxs)(hon,{children:[(0,Ze.jsx)(von,{typescale:"title",children:"Total Floor Area, by region (Converted to NIA)"}),(0,Ze.jsx)(con,{})]}),(0,Ze.jsxs)(hon,{children:[(0,Ze.jsx)(von,{typescale:"title",children:"Total Property Running Cost"}),(0,Ze.jsx)(yon,{type:"total"})]}),(0,Ze.jsxs)(hon,{children:[(0,Ze.jsx)(von,{typescale:"title",children:"Inflation Adjusted Running Cost"}),(0,Ze.jsx)(yon,{type:"adjusted"})]})]})]})})}const Ton=()=>{const e=(0,m.zy)().pathname.startsWith("/v2"),n=Y0e();return(0,Ze.jsxs)(m.BV,{children:[e&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(m.qh,{path:"/overview",element:(0,Ze.jsx)(Vin,{})}),n&&(0,Ze.jsx)(m.qh,{path:"/estates",element:(0,Ze.jsx)(xon,{})}),(0,Ze.jsx)(m.qh,{path:":name/:id",element:(0,Ze.jsx)(Vin,{})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:"./overview"})})]}),!e&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(m.qh,{path:"",element:(0,Ze.jsx)(q0e,{})}),(0,Ze.jsx)(m.qh,{path:":folderId",element:(0,Ze.jsx)(q0e,{})}),(0,Ze.jsx)(m.qh,{path:":id/:name",element:(0,Ze.jsx)(Xin,{})})]})]})};var Oon,kon,jon,Con,Son,Non,won,Don,Aon=t(1721),Ron=t.n(Aon);function Pon(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Lon(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pon(Object(t),!0).forEach(function(n){Ion(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pon(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ion(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Eon(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _on=(0,Ge.default)(ze.fv)(Oon||(Oon=Eon(["\n  padding: ",";\n  min-height: 100%;\n  display: flex;\n"])),e=>e.theme.geometry.xs.spacing),Fon=(0,Ge.default)(ze.JU)(kon||(kon=Eon(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Bon=Ge.default.div(jon||(jon=Eon(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),Uon=(0,Ge.default)(ze.DZ)(Con||(Con=Eon(["\n  padding: 0 0 "," 0;\n"])),e=>e.theme.geometry.xs.spacing),Mon=(0,Ge.default)(ze.ks)(Son||(Son=Eon(["\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),Von=(0,Ge.default)(ze.fs)(Non||(Non=Eon(["\n  margin-bottom: ",";\n  display: flex;\n  flex: 1 1 auto;\n  flex-direction: column;\n"])),e=>e.theme.geometry.md.spacing),zon=Ge.default.form(won||(won=Eon(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),Gon=(0,Ge.default)(ze.$n)(Don||(Don=Eon([""])));class $on extends g.Component{constructor(e){super(e),this.state={notification:{message:"",color:"success",id:null},values:{fullname:{value:"",error:""},companyname:{value:"",error:""},phonenumber:{value:"",error:""},subject:{value:"",error:"",selectedOption:""},enquiry:{value:"",error:""}},options:[{value:"comply",label:"Comply"},{value:"data",label:"Data"},{value:"learn",label:"Engage"},{value:"other",label:"Other"},{value:"reporting",label:"Reporting"},{value:"upgrades",label:"Upgrades"}]},this.handleChange=this.handleChange.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleSelectChange=this.handleSelectChange.bind(this),this.onCreateComplete=this.onCreateComplete.bind(this),this.onCreateError=this.onCreateError.bind(this),this.onNotificationClose=this.onNotificationClose.bind(this)}onCreateComplete(){this.setState({notification:{message:"Your enquiry has been sent!",color:"success"},values:{fullname:{value:"",error:""},companyname:{value:"",error:""},phonenumber:{value:"",error:""},subject:{value:"",error:"",selectedOption:null},enquiry:{value:"",error:""}}})}onCreateError(){this.setState({notification:{message:"Something went wrong. If the problem persists, contact support.",color:"danger"}})}onNotificationClose(){this.setState({notification:{message:"",color:""}})}handleSubmit(e,n){e.preventDefault();const t=Lon({},this.state.values.fullname),a=Lon({},this.state.values.companyname),r=Lon({},this.state.values.phonenumber),i=Lon({},this.state.values.subject),o=Lon({},this.state.values.enquiry);if(t.error=this.state.values.fullname.value?"":"Please enter your full name.",a.error=this.state.values.companyname.value?"":"Please enter a valid company name.",r.error=this.state.values.phonenumber.value?(0,LA.isNumeric)(this.state.values.phonenumber.value)?"":"Only numbers are valid in this field.":"Please enter a valid phone number.",o.error=this.state.values.enquiry.value?this.state.values.enquiry.value.length>1e3?"You have exceeded the character limit.":"":"Please enter an enquiry.",i.error=this.state.values.subject.value?"":"Please choose an option.",this.setState({values:{fullname:t,companyname:a,phonenumber:r,subject:i,enquiry:o}}),!(t.error||a.error||r.error||o.error||i.error)){const e={name:Ron()(this.state.values.fullname.value),company:Ron()(this.state.values.companyname.value),email:(0,Jb.A)(localStorage.getItem("ID_TOKEN")).email,phone:Ron()(this.state.values.phonenumber.value),enquiry:Ron()(this.state.values.enquiry.value),topic:Ron()(this.state.values.subject.value)};n({variables:{replacements:JSON.stringify(e)}})}}handleChange(e){const n=e.target,t=n.value,a=n.name;"subject"===a?this.setState({values:Lon(Lon({},this.state.values),{},{[a]:{value:t,selectedOption:e.option,error:""}})}):this.setState({values:Lon(Lon({},this.state.values),{},{[a]:{value:t,error:""}})})}handleSelectChange(e){const n={target:{name:e.target.name,value:e.target.value,option:e}};this.handleChange(n)}render(){const{intl:e}=this.props;return(0,Ze.jsxs)("div",{children:[this.state.notification.message&&(0,Ze.jsx)(ze.Eg,{name:"send_email__notification",show:!0,color:this.state.notification.color,onClose:this.onNotificationClose,children:this.state.notification.message}),(0,Ze.jsx)(Qe.s,{mutation:ef(),onCompleted:this.onCreateComplete,onError:this.onCreateError,children:n=>(0,Ze.jsxs)(zon,{name:"email-form",onSubmit:e=>this.handleSubmit(e,n),children:[(0,Ze.jsx)(Uon,{size:"lg",align:"left",children:e.formatMessage({id:"pages.support.header"})}),(0,Ze.jsxs)(ze.fI,{container:!0,children:[(0,Ze.jsxs)(_on,{span:6,children:[(0,Ze.jsx)(Bon,{children:(0,Ze.jsx)(Fon,{children:e.formatMessage({id:"pages.support.fullName"})})}),(0,Ze.jsx)(Mon,{name:"fullname",onChange:this.handleChange,value:this.state.values.fullname.value,error:this.state.values.fullname.error,placeholder:"John Doe",box:!0}),(0,Ze.jsx)(Bon,{children:(0,Ze.jsx)(Fon,{children:e.formatMessage({id:"pages.support.companyName"})})}),(0,Ze.jsx)(Mon,{name:"companyname",onChange:this.handleChange,value:this.state.values.companyname.value,error:this.state.values.companyname.error,placeholder:"Rio AI Ltd",box:!0}),(0,Ze.jsx)(Bon,{children:(0,Ze.jsx)(Fon,{children:e.formatMessage({id:"pages.support.phoneNumber"})})}),(0,Ze.jsx)(Mon,{name:"phonenumber",onChange:this.handleChange,value:this.state.values.phonenumber.value,error:this.state.values.phonenumber.error,placeholder:"07000000000",box:!0}),(0,Ze.jsx)(Bon,{children:(0,Ze.jsx)(Fon,{children:e.formatMessage({id:"pages.support.enquiryQuestion"})})}),(0,Ze.jsx)(ze.l6,{name:"subject",options:this.state.options,onChange:this.handleSelectChange,value:this.state.values.subject.selectedOption,error:this.state.values.subject.error,placeholder:e.formatMessage({id:"pages.support.enquirySelectPlaceholder"})})]}),(0,Ze.jsxs)(_on,{span:6,children:[(0,Ze.jsx)(Bon,{children:(0,Ze.jsx)(Fon,{children:e.formatMessage({id:"pages.support.enquiry"})})}),(0,Ze.jsx)(Von,{flex:!0,name:"enquiry",onChange:this.handleChange,value:this.state.values.enquiry.value,error:this.state.values.enquiry.error,box:!0,displayCharCounter:!0,maxLength:1e3,placeholder:e.formatMessage({id:"pages.support.enquiryPlaceholder"})}),(0,Ze.jsx)(Gon,{name:"send",submit:!0,children:e.formatMessage({id:"pages.support.send"})})]})]})]})})]})}}const Won=(0,Ye.Ay)($on);var qon,Jon,Yon,Hon;function Kon(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Qon=Ge.default.div(qon||(qon=Kon(["\n  display: flex;\n  align-items: top;\n  padding: "," 0 "," 0;\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.xs.spacing),Zon=(0,Ge.default)(ze.In)(Jon||(Jon=Kon(["\n  margin: 0 "," 0 ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.xs.spacing),Xon=(0,Ge.default)(ze.DZ)(Yon||(Yon=Kon(["\n  padding: 0 0 "," 0;\n"])),e=>e.theme.geometry.xs.spacing),eln=Ge.default.form(Hon||(Hon=Kon(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),nln=(0,Ye.Ay)(e=>{let{intl:n}=e;return(0,Ze.jsxs)(eln,{children:[(0,Ze.jsx)(Xon,{size:"lg",align:"left",children:n.formatMessage({id:"pages.support.contactInformation"})}),(0,Ze.jsxs)(Qon,{children:[(0,Ze.jsx)(Zon,{inline:!0,size:"lg",icon:"home",color:"#ccc"}),(0,Ze.jsxs)(ze.EY,{inline:!0,children:["Rio AI Ltd ",(0,Ze.jsx)("br",{}),"1 Mark Square ",(0,Ze.jsx)("br",{}),"London ",(0,Ze.jsx)("br",{}),"EC2A 4EG ",(0,Ze.jsx)("br",{}),"UK"]})]}),(0,Ze.jsxs)(Qon,{children:[(0,Ze.jsx)(Zon,{inline:!0,size:"lg",icon:"envelope",color:"#ccc"}),(0,Ze.jsx)(ze.EY,{inline:!0,children:"support@rio.ai"})]})]})});var tln,aln,rln,iln,oln;function lln(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const sln=Ge.default.div(tln||(tln=lln(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),cln=Ge.default.div(aln||(aln=lln(["\n  flex: 1 1 auto;\n  background-color: ",";\n"])),e=>e.theme.colors.basic.white),dln=(0,Ge.default)(ze.fv)(rln||(rln=lln(["\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),uln=Ge.default.a(iln||(iln=lln(["\n  text-decoration: underline;\n"]))),pln=(0,Ge.default)(ze.fI)(oln||(oln=lln(["\n  padding: "," 0;\n"])),e=>e.theme.geometry.md.spacing),mln=(0,Ye.Ay)(e=>{let{intl:n}=e;return(0,Ze.jsxs)(sln,{children:[(0,Ze.jsx)(pln,{children:(0,Ze.jsx)(Tn,{title:n.formatMessage({id:"pages.support.banner.header"}),body:(0,Ze.jsx)(Je.A,{id:"pages.support.banner.message",values:{Link:(0,Ze.jsx)(uln,{href:"https://support.rio.ai/knowledge",target:"_blank",rel:"noopener noreferrer","data-cy":"Contact__SupportPageLink",children:(0,Ze.jsx)(Je.A,{id:"pages.support.banner.link"})})}}),dismissable:!1,icon:"question"})}),(0,Ze.jsxs)(pln,{container:!0,children:[(0,Ze.jsx)(dln,{container:!0,item:!0,span:3,children:(0,Ze.jsx)(cln,{children:(0,Ze.jsx)(nln,{})})}),(0,Ze.jsx)(ze.fv,{container:!0,item:!0,span:9,children:(0,Ze.jsx)(cln,{children:(0,Ze.jsx)(Won,{})})})]})]})});var fln;const yln=(0,Ge.default)(ze.DZ)(fln||(fln=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  text-align: right;\n"])));function gln(e){let{tags:n,value:t,onChange:a,error:r,additionalOptions:i=[]}=e;const o=(null==n?void 0:n.filter(e=>e.legislationTag))||[],l=(0,zt.orderBy)(o,[e=>e.tagName.toLowerCase()],["asc"]).map(e=>({value:e.id,label:e.tagName})),s=1===l.length;return(0,g.useEffect)(()=>{l.length&&!t&&a({target:l[0]})},[l]),(0,Ze.jsxs)(Ze.Fragment,{children:[s&&(0,Ze.jsx)(yln,{children:l[0].label}),!s&&(0,Ze.jsx)(ze.l6,{name:"tagId",placeholder:n?"No Available Tags":"Loading...",value:t,options:[...i,...l],error:r,onChange:a})]})}const bln=t.p+"ENG-53932693035dc0783fcb.png",hln=t.p+"SCO-a275946c9b731627a269.png",vln=t.p+"NIR-80c3ad43008d4e448e29.png",xln=t.p+"WAL-441c4b20e9108c8e5494.png",Tln=t.p+"GBR-6447b71bb5f3f6d71718.png",Oln=t.p+"EUR-1c34e8ab13589de84098.png",kln={id:"573e0c6e-8a60-431e-bb9d-dd0f2849dba4",link:"legislation",title:"Legislation",description:"A legal library of environmental legislation complete with synopsis and URL to gov.uk ",icon:"balance-scale",iconColor:"tertiary",accessIndex:"legislation",basePermission:"getLegislation",permissionSection:"governance",comingSoon:!1},jln={id:"841f7f86-9497-474d-9fd6-b543aac42bba",link:"systems",title:"Management Systems and Standards",description:"Document your progress towards a number of different management systems such as ISO 14001 and ISO 50001",icon:"university",iconColor:"tertiary",accessIndex:"systems",basePermission:"getManagementSystem",permissionSection:"governance",comingSoon:!1},Cln={id:"59d00cd4-2758-4e04-83fe-e7945ac2a35b",link:"environmental-aspects",title:"Environmental Management System",description:"Aspects & Impacts Register",icon:"clipboard-list",iconColor:"tertiary",accessIndex:"systems",basePermission:"getManagementSystem",permissionSection:"governance",restricted:!0,restrictionId:"cc0838fd-fcf3-4211-ab1e-506d31348216",comingSoon:!1},Sln=[kln,jln,Cln],Nln=[kln,{id:"184ea723-60d3-459a-bcd3-6f4e8d4b1d0e",link:"policies",title:"Policies",description:"Upload your organisations policy documents",icon:"scroll",iconColor:"tertiary",accessIndex:"policies",basePermission:"getPolicy",permissionSection:"governance",comingSoon:!1},jln,{id:"8d28b74b-cc59-400f-98e3-2824c5f50ae3",link:"targets",title:"Targets",description:"Set and manage your targets to track your performance",icon:"subscript",iconColor:"tertiary",accessIndex:"targets",basePermission:"getTarget",permissionSection:"data",comingSoon:!1},{id:"e531d074-7210-47c1-b9ba-8a2edc8b5475",link:"frameworks",title:"Reporting Frameworks",description:"Build your submissions for reporting frameworks such as TCFD, CDP, ESOS, SECR",icon:"drafting-compass",iconColor:"tertiary",accessIndex:"frameworks",basePermission:"getManagementSystem",permissionSection:"governance",comingSoon:!1},{id:"9e9a35ec-43d8-49f7-b83e-44603aa18af9",link:"agreements",title:"Voluntary Agreements",description:"Build your company strategy around voluntary agreements or frameworks such as the UN SDGs, WEF, SASB",icon:"thumbs-up",iconColor:"tertiary",accessIndex:"agreements",basePermission:"getManagementSystem",permissionSection:"governance",comingSoon:!1},Cln,{id:"a0ab613d-e506-47da-8113-5a0ddc75fab8",link:"health-and-safety-risk-register",title:"Health & Safety Risk Register",description:"",icon:"notes-medical",iconColor:"tertiary",accessIndex:"systems",basePermission:"getManagementSystem",permissionSection:"governance",restricted:!0,restrictionId:"92eec0c0-18d4-497e-a8ed-5517056eec93",comingSoon:!1},{id:"9e9a35ec-43d8-49f7-b83e-44603aa18af1",link:"materiality",title:"Materiality",description:"Conduct your materiality analysis here to identify what Sustainability/ESG topics are most important to your organisation.",icon:"file-contract",iconColor:"tertiary",accessIndex:"systems",basePermission:"getManagementSystem",permissionSection:"governance",comingSoon:!1,restricted:!0,restrictionId:"421f50fa-aeab-4f6a-952a-dcd535f3cc3d"}],wln=JSON.parse('[{"id":"COMPLIANT","label":"Compliant","name":"Compliant","value":"COMPLIANT","icon":"check-circle","colour":"success"},{"id":"COMPLIANCERISK","label":"Compliance Risk","name":"Compliance Risk","value":"COMPLIANCERISK","icon":"hourglass-half","colour":"warning"},{"id":"NONCOMPLIANT","label":"Non Compliant","name":"Non Compliant","value":"NONCOMPLIANT","icon":"exclamation-circle","colour":"danger"},{"id":"NOTAPPLICABLE","label":"Not Applicable","name":"Not Applicable","value":"NOTAPPLICABLE","icon":"ban","colour":"overlay"},{"id":"INDIRECTLYAPPLICABLE","label":"Indirectly Applicable","name":"Indirectly Applicable","value":"INDIRECTLYAPPLICABLE","icon":"exclamation-triangle","colour":"warning"}]');function Dln(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Aln(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dln(Object(t),!0).forEach(function(n){Rln(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dln(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Rln(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Pln=(e,n)=>!(!e||(!e||n)&&Wt()(n).isSameOrAfter(Wt()(e))),Lln=e=>Pln(e.lastFlaggedForReview,e.lastClearedReviewFlag),Iln=e=>{const n=wln.find(n=>n.value===e.value);return(null==n?void 0:n.name)||"TBD"};var Eln;const _ln=(0,D.J1)(Eln||(Eln=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAllLegislation($accountId: ID!, $tagId: ID) {\n    getAllLegislation(accountId: $accountId, tagId: $tagId) {\n      id\n      title\n      synopsis\n      isActive\n      countries\n      type\n      status\n      reviewDate\n      lastFlaggedForReview\n      lastClearedReviewFlag\n      applicability\n      priority\n      tags {\n        id\n        tagName\n      }\n      locations {\n        id\n        name\n      }\n      regions {\n        id\n        name\n      }\n      departmentIds\n    }\n  }\n"])));var Fln;const Bln=(0,Ge.default)(ze.In)(Fln||(Fln=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  color: ",";\n"])),e=>e.theme.colors[e.colour].normal.background),Uln=e=>{let{status:n}=e;if(!n)return(0,Ze.jsx)(Ze.Fragment,{children:"TBD"});const t=wln.find(e=>e.value===n);return(0,Ze.jsx)(Bln,{title:t.label,icon:t.icon,colour:t.colour})};var Mln,Vln,zln;function Gln(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $ln(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gln(Object(t),!0).forEach(function(n){Wln(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gln(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Wln(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function qln(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Jln=(0,Ge.default)(ze.fv)(Mln||(Mln=qln(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Yln=(0,Ge.default)(ze.JU)(Vln||(Vln=qln(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Hln=Ge.default.div(zln||(zln=qln(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),Kln=P3,Qln=e=>{let{document:n,isSubmitting:t,onChange:a,predefinedValues:r={}}=e;const i=_u(),{data:o}=Td(),l=rt(),[s,c]=(0,g.useState)(!0),d="Consignment Note (EA)"===n.category||"Consignment Note (SEPA)"===n.category,u=n.tags,[p,m]=(0,g.useState)(!1),f=(null==i?void 0:i.allowedTags)||[],y=(0,g.useMemo)(()=>Kln.filter(e=>Gw()(o,e.accessControlIndexer)),[o]);return(0,g.useEffect)(()=>{!u&&null!=f&&f.length&&a($ln($ln({},n),{},{tags:f.map(e=>({value:null==e?void 0:e.id,label:null==e?void 0:e.tagName}))}))},[u,f,n,a]),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Jln,{item:!0,children:[(0,Ze.jsx)(Hln,{children:(0,Ze.jsx)(Yln,{children:"Select document library"})}),(0,Ze.jsx)(ze.l6,{value:n.library,options:y.map(e=>({label:e.title,value:e.library})),isDisabled:!!r.library||t,onChange:e=>{a($ln($ln({},n),{},{library:e.target.value}))}})]})}),n.library&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Jln,{item:!0,children:[(0,Ze.jsx)(Hln,{children:(0,Ze.jsx)(Yln,{children:"Select document category"})}),(0,Ze.jsx)(ze.l6,{value:n.category,options:lI.filter(e=>e.libraries.includes(n.library)),isDisabled:!!r.category||t,onChange:e=>{a($ln($ln({},n),{},{category:e.target.value}))}})]})}),n.category&&(0,Ze.jsxs)(Ze.Fragment,{children:[d&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Jln,{item:!0,children:[(0,Ze.jsx)(Hln,{children:(0,Ze.jsx)(Yln,{children:"Select document type"})}),(0,Ze.jsx)(ze.KF,{value:Array.isArray(n.type)?n.type.map(e=>({label:e,value:e})):[],options:R3,isDisabled:t,onChange:e=>{a($ln($ln({},n),{},{type:e.target.select.map(e=>e.value)}))},multi:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Jln,{item:!0,children:[(0,Ze.jsx)(Hln,{children:(0,Ze.jsx)(Yln,{children:"Parse ID From Filename"})}),(0,Ze.jsx)(ze.Sc,{checked:s,onChange:()=>{const e=!s;c(e),e&&a($ln($ln({},n),{},{referenceId:h3(Gw()(n,"fileName"))}))}})]})}),!s&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Jln,{item:!0,children:[(0,Ze.jsx)(Hln,{children:(0,Ze.jsxs)(Yln,{children:[n.category," ID"]})}),(0,Ze.jsx)(ze.ks,{value:n.referenceId,onChange:e=>{a($ln($ln({},n),{},{referenceId:e.target.value}))}})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Jln,{item:!0,children:[(0,Ze.jsx)(Hln,{children:(0,Ze.jsx)(Yln,{children:"Review date (optional)"})}),(0,Ze.jsx)(ze.lr,{placeholder:"Select review date",disabled:t,onDayClick:e=>{a($ln($ln({},n),{},{reviewDate:e.toISOString()}))},selectedDate:n.reviewDate?new Date(n.reviewDate):null})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Jln,{item:!0,children:[(0,Ze.jsx)(Hln,{children:(0,Ze.jsx)(Yln,{children:"Select supplier/carrier (optional)"})}),(0,Ze.jsx)(Bre,{accountId:l,value:n.supplierId,onChange:e=>a($ln($ln({},n),{},{supplierId:e.target.value}))})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Jln,{item:!0,children:[(0,Ze.jsx)(Hln,{children:(0,Ze.jsx)(Yln,{children:"Select Tags (optional)"})}),(0,Ze.jsx)(PD,{value:null==u?void 0:u.map(e=>({value:e.id||e.value,label:e.tagName||e.label})),accountId:l,onChange:e=>{a($ln($ln({},n),{},{tags:e.target.select}))}})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Jln,{item:!0,children:[(0,Ze.jsx)(Hln,{children:(0,Ze.jsx)(Yln,{children:"Notes"})}),(0,Ze.jsx)(ze.ks,{value:n.notes,error:p&&"Notes can not contain more than 255 symbols",onChange:e=>{var t;m(!1),(null==e||null===(t=e.target)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.length)>255?m(!0):a($ln($ln({},n),{},{notes:e.target.value}))}})]})})]})]})]})};var Zln,Xln,esn,nsn;function tsn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const asn=Ge.default.div(Zln||(Zln=tsn(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),rsn=(0,Ge.default)(ze.fI)(Xln||(Xln=tsn(["\n  padding-top: ",";\n"])),e=>e.theme.geometry.md.spacing),isn=(0,Ge.default)(ze.fv)(esn||(esn=tsn(["\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),osn=(0,Ge.default)(ze.DZ)(nsn||(nsn=tsn(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing);function lsn(e){let{onDismiss:n,heading:t,children:a,onSubmit:r,submitButtonTitle:i,isSubmitting:o,submitDisabled:l,showButtons:s=!0}=e;return(0,Ze.jsx)(ze.aF,{size:"lg",onDismiss:n,show:!0,dismissable:!0,children:(0,Ze.jsxs)(asn,{children:[(0,Ze.jsx)(osn,{align:"center",children:t}),a,s&&(0,Ze.jsxs)(rsn,{container:!0,children:[(0,Ze.jsx)(isn,{item:!0,children:(0,Ze.jsx)(ze.$n,{color:"info",disabled:o,onClick:n,children:"Cancel"})}),(0,Ze.jsx)(ze.fv,{item:!0,children:(0,Ze.jsx)(ze.$n,{color:"success",disabled:o||l,onClick:r,children:i})})]})]})})}var ssn,csn;function dsn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const usn=(0,Ge.default)(ze.fI)(ssn||(ssn=dsn(["\n  padding: ",";\n  margin-top: ",";\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.md.spacing),psn=(0,Ge.default)(ze.In)(csn||(csn=dsn(["\n  flex: 0 0 auto;\n  color: ",";\n  font-size: ",";\n  margin-right: ",";\n"])),e=>e.theme.colors.text.light.background,e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.sm.spacing);function msn(e){let{fileName:n}=e;return(0,Ze.jsxs)(usn,{container:!0,itemAlign:"center",children:[(0,Ze.jsx)(psn,{name:"file-upload-icon",icon:"file-upload"}),(0,Ze.jsx)(ze.EY,{children:n})]})}var fsn,ysn,gsn,bsn,hsn,vsn,xsn;function Tsn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Osn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tsn(Object(t),!0).forEach(function(n){ksn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tsn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ksn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function jsn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Csn=(0,Ge.default)(ze.fv)(fsn||(fsn=jsn(["\n  display: flex;\n  flex-grow: 1;\n  flex-shrink: 0;\n"]))),Ssn=(0,Ge.default)(ze.fv)(ysn||(ysn=jsn(["\n  min-height: 60vh;\n  justify-content: center;\n  align-items: center;\n  background-color: ",";\n"])),e=>e.theme.colors.inputs.normal.background),Nsn=(0,Ge.default)(ze.h$)(gsn||(gsn=jsn(["\n  min-height: 60vh;\n  display: flex;\n  flex: 1;\n  & > div {\n    width: 100%;\n  }\n"]))),wsn=(0,Ge.default)(ze.oz)(bsn||(bsn=jsn(["\n  & .MuiTab-wrapper {\n    text-transform: none;\n  }\n"]))),Dsn=(0,Ge.default)(ze.fv)(hsn||(hsn=jsn(["\n  align-items: flex-start;\n  width: 50%;\n  height: 150px;\n  margin: auto;\n"]))),Asn=(0,Ge.default)(ze.fI)(vsn||(vsn=jsn(["\n  width: 100%;\n  height: auto;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),Rsn=(0,Ge.default)(ze.$n)(xsn||(xsn=jsn([""])));function Psn(e){return e.match(/^http/)?e:"https://".concat(e)}function Lsn(e){let{onFiles:n,onLink:t,accountId:a}=e;const[r,i]=(0,g.useState)(0),[o,l]=(0,g.useState)({id:null,name:"",error:null}),[s,c]=(0,g.useState)({url:"",name:"",error:null}),{data:d}=(0,h.IT)(JL,{variables:{accountId:a}}),u=(null==d?void 0:d.getSubscribedDashboards)||[],p=e=>!(e&&!IA().isURL(e)&&(c({url:e,name:s.name,error:'"'.concat(e,'" is not a valid URL')}),1)),m=(e,n)=>({name:e||n,link:Psn(n)});return(0,Ze.jsxs)(Csn,{children:[(0,Ze.jsxs)(ze.tU,{variant:"fullWidth",value:r,onChange:(e,n)=>i(n),children:[(0,Ze.jsx)(wsn,{label:"Select files"}),(0,Ze.jsx)(wsn,{label:"Provide link"}),(0,Ze.jsx)(wsn,{label:"Select dashboard"})]}),(0,Ze.jsxs)(Ssn,{container:!0,children:[(0,Ze.jsx)(ze.Kp,{value:r,index:0,children:(0,Ze.jsx)(ze.bT,{accept:xr.allowedDocument.mimeType,onChange:e=>{n([...e])},multiple:!0,children:e=>(0,Ze.jsx)(Nsn,{buttonText:"Select files",onClick:e,onDrop:e=>{n([...e])},background:!0})})}),(0,Ze.jsx)(ze.Kp,{value:r,index:1,children:(0,Ze.jsxs)(Dsn,{container:!0,item:!0,children:[(0,Ze.jsx)(Asn,{item:!0,children:(0,Ze.jsx)(ze.ks,{value:s.name,onChange:e=>{c({name:e.target.value,url:s.url,error:s.error})},placeholder:"Document name"})}),(0,Ze.jsx)(Asn,{item:!0,children:(0,Ze.jsx)(ze.ks,{value:s.url,onChange:e=>{c({name:s.name,url:e.target.value,error:null})},placeholder:"Documents link",onKeyPress:e=>{const n=e.target.value;if(p(n)&&e.key===PP){const e=Psn(n);t(m(s.name,e))}},error:s.error,onBlur:e=>{p(e.target.value)}})}),(0,Ze.jsx)(Asn,{item:!0,children:(0,Ze.jsx)(Rsn,{disabled:!s.url||!!s.error,onClick:()=>{t(m(s.name,s.url))},children:"Submit"})})]})}),(0,Ze.jsx)(ze.Kp,{value:r,index:2,children:(0,Ze.jsxs)(Dsn,{container:!0,item:!0,children:[(0,Ze.jsx)(Asn,{item:!0,children:(0,Ze.jsx)(ze.ks,{value:o.name,onChange:e=>{l(Osn(Osn({},o),{},{name:e.target.value,error:null}))},placeholder:"Document name"})}),(0,Ze.jsx)(Asn,{children:(0,Ze.jsx)(ze.l6,{placeholder:"Select a dashboard from the list...",onChange:e=>{l(Osn(Osn({},o),{},{id:e.target.select.value}))},value:o.id,options:u.map(e=>({value:e.id,label:e.name}))})}),(0,Ze.jsx)(Asn,{children:(0,Ze.jsx)(Rsn,{disabled:!o.id,onClick:()=>{const e=u.find(e=>e.id===o.id),n=PXe(e),a=window.location.origin+n;t(m(o.name||e.name,a))},children:"Submit"})})]})})]})]})}function Isn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Esn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Isn(Object(t),!0).forEach(function(n){_sn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Isn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _sn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Fsn(e){let{onDismiss:n,onError:t,onUpload:a,onComplete:r,predefinedValues:i}=e;const[o,l]=(0,g.useState)([]),[s,c]=(0,g.useState)(0),[d,u]=(0,g.useState)(!1),[p,m]=(0,g.useState)(function(e){return Esn({documentArea:null,category:null,type:null,supplierId:null,reviewDate:null,library:null,referenceId:null,metadata:null},e)}(i)),f=al(),[y]=(0,Ot.n)(e3),{token:b}=at(),h=rt();return(0,Ze.jsxs)(lsn,{onDismiss:n,heading:"Documents Upload",submitButtonTitle:"Upload",showButtons:!!o.length,submitDisabled:!p.library||!p.category,isSubmitting:d,onSubmit:async()=>{u(!0);const e=100/(2*o.length),i=GU()(o,20);let l=s;const d=[],m=[];for(const[n,r]of i.entries())await Promise.all(r.map(async n=>{const r=(0,Ai.A)(),i=n instanceof File,o=n.name;try{var s,u,g;i&&(await f(h,r,n),c(l+=e));const v=Esn(Esn({},p),{},{id:r,accountId:h,fileName:o,userId:b.sub,key:i?v3(h,r):null,link:i?null:n.link,source:i?br:"URL",referenceId:p.referenceId||h3(o),tags:null===(s=p.tags)||void 0===s?void 0:s.map(e=>e.value),notes:null===(u=p.notes)||void 0===u?void 0:u.trim()});if(t&&m.length)return void m.forEach(e=>t(e));const x=await y({variables:v}),T=null==x||null===(g=x.data)||void 0===g?void 0:g.createDocumentRecord;a&&T&&(d.push(T),a("".concat(o," has been uploaded"),T)),c(l+=e)}catch(e){const n=new Error("Creation of ".concat(o," failed."));m.push(n),t&&t(n)}})),n!==i.length-1&&await new Promise(e=>setTimeout(e,15e3));if(n(),d.length===o.length&&r&&t)if(m.length){const e=m.filter(e=>e.message.includes("too large"));e.length&&t(new Error("Unfortunately one or more of your uploads are too large, please upload files smaller than 10Mb"))}else r("All files have been successfully uploaded.",d,m)},children:[o.length?o.map(e=>(0,Ze.jsx)(msn,{fileName:e.name},e.name)):(0,Ze.jsx)(Lsn,{accountId:h,onLink:e=>l([e]),onFiles:l}),!!o.length&&(0,Ze.jsx)(Qln,{document:p,predefinedValues:i,onChange:m}),d&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Jln,{item:!0,children:[(0,Ze.jsx)(Hln,{children:(0,Ze.jsxs)(Yln,{children:["Loading... ",bi()(s,2),"%"]})}),(0,Ze.jsx)(ze.z2,{completed:bi()(s,2)})]})})]})}function Bsn(e){let{value:n,error:t,name:a,onChange:r,isDisabled:i}=e;const{legislations:o}=Ss(),l=Gt()(o).map(e=>({value:e.id,label:e.title})).orderBy(["label"],["asc"]);return(0,Ze.jsx)(ze.l6,{name:a,placeholder:"Please select the legislation item",value:n,options:l,error:t,onChange:r,classPrefix:"legislation-select",isDisabled:i})}const Usn=[{order:"asc",field:"activity.name"}];function Msn(e){let{value:n,error:t,name:a,onChange:r,isDisabled:i}=e;const o=(0,N.m)(),l=rt();return(0,Ze.jsx)(ze.l6,{defaultOptions:!0,name:a,placeholder:"Please select the Activity/Process",value:n,error:t,onChange:r,classPrefix:"aspects-select",isDisabled:i,loadOption:async e=>{return(n=await o.query({query:Ds,variables:{accountId:l,sort:Usn,filters:{text:[{filterType:"text",type:"contains",filter:e,field:"activity.name"}]}}}),(null==n||null===(t=n.data)||void 0===t||null===(t=t.getAspectsByAccountId)||void 0===t?void 0:t.rows)||[]).map(e=>{var n;return{value:e.id,label:null===(n=e.activity)||void 0===n?void 0:n.name}});var n,t}})}function Vsn(e){let{value:n,error:t,name:a,onChange:r}=e;const{targets:i}=yd(),o=Gt()(i).map(e=>({value:e.id,label:e.name})).orderBy(["label"],["asc"]);return(0,Ze.jsx)(ze.l6,{name:a,placeholder:"Please select the target",value:n,options:o,error:t,onChange:r,classPrefix:"targets-select"})}function zsn(e){let{accountId:n,name:t,value:a,onChange:r,canBeEmpty:i=!0}=e;const{data:o,loading:l,error:s}=(0,h.IT)(RBe,{variables:{accountId:n}}),c=Ti(null==o?void 0:o.getProjects);i&&c.unshift({label:"(No project)",value:null});const d=Array.isArray(a)?a.map(e=>c.find(n=>n.value===e)):"string"==typeof a?c.find(e=>e.value===a):null!=a&&a.id?c.find(e=>e.value===a.id):a;return(0,Ze.jsx)(ze.l6,{name:t,placeholder:"Please select project",value:d,options:c,error:s,isLoading:l,onChange:r})}var Gsn,$sn,Wsn,qsn,Jsn;function Ysn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Hsn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ysn(Object(t),!0).forEach(function(n){Ksn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ysn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ksn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Qsn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Zsn=(0,Ge.default)(ze.JU)(Gsn||(Gsn=Qsn(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Xsn=Ge.default.div($sn||($sn=Qsn(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),ecn=(0,Ge.default)(ze.fv)(Wsn||(Wsn=Qsn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),ncn=(0,Ge.default)(ze.fI)(qsn||(qsn=Qsn(["\n  cursor: ",";\n"])),e=>e.disabled?"not-allowed":"default"),tcn=(0,Ge.default)(ze.lr)(Jsn||(Jsn=Qsn(["\n  .DayPickerInput-Overlay {\n    top: -354px;\n    left: 50%;\n  }\n"]))),acn=e=>{var n,t;let{isSubmitting:a,task:r,setTask:i,accountId:o,isEditing:l,sourcePage:s,disabled:c={},projectId:d="",hasProjectsAccess:u=!1}=e;const[p,m]=(0,g.useState)(r.selectedUsers||null),f=pf(),y=e=>{var n;"projectId"===e.target.name&&(e.target.select=e.target.value),i(Hsn(Hsn({},r),{},{[e.target.name]:e.target.value||e.target.select})),"subject"===e.target.name&&(null!==(n=r.item)&&void 0!==n&&n.id||null!=r&&r.itemId)&&i(Hsn(Hsn({},r),{},{itemId:null,item:null}))},b=r.itemId||(null===(n=r.item)||void 0===n?void 0:n.id);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Task Name"})}),(0,Ze.jsx)(ze.ks,{"data-cy":"TaskDetails__Input--name",disabled:a,onChange:e=>y(e),name:"name",value:r.name,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Description"})}),(0,Ze.jsx)(ze.fs,{"data-cy":"TaskDetails__Input--description",size:"lg",disabled:a,onChange:e=>y(e),name:"description",value:r.description,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"TaskDetails__Input-scope",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Scope"})}),(0,Ze.jsx)(ze.l6,{name:"scope",options:f,value:r.scope,onChange:y,isDisabled:c.scope})]})}),r.scope===Ce&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Location(s)"})}),(0,Ze.jsx)(_D,{name:"locationIds",accountId:o,value:r.locationIds,onChange:y,disabled:c.locations})]})}),r.scope===Ne&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Tag(s)"})}),(0,Ze.jsx)(PD,{name:"tagIds",accountId:o,value:r.tagIds,onChange:y,disabled:c.tags})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"TaskDetails__Input--priority",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Priority"})}),(0,Ze.jsx)(ze.l6,{name:"priority",classPrefix:"priority-select",disabled:a,onChange:e=>y(e),value:r.priority,options:qBe})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"TaskDetails__Input--category",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Category"})}),(0,Ze.jsx)(ze.l6,{name:"category",classPrefix:"category-select",isDisabled:c.category||a,onChange:e=>{i(Hsn(Hsn({},r),{},{[e.target.name]:e.target.value,subject:null,itemId:null,item:null}))},value:r.category,options:WBe})]})}),JBe[r.category]&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"TaskDetails__Input--subject",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Subject"})}),(0,Ze.jsx)(ze.l6,{name:"subject",classPrefix:"subject-select",disabled:a,onChange:e=>y(e),value:null===(t=r.subject)||void 0===t?void 0:t.toUpperCase(),options:JBe[r.category],isDisabled:c.subject})]})}),r.subject&&[Vt.AR.Legislation,Vt.AR.Aspects,Vt.AR.Targets].includes(r.subject)&&(0,Ze.jsx)(ncn,{container:!0,align:"between","data-cy":"TaskDetails__Input--item",disabled:c[r.subject],children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsxs)(Zsn,{children:["Related item"," ",c[r.subject]&&r.subject===Vt.AR.Aspects&&"TASKS"===s&&"(Please go to your Aspect and Impact Register to create a task relating to a single aspect or impact.)"]})}),r.subject===Vt.AR.Legislation&&(0,Ze.jsx)(Bsn,{name:"itemId",onChange:y,value:b,isDisabled:c[Vt.AR.Legislation]}),r.subject===Vt.AR.Aspects&&(0,Ze.jsx)(Msn,{name:"itemId",onChange:y,value:b,isDisabled:c[Vt.AR.Aspects]}),r.subject===Vt.AR.Targets&&(0,Ze.jsx)(Vsn,{name:"itemId",onChange:y,value:b})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"TaskDetails__Input--owners",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Owners"})}),(0,Ze.jsx)(BE,{name:"owners",onChange:e=>{y({target:{value:e.target.select.map(e=>e.value),name:"owners"}}),m(e.target.select)},value:p,accountId:o})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"TaskDetails__Input--dueDate",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Due Date"})}),(0,Ze.jsx)(tcn,{disabled:a,onDayClick:e=>{y({target:{value:e?e.toISOString():e,name:"dueDate"}})},name:"dueDate",selectedDate:r.dueDate?new Date(r.dueDate):r.dueDate,box:!0})]})}),u?(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"TaskDetails__Input-project",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Project"})}),(0,Ze.jsx)(zsn,{name:"projectId",accountId:o,onChange:y,value:r.projectId||d})]})}):"",l&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(ecn,{item:!0,children:[(0,Ze.jsx)(Xsn,{children:(0,Ze.jsx)(Zsn,{children:"Completed"})}),(0,Ze.jsx)(ze.Sc,{size:"md",checked:r.isCompleted,onClick:()=>i(Hsn(Hsn({},r),{},{isCompleted:!r.isCompleted}))})]})})]})};var rcn,icn,ocn,lcn,scn=t(7653),ccn=t.n(scn);function dcn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ucn=(0,Ge.default)(ze.fv)(rcn||(rcn=dcn(["\n  border: 1px solid ",";\n  background-color: ",";\n  opacity: ",";\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n  position: relative;\n  z-index: 0;\n"])),e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white,e=>e.disabled?"0.5":"1"),pcn=(0,Ge.default)(ze.fI)(icn||(icn=dcn(["\n  padding: ",";\n  padding-bottom: 0;\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),mcn=(0,Ge.default)(ze.GQ)(ocn||(ocn=dcn(["\n  z-index: 1;\n  background: #fff;\n  display: inline-flex;\n"]))),fcn=(0,Ge.default)(ze.fv)(lcn||(lcn=dcn(["\n  padding: ",";\n  padding-top: ",";\n  border-top: 1px solid ",";\n  margin-top: -",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.xl.spacing,e=>e.theme.colors.overlay.normal.background,e=>e.theme.geometry.lg.spacing),ycn=e=>{let{fileName:n,iconColor:t}=e;const a=Mo(n);return(0,Ze.jsx)(mcn,{name:"DocumentTile__Icon",height:"70px",size:"lg",icon:a,iconColor:t,circleColor:t})},gcn=e=>{let{title:n,category:t,id:a,iconColor:r,code:i}=e;return(0,Ze.jsxs)(ucn,{container:!0,item:!0,children:[(0,Ze.jsxs)(pcn,{container:!0,item:!0,distribution:"between",children:[(0,Ze.jsx)(ycn,{fileName:n,iconColor:r}),(0,Ze.jsx)(ze.DZ,{inline:"inline",size:"md",color:"normal",weight:"light",children:t})]}),(0,Ze.jsx)(fcn,{container:!0,item:!0,vdistribution:"between",children:(0,Ze.jsx)(ze.DZ,{size:"lg",color:"dark",weight:"light",children:"".concat(n," ").concat(i?"(".concat(i.toUpperCase(),")"):"")})})]},a)};var bcn,hcn,vcn,xcn,Tcn,Ocn;function kcn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const jcn=(0,Ge.default)(ze.fv)(bcn||(bcn=kcn(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),Ccn=(0,Ge.default)(ze.fI)(hcn||(hcn=kcn(["\n  border-top: 1px solid ",";\n"])),e=>e.theme.colors.overlay.normal.background),Scn=Ge.default.div(vcn||(vcn=kcn(["\n  flex: 1 1 auto;\n\n  // Fallbacks for IE\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-self: flex-center;\n\n  // CSS grid for real browsers\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n  grid-gap: ",";\n"])),e=>e.theme.geometry.md.spacing),Ncn=(0,Ge.default)(ze.ks)(xcn||(xcn=kcn(["\n  & > div {\n    height: 63px;\n    border-radius: 5px;\n  }\n"]))),wcn=Ge.default.div(Tcn||(Tcn=kcn(["\n  padding: 1px;\n  position: relative;\n"]))),Dcn=(0,Ge.default)(ze.In)(Ocn||(Ocn=kcn(["\n  position: absolute;\n  top: 10px;\n  right: 10px;\n  z-index: 1;\n  color: black;\n  &:hover,\n  &:focus {\n    cursor: pointer;\n  }\n"]))),Acn=e=>{let{evidence:n,taskId:t=null,projectId:a="",onEditEvidence:r=zt.noop,isProjectPage:i=!1,canEditProject:o=!1,key:l}=e;return(0,Ze.jsx)(Ccn,{container:!0,children:(0,Ze.jsxs)(ze.fv,{item:!0,span:12,children:[(0,Ze.jsxs)(jcn,{children:[(0,Ze.jsx)(ze.fI,{container:!0,span:12,distribution:"between",children:(0,Ze.jsx)(ze.DZ,{size:"md",children:"Notes:"})}),i&&(0,Ze.jsx)(Ncn,{"data-testid":"Evidence-Note-".concat(n.id),size:"md",name:"evidenceNote",onChange:e=>{r(e,l)},value:n.notes,readOnly:!o},l),!i&&(0,Ze.jsx)(ze.EY,{children:n.notes})]}),(0,Ze.jsxs)(jcn,{children:[(0,Ze.jsx)(ze.DZ,{size:"md",children:"Documents:"}),(0,Ze.jsx)(Scn,{children:n.documents.map(e=>(0,Ze.jsxs)(wcn,{id:e.id,children:[i&&o&&(0,Ze.jsx)(Dcn,{icon:"times",onClick:()=>r(e,l)},l),(0,Ze.jsx)(p.Link,{to:{pathname:"/documents/all/".concat(e.id)},state:{taskId:t,projectId:a},children:(0,Ze.jsx)(gcn,{title:e.fileName,category:e.category,id:e.id,iconColor:"tertiary"})},"EvidenceRow_Link_".concat(e.id))]},e.id))})]})]})})};var Rcn,Pcn,Lcn,Icn,Ecn,_cn,Fcn;function Bcn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ucn=(0,Ge.default)(ze.JU)(Rcn||(Rcn=Bcn(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Mcn=Ge.default.div(Pcn||(Pcn=Bcn(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),Vcn=(0,Ge.default)(ze.fv)(Lcn||(Lcn=Bcn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),zcn=(0,Ge.default)(Vcn)(Icn||(Icn=Bcn(["\n  flex-basis: 50%;\n"]))),Gcn=(0,Ge.default)(ze.$n)(Ecn||(Ecn=Bcn(["\n  width: 100%;\n  margin-top: 12px;\n"]))),$cn=(0,Ge.default)(ze.fv)(_cn||(_cn=Bcn(["\n  text-align: left;\n  align-items: center;\n  flex-flow: row nowrap;\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Wcn=(0,Ge.default)(Vcn)(Fcn||(Fcn=Bcn(["\n  flex-basis: 120px;\n  max-width: 120px;\n"])));function qcn(e){let{file:n,onDelete:t,readOnly:a}=e;const r=n instanceof window.File;return(0,Ze.jsxs)(ze.fI,{container:!0,children:[(0,Ze.jsx)(Vcn,{grow:"0",children:(0,Ze.jsx)(ze.GQ,{size:"xxs",icon:"file",color:"tretiary"})}),(0,Ze.jsx)($cn,{grow:"1",item:!0,container:!0,children:r&&n.name}),!a&&(0,Ze.jsx)(Wcn,{item:!0,grow:"0",children:(0,Ze.jsx)(ze.$n,{type:"button",color:"danger",onClick:t,children:"Remove"})})]})}const Jcn=e=>{let{evidenceDocuments:n=[],setEvidenceDocuments:t,evidenceNotes:a,setEvidenceNotes:r}=e;return(0,g.useEffect)(()=>()=>{r(""),t([])},[]),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Vcn,{item:!0,children:[(0,Ze.jsx)(Mcn,{children:(0,Ze.jsx)(Ucn,{children:"Evidence Name"})}),(0,Ze.jsx)(ze.fs,{size:"lg",onChange:e=>{r(e.target.value)},name:"notes",value:a,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsxs)(Vcn,{item:!0,children:[(0,Ze.jsx)(Mcn,{children:(0,Ze.jsx)(Ucn,{children:"Evidence"})}),!(null==n||!n.length)&&n.map(e=>(0,Ze.jsx)(qcn,{file:e,onDelete:()=>{t(n.filter(n=>n!==e))}},e instanceof window.File?e.name:e.fileName))]})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(zcn,{item:!0,grow:"1",children:(0,Ze.jsx)(ze.bT,{multiple:!0,accept:xr.allowedDocument.mimeType,onChange:async e=>{const a=n.concat(e);t(a)},children:e=>(0,Ze.jsx)(Gcn,{type:"button",color:"tertiary",onClick:()=>{e()},children:"Attach Evidence"})})})})]})};var Ycn;const Hcn=(0,D.J1)(Ycn||(Ycn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  mutation CreateDocumentRecord(\n    $id: ID!\n    $accountId: ID!\n    $referenceId: String\n    $key: String!\n    $userId: ID!\n    $category: String!\n    $type: [String!]\n    $fileName: String!\n    $library: DocumentLibrary!\n    $reviewDate: String\n    $source: Source!\n    $tags: [String!]\n  ) {\n    createDocumentRecord(\n      input: {\n        id: $id\n        userId: $userId\n        accountId: $accountId\n        referenceId: $referenceId\n        key: $key\n        category: $category\n        type: $type\n        fileName: $fileName\n        library: $library\n        reviewDate: $reviewDate\n        source: $source\n        tags: $tags\n      }\n    ) {\n      id\n    }\n  }\n"])));function Kcn(){const{token:{sub:e}}=at(),n=rt(),t=al(),[a]=(0,Ot.n)(Hcn);return async(r,i,o)=>{const l=Array.isArray(r)?r:[];return await Promise.all(l.filter(e=>e instanceof window.File).map(async r=>{const l=(0,Ai.A)();await t(n,l,r);const s={id:l,userId:e,accountId:n,fileName:r.name,category:o,key:v3(n,l),library:"GOVERNANCE",referenceId:null,reviewDate:null,source:br,tags:i},{data:{createDocumentRecord:{id:c}}}=await a({variables:s});return c}))}}const Qcn="AUDIT";var Zcn,Xcn,edn,ndn;function tdn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function adn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tdn(Object(t),!0).forEach(function(n){rdn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tdn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rdn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function idn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const odn=Ge.default.div(Zcn||(Zcn=idn(["\n  display: flex;\n  flex-flow: column;\n  height: 100%;\n  padding: "," 0;\n"])),e=>e.theme.geometry.sm.spacing),ldn=(0,Ge.default)(ze.DZ)(Xcn||(Xcn=idn(["\n  text-align: center;\n"]))),sdn=(0,Ge.default)(ze.fv)(edn||(edn=idn(["\n  padding: ",";\n"])),e=>"".concat(e.theme.geometry.xs.spacing," ").concat(e.theme.geometry.sm.spacing)),cdn=(0,Ge.default)(ze.P)(ndn||(ndn=idn(["\n  ","\n"])),e=>{let{theme:n}=e;return"\n    overflow: auto;\n    padding: ".concat(n.geometry.xs.spacing,";\n  ")}),ddn=e=>{let{accountId:n,onDismiss:t,onComplete:a,sourcePage:r,defaultValues:i={},disabled:o={},projectId:l,hasProjectsAccess:s=!1}=e;const[c]=(0,Ot.n)(XBe(),{onCompleted:e=>{a({message:"Task has been created.",colour:"success"},e.createTask),t()},update(e,n){let{data:t}=n;if(!t||!l)return;const a=t.createTask,r=e.readQuery({query:ld,variables:{id:l}}),i=null==r?void 0:r.getProject;e.writeQuery({query:ld,variables:{id:l},data:{getProject:adn(adn({},i),{},{tasks:[...(null==i?void 0:i.tasks)||[],a]})}})},onError:()=>{a({message:"Something went wrong! Please try again later.",colour:"danger"})}}),[d]=(0,Ot.n)(ccn()),[u,p]=(0,g.useState)({scope:i.scope||"",locationIds:i.locationIds||[],tagIds:i.tagIds||[],name:i.name||"",description:i.description||"",category:i.category||null,subject:i.subject||null,item:i.item||null,owners:i.owners||"",dueDate:i.dueDate||"",priority:i.priority||null,isCompleted:i.isCompleted||!1,projectId:l||null}),m=Kcn(),[f,y]=(0,g.useState)([]),[b,h]=(0,g.useState)(""),[v,x]=(0,g.useState)(!1);return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,onDismiss:()=>t(),children:(0,Ze.jsxs)(odn,{children:[(0,Ze.jsx)(ldn,{size:"lg",children:"Create New Task"}),(0,Ze.jsxs)(cdn,{children:[(0,Ze.jsx)(acn,{task:u,setTask:p,accountId:n,sourcePage:r,disabled:o,isSubmitting:void 0,isEditing:void 0,projectId:l,hasProjectsAccess:s}),(0,Ze.jsx)(Jcn,{evidenceDocuments:f,setEvidenceDocuments:y,evidenceNotes:b,setEvidenceNotes:h})]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(sdn,{item:!0,children:(0,Ze.jsx)(ze.$n,{"data-cy":"CreateTaskModal__submit",disabled:!(0,zt.isEmpty)(nUe(u))||v,onClick:()=>(async()=>{x(!0);try{var e;const t=(0,Ai.A)(),a=u.scope===Ne?u.tagIds.map(e=>{let{value:n}=e;return n}):[];if(await c({variables:adn(adn({id:t,createdAt:(new Date).toISOString(),accountId:n,itemId:(null===(e=u.item)||void 0===e?void 0:e.id)||null},u),{},{locationIds:u.scope===Ce?u.locationIds.map(e=>{let{value:n}=e;return n}):[],tagIds:a}),refetchQueries:["GetTasksByAccountId","GetLegislationById"]}),f.length){const e=await m(f,a,"Other Reference");await d({variables:{id:(0,Ai.A)(),taskId:t,evidenceType:Qcn,notes:b,documents:e}})}}finally{x(!1)}})(),children:v?"Submitting...":"Submit"})})})]})})};var udn,pdn,mdn,fdn=t(25032),ydn=t.n(fdn);function gdn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const bdn=(0,D.J1)(udn||(udn=gdn(["\n  query GetLegislationById($id: ID!, $accountId: ID!, $tagId: ID) {\n    getLegislationById(id: $id, accountId: $accountId, tagId: $tagId) {\n      id\n      title\n      isActive\n      synopsis\n      links\n      countries\n      type\n      applicability\n      reviewDate\n      status\n      lastFlaggedForReview\n      lastClearedReviewFlag\n      priority\n      documents {\n        id\n        fileName\n        managementSystemCode\n        category\n      }\n      tags {\n        id\n        tagName\n      }\n      locations {\n        id\n        name\n      }\n      regions {\n        id\n        name\n      }\n      tasks {\n        ...TaskFields\n      }\n      departmentIds\n    }\n  }\n  ","\n"])),ydn()),hdn=(0,D.J1)(pdn||(pdn=gdn(["\n  mutation attachContent($id: ID!, $accountId: ID!, $linkId: ID!, $content: LegislationContentInput!, $tagId: ID) {\n    attachContentToLegislation(\n      input: { id: $id, accountId: $accountId, linkId: $linkId, content: $content, tagId: $tagId }\n    )\n  }\n"]))),vdn=(0,D.J1)(mdn||(mdn=gdn(["\n  mutation attachDocument($id: ID!, $accountId: ID!, $legislationId: ID!, $tagId: ID) {\n    attachDocumentToLegislation(\n      input: { id: $legislationId, accountId: $accountId, linkId: $legislationId, documentId: $id, tagId: $tagId }\n    )\n  }\n"])));function xdn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Tdn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xdn(Object(t),!0).forEach(function(n){Odn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xdn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Odn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var kdn,jdn;function Cdn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Sdn=(0,Ge.default)(ze.fv)(kdn||(kdn=Cdn(["\n  border: ",";\n  background-color: ",";\n  opacity: ",";\n  height: 100%;\n  overflow: hidden;\n  position: relative;\n  z-index: 0;\n  cursor: ",";\n"])),e=>e.hasChildren?"none":"1px solid ".concat(e.theme.colors.overlay.normal.background),e=>e.theme.colors.basic.white,e=>e.disabled?"0.5":"1",e=>e.disabled?"not-allowed":"pointer"),Ndn=Ge.default.div(jdn||(jdn=Cdn(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n"]))),wdn=e=>{const{id:n,onClick:t,children:a,disabled:r}=e,i=(0,Ge.useTheme)();return(0,Ze.jsxs)(Sdn,{container:!0,hasChildren:a,item:!0,disabled:r,onClick:r?null:t,children:[a&&(0,Ze.jsx)(Ze.Fragment,{children:a}),!a&&(0,Ze.jsx)(Ndn,{children:(0,Ze.jsx)(ze.In,{icon:"plus-circle",size:"6x",color:i.colors.success.normal.background})})]},n)},Ddn=(e,n)=>({HIGH:{icon:"exclamation-triangle",color:n.colors.danger.normal.background},MEDIUM:{icon:"exclamation-circle",color:n.colors.warning.normal.background},LOW:{icon:"exclamation-circle",color:n.colors.text.normal.background},COMPLETED:{icon:"check",color:n.colors.success.normal.background},INCOMPLETED:{icon:"times",color:n.colors.danger.normal.background},OVERDUE:{icon:"exclamation-circle",color:n.colors.warning.normal.background}}[e]||{});function Adn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Rdn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Pdn(e){const{data:{priority:n}={}}=e,t=(0,Ge.useTheme)();return(0,Ze.jsx)(ze.In,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Adn(Object(t),!0).forEach(function(n){Rdn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Adn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({name:"task-row__priority",size:"lg"},Ddn(n,t)))}var Ldn;const Idn=Ge.default.div(Ldn||(Ldn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  color: ",";\n"])),e=>e.theme.colors.text.normal.background);function Edn(e){const{data:{description:n}}=e;return n&&(0,Ze.jsx)(Idn,{children:(0,Ze.jsx)(ze.In,{name:"task-row__info",icon:"info-circle",title:n})})}var _dn;const Fdn={GOVERNANCE:"tertiary",DATA:"quaternary",REPORTING:"quaternary",DOCUMENTS:"quaternary",ENGAGE:"secondary"},Bdn=Ge.default.div(_dn||(_dn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  background-color: ",";\n  color: white;\n  padding: 5px 10px;\n  text-align: center;\n  display: inline-block;\n  border-radius: 20px;\n"])),e=>e.theme.colors[e.colour].normal.background);function Udn(e){const{data:n}=e;return(0,Ze.jsx)(ze.EY,{align:"left",name:"task-row__subject--".concat(n.id),children:(0,Ze.jsx)(Bdn,{colour:Fdn[n.category],children:ADe()(n.category)})})}var Mdn;const Vdn=Ge.default.div(Mdn||(Mdn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),zdn=(0,Ye.Ay)(function(e){const{data:{owners:n=[]}={},intl:{formatMessage:t}}=e,a=n.length?n.slice().reverse().map(e=>{let{first_name:n,last_name:t}=e;return"".concat(n," ").concat(t)}).join(", "):[],r=n.slice().reverse().map(e=>(0,Ze.jsx)(ze.Y3,{src:e.profilePicture,accountName:e.first_name},e.profilePicture+e.first_name));return(0,Ze.jsxs)(Ze.Fragment,{children:[!!n.length&&(0,Ze.jsx)(Vdn,{children:(0,Ze.jsx)(ze.G3,{title:a,outline:!0,size:"xxs",color:{GOVERNANCE:"tertiary",DATA:"quaternary",REPORTING:"quaternary",DOCUMENTS:"quaternary",ENGAGE:"secondary"}[e.data.category],children:r})}),!n.length&&(0,Ze.jsx)(ze.EY,{align:"left",children:t({id:"pages.task.grid.column.emptyOwners"})})]})});var Gdn;const $dn=Ge.default.div(Gdn||(Gdn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"])));function Wdn(e){const{data:{author:n}}=e,t="".concat(n.first_name," ").concat(n.last_name);return(0,Ze.jsx)($dn,{children:(0,Ze.jsx)(ze.Y3,{title:t,outline:!0,size:"xxs",src:n.profilePicture,accountName:t})})}function qdn(e){const{data:{dueDate:n}={}}=e,t=Ht(n);return n&&(0,Ze.jsx)(ze.EY,{align:"left",children:t})}function Jdn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ydn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Hdn(e){const{data:{isCompleted:n,dueDate:t}={}}=e,a=n?"COMPLETED":new Date(t)>new Date?"INCOMPLETED":"OVERDUE",r=(0,Ge.useTheme)();return(0,Ze.jsx)(ze.In,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Jdn(Object(t),!0).forEach(function(n){Ydn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Jdn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({name:"task-row__status",size:"lg"},Ddn(a,r)))}function Kdn(e){const{data:{completedAt:n}={}}=e,t=Ht(n);return n&&(0,Ze.jsx)(ze.EY,{align:"left",children:t})}function Qdn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Zdn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qdn(Object(t),!0).forEach(function(n){Xdn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qdn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Xdn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function eun(e){var n,t,a,r;if(!e.item)return null;switch(null===(n=e.item)||void 0===n?void 0:n.__typename){case"Aspect":return null===(t=e.item)||void 0===t||null===(t=t.activity)||void 0===t?void 0:t.name;case"Target":return null===(a=e.item)||void 0===a?void 0:a.name;case"Legislation":return null===(r=e.item)||void 0===r?void 0:r.title;default:return null}}function nun(e){return e.map(e=>Zdn(Zdn({},e),{},{subject:e.subject&&JBe[e.category].find(n=>n.value===e.subject).label}))}const tun=e=>{switch(e.scope){case Vt.HG.Location:return e.locations.map(e=>(null==e?void 0:e.name)||"");case Vt.HG.Tag:return e.tags.map(e=>{let{tagName:n}=e;return n});case Vt.HG.Account:default:return"Organisation"}};function aun(e){const n=e.value;return(0,zt.capitalize)(n)}const run=e=>{const{isCompleted:n,dueDate:t}=e;return n?"Completed":new Date(t)>new Date?"Incompleted":"Overdue"};var iun;function oun(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function lun(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?oun(Object(t),!0).forEach(function(n){sun(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oun(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function sun(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const cun=(0,Ge.default)(ze.fI)(iun||(iun=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n\n  .ag-header-cell-resize {\n    z-index: 0;\n  }\n"]))),dun=[{colId:"dueDate",sort:"asc",sortIndex:0},{colId:"name",sort:"asc",sortIndex:1}],uun=function(e){const{formatMessage:n}=(0,eg.A)(),t=(0,m.Zp)(),{tasks:a}=e,r={status:Hdn,priority:Pdn,description:Edn,category:Udn,owners:zdn,creator:Wdn,dueDate:qdn,completedAt:Kdn},i={lineHeight:"21px",wordBreak:"inherit",display:"flex",alignItems:"center"},o={rowHeight:120,columnDefs:[{headerName:"Priority",field:"priority",cellRenderer:"priority",width:100,cellStyle:{textAlign:"center",verticalAlign:"middle"},filterParams:lun(lun({},{buttons:["reset","apply"],closeOnApply:!0}),{},{valueFormatter:aun})},{headerName:"Status",field:"status",cellRenderer:"status",valueGetter:e=>{let{data:n}=e;return run(n)},minWidth:50,cellStyle:{textAlign:"center",verticalAlign:"middle"},filterParams:lun({},{buttons:["reset","apply"],closeOnApply:!0})},{headerName:n({id:"pages.task.grid.header.task"}),field:"name",filterParams:lun({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:90,cellStyle:i},{headerName:"Description",field:"description",cellRenderer:"description",sortable:!1,filter:!1,cellStyle:{textAlign:"center"}},{headerName:"Scope",field:"scope",filterParams:lun({},{buttons:["reset","apply"],closeOnApply:!0}),valueFormatter:e=>{let{data:n}=e;return tun(n)},minWidth:130,cellStyle:i},{headerName:n({id:"pages.task.grid.header.category"}),field:"category",cellRenderer:"category",filterParams:lun({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:150},{headerName:n({id:"pages.task.grid.header.subject"}),valueGetter:e=>{let{data:n}=e;return ADe()(n.subject)},filterParams:lun({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:110,cellStyle:i},{headerName:n({id:"pages.task.grid.header.item"}),valueGetter:e=>{let{data:n}=e;return eun(n)},filterParams:lun({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120,cellStyle:{display:"flex",lineHeight:"21px",wordBreak:"inherit"}},{headerName:n({id:"pages.task.grid.header.owners"}),field:"owners",cellRenderer:"owners",valueGetter:e=>{let{data:{owners:n=[]}}=e;return n.map(e=>{let{first_name:n,last_name:t}=e;return"".concat(n," ").concat(t)})},filterParams:lun({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:90},{headerName:n({id:"pages.task.grid.header.creator"}),field:"author",cellRenderer:"creator",valueGetter:e=>{let{data:{author:n}}=e;return"".concat(n.first_name," ").concat(n.last_name)},filterParams:lun({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:n({id:"pages.task.grid.header.date"}),field:"dueDate",cellRenderer:"dueDate",filter:"agDateColumnFilter",sort:"asc",filterParams:lun(lun({},{buttons:["reset","apply"],closeOnApply:!0}),{},{comparator:Aa}),minWidth:120},{headerName:n({id:"pages.task.grid.header.completedDate"}),field:"completedAt",cellRenderer:"completedAt",filter:"agDateColumnFilter",sort:"asc",filterParams:lun(lun({},{buttons:["reset","apply"],closeOnApply:!0}),{},{comparator:Aa}),minWidth:120},{headerName:n({id:"pages.task.grid.header.project"}),valueGetter:e=>{let{data:{projectId:n}}=e;return(null==n?void 0:n.name)||""},filterParams:lun({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:90,cellStyle:i}],defaultColDef:{sortable:!0,resizable:!0,filter:!0,cellStyle:{height:"auto"}},rowStyle:{width:"100%",display:"flex",alignItems:"center"}};return(0,Ze.jsx)(cun,{container:!0,children:(0,Ze.jsx)(nD,lun({rowData:a,components:r,getRowId:e=>{let{data:n}=e;return n.id},onGridReady:n=>{n.api.applyColumnState({state:dun}),e.agGrid.onGridReady(n)},onRowClicked:e=>{t("/tasks/".concat(e.data.id))},onFilterChanged:e.agGrid.onFilterChanged,onFirstDataRendered:e.agGrid.onFirstDataRendered},o))})};var pun,mun,fun,yun,gun,bun,hun,vun,xun=t(77001),Tun=t.n(xun),Oun=t(7895),kun=t.n(Oun);function jun(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Cun(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jun(Object(t),!0).forEach(function(n){Sun(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jun(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Sun(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Nun(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const wun=Ge.default.div(pun||(pun=Nun(["\n  display: flex;\n  flex-flow: column;\n  height: 100%;\n  padding: "," 0;\n"])),e=>e.theme.geometry.sm.spacing),Dun=(0,Ge.default)(ze.DZ)(mun||(mun=Nun(["\n  text-align: center;\n"]))),Aun=(0,Ge.default)(ze.fv)(fun||(fun=Nun(["\n  padding: ",";\n"])),e=>"".concat(e.theme.geometry.xs.spacing," ").concat(e.theme.geometry.sm.spacing)),Run=Ge.default.div(yun||(yun=Nun(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),Pun=(0,Ge.default)(ze.fI)(gun||(gun=Nun(["\n  padding-top: ",";\n"])),e=>e.theme.geometry.lg.spacing),Lun=(0,Ge.default)(ze.$n)(bun||(bun=Nun(["\n  margin-right: ",";\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),Iun=(0,Ge.default)(ze.fI)(hun||(hun=Nun(["\n  display: flex;\n  flex-direction: column;\n  overflow: auto;\n  height: 100%;\n  padding: ",";\n  background-color: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.basic.white),Eun=(0,Ge.default)(ze.P)(vun||(vun=Nun(["\n  ","\n"])),e=>{let{theme:n}=e;return"\n    overflow: auto;\n    padding: ".concat(n.geometry.xs.spacing,";\n  ")}),_un=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";return(null==e?void 0:e.map(e=>Cun(Cun({},e),{},{label:e[n],value:e[t]})))||[]},Fun=e=>{var n,t,a,r;let{onDismiss:i,selectedTask:o,sourcePage:l,disabled:s,hasProjectsAccess:c=!1}=e;const d=rt(),{token:u}=at(),{showNotification:p}=vt(),[m]=(0,Ot.n)(Tun(),{onCompleted:()=>{p("Task has been updated"),i()},onError:()=>{p("Something went wrong! Please try again later.","danger")}}),[f,y]=(0,g.useState)(!1),[b,h]=(0,g.useState)(Cun(Cun({},o),{},{itemId:null!==(n=null==o||null===(t=o.item)||void 0===t?void 0:t.id)&&void 0!==n?n:null,scope:o.scope||Se,locationIds:_un(o.locations),tagIds:_un(o.tags,"tagName"),projectId:null!==(a=null==o||null===(r=o.projectId)||void 0===r?void 0:r.id)&&void 0!==a?a:null==o?void 0:o.projectId})),v=Kcn(),[x,T]=(0,g.useState)([]),[O,k]=(0,g.useState)(""),[j]=(0,Ot.n)(ccn(),{onCompleted:()=>{p("Evidence has been attached to the current task.","success"),y(!1)},onError:()=>{p("Something went wrong! Please try again later.","danger")}}),C=rc(),[S,N]=(0,g.useState)(!1),w=((e,n,t)=>!!e.task.find(e=>e.startsWith(n)&&!e.endsWith("Own"))||e.task.includes("".concat(n,"Own"))&&t)(C,"delete",b.author.id===u.sub),[D,A]=(0,g.useState)(!1),[R]=(0,Ot.n)(kun(),{onError:e=>{p(e.message,"danger"),N(!1)},onCompleted:()=>{p("Task has been deleted!"),i()},refetchQueries:["GetTasksByAccountId"]});return(0,Ze.jsxs)(ze.aF,{size:"md",show:!0,onDismiss:()=>i(),children:[(0,Ze.jsxs)(wun,{children:[(0,Ze.jsx)(Dun,{size:"lg",children:"Edit Task"}),(0,Ze.jsx)(Eun,{children:(0,Ze.jsx)(acn,{task:b,setTask:h,accountId:d,isEditing:!0,sourcePage:l,disabled:s,hasProjectsAccess:c})}),(0,Ze.jsx)(Aun,{item:!0,children:(0,Ze.jsx)(ze.$n,{onClick:()=>y(!0),children:"Add Evidence"})}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[w&&(0,Ze.jsx)(Aun,{item:!0,children:(0,Ze.jsx)(ze.$n,{color:"danger",disabled:S,onClick:e=>{e.preventDefault(),A(!0)},children:"Delete"})}),(0,Ze.jsx)(Aun,{item:!0,children:(0,Ze.jsx)(ze.$n,{disabled:!isEmpty(nUe(b)),onClick:()=>{m({variables:Cun(Cun({accountId:d},b),{},{createdAt:null!=b&&b.createdAt?b.createdAt:(new Date).toISOString(),completedAt:null!=b&&b.isCompleted?(new Date).toISOString():null,locationIds:b.scope===Ce?b.locationIds.map(e=>{let{value:n}=e;return n}):[],tagIds:b.scope===Ne?b.tagIds.map(e=>{let{value:n}=e;return n}):[]}),refetchQueries:["GetTasksByAccountId","GetLegislationById","GetTaskById"]})},children:"Update"})})]})]}),D&&(0,Ze.jsx)(ze.aF,{onDismiss:()=>A(!1),show:!0,name:"confirmationModal",children:(0,Ze.jsxs)(Run,{children:[(0,Ze.jsx)(Pun,{item:!0,children:(0,Ze.jsx)(ze.DZ,{children:"Delete Task"})}),(0,Ze.jsx)(Pun,{item:!0,children:(0,Ze.jsx)(ze.EY,{children:"This action will permanently delete this task. Do you want to proceed?"})}),(0,Ze.jsxs)(Pun,{container:!0,distribution:"around",children:[(0,Ze.jsx)(Lun,{color:"danger",disabled:S,onClick:()=>{N(!0),R({variables:{id:b.id,accountId:d},refetchQueries:["GetTasksByAccountId","GetAspectsByAccountId"]})},children:"Delete"}),(0,Ze.jsx)(Lun,{disabled:S,onClick:()=>A(!1),children:"Cancel"})]})]})}),f&&(0,Ze.jsx)(ze.aF,{show:!0,size:"md",onDismiss:()=>y(!1),height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(Iun,{item:!0,children:[(0,Ze.jsx)(ze.DZ,{children:"Add Evidence"}),(0,Ze.jsx)(Jcn,{evidenceDocuments:x,setEvidenceDocuments:T,evidenceNotes:O,setEvidenceNotes:k}),(0,Ze.jsx)(ze.$n,{onClick:()=>(async()=>{if(x.length){const e=await v(x,[],"Other Reference");j({variables:{id:(0,Ai.A)(),taskId:o.id,evidenceType:Qcn,notes:O,documents:e},refetchQueries:["GetTaskById"]})}})(),children:"Save Evidence"})]})})]})};var Bun,Uun,Mun,Vun,zun,Gun,$un,Wun,qun,Jun,Yun,Hun,Kun,Qun,Zun,Xun,epn,npn,tpn,apn;function rpn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ipn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rpn(Object(t),!0).forEach(function(n){opn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rpn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function opn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function lpn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const spn=e=>{var n;return(null==e||null===(n=e.governance)||void 0===n?void 0:n.some(e=>["attachContentToLegislationAll","attachContentToLegislationParent"].includes(e||"")))||!1},cpn=Ge.default.div(Bun||(Bun=lpn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),dpn=(0,Ge.default)(ze.fv)(Uun||(Uun=lpn(["\n  padding: ",";\n"])),e=>{const n=e.theme.geometry.xs.spacing;return"".concat(n," 0 ").concat(n," ").concat(n)}),upn=(0,Ge.default)(ze.fv)(Mun||(Mun=lpn(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),ppn=(0,Ge.default)(ze.fv)(Vun||(Vun=lpn(["\n  overflow: auto;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),mpn=(0,Ge.default)(ze.fI)(zun||(zun=lpn(["\n  background-color: ",";\n"])),e=>e.theme.colors.basic.white),fpn=(0,Ge.default)(ze.fI)(Gun||(Gun=lpn(["\n  display: flex;\n  flex: 1;\n  background-color: ",";\n  height: 300px;\n  overflow: scroll;\n"])),e=>e.theme.colors.basic.white),ypn=Ge.default.div($un||($un=lpn(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.overlay.normal.background),gpn=Ge.default.div(Wun||(Wun=lpn(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.overlay.normal.background),bpn=Ge.default.div(qun||(qun=lpn(["\n  display: flex;\n  align-items: center;\n"]))),hpn=(0,Ge.default)(ze.GQ)(Jun||(Jun=lpn(["\n  margin-right: ",";\n  display: inline-flex;\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.sm.spacing),vpn=(0,Ge.default)(ze.DZ)(Yun||(Yun=lpn(["\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),xpn=Ge.default.img(Hun||(Hun=lpn(["\n  height: 22px;\n  width: 32px;\n  margin-right: ",";\n  border-radius: 5px;\n  border: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.normal.background),Tpn=Ge.default.div(Kun||(Kun=lpn(["\n  display: flex;\n  align-items: center;\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),Opn=Ge.default.div(Qun||(Qun=lpn(["\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  width: 70%;\n"]))),kpn=(0,Ge.default)(ze.$n)(Zun||(Zun=lpn(["\n  width: 100%;\n"]))),jpn=Ge.default.div(Xun||(Xun=lpn(["\n  width: 50%;\n"]))),Cpn=Ge.default.div(epn||(epn=lpn(["\n  flex: 1 1 auto;\n\n  // Fallbacks for IE\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-self: flex-center;\n\n  // CSS grid for real browsers\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n  grid-gap: ",";\n"])),e=>e.theme.geometry.md.spacing),Spn=(0,Ge.default)(Tn)(npn||(npn=lpn(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing),Npn=Ge.default.div(tpn||(tpn=lpn(["\n  display: flex;\n"]))),wpn=Ge.default.span(apn||(apn=lpn(["\n  color: ",";\n  font-weight: bold;\n"])),e=>Apn(e.priority,e.theme)),Dpn=e=>e?(0,zt.capitalize)(e.toLowerCase()).replace("_","-"):"Not set",Apn=(e,n)=>{switch(e){case Vt.mh.High:return n.colors.danger.normal.background;case Vt.mh.Medium:return n.colors.warning.normal.background;case Vt.mh.NoteWorthy:return n.colors.success.normal.background;default:return n.colors.text.normal.background}},Rpn=(e,n)=>(0,zt.pickBy)(e,(e,t)=>!n||t!==Ne&&n),Ppn=e=>e&&null!=e&&e.length?Ti(e):[],Lpn=(0,Ye.Ay)(e=>{var n,t,a,r,o,l,s,c,d;let{accessControls:u,intl:f,isShouldUserUpgrade:y}=e;const b=u.tagLevelLegislation,{showNotification:v}=vt(),{id:x,tagId:T}=(0,m.g)(),O=(0,m.Zp)(),k=Df(),j=Dd(),[C,S]=(0,g.useState)(T||""),[N,w]=(0,g.useState)(!1),D=rt(),A=Od(D),R=rc(),[P,L]=(0,g.useState)(!1),[I,E]=(0,g.useState)(!1),{data:_,error:F,loading:B,refetch:U}=(0,h.IT)(bdn,{variables:{id:x,accountId:D,tagId:T},fetchPolicy:"network-only"}),M=null!==(n=null==_?void 0:_.getLegislationById.tasks)&&void 0!==n?n:[],V=_?_.getLegislationById:null,[z,G]=(0,g.useState)({departmentIds:void 0,locationIds:void 0,tagIds:void 0,regionIds:void 0,applicability:null,priority:null,status:null,reviewDate:null,shouldUpdate:null,showScope:[],flagCleared:!1});!function(e){let{id:n,tagId:t,accountId:a,accountData:r,data:i,setAccountData:o}=e;const[l]=(0,Ot.n)(hdn);(0,g.useEffect)(()=>{var e,s,c,d;r.shouldUpdate&&(l({variables:{id:n,accountId:a,tagId:t,linkId:n,content:{applicability:r.applicability,reviewDate:r.reviewDate,status:r.status,lastClearedReviewFlag:r.flagCleared||r.reviewDate!==(null==i?void 0:i.getLegislationById.reviewDate)?(new Date).toISOString():null==i?void 0:i.getLegislationById.lastClearedReviewFlag,regionIds:null===(e=r.regionIds)||void 0===e?void 0:e.map(e=>e.value),departmentIds:null===(s=r.departmentIds)||void 0===s?void 0:s.map(e=>e.value),locationIds:null===(c=r.locationIds)||void 0===c?void 0:c.map(e=>e.value),tagIds:null===(d=r.tagIds)||void 0===d?void 0:d.map(e=>e.value),title:null==i?void 0:i.getLegislationById.title,priority:r.priority||null}},refetchQueries:["GetLegislationById"]}),o(Tdn(Tdn({},r),{},{shouldUpdate:!1,flagCleared:r.flagCleared&&!1})))},[r])}({id:x||"",tagId:T||"",accountId:D,accountData:z,data:_,setAccountData:G});const[$,{error:W}]=(0,Ot.n)(vdn),q=Pln(null==_||null===(t=_.getLegislationById)||void 0===t?void 0:t.lastFlaggedForReview,null==_||null===(a=_.getLegislationById)||void 0===a?void 0:a.lastClearedReviewFlag),{departmentMultipleSelect:J,showCreateDepartment:Y,setShowCreateDepartment:H}=Cu(null==A?void 0:A.departments,null==z?void 0:z.departmentIds),K={[we]:"departmentIds",[Ce]:"locationIds",[Ne]:"tagIds",[De]:"regionIds"},Q=Rpn((0,zt.pickBy)(K,(e,n)=>{var t,a;return(null===(t=z[e])||void 0===t?void 0:t.length)||(null==z||null===(a=z.showScope)||void 0===a?void 0:a.includes(n))}),b),Z=Rpn((0,zt.pickBy)(K,(e,n)=>{var t;return!(null!==(t=Q[n])&&void 0!==t&&t.length)}),b),X=(0,g.useRef)(null);X.current=z;const{data:ee}=(0,h.IT)(XF,{variables:{accountId:D}}),ne=null==A?void 0:A.departments;(0,g.useEffect)(()=>{O("/governance/legislation/".concat(x).concat(C?"/".concat(C):""))},[C]),(0,g.useEffect)(()=>{var e,n,t,a,r;_&&G(ipn(ipn({},X.current),{},{departmentIds:(null===(e=X.current)||void 0===e?void 0:e.departmentIds)||ju(ne,null===(n=_.getLegislationById)||void 0===n?void 0:n.departmentIds),locationIds:X.current.locationIds||Ppn(null===(t=_.getLegislationById)||void 0===t?void 0:t.locations),tagIds:X.current.tagIds||(null===(a=_.getLegislationById.tags)||void 0===a?void 0:a.map(e=>({value:e.id,label:e.tagName}))),regionIds:X.current.regionIds||Ppn(null===(r=_.getLegislationById)||void 0===r?void 0:r.regions),applicability:_.getLegislationById.applicability,status:_.getLegislationById.status,reviewDate:_.getLegislationById.reviewDate,priority:_.getLegislationById.priority}))},[_,ee,ne]);const te=e=>{e?v("Something went wrong. Please try again later. ","danger"):v("Document succesfully added. Now scanning for viruses.","success"),U({id:x,accountId:D})},ae=null===(r=R.governance)||void 0===r?void 0:r.some(e=>e.startsWith("editLegislation")),re=e=>{var n,t;let a=(0,Ze.jsx)(Ze.Fragment,{});switch(e){case Ce:const r=(null==z?void 0:z.locationIds)||Ppn(null==V?void 0:V.locations);a=(0,Ze.jsx)(_D,{accountId:D,value:(0,zt.sortBy)(r,"label"),onChange:e=>{G(ipn(ipn({},z),{},{locationIds:e.target.select,shouldUpdate:!0}))},error:null,disabled:!1},e);break;case Ne:const i=(null==z?void 0:z.tagIds)||(null==V||null===(n=V.tags)||void 0===n?void 0:n.map(e=>({value:e.id,label:e.tagName})));a=(0,Ze.jsx)(PD,{accountId:D,value:(0,zt.sortBy)(i,"label"),onChange:e=>{G(ipn(ipn({},z),{},{tagIds:e.target.select,shouldUpdate:!0}))},error:"",defaultOptions:void 0,disabled:!1},e);break;case we:a=J(e=>{G(ipn(ipn({},z),{},{departmentIds:e.target.select,shouldUpdate:!0}))});break;case De:a=(0,Ze.jsx)(ze.KF,{name:"Child-Accounts__MultiSelect",id:"Child-Accounts__MultiSelect",multiValueColor:"tertiary",onChange:e=>{G(ipn(ipn({},z),{},{regionIds:e.target.select,shouldUpdate:!0}))},isDisabled:!1,value:null==z?void 0:z.regionIds,options:Ppn(null==ee||null===(t=ee.getLocationMetadataOptionsForAccount)||void 0===t?void 0:t.regions)})}return a},ie=T?[{value:T,label:null==k||null===(o=k.find(e=>e.id===T))||void 0===o?void 0:o.tagName}]:null;return(0,Ze.jsxs)(cpn,{name:"LegislationItem",children:[(0,Ze.jsx)(ige,{name:"LegislationItem",title:"Legislation Item",breadcrumbs:[{title:"Legislation",to:"../legislation"},{title:"Legislation Item"}],icon:"pencil-alt",iconColor:"tertiary",dropdownItems:void 0,isDropdown:void 0,dropdownDefault:void 0,children:b&&(0,Ze.jsx)(Opn,{children:(0,Ze.jsx)(jpn,{children:(0,Ze.jsx)(gln,{tags:k,value:C,onChange:e=>{G(ipn(ipn({},z),{},{departmentIds:void 0,locationIds:void 0,tagIds:void 0,regionIds:void 0})),S(e.target.value)},error:""})})})}),I&&(0,Ze.jsx)(Fun,{disabled:!1,selectedTask:I,onDismiss:()=>E(!1),sourcePage:"TASKS"}),B&&(0,Ze.jsx)(Vg,{name:"LegislationItem__Loading"}),F&&(0,Ze.jsx)(ze.Kw,{error:F,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"LegislationItem__Error",icon:a,title:n,body:t,retry:U})}}),!B&&V&&(0,Ze.jsxs)(ppn,{container:!0,item:!0,children:[y&&(0,Ze.jsx)(Spn,{name:"ComplyContainer_Access_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Governance",body:f.formatMessage({id:"pages.governance.permissionsProblem"})}),(0,Ze.jsxs)(mpn,{item:!0,children:[(0,Ze.jsxs)(gpn,{children:[(0,Ze.jsx)(ze.fv,{item:!0,span:8,children:(0,Ze.jsxs)(Tpn,{children:[(0,Ze.jsx)(hpn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"file-alt"}),(0,Ze.jsxs)(ze.DZ,{name:"LegislationItem__Title",inline:!0,children:[V.title,(0,Ze.jsx)(bpn,{children:V.countries.map(e=>(0,Ze.jsx)(xpn,{name:"LegislationItem__Flag",src:i[e],alt:e,title:e},e))})]})]})}),(0,Ze.jsx)(upn,{item:!0,span:2,children:(0,Ze.jsx)(kpn,{name:"LegislationItem__Button-back",inline:!0,color:"info",component:"routerLink",to:"/governance/legislation",children:"Back to Library"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:2,children:(0,Ze.jsx)(kpn,{fullWidth:!0,name:"LegislationItem__Button-create-task",onClick:()=>w(!0),inline:!0,children:"Create task"})})]}),P&&(0,Ze.jsx)(Fsn,{onDismiss:()=>{L(!1)},onUpload:async(e,n)=>{await $({variables:{id:n.id,accountId:D,tagId:T,legislationId:x}}),te(W)},onError:te,predefinedValues:{category:"Legislation",library:"GOVERNANCE",tags:ie||[]},onComplete:()=>{}}),!!N&&(0,Ze.jsx)(ddn,{accountId:D,onDismiss:()=>w(!1),onComplete:()=>v("The associated task has been created"),defaultValues:{category:"GOVERNANCE",subject:"LEGISLATION",item:{id:null==V?void 0:V.id},locationIds:z.locationIds,tagIds:ie||z.tagIds},disabled:{category:!0,subject:!0,[Vt.AR.Legislation]:!(null==V||!V.id)}}),(0,Ze.jsxs)(gpn,{children:[(0,Ze.jsxs)(dpn,{container:!0,item:!0,children:[(0,Ze.jsxs)(vpn,{size:"md",children:["Status: ",(0,Ze.jsx)(Uln,{status:z.status})]}),ae&&(0,Ze.jsx)(ze.l6,{value:z.status,options:[...wln,{label:"To Be Determined",value:null}].filter(e=>!!e.label),onChange:e=>{return G(ipn(ipn({},z),{},{status:e.target.value,reviewDate:(n=e.target.value,z.reviewDate?z.reviewDate:"NOTAPPLICABLE"!==n?new Date((new Date).setFullYear((new Date).getFullYear()+1)).toISOString():null),shouldUpdate:!0}));var n},placeholder:"To Be Determined"})]}),(0,Ze.jsxs)(dpn,{container:!0,item:!0,children:[(0,Ze.jsxs)(vpn,{size:"md",children:["Priority:"," ",(0,Ze.jsx)(wpn,{priority:z.priority,children:Dpn(z.priority)})]}),ae&&(0,Ze.jsx)(ze.l6,{value:z.priority,options:[...Object.values(Vt.mh).map(e=>({label:Dpn(e),value:e})),{label:"Not set",value:""}],onChange:e=>G(ipn(ipn({},z),{},{priority:e.target.value,shouldUpdate:!0})),placeholder:"Not Set"})]}),(0,Ze.jsxs)(dpn,{container:!0,item:!0,children:[(0,Ze.jsx)(vpn,{size:"md",children:"Review Date: ".concat(z.reviewDate?Wt()(z.reviewDate).format("DD/MM/YY"):"Not Set")}),ae&&(0,Ze.jsx)(ze.lr,{disabled:!ae,placeholder:"Review Date...",onDayClick:e=>G(ipn(ipn({},z),{},{reviewDate:e?e.toISOString():null,shouldUpdate:!0})),box:!0,selectedDate:z.reviewDate?new Date(z.reviewDate):null})]}),q&&(0,Ze.jsxs)(dpn,{container:!0,item:!0,children:[(0,Ze.jsx)(vpn,{size:"md",children:"Legislation is flagged as changed."}),(0,Ze.jsx)(ze.$n,{onClick:()=>G(ipn(ipn({},z),{},{flagCleared:!0,shouldUpdate:!0})),children:"Clear Flag"})]})]}),(0,Ze.jsxs)(ypn,{container:!0,children:[(0,Ze.jsx)(vpn,{size:"md",children:"Synopsis:"}),(0,Ze.jsx)(ze.To,{name:"LegislationItem__Synopsis",source:V.synopsis})]}),(0,Ze.jsxs)(ypn,{container:!0,children:[(0,Ze.jsx)(vpn,{size:"md",children:"Applicability:"}),ae&&(0,Ze.jsx)(BL,{name:"LegislationItem__Applicability",onSave:e=>G(ipn(ipn({},z),{},{applicability:gL(e),shouldUpdate:!0})),source:z.applicability}),!ae&&(0,Ze.jsx)(ze.To,{name:"LegislationItem__Applicability",source:z.applicability})]}),spn(R)&&!(null===(l=Object.keys(Z))||void 0===l||!l.length)&&(0,Ze.jsxs)(ypn,{container:!0,children:[(0,Ze.jsx)(vpn,{size:"md",children:"Scope:"}),(0,Ze.jsx)(Npn,{children:(0,Ze.jsx)(ze.fv,{span:"6",children:(0,Ze.jsx)(ze.l6,{options:Object.keys(Z).map(e=>({value:e,label:Pe[e]})),value:null,onChange:e=>{const n=e.target.value;G(ipn(ipn({},z),{},{showScope:[...z.showScope,n]}))}})})})]}),spn(R)&&Q&&Object.keys(Q).map(e=>(0,Ze.jsxs)(ypn,{container:!0,children:[(0,Ze.jsxs)(vpn,{size:"md",children:[Pe[e],"s"]}),(0,Ze.jsx)(Npn,{children:(0,Ze.jsx)(ze.fv,{span:"6",children:re(e)})})]},e)),(0,Ze.jsxs)(ypn,{container:!0,children:[(0,Ze.jsx)(vpn,{size:"md",children:"Links:"}),(0,Ze.jsx)("div",{children:V.links.map(e=>(0,Ze.jsx)(ze.Yq,{name:"LegislationItem__Link",href:e,target:"_blank",children:e},e))})]}),(0,Ze.jsxs)(ypn,{container:!0,children:[(0,Ze.jsx)(vpn,{size:"md",children:"Attached Documents:"}),(0,Ze.jsx)(Cpn,{children:(null===(s=R.governance)||void 0===s?void 0:s.some(e=>e.startsWith("attachDocumentToLegislation")))&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(wdn,{id:"".concat(V.title,"-addDocuments"),onClick:()=>L(!0),disabled:void 0}),null==V||null===(c=V.documents)||void 0===c?void 0:c.map(e=>(0,Ze.jsx)(p.Link,{target:"_blank",to:"/documents/all/".concat(e.id),children:(0,Ze.jsx)(gcn,{title:e.fileName,category:e.category,id:e.id,iconColor:"tertiary",code:void 0})},e.id))]})})]}),(0,Ze.jsxs)(ypn,{container:!0,children:[(0,Ze.jsx)(vpn,{size:"md",children:"Tasks:"}),!B&&!F&&0===M.length&&(0,Ze.jsx)("p",{children:"There are no tasks associated with this Legislation."}),!B&&!F&&M.length>0&&(0,Ze.jsx)(fpn,{name:"gridContainers",children:(0,Ze.jsx)(uun,{canEdit:!(null===(d=R.task)||void 0===d||!d.find(e=>null==e?void 0:e.startsWith("edit"))),tasks:M,agGrid:j})})]})]})]}),(0,Ze.jsx)(RA,{showCreateDepartment:Y,setShowCreateDepartment:H,passedAccountId:D,onComplete:()=>{}})]})});function Ipn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Epn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ipn(Object(t),!0).forEach(function(n){_pn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ipn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _pn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Fpn={"align-items":"center",display:"flex"},Bpn=[{headerName:"Title",field:"title",resizable:!0,minWidth:500},{headerName:"Review Date",field:"reviewDate",valueFormatter:e=>Ht(e.data.reviewDate),resizable:!0,cellStyle:Fpn,filter:"agDateColumnFilter",filterParams:Epn(Epn({},{buttons:["reset","apply"],closeOnApply:!0}),{},{comparator:Aa})},{headerName:"Compliance Status",field:"status",resizable:!0,cellRenderer:"legislationStatusIcon",cellStyle:Fpn,filterParams:{cellRenderer:"legislationStatusIcon"}},{headerName:"Priority",field:"priority",resizable:!0,cellStyle:Fpn,cellRenderer:"priority",filterParams:{valueFormatter:e=>Dpn(e.value),values:Object.values(Vt.mh).concat("")}},{headerName:"Flagged",valueGetter:e=>Pln(e.data.lastFlaggedForReview,e.data.lastClearedReviewFlag),resizable:!0,filterParams:{valueFormatter:e=>"true"===e.value?"Yes":"No"},cellRenderer:"activeFlag"},{headerName:"Countries",field:"countries",resizable:!0,cellRenderer:"listCountries",cellStyle:Fpn,minWidth:250}],Upn={headerName:"Scope (Tags)",field:"tags",resizable:!0,valueGetter:e=>{var n;return null===(n=e.data.tags)||void 0===n?void 0:n.map(e=>e.tagName)},cellStyle:Fpn},Mpn=[{headerName:"Scope (Location)",field:"locations",resizable:!0,valueGetter:e=>{var n;return null===(n=e.data.locations)||void 0===n?void 0:n.map(e=>e.name)},cellStyle:Fpn},{headerName:"Scope (Departments)",field:"departments",resizable:!0,cellStyle:Fpn,valueGetter:e=>{var n;return null===(n=e.data.departments)||void 0===n?void 0:n.map(e=>e.label)}},{headerName:"Scope (Regions)",field:"regions",resizable:!0,valueGetter:e=>{var n;return null===(n=e.data.regions)||void 0===n?void 0:n.map(e=>e.name)},cellStyle:Fpn}],Vpn=[...Bpn,Upn,...Mpn],zpn=[...Bpn,...Mpn];var Gpn,$pn,Wpn,qpn,Jpn,Ypn,Hpn,Kpn,Qpn,Zpn,Xpn;function emn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function nmn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?emn(Object(t),!0).forEach(function(n){tmn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):emn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function tmn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function amn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const rmn=(0,Ge.default)(ze.fI)(Gpn||(Gpn=amn(["\n  flex: 1;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),imn=Ge.default.div($pn||($pn=amn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n  flex: 1;\n"]))),omn=Ge.default.div(Wpn||(Wpn=amn(["\n  flex: 1 1 auto;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n"]))),lmn=Ge.default.div(qpn||(qpn=amn(["\n  overflow: auto;\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.lg.spacing),smn=(0,Ge.default)(ze.fv)(Jpn||(Jpn=amn(["\n  max-width: ",";\n  display: flex;\n  flex-direction: revert;\n"])),e=>e.desireWidth||"55%"),cmn=Ge.default.div(Ypn||(Ypn=amn(["\n  height: 22px;\n  width: 32px;\n  margin-right: ",";\n  border-radius: 5px;\n  border: 1px solid ",";\n  background: url(",") center center no-repeat;\n  background-size: cover;\n  overflow: hidden;\n  border: 1px solid ",";\n  display: inline-block;\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.colors.overlay.normal.background,e=>i[e.flag],e=>e.theme.colors.overlay.normal.background),dmn=(0,Ge.default)(ze.fv)(Hpn||(Hpn=amn(["\n  margin-right: 15px;\n  flex-grow: 1;\n  min-width: 150px;\n"]))),umn=(0,Ge.default)(ze.fv)(Kpn||(Kpn=amn(["\n  margin-right: 15px;\n  flex-grow: 2;\n"]))),pmn=(0,Ge.default)(ze.In)(Qpn||(Qpn=amn(["\n  color: ",";\n  margin-right: 10px;\n"])),e=>e.theme.colors.danger.normal.background),mmn=Ge.default.div(Zpn||(Zpn=amn(["\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  width: 100%;\n"]))),fmn=Ge.default.div(Xpn||(Xpn=amn(["\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  width: 100%;\n  color: ",";\n  font-weight: bold;\n"])),e=>Apn(e.priority,e.theme)),ymn=g.memo(e=>(0,Ze.jsx)(Ze.Fragment,{children:e.data.countries.length?e.data.countries.map(e=>(0,Ze.jsx)(cmn,{name:"LegislationTile__Flag",flag:e,alt:e,title:e},e)):""}));ymn.displayName="ListCountriesChild";const gmn=g.memo(e=>{const n=wln.find(n=>n.value===e.value);return null!=n&&n.name?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Uln,{status:e.value})," ",null==n?void 0:n.name]}):(0,Ze.jsx)(Ze.Fragment,{children:e.value})});gmn.displayName="LegislationStatusChild";const bmn="LEGISLATION_LIBRARY_FILTERS",hmn={listCountries:ymn,legislationStatusIcon:gmn,activeFlag:e=>Pln(e.data.lastFlaggedForReview,e.data.lastClearedReviewFlag)&&(0,Ze.jsx)(pmn,{icon:"history",title:"Rio has detected a change to this legislation."}),priority:e=>{const n=e.data.priority;return n?(0,Ze.jsx)(fmn,{priority:n,children:Dpn(n)}):"-"}},vmn=e=>{let{accessControls:n}=e;const t=(0,m.Zp)(),a=Dd(),r=n.tagLevelLegislation,i=rt(),o=Od(i),l=Df(),[s,c]=(0,g.useState)(""),d=r&&!s,{data:u,error:p,loading:f,refetch:y}=(0,h.IT)(_ln,{variables:{accountId:i,tagId:s},fetchPolicy:"network-only",skip:d}),b=(null==u?void 0:u.getAllLegislation)||[],v=Nln.filter(e=>!e.comingSoon&&n[e.accessIndex]),x=localStorage.getItem(bmn)?JSON.parse(localStorage.getItem(bmn)):null,[T,O,k]=hf(b,["title"],null==x?void 0:x.searchValue),j=e=>{const n=[];e.forEachNodeAfterFilterAndSort(e=>n.push(e.data)),((e,n)=>{const t=[];e.forEach(e=>{var a,r,i,o;let l={Title:e.title,Synopsis:e.synopsis,"Compliance Status":Iln({value:e.status}),"Review Date":Ht(e.reviewDate),Applicability:"You can add content relating to the applicability of this legislation here."!==e.applicability?e.applicability:"",Countries:e.countries.join(", ")};l=n?l:Aln(Aln({},l),{},{"Scope (Tags)":null===(a=e.tags)||void 0===a?void 0:a.map(e=>e.tagName).join(", ")}),l=Aln(Aln({},l),{},{"Scope (Location)":null===(r=e.locations)||void 0===r?void 0:r.map(e=>e.name).join(", "),"Scope (Departments)":null===(i=e.departments)||void 0===i?void 0:i.map(e=>e.label).join(", "),"Scope (Regions)":null===(o=e.regions)||void 0===o?void 0:o.map(e=>e.name).join(", ")}),t.push(l)});const a=Vr(t);ql()(a,"export-legislation.xlsx")})(n,r)};(0,g.useEffect)(()=>{localStorage.setItem(bmn,JSON.stringify({searchValue:T}))},[T]);const C=null==o?void 0:o.departments,S=(0,g.useMemo)(()=>k.map(e=>nmn(nmn({},e),{},{status:e.status||"TBD",departments:ju(C||[],e.departmentIds)})),[k,C]);return(0,Ze.jsxs)(imn,{name:"LegislationList",children:[(0,Ze.jsx)(ige,{name:"LegislationList",breadcrumbs:[{title:"Governance",to:"/governance"},{title:"Legislation"}],icon:"pencil-alt",iconColor:"tertiary",title:"PageHeader",isDropdown:!0,dropdownItems:v,dropdownDefault:"Legislation",children:(0,Ze.jsxs)(smn,{item:!0,desireWidth:r&&"65%",children:[r&&(0,Ze.jsx)(umn,{children:(0,Ze.jsx)(mmn,{children:(0,Ze.jsx)(gln,{tags:l,value:s,onChange:e=>c(e.target.value),error:""})})}),(0,Ze.jsx)(umn,{children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationAspectContainer__Controls__Search",value:T,onChange:e=>O(e.target.value),hideButton:!0})}),(0,Ze.jsx)(dmn,{children:(0,Ze.jsx)(SD,{gridApi:a.api,onClick:()=>O("")})}),(0,Ze.jsx)(dmn,{children:(0,Ze.jsx)(ze.$n,{color:"tertiary",onClick:()=>{null!=a&&a.api&&j(a.api)},children:"Export Data"})})]})}),(f||!l)&&(0,Ze.jsx)(omn,{children:(0,Ze.jsx)(ze.Ip,{size:"md",name:"LegislationList__Loading"})}),p&&(0,Ze.jsx)(ze.Kw,{error:p,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"LegislationList__Error",icon:a,title:n,body:t,retry:y})}}),!f&&!p&&u&&(0,Ze.jsx)(rmn,{container:!0,item:!0,children:(0,Ze.jsx)(nD,{defaultColDef:{sortable:!0,resizable:!0,filter:!0,wrapText:!0,autoHeight:!0},columnDefs:(N=r,N?zpn:Vpn),components:hmn,rowData:S,onFirstDataRendered:a.onFirstDataRendered,onGridReady:a.onGridReady,onFilterChanged:a.onFilterChanged,onSortChanged:a.onSortChanged,onColumnVisible:a.onSaveGridColumnState,onColumnPinned:a.onSaveGridColumnState,onColumnResized:a.onSaveGridColumnState,onColumnMoved:a.onSaveGridColumnState,onColumnRowGroupChanged:a.onSaveGridColumnState,onColumnValueChanged:a.onSaveGridColumnState,onColumnPivotChanged:a.onSaveGridColumnState,onCellClicked:e=>{t(s?"./".concat(e.data.id,"/").concat(s):"./".concat(e.data.id))},rowSelection:"single",suppressCsvExport:!0,getContextMenuItems:e=>{let{api:n}=e;return["copy","copyWithHeaders","separator",{name:"Excel Export",action:()=>{n&&j(n)}}]}})}),!f&&!p&&l&&(!b||d)&&(0,Ze.jsxs)(lmn,{children:[!b&&!d&&(0,Ze.jsx)(nv,{name:"LegislationList__NoResults",title:"There are no results for this search."}),d&&(0,Ze.jsx)(nv,{name:"LegislationList__NoResults",title:"This account operates a tag level legal register however your user is not assigned to any applicable tags. Contact your business admin or support for more information."})]})]});var N},xmn=g.memo(vmn);var Tmn;const Omn=(0,D.J1)(Tmn||(Tmn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetAvailableManagementSystems($accountId: ID!, $type: GovernanceItemType) {\n    getAvailableManagementSystems(accountId: $accountId, type: $type) {\n      id\n      title\n      type\n    }\n  }\n"])));var kmn,jmn,Cmn;function Smn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Nmn=(0,Ge.default)(ze.fv)(kmn||(kmn=Smn(["\n  opacity: ",";\n  border: 1px solid ",";\n  background-color: ",";\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n  position: relative;\n"])),e=>e.disabled?"0.5":"1",e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white),wmn=Ge.default.div(jmn||(jmn=Smn(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin: "," 0;\n"])),e=>e.theme.geometry.xs.spacing),Dmn=(0,Ge.default)(ze.GQ)(Cmn||(Cmn=Smn(["\n  display: inline-flex;\n  flex: 0 0 auto;\n  background: ",";\n"])),e=>{let{theme:n}=e;return n.colors.basic.white}),Amn=e=>{let{title:n}=e;return(0,Ze.jsxs)(Nmn,{name:"SubjectTile SubjectTile--".concat(n),container:!0,item:!0,children:[(0,Ze.jsx)(wmn,{children:(0,Ze.jsx)(Dmn,{name:"SubjectTile__Icon",height:"70px",size:"lg",icon:"pencil-alt",iconColor:"tertiary",circleColor:"tertiary"})}),(0,Ze.jsx)(wmn,{children:(0,Ze.jsx)(ze.DZ,{align:"center",size:"lg",children:n})})]})};var Rmn;const Pmn=Ge.default.div(Rmn||(Rmn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n\n  // Fallbacks for IE\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-self: flex-center;\n\n  // CSS grid for real browsers\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n  grid-gap: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.lg.spacing),Lmn=e=>{let{items:n}=e;return(0,Ze.jsx)(Pmn,{children:n.map(e=>(0,Ze.jsx)(p.Link,{name:"ManagementSystemGrid__Link__".concat(e.title),to:{pathname:"".concat(si(e.type),"/").concat(e.id),state:{title:e.title}},children:(0,Ze.jsx)(Amn,{title:e.title},e.id)},e.id))})};var Imn,Emn,_mn;function Fmn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Bmn=(0,Ge.default)(ze.fI)(Imn||(Imn=Fmn(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  background: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.overlay.normal.background,e=>e.styleSelected?e.theme.colors.overlay.light.background:"none"),Umn=(0,Ge.default)(ze.fI)(Emn||(Emn=Fmn(["\n  opacity: ",";\n"])),e=>e.disabled?"0.5":"1"),Mmn=(0,Ge.default)(ze.GQ)(_mn||(_mn=Fmn(["\n  display: inline-flex;\n  flex: 0 0 auto;\n  margin-right: ",";\n"])),e=>e.theme.geometry.sm.spacing),Vmn=e=>{let{title:n}=e;return(0,Ze.jsx)(Bmn,{name:"BotRow--".concat(n),container:!0,itemAlign:"center",children:(0,Ze.jsx)(Umn,{container:!0,item:!0,itemAlign:"center",distribution:"between",children:(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(Mmn,{height:"30px",size:"md",icon:"pencil-alt",iconColor:"tertiary",circleColor:"tertiary"}),(0,Ze.jsx)(ze.EY,{weight:"bold",color:"dark",inline:!0,name:"BotRow__Title--".concat(n),size:"md",children:n})]})})})};var zmn;const Gmn=Ge.default.div(zmn||(zmn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n  overflow: auto;\n  background: ",";\n  margin-top: ",";\n"])),e=>e.theme.colors.basic.white,e=>e.theme.geometry.md.spacing),$mn=e=>{let{items:n}=e;return(0,Ze.jsx)(Gmn,{children:n.map(e=>(0,Ze.jsx)(p.Link,{name:"ManagementSystemRow__Link__".concat(e.id),to:{pathname:"".concat(si(e.type),"/").concat(e.id),state:{title:e.title}},children:(0,Ze.jsx)(Vmn,{title:e.title},e.id)},e.id))})};var Wmn,qmn,Jmn,Ymn,Hmn,Kmn,Qmn;function Zmn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Xmn=Ge.default.div(Wmn||(Wmn=Zmn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),efn=Ge.default.div(qmn||(qmn=Zmn(["\n  overflow: auto;\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.lg.spacing),nfn=(0,Ge.default)(ze.fI)(Jmn||(Jmn=Zmn(["\n  padding-right: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.dark.background),tfn=(0,Ge.default)(ze.vj)(Ymn||(Ymn=Zmn(["\n  flex: 1 1 auto;\n  form > div {\n    background: none;\n    border: 0;\n    border-radius: 0;\n  }\n"]))),afn=Ge.default.div(Hmn||(Hmn=Zmn(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),rfn=(0,Ge.default)(ze.Yq)(Kmn||(Kmn=Zmn(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.md.spacing),ifn=(0,Ge.default)(Tn)(Qmn||(Qmn=Zmn(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),ofn=e=>{const{fullAccess:n}=e,t=(0,m.zy)(),{data:a}=Td(),[r,i]=(0,g.useState)(!0),[o,l]=(0,g.useState)(""),s=rt(),c={systems:{type:"MANAGEMENT_SYSTEM",title:"Management Systems and Standards"},agreements:{type:Xr,title:"Voluntary Agreements"},frameworks:{type:Zr,title:"Reporting Frameworks"}},d=c[t.pathname.split("/").pop()],{loading:u,data:p}=(0,h.IT)(Omn,{variables:{accountId:s,type:d.type||c[0].type}}),f=!u&&p?((e,n)=>{if(!n)return e;const t=new gf.vj("id");return t.addIndex("title"),t.addDocuments(p),t.search(n)})(p.getAvailableManagementSystems,o):[],y=Nln.filter(e=>!e.comingSoon&&a.comply[e.accessIndex]);return(0,Ze.jsxs)(Xmn,{name:"ManagementSystemLandingPage",children:[(0,Ze.jsx)(ige,{name:"ManagementSystemLandingPageHeader",breadcrumbs:[{title:"Governance",to:".."},{title:d.title}],icon:"pencil-alt",iconColor:"tertiary",isDropdown:!0,dropdownItems:y,dropdownDefault:d.title}),(0,Ze.jsxs)(efn,{children:[(0,Ze.jsxs)(nfn,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(tfn,{name:"DataSubjects__Search",value:o,onChange:e=>l(e.target.value),hideButton:!0}),(0,Ze.jsx)(rfn,{name:"DataSubjects__ShowGrid",size:"md",color:r?"primary":"normal",weight:r?"bold":"normal",underline:!1,onClick:()=>i(!r),inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"th"})}),(0,Ze.jsx)(rfn,{name:"DataSubjects__ShowList",size:"md",color:r?"normal":"primary",weight:r?"normal":"bold",underline:!1,onClick:()=>i(!r),inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"th-list"})})]}),u&&(0,Ze.jsx)(afn,{children:(0,Ze.jsx)(ze.Ip,{})}),!u&&!f.length&&(0,Ze.jsx)(ifn,{name:"GovContainer_NoManagementSystems_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Management Systems and Standards",body:"Currently this account does not have any assigned Management Systems. Please contact support for more information."}),r&&(0,Ze.jsx)(Lmn,{items:f,fullAccess:n}),!r&&(0,Ze.jsx)($mn,{items:f,fullAccess:n})]})]})};var lfn,sfn,cfn,dfn;function ufn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const pfn=(0,D.J1)(lfn||(lfn=ufn(["\n  query GetManagementSystemById($id: ID!, $accountId: ID!) {\n    getManagementSystemById(id: $id, accountId: $accountId) {\n      id\n      title\n      synopsis\n      shortCode\n      type\n      content {\n        headerButton {\n          text\n          link\n        }\n      }\n      documents {\n        id\n        fileName\n        managementSystemCode\n        category\n      }\n      chapters {\n        ...ChapterFields\n        ... on ManagementSystemChapter {\n          chapters {\n            ...ChapterFields\n            ...ChapterFieldsNesting\n          }\n        }\n      }\n    }\n  }\n  ","\n  ","\n"])),E5,F5),mfn=(0,D.J1)(sfn||(sfn=ufn(["\n  mutation attachDocument($id: ID!, $accountId: ID!, $systemId: ID!, $linkId: ID!) {\n    attachDocumentToManagementSystem(input: { id: $systemId, accountId: $accountId, linkId: $linkId, documentId: $id })\n  }\n"]))),ffn=(0,D.J1)(cfn||(cfn=ufn(["\n  mutation attachContent($id: ID!, $accountId: ID!, $linkId: ID!, $synopsis: String!) {\n    attachContentToManagementSystem(input: { id: $id, accountId: $accountId, linkId: $linkId, synopsis: $synopsis })\n  }\n"]))),yfn=(0,D.J1)(dfn||(dfn=ufn(["\n  query GetAvailableManagementSystemsAndDocuments($accountId: ID!) {\n    getAvailableManagementSystems(accountId: $accountId) {\n      id\n      title\n    }\n  }\n"]))),gfn=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(si(e),"/").concat(n,"/").concat(t)},bfn=(e,n)=>{if(!e)return[];const t=e.chapters.map(t=>{var a;return{heading:n[t.id].tocTitle,link:gfn(e.type,e.id,t.id),id:t.id,children:null===(a=t.chapters)||void 0===a?void 0:a.map(t=>{var a;return{heading:n[t.id].tocTitle,link:gfn(e.type,e.id,t.id),id:t.id,children:null===(a=t.chapters)||void 0===a?void 0:a.map(t=>({heading:n[t.id].tocTitle,link:gfn(e.type,e.id,t.id),id:t.id,children:[]}))}})}});return[{heading:e.title,link:gfn(e.type,e.id),id:e.id,children:t,expanded:!0}]};var hfn;const vfn=(0,Ge.default)(ze.fI)(hfn||(hfn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  position: relative;\n  width: 100%;\n  min-height: 64px;\n  align-items: center;\n  ","\n  ","\n"])),cSe,sSe);function xfn(e){let{menu:n,active:t}=e;return(0,Ze.jsx)(ze.fv,{span:12,container:!0,children:n.map(e=>{var n,a,r;const i=e.id===t,o=null===(n=e.children)||void 0===n?void 0:n.some(e=>e.id===t),l=null===(a=e.children)||void 0===a?void 0:a.some(e=>{var n;return null==e||null===(n=e.children)||void 0===n?void 0:n.some(e=>e.id===t)});return(0,Ze.jsx)(p.Link,{to:e.link,children:null!==(r=e.children)&&void 0!==r&&r.length?(0,Ze.jsx)(ySe,{heading:e.heading,active:i,defaultExpanded:i||o||l||e.expanded,hasChildren:!0,children:(0,Ze.jsx)(ze.fv,{span:12,container:!0,children:(0,Ze.jsx)(xfn,{menu:e.children,active:t})})}):(0,Ze.jsx)(vfn,{active:i,container:!0,item:!0,children:(0,Ze.jsx)(oSe,{children:e.heading})})},e.id)})})}var Tfn,Ofn,kfn,jfn,Cfn,Sfn,Nfn,wfn,Dfn,Afn,Rfn,Pfn,Lfn,Ifn,Efn,_fn,Ffn,Bfn,Ufn,Mfn,Vfn,zfn,Gfn,$fn,Wfn,qfn,Jfn,Yfn,Hfn,Kfn,Qfn,Zfn,Xfn,eyn,nyn;function tyn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ayn=(0,Ge.default)(ze.fI)(Tfn||(Tfn=tyn(["\n  display: flex;\n  align-items: start;\n  justify-content: space-between;\n"]))),ryn=Ge.default.div(Ofn||(Ofn=tyn(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  background-color: ",";\n  padding: ",";\n  width: 100%;\n"])),e=>e.theme.colors.basic.white,e=>e.theme.geometry.sm.spacing),iyn=Ge.default.div(kfn||(kfn=tyn(["\n  display: flex;\n  width: 100%;\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),oyn=(0,Ge.default)(ze.fv)(jfn||(jfn=tyn(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),lyn=(0,Ge.default)(ze.fI)(Cfn||(Cfn=tyn(["\n  display: flex;\n  align-items: center;\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),syn=(0,Ge.default)(ze.GQ)(Sfn||(Sfn=tyn(["\n  margin-right: ",";\n  display: inline-flex;\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.sm.spacing),cyn=Ge.default.div(Nfn||(Nfn=tyn(["\n  padding: ",";\n"])),e=>e.theme.geometry.sm.spacing),dyn=Ge.default.div(wfn||(wfn=tyn(["\n  height: 100%;\n  overflow: auto;\n  background-color: ",";\n"])),e=>e.theme.colors.basic.white),uyn=Ge.default.div(Dfn||(Dfn=tyn(["\n  background-color: ",";\n"])),e=>e.theme.colors.basic.white),pyn=(0,Ge.default)(ze.JU)(Afn||(Afn=tyn(["\n  margin-bottom: 15px;\n  margin-top: 20px;\n  font-weight: bolder;\n  font-size: ",";\n  color: ",";\n"])),e=>e.theme.fonts.sm.size,e=>e.theme.colors.text.light.text),myn=(0,Ge.default)(ze.ks)(Rfn||(Rfn=tyn(["\n  & > div {\n    border-color: ",";\n  }\n"])),e=>e.theme.colors.text.normal.background),fyn=(0,Ge.default)(ze.fI)(Pfn||(Pfn=tyn(["\n  margin-right: 15px;\n\n  &:last-of-type {\n    margin-right: 0;\n  }\n"]))),yyn=(0,Ge.default)(ze.fs)(Lfn||(Lfn=tyn(["\n  & > div {\n    border-radius: 5px;\n  }\n"]))),gyn=(0,Ge.default)(ze.l6)(Ifn||(Ifn=tyn(["\n  border-radius: 5px;\n"]))),byn=((0,Ge.default)(f.Select)(Efn||(Efn=tyn(["\n  border-radius: 5px;\n"]))),(0,Ge.default)(ze.ks)(_fn||(_fn=tyn(["\n  & > div {\n    height: 63px;\n    border-radius: 5px;\n  }\n"])))),hyn=(0,Ge.default)(ze.lr)(Ffn||(Ffn=tyn(["\n  & > div > div {\n    height: 65px;\n    border-radius: 5px;\n  }\n"]))),vyn=Ge.default.div(Bfn||(Bfn=tyn(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),xyn=Ge.default.div(Ufn||(Ufn=tyn(["\n  & > div > div {\n    border-radius: 5px;\n  }\n"]))),Tyn=(Ge.default.div(Mfn||(Mfn=tyn(["\n  & > div > div {\n    border-radius: 5px;\n  }\n"]))),(0,Ge.default)(ze.$n)(Vfn||(Vfn=tyn(["\n  width: 150px;\n  border-radius: 10px;\n  align-self: center;\n"])))),Oyn=(0,Ge.default)(Tyn)(zfn||(zfn=tyn(["\n  margin-right: 20px;\n  border-radius: ",";\n"])),e=>e.theme.geometry.md.radius),kyn=(0,Ge.default)(Tyn)(Gfn||(Gfn=tyn(["\n  margin-right: 20px;\n  background-color: #cccccc;\n  border-color: #cccccc;\n  border-radius: ",";\n  &:hover,\n  &:focus {\n    background-color: #c1bebe;\n    border-color: #cccccc;\n  }\n"])),e=>e.theme.geometry.md.radius),jyn=(0,Ge.default)(Tyn)($fn||($fn=tyn(["\n  background-color: ",";\n  border-color: ",";\n  border-radius: ",";\n  &:hover,\n  &:focus {\n    background-color: ",";\n    border-color: ",";\n  }\n"])),e=>e.theme.colors.danger.normal.background,e=>e.theme.colors.danger.normal.background,e=>e.theme.geometry.md.radius,e=>e.theme.colors.danger.dark.background,e=>e.theme.colors.danger.dark.background),Cyn=Ge.default.div(Wfn||(Wfn=tyn(["\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  margin-right: 30px;\n"]))),Syn=(0,Ge.default)(pyn)(qfn||(qfn=tyn(["\n  & {\n    position: relative;\n    font-weight: bolder;\n    font-size: ",";\n  }\n  &:after {\n    content: '*';\n    position: absolute;\n    top: 0;\n    color: red;\n  }\n"])),e=>e.theme.fonts.sm.size),Nyn=(0,Ge.default)(ze.In)(Jfn||(Jfn=tyn(["\n  color: black;\n  &:hover,\n  &:focus {\n    cursor: pointer;\n  }\n"]))),wyn=(0,Ge.default)(ze.In)(Yfn||(Yfn=tyn(["\n  color: ",";\n  &:hover,\n  &:focus {\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.warning.normal.background),Dyn=Ge.default.div(Hfn||(Hfn=tyn(["\n  > svg {\n    cursor: pointer;\n    margin: 5px 0 0 10px;\n  }\n  display: flex;\n  align-items: center;\n"]))),Ayn=Ge.default.div(Kfn||(Kfn=tyn(["\n  background-color: #ffe5b4;\n  border-radius: 6px;\n  color: #83838e;\n  cursor: default;\n  font-size: 14px;\n  height: 65px;\n  margin-left: 10px;\n  text-align: left;\n  padding: 5px 10px;\n  width: 51%;\n  word-break: break-word;\n"]))),Ryn=Ge.default.div(Qfn||(Qfn=tyn(["\n  display: flex;\n"]))),Pyn=Ge.default.div(Zfn||(Zfn=tyn(["\n  width: 100%;\n"]))),Lyn=Ge.default.div(Xfn||(Xfn=tyn(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  position: sticky;\n  top: 0;\n  z-index: 1;\n  background-color: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.colors.basic.white,e=>e.theme.colors.overlay.normal.background),Iyn=Ge.default.div(eyn||(eyn=tyn(["\n  & > div > div {\n    border-radius: 5px;\n  }\n"])));var Eyn,_yn;function Fyn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Ge.default.div(nyn||(nyn=tyn(["\n  margin-right: 10px;\n"])));const Byn=(0,D.J1)(Eyn||(Eyn=Fyn(["\n  mutation attachDocument($input: AttachDocumentInput!) {\n    attachDocumentToManagementSystem(input: $input)\n  }\n"]))),Uyn=(0,D.J1)(_yn||(_yn=Fyn(["\n  mutation attachContent($input: AttachContentInput!) {\n    attachContentToManagementSystem(input: $input)\n  }\n"])));var Myn,Vyn,zyn,Gyn,$yn,Wyn,qyn;function Jyn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Yyn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Jyn(Object(t),!0).forEach(function(n){Hyn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Jyn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Hyn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Kyn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Qyn=(0,Ge.default)(ze.fv)(Myn||(Myn=Kyn(["\n  flex: 1;\n  padding-left: ",";\n"])),e=>e.theme.geometry.md.spacing),Zyn=(0,Ge.default)(ze.fv)(Vyn||(Vyn=Kyn(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n"]))),Xyn=(0,Ge.default)(ze.$n)(zyn||(zyn=Kyn(["\n  width: 100%;\n"]))),egn=Ge.default.div(Gyn||(Gyn=Kyn(["\n  padding: ",";\n"])),e=>e.theme.geometry.sm.spacing),ngn=(0,Ge.default)(ze.DZ)($yn||($yn=Kyn(["\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),tgn=(0,Ge.default)(ze.fv)(Wyn||(Wyn=Kyn(["\n  flex-grow: ",";\n  background-color: ",";\n  padding: ",";\n  margin-bottom: ",";\n"])),e=>e.flexGrow||0,e=>e.theme.colors.basic.white,e=>e.theme.geometry.sm.spacing,e=>"marginBottom"in e?"".concat(e.marginBottom,"px"):e.theme.geometry.md.spacing),agn=(0,Ge.default)(ze.fv)(qyn||(qyn=Kyn(["\n  flex-grow: 0;\n  flex-basis: 220px;\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing);function rgn(e){var n,t;let{header:a,synopsis:r,content:i,documents:o,managementSystem:l,page:s}=e;const[c,d]=(0,g.useState)(!1),[u]=function(){const{showNotification:e}=vt(),n=(0,g.useCallback)(()=>{e("Document successfully added. Now scanning for viruses.","success")},[e]),t=(0,g.useCallback)(()=>{e("Something went wrong. Please try again later.","danger")},[e]);return(0,Ot.n)(Byn,{onCompleted:n,onError:t,refetchQueries:["GetManagementSystemById"]})}(),[m]=function(){const{showNotification:e}=vt(),n=(0,g.useCallback)(()=>{e("Synopsis saved","success")},[e]),t=(0,g.useCallback)(()=>{e("Something went wrong. Please try again later.","danger")},[e]);return(0,Ot.n)(Uyn,{onCompleted:n,onError:t,refetchQueries:["GetManagementSystemById"]})}(),f=rt(),y=(0,g.useMemo)(()=>{if(o)return Yyn(Yyn({},o.predefinedValues),{},{library:Vt.zM.Governance,category:"MANAGEMENT_SYSTEM"===l.type?"Management Systems":"Reporting Frameworks",managementSystemId:l.id,managementSystemChapterId:s.id,managementSystemCode:l.shortCode})},[o,l,s]),b=(0,g.useCallback)((e,n)=>{u({variables:{input:{accountId:f,id:l.id,linkId:s.id,documentId:n.id}}})},[u,l,s,f]),h=(0,g.useCallback)(e=>{m({variables:{input:{accountId:f,id:l.id,linkId:s.id,synopsis:gL(e)}}})},[m,f,l,s]),v=(0,g.useCallback)(()=>{d(!1)},[d]);return(0,Ze.jsxs)(Qyn,{container:!0,item:!0,children:[(0,Ze.jsxs)(tgn,{container:!0,item:!0,children:[(0,Ze.jsxs)(lyn,{distribution:"between",item:!0,container:!0,children:[(0,Ze.jsxs)(Zyn,{span:8,item:!0,children:[(0,Ze.jsx)(syn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"pencil-alt"}),(0,Ze.jsx)(ze.DZ,{inline:!0,children:a.title})]}),null===(n=a.buttons)||void 0===n?void 0:n.map((e,n)=>(0,Ze.jsx)(agn,{grow:0,item:!0,children:(0,Ze.jsx)(Xyn,{size:"md",color:e.color,onClick:n=>{e.onClick(n)},inline:!0,children:e.title})},"ManagementSystemChapterLayout__ButtonCol__".concat(n)))]}),(0,Ze.jsxs)(egn,{children:[(0,Ze.jsx)(ngn,{size:"md",children:"Overview:"}),"markdown"===r.mode?(0,Ze.jsx)(Ze.Fragment,{children:r.editable?(0,Ze.jsx)(BL,{onSave:h,source:r.content||"Add your own content here."}):(0,Ze.jsx)(ze.To,{source:r.content||"Add your own content here."})}):r.content]})]}),i&&(0,Ze.jsxs)(tgn,{flexGrow:1,marginBottom:o?24:0,children:[i.header&&(0,Ze.jsx)(iyn,{children:(0,Ze.jsx)(lyn,{container:!0,item:!0,children:(0,Ze.jsx)(Zyn,{span:12,item:!0,children:(0,Ze.jsx)(ze.DZ,{inline:!0,children:i.header})})})}),i.loading?"Loading...":i.render()]}),o&&(0,Ze.jsx)(ayn,{container:!0,item:!0,children:(0,Ze.jsxs)(ryn,{children:[(0,Ze.jsx)(iyn,{children:(0,Ze.jsxs)(lyn,{distribution:"start",span:12,children:[(0,Ze.jsx)(syn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"file-alt"}),(0,Ze.jsx)(ze.DZ,{inline:!0,children:"Evidence Library"})]})}),(0,Ze.jsx)(iyn,{children:(0,Ze.jsx)(ngn,{size:"md",children:"Upload documents to support this section of the management system."})}),(0,Ze.jsx)(cyn,{children:(0,Ze.jsxs)(ze.FN,{show:3,scroll:1,width:"675px",infinite:!1,children:[new Array(mi(o.records)).fill(0).map((e,n)=>(0,Ze.jsx)(wdn,{id:e.id,disabled:o.readonly,onClick:()=>d(!0),children:(0,Ze.jsx)(ze.ON,{title:"Upload Evidence"})},"upload-evidence".concat(n))),null==o||null===(t=o.records)||void 0===t?void 0:t.map(e=>(0,Ze.jsx)(p.Link,{target:"_blank",to:"/documents/all/".concat(e.id),children:(0,Ze.jsx)(ze.ON,{title:e.managementSystemCode?"".concat(e.managementSystemCode.toUpperCase()):"Evidence",desc:e.fileName,uploaded:!0})},e.id))]})})]})}),o&&c&&(0,Ze.jsx)(Fsn,{predefinedValues:y,onDismiss:v,onUpload:b})]})}function ign(e){let{managementSystem:n,page:t,canEditContent:a,isReadOnly:r}=e;const i=(0,m.Zp)();return(0,Ze.jsx)(rgn,{header:{title:t.title||n.title,buttons:function(e){var n;if("EMS"===(null==e?void 0:e.shortCode))return[{color:"tertiary",title:"Aspects & Impacts Register",onClick:()=>{i("/governance/environmental-aspects")}}];if(null!=e&&null!==(n=e.content)&&void 0!==n&&n.headerButton){const{content:{headerButton:{link:n,text:t}}}=e;return[{color:"tertiary",title:t,onClick:()=>{n&&(n.indexOf("http")>=0?window.open(n):i(n))}}]}return null}(n)},page:t,managementSystem:n,synopsis:{mode:"markdown",content:t.synopsis||"Add your own content here.",editable:a},documents:{records:t.documents||[],readonly:r,predefinedValues:{managementSystemId:n.id,managementSystemChapterId:t.id,category:"Management Systems",library:Vt.zM.Governance,managementSystemCode:ui(n,t)}}})}function ogn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function lgn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ogn(Object(t),!0).forEach(function(n){sgn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ogn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function sgn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function cgn(e){let{question:n,onAnswer:t}=e;const a=(0,g.useCallback)((e,a)=>{t(lgn(lgn({},n),{},{reportedChoice:a}))},[n,t]);return(0,Ze.jsx)(ze.jT,{fullWidth:!0,value:n.reportedChoice||null,onChange:a,options:n.variants||[],renderInput:e=>(0,Ze.jsx)(ze.PU,lgn(lgn({},e),{},{label:n.shortFormulation||n.formulation,placeholder:n.shortFormulation||n.formulation}))})}function dgn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ugn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dgn(Object(t),!0).forEach(function(n){pgn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dgn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function pgn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function mgn(e){let{question:n,onAnswer:t}=e;const a=(0,g.useCallback)((e,a)=>{t(ugn(ugn({},n),{},{reportedChoices:a||[]}))},[n,t]);return(0,Ze.jsx)(ze.jT,{fullWidth:!0,multiple:!0,limitTags:1,value:n.reportedChoices||[],onChange:a,options:n.variants||[],renderInput:e=>(0,Ze.jsx)(ze.PU,ugn(ugn({},e),{},{label:n.shortFormulation||n.formulation||"Select all that apply",placeholder:n.shortFormulation||""}))})}var fgn,ygn,ggn,bgn,hgn=t(95933),vgn=t.n(hgn),xgn=t(31348),Tgn=t.n(xgn);function Ogn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kgn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ogn(Object(t),!0).forEach(function(n){jgn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ogn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jgn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Cgn(e){let{question:n,onAnswer:t}=e;const a=(0,g.useCallback)((e,a)=>{var r;t(kgn(kgn({},n),{},{reportedAnswer:(r=a,"Yes"===r||"No"!==r&&null)}))},[n,t]);return(0,Ze.jsx)(ze.jT,{fullWidth:!0,value:vgn()(n.reportedAnswer)||Tgn()(n.reportedAnswer)?null:(r=n.reportedAnswer,r?"Yes":"No"),onChange:a,options:["Yes","No"],renderInput:e=>(0,Ze.jsx)(ze.PU,kgn(kgn({},e),{},{label:n.shortFormulation||n.formulation,placeholder:n.shortFormulation||"Yes/No"}))});var r}function Sgn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ngn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Sgn(Object(t),!0).forEach(function(n){wgn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Sgn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function wgn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Dgn(e){let{question:n,onAnswer:t,answerOnBlur:a}=e;const r=(0,g.useCallback)(e=>t(Ngn(Ngn({},n),{},{["FloatQuestion"===n.__typename?"reportedFloat":"reportedInt"]:e})),[n,t]),i=(0,g.useCallback)(e=>{r(+e.target.value)},[r]),o=(0,g.useCallback)(e=>{r(+e.target.value)},[r]),l=a?{onBlur:o}:{onChange:i};return(0,Ze.jsx)(ze.PU,Ngn({fullWidth:!0,name:n.id,type:"number",id:n.id,defaultValue:"FloatQuestion"===n.__typename?(0,zt.get)(n,"reportedFloat",""):(0,zt.get)(n,"reportedInt",""),placeholder:n.shortFormulation||n.formulation,label:n.shortFormulation||n.formulation},l))}function Agn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Rgn=(0,Ge.default)(ze.fv)(fgn||(fgn=Agn(["\n  padding-right: 16px;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Pgn=(0,Ge.default)(ze.fI)(ygn||(ygn=Agn(["\n  position: relative;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Lgn=(0,Ge.default)(ze.To)(ggn||(ggn=Agn(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Ign=(0,Ge.default)(ze.In)(bgn||(bgn=Agn(["\n  position: absolute;\n  right: -",";\n  top: ",";\n  cursor: pointer;\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),Egn=e=>{let{onClick:n}=e;return(0,Ze.jsx)(Ign,{icon:"trash",color:"#a2a3a5",onClick:n})};function _gn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Fgn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_gn(Object(t),!0).forEach(function(n){Bgn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_gn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Bgn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ugn(e){var n;let{question:t,onAnswer:a}=e;const[r,i]=(0,g.useState)(t.reportedText||""),o=(0,g.useCallback)(e=>a(Fgn(Fgn({},t),{},{reportedText:e.target.value||null})),[t,a]),l=(0,g.useMemo)(()=>(0,zt.debounce)(o,3e3),[o]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(null==t||null===(n=t.displaySettings)||void 0===n?void 0:n.showFormulation)&&(0,Ze.jsx)(Lgn,{source:t.formulation}),(0,Ze.jsx)(ze.PU,{fullWidth:!0,name:t.id,id:t.id,value:r||"",placeholder:t.shortFormulation||t.formulation||"Enter your value",label:t.shortFormulation||t.formulation,onChange:e=>{i(e.target.value),l(e)}})]})}var Mgn;function Vgn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function zgn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Vgn(Object(t),!0).forEach(function(n){Ggn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Vgn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ggn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const $gn=Ge.default.div(Mgn||(Mgn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-bottom: 50px;\n  width: 100%;\n  .editor-class {\n    padding: 10px !important;\n  }\n  .wrapper-class {\n    width: 100%;\n  }\n"])));function Wgn(e){let{question:n,onAnswer:t}=e;const a=(0,g.useCallback)(e=>{t(zgn(zgn({},n),{},{reportedText:e||null}))},[n,t]),r=(0,g.useMemo)(()=>(0,zt.debounce)(a,3e3),[a]),i=(0,g.useCallback)(()=>{var e;return null==n||!n.displaySettings||!(null==n||null===(e=n.displaySettings)||void 0===e||!e.showFormulation)},[n]);return(0,Ze.jsxs)($gn,{children:[i()&&(0,Ze.jsx)(Lgn,{source:n.formulation}),(0,Ze.jsx)(ze.j4,{fullWidth:!0,name:n.id,id:n.id,placeholder:n.shortFormulation||n.formulation||"Enter your value",label:n.shortFormulation||n.formulation,sourceContent:n.reportedText||"",onMarkdownChange:r})]})}function qgn(e){let{question:n,onAnswer:t}=e;switch(n.__typename){case"ChoiceQuestion":return(0,Ze.jsx)(cgn,{question:n,onAnswer:t});case"MultipleChoiceQuestion":return(0,Ze.jsx)(mgn,{question:n,onAnswer:t});case"OpenEndedQuestion":return(0,Ze.jsx)(Ugn,{question:n,onAnswer:t});case"OpenEndedRichQuestion":return(0,Ze.jsx)(Wgn,{question:n,onAnswer:t});default:return null}}var Jgn=t(49423),Ygn=t(72445),Hgn=t(1749);function Kgn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Qgn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Kgn(Object(t),!0).forEach(function(n){Zgn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Kgn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Zgn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Xgn(e){let{question:n,onAnswer:t}=e;const a=(0,g.useCallback)(e=>{t(Qgn(Qgn({},n),{},{reportedDate:(null==e?void 0:e.toISOString())||null}))},[n,t]);return(0,Ze.jsx)(Ygn.A,{dateAdapter:Jgn.A,children:(0,Ze.jsx)(Hgn.A,{label:n.formulation,value:n.reportedDate?Wt()(n.reportedDate):null,onChange:a,renderInput:e=>(0,Ze.jsx)(ze.PU,Qgn(Qgn({},e),{},{label:n.formulation,placeholder:n.shortFormulation||n.formulation}))})})}function ebn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function nbn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ebn(Object(t),!0).forEach(function(n){tbn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ebn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function tbn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function abn(e,n){return e.map(e=>n.id===e.id?n:"QuestionSequence"===e.__typename?nbn(nbn({},e),{},{questions:abn(e.questions,n)}):e)}function rbn(e){let n,t;switch(e.__typename){case"YesNoQuestion":n="yesNo",t="reportedAnswer";break;case"ChoiceQuestion":n="choice",t="reportedChoice";break;case"MultipleChoiceQuestion":n="multipleChoice",t="reportedChoices";break;case"DateQuestion":n="date",t="reportedDate";break;case"FloatQuestion":n="float",t="reportedFloat";break;case"IntegerQuestion":n="int",t="reportedInt";break;case"OpenEndedQuestion":n="openEnded",t="reportedText";break;case"OpenEndedRichQuestion":n="openEndedRich",t="reportedText";break;case"BreakdownQuestion":n="breakdown",t="reportedBreakdown";break;case"QuestionSequenceRepeatable":n="sequenceRepeatable",t="reportedRows";break;default:throw new Error("".concat(e.__typename," is invalid __typename "))}return[n,t,Gt().get(e,t)]}function ibn(e){const[n,,t]=rbn(e);return{[n]:[{questionId:e.id,answer:t}]}}function obn(e){return{figures:e.questions.filter(e=>["IntegerQuestion","FloatQuestion"].includes(e.__typename)),partition:e.questions.filter(e=>["ChoiceQuestion","MultipleChoiceQuestion","OpenEndedQuestion"].includes(e.__typename))}}function lbn(e){const{figures:n,partition:t}=obn(e);return{figures:Array(n.length).fill(null),partition:Array(t.length).fill(null)}}function sbn(e,n){if(!e)return n;const t=Gt().keyBy(e.answers,"questionId");return n.map(e=>{var n;const[,a]=rbn(e),r=null!==(n=t[e.id])&&void 0!==n&&n.answer?JSON.parse(t[e.id].answer):null;return nbn(nbn({},e),{},{[a]:r})})}function cbn(e){return e.tableOfContentsNumber?"**".concat(e.tableOfContentsNumber," ").concat(e.formulation,"**"):e.formulation}function dbn(e,n,t){return"".concat(e.shortCode," ").concat(n.tableOfContentsNumber||(null==t?void 0:t.tableOfContentsNumber))}function ubn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pbn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ubn(Object(t),!0).forEach(function(n){mbn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ubn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mbn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function fbn(e){const{question:n,breakdown:t,draft:a}=e,r=(0,g.useCallback)(()=>{a||e.onDelete(e.breakdown.id)},[e,a]),i=(0,g.useCallback)((e,n)=>"id"in n?"".concat(n.id,"__").concat(e.id,"}"):"DraftQuestionCol__".concat(e.id),[]),o=12/n.questions.length,{figures:l,partition:s}=obn(n);return(0,Ze.jsxs)(Pgn,{wrap:"no",container:!0,item:!0,children:[l.map((n,a)=>(0,Ze.jsx)(Rgn,{span:o,container:!0,item:!0,children:(0,Ze.jsx)(Dgn,{answerOnBlur:!0,question:pbn(pbn({},n),{},{["FloatQuestion"===n.__typename?"reportedFloat":"reportedInt"]:e.breakdown.figures[a]}),onAnswer:n=>{const t="FloatQuestion"===n.__typename?n.reportedFloat:n.reportedInt,r=yL()(["figures",a],t,e.breakdown);e.onChange(r)}})},i(n,t))),s.map((n,a)=>(0,Ze.jsx)(Rgn,{span:o,container:!0,item:!0,children:(0,Ze.jsx)(qgn,{question:pbn(pbn({},n),{},{[rbn(n)[1]]:e.breakdown.partition[a]}),onAnswer:n=>{let t=null;"ChoiceQuestion"===n.__typename&&(t=n.reportedChoice),"MultipleChoiceQuestion"===n.__typename&&(t=n.reportedChoices),"OpenEndedQuestion"===n.__typename&&(t=n.reportedText);const r=yL()(["partition",a],t,e.breakdown);e.onChange(r)}})},i(n,t))),!e.draft&&(0,Ze.jsx)(Egn,{onClick:r})]})}function ybn(e){let{question:n,onAnswer:t}=e;const a=(0,g.useMemo)(()=>n.reportedBreakdown||[],[n]),[r,i]=(0,g.useState)(lbn(n)),o=(0,g.useCallback)(e=>{if(e.figures.every(e=>null!==e)&&e.partition.every(e=>null!==e)){const r=pbn(pbn({},e),{},{id:(0,Ai.A)()});i(lbn(n)),t(pbn(pbn({},n),{},{reportedBreakdown:[r].concat(a)}))}else i(e)},[i,n,t,a]),l=(0,g.useCallback)(e=>{t(pbn(pbn({},n),{},{reportedBreakdown:a.map(n=>n.id===e.id?e:n)}))},[n,t,a]),s=(0,g.useCallback)(e=>{t(pbn(pbn({},n),{},{reportedBreakdown:(n.reportedBreakdown||[]).filter(n=>n.id!==e)}))},[n,t]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(fbn,{draft:!0,question:n,breakdown:r,onChange:o}),a.map(e=>(0,Ze.jsx)(fbn,{draft:!1,breakdown:e,question:n,onChange:l,onDelete:s},e.id))]})}const gbn=(e,n)=>{var t;if(null!==(t=e.displaySettings)&&void 0!==t&&t.colSpan)return e.displaySettings.colSpan;{const t=n.some(e=>e.formulation.length>=75);return 1===n.length||"OpenEndedRichQuestion"===e.__typename||t?12:6}};function bbn(e){let{framework:n,question:t,questions:a,onAnswer:r}=e;return(0,Ze.jsx)(Pgn,{wrap:"wrap",container:!0,item:!0,children:a.map(e=>(0,Ze.jsx)(Rgn,{span:gbn(e,a),container:!0,item:!0,children:(0,Ze.jsx)(Xbn,{framework:n,question:e,onAnswer:r,parent:t})},e.id))})}var hbn,vbn,xbn;function Tbn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Obn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tbn(Object(t),!0).forEach(function(n){kbn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tbn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function kbn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function jbn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Cbn=(0,Ge.default)(ze.hh)(hbn||(hbn=jbn(["\n  padding: ",";\n"])),e=>e.theme.geometry.sm.spacing),Sbn=(0,Ge.default)(ze.DZ)(vbn||(vbn=jbn(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Nbn=Ge.default.ul(xbn||(xbn=jbn(["\n  list-style-type: disc;\n  list-style-position: inside;\n"])));function wbn(e){var n;let{framework:t,question:a,onAnswer:r}=e;const[i,o]=(0,g.useState)(!1),[l,s]=(0,g.useState)(a.questions),[c,d]=(0,g.useState)(null),u=(0,g.useCallback)(()=>{o(!0)},[]),p=(0,g.useCallback)(e=>{i&&s(n=>n.map(n=>n.id===e.id?e:n)),c&&d(n=>{if(n){const t=Obn(Obn({},n),{},{answers:n.answers.map(n=>n.questionId===e.id?Obn(Obn({},n),{},{answer:JSON.stringify(rbn(e)[2])}):n)});return r(Obn(Obn({},a),{},{reportedRows:a.reportedRows.map(e=>e.id===t.id?t:e)})),t}return n})},[s,c,i,a,r]),m=(0,g.useCallback)(()=>{i&&(o(!1),s(a.questions)),c&&d(null)},[i,s,a,c]),f=(0,g.useCallback)(()=>{const e=a.reportedRows||[];r(Obn(Obn({},a),{},{reportedRows:e.concat({id:(0,Ai.A)(),answers:l.map(e=>({questionId:e.id,answer:JSON.stringify(rbn(e)[2])}))})})),m()},[r,a,l,m]),y=(0,g.useCallback)(()=>{if(!c)return;const e=a.reportedRows||[];r(Obn(Obn({},a),{},{reportedRows:e.filter(e=>e.id!==c.id)})),m()},[c,r,a,m]);return(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(ze.Yq,{onClick:u,children:"Add new row"}),!(null===(n=a.reportedRows)||void 0===n||!n.length)&&(0,Ze.jsx)(Nbn,{children:a.reportedRows.map((e,n)=>(0,Ze.jsx)("li",{onClick:()=>d(e),children:(0,Ze.jsxs)(ze.Yq,{inline:!0,children:["Row ",n+1]})},e.id))}),(0,Ze.jsx)(ze.aF,{size:"lg",onDismiss:m,show:i||c,children:(0,Ze.jsxs)(Cbn,{container:!0,item:!0,children:[(0,Ze.jsx)(Sbn,{align:"center",item:!0,children:a.formulation}),(0,Ze.jsx)(bbn,{question:a,framework:t,questions:i?l:sbn(c,a.questions),onAnswer:p}),(0,Ze.jsx)(ze.hh.Row,{children:i?(0,Ze.jsx)(ze.hh.ButtonColumn,{type:"button",color:"success",onClick:f,children:"Save"}):(0,Ze.jsx)(ze.hh.ButtonColumn,{type:"button",color:"danger",onClick:y,children:"Delete"})})]})})]})}var Dbn;const Abn=(0,D.J1)(Dbn||(Dbn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  mutation CreateDocumentRecord($input: CreateDocumentRecordInput!) {\n    createDocumentRecord(input: $input) {\n      ...DocumentFields\n    }\n  }\n  ","\n"])),L5);function Rbn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Pbn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Rbn(Object(t),!0).forEach(function(n){Lbn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Rbn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Lbn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ibn(e){let{children:n,onUpload:t,predefinedValues:a}=e;const r=rt(),i=al(),[o]=(0,Ot.n)(Abn),{token:l}=at(),s=(0,g.useCallback)(e=>n(e),[n]),c=(0,g.useCallback)(async e=>{var n;let[s]=e;const c=(0,Ai.A)();await i(r,c,s);const d=await o({variables:{input:Pbn({id:c,accountId:r,fileName:s.name,userId:l.sub,source:Vt.kL.S3,key:v3(r,c)},a)}}),u=null==d||null===(n=d.data)||void 0===n?void 0:n.createDocumentRecord;u&&t&&t(u)},[r,l,i,t,o,a]);return(0,Ze.jsx)(ze.bT,{onChange:c,accept:xr.allowedDocument.mimeType,children:s})}var Ebn,_bn,Fbn,Bbn,Ubn,Mbn,Vbn;function zbn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Gbn=(0,D.Ay)(Ebn||(Ebn=zbn(["\n  fragment SingleQuestionFields on ReportingQuestion {\n    id\n    formulation\n    shortFormulation\n    reportingFrameworkId\n    reportingFrameworkChapterId\n    materialityMetricId\n    parentId\n    displaySettings {\n      colSpan\n      showFormulation\n    }\n    order\n    tableOfContentsNumber\n    ... on ChoiceQuestion {\n      variants\n      canSpecifyOwnChoice\n      reportedChoice\n    }\n    ... on MultipleChoiceQuestion {\n      variants\n      canSpecifyOwnChoice\n      reportedChoices\n    }\n    ... on YesNoQuestion {\n      reportedAnswer\n    }\n    ... on OpenEndedQuestion {\n      reportedText\n    }\n    ... on OpenEndedRichQuestion {\n      reportedText\n    }\n    ... on IntegerQuestion {\n      reportedInt\n    }\n    ... on FloatQuestion {\n      reportedFloat\n    }\n    ... on DateQuestion {\n      reportedDate\n    }\n  }\n"]))),$bn=(0,D.Ay)(_bn||(_bn=zbn(["\n  fragment ReportingQuestionFields on ReportingQuestion {\n    ...SingleQuestionFields\n    ... on QuestionSequence {\n      questions {\n        ...SingleQuestionFields\n        ... on QuestionSequence {\n          questions {\n            ...SingleQuestionFields\n          }\n        }\n      }\n    }\n    ... on QuestionSequenceRepeatable {\n      questions {\n        ...SingleQuestionFields\n        ... on QuestionSequence {\n          questions {\n            ...SingleQuestionFields\n          }\n        }\n      }\n      reportedRows {\n        id\n        answers {\n          questionId\n          answer\n        }\n      }\n    }\n    ... on BreakdownQuestion {\n      questions {\n        ...SingleQuestionFields\n      }\n      reportedBreakdown {\n        id\n        figures\n        partition\n      }\n    }\n  }\n  ","\n"])),Gbn),Wbn=(0,D.Ay)(Fbn||(Fbn=zbn(["\n  query GetReportingFrameworkQuestions($accountId: ID!, $frameworkId: ID!, $chapterId: ID) {\n    getReportingQuestions(accountId: $accountId, frameworkId: $frameworkId, chapterId: $chapterId) {\n      ...ReportingQuestionFields\n    }\n  }\n  ","\n"])),$bn),qbn=(0,D.Ay)(Bbn||(Bbn=zbn(["\n  mutation AnswerReportingQuestions($accountId: ID!, $input: AnswerReportingQuestionInput!) {\n    answerReportingQuestions(accountId: $accountId, input: $input) {\n      ...ReportingQuestionFields\n    }\n  }\n  ","\n"])),$bn),Jbn=(0,D.Ay)(Ubn||(Ubn=zbn(["\n  query GetReportProgressChapterBreakdown($accountId: ID!, $frameworkId: ID!) {\n    getReportProgressChapterBreakdown(accountId: $accountId, frameworkId: $frameworkId) {\n      totalProgress\n      subProgressBreakdown {\n        id\n        name\n        progress\n      }\n    }\n  }\n"]))),Ybn=(0,D.Ay)(Mbn||(Mbn=zbn(["\n  query GetReportProgressGroupBreakdown($accountId: ID!, $frameworkId: ID!, $groupId: ID) {\n    getReportProgressGroupBreakdown(accountId: $accountId, frameworkId: $frameworkId, groupId: $groupId ) {\n      totalProgress\n      subProgressBreakdown {\n        id\n        name\n        progress\n      }\n    }\n  }\n"]))),Hbn=(0,D.Ay)(Vbn||(Vbn=zbn(["\n  mutation attachDocument($id: ID!, $accountId: ID!, $systemId: ID!, $linkId: ID!) {\n    attachDocumentToManagementSystem(input: { id: $systemId, accountId: $accountId, linkId: $linkId, documentId: $id })\n  }\n"])));var Kbn;const Qbn=(0,Ge.default)(ze.Yq)(Kbn||(Kbn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  height: 100%;\n"])));function Zbn(e){let{question:n,framework:t,parent:a}=e;const{showNotification:r}=vt(),[i]=(0,Ot.n)(Hbn,{onCompleted:()=>{r("Document has been uploaded!")}}),o=rt(),l=(0,g.useCallback)(e=>{i({variables:{accountId:o,id:e.id,systemId:n.reportingFrameworkId,linkId:n.reportingFrameworkChapterId}})},[i,o,n]);return(0,Ze.jsx)(Ibn,{onUpload:l,predefinedValues:{category:"Reporting Frameworks",library:Vt.zM.Governance,managementSystemChapterId:n.reportingFrameworkChapterId,managementSystemCode:dbn(t,n,a),managementSystemId:t.id},children:e=>(0,Ze.jsx)(Qbn,{onClick:e,children:n.formulation})})}function Xbn(e){let{framework:n,question:t,onAnswer:a,parent:r}=e;switch(t.__typename){case"YesNoQuestion":return(0,Ze.jsx)(Cgn,{question:t,onAnswer:a});case"OpenEndedQuestion":case"OpenEndedRichQuestion":case"MultipleChoiceQuestion":case"ChoiceQuestion":return(0,Ze.jsx)(qgn,{question:t,onAnswer:a});case"IntegerQuestion":case"FloatQuestion":return(0,Ze.jsx)(Dgn,{question:t,onAnswer:a});case"DateQuestion":return(0,Ze.jsx)(Xgn,{question:t,onAnswer:a});case"BreakdownQuestion":return(0,Ze.jsx)(ybn,{question:t,onAnswer:a});case"QuestionSequence":return(0,Ze.jsx)(bbn,{question:t,framework:n,questions:t.questions,onAnswer:a});case"QuestionSequenceRepeatable":return(0,Ze.jsx)(wbn,{framework:n,question:t,onAnswer:a});case"AttachmentQuestion":return(0,Ze.jsx)(Zbn,{parent:r,framework:n,question:t,onAnswer:a});default:return null}}var ehn;const nhn=(0,Ge.default)(ze.hh)(ehn||(ehn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  & .MuiInputLabel-root {\n    z-index: 0; /* Fix of labels overlapping the modal window */\n  }\n"])));function thn(e){let{framework:n,questions:t,onAnswer:a}=e;return(0,Ze.jsx)(nhn,{container:!0,children:t.map(e=>(0,Ze.jsxs)(g.Fragment,{children:[(0,Ze.jsx)(Lgn,{source:cbn(e)}),["BreakdownQuestion","QuestionSequence"].includes(e.__typename)?(0,Ze.jsx)(Xbn,{framework:n,question:e,onAnswer:a}):(0,Ze.jsx)(Pgn,{container:!0,item:!0,children:(0,Ze.jsx)(Xbn,{framework:n,question:e,onAnswer:a})})]},e.id))})}function ahn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function rhn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ahn(Object(t),!0).forEach(function(n){ihn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ahn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ihn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ohn(){const e=function(){const e=(0,N.m)(),n=rt();return(0,g.useCallback)((t,a)=>e.readQuery({query:Wbn,variables:{accountId:n,frameworkId:t,chapterId:a}}),[e,n])}(),n=function(){const e=(0,N.m)(),n=rt();return(0,g.useCallback)((t,a,r)=>e.writeQuery({query:Wbn,data:{getReportingQuestions:t},variables:{accountId:n,frameworkId:a,chapterId:r}}),[e,n])}();return(0,g.useCallback)((t,a,r)=>{const i=e(a,r);if(null!=i&&i.getReportingQuestions){const e=abn(i.getReportingQuestions,t);n(e,a,r)}},[e,n])}const lhn=["data"];function shn(e,n){const t=function(e){const n=rt(),{showNotification:t}=vt();return(0,h.IT)(Wbn,rhn(rhn({},void 0),{},{variables:{accountId:n,frameworkId:e.frameworkId,chapterId:e.chapterId},onError:e=>{t("Couldn't load reporting framework: ".concat(e),"danger")}}))}({frameworkId:e,chapterId:n}),{data:a}=t,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(t,lhn),i=function(){const[e]=function(){const{showNotification:e}=vt();return(0,Ot.n)(qbn,{onError:n=>{e("Couldn't update the answer: ".concat(n),"danger")}})}(),n=rt(),t=ohn();return(0,g.useCallback)(a=>{t(a,a.reportingFrameworkId,a.reportingFrameworkChapterId),e({variables:{accountId:n,input:ibn(a)}})},[e,n,t])}();return[(null==a?void 0:a.getReportingQuestions)||[],i,r]}function chn(e){let{framework:n,page:t,buttons:a,title:r,synopsis:i,content:o,documents:l}=e;const[s,c,{loading:d}]=shn(n.id,t.id),u=(0,g.useMemo)(()=>({buttons:a,title:r||t.tocTitle}),[r,t.tocTitle,a]),p=(0,g.useMemo)(()=>({mode:"markdown",content:t.synopsis,editable:!1}),[t.synopsis]),m=(0,g.useMemo)(()=>({loading:d,render:()=>(0,Ze.jsx)(thn,{framework:n,questions:s,onAnswer:c})}),[s,c,d,n]),f=(0,g.useMemo)(()=>({records:t.documents||[],readonly:!1}),[t.documents]);return(0,Ze.jsx)(rgn,{header:u,synopsis:i||p,content:o||m,documents:l||f,managementSystem:n,page:t})}var dhn,uhn;function phn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const mhn=Ge.default.div(dhn||(dhn=phn(["\n  height: 20px;\n  width: 80%;\n  background-color: #e0e0de;\n  border-radius: 50px;\n  margin: 10px;\n"]))),fhn=Ge.default.div(uhn||(uhn=phn(["\n  position: relative;\n  height: 100%;\n  width: ","%;\n  background-color: ",";\n  border-radius: inherit;\n  text-align: right;\n  > label {\n    margin-left: 10px;\n  }\n"])),e=>e.completed||0,e=>{let{theme:n}=e;return n.colors.success.normal.background}),yhn=e=>{let{completed:n=0}=e;return(0,Ze.jsx)(mhn,{children:(0,Ze.jsx)(fhn,{completed:n,children:(0,Ze.jsx)(ze.JU,{color:"dark",children:"".concat(n||0,"%")})})})},ghn=e=>{let{name:n,completed:t,link:a}=e;return(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,children:[(0,Ze.jsx)(ze.fv,{container:!0,item:!0,span:6,vdistribution:"center",distribution:"start",children:a?(0,Ze.jsx)(ze.Yq,{component:"routerLink",to:a,children:n}):(0,Ze.jsx)("span",{children:n})}),(0,Ze.jsx)(ze.fv,{item:!0,span:6,vdistribution:"center",children:(0,Ze.jsx)(yhn,{completed:t})})]})};function bhn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function hhn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?bhn(Object(t),!0).forEach(function(n){vhn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bhn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function vhn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function xhn(e,n){const t=rt(),{showNotification:a}=vt();return(0,h.IT)(Jbn,hhn(hhn({},n),{},{variables:{accountId:t,frameworkId:e},fetchPolicy:"network-only",onError:e=>{a("Couldn't load report progress: ".concat(e),"danger")}}))}function Thn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ohn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Thn(Object(t),!0).forEach(function(n){khn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Thn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function khn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var jhn,Chn;function Shn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Nhn=(0,Ge.default)(ze.fI)(jhn||(jhn=Shn(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),whn=(0,Ge.default)(ze.DZ)(Chn||(Chn=Shn(["\n  margin-top: 20px;\n"])));function Dhn(e){let{reportProgress:n,deadline:t,withHyperlinks:a,managementSystem:r}=e;const i=Wt()().startOf("day"),o=t?Wt()(t):null,l=o?Wt().duration(o.diff(i)).asDays():null;return(0,Ze.jsxs)(ze.fv,{container:!0,children:[n.subProgressBreakdown.map(e=>(0,Ze.jsx)(ghn,{completed:e.progress,name:e.name,link:a?"".concat(si(r.type),"/").concat(r.id,"/").concat(e.id):"/"},"ProgressChartRow__".concat(e.id))),o&&(0,Ze.jsxs)(Nhn,{children:["Deadline for completion: ",o.format("LL")," (",o.isBefore(i)?"Days until deadline":"Days since overdue"," - ",l,")"]})]})}function Ahn(e){let{managementSystem:n}=e;const{data:t,loading:a}=xhn(n.id),r=(0,g.useMemo)(()=>function(e,n){if(!e)return null;const{tree:t}=oi(n),a=Gt().keyBy(e.subProgressBreakdown,"id"),r=Gt()(t).filter(e=>!!a[e.id]).map(e=>({id:e.id,name:Gt().get(t,[e.id,"tocTitle"]),progress:Gt().round(Gt().get(a,[e.id,"progress"],0),0)})).value();return nbn(nbn({},e),{},{subProgressBreakdown:r})}(null==t?void 0:t.getReportProgressChapterBreakdown,n),[n,null==t?void 0:t.getReportProgressChapterBreakdown]);return a||!r?(0,Ze.jsx)(Ze.Fragment,{children:"Loading..."}):(0,Ze.jsx)(Dhn,{reportProgress:r,managementSystem:n,withHyperlinks:!0})}function Rhn(e){let{managementSystem:n,page:t,progressMainPage:a}=e;const{data:r,loading:i}=function(e,n){const t=rt(),{showNotification:a}=vt();return(0,h.IT)(Ybn,Ohn(Ohn({},void 0),{},{variables:{accountId:t,frameworkId:e,groupId:n},fetchPolicy:"network-only",onError:e=>{a("Couldn't load report progress: ".concat(e),"danger")}}))}(n.id,(null==t?void 0:t.id)===a?null:null==t?void 0:t.id),o=(0,g.useMemo)(()=>{const e=function(e,n){if(!e)return null;const{tree:t}=oi(n),a=Gt().keyBy(e.subProgressBreakdown,"id"),r=n.chapters.map(e=>e.id),i=Gt().orderBy([...e.subProgressBreakdown.reduce((e,n)=>{const i=r.includes(t[n.id].parent.id)?null:t[n.id].parent.id,o=r.includes(t[n.id].parent.id)?null:t[n.id].parent.title,l=r.includes(t[n.id].parent.id)?0:t[n.id].parent.index,s=e.get(i);return s?s.subProgressBreakdown.push({id:n.id,name:Gt().get(t,[n.id,"tocTitle"]),progress:Gt().round(Gt().get(a,[n.id,"progress"],0)),index:Gt().get(t,[n.id,"index"])}):e.set(i,{id:i,title:o,index:l,subProgressBreakdown:[{id:n.id,name:Gt().get(t,[n.id,"tocTitle"]),progress:Gt().round(Gt().get(a,[n.id,"progress"],0)),index:Gt().get(t,[n.id,"index"])}]}),e},new Map).values()].map(e=>{let{id:n,title:t,index:a,subProgressBreakdown:r}=e;return{id:n,title:t,index:a,progressBreakdown:{subProgressBreakdown:Gt().orderBy(r,["index"],["asc"]),totalProgress:Gt().round(Gt().meanBy(r,e=>e.progress),0)}}}),["index"],["asc"]);return i}(null==r?void 0:r.getReportProgressGroupBreakdown,n);return(0,Ze.jsx)(Ze.Fragment,{children:null==e?void 0:e.map((e,t)=>(0,Ze.jsxs)("div",{children:[e.title&&(0,Ze.jsx)(whn,{size:"lg",children:e.title}),(0,Ze.jsx)(Dhn,{reportProgress:e.progressBreakdown,managementSystem:n,withHyperlinks:!0})]},t))})},[n,null==r?void 0:r.getReportProgressGroupBreakdown]);return i||!o?(0,Ze.jsx)(Ze.Fragment,{children:"Loading..."}):o}var Phn,Lhn,Ihn,Ehn;function _hn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Fhn=Ge.default.div(Phn||(Phn=_hn(["\n  display: flex;\n  justify-content: flex-start;\n  align-items: flex-end;\n  flex-direction: column;\n  width: 100%;\n  height: 100%;\n  flex: 1;\n"]))),Bhn=Ge.default.div(Lhn||(Lhn=_hn(["\n  position: relative;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  width: ","%;\n  height: ",";\n  background-color: ",";\n"])),e=>e.percentage,e=>e.theme.geometry.md.spacing,e=>e.color),Uhn=(0,Ge.default)(fhn)(Ihn||(Ihn=_hn(["\n  position: absolute;\n  z-index: 0;\n"]))),Mhn=Ge.default.span(Ehn||(Ehn=_hn(["\n  z-index: 1;\n"])));function Vhn(e){let{scores:n,currentScore:t}=e;return(0,Ze.jsx)(Fhn,{children:n.map((e,a)=>(0,Ze.jsxs)(Bhn,{percentage:(a+1)*(100/n.length),color:e.color,children:[t&&t.name===e.name&&(0,Ze.jsx)(Uhn,{completed:t.progress}),(0,Ze.jsx)(Mhn,{children:e.name}),(0,Ze.jsx)(Mhn,{children:e.description})]},"ScoreChartRow_".concat(e.name)))})}const zhn=[{level:"Leadership",name:"A",climateChangeMinPercentage:80,climateChangeMaxPercentage:100,color:"#C1D7EC"},{level:"",name:"A-",climateChangeMinPercentage:1,climateChangeMaxPercentage:44,color:"#C1D7EC"},{level:"Management",name:"B",climateChangeMinPercentage:45,climateChangeMaxPercentage:79,color:"#DBDBDB"},{level:"",name:"B-",climateChangeMinPercentage:1,climateChangeMaxPercentage:44,color:"#DBDBDB"},{level:"Awareness",name:"C",climateChangeMinPercentage:45,climateChangeMaxPercentage:79,color:"#CBE0B8"},{level:"",name:"C-",climateChangeMinPercentage:1,climateChangeMaxPercentage:44,color:"#CBE0B8"},{level:"Disclosure",name:"D",climateChangeMinPercentage:45,climateChangeMaxPercentage:79,color:"#F5D7B7"},{level:"",name:"D-",climateChangeMinPercentage:1,climateChangeMaxPercentage:44,color:"#F5D7B7"}];function Ghn(e){let{currentScore:n}=e;return(0,Ze.jsx)(Vhn,{currentScore:n,scores:zhn.map(e=>({name:e.name,description:e.level,color:e.color}))})}function $hn(){const e=(0,g.useMemo)(()=>[{field:"level",headerName:"Level"},{headerName:"Climate change",valueGetter:e=>{let{data:n}=e;return"".concat((t=n).climateChangeMinPercentage,"-").concat(t.climateChangeMaxPercentage,"%");var t}},{field:"name",headerName:"Score band"}],[]);return(0,Ze.jsx)(nD,{rowIdField:"name",suppressRowTransform:!0,onGridReady:e=>{let{api:n}=e;n.sizeColumnsToFit()},getRowStyle:e=>({backgroundColor:e.data.color}),columnDefs:e,rowData:zhn.slice().sort(),domLayout:"autoHeight"})}var Whn,qhn;function Jhn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Yhn=Ge.default.div(Whn||(Whn=Jhn(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing),Hhn=Ge.default.div(qhn||(qhn=Jhn(["\n  display: flex;\n  height: auto;\n"])));function Khn(){return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Yhn,{children:(0,Ze.jsx)(Ghn,{})}),(0,Ze.jsx)(Hhn,{children:(0,Ze.jsx)($hn,{})})]})}function Qhn(e){let{page:n,framework:t}=e;const{showNotification:a}=vt(),r=(0,g.useMemo)(()=>[{title:"Generate report",color:"primary",onClick:()=>{a("Not implemented","warning")}}],[a]),i=(0,g.useMemo)(()=>({mode:"markdown",content:n.synopsis,editable:!1}),[n.synopsis]),o=(0,g.useMemo)(()=>({header:"Scoring scheme and parameters:",render:()=>(0,Ze.jsx)(Khn,{})}),[]);return(0,Ze.jsx)(chn,{framework:t,page:n,buttons:r,synopsis:i,content:o})}function Zhn(e){let{page:n,framework:t}=e;const{data:a}=xhn(t.id),r=(0,g.useMemo)(()=>({mode:"jsx",content:(0,Ze.jsx)(Ahn,{managementSystem:t})}),[t]),i=(0,g.useMemo)(()=>({header:"Scoring progress:",render:()=>(0,Ze.jsx)(Ghn,{currentScore:{name:"D-",progress:(null==a?void 0:a.getReportProgressChapterBreakdown.totalProgress)||0}})}),[null==a?void 0:a.getReportProgressChapterBreakdown]);return(0,Ze.jsx)(chn,{title:"Completion",page:n,framework:t,synopsis:r,content:i})}function Xhn(e){let{page:n,framework:t}=e;const a=(0,m.Zp)(),r=(0,g.useMemo)(()=>[{title:"Learn more",color:"primary",onClick:()=>{a("/engage/course/scorm/eaf6fa55-fce4-4244-b324-ceea22ed5c90")}}],[a]);return(0,Ze.jsx)(chn,{framework:t,page:n,buttons:r})}function evn(e){let{page:n,framework:t}=e;const a=(0,g.useMemo)(()=>[{title:"View guidance",color:"primary",onClick:()=>{window.open("https://www.cdp.net/en/guidance","noopener","noreferrer")}}],[]);return(0,Ze.jsx)(chn,{page:n,framework:t,buttons:a})}function nvn(e){let{page:n,framework:t}=e;const a=(0,g.useMemo)(()=>[{title:"View guidance",color:"primary",onClick:()=>{window.open("https://www.cdp.net/en/guidance","noopener","noreferrer")}}],[]);return(0,Ze.jsx)(chn,{page:n,framework:t,buttons:a})}function tvn(e){let{page:n,framework:t}=e;const{showNotification:a}=vt(),r=(0,g.useMemo)(()=>[{title:"Export disclosure",color:"primary",onClick:()=>{a("Not implemented","warning")}}],[a]);return(0,Ze.jsx)(chn,{framework:t,page:n,buttons:r})}function avn(e){let{page:n,framework:t}=e;const{showNotification:a}=vt(),r=(0,g.useMemo)(()=>[{title:"Export disclosure",color:"primary",onClick:()=>{a("Not implemented","warning")}}],[a]);return(0,Ze.jsx)(chn,{page:n,framework:t,buttons:r})}function rvn(e){let{page:n,framework:t}=e;const a=(0,g.useMemo)(()=>[{title:"View guidance",color:"primary",onClick:()=>{window.open("https://www.cdp.net/en/guidance","noopener","noreferrer")}}],[]);return(0,Ze.jsx)(chn,{framework:t,page:n,buttons:a})}function ivn(e){let{page:n,framework:t}=e;const a=(0,m.Zp)(),{governance:r}=oc(),i=(0,g.useMemo)(()=>[{title:"Export disclosure",color:"primary",onClick:()=>{a(r.root)}}],[a,r.root]);return(0,Ze.jsx)(chn,{page:n,framework:t,buttons:i})}function ovn(e){let{page:n,framework:t}=e;const a=(0,g.useMemo)(()=>{var e,t;return null!=n&&null!==(e=n.content)&&void 0!==e&&e.headerButton?[{title:(null==n||null===(t=n.content)||void 0===t||null===(t=t.headerButton)||void 0===t?void 0:t.text)||"Learn more",color:"primary",onClick:()=>{var e,t;null!=n&&null!==(e=n.content)&&void 0!==e&&null!==(e=e.headerButton)&&void 0!==e&&e.link&&window.open(null==n||null===(t=n.content)||void 0===t||null===(t=t.headerButton)||void 0===t?void 0:t.link)}}]:[]},[n]);return(0,Ze.jsx)(chn,{page:n,framework:t,buttons:a})}let lvn=function(e){return e.SFDR="cacfd19f-3752-4c6a-b08c-543e77e6c32e",e.EBA="28d46d20-1e94-454e-a541-1764a72e5a59",e.ECB="f099d419-b491-42a1-9ffc-fbac1c2c2aae",e}({});function svn(e){let{page:n,framework:t}=e;const a=(0,g.useMemo)(()=>({header:"Progress:",render:()=>(0,Ze.jsx)(Rhn,{managementSystem:t,page:n,progressMainPage:lvn.EBA})}),[t,n]);return(0,Ze.jsx)(chn,{title:"Completion",page:n,framework:t,content:a})}function cvn(e){let{page:n,framework:t}=e;const a=(0,g.useMemo)(()=>{var e,t;return null!=n&&null!==(e=n.content)&&void 0!==e&&e.headerButton?[{title:(null==n||null===(t=n.content)||void 0===t||null===(t=t.headerButton)||void 0===t?void 0:t.text)||"Learn more",color:"primary",onClick:()=>{var e,t;null!=n&&null!==(e=n.content)&&void 0!==e&&null!==(e=e.headerButton)&&void 0!==e&&e.link&&window.open(null==n||null===(t=n.content)||void 0===t||null===(t=t.headerButton)||void 0===t?void 0:t.link)}}]:[]},[n]);return(0,Ze.jsx)(chn,{page:n,framework:t,buttons:a})}function dvn(e){let{page:n,framework:t}=e;const a=(0,g.useMemo)(()=>({header:"Progress:",render:()=>(0,Ze.jsx)(Rhn,{managementSystem:t,page:n,progressMainPage:lvn.ECB})}),[t,n]);return(0,Ze.jsx)(chn,{title:"Completion",page:n,framework:t,content:a})}const uvn=(()=>{const e=[];return[{name:"Business Models and Strategy (Chapter 4)",chapters:[{name:"Business Environment (Expectation 4.1)"},{name:"Business Strategy (Expectation 4.2)"}]},{name:"Governance and Risk Appetite (Chapter 5)",chapters:[{name:"Management Body (Expectation 5.1)"},{name:"Risk Appetite (Expectation 5.2)"},{name:"Organisation Structure (Expectation 5.3)"},{name:"Reporting (Expectation 5.4)"}]},{name:"Risk Management (Chapter 6)",chapters:[{name:"Risk Management Framework (Expectation 6.1)"},{name:"Credit Risk Management (Expectation 6.2)"},{name:"Operational Risk Management (Expectation 6.3)"},{name:"Market Risk Management (Expectation 6.4)"},{name:"Scenario Analysis and Stress Testing (Expectation 6.5)"},{name:"Liquidity Risk Management (Expectation 6.6)"}]},{name:"Disclosures (Chapter 7)",chapters:[{name:"Disclosure Policies and Procedures (Expectation 7.1)"},{name:"Content of Climate-Related and Environmental Risk Disclosures (Expectation 7.2)"}]}].forEach(n=>{var t;null===(t=n.chapters)||void 0===t||t.forEach(t=>{e.push("(^"+(0,zt.escapeRegExp)("ECB.".concat(n.name,".").concat(t.name))+"(\\..+)?$)")})}),e.join("|")})(),pvn=/^ECB\.Progress(.+$|$)/;function mvn(e){let{page:n,framework:t}=e;const a=(0,g.useMemo)(()=>{var e,t;return null!=n&&null!==(e=n.content)&&void 0!==e&&e.headerButton?[{title:null==n||null===(t=n.content)||void 0===t||null===(t=t.headerButton)||void 0===t?void 0:t.text,color:"primary",onClick:()=>{var e,t;null!=n&&null!==(e=n.content)&&void 0!==e&&null!==(e=e.headerButton)&&void 0!==e&&e.link&&window.open(null==n||null===(t=n.content)||void 0===t||null===(t=t.headerButton)||void 0===t?void 0:t.link)}}]:[]},[n]);return(0,Ze.jsx)(chn,{page:n,framework:t,buttons:a})}function fvn(e){let{page:n,framework:t}=e;const a=(0,g.useMemo)(()=>({header:"Progress:",render:()=>(0,Ze.jsx)(Rhn,{managementSystem:t,page:n,progressMainPage:lvn.SFDR})}),[t,n]);return(0,Ze.jsx)(chn,{title:"Completion",page:n,framework:t,content:a})}function yvn(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.parent?yvn(e.parent,[e.title,...n]):n}function gvn(e,n){return[e.shortCode].concat(yvn(n)).join(".")}function bvn(e){var n,t,a,r,i,o,l,s,c;let{managementSystem:d,page:u,canEditContent:p,isReadOnly:m}=e;const f=gvn(d,u);switch(f){case"CDP.Overview":return(0,Ze.jsx)(Qhn,{framework:d,page:u});case"CDP.Overview.Track your progress":return(0,Ze.jsx)(Zhn,{framework:d,page:u});case"CDP.Introduction":return(0,Ze.jsx)(Xhn,{framework:d,page:u});case"CDP.Governance":return(0,Ze.jsx)(evn,{framework:d,page:u});case"CDP.Risks and Opportunities":return(0,Ze.jsx)(nvn,{framework:d,page:u});case"CDP.Risks and Opportunities.Risks":return(0,Ze.jsx)(tvn,{framework:d,page:u});case"CDP.Risks and Opportunities.Opportunities":return(0,Ze.jsx)(avn,{framework:d,page:u});case"CDP.Business Strategy":return(0,Ze.jsx)(rvn,{framework:d,page:u});case"CDP.Targets and Performance":case"CDP.Emissions Methodology":return(0,Ze.jsx)(chn,{framework:d,page:u});case"CDP.Verification":return(0,Ze.jsx)(ivn,{framework:d,page:u});case"CDP.Emissions Data":case"CDP.Emissions Breakdown":return(0,Ze.jsx)(chn,{framework:d,page:u});case null===(n=f.match(/^CDP\.Other land management impacts$/))||void 0===n?void 0:n.input:return(0,Ze.jsx)(ign,{managementSystem:d,page:u,canEditContent:p,isReadOnly:m});case null===(t=f.match(/^CDP\..+$/))||void 0===t?void 0:t.input:return(0,Ze.jsx)(chn,{framework:d,page:u});case null===(a=f.match(/^GRI\.(Content Index|GRI 2|GRI 3|Material Topics)\.(The organization and its reporting practices|Activities and workers|Governance|Strategy, policies and practices|Stakeholder engagement|Material Topics|Management of material topics|3-3 Management of material topics|1 Business model resilience|2 Climate change & GHG emissions|3 Customer privacy & data security|4 Employee diversity & inclusion|5 Employee health & safety|6 Ethical corporate behavior|7 Human rights)$/))||void 0===a?void 0:a.input:return(0,Ze.jsx)(ign,{managementSystem:d,page:u,canEditContent:p,isReadOnly:m});case null===(r=f.match(/^EBA\.(Environmental Risk|Social Risk|Governance Risk)\.(Business Strategy and Processes|Governance|Risk Management)\..+$/))||void 0===r?void 0:r.input:return(0,Ze.jsx)(ovn,{framework:d,page:u});case null===(i=f.match(/^EBA\.Progress(.+$|$)/))||void 0===i?void 0:i.input:return(0,Ze.jsx)(svn,{framework:d,page:u});case null===(o=f.match(uvn))||void 0===o?void 0:o.input:return(0,Ze.jsx)(cvn,{framework:d,page:u});case null===(l=f.match(pvn))||void 0===l?void 0:l.input:return(0,Ze.jsx)(dvn,{framework:d,page:u});case null===(s=f.match(/^SFDR\.(Entity)\..+$/))||void 0===s?void 0:s.input:return(0,Ze.jsx)(mvn,{framework:d,page:u});case null===(c=f.match(/^SFDR\.Performance(.+$|$)/))||void 0===c?void 0:c.input:return(0,Ze.jsx)(fvn,{framework:d,page:u});default:return(0,Ze.jsx)(ign,{managementSystem:d,page:u,canEditContent:p,isReadOnly:m})}}var hvn,vvn,xvn,Tvn,Ovn,kvn,jvn,Cvn;function Svn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Nvn=Ge.default.div(hvn||(hvn=Svn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),wvn=Ge.default.div(vvn||(vvn=Svn(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),Dvn=(0,Ge.default)(ze.GQ)(xvn||(xvn=Svn(["\n  margin-right: ",";\n  display: inline-flex;\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.sm.spacing),Avn=Ge.default.div(Tvn||(Tvn=Svn(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),Rvn=Ge.default.div(Ovn||(Ovn=Svn(["\n  background-color: ",";\n  width: 100%;\n  padding: "," "," 0\n    ",";\n"])),e=>e.theme.colors.basic.white,e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),Pvn=(0,Ge.default)(ze.fI)(kvn||(kvn=Svn(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),Lvn=(0,Ge.default)(ze.fv)(jvn||(jvn=Svn(["\n  max-height: 100vh;\n  overflow: auto;\n"]))),Ivn=Ge.default.div(Cvn||(Cvn=Svn(["\n  display: flex;\n  width: 100%;\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Evn=()=>{var e,n;const{id:t}=(0,m.g)(),{pathname:a}=(0,m.zy)(),r=a.split("/").pop(),i=rt(),o=rc(),l=!o.document.find(e=>e.startsWith("create")),{loading:s,data:c,error:d,refetch:u}=(0,h.IT)(pfn,{variables:{id:t,accountId:i},notifyOnNetworkStatusChange:!1}),p=(0,g.useCallback)(()=>u({id:t,accountId:i}),[t,i,u]),f=(0,zt.cloneDeep)(null==c?void 0:c.getManagementSystemById);if(!f)return null;const{tree:y}=oi(f),b=y[r]||f,v=o.governance.some(e=>e.startsWith("attachContentToManagementSystem")),x=[{title:"Governance",to:".."},...di(f,y,b)],T=y[r]||f,O=(0,Ze.jsx)(bvn,{managementSystem:f,page:T,canEditContent:v,isReadOnly:l,refetch:()=>{u({id:t,accountId:i})}});return(0,Ze.jsxs)(Nvn,{children:[(0,Ze.jsx)(ige,{name:"ManagementSystemOverviewHeader",title:(null==f?void 0:f.title)||"",breadcrumbs:x,icon:"pencil-alt",iconColor:"tertiary"}),s&&(0,Ze.jsx)(wvn,{children:(0,Ze.jsx)(ze.Ip,{})}),"Forbidden"===(null==d||null===(e=d.graphQLErrors)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.message)&&(0,Ze.jsx)(eb,{name:"Forbidden_Management_System",error:d}),d&&"Forbidden"!==(null==d||null===(n=d.graphQLErrors)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.message)&&(0,Ze.jsx)(ub,{name:"LoadFailed_Management_System",error:d,retry:()=>p}),!s&&f&&(0,Ze.jsxs)(Pvn,{container:!0,children:[(0,Ze.jsxs)(Lvn,{span:4,item:!0,children:[(0,Ze.jsx)(Rvn,{children:(0,Ze.jsx)(Ivn,{children:(0,Ze.jsxs)(Avn,{children:[(0,Ze.jsx)(Dvn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"link"}),(0,Ze.jsx)(ze.DZ,{name:"LegislationItem_Docs__Title",inline:!0,children:"REPORTING_FRAMEWORK"===f.type?"Reporting Framework":"Management System Breakdown"})]})})}),(0,Ze.jsx)(xfn,{active:r||(null==f?void 0:f.id),menu:bfn(f,y)})]}),(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"",element:O}),(0,Ze.jsx)(m.qh,{path:":itemId",element:O})]})]})]})},_vn=[{field:"country",headerName:"Country"},{field:"type",headerName:"Property Type"},{field:"assets",headerName:"Assets"},{field:"area",headerName:"Floor Area"},{field:"gav",headerName:"% GAV"}],Fvn=()=>{const[e]=(0,g.useState)([{country:"UK",type:"Office",assets:3,area:"120,000",gav:30},{country:"Italy",type:"Retail",assets:6,area:"400,000",gav:40},{country:"USA",type:"Office",assets:2,area:"50,000",gav:25},{country:"France",type:"Hotel",assets:1,area:"100,000",gav:70},{country:"China",type:"Education",assets:1,area:"75,000",gav:30},{country:"Australia",type:"Healthcare",assets:1,area:"12,000",gav:5}]);return(0,Ze.jsx)("div",{className:"ag-theme-alpine",style:{height:400,width:700},children:(0,Ze.jsx)(Vw.W6,{onGridReady:function(e){e.api.sizeColumnsToFit()},rowData:e,columnDefs:_vn})})};var Bvn,Uvn,Mvn,Vvn,zvn;function Gvn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $vn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gvn(Object(t),!0).forEach(function(n){Wvn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gvn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Wvn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function qvn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Jvn=Ge.default.div(Bvn||(Bvn=qvn(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),Yvn=(0,Ge.default)(ze.fv)(Uvn||(Uvn=qvn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Hvn=(0,Ge.default)(ze.JU)(Mvn||(Mvn=qvn(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Kvn=Ge.default.div(Vvn||(Vvn=qvn(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),Qvn=(0,Ge.default)(ze.DZ)(zvn||(zvn=qvn(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Zvn=[{value:"1",label:"Government"},{value:"2",label:"Public (listed) – Property company"},{value:"3",label:"Public (listed) – Real Estate Investment Trust (REIT)"},{value:"4",label:"Private (non-listed)"}],Xvn=[{value:"1",label:"Core"},{value:"2",label:"Value Added"},{value:"3",label:"Opportunistic"},{value:"4",label:"Debt"}],exn=[{value:"1",label:"Open End"},{value:"2",label:"Closed End"}],nxn=[{value:"1",label:"Club Deal"},{value:"2",label:"Direct Investment"},{value:"3",label:"Fund"},{value:"4",label:"Joint Venture"},{value:"5",label:"Separate Account"},{value:"6",label:"Special Purpose Vehicle"}],txn=[{value:"1",label:"2020"},{value:"2",label:"2021"}],axn=[{value:"1",label:"Calenadar Year"},{value:"2",label:"Fiscal Year"}],rxn=[{value:"1",label:"January"},{value:"2",label:"February"},{value:"3",label:"March"},{value:"4",label:"April"},{value:"5",label:"May"},{value:"6",label:"June"},{value:"7",label:"July"},{value:"8",label:"August"},{value:"9",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}],ixn=[{value:"1",label:"GBP"},{value:"2",label:"USD"},{value:"3",label:"AED"},{value:"4",label:"EUR"}],oxn=[{value:"1",label:"Square Feet"},{value:"2",label:"Square Meters"}],lxn=[{value:"1",label:"United Kingdom"},{value:"2",label:"United States"},{value:"3",label:"Germany"},{value:"4",label:"France"},{value:"5",label:"China"}],sxn=[{value:"1",label:"Retail"},{value:"2",label:"Office"},{value:"3",label:"Industrial"},{value:"4",label:"Residential"},{value:"5",label:"Hotel"},{value:"6",label:"Lodging"},{value:"7",label:"Education"},{value:"8",label:"Technology/Science"},{value:"9",label:"Healthcare"},{value:"10",label:"Mixed Use"},{value:"11",label:"Diversified"},{value:"12",label:"Other"}],cxn=[{value:"1",label:"Management of standing investments only"},{value:"2",label:"Management of standing investments and development of new construction and major renovation projects"},{value:"3",label:"Development of new construction and major renovation projects"}],dxn=e=>{const[n,t]=(0,g.useState)({}),a=e=>{const a=e.target.value||e.target.select;t($vn($vn({},n),{},{[e.target.name]:a}))};return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,dismissable:!0,name:"GRESBContainer__Modal",onDismiss:e.onDismiss,children:(0,Ze.jsxs)(Jvn,{name:"Characteristics-modal",children:[(0,Ze.jsx)(Qvn,{name:"heading",size:"lg",children:"Characteristics"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Entity Name"})}),(0,Ze.jsx)(ze.ks,{onChange:a,value:n.entityName||"",name:"entityName",box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Nature of Ownership"})}),(0,Ze.jsx)(ze.l6,{name:"ownership",onChange:a,value:n.ownership||null,options:Zvn})]})}),"4"===n.ownership&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Investment Style"})}),(0,Ze.jsx)(ze.l6,{name:"investmentStyle",onChange:a,value:n.investmentStyle||null,options:Xvn})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Open / Closed End"})}),(0,Ze.jsx)(ze.l6,{name:"end",onChange:a,value:n.end||null,options:exn})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Investment Vehicle"})}),(0,Ze.jsx)(ze.l6,{name:"vehicle",onChange:a,value:n.vehicle||null,options:nxn})]})})]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Entity Commencement Date"})}),(0,Ze.jsx)(ze.l6,{name:"commencement",onChange:a,value:n.commencement||null,options:txn})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Reporting Period"})}),(0,Ze.jsx)(ze.l6,{name:"reporting",onChange:a,value:n.reporting||null,options:axn})]})}),"2"===n.reporting&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Starting Month"})}),(0,Ze.jsx)(ze.l6,{name:"starting",onChange:a,value:n.starting||null,options:rxn})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Reporting Currency"})}),(0,Ze.jsx)(ze.l6,{name:"currency",onChange:a,value:n.currency||null,options:ixn})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Gross Asset Value in millions (At end of period)"})}),(0,Ze.jsx)(ze.ks,{onChange:a,value:n.value||"",name:"value",box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Floor Area Unit"})}),(0,Ze.jsx)(ze.l6,{name:"area",onChange:a,value:n.area||null,options:oxn})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Portfolio Location"})}),(0,Ze.jsx)(ze.l6,{name:"location",onChange:a,value:n.location||null,options:lxn})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Predominemnt Proprty Type"})}),(0,Ze.jsx)(ze.l6,{name:"property",onChange:a,value:n.property||null,options:sxn})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Yvn,{item:!0,children:[(0,Ze.jsx)(Kvn,{children:(0,Ze.jsx)(Hvn,{children:"Entity's Core Business"})}),(0,Ze.jsx)(ze.l6,{name:"business",onChange:a,value:n.business||null,options:cxn})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(Yvn,{item:!0,container:!0,children:(0,Ze.jsx)(ze.$n,{color:"success",children:"Save"})})})]})})};var uxn,pxn,mxn,fxn,yxn,gxn,bxn,hxn,vxn,xxn,Txn;function Oxn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const kxn=(0,Ge.default)(ze.fv)(uxn||(uxn=Oxn(["\n  flex: 1;\n  padding-left: ",";\n"])),e=>e.theme.geometry.md.spacing),jxn=(0,Ge.default)(ze.fv)(pxn||(pxn=Oxn(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n"]))),Cxn=Ge.default.div(mxn||(mxn=Oxn(["\n  padding: ",";\n"])),e=>e.theme.geometry.sm.spacing),Sxn=(0,Ge.default)(ze.GQ)(fxn||(fxn=Oxn(["\n  margin-right: ",";\n  display: inline-flex;\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.sm.spacing),Nxn=(0,Ge.default)(ze.fI)(yxn||(yxn=Oxn(["\n  display: flex;\n  align-items: center;\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),wxn=(0,Ge.default)(ze.DZ)(gxn||(gxn=Oxn(["\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Dxn=(0,Ge.default)(ze.fv)(bxn||(bxn=Oxn(["\n  flex-grow: 0;\n  background-color: ",";\n  margin-bottom: 0 ",";\n  padding: ",";\n  margin-bottom: ",";\n"])),e=>e.theme.colors.basic.white,e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.md.spacing),Axn=(0,Ge.default)(ze.fI)(hxn||(hxn=Oxn(["\n  display: flex;\n  align-items: start;\n  justify-content: space-between;\n"]))),Rxn=Ge.default.div(vxn||(vxn=Oxn(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  background-color: ",";\n  padding: ",";\n  width: 100%;\n"])),e=>e.theme.colors.basic.white,e=>e.theme.geometry.sm.spacing),Pxn=Ge.default.div(xxn||(xxn=Oxn(["\n  display: flex;\n  width: 100%;\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Lxn=Ge.default.div(Txn||(Txn=Oxn(["\n  padding: ",";\n"])),e=>e.theme.geometry.sm.spacing);function Ixn(e){var n,t,a,r,i,o,l,s,c,d;let{managementSystem:u,managementSystemTree:f,canEditContent:y,isReadOnly:b,refetch:h}=e;const{itemId:v}=(0,m.g)(),x=f[v]||u,[T,O]=(0,g.useState)(!1),[k,j]=(0,g.useState)(null),[C,S]=(0,g.useState)(null),[N,{error:w}]=(0,Ot.n)(mfn),[D]=(0,Ot.n)(ffn),A=rt();return(0,Ze.jsxs)(kxn,{container:!0,item:!0,children:[(0,Ze.jsxs)(Dxn,{container:!0,item:!0,children:[(0,Ze.jsx)(Nxn,{item:!0,container:!0,children:(0,Ze.jsxs)(jxn,{span:12,item:!0,children:[(0,Ze.jsxs)(ze.fv,{span:8,item:!0,children:[(0,Ze.jsx)(Sxn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"pencil-alt"}),(0,Ze.jsx)(ze.DZ,{inline:!0,children:x.tocTitle||x.title})]}),(null===(n=x.content)||void 0===n?void 0:n.headerButton)&&(0,Ze.jsxs)(ze.fv,{span:4,item:!0,children:[(null===(t=x.content)||void 0===t?void 0:t.headerButton.link)&&(0,Ze.jsx)(ze.Yq,{target:"__blank",href:null===(a=x.content)||void 0===a?void 0:a.headerButton.link,children:(0,Ze.jsx)(ze.$n,{children:null===(r=x.content)||void 0===r?void 0:r.headerButton.text})}),(null===(i=x.content)||void 0===i?void 0:i.headerButton.modal)&&(0,Ze.jsx)(ze.$n,{onClick:()=>{var e;return S(null===(e=x.content)||void 0===e?void 0:e.headerButton.modal)},children:null===(o=x.content)||void 0===o?void 0:o.headerButton.text})]})]})}),(0,Ze.jsxs)(Cxn,{container:!0,item:!0,children:[(0,Ze.jsx)(wxn,{size:"md",children:"Overview:"}),y?(0,Ze.jsx)(BL,{onSave:e=>(async(e,n,t)=>{D({variables:{accountId:A,id:n,linkId:t,synopsis:gL(e)},update:a=>{const r=a.readQuery({query:pfn,variables:{id:n,accountId:A}});r.getManagementSystemById.id===t?r.getManagementSystemById.synopsis=gL(e):r.getManagementSystemById.chapters.forEach(n=>{n.id===t&&(n.synopsis=gL(e)),n.chapters.forEach(n=>{n.id===t&&(n.synopsis=gL(e))})}),a.writeQuery({data:r,query:pfn})}}).catch(()=>{j({message:"Something went wrong when saving your content. Please try again later.",color:"danger"})})})(e,u.id,x.id),source:x.synopsis||"Add your own content here."}):(0,Ze.jsx)(ze.To,{source:x.synopsis||"Add your own content here."})]})]}),!!C&&(0,Ze.jsx)(dxn,{onDismiss:()=>S(null)}),(null===(l=x.content)||void 0===l?void 0:l.showInvestments)&&(0,Ze.jsxs)(Dxn,{container:!0,item:!0,children:[(0,Ze.jsx)(Nxn,{item:!0,container:!0,children:(0,Ze.jsx)(jxn,{span:12,item:!0,children:(0,Ze.jsxs)(ze.fv,{span:8,item:!0,children:[(0,Ze.jsx)(Sxn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"pencil-alt"}),(0,Ze.jsx)(ze.DZ,{inline:!0,children:"Standing Investments Portfolio"})]})})}),(0,Ze.jsx)(Cxn,{container:!0,item:!0,children:(0,Ze.jsx)(Fvn,{})})]}),(null===(s=x.content)||void 0===s?void 0:s.showAssets)&&(0,Ze.jsx)(Dxn,{container:!0,item:!0,children:(0,Ze.jsx)(Cxn,{container:!0,item:!0,children:["A","B","C","D","E"].map(e=>(0,Ze.jsx)(ySe,{heading:"Asset ".concat(e),hasChildren:!0,children:(0,Ze.jsx)(ze.EY,{children:"Asset Details..."})},e))})}),(null===(c=x.content)||void 0===c?void 0:c.showCompletion)&&(0,Ze.jsxs)(Dxn,{container:!0,item:!0,children:[(0,Ze.jsx)(Nxn,{item:!0,container:!0,children:(0,Ze.jsx)(jxn,{span:12,item:!0,children:(0,Ze.jsxs)(ze.fv,{span:8,item:!0,children:[(0,Ze.jsx)(Sxn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"pencil-alt"}),(0,Ze.jsx)(ze.DZ,{inline:!0,children:"Completion"})]})})}),(0,Ze.jsx)(Cxn,{container:!0,item:!0,children:null===(d=x.chapters)||void 0===d?void 0:d.map(e=>(0,Ze.jsx)(ghn,{completed:e.completion,name:e.title},e.id))})]}),(0,Ze.jsx)(Axn,{container:!0,item:!0,children:(0,Ze.jsxs)(Rxn,{children:[(0,Ze.jsx)(Pxn,{children:(0,Ze.jsxs)(Nxn,{span:12,children:[(0,Ze.jsx)(Sxn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"file-alt"}),(0,Ze.jsx)(ze.DZ,{inline:!0,children:"Evidence Library"})]})}),(0,Ze.jsx)(Pxn,{children:(0,Ze.jsx)(wxn,{size:"md",children:"Upload documents to support this section of the management system."})}),(0,Ze.jsx)(Lxn,{children:(0,Ze.jsxs)(ze.FN,{show:3,scroll:1,width:"675px",infinite:!1,children:[new Array(mi(x.documents)).fill(0).map((e,n)=>(0,Ze.jsx)(wdn,{disabled:b,onClick:()=>O(!0),children:(0,Ze.jsx)(ze.ON,{title:"Upload Evidence"})},"upload-evidence".concat(n))),x.documents.map(e=>(0,Ze.jsx)(p.Link,{target:"_blank",to:"/documents/all/".concat(e.id),children:(0,Ze.jsx)(ze.ON,{title:e.managementSystemCode?e.managementSystemCode.toUpperCase():"".concat(u.shortCode.toUpperCase()," Evidence"),desc:e.fileName,uploaded:!0})},e.id))]})})]})}),T&&(0,Ze.jsx)(Fsn,{predefinedValues:{category:"Management Systems",library:"GOVERNANCE",managementSystemCode:ui(u,x)},onDismiss:()=>{O(!1)},onUpload:async(e,n)=>{await N({variables:{id:n.id,accountId:A,systemId:u.id,linkId:x.id}}),(e=>{j(e?{message:"Something went wrong. Please try again later. ",color:"danger"}:{message:"Document successfully added. Now scanning for viruses.",color:"success"}),h()})(w)}}),k&&(0,Ze.jsx)(ze.Eg,{name:k.message,show:!0,color:k.color,onClose:()=>j(null),children:k.message})]})}const Exn=JSON.parse('{"id":"50f543aa-da72-4090-8f1f-0a1fbd218b0b","title":"GRESB","synopsis":"GRESB assesses and benchmarks the Environmental, Social and Governance (ESG) performance of real assets, providing standardized and validated data to the capital markets. The Assessments are guided by what investors and the industry consider to be material issues in the sustainability performance of real asset investments, and are aligned with international reporting frameworks, such as PRI, SASB, DJSI, TCFD recommendations, the Paris Climate Agreement, UN SDGs, region and country specific disclosure guidelines. Investors use the ESG data and GRESB’s analytical tools to monitor their investments, engage with their managers, and make decisions that lead to a more sustainable and resilient real asset industry.","shortCode":"GRESB","documents":[],"content":{"headerButton":{"text":"Asset Portal","link":"https://portal.gresb.com/user/sign_in"}},"chapters":[{"id":"f5ce1b1a-698b-44c1-8ab5-075e19faf667","title":"Introduction","number":"1","synopsis":"GRESB offers separate benchmarks for standing investments and development projects.\\n\\n**A: Portfolios with only standing investments submit:**\\n\\nManagement and Performance Components to receive a GRESB Standing Investments Benchmark Report including a GRESB Score and a GRESB Rating\\n\\n**B: Portfolios with only development projects submit:**\\n\\nManagement and Development Components to receive a GRESB Development Benchmark Report including a GRESB Score and a GRESB Rating\\n\\n**C: Portfolios with both standing investments and development projects submit:**\\n\\nManagement, Performance and Development Components to receive two Benchmark Reports: Standing Investments Benchmark Report including a GRESB Score and a GRESB Rating; and Development Benchmark Report including a GRESB Score and a GRESB RatingWhile each Component determines an individual score, the GRESB Scores and GRESB Ratings will only apply to entities completing all relevant Components for their portfolios.","documents":[],"chapters":[]},{"id":"6e089da9-0238-431b-85de-5ead1786d348","title":"Characteristics","number":"2","synopsis":"Information provided in the Characteristics section provides the framework for the submission of the GRESB Real Estate Assessment. This section determines the property types included across the Assessment and uses the information for benchmark-based scoring. The profile of the reporting entity is also used for peer group selection, which is based on property type and country/regional allocation, as well as the nature of ownership and management structure. GRESB requires property companies and funds to report on their whole portfolio, including both Landlord Controlled and Tenant Controlled areas but excluding vacant land, cash, ground leases or other non-real estate assets owned by the entity.","documents":[],"content":{"showInvestments":true,"headerButton":{"text":"Edit Response","modal":"characteristics"}},"chapters":[{"id":"db8ee548-6410-4f98-9a43-574d436ce7bd","title":"Asset Characteristics","number":"1","synopsis":"Asset Characteristics covers information intrinsic to the assets in the portfolio. It identifies the participating entity, based on characteristics that remain constant across different reporting periods (year-over-year).","documents":[],"chapters":[],"completion":80,"content":{"showAssets":true,"headerButton":{"text":"Edit Response","modal":"characteristics"}}},{"id":"b57c0076-8872-42b1-928a-e0943606990b","title":"Reporting Characteristics","number":"2","synopsis":"Reporting characteristics defines the reporting scope of the entity for the reporting period and determines the structure of the Assessment submission. Information provided relates to asset attributes that may change over time e.g. vacancy rate.","documents":[],"chapters":[],"completion":35,"content":{"showAssets":true,"headerButton":{"text":"Edit Response","modal":"characteristics"}}}]},{"id":"54a52a51-5af5-4664-9385-9785841810b7","title":"Management","number":"3","synopsis":"The Performance Component measures the entity’s asset portfolio performance, comprising of information collected at the asset and at the portfolio level. It is suitable for any real estate company or fund with operational assets.","documents":[],"content":{"showCompletion":true,"headerButton":{"text":"Guidance","link":"https://documents.gresb.com/generated_files/real_estate/2020/real_estate/reference_guide/complete.html"}},"chapters":[{"id":"197f8243-ad1f-4c09-9da4-46ca7b453a25","title":"Leadership","number":"1","completion":60,"synopsis":"This aspect evaluates how the entity integrates ESG into its overall business strategy. The purpose of this section is to (1) identify public ESG commitments made by the entity, (2) identify who is responsible for managing ESG issues and has decision-making authority; (3) communicate to investors how the entity structures management of ESG issues and (4) determine how ESG is embedded into the entity.","documents":[],"content":{"headerButton":{"text":"Guidance","link":"https://documents.gresb.com/generated_files/real_estate/2020/real_estate/reference_guide/complete.html#management-leadership"}},"chapters":[{"id":"11904f78-ae27-4a9e-a7a0-870325c9bf4b","title":"LE1 ESG Commitments","number":"1","synopsis":"This aspect evaluates public commitment to ESG leadership standards and/or principles.","documents":[]},{"id":"a0794640-d725-4b76-8f2c-9ec55cc7be1f","title":"LE2 ESG Objectives","number":"2","synopsis":"Awaiting description.","documents":[]},{"id":"2585379c-3464-4c4e-a460-f131ea0a5605","title":"LE3 ESG Individual Responsible","number":"3","synopsis":"Awaiting description.","documents":[]},{"id":"7cf06015-09d6-4597-bb16-9cc3f44dab47","title":"LE4 ESG Taskforce / Committee","number":"4","synopsis":"Awaiting description.","documents":[]},{"id":"ea7b0b2a-6b3b-4038-8076-94ebbd66389e","title":"LE5 ESG Senior Decision Maker","number":"5","synopsis":"Awaiting description.","documents":[]},{"id":"dca7ed78-48cf-4301-b11f-a921d61e5efe","title":"LE6 ESG Personnel Targets","number":"6","synopsis":"Awaiting description.","documents":[]}]},{"id":"ac917b27-0b0e-4b2c-a0b0-4ff9f0f169fc","title":"Risk Management","completion":45,"number":"2","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"8bc94101-55e0-49a9-832a-2413c3758219","title":"Policies","completion":25,"number":"3","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"eec3d774-32e9-4377-8283-5e54cbeb99b4","title":"Stakeholder Engagement","completion":90,"number":"4","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"eadaaaec-75cd-48cf-9990-e70d5143c371","title":"Reporting","completion":30,"number":"5","synopsis":"Awaiting description.","documents":[],"chapters":[]}]},{"id":"f1890cb6-fcb3-4121-b58a-58021f9a14bc","title":"Performance","number":"4","synopsis":"The Performance Component measures the entity’s asset portfolio performance, comprising of information collected at the asset and at the portfolio level. It is suitable for any real estate company or fund with operational assets.","documents":[],"content":{"showCompletion":true,"headerButton":{"text":"Guidance","link":"https://documents.gresb.com/generated_files/real_estate/2020/real_estate/reference_guide/complete.html"}},"chapters":[{"id":"4283ac1c-567d-46c9-9464-657ded85ff1c","title":"Risk Assesment","completion":25,"number":"1","synopsis":"Awaiting Description.","documents":[],"chapters":[]},{"id":"4073e1ad-34eb-45a1-a4eb-8dcd0d3c3923","title":"Targets","completion":40,"number":"2","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"15419d7b-1362-40d5-9721-a3f52808865b","title":"Energy","completion":55,"number":"3","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"f93d7e4a-adea-4544-b8dd-cf4aa86d88f1","title":"GHG","completion":30,"number":"4","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"71fa5ee8-a0d6-4337-8158-bd0d5d97c669","title":"Water","completion":80,"number":"5","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"d34481cc-a359-481e-99ce-e28a3c620c02","title":"Waste","completion":20,"number":"6","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"91331f54-0818-4c37-9751-72b9a9f39bd0","title":"Building Certifications","completion":15,"number":"7","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"3afa8a1c-611f-4d15-b63f-d1008173ea79","title":"Tenants & Community","completion":35,"number":"8","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"ff271b28-6cb1-4e5c-938f-9594ec56d3de","title":"Data Monitoring & Review","completion":20,"number":"9","synopsis":"Awaiting description.","documents":[],"chapters":[]}]},{"id":"20a7deaf-da93-4bcc-81e8-ea0a63e08687","title":"Development","number":"5","synopsis":"The Development Component measures the entity’s efforts to address ESG issues during the design, construction, and renovation of buildings. This component is suitable for entities involved innew construction (building design, site selection and/or construction) and/or major renovation projects, with on-going projects or completed projects during the reporting period.","documents":[],"content":{"showCompletion":true,"headerButton":{"text":"Guidance","link":"https://documents.gresb.com/generated_files/real_estate/2020/real_estate/reference_guide/complete.html"}},"chapters":[{"id":"2769d650-a818-416e-83c9-29833fb851c4","title":"ESG Requirements","completion":60,"number":"1","synopsis":"Awaiting Description.","documents":[],"chapters":[]},{"id":"97e54833-e953-478d-88b9-689ada8e422f","title":"Materials","completion":30,"number":"2","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"336e2bd2-de48-4f29-aa10-918d22cca1b5","title":"Energy","completion":30,"number":"3","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"8276e93e-02a0-47f1-bd0e-dd37e98f7f8c","title":"Water","completion":75,"number":"4","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"8a2fa525-d0a7-4b99-bba7-5cdac833946d","title":"Waste","completion":25,"number":"5","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"6eef4001-9d67-4b27-85bc-5571f0c3d065","title":"Building Certifications","completion":90,"number":"6","synopsis":"Awaiting description.","documents":[],"chapters":[]},{"id":"81c4f6a9-5f27-4e3e-bc1d-e9087692dd67","title":"Stakeholder Engagement","completion":60,"number":"7","synopsis":"Awaiting description.","documents":[],"chapters":[]}]}]}');var _xn,Fxn,Bxn,Uxn,Mxn,Vxn,zxn;function Gxn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $xn=Ge.default.div(_xn||(_xn=Gxn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),Wxn=(0,Ge.default)(ze.GQ)(Fxn||(Fxn=Gxn(["\n  margin-right: ",";\n  display: inline-flex;\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.sm.spacing),qxn=Ge.default.div(Bxn||(Bxn=Gxn(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),Jxn=Ge.default.div(Uxn||(Uxn=Gxn(["\n  background-color: ",";\n  width: 100%;\n  padding: "," "," 0\n    ",";\n"])),e=>e.theme.colors.basic.white,e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),Yxn=(0,Ge.default)(ze.fI)(Mxn||(Mxn=Gxn(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),Hxn=(0,Ge.default)(ze.fv)(Vxn||(Vxn=Gxn(["\n  max-height: 100vh;\n  overflow: auto;\n"]))),Kxn=Ge.default.div(zxn||(zxn=Gxn(["\n  display: flex;\n  width: 100%;\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Qxn=()=>{const{pathname:e}=(0,m.zy)(),n=e.split("/").pop(),t=rc(),a=!t.document.find(e=>e.startsWith("create")),r=Exn,{tree:i}=oi(r),o=i[n]||r,l=t.governance.find(e=>e.startsWith("attachContentToManagementSystem")),s=[{title:"Governance",to:"/governance"},...di(r,i,o,"/governance/systems")],c=()=>(0,Ze.jsx)(Ixn,{managementSystem:r,managementSystemTree:i,canEditContent:l,isReadOnly:a});return(0,Ze.jsxs)($xn,{name:"ManagementSystemOverview",children:[(0,Ze.jsx)(ige,{name:"ManagementSystemOverviewHeader",title:null==r?void 0:r.title,breadcrumbs:s,icon:"pencil-alt",iconColor:"tertiary"}),r&&(0,Ze.jsxs)(Yxn,{container:!0,children:[(0,Ze.jsxs)(Hxn,{span:4,item:!0,children:[(0,Ze.jsx)(Jxn,{children:(0,Ze.jsx)(Kxn,{children:(0,Ze.jsxs)(qxn,{children:[(0,Ze.jsx)(Wxn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"link"}),(0,Ze.jsx)(ze.DZ,{name:"LegislationItem_Docs__Title",inline:!0,children:"Management System Breakdown"})]})})}),(0,Ze.jsx)(xfn,{active:n||(null==r?void 0:r.id),menu:bfn(r,i)})]}),(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(c,{})}),(0,Ze.jsx)(m.qh,{path:"/:itemId",element:(0,Ze.jsx)(c,{})})]})]})]})};var Zxn,Xxn,eTn,nTn,tTn;function aTn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const rTn=(0,Ge.default)(ze.fv)(Zxn||(Zxn=aTn(["\n  opacity: ",";\n  border: 1px solid ",";\n  background-color: ",";\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n  position: relative;\n"])),e=>e.disabled?"0.5":"1",e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white),iTn=Ge.default.div(Xxn||(Xxn=aTn(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin: "," 0;\n"])),e=>e.theme.geometry.xs.spacing),oTn=(0,Ge.default)(ze.GQ)(eTn||(eTn=aTn(["\n  display: inline-flex;\n  flex: 0 0 auto;\n  background: ",";\n"])),e=>{let{theme:n}=e;return n.colors.basic.white}),lTn=(0,Ge.default)(ze.EY)(nTn||(nTn=aTn(["\n  font-size: ",";\n  padding: 0 ",";\n"])),e=>e.theme.fonts.sm.size,e=>e.theme.geometry.lg.spacing),sTn=Ge.default.div(tTn||(tTn=aTn(["\n  position: absolute;\n  right: ",";\n  top: ",";\n  flex: 0 0 auto;\n  opacity: 0.7;\n  display: inline-block;\n  background: ",";\n  padding: "," ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.text.dark.background,e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.sm.spacing),cTn=e=>{let{title:n,description:t,icon:a,iconColor:r,comingSoon:i,fullAccess:o}=e;return(0,Ze.jsxs)(rTn,{name:"SubjectTile SubjectTile--".concat(n),container:!0,item:!0,disabled:i||!o,children:[(i||!o)&&(0,Ze.jsx)(sTn,{children:(0,Ze.jsx)(ze.EY,{align:"center",size:"xs",color:"white",children:i?"Coming Soon":"Upgrade Now"})}),(0,Ze.jsx)(iTn,{children:(0,Ze.jsx)(oTn,{name:"SubjectTile__Icon",height:"70px",size:"lg",icon:a,iconColor:r,circleColor:r})}),(0,Ze.jsx)(iTn,{children:(0,Ze.jsx)(ze.DZ,{align:"center",size:"lg",children:n})}),(0,Ze.jsx)(iTn,{children:(0,Ze.jsx)(lTn,{align:"center",children:t})})]})};var dTn;const uTn=Ge.default.div(dTn||(dTn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n\n  // Fallbacks for IE\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-self: flex-center;\n\n  // CSS grid for real browsers\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n  grid-gap: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.lg.spacing),pTn=e=>{let{items:n,fullAccess:t}=e;return(0,Ze.jsx)(uTn,{children:n.map(e=>e.comingSoon||!t[e.accessIndex]?(0,Ze.jsx)(p.Link,{name:"GovernanceGrid__Link__".concat(e.title),to:"systems"===e.accessIndex?"/upgrade/compliance":"/contact",children:(0,Ze.jsx)(cTn,{title:e.title,description:e.description,icon:e.icon,iconColor:e.iconColor,comingSoon:e.comingSoon,fullAccess:t[e.accessIndex]},e.id)},e.id):(0,Ze.jsx)(p.Link,{name:"GovernanceGrid__Link__".concat(e.title),to:e.link,children:(0,Ze.jsx)(cTn,{title:e.title,description:e.description,icon:e.icon,iconColor:e.iconColor,comingSoon:e.comingSoon,fullAccess:t[e.accessIndex]})},e.id))})};var mTn,fTn,yTn,gTn;function bTn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hTn=(0,Ge.default)(ze.fI)(mTn||(mTn=bTn(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  background: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.overlay.normal.background,e=>e.styleSelected?e.theme.colors.overlay.light.background:"none"),vTn=(0,Ge.default)(ze.fI)(fTn||(fTn=bTn(["\n  opacity: ",";\n"])),e=>e.disabled?"0.5":"1"),xTn=(0,Ge.default)(ze.GQ)(yTn||(yTn=bTn(["\n  display: inline-flex;\n  flex: 0 0 auto;\n  margin-right: ",";\n"])),e=>e.theme.geometry.sm.spacing),TTn=Ge.default.div(gTn||(gTn=bTn(["\n  flex: 0 0 auto;\n  opacity: 0.7;\n  display: inline-block;\n  background: ",";\n  padding: "," ",";\n  margin-left: ",";\n"])),e=>e.theme.colors.text.dark.background,e=>e.theme.geometry.xxs.spacing,e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.xs.spacing),OTn=e=>{let{botId:n,title:t,icon:a,iconColor:r,comingSoon:i,fullAccess:o}=e;return(0,Ze.jsx)(hTn,{name:"BotRow--".concat(n),container:!0,itemAlign:"center",children:(0,Ze.jsxs)(vTn,{container:!0,item:!0,itemAlign:"center",distribution:"between",disabled:i||!o,children:[(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(xTn,{height:"30px",size:"md",icon:a,iconColor:r,circleColor:r}),(0,Ze.jsx)(ze.EY,{weight:"bold",color:"dark",inline:!0,name:"BotRow__Title--".concat(n),size:"md",children:t})]}),(i||!o)&&(0,Ze.jsx)(TTn,{children:(0,Ze.jsx)(ze.EY,{inline:!0,size:"xs",color:"white",children:i?"Coming Soon":"Upgrade Now"})})]})})};var kTn;const jTn=Ge.default.div(kTn||(kTn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n  overflow: auto;\n  background: ",";\n  margin-top: ",";\n"])),e=>e.theme.colors.basic.white,e=>e.theme.geometry.md.spacing),CTn=e=>{let{items:n,fullAccess:t}=e;return(0,Ze.jsx)(jTn,{children:n.map(e=>e.comingSoon||!t[e.accessIndex]?(0,Ze.jsx)(p.Link,{name:"GovernanceAreaList__Link__".concat(e.id),to:"systems"===e.accessIndex?"/upgrade/compliance":"/contact",children:(0,Ze.jsx)(OTn,{fullAccess:t[e.accessIndex],title:e.title,description:e.description,icon:e.icon,iconColor:e.iconColor,comingSoon:e.comingSoon},e.id)},e.id):(0,Ze.jsx)(p.Link,{name:"GovernanceAreaList__Link__".concat(e.id),to:e.link,children:(0,Ze.jsx)(OTn,{fullAccess:t[e.accessIndex],title:e.title,description:e.description,icon:e.icon,iconColor:e.iconColor,comingSoon:e.comingSoon},e.id)},e.id))})};var STn,NTn,wTn,DTn,ATn,RTn;function PTn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const LTn=Ge.default.div(STn||(STn=PTn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),ITn=Ge.default.div(NTn||(NTn=PTn(["\n  overflow: auto;\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.lg.spacing),ETn=(0,Ge.default)(ze.fI)(wTn||(wTn=PTn(["\n  padding-right: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.dark.background),_Tn=(0,Ge.default)(ze.vj)(DTn||(DTn=PTn(["\n  flex: 1 1 auto;\n  form > div {\n    background: none;\n    border: 0;\n    border-radius: 0;\n  }\n"]))),FTn=(0,Ge.default)(ze.Yq)(ATn||(ATn=PTn(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.md.spacing),BTn=(0,Ge.default)(Tn)(RTn||(RTn=PTn(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),UTn=(0,Ye.Ay)(e=>{const{intl:n,accessControls:t,isShouldUserUpgrade:a}=e,[r,i]=(0,g.useState)(""),{data:o,loading:l}=Gm(),s=rc(),c=Nln.filter(e=>{var n;return!(null===(n=s[e.permissionSection])||void 0===n||!n.find(n=>n.startsWith(e.basePermission)))}),[d,u]=zt.partition(c,e=>!!e.restricted),p=((e,n)=>{const t=[];return e.forEach(e=>{n[e.accessIndex].find(n=>n.id===e.restrictionId)&&t.push(e)}),t})(d,{systems:o}),m=((e,n)=>{if(!n)return e;const t=new gf.vj("id");return t.addIndex("title"),t.addDocuments(e),t.search(n)})(u.concat(p),r),{isList:f,isGrid:y,showGrid:b,showList:h}=hy();return(0,Ze.jsxs)(LTn,{name:"GovernanceLandingPage",children:[(0,Ze.jsx)(ige,{name:"GovernanceLandingPageHeader",title:n.formatMessage({id:"pages.governance.heading"}),breadcrumbs:[{title:n.formatMessage({id:"pages.governance.breadcrumbs.one"})},{title:n.formatMessage({id:"pages.governance.breadcrumbs.two"})}],icon:"pencil-alt",iconColor:"tertiary"}),(0,Ze.jsxs)(ITn,{children:[(0,Ze.jsxs)(ETn,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(_Tn,{name:"DataSubjects__Search",value:r,onChange:e=>i(e.target.value),hideButton:!0}),(0,Ze.jsx)(FTn,{name:"DataSubjects__ShowGrid",size:"md",color:y?"primary":"normal",weight:y?"bold":"normal",underline:!1,onClick:b,inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"th"})}),(0,Ze.jsx)(FTn,{name:"DataSubjects__ShowList",size:"md",color:f?"primary":"normal",weight:f?"bold":"normal",underline:!1,onClick:h,inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"th-list"})})]}),a&&(0,Ze.jsx)(BTn,{name:"ComplyContainer_Access_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Governance",body:n.formatMessage({id:"pages.governance.permissionsProblem"})}),y&&!l?(0,Ze.jsx)(pTn,{items:m,fullAccess:t}):(0,Ze.jsx)(Ow,{}),!y&&(0,Ze.jsx)(CTn,{items:m,fullAccess:t})]})]})});var MTn,VTn,zTn,GTn,$Tn,WTn;function qTn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const JTn=(0,D.J1)(MTn||(MTn=qTn(["\n  fragment PolicyFields on Policy {\n    id\n    accountId\n    title\n    version\n    createdAt\n    reviewDate\n  }\n"]))),YTn=(0,D.J1)(VTn||(VTn=qTn(["\n  fragment PolicyDocumentFields on DocumentRecord {\n    id\n    link\n    fileName\n  }\n"]))),HTn=(0,D.J1)(zTn||(zTn=qTn(["\n  query GetPoliciesByAccountId($accountId: ID!) {\n    getPoliciesByAccountId(accountId: $accountId) {\n      id\n      accountId\n      title\n      version\n      createdAt\n      reviewDate\n    }\n  }\n"]))),KTn=(0,D.J1)(GTn||(GTn=qTn(["\n  query GetPolicyById($id: ID!, $accountId: ID!) {\n    getPolicyById(id: $id, accountId: $accountId) {\n      ...PolicyFields\n      documents {\n        ...PolicyDocumentFields\n      }\n    }\n  }\n  ","\n  ","\n"])),JTn,YTn),QTn=(0,D.J1)($Tn||($Tn=qTn(["\n  mutation SavePolicy($policy: SavePolicyInput!, $accountId: String!) {\n    savePolicy(policy: $policy, accountId: $accountId) {\n      ...PolicyFields\n      documents {\n        ...PolicyDocumentFields\n      }\n    }\n  }\n  ","\n  ","\n"])),JTn,YTn),ZTn=(0,D.J1)(WTn||(WTn=qTn(["\n  mutation CreateDocumentRecord(\n    $id: ID!\n    $accountId: ID!\n    $referenceId: String\n    $key: String!\n    $userId: ID!\n    $category: String!\n    $type: [String!]\n    $fileName: String!\n    $library: DocumentLibrary!\n    $reviewDate: String\n    $source: Source!\n  ) {\n    createDocumentRecord(\n      input: {\n        id: $id\n        userId: $userId\n        accountId: $accountId\n        referenceId: $referenceId\n        key: $key\n        category: $category\n        type: $type\n        fileName: $fileName\n        library: $library\n        reviewDate: $reviewDate\n        source: $source\n      }\n    ) {\n      id\n    }\n  }\n"])));var XTn;const eOn=(0,Ge.css)(XTn||(XTn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: auto;\n  height: 200px;\n  padding: 24px;\n  cursor: pointer;\n  border-width: 1px;\n  border-style: solid;\n  border-color: rgb(232, 233, 236);\n  background-color: white;\n"])));function nOn(e){return{accountId:e,id:(0,Ai.A)(),title:"",version:"1",createdAt:Wt()().toISOString(),reviewDate:null,documents:[]}}function tOn(e){return!!e&&"DocumentRecord"===e.__typename}function aOn(e){const n={};return e.documents.length||(n.documents="No attachments yet. Please attach some documents."),e.title||(n.title="Title is required"),n}var rOn,iOn,oOn,lOn,sOn,cOn,dOn,uOn,pOn,mOn,fOn;function yOn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gOn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yOn(Object(t),!0).forEach(function(n){bOn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yOn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function bOn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function hOn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const vOn=(0,Ge.default)(ze.JU)(rOn||(rOn=hOn(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),xOn=Ge.default.form(iOn||(iOn=hOn(["\n  padding: 32px;\n"]))),TOn=Ge.default.div(oOn||(oOn=hOn(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),OOn=(0,Ge.default)(ze.DZ)(lOn||(lOn=hOn(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),kOn=(0,Ge.default)(ze.fv)(sOn||(sOn=hOn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),jOn=(0,Ge.default)(kOn)(cOn||(cOn=hOn(["\n  flex-basis: 50%;\n"]))),COn=(0,Ge.default)(ze.lr)(dOn||(dOn=hOn(["\n  .DayPickerInput-Overlay {\n    top: -200px;\n    left: 50%;\n  }\n"]))),SOn=(0,Ge.default)(ze.$n)(uOn||(uOn=hOn(["\n  width: 100%;\n  margin-top: 12px;\n"]))),NOn=(0,Ge.default)(ze.fv)(pOn||(pOn=hOn(["\n  text-align: left;\n  align-items: center;\n  flex-flow: row nowrap;\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),wOn=(0,Ge.default)(ze.fI)(mOn||(mOn=hOn(["\n  color: ",";\n  text-align: left;\n"])),e=>e.error?e.theme.colors.danger.normal.background:"initial"),DOn=(0,Ge.default)(kOn)(fOn||(fOn=hOn(["\n  flex-basis: 120px;\n  max-width: 120px;\n"])));function AOn(e){let{file:n,onDelete:t,readOnly:a}=e;const r=n instanceof window.File,i=tOn(n);return(0,Ze.jsxs)(ze.fI,{container:!0,children:[(0,Ze.jsx)(kOn,{grow:"0",children:(0,Ze.jsx)(ze.GQ,{size:"xxs",icon:"file",color:"tretiary"})}),(0,Ze.jsxs)(NOn,{grow:"1",item:!0,container:!0,children:[r&&n.name,i&&n.fileName]}),i&&(0,Ze.jsx)(DOn,{item:!0,grow:"0",children:(0,Ze.jsx)(p.Link,{to:"/documents/governance/Policies/".concat(n.id),children:(0,Ze.jsx)(ze.$n,{type:"button",color:"secondary",children:"View"})})}),!a&&(0,Ze.jsx)(DOn,{item:!0,grow:"0",children:(0,Ze.jsx)(ze.$n,{type:"button",color:"danger",onClick:t,children:"Remove"})})]})}function ROn(e){let{show:n,title:t,submitTitle:a,onDismiss:r,onChange:i,onSubmit:o,policy:l,isSubmitting:s,readOnly:c}=e;const[d,u]=(0,g.useState)({}),p=e=>{Object.keys(d).length?u(aOn(e)):u({})};return!!n&&(0,Ze.jsx)(ze.aF,{size:"md",height:"auto",maxHeight:"90vh",onDismiss:()=>{r()},dismissable:!0,show:!0,children:(0,Ze.jsxs)(xOn,{children:[(0,Ze.jsx)(OOn,{children:t}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kOn,{item:!0,children:[(0,Ze.jsx)(TOn,{children:(0,Ze.jsx)(vOn,{children:"Policy Title"})}),(0,Ze.jsx)(ze.ks,{disabled:s,onChange:e=>{let{target:{value:n}}=e;const t=gOn(gOn({},l),{},{title:n});p(t),i(t)},name:"title",value:l.title,error:d.title,readOnly:c,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kOn,{item:!0,children:[(0,Ze.jsx)(TOn,{children:(0,Ze.jsx)(vOn,{children:"Review Date"})}),(0,Ze.jsx)(COn,{onDayClick:e=>{i(gOn(gOn({},l),{},{reviewDate:e.toISOString()}))},name:"reviewDate",placeholder:"YYYY/MM/DD",selectedDate:l.reviewDate?new Date(l.reviewDate):null,disabledDatesBefore:l.createdAt?new Date(l.createdAt):null,error:d.reviewDate,readOnly:c,disabled:s||c,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kOn,{item:!0,children:[(0,Ze.jsx)(TOn,{children:(0,Ze.jsx)(vOn,{children:"Version"})}),(0,Ze.jsx)(ze.ks,{name:"version",disabled:s,onChange:e=>{i(gOn(gOn({},l),{},{version:e.target.value}))},value:l.version,readOnly:c})]})}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsxs)(kOn,{item:!0,children:[(0,Ze.jsx)(TOn,{children:(0,Ze.jsx)(vOn,{children:"Attachments"})}),l.documents&&l.documents.length?l.documents.map(e=>(0,Ze.jsx)(AOn,{file:e,onDelete:()=>{i(gOn(gOn({},l),{},{documents:l.documents.filter(n=>n!==e)}))},readOnly:c},e instanceof window.File?e.name:e.fileName)):(0,Ze.jsx)(wOn,{error:d.documents,container:!0,children:d.documents||"No attachments yet"})]})}),!c&&(0,Ze.jsxs)(ze.fI,{container:!0,children:[(0,Ze.jsx)(jOn,{item:!0,grow:"1",children:(0,Ze.jsx)(ze.bT,{multiple:!0,accept:xr.allowedDocument.mimeType,onChange:async e=>{const n=l.documents.concat(e),t=gOn(gOn({},l),{},{documents:n});p(t),i(t)},children:e=>(0,Ze.jsx)(SOn,{type:"button",color:"tertiary",disabled:s,onClick:()=>{e()},children:"Attach Documents"})})}),(0,Ze.jsx)(jOn,{item:!0,grow:"1",children:(0,Ze.jsx)(SOn,{disabled:s,onClick:e=>{e.preventDefault();const n=aOn(l);Object.keys(n).length?u(n):o(l)},children:a})})]})]})})}function POn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function LOn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?POn(Object(t),!0).forEach(function(n){IOn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):POn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function IOn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function EOn(){const{token:{sub:e}}=at(),n=rt(),[t]=(0,Ot.n)(QTn),a=al(),[r]=(0,Ot.n)(ZTn);return async i=>{const o=Array.isArray(i.documents)?i.documents:[],l=await Promise.all(o.filter(e=>e instanceof window.File).map(async t=>{const o=(0,Ai.A)();await a(n,o,t);const l={id:o,userId:e,accountId:n,fileName:i.title,category:"Policies",key:v3(n,o),library:"GOVERNANCE",referenceId:i.id,reviewDate:i.reviewDate||null,source:br},{data:{createDocumentRecord:{id:s}}}=await r({variables:l});return s})),s=o.filter(tOn).map(e=>e.id).concat(l);await t({variables:{policy:{accountId:n,version:i.version,id:i.id,title:i.title,reviewDate:i.reviewDate,createdAt:(new Date).toISOString(),documents:s},accountId:n},update:(e,t)=>{const a={accountId:n},r=e.readQuery({query:HTn,variables:a}),i=Array.isArray(r.getPoliciesByAccountId)?r.getPoliciesByAccountId:[],o=t.data.savePolicy,l=!!i.find(e=>e.id===o.id),s=LOn(LOn({},r),{},{getPoliciesByAccountId:l?r.getPoliciesByAccountId.map(e=>e.id===o.id?LOn(LOn({},o),{},{__typename:"PolicyOverview"}):e):[...i,o]});e.writeQuery({query:HTn,variables:a,data:s})}})}}var _On,FOn,BOn,UOn,MOn,VOn;function zOn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const GOn=Ge.default.div(_On||(_On=zOn(["\n  ","\n"])),eOn),$On=(0,Ge.default)(ze.fI)(FOn||(FOn=zOn(["\n  padding-bottom: 0;\n  flex: 0 0 auto;\n  height: 50%;\n"]))),WOn=(0,Ge.default)(ze.GQ)(BOn||(BOn=zOn(["\n  z-index: 1;\n  background: #fff;\n  display: inline-flex;\n"]))),qOn=(0,Ge.default)(ze.fv)(UOn||(UOn=zOn(["\n  padding-top: 12px;\n  border-top: 1px solid ",";\n"])),e=>e.theme.colors.overlay.normal.background),JOn=(0,Ge.default)(ze.DZ)(MOn||(MOn=zOn(["\n  margin-bottom: 8px;\n"]))),YOn=(0,Ge.default)(ze.EY)(VOn||(VOn=zOn([""])));function HOn(e){let{policy:n,showNotification:t,canEdit:a}=e;const[r,i]=(0,g.useState)(!1),o=(0,N.m)(),[l,s]=(0,g.useState)(null),[c,d]=(0,g.useState)(!1),u=rt(),p=EOn(),{title:m}=n,f=m.length>28?"".concat(m.substr(0,24)," ..."):m;return(0,Ze.jsxs)(GOn,{onClick:async()=>{if(i(!0),!l){const{data:{getPolicyById:e}}=await o.query({query:KTn,variables:{accountId:u,id:n.id}});e&&s(e)}},children:[(0,Ze.jsx)($On,{children:(0,Ze.jsx)(WOn,{height:"70px",size:"lg",icon:"file-contract",iconColor:"tertiary",circleColor:"tertiary"})}),(0,Ze.jsxs)(qOn,{container:!0,item:!0,vdistribution:"between",children:[(0,Ze.jsxs)(JOn,{size:"lg",color:"dark",weight:"light",children:[f," (v",n.version,")"]}),(0,Ze.jsxs)(YOn,{children:["Created: ",Wt()(n.createdAt).format("DD/MM/YYYY hh:mm:ss")]}),n.reviewDate&&(0,Ze.jsxs)(YOn,{children:["Review Date: ",Wt()(n.reviewDate).format("DD/MM/YYYY hh:mm:ss")]})]}),l&&(0,Ze.jsx)(ROn,{readOnly:!a,title:a?"Update Policy":"View Policy",submitTitle:"Update Policy",show:r,isSubmitting:c,policy:l,onDismiss:()=>{setTimeout(()=>{i(!1),s(null)},0)},onChange:e=>{s(e)},onSubmit:async e=>{d(!0);try{await p(e),t({message:"Your policy has been updated!",color:"success"})}catch(e){t({message:"Something went wrong. Try again later.",color:"danger"})}finally{d(!1),i(!1),s(null)}}},"".concat(n.id,"-").concat(n.version))]})}var KOn,QOn,ZOn=t(78664),XOn=t.n(ZOn);function ekn(e){let{policies:n,showNotification:t,canEdit:a}=e;return XOn()(n,"title").map(e=>(0,Ze.jsx)(HOn,{policy:e,canEdit:a,showNotification:t},e.id))}function nkn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const tkn=Ge.default.button(KOn||(KOn=nkn(["\n  ","\n  display: flex;\n  flex-flow: column nowrap;\n  justify-content: center;\n  align-items: center;\n  font-family: 'Proxima Nova', Helvetica, Arial, sans-serif;\n"])),eOn),akn=(0,Ge.default)(ze.In)(QOn||(QOn=nkn(["\n  margin-bottom: 16px;\n"])));function rkn(e){let{showNotification:n}=e;const t=rt(),[a,r]=(0,g.useState)(!1),[i,o]=(0,g.useState)(!1),l=(0,Ge.useTheme)(),[s,c]=(0,g.useState)(nOn(t)),d=EOn();return(0,Ze.jsxs)(tkn,{onClick:()=>r(!0),children:[(0,Ze.jsx)(akn,{icon:"plus-circle",size:"6x",color:l.colors.success.normal.background}),"Add new",(0,Ze.jsx)(ROn,{title:"Create Policy",submitTitle:"Create Policy",show:a,isSubmitting:i,policy:s,onDismiss:()=>{setTimeout(()=>r(!1),0)},onChange:c,onSubmit:async e=>{o(!0);try{await d(e),n({message:"Your policy has been created!",color:"success"})}catch(e){n({message:"Something went wrong. Try again later.",color:"danger"})}finally{o(!1),r(!1),c(nOn(t))}}})]})}var ikn,okn,lkn,skn;function ckn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const dkn=Ge.default.div(ikn||(ikn=ckn(["\n  padding: 32px 48px 48px;\n"]))),ukn=Ge.default.div(okn||(okn=ckn(["\n  flex-direction: row;\n  flex-wrap: wrap;\n  -webkit-box-pack: center;\n  justify-content: center;\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));\n  padding-top: 32px;\n  flex: 1 1 auto;\n  gap: 24px;\n"]))),pkn=(0,Ge.default)(ze.fI)(lkn||(lkn=ckn(["\n  padding-right: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.dark.background),mkn=(0,Ge.default)(ze.vj)(skn||(skn=ckn(["\n  flex: 1 1 auto;\n  form > div {\n    background: none;\n    border: 0;\n    border-radius: 0;\n  }\n"]))),fkn=()=>{const e=rc(),n=rt(),{data:t}=Td(),a={accountId:n},[r,i]=(0,g.useState)(null),{data:o}=(0,h.IT)(HTn,{variables:a}),l=(null==o?void 0:o.getPoliciesByAccountId)||[],[s,c,d]=hf(l,["id","title","version"]),u=!!e.governance.find(e=>e.startsWith("createPolicy")),p=Nln.filter(e=>!e.comingSoon&&t.comply[e.accessIndex]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ige,{title:"Policies",breadcrumbs:[{title:"Governance",to:"/governance"},{title:"Policies"}],icon:"pencil-alt",iconColor:"tertiary",isDropdown:!0,dropdownItems:p,dropdownDefault:"Policies"}),(0,Ze.jsxs)(dkn,{children:[(0,Ze.jsx)(pkn,{container:!0,item:!0,itemAlign:"center",children:(0,Ze.jsx)(mkn,{value:s,onChange:e=>c(e.target.value),hideButton:!0})}),(0,Ze.jsxs)(ukn,{children:[u&&(0,Ze.jsx)(rkn,{showNotification:e=>i(e)}),(0,Ze.jsx)(ekn,{policies:d,showNotification:i,canEdit:u})]}),r&&(0,Ze.jsx)(ze.Eg,{show:!0,color:r.color,onClose:()=>i(null),children:r.message})]})]})},ykn="Reduce",gkn="Employee Numbers",bkn="Office Area",hkn="Turnover",vkn="Custom 1",xkn="Custom 2",Tkn="Custom 3",Okn={[gkn]:"employee number",[bkn]:"office area",[hkn]:"turnover",[vkn]:"custom normaliser 1",[xkn]:"custom normaliser 2",[Tkn]:"custom normaliser 3"};var kkn,jkn,Ckn=t(41696),Skn=t.n(Ckn),Nkn=t(8455),wkn=t.n(Nkn);function Dkn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Akn=(0,D.J1)(kkn||(kkn=Dkn(["\n  {\n    getNormaliserTypes {\n      id\n      name\n    }\n  }\n"]))),Rkn=(0,D.J1)(jkn||(jkn=Dkn(["\n  query GetLocationById($id: ID!) {\n    getLocationById(id: $id) {\n      id\n      name\n    }\n  }\n"])));var Pkn,Lkn,Ikn,Ekn,_kn,Fkn,Bkn,Ukn;function Mkn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Vkn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Mkn(Object(t),!0).forEach(function(n){zkn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Mkn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zkn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Gkn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $kn=(0,Ge.default)(ze.JU)(Pkn||(Pkn=Gkn(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Wkn=Ge.default.form(Lkn||(Lkn=Gkn(["\n  padding: 32px;\n"]))),qkn=Ge.default.div(Ikn||(Ikn=Gkn(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),Jkn=(0,Ge.default)(ze.DZ)(Ekn||(Ekn=Gkn(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Ykn=(0,Ge.default)(ze.fv)(_kn||(_kn=Gkn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Hkn=(0,Ge.default)(Ykn)(Fkn||(Fkn=Gkn(["\n  flex-basis: 50%;\n"]))),Kkn=(0,Ge.default)(ze.lr)(Bkn||(Bkn=Gkn(["\n  .DayPickerInput-Overlay {\n    top: -200px;\n    left: 50%;\n  }\n"]))),Qkn=(0,Ge.default)(ze.$n)(Ukn||(Ukn=Gkn(["\n  width: 100%;\n  margin-top: 12px;\n"]))),Zkn=e=>{var n,t,a,r,i,o;let{accountId:l,title:s,submitTitle:c,onDismiss:d,onSubmit:u,readOnly:p,errors:m,editedTarget:f}=e;const y={accountId:l,name:null==f?void 0:f.name,scope:null==f?void 0:f.scope,locationId:null==f?void 0:f.locationId,tagId:null==f?void 0:f.tagId,typeId:null==f||null===(n=f.type)||void 0===n?void 0:n.id,topicId:null==f||null===(t=f.topic)||void 0===t?void 0:t.id,normaliserTypeId:(null==f||null===(a=f.normaliserType)||void 0===a?void 0:a.id)||null,value:null==f?void 0:f.value,isRelative:(null==f?void 0:f.isRelative)||!1,baselineStartDate:null==f?void 0:f.baselineStartDate,baselineEndDate:null==f?void 0:f.baselineEndDate,startDate:null==f?void 0:f.startDate,endDate:null==f?void 0:f.endDate},[b,v]=(0,g.useState)({}),[x,T]=(0,g.useState)(y),[O,k]=(0,g.useState)(!1),{data:j}=(0,h.IT)(Skn()),C=(null==j||null===(r=j.getTargetTypes)||void 0===r?void 0:r.map(e=>{let{id:n,name:t}=e;return{label:t,value:n}}).sort(Oa("label")))||[],{data:S}=(0,h.IT)(wkn()),N=(null==S||null===(i=S.getTargetTopics)||void 0===i?void 0:i.map(e=>{let{id:n,name:t}=e;return{label:t,value:n}}).sort(Oa("label")))||[],{data:w}=(0,h.IT)(Akn),{data:D}=(0,h.IT)(Rkn,{variables:{id:null==f?void 0:f.locationId},skip:!(null!=f&&f.locationId)}),A=!!x.typeId&&x.typeId===(null===(o=C.find(e=>{let{label:n}=e;return"Reduce"===n}))||void 0===o?void 0:o.value),R=((e,n,t,a)=>{var r;if(!e||!n||!t)return[];const i=null==e?void 0:e.getTargetTopics.find(e=>{let{id:n}=e;return n===t}),o=[{label:(null==i||null===(r=i.unit)||void 0===r?void 0:r.name)||"",value:{normaliserTypeId:null,isRelative:!1}}];return a&&o.push({label:"%",value:{normaliserTypeId:null,isRelative:!0}}),n.getNormaliserTypes.slice().sort(Oa("name")).forEach(e=>{var n;o.push({label:"".concat((null==i||null===(n=i.unit)||void 0===n?void 0:n.name)||"","/").concat(Okn[e.name]),value:{normaliserTypeId:e.id,isRelative:!1}}),a&&o.push({label:"%/".concat(Okn[e.name]),value:{normaliserTypeId:e.id,isRelative:!0}})}),o})(S,w,x.topicId,A),P=R.find(e=>{let{value:n}=e;return n.isRelative===x.isRelative&&n.normaliserTypeId===x.normaliserTypeId});return(0,Ze.jsx)(ze.aF,{size:"md",onDismiss:d,dismissable:!0,show:!0,children:(0,Ze.jsxs)(Wkn,{children:[(0,Ze.jsx)(Jkn,{children:s}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Name"})}),(0,Ze.jsx)(ze.ks,{type:"text",disabled:O,value:x.name,onChange:e=>{T(Vkn(Vkn({},x),{},{name:e.target.value})),v(Vkn(Vkn({},b),{},{name:null}))},name:"name",error:b.name,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Scope"})}),(0,Ze.jsx)(ze.l6,{options:Re,value:x.scope,onChange:e=>{T(Vkn(Vkn({},x),{},{scope:e.target.value,tagId:null,locationId:null})),v(Vkn(Vkn({},b),{},{scope:null,tagId:null,locationId:null}))},error:b.scope})]})}),x.scope===Ce&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Location"})}),(0,Ze.jsx)(nY,{value:x.locationId,onChange:e=>{T(Vkn(Vkn({},x),{},{locationId:e.target.value})),v(Vkn(Vkn({},b),{},{locationId:null}))},error:b.locationId,selectedOption:null==D?void 0:D.getLocationById})]})}),x.scope===Ne&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Tag"})}),(0,Ze.jsx)(u6,{accountId:l,value:x.tagId,onChange:e=>{T(Vkn(Vkn({},x),{},{tagId:e.target.value})),v(Vkn(Vkn({},b),{},{tagId:null}))},error:b.tagId})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Type"})}),(0,Ze.jsx)(ze.l6,{options:C,value:x.typeId,onChange:e=>{T(Vkn(Vkn({},x),{},{typeId:e.target.value,isRelative:!1})),v(Vkn(Vkn({},b),{},{typeId:null}))},error:b.typeId})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Topic"})}),(0,Ze.jsx)(ze.l6,{options:N,value:x.topicId,onChange:e=>{T(Vkn(Vkn({},x),{},{topicId:e.target.value})),v(Vkn(Vkn({},b),{},{topicId:null}))},error:b.topicId})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Value"})}),(0,Ze.jsx)(ze.ks,{type:"number",disabled:O,value:x.value,onChange:e=>{T(Vkn(Vkn({},x),{},{value:parseInt(e.target.value)})),v(Vkn(Vkn({},b),{},{value:null}))},name:"value",error:b.value,box:!0})]})}),x.topicId&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Unit"})}),(0,Ze.jsx)(ze.l6,{options:R,value:P,onChange:e=>{T(Vkn(Vkn({},x),e.target.value)),v(Vkn(Vkn({},b),{},{unit:null}))},error:b.unit})]})}),A&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Baseline From"})}),(0,Ze.jsx)(Kkn,{onDayClick:e=>{T(Vkn(Vkn({},x),{},{baselineStartDate:e.toISOString()})),v(Vkn(Vkn({},b),{},{baselineStartDate:null}))},name:"reviewDate",placeholder:"YYYY/MM/DD",selectedDate:Qt(x.baselineStartDate),disabledDatesAfter:Qt(x.baselineEndDate)||new Date,error:b.baselineStartDate,readOnly:p,disabled:O||p,box:!0})]})}),A&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Baseline To"})}),(0,Ze.jsx)(Kkn,{onDayClick:e=>{T(Vkn(Vkn({},x),{},{baselineEndDate:e.toISOString()})),v(Vkn(Vkn({},b),{},{baselineEndDate:null}))},name:"reviewDate",placeholder:"YYYY/MM/DD",selectedDate:Qt(x.baselineEndDate),disabledDatesBefore:Qt(x.baselineStartDate),disabledDatesAfter:new Date,error:b.baselineEndDate,readOnly:p,disabled:O||p,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Target Start"})}),(0,Ze.jsx)(Kkn,{onDayClick:e=>{T(Vkn(Vkn({},x),{},{startDate:e.toISOString()})),v(Vkn(Vkn({},b),{},{startDate:null}))},name:"reviewDate",placeholder:"YYYY/MM/DD",selectedDate:Qt(x.startDate),disableDatesAfter:Qt(x.endDate),error:b.startDate,readOnly:p,disabled:O||p,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Ykn,{item:!0,children:[(0,Ze.jsx)(qkn,{children:(0,Ze.jsx)($kn,{children:"Target End"})}),(0,Ze.jsx)(Kkn,{onDayClick:e=>{T(Vkn(Vkn({},x),{},{endDate:e.toISOString()})),v(Vkn(Vkn({},b),{},{endDate:null}))},name:"reviewDate",placeholder:"YYYY/MM/DD",selectedDate:Qt(x.endDate),disabledDatesBefore:Qt(x.startDate),error:b.endDate,readOnly:p,disabled:O||p,box:!0})]})}),m.length>0&&(0,Ze.jsx)(ze.fI,{container:!0,children:m.map(e=>(0,Ze.jsx)(ze.EY,{size:"md",color:"danger",children:e},e))}),!p&&(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(Hkn,{item:!0,grow:"1",children:(0,Ze.jsx)(Qkn,{disabled:O,onClick:async e=>{e.preventDefault();const n=function(e,n){const t={},a=n.find(n=>{let{value:t}=n;return t===e.typeId});return e.name||(t.name="Name is required"),e.scope||(t.scope="Scope is required"),e.scope!==Ce||e.locationId||(t.locationId="Location is required"),e.scope!==Ne||e.tagId||(t.tagId="Tag is required"),e.typeId||(t.typeId="Type is required"),e.topicId||(t.topicId="Topic is required"),e.startDate||(t.startDate="Start Date is required"),e.endDate||(t.endDate="End Date is required"),e.value||0===e.value||(t.value="Value is required"),a&&a.label===ykn&&(e.baselineStartDate||(t.baselineStartDate="Baseline Start Date is required"),e.baselineEndDate||(t.baselineEndDate="Baseline Start Date is required")),t}(x,C);Object.keys(n).length?v(n):(k(!0),await u(x),k(!1))},children:c})})})]})})};var Xkn=t(25180),ejn=t.n(Xkn),njn=t(91153),tjn=t.n(njn);const ajn="ACHIEVING",rjn="NOT ACHIEVING",ijn="ACTION REQUIRED";var ojn,ljn,sjn,cjn;function djn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(0,Ge.keyframes)(ojn||(ojn=djn(["\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n"])));const ujn=(0,Ge.keyframes)(ljn||(ljn=djn(["\n  to {\n    width: 1.25em;\n  }\n"]))),pjn=((0,Ge.css)(sjn||(sjn=djn(["\n  &:after {\n    position: absolute;\n    overflow: hidden;\n    display: inline-block;\n    width: 0px;\n    vertical-align: bottom;\n    animation: "," steps(4, end) 900ms infinite;\n    content: '\\2026';\n  }\n"],["\n  &:after {\n    position: absolute;\n    overflow: hidden;\n    display: inline-block;\n    width: 0px;\n    vertical-align: bottom;\n    animation: "," steps(4, end) 900ms infinite;\n    content: '\\\\2026';\n  }\n"])),ujn),()=>(0,Ge.keyframes)(cjn||(cjn=djn(["\n  from {\n    background-color: rgba(125,104,171,0.2);\n  }\n"])))),mjn="Paper reduction",fjn="Domestic Flights (km)",yjn="Reuse",gjn="Non-traded emissions",bjn="Water consumption",hjn="Food waste",vjn="Natural Gas consumption",xjn="Recycled Waste",Tjn="Waste generation",Ojn="International Flights (km)",kjn="Electricity consumption",jjn="Landfilled waste",Cjn="Transport",Sjn="Carbon emissions",Njn={[ajn]:{[mjn]:"You have used less paper than your target.",[fjn]:"You have travelled less distance by flight than your target.",[yjn]:"You have achieved or exceeded your reuse target.",[gjn]:"You have emitted less carbon from non-traded emissions than your target.",[bjn]:"You have used less water than your target.",[hjn]:"You have generated less food waste than your target.",[vjn]:"You have used less natural gas than your target.",[xjn]:"You have achieved or exceeded your recycling target.",[Tjn]:"You have generated less waste than your target.",[Ojn]:"You have travelled less distance by flight than your target.",[kjn]:"You have used less electricity than your target.",[jjn]:"You have landfilled less waste than your target.",[Cjn]:"You have travelled less distance than your target.",[Sjn]:"You have emitted less carbon than your target."},[rjn]:{[mjn]:"You have used more paper than your target.",[fjn]:"You have travelled more distance by flight than your target",[yjn]:"You have reused less waste than your target.",[gjn]:"You have emitted more carbon from non-traded emissions than your target.",[bjn]:"You have used more water than your target.",[hjn]:"You have generated more food waste than your target",[vjn]:"You have used more natural gas than your target.",[xjn]:"You have recycled less waste than your target.",[Tjn]:"You have generated more waste than your target.",[Ojn]:"You have travelled more distance by flight than your target",[kjn]:"You have used more electricity than your target.",[jjn]:"You have landfilled more waste than your target.",[Cjn]:"You have travelled more distance than your target.",[Sjn]:"You have emitted more carbon than your target."}};var wjn,Djn,Ajn,Rjn,Pjn;function Ljn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ijn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ljn(Object(t),!0).forEach(function(n){Ejn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ljn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ejn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function _jn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Fjn=Ge.default.div(wjn||(wjn=_jn(["\n  flex: 1 1 auto;\n  background-color: ",";\n  overflow-x: hidden;\n  margin: 32px 48px 48px;\n"])),e=>e.theme.colors.basic.white),Bjn=(0,Ge.default)(ze.fI)(Djn||(Djn=_jn(["\n  padding: ",";\n  background: ",";\n  border-top: 1px solid ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n"])),e=>"".concat(e.theme.geometry.sm.spacing," ").concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.light.background,e=>e.theme.colors.text.light.background,e=>e.theme.colors.text.light.background),Ujn=(0,Ge.default)(ze.fI)(Ajn||(Ajn=_jn(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n  flex: 0 0 auto;\n  background-color: white;\n  ","\n"])),e=>"".concat(e.theme.geometry.md.spacing),e=>e.theme.colors.overlay.normal.background,e=>e.anchored?(0,Ge.css)(Rjn||(Rjn=_jn(["\n          animation: "," 2s normal forwards ease-in-out;\n        "])),pjn):""),Mjn=Ge.default.a(Pjn||(Pjn=_jn(["\n  display: inline-block;\n  color: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.colors.text.dark.background),Vjn={avatar:1,topic:1.5,target:3,scope:1,baseline:2,start:1,end:1,status:1,editButton:1},zjn=e=>{let{id:n,status:t,topic:a,onActionRequiredClick:r}=e;const i=(0,g.useContext)(Ge.ThemeContext),o={[ajn]:{icon:"circle",iconColor:i.colors.success.normal.background},[rjn]:{icon:"circle",iconColor:i.colors.danger.normal.background},[ijn]:{icon:"exclamation-circle"}}[t],l=((e,n)=>{var t;return(null===(t=Njn[e])||void 0===t?void 0:t[n])||ADe()(e)})(t,a.name);return t===ijn?(0,Ze.jsx)(ze.In,{name:"target-row__status--".concat(n),icon:o.icon,size:"lg",onClick:r,title:l}):(0,Ze.jsx)(ze.In,{name:"target-row__status--".concat(n),icon:o.icon,size:"lg",color:o.iconColor,title:l})};function Gjn(e){let{target:n,onEdit:t,onActionRequiredClick:a,canEdit:r,anchored:i}=e;return(0,Ze.jsxs)(Ujn,{name:"target-row--".concat(n.id),container:!0,itemAlign:"center",id:n.id,anchored:i,children:[(0,Ze.jsx)(ze.fv,{span:Vjn.avatar,children:(0,Ze.jsx)(ze.Y3,{name:"target-row__profile-picture--".concat(n.id),src:null,size:"xs",accountName:n.topic.utility})}),(0,Ze.jsx)(ze.fv,{span:Vjn.topic,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{align:"left",name:"target-row__topic--".concat(n.id),children:n.topic.utility})}),(0,Ze.jsx)(ze.fv,{span:Vjn.name,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{align:"left",name:"target-row__target--".concat(n.id),children:n.name})}),(0,Ze.jsx)(ze.fv,{span:Vjn.scope,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{align:"left",name:"target-row__scope--".concat(n.id),children:"".concat(n.scope.charAt(0)+n.scope.slice(1).toLowerCase())})}),(0,Ze.jsx)(ze.fv,{span:Vjn.baseline,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{align:"left",name:"target-row__startDate--".concat(n.startDate),children:n.type.name===ykn?"".concat(Ht(n.baselineStartDate)," - ").concat(Ht(n.baselineEndDate)):null})}),(0,Ze.jsx)(ze.fv,{span:Vjn.start,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{align:"left",name:"target-row__endDate--".concat(n.endDate),children:Ht(n.startDate)})}),(0,Ze.jsx)(ze.fv,{span:Vjn.end,container:!0,item:!0,children:(0,Ze.jsx)(ze.EY,{align:"left",name:"target-row__endDate--".concat(n.endDate),children:Ht(n.endDate)})}),(0,Ze.jsx)(ze.fv,{span:Vjn.end,container:!0,item:!0,children:(0,Ze.jsx)(Mjn,{title:"".concat(n.status.charAt(0)+n.status.slice(1).toLowerCase()),children:(0,Ze.jsx)(zjn,Ijn(Ijn({},n),{},{onActionRequiredClick:a}))})}),r&&(0,Ze.jsx)(ze.fv,{span:Vjn.editButton,container:!0,item:!0,children:(0,Ze.jsx)(Mjn,{onClick:t,children:(0,Ze.jsx)(ze.In,{name:"target-row__edit--".concat(n.id),icon:"pencil-alt"})})})]})}function $jn(e){var n,t;let{targets:a,showEditModal:r,showActionRequiredModal:i,canEdit:o}=e;const l=(0,m.zy)(),s=a.slice().sort(Oa("topic.utility")),c=null===(n=l.hash)||void 0===n||null===(t=n.slice)||void 0===t?void 0:t.call(n,1);return(0,Ze.jsxs)(Fjn,{children:[(0,Ze.jsxs)(Bjn,{container:!0,align:"between",children:[(0,Ze.jsx)(ze.fv,{span:Vjn.avatar,container:!0}),(0,Ze.jsx)(ze.fv,{span:Vjn.topic,item:!0,container:!0,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"Topic"})}),(0,Ze.jsx)(ze.fv,{span:Vjn.target,item:!0,container:!0,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"Target"})}),(0,Ze.jsx)(ze.fv,{span:Vjn.scope,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"Applied to"})}),(0,Ze.jsx)(ze.fv,{span:Vjn.baseline,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"Baseline"})}),(0,Ze.jsx)(ze.fv,{span:Vjn.start,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"Start"})}),(0,Ze.jsx)(ze.fv,{span:Vjn.end,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"End"})}),(0,Ze.jsx)(ze.fv,{span:Vjn.status,children:(0,Ze.jsx)(ze.EY,{weight:"bold",align:"left",children:"Status"})}),o&&(0,Ze.jsx)(ze.fv,{span:Vjn.editButton})]}),s.map(e=>(0,Ze.jsx)(Gjn,{target:e,onEdit:()=>r(e.id),onActionRequiredClick:()=>i(!!e.configurationErrors.length),canEdit:o,anchored:c===e.id},e.id))]})}var Wjn,qjn,Jjn,Yjn,Hjn;function Kjn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Qjn=(0,Ge.default)(ze.fI)(Wjn||(Wjn=Kjn(["\n  flex: 1;\n  align-items: center;\n"]))),Zjn=(0,Ge.default)(ze.fv)(qjn||(qjn=Kjn(["\n  padding-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),Xjn=(0,Ge.default)(ze.$n)(Jjn||(Jjn=Kjn(["\n  width: 100%;\n"]))),eCn=Ge.default.div(Yjn||(Yjn=Kjn(["\n  padding: ",";\n  min-height: 60vh;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  pre {\n    width: 100%;\n  }\n"])),e=>e.theme.geometry.md.spacing),nCn=(0,Ge.default)(ze.DZ)(Hjn||(Hjn=Kjn(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),tCn=()=>{const e=rt(),{data:n}=Td(),t=rc(),[a,r]=(0,kd.useQueryParam)("showCreateModal",kd.BooleanParam),[i,o]=(0,g.useState)(null),[l,s]=(0,g.useState)([]),[c,d]=(0,g.useState)([]),[u]=(0,Ot.n)(ejn()),[p]=(0,Ot.n)(tjn()),{showNotification:m}=vt(),{loading:f,data:y,refetch:b,networkStatus:v}=(0,h.IT)(fd(),{variables:{accountId:e}}),x=(null==y?void 0:y.getTargetsByAccountId)||[],[T,O,k]=hf(x,["name"]),j=i?x.find(e=>{let{id:n}=e;return n===i}):void 0,C=Nln.filter(e=>!e.comingSoon&&n.comply[e.accessIndex]);return(0,Ze.jsxs)(Ze.Fragment,{children:[a&&(0,Ze.jsx)(Zkn,{title:"Create Target",submitTitle:"Create Target",onDismiss:()=>r(!1),accountId:e,onSubmit:async n=>{d([]);try{const t=await u({variables:{target:n}});if(t.data){const{data:{createTarget:n}}=t;"Target"===n.__typename?(m("Target successfully created","success"),r(!1),b({accountId:e})):"CreateTargetErrors"===n.__typename&&d(n.errors)}}catch(e){m("Something went wrong, please try again or contact support","danger")}},errors:c}),i&&(0,Ze.jsx)(Zkn,{title:"Edit Target",submitTitle:"Edit Target",onDismiss:()=>o(null),accountId:e,onSubmit:async n=>{d([]);try{const t=await p({variables:{target:n,id:i}});if(null!=t&&t.data){const{data:{updateTarget:n}}=t;"Target"===n.__typename?(m("Target successfully updated","success"),o(null),b({accountId:e})):"UpdateTargetErrors"===n.__typename&&d(n.errors)}}catch(e){m("Something went wrong, please try again or contact support","danger")}},editedTarget:j,errors:c}),l.length>0&&(0,Ze.jsx)(ze.aF,{size:"lg",show:!0,onDismiss:()=>s([]),children:(0,Ze.jsxs)(eCn,{children:[(0,Ze.jsx)(nCn,{size:"lg",children:"Actions Required"}),(0,Ze.jsx)(ze.v3,{size:"md",wrap:!0,children:l.map(e=>(0,Ze.jsx)(ze.EY,{children:e},e))})]})}),(0,Ze.jsx)(ige,{title:"Targets",name:"",breadcrumbs:[{title:"Governance",to:".."},{title:"Targets"}],icon:"pencil-alt",iconColor:"tertiary",isDropdown:!0,dropdownItems:C,dropdownDefault:"Targets",children:(0,Ze.jsxs)(Qjn,{name:"ConfigurationTargetContainer__Controls",container:!0,alignItems:"center",children:[(0,Ze.jsx)(ze.fv,{item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationTargetContainer__Controls__Search",value:T,onChange:e=>O(e.target.value),hideButton:!0})}),!!t.data.find(e=>e.startsWith("createTarget"))&&(0,Ze.jsx)(Zjn,{span:4,item:!0,children:(0,Ze.jsx)(Xjn,{name:"ConfigurationTargetContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>r(!0),children:"+ Add Targets"})})]})}),f&&3!==v&&(0,Ze.jsx)(Vg,{name:"ConfigurationNormaliserContainer__Loading"}),k&&!k.length&&!f&&T?(0,Ze.jsx)(nv,{name:"ConfigurationTargetContainer__NoResults",title:"There are no results for this search."}):!f&&(0,Ze.jsx)($jn,{targets:k,showEditModal:o,showActionRequiredModal:s,canEdit:!!t.data.find(e=>e.startsWith("editTarget"))})]})};function aCn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function rCn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?aCn(Object(t),!0).forEach(function(n){iCn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):aCn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function iCn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const oCn=e=>{switch(e){case Vt.HG.Location:return"Location";case Vt.HG.Tag:return"Tag";case Vt.HG.Account:default:return"Organisation"}},lCn=e=>{return e.scope===Vt.HG.Account?oCn(e.scope):e.scope===Vt.HG.Location?((null===(n=e.locations)||void 0===n?void 0:n.map(e=>null==e?void 0:e.name))||[]).filter(Boolean).join(", "):"";var n},sCn=e=>{return e.scope===Vt.HG.Account?oCn(e.scope):e.scope===Vt.HG.Tag?((null===(n=e.tags)||void 0===n?void 0:n.map(e=>null==e?void 0:e.tagName))||[]).filter(Boolean).join(", "):"";var n},cCn=e=>null==e?void 0:e.map(e=>e.name).join(", "),dCn=e=>(null==e?void 0:e.map(e=>e.name).join(", "))||"-",uCn=["tags","locations","departments","activity","aspects","impacts","legislations","emergencyConditions","controlMeasures","status"],pCn=(e,n)=>{const t=ia(e);return t.set&&(t.set=t.set.map(e=>uCn.includes(e.field)?rCn(rCn({},e),{},{field:"".concat(e.field,".id")}):e)),n&&(t.search={value:n,field:["tags.name","locations.name","departments.name","legislations.name","activity.name","aspects.name","impacts.name","emergencyConditions.name","controlMeasures.name","likelihoodNoControl","severityNoControl","likelihoodControl","severityControl","status.name"]}),t},mCn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e?e.map(e=>({label:e.name,value:e.id})):[]},fCn=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";return(null==e?void 0:e.filter(Boolean).map(e=>rCn(rCn({},e),{},{label:Gw()(e,n),value:Gw()(e,t)})))||[]},yCn=e=>function(){const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(e=>rCn(rCn({},e),{},{value:e.id,label:e.name})).sort((e,n)=>e.name.toLowerCase().localeCompare(n.name.toLowerCase()));return e&&n.unshift({value:"NEW",label:"Create New ..."}),n},gCn=(e,n,t)=>{var a;(Array.isArray(e.target.select)?e.target.select.find(e=>{let{value:n}=e;return"NEW"===n}):"NEW"===(null===(a=e.target.select)||void 0===a?void 0:a.value))?n(e):t(e)},bCn=(e,n,t)=>{var a,r,i,o,l;return{id:e.id||(0,Ai.A)(),accountId:n,scope:e.scope,locationIds:fCn(e.locations),tagIds:fCn(e.tags,"tagName"),ownerId:(null===(a=e.owner)||void 0===a?void 0:a.id)||null,activity:(null===(r=e.activity)||void 0===r?void 0:r.id)||null,departments:mCn(e.departments),aspects:mCn(e.aspects),impacts:mCn(e.impacts),legislationIds:fCn(e.legislations,"title"),likelihoodNoControl:String(e.likelihoodNoControl),severityNoControl:String(e.severityNoControl),emergencyConditions:mCn(e.emergencyConditions),controlMeasures:mCn(e.controlMeasures),likelihoodControl:String(e.likelihoodControl),severityControl:String(e.severityControl),reviewDate:e.reviewDate,status:null===(i=e.status)||void 0===i?void 0:i.id,taskId:null===(o=e.task)||void 0===o?void 0:o.id,authorId:(null===(l=e.author)||void 0===l?void 0:l.id)||t.sub}},hCn=(e,n,t,a,r)=>{var i,o,l,s,c,d,u,p;let m;return t||(m=(new Date).toISOString()),rCn(rCn({},e),{},{authorId:(a?null==r?void 0:r.sub:e.authorId)||"",scope:e.scope,likelihoodNoControl:Number(e.likelihoodNoControl),likelihoodControl:Number(e.likelihoodControl),severityNoControl:Number(e.severityNoControl),severityControl:Number(e.severityControl),activity:e.activity||"",locationIds:null===(i=e.locationIds)||void 0===i?void 0:i.map(e=>{let{value:n}=e;return n}),tagIds:null===(o=e.tagIds)||void 0===o?void 0:o.map(e=>{let{value:n}=e;return n}),legislationIds:null===(l=e.legislationIds)||void 0===l?void 0:l.map(e=>{let{value:n}=e;return n}),impacts:(null===(s=e.impacts)||void 0===s?void 0:s.map(e=>{let{value:n}=e;return n}))||[],aspects:(null===(c=e.aspects)||void 0===c?void 0:c.map(e=>{let{value:n}=e;return n}))||[],emergencyConditions:(null===(d=e.emergencyConditions)||void 0===d?void 0:d.map(e=>{let{value:n}=e;return n}))||[],controlMeasures:(null===(u=e.controlMeasures)||void 0===u?void 0:u.map(e=>{let{value:n}=e;return n}))||[],departments:null===(p=e.departments)||void 0===p?void 0:p.map(e=>{let{value:n}=e;return n}),ownerId:e.ownerId||null,createdDate:m,editedDate:t?(new Date).toISOString():null,editorId:t?null==r?void 0:r.sub:null,evidenceNotes:n})};function vCn(){return oa(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(e=>uCn.includes(e.field)?rCn(rCn({},e),{},{field:"".concat(e.field,".name")}):e)}const xCn=e=>{const n={[Vt.G8.Activity]:"activity.id",[Vt.G8.Aspect]:"aspects.id",[Vt.G8.ControlMeasure]:"controlMeasures.id",[Vt.G8.EmergencyCondition]:"emergencyConditions.id",[Vt.G8.Impact]:"impacts.id",[Vt.G8.Status]:"status.id"};return Gw()(n,e)},TCn=(e,n)=>{const t={alignText:"center"};return"Control measure(s) in place"===e?rCn(rCn({},t),{},{backgroundColor:n.colors.success.dark.background}):"Opportunity for improvement"===e?rCn(rCn({},t),{},{backgroundColor:n.colors.warning.dark.background}):"Risk identified"===e?rCn(rCn({},t),{},{backgroundColor:n.colors.danger.dark.background}):t};function OCn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kCn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?OCn(Object(t),!0).forEach(function(n){jCn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):OCn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jCn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var CCn,SCn;function NCn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const wCn=Ge.default.div(CCn||(CCn=NCn(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),DCn=Ge.default.a(SCn||(SCn=NCn(["\n  margin: 0 5px;\n  display: inline-block;\n  text-align: center;\n  color: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.colors.text.dark.background),ACn=e=>{let{data:n,onEdit:t,onCopy:a}=e;return(0,Ze.jsxs)(wCn,{children:[(0,Ze.jsx)(DCn,{onClick:()=>t(null==n?void 0:n.id),children:(0,Ze.jsx)(ze.In,{name:"account-row__edit--".concat(null==n?void 0:n.id),title:"Edit",icon:"pencil-alt"})}),(0,Ze.jsx)(DCn,{onClick:()=>a(n),children:(0,Ze.jsx)(ze.In,{name:"account-row__copy--".concat(null==n?void 0:n.id),title:"Duplicate",icon:"copy"})})]})};var RCn;const PCn=(0,Ge.default)(p.Link)(RCn||(RCn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  text-decoration: underline;\n  margin-right: 10px;\n  &:hover {\n    text-decoration: none;\n  }\n"]))),LCn=e=>e.data.legislations.length?e.data.legislations.map(n=>(0,Ze.jsx)(PCn,{to:"/governance/legislation/".concat(n.id),children:(0,Ze.jsx)(WJ,{text:n.title,searchValue:e.searchValue})},n.id)):"Not exist";var ICn=t(68605);const ECn="aspectSearchValue";function _Cn(){return(0,kd.useQueryParam)(ECn,kd.StringParam)}function FCn(){const{query:e}=(0,ICn.parseUrl)(window.location.href);return e[ECn]}const BCn="optionToDelete";function UCn(){return(0,kd.useQueryParam)(BCn,kd.JsonParam)}function MCn(){var e;const{query:n}=(0,ICn.parseUrl)(window.location.href),t=(0,kd.decodeJson)(n[BCn]);return(null==t||null===(e=t.option)||void 0===e?void 0:e.name)||null}function VCn(){const e=(0,N.m)();return async n=>{const{data:{getAspectsByAccountId:t}}=await e.query({query:HD,variables:n});return t}}var zCn;function GCn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $Cn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?GCn(Object(t),!0).forEach(function(n){WCn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):GCn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function WCn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const qCn=(0,Ge.default)(ze.fI)(zCn||(zCn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing);function JCn(e){var n,t;let{showEditModal:a,showCopyModal:r,canEdit:i,agGrid:o}=e;const l=rt(),s=(0,m.Zp)(),c=(0,g.useRef)(!1);c.current=i;const d=function(){const e=(0,N.m)(),n=(0,Ge.useTheme)(),t=rt(),{showNotification:a}=vt(),r={filter:"agSetColumnFilter",values:async n=>{try{const{data:{getAspectFilter:a}}=await e.query({query:eA,variables:{accountId:t,field:n.colDef.field}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){a("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning"),de.Cp(e),n.success([])}},valueFormatter:la,comparator:(e,n)=>{var t,a;return(null===(t=JSON.parse(e))||void 0===t?void 0:t.label)-(null===(a=JSON.parse(n))||void 0===a?void 0:a.label)}},i=e=>{let{value:n}=e;return Array.isArray(n)?cCn(n):null==n?void 0:n.name},o=[{headerName:"Aspect Id",field:"id",cellRenderer:"searchable",filterParams:r,hide:!0},{headerName:"Scope",field:"scope",resizable:!0,filterParams:kCn(kCn({},r),{},{valueFormatter:e=>oCn(la(e))}),valueFormatter:e=>{let{data:n}=e;return oCn(n.scope)}},{headerName:"Scope (Tags)",cellRenderer:"searchable",field:"tags",resizable:!0,valueFormatter:e=>{let{data:n}=e;return sCn(n)},filterParams:r},{headerName:"Scope (Locations)",cellRenderer:"searchable",field:"locations",resizable:!0,valueFormatter:e=>{let{data:n}=e;return lCn(n)},filterParams:r},{headerName:"Departments",cellRenderer:"searchable",field:"departments",resizable:!0,filterParams:r,valueFormatter:i},{headerName:"Activity / Process",cellRenderer:"searchable",field:"activity",filterParams:r,valueFormatter:i},{headerName:"Environmental Aspect(s)",cellRenderer:"searchable",field:"aspects",filterParams:r,valueFormatter:i},{headerName:"Potential Environmental Impact(s)",cellRenderer:"searchable",field:"impacts",filterParams:r,valueFormatter:i},{headerName:"Legislation Reference(s)",field:"legislations",cellRenderer:"legislationReference",filterParams:r,valueFormatter:e=>{let{value:n}=e;return null==n?void 0:n.map(e=>e.title).join(", ")}},{headerName:"Likelihood (no control)",cellRenderer:"searchable",field:"likelihoodNoControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Severity (no control)",cellRenderer:"searchable",field:"severityNoControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Significance (no control)",field:"significanceNoControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Potential Emergency Condition(s)",cellRenderer:"searchable",field:"emergencyConditions",filterParams:r,valueFormatter:i},{headerName:"Relevant Control Measure(s)",cellRenderer:"searchable",field:"controlMeasures",filterParams:r,valueFormatter:i},{headerName:"Likelihood (with control)",cellRenderer:"searchable",field:"likelihoodControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Severity (with control)",cellRenderer:"searchable",field:"severityControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Significance (with control)",field:"significanceControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Review Date",field:"reviewDate",valueGetter:e=>e.data.reviewDate&&b3(e.data.reviewDate)||"",cellStyle:{textAlign:"center"},width:140,filter:"agDateColumnFilter",filterParams:{filterOptions:["equals","greaterThan","lessThan","notEqual","inRange",{displayKey:"emptyValue",displayName:"Empty",filter:(e,n)=>!n}]}},{headerName:"Created Date",field:"createdDate",valueGetter:e=>e.data.createdDate&&b3(e.data.createdDate)||"",cellStyle:{textAlign:"center"},width:140,filter:"agDateColumnFilter",filterParams:{filterOptions:["equals","greaterThan","lessThan","notEqual","inRange"]}},{headerName:"Owner",cellRenderer:"searchable",field:"owner.name",cellStyle:{textAlign:"center"},filterParams:r},{headerName:"Author",cellRenderer:"searchable",field:"author.name",cellStyle:{textAlign:"center"},filterParams:r},{headerName:"Status",cellRenderer:"searchable",field:"status",filterParams:r,valueFormatter:i,cellStyle:e=>{var t;const a=null==e||null===(t=e.value)||void 0===t?void 0:t.name;return TCn(a,n)}},{headerName:"Active Tasks",cellRenderer:"searchable",field:"activeTasks",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"",cellRenderer:"action",cellStyle:{textAlign:"center"},width:75,sortable:!1,filter:!1}];return{columnDefs:o,pagination:!0,paginationPageSizeSelector:!1,cacheBlockSize:25,paginationPageSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,wrapText:!0,autoHeight:!0,filterParams:{showTooltip:!0}}}}(),u=null===(n=(0,m.zy)().hash)||void 0===n||null===(t=n.slice)||void 0===t?void 0:t.call(n,1),{showNotification:p}=vt(),f=VCn();return(0,Ze.jsx)(qCn,{container:!0,item:!0,children:(0,Ze.jsx)(nD,$Cn($Cn({},d),{},{components:{legislationReference:e=>(0,Ze.jsx)(LCn,$Cn($Cn({},e),{},{searchValue:MCn()||FCn()})),action:e=>c.current&&(0,Ze.jsx)(ACn,$Cn($Cn({},e),{},{onEdit:a,onCopy:r})),searchable:e=>(0,Ze.jsx)(qJ,$Cn($Cn({},e),{},{searchValue:MCn()||FCn()}))},onFirstDataRendered:e=>{var n;u&&(null==o||null===(n=o.api)||void 0===n||n.forEachNodeAfterFilter(e=>{e.data.id===u&&e.setSelected(!0)})),o.onFirstDataRendered(e)},onGridReady:e=>{o.onGridReady(e),e.api.setGridOption("serverSideDatasource",{async getRows(e){let{request:n,success:t,fail:a}=e;try{const{rows:e,totalRows:a}=await f({accountId:l,offset:n.startRow,limit:25,sort:vCn(n.sortModel),filters:pCn(n.filterModel,MCn()||FCn())});return t({rowData:e,rowCount:a}),{rows:e,totalRows:a}}catch(e){p("Failed to update grid: ".concat(e),"danger"),de.Cp(e),a()}}})},onCellClicked:e=>{"action"!==e.colDef.cellRenderer&&s("/governance/environmental-aspects/".concat(e.data.id))},onFilterChanged:o.onFilterChanged,onSortChanged:o.onSortChanged,onColumnVisible:o.onSaveGridColumnState,onColumnPinned:o.onSaveGridColumnState,onColumnResized:o.onSaveGridColumnState,onColumnMoved:o.onSaveGridColumnState,onColumnRowGroupChanged:o.onSaveGridColumnState,onColumnValueChanged:o.onSaveGridColumnState,onColumnPivotChanged:o.onSaveGridColumnState,rowSelection:"single"}))})}var YCn;const HCn=Ge.default.div(YCn||(YCn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  z-index: 10000;\n"])));var KCn,QCn,ZCn=t(23555),XCn=t.n(ZCn),eSn=t(92322);function nSn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function tSn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nSn(Object(t),!0).forEach(function(n){aSn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nSn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function aSn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function rSn(){return rSn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},rSn.apply(null,arguments)}function iSn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const oSn=Ge.default.div(KCn||(KCn=iSn(["\n  display: flex;\n  align-items: center;\n  position: relative;\n"]))),lSn=(0,Ge.default)(ze.In)(QCn||(QCn=iSn(["\n  position: absolute;\n  right: ",";\n  cursor: pointer;\n  :hover {\n    color: ",";\n  }\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.colors.danger.light.text),sSn=e=>{let n=rSn({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));const t=(0,Ge.useTheme)(),{children:a,onDelete:r,data:i,innerProps:o,canDelete:l,clearValue:s,isSelected:c}=n,{showNotification:d}=vt();return(0,Ze.jsxs)(oSn,{children:[(0,Ze.jsx)(eSn.c.Option,tSn(tSn({},n),o)),!i.isGlobal&&!i.isDeleted&&"NEW"!==i.value&&r&&(0,Ze.jsx)(lSn,{onClick:()=>{if(!l)return d("You are not permitted to delete this option, please contact your business admin.","warning");r(i.id,i.type),c&&s()},id:a,name:a,icon:"times",color:t.colors.text.light.background,size:"1x"})]})};function cSn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dSn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cSn(Object(t),!0).forEach(function(n){uSn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cSn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function uSn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function pSn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{showNotification:n}=vt(),t=jy(),[a]=(0,Ot.n)(YD,dSn(dSn({},e),{},{onCompleted:function(){n("Aspect has been deleted","success"),e.onCompleted&&e.onCompleted(...arguments)},onError:t=>{n(t.message,"danger"),e.onError&&e.onError(t)}}));return async e=>{const{id:n,accountId:r}=e;await a({variables:e}),t([{fieldName:"getAspectsByAccountId",args:{accountId:r}},{fieldName:"getAspectOptions"},{fieldName:"getAspectById",args:{accountId:r,id:n}}])}}const mSn=["activities","aspects","emergencyConditions","impacts","controlMeasures","statuses"];function fSn(){const e=rt();return(0,h.IT)(nA,{variables:{accountId:e},notifyOnNetworkStatusChange:!0})}function ySn(e){var n,t,a,r,i,o;const l={text:[{field:"scope",filterType:Vt.pe.Text,type:Vt.II.Equals,filter:e.scope},{field:"activity.id",filterType:Vt.pe.Text,type:Vt.II.Equals,filter:e.activity}],set:[]};var s,c,d,u,p,m;return null!==(n=e.locationIds)&&void 0!==n&&n.length&&(null==l||null===(s=l.set)||void 0===s||s.push({field:"locations.id",filterType:Vt.pe.Set,values:e.locationIds})),null!==(t=e.tagIds)&&void 0!==t&&t.length&&(null==l||null===(c=l.set)||void 0===c||c.push({field:"tags.id",filterType:Vt.pe.Set,values:e.tagIds})),null!==(a=e.departments)&&void 0!==a&&a.length&&(null==l||null===(d=l.set)||void 0===d||d.push({field:"departments.id",filterType:Vt.pe.Set,values:e.departments})),null!==(r=e.aspects)&&void 0!==r&&r.length&&(null==l||null===(u=l.set)||void 0===u||u.push({field:"aspects.id",filterType:Vt.pe.Set,values:e.aspects})),null!==(i=e.impacts)&&void 0!==i&&i.length&&(null==l||null===(p=l.set)||void 0===p||p.push({field:"impacts.id",filterType:Vt.pe.Set,values:e.impacts})),null!==(o=e.legislationIds)&&void 0!==o&&o.length&&(null==l||null===(m=l.set)||void 0===m||m.push({field:"legislations.id",filterType:Vt.pe.Set,values:e.legislationIds})),l}function gSn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{showNotification:n}=vt(),t=jy(),[a]=(0,Ot.n)(XD,{onCompleted:function(){n("Deleted","success"),e.onCompleted&&e.onCompleted(...arguments)},onError:t=>{n(t.message,"danger"),e.onError&&e.onError(t)},refetchQueries:["GetAllAspectOptions"]});return async e=>{const{accountId:n,type:r}=e;await a({variables:e}),t([{fieldName:"getAspectOptions",args:{accountId:n,type:r}}])}}function bSn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function hSn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?bSn(Object(t),!0).forEach(function(n){vSn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bSn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function vSn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function xSn(e){let{accountId:n,portalRef:t,onError:a,onCompleted:r,onDismiss:i,onReviewAspects:o}=e;const{showNotification:l}=vt(),s=(0,m.Zp)(),c=gSn({onError:e=>{a(e),l(e.message,"danger")},onCompleted:()=>{r()}}),[d,u]=UCn();return(0,Ze.jsx)(Ze.Fragment,{children:t.current&&d&&(0,$Qe.createPortal)((0,Ze.jsx)(vN,{show:!!d,headingText:"Are you sure you want to delete this ".concat(Gw()(iA,d.option.type),"?"),bodyText:"This might affect ".concat(d.relatedAspectsCount," related aspects"),onConfirmAction:async()=>{await c({accountId:n,id:d.option.id,type:d.option.type}),l("".concat(d.option.name," has been deleted!")),u(null)},confirmButtonTitle:"Yes, delete",cancelButtonTitle:"Review aspects",onCancelAction:()=>{i(),o(),s("/governance/environmental-aspects"),u(hSn(hSn({},d),{},{isReviewingAspects:!0}))},onDismiss:()=>{i(),u(null)}}),t.current)})}var TSn;const OSn=(0,D.J1)(TSn||(TSn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetUsers($accountId: String!, $offset: Int, $limit: Int = 25, $sort: [SortCommand!], $filters: Filters) {\n    getUsers(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      rows {\n        id\n        firstName\n        lastName\n      }\n      totalRows\n    }\n  }\n"])));var kSn,jSn,CSn,SSn,NSn,wSn,DSn,ASn,RSn,PSn,LSn,ISn=t(76691);function ESn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function _Sn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ESn(Object(t),!0).forEach(function(n){FSn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ESn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function FSn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function BSn(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function USn(){return USn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},USn.apply(null,arguments)}function MSn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const VSn=(0,Ge.default)(ze.JU)(kSn||(kSn=MSn(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),zSn=Ge.default.form(jSn||(jSn=MSn(["\n  padding: 32px;\n"]))),GSn=Ge.default.div(CSn||(CSn=MSn(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),$Sn=(0,Ge.default)(ze.DZ)(SSn||(SSn=MSn(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),WSn=(0,Ge.default)(ze.fv)(NSn||(NSn=MSn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),qSn=(0,Ge.default)(WSn)(wSn||(wSn=MSn(["\n  flex-basis: 50%;\n"]))),JSn=(0,Ge.default)(ze.$n)(DSn||(DSn=MSn(["\n  width: 100%;\n  margin-top: 12px;\n"]))),YSn=(0,Ge.default)(ze.lr)(ASn||(ASn=MSn(["\n  .DayPickerInput-Overlay {\n    top: -340px;\n    left: 50%;\n  }\n"]))),HSn=Ge.default.div(RSn||(RSn=MSn(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),KSn=(0,Ge.default)(ze.fI)(PSn||(PSn=MSn(["\n  padding-top: ",";\n"])),e=>e.theme.geometry.lg.spacing),QSn=(0,Ge.default)(ze.$n)(LSn||(LSn=MSn(["\n  margin-right: ",";\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),ZSn={[rA.ACTIVITY]:"activity",[rA.ASPECT]:"aspects",[rA.IMPACT]:"impacts",[rA.EMERGENCY_CONDITION]:"emergencyConditions",[rA.CONTROL_MEASURE]:"controlMeasures",[rA.STATUS]:"status",[rA.DEPARTMENT]:"departments"},XSn=e=>{var n,t,a;let{accountId:r,title:i,submitTitle:o,submittingTitle:l,onDismiss:s,onSubmit:c,values:d={},modalPortalRef:u,isCopy:p,hideDelete:m=!1}=e;const{token:f}=at(),y=Pu(),b=bCn(d,r,f),[v,x]=(0,g.useState)({}),[T,O]=(0,g.useState)(b),[k,j]=(0,g.useState)(!1),[C,S]=(0,g.useState)(!1),[,w]=UCn(),{showNotification:D}=vt(),A=function(){const e=(0,N.m)();return async n=>{const{data:{getAspectsByAccountId:t}}=await e.query({query:KD,variables:n});return t}}(),R=function(){const e=VCn();return async n=>{const t=hCn(n,[],!1,!1,null),{totalRows:a}=await e({accountId:t.accountId,filters:ySn(t)});return a>=1}}(),{data:P}=(0,h.IT)(_ln,{variables:{accountId:r}}),L=fCn(null==P?void 0:P.getAllLegislation,"title").sort(Oa("label")),I=rc(),E=I.governance.some(e=>e.startsWith("createAspectOption")),_=I.governance.some(e=>e.startsWith("deleteAspectOption")),F=!!d.id,B=!m&&F&&((e,n,t)=>{var a,r;return!(null===(a=e.governance)||void 0===a||!a.find(e=>(null==e?void 0:e.startsWith(n))&&!e.includes("Option")&&!e.endsWith("Own")))||(null===(r=e.governance)||void 0===r?void 0:r.includes("".concat(n,"Own")))&&t})(I,"deleteAspect",(null===(n=d.author)||void 0===n?void 0:n.id)===f.sub),[U,M]=(0,g.useState)(!1),V=yCn(E),z=yCn(!1),{data:G,refetch:$}=fSn(),{departmentMultipleSelect:W,showCreateDepartment:q,setShowCreateDepartment:J}=Cu(null==y?void 0:y.departments,T.departments),Y=pSn({onError:()=>{j(!1)},onCompleted:()=>{s()}}),H=gSn(),K=(0,g.useCallback)(async e=>{const n=Object.values(G),t=XCn()(n).find(n=>n.id===e);if(!t)return;const{totalRows:a}=await A({accountId:r,filters:{set:[{filterType:Vt.pe.Set,field:xCn(t.type),values:[t.id]}]}});if(a>=1)return w({option:t,isReviewingAspects:!1,relatedAspectsCount:a});await H({accountId:r,id:t.id,type:t.type})},[G,r,w,A,H]),Q=m?void 0:K,Z=(0,g.useMemo)(()=>({Option:e=>{let n=USn({},(BSn(e),e));return(0,Ze.jsx)(sSn,_Sn(_Sn({},n),{},{onDelete:Q,canDelete:_}))}}),[_,Q]),X=(0,g.useMemo)(()=>({Option:e=>{let n=USn({},(BSn(e),e));return(0,Ze.jsx)(sSn,_Sn(_Sn({},n),{},{onDelete:Q,canDelete:!1}))}}),[Q]),[ee,ne]=(0,g.useState)([]),[te,ae]=(0,g.useState)(""),{data:re,loading:ie}=(0,h.IT)(OSn,{variables:{accountId:r,offset:0,sort:[{field:"firstName",order:"asc"}],filters:{text:[{filterType:Vt.pe.Text,field:"accountId",type:Vt.II.Equals,filter:r}],set:[...T.scope===Vt.HG.Location&&null!==(t=T.locationIds)&&void 0!==t&&t.length?[{filterType:Vt.pe.Set,field:"allowedLocations",values:T.locationIds.map(e=>e.value)}]:[],...T.scope===Vt.HG.Tag&&null!==(a=T.tagIds)&&void 0!==a&&a.length?[{filterType:Vt.pe.Set,field:"allowedTags",values:T.tagIds.map(e=>e.value)}]:[]]}},skip:!r||!T.scope}),oe=(0,g.useMemo)(()=>{var e;return(null==re||null===(e=re.getUsers)||void 0===e||null===(e=e.rows)||void 0===e?void 0:e.map(e=>({value:e.id,label:"".concat(e.firstName," ").concat(e.lastName)})))||[]},[re]),le=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];O(t=>_Sn(_Sn({},t),{},{[e]:n})),v[e]&&x(n=>_Sn(_Sn({},n),{},{[e]:null})),t.forEach(e=>{O(n=>_Sn(_Sn({},n),{},{[e]:Array.isArray(n[e])?[]:null}))})};return(0,Ze.jsxs)(ze.aF,{size:"md",onDismiss:s,dismissable:!0,show:!0,children:[(0,Ze.jsx)(ISn.A,{children:(0,Ze.jsx)(RA,{showCreateDepartment:q,setShowCreateDepartment:J,onComplete:async(e,n)=>{const t=T.departments||[];O(_Sn(_Sn({},T),{},{departments:[...t,{label:n.name,value:n.id}]}))},passedAccountId:r})}),C&&(0,Ze.jsx)(ISn.A,{children:(0,Ze.jsx)(AA,{accountId:r,type:C,onDismiss:()=>S(!1),onError:e=>D(e.message,"danger"),onCompleted:e=>{const{type:n,name:t,id:a}=e.createAspectOption;$(),S(!1);const r=ZSn[n];if(Array.isArray(T[r])){const e=T[r];O(_Sn(_Sn({},T),{},{[r]:[...e,{label:t,value:a}]}))}else O(_Sn(_Sn({},T),{},{[r]:a}));x(_Sn(_Sn({},v),{},{[r]:null})),D("".concat(Gw()(iA,n)," has been created!"))}})}),(0,Ze.jsx)(xSn,{accountId:r,portalRef:u,onReviewAspects:()=>{s()},onError:()=>{j(!1)},onCompleted:()=>{$({accountId:r})},onDismiss:()=>{w(null)}}),(0,Ze.jsxs)(zSn,{children:[(0,Ze.jsx)($Sn,{children:i}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Scope"})}),(0,Ze.jsx)(ze.l6,{options:Re,value:T.scope,onChange:e=>{le("scope",e.target.value,["ownerId","tagIds","locationIds"])},error:v.scope})]})}),T.scope===Vt.HG.Location&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Location(s)"})}),(0,Ze.jsx)(_D,{defaultOptions:!0,disabled:!1,accountId:r,value:T.locationIds,onChange:e=>{le("locationIds",e.target.select,["ownerId","tagIds"])},error:v.locationIds,isSubmitting:k})]})}),T.scope===Vt.HG.Tag&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Tag(s)"})}),(0,Ze.jsx)(PD,{accountId:r,value:T.tagIds,onChange:e=>{le("tagIds",e.target.select,["ownerId","locationIds"])},error:v.tagIds,isSubmitting:k})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Departments"})}),W(e=>{le("departments",e.target.select)},v.departments)]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Owner"})}),(0,Ze.jsx)(ze.l6,{value:oe.find(e=>e.value===T.ownerId)||null,options:oe,onChange:e=>{le("ownerId",e.target.value)},isLoading:ie,isClearable:!1,isDisabled:k,error:null==v?void 0:v.ownerId})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Activity / Process"})}),(0,Ze.jsx)(ze.l6,{options:V(null==G?void 0:G.activities),value:T.activity,onChange:e=>{gCn(e,()=>S(rA.ACTIVITY),()=>{le("activity",e.target.value)})},components:Z,error:v.activity})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Environmental Aspect(s)"})}),(0,Ze.jsx)(ze.KF,{options:V(null==G?void 0:G.aspects),value:T.aspects,onChange:e=>{gCn(e,()=>S(rA.ASPECT),()=>{le("aspects",e.target.select)})},error:v.aspects,components:Z})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Potential Environmental Impact(s)"})}),(0,Ze.jsx)(ze.KF,{options:V(null==G?void 0:G.impacts),value:T.impacts,onChange:e=>{gCn(e,()=>S(rA.IMPACT),()=>{le("impacts",e.target.select)})},error:v.impacts,components:Z})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Legislation Reference(s)"})}),(0,Ze.jsx)(ze.KF,{options:L,value:T.legislationIds,onChange:e=>{le("legislationIds",e.target.select)},error:v.legislationIds})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Likelihood (no control) (optional)"})}),(0,Ze.jsx)(ze.l6,{isClearable:!0,options:oA,value:String(T.likelihoodNoControl),onChange:e=>{le("likelihoodNoControl",e.target.value)},error:v.likelihoodNoControl})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Severity (no control) (optional)"})}),(0,Ze.jsx)(ze.l6,{isClearable:!0,options:lA,value:String(T.severityNoControl),onChange:e=>{le("severityNoControl",e.target.value)},error:v.severityNoControl})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Potential Emergency Condition(s) (optional)"})}),(0,Ze.jsx)(ze.KF,{options:V(null==G?void 0:G.emergencyConditions),value:T.emergencyConditions,onChange:e=>{gCn(e,()=>S(rA.EMERGENCY_CONDITION),()=>{le("emergencyConditions",e.target.select)})},error:v.emergencyConditions,components:Z})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Relevant Control Measure(s)"})}),(0,Ze.jsx)(ze.KF,{options:V(null==G?void 0:G.controlMeasures),value:T.controlMeasures,onChange:e=>{gCn(e,()=>S(rA.CONTROL_MEASURE),()=>{le("controlMeasures",e.target.select)})},error:v.controlMeasures,components:Z})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Likelihood (with control) (optional)"})}),(0,Ze.jsx)(ze.l6,{isClearable:!0,options:oA,value:String(T.likelihoodControl),onChange:e=>{le("likelihoodControl",e.target.value)},error:v.likelihoodControl})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Severity (with control) (optional)"})}),(0,Ze.jsx)(ze.l6,{isClearable:!0,options:lA,value:String(T.severityControl),onChange:e=>{le("severityControl",e.target.value)},error:v.severityControl})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Review date (optional)"})}),(0,Ze.jsx)(YSn,{placeholder:"Select review date",disabled:k,onDayClick:e=>{le("reviewDate",null==e?void 0:e.toISOString())},selectedDate:T.reviewDate?new Date(T.reviewDate):null})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(WSn,{item:!0,children:[(0,Ze.jsx)(GSn,{children:(0,Ze.jsx)(VSn,{children:"Status (optional)"})}),(0,Ze.jsx)(ze.l6,{isClearable:!0,options:z(null==G?void 0:G.statuses),value:T.status,onChange:e=>{gCn(e,()=>S(rA.STATUS),()=>{le("status",e.target.value)})},components:X,error:v.status})]})}),(0,Ze.jsx)(Jcn,{evidenceDocuments:ee,setEvidenceDocuments:ne,evidenceNotes:te,setEvidenceNotes:ae}),(null==v?void 0:v.general)&&(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(ze.EY,{color:"danger",name:"errorMessage",children:v.general})}),(0,Ze.jsxs)(ze.fI,{container:!0,children:[B&&(0,Ze.jsx)(qSn,{item:!0,grow:"1",children:(0,Ze.jsx)(JSn,{color:"danger",disabled:k,onClick:e=>{e.preventDefault(),M(!0)},children:"Delete"})}),(0,Ze.jsx)(qSn,{item:!0,grow:"1",children:(0,Ze.jsx)(JSn,{disabled:k,onClick:async e=>{e.preventDefault();const n=function(e){const n={};return e.scope||(n.scope="Scope is required"),e.scope!==Vt.HG.Location||e.locationIds&&e.locationIds.length||(n.locationIds="Location is required"),e.scope!==Vt.HG.Tag||e.tagIds&&e.tagIds.length||(n.tagIds="Tag is required"),e.activity||(n.activity="Activity / Process is required"),e.aspects&&e.aspects.length||(n.aspects="Environmental Aspect is required"),e.impacts&&e.impacts.length||(n.impacts="Potential Environmental Impact is required"),e.controlMeasures&&e.controlMeasures.length||(n.controlMeasures="Relevant Conrol Measure is required"),e.departments&&e.departments.length||(n.departments="Department is required"),n}(T);if(Object.keys(n).length)return x(n);if(p&&await R(T))return x({general:"It seems you are attempting to create an aspect which already exists. Please create a unique aspect."});j(!0);try{await c(T,te,ee)}catch(e){(0,de.Cp)(e)}finally{j(!1)}},children:k&&l?l:o})})]})]}),U&&(0,Ze.jsx)(ze.aF,{onDismiss:()=>M(!1),show:!0,name:"confirmationModal",children:(0,Ze.jsxs)(HSn,{children:[(0,Ze.jsx)(KSn,{item:!0,children:(0,Ze.jsx)(ze.DZ,{children:"Delete Aspect"})}),(0,Ze.jsx)(KSn,{item:!0,children:(0,Ze.jsx)(ze.EY,{children:"This action will permanently delete this aspect. Do you want to proceed?"})}),(0,Ze.jsxs)(KSn,{container:!0,distribution:"around",children:[(0,Ze.jsx)(QSn,{color:"danger",disabled:k,onClick:()=>{j(!0),Y({id:T.id,accountId:r})},children:"Delete"}),(0,Ze.jsx)(QSn,{disabled:k,onClick:()=>M(!1),children:"Cancel"})]})]})})]})};var eNn,nNn,tNn,aNn;function rNn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const iNn=(0,Ge.default)(ze.fI)(eNn||(eNn=rNn(["\n  padding-left: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.md.spacing),oNn=(0,Ge.default)(ze.fv)(nNn||(nNn=rNn(["\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),lNn=(0,Ge.default)(ze.Yq)(tNn||(tNn=rNn(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n"]))),sNn=(0,Ge.default)(lNn)(aNn||(aNn=rNn(["\n  color: red;\n  &:hover {\n    color: red;\n  }\n"])));function cNn(e){let{accountId:n,optionToDelete:t,onCancelReview:a}=e;const r=gSn({onCompleted:()=>{a()}});return(0,Ze.jsxs)(iNn,{alignItems:"center",container:!0,children:[(0,Ze.jsx)(oNn,{item:!0,span:6,children:(0,Ze.jsxs)(sNn,{color:"danger",onClick:()=>{r({accountId:n,type:t.option.type,id:t.option.id})},children:["Yes, delete ",t.option.name]})}),(0,Ze.jsx)(oNn,{item:!0,span:6,children:(0,Ze.jsx)(lNn,{to:"#",onClick:()=>{a()},children:"Cancel"})})]})}var dNn,uNn,pNn,mNn;function fNn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yNn=(0,Ge.default)(ze.fI)(dNn||(dNn=fNn(["\n  width: 100%;\n  flex-flow: row nowrap;\n  justify-content: center;\n"]))),gNn=(0,Ge.default)(ze.$n)(uNn||(uNn=fNn(["\n  width: 100%;\n"]))),bNn=(0,Ge.default)(ze.fv)(pNn||(pNn=fNn(["\n  padding: ",";\n  min-width: 200px;\n"])),e=>e.theme.geometry.xs.spacing),hNn=(0,Ge.default)(ze.DZ)(mNn||(mNn=fNn(["\n  text-align: center;\n  margin-bottom: ",";\n  padding: 20px;\n"])),e=>e.theme.geometry.sm.spacing),vNn=e=>{let{onConfirm:n}=e;return(0,Ze.jsxs)(ze.aF,{size:"md",onDismiss:()=>n(!1),show:!0,children:[(0,Ze.jsx)(hNn,{size:"lg",children:"Do you want to create an associated task?"}),(0,Ze.jsxs)(yNn,{container:!0,children:[(0,Ze.jsx)(bNn,{span:4,children:(0,Ze.jsx)(gNn,{color:"success",onClick:()=>n(!0),children:"Yes"})}),(0,Ze.jsx)(bNn,{span:4,children:(0,Ze.jsx)(gNn,{color:"info",onClick:()=>n(!1),children:"No"})})]})]})};function xNn(){const e=Kcn();let n;return async(t,a,r)=>{if(!t.length&&!a)return[];if(t.length){var i;const a=r.scope===Vt.HG.Tag?null===(i=r.tagIds)||void 0===i?void 0:i.map(e=>{let{value:n}=e;return n}):[];n=await e(t,a,"Aspects and Impacts")}return[{notes:a,documents:n}]}}function TNn(){return(0,Ot.n)(JD)}const ONn=e=>{let{isUpdate:n,aspectId:t}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:["Aspect successfully ",n?"updated":"created",".",!n&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)("span",{children:"You can check it "}),(0,Ze.jsx)(ze.Yq,{href:"/governance/environmental-aspects/".concat(t),target:"_blank",noreferrer:!0,noopener:!0,inline:!0,children:"here"})]})]})};var kNn,jNn;function CNn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function SNn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?CNn(Object(t),!0).forEach(function(n){NNn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):CNn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function NNn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function wNn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const DNn=(0,Ge.default)(ze.fI)(kNn||(kNn=wNn(["\n  flex: 1;\n  align-items: center;\n  & * {\n    margin-right: ",";\n  }\n"])),e=>e.theme.geometry.xs.spacing),ANn=(0,Ge.default)(ze.$n)(jNn||(jNn=wNn(["\n  width: 100%;\n"]))),RNn=()=>{const e=rt(),{data:n}=Td(),t=rc(),{showNotification:a}=vt(),[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)(null),[s,c]=function(){const[e,n]=(0,kd.useQueryParam)("showEditModal",kd.StringParam),t=rt(),{data:a}=(0,h.IT)(Rs,{skip:!t||!e,variables:{accountId:t,id:e}});return[null==a?void 0:a.getAspectById,n]}(),[d,u]=(0,g.useState)(null),[p,m]=(0,g.useState)(null),f=VCn(),[y,b]=_Cn(),v=(0,g.useCallback)(e=>pCn(e,y),[y]),[x,T]=UCn(),O=Dd(),k=(0,g.useRef)(null),j=(0,oE.useDebouncedCallback)(()=>{var e;null==O||null===(e=O.api)||void 0===e||e.refreshServerSide({purge:!0})},1e3);(0,g.useEffect)(()=>{x?null!=x&&x.isReviewingAspects&&j():j()},[y,x,j]);const{loading:C,data:S}=(0,h.IT)(Omn,{variables:{accountId:e},notifyOnNetworkStatusChange:!0}),N=Nln.filter(e=>!e.comingSoon&&n.comply[e.accessIndex]),w="Aspects & Impacts Register";if(N.push({title:w,link:"/governance/environmental-aspects"}),!C&&!S.getAvailableManagementSystems.find(e=>{let{title:n}=e;return n.includes("ISO14001")}))return(0,Ze.jsx)(eb,{name:"Forbidden_Aspects",error:new Error("Forbidden")});const D=function(e){let{onSave:n,onTaskSuggestion:t,onComplete:a}=e;const[r]=TNn(),{token:i}=at(),{showNotification:o}=vt(),l=xNn();return async e=>{let{evidenceDocuments:s,evidenceNotes:c,formState:d,intent:u}=e;try{const e=await l(s,c,d),{data:p}=await r({variables:{input:hCn(d,e,"edit"===u,"copy"===u,i)}}),m=p.createAspect;n(m),"edit"===u||null!=d&&d.taskId?a(m):t(d,m),o((0,Ze.jsx)(ONn,{aspectId:d.id,isUpdate:"edit"===u}),"success",{autoClose:2e4})}catch(e){(0,de.Cp)(e),o("Something went wrong, please try again or contact support","danger")}}}({onComplete:()=>j(),onSave:()=>{i(!1),c(""),l(null)},onTaskSuggestion:e=>u(e)}),A=(e,n,t)=>D({formState:e,evidenceDocuments:t,evidenceNotes:n,intent:s?"edit":o?"copy":void 0});return(0,Ze.jsxs)(ze.fv,{container:!0,item:!0,children:[(0,Ze.jsx)(HCn,{ref:k}),r&&(0,Ze.jsx)(XSn,{title:"Create Aspect",submitTitle:"Create Aspect",onDismiss:()=>i(!1),accountId:e,onSubmit:A,modalPortalRef:k}),o&&(0,Ze.jsx)(XSn,{title:"Duplicate Aspect",submitTitle:"Create Aspect",onDismiss:()=>l(null),accountId:e,onSubmit:A,values:SNn(SNn({},o),{},{id:void 0}),modalPortalRef:k,isCopy:!0}),s&&(0,Ze.jsx)(XSn,{title:"Edit Aspect",submitTitle:"Save Aspect",onDismiss:()=>c(""),accountId:e,onSubmit:A,values:s,modalPortalRef:k}),!!d&&(0,Ze.jsx)(vNn,{onConfirm:e=>{e?m(d):j(),u(null)}}),!!p&&(0,Ze.jsx)(ddn,{accountId:e,onDismiss:()=>m(null),onComplete:e=>{const n=null==e?void 0:e.message,t=null==e?void 0:e.colour;a(n,t)},defaultValues:{scope:p.scope,tagIds:p.tagIds,locationIds:p.locationIds,category:"GOVERNANCE",subject:"ASPECTS",item:{id:p.id}},disabled:{scope:!0,category:!0,subject:!0,locations:!0,tags:!0,[Vt.AR.Aspects]:!0}}),(0,Ze.jsx)(ige,{name:"Aspects",title:"Aspects",breadcrumbs:[{title:"Governance",to:".."},{title:w}],icon:"pencil-alt",iconColor:"tertiary",isDropdown:!0,dropdownItems:N,dropdownDefault:w,children:(0,Ze.jsxs)(DNn,{name:"ConfigurationAspectContainer__Controls",container:!0,alignItems:"center",children:[(0,Ze.jsx)(ze.fv,{item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationAspectContainer__Controls__Search",value:y,onChange:e=>b(e.target.value),hideButton:!0})}),(0,Ze.jsx)(ze.fv,{item:!0,children:(0,Ze.jsx)(SD,{gridApi:O.api})}),(0,Ze.jsx)(ze.fv,{item:!0,children:(0,Ze.jsx)(MP,{step:100,fetchRows:f,gridApi:O.api,defaultExportFileName:"aspects",columnsToSkip:["Actions"],label:"Export",customSortModelMapper:vCn,customFilterModelMapper:v})}),!!t.governance.find(e=>e.startsWith("createAspect"))&&(0,Ze.jsx)(ze.fv,{item:!0,children:(0,Ze.jsx)(ANn,{name:"ConfigurationAspectContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>i(!0),children:"+ Add Aspect"})})]})}),(null==x?void 0:x.isReviewingAspects)&&(0,Ze.jsx)(cNn,{optionToDelete:x,accountId:e,onCancelReview:()=>{T(null)}}),(0,Ze.jsx)(JCn,{showEditModal:c,showCopyModal:l,canEdit:!!t.governance.find(e=>e.startsWith("createAspect")),agGrid:O})]})};var PNn,LNn,INn=t(35885),ENn=t.n(INn);function _Nn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const FNn=(0,Ge.default)(ze.fv)(PNn||(PNn=_Nn(["\n  display: flex;\n  min-height: 300px;\n"]))),BNn=Ge.default.div(LNn||(LNn=_Nn(["\n  display: flex;\n  width: 100%;\n  height: 100%;\n  align-items: center;\n  justify-content: center;\n"]))),UNn=()=>{const{id:e}=(0,m.g)(),n=rt(),[t,a]=(0,g.useState)(null),r=rc(),{token:i}=at(),o=Dd(),{data:l,loading:s,refetch:c,error:d}=(0,h.IT)(ENn(),{variables:{accountId:n,userId:i.sub}}),u=((null==l?void 0:l.getTasksByAccountId)||[]).filter(n=>{var t;return(null===(t=n.item)||void 0===t?void 0:t.id)===e});return(0,Ze.jsxs)(FNn,{container:!0,item:!0,children:[s&&(0,Ze.jsx)(BNn,{children:(0,Ze.jsx)(ze.Ip,{})}),t&&(0,Ze.jsx)(Fun,{selectedTask:t,onDismiss:()=>a(null),disabled:{[Vt.AR.Aspects]:!0},sourcePage:"ASPECTS"}),d?(0,Ze.jsx)(ub,{error:d,retry:()=>c({accountId:n,userId:i.sub})}):!s&&(0,Ze.jsx)(uun,{canEdit:!!r.task.find(e=>e.startsWith("edit")),tasks:u,agGrid:o})]})};var MNn,VNn,zNn,GNn,$Nn,WNn,qNn,JNn,YNn,HNn,KNn;function QNn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const ZNn=Ge.default.div(MNn||(MNn=QNn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),XNn=Ge.default.div(VNn||(VNn=QNn(["\n  overflow: auto;\n  height: 100%;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),ewn=(0,Ge.default)(ze.$n)(zNn||(zNn=QNn(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),nwn=Ge.default.div(GNn||(GNn=QNn(["\n  display: flex;\n  flex-direction: column;\n  overflow: auto;\n  height: 100%;\n  width: 100%;\n  padding: ",";\n  padding-bottom: ",";\n  background-color: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.basic.white),twn=Ge.default.div($Nn||($Nn=QNn(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),awn=(0,Ge.default)(ze.fv)(WNn||(WNn=QNn(["\n  padding: 0 ",";\n"])),e=>e.theme.geometry.md.spacing),rwn=(0,Ge.default)(awn)(qNn||(qNn=QNn(["\n  flex-direction: row;\n  display: flex;\n\n  h2:first-child {\n    margin-right: ",";\n  }\n"])),e=>e.theme.geometry.sm.spacing),iwn=Ge.default.div(JNn||(JNn=QNn(["\n  display: flex;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),own=Ge.default.div(YNn||(YNn=QNn(["\n  border-bottom: 1px solid ",";\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  min-height: 100px;\n"])),e=>e.theme.colors.overlay.normal.background,e=>e.theme.geometry.lg.spacing),lwn=(0,Ge.default)(p.Link)(HNn||(HNn=QNn(["\n  text-decoration: underline;\n"]))),swn=Ge.default.div(KNn||(KNn=QNn(["\n  margin-top: 32px;\n"])));function cwn(){var e,n,t,a,r,i,o,l,s,c;const{id:d}=(0,m.g)(),u=(0,g.useRef)(null),p=rt(),f=rc(),{token:y}=at(),{showNotification:b}=vt(),[v,x]=(0,g.useState)(!1),[T,O]=(0,g.useState)(!1),[k,j]=(0,g.useState)([]),[C,S]=(0,g.useState)(""),[N,w]=(0,g.useState)(!1),{data:D,loading:A,error:R,refetch:P}=function(e){return function(e,n){return(0,h.IT)(Rs,{variables:{id:e,accountId:n}})}(e,rt())}(d),L=null==D?void 0:D.getAspectById,I=L&&bCn(L,p,y),[E]=TNn(),_=(e=>{if(!e)return null;const n=oCn(e.scope);return e.scope===Vt.HG.Location?"".concat(n,": ").concat(lCn(e)):e.scope===Vt.HG.Tag?"".concat(n,": ").concat(sCn(e)):n})(L),F=!!R,B=!F&&!!L&&!A,U=!!f.governance.find(e=>e.startsWith("createAspect")),M=xNn(),V=()=>{O(!1),S(""),j([])},z=async(e,n,t)=>{try{const a=await M(t,n,e);await E({variables:{input:hCn(e,a,!0,!1,y)}}),w(!1),V(),P({id:d}),b("Aspect successfully updated","success")}catch(e){b("Something went wrong, please try again or contact support","danger")}};return(0,Ze.jsxs)(ZNn,{children:[(0,Ze.jsx)(HCn,{ref:u}),(0,Ze.jsx)(ige,{name:"Aspect",title:"Aspect",breadcrumbs:[{title:"Governance",to:"/governance"},{title:"Aspects & Impacts Register",to:"/governance/environmental-aspects"}],icon:"pencil-alt",iconColor:"tertiary",children:B&&(0,Ze.jsxs)("div",{children:[U&&(0,Ze.jsx)(ewn,{name:"TasksHome__Button--create",inline:!0,color:"info",onClick:()=>w(!0),children:"Edit Aspect"}),!!f.task.find(e=>e.startsWith("create"))&&(0,Ze.jsx)(ewn,{"data-cy":"TasksHome__Button--create",inline:!0,color:"primary",onClick:()=>x(!0),children:"+ Create Task"}),!!f.task.find(e=>e.startsWith("edit"))&&(0,Ze.jsx)(ewn,{"data-cy":"TasksHome__Button--create",inline:!0,color:"tertiary",onClick:()=>O(!0),children:"Add Evidence"})]})}),(0,Ze.jsxs)(XNn,{children:[A&&(0,Ze.jsx)(twn,{children:(0,Ze.jsx)(ze.Ip,{})}),F&&(0,Ze.jsx)(eb,{error:new Error("Not available")}),v&&(0,Ze.jsx)(ddn,{accountId:p,onDismiss:()=>x(!1),onComplete:e=>{const n=null==e?void 0:e.message,t=null==e?void 0:e.colour;b(n,t)},defaultValues:{scope:null==L?void 0:L.scope,tagIds:null==L||null===(e=L.tags)||void 0===e?void 0:e.filter(Boolean).map(e=>({value:null==e?void 0:e.id,label:null==e?void 0:e.tagName})),locationIds:null==L||null===(n=L.locations)||void 0===n?void 0:n.filter(Boolean).map(e=>({value:null==e?void 0:e.id,label:null==e?void 0:e.name})),category:Vt.Ix.Governance,subject:Vt.AR.Aspects,item:{id:d}},disabled:{scope:!0,category:!0,subject:!0,locations:!0,tags:!0,[Vt.AR.Aspects]:!0}}),N&&(0,Ze.jsx)(XSn,{title:"Edit Aspect",submitTitle:"Save Aspect",onDismiss:()=>w(!1),accountId:p,onSubmit:z,values:L,isCopy:!1,modalPortalRef:u}),T&&(0,Ze.jsx)(ze.aF,{show:!0,size:"md",onDismiss:V,height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(nwn,{children:[(0,Ze.jsx)(ze.DZ,{children:"Add Evidence"}),(0,Ze.jsx)(Jcn,{evidenceDocuments:k,setEvidenceDocuments:j,evidenceNotes:C,setEvidenceNotes:S}),(0,Ze.jsx)(ze.$n,{disabled:!k.length&&!C,onClick:I&&(()=>z(I,C,k)),children:"Save Evidence"})]})}),B&&(0,Ze.jsxs)(nwn,{children:[(0,Ze.jsxs)(own,{children:[(0,Ze.jsxs)(rwn,{span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Status: "}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:null==L||null===(t=L.status)||void 0===t?void 0:t.name})]}),(0,Ze.jsxs)(rwn,{span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Review Date: "}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:Ht(null==L?void 0:L.reviewDate)})]})]}),(0,Ze.jsxs)(iwn,{children:[(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Scope:"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:_})]}),(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Departments:"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:dCn(null==L?void 0:L.departments)})]})]}),(0,Ze.jsxs)(iwn,{children:[(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Activity / Process:"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:null==L||null===(a=L.activity)||void 0===a?void 0:a.name})]}),(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Environmental Aspect(s):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:dCn(null==L?void 0:L.aspects)})]})]}),(0,Ze.jsxs)(iwn,{children:[(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Potential Environmental Impact(s):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:dCn(null==L?void 0:L.impacts)})]}),(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Legislation Reference(s):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:(null==L||null===(r=L.legislations)||void 0===r?void 0:r.map((e,n)=>{var t;return e&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(lwn,{to:"/governance/legislation/"+d,children:e.title}),n+1!==(null==L||null===(t=L.legislations)||void 0===t?void 0:t.length)?(0,Ze.jsx)("br",{}):null]})}))||"-"})]})]}),(0,Ze.jsxs)(iwn,{children:[(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Relevant Control Measure(s):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:dCn(null==L?void 0:L.controlMeasures)})]}),(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Potential Emergency Condition(s):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:dCn(null==L?void 0:L.emergencyConditions)})]})]}),(0,Ze.jsxs)(iwn,{children:[(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Likelihood (no control):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:(null==L?void 0:L.likelihoodNoControl)||0})]}),(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Likelihood (with control):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:(null==L?void 0:L.likelihoodControl)||0})]})]}),(0,Ze.jsxs)(iwn,{children:[(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Severity (no control):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:(null==L?void 0:L.severityNoControl)||0})]}),(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Severity (with control):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:(null==L?void 0:L.severityControl)||0})]})]}),(0,Ze.jsxs)(iwn,{children:[(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Significance (no control):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:(null==L?void 0:L.significanceNoControl)||0})]}),(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Significance (with control):"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:(null==L?void 0:L.significanceControl)||0})]})]}),(0,Ze.jsx)(iwn,{children:(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Aspect Owner:"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:(null==L||null===(i=L.owner)||void 0===i?void 0:i.name)||"Not assigned"})]})}),(0,Ze.jsxs)(iwn,{children:[(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Aspect Creator:"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:null==L||null===(o=L.author)||void 0===o?void 0:o.name})]}),(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Edited by:"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:(null==L||null===(l=L.editor)||void 0===l?void 0:l.name)||"-"})]})]}),(0,Ze.jsxs)(iwn,{children:[(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Date Created:"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:null!=L&&L.createdDate?Ht(null==L?void 0:L.createdDate):"-"})]}),(0,Ze.jsxs)(awn,{item:!0,span:6,children:[(0,Ze.jsx)(ze.EY,{children:"Date last edited:"}),(0,Ze.jsx)(ze.EY,{color:"dark",weight:"bold",children:null!=L&&L.editedDate?Ht(null==L?void 0:L.editedDate):"-"})]})]}),(0,Ze.jsx)(own,{children:(0,Ze.jsx)(rwn,{span:12,children:(0,Ze.jsx)(ze.DZ,{children:"Tasks"})})}),(0,Ze.jsx)(UNn,{}),(0,Ze.jsx)(swn,{children:(0,Ze.jsx)(iwn,{children:(0,Ze.jsxs)(awn,{span:12,children:[(0,Ze.jsx)(ze.DZ,{children:"Evidence"}),!(null===(s=L.evidenceNotes)||void 0===s||!s.length)&&L.evidenceNotes.map(e=>(0,Ze.jsx)(Acn,{evidence:e},JSON.stringify(e))),!(null!==(c=L.evidenceNotes)&&void 0!==c&&c.length)&&(0,Ze.jsx)(ze.EY,{children:"Currently there is no evidence assigned to this task."})]})})})]}),!A&&!B&&(0,Ze.jsx)(Qg,{name:"Aspect_Forbidden",error:new Error("You do not have access to this aspect")})]})]})}var dwn,uwn,pwn,mwn,fwn,ywn,gwn,bwn,hwn,vwn,xwn;function Twn(){return Twn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Twn.apply(null,arguments)}function Own(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kwn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Own(Object(t),!0).forEach(function(n){jwn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Own(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jwn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Cwn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Swn=(0,Ge.default)(ze.JU)(dwn||(dwn=Cwn(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),Nwn=Ge.default.form(uwn||(uwn=Cwn(["\n  padding: 32px;\n"]))),wwn=Ge.default.div(pwn||(pwn=Cwn(["\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),Dwn=(0,Ge.default)(ze.DZ)(mwn||(mwn=Cwn(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),Awn=(0,Ge.default)(ze.fv)(fwn||(fwn=Cwn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Rwn=(0,Ge.default)(Awn)(ywn||(ywn=Cwn(["\n  flex-basis: 50%;\n"]))),Pwn=(0,Ge.default)(ze.$n)(gwn||(gwn=Cwn(["\n  width: 100%;\n  margin-top: 12px;\n"]))),Lwn=(0,Ge.default)(ze.lr)(bwn||(bwn=Cwn(["\n  .DayPickerInput-Overlay {\n    top: -340px;\n    left: 50%;\n  }\n"]))),Iwn=Ge.default.div(hwn||(hwn=Cwn(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),Ewn=(0,Ge.default)(ze.fI)(vwn||(vwn=Cwn(["\n  padding-top: ",";\n"])),e=>e.theme.geometry.lg.spacing),_wn=(0,Ge.default)(ze.$n)(xwn||(xwn=Cwn(["\n  margin-right: ",";\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),Fwn=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";return(null==e?void 0:e.filter(Boolean).map(e=>kwn(kwn({},e),{},{label:e[n],value:e[t]})))||[]},Bwn=(e,n,t)=>{var a;(Array.isArray(e.target.select)?e.target.select.find(e=>{let{value:n}=e;return"NEW"===n}):"NEW"===(null===(a=e.target.select)||void 0===a?void 0:a.value))?n(e):t(e)},Uwn=e=>e?e.map(e=>({label:e,value:e})):[],Mwn=(e,n,t)=>{var a;return{id:e.id||(0,Ai.A)(),accountId:n,scope:e.scope,locationIds:Fwn(e.locations),tagIds:Fwn(e.tags,"tagName"),activity:e.activity||null,departments:Uwn(e.departments),risks:Uwn(e.risks),impacts:Uwn(e.impacts),legislationIds:Fwn(e.legislations,"title"),likelihoodNoControl:e.likelihoodNoControl,severityNoControl:e.severityNoControl,emergencyConditions:Uwn(e.emergencyConditions),controlMeasures:Uwn(e.controlMeasures),likelihoodControl:e.likelihoodControl,severityControl:e.severityControl,reviewDate:e.reviewDate,status:e.status,taskId:null===(a=e.task)||void 0===a?void 0:a.id,authorId:e.authorId||t.sub}},Vwn=e=>{let{accountId:n,title:t,submitTitle:a,onDismiss:r,onSubmit:i,values:o={},isCopy:l}=e;const{token:s}=at(),c=Pu(),d=Mwn(o,n,s),[u,p]=(0,g.useState)({}),[m,f]=(0,g.useState)(d),[y,b]=(0,g.useState)(!1),[h,v]=(0,g.useState)(!1),{showNotification:x}=vt(),{departmentMultipleSelect:T,showCreateDepartment:O,setShowCreateDepartment:k}=Cu(c.departments,m.departments),j=rc(),C=j.governance.find(e=>e.startsWith("deleteRiskOption")),S=!!o.id&&((e,n,t)=>!!e.governance.find(e=>e.startsWith(n)&&!e.includes("Option")&&!e.endsWith("Own"))||e.governance.includes("".concat(n,"Own"))&&t)(j,"deleteRisk",o.authorId===s.sub),[N,w]=(0,g.useState)(!1),D=[];let A=[];o.activity&&!D.find(e=>{let{value:n}=e;return n===o.activity})&&D.push({value:o.activity,label:o.activity,isDeleted:!0});const R={[rA.ACTIVITY]:"activity",[rA.RISK]:"risks",[rA.IMPACT]:"impacts",[rA.EMERGENCY_CONDITION]:"emergencyConditions",[rA.CONTROL_MEASURE]:"controlMeasures",[rA.STATUS]:"status",[rA.DEPARTMENT]:"departments"},P=e=>(e=>{A=A.filter(n=>n.id!==e)})(e),L={Option:e=>{let n=Twn({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,Ze.jsx)(sSn,kwn(kwn({},n),{},{onDelete:P,canDelete:C}))}};return(0,Ze.jsxs)(ze.aF,{size:"md",onDismiss:r,dismissable:!0,show:!0,children:[(0,Ze.jsx)(RA,{showCreateDepartment:O,setShowCreateDepartment:k,onComplete:async(e,n)=>{f(kwn(kwn({},m),{},{departments:[...m.departments,{label:n.name,value:n.departmentId}]}))}}),h&&(0,Ze.jsx)(AA,{accountId:n,type:h,onDismiss:()=>v(!1),onError:e=>x(e.message,"danger"),onCompleted:e=>{const{type:n,name:t}=e.createRiskOption;v(!1);const a=R[n];Array.isArray(m[a])?f(kwn(kwn({},m),{},{[a]:[...m[a],{label:t,value:t}]})):f(kwn(kwn({},m),{},{[a]:t})),p(kwn(kwn({},u),{},{[a]:null})),x("".concat(iA[n]," has been created!"))}}),(0,Ze.jsxs)(Nwn,{children:[(0,Ze.jsx)(Dwn,{children:t}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Scope"})}),(0,Ze.jsx)(ze.l6,{options:Re,value:m.scope,onChange:e=>{f(kwn(kwn({},m),{},{scope:e.target.value,tagIds:null,locationIds:null})),p(kwn(kwn({},u),{},{scope:null,tagIds:null,locationIds:null}))},error:u.scope})]})}),m.scope===Ce&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Location(s)"})}),(0,Ze.jsx)(_D,{accountId:n,value:m.locationIds,onChange:e=>{f(kwn(kwn({},m),{},{locationIds:e.target.select})),p(kwn(kwn({},u),{},{locationIds:null}))},error:u.locationIds,isSubmitting:y})]})}),m.scope===Ne&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Tag(s)"})}),(0,Ze.jsx)(PD,{accountId:n,value:m.tagIds,onChange:e=>{f(kwn(kwn({},m),{},{tagIds:e.target.select})),p(kwn(kwn({},u),{},{tagIds:null}))},error:u.tagIds,isSubmitting:y})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Departments"})}),T(e=>{f(kwn(kwn({},m),{},{departments:e.target.select})),p(kwn(kwn({},u),{},{departments:null}))})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Activity / Process"})}),(0,Ze.jsx)(ze.l6,{options:D,value:m.activity,onChange:e=>{Bwn(e,()=>v(rA.ACTIVITY),()=>{f(kwn(kwn({},m),{},{activity:e.target.value})),p(kwn(kwn({},u),{},{activity:null}))})},components:L,error:u.activity})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Identified Hazards"})}),(0,Ze.jsx)(ze.l6,{options:[],value:m.hazzards,onChange:e=>{Bwn(e,()=>v(rA.HAZZARDS),()=>{f(kwn(kwn({},m),{},{hazzards:e.target.value})),p(kwn(kwn({},u),{},{hazzards:null}))})},components:L,error:u.activity})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Who may be effected"})}),(0,Ze.jsx)(ze.l6,{options:[],value:m.whoIsEffected,onChange:e=>{Bwn(e,()=>v(rA.WHOISEFFECTED),()=>{f(kwn(kwn({},m),{},{whoIsEffected:e.target.value})),p(kwn(kwn({},u),{},{whoIsEffected:null}))})},components:L,error:u.activity})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Environmental Risk(s)"})}),(0,Ze.jsx)(ze.KF,{options:A,value:m.risks,onChange:e=>{Bwn(e,()=>v(rA.RISK),()=>{f(kwn(kwn({},m),{},{risks:e.target.select})),p(kwn(kwn({},u),{},{risks:null}))})},error:u.risks,components:L})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Potential Environmental Impact(s)"})}),(0,Ze.jsx)(ze.KF,{options:[],value:m.impacts,onChange:e=>{Bwn(e,()=>v(rA.IMPACT),()=>{f(kwn(kwn({},m),{},{impacts:e.target.select})),p(kwn(kwn({},u),{},{impacts:null}))})},error:u.impacts,components:L})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Legislation Reference(s)"})}),(0,Ze.jsx)(ze.KF,{options:[],value:m.legislationIds,onChange:e=>{f(kwn(kwn({},m),{},{legislationIds:e.target.select})),p(kwn(kwn({},u),{},{legislationIds:null}))},error:u.legislationIds})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Likelihood (no control) (optional)"})}),(0,Ze.jsx)(ze.l6,{isClearable:!0,options:oA,value:String(m.likelihoodNoControl),onChange:e=>{f(kwn(kwn({},m),{},{likelihoodNoControl:e.target.value})),p(kwn(kwn({},u),{},{likelihoodNoControl:null}))},error:u.likelihoodNoControl})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Severity (no control) (optional)"})}),(0,Ze.jsx)(ze.l6,{isClearable:!0,options:lA,value:String(m.severityNoControl),onChange:e=>{f(kwn(kwn({},m),{},{severityNoControl:e.target.value})),p(kwn(kwn({},u),{},{severityNoControl:null}))},error:u.severityNoControl})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Potential Emergency Condition(s)"})}),(0,Ze.jsx)(ze.KF,{options:[],value:m.emergencyConditions,onChange:e=>{Bwn(e,()=>v(rA.EMERGENCY_CONDITION),()=>{f(kwn(kwn({},m),{},{emergencyConditions:e.target.select})),p(kwn(kwn({},u),{},{emergencyConditions:null}))})},error:u.emergencyConditions,components:L})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Relevant Control Measure(s)"})}),(0,Ze.jsx)(ze.KF,{options:[],value:m.controlMeasures,onChange:e=>{Bwn(e,()=>v(rA.CONTROL_MEASURE),()=>{f(kwn(kwn({},m),{},{controlMeasures:e.target.select})),p(kwn(kwn({},u),{},{controlMeasures:null}))})},error:u.controlMeasures,components:L})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Likelihood (with control) (optional)"})}),(0,Ze.jsx)(ze.l6,{isClearable:!0,options:oA,value:String(m.likelihoodControl),onChange:e=>{f(kwn(kwn({},m),{},{likelihoodControl:e.target.value})),p(kwn(kwn({},u),{},{likelihoodControl:null}))},error:u.likelihoodControl})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Severity (with control) (optional)"})}),(0,Ze.jsx)(ze.l6,{isClearable:!0,options:lA,value:String(m.severityControl),onChange:e=>{f(kwn(kwn({},m),{},{severityControl:e.target.value})),p(kwn(kwn({},u),{},{severityControl:null}))},error:u.severityControl})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Review date (optional)"})}),(0,Ze.jsx)(Lwn,{placeholder:"Select review date",disabled:y,onDayClick:e=>{f(kwn(kwn({},m),{},{reviewDate:null==e?void 0:e.toISOString()})),p(kwn(kwn({},u),{},{reviewDate:null}))},selectedDate:m.reviewDate?new Date(m.reviewDate):null})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(Awn,{item:!0,children:[(0,Ze.jsx)(wwn,{children:(0,Ze.jsx)(Swn,{children:"Status (optional)"})}),(0,Ze.jsx)(ze.l6,{isClearable:!0,options:[],value:m.status,onChange:e=>{Bwn(e,()=>v(rA.STATUS),()=>{f(kwn(kwn({},m),{},{status:e.target.value})),p(kwn(kwn({},u),{},{status:null}))})},components:L,error:u.status})]})}),(null==u?void 0:u.general)&&(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(ze.EY,{color:"danger",name:"errorMessage",children:u.general})}),(0,Ze.jsxs)(ze.fI,{container:!0,children:[S&&(0,Ze.jsx)(Rwn,{item:!0,grow:"1",children:(0,Ze.jsx)(Pwn,{color:"danger",disabled:y,onClick:e=>{e.preventDefault(),w(!0)},children:"Delete"})}),(0,Ze.jsx)(Rwn,{item:!0,grow:"1",children:(0,Ze.jsx)(Pwn,{disabled:y,onClick:async e=>{e.preventDefault();const n=function(e){const n={};return e.scope||(n.scope="Scope is required"),e.scope!==Ce||e.locationIds&&e.locationIds.length||(n.locationIds="Location is required"),e.scope!==Ne||e.tagIds&&e.tagIds.length||(n.tagIds="Tag is required"),e.activity||(n.activity="Activity / Process is required"),e.risks&&e.risks.length||(n.risks="Environmental Risk is required"),e.hazzards||(n.activity="Identified Hazzards is required"),e.whoIsEffected||(n.risks="Who may be effected is required"),e.impacts&&e.impacts.length||(n.impacts="Potential Environmental Impact is required"),e.emergencyConditions&&e.emergencyConditions.length||(n.emergencyConditions="Potential Emergency Conditions is required"),e.controlMeasures&&e.controlMeasures.length||(n.controlMeasures="Relevant Conrol Measure is required"),n}(m);return Object.keys(n).length?p(n):l&&((e,n)=>{const t=["scope","locationIds","tagIds","departments","activity","risks","impacts","legislationReference"],a=Gt().pick(Mwn(e),t),r=Gt().pick(n,t);return Gt().isEqual(a,r)})(o,m)?p({general:"It seems you are attempting to create an risk which already exists. Please create a unique risk."}):(b(!0),await i(m),void b(!1))},children:a})})]})]}),N&&(0,Ze.jsx)(ze.aF,{onDismiss:()=>w(!1),show:!0,name:"confirmationModal",children:(0,Ze.jsxs)(Iwn,{children:[(0,Ze.jsx)(Ewn,{item:!0,children:(0,Ze.jsx)(ze.DZ,{children:"Delete Risk"})}),(0,Ze.jsx)(Ewn,{item:!0,children:(0,Ze.jsx)(ze.EY,{children:"This action will permanently delete this risk. Do you want to proceed?"})}),(0,Ze.jsxs)(Ewn,{container:!0,distribution:"around",children:[(0,Ze.jsx)(_wn,{color:"danger",disabled:y,onClick:()=>{b(!0),m.id,x("Risk has been deleted!"),r()},children:"Delete"}),(0,Ze.jsx)(_wn,{disabled:y,onClick:()=>w(!1),children:"Cancel"})]})]})})]})};var zwn,Gwn,$wn,Wwn;function qwn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Jwn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qwn(Object(t),!0).forEach(function(n){Ywn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qwn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ywn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Hwn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Kwn=(0,Ge.default)(ze.fI)(zwn||(zwn=Hwn(["\n  flex: 1;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),Qwn=(0,Ge.default)(p.Link)(Gwn||(Gwn=Hwn(["\n  text-decoration: underline;\n  margin-right: 10px;\n  &:hover {\n    text-decoration: none;\n  }\n"]))),Zwn=Ge.default.div($wn||($wn=Hwn(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),Xwn=Ge.default.a(Wwn||(Wwn=Hwn(["\n  margin: 0 5px;\n  display: inline-block;\n  text-align: center;\n  color: ",";\n\n  &:hover {\n    color: ",";\n    cursor: pointer;\n  }\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.colors.text.dark.background),eDn=e=>e.data.legislations.length?e.data.legislations.map(e=>(0,Ze.jsx)(Qwn,{to:"/governance/legislation/".concat(e.id),children:e.title},e.id)):"Not exist",nDn=e=>{let{data:{id:n},onEdit:t,onCopy:a}=e;return(0,Ze.jsxs)(Zwn,{children:[(0,Ze.jsx)(Xwn,{onClick:()=>t(n),children:(0,Ze.jsx)(ze.In,{name:"account-row__edit--".concat(n),title:"Edit",icon:"pencil-alt"})}),(0,Ze.jsx)(Xwn,{onClick:()=>a(n),children:(0,Ze.jsx)(ze.In,{name:"account-row__copy--".concat(n),title:"Duplicate",icon:"copy"})})]})};function tDn(e){var n,t;let{risks:a,showEditModal:r,showCopyModal:i,canEdit:o,currentAccount:l,agGrid:s}=e;const c=(0,m.Zp)(),d=(0,g.useRef)(),u=(0,g.useRef)();u.current=l,d.current=o;const p=[{headerName:"Scope",field:"scopeLevel",resizable:!0},{headerName:"Scope (Tags)",field:"scopeTags",resizable:!0},{headerName:"Scope (Locations)",field:"scopeLocations",resizable:!0},{headerName:"Departments",field:"departments",valueGetter:e=>{const n=e.data.departments;return n?n.join(", "):null},resizable:!0,filterParams:{valueFormatter:e=>{if(!e.value)return e.value;const n=(0,zt.find)(u.current.departments,{id:e.value});return n?n.name:null}}},{headerName:"Activity / Process",field:"activity"},{headerName:"Identified Hazards",field:"hazzards"},{headerName:"Who may be effected",field:"whoIsEffected"},{headerName:"Legislation Reference(s)",field:"legislations",valueGetter:e=>e.data.legislations.filter(Boolean).map(e=>{let{title:n}=e;return n}).join(",")||"Not exist",cellRenderer:"legislationReference"},{headerName:"Likelihood (no control)",field:"likelihoodNoControl",cellStyle:{textAlign:"center"}},{headerName:"Severity (no control)",field:"severityNoControl",cellStyle:{textAlign:"center"}},{headerName:"Significance (no control)",valueGetter:e=>(e=>{let{likelihoodNoControl:n,severityNoControl:t}=e;return n&&t?n*t:null})(e.data),cellStyle:{textAlign:"center"}},{headerName:"Potential Emergency Condition(s)",field:"emergencyConditions"},{headerName:"Relevant Control Measure(s)",field:"controlMeasures"},{headerName:"Likelihood (with control)",field:"likelihoodControl",cellStyle:{textAlign:"center"}},{headerName:"Severity (with control)",field:"severityControl",cellStyle:{textAlign:"center"}},{headerName:"Significance (with control)",valueGetter:e=>(e=>{let{likelihoodControl:n,severityControl:t}=e;return n&&t?n*t:null})(e.data),cellStyle:{textAlign:"center"}},{headerName:"Review Date",valueGetter:e=>e.data.reviewDate&&b3(e.data.reviewDate)||"",cellStyle:{textAlign:"center"},width:140,filter:"agDateColumnFilter",filterParams:{filterOptions:["equals","greaterThan","lessThan","notEqual","inRange",{displayKey:"emptyValue",displayName:"Empty",filter:function(e,n){if(""===n)return!0}}],comparator:function(e,n){const t=n.split("/"),a=new Date(Number(t[2]),Number(t[1])-1,Number(t[0]));return e.getTime()===a.getTime()?0:a<e?-1:a>e?1:void 0},buttons:["reset","apply"]}},{headerName:"Status",field:"status",cellStyle:{textAlign:"center"}},{headerName:"",cellRenderer:"action",cellStyle:{textAlign:"center"},width:75,sortable:!1,filter:!1}],f=null===(n=(0,m.zy)().hash)||void 0===n||null===(t=n.slice)||void 0===t?void 0:t.call(n,1),y={legislationReference:eDn,action:e=>(0,Ze.jsx)(nDn,Jwn(Jwn({},e),{},{onEdit:r,onCopy:i}))},b=["action"];return(0,Ze.jsx)(Kwn,{container:!0,item:!0,children:(0,Ze.jsx)(nD,{defaultColDef:{sortable:!0,resizable:!0,filter:!0,wrapText:!0,autoHeight:!0},columnDefs:p,rowData:a,components:y,onFirstDataRendered:()=>{f&&s.api.forEachNodeAfterFilter(e=>{e.data.id===f&&e.setSelected(!0)}),s.onFirstDataRendered()},onCellClicked:e=>{b.includes(e.colDef.cellRenderer)||c("/governance/health-and-safety-risk-register/".concat(e.data.id))},onGridReady:s.onGridReady,onFilterChanged:s.onFilterChanged,onSortChanged:s.onSortChanged,onColumnVisible:s.onSaveGridColumnState,onColumnPinned:s.onSaveGridColumnState,onColumnResized:s.onSaveGridColumnState,onColumnMoved:s.onSaveGridColumnState,onColumnRowGroupChanged:s.onSaveGridColumnState,onColumnValueChanged:s.onSaveGridColumnState,onColumnPivotChanged:s.onSaveGridColumnState,rowSelection:"single"})})}const aDn=JSON.parse('{"z":[{"id":1,"scope":"ACCOUNT","tags":[{"tagName":"Organisation"}],"locations":"Organisation","departments":[],"activity":"Cleaning floors","hazzards":"Trip hazard","whoIsEffected":"Office staff","legislations":[{"title":"Animal By-Products Regulation (EU) No. 1069/2009 (ABP)","id":"d9621621-8b83-4b0c-8a17-c6768c70f611"}],"likelihoodNoControl":3,"severityNoControl":2,"emergencyConditions":"Evacuations","controlMeasures":"Signage, Battery opporated applicances","likelihoodControl":3,"severityControl":2,"reviewDate":"2020-07-01T10:00:00.000Z","status":""},{"id":2,"scope":"ACCOUNT","tags":[{"tagName":"Organisation"}],"locations":"Organisation","departments":[],"activity":"Use of chemical","hazzards":"Chemical burns, Poisoning","whoIsEffected":"Lab Technicians, Cleaning Staff","legislations":[{"title":"COSHH Regulations","id":"495ca387-5fd1-4bf9-961a-496008401509"}],"likelihoodNoControl":3,"severityNoControl":2,"emergencyConditions":"Spillage","controlMeasures":"PPE","likelihoodControl":3,"severityControl":3,"reviewDate":"2021-02-27T10:00:00.000Z","status":"Opportunity for improvement"},{"id":3,"scope":"TAG","tags":[{"tagName":"South"}],"locations":"","departments":["Technical"],"activity":"Changing lightbulbs","hazzards":"Falls from height","whoIsEffected":"Estates staff","legislations":[{"title":"Working at Height Regulations","id":"c4ce9ecc-787f-4998-92e5-5006eb5f33d2"}],"likelihoodNoControl":1,"severityNoControl":-1,"emergencyConditions":"","controlMeasures":"Removal of ladders, Area restrictions","likelihoodControl":2,"severityControl":1,"reviewDate":"2020-10-30T10:00:00.000Z","status":""}]}');var rDn,iDn,oDn,lDn,sDn;function cDn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dDn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cDn(Object(t),!0).forEach(function(n){uDn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cDn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function uDn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function pDn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const mDn=(0,Ge.default)(ze.fI)(rDn||(rDn=pDn(["\n  flex: 1;\n  align-items: center;\n"]))),fDn=(0,Ge.default)(ze.fv)(iDn||(iDn=pDn(["\n  padding-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),yDn=(0,Ge.default)(ze.$n)(oDn||(oDn=pDn(["\n  width: 100%;\n"]))),gDn=Ge.default.div(lDn||(lDn=pDn(["\n  padding: ",";\n  min-height: 60vh;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  pre {\n    width: 100%;\n  }\n"])),e=>e.theme.geometry.md.spacing),bDn=(0,Ge.default)(ze.DZ)(sDn||(sDn=pDn(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),hDn=e=>{switch(e.scope){case Ce:return"Location";case Ne:return"Tag";default:return"Organisation"}},vDn=e=>e.scope===Se?hDn(e):e.scope===Ce?e.locations.filter(Boolean).map(e=>{let{name:n}=e;return n}).join(", "):null,xDn=e=>{if(e.scope===Se)return hDn(e);if(e.scope===Ne)return e.tags.filter(Boolean).map(e=>{let{tagName:n}=e;return n}).join(", ");if(e.scope===Ce){const n=e.locations.filter(Boolean).map(e=>e.tags.filter(Boolean));return[].concat(...n).filter(Boolean).map(e=>{let{tagName:n}=e;return n}).join(", ")}},TDn=()=>{const e=Pu(),n=rt(),{data:t}=Td(),[a,r]=(0,g.useState)(!1),[i,o]=(0,g.useState)(!1),l=Dd(),{loading:s,data:c}=(0,h.IT)(Omn,{variables:{accountId:n}}),d=(aDn.z||[]).map(e=>dDn(dDn({},e),{},{scopeLevel:hDn(e),scopeLocations:vDn(e),scopeTags:xDn(e),formattedLegislations:e.legislations.map(e=>{let{title:n}=e;return n}).join(" ")})),[u,p,m]=hf(d,["formattedScope","activity",["risks"],["impacts"],"emergencyConditions","controlMeasures","likelihoodNoControl","severityNoControl","likelihoodControl","severityControl","formattedLegislations","status"]),f=Nln.filter(e=>!e.comingSoon&&t.comply[e.accessIndex]),{title:y,restrictionId:b}=Nln.find(e=>e.link.includes("health-and-safety-risk-register"));return s||c.getAvailableManagementSystems.find(e=>{let{id:n}=e;return n===b})?s?null:(0,Ze.jsxs)(ze.fv,{container:!0,item:!0,children:[a&&(0,Ze.jsx)(Vwn,{title:"Create Risk",submitTitle:"Create Risk",onDismiss:()=>r(!1),accountId:n,onSubmit:()=>{}}),!!i&&(0,Ze.jsx)(ze.aF,{size:"lg",show:!0,onDismiss:()=>o(null),children:(0,Ze.jsxs)(gDn,{children:[(0,Ze.jsx)(bDn,{size:"lg",children:"Actions Required"}),(0,Ze.jsx)(ze.v3,{size:"md",wrap:!0,children:i.map(e=>(0,Ze.jsx)(ze.EY,{children:e},e))})]})}),(0,Ze.jsx)(ige,{title:"Risks",breadcrumbs:[{title:"Governance",to:".."},{title:y}],icon:"pencil-alt",iconColor:"tertiary",isDropdown:!0,dropdownItems:f,dropdownDefault:y,children:(0,Ze.jsxs)(mDn,{name:"ConfigurationRiskContainer__Controls",container:!0,alignItems:"center",children:[(0,Ze.jsx)(ze.fv,{item:!0,children:(0,Ze.jsx)(ze.vj,{name:"ConfigurationRiskContainer__Controls__Search",value:u,onChange:e=>p(e.target.value),hideButton:!0})}),(0,Ze.jsx)(fDn,{span:4,item:!0,children:(0,Ze.jsx)(SD,{gridApi:l.api})}),(0,Ze.jsx)(fDn,{span:4,item:!0,children:(0,Ze.jsx)(yDn,{name:"ConfigurationRiskContainer__Controls__Button--create",size:"md",color:"primary",inline:!0,onClick:()=>r(!0),children:"+ Add Risk"})})]})}),!1,(0,Ze.jsx)(tDn,{risks:m,showEditModal:()=>{},showCopyModal:()=>{},showActionRequiredModal:()=>{},canEdit:!0,currentAccount:e,agGrid:l})]}):(0,Ze.jsx)(eb,{name:"Forbidden_Risks",error:new Error("Forbidden")})};var ODn,kDn,jDn,CDn,SDn;function NDn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wDn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?NDn(Object(t),!0).forEach(function(n){DDn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):NDn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function DDn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ADn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const RDn=(0,Ge.default)(ze.fv)(ODn||(ODn=ADn(["\n  flex: 1;\n"]))),PDn=(0,Ge.css)(kDn||(kDn=ADn(["\n  color: white;\n"]))),LDn=(0,Ge.default)(ze.fv)(jDn||(jDn=ADn(["\n  flex: 1;\n  padding: ",";\n\n  .background-blue {\n    background-color: #6a99d0;\n    ","\n  }\n\n  .background-green {\n    background-color: #b1cf95;\n    ","\n  }\n\n  .background-orange {\n    background-color: #e9b38b;\n    ","\n  }\n"])),e=>e.theme.geometry.md.spacing,PDn,PDn,PDn),IDn=(0,Ge.default)(ze.fI)(CDn||(CDn=ADn(["\n  flex: 1;\n  justify-content: flex-end;\n  align-items: center;\n  *:not(:last-child) {\n    margin-right: ",";\n  }\n"])),e=>e.theme.geometry.xs.spacing),EDn=Ge.default.div(SDn||(SDn=ADn(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),_Dn={pagination:!0,paginationPageSize:25,paginationPageSizeSelector:!1,defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0}},rowSelection:"multiple",columnDefs:[{headerName:"Pillar",field:"pillar",headerClass:"background-blue"},{headerName:"Sustainability Area",field:"sustainabilityArea",headerClass:"background-blue"},{headerName:"Subject",field:"subject",filter:"agTextColumnFilter",minWidth:300,editable:!0,cellStyle:{"white-space":"normal"},autoHeight:!0,headerClass:"background-blue"},{headerName:"Metric Description",field:"metricDescription",filter:"agTextColumnFilter",editable:!0,cellEditor:"agLargeTextCellEditor",minWidth:300,headerClass:"background-blue"},{headerName:"Reported Metric",field:"reportedMetric",filter:"agTextColumnFilter",editable:!0,headerClass:"background-blue"},{headerName:"SFDR",field:"sfdr",filter:"agTextColumnFilter",editable:!0,headerClass:"background-green"},{headerName:"EU Taxonomy",field:"euTaxonomy",filter:"agTextColumnFilter",editable:!0,headerClass:"background-green"},{headerName:"TCFD",field:"tcfd",filter:"agTextColumnFilter",editable:!0,headerClass:"background-orange"},{headerName:"GRESB",field:"gresb",filter:"agTextColumnFilter",editable:!0,headerClass:"background-orange"},{headerName:"WEF Measuring Stakeholder capitalism",field:"capitalism",filter:"agTextColumnFilter",editable:!0,headerClass:"background-orange"},{headerName:"SASB",field:"sasb",filter:"agTextColumnFilter",editable:!0,headerClass:"background-orange"},{headerName:"CDP",field:"cdp",filter:"agTextColumnFilter",editable:!0,headerClass:"background-orange"},{headerName:"EPIECA",field:"epieca",filter:"agTextColumnFilter",editable:!0,headerClass:"background-orange"},{headerName:"Rio",field:"rio",filter:"agTextColumnFilter",editable:!0,headerClass:"background-orange"},{headerName:"Report",field:"report",filter:"agSetColumnFilter",cellEditor:"agSelectCellEditor",editable:!0,cellEditorParams:{values:["","Yes","No"]},headerClass:"background-blue"},{headerName:"Funds/Channels reporting",field:"funds",filter:"agTextColumnFilter",editable:!0,headerClass:"background-blue"}]},FDn=e=>{let{materialities:n}=e;const t=rt(),[a,r]=(0,g.useState)(_Dn.paginationPageSize||25),i=Dd(),{data:o}=Td(),l=Nln.filter(e=>!e.comingSoon&&o.comply[e.accessIndex]);return(0,Ze.jsxs)(RDn,{container:!0,item:!0,children:[(0,Ze.jsx)(ige,{name:"materiality",title:"Materiality",breadcrumbs:[{title:"Governance",to:"/governance"},{title:"Materiality"}],icon:"pencil-alt",iconColor:"tertiary",isDropdown:!0,dropdownItems:l,dropdownDefault:"Materiality",children:(0,Ze.jsxs)(IDn,{container:!0,item:!0,distribution:"center",vdistribution:"center",itemAlign:"center",children:[(0,Ze.jsx)(ze.fv,{span:4,children:(0,Ze.jsx)(hwe,{value:a,onChange:e=>{r(e),i.api&&i.api.setGridOption("paginationPageSize",e)}})}),(0,Ze.jsx)(ze.fv,{span:4,children:(0,Ze.jsx)(SD,{gridApi:i.api})})]})}),(0,Ze.jsx)(EDn,{children:"Conduct your materiality analysis here to identify what Sustainability/ESG topics are most important to your organisation."}),(0,Ze.jsx)(LDn,{container:!0,item:!0,children:(0,g.createElement)(nD,wDn(wDn({},_Dn),{},{key:t,paginationPageSize:a,cacheBlockSize:a,onColumnVisible:i.onSaveGridColumnState,onColumnPinned:i.onSaveGridColumnState,onColumnResized:i.onSaveGridColumnState,onColumnMoved:i.onSaveGridColumnState,onColumnRowGroupChanged:i.onSaveGridColumnState,onColumnValueChanged:i.onSaveGridColumnState,onColumnPivotChanged:i.onSaveGridColumnState,onDestroy:i.onDestroy,rowData:n,onGridReady:e=>{var n;null===(n=i.api)||void 0===n||n.resetRowHeights(),i.onGridReady(e)}}))})]})},BDn=g.memo(FDn),UDn=JSON.parse('[{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Statement from senior decision-maker","metricDescription":"Disclose whether your organisation\'s ESG commitments are clearly stated by senior decision-makers.","reportedMetric":"CEO: statement in annual report and in committee meetings. Sustainability manager: statement in Sustainability report.","sfdr":"Purpose Statement","euTaxonomy":"","gri":"102-14","capitalism":"","sasb":"","cdp":"C1","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"1a, 1b","gresb":"LE1, LE2, LE3"},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Key impacts, risks, and opportunities","metricDescription":"Disclose your organisation\'s ESG impact, as well as sustainability-related risks and opportunities. ","reportedMetric":"Impact: High. ESG reporting, disclosure, and performance improvement (e.g. emissions reduction, sustainable management). Risks: Low. Indirectly, climate change for mobility and overall environmental quality. Opportunnities: High. Software solution, no exploutation of physical resources, growth opportunity as sustainability regulations/disclosures increase.","sfdr":"Anti-Corruption Policies and Assurance, Integration of Risk and Opportunity, prinvipal Adverse Impacts","euTaxonomy":"","gri":"102-15","capitalism":"","sasb":"","cdp":"C2","ipieca":"","rio":"","report":"No","funds":"Fund 1","id":"53bff99b-a7fe-42b4-b53a-0d4e6ea53d78","tcfd":"2a, 2b, 3a, 3b, 3c, 4b.4","gresb":"RA1"},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Name of the organization","metricDescription":"As registered.","reportedMetric":"Rio ESG Ltd.","sfdr":"","euTaxonomy":"","gri":"102-1","capitalism":"","sasb":"","cdp":"C0","ipieca":"","rio":"","report":"No","funds":"Fund 1, Fund 4","id":"fee3f876-ae0a-479e-899c-a40c4b4c7270","tcfd":"  ","gresb":"EC1"},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Activities, brands, products, and services","metricDescription":"Disclose your organisation\'s sustainability-related activities and initiatives, as well as any related brands, and its products/services offering.","reportedMetric":"Activities/Initiatives: Thought leadership blogs, Interviews, Reports and disclosure of ESG performance. Products/Services: ESG reporting and consulting solutions, AI, Carbon footprint, Learning, IEMA Foundations Certificate.","sfdr":"","euTaxonomy":"","gri":"102-2","capitalism":"","sasb":"","cdp":"C9, C4","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"4b.2","gresb":"RC5"},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Location of headquarters","metricDescription":"Disclose where your organisation\'s legal headquarters are established (City and Country)","reportedMetric":"London - UK.","sfdr":"","euTaxonomy":"","gri":"102-3","capitalism":"","sasb":"","cdp":"C0","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"  ","gresb":"RC4"},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Location of operations","metricDescription":"Disclose where your organisation operates (City and Country)","reportedMetric":"London - UK, Manchester - UK, Cape Town - South Africa","sfdr":"Number of sites in or adjacent to protected areas and/or key biodiversity areas (hectares), Asset Allocation","euTaxonomy":"","gri":"102-4","capitalism":"","sasb":"","cdp":"C0","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"  ","gresb":"RC4, R1.2, DR1.2"},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Ownership and legal form","metricDescription":"Disclose the ownership type of your organisation, and its legal registration. ","reportedMetric":"Private (non-listed) company, Limited company (Ltd). ","sfdr":"","euTaxonomy":"","gri":"102-5","capitalism":"","sasb":"","cdp":"C0, C1","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"1a, 1b","gresb":"EC2"},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Markets served","metricDescription":"Disclose which markets your organisation operates in. ","reportedMetric":"EMEA, South Africa, APAC","sfdr":"","euTaxonomy":"","gri":"102-6","capitalism":"","sasb":"","cdp":"C0, C7. C14","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"2b","gresb":"R1.2, DR1.2"},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Scale of the organization","metricDescription":"Disclose the scale of your organisation","reportedMetric":"<50 employees.","sfdr":"","euTaxonomy":"","gri":"102-7","capitalism":"","sasb":"","cdp":"C0","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"  ","gresb":"RC2"},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Information on employees and other workers","metricDescription":"Disclose information on your employees/other workers within your premises (e.g. contractors). Examples include: Total number, gender diversity, ethnic diversity, socio-economic background diversity, average payroll.","reportedMetric":"Tot no. of employees: 20. Male/Female ratio: 60%/40%. % of employees from an ethnic minority: 35%. % of employees from disadvantaged socio-economic background: 40%. Average employee payroll: 35,000. Tot no. Contractors: 20. Contractors\' hiring frequency: Monthly. [Note: values are not real estimates, but instead random].","sfdr":"Governance body composition and competence","euTaxonomy":"","gri":"102-8","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"4a.1, 4c.3","gresb":"SE1, SE2.1, SE3.2, SE4, SE5, TC1, TC2.1"},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Collective bargaining agreements","metricDescription":"Disclose any collective bargaining agreements undersigned by your organisation.","reportedMetric":"CBAs assessing wage conditions, working hours, pensions schemes, probationary periods, notice periods. ","sfdr":"","euTaxonomy":"","gri":"102-41","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"  ","gresb":""},{"pillar":"Governance","sustainabilityArea":"General Disclosures","subject":"Supply chain","metricDescription":"Disclose whether your organisation\'s suppliers are chosen accordingly to ensure compliance with ESG criteria.","reportedMetric":"Supply chain is entirely controlled and responnsibly sourced/selected. ","sfdr":"","euTaxonomy":"","gri":"102-9","capitalism":"","sasb":"","cdp":"SC","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"2a","gresb":"RM3.1, SE6, SE8"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Significant changes to the organization and its supply chain","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-10","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"345e8ab5-2e5c-4a29-b6db-cc0c756a16a6"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Precautionary Principle or approach","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-11","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d08cb9e7-41a2-4917-95d4-bbe56845815e"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"External initiatives","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-12","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"a0c0d51c-73e2-4710-a2d7-5dcce71f0744"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Membership of associations","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-13","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"9542cb91-b1c9-4f3f-9325-aa44280079b3"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Entities included in the consolidated financial statements","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-45","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"a715ef5b-3f75-4e2b-b441-d3e105c0a0e1"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Defining report content and topic Boundaries","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-46","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"6798e8b5-ed90-4404-a375-cc0456ef3aa5"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"List of material topics","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-47","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"17d3850c-3557-432a-b89b-748f1ba356ab"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Explanation of the material topic and its Boundary","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"103-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"9a9049e0-6145-4a6e-897e-572548e1d14e"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Explanation of the material topic and its Boundary","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"103-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"2d964200-29a9-4f14-af75-99b575c1f5d2"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Restatements of information","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-48","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"fb2e1510-e3dc-458e-8133-2c1e8e5b68ed"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Changes in reporting","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-49","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"7df6b2a3-b540-422b-8e6d-22ab00c597c1"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"List of stakeholder groups","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-40","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"cdbe348c-4a81-45b8-83ee-d8902a9bb843"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Identifying and selecting stakeholders","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-42","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"31ef862f-e2af-44e2-8a1b-c2cb5f2eed57"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Approach to stakeholder engagement","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-43","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"ae825a6b-8936-4016-94f4-29ac416ad6c3"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Key topics and concerns raised","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-44","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"49e3f15d-f2b8-4e43-8cdb-bc8c102a01b7"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Reporting period","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-50","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"ce2477e5-4768-4597-98ca-ade02427271a"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Date of most recent report","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-51","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"c0921cae-fd87-409f-bdf4-697200abd339"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Reporting cycle","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-52","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"b397fddc-39f8-4ac3-97ee-dc674f11d6f7"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Contact point for questions regarding the report","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-53","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"e5ad74b4-ba41-4b5c-86d3-f6aecbcff4ba"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Claims of reporting in accordance with the GRI Standards","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-54","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"fec484f0-f92d-4c47-b893-3035cd1b2fd0"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"GRI content index","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-55","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"25625f01-1990-425a-bc8c-25b50e0092e1"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"External assurance","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-56","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"eb27d2be-7780-4818-b1ae-8b552dc51328"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"External assurance","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-56","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"b2aae215-3126-4f62-8bf1-ad045e7dfa7b"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Governance structure","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-18","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"08d537f7-1d2f-4fbb-94cb-989e95c65dcc"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Delegating authority","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-19","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"8abccc11-0c50-403b-bc8f-9c2572faf43c"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Executive-level responsibility for economic, environmental, and social topics","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-20","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"6e9b0632-81f5-4166-93d7-806ae72f2ac6"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Consulting stakeholders on economic, environmental, and social topics","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-21","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"03eb806f-0bd8-408d-bc50-9480f6e1dff0"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Composition of the highest governance body and its committees","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-22","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"6f23dc71-c675-440f-a9ab-5cb698307e9d"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Chair of the highest governance body","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-23","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"517d1a25-3ed2-48bc-82f8-ab2533629a39"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Nominating and selecting the highest governance body","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-24","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"277b5b93-0af9-4ff1-9eaa-fdde68c41c7a"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Conflicts of interest","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-25","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"ad7dcf19-cbcc-46b9-9d64-846ff81cb7d5"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Role of highest governance body in setting purpose, values, and strategy","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-26","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"4f01d433-636d-4eeb-b967-10607e718dca"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Collective knowledge of highest governance body","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-27","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"9bc43aa5-0bb4-488e-a836-57db3b45eefa"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Evaluating the highest governance body’s performance","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-28","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"1a156fa5-9c42-4ecf-8acb-4f4de69cbbec"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Identifying and managing economic, environmental, and social impacts","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-29","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"0034dbb6-c6de-44f5-9827-6898790a66ee"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Effectiveness of risk management processes","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-30","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"07826f97-73ee-4d43-b556-d624b969c00e"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Review of economic, environmental, and social topics","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-31","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"8aa5f327-bc7e-4238-b5c6-3cd4fb5bd6cf"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Highest governance body’s role in sustainability reporting","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-32","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"c189ff8b-6bb5-492c-adae-cdccfbf03ba2"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Communicating critical concerns","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-33","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"fd8a1d2a-7b80-4fd8-8e9b-a1b6f17ebc68"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Nature and total number of critical concerns","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-34","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"ed6cd794-7d42-48cc-b8c2-33cf5c70e7d5"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Remuneration policies","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-35","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"efc32ea9-1a44-4000-b889-9b488ae5ab1f"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Process for determining remuneration","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-36","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"472cbcb0-ebc7-433b-84d6-90fa68b0a37e"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Stakeholders’ involvement in remuneration","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-37","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"ef048e17-cf9a-4705-8153-dbecec4b69ae"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Annual total compensation ratio","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-38","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"68384727-d0e1-41da-80ca-90f8ed6bcfe1"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Percentage increase in annual total compensation ratio","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-39","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"00fb3cf5-9451-42bd-9e30-f3a58ec05880"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Values, principles, standards, and norms of behavior","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-16","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"880137dd-b234-4cbb-bb0b-04b320d1b93f"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Mechanisms for advice and concerns about ethics","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-17","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"ff600a07-e96c-4a59-b49e-4831ae5d8e63"},{"pillar":"Governance ","sustainabilityArea":"General Disclosures","subject":"Mechanisms for advice and concerns about ethics","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-17","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"27071587-ab44-4ddb-9877-d3ed66c254a6"},{"pillar":"Governance ","sustainabilityArea":"Management Approach","subject":"Explanation of the material topic and its Boundary","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"103-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"e691d502-8ea5-420f-9083-8b14d88088b8"},{"pillar":"Governance ","sustainabilityArea":"Management Approach","subject":"The management approach and its components","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"103-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"448f7708-bba0-4322-8f0a-082c3509957e"},{"pillar":"Governance ","sustainabilityArea":"Management Approach","subject":"Evaluation of the management approach","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"103-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"58daed08-70ef-49c8-9ce7-36c51b80d8d9"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Economic Performance","subject":"Direct economic value generated and distributed","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"201-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"2f7d2d65-73ab-4bc1-8a43-ef1e17e3c857"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Economic Performance","subject":"Financial implications and other risks and opportunities due to climate change","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"201-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"c030f1d1-c1e1-4328-8db8-2adde9a9796a"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Economic Performance","subject":"Defined benefit plan obligations and other retirement plans","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"201-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d14462d2-75c1-4413-ad1c-0c3f56040f45"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Economic Performance","subject":"Financial assistance received from government","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"201-4","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"662ac544-0a24-4dce-a941-6d38934853dd"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Market Presence","subject":"Ratios of standard entry level wage by gender compared to local minimum wage","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"202-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"f4f1c18a-08c3-472d-8591-5b7f80ae695f"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Market Presence","subject":"Proportion of senior management hired from the local community","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"202-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"456a9cee-7dec-4d35-9496-5a3dea622daf"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Market Presence","subject":"Infrastructure investments and services supported","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"203-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d4592536-da74-48c1-bfe2-60fffdcb08d2"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Indirect Economic Impacts","subject":"Significant indirect economic impacts","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"203-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"2539dcda-a75c-4f69-b6d2-c331a3e652b8"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Procurement Practices","subject":"Proportion of spending on local suppliers","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"204-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"6cf89068-177b-4c61-ac4b-03d4773288d7"},{"pillar":"Planet/Environment","sustainabilityArea":"Materials","subject":"Materials used by weight or volume","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"301-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d3e5e7f3-fc06-4f18-83b4-b51dd0750b68"},{"pillar":"Planet/Environment","sustainabilityArea":"Materials","subject":"Recycled input materials used","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"301-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"2367d2cf-27ae-4ac9-a198-5606d846756a"},{"pillar":"Planet/Environment","sustainabilityArea":"Energy","subject":"Energy consumption within the organization","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"302-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"a758d677-3d70-49ac-bdce-1e50735ede43"},{"pillar":"Planet/Environment","sustainabilityArea":"Energy","subject":"Energy consumption outside of the organization","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"302-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"9e404676-6d8b-41f1-b03b-32429def7874"},{"pillar":"Planet/Environment","sustainabilityArea":"Energy","subject":"Energy intensity","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"302-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d0e82780-d8ef-4b58-8e26-e8261d391e0a"},{"pillar":"Planet/Environment","sustainabilityArea":"Energy","subject":"Reduction of energy consumption","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"302-4","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"6f13b0c8-9953-4f97-b3da-379d233eeaf9"},{"pillar":"Planet/Environment","sustainabilityArea":"Energy","subject":"Reductions in energy requirements of products and services","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"302-5","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"40ad4f7d-2e4a-4584-a8e1-463632d2a2f6"},{"pillar":"Planet/Environment","sustainabilityArea":"Water and Effluents","subject":"Water withdrawal by source","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"303-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"a18b31fc-70e1-46c6-869c-162bcdec1952"},{"pillar":"Planet/Environment","sustainabilityArea":"Water and Effluents","subject":"Water sources significantly affected by withdrawal of water","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"303-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"21562d08-8f10-4399-b84c-d3f7387d6788"},{"pillar":"Planet/Environment","sustainabilityArea":"Water and Effluents","subject":"Water recycled and reused","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"303-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d1b987e9-33c0-493c-81b4-7d0328031e9f"},{"pillar":"Planet/Environment","sustainabilityArea":"Biodiversity","subject":"Operational sites owned, leased, managed in, or adjacent to, protected areas and areas of high biodiversity value outside protected areas","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"304-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"4d497ac6-258c-4460-8db5-59ddbf885778"},{"pillar":"Planet/Environment","sustainabilityArea":"Biodiversity","subject":"Significant impacts of activities, products, and services on biodiversity","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"304-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"e044fc59-94ee-4479-8419-84e4b6a09e70"},{"pillar":"Planet/Environment","sustainabilityArea":"Biodiversity","subject":"Habitats protected or restored","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"304-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"c761ccbb-2657-4ba3-a85a-26826d261d98"},{"pillar":"Planet/Environment","sustainabilityArea":"Biodiversity","subject":"IUCN Red List species and national conservation list species with habitats in areas affected by operations","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"304-4","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d837ca4f-21dc-43ff-b4d3-6c0cc7bc83ea"},{"pillar":"Planet/Environment","sustainabilityArea":"Emissions","subject":"Direct (Scope 1) GHG emissions","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"305-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"a90aeedb-5135-4857-a6cd-583e5ffff497"},{"pillar":"Planet/Environment","sustainabilityArea":"Emissions","subject":"Energy indirect (Scope 2) GHG emissions","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"305-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"4e054b93-2c60-4cba-aa5e-76bfb25893b3"},{"pillar":"Planet/Environment","sustainabilityArea":"Emissions","subject":"Other indirect (Scope 3) GHG emissions","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"305-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"80036572-c962-4ddc-b6d5-e779dcdcc52e"},{"pillar":"Planet/Environment","sustainabilityArea":"Emissions","subject":"GHG emissions intensity","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"305-4","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"7ed5a466-8e04-4a74-9855-7da3553032ee"},{"pillar":"Planet/Environment","sustainabilityArea":"Emissions","subject":"Reduction of GHG emissions","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"305-5","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"b2407d42-7f78-43fd-9587-11f322ec68d3"},{"pillar":"Planet/Environment","sustainabilityArea":"Emissions","subject":"Emissions of ozone-depleting substances (ODS)","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"305-6","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"bbd547bd-10bd-479c-836f-20efca7de196"},{"pillar":"Planet/Environment","sustainabilityArea":"Emissions","subject":"Nitrogen oxides (NOX), sulfur oxides (SOX), and other significant air emissions","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"305-7","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"86388c91-2fdb-4e4b-9cc8-f42a5376f599"},{"pillar":"Planet/Environment","sustainabilityArea":"Waste","subject":"Water discharge by quality and destination","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"306-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"da78db97-e8c8-4ec0-a9b0-948ad083b276"},{"pillar":"Planet/Environment","sustainabilityArea":"Waste","subject":"Waste by type and disposal method","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"306-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"8b22bb71-e785-4e4c-8196-851bb1084cbf"},{"pillar":"Planet/Environment","sustainabilityArea":"Waste","subject":"Significant spills","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"306-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"0d000d07-b5cf-45d7-97c7-3103052ba7f3"},{"pillar":"Planet/Environment","sustainabilityArea":"Waste","subject":"Transport of hazardous waste","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"306-4","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"a38c5b76-9511-4fec-9223-a617ed08ab3c"},{"pillar":"Planet/Environment","sustainabilityArea":"Waste","subject":"Water bodies affected by water discharges and/or runoff","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"306-5","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"61a63380-c022-4fd8-98dd-965de0b95d3e"},{"pillar":"Planet/Environment","sustainabilityArea":"","subject":"NA","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"NA","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"c35f84cb-1fb1-48da-aa39-df48f222b25f"},{"pillar":"Planet/Environment","sustainabilityArea":"Materials","subject":"Reclaimed products and their packaging materials","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"301-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"91373b35-5719-4cf1-a6ed-d508f3c0798d"},{"pillar":"Planet/Environment","sustainabilityArea":"Environmental Compliance","subject":"Non-compliance with environmental laws and regulations","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"307-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"68a46eb9-803f-496c-975a-bb99de51fed1"},{"pillar":"Planet/Environment","sustainabilityArea":"","subject":"NA","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"NA","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"1bdfcc4b-2928-42c6-85ef-61178fc8b01e"},{"pillar":"Planet/Environment","sustainabilityArea":"","subject":"NA","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"NA","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"2c3a2dbb-20d0-4a40-a192-86ddbd5e4c5b"},{"pillar":"Planet/Environment","sustainabilityArea":"Supplier Environmental Assessment","subject":"New suppliers that were screened using environmental criteria","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"308-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"fd9737ed-85d2-4c56-bce5-6f9e754c8ccd"},{"pillar":"Planet/Environment","sustainabilityArea":"Supplier Environmental Assessment","subject":"Negative environmental impacts in the supply chain and actions taken","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"308-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"683223c3-7e3d-49c6-855f-b1539d0b72aa"},{"pillar":"Governance ","sustainabilityArea":"Management Approach","subject":"The management approach and its components","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"103-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"7d679e4f-329f-42cb-bba4-e1567234c550"},{"pillar":"People/Social","sustainabilityArea":"Employment","subject":"New employee hires and employee turnover","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"401-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"0512e960-07b6-4c0f-93c7-9dcf4520638b"},{"pillar":"People/Social","sustainabilityArea":"Employment","subject":"Benefits provided to full-time employees that are not provided to temporary or part-time employees","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"401-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"b94dbf0b-b15a-4838-a514-a7693137fb69"},{"pillar":"People/Social","sustainabilityArea":"Employment","subject":"Parental leave","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"401-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"7867916f-261b-4281-bdac-51b5e07e8f4e"},{"pillar":"People/Social","sustainabilityArea":"Labor/Management Relations","subject":"Minimum notice periods regarding operational changes","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"402-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"ad5a2db8-f6e0-4004-b6c9-6abb5ef7e0ab"},{"pillar":"People/Social","sustainabilityArea":"Occupational Health and Safety","subject":"Workers representation in formal joint management–worker health and safety committees","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"403-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"5c8f3209-8bf9-4e52-8038-b916322edd6a"},{"pillar":"People/Social","sustainabilityArea":"Occupational Health and Safety","subject":"Types of injury and rates of injury, occupational diseases, lost days, and absenteeism, and number of work-related fatalities","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"403-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"25ad12d3-4ec0-4978-a717-a6c400529619"},{"pillar":"People/Social","sustainabilityArea":"Occupational Health and Safety","subject":"Workers with high incidence or high risk of diseases related to their occupation","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"403-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d1a0eb25-9f79-4b9a-b8b0-4bea4a4e9ad7"},{"pillar":"People/Social","sustainabilityArea":"Occupational Health and Safety","subject":"Health and safety topics covered in formal agreements with trade unions","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"403-4","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"ad14e4c9-c651-4312-afd5-8517522379a6"},{"pillar":"People/Social","sustainabilityArea":"Training and Education","subject":"Average hours of training per year per employee","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"404-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"4bb5b04d-57e7-4973-8cfb-e51562805f17"},{"pillar":"People/Social","sustainabilityArea":"Training and Education","subject":"Programs for upgrading employee skills and transition assistance programs","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"404-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"f0f4e504-a32d-4e09-bbd4-d77f6516c90e"},{"pillar":"People/Social","sustainabilityArea":"Training and Education","subject":"Percentage of employees receiving regular performance and career development reviews","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"404-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"b7419680-9ebe-4de3-8392-f9c6c64c283e"},{"pillar":"People/Social","sustainabilityArea":"Diversity and Equal Opportunity","subject":"Diversity of governance bodies and employees","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"405-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"123f4b82-4530-4850-b90e-4427d9137080"},{"pillar":"People/Social","sustainabilityArea":"Diversity and Equal Opportunity","subject":"Ratio of basic salary and remuneration of women to men","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"405-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"c4629415-4699-48cd-86d9-643f5762d143"},{"pillar":"People/Social","sustainabilityArea":"Supplier Social Assessment","subject":"New suppliers that were screened using social criteria","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"414-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"c7324105-9c35-492e-9c05-69d387a4ea81"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Negative social impacts in the supply chain and actions taken","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"414-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"3d64d77f-cb24-4b58-9161-2dcee86851b5"},{"pillar":"People/Social","sustainabilityArea":"","subject":"The management approach and its components","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"103-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"2cd3ab0a-a455-4458-82d0-ca92755cc461"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Significant investment agreements and contracts that include human rights clauses or that underwent human rights screening","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"412-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"14e38121-a6cd-4c5c-91d4-2b42ab6c7f93"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Employee training on human rights policies or procedures","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"412-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"5ef7ca03-702e-4edd-a2cf-cbea31bc0055"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Incidents of discrimination and corrective actions taken","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"406-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"a13fb622-18bf-46a1-a3d5-744c5944c35f"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Operations and suppliers in which the right to freedom of association and collective bargaining may be at risk","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"407-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"220dc2b0-bfd3-4894-b335-716d0e999067"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Operations and suppliers at significant risk for incidents of child labor","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"408-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"500057a7-dcea-4963-af4b-59d49bfcd484"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Operations and suppliers at significant risk for incidents of forced or compulsory labor","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"409-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"2a0136e5-7fd0-4c74-a341-37526064b308"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Security personnel trained in human rights policies or procedures","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"410-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"44c84b85-8fbe-4ae2-a1ec-6f133430b802"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Incidents of violations involving rights of indigenous peoples","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"411-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"db601a5b-78b5-4d8a-a7bb-6a77730e3dd2"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Operations that have been subject to human rights reviews or impact assessments","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"412-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"126bfd17-97a3-48e2-8681-d8856afafc59"},{"pillar":"People/Social","sustainabilityArea":"","subject":"New suppliers that were screened using social criteria","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"414-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"137190e5-cd11-4b47-a934-0b5bd20550d4"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Negative social impacts in the supply chain and actions taken","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"414-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"50f1d6c7-3beb-4efd-b1a2-1c37227b35b0"},{"pillar":"Governance ","sustainabilityArea":"","subject":"The management approach and its components","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"103-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"4d81b630-2d24-4685-a5ff-8f6c4523f32c"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Operations with local community engagement, impact assessments, and development programs","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"413-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"981e42c6-ecb5-4a5f-82b2-1ea00aa227be"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Operations with significant actual and potential negative impacts on local communities","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"413-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"f730b73e-d2f0-466e-9032-9a0576418d86"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Operations assessed for risks related to corruption","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"205-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"27dc1456-4f06-4249-a5bf-4c174e94fc4a"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Communication and training about anti-corruption policies and procedures","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"205-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"1f69ff54-2cdd-4427-81f4-a007c6cd2b42"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Confirmed incidents of corruption and actions taken","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"205-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"0980a2f9-7509-4b6d-b169-6bfcadaa340b"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Political contributions","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"415-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"6bb118f8-41d3-4537-9231-1841ebe76822"},{"pillar":"Prosperity/Economic","sustainabilityArea":"","subject":"Legal actions for anti-competitive behavior, anti-trust, and monopoly practices","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"206-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"8ded19b9-2461-49d7-9891-5f387fb6e6c8"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Non-compliance with laws and regulations in the social and economic area","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"419-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"ac6e8309-d504-4646-bdb1-ded0b850ebab"},{"pillar":"People/Social","sustainabilityArea":"","subject":"New suppliers that were screened using social criteria","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"414-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"0d63020c-3e69-49f3-8e89-199b7ba16153"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Negative social impacts in the supply chain and actions taken","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"414-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"4f446abc-a26b-421e-8b63-0a51840ac5f6"},{"pillar":"Governance ","sustainabilityArea":"","subject":"The management approach and its components","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"103-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"504833b1-4b4f-485e-b870-4099d0b66db3"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Assessment of the health and safety impacts of product and service categories","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"416-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d5cf8402-b0d0-42c7-a918-7a956fee1d2e"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Incidents of non-compliance concerning the health and safety impacts of products and services","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"416-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"3581b54b-833e-4267-bb19-b66822a29706"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Requirements for product and service information and labeling","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"417-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"a2003061-72d4-4a47-9093-016cfd20bb2b"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Incidents of non-compliance concerning product and service information and labeling","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"417-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"084bae83-24a0-45d3-89b0-f4db89b6062e"},{"pillar":"Governance ","sustainabilityArea":"","subject":"Approach to stakeholder engagement","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-43","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"bac52940-6762-40be-9b0e-1b4a0f234270"},{"pillar":"Governance ","sustainabilityArea":"","subject":"Key topics and concerns raised","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-44","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"faa17dd5-741a-4898-8f7b-e3fdf8faf31a"},{"pillar":"Governance ","sustainabilityArea":"","subject":"Activities, brands, products, and services","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"102-2","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"2432a80b-7c3e-48ee-b011-3b8fa68dc11a"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Incidents of non-compliance concerning marketing communications","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"417-3","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"b5cf8a2d-26e4-4844-ad69-742231aba38a"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Substantiated complaints concerning breaches of customer privacy and losses of customer data","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"418-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"f5b2972b-e467-4936-b245-6c4d8a575296"},{"pillar":"People/Social","sustainabilityArea":"","subject":"Non-compliance with laws and regulations in the social and economic area","metricDescription":"","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"419-1","capitalism":"","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"0ac764b0-b50f-43ec-8a72-dbfd1afe15e7"},{"pillar":"Governance ","sustainabilityArea":"Data Security","subject":"Description of approach to identifying and\\r\\naddressing data security risks","metricDescription":"Statement","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"","sasb":"SV-PS-230a.1","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"3b9bfaac-f930-4635-9764-cc22abca958a"},{"pillar":"","sustainabilityArea":"Data Security","subject":"Description of policies and practices relating to\\r\\ncollection, usage, and retention of customer\\r\\ninformation","metricDescription":"Statement","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"","sasb":"SV-PS-230a.2","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"47f10423-f93b-486a-92f8-33e5d50877fd"},{"pillar":"","sustainabilityArea":"Data Security","subject":"(1) Number of data breaches, (2) percentage\\r\\ninvolving customers\' confidential business\\r\\ninformation (CBI) or personally identifiable\\r\\ninformation (PII), (3) number of customers\\r\\naffected2","metricDescription":"Number, %","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"","sasb":"SV-PS-230a.3","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"612811f9-df3e-407c-8063-d284d1423ce6"},{"pillar":"People/Social","sustainabilityArea":"Diversity and Equal Opportunity","subject":"Percentage of gender and racial/ethnic group\\r\\nrepresentation for (1) executive management\\r\\nand (2) all other employees3","metricDescription":"%","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"","sasb":"SV-PS-330a.1","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d5bd7d85-7523-42f8-b0bc-2facb425e788"},{"pillar":"People/Social","sustainabilityArea":"Diversity and Equal Opportunity","subject":"(1) Voluntary and (2) involuntary turnover rate\\r\\nfor employees ","metricDescription":"Rate","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"","sasb":"SV-PS-330a.2","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"660b3845-80c1-4724-b4b8-5d8bbd76a03a"},{"pillar":"People/Social","sustainabilityArea":"Diversity and Equal Opportunity","subject":"Employee engagement as a percentage4 ","metricDescription":"%","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"","sasb":"SV-PS-330a.3","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"7a3fe172-cfbe-4181-bf64-8fc49d804281"},{"pillar":"Governance ","sustainabilityArea":"Professional\\r\\nIntegrity","subject":"Description of approach to ensuring\\r\\nprofessional integrity ","metricDescription":"Statement","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"","sasb":"SV-PS-510a.1","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"95b0eb32-80dc-4d9c-b3fa-44ed3291d6a4"},{"pillar":"Governance ","sustainabilityArea":"Professional\\r\\nIntegrity","subject":"Total amount of monetary losses as a result of\\r\\nlegal proceedings associated with professional\\r\\nintegrity","metricDescription":"Reporting currency","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"","sasb":"SV-PS-510a.2","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"d8b29734-9887-40e7-b4c1-9d5503709b6e"},{"pillar":"Governance ","sustainabilityArea":"","subject":"Number of employees by: (1) full-time and part-time, (2)\\r\\ntemporary, and (3) contract ","metricDescription":"Number","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"","sasb":"SV-PS-000.A","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"48e7d834-aaaa-42d3-8a98-8329a5d00552"},{"pillar":"Governance ","sustainabilityArea":"","subject":"Employee hours worked, percentage billable ","metricDescription":"Hours, %","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"","sasb":"SV-PS-000.B","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"843c443b-7222-4729-aba1-4476fb7d8a3c"},{"pillar":"Governance ","sustainabilityArea":"Governing purpose","subject":"Setting purpose\\r\\n","metricDescription":"The company’s stated purpose, as the expression of the means by which a business proposes solutions to economic, environmental and social issues.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 102-26","capitalism":"1.1.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"5087a9a7-f000-4d9f-b1af-73a03070bbcc"},{"pillar":"Governance ","sustainabilityArea":"Governing purpose","subject":"Purpose-led management","metricDescription":"How the company’s stated purpose is embedded in company strategies, policies and goals.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 102-26","capitalism":"1.1.3e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"2ca17ae9-3fe6-431a-93f8-13a534c4f8e5"},{"pillar":"Governance ","sustainabilityArea":"Quality of governing body","subject":"Governance body composition","metricDescription":"Composition of the highest governance body and its committees by: competencies relating to economic, environmental and social topics; executive or non-executive; independence; tenure on the governance body; number of each individual’s other significant positions and commitments, and the nature of the commitments; gender; membership of under-represented social groups; stakeholder representation.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 102-22, GRI 405-1a","capitalism":"1.1.2c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"f7d865b7-8709-49e2-ac83-158ef2b41f6a"},{"pillar":"Governance ","sustainabilityArea":"Quality of governing body","subject":"Progress against strategic milestones","metricDescription":"Disclosure of the material strategic economic, environmental and social milestones expected to be achieved in the following year, such milestones achieved from the previous year, and how those milestones are expected to or have contributed to long-term value.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"1.1.4e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"34dab5ef-4b4e-4df8-a79b-d3c615537a5c"},{"pillar":"Governance ","sustainabilityArea":"Quality of governing body","subject":"Remuneration","metricDescription":"1. How performance criteria in the remuneration policies relate to the highest governance body’s and senior executives’ objectives for economic, environmental and social topics, as connected to the company’s stated purpose, strategy and long-term value.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 102-35","capitalism":"1.1.5e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"5db15fdd-d486-4f8c-8df0-f3dbdefa5895"},{"pillar":"Governance ","sustainabilityArea":"Stakeholder engagement","subject":"Material issues impacting stakeholders","metricDescription":"A list of the topics that are material to key stakeholders and the company, how the topics were identified and how the stakeholders were engaged.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 102-21, GRI 102-43, GRI 102-47","capitalism":"1.2.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"1632dc98-97bd-49bf-b2cd-a3a7bdf63df0"},{"pillar":"Governance ","sustainabilityArea":"Ethical behaviour","subject":"Anti-corruption","metricDescription":"1. Total percentage of governance body members, employees and business partners who have received training on the organization’s anti-corruption policies and procedures, broken down by region.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 205-2, GRI 205-3","capitalism":"1.3.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"1c89bea6-a260-43ef-a78b-ad326d42de17"},{"pillar":"Governance ","sustainabilityArea":"Ethical behaviour","subject":"Protected ethics advice and reporting mechanisms","metricDescription":"A description of internal and external mechanisms for:\\r\\n1. Seeking advice about ethical and lawful behaviour and organizational integrity; and","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 102-17","capitalism":"1.3.2c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"721dcfce-494c-498b-8343-3b90b0365c83"},{"pillar":"Governance ","sustainabilityArea":"Ethical behaviour","subject":"Alignment of strategy and policies to lobbying","metricDescription":"The significant issues that are the focus of the company’s participation in public policy development and lobbying; the company’s strategy relevant to these areas of focus; and any differences between its lobbying positions and its purpose, stated policies, goals or other public positions.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 415: Public Policy 2016","capitalism":"1.3.3e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"92f79a06-ee7f-4c49-8aaa-43423f44e73f"},{"pillar":"Governance ","sustainabilityArea":"Ethical behaviour","subject":"Monetary losses from unethical behaviour","metricDescription":"Total amount of monetary losses as a result of legal proceedings associated with fraud, insider trading, anti-trust, anti-competitive behaviour, market manipulation, malpractice or violations of other related industry laws or regulations.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"1.3.4e","sasb":"SASB 510a.1","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"51821571-0f30-4763-886f-782bd3b5c566"},{"pillar":"Governance ","sustainabilityArea":"Risk and opportunity oversight","subject":"Integrating risk and opportunity into business process","metricDescription":"Company risk factor and opportunity disclosures that clearly identify the principal material risks and opportunities facing the company specifically (as opposed to generic sector risks), the company appetite in respect of these risks, how these risks and opportunities have moved over time and the response to those\\r\\nchanges.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 102-15,","capitalism":"1.4.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"7a0c0fa4-2dee-4f3c-838d-3c3c5955c0df"},{"pillar":"Governance ","sustainabilityArea":"Risk and opportunity oversight","subject":"Economic, environmental and social topics in capital allocation  framework","metricDescription":"How the highest governance body considers economic, environmental and social issues when overseeing major capital allocation decisions, such as expenditures, acquisitions and divestments.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"1.4.2e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"299d8cfb-7d10-43a3-b5fe-2035c96f980b"},{"pillar":"Planet/Environment","sustainabilityArea":"Climate change","subject":"Greenhouse gas (GHG) emissions","metricDescription":"Report in metric tonnes of carbon dioxide equivalent (tCO2e) GHG Protocol Scope 1 and Scope 2 emissions.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 305:1-3","capitalism":"2.1.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"7212c1ca-f013-457f-9462-17834b166766"},{"pillar":"Planet/Environment","sustainabilityArea":"Climate change","subject":"TCFD implementation","metricDescription":"Have you fully implemented the recommendations of the Task Force on Climate-related Financial Disclosures (TCFD)?","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.1.2c","sasb":"SASB 110","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"aa257713-6293-4a06-9e41-3e66bae67010"},{"pillar":"Planet/Environment","sustainabilityArea":"Climate change","subject":"Paris-aligned GHG emissions targets","metricDescription":"Define and report progress against time-bound science-based GHG emissions targets that are in line with the goals of the Paris Agreement – to limit global warming to well below 2°C above pre-industrial levels and pursue efforts to limit warming to 1.5°C.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.1.3e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"545c5b15-fb7a-4f89-8cbd-3aafe309e92c"},{"pillar":"Planet/Environment","sustainabilityArea":"Climate change","subject":"Impact of GHG emissions","metricDescription":"Report wherever material along the value chain (GHG Protocol Scope 1, 2 & 3) the valued impact of greenhouse gas emissions.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.1.4e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"f56ea8cb-0f0c-4a6b-8f4b-1b374608c99f"},{"pillar":"Planet/Environment","sustainabilityArea":"Nature loss","subject":"Land use and ecological sensitivity","metricDescription":"Report the number and area (in hectares) of sites owned, leased or managed in or adjacent to protected areas and/or key biodiversity areas.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 304-1","capitalism":"2.2.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"4449d683-a2f2-487e-b926-fd88846e1546"},{"pillar":"Planet/Environment","sustainabilityArea":"Nature loss","subject":"Land use and ecological sensitivity","metricDescription":"Report for operations (if applicable) and full supply chain (if material):\\r\\n– Area of land used for the production of basic plant, animal or mineral commodities (e.g. the area of land used for forestry, agriculture or mining activities).","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.2.2e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"1ea10f37-d9d1-446d-913b-fc0a196ab755"},{"pillar":"Planet/Environment","sustainabilityArea":"Nature loss","subject":"Impact of land use and conversion","metricDescription":"Report wherever material along the value chain: the valued impact of use of land and conversion of ecosystems.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.2.3e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"Fund A, Fund B, Asset B, Asset C","id":"7aa484a8-6eab-43a4-842d-4738fdaad96f"},{"pillar":"Planet/Environment","sustainabilityArea":"Freshwater availability","subject":"Water consumption and withdrawal in water-stressed areas","metricDescription":"Report for operations where material: \\r\\n%megalitres of water withdrawn in regions with high or extremely high baseline water stress\\r\\n\\r\\n","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.3.1c","sasb":"sasb","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"01402d0c-657e-4518-b3aa-7aa8ccc67786"},{"pillar":"Planet/Environment","sustainabilityArea":"Freshwater availability","subject":"Impact of freshwater consumption and withdrawal","metricDescription":"Report wherever material along the value chain: the valued impact of freshwater consumption.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.3.2e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"9f5c0aff-fc70-4731-9a45-89cc6ea613de"},{"pillar":"Planet/Environment","sustainabilityArea":"Air pollution","subject":"Air pollution","metricDescription":"Report wherever material along the value chain: nitrogen oxides (NOx)","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 305-7","capitalism":"2.4.1e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"09a6ef37-eaeb-419f-addc-a16f1d1a24e7"},{"pillar":"Planet/Environment","sustainabilityArea":"Air pollution","subject":"Impact of air pollution","metricDescription":"Report wherever material along the value chain the valued impact of air pollution: including nitrogen oxides (NOx)","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.4.2e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"7ad6400e-9c84-4fa1-96f1-c48c81d4d36c"},{"pillar":"Planet/Environment","sustainabilityArea":"Water pollution","subject":"Nutrients","metricDescription":"Estimate and report wherever material along the value chain in fertilizer consumed: metric tonnes of nitrogen","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.5.1e","sasb":"SASB CN0101-11","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"e3f10143-e10b-4024-a8b0-3480db447067"},{"pillar":"Planet/Environment","sustainabilityArea":"Water pollution","subject":"Impact of water pollution","metricDescription":"Report wherever material along the value chain: the valued impact of water pollution including excess nutrients","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.5.2e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"92c07b36-d30c-4dfb-be05-68996c77218d"},{"pillar":"Planet/Environment","sustainabilityArea":"Solid waste","subject":"Single-use plastics","metricDescription":"Report wherever material along the value chain: estimated metric tonnes of single-use plastic consumed.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.6.1e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"689f4cdc-a06b-4d6f-9f0d-1ff8abdd88fa"},{"pillar":"Planet/Environment","sustainabilityArea":"Solid waste","subject":"Impact of solid waste disposal","metricDescription":"Report wherever material along the value chain, the valued societal impact of solid waste disposal, including plastics and other waste streams.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.6.2e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"9b2426c3-0dc4-4a18-bcb5-1fdd419b2177"},{"pillar":"Planet/Environment","sustainabilityArea":"Resource availability","subject":"Resource circularity","metricDescription":"Report the most appropriate resource circularity metric(s) for the whole company and/or at a product, material or site level as applicable.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"2.7.1e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"fe1be061-fc0c-4e04-baf6-b9535e036877"},{"pillar":"People/Social","sustainabilityArea":"Dignity and equality","subject":"Diversity and inclusion (%)","metricDescription":"Percentage of employees per employee category:\\r\\nage group","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 405-1b","capitalism":"3.1.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"084bd344-d1dc-4c7c-ad76-4df8c0af3298"},{"pillar":"People/Social","sustainabilityArea":"Dignity and equality","subject":"Pay equality (%)","metricDescription":"Ratio of the basic salary and remuneration for each employee category by significant locations of operation for priority areas of equality: women to men","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"Adapted from GRI 405-2","capitalism":"3.1.2c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"9f711d7a-359d-4f52-a4ab-c8e0097777cb"},{"pillar":"People/Social","sustainabilityArea":"Dignity and equality","subject":"Wage level (%)","metricDescription":"Ratios of standard entry level wage by gender compared to local minimum wage.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 202-1","capitalism":"3.1.3c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"3dbcb903-4c99-409a-9724-37d8a1badded"},{"pillar":"People/Social","sustainabilityArea":"Dignity and equality","subject":"Risk for incidents of child, forced or compulsory labour","metricDescription":"An explanation of the operations and suppliers considered to have significant risk for incidents of child labour, forced or compulsory labour.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 408-1b, GRI 409-1a","capitalism":"3.1.4c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"c698b333-db49-4631-b541-56c21a097ef9"},{"pillar":"People/Social","sustainabilityArea":"Dignity and equality","subject":"Pay gap (%, #)","metricDescription":"1. Mean pay gap of basic salary and remuneration of full-time relevant employees based on gender (women to men) at a company level or by significant location of operation.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 102-38","capitalism":"3.1.5e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"335879e8-56a5-46a7-8275-b5071005ceab"},{"pillar":"People/Social","sustainabilityArea":"Dignity and equality","subject":"Discrimination and harassment incidents (#) and the total  amount of monetary losses ($)","metricDescription":"Number of discrimination and harassment incidents","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 406-1","capitalism":"3.1.6e","sasb":"SASB FR-310a.4 ","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"7c52be31-178f-480c-b81a-f546b5767fee"},{"pillar":"People/Social","sustainabilityArea":"Dignity and equality","subject":"Freedom of association and collective bargaining at risk (%)","metricDescription":"1. Percentage of active workforce covered under collective bargaining agreements","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 407-1","capitalism":"3.1.7e","sasb":"SASB CN0401-17","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"4d7498d5-7986-4ed2-babf-506128e52241"},{"pillar":"People/Social","sustainabilityArea":"Dignity and equality","subject":"Human rights review, grievance impact & modern  slavery (#, %)","metricDescription":"1. Total number and percentage of operations that have been subject to human rights reviews or human rights impact assessments, by country.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 412-1\\r\\nGRI 408-1a,\\r\\nAdapted from\\r\\nGRI 408-1a and\\r\\nGRI 409-1","capitalism":"3.1.8e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"9f90caf6-6548-4a55-a01a-87bbe44bce4d"},{"pillar":"People/Social","sustainabilityArea":"Dignity and equality","subject":"Living wage (%)","metricDescription":"Current wages against the living wage for employees and contractors in states and localities where the company is operating.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"3.1.9e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"b11a95ec-54c3-4398-8627-83e21f0c716f"},{"pillar":"People/Social","sustainabilityArea":"Health and well-being","subject":"Health and safety (%)","metricDescription":"The number of fatalities as a result of work-related injury; high-consequence work-related injuries (excluding fatalities); recordable work-related injuries; main types of work-related injury; and the number of hours worked.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI:2018 403-9a&b, GRI:2018 403-6a ","capitalism":"3.2.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"f1b9f4ea-88cb-4400-b7b9-ccd3f92820ea"},{"pillar":"People/Social","sustainabilityArea":"Health and well-being","subject":"Monetized impacts of work-related incidents on organization (#, $)","metricDescription":"By multiplying the number and type of occupational incidents by the direct costs for employees, employers per incident (including actions and/or fines from regulators, property damage, healthcare costs, compensation costs to employees).","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"3.2.2e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"dbeda484-56f6-431e-a724-4d059016cae6"},{"pillar":"People/Social","sustainabilityArea":"Health and well-being","subject":"Employee well-being (#, %)","metricDescription":"1. The number of fatalities as a result of work-related ill-health, recordable work-related ill-health injuries, and the main types of work-related ill-health for all employees and workers.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI:2018 403-10a&b, GRI:2016 403-2a","capitalism":"3.2.3e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"aa16c198-0cda-44f8-b98a-539e68662606"},{"pillar":"People/Social","sustainabilityArea":"Skills for the future","subject":"Training provided (#, $) ","metricDescription":"Average hours of training per person that the organization’s employees have undertaken during the reporting period, by gender (total number of hours of training provided to employees divided by the number of employees). Average training and development expenditure per full time employee (total cost of training provided to employees divided by the number of employees).","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 404-1","capitalism":"3.3.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"fb755ba3-ab1b-45fc-bafb-cf4b2149caf7"},{"pillar":"People/Social","sustainabilityArea":"Skills for the future","subject":"Number of unfilled skilled positions (#, %)","metricDescription":"1. Number of unfilled skilled positions (#).","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"3.3.2e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"0eb4b44e-b336-4e3d-a765-f46500c7a2fc"},{"pillar":"People/Social","sustainabilityArea":"Skills for the future","subject":"Monetized impacts of training – Increased earning capacity as a  result of training intervention (%, $)","metricDescription":"1. Investment in training as a percentage (%) of payroll.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"3.3.3e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"42f38825-39b1-47cb-9768-e7d8c7fc22d8"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Employment and wealth generation","subject":"Absolute number and rate of employment","metricDescription":"1. Total number and rate of new employee hires during the reporting period, by age group, gender, other indicators of diversity and region.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 401-1a&b","capitalism":"3.4.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"6cabba5d-a909-4c5c-b34c-d913ed73e72e"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Employment and wealth generation","subject":"Economic contribution ","metricDescription":"1. Direct economic value generated and distributed (EVG&D), on an accruals basis, covering the basic components for the organization’s global operations, ideally split out by: – Revenues – Operating costs – Employee wages and benefits – Payments to providers of capital – Payments to government – Community investment","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 201-1, GRI 201-4","capitalism":"3.4.2c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"425e9bec-0a64-4b0d-8c9a-d78e8c7a4d82"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Employment and wealth generation","subject":"Financial investment contribution ","metricDescription":"1. Total capital expenditures (CapEx) minus depreciation, supported by narrative to describe the company’s investment strategy. 2. Share buybacks plus dividend payments, supported by narrative to describe the company’s strategy for returns of capital to shareholders.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"","capitalism":"3.4.3c","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"204e82d0-9715-42a4-8a59-640539b8a707"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Employment and wealth generation","subject":"Infrastructure investments and services supported","metricDescription":"Qualitative disclosure to describe the below components: 1. Extent of development of significant infrastructure investments and services supported.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 203-1","capitalism":"3.4.4e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"c6ed1a2e-381b-45fb-90bf-b1bb99e9d82d"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Employment and wealth generation","subject":"Significant indirect economic impacts ","metricDescription":"1. Examples of significant identified indirect economic impacts of the organization, including positive and negative impacts.","reportedMetric":"","sfdr":"","euTaxonomy":"","gri":"GRI 203-2","capitalism":"3.4.5e","sasb":"","cdp":"","ipieca":"","rio":"","report":"Yes","funds":"All","id":"31892a7b-d319-4a22-95fb-6cbe8b90cc04"},{"pillar":"Prosperity/Economic","sustainabilityArea":"Innovation of better products and services","subject":"Total R&D expenses ($)","metricDescription":"Total costs related to research and development.","reportedMetric":"GBP 25,000","sfdr":"","euTaxonomy":"","gri":"","capitalism":"3.5.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"","gresb":""},{"pillar":"Prosperity/Economic","sustainabilityArea":"Innovation of better products and services","subject":"Social value generated (%)","metricDescription":"Percentage of revenue from products and services designed to deliver specific social benefits or to address specific sustainability challenges.","reportedMetric":"45%","sfdr":"","euTaxonomy":"","gri":"","capitalism":"3.5.2e","sasb":"SASB FN0102-16.a","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"","gresb":""},{"pillar":"Prosperity/Economic","sustainabilityArea":"Innovation of better products and services","subject":"Vitality Index","metricDescription":"Percentage of gross revenue from product lines added in last three (or five) years calculated as the sales from products that have been launched in the past three (or five) years divided by total sales, supported by narrative that describes how the company innovates to address specific sustainability challenges.","reportedMetric":"75%","sfdr":"","euTaxonomy":"","gri":"","capitalism":"3.5.3e","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"","gresb":""},{"pillar":"Prosperity/Economic","sustainabilityArea":"Community and social vitality","subject":"Total tax paid","metricDescription":"The total global tax borne by the company, including corporate income taxes, property taxes, non-creditable VAT and other sales taxes, employer-paid payroll taxes, and other taxes that constitute costs to the company, by category of taxes.","reportedMetric":"GBP 60,000/year ","sfdr":"","euTaxonomy":"","gri":"GRI 201-1","capitalism":"3.6.1c","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"","gresb":""},{"pillar":"Prosperity/Economic","sustainabilityArea":"Community and social vitality","subject":"Total Social Investment ($)","metricDescription":"Total Social Investment (TSI) sums up a company’s resources used for “S” in ESG efforts defined by CECP Valuation Guidance.","reportedMetric":"GBP 75,500.","sfdr":"Materiality Assessment Factors","euTaxonomy":"","gri":"","capitalism":"3.6.2e","sasb":"","cdp":"C14","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"","gresb":""},{"pillar":"Prosperity/Economic","sustainabilityArea":"Community and social vitality","subject":"Additional tax remitted","metricDescription":"The total additional global tax collected by the company on behalf of other taxpayers, including VAT and employee-related taxes that are remitted by the company on behalf of customers or employees, by category of taxes.","reportedMetric":"GBP 40,000","sfdr":"","euTaxonomy":"","gri":"GRI 201-1","capitalism":"3.6.3e","sasb":"","cdp":"C11","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"","gresb":""},{"pillar":"Prosperity/Economic","sustainabilityArea":"Community and social vitality","subject":"Total tax paid by country for significant locations","metricDescription":"Total tax paid","reportedMetric":"GBP 100,000","sfdr":"","euTaxonomy":"","gri":"GRI 201-1","capitalism":"3.6.4e","sasb":"","cdp":"","ipieca":"","rio":"","report":"","funds":"","id":"","tcfd":"","gresb":""}]');var MDn;const VDn=(0,Ge.default)(ze.fv)(MDn||(MDn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n  overflow-y: auto;\n"]))),zDn=(e,n,t)=>null!=n&&n[t]?(0,Ze.jsx)(e,{}):(0,Ze.jsx)(m.C5,{to:"/governance"}),GDn=()=>{const{data:{comply:e}}=Td(),{data:n}=Yp(),t=oc(),a=(null==n?void 0:n.role.role)===Vt.gG.Individual&&(null==n?void 0:n.account.type)===CI;return(0,Ze.jsx)(VDn,{container:!0,item:!0,children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"",element:(0,Ze.jsx)(UTn,{accessControls:e,isShouldUserUpgrade:a})}),(0,Ze.jsx)(m.qh,{path:t.governance.systems,element:zDn(ofn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:t.governance.agreements,element:zDn(ofn,e,"agreements")}),(0,Ze.jsx)(m.qh,{path:t.governance.frameworks,element:zDn(ofn,e,"frameworks")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.systems,"/50f543aa-da72-4090-8f1f-0a1fbd218b0b/*"),element:zDn(Qxn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.systems,"/:id/*"),element:zDn(Evn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.agreements,"/:id/*"),element:zDn(Evn,e,"agreements")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.frameworks,"/:id/*"),element:zDn(Evn,e,"frameworks")}),(0,Ze.jsx)(m.qh,{path:t.governance.policies,element:zDn(fkn,e,"policies")}),(0,Ze.jsx)(m.qh,{path:t.governance.targets,element:zDn(tCn,e,"targets")}),(0,Ze.jsx)(m.qh,{path:t.governance.materiality,element:(0,Ze.jsx)(BDn,{materialities:UDn})}),(0,Ze.jsx)(m.qh,{path:t.governance.aspects,element:zDn(RNn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.aspects,"/:id"),element:zDn(cwn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:t.governance.health,element:zDn(TDn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:t.governance.legislation,element:(0,Ze.jsx)(xmn,{accessControls:e})}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.legislation,"/:id"),element:(0,Ze.jsx)(Lpn,{accessControls:e,isShouldUserUpgrade:a})}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.legislation,"/:id/:tagId"),element:(0,Ze.jsx)(Lpn,{accessControls:e,isShouldUserUpgrade:a})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:t.governance.root})})]})})},$Dn=(e,n)=>n?(0,Ze.jsx)(e,{}):(0,Ze.jsx)(m.C5,{to:"/"});function WDn(e,n,t,a){return(0,h.IT)(Wf,{variables:{accountId:e,contributorAccountId:n,contributorUserId:t,contributorUserGroupId:a},fetchPolicy:"network-only",skip:!n})}const qDn=(e,n,t,a)=>Rt(Wf,{variables:{accountId:e,contributorAccountId:n,contributorUserId:t,contributorUserGroupId:a},fetchPolicy:"network-only",keepErrorAfterUnmount:!0,skip:!n});var JDn,YDn,HDn;function KDn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const QDn=(0,Ge.default)(ze.fv)(JDn||(JDn=KDn(["\n  display: flex;\n  height: 100%;\n"]))),ZDn=(0,Ge.default)(hO)(YDn||(YDn=KDn(["\n  width: 100%;\n  height: 100%;\n  flex: 1;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),XDn=(0,Ge.default)(ze.fv)(HDn||(HDn=KDn(["\n  justify-content: flex-end;\n"])));function eAn(){const{contributorId:e}=(0,m.g)(),[n,t,a]=e.split(":"),r=rt(),i=WDn(r,n,t,a),o=(0,g.useCallback)(()=>i.refetch({accountId:r}),[r,i]),l=(0,m.Zp)();return(0,Ze.jsx)(pb,{result:i,error:(0,g.useCallback)(e=>e.message.includes("Not found")?(0,Ze.jsx)(Zg,{error:e}):(0,Ze.jsx)(ub,{error:e,retry:o}),[o]),data:(0,g.useCallback)(e=>{let{getMySurveyContributorById:{account:n,surveys:t}}=e;return(0,Ze.jsxs)(QDn,{children:[(0,Ze.jsx)(bh,{icon:["rio","clipboard-check-custom"],iconColor:"quaternary",title:n.name,breadcrumb:[{to:"../sent/overview",title:"Surveys sent"},{to:"../sent/contributors",title:"Contributors"},{title:n.name}],children:(0,Ze.jsx)(XDn,{span:9,container:!0,children:(0,Ze.jsx)(PO,{children:"More information"})})}),(0,Ze.jsx)(ZDn,{children:t.map(e=>{var n;const t=YT(null===(n=e.submission)||void 0===n?void 0:n.status);return(0,Ze.jsx)(kO,{survey:e,onClick:()=>{t&&e.submission&&l("./submission/".concat(e.submission.id))},disabled:!t},e.id)})})]})},[l])})}var nAn,tAn;function aAn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const rAn=(0,Ge.default)(ze.fv)(nAn||(nAn=aAn(["\n  display: flex;\n  height: 100%;\n"]))),iAn=Ge.default.div(tAn||(tAn=aAn(["\n  height: 100%;\n"]))),oAn=e=>{let{value:n}=e;return n||"-"},lAn=e=>{let{data:n}=e;if(!n.user)return null;const{first_name:t,last_name:a}=n.user;return"".concat(t," ").concat(a)},sAn=e=>{let{value:n}=e;return n&&JSON.parse(n).feedback||"-"},cAn=[{headerName:"Date & Time",field:"createdDate",valueFormatter:e=>Ba(e.value)},{headerName:"User",valueFormatter:oAn,valueGetter:lAn},{headerName:"Contributor",field:"account.name",valueFormatter:oAn},{headerName:"Action",field:"type",flex:1,valueFormatter:oAn},{headerName:"Manager comments",field:"payload",valueFormatter:sAn}];function dAn(e){let{rows:n}=e;return(0,Ze.jsx)(iAn,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,{rowData:n,columnDefs:cAn})})}var uAn,pAn,mAn,fAn,yAn,gAn,bAn,hAn,vAn,xAn,TAn,OAn,kAn,jAn,CAn,SAn,NAn,wAn;function DAn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const AAn=(0,D.J1)(uAn||(uAn=DAn(["\n  fragment SurveyTemplateAllFields on SurveyTemplate {\n    id\n    formContent\n    questions {\n      id\n      name\n      title\n      type\n      isKeyMetric\n      category {\n        id\n        name\n        parentCategory {\n          id\n          name\n        }\n      }\n      options {\n        name\n        score\n        isDataMissingMarker\n        isNotApplicableMarker\n      }\n    }\n  }\n"]))),RAn=(0,D.J1)(pAn||(pAn=DAn(["\n  fragment SurveySubmissionAllFields on SurveySubmission {\n    id\n    status\n    answers {\n      id\n      answer\n      questionId\n    }\n    owner {\n      id\n    }\n    userId\n    userGroupId\n  }\n"]))),PAn=(0,D.J1)(mAn||(mAn=DAn(["\n  fragment SurveyOwnerFields on Account {\n    id\n  }\n"]))),LAn=(0,D.J1)(fAn||(fAn=DAn(["\n  fragment SurveyBaseFields on Survey {\n    id\n    name\n    status\n    startDate\n    deadlineDate\n    notes\n    dashboardId\n    automatedScoring\n    feedbackEnabled\n    isIndividualContributor\n    isUserGroupContributor\n  }\n"]))),IAn=(0,D.J1)(yAn||(yAn=DAn(["\n  query GetSurveysPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n    getSurveysPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        id\n        name\n        status\n        startDate\n        deadlineDate\n        notes\n        submissions {\n          id\n          status\n          owner {\n            id\n          }\n          userGroupId\n          userId\n        }\n        contributors {\n          ... on AccountSurveyContributor {\n            account {\n              id\n              name\n            }\n            user {\n              id\n              first_name\n              last_name\n              email\n            }\n            surveys {\n              id\n              name\n              lockedBy {\n                id\n                first_name\n                last_name\n              }\n            }\n            tagId\n          }\n        }\n        automatedScoring\n        feedbackEnabled\n        owner {\n          id\n        }\n        isIndividualContributor\n        isUserGroupContributor\n      }\n    }\n  }\n"]))),EAn=(0,D.J1)(gAn||(gAn=DAn(["\n  fragment ContributorFilteredBySurveyFields on AccountSurveyContributor {\n    account {\n      id\n      name\n    }\n    user {\n      id\n      first_name\n      last_name\n      email\n    }\n    userGroup {\n      id\n      name\n    }\n    surveys(id: $id) {\n      id\n      name\n      lockedBy {\n        id\n        first_name\n        last_name\n      }\n    }\n    tagId\n  }\n"]))),_An=(0,D.J1)(bAn||(bAn=DAn(["\n  mutation CreateSurvey($survey: SurveyInput!) {\n    createSurvey(survey: $survey) {\n      ...SurveyBaseFields\n    }\n  }\n  ","\n"])),LAn),FAn=((0,D.J1)(hAn||(hAn=DAn(["\n  query GetAccountInfo($id: ID!) {\n    getAccountInfo(id: $id) {\n      children {\n        id\n        name\n      }\n    }\n  }\n"]))),(0,D.J1)(vAn||(vAn=DAn(["\n  mutation DeleteSurvey($id: ID!) {\n    deleteSurvey(id: $id)\n  }\n"])))),BAn=(0,D.J1)(xAn||(xAn=DAn(["\n  mutation DeleteSurveyResponse($submissionId: ID!) {\n    deleteSurveySubmission(submissionId: $submissionId)\n  }\n"]))),UAn=(0,D.J1)(TAn||(TAn=DAn(["\n  mutation UpdateSurvey($id: ID!, $survey: SurveyInput!) {\n    updateSurvey(id: $id, survey: $survey) {\n      ...SurveyBaseFields\n    }\n  }\n  ","\n"])),LAn),MAn=(0,D.J1)(OAn||(OAn=DAn(["\n  query GetSurvey($id: ID!) {\n    getSurveyById(id: $id) {\n      ...SurveyBaseFields\n    }\n  }\n  ","\n"])),LAn),VAn=(0,D.J1)(kAn||(kAn=DAn(["\n  query GetSurveyTemplate($id: ID!) {\n    getSurveyById(id: $id) {\n      template {\n        ...SurveyTemplateAllFields\n      }\n    }\n  }\n  ","\n"])),AAn),zAn=(0,D.J1)(jAn||(jAn=DAn(["\n  query GetSurveySubmissions($id: ID!) {\n    getSurveyById(id: $id) {\n      submissions {\n        ... on SurveySubmission {\n          ...SurveySubmissionAllFields\n        }\n      }\n    }\n  }\n  ","\n"])),RAn),GAn=(0,D.J1)(CAn||(CAn=DAn(["\n  query GetSurveyContributors($id: ID!) {\n    getSurveyById(id: $id) {\n      contributors {\n        ... on AccountSurveyContributor {\n          ...ContributorFilteredBySurveyFields\n        }\n      }\n    }\n  }\n  ","\n"])),EAn),$An=(0,D.J1)(SAn||(SAn=DAn(["\n  query GetSurveyOwner($id: ID!) {\n    getSurveyById(id: $id) {\n      owner {\n        ...SurveyOwnerFields\n      }\n    }\n  }\n  ","\n"])),PAn),WAn=(0,D.J1)(NAn||(NAn=DAn(["\n  query getSurveyLatest($accountId: ID!) {\n    getSurveyLatest(accountId: $accountId) {\n      ...SurveyBaseFields\n    }\n  }\n  ","\n"])),LAn);function qAn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function JAn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qAn(Object(t),!0).forEach(function(n){YAn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qAn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function YAn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}(0,D.J1)(wAn||(wAn=DAn(["\n  query GetSurveyName($id: ID!) {\n    getSurveyById(id: $id) {\n      name\n    }\n  }\n"])));const HAn=[];function KAn(e){var n;const t=null!==(n=e.fields)&&void 0!==n?n:HAn,[a,r]=(0,g.useState)(null),[i,o]=(0,g.useState)(!1),[l,s]=(0,g.useState)(null),{showNotification:c}=vt(),d=rt(),[u]=Jm(WAn,{fetchPolicy:"network-only"}),[p]=Jm(MAn,{fetchPolicy:"network-only"}),[m]=Jm(VAn,{fetchPolicy:"network-only"}),[f]=Jm(zAn,{fetchPolicy:"network-only"}),[y]=Jm($An,{fetchPolicy:"network-only"}),[b]=Jm(GAn,{fetchPolicy:"network-only"}),h=(0,g.useMemo)(()=>({template:m,submissions:f,owner:y,contributors:b}),[m,f,y,b]),v=(0,g.useCallback)(async()=>{let n;if(e.id){var a;const t=await p({variables:{id:e.id}});n=JAn({},null===(a=t.data)||void 0===a?void 0:a.getSurveyById)}else{var r,i;const e=await u({variables:{accountId:d}});if(null===(r=e.data)||void 0===r||!r.getSurveyLatest)return null;n=JAn({},null===(i=e.data)||void 0===i?void 0:i.getSurveyLatest)}if(!n)throw new Error("Survey not loaded");return await Promise.all(t.map(async e=>{const t=h[e];if(t){var a;const r=await t({variables:{id:n.id}});null!==(a=r.data)&&void 0!==a&&a.getSurveyById[e]&&Object.assign(n,{[e]:r.data.getSurveyById[e]})}})),n},[e.id,u,p,t,d,h]),x=(0,g.useCallback)(async()=>{if(i)throw new Error("Survey already loading");o(!0),await v().then(e=>{r(e),s(null)}).catch(e=>{s(e),c("Survey not loaded","danger")}).finally(()=>{o(!1)})},[v,c,i]),T=(0,g.useCallback)(()=>{r(null),s(null),o(!1)},[]);return(0,g.useMemo)(()=>({survey:a,loading:i,error:l,load:x,reset:T}),[a,i,l,x,T])}function QAn(){const{showNotification:e}=vt();return Qm(_An,{onCompleted:()=>{e("Your survey has been sent to its recipients","success")},onError:n=>{e(n?"".concat(n):"We’re sorry but we are unable to publish right now - please try again later","danger")}})}function ZAn(){const{showNotification:e}=vt(),n={accountId:rt()};return Qm(FAn,{refetchQueries:[{query:WAn,variables:n}],awaitRefetchQueries:!0,onCompleted:()=>{e("Survey has been deleted.","success")},onError:n=>{e("Something went wrong. If the problem persists, contact support. ".concat(n),"danger")},update:(e,t)=>{var a;const r=e.readQuery({query:IAn,variables:n}),i=null==t||null===(a=t.data)||void 0===a?void 0:a.deleteSurvey;i&&null!=r&&r.getSurveysPage&&e.writeQuery({query:IAn,variables:n,data:{rows:r.getSurveysPage.rows.filter(e=>e.id!==i)}})}})}function XAn(e){let{accountId:n,offset:t=0,limit:a,sort:r=[],filters:i={}}=e;return Rt(IAn,{variables:{accountId:n,offset:t,limit:a,sort:r,filters:i},fetchPolicy:"network-only",keepErrorAfterUnmount:!0})}function eRn(){const{surveyId:e}=(0,m.g)(),n={id:e},t=rt(),{showNotification:a}=vt(),r={accountId:t};return(0,Ot.n)(UAn,{onCompleted:()=>{a("The survey has been successfully updated!","success")},onError:e=>{a("Something went wrong. If the problem persists, contact support. ".concat(e),"danger")},update:(e,t)=>{var a;const i=null===(a=t.data)||void 0===a?void 0:a.updateSurvey;if(i){e.writeQuery({variables:n,query:MAn,data:{getSurveyById:i}});const t=e.readQuery({query:IAn,variables:r});null!=t&&t.getSurveysPage&&e.writeQuery({variables:r,query:IAn,data:{rows:t.getSurveysPage.rows.map(e=>e.id===i.id?i:e)}})}}})}const nRn=[{to:"../sent/overview",title:"Surveys"},{to:"../sent/surveys",title:"Sent surveys"}],tRn=()=>(0,Ze.jsx)(Gh,{title:"Contributors haven't interacted with this survey yet",description:"Their interactions will be logged soon after they occur",icon:["rio","clipboard-check-custom"]});function aRn(){const e=rt(),{surveyId:n}=(0,m.g)(),{survey:t}=KAn({id:n,fields:[]}),a=Pt(n),r=(0,g.useMemo)(()=>t?[...nRn,{to:"../sent/surveys/".concat(t.id),title:null==t?void 0:t.name},{title:"Survey log"}]:nRn,[t]),i=(0,g.useCallback)(e=>{let{getAuditByEntityId:n}=e;return n.length?(0,Ze.jsx)(dAn,{rows:n}):(0,Ze.jsx)(tRn,{})},[]),o=(0,g.useCallback)((n,t)=>{let{refetch:a}=t;return(0,Ze.jsx)(ub,{error:n,retry:()=>a({accountId:e})})},[e]),l=(0,g.useCallback)(()=>(0,Ze.jsx)(Vg,{name:"SurveyAuditLogContainer__Loading"}),[]);return(0,Ze.jsxs)(rAn,{children:[(0,Ze.jsx)(bh,{name:"SurveyAuditLog",icon:"clipboard-check",iconColor:"quaternary",title:"Survey log",breadcrumb:r}),(0,Ze.jsx)(pb,{result:a,data:i,error:o,loading:l})]})}const rRn=()=>{const{surveyId:e}=(0,m.g)(),{data:n,loading:t}=Lt(e),a=(null==n?void 0:n.getAuditByEntityId)||[];return t?null:(0,Ze.jsx)(dRn,{rows:a})},iRn=[{headerName:"Date & Time",field:"createdDate",valueFormatter:e=>Ba(e.value)},{headerName:"User",valueFormatter:oAn,valueGetter:lAn},{headerName:"Action",field:"type",flex:1,valueFormatter:oAn},{headerName:"Manager comments",field:"payload",valueFormatter:sAn}];function oRn(e){let{rows:n}=e;return(0,Ze.jsx)(iAn,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,{rowData:n,columnDefs:iRn})})}var lRn;const sRn=(0,f.styled)(f.AgGrid)(lRn||(lRn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: calc(100vh - 216px); // header + page title height\n  padding-bottom: 2px; // border bottom and shadow to show properly\n"]))),cRn=[{headerName:"Date & Time",field:"createdDate",valueFormatter:e=>Ba(e.value)},{headerName:"User",valueFormatter:oAn,valueGetter:lAn},{headerName:"Action",field:"type",flex:1,valueFormatter:oAn},{headerName:"Manager comments",field:"payload",valueFormatter:sAn}],dRn=e=>{let{rows:n}=e;const t=rt(),a=(0,g.useMemo)(()=>({rowData:n,suppressLoadingOverlay:!0,columnDefs:cRn}),[n]);return(0,Ze.jsx)(sRn,{gridKey:"receivedSurveyAuditLogGridV2",gridOptions:a},t)};var uRn,pRn,mRn;function fRn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(0,D.J1)(uRn||(uRn=fRn(["\n  mutation UploadDocument($id: ID!, $accountId: ID!, $file: File!, $fileName: String!, $key: String!) {\n    uploadDocument(id: $id, accountId: $accountId, file: $file, fileName: $fileName, key: $key) @client {\n      status\n      fileUploaded\n    }\n  }\n"])));const yRn=(0,D.J1)(pRn||(pRn=fRn(["\n  mutation CreateDocumentRecord($input: CreateDocumentRecordInput!) {\n    createDocumentRecord(input: $input) {\n      id\n      link\n    }\n  }\n"]))),gRn=(0,D.J1)(mRn||(mRn=fRn(["\n  mutation DeleteDocumentRecords($ids: [ID!]!) {\n    deleteDocumentRecords(ids: $ids)\n  }\n"]))),bRn=[Vt.xV.Checkbox,Vt.xV.Tagbox,Vt.xV.File];function hRn(e,n,t){const a=my()(t.questions,"id");return e.reduce((e,t)=>{const r=JSON.parse(t.answer),i=a[t.questionId];return i?(a[t.questionId].type===Vt.xV.File?e[i.name]=r.map(e=>n[e]).filter(Boolean):e[i.name]=r,e):e},{})}const vRn=e=>{if(null==e)return!1;const n="string"==typeof e&&'""'!==e&&""!==e&&"[]"!==e&&"{}"!==e,t="boolean"==typeof e,a="number"==typeof e,r=Array.isArray(e)&&e.length>0,i="object"==typeof e&&null!==e&&!Array.isArray(e)&&Object.keys(e).length>0;return n||t||a||r||i},xRn=(e,n)=>{const t=(0,g.useMemo)(()=>{if(!e)return[];const t=(0,zt.keyBy)(null==n?void 0:n.questions,"id");return e.answers.filter(e=>{var n;return(null===(n=t[e.questionId])||void 0===n?void 0:n.type)===Vt.xV.File}).map(e=>JSON.parse(e.answer)).flat()},[e,n]),[a,r]=(0,g.useState)({}),{data:{getDocumentRecordsByIds:i}={getDocumentRecordsByIds:[]}}=(0,h.IT)(Uf,{skip:!t.length,variables:{ids:t}});return(0,g.useEffect)(()=>{if(!i.length)return;const e=i.map(async e=>{const n=await(async(e,n)=>{const t=await fetch(e),a=await t.blob();return new File([a],n,{type:a.type})})(e.link,e.fileName),t=await CK(n);return{id:e.id,name:e.fileName,content:t,type:n.type}});Promise.all(e).then(e=>{r((0,zt.keyBy)(e,"id"))})},[i]),(0,g.useMemo)(()=>({uploadedDocuments:a,uploadedDocumentsIds:t}),[a,t])},TRn=e=>{let{accountId:n,surveyId:t,model:a,version:r,uploadedDocumentsIds:i,saveWithoutDebounce:o}=e;const l=st(),[s]=(0,p.useSearchParams)(),c=l?s.get("contributorId"):null,{uploadDocuments:d,loading:u}=(e=>{const{token:n}=at(),t=al(),[a,{loading:r}]=(0,Ot.n)(yRn),i=(0,g.useCallback)(async r=>{const i=[];for(const l in r){const s=r[l],c=[];for(const r of s){var o;if(r.id){c.push(r.id);continue}const i=(0,Ai.A)(),l=await jK(r.content,r.name,r.type);await t(e,i,l);const s=await a({variables:{input:{id:i,accountId:e,fileName:r.name,userId:n.sub,source:Vt.kL.S3,key:v3(e,i),library:Vt.zM.Invest,category:"Forms"}}});null!==(o=s.data)&&void 0!==o&&null!==(o=o.createDocumentRecord)&&void 0!==o&&o.id&&c.push(s.data.createDocumentRecord.id)}c.length&&i.push({name:l,value:JSON.stringify(c)})}return i},[e,n.sub,a,t]);return(0,g.useMemo)(()=>({uploadDocuments:i,loading:r}),[i,r])})(n),{saveSubmissionWithoutDebounce:m,loading:f,saveSubmission:y}=(()=>{const[e,{loading:n}]=(0,Ot.n)(Ff),t=(0,oE.useDebouncedCallback)(function(){e(...arguments)},5e3,{leading:!0});return(0,g.useEffect)(()=>()=>{t.isPending()&&t.flush()},[t]),(0,g.useMemo)(()=>({saveSubmission:t,loading:n,saveSubmissionWithoutDebounce:e}),[t,e,n])})(),[b,{loading:h}]=(0,Ot.n)(gRn),v=(0,g.useMemo)(()=>a?a.getAllQuestions().filter(e=>"file"===e.getType()).map(e=>e.name):[],[a]),x=(0,g.useCallback)(async(e,l,s)=>{if(!a)return;const u=function(e){return Object.entries(e).map(e=>{let[n,t]=e;return{name:n,value:JSON.stringify(t)}})}(a.data).filter(e=>!v.includes(e.name)).filter(e=>vRn(e.value)),p=Object.entries(a.data).filter(e=>v.includes(e[0])).reduce((e,n)=>{let[t,a]=n;return e[t]=a,e},{});if(Object.keys(p).length>0){const e=await d(p);e.length>0&&u.push(...e)}const f=((e,n)=>{const t=n.map(e=>e.id).filter(Boolean);return e.filter(e=>!t.includes(e))})(i,Object.values(p).flat());f.length>0&&await b({variables:{ids:f}});const g=[...a.getAllQuestions().filter(e=>{const n=a.data[e.name];return!vRn(n)}).map(e=>bRn.includes(e.getType())?{name:e.name,value:JSON.stringify([])}:{name:e.name,value:JSON.stringify("")}),...u];(o?m:y)({variables:{accountId:c||n,surveyId:t,submission:{surveyId:t,accountId:c||n,answers:g,status:e,version:r}},onCompleted:l,onError:s})},[o,c,n,v,b,a,y,m,t,r,i,d]);return(0,g.useMemo)(()=>({submitData:x,loading:f||u||h}),[h,f,u,x])},ORn="audit_survey_received_loaded",kRn="audit_survey_received_unloaded",jRn=(e,n)=>JSON.parse(localStorage.getItem(e)||"{}")[n],CRn=(e,n,t)=>{const a=JSON.parse(localStorage.getItem(e)||"{}");a[n]=t,localStorage.setItem(e,JSON.stringify(a))},SRn=()=>{const[e]=(0,Ot.n)(Nt);return{createSurveyAuditEvent:async(n,t,a,r)=>{if(!((e,n)=>{const t="received/".concat(n.id);return"opened"===e&&window.location.pathname===t||"closed"===e&&window.location.pathname!==t})(n,t))return;const i=((e,n)=>{let t;var a;return"opened"===e?(a=n.id,t=jRn(ORn,a)):"closed"===e&&(t=(e=>jRn(kRn,e))(n.id)),t})(n,t);if(i&&(e=>{const n=new Date(e),t=new Date;return t.setHours(t.getHours()-1),n>t})(i))return;((e,n)=>{const t=new Date;"opened"===e?((e,n)=>{CRn(ORn,e,n)})(n.id,t):"closed"===e&&((e,n)=>{CRn(kRn,e,n)})(n.id,t)})(n,t);const o=((e,n,t,a)=>({service:Vt.nA.FormService,entityId:e.id,entity:Vt.nE.FormCampaign,accountId:t,userId:a,type:"Survey ".concat(n)}))(t,n,a,r);return e({variables:{event:o}})}}};function NRn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wRn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?NRn(Object(t),!0).forEach(function(n){DRn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):NRn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function DRn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ARn=[{to:"../received",title:"Surveys received"}],RRn=()=>(0,Ze.jsx)(Gh,{title:"You don't have any logged responses",description:"Responses will be logged soon after you submit your answers to this survey",icon:["rio","clipboard-check-custom"]});function PRn(){var e;const{surveyId:n}=(0,m.g)(),t=rt(),a=_u(),r=function(e,n,t){return(0,h.IT)(_f,{fetchPolicy:"network-only",variables:{id:e,accountId:n,userId:t}})}(n,t,(null==a?void 0:a.id)||""),i=Pt(null===(e=r.data)||void 0===e||null===(e=e.getReceivedSurveyById)||void 0===e||null===(e=e.submission)||void 0===e?void 0:e.id),o=(0,g.useMemo)(()=>{var e;if(null!==(e=r.data)&&void 0!==e&&e.getReceivedSurveyById){var n;const e=null===(n=r.data)||void 0===n?void 0:n.getReceivedSurveyById;return[...ARn,{to:"../received/".concat(e.id),title:e.name},{title:"Response log"}]}return ARn},[r]),l=(0,g.useCallback)(e=>e.message.toLowerCase().includes("not found")?(0,Ze.jsx)(RRn,{}):(0,Ze.jsx)(ub,{error:e}),[]);return(0,Ze.jsx)(rAn,{children:(0,Ze.jsx)(pb,{result:r,data:(0,g.useCallback)(e=>{let{getReceivedSurveyById:n}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(bh,{name:"SurveyContributorAuditLog",icon:"clipboard-check",iconColor:"quaternary",title:"Response log",breadcrumb:o}),null!=n&&n.submission?(0,Ze.jsx)(pb,{result:i,data:e=>{let{getAuditByEntityId:n}=e;return(0,Ze.jsx)(oRn,{rows:n})}}):(0,Ze.jsx)(RRn,{})]})},[i,o]),error:l})})}const LRn=()=>{var e;const{surveyId:n}=(0,m.g)(),t=rt(),a=_u(),{data:r}=((e,n,t)=>Rt(_f,{variables:{id:e,accountId:n,userId:t},fetchPolicy:"no-cache"}))(n,t,(null==a?void 0:a.id)||""),i=(null==r||null===(e=r.getReceivedSurveyById)||void 0===e||null===(e=e.submission)||void 0===e?void 0:e.id)||"",{data:o,loading:l}=Lt(i),s=(null==o?void 0:o.getAuditByEntityId)||[];return l?null:(0,Ze.jsx)(dRn,{rows:s})},IRn=[{to:"../sent/overview",title:"Surveys sent"},{to:"../sent/contributors",title:"Contributors"}],ERn=()=>(0,Ze.jsx)(Gh,{title:"Contributor hasn't responded to your questions yet",description:"Responses will be logged soon after contributor saves his answers",icon:["rio","clipboard-check-custom"]});function _Rn(){var e,n,t;const{contributorId:a,surveyId:r}=(0,m.g)(),[i,o,l]=a.split(":"),s=WDn(rt(),i,o,l),c=null===(e=s.data)||void 0===e?void 0:e.getMySurveyContributorById,d=null==c||null===(n=c.surveys)||void 0===n?void 0:n.find(e=>e.id===r),u=Pt(null==d||null===(t=d.submission)||void 0===t?void 0:t.id),p=(0,g.useMemo)(()=>{var e;return c&&d?[...IRn,{to:"../sent/contributors/".concat(c.account.id),title:c.account.name},(null===(e=d.submission)||void 0===e?void 0:e.id)&&{to:"../sent/contributors/".concat(c.account.id,"/submission/").concat(d.submission.id),title:d.name},{title:"Response log"}].filter(Boolean):IRn},[c,d]),f=(0,g.useCallback)(e=>e.message.toLowerCase().includes("not found")?(0,Ze.jsx)(ERn,{}):(0,Ze.jsx)(ub,{error:e}),[]);return(0,Ze.jsxs)(rAn,{children:[(0,Ze.jsx)(bh,{name:"SurveyMyContributorAuditLog",icon:"clipboard-check",iconColor:"quaternary",title:"Response log",breadcrumb:p}),(0,Ze.jsx)(pb,{result:s,data:(0,g.useCallback)(()=>null!=d&&d.submission?(0,Ze.jsx)(pb,{result:u,data:e=>{let{getAuditByEntityId:n}=e;return(0,Ze.jsx)(oRn,{rows:n})}}):(0,Ze.jsx)(ERn,{}),[u,null==d?void 0:d.submission]),error:f})]})}const FRn=()=>{var e,n;const t=rt(),{contributorId:a,surveyId:r}=(0,m.g)(),[i,o,l]=a.split(":"),{data:s}=qDn(t,i,o,l),c=null==s||null===(e=s.getMySurveyContributorById)||void 0===e?void 0:e.surveys,d=null==c?void 0:c.find(e=>e.id===r),{data:u,loading:p}=Lt(null==d||null===(n=d.submission)||void 0===n?void 0:n.id),f=(null==u?void 0:u.getAuditByEntityId)||[];return p?null:(0,Ze.jsx)(dRn,{rows:f})};var BRn;const URn=Ge.default.div(BRn||(BRn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  --ag-borders: none;\n  --ag-border-color: #e8e9ec;\n  --ag-borders-row: 1px solid;\n  --ag-odd-row-background-color: #fafafa;\n  --ag-data-color: #000000;\n  --ag-font-size: 14px;\n\n  height: 100%;\n  max-width: 100%;\n\n  & :not(.ag-row) {\n    border: 0;\n  }\n\n  &&& .ag-cell:focus {\n    border: 0;\n  }\n  &&& .ag-row .ag-cell {\n    display: flex;\n    align-items: center;\n  }\n"])));var MRn,VRn,zRn;function GRn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $Rn=(0,Ge.default)(URn)(MRn||(MRn=GRn(["\n  --ag-row-height: ","px;\n  --ag-row-hover-color: #e8e9ec;\n\n  & .ag-paging-panel {\n    justify-content: flex-start;\n  }\n\n  && .ag-row:hover {\n    cursor: pointer;\n  }\n  &&&& .ag-row .ag-cell {\n    line-height: 17px;\n  }\n  &&& .ag-row .ag-cell:first-child {\n    padding-left: 12px;\n  }\n"])),50),WRn=(0,Ge.default)(URn)(VRn||(VRn=GRn(["\n  --ag-row-height: ","px;\n  --ag-row-hover-color: #e8e9ec;\n\n  & .ag-paging-panel {\n    justify-content: flex-start;\n  }\n\n  && .ag-row:hover {\n    cursor: pointer;\n  }\n  &&&& .ag-row .ag-cell {\n    line-height: 17px;\n  }\n  &&& .ag-row .ag-cell:first-child {\n    padding-left: 12px;\n  }\n\n  .ag-root-wrapper-body {\n    height: 100%;\n  }\n\n  .ag-layout-normal {\n    min-height: 350px;\n  }\n\n  .ag-paging-panel,\n  .ag-header {\n    font-family: 'Plus Jakarta Sans';\n    font-size: 14px;\n    font-style: normal;\n    font-weight: 500;\n    line-height: 24px;\n    letter-spacing: 0.5px;\n  }\n\n  &&&& .ag-row {\n    font-family: 'Plus Jakarta Sans';\n    font-size: 14px;\n    font-style: normal;\n    font-weight: 400;\n    line-height: 24px;\n    letter-spacing: 0.5px;\n  }\n"])),50),qRn=Ge.default.div(zRn||(zRn=GRn(["\n  display: flex;\n  align-items: center\n  justify-content: center;\n"]))),JRn=[{headerName:"Name",valueGetter:e=>{let{data:n}=e;return n.user?"".concat(n.user.first_name," ").concat(n.user.last_name," (").concat(n.user.email,")"):n.userGroup?n.userGroup.name:n.account.name},sort:"asc",comparator:ka,flex:100},{headerName:"Contributor Type",valueGetter:e=>{let{data:n}=e;return n.user?"User":n.userGroup?"User Group":"Child Account"},flex:100},{headerName:"Chevron",cellRenderer:"chevron",flex:1}],YRn={filter:!1},HRn={chevron:()=>(0,Ze.jsx)(qRn,{children:(0,Ze.jsx)(ze.In,{icon:"chevron-right",color:"#83838e"})})},KRn=e=>e.data.account.id;function QRn(e){let{contributors:n}=e;const t=(0,m.Zp)(),a=rl()?WRn:$Rn,r=(0,g.useCallback)(e=>{return t("./".concat((n=e.data).user?"".concat(n.account.id,":").concat(n.user.id):n.userGroup?"".concat(n.account.id,"::").concat(n.userGroup.id):n.account.id));var n},[t]);return(0,Ze.jsx)(a,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,{defaultColDef:YRn,rowHeight:50,components:HRn,rowData:n,paginationPageSize:25,getRowId:KRn,columnDefs:JRn,onRowClicked:r,pagination:!0})})}var ZRn,XRn,ePn;function nPn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const tPn=(0,Ge.default)(ze.fv)(ZRn||(ZRn=nPn(["\n  display: flex;\n  height: 100%;\n"]))),aPn=((0,Ge.default)(ze.In)(XRn||(XRn=nPn(["\n  margin-right: 3px;\n  color: ",";\n"])),e=>e.theme.colors.danger.light.background),Ge.default.div(ePn||(ePn=nPn(["\n  display: flex;\n  padding: 10px;\n  align-items: center;\n"]))),[{to:"../sent/overview",title:"Surveys sent"},{title:"Contributors"}]);function rPn(){var e;const n=rt(),t=rO(n),a=(0,g.useCallback)(()=>t.refetch({accountId:n}),[n,t]);return null===(e=t.data)||void 0===e||e.getMySurveyContributors.length,(0,Ze.jsxs)(tPn,{children:[(0,Ze.jsx)(bh,{name:"FormsContributors",icon:["rio","clipboard-check-custom"],iconColor:"quaternary",title:"Contributors",breadcrumb:aPn}),!1,(0,Ze.jsx)(pb,{result:t,error:e=>(0,Ze.jsx)(ub,{error:e,retry:a}),data:e=>e.getMySurveyContributors.length?(0,Ze.jsx)(QRn,{contributors:e.getMySurveyContributors}):(0,Ze.jsx)(Gh,{title:"You don’t have any contributors yet",description:"Contributors are teams that can receive surveys. Contributors will appear once you assign a survey to teams in Surveys > Overview.",icon:["rio","clipboard-check-custom"]}),loading:()=>(0,Ze.jsx)(Vg,{})})]})}var iPn,oPn;function lPn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const sPn=(0,f.styled)("div")(iPn||(iPn=lPn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),cPn=((0,f.styled)("div")(oPn||(oPn=lPn(["\n  display: flex;\n  padding: 10px;\n  align-items: center;\n"]))),()=>{var e;const n=rt(),{data:t,loading:a}=rO(n);return null==t||t.getMySurveyContributors.length,(0,Ze.jsxs)(sPn,{children:[!1,!a&&0===(null==t||null===(e=t.getMySurveyContributors)||void 0===e?void 0:e.length)&&(0,Ze.jsx)(Gh,{title:"You don't have any contributors yet",description:"Contributors are teams that can receive surveys. Contributors will appear once you assign a survey to teams in Surveys > Overview.",icon:["rio","clipboard-check-custom"]}),!a&&(null==t?void 0:t.getMySurveyContributors)&&t.getMySurveyContributors.length>0&&(0,Ze.jsx)(QRn,{contributors:(null==t?void 0:t.getMySurveyContributors)||[]})]})});var dPn,uPn,pPn;function mPn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const fPn=(0,D.J1)(dPn||(dPn=mPn(["\n  fragment ContributorSubmissionFields on SurveySubmission {\n    id\n    status\n    submittedDate\n    owner {\n      id\n      name\n    }\n    survey {\n      id\n      name\n      feedbackEnabled\n      template {\n        id\n        formContent\n        questions {\n          id\n          name\n          type\n        }\n      }\n    }\n    version\n    answers {\n      id\n      answer\n      questionId\n    }\n  }\n"]))),yPn=(0,D.J1)(uPn||(uPn=mPn(["\n  query getMyContributorsSubmission($id: ID!) {\n    getSurveySubmissionById(id: $id) {\n      ...ContributorSubmissionFields\n    }\n  }\n  ","\n"])),fPn),gPn=(0,D.J1)(pPn||(pPn=mPn(["\n  mutation SendFeedbackOnSurveySubmission(\n    $submissionId: ID!\n    $status: SurveySubmissionFeedbackStatus!\n    $feedback: String\n  ) {\n    sendFeedbackOnSurveySubmission(submissionId: $submissionId, status: $status, feedback: $feedback) {\n      ...ContributorSubmissionFields\n    }\n  }\n  ","\n"])),fPn);function bPn(){return(0,Ot.n)(gPn)}var hPn;function vPn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xPn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vPn(Object(t),!0).forEach(function(n){TPn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vPn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function TPn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const OPn=(0,Ge.default)(ze.fv)(hPn||(hPn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  height: 100%;\n"])));function kPn(){const{submissionId:e}=(0,m.g)(),{data:n,loading:t,error:a,refetch:r}=function(e){return(0,h.IT)(yPn,{variables:{id:e}})}(e),{showNotification:i}=vt(),[o]=bPn(),l=null==n?void 0:n.getSurveySubmissionById,s=(0,g.useCallback)(()=>r({id:e}),[e,r]),{uploadedDocuments:c}=xRn(l,null==l?void 0:l.survey.template),[d,u]=(0,g.useState)(!1),p=(0,g.useCallback)(()=>u(!0),[]),f=(0,g.useCallback)(()=>u(!1),[]),y=(0,g.useCallback)((n,t)=>{const a=n===Vt.iD.Approved;return o({variables:{status:n,feedback:t,submissionId:e},onCompleted:()=>{a?i("Response approved successfully","success"):i("Change requests sent successfully","warning")},onError:e=>{i("We couldn't send feedback. Please try again later or contact support@rio.ai: ".concat(e),"danger")}})},[e,o,i]),b=(0,g.useMemo)(()=>{if(!l)return null;const e=new VT.Model(l.survey.template.formContent);return e.showPreviewBeforeComplete="showAnsweredQuestions",l.answers&&(e.data=hRn(l.answers,c,l.survey.template),e.mode="display"),e},[l,c]);if(t)return(0,Ze.jsx)(Vg,{});if(a)return(0,Ze.jsx)(ub,{error:a,retry:s});if(!l)return(0,Ze.jsx)(Zg,{error:"Not found"});const v=null==l?void 0:l.owner,x=null==l?void 0:l.survey;return(0,Ze.jsxs)(OPn,{children:[(0,Ze.jsx)(bh,{icon:["rio","clipboard-check-custom"],iconColor:"quaternary",title:l.survey.name,breadcrumb:[{to:"../sent/overview",title:"Surveys sent"},{to:"../sent/contributors",title:"Contributors"},{to:"../sent/contributors/".concat(v.id),title:v.name},{title:x.name}],children:(0,Ze.jsx)(ok,{onClick:p})}),(0,Ze.jsx)(wj,{model:b,expanded:d,onDismiss:f,survey:xPn(xPn({},x),{},{submission:l}),contributor:v.name,sendFeedback:y})]})}const jPn=(e,n)=>{switch(n){case Vt.ZU.Approved:return e.extendedColors.environmental.color;case Vt.ZU.InProgress:case Vt.ZU.RequiresChanges:return e.customColors.warning.color;case Vt.ZU.ReadyForReview:return e.ref.palette.success[90];default:return e.sys.color.error}};function CPn(e,n){let t="Not started";switch(e){case Vt.ZU.RequiresChanges:t="Changes requested";break;case Vt.ZU.ReadyForReview:t="Requires approval";break;case Vt.ZU.InProgress:t="number"==typeof n?"".concat(n,"% complete"):"In progress";break;case Vt.ZU.Approved:t="Complete"}return t}var SPn;const NPn=(0,f.styled)(f.Text)(SPn||(SPn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  white-space: nowrap;\n  color: ",";\n  &::before {\n    content: '';\n    position: absolute;\n    top: 50%;\n    transform: translateY(-50%);\n    left: 0;\n    display: block;\n    width: 12px;\n    height: 12px;\n    border-radius: 50%;\n    background-color: ",";\n  }\n"])),e=>e.theme.sys.color.onSurface,e=>{let{status:n,theme:t}=e;return jPn(t,n)}).withComponent("span");var wPn;const DPn=(0,f.styled)(f.Button)(wPn||(wPn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 40px;\n"]))),APn=e=>{let{expand:n}=e;return(0,Ze.jsxs)(DPn,{variant:"outlined",onClick:n,children:[(0,Ze.jsx)(f.Icons.Fullscreen,{fontSize:"small"}),(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:"Expand"})]})};var RPn,PPn,LPn,IPn,EPn;function _Pn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const FPn=(0,f.styled)("form")(RPn||(RPn=_Pn(["\n  display: flex;\n  flex-direction: column;\n  gap: 32px;\n  width: 100%;\n"]))),BPn=(0,f.styled)(f.Button)(PPn||(PPn=_Pn(["\n  width: 100%;\n"]))),UPn=(0,f.styled)(f.Grid)(LPn||(LPn=_Pn(["\n  display: flex;\n  gap: 24px;\n  justify-content: space-between;\n"]))),MPn=(0,f.styled)("div")(IPn||(IPn=_Pn(["\n  position: relative;\n\n  .MuiFormHelperText-root {\n    padding-right: 80px;\n  }\n"]))),VPn=(0,f.styled)(f.Text)(EPn||(EPn=_Pn(["\n  position: absolute;\n  bottom: 0px;\n  right: 16px;\n"])));function zPn(e){let{intention:n,onDismiss:t,onFeedback:a}=e;const r=n===Vt.iD.Approved,[i,o]=(0,g.useState)(!1),[l,s]=(0,g.useState)(""),c=r?"Are you sure you want to approve this response?":"Are you sure you want to request changes this response?",d=r?"Yes, approve":"Yes, request changes",u=(0,g.useCallback)(e=>{const n=e.target.value.trimStart();n.length<=1e3&&s(n)},[s]),p=(0,g.useCallback)(async()=>{try{o(!0),await a(n,l)}finally{o(!1),t()}},[a,l,n,t]);return(0,Ze.jsx)(f.Modal,{open:!0,onClose:t,title:c,children:(0,Ze.jsxs)(FPn,{children:[(0,Ze.jsxs)(MPn,{children:[(0,Ze.jsx)(f.TextArea,{value:l||"",onChange:u,rows:3,error:!1,label:"Comments for recipients (optional)",helperText:"These notes will appear in the email sent to your recipients"}),(0,Ze.jsx)(VPn,{typescale:"body",size:"large",children:"".concat(l.length,"/").concat(1e3)})]}),(0,Ze.jsxs)(UPn,{container:!0,children:[(0,Ze.jsx)(f.Grid,{size:{xs:12,md:5.5},children:(0,Ze.jsx)(BPn,{variant:"outlined",disabled:i,onClick:t,children:"No, keep as is"})}),(0,Ze.jsx)(f.Grid,{size:{xs:12,md:5.5},children:(0,Ze.jsx)(BPn,{variant:"contained",onClick:p,disabled:i,children:d})})]})]})})}var GPn,$Pn;function WPn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const qPn=(0,f.styled)(f.Grid)(GPn||(GPn=WPn(["\n  display: flex;\n  justify-content: flex-end;\n  gap: 24px;\n  margin-top: 24px;\n"]))),JPn=(0,f.styled)(f.Button)($Pn||($Pn=WPn(["\n  width: 100%;\n"])));function YPn(e){let{submission:n,sendFeedback:t}=e;const[a,r]=(0,g.useState)(!1),[i,o]=(0,g.useState)(!1),l=(0,g.useCallback)(()=>o(e=>!e),[o]),s=(0,g.useCallback)(()=>r(e=>!e),[]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(qPn,{container:!0,children:[n.status!==Vt.ZU.RequiresChanges&&(0,Ze.jsx)(f.Grid,{size:{xs:12,md:4,lg:3},children:(0,Ze.jsx)(JPn,{variant:"contained",onClick:l,children:"Request changes"})}),n.status!==Vt.ZU.Approved&&(0,Ze.jsx)(f.Grid,{size:{xs:12,md:4,lg:3},children:(0,Ze.jsx)(JPn,{variant:"contained",onClick:s,children:"Approve"})})]}),i&&(0,Ze.jsx)(zPn,{intention:Vt.iD.RequiresChanges,onDismiss:l,onFeedback:t}),a&&(0,Ze.jsx)(zPn,{intention:Vt.iD.Approved,onDismiss:s,onFeedback:t})]})}var HPn,KPn,QPn;function ZPn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const XPn=(0,f.styled)("section")(HPn||(HPn=ZPn(["\n  display: flex;\n  flex-flow: column nowrap;\n  padding: 8px 0;\n  flex-shrink: 0;\n  background-color: ",";\n"])),e=>e.theme.sys.color.onSecondary),eLn=(0,f.styled)("div")(KPn||(KPn=ZPn(["\n  display: flex;\n  justify-content: flex-end;\n"]))),nLn=(0,f.styled)("span")(QPn||(QPn=ZPn(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),tLn=e=>{var n;const{survey:t,readonly:a,sendFeedback:r,statusOverride:i}=e,o=i||(null===(n=t.submission)||void 0===n?void 0:n.status);return(0,Ze.jsxs)(XPn,{name:"SubmissionInfo__Section",children:[(0,Ze.jsx)(eLn,{children:(0,Ze.jsx)(nLn,{status:o,children:(0,Ze.jsx)(NPn,{typescale:"body",size:"medium",status:o,children:WT(o)})})}),a&&r&&t.feedbackEnabled&&t.submission&&(0,Ze.jsx)(YPn,{submission:t.submission,sendFeedback:r})]})};var aLn;const rLn=(0,f.styled)("div")(aLn||(aLn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  padding: 2px 0;\n  justify-content: ",";\n"])),e=>e.isFirstPage?"flex-end":e.isLastPage?"flex-start":"space-between"),iLn=e=>{let{model:n}=e;const[t,a]=(0,g.useState)((null==n?void 0:n.currentPageNo)||0),r=0===t,i=t===((null==n?void 0:n.pageCount)||0)-1;(0,g.useEffect)(()=>{a((null==n?void 0:n.currentPageNo)||0)},[null==n?void 0:n.currentPageNo]);const o=((null==n?void 0:n.pageCount)||0)>1,l=(0,g.useCallback)(()=>{null!=n&&n.nextPage()&&a(e=>e+1)},[n]),s=(0,g.useCallback)(()=>{null!=n&&n.prevPage()&&a(e=>e-1)},[n]);return o&&n?(0,Ze.jsxs)(rLn,{isFirstPage:r,isLastPage:i,children:[!r&&(0,Ze.jsx)(f.Button,{onClick:s,variant:"outlined",children:(0,Ze.jsx)(f.Icons.ChevronLeft,{fontSize:"medium"})}),!i&&(0,Ze.jsx)(f.Button,{onClick:l,variant:"outlined",children:(0,Ze.jsx)(f.Icons.ChevronRight,{fontSize:"medium"})})]}):null};var oLn,lLn;function sLn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const cLn=(0,f.styled)("div")(oLn||(oLn=sLn(["\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  background-color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSecondary}),dLn=(0,f.styled)(sk.Survey)(lLn||(lLn=sLn(["\n  .sd-title {\n    color: ",";\n    font-weight: 300;\n  }\n  .sd-input {\n    &.sd-input--disabled {\n      opacity: 0.65;\n      &::placeholder {\n        opacity: 0.65;\n      }\n    }\n  }\n  .sd-item--disabled .sd-item__control-label {\n    opacity: 0.65;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurface}),uLn=e=>{const{model:n,readonly:t,survey:a,sendFeedback:r,header:i,onValueChanged:o,children:l,expanded:s,onDismiss:c,statusOverride:d}=e;(0,g.useEffect)(()=>{n&&n.applyTheme(vj)},[n]);const u=(0,Ze.jsxs)(cLn,{children:[t?(0,Ze.jsx)(tLn,{readonly:!0,statusOverride:d,survey:a,sendFeedback:r}):(0,Ze.jsx)(tLn,{statusOverride:d,survey:a}),i,(0,Ze.jsx)(dLn,{model:n,rootNodeId:"Survey__element",mode:t?"display":"edit",onValueChanged:o}),(0,Ze.jsx)(iLn,{model:n}),l]});return s?(0,Ze.jsx)(f.Modal,{maxWidth:"1200px",title:a.name,onClose:c,open:!0,children:u}):u};var pLn,mLn,fLn,yLn;function gLn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const bLn=(0,f.styled)("div")(pLn||(pLn=gLn(["\n  display: flex;\n  gap: 8px;\n  justify-content: flex-end;\n  background-color: ",";\n  align-items: center;\n  padding-top: 12px;\n  position: relative;\n\n  &:hover {\n    cursor: pointer;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.onSecondary}),hLn=(0,f.styled)("div")(mLn||(mLn=gLn(["\n  display: flex;\n  justify-content: flex-end;\n  background-color: ",";\n  align-items: flex-end;\n  padding-right: 24px;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSecondary}),vLn=e=>{let{text:n}=e;const t=(0,f.styled)("div")(fLn||(fLn=gLn(["\n    display: flex;\n    position: absolute;\n    bottom: 35px;\n  "]))),a=(0,f.styled)(f.Text)(yLn||(yLn=gLn(["\n    position: relative;\n    background-color: ",";\n    color: ",";\n    border-radius: 6px;\n    padding: 15px 15px;\n    width: 250px;\n    word-break: break-word;\n    text-align: center;\n\n    &::after {\n      content: '';\n      position: absolute;\n      border: 10px solid transparent;\n      border-top-color: ",";\n      bottom: -20px;\n      left: calc(80% - 14px);\n      transform: translateX(-50%);\n    }\n  "])),e=>{let{theme:n}=e;return n.sys.color.secondary},e=>{let{theme:n}=e;return n.sys.color.onSecondary},e=>{let{theme:n}=e;return n.sys.color.secondary}).withComponent("span");return(0,Ze.jsx)(t,{children:(0,Ze.jsx)(a,{typescale:"body",size:"small",children:n})})},xLn=e=>{let{model:n,expanded:t,onDismiss:a,saveSurvey:r,survey:i,isLocked:o,editingUser:l,children:s,readonly:c,statusOverride:d}=e;const[u,p]=(0,g.useState)(!1),m=(0,oE.useDebouncedCallback)(e=>{r()},130,{trailing:!0});return(0,g.useEffect)(()=>()=>{m.isPending()&&m.flush()},[m]),(0,Ze.jsx)(uLn,{readonly:c,model:n,expanded:t,onDismiss:a,survey:i,onValueChanged:m,statusOverride:d,header:o&&(0,Ze.jsx)(hLn,{children:(0,Ze.jsxs)(bLn,{onClick:()=>p(!u),children:[u?(0,Ze.jsx)(vLn,{text:"You cannot edit this survey simultaneously. Editing will become available once ".concat(l," exits the survey.")}):null,(0,Ze.jsx)(f.Icons.Lock,{fontSize:"small"}),(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:"Locked"})]})}),children:s})};var TLn;const OLn=(0,f.styled)(f.Text)(TLn||(TLn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  color: ",";\n  white-space: nowrap;\n"])),e=>e.color),kLn=e=>{let{deadlineDate:n,color:t}=e;return(0,Ze.jsxs)(OLn,{color:t,typescale:"body",size:"medium",children:["Due ",Ht(n,"LL")]})};var jLn;const CLn=(0,D.J1)(jLn||(jLn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  mutation SetSurveyContributorTag($surveyId: ID!, $accountId: ID!, $userId: ID, $tagId: ID) {\n    setSurveyContributorTag(surveyId: $surveyId, accountId: $accountId, userId: $userId, tagId: $tagId)\n  }\n"])));function SLn(e){return{value:e.id,label:e.tagName}}const NLn=e=>{let{accountId:n,value:t,onChange:a,error:r,name:i="tagId",loading:o,label:l="Tag",placeholder:s,disabled:c,emptyOptionLabel:d}=e;const{data:u,loading:p,error:m}=(0,h.IT)(d6,{variables:{accountId:n},fetchPolicy:"network-only"}),y=(0,g.useMemo)(()=>(null==u?void 0:u.getTagsByAccountId)||[],[null==u?void 0:u.getTagsByAccountId]),b=(0,g.useMemo)(()=>{const e=(0,zt.sortBy)(y.map(SLn),e=>null==e?void 0:e.label.trim().toLowerCase());return d&&e.unshift({value:"",label:d}),e},[y,d]),v=(null==m?void 0:m.message)||r||"";return(0,Ze.jsx)(f.Select,{name:i,label:l,isLoading:p||o,disabled:p||o||c,onChange:a,placeholder:s,value:t,error:Boolean(v),helperText:v,options:b})};var wLn,DLn,ALn;function RLn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const PLn=(0,f.styled)("div")(wLn||(wLn=RLn(["\n  padding: 12px 0px;\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n"]))),LLn=(0,f.styled)(f.Text)(DLn||(DLn=RLn(["\n  padding-top: 30px;\n  margin-right: 16px;\n"]))),ILn=(0,f.styled)("div")(ALn||(ALn=RLn(["\n  width: 300px;\n"]))),ELn=e=>{let{contributor:n,surveyId:t}=e;const a=rt(),{showNotification:r}=vt(),[i,o]=(0,g.useState)(n.tagId||""),[l,{loading:s}]=(0,Ot.n)(CLn,{onCompleted:e=>{r("Tag assigned successfully","success"),o(e.setSurveyContributorTag)},onError:e=>{r("Error at updating tag (".concat(e.message,")"),"danger")},refetchQueries:["getSurveyLatest","GetSurveyById"]});return(0,Ze.jsxs)(PLn,{children:[(0,Ze.jsx)(LLn,{children:n.account.name}),(0,Ze.jsx)(ILn,{children:(0,Ze.jsx)(NLn,{disabled:s,accountId:a,value:i,label:i?"Tag":"No tag assigned",onChange:e=>l({variables:{surveyId:t,accountId:n.account.id,tagId:e.value}}),emptyOptionLabel:"(No tag)"})})]})},_Ln=["dashboardInstance"];var FLn,BLn,ULn,MLn;function VLn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function zLn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?VLn(Object(t),!0).forEach(function(n){GLn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):VLn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function GLn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function $Ln(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const WLn=(0,f.styled)("ul")(FLn||(FLn=$Ln(["\n  width: 180px;\n  top: 48px;\n  position: absolute;\n  right: 0;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  min-height: 56px;\n  z-index: 10;\n  border-radius: 8px;\n  box-shadow: ",";\n  background-color: ",";\n  border: 1px solid ",";\n\n  li:hover {\n    background-color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.elevation[1]},e=>{let{theme:n}=e;return n.sys.color.onSecondary},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.inverseOnSurface}),qLn=(0,f.styled)("div")(BLn||(BLn=$Ln(["\n  position: absolute;\n  top: 0;\n  right: 0;\n  left: 0;\n  bottom: 0;\n  padding-top: 100px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n"]))),JLn=(0,f.styled)(f.Icons.MoreVert)(ULn||(ULn=$Ln(["\n  cursor: pointer;\n  height: 100%;\n  width: 100%;\n"]))),YLn=(0,f.styled)(f.Text)(MLn||(MLn=$Ln(["\n  cursor: pointer;\n  padding: 8px;\n  width: 100%;\n  text-align: center;\n"]))).withComponent("li"),HLn=e=>{let{survey:n,withContributorTagging:t,withShowAnalysis:a,withExportToXLSX:r=!0,surveyLoader:i}=e;const o=oc(),l=(0,m.Zp)(),s=rt(),[c]=iO(s),[d,u]=(0,g.useState)(!1),[y,b]=(0,g.useState)(!1),[h,v]=(0,g.useState)(!1),[x,T]=(0,p.useSearchParams)(),O=hin(),{dashboardInstance:k}=O,j=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(O,_Ln),C=(0,g.useMemo)(()=>"Survey"===n.__typename?"survey":"response",[n]),S=(0,g.useCallback)(()=>{x.has(vin)&&(x.delete(vin),T(x))},[x,T]);(0,g.useEffect)(()=>()=>{S()},[]);const N=(0,g.useCallback)(()=>{u(!d)},[d]),w=(0,g.useMemo)(()=>{const{pathname:e}=window.location,t=e.includes(o.surveys.sent.contributor.replace("/:contributorId","")),a=e.includes(o.surveys.sent.surveys),r=e.includes(o.surveys.sent.overview),i=e.includes(o.surveys.sent.survey.replace(":surveyId",n.id)),l=e.includes(o.surveys.received.surveys),s=e.includes(o.surveys.received.survey.replace(":surveyId",n.id)),c=e.includes("submission");return i?"./survey-log":(t||a)&&"survey"===C?"./".concat(n.id,"/survey-log"):r||"survey"===C?"../sent/surveys/".concat(n.id,"/survey-log"):c?"./sent/contributors/".concat(null==n||null===(d=n.submission)||void 0===d||null===(d=d.owner)||void 0===d?void 0:d.id,"/response-log/").concat(n.id):l&&!s?"./".concat(n.id,"/response-log"):s?"./received/".concat(n.id,"/response-log"):"./response-log/".concat(n.id);var d},[C,n,o.surveys]),D=(0,g.useCallback)(e=>{e.stopPropagation(),l(w)},[l,w]),A=(0,g.useCallback)(async e=>{var t,a;e.stopPropagation(),u(!1);const{data:r}=await c(),i=(null==r?void 0:r.getMySurveyContributors)||[],o=["contributor",...(null==n||null===(t=n.template)||void 0===t||null===(t=t.questions)||void 0===t?void 0:t.map(e=>"".concat(e.title," - (").concat(e.name,")")))||[]],l=null===(a=n.submissions)||void 0===a?void 0:a.map(e=>{const t=i.find(t=>{var a,r;return n.isIndividualContributor?t.account.id===e.owner.id&&(null===(a=t.user)||void 0===a?void 0:a.id)===e.userId:n.isUserGroupContributor?t.account.id===e.owner.id&&(null===(r=t.userGroup)||void 0===r?void 0:r.id)===e.userGroupId:t.account.id===e.owner.id}),a=my()(n.template.questions,"id");let r="";var o,l;if(n.isIndividualContributor)r="".concat(null==t||null===(o=t.user)||void 0===o?void 0:o.first_name," ").concat(null==t||null===(l=t.user)||void 0===l?void 0:l.last_name);else if(n.isUserGroupContributor){var s;r=(null==t||null===(s=t.userGroup)||void 0===s?void 0:s.name)||""}else{var c;r=(null==t||null===(c=t.account)||void 0===c?void 0:c.name)||""}return e.answers.reduce((e,n)=>{const t=a[n.questionId];return t?zLn(zLn({},e),{},{["".concat(t.title," - (").concat(t.name,")")]:JSON.parse(n.answer)}):e},{contributor:r})});Er(o,"".concat(n.name," Results"),l,QT)},[c,n]),R=(0,g.useMemo)(()=>{const e=[{text:"View ".concat(C," log"),onClick:D}];return KT(n)&&r&&e.push({text:"Export to XLSX",onClick:A}),"Survey"===n.__typename&&t&&!n.isUserGroupContributor&&e.push({text:"Tag contributors",onClick:()=>{u(!1),b(!0)}}),"Survey"===n.__typename&&n.dashboardId&&a&&e.push({text:"Show analysis",onClick:()=>{u(!1),v(!0),T({[vin]:n.dashboardId}),null==k||k.setParameters([{Name:"Survey",Values:[n.id]}])}}),e},[C,r,D,n,A,t,a,T,k]),P=(0,g.useMemo)(()=>R.map(e=>(0,Ze.jsx)(YLn,{typescale:"body",size:"medium",onClick:e.onClick,children:e.text},e.text)),[R]),L=(0,g.useMemo)(()=>{var e;return"Survey"===n.__typename&&null!==(e=n.contributors)&&void 0!==e&&e.length?n.contributors.map(e=>(0,Ze.jsx)(ELn,{contributor:e,surveyId:n.id},e.account.name)):(0,Ze.jsx)(f.Text,{children:"No contributors"})},[n]),I=x.has(vin)&&h&&!j.isLoadingForTheFirstTime&&!j.isLoading&&!j.loadingError,E=(0,g.useMemo)(()=>(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Min,{shouldHideResetButton:!0,withCrossCloseIcon:!0,closeAction:()=>{v(()=>!1),S()}}),(0,Ze.jsxs)(Ein,{children:[(0,Ze.jsx)(qLn,{children:(0,Ze.jsx)(f.Loader,{})}),I&&(0,Ze.jsx)(Tin,{isFullScreen:!0})]})]}),[S,I]);return(0,Ze.jsxs)(Ze.Fragment,{children:[y&&(0,Ze.jsx)(f.Modal,{open:!0,onClose:()=>{b(!1),null==i||i.load()},title:"Tag contributors",children:L}),(0,Ze.jsx)(f.Dialog,{open:h,children:E}),(0,Ze.jsx)(JLn,{fontSize:"small",onClick:N}),d&&(0,Ze.jsx)(WLn,{children:P})]})};var KLn,QLn,ZLn;function XLn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const eIn=(0,f.styled)("div")(KLn||(KLn=XLn(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),nIn=(0,f.styled)(f.Text)(QLn||(QLn=XLn(["\n  color: ",";\n"])),e=>e.color).withComponent("span"),tIn=(0,f.styled)("div")(ZLn||(ZLn=XLn(["\n  height: 40px;\n  width: 25px;\n"]))),aIn=e=>{let{deadlineDate:n,survey:t,withContributorTagging:a,withShowAnalysis:r,surveyLoader:i}=e;const o=(0,f.useTheme)(),{color:l,isOverDue:s}=((e,n)=>{const t=Wt()(e).isBefore(Wt()()),a=(e=>{if(!e)return!1;const n=Wt()(),t=Wt()().add(5,"days"),a=Wt()(e);return a.isSameOrAfter(n)&&a.isBefore(t)})(e),r=(e=>{if(!e)return!1;const n=Wt()().add(5,"days");return Wt()(e).isAfter(n)})(e);let i,o;switch(!0){case a:i=n.sys.color.error,o=!1;break;case t:i=n.sys.color.onSurface,o=!0;break;case r:i=n.sys.color.onSurface,o=!1;break;default:i=n.sys.color.primary,o=!1}return{color:i,isOverDue:o}})(n,o);return(0,Ze.jsxs)(eIn,{children:[n&&(0,Ze.jsx)(nIn,{typescale:"body",size:"medium",color:l,children:s?"Closed":"Open"}),n&&(0,Ze.jsxs)(nIn,{typescale:"body",size:"medium",color:l,children:[" • "," "]}),n&&(0,Ze.jsx)(kLn,{color:l,deadlineDate:n}),(0,Ze.jsx)(tIn,{children:t&&(0,Ze.jsx)(HLn,{survey:t,withContributorTagging:a,withShowAnalysis:r,surveyLoader:i})})]})},rIn=e=>{let{model:n,expanded:t,onDismiss:a,survey:r,sendFeedback:i}=e;return(0,Ze.jsx)(uLn,{readonly:!0,model:n,expanded:t,onDismiss:a,survey:r,sendFeedback:i})},iIn={expanded:!1,setExpanded:e=>{}},oIn=(0,g.createContext)(iIn),lIn=e=>{let{children:n}=e;const[t,a]=(0,g.useState)(!1);return(0,Ze.jsx)(oIn.Provider,{value:{expanded:t,setExpanded:a},children:n})},sIn=()=>(0,g.useContext)(oIn),cIn=e=>{var n;const t=(0,m.Zp)(),{showNotification:a}=vt(),{expanded:r,setExpanded:i}=sIn(),[o,l]=(0,g.useState)(!1),[s,c]=(0,g.useState)(null===(n=e.submission)||void 0===n?void 0:n.status),[d]=(0,p.useSearchParams)(),u=Boolean(d.get("contributorId")),f=rt(),y=e.submission,{uploadedDocuments:b,uploadedDocumentsIds:h}=xRn(e.submission),v=_u(),{createSurveyAuditEvent:x}=SRn(),{id:T,first_name:O,last_name:k}=(null==e?void 0:e.lockedBy)||{},j=(null==v?void 0:v.id)!==T&&!!T,C=O+" "+k,S=(0,g.useRef)(null),N=(0,g.useRef)(null),w=(0,g.useMemo)(()=>{const n=new VT.SurveyModel(e.template.formContent);n.showCompletedPage=!1,n.showNavigationButtons=!1,n.showPreviewBeforeComplete="showAnsweredQuestions",n.onFocusInQuestion.add((e,n)=>{let{question:t}=n;N.current=t}),e.submission&&(n.data=hRn(e.submission.answers,b,e.template),!y||y.status!==Vt.ZU.Approved&&y.status!==Vt.ZU.ReadyForReview||(n.mode="display"));const t=S.current;return t&&(S.current=n),n.currentPageNo=(null==t?void 0:t.currentPageNo)||0,S.current=n,n},[e.submission,b,y,e.template]),{submitData:D,loading:A}=TRn({surveyId:e.id,accountId:f,model:w,uploadedDocumentsIds:h,version:(null==y?void 0:y.version)||1,saveWithoutDebounce:!0}),R=(0,g.useCallback)(async()=>D(Vt.Tc.ReadyForReview,()=>{a("Survey submitted successfully","success"),t(u?"/v2/surveys/sent/overview":"../received")},e=>{a("Error submitting survey: ".concat(e.message),"danger")}),[a,t,D,u]),P=(0,g.useCallback)(()=>{D(Vt.Tc.InProgress,()=>{var e,n;const t=(null===(e=N.current)||void 0===e||null===(e=e.page)||void 0===e?void 0:e.visibleIndex)===w.currentPageNo;var a,r;["text","comment"].includes((null===(n=N.current)||void 0===n?void 0:n.getType())||"")&&t&&(null===(a=N.current)||void 0===a||null===(r=a.focus)||void 0===r||r.call(a)),c(Vt.ZU.InProgress)},n=>{var t,r;n.message.includes("The survey is being edited currently by user with ID")?a("Error saving survey: the survey is being edited currently by ".concat(null==e||null===(t=e.lockedBy)||void 0===t?void 0:t.first_name," ").concat(null==e||null===(r=e.lockedBy)||void 0===r?void 0:r.last_name,"."),"danger"):a("Error saving survey: ".concat(n.message),"danger")})},[a,D,null==e?void 0:e.lockedBy,w.currentPageNo]),L=(0,g.useCallback)(async(e,n,t)=>x(e,n,f,t),[x,f]);(0,g.useEffect)(()=>(w.onComplete.clear(),w.onComplete.add(R),L("opened",e,null==v?void 0:v.id),()=>{L("closed",e,null==v?void 0:v.id)}),[w,R,e,v,L]);const I=w.pageCount>1,E=(0,g.useCallback)(async()=>{l(!0);try{if(I){if(!w.validate())return void a("Please check fields validation on all pages","danger");await w.completeLastPage()}else await w.completeLastPage();a("Survey submitted successfully","success"),t(u?"/v2/surveys/sent/overview":"../received")}catch(e){e instanceof Error&&a("Error submitting survey: ".concat(e.message),"danger")}finally{l(!1)}},[w,a,I,t,u]);return{loading:A,surveyModel:w,isLocked:j,editingUser:C,saveSurvey:P,newSubscriptionUpdate:!1,handleSubmit:E,expanded:r,submitButtonDisabled:o,surveyStatusOverride:s,expand:(0,g.useCallback)(()=>i(!0),[i]),collapse:(0,g.useCallback)(()=>i(!1),[i])}};var dIn,uIn;function pIn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const mIn=(0,f.styled)("div")(dIn||(dIn=pIn(["\n  display: flex;\n  align-items: center;\n  gap: 12px;\n"]))),fIn=(0,f.styled)(f.Text)(uIn||(uIn=pIn(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.extendedColors.environmental.darkColor}),yIn=()=>{const e=(0,f.useTheme)();return(0,Ze.jsxs)(mIn,{children:[(0,Ze.jsx)(f.Icons.CheckCircleOutline,{fontSize:"small",sx:{color:e.extendedColors.environmental.darkColor}}),(0,Ze.jsx)(fIn,{typescale:"body",size:"medium",children:"Auto-save is on"})]})};var gIn,bIn;function hIn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const vIn=(0,f.styled)("div")(gIn||(gIn=hIn(["\n  display: flex;\n  align-items: center;\n  gap: 16px;\n"]))),xIn=(0,f.styled)("div")(bIn||(bIn=hIn(["\n  position: relative;\n  height: 40px;\n  width: 40px;\n  border-radius: 50%;\n  border: 1px solid ",";\n  background: ",";\n  box-shadow: ",";\n\n  &:hover {\n    box-shadow: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.onSecondary},e=>{let{theme:n}=e;return n.sys.elevation[0]},e=>e.theme.sys.elevation[1]),TIn=e=>{let{survey:n}=e;const{expand:t}=cIn(n);return(0,Ze.jsxs)(vIn,{children:[(0,Ze.jsx)(yIn,{}),(0,Ze.jsx)(APn,{expand:t}),(0,Ze.jsx)(xIn,{children:(0,Ze.jsx)(aIn,{survey:n})})]})},OIn=e=>{const n=e||"",{showNotification:t}=vt(),{data:a}=Rt(yPn,{variables:{id:n},skip:!n,keepErrorAfterUnmount:!0}),r=null==a?void 0:a.getSurveySubmissionById,{uploadedDocuments:i}=xRn(r,null==r?void 0:r.survey.template),{expanded:o,setExpanded:l}=sIn(),[s]=bPn(),c=(0,g.useCallback)(()=>l(!0),[l]),d=(0,g.useCallback)(()=>l(!1),[l]),u=(0,g.useCallback)((e,a)=>{const r=e===Vt.iD.Approved;return s({variables:{status:e,feedback:a,submissionId:n},onCompleted:()=>{r?t("Response approved successfully","success"):t("Change requests sent successfully","warning")},onError:e=>{t("We couldn't send feedback. Please try again later or contact support@rio.ai: ".concat(e),"danger")}})},[n,s,t]),p=(0,g.useMemo)(()=>{if(!r)return null;const e=new VT.Model(r.survey.template.formContent);return e.showPreviewBeforeComplete="showAnsweredQuestions",r.answers&&(e.data=hRn(r.answers,i,r.survey.template),e.mode="display"),e},[r,i]);return{survey:null==r?void 0:r.survey,expand:c,expanded:o,collapse:d,formModel:p,submission:r,sendFeedback:u}};function kIn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function jIn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kIn(Object(t),!0).forEach(function(n){CIn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kIn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function CIn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const SIn=()=>{const{submissionId:e}=(0,m.g)(),{submission:n,expanded:t,collapse:a,sendFeedback:r,formModel:i,survey:o}=OIn(e||"");return n?(0,Ze.jsx)(rIn,{model:i,expanded:t,onDismiss:a,survey:jIn(jIn({},o),{},{submission:n}),sendFeedback:r}):(0,Ze.jsx)(Zg,{error:"Not found"})};var NIn,wIn;function DIn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const AIn=Ge.default.div(NIn||(NIn=DIn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xxs.spacing),RIn=(0,Ge.default)(ze.hh.TextColumn)(wIn||(wIn=DIn(["\n  text-align: center;\n"])));function PIn(e){let{onDismiss:n,title:t,submitButtonText:a,description:r,onSecondaryButtonClick:i,secondaryButtonText:o}=e;return(0,Ze.jsx)(AIn,{children:(0,Ze.jsxs)(ze.hh,{children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:t}),(0,Ze.jsx)(RIn,{children:r}),(0,Ze.jsxs)(ze.hh.Row,{container:!0,align:"between",children:[(0,Ze.jsx)(ze.hh.ButtonColumn,{name:"LockedEditing__Submit",span:6,onClick:n,children:a}),(0,Ze.jsx)(ze.hh.ButtonColumn,{name:"UnlockEditing__Submit",color:"primary",span:6,onClick:i,children:o})]})]})})}var LIn,IIn,EIn;function _In(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const FIn=(0,Ge.default)(ze.fv)(LIn||(LIn=_In(["\n  display: flex;\n  height: 100%;\n"]))),BIn=Ge.default.div(IIn||(IIn=_In(["\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  padding: 30px 20px;\n"]))),UIn=(0,Ge.default)(ze.$n)(EIn||(EIn=_In(["\n  margin-left: 20px;\n  width: 200px;\n"]))),MIn=e=>e&&(e.status===Vt.ZU.Approved||e.status===Vt.ZU.ReadyForReview),VIn=(0,g.memo)(function(e){let{survey:n}=e;const t=(0,m.Zp)(),{showNotification:a}=vt(),[r,i]=(0,g.useState)(!1),o=rt(),l=n.submission,{uploadedDocuments:s,uploadedDocumentsIds:c}=xRn(n.submission),d=_u(),{createSurveyAuditEvent:u}=SRn(),p=(0,g.useRef)(null);((e,n)=>{const t=(0,N.m)(),{data:a}=(0,as.R)(Bf,{variables:{accountId:n,surveyId:e}});(0,g.useEffect)(()=>{if(null!=a&&a.setSurveySubmissionUpdated){const r=a.setSurveySubmissionUpdated;t.cache.updateQuery({query:Hf,variables:{accountId:n,surveyId:e}},n=>{const t=(null==n?void 0:n.getReceivedSurveysPage.rows)||[],a=t.findIndex(n=>n.id===e);return-1===a?n:{getReceivedSurveysPage:{rows:[...t.slice(0,a),wRn(wRn({},t[a]),{},{submission:r}),...t.slice(a+1)],totalRows:t.length+1}}})}},[t.cache,a,e,n])})(n.id,o);const{id:f,first_name:y,last_name:b}=(null==n?void 0:n.lockedBy)||{},h=(null==d?void 0:d.id)!==f&&!!f,v=y+" "+b,[x,T]=(0,g.useState)(h),O=(0,g.useCallback)(()=>T(e=>!e),[]),k=(0,g.useRef)(null),j=(0,g.useMemo)(()=>{const e=new VT.SurveyModel(n.template.formContent);e.goNextPageAutomatic=!1,e.showCompletedPage=!1,e.showNavigationButtons=!1,e.showPreviewBeforeComplete="showAnsweredQuestions",n.submission&&(e.data=hRn(n.submission.answers,s,n.template),MIn(n.submission)&&(e.mode="display"));const t=k.current;return t&&(k.current=e),e.currentPageNo=(null==t?void 0:t.currentPageNo)||0,k.current=e,e},[n.submission,s,n.template]),{submitData:C,loading:S}=TRn({surveyId:n.id,accountId:o,model:j,uploadedDocumentsIds:c,version:(null==l?void 0:l.version)||1}),[w,D]=(0,g.useState)(!1),A=(0,g.useCallback)(()=>D(!0),[]),R=(0,g.useCallback)(()=>D(!1),[]),P=(0,g.useCallback)(async()=>C(Vt.Tc.ReadyForReview,()=>{a("Survey submitted successfully","success"),t("../received")},e=>{var t,r;e.message.startsWith("The survey is being edited currently by user with ID")?a("Error submitting survey: the survey is being edited currently by ".concat(null==n||null===(t=n.lockedBy)||void 0===t?void 0:t.first_name," ").concat(null==n||null===(r=n.lockedBy)||void 0===r?void 0:r.last_name,"."),"danger"):a("Error submitting survey: ".concat(e.message),"danger")}),[a,t,C,null==n?void 0:n.lockedBy]),L=(0,g.useCallback)(()=>{C(Vt.Tc.InProgress,()=>{i(!0),p.current=setTimeout(()=>{i(!1)},3e3)},e=>{var t,r;e.message.startsWith("The survey is being edited currently by user with ID")?a("Error saving survey: the survey is being edited currently by ".concat(null==n||null===(t=n.lockedBy)||void 0===t?void 0:t.first_name," ").concat(null==n||null===(r=n.lockedBy)||void 0===r?void 0:r.last_name,"."),"danger"):a("Error saving survey: ".concat(e.message),"danger")})},[a,C,null==n?void 0:n.lockedBy]),I=(0,g.useCallback)(async(e,n,t)=>u(e,n,o,t),[u,o]);(0,g.useEffect)(()=>(j.onComplete.clear(),j.onComplete.add(P),I("opened",n,null==d?void 0:d.id),()=>{I("closed",n,null==d?void 0:d.id)}),[j,P,n,d,I]);const E=j.pageCount>1,_=(0,g.useCallback)(()=>{E?j.validate()?j.completeLastPage():a("Please check fields validation on all pages","danger"):j.completeLastPage()},[j,a,E]),F=(0,g.useMemo)(()=>[{to:"../received",title:"Surveys received"},{title:n.name}],[n]),{unlockContributor:B}=((e,n)=>{const[t]=(0,Ot.n)(Mf),[a,r]=(0,g.useState)(null),{refetch:i}=Qf({accountId:e});return(0,g.useEffect)(()=>{(async()=>{null!=a&&a.unlockContributor&&(await i(),n&&n())})()},[i,null==a?void 0:a.unlockContributor,n]),{unlockContributor:async n=>{if(!n)return;const{data:a}=await t({variables:{accountId:e,campaignId:n}});r(null!=a?a:null)}}})(o,O);return(0,Ze.jsxs)(FIn,{children:[x&&(0,Ze.jsx)(ze.aF,{span:5,size:"xs",height:"auto",maxHeight:"60vh",onDismiss:O,dismissable:!0,enableEscapeKey:!0,show:!0,children:(0,Ze.jsx)(PIn,{title:"Sorry! It seems that ".concat(v," is currently making edits to this survey."),description:"You won't be able to make changes until ".concat(v," has completed their edits and exited the survey."),onDismiss:O,onSecondaryButtonClick:()=>B(n.id),secondaryButtonText:"Unlock",submitButtonText:"OK",buttonDescription:"This will send your survey to your recipients"})}),(0,Ze.jsx)(bh,{icon:["rio","clipboard-check-custom"],iconColor:"quaternary",title:n.name,breadcrumb:F,children:(0,Ze.jsx)(ok,{onClick:A})}),(0,Ze.jsx)(Zj,{model:j,onDismiss:R,expanded:w,survey:n,isLocked:h,editingUser:v,saveSurvey:L,newSubscriptionUpdate:r,children:(0,Ze.jsx)(BIn,{children:(0,Ze.jsx)(UIn,{onClick:_,loading:S,color:"success",disabled:MIn(n.submission)||h,children:"Submit for review"})})})]})}),zIn=(0,g.memo)(function(){const{surveyId:e}=(0,m.g)(),n=rt(),t=_u(),a=Rt(_f,{variables:{id:e,accountId:n,userId:(null==t?void 0:t.id)||""},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:!0}),r=(0,g.useCallback)(e=>{let{getReceivedSurveyById:n}=e;return n?(0,Ze.jsx)(VIn,{survey:n}):(0,Ze.jsx)(Zg,{})},[]);return(0,Ze.jsx)(pb,{result:a,data:r})});function GIn(e){switch(!0){case e>1920:return 25;case e>1600&&e<=1920:return 20;case e>1366&&e<=1600:return 15;default:return 10}}function $In(e){let{accountId:n,field:t}=e;return(0,h.IT)(Kf,{fetchPolicy:"network-only",variables:{accountId:n,field:t}})}var WIn;const qIn=(0,Ge.default)(ze.KF)(WIn||(WIn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 60%;\n"])));function JIn(e){let{accountId:n,status:t,setStatus:a}=e;const{data:r,error:i}=$In({accountId:n,field:"submissionStatus"});return(0,Ze.jsx)(qIn,{id:"StatusFilter__MultiSelect",name:"received-surveys-select-checkbox",options:(null==r?void 0:r.getReceivedSurveysPageFilter)||[],onChange:e=>a(e.target.select),error:i,value:t,placeholder:"Start typing to search for a survey submission status",multiValueColor:"tertiary",size:"sm",box:!0})}var YIn,HIn;function KIn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const QIn=(0,Ge.default)(ze.fv)(YIn||(YIn=KIn(["\n  display: flex;\n  height: 100%;\n"]))),ZIn=(0,Ge.default)(ze.vj)(HIn||(HIn=KIn(["\n  width: 95%;\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),XIn=[{title:"Surveys received"}];function eEn(e){const n=[];return e.length&&n.push({field:"submissionStatus",filterType:Vt.pe.Text,values:e.map(e=>e.value)}),n}function nEn(){const[e,n]=(0,g.useState)(""),[t,a]=(0,g.useState)([]),[r,i]=(0,g.useState)(1),[o,l]=(0,g.useState)(1),s=GIn(window.innerWidth),c=rt(),d=Qf({accountId:c,filters:{search:{field:["name"],value:e},set:eEn(t)},offset:(r-1)*s,limit:s}),u=(0,m.Zp)(),p=(0,g.useCallback)(e=>u("./".concat(e)),[u]),f=(0,g.useCallback)(e=>{let{getReceivedSurveysPage:n}=e;return(0,Ze.jsx)(SO,{surveys:n,onSurveyClick:p})},[p]),y=(0,g.useCallback)((e,n)=>{let{refetch:t}=n;return(0,Ze.jsx)(ub,{error:e,retry:()=>t({accountId:c})})},[c]),b=(0,g.useCallback)(()=>(0,Ze.jsx)(Vg,{name:"ReceivedSurveysContainer__Loading"}),[]);return(0,g.useEffect)(()=>{var e;null!=d&&null!==(e=d.data)&&void 0!==e&&null!==(e=e.getReceivedSurveysPage)&&void 0!==e&&e.totalRows&&l(Math.ceil(d.data.getReceivedSurveysPage.totalRows/s))},[s,d]),(0,Ze.jsxs)(QIn,{children:[(0,Ze.jsxs)(bh,{name:"FormsContributors",icon:["rio","clipboard-check-custom"],iconColor:"quaternary",title:"Surveys received",breadcrumb:XIn,children:[(0,Ze.jsx)(ZIn,{name:"ConfigurationAccountsContainer__Controls__Search",value:e,onChange:e=>n(e.target.value),size:"sm",hideButton:!0}),(0,Ze.jsx)(JIn,{accountId:c,status:t,setStatus:a}),o>1&&(0,Ze.jsx)(J_,{id:"received-survey-container-pagination",name:"received-survey-container-pagination",currentPage:r,itemsCountPerPage:s,totalPagesCount:o,onChange:i,size:"sm"})]}),(0,Ze.jsx)(pb,{result:d,data:f,error:y,loading:b})]})}const tEn=t.p+"feedback-c1599db7ee35ace9882c.svg";var aEn,rEn,iEn,oEn,lEn,sEn,cEn,dEn,uEn,pEn,mEn,fEn,yEn,gEn,bEn;function hEn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const vEn=(0,Ge.default)(ze.fv)(aEn||(aEn=hEn(["\n  display: flex;\n  height: 100%;\n"]))),xEn=(Ge.default.h2(rEn||(rEn=hEn(["\n  margin: 10px 0;\n  font-size: 2em;\n  color: #333;\n"]))),Ge.default.h3(iEn||(iEn=hEn(["\n  margin: 20px 0;\n  font-size: 1.2em;\n  color: #555;\n"])))),TEn=(0,Ge.default)(xEn)(oEn||(oEn=hEn(["\n  flex: 0 0 50%;\n"]))),OEn=(Ge.default.h4(lEn||(lEn=hEn(["\n  font-size: 0.93em;\n  color: #666;\n"]))),(0,Ge.default)("div")(sEn||(sEn=hEn(["\n  display: flex;\n  flex-flow: wrap;\n  width: 100%;\n  font-family: ",";\n"])),e=>e.v2&&"Plus Jakarta Sans !important")),kEn=(0,Ge.default)(OEn)(cEn||(cEn=hEn(["\n  display: flex;\n  flex-flow: nowrap;\n"]))),jEn=Ge.default.div(dEn||(dEn=hEn(["\n  ",";\n"])),e=>{let{theme:n}=e;return"\n    padding: ".concat(n.geometry.xs.spacing," ").concat(n.geometry.md.spacing,";\n    flex: 1;\n    border: 1px solid #E8E9EC;\n    overflow-x: hidden;\n  ")}),CEn=(0,Ge.default)(jEn)(uEn||(uEn=hEn(["\n  flex: 0 1 50%;\n"]))),SEn=(0,Ge.default)(jEn)(pEn||(pEn=hEn(["\n  display: flex;\n  flex: 0 1 50%;\n  border-left: 0;\n"]))),NEn=((0,Ge.default)(jEn)(mEn||(mEn=hEn(["\n  display: flex;\n  padding: 32px 20px 20px;\n  border-top: 0;\n"]))),(0,Ge.default)(xEn)(fEn||(fEn=hEn(["\n  margin: 0 auto;\n  min-width: 210px;\n"]))),Ge.default.div(yEn||(yEn=hEn(["\n  width: 100%;\n"])))),wEn=(0,Ge.default)("div")(gEn||(gEn=hEn(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  gap: 12px;\n  padding: 24px;\n  border-radius: 16px;\n  border: 1px solid #c7c5d0;\n  background: #fff;\n  height: calc(100% - 70px);\n"]))),DEn=(0,Ge.default)("img")(bEn||(bEn=hEn(["\n  height: 152px;\n  width: 152px;\n"])));var AEn,REn;function PEn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const LEn=(0,f.styled)(vEn)(AEn||(AEn=PEn(["\n  display: contents;\n"]))),IEn=(0,f.styled)(f.Text)(REn||(REn=PEn(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),EEn=()=>(0,Ze.jsx)(LEn,{children:(0,Ze.jsxs)(wEn,{children:[(0,Ze.jsx)(DEn,{src:tEn,alt:"Feedback"}),(0,Ze.jsx)(f.Text,{typescale:"headline",size:"small",children:"You don't have any surveys yet"}),(0,Ze.jsx)(IEn,{typescale:"body",size:"large",children:"Surveys are a quick way to collect data and insights from your contributors"})]})});function _En(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function FEn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_En(Object(t),!0).forEach(function(n){BEn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_En(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function BEn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function UEn(e,n){switch(n.type){case"toggleNotifyByEmail":return FEn(FEn({},e),{},{notifyByEmail:!e.notifyByEmail});case"toggleSendToAllUsers":return FEn(FEn({},e),{},{contributors:void 0,individualContributors:void 0,userGroups:void 0,sendToAllUsers:!e.sendToAllUsers});case"selectUserGroups":return FEn(FEn({},e),{},{sendToAllUsers:!1,contributors:void 0,individualContributors:void 0,userGroups:n.ids.map(e=>e)});case"selectContributors":return FEn(FEn({},e),{},{sendToAllUsers:!1,individualContributors:void 0,userGroups:void 0,contributors:n.ids.map(e=>e)});case"selectIndividualContributors":return FEn(FEn({},e),{},{sendToAllUsers:!1,contributors:void 0,userGroups:void 0,individualContributors:n.ids.map(e=>e)});case"changeName":return FEn(FEn({},e),{},{name:n.value});case"toggleFeedbackEnabled":return FEn(FEn({},e),{},{feedbackEnabled:!e.feedbackEnabled});case"toggleAutomatedScoring":return FEn(FEn({},e),{},{automatedScoring:!e.automatedScoring});case"changeNote":return n.value.length>1e3?e:FEn(FEn({},e),{},{notes:n.value});case"changeStartDate":return FEn(FEn({},e),{},{startDate:n.value});case"changeDeadlineDate":return FEn(FEn({},e),{},{deadlineDate:n.value});case"changeSurveyTemplateId":return FEn(FEn({},e),{},{surveyTemplateId:n.value});case"changeDashboardId":return FEn(FEn({},e),{},{dashboardId:n.value||null})}}const MEn={id:"",name:"",owner:{id:""},automatedScoring:!1,feedbackEnabled:!0,template:{id:""},contributors:[],isUserGroupContributor:!1,isIndividualContributor:!1,dashboardId:null,notifyByEmail:!0,sendToAllUsers:!1};function VEn(e){return!e.isUserGroupContributor&&!e.isIndividualContributor}const zEn={automatedScoring:!1,feedbackEnabled:!0,name:"",notifyByEmail:!0,sendToAllUsers:!1,contributors:void 0,userGroups:void 0,individualContributors:void 0,surveyTemplateId:"",dashboardId:null},GEn=(0,g.createContext)(zEn),$En=()=>{},WEn=(0,g.createContext)($En),qEn=e=>{let{children:n,survey:t}=e;const[a,r]=function(){var e,n,t;let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:MEn;const r={automatedScoring:a.automatedScoring,feedbackEnabled:a.feedbackEnabled,name:a.name,notifyByEmail:null!==(e=a.notifyByEmail)&&void 0!==e&&e,sendToAllUsers:null!==(n=a.sendToAllUsers)&&void 0!==n&&n,surveyTemplateId:a.template.id,contributors:VEn(a)?a.contributors.map(e=>e.account.id):void 0,individualContributors:a.isIndividualContributor?null===(t=a.contributors)||void 0===t?void 0:t.map(e=>e.user.id):void 0,userGroups:a.isUserGroupContributor?a.contributors.map(e=>e.userGroup.id):void 0,notes:a.notes,deadlineDate:a.deadlineDate?new Date(a.deadlineDate):null,startDate:a.startDate?new Date(a.startDate):null,dashboardId:a.dashboardId||null};return(0,g.useReducer)(UEn,r)}(t);return(0,Ze.jsx)(GEn.Provider,{value:a,children:(0,Ze.jsx)(WEn.Provider,{value:r,children:n})})};let JEn=function(e){return e.user="PER_USER",e.contributor="PER_CONTRIBUTOR",e.userGroup="PER_USER_GROUP",e}({});function YEn(){const e=(0,g.useContext)(GEn),n=(0,g.useContext)(WEn),t=(0,g.useMemo)(()=>e.contributors?JEn.contributor:e.userGroups?JEn.userGroup:JEn.user,[e]),a=(0,g.useCallback)(()=>{n({type:"toggleNotifyByEmail"})},[n]),r=(0,g.useCallback)(()=>{n({type:"toggleFeedbackEnabled"})},[n]),i=(0,g.useCallback)(()=>{n({type:"toggleAutomatedScoring"})},[n]),o=(0,g.useCallback)(()=>{n({type:"toggleSendToAllUsers"})},[n]),l=(0,g.useCallback)(e=>{n({type:"selectIndividualContributors",ids:e})},[n]),s=(0,g.useCallback)(e=>{n({type:"selectContributors",ids:e})},[n]),c=(0,g.useCallback)(e=>{n({type:"selectUserGroups",ids:e})},[n]),d=(0,g.useCallback)(e=>{n({type:"changeName",value:e})},[n]),u=(0,g.useCallback)(e=>{n({type:"changeNote",value:e})},[n]),p=(0,g.useCallback)(e=>{n({type:"changeStartDate",value:e})},[n]),m=(0,g.useCallback)(e=>{n({type:"changeDeadlineDate",value:e})},[n]),f=(0,g.useCallback)(e=>{n({type:"changeSurveyTemplateId",value:e})},[n]),y=(0,g.useCallback)(e=>{n({type:"changeDashboardId",value:e})},[n]),b=(0,g.useMemo)(()=>t===JEn.contributor?new Set(e.contributors):t===JEn.userGroup?new Set(e.userGroups):new Set(e.individualContributors),[e.individualContributors,e.contributors,e.userGroups,t]);return{state:e,surveyType:t,toggleNotifyByEmail:a,toggleSendToAllUsers:o,selectIndividualContributors:l,selectContributors:s,selectUserGroups:c,changeName:d,toggleFeedbackEnabled:r,toggleAutomatedScoring:i,changeNote:u,changeStartDate:p,changeDeadlineDate:m,changeSurveyTemplateId:f,changeDashboardId:y,selectedIds:b}}function HEn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function KEn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?HEn(Object(t),!0).forEach(function(n){QEn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):HEn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function QEn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}let ZEn=function(e){return e.user="PER_USER",e.contributor="PER_CONTRIBUTOR",e.allUsers="ALL_USERS_IN_ACCOUNT",e.userGroup="PER_USER_GROUP",e}({});const XEn=()=>{const e=YEn(),n=(0,g.useMemo)(()=>e.state.sendToAllUsers?ZEn.allUsers:void 0!==e.state.contributors?ZEn.contributor:void 0!==e.state.userGroups?ZEn.userGroup:ZEn.user,[e.state.sendToAllUsers,e.state.contributors,e.state.userGroups]),t=(0,g.useCallback)(()=>{e.selectContributors([]),e.selectIndividualContributors([]),e.selectUserGroups([]),e.state.sendToAllUsers||e.toggleSendToAllUsers()},[e]),a=(0,g.useCallback)(n=>{e.selectContributors(n)},[e]),r=(0,g.useCallback)(n=>{e.selectUserGroups(n)},[e]),i=(0,g.useCallback)(n=>{e.selectIndividualContributors(n)},[e]),o=(0,g.useMemo)(()=>n===ZEn.contributor?new Set(e.state.contributors||[]):n===ZEn.userGroup?new Set(e.state.userGroups||[]):new Set(e.state.individualContributors||[]),[e.state.individualContributors,e.state.contributors,e.state.userGroups,n]);return KEn(KEn({},e),{},{surveyType:n,selectedIds:o,selectContributors:a,selectIndividualContributors:i,selectAllUsersInAccount:t,selectUserGroups:r,changeName:e.changeName,toggleFeedbackEnabled:e.toggleFeedbackEnabled,toggleAutomatedScoring:e.toggleAutomatedScoring,changeNote:e.changeNote,changeStartDate:e.changeStartDate,changeDeadlineDate:e.changeDeadlineDate,changeSurveyTemplateId:e.changeSurveyTemplateId,changeDashboardId:e.changeDashboardId})};var e_n,n_n;function t_n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const a_n=(0,D.J1)(e_n||(e_n=t_n(["\n  query MyQuery($accountId: ID!) {\n    getAccountInfo(id: $accountId) {\n      id\n      name\n      children {\n        id\n        name\n      }\n    }\n  }\n"]))),r_n=(0,D.J1)(n_n||(n_n=t_n(['\n  query GET_USERS_FOR_ACCOUNTS($accountId: String!, $childrenIds: [String!]!) {\n    getUsers(\n      accountId: $accountId\n      filters: { set: [{ field: "accountName", filterType: set, values: $childrenIds }] }\n    ) {\n      rows {\n        id\n        accountId\n        firstName\n        lastName\n        email\n      }\n      totalRows\n    }\n  }\n'])));function i_n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function o_n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i_n(Object(t),!0).forEach(function(n){l_n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i_n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function l_n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function s_n(e){var n;const t=rt(),{data:a,loading:r,error:i}=(0,h.IT)(QOe,{variables:{accountId:t,limit:1e3,offset:0}}),{data:o,loading:l,error:s}=(0,h.IT)(a_n,{variables:{accountId:t}}),{data:c,loading:d,error:u}=(0,h.IT)(r_n,{variables:{accountId:t,childrenIds:[t].concat(null!==(n=null==o?void 0:o.getAccountInfo.children.map(e=>e.id))&&void 0!==n?n:[])}});if(l||d||r)return{loading:!0,rows:[]};if(s||u||i)return{loading:!1,rows:[],error:s||u||i};const{rows:p}=c.getUsers;return o&&c&&a?{loading:!1,rows:[o_n({orgHierarchy:[o.getAccountInfo.id]},o.getAccountInfo)].concat(p.filter(e=>e.accountId===t).map(e=>o_n({orgHierarchy:[o.getAccountInfo.id,e.id]},e))).concat(o.getAccountInfo.children.map(e=>o_n({orgHierarchy:[o.getAccountInfo.id,e.id]},e))).concat(...o.getAccountInfo.children.map(e=>p.filter(n=>n.accountId===e.id).map(n=>o_n({orgHierarchy:[o.getAccountInfo.id,e.id,n.id]},n))).flat()).concat(a.getUserGroupsPage.rows.map(e=>o_n({orgHierarchy:[e.id]},e))).filter(n=>e===JEn.contributor?"Account"===n.__typename:e===JEn.userGroup?"UserGroup"===n.__typename:e!==JEn.user||"MysqlUser"===n.__typename||"Account"===n.__typename)}:{loading:!1,rows:[]}}var c_n;const d_n=(0,f.styled)(f.AgGrid)(c_n||(c_n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n  height: 400px;\n\n  .ag-header {\n    display: none;\n  }\n\n  .ag-sticky-top {\n    top: 0 !important;\n  }\n"])));var u_n=function(e){return e.single="single",e.multiple="multiple",e}(u_n||{});const p_n=[],m_n=(0,g.memo)(e=>{let{surveyType:n,selectContributors:t,selectIndividualContributors:a,selectedIds:r,selectUserGroups:i}=e;const o=rt(),{rows:l,loading:s}=s_n(n),c=n===JEn.user,d=(0,g.useMemo)(()=>l.slice().sort(Oa(c?"firstName":"name")),[c,l]),u=(0,g.useMemo)(()=>({key:n,onGridReady:e=>{e.api.forEachNode(e=>{e.id&&r.has(e.id)&&e.setSelected(!0)})},onSelectionChanged:e=>{const r=e.api.getSelectedRows();if(n===JEn.contributor){const e=r.filter(e=>"Account"===e.__typename&&e.id!==o).map(e=>e.id);return t(e)}if(n===JEn.userGroup){const e=r.filter(e=>"UserGroup"===e.__typename).map(e=>e.id);return i(e)}const l=r.filter(e=>"MysqlUser"===e.__typename).map(e=>e.id);return a(l)},treeData:!0,rowSelection:u_n.multiple,columnDefs:p_n,rowData:d,getDataPath:e=>e.orgHierarchy,groupSelectsChildren:!0,suppressRowClickSelection:!0,groupDefaultExpanded:1,loadingOverlayComponent:f.LinearProgress,getRowId:e=>e.data.id,autoGroupColumnDef:{headerName:"Name",flex:1,valueGetter:e=>{if(e.data)switch(e.data.__typename){case"UserGroup":case"Account":return e.data.name;case"MysqlUser":return"".concat(e.data.firstName," ").concat(e.data.lastName," <").concat(e.data.email,">")}},cellRendererParams:{checkbox:!0,suppressCount:!0}}}),[o,d,t,a,i,r,n]);return s?(0,Ze.jsx)(f.LinearProgress,{}):(0,Ze.jsx)(d_n,{gridKey:"recipientsGrid",gridOptions:u},o)},(e,n)=>{return e.surveyType===n.surveyType&&(t=e.selectedIds,a=n.selectedIds,!(t.size!==a.size||![...t].every(e=>a.has(e))));var t,a});function f_n(e){let{isUpdatingSurvey:n}=e;const{surveyType:t,selectContributors:a,selectIndividualContributors:r,selectAllUsersInAccount:i,selectedIds:o,selectUserGroups:l}=XEn(),s=Pu(),c=null==s?void 0:s.accessControls.organisation,d=t===ZEn.allUsers,u=t===ZEn.userGroup,p=t===ZEn.contributor,m=t===ZEn.user,y=(null==s?void 0:s.name)||"your account",b=(0,g.useMemo)(()=>t===ZEn.user?JEn.user:t===ZEn.contributor?JEn.contributor:t===ZEn.userGroup?JEn.userGroup:JEn.user,[t]);return(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"large",style:{marginBottom:"16px"},children:"Recipients"}),(0,Ze.jsxs)(jL.A,{"aria-label":"position",row:!0,children:[(0,Ze.jsx)(CL.A,{control:(0,Ze.jsx)(f.RadioButton,{name:"contributorsType",checked:m,value:ZEn.user,onChange:()=>r([]),disabled:n}),label:(0,Ze.jsx)(f.Text,{size:"medium",color:"normal",children:"One survey per user"}),labelPlacement:"end"}),(0,Ze.jsx)(CL.A,{control:(0,Ze.jsx)(f.RadioButton,{name:"contributorsType",checked:p,value:ZEn.contributor,onChange:()=>a([]),disabled:n}),label:(0,Ze.jsx)(f.Text,{size:"medium",color:"normal",children:"One survey per account"}),labelPlacement:"end"}),(0,Ze.jsx)(CL.A,{control:(0,Ze.jsx)(f.RadioButton,{name:"contributorsType",checked:d,value:ZEn.allUsers,onChange:()=>i(),disabled:n}),label:(0,Ze.jsxs)(f.Text,{size:"medium",color:"normal",children:["Send to all users in ",y," (including all future users)"]}),labelPlacement:"end"}),c&&(0,Ze.jsx)(CL.A,{control:(0,Ze.jsx)(f.RadioButton,{name:"contributorsType",checked:u,value:ZEn.userGroup,onChange:()=>l([]),disabled:n}),label:(0,Ze.jsx)(f.Text,{size:"medium",color:"normal",children:"One survey per user group"}),labelPlacement:"end"})]}),!d&&(0,Ze.jsx)(m_n,{surveyType:b,selectContributors:a,selectUserGroups:l,selectIndividualContributors:r,selectedIds:o}),d&&(0,Ze.jsx)("div",{style:{padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px",marginTop:"8px"},children:(0,Ze.jsxs)(f.Text,{children:["This survey will be sent to all users in ",y,". It will also be sent to new users upon their sign-up."]})})]})}const y_n=e=>({value:e.id,label:e.name}),g_n=e=>{var n;let{accountId:t,value:a,onChange:r,error:i}=e;const{data:o}=(0,h.IT)(wO(),{variables:{accountId:t}}),l=(null!==(n=null==o?void 0:o.getSurveyTemplatesByAccountId)&&void 0!==n?n:[]).map(y_n),s=null==l?void 0:l.find(e=>e.value===a);return(0,Ze.jsx)(f.Select,{id:"AddSurvey__Select",name:"SurveyTemplateSelect",placeholder:"Please select a form",defaultValue:s,value:a,onChange:e=>r(e.value),label:"Form",error:!!i,options:l,helperText:"Your survey recipients will be asked to fill in these form"})};var b_n,h_n,v_n,x_n;function T_n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const O_n=(0,f.styled)("div")(b_n||(b_n=T_n(["\n  display: flex;\n  flex-direction: row;\n  align-items: start;\n  gap: 32px;\n\n  @media (max-width: 460px) {\n    flex-direction: column;\n  }\n"]))),k_n=(0,f.styled)(f.Text)(h_n||(h_n=T_n(["\n  color: ",";\n  padding: 0;\n  padding-left: 30px;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),j_n=(0,f.styled)("div")(v_n||(v_n=T_n(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),C_n=(0,f.styled)(f.Text)(x_n||(x_n=T_n(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.error});function S_n(e){let{errors:n,accountId:t,disabled:a,isUpdatingSurvey:r}=e;const{state:i,changeName:o,toggleFeedbackEnabled:l,toggleAutomatedScoring:s,changeNote:c,changeStartDate:d,changeDeadlineDate:u,changeSurveyTemplateId:p,changeDashboardId:m}=XEn();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.TextField,{id:"AddSurveyForm__Input_Name",label:"Survey name",name:"name",placeholder:"e.g. ESG Assessment 2022",helperText:"This will be presented to recipients",onChange:e=>o(e.target.value),onClear:()=>o(""),value:i.name,defaultValue:i.name,error:!!n.name,disabled:a}),(0,Ze.jsx)(g_n,{value:i.surveyTemplateId,accountId:t,error:n.surveyTemplateId||void 0,onChange:e=>p(e)}),(0,Ze.jsx)(f_n,{isUpdatingSurvey:r}),(null==n?void 0:n.contributors)&&(0,Ze.jsx)(C_n,{children:n.contributors}),(0,Ze.jsxs)(j_n,{children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"large",children:"Feedback"}),(0,Ze.jsx)(f.Checkbox,{id:"AddSurveyForm_Checkbox_Feedback",onChange:l,checked:i.feedbackEnabled,label:"Approve responses"}),(0,Ze.jsx)(k_n,{typescale:"body",size:"medium",children:"If selected, you will have to approve or request changes for each response in Rio"})]}),(0,Ze.jsxs)(j_n,{children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"large",children:"Automated Scoring"}),(0,Ze.jsx)(f.Checkbox,{id:"AddSurveyForm_Checkbox_AutomatedScoring",onChange:s,checked:i.automatedScoring,label:"Score contributions"}),(0,Ze.jsx)(k_n,{typescale:"body",size:"medium",children:"If selected, you and your recipients will automatically receive performance feedback against Rio sustainability metrics"})]}),(0,Ze.jsxs)(O_n,{children:[(0,Ze.jsx)(f.DatePicker,{onChange:e=>d(new Date(e)),name:"startDate",label:"Start date",value:null==i?void 0:i.startDate,error:n.startDate}),(0,Ze.jsx)(f.DatePicker,{onChange:e=>u(new Date(e)),name:"deadlineDate",label:"Deadline for responses",value:null==i?void 0:i.deadlineDate,error:n.deadlineDate})]}),(0,Ze.jsx)(iI,{label:"Dashboard",area:Vt.oo.Survey,value:i.dashboardId||"",optionMapper:rI,emptyOptionLabel:"(No dashboard)",accountId:t,onChange:e=>m(e.value)}),(0,Ze.jsx)(f.TextArea,{id:"AddSurveyForm__Input_Notes",name:"notes",onChange:e=>c(e.target.value),value:i.notes||"",error:!!n.notes,disabled:a,rows:4,label:"Notes for recipients (optional)",helperText:"These notes will appear in the email sent to your recipients"})]})}var N_n,w_n,D_n,A_n;function R_n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function P_n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R_n(Object(t),!0).forEach(function(n){L_n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R_n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function L_n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function I_n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const E_n=(0,f.styled)("div")(N_n||(N_n=I_n(["\n  gap: 32px;\n  display: flex;\n  flex-direction: column;\n"]))),__n=(0,f.styled)("div")(w_n||(w_n=I_n(["\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n"]))),F_n=(0,f.styled)(f.Text)(D_n||(D_n=I_n(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),B_n=(0,f.styled)(f.Button)(A_n||(A_n=I_n(["\n  max-width: 144px;\n  width: 100%;\n"])));function U_n(e){let{onDismiss:n,buttonDescription:t,submitButtonText:a,onComplete:r}=e;const i=rt(),{state:o}=XEn(),[l,s]=(0,g.useState)({}),[c,{loading:d}]=QAn(),u=(0,g.useCallback)(async e=>{e.preventDefault(),s({});const[t,a]=function(e){var n;const t={};e.name||(t.name="Please provide a name"),e.surveyTemplateId||(t.surveyTemplateId="Please select a survey"),e.startDate||(t.startDate="Please select a start date");const a=e.contributors||e.individualContributors||e.userGroups||[];return e.sendToAllUsers||0!==a.length||(t.contributors="Please select at least one contributor"),((null==e||null===(n=e.notes)||void 0===n?void 0:n.length)||0)>1e3&&(t.notes="Notes can only be 1000 characters long"),Object.keys(t).length?[t,null]:[null,e]}(o);if(t)return s(e=>P_n(P_n({},e),t));const l={survey:P_n(P_n({},a),{},{ownerAccountId:i})};await c({variables:l,onCompleted:()=>{n(),r()}})},[o,c,s,n,i,r]);return(0,Ze.jsxs)(E_n,{onSubmit:u,children:[(0,Ze.jsx)(S_n,{errors:l,disabled:d,accountId:i,isUpdatingSurvey:!1}),(0,Ze.jsxs)(__n,{children:[(0,Ze.jsx)(B_n,{variant:"contained",name:"AddSurvey__Submit",onClick:u,disabled:d,children:a}),(0,Ze.jsx)(F_n,{typescale:"body",size:"small",children:t})]})]})}function M_n(e){var n;const t={};return e.name||(t.name="Please provide a name"),e.surveyTemplateId||(t.surveyTemplateId="Please select a survey"),e.startDate||(t.startDate="Please select a start date"),0===(e.contributors||e.individualContributors||e.userGroups||[]).length&&(t.contributors="Please select at least one contributor"),((null==e||null===(n=e.notes)||void 0===n?void 0:n.length)||0)>1e3&&(t.notes="Notes can only be 1000 characters long"),Object.keys(t).length?[t,null]:[null,e]}var V_n,z_n,G_n;function $_n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function W_n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$_n(Object(t),!0).forEach(function(n){q_n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$_n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function q_n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function J_n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Y_n=(0,f.styled)("div")(V_n||(V_n=J_n(["\n  gap: 32px;\n  display: flex;\n  flex-direction: column;\n"]))),H_n=(0,f.styled)("div")(z_n||(z_n=J_n(["\n  display: flex;\n  gap: 32px;\n"]))),K_n=(0,f.styled)(f.Button)(G_n||(G_n=J_n(["\n  max-width: 50%;\n  width: 100%;\n"])));function Q_n(e){let{onDismiss:n,existingSurvey:t,onDelete:a,onComplete:r}=e;const i=rt(),{state:o}=XEn(),[l,s]=(0,g.useState)({}),[c,{loading:d}]=eRn(),[u,{loading:p}]=ZAn(),m=d||p,f=(0,g.useCallback)(async e=>{e.preventDefault(),s({});const[a,i]=M_n(o);if(a)return s(e=>W_n(W_n({},e),a));const l={id:t.id,survey:W_n(W_n({},i),{},{ownerAccountId:t.owner.id})};await c({variables:l,onCompleted:()=>{n(),r()}})},[o,s,c,n,t,r]),y=(0,g.useCallback)(()=>{u({variables:{id:t.id},onCompleted:()=>{n(),null==a||a()}})},[t.id,u,n,a]);return(0,Ze.jsxs)(Y_n,{onSubmit:f,children:[(0,Ze.jsx)(S_n,{errors:l,disabled:!(!d&&!p),accountId:i,isUpdatingSurvey:!0}),(0,Ze.jsxs)(H_n,{children:[(0,Ze.jsx)(K_n,{variant:"contained",name:"AddSurvey__Submit",disabled:m,onClick:f,children:"Update survey"}),(0,Ze.jsx)(K_n,{variant:"outlined",name:"DeleteSurveyButton",disabled:m,onClick:y,children:"Delete survey"})]})]})}const Z_n=e=>{let{survey:n,refetch:t,action:a}=e;const{createModalShown:r,toggleCreateModal:i,editModalShown:o,toggleEditModal:l}=a,s=oc(),c=(0,m.Zp)(),d=(0,m.zy)().pathname.includes(s.surveys.sent.surveys),u=(0,g.useCallback)(()=>{d&&c(s.surveys.sent.surveys)},[c,s.surveys.sent.surveys,d]);return(0,Ze.jsxs)(Ze.Fragment,{children:[r&&(0,Ze.jsx)(qEn,{children:(0,Ze.jsx)(f.Modal,{title:"Create a survey",viewportHeight:80,onClose:i,open:r,maxWidth:"1200px",children:(0,Ze.jsx)(U_n,{onComplete:t,onDismiss:i,submitButtonText:"Create Survey",buttonDescription:"This will send your survey to your recipients"})})}),o&&n&&(0,Ze.jsx)(f.Modal,{viewportHeight:80,title:"Edit a survey",onClose:l,open:o,maxWidth:"1200px",children:(0,Ze.jsx)(qEn,{survey:n,children:(0,Ze.jsx)(Q_n,{existingSurvey:n,onDismiss:l,onDelete:u,onComplete:t})})})]})};function X_n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function eFn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?X_n(Object(t),!0).forEach(function(n){nFn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X_n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function nFn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const tFn=e=>({value:e.value||null,label:e.label||""}),aFn=e=>{var n;let{accountId:t,status:a,setStatus:r}=e;const{data:i,error:o}=$In({accountId:t,field:"submissionStatus"}),l=(null!==(n=null==i?void 0:i.getReceivedSurveysPageFilter)&&void 0!==n?n:[]).map(tFn).map(e=>null===e.value?eFn(eFn({},e),{},{value:Gt().snakeCase(e.label)}):e),s=l.find(e=>e.value===a);return(0,Ze.jsx)(f.Select,{id:"StatusFilter__MultiSelect",name:"received-surveys-select-checkbox",value:s,onChange:e=>r(e.value),label:"Survey statuses",error:!!o,options:l})};var rFn=t(62778);const iFn=["style","children"];var oFn,lFn,sFn,cFn,dFn;function uFn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pFn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uFn(Object(t),!0).forEach(function(n){mFn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uFn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mFn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function fFn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yFn=(0,f.styled)(rFn.sN)(oFn||(oFn=fFn(["\n  overflow: -moz-scrollbars-none;\n  scrollbar-width: none;\n  height: 100%;\n\n  & > div:first-child {\n    position: static !important;\n  }\n\n  &::-webkit-scrollbar {\n    display: none;\n  }\n"]))),gFn=(0,f.styled)("div")(lFn||(lFn=fFn(["\n  position: absolute;\n  top: 16px;\n  right: 4px;\n  left: 16px;\n  display: flex;\n  width: calc(100% - 20px);\n  justify-content: space-between;\n  z-index: 10;\n  font-family: ",";\n  font-size: 12px !important;\n  line-height: 16px;\n"])),e=>{let{theme:n}=e;return n.sys.typescale.body.medium.family}),bFn=(0,f.styled)(XT)(sFn||(sFn=fFn(["\n  position: absolute;\n"]))),hFn=(0,f.styled)("div")(cFn||(cFn=fFn(["\n  width: 100%;\n"]))),vFn=(0,f.styled)("div")(dFn||(dFn=fFn(["\n  display: grid;\n  grid-template-columns: repeat(4, minmax(10px, 1fr));\n  gap: 20px;\n  font-family: 'Plus Jakarta Sans';\n\n  @media (min-width: 1367px) and (max-width: 1600px) {\n    grid-template-columns: repeat(3, minmax(10px, 1fr));\n  }\n\n  @media (max-width: 1366px) {\n    grid-template-columns: repeat(2, minmax(10px, 1fr));\n  }\n"]))),xFn=e=>" - Locked by ".concat(e.first_name," ").concat(e.last_name),TFn=g.memo(e=>{let{surveys:n,userId:t,setLock:a,handleSurveyClick:r,toggleLockedModal:i}=e;const o=(0,g.useMemo)(()=>{const e={List:(0,g.forwardRef)((e,n)=>{let{style:t,children:a}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,iFn);return(0,Ze.jsx)(vFn,pFn(pFn({ref:n},r),{},{style:pFn({},t),children:a}))})};return e.List.displayName="List",e},[]);return(0,Ze.jsx)(yFn,{totalCount:n.length,components:o,itemContent:e=>{var o,l,s;const c=n[e].lockedBy,d=!(null==c||!c.id)&&(null==c?void 0:c.id)!==t;return(0,Ze.jsxs)(hFn,{children:[(0,Ze.jsx)(f.Card,{subContent:(0,Ze.jsx)(Vj,{deadlineDate:null===(o=n[e])||void 0===o?void 0:o.deadlineDate,fill:!0}),onClick:()=>{d?(a(c),i()):r(n[e].id)},title:n[e].name,subTitle:"From ".concat(n[e].owner.name)+"".concat(d?xFn(c):""),disabled:d,children:(0,Ze.jsxs)(gFn,{children:[qT(n[e])&&(0,Ze.jsx)(bFn,{status:null===(l=n[e].submission)||void 0===l?void 0:l.status,children:WT(null===(s=n[e].submission)||void 0===s?void 0:s.status)}),(0,Ze.jsx)(uO,{survey:n[e]})]})}),e===n.length-1&&(0,Ze.jsx)("div",{id:"sentinel"})]},n[e].id)}})});var OFn,kFn,jFn,CFn;function SFn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const NFn=Ge.default.div(OFn||(OFn=SFn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xxs.spacing),wFn=(0,Ge.default)("div")(kFn||(kFn=SFn(["\n  display: flex;\n  justify-content: center;\n  width: 100%;\n"]))),DFn=(0,Ge.default)(f.Button)(jFn||(jFn=SFn(["\n  max-width: 250px;\n  width: 100%;\n"]))),AFn=(0,Ge.default)(f.Text)(CFn||(CFn=SFn(["\n  margin-bottom: 30px;\n"])));function RFn(e){let{onDismiss:n,submitButtonText:t,description:a}=e;return(0,Ze.jsxs)(NFn,{children:[(0,Ze.jsx)(AFn,{typescale:"body",size:"medium",children:a}),(0,Ze.jsx)(wFn,{children:(0,Ze.jsx)(DFn,{variant:"contained",name:"LockedEditing__Submit",onClick:n,children:t})})]})}const PFn=e=>{let{lockedBy:n,open:t,onClose:a}=e;return(0,Ze.jsx)(f.Modal,{onClose:a,title:"Sorry! It seems that ".concat(null==n?void 0:n.first_name," ").concat(null==n?void 0:n.last_name," is currently making edits to this survey."),open:t,children:(0,Ze.jsx)(RFn,{description:"You won't be able to make changes until 1 minute after ".concat(null==n?void 0:n.first_name," ").concat(null==n?void 0:n.last_name," has completed their edits and exited the survey."),onDismiss:a,submitButtonText:"OK",buttonDescription:"This will send your survey to your recipients"})})};var LFn,IFn,EFn,_Fn;function FFn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const BFn=(0,f.styled)("div")(LFn||(LFn=FFn(["\n  display: flex;\n  flex-direction: column;\n"])));function UFn(e){const n=[],t="not_started"===e?null:e;return e&&n.push({field:"submissionStatus",filterType:Vt.pe.Text,values:[t]}),n}(0,f.styled)(ze.vj)(IFn||(IFn=FFn(["\n  width: 100%;\n  font-family: ",";\n"])),e=>{let{theme:n}=e;return n.sys.typescale.label.large.family});const MFn=(0,f.styled)("div")(EFn||(EFn=FFn(["\n  padding: 8px 0 16px;\n  display: flex;\n  align-items: flex-end;\n  justify-content: flex-end;\n  gap: 24px;\n"]))),VFn=(0,f.styled)("div")(_Fn||(_Fn=FFn(["\n  width: 300px;\n"]))),zFn=()=>{const e=rt(),n=ms(),[t,a]=(0,g.useState)([]),[r,i]=(0,g.useState)(1),[o,l]=(0,g.useState)(""),[s]=(0,oE.useDebounce)(o,600),[c,d]=(0,g.useState)(1),[u,p]=(0,g.useState)(""),y=Qf((0,g.useMemo)(()=>({accountId:e,offset:20*(c-1),limit:20,filters:{search:{field:["name"],value:s},set:UFn(u)}}),[e,20,c,s,u])),b=(0,m.Zp)(),h=(0,g.useCallback)(e=>b("./".concat(e)),[b]);(0,g.useEffect)(()=>{var e;null!=y&&null!==(e=y.data)&&void 0!==e&&null!==(e=e.getReceivedSurveysPage)&&void 0!==e&&e.totalRows&&!y.loading&&(i(Math.ceil(y.data.getReceivedSurveysPage.totalRows/20)),a(e=>{var n;return[...e,...(null==y||null===(n=y.data)||void 0===n||null===(n=n.getReceivedSurveysPage)||void 0===n?void 0:n.rows)||[]]}))},[y.loading]),(0,g.useEffect)(()=>{var e,n;null!=y&&null!==(e=y.data)&&void 0!==e&&e.getReceivedSurveysPage&&!y.loading&&(s||u)&&(i(Math.ceil(y.data.getReceivedSurveysPage.totalRows/20)),a(null==y||null===(n=y.data)||void 0===n||null===(n=n.getReceivedSurveysPage)||void 0===n?void 0:n.rows))},[y.loading,s,u]),(0,g.useEffect)(()=>{a([]),d(1)},[u,s,e]);const v=(0,g.useMemo)(()=>(0,zt.throttle)(()=>{y.loading||d(e=>e+1)},400,{trailing:!1}),[y.loading]),x=(0,g.useMemo)(()=>(0,zt.throttle)(()=>{const e=window.innerHeight+window.scrollY>=document.body.offsetHeight;!y.loading&&r>c&&e&&v()},400,{leading:!1}),[r,c,y.loading,v]);(0,g.useEffect)(()=>(window.addEventListener("scroll",x),()=>{x.cancel(),window.removeEventListener("scroll",x)}),[x]);const T=(0,g.useCallback)(e=>{l(e.target.value)},[l]),[O,k]=(0,g.useState)(!1),[j,C]=(0,g.useState)(null),S=(0,g.useCallback)(()=>k(e=>!e),[]),N=y.loading?null:(0,Ze.jsx)(EEn,{});return(0,Ze.jsxs)(BFn,{children:[(0,Ze.jsxs)(MFn,{children:[(0,Ze.jsx)(f.TextField,{name:"ConfigurationAccountsContainer__Controls__Search",type:"search",value:o,onChange:T,error:!1,placeholder:"Search",style:{width:"300px"}}),(0,Ze.jsx)(VFn,{children:(0,Ze.jsx)(aFn,{accountId:e,status:u,setStatus:p})}),(0,Ze.jsx)(PFn,{open:O,onClose:S,lockedBy:j})]}),t.length?(0,Ze.jsx)(TFn,{surveys:t,toggleLockedModal:S,userId:n,setLock:C,handleSurveyClick:h}):N]})};var GFn,$Fn,WFn,qFn,JFn;function YFn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const HFn=Ge.default.div(GFn||(GFn=YFn(["\n  display: flex;\n  align-items: center;\n"]))),KFn=Ge.default.div($Fn||($Fn=YFn(["\n  position: relative;\n  margin-left: auto;\n  margin-right: 10px;\n  margin-bottom: auto;\n  justify-content: flex-end;\n  font-size: 1em;\n"]))),QFn=Ge.default.table(WFn||(WFn=YFn(["\n  width: initial;\n  color: #444;\n  font-size: 0.95em;\n"]))),ZFn=Ge.default.th(qFn||(qFn=YFn(["\n  padding-right: ",";\n  padding-bottom: ",";\n  font-weight: 600;\n"])),e=>{let{theme:n}=e;return n.geometry.xl.spacing},e=>{let{theme:n}=e;return n.geometry.sm.spacing});function XFn(e){var n;let{survey:t}=e;return(0,Ze.jsxs)(HFn,{children:[(0,Ze.jsx)(QFn,{children:(0,Ze.jsx)("tbody",{children:(0,Ze.jsxs)("tr",{children:[(0,Ze.jsx)(ZFn,{children:"Contributors"}),(0,Ze.jsx)("td",{"data-cy":"Survey__ContributorsCount",children:null==t||null===(n=t.contributors)||void 0===n?void 0:n.length})]})})}),(0,Ze.jsx)(KFn,{children:(0,Ze.jsx)(Vj,{deadlineDate:t.deadlineDate,survey:t})})]})}(0,Ge.default)(ZFn)(JFn||(JFn=YFn(["\n  font-size: 15px;\n  font-weight: normal;\n  color: #83838e;\n"])));const eBn="#FD919C",nBn="#00C8B5",tBn="#FFCA83",aBn={positive:nBn,neutral:tBn,negative:eBn},rBn={title:{text:""},chart:{height:350,backgroundColor:"transparent",reflow:!0},legend:{align:"center",layout:"horizontal",verticalAlign:"bottom",itemStyle:{fontSize:"1.27em",fontWeight:"normal"}},tooltip:{enabled:!1},credits:{enabled:!1}};function iBn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function oBn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?iBn(Object(t),!0).forEach(function(n){lBn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):iBn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function lBn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const sBn=66.7,cBn=33.3,dBn=e=>{const n={},t=new Set,a={},r={},i=new Map,o={},l={};for(const o of(null==e||null===(s=e.template)||void 0===s?void 0:s.questions)||[]){var s,c;if(n[o.id]=o,!o)continue;const l=null===(c=o.category)||void 0===c?void 0:c.name;if(void 0!==l){let n;if(t.add(l),r[o.name]=l,o.type===Vt.xV.Boolean)i.set(o.name,1),n=e.contributors.length;else{const t={};for(const e of o.options)t[e.name]=e.score||0;i.set(o.name,t);const a=Math.max(...Object.values(t));n=(a>0?a:0)*e.contributors.length}a[l]=l in a?a[l]+n:n}}for(const t of e.submissions){for(const e of t.answers){const t=n[e.questionId];if(!t)continue;const{answer:a}=e,l=a.replace(/"/g,""),s=t.name,c=r[s],d=i.get(s)||{};if(void 0===c)continue;const u=t.type===Vt.xV.Boolean&&"true"===l?1:d[l]||0;o[c]=c in o?o[c]+u:u}l[t.id]=o}return{categoryNames:Array.from(t),categoryScores:o,submissionScores:l,totalCategoryScores:a}},uBn=e=>e>cBn&&e<sBn?tBn:e>sBn?nBn:e<cBn?eBn:tBn,pBn={title:{text:""},chart:{height:350,backgroundColor:"transparent",style:{fontFamily:"'Proxima Nova', Helvetica, Arial, sans-serif;"},reflow:!0},legend:{align:"center",layout:"horizontal",verticalAlign:"bottom",margin:30,itemStyle:{fontSize:"1.27em",fontWeight:"normal"}},tooltip:{enabled:!1},credits:{enabled:!1}};var mBn=t(66044),fBn=t.n(mBn),yBn=t(34768),gBn=t.n(yBn);function bBn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function hBn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?bBn(Object(t),!0).forEach(function(n){vBn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bBn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function vBn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const xBn=hBn(hBn({},pBn),{},{chart:hBn(hBn({},pBn.chart),{},{type:"bar",height:14,spacing:[0,0,0,0]}),plotOptions:{bar:{showInLegend:!1}},xAxis:{visible:!1},yAxis:{visible:!1,max:100},series:[{data:[100],color:"#E8E9EC",type:"bar",grouping:!1,borderRadius:6}]});var TBn,OBn,kBn,jBn,CBn;function SBn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function NBn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wBn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?NBn(Object(t),!0).forEach(function(n){DBn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):NBn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function DBn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ABn=Ge.default.div(TBn||(TBn=SBn(["\n  margin-top: 8px;\n  flex: 1;\n  color: #4d505b;\n"]))),RBn=Ge.default.div(OBn||(OBn=SBn(["\n  margin-top: 8px;\n  text-align: right;\n  font-size: 14px;\n"]))),PBn=Ge.default.span(kBn||(kBn=SBn(["\n  color: #83838e;\n"]))),LBn=Ge.default.div(jBn||(jBn=SBn(["\n  width: 100%;\n  display: flex;\n  flex-flow: wrap;\n"]))),IBn=Ge.default.div(CBn||(CBn=SBn(["\n  margin-left: 50px;\n\n  &."," {\n    margin-bottom: 20px;\n    flex: 0 0 calc(33% - 50px);\n  }\n"])),e=>e.className||"progress-bar--column");function EBn(e){let{text:n,totals:t,color:a,className:r="progress-bar--column"}=e;const i=(0,Ge.useTheme)(),o=(0,g.useRef)(null),l=t[0]>0?t[0]/t[1]*100:0,s=(0,g.useMemo)(()=>((e,n,t)=>wBn(wBn({},xBn),{},{series:[...xBn.series,{data:[n],color:t,type:"bar",borderRadius:6}]}))(0,l,a),[i,l,a]);return(0,Ze.jsxs)(IBn,{className:r,children:[(0,Ze.jsx)(gBn(),{highcharts:fBn(),options:s,ref:o}),(0,Ze.jsxs)(LBn,{children:[(0,Ze.jsx)(ABn,{color:"normal",children:n}),(0,Ze.jsxs)(RBn,{color:"normal",children:[t[0]," / ",(0,Ze.jsx)(PBn,{children:t[1]})]})]})]})}const _Bn=[eBn,nBn,tBn,tBn,eBn];function FBn(e){let{survey:n}=e;const{categoryNames:t,totalCategoryScores:a,categoryScores:r}=(0,g.useMemo)(()=>dBn(n),[n]);let i=0;const o=_Bn;return(0,Ze.jsx)(LBn,{children:t.map((e,n)=>{const t=r[e]||0,l=a[e];i>o.length-1&&(i=0);const s=o[i];return i++,(0,Ze.jsx)(EBn,{text:e,totals:[t,l],color:s},"catergory__progress-bar-".concat(n))})})}function BBn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function UBn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?BBn(Object(t),!0).forEach(function(n){MBn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):BBn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function MBn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const VBn=UBn(UBn({},pBn),{},{chart:UBn(UBn({},pBn.chart),{},{type:"column"}),plotOptions:{column:{groupPadding:0,maxPointWidth:70}}});var zBn,GBn,$Bn,WBn;function qBn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function JBn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qBn(Object(t),!0).forEach(function(n){YBn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qBn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function YBn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function HBn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const KBn=(0,Ge.default)(EBn)(zBn||(zBn=HBn(["\n  flex: 0 0 calc(50% - 5px);\n  margin: 10px 0;\n"]))),QBn=(0,Ge.default)(LBn)(GBn||(GBn=HBn(["\n  flex-direction: column;\n  align-items: stretch;\n"]))),ZBn=Ge.default.div($Bn||($Bn=HBn(["\n  margin-bottom: 12px;\n  padding: 12px;\n  background: #00c8b511;\n  color: #45b7ad;\n  border-radius: 12px;\n"]))),XBn=(0,Ge.default)(ek)(WBn||(WBn=HBn(["\n  margin-right: 12px;\n  vertical-align: middle;\n"])));function eUn(e){let{survey:n,percentPerformance:t}=e;const a=n.submissions.filter(e=>e.status===Vt.ZU.Approved||e.status===Vt.ZU.ReadyForReview).length,r=n.contributors.length,i=(r-a)/r*100,o=i>0&&i<50,l=(0,g.useRef)(null),s=(0,g.useMemo)(()=>((e,n)=>JBn(JBn({},VBn),{},{xAxis:{categories:["Not submitted","Negative","Neutral","Positive"],labels:{enabled:!1}},yAxis:{min:0,max:100,title:{text:"% of contributors",x:-10,style:{fontWeight:"bold"}}},series:[{name:"Not submitted",data:[e],color:"#949597",type:"column"},{name:"Negative",data:[n.negative],color:eBn,type:"column"},{name:"Neutral",data:[n.neutral],color:tBn,type:"column"},{name:"Positive",data:[n.positive],color:nBn,type:"column"}]}))(i,t),[i,t]);return(0,Ze.jsxs)(Ze.Fragment,{children:[o&&(0,Ze.jsxs)(ZBn,{children:[(0,Ze.jsx)(XBn,{}),"Encourage more responses to try and improve your impact"]}),(0,Ze.jsx)(gBn(),{highcharts:fBn(),options:s,ref:l})]})}function nUn(e){let{children:n,survey:t}=e;const a=(0,g.useMemo)(()=>(e=>{const{categoryScores:n,totalCategoryScores:t}=dBn(e),a=[];for(const e in n){const r=n[e]/t[e]*100;Number.isNaN(r)||a.push(r)}const r=Gt().round(Gt().mean(a)),i=r>sBn&&r||0,o=r>cBn&&r<sBn&&r||0,l=r<cBn&&r||0;let s="";return i>o&&i>l?s="Positive":o>i&&o>l?s="Neutral":l>i&&l>o&&(s="Negative"),{text:s,positive:i,neutral:o,negative:l}})(t),[t]),r=a.text.toLowerCase(),i=a[r]||0,o=aBn[r];return(0,Ze.jsxs)(LBn,{children:[n,(0,Ze.jsx)(KBn,{text:"".concat(a.text," Overall Performance"),totals:[i,100],color:o}),(0,Ze.jsx)(NEn,{}),(0,Ze.jsx)(QBn,{children:(0,Ze.jsx)(eUn,{survey:t,percentPerformance:a})})]})}function tUn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function aUn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tUn(Object(t),!0).forEach(function(n){rUn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tUn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rUn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const iUn=aUn(aUn({},pBn),{},{legend:aUn(aUn({},pBn.legend),{},{labelFormatter:function(){return this.name.replace(/: .+?$/,"")}}),plotOptions:{pie:{showInLegend:!0,dataLabels:{style:{color:"#4d505b",fontWeight:"600",fontSize:"16px",lineHeight:"19px",fontFamily:"Proxima Nova",fontStyle:"normal",textOutline:"none"}}}}});function oUn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function lUn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?oUn(Object(t),!0).forEach(function(n){sUn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oUn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function sUn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const cUn=(e,n,t)=>"".concat(e,": ").concat(Math.floor(n/t*100),"%");function dUn(e){let{contributors:n,submissions:t}=e;const a=(0,Ge.useTheme)(),r=(0,g.useRef)(null),i=(e=>{let{contributors:n,submissions:t}=e;const a=(0,zt.keyBy)(t,"owner.id"),r=n.map(e=>{var n;let{account:t}=e;return null===(n=a[t.id])||void 0===n?void 0:n.status});return(0,zt.countBy)(r)})({contributors:n,submissions:t}),o=(0,g.useMemo)(()=>((e,n)=>{const t=(0,zt.sum)(Object.values(n));return lUn(lUn({},iUn),{},{series:[{type:"pie",data:Object.entries(n).map(n=>{let[a,r]=n;return{y:r,name:cUn(WT(a),r,t),color:$T(e,a)}})}]})})(a,i),[a,i]);return(0,Ze.jsx)(gBn(),{highcharts:fBn(),options:o,ref:r})}var uUn,pUn,mUn;function fUn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yUn=(0,Ge.default)(URn)(uUn||(uUn=fUn(["\n  --ag-row-height: ","px;\n  --ag-row-hover-color: #e8e9ec;\n  font-family: ",";\n\n  & .ag-paging-panel {\n    justify-content: flex-start;\n  }\n\n  .ag-root-wrapper-body {\n    height: 100%;\n  }\n\n  && .ag-row:hover {\n    cursor: pointer;\n  }\n  &&&& .ag-row .ag-cell {\n    line-height: 17px;\n  }\n  &&& .ag-row .ag-cell:first-child {\n    padding-left: 12px;\n  }\n"])),50,e=>e.v2&&"Plus Jakarta Sans"),gUn=Ge.default.div(pUn||(pUn=fUn(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),bUn=(0,Ge.default)(LBn)(mUn||(mUn=fUn(["\n  flex-direction: column;\n"]))),hUn={filter:!1},vUn={status:e=>{var n,t;let{data:a}=e;return(0,Ze.jsx)(XT,{status:null===(n=a.submission)||void 0===n?void 0:n.status,children:WT(null===(t=a.submission)||void 0===t?void 0:t.status)})},performance:e=>{let{data:n}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[n.performance&&(0,Ze.jsx)(bUn,{children:(0,Ze.jsx)(EBn,{text:"".concat((t=n.performance,t>cBn&&t<sBn?"Neutral":t>sBn?"Positive":t<cBn?"Negative":"Neutral")," overall performance"),totals:[n.performance,100],color:uBn(n.performance)})}),!n.performance&&"-"]});var t},chevron:e=>{let{data:n}=e;return(0,Ze.jsx)(Ze.Fragment,{children:n.reviewable&&(0,Ze.jsx)(gUn,{children:(0,Ze.jsx)(ze.In,{icon:"chevron-right",color:"#83838e"})})})}},xUn=e=>e.data.contributor.account.id,TUn=e=>{let{submissionDetails:n,showPerforance:t}=e;const a=(0,m.zy)().pathname.startsWith("/v2"),[r,i]=(0,g.useState)(""),o=(0,m.Zp)(),l=(0,g.useCallback)(e=>{e.data.reviewable?o("../sent/contributors/".concat(e.data.contributor.account.id,"/submission/").concat(e.data.submission.id)):i("This response is not currently in a reviewable state.")},[o,i]),s=[{headerName:"Name",valueGetter:e=>{let{data:{contributor:n}}=e;return n.user?"".concat(n.user.first_name," ").concat(n.user.last_name," (").concat(n.user.email,")"):n.userGroup?n.userGroup.name:n.account.name},sort:"asc",comparator:ka,flex:100},{headerName:"Contributor Type",valueGetter:e=>{let{data:{contributor:n}}=e;return n.user?"User":n.userGroup?"User Group":"Child Account"},flex:100},{headerName:"Response Status",cellRenderer:"status",flex:100},{headerName:"Performance",cellRenderer:"performance",flex:100,hide:!t},{headerName:"Chevron",cellRenderer:"chevron",flex:1}];return(0,Ze.jsxs)(Ze.Fragment,{children:[r&&(0,Ze.jsx)(ze.Eg,{show:!0,color:"danger",onClose:()=>{i("")},children:r}),(0,Ze.jsx)(yUn,{v2:a,className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,{defaultColDef:hUn,rowHeight:50,components:vUn,rowData:n,paginationPageSize:25,getRowId:xUn,columnDefs:s,onRowClicked:l,pagination:!0})})]})};function OUn(e){let{survey:n,showPerformance:t=!1}=e;const{contributors:a,submissions:r}=n,{submissionScores:i,totalCategoryScores:o}=dBn(n),l=a.map(e=>{const n=r.find(n=>n.owner.id===e.account.id),t=YT(null==n?void 0:n.status),a=n?((e,n,t)=>{const a=e[t],r=[];if(void 0!==a){for(const e in a){const t=a[e]/n[e]*100;Number.isNaN(t)||r.push(t)}return Gt().round(Gt().mean(r),0)}})(i,o,n.id):null;return{contributor:e,submission:n,reviewable:t,performace:a}});return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(xEn,{children:"Response by contributor"}),(0,Ze.jsx)(TUn,{submissionDetails:l,showPerforance:t})]})}function kUn(e){let{survey:n}=e;return(0,Ze.jsx)(OUn,{survey:n,showPerformance:!0})}const jUn=(0,g.memo)(function(e){let{survey:n}=e;const{automatedScoring:t}=n;return t?(0,Ze.jsx)(kUn,{survey:n}):(0,Ze.jsx)(OUn,{survey:n})});function CUn(e){let{survey:n}=e;const{contributors:t,submissions:a}=n;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(xEn,{children:"Response status"}),(0,Ze.jsx)(dUn,{contributors:t,submissions:a})]})}function SUn(e){let{survey:n}=e;const{contributors:t,submissions:a}=n;return(0,g.useMemo)(()=>(e=>{const n=new Set;for(const r of(null==e||null===(t=e.template)||void 0===t?void 0:t.questions)||[]){var t,a;const e=null==r||null===(a=r.category)||void 0===a?void 0:a.name;void 0!==e&&n.add(e)}return n.size>0})(n),[n])?(0,Ze.jsx)(CUn,{survey:n}):(0,Ze.jsxs)(OEn,{children:[(0,Ze.jsxs)(kEn,{children:[(0,Ze.jsxs)(CEn,{children:[(0,Ze.jsx)(xEn,{children:"Response status"}),(0,Ze.jsx)(dUn,{contributors:t,submissions:a})]}),(0,Ze.jsx)(SEn,{children:(0,Ze.jsx)(nUn,{survey:n,children:(0,Ze.jsx)(TEn,{children:"Contributor performance"})})})]}),(0,Ze.jsx)(FBn,{survey:n})]})}const NUn=(0,g.memo)(function(e){let{survey:n}=e;const{automatedScoring:t}=n;return t?(0,Ze.jsx)(SUn,{survey:n}):(0,Ze.jsx)(CUn,{survey:n})});var wUn;const DUn=Ge.default.div(wUn||(wUn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 400px;\n\n  .ag-header {\n    display: none;\n  }\n\n  .ag-sticky-top {\n    top: 0 !important;\n  }\n"]))),AUn=[];function RUn(){const e=rt(),{surveyType:n,selectContributors:t,selectIndividualContributors:a,selectedIds:r}=YEn(),{rows:i,loading:o}=s_n(n);return o?(0,Ze.jsx)(Vg,{}):(0,Ze.jsx)(DUn,{className:"ag-theme-alpine",children:(0,Ze.jsx)(Vw.W6,{onGridReady:e=>{e.api.forEachNode(e=>{e.id&&r.has(e.id)&&e.setSelected(!0)})},onSelectionChanged:r=>{const i=r.api.getSelectedRows();if(n===JEn.contributor){const n=i.filter(n=>"Account"===n.__typename&&n.id!==e).map(e=>e.id);return t(n)}const o=i.filter(e=>"MysqlUser"===e.__typename).map(e=>e.id);return a(o)},treeData:!0,rowSelection:"multiple",columnDefs:AUn,rowData:i,getDataPath:e=>e.orgHierarchy,groupSelectsChildren:!0,suppressRowClickSelection:!0,groupDefaultExpanded:1,loadingOverlayComponent:ze.Ip,getRowId:e=>e.data.id,autoGroupColumnDef:{headerName:"Name",flex:1,valueGetter:e=>{if(e.data)switch(e.data.__typename){case"Account":return e.data.name;case"MysqlUser":return"".concat(e.data.firstName," ").concat(e.data.lastName," <").concat(e.data.email,">")}},cellRendererParams:{checkbox:!0,suppressCount:!0}}},n)})}var PUn,LUn;function IUn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const EUn=Ge.default.div(PUn||(PUn=IUn(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n"]))),_Un=(0,Ge.default)(ze.EY)(LUn||(LUn=IUn(["\n  padding: 0;\n  padding-left: 30px;\n"]))),FUn=e=>{let{hideNotifyByEmail:n}=e;const{state:t,surveyType:a,toggleNotifyByEmail:r,selectIndividualContributors:i,selectContributors:o}=YEn();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.hh.Row,{children:!n&&(0,Ze.jsx)(ze.hh.TextColumn,{size:"sm",color:"normal",children:"Your survey recipients will be asked to fill in these survey/s"})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.JU,{children:"Recipients"})}),(0,Ze.jsxs)(jL.A,{"aria-label":"position",row:!0,children:[(0,Ze.jsx)(CL.A,{control:(0,Ze.jsx)(f.RadioButton,{name:"contributorsType",checked:a===JEn.user,value:JEn.user,onChange:()=>i([])}),label:(0,Ze.jsx)(ze.EY,{size:"md",color:"normal",children:"One survey per user"}),labelPlacement:"end"}),(0,Ze.jsx)(CL.A,{control:(0,Ze.jsx)(f.RadioButton,{name:"contributorsType",checked:a===JEn.contributor,value:JEn.contributor,onChange:()=>o([])}),label:(0,Ze.jsx)(ze.EY,{size:"md",color:"normal",children:"One survey per account"}),labelPlacement:"end"})]}),!n&&(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsxs)(ze.hh.Column,{children:[(0,Ze.jsxs)(EUn,{children:[(0,Ze.jsx)(ze.Sc,{id:"AddSurveyForm_Checkbox_SendAllContributors",inline:!0,onChange:()=>r(),name:"notifyByEmail",checked:t.notifyByEmail}),(0,Ze.jsx)(ze.hh.TextColumn,{size:"md",color:"normal",children:"Notify recipients by email"})]}),(0,Ze.jsx)(EUn,{children:(0,Ze.jsxs)(_Un,{size:"sm",color:"normal",children:["Contact a system administrator to add, list and manage contributors.",(0,Ze.jsx)("br",{}),"All users listed for each contributor will receive the survey."]})})]})}),(0,Ze.jsx)(RUn,{})]})};var BUn,UUn,MUn,VUn,zUn;function GUn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $Un=(0,Ge.default)(ze.fs)(BUn||(BUn=GUn(["\n  height: 150px;\n"]))),WUn=Ge.default.div(UUn||(UUn=GUn(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n"]))),qUn=(0,Ge.default)(ze.EY)(MUn||(MUn=GUn(["\n  padding: 0;\n  padding-left: 30px;\n"]))),JUn=Ge.default.div(VUn||(VUn=GUn(["\n  position: absolute;\n  bottom: 25px;\n  right: 30px;\n  color: ",";\n"])),e=>e.theme.colors.text.normal.background),YUn=(0,Ge.default)(ze.hh.Row)(zUn||(zUn=GUn(["\n  position: relative;\n"])));function HUn(e){var n,t;let{errors:a,accountId:r,disabled:i,isUpdatingSurvey:o}=e;const{state:l,changeName:s,toggleAutomatedScoring:c,toggleFeedbackEnabled:d,changeNote:u,changeStartDate:p,changeDeadlineDate:m,changeSurveyTemplateId:f}=YEn();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(ze.hh.Row,{container:!0,children:(0,Ze.jsx)(ze.hh.TextInputColumn,{id:"AddSurveyForm__Input_Name",label:"Survey name",name:"name",onChange:e=>s(e.target.value),value:l.name,error:a.name,disabled:i})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextColumn,{size:"sm",color:"normal",children:"This will be presented to recipients"})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Survey",span:12,children:(0,Ze.jsx)(AO,{value:l.surveyTemplateId,accountId:r,error:a.surveyTemplateId||void 0,onChange:e=>f(e.target.select.value)})})}),(0,Ze.jsx)(FUn,{hideNotifyByEmail:o}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsxs)(ze.hh.Column,{label:"Feedback",children:[(0,Ze.jsxs)(WUn,{children:[(0,Ze.jsx)(ze.Sc,{id:"AddSurveyForm_Checkbox_Feedback",inline:!0,onChange:()=>d(),checked:l.feedbackEnabled}),(0,Ze.jsx)(ze.hh.TextColumn,{size:"md",color:"normal",children:"Approve responses"})]}),(0,Ze.jsx)(WUn,{children:(0,Ze.jsx)(qUn,{size:"sm",color:"normal",children:"If selected, you will have to approve or request changes for each response in Rio"})})]})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsxs)(ze.hh.Column,{label:"Automated Scoring",children:[(0,Ze.jsxs)(WUn,{children:[(0,Ze.jsx)(ze.Sc,{id:"AddSurveyForm_Checkbox_AutomatedScoring",inline:!0,onChange:()=>c(),checked:l.automatedScoring}),(0,Ze.jsx)(ze.hh.TextColumn,{size:"md",color:"normal",children:"Score contributions"})]}),(0,Ze.jsx)(WUn,{children:(0,Ze.jsx)(qUn,{size:"sm",color:"normal",children:"If selected, you and your recipients will automatically receive performance feedback against Rio sustainability metrics"})})]})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Start date",span:12,children:(0,Ze.jsx)(ze.lr,{onDayClick:p,name:"startDate",selectedDate:null==l?void 0:l.startDate,disabledDatesBefore:Fa().toDate(),box:!0,error:a.startDate,placeholder:"DD/MM/YYYY"})})}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.Column,{label:"Deadline for responses",span:12,children:(0,Ze.jsx)(ze.lr,{onDayClick:m,name:"deadlineDate",selectedDate:null==l?void 0:l.deadlineDate,disabledDatesBefore:Fa().toDate(),box:!0,error:a.deadlineDate,placeholder:"DD/MM/YYYY"})})}),(0,Ze.jsxs)(YUn,{container:!0,children:[(0,Ze.jsx)(ze.hh.Column,{label:"Notes for recipients (optional)",name:"notes",children:(0,Ze.jsx)($Un,{id:"AddSurveyForm__Input_Notes",name:"notes",onChange:e=>u(e.target.value),value:null==l?void 0:l.notes,error:a.notes,disabled:i})}),(0,Ze.jsxs)(JUn,{color:"normal",children:[null!==(n=null===(t=l.notes)||void 0===t?void 0:t.length)&&void 0!==n?n:0,"/1000"]})]}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(ze.hh.TextColumn,{size:"sm",color:"normal",children:"These notes will appear in the email sent to your recipients"})})]})}var KUn,QUn;function ZUn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function XUn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ZUn(Object(t),!0).forEach(function(n){eMn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ZUn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function eMn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function nMn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const tMn=Ge.default.div(KUn||(KUn=nMn(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),aMn=(0,Ge.default)(ze.hh.TextColumn)(QUn||(QUn=nMn(["\n  align-self: center;\n"])));function rMn(e){let{onDismiss:n,onSuccess:t,buttonDescription:a,title:r,submitButtonText:i}=e;const o=rt(),{state:l}=YEn(),[s,c]=(0,g.useState)({}),[d,{loading:u}]=QAn(),p=(0,g.useCallback)(async e=>{e.preventDefault(),c({});const[a,r]=M_n(l);if(a)return c(e=>XUn(XUn({},e),a));const i={survey:XUn(XUn({},r),{},{ownerAccountId:o})};await d({variables:i,onCompleted:()=>{n(),t()}})},[l,d,c,n,o,t]);return(0,Ze.jsx)(tMn,{children:(0,Ze.jsxs)(ze.hh,{onSubmit:p,children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:r}),(0,Ze.jsx)(HUn,{errors:s,disabled:u,accountId:o}),(0,Ze.jsx)(ze.hh.ButtonColumn,{name:"AddSurvey__Submit",disabled:u,onClick:p,children:i}),(0,Ze.jsx)(ze.hh.Row,{children:(0,Ze.jsx)(aMn,{span:12,size:"sm",color:"normal",children:a})})]})})}var iMn;function oMn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function lMn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?oMn(Object(t),!0).forEach(function(n){sMn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):oMn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function sMn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const cMn=Ge.default.div(iMn||(iMn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing);function dMn(e){let{onDismiss:n,existingSurvey:t,onDelete:a,onSuccess:r}=e;const i=rt(),[o,l]=(0,g.useState)({}),{state:s}=YEn(),[c,{loading:d}]=eRn(),[u,{loading:p}]=ZAn(),m=(0,g.useCallback)(async e=>{e.preventDefault(),l({});const[a,i]=M_n(s);if(a)return l(e=>lMn(lMn({},e),a));const o={id:t.id,survey:lMn(lMn({},i),{},{ownerAccountId:t.owner.id})};await c({variables:o,onCompleted:()=>{n(),r()}})},[s,l,c,n,t,r]),f=(0,g.useCallback)(()=>{u({variables:{id:t.id},onCompleted:()=>{n(),null==a||a()}})},[t.id,u,n,a]),y=d||p;return(0,Ze.jsx)(cMn,{children:(0,Ze.jsxs)(ze.hh,{container:!0,onSubmit:m,children:[(0,Ze.jsx)(ze.hh.HeaderRow,{children:"Update Survey"}),(0,Ze.jsx)(HUn,{errors:o,disabled:!(!d&&!p),accountId:i,isUpdatingSurvey:!0}),(0,Ze.jsxs)(ze.hh.Row,{container:!0,children:[(0,Ze.jsx)(ze.hh.ButtonColumn,{span:6,disabled:y,onClick:m,name:"UpdateSurveyButton",children:"Update survey"}),(0,Ze.jsx)(ze.hh.ButtonColumn,{name:"DeleteSurveyButton",span:6,disabled:y,onClick:f,color:"danger",children:"Delete survey"})]})]})})}var uMn,pMn,mMn;function fMn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yMn=(0,Ge.default)(ze.fv)(uMn||(uMn=fMn(["\n  justify-content: flex-end;\n  align-items: center;\n  flex-direction: row;\n  column-gap: 20px;\n"]))),gMn=(0,Ge.default)(ze.$n)(pMn||(pMn=fMn(["\n  align-self: flex-end;\n  width: 200px;\n"]))),bMn=(0,Ge.default)(ze.$n)(mMn||(mMn=fMn(["\n  width: 150px;\n  background-color: ",";\n  color: ",";\n  border-color: ",";\n  border-width: 1px;\n"])),e=>e.theme.colors.basic.white,e=>e.theme.colors.primary.light.text,e=>e.theme.colors.primary.light.text),hMn=[{to:"../sent/overview",title:"Surveys sent"}];function vMn(e){let{survey:n,refetch:t,onDelete:a}=e;const[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)(!1),s=(0,g.useCallback)(()=>i(e=>!e),[]),c=(0,g.useCallback)(()=>l(e=>!e),[]),d=(0,g.useMemo)(()=>n?[...hMn,{to:"../sent/surveys",title:"All surveys"},{title:n.name}]:hMn,[n]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(bh,{name:"SurveysOverview",icon:["rio","clipboard-check-custom"],iconColor:"quaternary",title:n?n.name:"Overview",breadcrumb:d,children:(0,Ze.jsxs)(yMn,{span:9,container:!0,children:[n&&(0,Ze.jsx)(bMn,{id:"EditSurveyButton",onClick:c,children:"Edit survey"}),(0,Ze.jsx)(gMn,{id:"CreateSurveyButton",onClick:s,children:"+ Create a survey"})]})}),o&&n&&(0,Ze.jsx)(ze.aF,{size:"xl",onDismiss:c,dismissable:!0,enableEscapeKey:!0,show:!0,children:(0,Ze.jsx)(qEn,{survey:n,children:(0,Ze.jsx)(dMn,{existingSurvey:n,onDismiss:c,onDelete:a,onSuccess:t})})}),r&&(0,Ze.jsx)(ze.aF,{size:"xl",onDismiss:s,dismissable:!0,enableEscapeKey:!0,show:!0,children:(0,Ze.jsx)(qEn,{children:(0,Ze.jsx)(rMn,{onDismiss:s,onSuccess:t,title:"Create a survey",submitButtonText:"Create Survey",buttonDescription:"This will send your surveys to your recipients"})})})]})}function xMn(){return(0,Ze.jsxs)(vEn,{children:[(0,Ze.jsx)(vMn,{refetch:()=>{}}),(0,Ze.jsx)(Gh,{title:"You don't have any surveys yet",description:"Surveys are a quick way to collect data and insights",icon:["rio","clipboard-check-custom"]})]})}var TMn;const OMn=Ge.default.div(TMn||(TMn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing);function kMn(e){let{survey:n,onDelete:t,latest:a=!0,refetch:r}=e;return n?(0,Ze.jsxs)(vEn,{children:[(0,Ze.jsx)(vMn,{survey:n,onDelete:t,refetch:r}),(0,Ze.jsxs)(OMn,{children:[(0,Ze.jsx)(XFn,{survey:n,latest:a}),(0,Ze.jsx)(NUn,{survey:n}),(0,Ze.jsx)(jUn,{survey:n})]})]}):(0,Ze.jsx)(xMn,{})}const jMn=["template","submissions","owner","contributors"];function CMn(){const{survey:e,load:n}=KAn({fields:jMn});return e?(0,Ze.jsx)(kMn,{survey:e,latest:!0,refetch:n}):null}const SMn=["contributors","submissions","owner","template"];function NMn(e){let{surveyId:n}=e;const t=(0,m.Zp)(),a=oc(),r=(0,g.useCallback)(()=>{t("/".concat(a.surveys.root,"/").concat(a.surveys.sent.surveys))},[t,a]),{survey:i,load:o}=KAn({id:n,fields:SMn});return i?(0,Ze.jsx)(kMn,{survey:i,onDelete:r,latest:!1,refetch:o}):null}function wMn(){const{surveyId:e}=(0,m.g)();return e?(0,Ze.jsx)(NMn,{surveyId:e}):(0,Ze.jsx)(CMn,{})}var DMn,AMn,RMn,PMn;function LMn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const IMn=(0,Ge.default)(ze.fv)(DMn||(DMn=LMn(["\n  display: flex;\n  height: 100%;\n"]))),EMn=(0,Ge.default)(ze.$n)(AMn||(AMn=LMn(["\n  align-self: center;\n  max-width: 200px;\n  margin-right: ",";\n"])),e=>e.theme.geometry.md.spacing),_Mn=(0,Ge.default)(ze.fv)(RMn||(RMn=LMn(["\n  display: contents;\n"]))),FMn=(0,Ge.default)(ze.vj)(PMn||(PMn=LMn(["\n  padding-right: ",";\n  min-width: 200px;\n"])),e=>e.theme.geometry.md.spacing),BMn=[{to:"../sent/overview",title:"Surveys sent"},{title:"All surveys"}];function UMn(){const e=GIn(window.innerWidth),n=rt(),[t,a]=(0,g.useState)(1),[r,i]=(0,g.useState)(1),[o,l]=(0,g.useState)(""),[s,c]=(0,g.useState)(!1),d=XAn({accountId:n,offset:(r-1)*e,limit:e,filters:{search:{field:["name"],value:o}}}),u=(0,g.useCallback)(()=>d.refetch({accountId:n}),[n,d]),p=(0,g.useCallback)(()=>c(e=>!e),[]),f=(0,m.Zp)(),y=(0,g.useCallback)(e=>f("./".concat(e)),[f]),b=(0,g.useCallback)(()=>(0,Ze.jsx)(Vg,{name:"ConfigurationAccountsContainer__Loading"}),[]),h=(0,g.useCallback)(e=>(0,Ze.jsx)(ub,{error:e,retry:u}),[u]),v=(0,g.useCallback)(e=>{let{getSurveysPage:n}=e;return(0,Ze.jsx)(SO,{surveys:n,onSurveyClick:y})},[y]);return(0,g.useEffect)(()=>{var n;null!=d&&null!==(n=d.data)&&void 0!==n&&null!==(n=n.getSurveysPage)&&void 0!==n&&n.totalRows&&a(Math.ceil(d.data.getSurveysPage.totalRows/e))},[e,d]),(0,Ze.jsxs)(IMn,{children:[(0,Ze.jsx)(bh,{name:"Surveys",icon:["rio","clipboard-check-custom"],iconColor:"quaternary",title:"Surveys",breadcrumb:BMn,children:(0,Ze.jsxs)(_Mn,{span:9,container:!0,children:[(0,Ze.jsx)(FMn,{name:"ConfigurationAccountsContainer__Controls__Search",value:o,onChange:e=>l(e.target.value),size:"md",hideButton:!0}),(0,Ze.jsx)(EMn,{id:"CreateSurveyButton",onClick:p,children:"+ Create a survey"}),t>1&&(0,Ze.jsx)(J_,{id:"survey-container-pagination",name:"survey-container-pagination",currentPage:r,itemsCountPerPage:e,totalPagesCount:t,onChange:i,size:"sm"})]})}),s&&(0,Ze.jsx)(ze.aF,{size:"xl",onDismiss:p,dismissable:!0,enableEscapeKey:!0,show:!0,children:(0,Ze.jsx)(qEn,{children:(0,Ze.jsx)(rMn,{onSuccess:u,onDismiss:p,title:"Create a survey",submitButtonText:"Create Survey",buttonDescription:"This will send your survey to your recipients"})})}),(0,Ze.jsx)(pb,{result:d,loading:b,data:v,error:h})]})}var MMn,VMn,zMn,GMn,$Mn,WMn,qMn,JMn,YMn;function HMn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const KMn=Ge.default.div(MMn||(MMn=HMn(["\n  position: relative;\n  height: 100%;\n  overflow: hidden;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),QMn=Ge.default.div(VMn||(VMn=HMn(["\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 2;\n  background-color: white;\n  opacity: 0.5;\n  width: 100%;\n  height: 100%;\n"]))),ZMn=(0,Ge.default)(ze.KH)(zMn||(zMn=HMn(["\n  overflow: auto;\n"]))),XMn=(0,Ge.default)(ze.fI)(GMn||(GMn=HMn(["\n  height: 100%;\n"]))),eVn=Ge.default.div($Mn||($Mn=HMn(["\n  flex: 1 1 auto;\n  background-color: ",";\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: scroll;\n"])),e=>e.theme.colors.basic.white),nVn=(0,Ge.default)(ze.fv)(WMn||(WMn=HMn(["\n  padding-right: ",";\n"])),e=>e.theme.geometry.md.spacing),tVn=(0,Ge.default)(Tn)(qMn||(qMn=HMn(["\n  margin-bottom: ",";\n  z-index: 3;\n  position: relative;\n"])),e=>e.theme.geometry.md.spacing),aVn=Ge.default.div(JMn||(JMn=HMn(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n"]))),rVn=Ge.default.div(YMn||(YMn=HMn(["\n  background-color: #eb3223;\n  height: 18px;\n  width: 18px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: #fff;\n  border-radius: 50%;\n  font-size: 11px;\n"]))),iVn=(0,Ye.Ay)(e=>{var n;let{intl:t}=e;const a=rc(),r=rt(),{token:i}=at(),o=oc(),l=a.survey.some(e=>e.startsWith("getSurveys")),s=a.survey.some(e=>e.startsWith("getReceivedSurveys")),c=Pu(),d=!!c&&c.accessControls.surveys,u={accountId:r,userId:i.sub},{data:p}=Qf(u),f=eC(null==p||null===(n=p.getReceivedSurveysPage)||void 0===n?void 0:n.rows);return(0,Ze.jsxs)(KMn,{children:[!d&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(QMn,{}),(0,Ze.jsx)(tVn,{name:"FormsContainer_Access_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Surveys",body:"Currently Surveys are not included in your subscription, if you’d like access to Surveys please contact Rio AI Ltd or get in touch with your Business Admin."})]}),(0,Ze.jsxs)(XMn,{container:!0,item:!0,children:[(0,Ze.jsx)(nVn,{container:!0,item:!0,span:3,children:(0,Ze.jsxs)(ZMn,{id:"pic",name:"forms-menu",inline:!0,size:"md",text:(0,Ze.jsx)(Je.A,{id:"pages.surveys.nav.heading"}),icon:["rio","clipboard-check-custom"],children:[l&&(0,Ze.jsx)(XN,{to:o.surveys.sent.overview,base:"sent",children:(0,Ze.jsxs)(ze.C8,{text:"Surveys sent",dropdown:!0,children:[(0,Ze.jsx)(XN,{name:"forms-menu__item--overview",to:o.surveys.sent.overview,children:(0,Ze.jsx)(ze.nc,{text:t.formatMessage({id:"pages.surveys.subjects.overview"})})}),(0,Ze.jsx)(XN,{name:"forms-menu__item--contributors",to:o.surveys.sent.contributors,children:(0,Ze.jsx)(ze.nc,{text:t.formatMessage({id:"pages.surveys.subjects.contributors"})})}),(0,Ze.jsx)(XN,{name:"forms-menu__item--surveys",to:o.surveys.sent.surveys,children:(0,Ze.jsx)(ze.nc,{text:t.formatMessage({id:"pages.surveys.subjects.surveys"})})})]})}),s&&(0,Ze.jsx)(XN,{name:"forms-menu__item--surveys",to:o.surveys.received.surveys,children:(0,Ze.jsx)(ze.C8,{text:(0,Ze.jsxs)(aVn,{children:[!!f&&(0,Ze.jsx)(rVn,{children:f}),t.formatMessage({id:"pages.surveys.subjects.surveysReceived"})]})})})]})}),(0,Ze.jsx)(ze.fv,{container:!0,inline:!0,span:10,children:(0,Ze.jsx)(eVn,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:o.surveys.sent.overview,element:$Dn(wMn,l)}),(0,Ze.jsx)(m.qh,{path:o.surveys.sent.contributors,element:$Dn(rPn,l)}),(0,Ze.jsx)(m.qh,{path:o.surveys.sent.contributor,element:$Dn(eAn,l)}),(0,Ze.jsx)(m.qh,{path:o.surveys.sent.contributorAuditLog,element:$Dn(_Rn,l)}),(0,Ze.jsx)(m.qh,{path:o.surveys.sent.submission,element:$Dn(kPn,l)}),(0,Ze.jsx)(m.qh,{path:o.surveys.sent.surveys,element:$Dn(UMn,l)}),(0,Ze.jsx)(m.qh,{path:o.surveys.sent.survey,element:$Dn(wMn,l)}),(0,Ze.jsx)(m.qh,{path:o.surveys.received.surveys,element:$Dn(nEn,s)}),(0,Ze.jsx)(m.qh,{path:o.surveys.received.survey,element:$Dn(zIn,s)}),(0,Ze.jsx)(m.qh,{path:o.surveys.sent.auditLog,element:$Dn(aRn,l)}),(0,Ze.jsx)(m.qh,{path:o.surveys.received.auditLog,element:$Dn(PRn,s)}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(Xg,{})})]})})})]})]})});var oVn;const lVn=Ge.default.div(oVn||(oVn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  font-size: ",";\n  font-family: ",";\n  padding: ",";\n  padding-bottom: 0;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.fonts.xxl.size},e=>{let{theme:n}=e;return n.fonts.family},e=>{let{theme:n}=e;return n.geometry.xl.spacing},e=>{let{theme:n}=e;return n.colors.text.light.text}),sVn=e=>{const n=(()=>{const e=localStorage.getItem("ID_TOKEN");return e?(0,Jb.A)(e):null})();return n?e=(e=(e=e.replace(/\[FIRSTNAME\]/g,n.given_name)).replace(/\[LASTNAME\]/g,n.family_name)).replace(/\[EMAIL\]/g,n.email):""},cVn=e=>{let{message:n}=e;return(0,Ze.jsx)(lVn,{children:sVn(n)})};var dVn,uVn,pVn,mVn=t(71790);function fVn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const yVn=Ge.default.div(dVn||(dVn=fVn(["\n  display: flex;\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  background: rgba(0, 0, 0, 0.7);\n  color: white;\n  z-index: 99;\n  margin -10px 0 0 -10px;\n  box-shadow: inset 0px 0px 100px 40px rgba(0, 0, 0, 0.04);\n"]))),gVn=(0,Ge.default)(p.Link)(uVn||(uVn=fVn(["\n  padding: 15px;\n  background: ",";\n  border-radius: 100px;\n\n  :hover {\n    background: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.colors.primary.normal.background},e=>{let{theme:n}=e;return n.colors.primary.dark.background}),bVn=Ge.default.div(pVn||(pVn=fVn(["\n  padding: 10px;\n  font-size: ",";\n  text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3);\n"])),e=>{let{theme:n}=e;return n.fonts.lg.size}),hVn=e=>{let{contentSection:n}=e;return(0,Ze.jsxs)(yVn,{children:[(0,Ze.jsxs)(bVn,{children:["You do not currently subscribe to Rio ",n,"."]}),(0,Ze.jsx)(gVn,{to:"/contact",children:"Find out more"})]})};var vVn,xVn;function TVn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const OVn=Ge.default.div(vVn||(vVn=TVn(["\n  display: flex;\n  flex-direction: row;\n  justify-content: center;\n  align-items: flex-start;\n  width: auto;\n  height: 80%;\n  padding: 0 32px;\n  @media (max-width: 1920px) {\n    transform: scale(0.9);\n  }\n"]))),kVn=Ge.default.div(xVn||(xVn=TVn(["\n  width: calc(100% / 3);\n  height: 100%;\n  display: flex;\n  flex: 1 0 calc(100% / 3);\n  max-width: 520px;\n  margin: 32px;\n"]))),jVn=e=>{let{children:n}=e;return n.length>1?(0,Ze.jsx)(OVn,{children:n.map((e,n)=>[n,e]).map(e=>(0,Ze.jsx)(kVn,{children:e[1]},e[0]))}):(0,Ze.jsx)(OVn,{children:(0,Ze.jsx)(kVn,{children:n})})};var CVn,SVn,NVn;function wVn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const DVn=Ge.default.div(CVn||(CVn=wVn(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  width: 100%;\n  height: 100%;\n  color: ",";\n  ","\n"])),e=>{let{theme:n}=e;return n.colors.text.light.text},e=>{let{noAccess:n}=e;return n?"opacity: 0.3;":""}),AVn=Ge.default.div(SVn||(SVn=wVn(["\n  padding: 10px;\n  font-size: ",";\n"])),e=>{let{theme:n}=e;return n.fonts.lg.size}),RVn=(0,Ge.default)(ze.In)(NVn||(NVn=wVn(["\n  color: rgba(0, 0, 0, 0.3);\n  margin: ",";\n"])),e=>{let{theme:n}=e;return n.geometry.md.spacing}),PVn=e=>{let{noAccess:n}=e;return(0,Ze.jsxs)(DVn,{noAccess:n,children:[(0,Ze.jsx)(RVn,{icon:"thumbs-up",size:"4x"}),(0,Ze.jsx)(AVn,{children:"Nice, no outstanding actions"})]})};var LVn,IVn,EVn,_Vn=t(24818);function FVn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const BVn=(0,Ge.keyframes)(LVn||(LVn=FVn(["\n  0% {transform:translateX(-100%);}\n  100% {transform:translateX(100%);}\n"]))),UVn=(0,Ge.css)(IVn||(IVn=FVn(["\n  "," 1s infinite 0s;\n"])),BVn),MVn=(0,Ge.css)(EVn||(EVn=FVn(["\n  &:after {\n    content: '';\n    color: black;\n    top: 0;\n    transform: translateX(-100%);\n    width: 100%;\n    height: 100%;\n    position: absolute;\n    z-index: 999;\n    animation: ",";\n    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(128, 186, 232, 0) 99%, rgba(125, 185, 232, 0) 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#007db9e8',GradientType=1 ); /* IE6-9 */\n  }\n"])),UVn);var VVn,zVn,GVn,$Vn,WVn,qVn,JVn,YVn;function HVn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const KVn=(0,Ge.default)(ze.fv)(VVn||(VVn=HVn(["\n  border: 1px solid ",";\n  background-color: ",";\n  opacity: ",";\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"])),e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white,e=>e.disabled?"0.5":"1"),QVn=Ge.default.div(zVn||(zVn=HVn(["\n  position: relative;\n  padding: 0 0 75% 0;\n  flex: 0 0 auto;\n  background: "," url(",") center center no-repeat;\n  background-size: cover;\n"])),e=>{let{theme:n}=e;return n.colors.secondary.dark.background},e=>{let{src:n}=e;return n}),ZVn=(0,Ge.default)(ze.fv)(GVn||(GVn=HVn(["\n  padding: ",";\n  border-top: 1px solid ",";\n  background: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.overlay.normal.background,e=>{let{theme:n}=e;return n.colors.basic.white}),XVn=(0,Ge.default)(ze.GQ)($Vn||($Vn=HVn(["\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin-top: -50px;\n  margin-left: -50px;\n  display: inline-flex;\n  flex: 0 0 auto;\n"]))),ezn=(0,Ge.default)(ze.In)(WVn||(WVn=HVn(["\n  margin-left: auto;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.colors.success.normal.background}),nzn=(0,Ge.default)(ze.In)(qVn||(qVn=HVn(["\n  margin-left: auto;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.colors.primary.normal.background}),tzn=Ge.default.div(JVn||(JVn=HVn(["\n  position: absolute;\n  left: 0px;\n  right: 0px;\n  width: 100%;\n  background-color: rgba(0, 0, 0, 0.7);\n  height: 100%;\n"]))),azn=(0,Ge.default)(ze.In)(YVn||(YVn=HVn(["\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin-top: -10px;\n  margin-left: -10px;\n  display: inline-flex;\n  flex: 0 0 auto;\n  font-size: 23px;\n"]))),rzn=e=>{let{learnAccess:n,courseId:t,title:a,image:r,courseProgress:i,restricted:o}=e;return(0,Ze.jsxs)(KVn,{name:"CourseTile CourseTile--".concat(t),container:!0,item:!0,disabled:!n,children:[(0,Ze.jsxs)(QVn,{name:"CourseTile__Thumbnail",src:r,children:[!r&&(0,Ze.jsx)(XVn,{name:"CourseTile__Icon",height:"100px",size:"lg",icon:"graduation-cap",iconColor:"white",circleColor:"white"}),o?(0,Ze.jsx)(tzn,{children:(0,Ze.jsx)(azn,{icon:"lock",color:"#ababab"})}):null]}),(0,Ze.jsx)(ZVn,{container:!0,item:!0,vdistribution:"between",children:(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(ze.DZ,{name:"CourseTile__Title",size:"lg",color:"dark",weight:"light",children:a}),i===yr&&(0,Ze.jsx)(ezn,{icon:"check",size:"lg"}),i===fr&&(0,Ze.jsx)(nzn,{icon:"clock",size:"lg"})]})})]})};var izn,ozn,lzn,szn,czn,dzn,uzn,pzn;function mzn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const fzn=(0,Ge.default)(ze.fv)(izn||(izn=mzn(["\n  background-color: ",";\n  opacity: ",";\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"])),e=>e.theme.colors.basic.white,e=>e.disabled?"0.5":"1"),yzn=Ge.default.div(ozn||(ozn=mzn(["\n  position: relative;\n  padding: 0 0 75% 0;\n  flex: 0 0 auto;\n  background: "," url(",") center center no-repeat;\n  background-size: cover;\n\n  :hover {\n    width: 100%;\n  }\n\n  ","\n"])),e=>{let{theme:n}=e;return n.colors.secondary.dark.background},e=>{let{src:n}=e;return n},e=>{if(e.placeholder)return(0,Ge.css)(lzn||(lzn=mzn(["\n        background: ",";\n        ","\n      "])),e.theme.colors.neutral.normal.background,MVn)}),gzn=(0,Ge.default)(ze.fv)(szn||(szn=mzn(["\n  padding-top: 10px;\n"]))),bzn=(0,Ge.default)(ze.GQ)(czn||(czn=mzn(["\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin-top: -50px;\n  margin-left: -50px;\n  display: inline-flex;\n  flex: 0 0 auto;\n"]))),hzn=Ge.default.h3(dzn||(dzn=mzn(["\n  position: relative;\n  font-size: ",";\n  color: ",";\n  display: -webkit-box;\n  overflow: hidden;\n  -webkit-line-clamp: 2; /* number of lines to show */\n  -webkit-box-orient: vertical;\n  ","\n\n  ","\n"])),e=>{let{theme:n}=e;return n.fonts.md.size},e=>{let{placeholder:n}=e;return n?"rgba(0,0,0,0)":"black"},e=>{let{column:n}=e;return n?"padding: 10px 20px;":""},e=>{if(e.placeholder)return(0,Ge.css)(uzn||(uzn=mzn(["\n        min-width: 100%;\n        min-height: 20px;\n        background: ",";\n        ","\n      "])),e.theme.colors.neutral.normal.background,MVn)}),vzn=(0,Ge.default)(ze.fI)(pzn||(pzn=mzn(["\n  padding-bottom: ",";\n"])),e=>{let{theme:n}=e;return n.geometry.xs.spacing});var xzn,Tzn,Ozn,kzn,jzn,Czn,Szn,Nzn,wzn,Dzn;function Azn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Rzn=Ge.default.div(xzn||(xzn=Azn(["\n  padding: ",";\n  display: flex;\n  flex-direction: ",";\n  justify-content: start;\n  overflow-x: auto;\n  display: grid;\n  grid-template-columns: repeat(",", minmax(180px, 1fr));\n  grid-gap: ",";\n  margin: 0;\n"])),e=>{let{column:n}=e;return n?"0":"0 10px 0 18px"},e=>{let{column:n}=e;return n?"column":"row"},e=>{let{column:n}=e;return n?"1":"10"},e=>e.theme.geometry.md.spacing),Pzn=Ge.default.h1(Tzn||(Tzn=Azn(["\n  padding: ",";\n  font-weight: bold;\n  margin-bottom: ",";\n  font-size: ",";\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.xxs.spacing,e=>e.theme.fonts.xxl.size),Lzn=Ge.default.div(Ozn||(Ozn=Azn(["\n  margin-top: ",";\n  background: ",";\n  color: ",";\n  min-height: ",";\n"])),e=>{let{theme:n,noBackground:t}=e;return t?"0":n.geometry.md.spacing},e=>{let{noBackground:n}=e;return n?"none":"white"},e=>e.theme.colors.text.light.text,e=>{let{noBackground:n}=e;return n?"0":"232px"}),Izn=(0,Ge.default)(e=>{let{learnAccess:n,courseId:t,title:a,image:r,placeholder:i,column:o,restricted:l}=e;return(0,Ze.jsxs)(fzn,{name:"CourseTile CourseTile--".concat(t),container:!0,item:!0,disabled:!n,children:[(0,Ze.jsxs)(yzn,{name:"CourseTile__Thumbnail",src:r,placeholder:i,children:[!r&&(0,Ze.jsx)(bzn,{name:"CourseTile__Icon",height:"100px",size:"lg",icon:"graduation-cap",iconColor:"white",circleColor:"white"}),l?(0,Ze.jsx)(tzn,{children:(0,Ze.jsx)(azn,{icon:"lock",color:"#ababab"})}):null]}),(0,Ze.jsx)(gzn,{container:!0,item:!0,vdistribution:"between",children:(0,Ze.jsx)(vzn,{container:!0,item:!0,itemAlign:"top",children:(0,Ze.jsx)(hzn,{name:"CourseTile__Title",size:"lg",color:"dark",weight:"light",placeholder:i,column:o,children:a})})})]})})(kzn||(kzn=Azn(["\n  border: none;\n"]))),Ezn=Ge.default.div(jzn||(jzn=Azn(["\n  display: flex;\n  align-items: baseline;\n  padding-left: ",";\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),_zn=(0,Ge.default)(p.Link)(Czn||(Czn=Azn(["\n  text-decoration: underline;\n  opacity: 0.7;\n  font-size: ",";\n"])),e=>{let{theme:n}=e;return n.fonts.md.size}),Fzn=(0,Ge.default)(ze.In)(Szn||(Szn=Azn(["\n  margin-left: ",";\n  color: ",";\n"])),e=>e.theme.geometry.xs.spacing,e=>{let{theme:n}=e;return n.colors.success.normal.background}),Bzn=(0,Ge.default)(ze.In)(Nzn||(Nzn=Azn(["\n  margin-left: ",";\n  color: ",";\n"])),e=>e.theme.geometry.xs.spacing,e=>{let{theme:n}=e;return n.colors.primary.normal.background}),Uzn=Ge.default.div(wzn||(wzn=Azn(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.xs.spacing),Mzn=(0,Ge.default)(ze.To)(Dzn||(Dzn=Azn(["\n  > p {\n    font-family: ",";\n    color: ",";\n    font-weight: ",";\n  }\n"])),e=>e.theme.fonts.family,e=>e.theme.colors.text.light.text,e=>e.theme.fonts.weight.default),Vzn=e=>{let{column:n}=e;return(0,Ze.jsx)(p.Link,{name:"CoursesBanner__Link__Placeholder",to:"",children:(0,Ze.jsx)(Izn,{learnAccess:!0,courseId:0,title:"Placeholder",viewed:!1,type:null,image:"",placeholder:!0,column:n},1)},1)},zzn=(e,n)=>"Explore"===n?Gt().shuffle(e):e,Gzn=e=>{let{name:n,items:t,sectionTitle:a,highlightColor:r,learnAccess:i,loading:o,column:l,noBackground:s,noHeader:c,type:d,restricted:u,restrictedCourseList:p,bundleDescription:m}=e;return(0,Ze.jsxs)(Lzn,{name:n,highlightColor:r,noBackground:s,children:[!c&&(0,Ze.jsxs)(Ezn,{children:[(0,Ze.jsx)(Pzn,{children:a}),(0,Ze.jsx)(_zn,{name:"".concat(d,"-ViewAll"),to:t.length>0?"/engage/".concat(d.toLowerCase()):"contact",children:(0,Ze.jsx)(Je.A,{id:"pages.learn.viewLink",values:{amount:t.length}})}),(0,Ze.jsx)(Uzn,{children:(0,Ze.jsx)(Mzn,{name:"Bundle__MarkDown--Description",source:Gt().truncate(m,{length:100,separator:" ",omission:" ..."})})})]}),(0,Ze.jsxs)(Rzn,{column:l,children:[o&&" ".repeat(10).split("").map((e,n)=>(0,Ze.jsx)(Vzn,{column:l,children:"Loading"},"Course__Loading__key__".concat(n))),!o&&zzn(t,d).slice(0,10).map((e,n)=>{const t=e.userCourseMetaData&&e.userCourseMetaData.courseProgress?e.userCourseMetaData.courseProgress:mr,a=(0,_Vn.A)(d)?d:null==e?void 0:e.bundleIdList[0],r=(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(ze.DZ,{name:"CourseTile__Title",size:"md",color:"dark",weight:"light",children:e.name}),t===yr&&(0,Ze.jsx)(Fzn,{icon:"check",size:"1x"}),t===fr&&(0,Ze.jsx)(Bzn,{icon:"clock",size:"1x"})]});let o=0!==n&&u;o=!("Explore"!==d||!p.includes(e.id))||o;const s=o?"#":"./".concat(a?a+"/":"","course").concat(e.type===Vt.US.Scorm?"/SCORM":"","/").concat(e.id);return(0,Ze.jsx)(ZN,{name:"CoursesBanner__Link__".concat(e.id),to:s,restricted:o,title:o?"Not yet available - part of restricted content order.":"",children:(0,Ze.jsx)(Izn,{restricted:o,learnAccess:i,courseId:e.id,title:r,viewed:e.metaData.viewed,type:e.type,image:e.metaData.thumbnail,column:l},e.id)},"link".concat(n,"-").concat(e.id))})]})]})},$zn=e=>!e.userCourseMetaData||e.userCourseMetaData&&![fr,yr].includes(e.userCourseMetaData.courseProgress),Wzn=e=>e.userCourseMetaData&&e.userCourseMetaData.courseProgress===fr,qzn=e=>e.userCourseMetaData&&e.userCourseMetaData.courseProgress===yr,Jzn=(e,n)=>{var t,a,r,i;return(null===(t=e.userCourseMetaData)||void 0===t?void 0:t.lastUpdatedAt)>(null===(a=n.userCourseMetaData)||void 0===a?void 0:a.lastUpdatedAt)?-1:(null===(r=e.userCourseMetaData)||void 0===r?void 0:r.lastUpdatedAt)<(null===(i=n.userCourseMetaData)||void 0===i?void 0:i.lastUpdatedAt)?1:0},Yzn=e=>e.split("")[0].toUpperCase()+e.slice(1);var Hzn,Kzn,Qzn,Zzn,Xzn,eGn,nGn,tGn;function aGn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const rGn=(0,Ge.default)(ze.fv)(Hzn||(Hzn=aGn(["\n  opacity: ",";\n  border: 1px solid ",";\n  background-color: ",";\n  height: 100%;\n  width: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"])),e=>e.comingSoon?"0.5":"1",e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white),iGn=(0,Ge.default)(ze.fv)(Kzn||(Kzn=aGn(["\n  position: relative;\n  opacity: ",";\n  border: 1px solid ",";\n  background: ",";\n  height: 200px;\n  width: 100%;\n  overflow-x: hidden;\n  overflow-y: hidden;\n  ","\n"])),e=>e.comingSoon?"0.5":"1",e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.neutral.normal.background,MVn),oGn=(0,Ge.default)(ze.fI)(Qzn||(Qzn=aGn(["\n  padding: ",";\n  padding-bottom: 0;\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),lGn=(0,Ge.default)(ze.GQ)(Zzn||(Zzn=aGn(["\n  z-index: 100;\n  background: #fff;\n  display: inline-flex;\n"]))),sGn=(0,Ge.default)(ze.fI)(Xzn||(Xzn=aGn(["\n  z-index: 90;\n  padding: ",";\n  padding-top: ",";\n  border-top: 1px solid ",";\n  margin-top: -",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.xl.spacing,e=>e.theme.colors.overlay.normal.background,e=>e.theme.geometry.lg.spacing),cGn=Ge.default.div(eGn||(eGn=aGn(["\n  flex: 0 0 auto;\n  opacity: 0.7;\n  display: inline-block;\n  background: ",";\n  padding: "," ",";\n  margin-top: ",";\n"])),e=>e.theme.colors.overlay.dark.background,e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing),dGn=(0,Ge.default)(ze.fv)(nGn||(nGn=aGn(["\n  flex-grow: 9;\n"]))),uGn=(0,Ge.default)(ze.fv)(tGn||(tGn=aGn(["\n  align-items: center;\n  flex-grow: 3;\n"]))),pGn=e=>{let{title:n,category:t,icon:a,iconColor:r,comingSoon:i,placeholder:o,status:l}=e;return(0,Ze.jsx)(Ze.Fragment,{children:o?(0,Ze.jsx)(iGn,{container:!0,item:!0}):(0,Ze.jsxs)(rGn,{container:!0,item:!0,comingSoon:i,children:[(0,Ze.jsxs)(oGn,{container:!0,item:!0,distribution:"between",children:[(0,Ze.jsx)(lGn,{height:"70px",size:"lg",icon:a,iconColor:r,circleColor:r}),(0,Ze.jsx)(ze.DZ,{inline:!0,size:"md",color:"normal",weight:"light",children:t})]}),(0,Ze.jsxs)(sGn,{container:!0,item:!0,vdistribution:"between",children:[(0,Ze.jsx)(dGn,{span:l?9:12,children:(0,Ze.jsx)(ze.DZ,{size:"lg",color:"dark",weight:"light",children:n})}),l&&(0,Ze.jsx)(uGn,{container:!0,span:3,children:l}),i&&(0,Ze.jsx)(cGn,{children:(0,Ze.jsx)(ze.EY,{align:"center",size:"xs",color:"white",children:"Coming soon"})})]})]})})};var mGn,fGn,yGn;function gGn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const bGn=Ge.default.div(mGn||(mGn=gGn(["\n  position: absolute;\n  right: ",";\n  top: 30%;\n  flex: 0 0 auto;\n  display: inline-block;\n  background: ",";\n  padding: "," ",";\n"])),e=>e.isTile?e.theme.geometry.sm.spacing:"30%",e=>e.isDanger?e.theme.colors.danger.normal.background:e.theme.colors.warning.normal.background,e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.sm.spacing),hGn=Ge.default.div(fGn||(fGn=gGn(["\n  display: flex;\n"]))),vGn=(0,Ge.default)(ze.In)(yGn||(yGn=gGn(["\n  color: white;\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),xGn=e=>{let{date:n,tile:t}=e;const a=!!(r=n)&&Wt()().isAfter(r);var r;const i=function(e){return!!e&&Wt()().isBetween(Wt()(e).subtract(1,"months"),Wt()(e))}(n);return(0,Ze.jsx)(Ze.Fragment,{children:(a||i)&&(0,Ze.jsx)(bGn,{isTile:t,isDanger:a,children:(0,Ze.jsxs)(hGn,{children:[(0,Ze.jsx)(vGn,{icon:"exclamation-circle"}),(0,Ze.jsx)(ze.EY,{align:"center",size:"xs",color:"white",children:"Review"})]})})})},TGn="Carbon",OGn="Electricity",kGn="Water",jGn="Gas",CGn="Waste",SGn="Transport",NGn="Materials",wGn={[CGn]:"trash",[TGn]:"recycle",[OGn]:"bolt",[jGn]:"burn",[kGn]:"tint",[SGn]:"truck",[NGn]:"box"},DGn={[TGn]:"/reporting/v2/c03a4b07-ce4b-48f4-96c9-957f481bb3f0/Carbon",[OGn]:"/reporting/v2/305b11dc-65da-40c5-b321-f41bd0569c5b/Electricity",[jGn]:"/reporting/v2/8d98b676-c131-45ab-a8c7-c5bdf96366c2/Natural Gas",[SGn]:"/reporting/v2/76bdc04f-58ee-4f3c-840f-64309b78d23c/Transport",[CGn]:"/reporting/v2/9c64c17b-21a0-4b8d-a8c4-e630d92e2880/Waste",[kGn]:"/reporting/v2/69050da5-5851-4a23-ac84-012b4cf7d6e7/Water"};var AGn,RGn,PGn,LGn,IGn,EGn,_Gn,FGn,BGn;function UGn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function MGn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?UGn(Object(t),!0).forEach(function(n){VGn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):UGn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function VGn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function zGn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const GGn=Ge.default.div(AGn||(AGn=zGn(["\n  position: relative;\n  width: 100%;\n  height: 100%;\n  padding: 10px;\n"]))),$Gn=Ge.default.div(RGn||(RGn=zGn(["\n  font-size: 18px;\n  line-height: 28px;\n"]))),WGn=(e,n)=>({left:{name:(0,Ze.jsx)(Je.A,{id:"pages.home.engageTasksStatuses.incomplete"}),value:"".concat(e," min"),alert:e>0,new:!1},right:{name:(0,Ze.jsx)(Je.A,{id:"pages.home.engageTasksStatuses.completed"}),value:"".concat(n," min"),alert:!1,new:!1}}),qGn=e=>{if(e){const n=28;return Wt()(Wt().now()).dayOfYear()-Wt()(e).dayOfYear()>=n}return!1},JGn=e=>e?new Date(e).toLocaleString().split(",")[0]:"-",YGn=(0,Ge.default)(ze.fv)(PGn||(PGn=zGn(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  background: white;\n  box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.1);\n  margin-bottom: 20px;\n  position: relative;\n  cursor: default;\n"]))),HGn=(0,Ge.default)(p.Link)(LGn||(LGn=zGn(["\n  position: relative;\n  padding: 16px;\n  background: ",";\n  font-size: 20px;\n  color: white;\n  width: 100%;\n  text-align: center;\n\n  :hover {\n    background: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.colors.primary.light.background},e=>{let{theme:n}=e;return n.colors.primary.dark.background}),KGn=(0,Ge.default)(mVn.Vq)(IGn||(IGn=zGn(["\n  text-decoration: underline;\n"]))),QGn=Ge.default.div(EGn||(EGn=zGn(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  background: white;\n  box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.1);\n  margin-bottom: 20px;\n"]))),ZGn=Ge.default.div(_Gn||(_Gn=zGn(["\n  position: relative;\n  padding: 16px;\n  background: #ff9789;\n  font-size: 20px;\n  color: white;\n  width: 100%;\n  text-align: center;\n"]))),XGn=Ge.default.div(FGn||(FGn=zGn(["\n  position: relative;\n  padding: 16px;\n  text-align: center;\n  background: ",";\n  width: 100%;\n  overflow-x: hidden;\n  overflow-y: hidden;\n  margin-top: 10px;\n  margin-bottom: 10px;\n  ","\n"])),e=>e.theme.colors.neutral.normal.background,MVn),e$n=e=>{let{loading:n,goTo:t,title:a,buttonTitle:r,category:i,icon:o,iconColor:l,status:s}=e;return(0,Ze.jsxs)(YGn,{children:[(0,Ze.jsx)(pGn,{placeholder:n,title:a,category:i,icon:o,iconColor:l,status:s}),n&&(0,Ze.jsx)(XGn,{}),!n&&!!t&&(0,Ze.jsx)(HGn,{to:t,children:r})]})},n$n=e=>{let{loading:n}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(QGn,{children:[(0,Ze.jsx)(pGn,{placeholder:n,title:"Paper and Card disposal 42% over market rate – March 2020",category:"Investigate",icon:"pound-sign",iconColor:"quaternary"}),(0,Ze.jsx)(ZGn,{})]}),(0,Ze.jsxs)(QGn,{children:[(0,Ze.jsx)(pGn,{placeholder:n,title:"Metal disposal 62% over market rate – May 2020",category:"Investigate",icon:"pound-sign",iconColor:"quaternary"}),(0,Ze.jsx)(ZGn,{})]}),(0,Ze.jsxs)(QGn,{children:[(0,Ze.jsx)(pGn,{placeholder:n,title:"Paper and card could benefit from baling/compaction to reduce collection frequency",category:"Investigate",icon:"recycle",iconColor:"quaternary"}),(0,Ze.jsx)(ZGn,{})]})]})},t$n=e=>{let{count:n,documentType:t,loading:a}=e;return(0,Ze.jsxs)(YGn,{to:"data/Waste/view",children:[(0,Ze.jsx)(pGn,{placeholder:a,title:"Missing: ".concat(n," ").concat(t," IDs"),category:"Action",icon:"file-alt",iconColor:"tertiary"}),a&&(0,Ze.jsx)(XGn,{}),!a&&(0,Ze.jsxs)(HGn,{to:"data/Waste/view",children:["Add ",t," IDs"]})]})},a$n=e=>{let{id:n,reviewDate:t,fileName:a,loading:r}=e;const i=Wt()().isAfter(Wt()(t)),o="Your document ".concat(a,i?" has an expired review date.":" is approaching its review date.");return(0,Ze.jsxs)(YGn,{to:"documents/all/".concat(n),children:[(0,Ze.jsx)(pGn,{placeholder:r,title:o,category:"Action",icon:"file-alt",iconColor:"tertiary"}),r&&(0,Ze.jsx)(XGn,{}),!r&&(0,Ze.jsx)(HGn,{to:"documents/all/".concat(n),children:"Review ".concat(a)})]})},r$n=e=>{let{id:n,title:t,alertText:a,date:r}=e;const i="Legislation item ".concat(t," ").concat(a);return(0,Ze.jsxs)(YGn,{to:"governance/legislation/".concat(n),children:[(0,Ze.jsx)(xGn,{date:r,tile:!0}),(0,Ze.jsx)(pGn,{title:i,category:"Action",icon:"file-alt",iconColor:"tertiary"}),(0,Ze.jsx)(HGn,{to:"governance/legislation/".concat(n),children:"Review Legislation"})]})},i$n=e=>{let{id:n,activity:t,alertText:a,reviewDate:r}=e;const i="Environmental aspect ".concat(t," ").concat(a),o="governance/environmental-aspects?showEditModal=".concat(n);return(0,Ze.jsxs)(YGn,{to:o,children:[(0,Ze.jsx)(xGn,{date:r,tile:!0}),(0,Ze.jsx)(pGn,{title:i,category:"Action",icon:"file-alt",iconColor:"tertiary"}),(0,Ze.jsx)(HGn,{to:o,children:"Review Aspect ".concat(t)})]})},o$n=Ge.default.div(BGn||(BGn=zGn(["\n  height: 100%;\n  ","\n  ","\n"])),e=>{let{access:n}=e;return n?"":"opacity: 0.3;"},e=>{let{access:n}=e;return n?"":"overflow-y: hidden;"}),l$n=e=>{let{children:n,readOnly:t}=e;return(0,Ze.jsxs)(GGn,{children:[!t&&n,t&&(0,Ze.jsx)(PVn,{})]})},s$n=e=>e&&e.length?e.reduce((e,n)=>e+n.metaData.cpd,0):0,c$n=(0,Ye.Ay)(e=>{let{access:n,loading:t,data:a,intl:r,accountId:i}=e;const{hasLearnAccess:o,hasComplyAccess:l,hasDataAccess:s}=n,{learnLoading:c,complyLoading:d,analyseLoading:u}=t,{learnData:p,complyData:m,analyseData:f}=a,{incompleteCourses:y,completedCourses:g}=((e,n)=>!n&&e?{incompleteCourses:e.getAvailableCourses.data.filter(Wzn).sort(Jzn),completedCourses:e.getAvailableCourses.data.filter(qzn)}:{incompleteCourses:[],completedCourses:[]})(p,c),{documentsToReview:b,expiredLegislation:h,approachingLegislation:v,flaggedLegislation:x,expiredAspects:T,approachingAspects:O}=((e,n)=>!n&&e?{documentsToReview:e.getDocumentRecordsForReview,expiredLegislation:e.getLegislationAlerts.expired,approachingLegislation:e.getLegislationAlerts.approaching,flaggedLegislation:e.getLegislationAlerts.flagged,expiredAspects:e.getAspectsAlerts.expired,approachingAspects:e.getAspectsAlerts.approaching}:{})(m,d),{lastWasteImport:k,lastWasteImportOverOneMonth:j,targets:C}=((e,n)=>{if(!n&&e){const n=e.getDataImportBatchesByAccountId.batches[0]?e.getDataImportBatchesByAccountId.batches[0].timeStamp:null;return{lastWasteImport:n,lastWasteImportOverOneMonth:qGn(n),targets:e.getTargetsByAccountId}}return{}})(f,u),S=ot(),N=rc(),w=ur.includes(i),D=0===(null==h?void 0:h.length)&&0===(null==v?void 0:v.length)&&0===(null==b?void 0:b.length)&&0===(null==x?void 0:x.length)&&0===(null==T?void 0:T.length)&&0===(null==O?void 0:O.length);return w?(0,Ze.jsx)(jVn,{children:(0,Ze.jsx)(ze.x0,{darkMode:!1,layout:{reverse:!1,header:"center"},circleProps:{accentColor:"secondary",icon:"graduation-cap",title:r.formatMessage({id:"pages.home.dashboard.learn"}),linkTo:"engage",badgeStyle:!1},statProps:WGn(s$n(y),s$n(g)),children:(0,Ze.jsxs)(l$n,{readOnly:!N.learn.find(e=>e.startsWith("updateCourseProgress")),children:[!o&&(0,Ze.jsx)(hVn,{contentSection:"Engage"}),(0,Ze.jsxs)(o$n,{access:o,children:[c&&(0,Ze.jsx)(Gzn,{sectionTitle:"Continue",highlightColor:"secondary",items:[],learnAccess:o,loading:!0,column:!0,noBackground:!0,noHeader:!0}),y.length>0&&p&&(0,Ze.jsx)(Gzn,{sectionTitle:"Continue",highlightColor:"secondary",items:y,learnAccess:o,column:!0,noBackground:!0,noHeader:!0})||!c&&(0,Ze.jsx)(PVn,{})]})]})})}):(0,Ze.jsxs)(jVn,{children:[(0,Ze.jsx)(ze.x0,{darkMode:!1,layout:{reverse:!1,header:"center"},circleProps:{accentColor:"secondary",icon:"graduation-cap",title:r.formatMessage({id:"pages.home.dashboard.learn"}),linkTo:"engage",badgeStyle:!1},statProps:WGn(s$n(y),s$n(g)),children:(0,Ze.jsxs)(l$n,{readOnly:!N.learn.find(e=>e.startsWith("updateCourseProgress")),children:[!o&&(0,Ze.jsx)(hVn,{contentSection:"Engage"}),(0,Ze.jsxs)(o$n,{access:o,children:[c&&(0,Ze.jsx)(Gzn,{sectionTitle:"Continue",highlightColor:"secondary",items:[],learnAccess:o,loading:!0,column:!0,noBackground:!0,noHeader:!0}),y.length>0&&p&&(0,Ze.jsx)(Gzn,{sectionTitle:"Continue",highlightColor:"secondary",items:y,learnAccess:o,column:!0,noBackground:!0,noHeader:!0})||!c&&(0,Ze.jsx)(PVn,{})]})]})}),(0,Ze.jsx)(ze.x0,{darkMode:!1,layout:{reverse:!1,header:"center"},circleProps:{accentColor:"tertiary",icon:"pencil-alt",title:r.formatMessage({id:"pages.home.dashboard.governance"}),linkTo:"governance",badgeStyle:!1},statProps:{},children:(0,Ze.jsxs)(l$n,{readOnly:!N.governance.find(e=>e.startsWith("editLegislation"))&&!N.document.find(e=>e.startsWith("create")),children:[!l&&(0,Ze.jsx)(hVn,{contentSection:"Governance"}),(0,Ze.jsxs)(o$n,{access:l,children:[d&&(0,Ze.jsx)(Ze.Fragment,{children:new Array(5).fill(0).map((e,n)=>n).map(e=>(0,Ze.jsx)(t$n,{loading:d},e))}),!d&&h&&h.map(e=>(0,Ze.jsx)(r$n,{id:e.id,title:e.title,alertText:"has an expired review date.",date:Wt()().subtract(1,"day")},e.id)),!d&&v&&v.map(e=>(0,Ze.jsx)(r$n,{id:e.id,title:e.title,alertText:"is approaching its review date.",date:Wt()().add(1,"day")},e.id)),!d&&x&&x.map(e=>(0,Ze.jsx)(r$n,{id:e.id,title:e.title,alertText:"has been flagged as changed by the Rio team."},e.id)),!d&&b&&b.map(e=>(0,Ze.jsx)(a$n,{id:e.id,reviewDate:e.reviewDate,fileName:e.fileName},e.id)),!d&&T&&T.map(e=>(0,Ze.jsx)(i$n,{id:e.id,activity:e.activity,reviewDate:e.reviewDate,alertText:"has an expired review date."},document.id)),!d&&O&&O.map(e=>(0,Ze.jsx)(i$n,{id:e.id,activity:e.activity,reviewDate:e.reviewDate,alertText:"is approaching its review date."},document.id)),!d&&D&&(0,Ze.jsx)(PVn,{})]})]})}),(0,Ze.jsx)(ze.x0,{darkMode:!1,layout:{reverse:!1,header:"center"},circleProps:{accentColor:"quaternary",icon:"chart-area",title:r.formatMessage({id:"pages.home.dashboard.analyse"}),linkTo:"reporting",badgeStyle:!1},statProps:(A=k,{left:{name:"Last Upload",value:(0,Ze.jsx)($Gn,{children:JGn(A)}),alert:qGn(A),new:!1}}),children:(0,Ze.jsxs)(l$n,{readOnly:!N.data.find(e=>e.startsWith("createImportBatch")),children:[!s&&(0,Ze.jsx)(hVn,{contentSection:"Data"}),(0,Ze.jsxs)(o$n,{access:s,children:[u&&new Array(5).fill(0).map((e,n)=>n).map(e=>(0,Ze.jsx)(e$n,{loading:t},e)),!u&&j&&(0,Ze.jsx)(e$n,{goTo:"data/Waste/uploads",title:"It has been one month since you last uploaded waste data",category:"Action",icon:"trash",iconColor:"quaternary",buttonTitle:"Update your data"}),!u&&(null!=C&&C.length?C.map(e=>{const n="".concat(e.name," between ").concat(Wt()(e.startDate).utc().format("DD/MM/YYYY")," and ").concat(Wt()(e.endDate).utc().format("DD/MM/YYYY"));return(0,Ze.jsx)(e$n,{goTo:DGn[e.topic.utility],title:n,buttonTitle:"Review performance",icon:wGn[e.topic.utility],iconColor:"quaternary",category:(0,Ze.jsx)(KGn,{to:"governance/targets#".concat(e.id),smooth:!0,children:"Go to target"}),status:(0,Ze.jsx)(zjn,MGn({},e))},e.id)}):!!N.data.find(e=>e.startsWith("createTarget"))&&(0,Ze.jsx)(e$n,{goTo:"governance/targets?showCreateModal=1",title:"You don't have any targets yet - let's create them.",buttonTitle:"Create target",icon:"subscript",iconColor:"quaternary",category:"Action"})),!u&&S&&(0,Ze.jsx)(n$n,{}),!u&&0===(null==C?void 0:C.length)&&!N.data.find(e=>e.startsWith("createTarget"))&&!j&&!S&&(0,Ze.jsx)(PVn,{})]})]})})]});var A});var d$n;function u$n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function p$n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u$n(Object(t),!0).forEach(function(n){m$n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u$n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function m$n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const f$n=e=>{const n=rc(),{token:t}=at(),a=Pu(),r=a?a.id:null,i=t?t.sub:null,o=a?{hasLearnAccess:a.accessControls.learn,hasComplyAccess:a.accessControls.comply,hasDataAccess:a.accessControls.data}:{hasLearnAccess:!0,hasComplyAccess:!0,hasDataAccess:!0},{data:l,loading:s}=(0,h.IT)(tx,{variables:{pageNumber:1,userId:i,accountId:r}}),{data:c,loading:d}=(0,h.IT)(Wu,{variables:{accountId:r},fetchPolicy:"network-only"}),u=n.governance.find(e=>e.startsWith("getAspect")),{data:p,loading:m}=(0,h.IT)(Ju,{skip:!u,variables:{accountId:r},fetchPolicy:"network-only"}),f=n.governance.find(e=>e.startsWith("getLegislation")),{data:y,loading:g}=(0,h.IT)(qu,{skip:!f,variables:{accountId:r},fetchPolicy:"network-only"}),b=((e,n,t)=>{if(!e)return;const a=p$n(p$n({},e),{},{getAspectsAlerts:{expired:[],approaching:[]},getLegislationAlerts:{expired:[],approaching:[],flagged:[]}});return n&&(a.getAspectsAlerts=n.getAspectsAlerts),t&&(a.getLegislationAlerts=t.getLegislationAlerts),a})(c,p,y),{data:v,loading:x}=(0,h.IT)(Yu,{variables:{accId:r,wasteBatchPage:1}}),T=(0,Ge.default)(ze.fI)(d$n||(d$n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n    margin: 0 auto 10px;\n    justify-content: center;\n    display: flex;\n    color: rgb(136, 136, 136);\n  "])));return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(cNe,{id:"home",padding:"16px"}),(0,Ze.jsx)(ze.fI,{name:"home-container",container:!0,distribution:"center",itemAlign:"top",fullHeight:!1,children:(0,Ze.jsx)(cVn,{message:e.intl.formatMessage({id:"pages.home.welcome"})})}),(0,Ze.jsx)(T,{children:e.intl.formatMessage({id:"pages.home.guidanceText"})}),(0,Ze.jsx)(c$n,{access:o,loading:{learnLoading:s||!l,complyLoading:d||m||g||!b,analyseLoading:x||!v},data:{learnData:l,complyData:b,analyseData:v},accountId:r})]})};f$n.propTypes={};const y$n=(0,Ye.Ay)(f$n);function g$n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function b$n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g$n(Object(t),!0).forEach(function(n){h$n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g$n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function h$n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function v$n(e){var n;let{onComplete:t,onError:a,onDismiss:r,document:i}=e;const o=rt(),{token:l}=at(),[s,c]=(0,g.useState)(i),[d,{loading:u}]=(0,Ot.n)(e3),p=null==s||null===(n=s.tags)||void 0===n?void 0:n.map(e=>e.value||e.id);return(0,Ze.jsx)(lsn,{heading:"Edit Document",onDismiss:r,submitButtonTitle:u?"Updating...":"Update",onSubmit:async()=>{try{var e;const n=b$n(b$n({},s),{},{notes:null===(e=s.notes)||void 0===e?void 0:e.trim(),tags:p,accountId:o,userId:l.sub,fileName:i.fileName});await d({variables:n}),t(n)}catch(e){a(new Error("Document ".concat(i.fileName," failed to update")))}},children:(0,Ze.jsx)(Qln,{document:s,onChange:c,isSubmitting:u})})}const x$n=[{id:"2403396f-fbc5-4a83-8a93-b0faeb517014",title:"All Documents",filterValue:"",link:"all",icon:"folder",libraries:[Vt.zM.Waste,Vt.zM.Water,Vt.zM.Electricity,Vt.zM.Gas,Vt.zM.Governance,Vt.zM.Transport]},{id:"0d8c4d5d-958b-4231-98d3-28465b93d918",title:"Consignment Notes (EA)",filterValue:"Consignment Note (EA)",link:"ConsignmentNoteEA",icon:"folder",libraries:[Vt.zM.Waste]},{id:"cd03cc92-9651-4509-82a5-7758ddcc6814",title:"Consignment Notes (SEPA)",filterValue:"Consignment Note (SEPA)",link:"ConsignmentNoteSEPA",icon:"folder",libraries:[Vt.zM.Waste]},{id:"24991346-1812-412e-a0b3-7cbb5ff2add7",title:"Evidence",filterValue:"Evidence Reference",link:"Evidence",icon:"folder",libraries:[Vt.zM.Waste]},{id:"59e823b4-9261-40e7-b702-5f59846fda9b",title:"Invoices",filterValue:"Invoice Number",link:"Invoices",icon:"folder",libraries:[Vt.zM.Waste,Vt.zM.Transport]},{id:"d37ab75f-3c10-4159-b8e2-458628ffb26a",title:"Sales Orders",filterValue:"Sales Order",link:"SalesOrders",icon:"folder",libraries:[Vt.zM.Waste]},{id:"b9dfbafd-afea-4eee-9a87-487820252692",title:"Waste Carrier Licences",filterValue:"Waste Carrier Licence",link:"Licences",icon:"folder",libraries:[Vt.zM.Waste]},{id:"59d1a3b6-d258-455a-b066-4d1bd093ff8c",title:"Waste Permits",filterValue:"Waste Permit",link:"Permits",icon:"folder",libraries:[Vt.zM.Waste]},{id:"1832c095-6713-4d62-a966-f237400bdf5c",title:"Waste Transfer Notes",filterValue:"Waste Transfer Note",link:"WasteTransferNotes",icon:"folder",libraries:[Vt.zM.Waste]},{id:"e8ad418f-9b3a-4763-95d7-6c9e90215b13",title:"Waste Contractor Reports",filterValue:"Waste Contractor Report",link:"WasteContractorReports",icon:"folder",libraries:[Vt.zM.Waste]},{id:"05c8791c-5b2a-4475-b6f8-dd642e62615d",title:"Travel Receipts",filterValue:"Travel Receipt",link:"TravelReceipts",icon:"folder",libraries:[Vt.zM.Transport]},{id:"9b8084ee-b631-4be6-8d3c-859ebebe970d",title:"Audit Reports",filterValue:"Audit Report",link:"AuditReports",icon:"folder",libraries:[Vt.zM.Governance]},{id:"f3d665c3-e149-4c07-8834-aa67666a347b",title:"Aspects and Impacts",filterValue:"Aspects and Impacts",link:"AspectsAndImpacts",icon:"folder",libraries:[Vt.zM.Governance]},{id:"7c786c9c-bb7b-45c5-90d6-01b44c8f8c18",title:"Certificates",filterValue:"Certificate",link:"Certificates",icon:"folder",libraries:[Vt.zM.Governance]},{id:"ed23e08a-4202-4100-a6bc-b3e7566d3bae",title:"Communications",filterValue:"Communications",link:"Communications",icon:"folder",libraries:[Vt.zM.Governance]},{id:"73c2c1f3-8bee-4af6-844c-a220ce211d83",title:"Legislation",filterValue:"Legislation",link:"Legislation",icon:"folder",libraries:[Vt.zM.Governance]},{id:"8a49a5f3-2e9f-4763-93b2-5d9e9ef5daa6",title:"Management Systems",filterValue:"Management Systems",link:"ManagementSystems",icon:"folder",libraries:[Vt.zM.Governance]},{id:"24d74b26-1706-448f-9de7-618a38cc164c",title:"Policies",filterValue:"Policies",link:"Policies",icon:"folder",libraries:[Vt.zM.Governance]},{id:"a308e909-204b-4699-bfbe-307b26826c75",title:"Reporting Frameworks",filterValue:"Reporting Frameworks",link:"ReportingFrameworks",icon:"folder",libraries:[Vt.zM.Governance]},{id:"561f13f4-b6f8-448c-baeb-59db3c0de822",title:"Standards",filterValue:"Standards",link:"Standards",icon:"folder",libraries:[Vt.zM.Governance]},{id:"33aa1592-e850-49ce-88eb-f633d1d7f5b4",title:"Training",filterValue:"Training",link:"Training",icon:"folder",libraries:[Vt.zM.Governance]},{id:"d592e948-7460-44ab-acdc-6d91d1a6769a",title:"Bills",filterValue:"Bill",link:"Bills",icon:"folder",libraries:[Vt.zM.Electricity,Vt.zM.Gas,Vt.zM.Water]},{id:"ee557b4b-35ee-4544-85a5-e1cfea25360c",title:"Licences and Permits",filterValue:"Licences and Permits",link:"LicencesAndPermits",icon:"folder",libraries:[Vt.zM.Water,Vt.zM.Transport,Vt.zM.Governance]},{id:"292a3f37-c772-4dce-a457-11def3bcb5eb",title:"Meter Readings",filterValue:"Meter Readings",link:"MeterReadings",icon:"folder",libraries:[Vt.zM.Electricity,Vt.zM.Gas,Vt.zM.Water]},{id:"74edb971-9146-44ae-b308-e4bb8b600524",title:"Supplier Agreements",filterValue:"Supplier Agreement",link:"SupplierAgreements",icon:"folder",libraries:[Vt.zM.Electricity,Vt.zM.Gas,Vt.zM.Water]},{id:"3253c789-325c-4d98-820d-2bff4d8fefb3",title:Ma.DocumentCategory.LCAReports,filterValue:Ma.DocumentCategory.LCAReports,link:"LCAReports",icon:"folder",libraries:[Vt.zM.Governance]},{id:"3b8bee92-ed8c-4ae4-9cbf-819be4649ff9",title:"Others",filterValue:"Other Reference",link:"Others",icon:"folder",libraries:[Vt.zM.Waste,Vt.zM.Electricity,Vt.zM.Gas,Vt.zM.Water,Vt.zM.Transport,Vt.zM.Governance]}];var T$n,O$n,k$n,j$n;function C$n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const S$n=(0,Ge.default)(ze.fv)(T$n||(T$n=C$n(["\n  opacity: ",";\n  border: 1px solid ",";\n  background-color: ",";\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n  position: relative;\n  padding-right: 16px;\n"])),e=>e.disabled?"0.5":"1",e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white),N$n=Ge.default.div(O$n||(O$n=C$n(["\n  display: flex;\n  align-items: center;\n  margin: "," 0;\n"])),e=>e.theme.geometry.xs.spacing),w$n=(0,Ge.default)(ze.GQ)(k$n||(k$n=C$n(["\n  display: inline-flex;\n  flex: 0 0 auto;\n  background: ",";\n"])),e=>{let{theme:n}=e;return n.colors.basic.white}),D$n=Ge.default.div(j$n||(j$n=C$n(["\n  padding: 0 ",";\n"])),e=>e.theme.geometry.sm.spacing);function A$n(e){let{folder:n}=e;return(0,Ze.jsx)(S$n,{disabled:n.disabled,container:!0,item:!0,children:(0,Ze.jsxs)(N$n,{children:[(0,Ze.jsx)(D$n,{children:(0,Ze.jsx)(w$n,{height:"40px",size:"md",icon:n.icon.name,iconColor:n.icon.color,circleColor:n.icon.color})}),(0,Ze.jsx)(ze.DZ,{size:"lg",children:n.name})]})})}var R$n,P$n,L$n,I$n;function E$n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _$n=(0,f.styled)(f.Text)(R$n||(R$n=E$n(["\n  color: ",";\n"])),e=>e.theme.sys.color.onSurface),F$n=(0,f.styled)("div")(P$n||(P$n=E$n(["\n  display: flex;\n  width: 300px;\n  height: 66px;\n  padding: 12px;\n  align-items: center;\n  justify-content: center;\n  border-radius: 16px;\n  border: 1px solid ",";\n  background: ",";\n  box-shadow: ",";\n  cursor: pointer;\n"])),e=>e.theme.sys.color.outlineVariant,e=>e.theme.sys.color.surface,e=>e.theme.sys.elevation[1]),B$n=(0,f.styled)("div")(L$n||(L$n=E$n(["\n  display: flex;\n  height: 40px;\n  flex-direction: column;\n  justify-content: center;\n  flex: 1 0 0;\n\n  p {\n    margin: 0px;\n  }\n"]))),U$n={quaternary:"#08EBA7",tertiary:"#001AFF"},M$n=(0,f.styled)("div")(I$n||(I$n=E$n(["\n  display: flex;\n  padding: 0px 8px;\n  svg {\n    color: ",";\n  }\n"])),e=>U$n[e.color]);function V$n(e){let{folder:n}=e;return(0,Ze.jsxs)(F$n,{disabled:n.disabled,children:[(0,Ze.jsx)(M$n,{color:n.icon.color,children:(0,Ze.jsx)(f.Icons.FolderOutlined,{})}),(0,Ze.jsx)(B$n,{children:(0,Ze.jsx)(_$n,{typescale:"body",size:"medium",children:n.name})})]})}const z$n=e=>{let{children:n}=e;return(0,Ze.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 300px)",gridTemplateRows:"repeat(12, 66px)",gridRowGap:"32px",gridColumnGap:"24px",paddingBottom:"12px"},children:n})};function G$n(e){let{folders:n}=e;const t=rl()?V$n:A$n;return n&&n.length?(0,Ze.jsx)(z$n,{children:n.map(e=>e.disabled?(0,Ze.jsx)(t,{folder:e},e.id):(0,Ze.jsx)(p.Link,{to:e.disabled?"#":e.url,children:(0,Ze.jsx)(t,{folder:e})},e.id))}):null}var $$n,W$n,q$n;function J$n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Y$n=(0,D.J1)($$n||($$n=J$n(["\n  mutation GetZippedFileExport($files: [NamedEntityInput!]!, $accountId: ID!) {\n    getZippedFileExport(input: { files: $files, accountId: $accountId })\n  }\n"]))),H$n=(0,D.J1)(W$n||(W$n=J$n(["\n  query GetDocumentsPageFilter($accountId: ID!, $field: String!, $library: String, $category: String) {\n    getDocumentsPageFilter(accountId: $accountId, field: $field, library: $library, category: $category) {\n      label\n      value\n    }\n  }\n"]))),K$n=(0,D.J1)(q$n||(q$n=J$n(["\n  query GetDocumentsPage(\n    $accountId: ID!\n    $offset: Int = 0\n    $limit: Int = 25\n    $sort: [SortCommand!] = []\n    $filters: Filters = {}\n  ) {\n    getDocumentsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n      totalRows\n      rows {\n        ...DocumentFields\n      }\n    }\n  }\n  ","\n"])),L5);function Q$n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Z$n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function X$n(e){const{data:{antivirusStatus:n}={}}=e,t=(0,Ge.useTheme)();return(0,Ze.jsx)(ze.In,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Q$n(Object(t),!0).forEach(function(n){Z$n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q$n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({name:"document-row__antivirus",title:n,size:"lg"},((e,n)=>({INFECTED:{icon:"exclamation-triangle",color:n.colors.danger.normal.background},ERROR:{icon:"exclamation-circle",color:n.colors.warning.normal.background},PENDING:{icon:"exclamation-circle",color:n.colors.text.normal.background},CLEAN:{icon:"check",color:n.colors.success.normal.background}}[e]||{}))(n,t)))}var eWn,nWn,tWn,aWn;function rWn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const iWn=Ge.default.span(eWn||(eWn=rWn(["\n  height: 25px;\n  width: 25px;\n  border-radius: 50%;\n  display: flex;\n"])));function oWn(e){const n=(0,Ge.useTheme)(),{data:{reviewDateStatus:t}={}}=e;return t?((e,n)=>{const t=(0,Ge.default)(iWn)(nWn||(nWn=rWn(["\n    background-color: ",";\n  "])),n.colors.danger.dark.background),a=(0,Ge.default)(iWn)(tWn||(tWn=rWn(["\n    background-color: ",";\n  "])),n.colors.success.dark.background),r=(0,Ge.default)(iWn)(aWn||(aWn=rWn(["\n    background-color: ",";\n  "])),n.colors.warning.dark.background);switch(e){case"Within date":return(0,Ze.jsx)(a,{});case"Due for review":return(0,Ze.jsx)(r,{});case"Overdue":return(0,Ze.jsx)(t,{});default:return null}})(t,n):null}function lWn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function sWn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?lWn(Object(t),!0).forEach(function(n){cWn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):lWn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function cWn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function dWn(e){let{fetchRows:n,accountId:t,setGridApi:a,library:r,category:i}=e;const o=(0,N.m)(),l=(0,m.Zp)(),s=Dd(),{showNotification:c}=vt(),d=(0,g.useCallback)(async e=>{try{const{data:{getDocumentsPageFilter:n}}=await o.query({query:H$n,variables:{accountId:t,field:e.colDef.colId,library:r||null,category:i||null}});e.success(n.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){c("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning"),de.Cp(n)}},[t,o,c,r,i]),u=(0,g.useMemo)(()=>({async getRows(e){try{const{startRow:a,sortModel:r,filterModel:i}=e.request,o={accountId:t,offset:a,limit:25,sort:oa(r),filters:ia(i)},{rows:l,totalRows:s}=await n(o);e.success({rowData:l,rowCount:s})}catch(n){de.Cp(n),e.fail()}}}),[t,n]),p=(0,g.useMemo)(()=>({pagination:!0,paginationPageSize:25,paginationPageSizeSelector:!1,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,wrapText:!0,autoHeight:!0,cellDataType:!1},columnDefs:[{headerName:"Export",field:"export",minWidth:60,checkboxSelection:!0,filter:!1,sortable:!1},{colId:"fileName",headerName:"File Name",filter:"agTextColumnFilter",filterParams:sWn({},{buttons:["reset","apply"],closeOnApply:!0}),field:"fileName"},{colId:"reviewDateStatus",headerName:"Review Date Status",field:"reviewDateStatus",filter:"agSetColumnFilter",cellStyle:{display:"flex",justifyContent:"center",alignItems:"center"},cellRenderer:"reviewStatus",filterParams:{values:d,valueFormatter:la}},{colId:"reviewDate",headerName:"Review Date",field:"reviewDate",filter:"agDateColumnFilter",filterParams:sWn({},{buttons:["reset","apply"],closeOnApply:!0}),valueFormatter:e=>{let{value:n}=e;return Ht(n)}},{colId:"referenceId",headerName:"ID",field:"referenceId",filter:"agTextColumnFilter",filterParams:sWn({},{buttons:["reset","apply"],closeOnApply:!0})},{colId:"createdByName",headerName:"Uploaded By",field:"createdByName",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la}},{colId:"createdAt",headerName:"Uploaded On",field:"createdAt",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},filterParams:sWn({},{buttons:["reset","apply"],closeOnApply:!0}),initialSort:"desc"},{colId:"updatedAt",headerName:"Last Updated On",field:"updatedAt",filter:"agDateColumnFilter",filterParams:sWn({},{buttons:["reset","apply"],closeOnApply:!0}),valueFormatter:e=>{let{value:n}=e;return Ht(n)}},{colId:"updatedByName",headerName:"Updated By",field:"updatedByName",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la}},{colId:"antivirusStatus",headerName:"Antivirus Status",field:"antivirusStatus",cellRenderer:"antivirusStatus",cellStyle:{textAlign:"center",verticalAlign:"middle"},filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la}},{colId:"category",headerName:"Category",field:"category",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la}},{colId:"library",headerName:"Library",field:"library",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la}},{colId:"supplierName",headerName:"Supplier/Carrier",field:"supplierName",filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la}},{colId:"tags",headerName:"Tags",field:"tags",valueFormatter:e=>{let{value:n}=e;return n?n.map(e=>e.tagName).join(", "):""},filter:"agSetColumnFilter",filterParams:{values:d,valueFormatter:la},sortable:!1},{colId:"notes",headerName:"Notes",field:"notes",filter:"agTextColumnFilter",autoHeight:!1,filterParams:sWn({},{buttons:["reset","apply"],closeOnApply:!0}),valueFormatter:e=>{let{value:n}=e;return n?(0,zt.truncate)(n,{length:45}):""},sortable:!1},{colId:"notes1",headerName:"Notes1",field:"notes1",filter:!0,filterParams:sWn(sWn({},{buttons:["reset","apply"],closeOnApply:!0}),{},{values:["Bill","Sales Order","Licences and Permits"]})}],rowStyle:{width:"100%",display:"flex",alignItems:"center"},suppressRowClickSelection:!0,rowSelection:"multiple",isRowSelectable:e=>!!e.data&&e.data.antivirusStatus===gr&&e.data.source===br}),[d]);(0,g.useEffect)(()=>{if(s.api&&i){const n=[JSON.stringify({__typename:"FilterData",label:i,value:i})];try{var e;null===(e=s.api.getColumnFilterInstance("category"))||void 0===e||e.then(e=>{e.setModel({values:n}).then(()=>{s.api.onFilterChanged("columnFilter")})})}catch(e){c("Couldn't set filter for category \"".concat(i,'"'),"warning")}}},[s,s.api,i,c]);const f=(0,g.useMemo)(()=>({antivirusStatus:X$n,reviewStatus:oWn}),[]),y=(0,g.useCallback)(e=>{const n=r&&i?"/documents/".concat(r,"/").concat(i):"/documents/all";l("".concat(n,"/").concat(e.data.id))},[i,r,l]),b=(0,g.useCallback)(e=>{s.onGridReady(e),a({api:e.api,datasource:u})},[s,u,a]);return(0,Ze.jsx)("div",{className:"ag-theme-alpine",style:{height:"100vh"},children:(0,Ze.jsx)(Vw.W6,sWn({cacheBlockSize:p.paginationPageSize,components:f,onColumnVisible:s.onSaveGridColumnState,onColumnPinned:s.onSaveGridColumnState,onColumnResized:s.onSaveGridColumnState,onColumnMoved:s.onSaveGridColumnState,onColumnRowGroupChanged:s.onSaveGridColumnState,onColumnValueChanged:s.onSaveGridColumnState,onColumnPivotChanged:s.onSaveGridColumnState,onCellClicked:y,serverSideDatasource:u,onGridReady:b},p),"".concat(i,"-").concat(r))})}var uWn,pWn,mWn,fWn;function yWn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const gWn=(0,Ge.default)(ze.fI)(uWn||(uWn=yWn(["\n  flex: 0;\n  margin-bottom: ",";\n  padding-right: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.dark.background),bWn=(0,Ge.default)(ze.vj)(pWn||(pWn=yWn(["\n  flex: 1 1 auto;\n  form > div {\n    background: none;\n    border: 0;\n    border-radius: 0;\n  }\n"]))),hWn=((0,Ge.default)(ze.Yq)(mWn||(mWn=yWn(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.md.spacing),(0,Ge.default)(Tn)(fWn||(fWn=yWn(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),e=>{const{search:n,onSearchValueChange:t,onSearch:a,placeholder:r="Search Documents..."}=e;return(0,Ze.jsx)(gWn,{container:!0,item:!0,itemAlign:"center",children:(0,Ze.jsx)(bWn,{name:"DocumentFiles__Search",placeholder:r,value:n,onChange:t,onSearch:a,hideButton:!0})})});var vWn,xWn;function TWn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function OWn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function kWn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const jWn=(0,Ge.default)(ze.fv)(vWn||(vWn=kWn(["\n  overflow: auto;\n  padding: ",";\n  padding-top: ",";\n"])),e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.lg.spacing),CWn=Ge.default.hr(xWn||(xWn=kWn(["\n  height: 1px;\n  background-color: ",";\n  margin: 16px 0;\n"])),e=>e.theme.colors.overlay.light.text);function SWn(e){let{isManagementSystem:n,library:t,category:a,folders:r=[],documentsExist:i=!1,searchValue:o="",searchPlaceholder:l,loading:s,banners:c=[],error:d,retry:u,onSearch:p=()=>{},setGridApi:m=()=>{},showGrid:f,managementSystemId:y,managementSystemChapterId:g}=e;const b=(0,N.m)(),h=rt(),v=!s&&!r.length&&!i&&o;return(0,Ze.jsxs)(jWn,{container:!0,item:!0,children:[!f&&(0,Ze.jsx)(hWn,{search:o,onSearchValueChange:e=>{let{target:{value:n}}=e;p(n)},placeholder:l}),(0,Ze.jsx)(cNe,{id:"documentBanners",staticBanners:c}),d?(0,Ze.jsx)(ub,{name:"Something went wrong",error:d,retry:u}):s?(0,Ze.jsx)(Vg,{name:"DocumentFiles__Loading"}):v?(0,Ze.jsx)(nv,{id:"documents",title:"No Results found for ".concat(o||"your search.")}):(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(G$n,{folders:r}),i&&!!r.length&&(o||y)&&(0,Ze.jsx)(CWn,{}),(i&&(o||n)||f)&&(0,Ze.jsx)(dWn,{library:t,category:a,accountId:h,setGridApi:m,fetchRows:async e=>{const n=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?TWn(Object(t),!0).forEach(function(n){OWn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):TWn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},e);n.filters||(n.filters={});const r=T3(o,t,a,y,g),{filters:i}=n;r.set&&(null!=i&&i.set||(i.set=[]),i.set.push(...r.set)),r.text&&(null!=i&&i.text||(i.text=[]),i.text.push(...r.text));const{data:{getDocumentsPage:{totalRows:l,rows:s}}}=await b.query({query:K$n,variables:n,fetchPolicy:"network-only"});return{rows:s,totalRows:l}}},h)]})]})}const NWn=e=>{let{gridApi:n,accountId:t}=e;const{showNotification:a}=vt(),r=(null==n?void 0:n.api)||n,[i]=(0,Ot.n)(Y$n,{onCompleted:()=>{a("Your documents have been exported. Note: Web Links or Dashboard References are skipped.","success")},onError:()=>{a("Something went wrong. Try reducing the number of documents in export.","danger")}}),o=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=[];null==r||r.forEachNode(t=>{e&&!t.isSelected()||n.push(t.data)});const o=n.filter(e=>e.antivirusStatus===gr&&e.source===br).map(e=>({id:e.id,name:e.fileName}));if(o.length){a("Starting document export. For large exports, please wait up to 30 seconds.","success");const{data:e}=await i({variables:{files:o,accountId:t}});null!=e&&e.getZippedFileExport&&window.open(e.getZippedFileExport)}else a("Your selection only contains Web Links and/or Dashboard References. These can not be exported.","danger")};return(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,children:[(0,Ze.jsx)(ze.fv,{span:6,children:(0,Ze.jsx)(ze.$n,{name:"DocumentFiles__Button--export",color:"secondary",onClick:()=>o(!0),disabled:!1,children:"Export Selected"})}),(0,Ze.jsx)(ze.fv,{span:6,children:(0,Ze.jsx)(ze.$n,{name:"DocumentFiles__Button--export",color:"secondary",onClick:()=>o(),children:"Export Page"})})]})};function wWn(e,n){var t;const{data:a,loading:r,error:i,refetch:o}=(0,h.IT)(o3,{variables:e,skip:n,fetchPolicy:"cache-and-network",returnPartialData:!0,partialRefetch:!0,notifyOnNetworkStatusChange:!0,errorPolicy:"all"});return{documentsExist:!(null==a||null===(t=a.getDocumentsPage)||void 0===t||!t.totalRows),error:i,loading:r,refetch:()=>o(e)}}const DWn=e=>{var n;const t=(0,eg.A)(),{documentFolders:a}=e,r=rt(),{library:i,type:o}=(0,m.g)(),[l,s]=(0,g.useState)(),c=Td(),d=!!rc().document.find(e=>e.startsWith("create")),u=i&&o&&"all"!==o?a.find(e=>e.link===o):null,[p,f]=(0,g.useState)(!1),[y,b]=(0,kd.useQueryParam)("search",kd.StringParam),{showNotification:h}=vt(),v=P3.filter(e=>!e.accessControlIndexer||Gt().get(c,e.accessControlIndexer)),{documentsExist:x,error:T,loading:O,refetch:k}=wWn({accountId:r,filters:T3(y||"")},!y),j=e=>{f(!1),setTimeout(()=>{k()},5e3),h(e,"success")};return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsx)(ige,{name:"DocumentFiles",title:"Documents",breadcrumbs:(()=>{const e=[{title:t.formatMessage({id:"pages.documents.breadcrumbs.one"}),to:"/documents"}];return i?e.push({title:Gt().capitalize(i),to:"/documents/".concat(i)}):e.push({title:"All",to:"/documents/all"}),e})(),icon:"file-alt",iconColor:"quaternary",isDropdown:!0,dropdownItems:i?a.filter(e=>e.libraries.includes(i.toUpperCase())):v,dropdownDefault:u?u.title:"All Documents",children:(0,Ze.jsxs)(HF,{container:!0,item:!0,distribution:"center",vdistribution:"center",itemAlign:"center",children:[(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(SD,{gridApi:null==l?void 0:l.api})}),d&&(0,Ze.jsx)(ze.fv,{span:6,children:(0,Ze.jsx)(NWn,{gridApi:l,accountId:r})}),d&&(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(ze.$n,{name:"DocumentFiles__Button--upload",color:"primary",onClick:()=>f(!0),children:"+ Upload Documents"})})]})}),(0,Ze.jsx)(SWn,{showGrid:!0,library:i,category:null==u?void 0:u.filterValue,setGridApi:s,searchValue:y,onSearch:b,banners:[],documentsExist:x,error:T,retry:k,loading:O&&!x}),p&&(0,Ze.jsx)(Fsn,{predefinedValues:{library:null==i?void 0:i.toUpperCase(),category:null===(n=x$n.find(e=>e.link===o))||void 0===n?void 0:n.filterValue},onDismiss:()=>{f(!1)},onComplete:j,onUpload:j,onError:e=>{f(!1),h(e.message,"danger")}})]})},AWn=["name","fileName","size"];var RWn;function PWn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function LWn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const IWn=(0,Ge.default)(ze.In)(RWn||(RWn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  color: ",";\n  margin-right: ",";\n"])),e=>e.theme.colors.text.normal.background,e=>e.theme.geometry.md.spacing),EWn=e=>{let{name:n,fileName:t,size:a="2x"}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,AWn);const i=Mo(t);return(0,Ze.jsx)(IWn,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?PWn(Object(t),!0).forEach(function(n){LWn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):PWn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({name:"".concat(n,"__FileIcon"),size:a,icon:i},r))};EWn.propTypes={name:Ke().string.isRequired,size:Ke().string,fileName:Ke().string};const _Wn=EWn;var FWn,BWn,UWn,MWn,VWn,zWn,GWn,$Wn,WWn,qWn,JWn,YWn,HWn;function KWn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function QWn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?KWn(Object(t),!0).forEach(function(n){ZWn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):KWn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ZWn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function XWn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const eqn=(0,Ge.default)(ze.fv)(FWn||(FWn=XWn(["\n  overflow: hidden;\n"]))),nqn=(0,Ge.default)(ze.fv)(BWn||(BWn=XWn(["\n  overflow: auto;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),tqn=(0,Ge.default)(ze.fI)(UWn||(UWn=XWn(["\n  background-color: ",";\n"])),e=>e.theme.colors.basic.white),aqn=(0,Ge.default)(ze.fI)(MWn||(MWn=XWn(["\n  flex: 0 0 auto;\n  padding-bottom: ",";\n  padding-top: 0;\n"])),e=>e.theme.geometry.md.spacing),rqn=(0,Ge.default)(_Wn)(VWn||(VWn=XWn(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.sm.spacing),iqn=Ge.default.div(zWn||(zWn=XWn(["\n  flex: 0 0 auto;\n"]))),oqn=(0,Ge.default)(ze.$n)(GWn||(GWn=XWn(["\n  margin-left: ",";\n  border: 1px solid ",";\n  &:hover {\n    cursor: ",";\n  }\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.neutral.dark.background,e=>e.disabled?"not-allowed":"pointer"),lqn=(0,Ge.default)(ze.fI)($Wn||($Wn=XWn(["\n  padding: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.overlay.normal.background),sqn=(0,Ge.default)(ze.DZ)(WWn||(WWn=XWn(["\n  display: flex;\n  align-items: center;\n"]))),cqn=(0,Ge.default)(ze.fI)(qWn||(qWn=XWn(["\n  padding-right: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),dqn=Ge.default.span(JWn||(JWn=XWn(["\n  margin: 0 ",";\n"])),e=>e.theme.geometry.xs.spacing),uqn=Ge.default.div(YWn||(YWn=XWn(["\n  display: flex;\n  flex-direction: column;\n  flex: 0 0 auto;\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),pqn=(0,Ge.default)(ze.EY)(HWn||(HWn=XWn(["\n  max-width: 50%;\n"]))),mqn=e=>e.some(e=>"NotFoundException"===e.errorType),fqn=function(){var e;const{state:n}=(0,m.zy)(),{taskId:t}=n||{taskId:null},{projectId:a}=n||{projectId:null},r=(0,m.Zp)(),i=rc(),{id:o,library:l,type:s}=(0,m.g)(),{showNotification:c}=vt(),[d,u]=(0,g.useState)(!1),[p,f]=(0,g.useState)(!1),y=rt(),{token:b}=at(),[v]=(0,Ot.n)(t3),x={id:o,accountId:y},{data:T,error:O,loading:k,refetch:j}=(0,h.IT)(n3,{variables:x,errorPolicy:"all",fetchPolicy:"no-cache"}),C=T&&T.getDocumentRecordById?T.getDocumentRecordById:{},S=C.antivirusStatus===gr,w=!i.document.find(e=>e.startsWith("create")),D=((e,n,t)=>{var a,r;return!(null===(a=e.document)||void 0===a||!a.find(e=>(null==e?void 0:e.startsWith(n))&&!e.endsWith("Own")))||(null===(r=e.document)||void 0===r?void 0:r.includes("".concat(n,"Own")))&&t})(i,"delete",(null==C||null===(e=C.createdBy)||void 0===e?void 0:e.id)===b.sub),A=(0,N.m)(),R=Sf({pageSize:Qa}),P=zt.keyBy(R,"id")[C.supplierId];return(0,Ze.jsxs)(eqn,{container:!0,item:!0,fullHeight:!0,name:"DocumentFile",children:[(0,Ze.jsx)(ige,{name:"DocumentFile",title:"".concat(C.category||(n?zt.startCase(n.documentType):zt.startCase(s))," Document"),breadcrumbs:(()=>{const e=[{title:"Documents",to:"/documents"}];return l?(e.push({title:"".concat(zt.capitalize(l)),to:"/documents/".concat(l)}),e.push({title:"".concat(zt.startCase(s)),to:"/documents/".concat(l,"/").concat(s)})):e.push({title:"All",to:"/documents/all"}),e})(),icon:"file-alt",iconColor:x3(l),isDropdown:!1,dropdownDefault:null,dropdownItems:[],children:(0,Ze.jsx)(ze.$n,{name:"DocumentFile__Button--back",inline:!0,color:"info",onClick:()=>r(l&&s?"/documents/".concat(l,"/").concat(s):l?"/documents/".concat(l):t?"/tasks/".concat(t):a?"/projects/".concat(a):"/documents/all"),children:"Back"})}),k&&(0,Ze.jsx)(Vg,{name:"loading"}),O&&!(null!=T&&T.getDocumentRecordById)&&mqn(O.graphQLErrors)&&(0,Ze.jsx)(eb,{name:"Not available",error:new Error("Not available")}),O&&!(null!=T&&T.getDocumentRecordById)&&!mqn(O.graphQLErrors)&&(0,Ze.jsx)(ze.Kw,{error:O,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"DocumentFile-Error",title:n,body:t,icon:a,retry:()=>j(x)})}}),!k&&(null==T?void 0:T.getDocumentRecordById)&&(0,Ze.jsxs)(nqn,{container:!0,item:!0,children:[(0,Ze.jsxs)(aqn,{container:!0,distribution:"between",itemAlign:"center",children:[(0,Ze.jsxs)(cqn,{container:!0,itemAlign:"center",children:[(0,Ze.jsx)(rqn,{name:"DocumentFile",size:"3x",fileName:C.fileName}),(0,Ze.jsxs)(ze.fv,{container:!0,item:!0,children:[(0,Ze.jsx)(ze.DZ,{nowrap:!0,overflow:"hidden",name:"DocumentFile__Title",weight:"light",title:C.fileName,children:zt.truncate(C.fileName,{length:50})}),(0,Ze.jsxs)(ze.EY,{name:"DocumentFile__Title",children:[(0,Ze.jsx)(ze.EY,{name:"DocumentFile__Title",inline:!0,weight:"bold",children:C.category}),(0,Ze.jsx)(dqn,{children:"|"})," Uploaded on ",g3(C.createdAt)]})]})]}),(0,Ze.jsxs)(iqn,{children:[(0,Ze.jsx)(oqn,{name:"DocumentFile__Button--download",inline:!0,color:"info",disabled:!S,title:S?"Open the document":"Can't retrieve document since it didn't pass antivirus check",onClick:()=>{S&&window.open(C.link)},children:"Open"}),!w&&(0,Ze.jsx)(oqn,{name:"DocumentFile__Button--edit",inline:!0,color:"info",component:"a",onClick:()=>f(!0),children:"Edit"}),(0,Ze.jsxs)(Ze.Fragment,{children:[d&&(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(ze.aF,{show:!0,onDismiss:()=>u(!1),height:"auto",maxHeight:"90vh",children:(0,Ze.jsxs)(uqn,{children:[(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(ze.DZ,{children:"Are you sure you want to delete this Document?"})}),(0,Ze.jsxs)(ze.fI,{container:!0,distribution:"around",children:[(0,Ze.jsx)(ze.fv,{item:!0,span:4,children:(0,Ze.jsx)(ze.$n,{onClick:async()=>{try{await v({variables:{id:o}}),r(-1),c("Document has been successfully deleted","success")}catch(e){c("An Error has occurred","danger")}finally{u(!1)}},children:"Yes"})}),(0,Ze.jsx)(ze.fv,{item:!0,span:4,children:(0,Ze.jsx)(ze.$n,{onClick:()=>u(!1),children:"No"})})]})]})})}),D&&(0,Ze.jsx)(oqn,{name:"DocumentFile__Button--delete",inline:!0,color:"info",onClick:()=>u(!0),children:"Delete"})]})]})]}),(0,Ze.jsxs)(tqn,{children:[C.type&&Array.isArray(C.type)&&!!C.type.length&&(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsx)(sqn,{size:"md",children:"Type:"}),(0,Ze.jsx)(ze.EY,{children:C.type.join(", ")})]}),(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsx)(sqn,{size:"md",children:"Review Date:"}),(0,Ze.jsx)(ze.EY,{children:C.reviewDate?y3(C.reviewDate):"-"})]}),(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsxs)(sqn,{size:"md",children:[C.category," ID:"]}),(0,Ze.jsx)(ze.EY,{children:C.referenceId?C.referenceId:"-"})]}),(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsx)(sqn,{size:"md",children:"Supplier/Carrier:"}),(0,Ze.jsx)(ze.EY,{children:P&&P.name||"-"})]}),C.managementSystemCode&&(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsx)(sqn,{size:"md",children:"Management System Reference:"}),(0,Ze.jsx)(ze.EY,{children:C.managementSystemCode.toUpperCase()})]}),(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsx)(sqn,{size:"md",children:"Uploaded on:"}),(0,Ze.jsx)(ze.EY,{children:g3(C.createdAt)||"-"})]}),(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsx)(sqn,{size:"md",children:"Uploaded by:"}),(0,Ze.jsx)(ze.EY,{children:Vo(C.createdBy)||"-"})]}),(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsx)(sqn,{size:"md",children:"Last updated on:"}),(0,Ze.jsx)(ze.EY,{children:g3(C.updatedAt)||"-"})]}),(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsx)(sqn,{size:"md",children:"Last updated by:"}),(0,Ze.jsx)(ze.EY,{children:Vo(C.updatedBy)||"-"})]}),(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsx)(sqn,{size:"md",children:"Tags:"}),(0,Ze.jsx)(ze.EY,{children:C.tags.length?C.tags.map(e=>e.tagName).join(", "):"-"})]}),(0,Ze.jsxs)(lqn,{container:!0,distribution:"between",vdistribution:"center",children:[(0,Ze.jsx)(sqn,{size:"md",children:"Notes:"}),(0,Ze.jsx)(pqn,{children:(null==C?void 0:C.notes)||"-"})]}),p&&(0,Ze.jsx)(v$n,{document:C,onComplete:e=>{A.writeQuery({query:n3,variables:x,data:{getDocumentRecordById:QWn(QWn({},e),{},{updatedAt:(new Date).toISOString(),updatedBy:{first_name:b.given_name,last_name:b.family_name,__typename:"User"}})}}),setTimeout(()=>j(x),500),f(!1),c("Document has been edited!","success")},onError:e=>{c(e.message,"danger")},onDismiss:()=>f(!1)})]})]})]})},yqn=e=>{let{libraries:n,types:t}=e;const a=(0,eg.A)(),[r,i]=(0,kd.useQueryParam)("search",kd.StringParam),[o,l]=(0,g.useState)(!1),[s,c]=(0,g.useState)(),{showNotification:d}=vt(),u=rt(),{documentsExist:p,error:f,loading:y,refetch:b}=wWn({accountId:u,filters:T3(r||"")},!r),{data:h}=Td(),v=rc(),{library:x}=(0,m.g)(),T=x?t.filter(e=>e.libraries.includes(x.toUpperCase())):n,O=!!v.document.find(e=>e.startsWith("create")),k=((e,n)=>{if(!n)return e;const t=new gf.vj("id");return t.addIndex("title"),t.addDocuments(e),t.search(n)})(T,r);return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsx)(ige,{name:"DocumentLandingPageHeader",title:a.formatMessage({id:"pages.documents.heading"}),breadcrumbs:(()=>{const e=[{title:"Documents",to:"../documents"}];return x&&e.push({title:zt.capitalize(x),to:"../../documents/".concat(x)}),e})(),icon:"file-alt",iconColor:"quaternary",dropdownDefault:x?"".concat(zt.capitalize(x)," Documents"):"Documents",isDropdown:!!x,dropdownItems:P3.filter(e=>!e.accessControlIndexer||zt.get(h,e.accessControlIndexer)),children:(0,Ze.jsxs)(HF,{container:!0,item:!0,distribution:"center",vdistribution:"center",itemAlign:"center",children:[O&&p&&(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(SD,{gridApi:null==s?void 0:s.api})}),O&&p&&(0,Ze.jsx)(ze.fv,{span:6,children:(0,Ze.jsx)(NWn,{gridApi:s,accountId:u})}),O&&(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(ze.$n,{name:"DocumentLanding__Button--upload",color:"primary",onClick:()=>l(!0),children:"+ Upload Documents"})})]})}),(0,Ze.jsx)(SWn,{searchValue:r,library:x,onSearch:i,folders:k.map(e=>({id:e.id,name:e.title,url:"./".concat(e.link),icon:{color:x3(e.library||x),name:"folder"},disabled:!(!("accessControlIndexer"in e)||zt.get(h,e.accessControlIndexer))})),documentsExist:p,setGridApi:c,error:f,retry:b,loading:y&&!p}),o&&(0,Ze.jsx)(Fsn,{onDismiss:()=>l(!1),onComplete:e=>{d(e,"success")},onError:e=>{d(e.message,"danger")},predefinedValues:{library:(null==x?void 0:x.toUpperCase())||null}})]})},gqn=e=>{let{children:n}=e;const{library:t}=(0,m.g)();if(t&&O3(t))return n;const{data:a}=Td();return P3.filter(e=>!e.accessControlIndexer||zt.get(a,e.accessControlIndexer)).some(e=>e.library===(null==t?void 0:t.toUpperCase()))?n:(0,Ze.jsx)(m.C5,{to:"/documents"})};function bqn(e,n,t){return{id:e.id,name:e.tocTitle,url:pi(t,e.id,n),icon:{name:"folder",color:"quaternary"},libraries:["GOVERNANCE"]}}const hqn={folders:[],files:[]};function vqn(e,n,t,a){if(!e)return hqn;if(t){const e=n[t];return e?{folders:(e.chapters||[]).map(e=>bqn(n[e.id],a,t)),files:e.documents||[]}:hqn}return{folders:e.chapters.map(e=>bqn(n[e.id],a,t)),files:e.documents}}function xqn(e){const{formatMessage:n}=e;return[{title:n({id:"pages.documents.breadcrumbs.one"}),to:"/documents"},{title:n({id:"pages.governance.breadcrumbs.one"}),to:"/documents/governance"}]}function Tqn(e,n,t,a){const r=di(n,t,a,"/documents/Governance/ManagementSystems");return xqn(e).concat(r)}function Oqn(e,n){return e.map(e=>({id:e.id,name:e.title,url:"".concat(n,"/").concat(e.id),icon:{name:"folder",color:"quaternary"},libraries:["GOVERNANCE"]}))||[]}const kqn="governance",jqn="Management Systems",Cqn=x$n.filter(e=>e.libraries.includes(Vt.zM.Governance)),Sqn=(0,Ye.Ay)(function(e){let{intl:n}=e;const t=rt(),a={accountId:t},{data:r,loading:i}=(0,h.IT)(yfn,{variables:a}),o=xqn(n),{pathname:l}=(0,m.zy)(),s=Oqn((null==r?void 0:r.getAvailableManagementSystems)||[],l),[c,d,u]=hf(s,["name"]),{documents:p}=wWn({accountId:t,filters:T3(c,kqn,jqn)});return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsx)(ige,{title:"Management Systems",icon:"file-alt",iconColor:"quaternary",breadcrumbs:o,dropdownItems:Cqn,dropdownDefault:"Management Systems",isDropdown:!0}),(0,Ze.jsx)(SWn,{files:p,folders:u,searchValue:c,library:kqn,category:jqn,onSearch:d,searchPlaceholder:"Search management systems",loading:i})]})});var Nqn,wqn=t(63447),Dqn=t.n(wqn);function Aqn(e){let{onDismiss:n,onError:t,onComplete:a,managementSystem:r,chapter:i,refetch:o}=e;const l=rt(),[s]=(0,Ot.n)(i3);return(0,Ze.jsx)(Fsn,{predefinedValues:{library:"GOVERNANCE",category:"Management Systems",managementSystemCode:ui(r,i||r)},onDismiss:n,onError:t,onComplete:async(e,n,c)=>{if(c.length)return t(new Error("".concat(c.length," of your documents failed to upload and thus weren't attached.")));await Promise.all(n.map(async e=>{try{await s({variables:{accountId:l,documentId:e.id,systemId:r.id,linkId:i?i.id:r.id}})}catch(e){t(e)}})),a("Documents have been successfully attached."),o()}})}function Rqn(){var e,n;const t=(0,eg.A)(),{id:a,itemId:r}=(0,m.g)(),{pathname:i}=(0,m.zy)(),[o,l]=(0,g.useState)(!1),[s,c]=(0,g.useState)([]),d=rt(),u=rc(),{data:p,loading:f,error:y,refetch:b}=(0,h.IT)(r3,{variables:{id:a,accountId:d},partialRefetch:!0,returnPartialData:!0,errorPolicy:"all"}),v=()=>b({id:a,accountId:d}),x=null==p?void 0:p.getManagementSystemById,T=(null==x?void 0:x.title)||"Management System",{tree:O}=oi(x),{folders:k}=vqn(x,O,r,i),j=Object.values(O).map(e=>bqn(e,i,r)),[C,S,N]=hf(j,["name","title","referenceId","managementSystemCode"]),[,w]=Dqn()(N,e=>"DocumentRecord"===e.__typename),D=C?w:k,A=Tqn(t,x,O,O[r]),R=(r?null===(e=O[r])||void 0===e?void 0:e.siblings:null==p?void 0:p.getAvailableManagementSystems)||[],P=(r?null===(n=O[r])||void 0===n?void 0:n.tocTitle:T)||"",L=R.map(e=>({id:e.id,title:e.tocTitle||e.title,filterValue:"",link:e.id,icon:"folder",libraries:[]}))||[],I={accountId:d,filters:T3(C,kqn,jqn,a,r||null)},{documentsExist:E}=wWn(I);return(0,Ze.jsxs)(ze.fv,{container:!0,fullHeight:!0,children:[(0,Ze.jsx)(ige,{title:T,icon:"file-alt",iconColor:"quaternary",breadcrumbs:A,dropdownItems:L,dropdownDefault:P,isDropdown:!0,children:!!u.governance.find(e=>e.startsWith("attachDocumentToManagementSystem"))&&(0,Ze.jsx)(ze.$n,{color:"primary",onClick:()=>l(!0),inline:!0,children:"Attach Documents"})}),(0,Ze.jsx)(SWn,{folders:D,library:kqn,category:jqn,isManagementSystem:!0,documentsExist:E,searchValue:C,onSearch:S,loading:f,basePath:"/documents/all",error:y,retry:v,managementSystemId:a,managementSystemChapterId:r||null}),o&&(0,Ze.jsx)(Aqn,{managementSystem:x,chapter:O[r],onComplete:e=>{c(n=>n.concat([{message:e,color:"success",id:Date.now()}]))},onError:e=>{c(n=>n.concat([{message:e.message,color:"danger",id:Date.now()}]))},onDismiss:()=>l(!1),refetch:v}),!!s.length&&s.map(e=>(0,Ze.jsx)(ze.Eg,{name:e.id,color:e.color,onClose:()=>c(s.filter(n=>n.id!==e.id)),show:!0,children:e.message},e.id))]})}const Pqn=(0,f.styled)("div")(Nqn||(Nqn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"]))),Lqn=()=>{const e=oc();return(0,Ze.jsx)(Pqn,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(yqn,{libraries:P3,types:x$n})}),(0,Ze.jsx)(m.qh,{path:e.docs.all,element:(0,Ze.jsx)(DWn,{documentFolders:x$n})}),(0,Ze.jsx)(m.qh,{path:"".concat(e.docs.all,"/:id"),element:(0,Ze.jsx)(fqn,{})}),(0,Ze.jsx)(m.qh,{path:e.docs.systems,element:(0,Ze.jsx)(Sqn,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(e.docs.systems,"/:id"),element:(0,Ze.jsx)(Rqn,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(e.docs.systems,"/:id/:itemId"),element:(0,Ze.jsx)(Rqn,{})}),(0,Ze.jsx)(m.qh,{path:"/:library",element:(0,Ze.jsx)(gqn,{children:(0,Ze.jsx)(yqn,{libraries:P3,types:x$n})})}),(0,Ze.jsx)(m.qh,{path:"/:library/:type",element:(0,Ze.jsx)(gqn,{children:(0,Ze.jsx)(DWn,{documentFolders:x$n})})}),(0,Ze.jsx)(m.qh,{path:"/:library/:type/:id",element:(0,Ze.jsx)(gqn,{children:(0,Ze.jsx)(fqn,{})})}),(0,Ze.jsx)(m.qh,{path:"/:library/:id/edit",element:(0,Ze.jsx)(gqn,{children:(0,Ze.jsx)(fqn,{})})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:e.docs.root})})]})})};var Iqn;const Eqn=Ge.default.div(Iqn||(Iqn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n\n  // Fallbacks for IE\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-self: flex-center;\n\n  // CSS grid for real browsers\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));\n  grid-gap: ",";\n  margin-top: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.sm.spacing),_qn=e=>{let{items:n,learnAccess:t,bundleId:a}=e;const r=["explore","continue","completed","all"].includes(a);return(0,Ze.jsx)(Eqn,{children:n.map((e,n)=>{const i=r?null==e?void 0:e.bundleIdList[0]:a,o=e.restricted?"#":"/engage/".concat(i?i+"/":"","course").concat(e.type===Vt.US.Scorm?"/SCORM":"","/").concat(e.id);return t?(0,Ze.jsx)(ZN,{restricted:e.restricted,name:"CoursesGrid__Link__".concat(e.id),to:o,children:(0,Ze.jsx)(rzn,{learnAccess:t,courseId:e.id,title:e.name,viewed:e.metaData.viewed,type:e.type,image:e.metaData.thumbnail,restricted:e.restricted,courseProgress:e.userCourseMetaData?e.userCourseMetaData.courseProgress:mr},e.id)},"link".concat(n,"-").concat(e.id)):(0,Ze.jsx)(rzn,{learnAccess:t,restricted:e.restricted,courseId:e.id,title:e.name,viewed:e.metaData.viewed,type:e.type,image:e.metaData.thumbnail,courseProgress:e.userCourseMetaData?e.userCourseMetaData.courseProgress:mr},e.id)})})};var Fqn,Bqn,Uqn,Mqn,Vqn,zqn;function Gqn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $qn=(0,Ge.default)(ze.fI)(Fqn||(Fqn=Gqn(["\n  margin-top: ",";\n  border: 1px solid ",";\n  background-color: ",";\n  opacity: ",";\n  overflow: hidden;\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.normal.background,e=>e.theme.colors.basic.white,e=>e.disabled?"0.5":"1"),Wqn=Ge.default.div(Bqn||(Bqn=Gqn(["\n  margin-left: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),qqn=(0,Ge.default)(ze.DZ)(Uqn||(Uqn=Gqn(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),Jqn=(0,Ge.default)(ze.EY)(Mqn||(Mqn=Gqn(["\n  margin-right: ",";\n  flex: 0 0 auto;\n"])),e=>e.theme.geometry.md.spacing),Yqn=Ge.default.div(Vqn||(Vqn=Gqn(["\n  position: relative;\n  width: 192px;\n  height: 130px;\n  display: block;\n  background: "," url(",") center center no-repeat;\n  background-size: cover;\n  flex: 0 0 auto;\n  border: 1px solid ",";\n"])),e=>{let{theme:n}=e;return n.colors.secondary.dark.background},e=>{let{src:n}=e;return n},e=>{let{theme:n}=e;return n.colors.overlay.normal.background}),Hqn=(0,Ge.default)(ze.GQ)(zqn||(zqn=Gqn(["\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin-top: -25px;\n  margin-left: -25px;\n  display: inline-flex;\n  flex: 0 0 auto;\n"]))),Kqn=e=>{let{learnAccess:n,courseId:t,title:a,image:r,restricted:i}=e;return(0,Ze.jsxs)($qn,{name:"CourseRow CourseRow--".concat(t),container:!0,itemAlign:"center",disabled:!n,children:[(0,Ze.jsxs)(Yqn,{name:"CourseRow__Thumbnail",src:r,children:[!r&&(0,Ze.jsx)(Hqn,{name:"CourseRow__Icon",height:"50px",size:"lg",icon:"graduation-cap",iconColor:"white",circleColor:"white"}),i?(0,Ze.jsx)(tzn,{children:(0,Ze.jsx)(azn,{icon:"lock",color:"#ababab"})}):null]}),(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,distribution:"between",itemAlign:"center",children:[(0,Ze.jsx)(Wqn,{children:(0,Ze.jsx)(qqn,{size:"lg",weight:"normal",color:"dark",name:"CourseRow__Title",children:a})}),(0,Ze.jsx)(Jqn,{size:"lg",color:"normal",children:(0,Ze.jsx)(ze.In,{icon:"chevron-right"})})]})]})};var Qqn;const Zqn=Ge.default.div(Qqn||(Qqn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n  overflow: auto;\n"]))),Xqn=e=>{let{items:n,learnAccess:t,bundleId:a}=e;const r=["explore","continue","completed","all"].includes(a);return(0,Ze.jsx)(Zqn,{children:n.map(e=>{const n=r?null==e?void 0:e.bundleIdList[0]:a,i=e.restricted?"#":"/engage/".concat(n?n+"/":"","course").concat(e.type===Vt.US.Scorm?"/SCORM":"","/").concat(e.id);return t?(0,Ze.jsx)(ZN,{restricted:e.restricted,name:"CoursesList__Link__".concat(e.id),to:i,children:(0,Ze.jsx)(Kqn,{learnAccess:t,courseId:e.id,title:e.name,viewed:e.metaData.viewed,type:e.type,image:e.metaData.thumbnail,restricted:e.restricted},e.id)},e.id):(0,Ze.jsx)(Kqn,{learnAccess:t,courseId:e.id,title:e.name,viewed:e.metaData.viewed,type:e.type,image:e.metaData.thumbnail,restricted:e.restricted},e.id)})})},eJn=t.p+"banner-2x-d31c65451f356e567478.jpg",nJn=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}$/));var tJn,aJn,rJn;function iJn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function oJn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?iJn(Object(t),!0).forEach(function(n){lJn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):iJn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function lJn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function sJn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const cJn=Ge.default.img(tJn||(tJn=sJn(["\n  width: 100%;\n  height: 100%;\n  margin-left: auto;\n  margin-right: auto;\n  display: block;\n  max-height: 200px;\n  object-fit: cover;\n"]))),dJn=Ge.default.div(aJn||(aJn=sJn(["\n  cursor: pointer;\n  min-width: 844px;\n  min-height: 102px;\n  max-height: 200px;\n  // Subtract sidebar and padding\n  max-width: calc(100vw - 100px - 32px);\n"]))),uJn=(0,Ge.default)(ze.aF)(rJn||(rJn=sJn(["\n  div {\n    overflow: hidden;\n  }\n"])));function pJn(e){return(nJn?kn("REACT_APP_BASE_URL"):window.location.origin)+e}const mJn={type:Vt.US.Video,metaData:{link:pJn(kn("REACT_APP_BANNER_CONTENT"))}},fJn=e=>{var n;const[t,a]=(0,g.useState)(!1),[r,i]=(0,g.useState)(""),o=rt(),l=ms(),{data:{getBanners:s}={},loading:c}=(0,h.IT)(ix,{variables:{accountId:o}}),d=null===s,{data:u}=(0,h.IT)(ox,{variables:{id:r,accountId:o,userId:l,userIdNullable:l},skip:!r});return c?null:(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(uJn,{span:8,height:"80%",show:t,onDismiss:()=>a(!1),children:null!=u&&u.getCourseById||d?(0,Ze.jsx)(Xb,{course:d?mJn:(p=null==u?void 0:u.getCourseById,oJn(oJn({},p),{},{type:null==p?void 0:p.type,metaData:oJn(oJn({},null==p?void 0:p.metaData),{},{link:pJn(null==p||null===(m=p.metaData)||void 0===m?void 0:m.link)})})),link:d?null:null==u||null===(n=u.getCourseById)||void 0===n||null===(n=n.metaData)||void 0===n?void 0:n.link}):null}),null!=s&&s.length?(0,Ze.jsx)(kb,{banners:s,handlerClick:(e,n)=>{if(n===Vt.x1.Hyperlink&&e)return window.open(e,"_blank");a(!0),i(function(e){if(!e)return null;const n=null==e?void 0:e.match(/\/([0-9a-fA-F-]+)$/);return n&&n[1]}(e))}}):(0,Ze.jsx)(dJn,{name:"BannerDiv",children:(0,Ze.jsx)(cJn,oJn(oJn({},e),{},{src:eJn}))})]});var p,m};var yJn,gJn,bJn,hJn,vJn,xJn,TJn;function OJn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const kJn=Ge.default.div(yJn||(yJn=OJn(["\n  margin-bottom: ",";\n  transition: max-height 0.2s linear, opacity 0.2s linear;\n  max-height: 0;\n\n  ","\n"])),e=>{let{show:n,theme:t}=e;return n?t.geometry.sm.spacing:0},e=>{let{show:n}=e;return n?"max-height: 1200px; visibility: visible;":"opacity: 0; visibility: hidden;\n  "}),jJn=Ge.default.div(gJn||(gJn=OJn(["\n  position: relative;\n  margin: 15px 0;\n  display: inline-block;\n  cursor: pointer;\n  user-select: none;\n  font-size: ",";\n"])),e=>{let{theme:n}=e;return n.fonts.md.size}),CJn=(0,Ge.default)(ze.In)(bJn||(bJn=OJn(["\n  margin-left: 7px;\n  transition: transform 0.3s linear;\n  ","\n"])),e=>{let{open:n}=e;return n?"transform: rotate(90deg);":""}),SJn=Ge.default.div(hJn||(hJn=OJn(["\n  text-align: right;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.colors.text.light.text}),NJn=Ge.default.sup(vJn||(vJn=OJn(["\n  margin-left: 5px;\n  color: #ff9789;\n  font-weight: bold;\n  font-size: smaller;\n"]))),wJn=Ge.default.span(xJn||(xJn=OJn(["\n  margin-left: 24px;\n"]))),DJn=(0,Ge.default)(ze.In)(TJn||(TJn=OJn(["\n  margin-left: 7px;\n  transition: transform 0.3s linear;\n  cursor: pointer;\n  ","\n"])),e=>{let{order:n}=e;return"DESC"===n?"transform: rotate(180deg);":""}),AJn=e=>{let{sorter:n,onSort:t}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(jJn,{onClick:()=>t(n),children:n.label},n.field),(0,Ze.jsx)(DJn,{icon:"chevron-up",size:"sm",order:n.order,onClick:()=>t(n)})]})},RJn=e=>{let{filterKey:n,filters:t,setActiveFilter:a,activeFilter:r}=e;const{name:i,options:o,applied:l,showFilter:s}=t[n],c=(0,zt.findKey)(t,{showIn:n}),{optionsRight:d,appliedRight:u}=c?{optionsRight:t[c].options,appliedRight:t[c].applied}:{optionsRight:[],appliedRight:[]};return s?(0,Ze.jsxs)(jJn,{onClick:()=>a(r===n?null:n),children:[i,(o.length!==l.length||d.length!==u.length)&&(0,Ze.jsx)(NJn,{title:"Filter applied",children:(0,Ze.jsx)("span",{role:"img","aria-label":"img",children:"🔍"})}),(0,Ze.jsx)(CJn,{icon:"chevron-right",size:"sm",open:r===n})]}):null},PJn=e=>{let{setActiveFilter:n,filters:t,sorters:a,onSort:r,children:i,activeFilter:o}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(SJn,{children:[a?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(wJn,{children:"Sort by: "}),a.map(e=>(0,Ze.jsx)(AJn,{sorter:e,onSort:r},e.field))]}):null,Object.keys(t).map(e=>(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(wJn,{children:"Filter by: "}),(0,Ze.jsx)(RJn,{filterKey:e,setActiveFilter:n,filters:t,activeFilter:o},e)]}))]}),(0,Ze.jsx)(kJn,{show:!!o,children:i})]})};var LJn,IJn,EJn;function _Jn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const FJn=(0,Ge.default)(ze.In)(LJn||(LJn=_Jn(["\n  margin-left: 10px;\n  margin-right: 15px;\n"]))),BJn=Ge.default.div(IJn||(IJn=_Jn(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.colors.text.normal.background}),UJn=Ge.default.div(EJn||(EJn=_Jn(["\n  font-size: ",";\n  color: ",";\n  color: inherit;\n  margin-right: ",";\n  transition: all 0.3s linear;\n  ","\n  user-select: none;\n"])),e=>{let{theme:n}=e;return n.fonts.md.size},e=>{let{theme:n}=e;return n.colors.text.light.text},e=>{let{theme:n}=e;return n.geometry.xs.spacing},e=>{let{disabled:n}=e;return n?"opacity: 0.3;":"cursor: pointer;"}),MJn=e=>{let{children:n,onClick:t,active:a}=e;return(0,Ze.jsx)(UJn,{onClick:()=>{a&&t()},disabled:!a,children:n})},VJn=e=>{let{addActive:n,removeActive:t,addAll:a,removeAll:r}=e;return(0,Ze.jsxs)(BJn,{children:[(0,Ze.jsxs)(MJn,{onClick:a,active:n,children:["Show all",(0,Ze.jsx)(FJn,{icon:"check",size:"sm"})]}),(0,Ze.jsxs)(MJn,{onClick:r,active:t,children:["Hide all",(0,Ze.jsx)(FJn,{icon:"times",size:"sm"})]})]})};var zJn,GJn,$Jn,WJn,qJn;function JJn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const YJn=Ge.default.div(zJn||(zJn=JJn(["\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  align-items: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.lg.spacing),HJn=Ge.default.div(GJn||(GJn=JJn(["\n  height: 30px;\n  width: 38px;\n  margin-right: ",";\n  border-radius: 5px;\n  border: 1px solid ",";\n  background: url(",") center center no-repeat;\n  background-size: cover;\n  margin-right: ",";\n  margin-top: ",";\n  overflow: hidden;\n  border: 1px solid ",";\n  cursor: pointer;\n\n  ","\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.normal.background,e=>e.image,e=>e.theme.geometry.sm.spacing,e=>e.theme.geometry.xs.spacing,e=>e.theme.colors.overlay.normal.background,e=>{let{active:n,fade:t}=e;return t?"opacity: ".concat(n?"1":"0.3",";"):""}),KJn=Ge.default.div($Jn||($Jn=JJn(["\n  display: flex;\n  background: ",";\n  padding: ",";\n  font-size: ",";\n  color: white;\n  margin-top: ",";\n  margin-right: ",";\n  margin-bottom: ",";\n  border: 2px solid ",";\n  cursor: pointer;\n  user-select: none;\n  transition: all 0.1s linear;\n  ","\n\n  ","\n"])),e=>{let{theme:n,color:t}=e;return n.colors[t].normal.background},e=>{let{theme:n}=e;return n.geometry.xs.spacing},e=>{let{theme:n}=e;return n.fonts.sm.size},e=>{let{theme:n}=e;return n.geometry.xs.spacing},e=>{let{theme:n}=e;return n.geometry.sm.spacing},e=>{let{theme:n}=e;return n.geometry.xs.spacing},e=>{let{theme:n,color:t}=e;return n.colors[t].normal.background},e=>{let{active:n,theme:t,color:a,hollow:r}=e;if(r)return n?"":"\n    background: none;\n    color: ".concat(t.colors[a].normal.background,"\n    ")},e=>{let{active:n,fade:t}=e;return t?"opacity: ".concat(n?"1":"0.3",";"):""}),QJn=(0,Ge.default)(ze.In)(WJn||(WJn=JJn(["\n  margin-right: ",";\n  ","\n"])),e=>{let{theme:n}=e;return n.geometry.xs.spacing},e=>e.colour?"\n    color: ".concat(e.theme.colors[e.colour].normal.background,";\n  "):""),ZJn=(0,Ge.default)(ze.fI)(qJn||(qJn=JJn(["\n  display: flex;\n"]))),XJn=e=>{let{filters:n,activeFilter:t,previousFilter:a,onFilterClick:r,removeAll:i,addAll:o,onChange:l}=e;const s=t||a;if(!s)return null;const{options:c,applied:d,values:u}=n[s],p=d.length<c.length,m=d.length>0,f=(0,zt.keyBy)(u,"id");return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(VJn,{addActive:p,removeActive:m,removeAll:()=>{const{filters:e}=i();l(e)},addAll:()=>{const{filters:e}=o();l(e)}}),(0,Ze.jsx)(ZJn,{children:(0,Ze.jsx)(ze.fv,{span:"24",children:(0,Ze.jsx)(YJn,{children:c.map(e=>{const n="object"==typeof e?e.id:e,t=f[n];return(0,Ze.jsx)(eYn,{active:d.includes(n),item:t,onClick:e=>{const{filters:n}=r(e,s);l(n)},nameFilter:s},n)})})})})]})},eYn=e=>{let{item:n,active:t,onClick:a,nameFilter:r}=e;return n.image?(0,Ze.jsx)(HJn,{name:"LegislationTile__Image",image:n.image,active:t,alt:n.name,title:n.value,onClick:()=>a(n.id,r),fade:!0}):(0,Ze.jsxs)(KJn,{active:t,color:"sidebar",onClick:()=>a("object"==typeof n?n.id:n,r),fade:!0,children:[n.icon&&(0,Ze.jsx)(QJn,{icon:n.icon,colour:n.colour})," ","object"==typeof n?n.name:n]})};function nYn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function tYn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nYn(Object(t),!0).forEach(function(n){aYn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nYn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function aYn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var rYn,iYn,oYn,lYn,sYn,cYn,dYn,uYn;function pYn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function mYn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pYn(Object(t),!0).forEach(function(n){fYn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pYn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function fYn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function yYn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const gYn=(e,n,t,a)=>{const r=a.applied,i=e=>{const n=e.metaData.categories;if((!n||!n.length)&&r.includes(null)||n&&n.length&&n.some(e=>r.includes(e)))return!0},o={explore:e=>e.filter($zn),continue:e=>e.filter(Wzn).sort(Jzn),completed:e=>e.filter(qzn).sort(Jzn),all:e=>e},l=o[e]?o[e](n).filter(i):n.filter(i);return l.forEach(e=>{e.restricted=t.includes(e.id)}),l},bYn=Ge.default.div(rYn||(rYn=yYn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),hYn=Ge.default.div(iYn||(iYn=yYn(["\n  overflow: auto;\n  padding: ",";\n  padding-top: ",";\n  height: 100%;\n"])),e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.lg.spacing),vYn=(0,Ge.default)(ze.fI)(oYn||(oYn=yYn(["\n  padding-right: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.dark.background),xYn=(0,Ge.default)(ze.$n)(lYn||(lYn=yYn(["\n  margin: "," 0;\n  border-radius: 0;\n"])),e=>e.theme.geometry.md.spacing),TYn=(0,Ge.default)(ze.vj)(sYn||(sYn=yYn(["\n  flex: 1 1 auto;\n  form > div {\n    background: none;\n    border: 0;\n    border-radius: 0;\n  }\n"]))),OYn=(0,Ge.default)(ze.Yq)(cYn||(cYn=yYn(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.md.spacing),kYn=Ge.default.div(dYn||(dYn=yYn(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.lg.spacing),jYn=(0,Ge.default)(fJn)(uYn||(uYn=yYn(["\n  margin-bottom: 30px;\n"]))),CYn=kK.map(e=>({name:e.label,id:e.value})),SYn=function(e){let{learnAccess:n}=e;const{id:t="all"}=(0,m.g)(),[a,r]=g.useState({value:"",error:""}),[i,o]=g.useState(1),{isList:l,isGrid:s,showList:c,showGrid:d}=hy(),{filters:u,activeFilter:p,previousFilter:f,handleFilterToggle:y,removeAllFilters:b,addAllFilters:v,setActiveFilter:x}=function(e){const[n,t]=(0,g.useState)(e);(0,g.useEffect)(()=>{const e=tYn({},n.filters);Object.keys(n.filters).forEach(t=>{const a=n.filters[t].values;if(Array.isArray(a)){const r={id:null,name:"Not specified"};n.filters[t].addNullOption&&!a.find(e=>null===e.id)&&a.push(r),e[t]=tYn(tYn({},n.filters[t]),{},{options:a.map(e=>({name:e.name,id:e.id,icon:e.icon,colour:e.colour}))})}}),t(n=>tYn(tYn({},n),{},{filters:e}))},[]);const a=e=>{let a=tYn({},n);return e.forEach(e=>{const{filterKey:n,newAppliedList:t}=e;a=tYn(tYn({},a),{},{filters:tYn(tYn({},a.filters),{},{[n]:tYn(tYn({},a.filters[n]),{},{applied:t})})})}),t(a),a};return tYn(tYn({},n),{},{handleFilterToggle:(e,t)=>{const{applied:r}=n.filters[t],i=r.includes(e)?r.filter(n=>n!==e):[...r,e];return a([{filterKey:t,newAppliedList:i}])},removeAllFilters:()=>{const e=[{newAppliedList:[],filterKey:n.activeFilter}],t=(0,zt.findKey)(n.filters,{showIn:n.activeFilter});return t&&e.push({newAppliedList:[],filterKey:t}),a(e)},addAllFilters:()=>{const e=[],{options:t}=n.filters[n.activeFilter];e.push({newAppliedList:"object"==typeof t[0]?t.map(e=>{let{id:n}=e;return n}):[...t],filterKey:n.activeFilter});const r=(0,zt.findKey)(n.filters,{showIn:n.activeFilter});return r&&e.push({newAppliedList:n.filters[r].values.map(e=>{let{id:n}=e;return n}),filterKey:r}),a(e)},setActiveFilter:e=>{t(n=>tYn(tYn({},n),{},{previousFilter:n.activeFilter,activeFilter:e}))},updateAppliedFilters:a})}({activeFilter:null,previousFilter:null,filters:{categories:{name:"Categories",options:(I={values:CYn,options:[...CYn.map(e=>e.id),null],applied:[...CYn.map(e=>e.id),null]}).options||[],applied:I.applied||[],values:I.values,addNullOption:!0,showFilter:!0}},nameFilter:"categories"}),T={id:null,name:"Not specified"},[O,k]=(0,g.useState)({categories:{name:"Categories",options:[...kK.map(e=>({name:e.label,id:e.value})),T],applied:[...kK.map(e=>e.value),T.id]},listCategoriesId:(0,zt.keyBy)(kK,"value"),restrictedListId:[]}),j=(0,Jb.A)(localStorage.getItem("ID_TOKEN")).sub,C=rt(),S=["explore","continue","completed","all"],{loading:N,error:w,data:D,fetchMore:A,networkStatus:R}=(0,h.IT)(S.includes(t)?ax:rx,{variables:{userId:j,accountId:C,pageNumber:1,searchTerm:a.value.trim(),section:t,bundleId:t},fetchPolicy:"network-only"}),P=D&&D.searchCourses.data.length>0,L=D&&D.getLearnBundleById||{};var I;if(L.title&&!O.restrictedListId.length){D.searchCourses.data=(0,zt.orderBy)(D.searchCourses.data,e=>L.courses.indexOf(e.id),"asc");const e=(0,zt.remove)(D.searchCourses.data,e=>e.userCourseMetaData&&e.userCourseMetaData.courseProgress===yr);if(L.restricted&&L.courses.length){const n=[...L.courses];(0,zt.remove)(n,n=>e.some(e=>e.id===n));const t=n.slice(1,n.length);k(mYn(mYn({},O),{},{restrictedListId:t}))}}let E=[...O.restrictedListId];if(D&&D.getLearnBundlesForAccount){const e=[...D.searchCourses.data].filter(e=>e.userCourseMetaData&&e.userCourseMetaData.courseProgress===yr).map(e=>e.id);D.getLearnBundlesForAccount.forEach(n=>{if(n.restricted&&n.courses.length>=2){const t=[...n.courses].filter(n=>!e.includes(n));E=[...E,...t.slice(1,t.length)]}})}const _=w&&w.graphQLErrors.length&&w.graphQLErrors[0].message.includes("Cannot return null for non-nullable type: 'LearnBundleEngage'");return(0,Ze.jsxs)(bYn,{name:"Courses",children:[(0,Ze.jsx)(ige,{name:"Courses",title:"Engage Courses",breadcrumbs:[{title:"Engage",to:"/engage"},{title:"Courses"},{title:S.includes(t)?Yzn(t):L.title}],icon:"graduation-cap",iconColor:"secondary"}),(0,Ze.jsxs)(hYn,{children:[!_&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(jYn,{}),(0,Ze.jsxs)(vYn,{container:!0,item:!0,itemAlign:"center",children:[(0,Ze.jsx)(TYn,{name:"Courses__Search",value:a.value,onChange:e=>{let{target:{value:n}}=e;r(mYn(mYn({},a),{},{value:n})),o(1)},hideButton:!0}),(0,Ze.jsx)(OYn,{name:"Courses__ShowGrid",size:"md",color:s?"primary":"normal",weight:s?"bold":"normal",underline:!1,onClick:()=>d(),inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"th"})}),(0,Ze.jsx)(OYn,{name:"Courses__ShowList",size:"md",color:l?"primary":"normal",weight:l?"bold":"normal",underline:!1,onClick:()=>c(),inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"th-list"})})]}),(0,Ze.jsx)(PJn,{filters:u,sorters:null,onSort:null,setActiveFilter:x,activeFilter:p,children:(0,Ze.jsx)(XJn,{filters:u,previousFilter:f,activeFilter:p,onChange:e=>k(mYn(mYn({},O),{},{categories:e.categories})),onFilterClick:y,removeAll:b,addAll:v})})]}),(N&&3!==R||4===R)&&(0,Ze.jsx)(Vg,{name:"Courses__Loading"}),w&&!_&&(0,Ze.jsx)(ub,{name:"LearnBundle_LoadFaile_Error",error:w}),_&&(0,Ze.jsx)(eb,{name:"LearnBundle_error",error:w}),!w&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(cNe,{id:"learnCourses"}),!!P&&gYn(t,D.searchCourses.data,E,O.categories).length>0&&(0,Ze.jsxs)(Ze.Fragment,{children:[l?(0,Ze.jsx)(Xqn,{items:gYn(t,D.searchCourses.data,E,O.categories),learnAccess:n,bundleId:t}):(0,Ze.jsx)(_qn,{items:gYn(t,D.searchCourses.data,E,O.categories),learnAccess:n,bundleId:t}),!D.searchCourses.isLastPage&&(0,Ze.jsx)(xYn,{color:"primary",name:"Courses__Pagination__Button--loadmore",onClick:()=>function(e,n){o(n),e({variables:{pageNumber:n,searchTerm:a.value},updateQuery:(e,n)=>{let{fetchMoreResult:t}=n;return t?mYn(mYn({},e),{},{searchCourses:{isLastPage:t.searchCourses.isLastPage,totalItemCount:t.searchCourses.totalItemCount,section:t.searchCourses.section,data:[...e.searchCourses.data,...t.searchCourses.data],__typename:e.searchCourses.__typename}}):e}})}(A,i+1),children:"Load more"})]}),(!P||0===gYn(t,D.searchCourses.data,E,O.categories).length)&&(0,Ze.jsx)(kYn,{children:(0,Ze.jsx)(nv,{name:"Courses__NoResults",title:"There are no results for this search."})})]})]})]})};var NYn;const wYn=Ge.default.div(NYn||(NYn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1 1 auto;\n\n  // Fallbacks for IE\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-self: flex-center;\n\n  // CSS grid for real browsers\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));\n  grid-gap: ",";\n"])),e=>e.theme.geometry.md.spacing),DYn=(0,Ye.Ay)(e=>{let{learnAccess:n,courseId:t,items:a,intl:r}=e;const i=((e,n)=>{const t=e.find(e=>e.id===n),a=e.filter(e=>{var a;const{categories:r=[]}=(null==e?void 0:e.metaData)||{},i=Gt().get(e,"userCourseMetaData.courseProgress")===yr;return!(!t||!Gt().intersection(r,null==t||null===(a=t.metaData)||void 0===a?void 0:a.categories).length||e.id===n||i)});return a})(a,t);return i.length>0?(0,Ze.jsx)(wYn,{children:i.map(e=>(0,Ze.jsx)(p.Link,{name:"CoursesGrid__Link__".concat(e.id),to:"/engage/course/".concat(e.type===Vt.US.Scorm?"SCORM/":"").concat(e.id),children:(0,Ze.jsx)(rzn,{learnAccess:n,courseId:e.id,title:e.name,viewed:e.metaData.viewed,type:e.type,image:e.metaData.thumbnail,courseProgress:e.userCourseMetaData?e.userCourseMetaData.courseProgress:mr},e.id)},e.id))}):(0,Ze.jsx)(p.Link,{name:"LearnHome__Link__".concat(t),to:"engage",children:(0,Ze.jsx)(nv,{name:"RelatedCoursesGrid__NoResults",title:r.formatMessage({id:"pages.coursesPreview.noResults"})})})});var AYn;const RYn=(0,Ge.default)(ze.DZ)(AYn||(AYn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-top: ",";\n  margin-bottom: ",";\n  padding-bottom: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.lg.spacing,e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.xs.spacing,e=>e.theme.colors.text.normal.background),PYn=e=>{let{learnAccess:n,id:t}=e;const{token:{sub:a}}=at(),r=rt();return(0,Ze.jsx)(qb.X,{query:tx,variables:{pageNumber:1,userId:a,accountId:r},children:e=>{var a;let{loading:r,error:i,data:o}=e;if(r||i||null==o||null===(a=o.getAvailableCourses)||void 0===a||null===(a=a.data)||void 0===a||!a.length)return null;if(o.getAvailableCourses.data.length>0){const e=Array.from(new Set(o.getAvailableCourses.data));return(0,Ze.jsxs)(g.Fragment,{children:[(0,Ze.jsx)(RYn,{size:"lg",weight:"normal",color:"normal",children:(0,Ze.jsx)(Je.A,{id:"pages.coursesPreview.relatedCourses",defaultMessage:"Related courses"})}),(0,Ze.jsx)(DYn,{courseId:t,items:e,learnAccess:n})]})}}})};var LYn,IYn;function EYn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _Yn=(0,Ge.default)(ze.In)(LYn||(LYn=EYn(["\n  margin-left: auto;\n  padding-left: ",";\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.geometry.sm.spacing},e=>{let{theme:n}=e;return n.colors.success.normal.background}),FYn=(0,Ge.default)(ze.In)(IYn||(IYn=EYn(["\n  margin-left: auto;\n  padding-left: ",";\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.geometry.sm.spacing},e=>{let{theme:n}=e;return n.colors.primary.normal.background}),BYn={PDF:{NOTSTARTED:"",COMPLETE:"You have downloaded this file."},EMBED:{NOTSTARTED:"",INPROGRESS:"pages.coursesPreview.statuses.embed.inprogress",COMPLETE:"You have completed this course."},EXTERNAL:{},IFRAME:{},DOWNLOAD:{}},UYn=e=>{let{courseProgress:n,handleType:t}=e;const a=BYn[t][n];return(0,Ze.jsxs)(Ze.Fragment,{children:[n===yr&&(0,Ze.jsx)(_Yn,{icon:"check",size:"lg"}),n===fr&&(0,Ze.jsx)(FYn,{icon:"clock",size:"lg"}),(0,Ze.jsx)(ze.EY,{color:"light",size:"sm",children:a&&(0,Ze.jsx)(Je.A,{id:a})})]})};var MYn,VYn,zYn,GYn,$Yn;function WYn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const qYn=(0,Ge.default)(ze.fI)(MYn||(MYn=WYn(["\n  padding: ",";\n  background: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.colors.basic.white),JYn=Ge.default.div(VYn||(VYn=WYn(["\n  position: relative;\n  padding: 0 0 75% 0;\n  flex: 0 0 auto;\n  background: "," url(",") center center no-repeat;\n  background-size: cover;\n"])),e=>{let{theme:n}=e;return n.colors.secondary.dark.background},e=>{let{src:n}=e;return n}),YYn=(0,Ge.default)(ze.GQ)(zYn||(zYn=WYn(["\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin-top: -50px;\n  margin-left: -50px;\n  display: inline-flex;\n  flex: 0 0 auto;\n"]))),HYn=(0,Ge.default)(ze.fv)(GYn||(GYn=WYn(["\n  padding-left: ",";\n"])),e=>e.theme.geometry.md.spacing),KYn=(0,Ge.default)(ze.DZ)($Yn||($Yn=WYn(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),QYn=e=>{let{bundleId:n,id:t}=e;const{token:{sub:a}}=at(),r={userId:a,userIdNullable:a,accountId:rt(),courseId:t,bundleId:n},{data:i,loading:o,error:l,refetch:s}=function(e){const n=(0,h.IT)(bl(),{variables:xl({},e)}),{data:{getUserCourse:t}={}}=n,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(n,hl);return xl({data:t},a)}(r);if(!i&&o)return(0,Ze.jsx)(Vg,{name:"CoursePreview__Loading"});if(l)return(0,Ze.jsx)(ze.Kw,{error:l,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"CoursePreview__Error",icon:a,title:n,body:t,retry:()=>s(r)})}});if(!i)return(0,Ze.jsx)(eb,{error:new Error("Not available")});if(null==i||!i.licence)return(0,Ze.jsx)(nb,{error:new Error("No licence")});const c=new Yr(i).getHandleMethod();return(0,Ze.jsxs)(qYn,{container:!0,item:!0,children:[(0,Ze.jsx)(ze.fv,{item:!0,span:4,children:(0,Ze.jsx)(JYn,{name:"CoursePreview__Thumbnail",src:i.metaData.thumbnail,children:!i.metaData.thumbnail&&(0,Ze.jsx)(YYn,{name:"CoursePreview__Icon",height:"100px",size:"lg",icon:"graduation-cap",iconColor:"white",circleColor:"white"})})}),(0,Ze.jsxs)(HYn,{item:!0,span:8,children:[(0,Ze.jsxs)(KYn,{size:"xxl",weight:"light",color:"dark",children:[i.name,(0,Ze.jsx)(UYn,{courseProgress:i.userCourseMetaData&&i.userCourseMetaData.courseProgress,handleType:c})]}),!!i.metaData.description&&(0,Ze.jsx)(ze.To,{name:"CoursePreview__MarkDown--Description",source:Ron()(i.metaData.description)}),(0,Ze.jsx)(kx,{course:i,handleType:c,downloadLink:i.metaData.link,userId:a,courseRefetch:()=>s(r),name:"StartCourse-Button",steps:lv})]})]})};var ZYn,XYn,eHn;function nHn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const tHn=Ge.default.div(ZYn||(ZYn=nHn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),aHn=Ge.default.div(XYn||(XYn=nHn(["\n  overflow: auto;\n  padding: ",";\n  height: 100%;\n"])),e=>e.theme.geometry.md.spacing),rHn=(0,Ge.default)(ze.$n)(eHn||(eHn=nHn(["\n  border-radius: 0;\n"]))),iHn=(0,Ye.Ay)(e=>{let{learnAccess:n,intl:t}=e;const{bundleId:a,id:r}=(0,m.g)();return(0,Ze.jsxs)(tHn,{children:[(0,Ze.jsx)(ige,{name:"CoursePreview",title:t.formatMessage({id:"pages.coursesPreview.breadcrumbs.two"}),breadcrumbs:[{title:t.formatMessage({id:"pages.coursesPreview.breadcrumbs.one"}),to:"/engage"},{title:t.formatMessage({id:"pages.coursesPreview.breadcrumbs.two"})}],icon:"graduation-cap",iconColor:"secondary",children:(0,Ze.jsx)(rHn,{name:"CoursePreview__Button-back",inline:!0,color:"info",component:"routerLink",to:"..",children:(0,Ze.jsx)(Je.A,{id:"pages.coursesPreview.backToEngage"})})}),(0,Ze.jsxs)(aHn,{children:[(0,Ze.jsx)(QYn,{id:r,bundleId:a}),(0,Ze.jsx)(PYn,{learnAccess:n,id:r})]})]})});var oHn,lHn,sHn;function cHn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dHn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?cHn(Object(t),!0).forEach(function(n){uHn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cHn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function uHn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function pHn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const mHn=(0,Ge.default)(Tn)(oHn||(oHn=pHn(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),fHn=(0,Ge.default)(ze.$n)(lHn||(lHn=pHn(["\n  margin: "," 0;\n  border-radius: 0;\n"])),e=>e.theme.geometry.md.spacing),yHn=Ge.default.div(sHn||(sHn=pHn(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.lg.spacing),gHn=e=>{let{learnAccess:n,searchValue:t}=e;const a=(0,Jb.A)(localStorage.getItem("ID_TOKEN")).sub,r=rt();return(0,Ze.jsx)(qb.X,{query:ax,variables:{pageNumber:1,searchTerm:t,userId:a,accountId:r,section:"all"},children:e=>{var a,r;let{loading:i,error:o,data:l,fetchMore:s,refetch:c,networkStatus:d}=e;if(i&&3!==d||4===d)return(0,Ze.jsx)(Vg,{name:"Courses__Loading"});if(o)return(0,Ze.jsx)(yHn,{children:(0,Ze.jsx)(ze.Kw,{error:o,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"Courses__Error",icon:a,title:n,body:t,retry:c})}})});const u=null==l||null===(a=l.getLearnBundlesForAccount)||void 0===a?void 0:a.reduce((e,n)=>(n.restricted&&n.courses.length>1&&e.push(...n.courses.slice(1)),e),[]),m=(null==l||null===(r=l.searchCourses)||void 0===r?void 0:r.data.map(e=>dHn(dHn({},e),{},{restricted:u.includes(e.id)})))||[],f=Array.from(new Set(m));return(0,Ze.jsxs)(Ze.Fragment,{children:[n&&!f.length&&!t&&(0,Ze.jsx)(p.Link,{name:"ContactUs__Link",to:"/contact",children:(0,Ze.jsx)(mHn,{name:"LearnContainer_Access_NotificationBanner",icon:"info-circle",color:"quinary",title:"Engage",body:"You are currently not subscribed to any Engage content. Please contact your Customer Success Manager to find out more or Rio AI Ltd at support@rio.ai."})},"contactUsLink"),!!f.length&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)("br",{}),(0,Ze.jsx)(_qn,{items:l.searchCourses.data,learnAccess:n}),!l.searchCourses.isLastPage&&(0,Ze.jsx)(fHn,{color:"primary",name:"Courses__Pagination__Button--loadmore",onClick:()=>(void 0).handleLoadMore(s,(void 0).state.pageNumber+1),children:"Load more"})]}),!f.length&&(0,Ze.jsx)(yHn,{children:(0,Ze.jsx)(nv,{name:"Courses__NoResults",title:"There are no results for this search."})})]})}})};var bHn,hHn;function vHn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xHn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vHn(Object(t),!0).forEach(function(n){THn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vHn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function THn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function OHn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const kHn=iv(Gzn,"learn.explore",{closeLabel:"learnTour.close",joyrideOptions:{scrollToFirstStep:!1}}),jHn=Ge.default.div(bHn||(bHn=OHn(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.lg.spacing),CHn=(0,Ge.default)(Tn)(hHn||(hHn=OHn(["\n  margin-top: ",";\n"])),e=>e.theme.geometry.sm.spacing),SHn=(0,Ye.Ay)(e=>{let{learnAccess:n,searchValue:t,intl:a}=e;const r=(0,Jb.A)(localStorage.getItem("ID_TOKEN")).sub,i=rt(),o=Pu(),l=er!==i;return(0,Ze.jsx)(qb.X,{query:tx,variables:{pageNumber:1,userId:r,accountId:i},fetchPolicy:"network-only",children:e=>{var r;let{loading:s,error:c,data:d,refetch:u,networkStatus:m}=e;if(s&&3!==m||4===m)return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Gzn,{type:"Continue",sectionTitle:a.formatMessage({id:"pages.learn.banners.continue"}),highlightColor:"secondary",items:[],learnAccess:n,loading:!0},"CoursesBanner__Continue"),l&&(0,Ze.jsx)(Gzn,{type:"Explore",sectionTitle:a.formatMessage({id:"pages.learn.banners.explore"}),highlightColor:"primary",items:[],learnAccess:n,loading:!0},"CoursesBanner__Explore"),(0,Ze.jsx)(Gzn,{type:"Completed",sectionTitle:a.formatMessage({id:"pages.learn.banners.completed"}),highlightColor:"tertiary",items:[],learnAccess:n,loading:!0},"CoursesBanner__Completed")]});if(c)return(0,Ze.jsx)(jHn,{children:(0,Ze.jsx)(ze.Kw,{error:c,children:e=>{let{title:n,body:t,icon:a}=e;return(0,Ze.jsx)(ze.OJ,{name:"Courses__Error",icon:a,title:n,body:t,retry:u})}})});const f=(null==d||null===(r=d.getAvailableCourses)||void 0===r?void 0:r.data)||[],y={mandatoryList:[],showList:[],restrictedCourseList:[]};d.getAvailableCourses.learnBundleList.forEach(e=>{if(e.isbBundleShow){const n=f.filter(n=>e.courses.includes(n.id)),t=e.isMandatoryBundle?"mandatoryList":"showList",a=(0,zt.orderBy)(n,n=>e.courses.indexOf(n.id),"asc");(0,zt.remove)(a,e=>e.userCourseMetaData&&e.userCourseMetaData.courseProgress===yr),y[t].push(xHn(xHn({},e),{},{coursesList:a})),e.restricted&&e.courses.length&&(y.restrictedCourseList=[...y.restrictedCourseList,...a.slice(1,a.length).map(e=>e.id)])}});const g=f.filter(e=>e.accountId===i);return y.restrictedCourseList=(0,zt.uniq)(y.restrictedCourseList),y.showList=(0,zt.orderBy)(y.showList,e=>e.title.toLowerCase(),"asc"),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(cNe,{id:"learnOverview"}),!n&&(0,Ze.jsx)(CHn,{name:"LearnContainer_Access_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Engage",body:"Currently Engage is not included in your subscription, if you’d like access to Learn please contact Rio AI Ltd or get in touch with your Business Admin."}),n&&!f.length&&!t&&(0,Ze.jsx)(p.Link,{name:"ContactUs__Link",to:"/contact",children:(0,Ze.jsx)(CHn,{name:"LearnContainer_Access_NotificationBanner",icon:"info-circle",color:"quinary",title:"Engage",body:"You are currently not subscribed to any Engage content. Please contact your Customer Success Manager to find out more or Rio AI Ltd at support@rio.ai."})},"contactUsLink"),t&&(0,Ze.jsx)(gHn,{learnAccess:n,searchValue:t}),!t&&(0,Ze.jsxs)(Ze.Fragment,{children:[y.mandatoryList.map(e=>(0,Ze.jsx)(Gzn,{type:e.id,sectionTitle:e.title,restricted:e.restricted,highlightColor:"secondary",items:e.coursesList,learnAccess:n,bundleDescription:e.description},"CoursesBanner__".concat(e.id))),(0,Ze.jsx)(Gzn,{type:"Continue",sectionTitle:a.formatMessage({id:"pages.learn.banners.continue"}),highlightColor:"secondary",items:f.filter(Wzn).sort(Jzn),learnAccess:n},"CoursesBanner__Continue"),l&&(0,Ze.jsx)(kHn,{type:"Explore",sectionTitle:a.formatMessage({id:"pages.learn.banners.explore"}),highlightColor:"primary",items:f.filter($zn),learnAccess:n,steps:ov,restrictedCourseList:y.restrictedCourseList},"CoursesBanner__Explore"),!!g.length&&(0,Ze.jsx)(Gzn,{type:"Account",sectionTitle:"".concat(o.name," - Uploaded Courses"),highlightColor:"secondary",items:g.sort(Jzn),learnAccess:n},"CoursesBanner__Account"),y.showList.map(e=>(0,Ze.jsx)(Gzn,{name:"CourseOverviewContent__Courses-Banner--List",type:e.id,sectionTitle:e.title,restricted:e.restricted,highlightColor:"secondary",items:e.coursesList,learnAccess:n,bundleDescription:e.description},"CoursesBanner__".concat(e.id))),(0,Ze.jsx)(Gzn,{type:"Completed",sectionTitle:a.formatMessage({id:"pages.learn.banners.completed"}),highlightColor:"tertiary",items:f.filter(qzn).sort(Jzn),learnAccess:n},"CoursesBanner__Completed")]})]})}})});var NHn,wHn;function DHn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const AHn=(0,Ge.default)(ze.fI)(NHn||(NHn=DHn(["\n  padding-right: ",";\n  border-bottom: 1px solid ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.theme.colors.overlay.dark.background),RHn=(0,Ge.default)(ze.vj)(wHn||(wHn=DHn(["\n  flex: 1 1 auto;\n  form > div {\n    background: none;\n    border: 0;\n    border-radius: 0;\n  }\n"]))),PHn=(0,Ye.Ay)(e=>{let{searchValue:n,onSearch:t,intl:a}=e;return(0,Ze.jsx)(AHn,{container:!0,item:!0,itemAlign:"center",children:(0,Ze.jsx)(RHn,{name:"Courses__Search",value:n,onChange:t,hideButton:!0,placeholder:a.formatMessage({id:"home.search"})})})});var LHn,IHn,EHn;function _Hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function FHn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_Hn(Object(t),!0).forEach(function(n){BHn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_Hn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function BHn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function UHn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const MHn=Ge.default.div(LHn||(LHn=UHn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: hidden;\n"]))),VHn=Ge.default.div(IHn||(IHn=UHn(["\n  overflow: auto;\n  padding: ",";\n  padding-top: ",";\n  height: 100%;\n"])),e=>e.theme.geometry.xl.spacing,e=>e.theme.geometry.lg.spacing),zHn=(0,Ge.default)(fJn)(EHn||(EHn=UHn(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing),GHn=(0,Ye.Ay)(e=>{const{intl:n}=e,[t,a]=(0,g.useState)({search:{value:"",error:""},pageNumber:1,showGrid:!0,showList:!1});return(0,Ze.jsxs)(MHn,{name:"Course Overview",children:[(0,Ze.jsx)(ige,{name:"Course Overview",title:n.formatMessage({id:"pages.learn.heading"}),breadcrumbs:[{title:n.formatMessage({id:"pages.learn.breadcrumbs.one"}),to:"/engage"},{title:n.formatMessage({id:"pages.learn.breadcrumbs.two"})}],icon:"graduation-cap",iconColor:"secondary"}),(0,Ze.jsxs)(VHn,{children:[(0,Ze.jsx)(zHn,{}),(0,Ze.jsx)(PHn,{searchValue:t.search.value,onSearch:e=>{a(n=>FHn(FHn({},n),{},{search:FHn(FHn({},n.search),{},{value:e.target.value}),pageNumber:1}))}}),(0,Ze.jsx)(SHn,{learnAccess:e.learnAccess,searchValue:t.search.value})]})]})});var $Hn;const WHn=Ge.default.div($Hn||($Hn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"]))),qHn=()=>{const e=Pu(),n=!e||e.accessControls.learn;return(0,Ze.jsx)(WHn,{children:n?(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"",element:(0,Ze.jsx)(GHn,{learnAccess:n})}),(0,Ze.jsx)(m.qh,{path:":id",element:(0,Ze.jsx)(SYn,{learnAccess:n})}),(0,Ze.jsx)(m.qh,{path:"course/:id",element:(0,Ze.jsx)(iHn,{learnAccess:n})}),(0,Ze.jsx)(m.qh,{path:":bundleId/course/:id",element:(0,Ze.jsx)(iHn,{learnAccess:n})}),(0,Ze.jsx)(m.qh,{path:"course/SCORM/:id",element:(0,Ze.jsx)(iHn,{learnAccess:n})}),(0,Ze.jsx)(m.qh,{path:":bundleId/course/SCORM/:id",element:(0,Ze.jsx)(iHn,{learnAccess:n})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:"engage"})})]}):(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"",element:(0,Ze.jsx)(GHn,{learnAccess:n})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:"engage"})})]})})},JHn=(e,n,t,a)=>{var r;const i=null==e||null===(r=e.filterModel)||void 0===r||null===(r=r[n])||void 0===r?void 0:r.values;t(1===(null==i?void 0:i.length)&&i[0]===a)};function YHn(){const[e,n]=(0,g.useState)(null),[t,a]=(0,g.useState)(null),[r,i]=(0,g.useState)(null),{token:o}=at(),l=rt();return(0,g.useEffect)(()=>{const e=localStorage.getItem(jd),t=null!==e?JSON.parse(e):{},r=null==o?void 0:o.sub,s=null==t?void 0:t["".concat(r,"-").concat(l,"-/tasks")];JHn(s,"priority",i,"HIGH"),JHn(s,"status",n,"Completed"),JHn(s,"owners",a,"".concat(o.given_name," ").concat(o.family_name))},[]),{showCompleted:e,setShowCompleted:n,showMine:t,setShowMine:a,showHighPriority:r,setShowHighPriority:i}}var HHn,KHn,QHn,ZHn,XHn,eKn,nKn,tKn;function aKn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const rKn=Ge.default.div(HHn||(HHn=aKn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),iKn=(0,Ge.default)(ze.fv)(KHn||(KHn=aKn(["\n  overflow: auto;\n  height: 100%;\n  padding: 0 ",";\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.md.spacing),oKn=Ge.default.div(QHn||(QHn=aKn(["\n  display: flex;\n  flex-direction: row;\n  width: 100%;\n  align-items: center;\n  justify-content: space-between;\n  margin: 10px 0;\n"]))),lKn=Ge.default.div(ZHn||(ZHn=aKn(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n"]))),sKn=(0,Ge.default)(ze.EY)(XHn||(XHn=aKn(["\n  cursor: pointer;\n  margin-right: 15px;\n\n  font-weight: ",";\n"])),e=>{let{isActive:n}=e;return n?"bold":"inherit"}),cKn=Ge.default.div(eKn||(eKn=aKn(["\n  display: flex;\n  width: 100%;\n  height 100%;\n  align-items: center;\n  justify-content: center;\n"]))),dKn=Ge.default.div(nKn||(nKn=aKn(["\n  display: flex;\n  flex-direction: row;\n  margin: 10px 0;\n"]))),uKn=Ge.default.div(tKn||(tKn=aKn(["\n  display: flex;\n  margin-left: auto;\n\n  * {\n    width: auto;\n    min-width: 150px;\n    margin-left: 1rem;\n  }\n"]))),pKn=e=>{let{hasProjectsAccess:n=!1}=e;const t=Dd(),a=rt(),[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)(null),s=rc(),{token:c}=at(),d=s.task.find(e=>"getAll"===e||"getParent"===e),{data:u,loading:p,refetch:m,error:f}=(0,h.IT)(ENn(),{variables:{accountId:a,userId:c.sub}}),{showCompleted:y,setShowCompleted:b,showMine:v,setShowMine:x,showHighPriority:T,setShowHighPriority:O}=YHn(),k=(null==u?void 0:u.getTasksByAccountId)||[],j=u?nun(k):[];return(0,Ze.jsxs)(rKn,{name:"Tasks",children:[p&&(0,Ze.jsx)(cKn,{children:(0,Ze.jsx)(ze.Ip,{})}),o&&(0,Ze.jsx)(ze.Eg,{name:"Task__Notification",show:!0,color:o.colour,onClose:()=>l(null),children:o.message}),r&&(0,Ze.jsx)(ddn,{onComplete:l,accountId:a,onDismiss:()=>i(!1),sourcePage:"TASKS",disabled:{[Vt.AR.Aspects]:!0},hasProjectsAccess:n}),f?(0,Ze.jsx)(ub,{error:f,message:f.message,retry:()=>m({accountId:a,userId:c.sub})}):!p&&(0,Ze.jsxs)(iKn,{container:!0,item:!0,children:[(0,Ze.jsxs)(dKn,{children:[(0,Ze.jsx)(oKn,{children:(0,Ze.jsxs)(lKn,{children:[(0,Ze.jsx)(sKn,{onClick:()=>{if(y)return t.api.setFilterModel(null),void b(!1);t.api.setFilterModel({status:{type:"set",values:["Completed"]}}),b(!0)},isActive:y,children:y?"Hide Completed":"Show Completed"}),d?(0,Ze.jsx)(sKn,{onClick:()=>{if(v)return t.api.setFilterModel(null),void x(!1);const e={owners:{type:"set",values:["".concat(c.given_name," ").concat(c.family_name)]}};t.api.setFilterModel(e),x(!0)},isActive:v,children:v?"Show All Tasks":"Show My Tasks"}):"",(0,Ze.jsx)(sKn,{onClick:()=>{if(T)return t.api.setFilterModel(null),void O(!1);t.api.setFilterModel({priority:{type:"set",values:["HIGH"]}}),O(!0)},isActive:T,children:T?"Show All Priorities":"Show High Priority"})]})}),(0,Ze.jsxs)(uKn,{children:[(0,Ze.jsx)(SD,{gridApi:t.api,onClick:()=>{x(!1),b(!1),O(!1)}}),!!s.task.find(e=>e.startsWith("create"))&&(0,Ze.jsx)(ze.$n,{"data-cy":"TasksHome__Button--create",inline:!0,color:"primary",onClick:()=>i(!0),children:"+ Create Task"})]})]}),(0,Ze.jsx)(uun,{tasks:j,agGrid:t})]})]})},mKn={DATA:[{label:"Waste",value:"WASTE"},{label:"Electricity",value:"ELECTRICITY"},{label:"Gas",value:"GAS"},{label:"Water",value:"WATER"},{label:"Transport",value:"TRANSPORT"}],GOVERNANCE:[{label:"Legislation",value:"LEGISLATION"},{label:"Policies",value:"POLICIES"},{label:"Management Systems",value:"MANAGEMENTSYSTEMS"},{label:"Targets",value:"TARGETS"},{label:"Aspects & Impacts",value:"ASPECTS"},{label:"H&S Risk Register",value:"RISKREGISTER"}]};var fKn=t(67315),yKn=t.n(fKn);const gKn=e=>null==e?void 0:e.map(e=>e&&{label:"tagName"in e?e.tagName:e.name,value:e.id}),bKn=e=>{var n,t,a;return{id:e.id,accountId:e.accountId,author:(a=e.author,"".concat(a.first_name," ").concat(a.last_name)),owners:(t=e.owners,null==t?void 0:t.map(e=>({label:e.first_name+" "+e.last_name,value:e.id}))),locations:gKn(null==e?void 0:e.locations),name:e.name,description:e.description,priority:e.priority,category:e.category,scope:e.scope,subject:e.subject,item:e.item,itemId:null===(n=e.item)||void 0===n?void 0:n.id,tags:gKn(null==e?void 0:e.tags),createdAt:e.createdAt,completedAt:e.completedAt,isCompleted:e.isCompleted,dueDate:e.dueDate,evidence:e.evidence,project:null==e?void 0:e.projectId,projectId:null}},hKn=e=>({id:e.id,accountId:e.accountId,name:e.name,description:e.description,category:e.category,subject:e.subject,itemId:e.itemId,owners:ji(e.owners),priority:e.priority,dueDate:e.dueDate,createdAt:e.createdAt,completedAt:e.isCompleted&&e.completedAt?e.completedAt:e.isCompleted?(new Date).toISOString():null,isCompleted:e.isCompleted,scope:e.scope,locationIds:ji(e.locations),tagIds:ji(e.tags),projectId:e.projectId});function vKn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function xKn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vKn(Object(t),!0).forEach(function(n){TKn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vKn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function TKn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const OKn=e=>{let{id:n}=e;return(0,Ze.jsx)(Syn,{size:"lg",children:(0,Ze.jsx)(Je.A,{id:n})})},kKn=e=>{let{id:n}=e;return(0,Ze.jsx)(pyn,{size:"lg",children:(0,Ze.jsx)(Je.A,{id:n})})},jKn=window.history.state&&window.history.state.idx>0,CKn=e=>{var n,t,a,r;let{hasProjectsAccess:i=!1}=e;const o=rt(),l=rc(),s=pf(),c=l.task.some(e=>e.startsWith("edit")),d=l.task.some(e=>e.startsWith("delete")),u=!l.document.find(e=>e.startsWith("create")),[f,y]=(0,g.useState)(!1),[b,h]=(0,g.useState)([]),[v,x]=(0,g.useState)(""),{token:T}=at(),{showNotification:O}=vt(),[k,j]=(0,g.useState)([]),[C,S]=(0,g.useState)({}),{id:N}=(0,m.g)(),w=(0,m.Zp)(),[D,A]=(0,g.useState)({}),[R,P]=(0,g.useState)(!1),L=oc(),{data:I,error:E,loading:_,refetch:F}=Rt(yKn(),{variables:{id:N},onCompleted:e=>{var n;const t=null==e?void 0:e.getTaskById;S(bKn(t));const a=[];null==t||null===(n=t.evidence)||void 0===n||n.filter(e=>{var n;return(null==e||null===(n=e.documents)||void 0===n?void 0:n.length)>0}).map(e=>{var n;return null==e||null===(n=e.documents)||void 0===n?void 0:n.map(e=>a.push(e))}),j(a)}}),B=e=>w(e?-1:L.tasks.root);(0,g.useEffect)(()=>{F({id:N})},[]);const[U,{loading:M}]=Qm(ccn(),{onCompleted:()=>{O("Evidence has been attached to the current task.","success"),y(!1)},onError:()=>{O("Something went wrong! Please try again later.","danger")}}),[V,{loading:z}]=Qm(Tun(),{onCompleted:()=>{O("Task has been successfully updated")},onError:()=>{O("Something went wrong! Please try again later.","danger")}}),[G,{loading:$}]=Qm(kun(),{onCompleted:()=>{B(jKn),O("Task has been successfully deleted")},onError:()=>{O("Something went wrong! Please try again later.","danger")},refetchQueries:[{query:ENn(),variables:{accountId:o,userId:T.sub}}]}),W=e=>{Object.keys(D).find(n=>n===e.target.name)&&A(xKn(xKn({},D),{},{[e.target.name]:null})),S(xKn(xKn({},C),{},{[e.target.name]:e.target.value}))},q=Kcn(),J=(0,g.useCallback)(()=>{const e=hKn(C),n=nUe(e);(0,zt.isEmpty)(n)&&(A({}),V({variables:e,refetchQueries:["GetTaskById"]})),(0,zt.isEmpty)(n)||A(n)},[C,V]);return(0,Ze.jsxs)(dyn,{children:[(0,Ze.jsxs)(Lyn,{children:[(0,Ze.jsx)(ige,{name:"Tasks_Header",title:null==C?void 0:C.name,breadcrumbs:[{title:"Tasks"}],icon:"tasks",iconColor:"tertiary",leftButtonClick:()=>B(jKn)}),(0,Ze.jsxs)(Cyn,{children:[c&&(0,Ze.jsx)(Oyn,{"data-testid":"Save_Button",onClick:J,disabled:M||z||$,children:"Save"}),(0,Ze.jsx)(kyn,{"data-testid":"Cancel_Button",onClick:()=>B(jKn),disabled:M||z||$,children:"Cancel"}),d&&(0,Ze.jsx)(jyn,{"data-testid":"Delete_Button",onClick:()=>P(!0),disabled:M||z||$,children:"Delete"})]})]}),(0,Ze.jsxs)(uyn,{children:[_&&(0,Ze.jsx)(vyn,{children:(0,Ze.jsx)(ze.Ip,{})}),f&&(0,Ze.jsx)(ze.aF,{show:!0,size:"md",onDismiss:()=>y(!1),children:(0,Ze.jsxs)(uyn,{children:[(0,Ze.jsx)(ze.DZ,{children:"Add Evidence"}),(0,Ze.jsx)(Jcn,{evidenceDocuments:b,setEvidenceDocuments:h,evidenceNotes:v,setEvidenceNotes:x}),(0,Ze.jsx)(ze.$n,{onClick:()=>(async()=>{if(b.length){const e=await q(b,[],"Other Reference");U({variables:{id:(0,Ai.A)(),taskId:N,evidenceType:Qcn,notes:v,documents:e},refetchQueries:["GetTaskById"]})}})(),children:"Save Evidence"})]})}),R&&(0,Ze.jsx)(Nh,{deleteObjectName:"task",onConfirmClick:()=>{var e;void 0!==(e=N)&&G({variables:{id:e}})},onDismissClick:()=>P(!1)}),E&&(0,Ze.jsx)(ub,{name:E.message,retry:()=>F({id:N}),error:E}),!_&&I&&(0,Ze.jsxs)(uyn,{children:[(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(OKn,{id:"pages.task.details.name"}),(0,Ze.jsx)(myn,{"data-testid":"Task_Name",onChange:W,name:"name",value:C.name,box:!1,error:D.name,readOnly:!c})]}),(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(OKn,{id:"pages.task.details.description"}),(0,Ze.jsx)(yyn,{"data-testid":"Task_Description",onChange:W,name:"description",value:C.description,box:!0,readOnly:!c,error:D.description})]}),(0,Ze.jsxs)(ze.fI,{container:!0,span:12,children:[(0,Ze.jsxs)(fyn,{item:!0,span:6,children:[(0,Ze.jsx)(kKn,{id:"pages.task.details.creator"}),(0,Ze.jsx)(byn,{"data-testid":"Task_Creator",size:"md",name:"author",onChange:W,value:C.author,readOnly:!0})]}),(0,Ze.jsxs)(fyn,{item:!0,span:6,children:[(0,Ze.jsx)(kKn,{id:"pages.task.details.createdAt"}),(0,Ze.jsx)(byn,{"data-testid":"Task_Creator",size:"md",name:"author",onChange:W,value:Ht(C.createdAt),readOnly:!0})]})]}),(0,Ze.jsxs)(ze.fI,{container:!0,span:12,children:[(0,Ze.jsxs)(fyn,{item:!0,span:6,children:[(0,Ze.jsx)(kKn,{id:"pages.task.details.completed"}),(0,Ze.jsx)(ze.Sc,{size:"md",checked:C.isCompleted,onClick:()=>S(xKn(xKn({},C),{},{isCompleted:!C.isCompleted}))})]}),C.isCompleted&&(0,Ze.jsxs)(fyn,{item:!0,span:6,children:[(0,Ze.jsx)(kKn,{id:"pages.task.details.completedAt"}),(0,Ze.jsx)(Pyn,{children:(0,Ze.jsx)(hyn,{"data-testid":"Completed_Date",name:"completedAt",onDayClick:e=>{S(xKn(xKn({},C),{},{completedAt:e?e.toISOString():null}))},readOnly:!c,disabledDatesAfter:new Date,selectedDate:C.isCompleted&&C.completedAt?new Date(C.completedAt):C.isCompleted?new Date:null})})]})]}),(0,Ze.jsxs)(ze.fI,{container:!0,span:12,children:[(0,Ze.jsxs)(fyn,{item:!0,span:6,children:[(0,Ze.jsx)(kKn,{id:"pages.task.details.status"}),(0,Ze.jsx)(byn,{"data-testid":"Task_Status",size:"md",name:"status",onChange:W,value:C.isCompleted?"Completed":new Date(C.dueDate)>new Date?"Incompleted":"Overdue",readOnly:!0})]}),(0,Ze.jsxs)(fyn,{item:!0,span:6,children:[(0,Ze.jsx)(OKn,{id:"pages.task.details.dueDate"}),(0,Ze.jsx)(Pyn,{children:(0,Ze.jsx)(hyn,{"data-testid":"Due_Date",name:"dueDate",onDayClick:e=>{S(xKn(xKn({},C),{},{dueDate:e?e.toISOString():null}))},readOnly:!c,selectedDate:C.dueDate?new Date(C.dueDate):null,error:D.dueDate})})]})]}),(0,Ze.jsxs)(ze.fI,{container:!0,distribution:"between",span:12,itemAlign:"bottom",children:[(0,Ze.jsxs)(fyn,{item:!0,span:4,children:[(0,Ze.jsx)(OKn,{id:"pages.task.details.scope"}),(0,Ze.jsx)(gyn,{"data-testid":"Task_scope",name:"scope",options:s,value:C.scope,onChange:W,isDisabled:!c})]}),(0,Ze.jsxs)(fyn,{item:!0,span:4,children:[(0,Ze.jsx)(OKn,{id:"pages.task.details.priority"}),(0,Ze.jsx)(gyn,{"data-testid":"Task_priority",size:"md",onChange:W,name:"priority",value:C.priority,options:qBe,readOnly:!c,error:D.priority})]}),(0,Ze.jsxs)(fyn,{item:!0,span:4,children:[(0,Ze.jsx)(OKn,{id:"pages.task.details.category"}),(0,Ze.jsx)(gyn,{"data-testid":"Task_category",size:"md",name:"category",onChange:e=>{S(xKn(xKn({},C),{},{[e.target.name]:e.target.value,subject:null,item:null}))},value:C.category,options:WBe,readOnly:!c,error:D.category})]})]}),C.scope===Vt.HG.Location&&(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(OKn,{id:"pages.task.details.locations"}),(0,Ze.jsx)(xyn,{children:(0,Ze.jsx)(_D,{name:"locations",accountId:o,value:C.locations,onChange:W,disabled:!c})})]}),C.scope===Vt.HG.Tag&&(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(OKn,{id:"pages.task.details.tags"}),(0,Ze.jsx)(xyn,{children:(0,Ze.jsx)(PD,{name:"tags",accountId:o,value:C.tags,onChange:W,disabled:!c})})]}),"".concat(C.category)in mKn?(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(OKn,{id:"pages.task.details.subject"}),(0,Ze.jsx)(gyn,{name:"subject",classPrefix:"subject-select",disabled:!c,onChange:e=>W(e),value:(null===(n=C.subject)||void 0===n?void 0:n.toUpperCase())||null,options:mKn[C.category],error:D.subject})]}):null,C.subject&&[Vt.AR.Legislation,Vt.AR.Aspects,Vt.AR.Targets].includes(C.subject)&&(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(kKn,{id:"pages.task.details.relatedItem"}),C.subject===Vt.AR.Legislation&&(0,Ze.jsx)(Iyn,{children:(0,Ze.jsx)(Bsn,{name:"itemId",onChange:W,value:C.itemId,isDisabled:!c,error:!1})}),C.subject===Vt.AR.Aspects&&(0,Ze.jsx)(Iyn,{children:(0,Ze.jsx)(Msn,{name:"itemId",onChange:W,value:C.itemId||(null===(t=C.item)||void 0===t?void 0:t.id),isDisabled:!c,error:null})}),C.subject===Vt.AR.Targets&&(0,Ze.jsx)(Iyn,{children:(0,Ze.jsx)(Vsn,{name:"itemId",onChange:W,value:C.itemId,error:null})})]}),(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(OKn,{id:"pages.task.details.owner"}),(0,Ze.jsx)(xyn,{children:(0,Ze.jsx)(BE,{onChange:e=>{var n;const t="owner"===e.target.name?null===(n=e.target)||void 0===n||null===(n=n.select)||void 0===n?void 0:n.map(e=>{let{value:n,label:t}=e;return{value:n,label:t}}):C.owners;S(xKn(xKn({},C),{},{[e.target.name]:e.target.select,owners:t}))},value:C.owners,accountId:o,isDisabled:!c,error:D.owner})})]}),i&&(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(kKn,{id:"pages.task.details.project"}),(0,Ze.jsx)(Iyn,{children:(0,Ze.jsx)(zsn,{name:"projectId",accountId:o,onChange:W,value:C.projectId||(null==C||null===(a=C.project)||void 0===a?void 0:a.id)})})]}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(oyn,{item:!0,span:12,children:(0,Ze.jsx)(ayn,{container:!0,item:!0,children:(0,Ze.jsxs)(ryn,{children:[(0,Ze.jsx)(iyn,{children:(0,Ze.jsxs)(lyn,{span:12,children:[(0,Ze.jsx)(syn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"file-alt"}),(0,Ze.jsx)(ze.DZ,{inline:!0,children:"Evidence Library"})]})}),(0,Ze.jsx)(cyn,{children:(0,Ze.jsxs)(ze.FN,{show:3,scroll:1,width:"675px",infinite:!1,children:[new Array(mi(k)).fill(0).map((e,n)=>(0,Ze.jsx)(wdn,{id:e.id,disabled:u,onClick:()=>y(!0),children:(0,Ze.jsx)(ze.ON,{title:"Upload Evidence"})},"upload-evidence".concat(n))),null==C||null===(r=C.evidence)||void 0===r?void 0:r.filter(e=>{var n;return(null==e||null===(n=e.documents)||void 0===n?void 0:n.length)>0}).map(e=>{var n;return null==e||null===(n=e.documents)||void 0===n?void 0:n.map(n=>(0,Ze.jsx)(p.Link,{to:{pathname:"/documents/all/".concat(n.id)},state:{taskId:N},children:(0,Ze.jsx)(ze.ON,{title:e.notes,desc:n.fileName,uploaded:!0})},n.id))})]})})]})})})})]})]})]})};var SKn;const NKn=Ge.default.div(SKn||(SKn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"]))),wKn=e=>{let{hasProjectsAccess:n}=e;return(0,Ze.jsx)(NKn,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(pKn,{hasProjectsAccess:n})}),(0,Ze.jsx)(m.qh,{path:"/:id",element:(0,Ze.jsx)(CKn,{})})]})})},DKn={"Waste performance improvement category (t)":"quaternary","Energy generation category (kwh)":"secondary","Electricity reduction category (kwh)":"secondary","Transport emissions reduction category (km)":"tertiary","Gas reduction category (kwh)":"primary","Water efficiency category (m3)":"secondary",default:"primary"},AKn={"Waste performance improvement category (t)":"tonnes","Energy generation category (kwh)":"kwh","Electricity reduction category (kwh)":"kwh","Transport emissions reduction category (km)":"km","Gas reduction category (kwh)":"kwh","Water efficiency category (m3)":"m3",default:""},RKn=[{label:"QUARTER-ANNUAL",value:"QUARTER-ANNUAL"},{label:"SEMI-ANNUAL",value:"SEMI-ANNUAL"},{label:"ANNUAL",value:"ANNUAL"}],PKn=[{id:"HIGH",name:"High",icon:"exclamation-triangle",colour:"danger",label:"High",value:"HIGH"},{id:"MEDIUM",name:"Medium",icon:"exclamation-circle",colour:"warning",label:"Medium",value:"MEDIUM"},{id:"LOW",name:"Low",icon:"exclamation-circle",colour:"text",label:"Low",value:"LOW"}];var LKn,IKn;function EKn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const _Kn=Ge.default.div(LKn||(LKn=EKn(["\n  background-color: ",";\n  color: white;\n  padding: 5px 10px;\n  text-align: center;\n  display: inline-block;\n  border-radius: 20px;\n\n  position: relative;\n  display: inline-block;\n\n  :hover span {\n    visibility: visible;\n    opacity: 1;\n  }\n"])),e=>e.color?e.theme.colors[e.color].normal.background:"secondary"),FKn=Ge.default.span(IKn||(IKn=EKn(["\n  visibility: hidden;\n  opacity: 0;\n  z-index: 1;\n\n  -webkit-transition: opacity 1s;\n  -moz-transition: opacity 1s;\n  -o-transition: opacity 1s;\n  transition: opacity 1s;\n\n  position: fixed;\n  height: auto;\n  width: auto;\n  margin-left: 20px;\n  padding: 5px 10px;\n\n  word-break: break-word;\n  text-align: center;\n  border-radius: 6px;\n\n  font-size: 14px;\n  background-color: #ddd;\n  color: black;\n\n  ::after {\n    content: ' ';\n    position: absolute;\n    top: 50%;\n    right: 100%; /* To the left of the tooltip */\n    margin-top: -5px;\n    border-width: 5px;\n    border-style: solid;\n    border-color: transparent #ddd transparent transparent;\n  }\n"])));function BKn(e){const{data:{id:n,scheme:t}}=e,a=null==t?void 0:t.category,r=null==a?void 0:a.name.replace(/\(.*/,"").split(" ").map(e=>e[0]||"").join("").toUpperCase();return(0,Ze.jsx)(ze.EY,{align:"left",name:"project-row__subject-".concat(n),children:a?(0,Ze.jsxs)(_Kn,{color:DKn[a.name],children:[r,(0,Ze.jsx)(FKn,{children:a.name})]}):""})}const UKn={BGN:"лв",CZK:"Kč",DKK:"kr",EUR:"€",GBP:"£",HRK:"kn",GEL:"₾",HUF:"ft",NOK:"kr",PLN:"zł",RUB:"₽",RON:"lei",SEK:"kr",TRY:"₺",UAH:"₴",BRL:"R$",CAD:"$",CLP:"$",COP:"$",MXN:"$",PEN:"S/.",USD:"$",AUD:"$",BDT:"৳",CNY:"¥",HKD:"HK$",IDR:"Rp",INR:"₹",JPY:"¥",MYR:"RM",NZD:"$",PHP:"₱",PKR:"Rs",SGD:"$",KRW:"₩",LKR:"Rs",THB:"฿",VND:"₫"};function MKn(e){var n;const{data:{cost:t,currencyId:a}}=e,{data:r}=(0,h.IT)(Nu()),i=((null==r?void 0:r.getAllCurrencyTypes)||[]).find(e=>e.id===a),o=null!==(n=UKn[(null==i?void 0:i.name)||""])&&void 0!==n?n:null==i?void 0:i.name;return(0,Ze.jsxs)(ze.EY,{align:"center",children:[t," ",o]})}var VKn,zKn;function GKn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $Kn=Ge.default.div(VKn||(VKn=GKn(["\n  color: ",";\n\n  :hover > span {\n    visibility: visible;\n    opacity: 1;\n  }\n"])),e=>e.theme.colors.text.normal.background),WKn=Ge.default.span(zKn||(zKn=GKn(["\n  visibility: hidden;\n  opacity: 0;\n  z-index: 1;\n\n  -webkit-transition: opacity 1s;\n  -moz-transition: opacity 1s;\n  -o-transition: opacity 1s;\n  transition: opacity 1s;\n\n  position: fixed;\n  height: auto;\n  width: auto;\n  margin-left: 20px;\n  padding: 5px 10px;\n\n  word-break: break-word;\n  text-align: center;\n  border-radius: 6px;\n\n  font-size: 14px;\n  background-color: #ddd;\n  color: black;\n\n  ::after {\n    content: ' ';\n    position: absolute;\n    top: 50%;\n    right: 100%; /* To the left of the tooltip */\n    margin-top: -5px;\n    border-width: 5px;\n    border-style: solid;\n    border-color: transparent #ddd transparent transparent;\n  }\n"])));function qKn(e){const{data:{description:n}}=e;return n&&(0,Ze.jsxs)($Kn,{children:[(0,Ze.jsx)(ze.In,{name:"project-row__info",icon:"info-circle"}),(0,Ze.jsx)(WKn,{children:n})]})}var JKn;const YKn=Ge.default.div(JKn||(JKn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),HKn=function(e){var n;const{formatMessage:t}=(0,eg.A)(),{data:{owners:a=[]}={}}=e,r=a.length?a.slice().reverse().map(e=>{let{first_name:n,last_name:t}=e;return"".concat(n," ").concat(t)}).join(", "):[],i=a.slice().reverse().map(e=>(0,Ze.jsx)(ze.Y3,{src:e.profilePicture,accountName:e.first_name},e.profilePicture+e.first_name));return(0,Ze.jsxs)(Ze.Fragment,{children:[!!a.length&&(0,Ze.jsx)(YKn,{children:(0,Ze.jsx)(ze.G3,{title:r,outline:!0,size:"xxs",color:DKn[(null===(n=e.data.category)||void 0===n?void 0:n.name)||"default"],children:i})}),!a.length&&(0,Ze.jsx)(ze.EY,{align:"left",children:t({id:"pages.project.grid.value.emptyOwners"})})]})};function KKn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function QKn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ZKn(e){const{data:{priority:n}={}}=e,t=(0,Ge.useTheme)();return(0,Ze.jsx)(ze.In,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?KKn(Object(t),!0).forEach(function(n){QKn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):KKn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({name:"project-row__priority",size:"lg"},((e,n)=>{const t={HIGH:{icon:"exclamation-triangle",color:n.colors.danger.normal.background},MEDIUM:{icon:"exclamation-circle",color:n.colors.warning.normal.background},LOW:{icon:"exclamation-circle",color:n.colors.text.normal.background}};return e&&t[e]||{}})(n,t)))}function XKn(e){const{data:{startDate:n}={}}=e,t=Ht(n);return n&&(0,Ze.jsx)(ze.EY,{align:"left",children:t})}var eQn;function nQn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function tQn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nQn(Object(t),!0).forEach(function(n){aQn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nQn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function aQn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const rQn=(0,Ge.default)(ze.fI)(eQn||(eQn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  flex: 1;\n\n  .ag-header-cell-resize {\n    z-index: 0;\n  }\n"]))),iQn=[{colId:"startDate",sort:"asc",sortIndex:0},{colId:"name",sort:"asc",sortIndex:1}],oQn=function(e){const n=(0,m.Zp)(),{formatMessage:t}=(0,eg.A)(),{projects:a}=e,r={category:BKn,costCell:MKn,description:qKn,owners:HKn,priority:ZKn,startDate:XKn},i={lineHeight:"21px",wordBreak:"inherit",display:"flex",alignItems:"center"},o={onRowClicked:e=>{n("./".concat(e.data.id))},rowHeight:120,columnDefs:[{headerName:t({id:"pages.project.grid.header.name"}),field:"name",filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),width:160,minWidth:160,cellStyle:i},{headerName:"Priority",field:"priority",sortable:!1,filter:!0,hide:!0},{headerName:t({id:"pages.project.grid.header.impact"}),field:"impact",sortable:!1,filter:!1,width:200,minWidth:160,cellStyle:i},{headerName:t({id:"pages.project.grid.header.description"}),cellRenderer:"description",sortable:!1,filter:!1,minWidth:50,width:110,cellStyle:{textAlign:"center"}},{headerName:t({id:"pages.project.grid.header.locations"}),valueGetter:e=>{let{data:{locations:n}}=e;return null==n?void 0:n.map(e=>null==e?void 0:e.name)},filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:130,cellStyle:i},{headerName:t({id:"pages.project.grid.header.meters"}),valueGetter:e=>{let{data:{meters:n}}=e;return null==n?void 0:n.map(e=>null==e?void 0:e.name)},filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:110,cellStyle:i},{headerName:t({id:"pages.project.grid.header.category"}),cellRenderer:"category",filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),width:130,minWidth:130},{headerName:t({id:"pages.project.grid.header.scheme"}),valueGetter:e=>{let{data:{scheme:n}}=e;return n?n.name:""},filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:110,cellStyle:i},{headerName:t({id:"pages.project.grid.header.owners"}),field:"owners",cellRenderer:"owners",valueGetter:e=>{let{data:{owners:n=[]}}=e;return n.map(e=>{let{first_name:n,last_name:t}=e;return"".concat(n," ").concat(t)})},filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),width:160,minWidth:90},{headerName:t({id:"pages.project.grid.header.cost"}),field:"cost",cellRenderer:"costCell",filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:t({id:"pages.project.grid.header.implementationDate"}),field:"startDate",cellRenderer:"startDate",filter:"agDateColumnFilter",filterParams:tQn(tQn({},{buttons:["reset","apply"],closeOnApply:!0}),{},{comparator:Aa}),minWidth:120},{headerName:t({id:"pages.project.grid.header.baselineDate"}),cellStyle:i,valueGetter:e=>{let{data:{baselineStartDate:n}}=e;return Ea([n,new Date(n).setFullYear(new Date(n).getFullYear()+1)])},filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:t({id:"pages.project.grid.header.benefitsDate"}),cellStyle:i,valueGetter:e=>{let{data:{startDate:n,endDate:t}}=e;return Ea([n,t])},filterParams:tQn(tQn({},{buttons:["reset","apply"],closeOnApply:!0}),{},{comparator:Aa}),minWidth:120},{headerName:t({id:"pages.project.grid.header.plannedBenefit"}),field:"plannedBenefit",cellStyle:i,filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:t({id:"pages.project.grid.header.plannedCostChange"}),field:"plannedCostChange",cellStyle:i,filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:t({id:"pages.project.grid.header.plannedCO2eChange"}),field:"plannedCO2eChange",cellStyle:i,filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:t({id:"pages.project.grid.header.frequency"}),valueGetter:e=>{let{data:{frequency:n}}=e;return ADe()(n)},cellStyle:i,filterParams:tQn({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120}],defaultColDef:{sortable:!0,resizable:!0,filter:!0,cellStyle:{height:"auto"}},rowStyle:{width:"100%",display:"flex",alignItems:"center"}};return(0,Ze.jsx)(rQn,{container:!0,children:(0,Ze.jsx)(nD,tQn({rowData:a,components:r,getRowId:ba("id"),onGridReady:n=>{n.api.applyColumnState({state:iQn}),e.agGrid.onGridReady(n)},onFilterChanged:e.agGrid.onFilterChanged,onFirstDataRendered:e.agGrid.onFirstDataRendered},o))})},lQn=(e,n,t,a)=>{var r;const i=null==e||null===(r=e.filterModel)||void 0===r||null===(r=r[n])||void 0===r?void 0:r.values;t(1===(null==i?void 0:i.length)&&i[0]===a)};function sQn(){const[e,n]=(0,g.useState)(null),[t,a]=(0,g.useState)(null),{token:r}=at(),i=rt();return(0,g.useEffect)(()=>{const e=localStorage.getItem(jd),t=null!==e?JSON.parse(e):{},o=null==r?void 0:r.sub,l=null==t?void 0:t["".concat(o,"-").concat(i,"-/tasks")];lQn(l,"priority",a,Vt.KB.High),lQn(l,"owners",n,"".concat(r.given_name," ").concat(r.family_name))},[]),{showMine:e,setShowMine:n,showHighPriority:t,setShowHighPriority:a}}function cQn(e){let{accountId:n,name:t,value:a,projectCategory:r,readOnly:i,isClearable:o,isDisabled:l,onChange:s,className:c,error:d}=e;const{data:u,loading:p,error:m}=(0,h.IT)(kG,{variables:{accountId:n}}),f=(0,g.useMemo)(()=>{var e;return((r?null==u||null===(e=u.getProjectSchemes)||void 0===e?void 0:e.filter(e=>e.category.id===r.id):null==u?void 0:u.getProjectSchemes)||[]).map(xi)},[r,p]);return(0,Ze.jsx)(ze.l6,{size:"md",name:t||"scheme",placeholder:"Please select scheme",classPrefix:"scheme-select",value:a,error:d||m,isLoading:p,onChange:s,defaultOptions:!0,readOnly:i||!1,options:f,isDisabled:l||p,isClearable:o||!1,className:c})}const dQn=e=>{let{name:n,value:t,onChange:a,readOnly:r,isClearable:i,isDisabled:o,className:l}=e;const{data:s,loading:c,error:d}=(0,h.IT)(wG),u=(0,g.useMemo)(()=>{var e;return(null==s||null===(e=s.getProjectCategories)||void 0===e?void 0:e.map(xi))||[]},[c]);return(0,Ze.jsx)(ze.l6,{defaultOptions:!0,size:"md",name:n||"category",value:t,onChange:a,placeholder:"Please select scheme category",options:u,error:d,isLoading:c,readOnly:r||!1,isDisabled:o||c,isClearable:i||!1,className:l})};var uQn,pQn,mQn,fQn,yQn,gQn;function bQn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function hQn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?bQn(Object(t),!0).forEach(function(n){vQn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bQn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function vQn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function xQn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const TQn=(0,Ge.default)(ze.JU)(uQn||(uQn=xQn(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),OQn=Ge.default.div(pQn||(pQn=xQn(["\n  svg {\n    cursor: pointer;\n  }\n\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),kQn=(0,Ge.default)(ze.fv)(mQn||(mQn=xQn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),jQn=e=>{let{text:n,height:t}=e;const a=Ge.default.div(fQn||(fQn=xQn(["\n    display: flex;\n    margin-top: 36px;\n  "]))),r=Ge.default.span(yQn||(yQn=xQn(["\n    background-color: #ffe5b4;\n    border-radius: 6px;\n    color: #83838e;\n    cursor: default;\n    font-size: 14px;\n    height: ",";\n    text-align: left;\n    padding: 5px 10px;\n    width: 190px;\n    word-break: break-word;\n  "])),t);return(0,Ze.jsx)(a,{children:(0,Ze.jsx)(r,{children:n})})},CQn=(0,Ge.default)(ze.lr)(gQn||(gQn=xQn(["\n  .DayPickerInput-Overlay {\n    top: -354px;\n    left: 50%;\n  }\n"]))),SQn=e=>{var n;let{isSubmitting:t,project:a,setProject:r,accountId:i,errors:o,evidenceNotes:l,evidenceDocuments:s,setEvidenceNotes:c,setEvidenceDocuments:d}=e;const[u,p]=(0,g.useState)(a.locations||null),[m,f]=(0,g.useState)(a.owners||null),[y,b]=(0,g.useState)(a.meters||null),[v,x]=(0,g.useState)(!1),[T,O]=(0,g.useState)(!1),[k,j]=(0,g.useState)(!1),[C,S]=(0,g.useState)(!1),[N,w]=(0,g.useState)(!1),[D,A]=(0,g.useState)(null),[R,P]=(0,g.useState)(null);(0,h.IT)(wG,{onCompleted:e=>{P((null==e?void 0:e.getProjectCategories)||[])},onError:()=>{P([])}});const L=null==R||null===(n=R.find(e=>e.name===Cd))||void 0===n?void 0:n.id,I=(0,g.useCallback)(e=>{const n="locationsSelect"===e.target.name?e.target.select.map(e=>{let{value:n}=e;return n}):a.locations,t="owner"===e.target.name?e.target.select.map(e=>{let{value:n}=e;return n}):a.owners,i="meters"===e.target.name?e.target.select.map(e=>{let{value:n}=e;return n}):a.meters;"locationsSelect"===e.target.name&&(p(e.target.select),b([]),r(hQn(hQn({},a),{},{meters:[]}))),"owner"===e.target.name&&f(e.target.select),"meters"===e.target.name&&b(e.target.select),r(hQn(hQn({},a),{},{[e.target.name]:Bi(e)?e.target.value:e.target.value||e.target.select,locations:n,owners:t,meters:i}))},[a,r]),E=new Date(a.baselineStartDate);return E.setFullYear(new Date(a.baselineStartDate).getFullYear()+1),(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.name"})})}),(0,Ze.jsx)(ze.ks,{"data-cy":"ProjectDetails__Input-name",disabled:t,onChange:I,name:"name",value:a.name,error:o.name,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.description"})})}),(0,Ze.jsx)(ze.fs,{"data-cy":"ProjectDetails__Input-description",size:"lg",disabled:t,onChange:I,name:"description",value:a.description,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.impact"})})}),(0,Ze.jsx)(ze.ks,{"data-cy":"ProjectDetails__Input-impact",disabled:t,onChange:I,name:"impact",value:a.impact,box:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-priority",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.priority"})})}),(0,Ze.jsx)(ze.l6,{name:"priority",classPrefix:"priority-select",isDisabled:t,onChange:I,value:a.priority,options:PKn,error:o.priority})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-category",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.category"})})}),(0,Ze.jsx)(dQn,{value:D?xi(D):null,onChange:e=>{A(e.target.value?{id:e.target.value,name:e.target.label}:null),b([]),r(hQn(hQn({},a),{},{meters:[]}))},isClearable:!0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.locations"})})}),(0,Ze.jsx)(_D,{name:"locationsSelect",accountId:i,value:u,onChange:I,isSubmitting:t,disabled:t,defaultOptions:!1,error:void 0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-scheme",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.scheme"})})}),(0,Ze.jsx)(cQn,{name:"schemeId",accountId:i,onChange:I,value:a.schemeId,projectCategory:D,isClearable:!0,error:o.schemeId})]})}),(null==D?void 0:D.id)===L&&!!u.length&&(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.meters"})})}),(0,Ze.jsx)(Uue,{name:"meters",accountId:i,value:y,onChange:I,isSubmitting:t,disabled:t,locationsToFilter:u,defaultOptions:!1,error:void 0})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-owners",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.owner"})})}),(0,Ze.jsx)(BE,{accountId:i,onChange:I,selectedOption:m,value:m})]})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.cost"})})}),(0,Ze.jsx)(ze.ks,{"data-cy":"ProjectDetails__Input-cost",disabled:t,onChange:I,name:"cost",value:a.cost,error:o.cost,box:!0})]})}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-startDate",children:[(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsxs)(OQn,{children:[(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.startDate"})}),(0,Ze.jsx)(ze.In,{color:"#ffe5b4",icon:v?"times-circle":"info-circle",onClick:()=>x(!v)})]}),(0,Ze.jsx)(CQn,{disabled:t,onDayClick:e=>{I({target:{name:"startDate",value:e?e.toISOString():e}})},name:"startDate",selectedDate:a.startDate?new Date(a.startDate):a.startDate,disabledDatesBefore:E,error:o.startDate,box:!0})]}),v?(0,Ze.jsx)(jQn,{text:"The date you would expect to start making savings from your project.",height:"60px"}):null]}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-endDate",children:[(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsxs)(OQn,{children:[(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.endDate"})}),(0,Ze.jsx)(ze.In,{color:"#ffe5b4",icon:T?"times-circle":"info-circle",onClick:()=>O(!T)})]}),(0,Ze.jsx)(ze.lr,{disabled:t,onDayClick:e=>{I({target:{name:"endDate",value:e?e.toISOString():e}})},name:"endDate",selectedDate:a.endDate?new Date(a.endDate):a.endDate,disabledDatesBefore:a.startDate?new Date(a.startDate):a.startDate,error:o.endDate,box:!0})]}),T?(0,Ze.jsx)(jQn,{text:"The date which you anticipate your planned savings to be realised.",height:"60px"}):null]}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-baselineStartDate",children:[(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsxs)(OQn,{children:[(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.baselineStartDate"})}),(0,Ze.jsx)(ze.In,{color:"#ffe5b4",icon:k?"times-circle":"info-circle",onClick:()=>j(!k)})]}),(0,Ze.jsx)(CQn,{disabled:t,onDayClick:e=>{I({target:{name:"baselineStartDate",value:e?e.toISOString():e}})},name:"baselineStartDate",selectedDate:a.baselineStartDate?new Date(a.baselineStartDate):a.baselineStartDate,error:o.baselineStartDate,box:!0})]}),k?(0,Ze.jsx)(jQn,{text:"The annual period to compare project performance against.",height:"60px"}):null]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsxs)(TQn,{children:[(null==D?void 0:D.id)===L&&(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedBenefitGeneration"}),(null==D?void 0:D.id)!==L&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedBenefit"})," ",AKn[(null==D?void 0:D.name)||"default"]]})]})}),(0,Ze.jsx)(ze.ks,{"data-cy":"ProjectDetails__Input-plannedBenefit",disabled:t,onChange:I,name:"plannedBenefit",value:a.plannedBenefit,error:o.plannedBenefit,box:!0})]})}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsxs)(OQn,{children:[(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedCarbonChange"})}),(0,Ze.jsx)(ze.In,{color:"#ffe5b4",icon:C?"times-circle":"info-circle",onClick:()=>S(!C)})]}),(0,Ze.jsx)(ze.ks,{"data-cy":"ProjectDetails__Input-plannedCO2eChange",disabled:t,onChange:I,name:"plannedCO2eChange",value:a.plannedCO2eChange,error:o.plannedCO2eChange,box:!0})]}),C?(0,Ze.jsx)(jQn,{text:"This figure should be positive. Negative values will be automatically converted to a positive value in the Project Dashboard.",height:"auto"}):null]}),(0,Ze.jsxs)(ze.fI,{container:!0,align:"between",children:[(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsxs)(OQn,{children:[(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedCostChange"})}),(0,Ze.jsx)(ze.In,{color:"#ffe5b4",icon:N?"times-circle":"info-circle",onClick:()=>w(!N)})]}),(0,Ze.jsx)(ze.ks,{"data-cy":"ProjectDetails__Input-plannedCostChange",disabled:t,onChange:I,name:"plannedCostChange",value:a.plannedCostChange,error:o.plannedCostChange,box:!0})]}),N?(0,Ze.jsx)(jQn,{text:"This figure should be positive. Negative values will be automatically converted to a positive value in the Project Dashboard.",height:"auto"}):null]}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between","data-cy":"ProjectDetails__Input-frequency",children:(0,Ze.jsxs)(kQn,{item:!0,children:[(0,Ze.jsx)(OQn,{children:(0,Ze.jsx)(TQn,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.frequency"})})}),(0,Ze.jsx)(ze.l6,{name:"frequency",classPrefix:"frequency-select",isDisabled:t,onChange:I,value:a.frequency,options:RKn,error:o.frequency})]})}),(0,Ze.jsx)(Jcn,{evidenceDocuments:s,setEvidenceDocuments:d,evidenceNotes:l,setEvidenceNotes:c})]})};var NQn=t(91690),wQn=t.n(NQn),DQn=function(e){return e.cost="cost",e.plannedBenefit="plannedBenefit",e.plannedCO2eChange="plannedCO2eChange",e.plannedCostChange="plannedCostChange",e}(DQn||{}),AQn=function(e){return e.name="name",e.priority="priority",e.baselineStartDate="baselineStartDate",e.startDate="startDate",e.endDate="endDate",e.plannedBenefit="plannedBenefit",e.frequency="frequency",e.schemeId="schemeId",e}(AQn||{});const RQn=e=>{const n={};for(const t of Object.values(DQn))e[t]&&!isFinite(Number(e[t]))&&(n[t]="Value have to be a number");for(const t of Object.values(AQn))!e[t]&&(n[t]="Value required");if(!n.priority&&!PKn.find(n=>n.id===e.priority)){const e=PKn.map(e=>{let{value:n}=e;return n}).join(", ");n.priority="Should be one of known properties: ".concat(e)}if(!n.frequency&&!RKn.find(n=>n.value===e.frequency)){const e=RKn.map(e=>{let{value:n}=e;return n}).join(", ");n.frequency="Should be one of known properties: ".concat(e)}const t=Wt()(e.startDate).isValid()&&Wt()(e.baselineStartDate).isValid()&&Wt()(e.startDate).isAfter(Wt()(e.baselineStartDate).add(1,"year"));n.startDate||n.baselineStartDate||t||(n.startDate="Have to be after baseline year end date (baseline start date + 1 year)");const a=Wt()(e.startDate).isValid()&&Wt()(e.endDate).isValid()&&Wt()(e.startDate).isBefore(Wt()(e.endDate));return n.startDate||n.endDate||a||(n.endDate="Have to be after start date"),n},PQn=PKn.map(e=>{let{id:n}=e;return n}),LQn=RKn.map(e=>{let{value:n}=e;return n}),IQn=b.Ik().shape({name:b.Yj().required("Value required"),priority:b.Yj().oneOf(PQn,"Should be one of known properties: ".concat(PQn.join(", "))).required("Value required"),plannedBenefit:b.ai().required("Value required").typeError("Value has to be a number"),cost:b.ai().nullable().typeError("Value has to be a number"),plannedCO2eChange:b.ai().nullable().typeError("Value has to be a number"),plannedCostChange:b.ai().nullable().typeError("Value has to be a number"),frequency:b.Yj().oneOf(LQn,"Should be one of known properties: ".concat(LQn.join(", "))).required("Value required"),schemeId:b.Yj().required("Value required"),baselineStartDate:b.p6().nullable().required("Value required").test("before-start-date","Baseline start date must be before 1 year from start date",function(e){const{startDate:n}=this.parent;if(n&&e){const t=new Date(n);return t.setFullYear(t.getFullYear()-1),e<=t}return!0}),startDate:b.p6().nullable().required("Value required").min(b.KR("baselineStartDate"),"Start date must be at least one year after baseline start date"),endDate:b.p6().nullable().required("Value required").min(b.KR("startDate"),"End date must be after start date")});function EQn(){const e=Kcn();let n;return async(t,a)=>t.length||a?(t.length&&(n=await e(t,[],"Other Reference")),[{notes:a,documents:n||[]}]):[]}var _Qn,FQn,BQn,UQn;function MQn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function VQn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?MQn(Object(t),!0).forEach(function(n){zQn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):MQn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zQn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function GQn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $Qn=Ge.default.div(_Qn||(_Qn=GQn(["\n  display: flex;\n  flex-flow: column;\n  height: 100%;\n  padding: "," 0;\n"])),e=>e.theme.geometry.sm.spacing),WQn=(0,Ge.default)(ze.DZ)(FQn||(FQn=GQn(["\n  text-align: center;\n"]))),qQn=(0,Ge.default)(ze.fv)(BQn||(BQn=GQn(["\n  padding: 0 ",";\n"])),e=>e.theme.geometry.sm.spacing),JQn=(0,Ge.default)(ze.P)(UQn||(UQn=GQn(["\n  ","\n"])),e=>{let{theme:n}=e;return"\n    overflow: auto;\n    padding: ".concat(n.geometry.xs.spacing,";\n  ")}),YQn=e=>{let{accountId:n,onDismiss:t,onComplete:a,defaultValues:r}=e;const{formatMessage:i}=(0,eg.A)(),[o,l]=(0,g.useState)([]),[s,c]=(0,g.useState)(""),[d]=(0,Ot.n)(wQn(),{onCompleted:()=>{a({message:i({id:"pages.project.messages.created"}),color:"success"}),t()},onError:()=>{a({message:i({id:"pages.project.messages.error"}),color:"danger"})}}),u=EQn(),[p,m]=(0,g.useState)({id:(null==r?void 0:r.id)||(0,Ai.A)(),accountId:n,name:(null==r?void 0:r.name)||"",description:(null==r?void 0:r.description)||"",priority:(null==r?void 0:r.priority)||null,schemeId:(null==r?void 0:r.schemeId)||null,impact:(null==r?void 0:r.impact)||"",cost:(null==r?void 0:r.cost)||0,currencyId:(null==r?void 0:r.currencyId)||null,baselineStartDate:(null==r?void 0:r.baselineStartDate)||null,startDate:(null==r?void 0:r.startDate)||null,endDate:(null==r?void 0:r.endDate)||null,frequency:(null==r?void 0:r.frequency)||null,plannedBenefit:(null==r?void 0:r.plannedBenefit)||null,plannedCostChange:(null==r?void 0:r.plannedCostChange)||null,plannedCO2eChange:(null==r?void 0:r.plannedCO2eChange)||null,locations:(null==r?void 0:r.locations)||[],owners:(null==r?void 0:r.owners)||[],evidenceNotes:(null==r?void 0:r.evidenceNotes)||[],meters:(null==r?void 0:r.meters)||[]}),f=RQn(p),y=!Object.values(f).some(Boolean);return(0,Ze.jsx)(ze.aF,{size:"md",show:!0,onDismiss:()=>t(),children:(0,Ze.jsxs)($Qn,{children:[(0,Ze.jsx)(WQn,{children:i({id:"pages.project.create.header"})}),(0,Ze.jsx)(JQn,{children:(0,Ze.jsx)(SQn,{project:p,setProject:m,accountId:n,isSubmitting:!1,errors:f,evidenceNotes:s,evidenceDocuments:o,setEvidenceDocuments:l,setEvidenceNotes:c})}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(qQn,{item:!0,children:(0,Ze.jsx)(ze.$n,{"data-cy":"CreateProjectModal__submit",disabled:!y,onClick:()=>(async()=>{const e=await u(o,s);d({variables:VQn(VQn({},p),{},{plannedBenefit:+p.plannedBenefit?+p.plannedBenefit:p.plannedBenefit,plannedCO2eChange:p.plannedCO2eChange&&+p.plannedCO2eChange?Math.abs(+p.plannedCO2eChange):p.plannedCO2eChange,plannedCostChange:p.plannedCostChange&&+p.plannedCostChange?Math.abs(+p.plannedCostChange):p.plannedCostChange,createdAt:(new Date).toISOString(),evidenceNotes:e}),refetchQueries:["GetProjects"]})})(),children:(0,Ze.jsx)(Je.A,{id:"pages.project.create.submit"})})})})]})})};var HQn,KQn,QQn,ZQn,XQn,eZn,nZn;function tZn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const aZn=Ge.default.div(HQn||(HQn=tZn(["\n  display: flex;\n  margin-left: auto;\n\n  * {\n    width: auto;\n    min-width: 150px;\n    margin-left: 1rem;\n  }\n"]))),rZn=Ge.default.div(KQn||(KQn=tZn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),iZn=(0,Ge.default)(ze.fv)(QQn||(QQn=tZn(["\n  overflow: auto;\n  height: 100%;\n  padding: 0 ",";\n  padding-bottom: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.md.spacing),oZn=Ge.default.div(ZQn||(ZQn=tZn(["\n  display: flex;\n  flex-direction: row;\n  width: 100%;\n  align-items: center;\n  justify-content: space-between;\n  margin: 10px 0;\n"]))),lZn=Ge.default.div(XQn||(XQn=tZn(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n"]))),sZn=(0,Ge.default)(ze.EY)(eZn||(eZn=tZn(["\n  cursor: pointer;\n  margin-right: 15px;\n\n  font-weight: ",";\n"])),e=>{let{isActive:n}=e;return n?"bold":"inherit"}),cZn=Ge.default.div(nZn||(nZn=tZn(["\n  display: flex;\n  width: 100%;\n  height: 100%;\n  align-items: center;\n  justify-content: center;\n"])));var dZn=function(e){return e[e.Create=0]="Create",e}(dZn||{});const uZn=()=>{const e=Dd(),n=rt(),{token:t}=at(),[a,r]=(0,g.useState)(void 0),i=rc(),{showNotification:o}=vt(),l=Boolean(i.project.find(e=>"getAll"===e)),s=Boolean(i.project.find(e=>e.startsWith("create"))),{data:c,loading:d,refetch:u,error:p}=(0,h.IT)(NG(),{variables:{accountId:n,userId:t.sub}});(0,g.useEffect)(()=>{u({accountId:n,userId:t.sub})},[]);const{showMine:m,setShowMine:f,showHighPriority:y,setShowHighPriority:b}=sQn(),v=(null==c?void 0:c.getProjects)||[],x=(0,g.useCallback)(e=>{let{message:n,colour:t}=e;o(n,t)},[o]);return(0,Ze.jsxs)(rZn,{children:[d?(0,Ze.jsx)(cZn,{children:(0,Ze.jsx)(ze.Ip,{})}):"",a===dZn.Create?(0,Ze.jsx)(YQn,{accountId:n,onDismiss:()=>r(void 0),onComplete:e=>x({message:e.message,colour:e.color})}):"",p?(0,Ze.jsx)(ub,{error:p,retry:()=>u({accountId:n,userId:t.sub})}):!d&&(0,Ze.jsxs)(iZn,{container:!0,item:!0,children:[(0,Ze.jsxs)(oZn,{children:[(0,Ze.jsxs)(lZn,{children:[l&&(0,Ze.jsx)(sZn,{onClick:()=>{var n,a;const r=!m,i=(null===(n=e.api)||void 0===n?void 0:n.getFilterModel())||{};r?i.owners={type:"set",values:["".concat(t.given_name," ").concat(t.family_name)]}:delete i.owners,null===(a=e.api)||void 0===a||a.setFilterModel(i),f(r)},isActive:m,children:m?"Show All Projects":"Show My Projects"}),(0,Ze.jsx)(sZn,{onClick:()=>{var n,t;const a=!y,r=(null===(n=e.api)||void 0===n?void 0:n.getFilterModel())||{};a?r.priority={type:"set",values:[Vt.KB.High]}:delete r.priority,null===(t=e.api)||void 0===t||t.setFilterModel(r),b(a)},isActive:y,children:y?"Show All Priorities":"Show High Priority"})]}),(0,Ze.jsxs)(aZn,{children:[(0,Ze.jsx)(SD,{gridApi:e.api,onClick:()=>{f(!1),b(!1)}}),s?(0,Ze.jsx)(ze.$n,{"data-cy":"ProjectsHome__Button-create",inline:!0,color:"primary",onClick:()=>r(dZn.Create),children:"Create Project"}):""]})]}),(0,Ze.jsx)(oQn,{projects:v,agGrid:e,showGoTo:!1})]})]})};var pZn;const mZn=(0,D.Ay)(pZn||(pZn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  mutation DeleteProject($id: ID!) {\n    deleteProject(id: $id)\n  }\n"])));var fZn;const yZn=(0,D.J1)(fZn||(fZn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  mutation UpdateProject(\n    $id: ID!\n    $owners: [ID!]!\n    $locations: [ID!]!\n    $accountId: ID!\n    $name: String!\n    $description: String\n    $priority: ProjectPriority!\n    $schemeId: ID!\n    $impact: String\n    $cost: Float\n    $currencyId: ID\n    $baselineStartDate: String!\n    $startDate: String!\n    $endDate: String!\n    $frequency: String\n    $plannedBenefit: Float!\n    $plannedCostChange: Float\n    $plannedCO2eChange: Float\n    $evidenceNotes: [ProjectEvidenceInput!]!\n    $meters: [ID!]!\n  ) {\n    updateProject(\n      input: {\n        id: $id\n        owners: $owners\n        locations: $locations\n        accountId: $accountId\n        name: $name\n        description: $description\n        priority: $priority\n        schemeId: $schemeId\n        impact: $impact\n        cost: $cost\n        currencyId: $currencyId\n        baselineStartDate: $baselineStartDate\n        startDate: $startDate\n        endDate: $endDate\n        frequency: $frequency\n        plannedBenefit: $plannedBenefit\n        plannedCostChange: $plannedCostChange\n        plannedCO2eChange: $plannedCO2eChange\n        evidenceNotes: $evidenceNotes\n        meters: $meters\n      }\n    ) {\n      ...ProjectFields\n    }\n  }\n  ","\n"])),ad);var gZn;const bZn=(0,D.J1)(gZn||(gZn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  mutation UpdateTask(\n    $id: ID!\n    $accountId: String!\n    $name: String!\n    $description: String!\n    $scope: Scope\n    $locationIds: [ID]\n    $tagIds: [ID]\n    $category: TaskCategory!\n    $subject: TaskSubject\n    $itemId: String\n    $owners: [String!]\n    $priority: TaskPriority!\n    $dueDate: String!\n    $isCompleted: Boolean!\n    $createdAt: String!\n    $completedAt: String\n    $projectId: ID\n  ) {\n    updateTask(\n      input: {\n        id: $id\n        accountId: $accountId\n        name: $name\n        description: $description\n        scope: $scope\n        locationIds: $locationIds\n        tagIds: $tagIds\n        category: $category\n        subject: $subject\n        itemId: $itemId\n        dueDate: $dueDate\n        owners: $owners\n        priority: $priority\n        isCompleted: $isCompleted\n        createdAt: $createdAt\n        completedAt: $completedAt\n        projectId: $projectId\n      }\n    ) {\n      id\n      accountId\n      name\n      description\n      category\n      subject\n      dueDate\n      createdAt\n      completedAt\n      isCompleted\n      owners {\n        id\n        first_name\n        last_name\n        profilePicture\n      }\n      locations {\n        id\n        name\n      }\n      tags {\n        id\n        tagName\n      }\n      priority\n      projectId {\n        id\n        name\n      }\n    }\n  }\n"])));var hZn,vZn,xZn,TZn,OZn,kZn,jZn;function CZn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const SZn=Ge.default.div(hZn||(hZn=CZn(["\n  margin-bottom: 20px;\n  gap: 5px;\n  display: flex;\n  flex-direction: column;\n  width: fit-content;\n"]))),NZn=Ge.default.div(vZn||(vZn=CZn(["\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  align-items: center;\n  padding: 10px 15px;\n  border: 1px solid #7a7272;\n  border-radius: 5px;\n"]))),wZn=Ge.default.div(xZn||(xZn=CZn(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  max-width: 80%;\n"]))),DZn=(0,Ge.default)(ze.In)(TZn||(TZn=CZn(["\n  margin-right: 20px;\n"]))),AZn=(0,Ge.default)(ze.Yq)(OZn||(OZn=CZn(["\n  margin-right: 20px;\n  &:hover,\n  &:focus {\n    color: #0049f9;\n  }\n"]))),RZn=Ge.default.div(kZn||(kZn=CZn(["\n  &:hover {\n    cursor: pointer;\n  }\n"]))),PZn=((0,Ge.default)(ze.z2)(jZn||(jZn=CZn(["\n  &&& {\n    border-radius: 10px;\n  }\n  margin-bottom: 20px;\n"]))),e=>{let{task:n,onTaskDelete:t,canEditProject:a}=e;return(0,Ze.jsxs)(NZn,{children:[(0,Ze.jsxs)(wZn,{children:[(0,Ze.jsx)(DZn,{icon:"link",color:"#0049F9"}),(0,Ze.jsx)(p.Link,{to:"/tasks/".concat(n.id),children:(0,Ze.jsx)(AZn,{underline:!1,children:n.name})}),n.isCompleted&&(0,Ze.jsx)(ze.In,{icon:"check",color:"green"})]}),a&&(0,Ze.jsx)(RZn,{id:n.id,children:(0,Ze.jsx)(DZn,{onClick:()=>t(n),icon:"times",color:"#7a7272"})})]})}),LZn=e=>{let{tasks:n,onTaskDelete:t,canEditProject:a}=e;return(e=>{const n=e.map(e=>e.isCompleted);n.length;n.filter(e=>!0===e).length})(n),(0,Ze.jsx)(SZn,{children:n.map((e,n)=>(0,Ze.jsx)(PZn,{task:e,onTaskDelete:e=>t(e),canEditProject:a},n))})};var IZn,EZn;function _Zn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function FZn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_Zn(Object(t),!0).forEach(function(n){BZn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_Zn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function BZn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function UZn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const MZn=(0,Ge.default)(cQn)(IZn||(IZn=UZn(["\n  border-radius: 5px;\n"]))),VZn=(0,Ge.default)(dQn)(EZn||(EZn=UZn(["\n  border-radius: 5px;\n"]))),zZn=e=>{let{id:n}=e;return(0,Ze.jsx)(Syn,{size:"lg",children:(0,Ze.jsx)(Je.A,{id:n})})},GZn=e=>{let{id:n}=e;return(0,Ze.jsx)(pyn,{size:"lg",children:(0,Ze.jsx)(Je.A,{id:n})})},$Zn=()=>{var e,n,t,a,r,i;const{id:o}=(0,m.g)(),l=(0,m.Zp)(),s=rt(),c=rc(),{showNotification:d}=vt(),[u,f]=(0,g.useState)({}),[y,b]=(0,g.useState)({}),[v,x]=(0,g.useState)(!1),[T,O]=(0,g.useState)(""),[k,j]=(0,g.useState)([]),C=c.project.some(e=>e.startsWith("edit")),S=c.project.some(e=>e.startsWith("delete")),N=EQn(),[w,D]=(0,g.useState)([]),[A,R]=(0,g.useState)(null),[P,L]=(0,g.useState)(null),I=window.history.state&&window.history.state.idx>0,E=oc();(0,h.IT)(wG,{onCompleted:e=>{L((null==e?void 0:e.getProjectCategories)||[])},onError:()=>{L([])}});const _=null==P||null===(e=P.find(e=>(null==e?void 0:e.name)===Cd))||void 0===e?void 0:e.id,{data:F,loading:B}=(0,h.IT)(ld,{variables:{id:o},onCompleted:e=>{var n;const t=Ii(null==e?void 0:e.getProject);f(t),b(t),R((null==e||null===(n=e.getProject.scheme)||void 0===n?void 0:n.category)||null);const a=((null==t?void 0:t.evidenceNotes)||[]).filter(e=>e.documents.length>0).reduce((e,n)=>(n.documents&&n.documents.length&&e.push(...n.documents),e),[]);D(a)}}),[U,M]=(0,g.useState)(!1),[V,z]=(0,g.useState)(!1),[G,$]=(0,g.useState)(!1),[W,q]=(0,g.useState)(!1),[J,Y]=(0,g.useState)(!1),[H,K]=(0,g.useState)(!1),[Q,Z]=(0,g.useState)(!1),[X,ee]=(0,g.useState)({}),ne=(0,g.useCallback)(e=>{let{message:n,colour:t}=e;d(n,t)},[d]);(0,g.useEffect)(()=>{const e=document.querySelector("[color='danger']");null==e||e.scrollIntoView({behavior:"smooth",block:"center"})},[X,ee]);const te=e=>{const n="scheme"===e.target.name&&"select"in e.target?e.target.select:u.scheme;Object.keys(X).find(n=>n===e.target.name)&&ee(FZn(FZn({},X),{},{[e.target.name]:null})),X.schemeId&&"scheme"===e.target.name&&ee(FZn(FZn({},X),{},{schemeId:void 0})),f(FZn(FZn({},u),{},{[e.target.name]:e.target.value,scheme:n}))},ae=e=>{var n;const t="owner"===e.target.name?null===(n=e.target)||void 0===n||null===(n=n.select)||void 0===n?void 0:n.map(e=>{let{value:n,label:t}=e;return{value:n,label:t}}):u.owners;"locations"!==e.target.name?f(FZn(FZn({},u),{},{[e.target.name]:e.target.select,owners:t})):f(FZn(FZn({},u),{},{[e.target.name]:e.target.select,meters:[]}))},[re,{loading:ie}]=(0,Ot.n)(bZn,{onCompleted:()=>{d("Task has been deleted from this project")},onError:()=>{d("Something went wrong! Please try again later.","danger")}}),[oe,{loading:le}]=(0,Ot.n)(yZn,{onCompleted:()=>{d("Project has been successfully updated")},onError:()=>{d("Something went wrong! Please try again later.","danger")}}),[se,{loading:ce}]=(0,Ot.n)(mZn,{onCompleted:()=>{l(I?-1:E.projects.root),d("Project has been successfully deleted")},onError:()=>{d("Something went wrong! Please try again later.","danger")}}),de=(0,g.useCallback)(e=>{const n=Fi(e);re({variables:n,refetchQueries:["GetProjectById"]})},[re]),ue=(0,g.useCallback)(()=>{const e=_i(u),n=RQn(e),t=!Object.values(n).some(Boolean);t&&(ee({}),oe({variables:e,refetchQueries:["GetProjectById"]})),t||ee(n)},[u,oe]),pe=()=>{x(!1),O(""),j([])},me=B||le||ie||ce;return(0,Ze.jsxs)(dyn,{children:[v&&(0,Ze.jsx)(ze.aF,{show:!0,size:"md",onDismiss:pe,height:"auto",maxHeight:"90vh",style:{"z-index":"2"},children:(0,Ze.jsxs)(uyn,{children:[(0,Ze.jsx)(ze.DZ,{children:"Add Evidence"}),(0,Ze.jsx)(Jcn,{evidenceDocuments:k,setEvidenceDocuments:j,evidenceNotes:T,setEvidenceNotes:O}),(0,Ze.jsx)(ze.$n,{disabled:!k.length&&!T,onClick:async()=>{const e=await N(k,T),n=_i(y),t=FZn(FZn({},n),{},{evidenceNotes:n.evidenceNotes.concat(e)});oe({variables:t,refetchQueries:["GetProjectById"]}),pe()},children:"Save Evidence"})]})}),(0,Ze.jsxs)(Lyn,{children:[(0,Ze.jsx)(ige,{name:"Projects",title:"Projects",breadcrumbs:[],icon:"tasks",iconColor:"tertiary",leftButtonClick:()=>l(I?-1:E.projects.root)}),(0,Ze.jsxs)(Cyn,{children:[C&&(0,Ze.jsx)(Oyn,{"data-testid":"Save_Button",onClick:ue,disabled:me,children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.save"})}),(0,Ze.jsx)(kyn,{"data-testid":"Cancel_Button",onClick:()=>l(I?-1:E.projects.root),disabled:me,children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.cancel"})}),S&&(0,Ze.jsx)(jyn,{"data-testid":"Delete_Button",onClick:()=>z(!0),disabled:me,children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.delete"})})]})]}),me&&(0,Ze.jsx)(vyn,{"data-testid":"Loading_Indicator",children:(0,Ze.jsx)(ze.Ip,{})}),U&&(0,Ze.jsx)(ddn,{onComplete:e=>{ne(e),ue()},accountId:s,onDismiss:()=>M(!1),sourcePage:"TASKS",projectId:o,hasProjectsAccess:!0}),V&&(0,Ze.jsx)(Nh,{deleteObjectName:"project",onConfirmClick:()=>{var e;void 0!==(e=o)&&se({variables:{id:e}})},onDismissClick:()=>z(!1)}),!me&&F&&(0,Ze.jsxs)(uyn,{children:[(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(zZn,{id:"pages.project.details.name"}),(0,Ze.jsx)(myn,{"data-testid":"Project_Name",onChange:te,name:"name",value:null==u?void 0:u.name,box:!1,error:X.name,readOnly:!C})]}),(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(GZn,{id:"pages.project.details.description"}),(0,Ze.jsx)(yyn,{"data-testid":"Project_Description",onChange:te,name:"description",value:null==u?void 0:u.description,box:!0,readOnly:!C})]}),(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(GZn,{id:"pages.project.details.impact"}),(0,Ze.jsx)(yyn,{"data-testid":"Project_Impact",size:"md",onChange:te,name:"impact",value:null==u?void 0:u.impact,box:!0,readOnly:!C})]}),(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(GZn,{id:"pages.project.details.locations"}),(0,Ze.jsx)(xyn,{children:(0,Ze.jsx)(_D,{name:"locations",accountId:s,value:null==u?void 0:u.locations,disabled:!C,onChange:ae})})]}),(null==A?void 0:A.id)===_&&!(null==u||null===(n=u.locations)||void 0===n||!n.length)&&(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(GZn,{id:"pages.project.details.meters"}),(0,Ze.jsx)(xyn,{children:(0,Ze.jsx)(Uue,{name:"meters",accountId:s,value:null==u?void 0:u.meters,onChange:ae,disabled:!C,locationsToFilter:null==u?void 0:u.locations,defaultOptions:!1,error:void 0})})]}),(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsx)(zZn,{id:"pages.project.details.owner"}),(0,Ze.jsx)(xyn,{children:(0,Ze.jsx)(BE,{onChange:ae,value:u.owners,accountId:s,isDisabled:!C,error:X.owners,"data-testid":"Project_Owner_Input"})})]}),(0,Ze.jsxs)(ze.fI,{container:!0,span:12,children:[(0,Ze.jsxs)(fyn,{item:!0,span:6,children:[(0,Ze.jsx)(zZn,{id:"pages.project.details.priority"}),(0,Ze.jsx)(gyn,{size:"md",onChange:te,name:"priority",value:u.priority,options:PKn,readOnly:!C})]}),(0,Ze.jsxs)(ze.fI,{item:!0,span:6,children:[(0,Ze.jsx)(GZn,{id:"pages.project.details.category"}),(0,Ze.jsx)(VZn,{onChange:e=>{R(e.target.value?{id:e.target.value,name:e.target.label}:null),f(FZn(FZn({},u),{},{scheme:null,meters:[]}))},value:A?xi(A):null,readOnly:!C,isClearable:!0,"data-testid":"Project_Category_Input"})]})]}),(0,Ze.jsxs)(ze.fI,{container:!0,span:12,children:[(0,Ze.jsxs)(fyn,{item:!0,span:6,children:[(0,Ze.jsx)(zZn,{id:"pages.project.details.frequency"}),(0,Ze.jsx)(gyn,{size:"md",onChange:te,name:"frequency",value:u.frequency,options:RKn,readOnly:!C,"data-testid":"Project_Milestone_Frequency_Input"})]}),(0,Ze.jsxs)(ze.fI,{item:!0,span:6,children:[(0,Ze.jsx)(zZn,{id:"pages.project.details.scheme"}),(0,Ze.jsx)(MZn,{readOnly:!C,accountId:s,onChange:te,value:null===(t=u.scheme)||void 0===t?void 0:t.id,projectCategory:A,isClearable:!0,error:X.schemeId})]})]}),(0,Ze.jsx)(ze.fI,{container:!0,span:12,children:(0,Ze.jsxs)(fyn,{item:!0,span:6,children:[(0,Ze.jsx)(GZn,{id:"pages.project.details.cost"}),(0,Ze.jsx)(byn,{"data-testid":"Project_Cost",size:"md",name:"cost",onChange:te,value:u.cost,readOnly:!C,error:X.cost})]})}),(0,Ze.jsxs)(ze.fI,{container:!0,span:12,children:[(0,Ze.jsxs)(fyn,{item:!0,span:6,children:[(0,Ze.jsxs)(Dyn,{children:[(0,Ze.jsx)(zZn,{id:"pages.project.details.startDate"}),(0,Ze.jsx)(ze.In,{color:"#ffe5b4",icon:G?"times-circle":"info-circle",onClick:()=>$(!G)})]}),(0,Ze.jsxs)(Ryn,{children:[(0,Ze.jsx)(Pyn,{children:(0,Ze.jsx)(hyn,{"data-testid":"Start_Date",name:"startDate",onDayClick:e=>{f(FZn(FZn({},u),{},{startDate:e?e.toISOString():null}))},readOnly:!C,selectedDate:u.startDate?new Date(u.startDate):null,error:X.startDate})}),G?(0,Ze.jsx)(Ayn,{children:"The date you would expect to start making savings from your project."}):null]})]}),(0,Ze.jsxs)(ze.fI,{item:!0,span:6,children:[(0,Ze.jsxs)(Dyn,{children:[(0,Ze.jsx)(zZn,{id:"pages.project.details.baselineStartDate"}),(0,Ze.jsx)(ze.In,{color:"#ffe5b4",icon:J?"times-circle":"info-circle",onClick:()=>Y(!J)})]}),(0,Ze.jsxs)(Ryn,{children:[(0,Ze.jsx)(Pyn,{children:(0,Ze.jsx)(hyn,{name:"baselineYear",readOnly:!C,onDayClick:e=>{f(FZn(FZn({},u),{},{baselineStartDate:e?e.toISOString():null}))},selectedDate:u.baselineStartDate?new Date(u.baselineStartDate):null})}),J?(0,Ze.jsx)(Ayn,{children:"The annual period to compare project performance against."}):null]})]})]}),(0,Ze.jsxs)(ze.fI,{children:[(0,Ze.jsxs)(Dyn,{children:[(0,Ze.jsx)(zZn,{id:"pages.project.details.endDate"}),(0,Ze.jsx)(ze.In,{color:"#ffe5b4",icon:W?"times-circle":"info-circle",onClick:()=>q(!W)})]}),(0,Ze.jsxs)(Ryn,{children:[(0,Ze.jsx)(Pyn,{children:(0,Ze.jsx)(hyn,{name:"endDate",readOnly:!C,onDayClick:e=>{f(FZn(FZn({},u),{},{endDate:e?e.toISOString():null}))},selectedDate:u.endDate?new Date(u.endDate):null,error:X.endDate})}),W?(0,Ze.jsx)(Ayn,{style:{width:"20%"},children:"The date which you anticipate your planned savings to be realised."}):null]})]}),(0,Ze.jsxs)(ze.fI,{container:!0,distribution:"between",span:12,itemAlign:"bottom",children:[(0,Ze.jsxs)(fyn,{item:!0,span:4,children:[(0,Ze.jsx)(zZn,{id:(null==A?void 0:A.id)===_?"pages.project.details.plannedBenefitGeneration":"pages.project.details.plannedBenefit"}),(0,Ze.jsx)(byn,{"data-testid":"Project_Planned_Benefit",size:"md",name:"plannedBenefit",onChange:te,value:u.plannedBenefit,readOnly:!C,error:X.plannedBenefit})]}),(0,Ze.jsxs)(fyn,{item:!0,span:4,children:[(0,Ze.jsxs)(Dyn,{children:[(0,Ze.jsx)(GZn,{id:"pages.project.details.plannedCostChange"}),(0,Ze.jsx)(ze.In,{color:"#ffe5b4",icon:H?"times-circle":"info-circle",onClick:()=>K(!H)})]}),(0,Ze.jsxs)(Ryn,{children:[(0,Ze.jsx)(byn,{"data-testid":"Project_Cost_Change",size:"md",name:"plannedCostChange",onChange:te,value:u.plannedCostChange,readOnly:!C}),H?(0,Ze.jsx)(Ayn,{children:"This figure should be positive."}):null]})]}),(0,Ze.jsxs)(fyn,{item:!0,span:4,children:[(0,Ze.jsxs)(Dyn,{children:[(0,Ze.jsx)(GZn,{id:"pages.project.details.plannedCarbonChange"}),(0,Ze.jsx)(ze.In,{color:"#ffe5b4",icon:Q?"times-circle":"info-circle",onClick:()=>Z(!Q)})]}),(0,Ze.jsxs)(Ryn,{children:[(0,Ze.jsx)(byn,{"data-testid":"Project_CO2_Change",size:"md",name:"plannedCO2eChange",onChange:te,value:u.plannedCO2eChange,readOnly:!C}),Q?(0,Ze.jsx)(Ayn,{children:"This figure should be positive."}):null]})]})]}),(0,Ze.jsxs)(ze.fv,{container:!0,distribution:"center",children:[(0,Ze.jsxs)(ze.fI,{container:!0,distribution:"between",itemAlign:"center",span:12,children:[(0,Ze.jsx)(GZn,{id:"pages.project.details.tasks"}),C&&(0,Ze.jsx)(Nyn,{icon:"plus",onClick:()=>M(!0)})]}),!(null!=u&&null!==(a=u.tasks)&&void 0!==a&&a.length)&&(0,Ze.jsx)(ze.EY,{size:"lg",children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.noTasks"})}),!(null==u||null===(r=u.tasks)||void 0===r||!r.length)&&(0,Ze.jsx)(LZn,{tasks:u.tasks,onTaskDelete:de,canEditProject:C})]}),(0,Ze.jsx)(ze.fI,{container:!0,children:(0,Ze.jsx)(oyn,{item:!0,span:12,children:(0,Ze.jsx)(ayn,{container:!0,item:!0,children:(0,Ze.jsxs)(ryn,{children:[(0,Ze.jsx)(iyn,{children:(0,Ze.jsxs)(lyn,{span:12,children:[(0,Ze.jsx)(syn,{inline:!0,height:"50px",size:"xl",circleColor:"tertiary",iconColor:"tertiary",icon:"file-alt"}),(0,Ze.jsx)(ze.DZ,{inline:!0,children:"Evidence Library"})]})}),(0,Ze.jsx)(cyn,{children:(0,Ze.jsxs)(ze.FN,{show:3,scroll:1,width:"675px",infinite:!1,children:[new Array(mi(w)).fill(0).map((e,n)=>(0,Ze.jsx)(wdn,{id:e.id,disabled:!C,onClick:()=>x(!0),children:(0,Ze.jsx)(ze.ON,{title:"Upload Evidence"})},"upload-evidence".concat(n))),null==u||null===(i=u.evidenceNotes)||void 0===i?void 0:i.filter(e=>e.documents.length>0).map(e=>e.documents.map(n=>(0,Ze.jsx)(p.Link,{to:{pathname:"/documents/all/".concat(n.id)},children:(0,Ze.jsx)(ze.ON,{title:e.notes,desc:n.fileName,uploaded:!0})},n.id)))]})})]})})})})]})]})};var WZn;const qZn=Ge.default.div(WZn||(WZn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"]))),JZn=()=>(0,Ze.jsx)(qZn,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(uZn,{})}),(0,Ze.jsx)(m.qh,{path:"/:id",element:(0,Ze.jsx)($Zn,{})})]})});var YZn,HZn;function KZn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const QZn=(0,Ge.default)(ze.$n)(YZn||(YZn=KZn(["\n  margin-left: ",";\n  max-width: 150px;\n"])),e=>e.theme.geometry.sm.spacing),ZZn=(0,Ge.default)(ze.EY)(HZn||(HZn=KZn(["\n  margin: ",";\n"])),e=>e.theme.geometry.sm.spacing),XZn=e=>{let{featureName:n,link:t}=e;const a=(0,m.Zp)();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(ZZn,{children:[(0,Ze.jsx)(ze.EY,{children:"Your account does not currently subscribed to ".concat(n," functionality.")}),(0,Ze.jsx)(ze.EY,{children:"If you would like to use ".concat(n," to aggregate your tasks and track performance of sustainability initiatives against cost and carbon please contact Rio.")})]}),(0,Ze.jsx)(QZn,{onClick:()=>a(t),children:"Upgrade now"})]})};var eXn;const nXn=Ge.default.div(eXn||(eXn=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]))),tXn=[{label:"Tasks",to:"../tasks",value:"/tasks"},{label:"Projects",to:"../projects",value:"/projects"}],aXn=e=>{let{tab:n,hasProjectsAccess:t,hasTasksAccess:a}=e;const[r,i]=(0,g.useState)(n);return(0,Ze.jsxs)(nXn,{children:[(0,Ze.jsx)(ze.tU,{variant:"standard",value:r,onChange:(e,n)=>{i(n)},children:tXn.map(e=>{let{label:n,to:t,value:a}=e;return(0,Ze.jsx)(ze.oz,{"data-cy":"Tab__".concat(n),label:n,component:p.Link,value:a,to:t},n)})}),(0,Ze.jsxs)(Mne,{children:[(0,Ze.jsxs)(ze.Kp,{value:r,index:"/tasks",children:[!a&&(0,Ze.jsx)(nv,{name:"TasksAndProjects__NoResults",title:"Your account has no access to this section"}),a&&(0,Ze.jsx)(wKn,{hasProjectsAccess:t})]}),(0,Ze.jsxs)(ze.Kp,{value:r,index:"/projects",children:[!t&&(0,Ze.jsx)(XZn,{featureName:OR.PROJECTS,link:"/contact"}),t?(0,Ze.jsx)(JZn,{}):""]})]})]})};var rXn,iXn;function oXn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const lXn=(0,D.J1)(rXn||(rXn=oXn(["\n  mutation UpdateUserProfile(\n    $id: ID!\n    $account_id: ID!\n    $first_name: String!\n    $last_name: String!\n    $email: String!\n    $previousEmail: String\n    $jobTitle: String\n    $department: String\n    $phone: String\n    $mobile: String\n    $profile: String\n  ) {\n    updateUserProfile(\n      input: {\n        id: $id\n        account_id: $account_id\n        first_name: $first_name\n        last_name: $last_name\n        email: $email\n        previousEmail: $previousEmail\n        jobTitle: $jobTitle\n        department: $department\n        phone: $phone\n        mobile: $mobile\n        profilePicture: $profile\n      }\n    ) {\n      id\n      email\n      first_name\n      last_name\n      jobTitle\n      department\n      phone\n      mobile\n    }\n  }\n"]))),sXn=(0,D.J1)(iXn||(iXn=oXn(["\n  mutation UploadProfilePicture(\n    $fileName: String!\n    $imageData: String!\n    $contentType: String!\n    $id: ID!\n    $account_id: ID!\n    $first_name: String!\n    $last_name: String!\n    $email: String!\n    $previousEmail: String\n    $jobTitle: String\n    $department: String\n    $phone: String\n    $mobile: String\n    $profile: String\n  ) {\n    uploadProfilePicture(\n      input: {\n        fileName: $fileName\n        contentType: $contentType\n        imageData: $imageData\n        accountId: $account_id\n        userId: $id\n      }\n    )\n\n    updateUserProfile(\n      input: {\n        id: $id\n        account_id: $account_id\n        first_name: $first_name\n        last_name: $last_name\n        email: $email\n        previousEmail: $previousEmail\n        jobTitle: $jobTitle\n        department: $department\n        phone: $phone\n        mobile: $mobile\n        profilePicture: $profile\n      }\n    ) {\n      id\n      email\n      first_name\n      last_name\n      jobTitle\n      department\n      phone\n      mobile\n      profilePicture\n    }\n  }\n"])));var cXn,dXn,uXn,pXn;function mXn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function fXn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mXn(Object(t),!0).forEach(function(n){yXn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mXn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function yXn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function gXn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const bXn=(0,Ge.default)(ze.fv)(cXn||(cXn=gXn(["\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),hXn=(0,Ge.default)(ze.JU)(dXn||(dXn=gXn(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),vXn=Ge.default.div(uXn||(uXn=gXn(["\n  margin-bottom: ",";\n  margin-top: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.sm.spacing),xXn=(0,Ge.default)(ze.fI)(pXn||(pXn=gXn(["\n  min-width: 100%;\n"]))),TXn=(0,Ye.Ay)(e=>{let{user:n,setNotification:t,intl:a}=e;const{first_name:r,last_name:i,jobTitle:o,phone:l,department:s,mobile:c,email:d,id:u,profilePicture:p,account:m}=n,[f,y]=(0,g.useState)({first_name:{value:r,error:""},last_name:{value:i,error:""},jobTitle:{value:o,error:""},phone:{value:l,error:""},department:{value:s,error:""},mobile:{value:c,error:""},email:{value:d,error:""}}),{departmentSelect:b,showCreateDepartment:h,setShowCreateDepartment:v}=Cu(m.departments,f.department.value,m.id),[x,T]=(0,g.useState)(!1),[O]=(0,Ot.n)(lXn,{onCompleted:()=>{t({message:a.formatMessage({id:"profile.userHaveBeenUpdated"}),colour:"success"})},onError:()=>{t({message:"Something went wrong. Please try again later.",colour:"danger"})}}),k={email:e=>(0,LA.isEmail)(e)?"":"Must be a valid email address",first_name:e=>(0,LA.isEmpty)(e)?"First Name is required.":"",last_name:e=>(0,LA.isEmpty)(e)?"Last Name is required.":"",mobile:e=>(0,LA.isEmpty)(e)||(0,LA.isMobilePhone)(e)?"":"Must be a valid mobile number.",phone:e=>(0,LA.isEmpty)(e)||(0,LA.isNumeric)(e)?"":"Must be a valid phone number."},j=e=>{var n;T(!0),y(fXn(fXn({},f),{},{[e.target.name]:{value:e.target.value,error:null===(n=k[e.target.name])||void 0===n?void 0:n.call(k,e.target.value)}}))};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(RA,{passedAccountId:m.id,showCreateDepartment:h,setShowCreateDepartment:v,onComplete:async(e,n)=>{y(e=>fXn(fXn({},e),{},{department:{value:n.departmentId,error:""}}))}}),(0,Ze.jsxs)(xXn,{container:!0,item:!0,children:[(0,Ze.jsxs)(bXn,{item:!0,span:6,children:[(0,Ze.jsx)(vXn,{children:(0,Ze.jsx)(hXn,{children:(0,Ze.jsx)(Je.A,{id:"profile.firstName"})})}),(0,Ze.jsx)(ze.ks,{onChange:j,value:f.first_name.value,error:f.first_name.error,name:"first_name",box:!0}),(0,Ze.jsx)(vXn,{children:(0,Ze.jsx)(hXn,{children:(0,Ze.jsx)(Je.A,{id:"profile.jobTitle"})})}),(0,Ze.jsx)(ze.ks,{onChange:j,value:f.jobTitle.value,error:f.jobTitle.error,name:"jobTitle",box:!0}),(0,Ze.jsx)(vXn,{children:(0,Ze.jsx)(hXn,{children:(0,Ze.jsx)(Je.A,{id:"profile.phoneNumber"})})}),(0,Ze.jsx)(ze.ks,{onChange:j,value:f.phone.value,error:f.phone.error,name:"phone",box:!0})]}),(0,Ze.jsxs)(bXn,{item:!0,span:6,children:[(0,Ze.jsx)(vXn,{children:(0,Ze.jsx)(hXn,{children:(0,Ze.jsx)(Je.A,{id:"profile.lastName"})})}),(0,Ze.jsx)(ze.ks,{onChange:j,value:f.last_name.value,error:f.last_name.error,name:"last_name",box:!0}),(0,Ze.jsx)(vXn,{children:(0,Ze.jsx)(hXn,{children:(0,Ze.jsx)(Je.A,{id:"profile.department"})})}),b(j),(0,Ze.jsx)(vXn,{children:(0,Ze.jsx)(hXn,{children:(0,Ze.jsx)(Je.A,{id:"profile.mobileNumber"})})}),(0,Ze.jsx)(ze.ks,{onChange:j,value:f.mobile.value,error:f.mobile.error,name:"mobile",box:!0})]})]}),(0,Ze.jsx)(xXn,{container:!0,item:!0,children:(0,Ze.jsxs)(bXn,{item:!0,span:12,children:[(0,Ze.jsx)(vXn,{children:(0,Ze.jsx)(hXn,{children:(0,Ze.jsx)(Je.A,{id:"profile.emailAddress"})})}),(0,Ze.jsx)(ze.ks,{onChange:j,value:f.email.value,error:f.email.error,name:"email",box:!0})]})}),(0,Ze.jsxs)(xXn,{container:!0,item:!0,children:[(0,Ze.jsx)(bXn,{item:!0,span:3}),(0,Ze.jsx)(bXn,{item:!0,span:6,children:(0,Ze.jsx)(ze.$n,{disabled:!x||(()=>{let e=!1;return Object.keys(f).forEach(n=>{f[n].error&&(e=!0)}),e})(),onClick:()=>{const{first_name:e,last_name:t,jobTitle:a,phone:r,department:i,mobile:o,email:l}=f;O({variables:{id:u,account_id:n.account.id,email:l.value,previousEmail:n.email,first_name:e.value,last_name:t.value,jobTitle:a.value,department:"notSelected"!==i.value?i.value:null,phone:r.value,mobile:o.value,profile:p}}),T(!1)},color:"success",children:(0,Ze.jsx)(Je.A,{id:"profile.update"})})})]})]})});var OXn,kXn,jXn;function CXn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const SXn=Ge.default.div(OXn||(OXn=CXn(["\n  padding: ",";\n"])),e=>e.theme.geometry.lg.spacing),NXn=(0,Ge.default)(ze.DZ)(kXn||(kXn=CXn(["\n  text-align: center;\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),wXn=(0,Ge.default)(ze.fv)(jXn||(jXn=CXn(["\n  padding: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing),DXn=e=>{let{imageUrl:n,onSubmit:t}=e;return(0,Ze.jsxs)(SXn,{children:[(0,Ze.jsx)(NXn,{name:"upload-account__heading",size:"lg",children:"Add/Edit Profile Picture"}),(0,Ze.jsx)(ze.fI,{container:!0,align:"between",children:(0,Ze.jsx)(wXn,{item:!0,container:!0,children:(0,Ze.jsx)(ze.nE,{width:200,height:200,border:20,defaultImage:n||"",onSave:e=>t(e),acceptedFormats:["image/png","image/jpeg","image/svg+xml","image/gif"],outputFormat:{format:"image/png",width:200,height:200}})})})]})};var AXn,RXn,PXn,LXn,IXn,EXn,_Xn;function FXn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function BXn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?FXn(Object(t),!0).forEach(function(n){UXn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):FXn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function UXn(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function MXn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const VXn=Ge.default.div(AXn||(AXn=MXn(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),zXn=Ge.default.div(RXn||(RXn=MXn(["\n  display: flex;\n  height: 100%;\n  justify-content: center;\n  align-items: center;\n"]))),GXn=(0,Ge.default)(ze.fI)(PXn||(PXn=MXn(["\n  background-color: ",";\n  width: 100%;\n  display: flex;\n"])),e=>e.theme.colors.basic.white),$Xn=(0,Ge.default)(ze.fv)(LXn||(LXn=MXn(["\n  display: flex;\n  height: 100%;\n  padding: ",";\n  align-items: center;\n"])),e=>e.theme.geometry.md.spacing),WXn=(0,Ge.default)(ze.fv)(IXn||(IXn=MXn(["\n  display: flex;\n  height: 100%;\n  padding: ",";\n  align-items: center;\n"])),e=>e.theme.geometry.md.spacing),qXn=(0,Ge.default)(ze.EY)(EXn||(EXn=MXn(["\n  padding: ",";\n  cursor: ",";\n"])),e=>e.theme.geometry.sm.spacing,e=>e.pointer?"pointer":"default"),JXn=(0,Ge.default)(ze.In)(_Xn||(_Xn=MXn(["\n  margin-right: 10px;\n"]))),YXn=()=>{const[e,n]=(0,g.useState)(!1),[t,a]=(0,g.useState)(null),[r]=(0,Ot.n)(sXn,{onCompleted:()=>{a({message:"Profile picture has been updated",colour:"success"})},onError:()=>{a({message:"Something went wrong. Please try again later.",colour:"danger"})}}),{data:i,loading:o}=Yp();return(0,Ze.jsxs)(VXn,{children:[(0,Ze.jsx)(ige,{name:"ProfilePage",title:"My Profile",breadcrumbs:[{title:"My Profile"}],icon:"user",iconColor:"quaternary"}),o&&(0,Ze.jsx)(zXn,{children:(0,Ze.jsx)(ze.Ip,{})}),e&&(0,Ze.jsx)(ze.aF,{size:"md",show:!0,onDismiss:()=>n(!1),children:(0,Ze.jsx)(DXn,{onSubmit:e=>{r({variables:BXn(BXn({},i),{},{account_id:i.account.id,previousEmail:i.email,imageData:e,contentType:"image/png",fileName:"".concat(i.id,".png"),profile:"".concat(kn("REACT_APP_PROFILE_BUCKET"),"/").concat(i.id,".png?time=").concat((new Date).toISOString())})}),n(!1)},imageUrl:i.profilePicture})}),t&&(0,Ze.jsx)(ze.Eg,{name:"Profile__Notification",show:!0,color:t.colour,onClose:()=>a(null),children:t.message}),!o&&i&&(0,Ze.jsxs)(GXn,{item:!0,container:!0,children:[(0,Ze.jsxs)($Xn,{span:"3",children:[(0,Ze.jsx)(ze.Y3,{border:!0,name:"profile-picture",src:i.profilePicture,size:"xl",accountName:i.first_name}),(0,Ze.jsxs)(qXn,{pointer:!0,onClick:()=>n(!0),children:[(0,Ze.jsx)(JXn,{icon:"pencil-alt"}),(0,Ze.jsx)(Je.A,{id:"profile.editProfilePicture"})]}),(0,Ze.jsxs)(qXn,{children:[(0,Ze.jsx)(JXn,{icon:"id-card"}),"".concat(i.first_name," ").concat(i.last_name)]}),(0,Ze.jsxs)(qXn,{children:[(0,Ze.jsx)(JXn,{icon:"user-tag"}),i.role.name]}),(0,Ze.jsxs)(qXn,{children:[(0,Ze.jsx)(JXn,{icon:"building"}),i.account.name]})]}),(0,Ze.jsx)(WXn,{span:"9",children:(0,Ze.jsx)(TXn,{user:i,setNotification:a})})]})]})};var HXn,KXn,QXn;function ZXn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const XXn=Ge.default.div(HXn||(HXn=ZXn(["\n  @keyframes fade_in_show {\n    0% {\n      opacity: 0;\n      transform: scale(0);\n    }\n    100% {\n      opacity: 1;\n      transform: scale(1);\n    }\n  }\n  position: absolute;\n  left: 0px;\n  background: #fff;\n  width: 100%;\n  bottom: 0;\n  margin: 0 0 45px 0;\n  padding: 25px 70px;\n  border-top: 1px solid #d2d2d2;\n  border-bottom: 1px solid #d2d2d2;\n  z-index: 1;\n  display: flex;\n  flex-direction: row;\n  animation: fade_in_show 0.2s;\n  svg {\n    margin: 0 20px 0 0;\n  }\n  svg:last-child {\n    margin-left: 50px;\n  }\n"]))),e0n=(0,Ge.default)(ze.fv)(KXn||(KXn=ZXn(["\n  flex: 1 1 auto;\n  align-items: center;\n  display: flex;\n  flex-direction: row;\n  font-size: 21px;\n"]))),n0n=(0,Ge.default)(ze.$n)(QXn||(QXn=ZXn(["\n  width: 200px;\n"]))),t0n=e=>{const{cart:n}=e,{state:{linesCount:t,subTotal:a,currency:{symbol:r}}}=n;return(0,Ze.jsxs)(XXn,{children:[(0,Ze.jsxs)(e0n,{children:[(0,Ze.jsx)(ze.In,{icon:"check",color:"#59c5b5"}),t," Items added ",(0,Ze.jsx)(ze.In,{icon:"check",color:"#59c5b5"})," Total: ",r,a]}),(0,Ze.jsx)(ze.fv,{children:(0,Ze.jsx)(p.Link,{to:"/upgrade/cart",children:(0,Ze.jsx)(n0n,{name:"Basket-Button",children:"Go to Basket"})})})]})};var a0n,r0n,i0n,o0n,l0n,s0n,c0n;function d0n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const u0n=Ge.default.div(a0n||(a0n=d0n(["\n  height: 100%;\n  padding: ",";\n  position: relative;\n"])),e=>e.theme.geometry.md.spacing),p0n=Ge.default.div(r0n||(r0n=d0n(["\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  background: #f8f8f8;\n  border-radius: 2px;\n"]))),m0n=(0,Ge.default)(ze.fI)(i0n||(i0n=d0n(["\n  background: white;\n  flex: 0 1 auto;\n  border-radius: 2px;\n  min-height: 119px;\n  justify-content: space-between;\n"]))),f0n=(0,Ge.default)(ze.fv)(o0n||(o0n=d0n(["\n  flex: 1;\n  align-items: baseline;\n  justify-content: center;\n  display: flex;\n  padding-left: 30px;\n"]))),y0n=(0,Ge.default)(ze.fv)(l0n||(l0n=d0n(["\n  display: flex;\n  flex-direction: row;\n  padding-right: 30px;\n"]))),g0n=Ge.default.h1(s0n||(s0n=d0n(["\n  text-align: center;\n  font-size: 28px;\n  color: ",";\n"])),e=>e.theme.colors.text.light.text),b0n=(0,Ge.default)(ze.KK)(c0n||(c0n=d0n(["\n  text-align: center;\n  font-size: 10px;\n  min-width: 165px;\n  margin: 20px 0px 20px 20px;\n  display: inline-block;\n  border-radius: 12px;\n  padding: 13px 16px 5px 16px;\n  p {\n    font-size: 16px;\n  }\n"])));function h0n(e){const{cart:n={},children:t="",route:a="account"}=e,{state:{isCartEmpty:r}}=n,i=(0,Ge.useTheme)(),o=(0,m.Zp)(),l="courses"===a,s=!(r||"cart"===a||"checkout"===a);return(0,Ze.jsxs)(u0n,{children:[s?(0,Ze.jsx)(t0n,{cart:n}):null,(0,Ze.jsxs)(p0n,{name:"Market-Body__Container",children:[(0,Ze.jsxs)(m0n,{container:!0,item:!0,children:[(0,Ze.jsx)(f0n,{children:(0,Ze.jsx)(g0n,{children:"How would you like to upgrade?"})}),(0,Ze.jsx)(y0n,{children:(0,Ze.jsx)(b0n,{title:"Courses",name:"Market-Body__Courses-Tab",icon:"graduation-cap",iconColor:i.colors.text.normal.background,active:l,onClick:()=>o("/upgrade/courses")})})]}),g.cloneElement(t,{isCartVisible:s})]})]})}var v0n,x0n,T0n,O0n,k0n,j0n,C0n,S0n,N0n,w0n,D0n,A0n,R0n,P0n,L0n,I0n,E0n,_0n,F0n;function B0n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const U0n=Ge.default.div(v0n||(v0n=B0n(["\n  width: 100%;\n  height: 100%;\n  overflow: hidden;\n  overflow-y: visible;\n  background-color: #f8f8f8;\n\n  > div {\n    margin: 0 auto;\n    max-width: 1200px;\n    background-color: #f8f8f8;\n    padding: 40px 0 60px;\n  }\n\n  h2 {\n    font-size: 26px;\n    margin-bottom: 40px;\n\n    svg {\n      margin-left: 25px;\n    }\n  }\n\n  h4 {\n    font-size: 20px;\n  }\n\n  .cart-line {\n    border-bottom: 2px solid #ccc;\n    background-color: rgba(204, 204, 204, 0.2);\n    height: 60px;\n    padding-left: 25px;\n\n    > div {\n      height: 100%;\n    }\n  }\n\n  .cart-lines h4 {\n    margin-bottom: 10px;\n  }\n\n  .cart-lines.cart-lines-learn {\n    .cart-lines-title {\n      color: #00baff;\n    }\n\n    .cart-line {\n      border-bottom: 2px solid #00baff;\n      background-color: #dff2f9;\n    }\n\n    .cart-line:first-child {\n      border-top: 2px solid #00baff;\n    }\n  }\n\n  .cart-lines.cart-lines-comply {\n    .cart-lines-title {\n      color: #00c8b5;\n    }\n\n    .cart-line {\n      border-bottom: 2px solid #00c8b5;\n      background-color: #f0f7f6;\n    }\n\n    .cart-line:first-child {\n      border-top: 2px solid #00c8b5;\n    }\n  }\n"]))),M0n=(Ge.default.div(x0n||(x0n=B0n(["\n  border-bottom: 2px solid #ccc;\n  background-color: rgba(204, 204, 204, 0.2);\n  height: 60px;\n  padding-left: 25px;\n\n  > div {\n    height: 100%;\n  }\n"]))),Ge.default.div(T0n||(T0n=B0n(["\n  margin-bottom: 50px;\n\n  > div:first-child {\n    border-top: 2px solid #ccc;\n  }\n"])))),V0n=Ge.default.span(O0n||(O0n=B0n(["\n  font-size: 18px;\n"]))),z0n=Ge.default.span(k0n||(k0n=B0n(["\n  font-size: 18px;\n"]))),G0n=(0,Ge.default)(ze.In)(j0n||(j0n=B0n(["\n  color: #ff909a;\n  font-size: 20px;\n  cursor: pointer;\n"]))),$0n=Ge.default.div(C0n||(C0n=B0n(["\n  margin-top: 50px;\n"]))),W0n=Ge.default.span(S0n||(S0n=B0n(["\n  font-size: 24px;\n"]))),q0n=Ge.default.span(N0n||(N0n=B0n(["\n  font-size: 13px;\n"]))),J0n=(0,Ge.default)(ze.$n)(w0n||(w0n=B0n(["\n  margin: 0 auto;\n  background-color: #00c8b5;\n  border-color: #00c8b5;\n  border-radius: 5px;\n  cursor: pointer;\n  font-size: 20px;\n  text-transform: capitalize;\n\n  &:hover {\n    background-color: #00c8b5;\n    border-color: #00c8b5;\n    opacity: 0.8;\n  }\n"]))),Y0n=(0,Ge.default)(ze.In)(D0n||(D0n=B0n(["\n  font-size: 18px;\n"]))),H0n=Ge.default.span(A0n||(A0n=B0n(["\n  padding-left: 20px;\n  font-size: 13px;\n  color: #000;\n  text-decoration: underline;\n"]))),K0n=Ge.default.div(R0n||(R0n=B0n(["\n  margin: 50px 0 20px;\n  text-align: center;\n\n  h2 {\n    font-size: 24px;\n  }\n\n  p {\n    font-size: 18px;\n  }\n\n  a {\n    color: rgba(59, 134, 255, 1);\n    text-decoration: underline;\n    cursor: pointer;\n  }\n"]))),Q0n=Ge.default.div(P0n||(P0n=B0n(["\n  margin-right: 20px;\n"]))),Z0n=(Ge.default.div(L0n||(L0n=B0n(["\n  margin-top: -25px;\n  text-align: center;\n  font-size: 20px;\n"]))),Ge.default.div(I0n||(I0n=B0n(["\n  margin: 0 auto;\n  width: 230px;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n"]))),(0,Ge.default)(ze.fv)(E0n||(E0n=B0n(["\n  padding-right: 16px;\n"])))),X0n=(0,Ge.default)(ze.ks)(_0n||(_0n=B0n(["\n  border: 2px solid #00baff;\n  border-radius: 5px 0 0 5px;\n  & > div {\n    border-radius: 5px;\n    outline: none;\n    border: none;\n  }\n  & input:focus,\n  & input:active {\n    background-color: #dff2f9;\n  }\n"]))),e1n=(0,Ge.default)(ze.$n)(F0n||(F0n=B0n(["\n  background-color: #00baff;\n  border-radius: 0 5px 5px 0;\n  border: none;\n  cursor: pointer;\n"])));var n1n,t1n,a1n,r1n,i1n,o1n,l1n,s1n,c1n,d1n,u1n,p1n,m1n,f1n=t(31991),y1n=t.n(f1n);function g1n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const b1n=Ge.default.div(n1n||(n1n=g1n(["\n  background: #fff;\n  display: flex;\n  flex-direction: column;\n  border-radius: 2px;\n"]))),h1n=(0,Ge.default)(ze.fv)(t1n||(t1n=g1n(["\n  ","\n"])),e=>{let{isInCart:n}=e;return"\n    flex-basis: content;\n    color: ".concat(n?"unset":"#50b9f9",";\n    font-weight: ").concat(n?"unset":"bold",";\n    text-decoration: ").concat(n?"unset":"underline",";\n    cursor: ").concat(n?"unset":"pointer",";;\n  ")}),v1n=Ge.default.div(a1n||(a1n=g1n(["\n  background: #50b9f9;\n  height: 60px;\n  align-items: center;\n  display: flex;\n  padding: 0 15px 0 15px;\n  flex-direction: row;\n  color: #fff;\n  border-top-left-radius: 2px;\n  border-top-right-radius: 2px;\n"]))),x1n=Ge.default.div(r1n||(r1n=g1n(["\n  flex: 1 1 100%;\n  display: flex;\n"]))),T1n=Ge.default.div(i1n||(i1n=g1n(["\n  border-radius: 12px;\n  padding: 6px 10px 6px 10px;\n  border: 1px solid;\n  font-size: 12px;\n  margin-left: 10px;\n"]))),O1n=Ge.default.div(o1n||(o1n=g1n(["\n  min-height: 150px;\n  padding: 20px 15px 20px 15px;\n  display: flex;\n  flex-direction: column;\n  flex: 1 1 auto;\n"]))),k1n=Ge.default.div(l1n||(l1n=g1n(["\n  flex: 1 1 100%;\n  display: flex;\n  margin: 10px 0 5px 0;\n"]))),j1n=Ge.default.img(s1n||(s1n=g1n(["\n  width: 100px;\n  height: 100px;\n  margin: 0 20px 0 0;\n  float: left;\n"]))),C1n=Ge.default.div(c1n||(c1n=g1n(["\n  > div {\n    padding: 0 20px 20px;\n    align-items: center;\n  }\n"]))),S1n=(0,Ge.default)(ze.fI)(d1n||(d1n=g1n(["\n  align-items: center;\n  text-align: right;\n"]))),N1n=Ge.default.span(u1n||(u1n=g1n(["\n  a {\n    text-decoration: underline;\n  }\n\n  a:hover {\n    text-decoration: none;\n  }\n"]))),w1n=Ge.default.div(p1n||(p1n=g1n(["\n  text-align: right;\n  color: ",";\n\n  a {\n    text-decoration: underline;\n  }\n\n  a:hover {\n    text-decoration: none;\n  }\n"])),e=>e.theme.colors.senary.light.text),D1n=(0,Ge.default)(ze.fv)(m1n||(m1n=g1n(["\n  text-align: left;\n"]))),A1n=e=>(e?parseFloat(e):0).toFixed(2),R1n=e=>{const{id:n,title:t,productType:a,description:r,synopsis:i,price:o,addProduct:l=()=>{},handlePreview:s=()=>{},link:c,firstCategory:d,image:u,isInCart:p=!1}=e,m={id:n,title:t,price:o,productType:a,previewProductInfo:null!=e&&e.courses?e.courses[0]:null};return(0,Ze.jsxs)(b1n,{name:"Courses-Tab__Product-Card",children:[(0,Ze.jsxs)(v1n,{children:[(0,Ze.jsx)(x1n,{name:"Product-Card__Product-Left--Title",children:(0,Ze.jsx)("h4",{children:t})}),d?(0,Ze.jsx)(T1n,{children:d}):null]}),(0,Ze.jsx)(O1n,{children:(0,Ze.jsxs)(k1n,{children:[u?(0,Ze.jsx)(j1n,{src:u}):null,a===Wa?(0,Ze.jsx)(ze.To,{name:"Bundle__MarkDown--Description",source:y1n()(r,{length:100,separator:" ",omission:" ..."})}):i]})}),(0,Ze.jsxs)(C1n,{children:[(0,Ze.jsx)(S1n,{container:!0,children:(0,Ze.jsxs)(ze.fv,{span:"12",children:[(0,Ze.jsxs)(w1n,{children:["£",A1n(o)]}),"ex. VAT"]})}),(0,Ze.jsxs)(S1n,{container:!0,children:[(0,Ze.jsx)(D1n,{span:"6",children:(0,Ze.jsx)(N1n,{children:c?(0,Ze.jsx)("a",{href:"/#",onClick:n=>{n.preventDefault(),s(e)},children:"Course Preview"}):null})}),(0,Ze.jsx)(ze.fv,{span:"6",children:p?(0,Ze.jsx)(h1n,{isInCart:p,container:!0,children:"In Basket"}):(0,Ze.jsx)(h1n,{name:"Product-Card__Add-To-Basket--Button",container:!0,onClick:e=>{e.preventDefault(),l(m)},children:"Add To Basket"})})]})]})]})};var P1n,L1n,I1n,E1n,_1n,F1n;function B1n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const U1n=(0,Ge.default)(ze.fI)(P1n||(P1n=B1n(["\n  padding: ",";\n  background: ",";\n"])),e=>e.theme.geometry.lg.spacing,e=>e.theme.colors.basic.white),M1n=Ge.default.div(L1n||(L1n=B1n(["\n  position: relative;\n  padding: 0 0 75% 0;\n  flex: 0 0 auto;\n  background: "," url(",") center center no-repeat;\n  background-size: cover;\n"])),e=>{let{theme:n}=e;return n.colors.secondary.dark.background},e=>{let{src:n}=e;return n}),V1n=(0,Ge.default)(ze.GQ)(I1n||(I1n=B1n(["\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin-top: -50px;\n  margin-left: -50px;\n  display: inline-flex;\n  flex: 0 0 auto;\n"]))),z1n=(0,Ge.default)(ze.fv)(E1n||(E1n=B1n(["\n  padding-left: ",";\n"])),e=>e.theme.geometry.md.spacing),G1n=(0,Ge.default)(ze.DZ)(_1n||(_1n=B1n(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.sm.spacing),$1n=(0,Ge.default)(ze.$n)(F1n||(F1n=B1n(["\n  margin-top: ",";\n  border-radius: 0;\n"])),e=>e.theme.geometry.md.spacing),W1n=e=>{const{bundleInfo:n,onDismiss:t,addProduct:a}=e;return(0,Ze.jsx)(ze.aF,{show:!0,onDismiss:t,size:"lg",children:(0,Ze.jsxs)(U1n,{container:!0,item:!0,children:[(0,Ze.jsx)(ze.fv,{item:!0,span:5,children:(0,Ze.jsx)(M1n,{name:"CoursePreview__Thumbnail",src:n.thumbnail,children:!n.thumbnail&&(0,Ze.jsx)(V1n,{name:"CoursePreview__Icon",height:"100px",size:"lg",icon:"graduation-cap",iconColor:"white",circleColor:"white"})})}),(0,Ze.jsxs)(z1n,{item:!0,span:7,children:[(0,Ze.jsx)(G1n,{size:"xxl",weight:"light",color:"dark",children:n.title}),!!n.description&&(0,Ze.jsx)(ze.To,{name:"CoursePreview__MarkDown--Description",source:n.description}),n.hideBuyButton?null:(0,Ze.jsxs)($1n,{color:"success",inline:!0,href:null,onClick:()=>{a({id:n.product.id,title:n.product.title,price:n.product.price,productType:n.product.productType}),t()},children:["£",A1n(n.price)," Add to basket"]})]})]})})};function q1n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function J1n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q1n(Object(t),!0).forEach(function(n){Y1n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q1n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Y1n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function H1n(e){const[n,t]=(0,g.useState)({show:!1,bundleInfo:null}),{cart:a={},title:r="",lines:i=[],styles:o="base"}=e,{addProduct:l,removeProduct:s,removeLine:c,state:{currency:{symbol:d}}}=a,u="cart-lines cart-lines-".concat(o);return(0,Ze.jsxs)(Ze.Fragment,{children:[n.show?(0,Ze.jsx)(W1n,{bundleInfo:n.bundleInfo,addProduct:l,onDismiss:()=>t(e=>J1n(J1n({},e),{},{show:!1}))}):null,(0,Ze.jsxs)("div",{className:u,children:[(0,Ze.jsxs)(ze.fI,{container:!0,children:[(0,Ze.jsx)(ze.fv,{span:9,children:(0,Ze.jsx)("h4",{className:"cart-lines-title",children:r})}),(0,Ze.jsx)(ze.fv,{span:2,children:(0,Ze.jsx)("h4",{children:"Total Cost"})}),(0,Ze.jsx)(ze.fv,{span:1})]}),(0,Ze.jsx)(M0n,{children:i.map(e=>{let[n,{totalAmount:a,parent:r,resizable:i,quantity:o,product:u={}}={}]=e;return(0,Ze.jsx)("div",{className:"cart-line",children:(0,Ze.jsxs)(ze.fI,{container:!0,itemAlign:"center",align:"between",name:"Cart-Lines__Container",children:[(0,Ze.jsx)(ze.fv,{span:4,children:(0,Ze.jsx)(V0n,{children:u.title})}),(0,Ze.jsx)(ze.fv,{span:3,children:u.productType===Wa?(0,Ze.jsx)(p.Link,{to:"/engage/".concat(u.id),target:"_blank",onClick:e=>{e.preventDefault(),(e=>{const n=e.previewProductInfo;t({show:!0,bundleInfo:{id:e.id,thumbnail:n.metaData.thumbnail,title:n.name,description:n.metaData.description,price:e.price,product:e,hideBuyButton:!0}})})(u)},children:(0,Ze.jsx)(H0n,{children:"Preview"})}):null}),(0,Ze.jsx)(ze.fv,{span:2,children:i&&(0,Ze.jsx)(Q0n,{children:(0,Ze.jsx)(fD,{value:o,onIncrement:()=>l(u),onDecrement:()=>s(u)})})}),(0,Ze.jsx)(ze.fv,{span:2,children:(0,Ze.jsxs)(z0n,{children:[d,a]})}),(0,Ze.jsx)(ze.fv,{span:1,children:!r&&(0,Ze.jsx)(G0n,{name:"Cart-Lines__Delete-Button",onClick:()=>c(n),icon:"times",size:"1x"})})]})},n)})})]})]})}var K1n,Q1n=t(88104),Z1n=t.n(Q1n);function X1n(e){let{defaultValue:n,applyDiscount:t}=e;const[a,r]=(0,g.useState)(n),{showNotification:i}=vt(),o=(0,N.m)();return(0,Ze.jsxs)(ze.fI,{item:!0,container:!0,name:"Discount-Code-Container",children:[(0,Ze.jsx)(X0n,{name:"Discount-Code-Container__Input",placeholder:"Discount code (optional)",value:a,onChange:e=>{const{value:n}=e.target;n||t(null),r(n)},box:!0}),(0,Ze.jsx)(e1n,{disabled:!a,name:"Discount-Code-Container__Verify-Button",onClick:async()=>{try{const{data:{getPromotionCode:e}}=await o.query({query:Z1n(),variables:{code:a}});e?(t(e),i("Discount has been applied","success")):i("Invalid discount code","danger")}catch(e){i(e,"danger")}},title:"Verify discount code",inline:!0,children:(0,Ze.jsx)(ze.In,{icon:"angle-right"})})]})}function e2n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function n2n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?e2n(Object(t),!0).forEach(function(n){t2n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):e2n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function t2n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const a2n=(0,Ge.default)(ze.Ip)(K1n||(K1n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin: 0 auto;\n  position: relative;\n  top: 70px;\n"]))),r2n=(e,n,t)=>"percentage"===e.type?"".concat(e.discount,"% (-").concat(t).concat(n,")"):"".concat(t).concat(e.discount);function i2n(e){var n;let{cart:t}=e;const{state:{data:a,isCartEmpty:r,subTotal:i,newSubTotal:o,total:l,discount:s,discountFixed:c,currency:{symbol:d}},addProduct:u,removeProduct:f,removeLine:y,setDiscount:b}=t,h=(0,m.Zp)(),v=rt(),[x,T]=(0,g.useState)(!1),{data:{capacity:O=1}={},loading:k}=j(v),{data:C,loading:S}=vc(v),{data:{content:N={}},loading:w}=zc(),D=a.filter(e=>{let[,{product:{productType:n}}]=e;return n===Ka})||[],A=a.filter(e=>{let[,{product:{productType:n}}]=e;return"course"===n||n===Ya}),R=a.filter(e=>{let[,{product:{productType:n}}]=e;return"managementSystem"===n}),P=a.filter(e=>{let[,{product:{productType:n}}]=e;return n===Ha||n===Ka}),L=A.length>0,I=R.length>0,E=P.length>0,_=S||w||k;return n2n(n2n({},N[Ka][0]||{}),{},{title:"Additional users"}),null===(n=new Map(a).get("accountCapacity_id"))||void 0===n||n.quantity,_?(0,Ze.jsx)(a2n,{}):(0,Ze.jsx)(U0n,{children:(0,Ze.jsxs)("div",{children:[r&&(0,Ze.jsxs)(K0n,{children:[(0,Ze.jsxs)("h2",{children:["Your Basket is empty",(0,Ze.jsx)(Y0n,{icon:"cart-arrow-down"})]}),(0,Ze.jsxs)("p",{children:["View courses in the ",(0,Ze.jsx)(p.Link,{to:"/upgrade/courses",children:"Market section"})]})]}),!r&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)("h2",{children:["Your Basket ",(0,Ze.jsx)(Y0n,{icon:"cart-arrow-down"})]}),(0,Ze.jsxs)("div",{children:[E&&(0,Ze.jsx)(H1n,{title:"Subscription",cart:t,lines:P}),L&&(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(H1n,{title:"Learn Items",cart:t,styles:"learn",lines:A})}),I&&(0,Ze.jsx)(H1n,{title:"Governance Items",cart:t,styles:"comply",lines:R})]}),(0,Ze.jsx)($0n,{children:(0,Ze.jsxs)(ze.fI,{container:!0,itemAlign:"center",distribution:"between",children:[(0,Ze.jsxs)(ze.fv,{span:6,children:[(0,Ze.jsxs)(W0n,{children:["Subtotal: ",d,i]}),(0,Ze.jsx)("br",{}),s&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(q0n,{name:"Cart-Discount",children:["Discount: ",r2n(s,c,d)]}),(0,Ze.jsx)("br",{}),(0,Ze.jsxs)(q0n,{children:["New subtotal: ",d,o]}),(0,Ze.jsx)("br",{})]}),(0,Ze.jsxs)(q0n,{children:["Total including VAT: ",d,l]})]}),(0,Ze.jsx)(Z0n,{span:3,children:(0,Ze.jsx)(X1n,{defaultValue:null==s?void 0:s.code,applyDiscount:b})}),(0,Ze.jsx)(ze.fv,{span:3,children:(0,Ze.jsx)(J0n,{name:"Cart-Pay-Button",onClick:()=>{let e=0,n=!1;const t=D[0]?D[0][1]:{},a=((null==t?void 0:t.quantity)||0)+O,r=new Map(C.map(e=>{let{productId:n,count:t}=e;return[n,t.reduce((e,n)=>{let{count:t}=n;return e+t},0)]}));A.forEach(t=>{let[a,{quantity:i}]=t;const o=r.has(a)?r.get(a)+i:i;o>e&&(e=o),i>0&&(n=!0)}),a<e&&n&&h("/upgrade/checkout")},children:"Buy Now"})})]})})]})]})})}var o2n;const l2n=Ge.default.div(o2n||(o2n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  padding: 0px 30px;\n"])));function s2n(){const e=Pc();return(0,Ze.jsx)(h0n,{route:"cart",cart:e,children:(0,Ze.jsx)(l2n,{children:(0,Ze.jsx)(i2n,{cart:e})})})}var c2n,d2n,u2n,p2n,m2n,f2n,y2n,g2n;function b2n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const h2n=[{value:"desc",label:"Newest"},{value:"asc",label:"Oldest"}],v2n=(0,Ge.default)(ze.fI)(c2n||(c2n=b2n(["\n  padding: 40px 50px 40px 50px;\n"]))),x2n=Ge.default.div(d2n||(d2n=b2n(["\n  background: #fff;\n  padding: 2px 10px 2px 10px;\n  border-radius: 2px;\n"]))),T2n=(0,Ge.css)(u2n||(u2n=b2n(["\n  border: none;\n  background: none;\n  &:focus-within,\n  &:hover,\n  .focus {\n    background: none;\n  }\n"]))),O2n=(0,Ge.default)(ze.l6)(p2n||(p2n=b2n(["\n  ","\n  min-width: 120px;\n"])),T2n),k2n=(0,Ge.default)(ze.l6)(m2n||(m2n=b2n(["\n  ","\n  min-width: 165px;\n"])),T2n),j2n=Ge.default.div(f2n||(f2n=b2n(["\n  display: grid;\n  grid-template-columns: repeat(3, 1fr);\n  column-gap: 25px;\n  row-gap: 25px;\n  padding: 0px 50px 0px 50px;\n"]))),C2n=Ge.default.div(y2n||(y2n=b2n(["\n  overflow-x: hidden;\n  overflow-y: scroll;\n  &.isCartVisible {\n    margin-bottom: 130px;\n  }\n"]))),S2n=(0,Ge.default)(ze.EY)(g2n||(g2n=b2n(["\n  text-align: center;\n  margin: 20px 0 15px 0;\n  a:hover {\n    text-decoration: underline;\n  }\n"]))),N2n=()=>(0,Ze.jsx)(S2n,{children:(0,Ze.jsx)(p.Link,{to:"/contact",children:"Can’t find what you are looking for? Contact us to find out more"})}),w2n=["id"];function D2n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function A2n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D2n(Object(t),!0).forEach(function(n){R2n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D2n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function R2n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const P2n=e=>{let{cart:n,content:t,isCartVisible:a}=e;const[r,i]=(0,kd.useQueryParams)({courseId:(0,kd.withDefault)(kd.StringParam,null)}),[o,l]=(0,g.useState)({search:"",sortingByDate:"desc",sortingByCategory:"allCategories"}),[s,c]=(0,g.useState)({show:!1,bundleInfo:null}),{addProduct:d,hasProduct:u,removeLine:p,findLine:m}=n,f=t.courseBundle.reduce((e,n)=>(n.courses.forEach(n=>{var t;null===(t=n.metaData)||void 0===t||null===(t=t.categories)||void 0===t||t.forEach(n=>{e.add(n)})}),e),new Set),y=new Map([...f].flatMap(e=>{const n=kK.find(n=>n.value===e);if(n){const{value:e,label:t}=n;return[[e,t]]}return[]})),b=new Set,h=e=>d(A2n({},e),1,null,!1),v=(0,g.useCallback)(e=>t[Ya].find(n=>n.id===e),[t]),x=(0,g.useCallback)(e=>{c({show:!0,bundleInfo:{id:e.id,thumbnail:e.image,title:e.title,description:e.description,price:e.price,product:e,hideBuyButton:n.hasProduct(e.id)}})},[n]),T=(0,g.useCallback)(e=>{i({courseId:e.id});const n=v(e.id);n&&x(n)},[i,v,x]);(0,g.useEffect)(()=>{if(r.courseId){const e=v(r.courseId);e&&!n.hasProduct(e.id)&&x(e)}},[r.courseId,v,x,n]);const O=(0,zt.orderBy)(t[Ya].map(e=>{const{courses:n=[]}=e,t=new Set;return n.forEach(e=>{const n=null==e?void 0:e.metaData.categories;n&&n.forEach(e=>{t.add(e),b.add(e)})}),A2n(A2n({},e),{},{categories:t,firstCategory:t.size&&(0,zt.startCase)([...t][0].toLocaleLowerCase())})}).filter(e=>{const n=e.title.toLocaleLowerCase().includes(o.search)||e.description.toLocaleLowerCase().includes(o.search),t="allCategories"===o.sortingByCategory||e.categories.has(o.sortingByCategory.toUpperCase());return n&&t}),"createdAt","desc"===o.sortingByDate?"desc":"asc"),k=e=>{const{quantity:n}=m(e)||{quantity:0};return n},j=[{value:"allCategories",label:"All categories"},...[...b].map(e=>({value:e,label:y.get(e)}))];return(0,Ze.jsxs)(Ze.Fragment,{children:[s.show?(0,Ze.jsx)(W1n,{bundleInfo:s.bundleInfo,addProduct:h,onDismiss:()=>c(e=>A2n(A2n({},e),{},{show:!1}))}):null,(0,Ze.jsx)(v2n,{children:(0,Ze.jsx)(x2n,{children:(0,Ze.jsx)(ze.sG,{id:"TextInputWithMultiDropdown",name:"TextInputWithMultiDropdown",inline:!1,disabled:!1,pill:!0,box:!0,size:"md",iconType:"search",success:"",error:"",textPlaceHolder:"Search for Title, Subject, Content",onTextChange:e=>{e.persist(),l(n=>{var t;return A2n(A2n({},n),{},{search:null===(t=e.target)||void 0===t?void 0:t.value.toLocaleLowerCase()})})},multiSelectList:[{transferredSelect:O2n,selectValue:"Select Value",selectPlaceholder:"Newest",options:h2n,onSelectChange:e=>{l(n=>{var t;return A2n(A2n({},n),{},{sortingByDate:null===(t=e.target)||void 0===t?void 0:t.value})})}},{transferredSelect:k2n,selectValue:"",selectPlaceholder:"All Categories",options:j,onSelectChange:e=>{l(n=>{var t;return A2n(A2n({},n),{},{sortingByCategory:null===(t=e.target)||void 0===t?void 0:t.value})})}}]})})}),(0,Ze.jsxs)(C2n,{className:a?"isCartVisible":"",children:[(0,Ze.jsx)(j2n,{children:O.map(e=>{let{id:n}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,w2n);return(0,g.createElement)(R1n,A2n(A2n({},A2n(A2n({id:n},t),{},{quantity:k(n)})),{},{key:n,isInCart:u(n),addProduct:h,removeLine:p,link:t.productType===Wa,handlePreview:T}))})}),(0,Ze.jsx)(N2n,{})]})]})};var L2n;const I2n=(0,Ge.default)(ze.Ip)(L2n||(L2n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin: 0 auto;\n  position: relative;\n  top: 70px;\n"])));function E2n(){var e;const{route:n="courses"}=(0,m.g)(),t=Pc(),{data:{content:a},loading:r}=zc(),{data:i,loading:o}=Yp(),{data:{content:l},loading:s}=Sc(rt()),c={courses:P2n}[n],d=(o||r||s)&&(!a.itemList||(null===(e=a.itemList)||void 0===e?void 0:e.length)<1),u=l.length;return(0,Ze.jsx)(h0n,{route:n,cart:t,children:d?(0,Ze.jsx)(I2n,{}):(0,Ze.jsx)(c,{cart:t,content:a,currentUser:i,accountUsersCount:u})})}function _2n(){const e=Pc();return(0,Ze.jsx)(h0n,{route:"checkout",cart:e})}const F2n=()=>{const e=oc();return(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:e.market.checkout,element:(0,Ze.jsx)(_2n,{})}),(0,Ze.jsx)(m.qh,{path:e.market.cart,element:(0,Ze.jsx)(s2n,{})}),(0,Ze.jsx)(m.qh,{path:"/:route",element:(0,Ze.jsx)(E2n,{})}),(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(m.C5,{to:"/upgrade/courses"})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(Xg,{})})]})};var B2n;const U2n=Ge.default.iframe(B2n||(B2n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  height: 100%;\n"]))),M2n=(0,Ye.Ay)(()=>(0,Ze.jsx)(U2n,{id:"flowsFrame",src:"/rio-flows/flows/"}));var V2n,z2n,G2n;function $2n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const W2n=Ge.default.div(V2n||(V2n=$2n(["\n  height: 100%;\n  overflow: visible;\n"]))),q2n=Ge.default.div(z2n||(z2n=$2n(["\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 2;\n  background-color: white;\n  opacity: 0.5;\n  width: 100%;\n  height: 100%;\n"]))),J2n=(0,Ge.default)(Tn)(G2n||(G2n=$2n(["\n  margin-bottom: ",";\n  z-index: 3;\n  position: relative;\n"])),e=>e.theme.geometry.md.spacing),Y2n=()=>{const e=Pu(),n=!!e&&e.accessControls.flows;return(0,Ze.jsxs)(Ze.Fragment,{children:[!n&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(q2n,{}),(0,Ze.jsx)(J2n,{name:"FormsContainer_Access_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Flows",body:"Currently Flows are not included in your subscription, if you’d like access to Flows please contact Rio AI Ltd or get in touch with your Business Admin."})]}),n&&(0,Ze.jsx)(W2n,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(M2n,{})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(Xg,{})})]})})]})};function H2n(){var e,n;const t=Pu(),[a,r,i]=(0,m.KC)(),{token:o}=at(),l=(0,m.Zp)(),s=rc();pc();const{data:c}=Td(),d=oc(),u=o?o.given_name:"",p=iv(y$n,"learn.home",{onFinish:()=>l(d.learn.root)},[{title:"learnTour.home.item1.title",content:"learnTour.home.item1.content",placement:"center",target:"body",textAlign:"left",disableBeacon:!0},{title:"Get studying",content:"Upgrade your knowledge with our accredited learning",placement:"auto",target:'[name="Sidebar__NavLink--Learn-NavLinkStyled"]',textAlign:"left",floaterProps:{disableAnimation:!0},disableBeacon:!0}],u),f=null==t||null===(e=t.accessControls)||void 0===e?void 0:e.tasks,y=null==t||null===(n=t.accessControls)||void 0===n?void 0:n.projects;return(0,m.Ye)((0,m.Eu)((0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(m.qh,{path:d.home.root,element:(0,Ze.jsx)(p,{}),errorElement:(0,Ze.jsx)(Rh,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.learn.root,"/*"),element:(0,Ze.jsx)(qHn,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.governance.root,"/*"),element:(0,Ze.jsx)(GDn,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.surveys.root,"/*"),element:(0,Ze.jsx)(iVn,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.data.root,"/*"),element:(0,Ze.jsx)(RXe,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.reporting.root,"/*"),element:(0,Ze.jsx)(Ton,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.docs.root,"/*"),element:(0,Ze.jsx)(Lqn,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.tasks.root,"/:id"),element:(0,Ze.jsx)(CKn,{hasProjectsAccess:y})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.tasks.root,"/*"),element:(0,Ze.jsx)(aXn,{hasProjectsAccess:y,hasTasksAccess:f,tab:d.tasks.root})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.projects.root,"/:id"),element:(0,Ze.jsx)($Zn,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.projects.root,"/*"),element:(0,Ze.jsx)(aXn,{hasProjectsAccess:y,hasTasksAccess:f,tab:"/".concat(d.projects.root)})}),!!s.configurationRoute&&(0,Ze.jsx)(m.qh,{path:"".concat(d.configuration.root,"/*"),element:(0,Ze.jsx)(JCe,{massUploadFunction:a,setCreateMutation:(e,n)=>{r(e),n&&i(n)}})}),!!c.intelligence&&(0,Ze.jsx)(m.qh,{path:"".concat(d.intelligence.root,"/*"),element:(0,Ze.jsx)(eNe,{})}),!!c.flows&&(0,Ze.jsx)(m.qh,{path:"".concat(d.flows.root,"/*"),element:(0,Ze.jsx)(Y2n,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.header.contact,"/*"),element:(0,Ze.jsx)(mln,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.header.profile,"/*"),element:(0,Ze.jsx)(YXn,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(d.header.upgrade,"/*"),element:(0,Ze.jsx)(F2n,{})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:"".concat(d.home.root)})})]})))}var K2n,Q2n,Z2n,X2n,e5n,n5n;function t5n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const a5n=(0,f.styled)("div")(K2n||(K2n=t5n(["\n  position: fixed;\n  left: 25%;\n  bottom: 16px;\n  width: 50%;\n  height: auto;\n  background: ",";\n  border-radius: 16px;\n  padding: 16px;\n  box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.3);\n"])),e=>e.theme.sys.color.surface),r5n=(0,f.styled)(f.Icons.Check)(Q2n||(Q2n=t5n(["\n  cursor: pointer;\n"]))),i5n=(0,f.styled)(f.Icons.HighlightOff)(Z2n||(Z2n=t5n(["\n  cursor: pointer;\n"]))),o5n=(0,f.styled)(f.Grid)(X2n||(X2n=t5n(["\n  position: relative;\n  align-items: center;\n  height: 48px;\n"]))),l5n=(0,f.styled)(f.LinearProgress)(e5n||(e5n=t5n(["\n  width: 100%;\n"]))),s5n=(0,f.styled)(f.Text)(n5n||(n5n=t5n(["\n  cursor: pointer;\n  text-decoration: underline;\n  min-width: 124px;\n"]))),c5n=e=>e.error?"error":100===e.percents?"success":"primary";function d5n(){const e=$l(),n=null==e?void 0:e.getExports(),[t,a]=(0,g.useState)(null),[r,i]=(0,g.useState)(null);return null!=n&&n.length?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(a5n,{children:n.map(n=>(0,Ze.jsxs)(o5n,{columns:12,container:!0,columnGap:2,children:[(0,Ze.jsxs)(f.Grid,{size:8,children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",textAlign:"center",children:n.fileName}),(0,Ze.jsx)(l5n,{variant:"buffer",color:c5n(n),value:n.percents,valueBuffer:n.step})]}),(0,Ze.jsx)(f.Grid,{size:2,children:n.error?(0,Ze.jsx)(s5n,{typescale:"body",size:"medium",textAlign:"center",onClick:()=>a(n.error),children:"Show error details"}):(0,Ze.jsxs)(f.Text,{typescale:"body",size:"medium",textAlign:"center",children:[Math.round(n.percents)||0,"%"]})}),(0,Ze.jsx)(f.Grid,{size:1,container:!0,justifyContent:"flex-end",children:n.completed?(0,Ze.jsx)(r5n,{onClick:()=>{null==e||e.stopExport(n.id,{shouldDelete:!1})},color:"success"}):(0,Ze.jsx)(i5n,{onClick:()=>{n.error?null==e||e.stopExport(n.id,{shouldDelete:!0}):i(n.id)},color:"error"})})]},n.id))}),(0,Ze.jsx)(f.Modal,{open:!!t,onClose:()=>a(null),title:"Error details:",children:(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:(null==t?void 0:t.message)||(null==t?void 0:t.toString())})}),(0,Ze.jsx)(Z$,{open:!!r,onClose:()=>i(null),title:"Do you want to abort the export?",body:"All progress will be lost.",onConfirm:()=>{null==e||e.stopExport(r,{shouldDelete:!0}),i(null)}})]}):null}const u5n=[Vt.ZU.ReadyForReview,Vt.ZU.Approved,Vt.ZU.InProgress],p5n=e=>{var n;return null==e||null===(n=e.filter(e=>{const{isOverDue:n}=HT(e.deadlineDate),t=JT(e.deadlineDate);return!n&&t||!n&&(!e.submission||!u5n.includes(e.submission.status))}))||void 0===n?void 0:n.length};var m5n,f5n;const y5n=(0,Ge.default)(ze.fv)(f5n||(f5n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  min-width: 100px;\n  height: calc(100% - 32px);\n  position: fixed;\n  flex: 0 0 auto;\n  margin-top: -10px;\n  overflow-y: auto;\n  padding-bottom: 24px;\n\n  &::-webkit-scrollbar {\n    display: none;\n  }\n"])));var g5n;const b5n=(0,f.styled)(f.Header)(g5n||(g5n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  position: fixed;\n  top: 0;\n  width: 100%;\n  z-index: 99;\n  padding-left: 32px;\n  padding-right: 132px; // width of side nav + normal padding\n"]))),h5n=()=>{const{onProfileClick:e,onResetToursClick:n,onLogoutClick:t,accounts:a,onAccountChanged:r,currentAccountId:i,user:o,notifications:l,notificationsLoading:s,notificationsError:c,onNotificationClick:d}=function(){var e,n;const t=(0,m.vL)(),a=_u(),{token:r}=at(),{accounts:i}=fy(r.sub),[o,l]=(0,g.useState)(),s=rt(o),[c]=(0,Ot.n)(Fe),[d]=(0,Ot.n)(Y),{notifications:u,loading:p,error:f}=function(){let{accountId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{data:n,loading:t,error:a}=(0,h.IT)(Wu,{variables:{accountId:e},skip:!e,pollInterval:3e5,errorPolicy:"all"}),r=(0,g.useMemo)(()=>{if(null==n||!n.getDocumentRecordsForReview)return[];const e=new Date,t=new Date;return t.setDate(e.getDate()+14),n.getDocumentRecordsForReview.filter(e=>!!e.reviewDate&&new Date(e.reviewDate)<=t).map(e=>{const n=new Date(e.reviewDate),t=new Date,a=n.getTime()-t.getTime(),r=Math.ceil(a/864e5),i=r<0,o=i?"overdue":"approaching";let l;if(i){const n=Math.abs(r);l="".concat(e.fileName," - ").concat(n," day").concat(1===n?"":"s"," overdue")}else l="".concat(e.fileName," - ").concat(r," day").concat(1===r?"":"s"," until review");return{id:e.id,title:"Document review required",message:l,date:"Review date: ".concat(n.toLocaleDateString("en-GB")),type:"document-review",status:o,daysUntilReview:r}}).sort((e,n)=>"overdue"===e.status&&"overdue"!==n.status?-1:"overdue"!==e.status&&"overdue"===n.status?1:(e.daysUntilReview||0)-(n.daysUntilReview||0))},[n]);return{notifications:r,loading:t,error:!!a}}({accountId:s}),y=(0,g.useMemo)(()=>Object.keys(i).map(e=>({id:e,logo:i[e].logoPath,name:i[e].name})).sort(Ta),[i]),b=(0,g.useCallback)(async e=>{"value"in e&&(await c({variables:{currentAccountId:e.value}}),l(e.value),t.revalidate())},[c,t]),v=(0,m.Zp)(),x=(0,g.useCallback)(()=>{v("/v2/profile")},[v]),T=(0,g.useCallback)(()=>{localStorage.removeItem("TOUR_STATUS")},[]),O=(0,g.useCallback)(e=>{v("/v2/documents/all/".concat(e))},[v]);return{onProfileClick:x,onResetToursClick:T,onLogoutClick:d,onAccountChanged:b,accounts:y,currentAccountId:s,user:{fullname:a?"".concat(null!==(e=a.first_name)&&void 0!==e?e:""," ").concat(a.last_name):"",profilePicture:a&&null!==(n=a.profilePicture)&&void 0!==n?n:null,disableAccountSelector:(null==a?void 0:a.disableAccountSelector)||!1},notifications:u,notificationsLoading:p,notificationsError:f,onNotificationClick:O}}();return(0,Ze.jsx)(b5n,{onProfileClick:e,onResetToursClick:n,onLogoutClick:t,user:o,accounts:a,onAccountChanged:r,selectedAccount:i,notifications:{items:l,loading:s,error:c,onNotificationClick:d}})};var v5n,x5n,T5n,O5n;function k5n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const j5n=(0,f.styled)(f.Surface)(v5n||(v5n=k5n(["\n  display: flex;\n  flex-flow: row nowrap;\n  padding: 24px 0;\n  background-color: ",";\n  height: 100%;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSecondary}),C5n=(0,f.styled)("div")(x5n||(x5n=k5n(["\n  height: 100%;\n  min-height: calc(100vh - 66px);\n  margin-left: 100px;\n  display: flex;\n  flex-flow: column nowrap;\n  flex: 1;\n  overflow: hidden;\n"]))),S5n=(0,f.styled)(f.Surface)(T5n||(T5n=k5n(["\n  display: flex;\n  flex-flow: column nowrap;\n  height: 100%;\n  flex: 1 1 auto;\n  background-color: ",";\n  margin-top: 66px; // header height\n"])),e=>{let{theme:n}=e;return n.sys.color.onSecondary}),N5n=(0,f.styled)(e=>{let{account:n,user:t,receivedSurveys:a,userTasks:r}=e;const i=rt(),{token:o}=at(),{permissions:l}=t.role,{count:s}=(0,g.useMemo)(()=>p5n(a),[a]),c=(0,g.useMemo)(()=>r&&null!=o&&o.sub?r.filter(e=>{var n;return!e.isCompleted&&(null===(n=e.owners)||void 0===n?void 0:n.some(e=>{let{id:n}=e;return n.toLowerCase()===o.sub.toLowerCase()}))}).length:0,[r,null==o?void 0:o.sub]),d=ur.includes(i),u=t.role.role===Vt.gG.Surveysonly,p=(0,g.useMemo)(()=>l.survey.some(e=>e.startsWith("getSurveys")),[l]),{showNotification:m}=vt(),{canAccessLearnWorlds:y}=function(){const e=By("learn");return{get canAccessLearnWorlds(){return e("accessLearnWorlds")}}}(),b=function(){const e=rt(),[n]=(0,gs._)((0,D.J1)(m5n||(m5n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n      query GetLearnWorldsUrl($accountId: ID!) {\n        getLearnWorldsUrl(accountId: $accountId)\n      }\n    "]))),{variables:{accountId:e},fetchPolicy:"network-only"});return async()=>{const{data:e}=await n();return e.getLearnWorldsUrl}}();return(0,Ze.jsx)(y5n,{children:(0,Ze.jsx)(f.NavigationRail,{button:{impact:{show:l.allowedRioModules.includes(Vt.zB.Home)},howto:{show:!!n.accessControls.learn&&l.allowedRioModules.includes(Vt.zB.Engage)},learnworlds:{show:!!n.accessControls.learn&&l.allowedRioModules.includes(Vt.zB.Engage)&&y,onClick:async()=>{try{window.open(await b())}catch(e){de.Cp(e),m("Login to LearnWorlds failed. Please try again, or contact support.","danger")}}},govenance:{show:l.allowedRioModules.includes(Vt.zB.Governance)},surveys:{show:!!n.accessControls.surveys,badge:s,hasAccessToSurveysSent:p},data:{show:l.allowedRioModules.includes(Vt.zB.Data)&&!d},reporting:{show:l.allowedRioModules.includes(Vt.zB.Reporting)&&!d},intelligence:{show:!!n.accessControls.intelligence&&l.allowedRioModules.includes(Vt.zB.Intelligence)&&!d},docs:{show:l.allowedRioModules.includes(Vt.zB.Documents)&&!d},flows:{show:!u&&!!n.accessControls.flows},tasks:{show:!!n.accessControls.tasks&&l.allowedRioModules.includes(Vt.zB.Tasks),badge:c>0?c:void 0},configuration:{show:l.allowedRioModules.includes(Vt.zB.Configuration)&&!d}},v2ShowItems:["flows","tasks","docs","governance",...n.accessControls.intelligence?["intelligence"]:[]]})})})(O5n||(O5n=k5n(["\n  position: fixed !important;\n"]))),w5n=()=>{const[e,n]=(0,g.useState)([]),t=rt(),[a,r]=(0,g.useState)(),[i,o]=(0,g.useState)(),l=(0,m.LG)();return pc(),lt(),(0,Ze.jsxs)(j5n,{className:"v2",children:[(0,Ze.jsx)(N5n,{account:l.getAccountInfo,user:l.getUserInfoById,receivedSurveys:l.getReceivedSurveysPage.rows,userTasks:l.getTasksByUserId||[]}),(0,Ze.jsxs)(C5n,{children:[(0,Ze.jsx)(h5n,{}),(0,Ze.jsx)(S5n,{children:(0,Ze.jsx)(f.PageErrorContextProvider,{children:(0,Ze.jsx)(f.PageLoadingContextProvider,{children:(0,Ze.jsx)(m.sv,{context:[n,r,o,l]})})})})]}),e.length>0&&a&&(0,Ze.jsx)(oN,{items:e,dismiss:()=>n([]),createMutation:a,onComplete:i}),(0,Ze.jsx)(d5n,{})]},"AppContainer__".concat(t))};var D5n,A5n,R5n,P5n,L5n,I5n,E5n,_5n,F5n,B5n,U5n;function M5n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const V5n=(0,f.styled)(f.Grid)(D5n||(D5n=M5n(["\n  display: flex;\n  gap: 24px;\n  width: 100%;\n  flex-direction: row;\n\n  "," {\n    flex-direction: column;\n  }\n"])),e=>{let{theme:n}=e;return n.breakpoints.down("lg")}),z5n=(0,f.styled)(f.Grid)(A5n||(A5n=M5n(["\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n  padding: 32px;\n  border-radius: 16px;\n  border: 1px solid ",";\n  "," {\n    width: 100%;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.breakpoints.down("lg")}),G5n=(0,f.styled)("div")(R5n||(R5n=M5n(["\n  padding: 32px;\n  width: 100%;\n  height: 100%;\n  display: flex;\n  position: relative;\n  flex-direction: column;\n  gap: 8px;\n  border-radius: 16px;\n  border: 1px solid ",";\n\n  "," {\n    padding: 18px;\n    min-height: 460px;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.breakpoints.down("md")}),$5n=(0,f.styled)(f.Text)(P5n||(P5n=M5n([""]))).withComponent("h2"),W5n=(0,f.styled)("div")(L5n||(L5n=M5n(["\n  display: flex;\n  width: 100%;\n  justify-content: space-between;\n  flex-direction: row;\n  flex-wrap: nowrap;\n  gap: 25px;\n  "," {\n    height: 100%;\n    flex-wrap: wrap;\n    flex-direction: column;\n    justify-content: flex-start;\n  }\n"])),e=>{let{theme:n}=e;return n.breakpoints.down("lg")}),q5n=((0,f.styled)("div")(I5n||(I5n=M5n(["\n  display: flex;\n  justify-content: center;\n  width: 100%;\n\n  rect {\n    fill: none;\n  }\n"]))),(0,f.styled)(f.Button)(E5n||(E5n=M5n(["\n  padding: 10px 16px 10px 12px;\n  position: absolute;\n  top: 68px;\n  right: 32px;\n\n  svg {\n    height: 18px;\n    width: 18px;\n  }\n"])))),J5n=(0,f.styled)("div")(_5n||(_5n=M5n(["\n  display: flex;\n  align-items: center;\n  width: inherit;\n  justify-content: center;\n"]))),Y5n=(0,f.styled)("div")(F5n||(F5n=M5n(["\n  width: 100%;\n  overflow-x: auto;\n"]))),H5n=(0,f.styled)("div")(B5n||(B5n=M5n(["\n  display: flex;\n  flex-flow: row nowrap;\n  gap: 20px;\n  padding: 2px;\n  margin-bottom: 12px;\n  "," {\n    flex-wrap: wrap;\n    flex-flow: column;\n  }\n"])),e=>{let{theme:n}=e;return n.breakpoints.down("lg")}),K5n=(0,f.styled)("div")(U5n||(U5n=M5n(["\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  padding: 2px;\n"])));var Q5n,Z5n,X5n,e3n,n3n;function t3n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const a3n=(0,f.styled)(f.Text)(Q5n||(Q5n=t3n(["\n  margin-bottom: 8px;\n  color: ",";\n"])),e=>e.theme.sys.color.onSurface),r3n=(0,f.styled)("div")(Z5n||(Z5n=t3n(["\n  display: flex;\n  width: 100%;\n  padding: 12px;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  flex-shrink: 0;\n  border-radius: 16px;\n  border: 1px solid ",";\n  background-color: ",";\n  box-shadow: ",";\n  cursor: pointer;\n\n  &:hover {\n    background-color: ",";\n  }\n"])),e=>e.theme.sys.color.outlineVariant,e=>e.theme.sys.color.surface,e=>e.theme.sys.elevation[1],e=>{let{theme:n}=e;return n.sys.color.secondaryContainer}),i3n=(0,f.styled)("div")(X5n||(X5n=t3n(["\n  display: flex;\n  height: 40px;\n  flex-direction: column;\n  justify-content: center;\n  flex: 1 0 0;\n\n  p {\n    margin: 0px;\n  }\n"]))),o3n=e=>{let{icon:n,color:t,id:a,hideShadowGradient:r}=e;const i=(0,f.styled)(n)(e3n||(e3n=t3n(["\n    color: ",";\n    position: absolute;\n    width: 24px;\n    height: 24px;\n    flex-shrink: 0;\n    left: 8px;\n    top: 8px;\n  "])),t),o=(0,f.styled)("div")(n3n||(n3n=t3n(["\n    height: 40px;\n    width: 40px;\n    position: relative;\n  "])));return(0,Ze.jsxs)(o,{children:[(0,Ze.jsx)(i,{}),(0,Ze.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,Ze.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"url(#paint0_linear_".concat(a,")")}),!r&&(0,Ze.jsx)("defs",{children:(0,Ze.jsxs)("linearGradient",{id:"paint0_linear_".concat(a),x1:"20",y1:"0",x2:"20",y2:"40",gradientUnits:"userSpaceOnUse",children:[(0,Ze.jsx)("stop",{stopColor:t,stopOpacity:"0.15"}),(0,Ze.jsx)("stop",{offset:"1",stopColor:t,stopOpacity:"0"})]})})]})]})},l3n=()=>{const e=(0,f.useTheme)(),n=[{id:"survey-tool",title:"Run a social survey",link:"surveys/sent/overview",icon:f.Icons.PeopleOutline,color:e.extendedColors.economic.color},{id:"reporting-tool",title:"Check your Carbon",link:"reporting",icon:f.Icons.Co2,color:"#006C4B"}];return(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(a3n,{typescale:"title",size:"medium",children:"Quick Tools"}),(0,Ze.jsx)(Y5n,{children:(0,Ze.jsx)(K5n,{children:n.map(e=>(0,Ze.jsx)(p.Link,{to:"/v2/".concat(e.link),children:(0,Ze.jsxs)(r3n,{children:[(0,Ze.jsx)(o3n,{icon:e.icon,color:e.color,id:e.id}),(0,Ze.jsx)(i3n,{children:(0,Ze.jsx)(a3n,{typescale:"body",size:"medium",children:e.title})})]})},e.title))})})]})},s3n=t.p+"cbb-17b5e3b4bf4db9485f00.png";var c3n,d3n;function u3n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function p3n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u3n(Object(t),!0).forEach(function(n){m3n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u3n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function m3n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function f3n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(0,Ge.default)(_qe.A)(c3n||(c3n=f3n(["\n  display: flex;\n  padding: 16px;\n  border-radius: 16px;\n  align-items: center;\n  justify-content: space-between;\n  border: 1px solid ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant});const y3n=(0,Ge.default)(f.Button)(d3n||(d3n=f3n(["\n  width: 240px;\n  padding: 10px 16px;\n\n  && {\n    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);\n\n    > p {\n      color: var(--md-sys-color-primary);\n    }\n\n    &.Mui-disabled {\n      cursor: not-allowed;\n      pointer-events: all;\n\n      > p {\n        color: var(--md-sys-color-onSurface);\n      }\n    }\n  }\n"]))),g3n={display:"flex",width:"90%",flexDirection:"row",justifyContent:"space-between"},b3n=e=>{let{recentConsultations:n,handleNewChatClick:t,handleDataAnalysisClick:a,disabledNewChatClick:r}=e;const i=(0,m.g)(),o=(0,g.useMemo)(()=>{const e=((e,n)=>{const t=Wt()().startOf("day"),a=Wt()().subtract(1,"days").startOf("day"),r=Wt()().subtract(7,"days").startOf("day"),i={Today:[],Yesterday:[],"Previous 7 Days":[]};return e.forEach(e=>{const o=Wt()(e.lastAccess),l=n===e.consultationID,s={to:"/intelligence/".concat(e.consultationID),item:e.knowledgeBaseName,isActive:l,status:e.status};o.isSame(t,"day")?i.Today.push(s):o.isSame(a,"day")?i.Yesterday.push(s):o.isAfter(r)&&i["Previous 7 Days"].push(s)}),i})(n,null==i?void 0:i.id);return Object.keys(e).map(n=>({name:n,history:e[n].map(e=>p3n(p3n({},e),{},{icon:"Closed"===e.status?(0,Ze.jsx)(f.Icons.CheckCircleOutline,{fontSize:"medium"}):null}))}))},[null==i?void 0:i.id,n]);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(_qe.A,{gap:"24px",display:"flex",flexDirection:"column",children:[(0,Ze.jsxs)(y3n,{variant:"outlined",disabled:r,onClick:t,children:[(0,Ze.jsx)(f.Icons.RateReviewOutlined,{}),(0,Ze.jsx)(f.Text,{size:"medium",color:"primary",children:"Start new conversation"})]}),(0,Ze.jsxs)(y3n,{variant:"outlined",disabled:r,onClick:a,children:[(0,Ze.jsx)(f.Icons.AnalyticsOutlined,{}),(0,Ze.jsx)(f.Text,{size:"medium",color:"primary",children:"Start Data Analysis"})]}),o.map((e,n)=>!!e.history.length&&(0,Ze.jsxs)(_qe.A,{display:"flex",flexDirection:"column",gap:"4px",children:[(0,Ze.jsx)(f.Text,{typescale:"label",size:"medium",color:"secondary",children:e.name}),(0,Ze.jsx)(f.NavigationDrawer,{items:e.history,itemStyle:g3n})]},"Sidebar_".concat(e.name,"_").concat(n)))]})})};var h3n,v3n,x3n,T3n,O3n,k3n,j3n,C3n;function S3n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const N3n=(0,f.styled)("div")(h3n||(h3n=S3n(["\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  width: 300px;\n  padding: 2px 0;\n"]))),w3n=(0,f.styled)("div")(v3n||(v3n=S3n(["\n  display: flex;\n  width: 100%;\n  height: 48px;\n  padding: 8px 12px;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  flex-shrink: 0;\n  border-radius: 16px;\n  border: 1px solid ",";\n  background-color: ",";\n  box-shadow: ",";\n  cursor: pointer;\n\n  &:hover {\n    background-color: ",";\n  }\n"])),e=>e.theme.sys.color.outlineVariant,e=>e.theme.sys.color.surface,e=>e.theme.sys.elevation[1],e=>{let{theme:n}=e;return n.sys.color.secondaryContainer}),D3n=(0,f.styled)("div")(x3n||(x3n=S3n(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  flex: 1 0 0;\n"]))),A3n=(0,f.styled)(f.Text)(T3n||(T3n=S3n(["\n  color: ",";\n"])),e=>e.theme.sys.color.onSurface),R3n=(0,f.styled)("div")(O3n||(O3n=S3n(["\n  display: flex;\n  align-items: flex-start;\n  gap: 24px;\n"]))),P3n=(0,f.styled)("div")(k3n||(k3n=S3n(["\n  display: flex;\n  justify-content: center;\n  height: calc(100vh - 72px); // header height\n  flex: 1;\n\n  iframe {\n    max-width: 100%;\n  }\n"]))),L3n=(0,f.styled)("div")(j3n||(j3n=S3n(["\n  width: 40px;\n  height: 40px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),I3n=(0,f.styled)("img")(C3n||(C3n=S3n(["\n  width: 24px;\n  height: 24px;\n  filter: grayscale(1);\n  mix-blend-mode: darken;\n  background-color: inherit;\n"])));function E3n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function _3n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E3n(Object(t),!0).forEach(function(n){F3n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E3n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function F3n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const B3n="Hi, <b>I’m Rio</b>, here to help you understand <b>ESG & sustainability</b> and more generally have a <b>positive impact</b>. <br><br> How can I help you today?",U3n="H-2222625-YEUXJBUO9T7EYUK3",M3n="https://storage.googleapis.com/landbot.pro/v3/".concat(U3n,"/index.json");var V3n,z3n;function G3n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $3n=(0,f.styled)(f.Text)(V3n||(V3n=G3n(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),W3n=(0,f.styled)("div")(z3n||(z3n=G3n(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: space-between;\n"]))),q3n={Compliance:f.Icons.FactCheckOutlined,Domestic:f.Icons.HomeOutlined,Sustainability:f.Icons.LanguageOutlined,RioPlatform:f.CustomIcons.RioBot,Saudi:f.CustomIcons.SaudiVision,Bahrain:s3n},J3n=()=>{const e=(0,m.g)(),n=oc(),t=(0,m.Zp)(),a=rt(),{recentConsultations:r}=(()=>{const[e,n]=(0,g.useState)([]),[t,a]=(0,g.useState)(!0),[r,i]=(0,g.useState)(null);return(0,g.useEffect)(()=>{(async()=>{a(!0),i(null);const e=await(async()=>{var e;const n=null===(e=window)||void 0===e?void 0:e.localStorage.getItem("ACCESS_TOKEN");if(!n)throw new Error("Token is missing");const t="".concat(kn("REACT_APP_CONSULTATIONS_URL"),"/Consultation"),a=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)}});if(!a.ok)throw new Error("Failed to fetch data");return await a.json()})();null!=e&&e.consultations?n(e.consultations):i("Failed to fetch consultations"),a(!1)})()},[]),{recentConsultations:e,loading:t,error:r}})(),i=null==e?void 0:e.id,o=Zm(i),[l,s]=(0,g.useState)({consultations:[],askRio:[]}),c=(0,g.useRef)(!1),[d,u]=(0,g.useState)(!1),y=!window.myLandbot||!e.id&&!d,b=(0,g.useCallback)(async()=>{const e=await dOe().get("".concat("https://chat-api.esg-r.io/api/Questions/lists/account","/").concat(a)),n=(e=>{const n={};return e.forEach(e=>{for(const t of e.tags)n[t]||(n[t]=[]),n[t].push(e)}),n})(e.data).consultation||[],t=e.data.filter(e=>!e.tags.includes("consultation"));s({consultations:n.slice(0,5),askRio:t.slice(0,Math.max(10-n.length,0))})},[s,a]),h=(0,g.useMemo)(()=>localStorage.getItem("ID_TOKEN"),[]),v=(0,g.useCallback)(()=>{if(c.current)return;const n={jwt:h,accountId:a};let t=B3n;if(e.id){const a=r.find(n=>n.consultationID===e.id);if(!a)return;n.consultationtoken=a.consultationID,t="Searching for your consultation..."}(e=>{var n,t;let{customData:a,welcomeMessage:r=B3n}=e;const i=null===(n=document)||void 0===n?void 0:n.getElementsByTagName("iframe");window.myLandbot&&i&&null!==(t=i[0])&&void 0!==t&&t.contentDocument&&(i[0].contentDocument.documentElement.innerHTML=""),window.myLandbot=new window.Landbot.Container({container:"#myLandbot",configUrl:M3n,customData:_3n(_3n({},a),{},{welcome_message:null!=a&&a.consultationtoken?"Hi, <b>I’m Rio</b>, here to help you understand <b>ESG & sustainability</b> and more generally have a <b>positive impact</b>.":r})}),window.myLandbot.onLoad(function(){null!=a&&a.consultationtoken&&window.myLandbot.api.sendMessage({type:"text",message:r,custom_data:_3n({},a),channel_token:U3n})})})({customData:n,welcomeMessage:t}),c.current=!0,window.myLandbot&&!e.id&&window.myLandbot.core.events.on("new_message",e=>{u(!(null==e||!e.author_type))})},[e.id,r,a,h]);(0,g.useEffect)(()=>{if(b(),c.current&&i!==o)return c.current=!1,void v();v()},[i,v,o,b]);const x=(0,g.useCallback)(e=>{window.myLandbot&&window.myLandbot.sendMessage({message:e,custom_data:{jwt:h,accountId:a}})},[h,a]),T=(0,g.useCallback)(()=>{(e.id||d)&&(c.current&&(c.current=!1),d&&!e.id&&(v(),u(!1)),t("/".concat(n.intelligence.root)))},[d,v,t,e.id,n.intelligence.root]),O=(0,g.useCallback)(()=>{window.myLandbot&&window.myLandbot.sendMessage({message:"I want to analyse my data",custom_data:{jwt:h,accountId:a}}),t("/".concat(n.intelligence.root))},[h,a,t,n.intelligence.root]);return(0,Ze.jsx)(f.Page,{title:{content:""},children:(0,Ze.jsxs)(R3n,{children:[(0,Ze.jsx)(N3n,{children:(0,Ze.jsx)(b3n,{recentConsultations:r,disabledNewChatClick:y,handleNewChatClick:T,handleDataAnalysisClick:O})}),(0,Ze.jsx)(P3n,{id:"myLandbot"}),!e.id&&(0,Ze.jsxs)(N3n,{children:[!!l.consultations.length&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(W3n,{children:(0,Ze.jsx)($3n,{typescale:"label",size:"medium",children:"Consultation Starters"})}),l.consultations.map(e=>(0,Ze.jsx)(p.Link,{to:"/".concat(n.intelligence.root),onClick:()=>x(e.content),children:(0,Ze.jsxs)(w3n,{children:["Bahrain"===e.category?(0,Ze.jsx)(L3n,{children:(0,Ze.jsx)(I3n,{src:q3n[e.category],alt:e.id})}):q3n[e.category]&&(0,Ze.jsx)(o3n,{hideShadowGradient:!0,icon:q3n[e.category],color:"",id:e.id}),(0,Ze.jsx)(D3n,{children:(0,Ze.jsx)(A3n,{typescale:"body",size:"medium",children:e.content})})]})},e.id))]}),!!l.askRio.length&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(W3n,{children:(0,Ze.jsx)($3n,{typescale:"label",size:"medium",children:"Ask Rio"})}),l.askRio.map(e=>(0,Ze.jsx)(p.Link,{to:"/".concat(n.intelligence.root),onClick:()=>x(e.content),children:(0,Ze.jsxs)(w3n,{children:["Bahrain"===e.category?(0,Ze.jsx)(L3n,{children:(0,Ze.jsx)(I3n,{src:q3n[e.category],alt:e.id})}):q3n[e.category]&&(0,Ze.jsx)(o3n,{hideShadowGradient:!0,icon:q3n[e.category],color:"",id:e.id}),(0,Ze.jsx)(D3n,{children:(0,Ze.jsx)(A3n,{typescale:"body",size:"medium",children:e.content})})]})},e.id))]})]})]})})};var Y3n,H3n,K3n;function Q3n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Z3n=(0,f.styled)(f.Text)(Y3n||(Y3n=Q3n(["\n  margin-bottom: 32px;\n"]))),X3n=(0,f.styled)("div")(H3n||(H3n=Q3n(["\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n"]))),e4n=(0,f.styled)("div")(K3n||(K3n=Q3n(["\n  display: flex;\n  align-items: top;\n  gap: 8px;\n"]))),n4n=()=>(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(Z3n,{typescale:"title",size:"large",children:"Contact information"}),(0,Ze.jsxs)(X3n,{children:[(0,Ze.jsxs)(e4n,{children:[(0,Ze.jsx)(f.Icons.HomeRounded,{}),(0,Ze.jsxs)(f.Text,{typescale:"body",size:"medium",children:["Rio AI Ltd ",(0,Ze.jsx)("br",{}),"1 Mark Square ",(0,Ze.jsx)("br",{}),"London ",(0,Ze.jsx)("br",{}),"EC2A 4EG ",(0,Ze.jsx)("br",{}),"UK"]})]}),(0,Ze.jsxs)(e4n,{children:[(0,Ze.jsx)(f.Icons.EmailRounded,{}),(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:"support@rio.ai"})]})]})]});var t4n,a4n,r4n,i4n,o4n=t(32193);function l4n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function s4n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l4n(Object(t),!0).forEach(function(n){c4n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l4n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function c4n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function d4n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const u4n=(0,f.styled)("div")(t4n||(t4n=d4n(["\n  width: 100%;\n  max-width: 800px;\n"]))),p4n=(0,f.styled)(f.Text)(a4n||(a4n=d4n(["\n  margin-bottom: 32px;\n"]))),m4n=(0,f.styled)("form")(r4n||(r4n=d4n(["\n  width: 100%;\n  display: flex;\n  gap: 36px;\n"]))),f4n=(0,f.styled)("div")(i4n||(i4n=d4n(["\n  display: flex;\n  flex-grow: 1;\n  flex-direction: column;\n  gap: 36px;\n"]))),y4n={fullName:{value:"",error:""},companyName:{value:"",error:""},phoneNumber:{value:"",error:""},subject:{value:"",error:""},enquiry:{value:"",error:""}},g4n=()=>{const{showNotification:e}=vt(),[n,t]=(0,g.useState)(y4n),[a,{loading:r}]=(0,Ot.n)(ef(),{onCompleted:()=>{e("Your enquiry has been sent!","success"),t(y4n)},onError:()=>{e("Something went wrong. If the problem persists, contact support.","danger")}}),i=(0,g.useCallback)(e=>{e.preventDefault();const r=s4n({},n.fullName),i=s4n({},n.companyName),o=s4n({},n.phoneNumber),l=s4n({},n.subject),s=s4n({},n.enquiry);if(r.error=n.fullName.value?"":"Please enter your full name.",i.error=n.companyName.value?"":"Please enter a valid company name.",o.error=n.phoneNumber.value?(0,o4n.A)(n.phoneNumber.value)?"":"Only numbers are valid in this field.":"Please enter a valid phone number.",s.error=n.enquiry.value?n.enquiry.value.length>1e3?"You have exceeded the character limit.":"":"Please enter an enquiry.",l.error=n.subject.value?"":"Please choose an option.",t({fullName:r,companyName:i,phoneNumber:o,subject:l,enquiry:s}),!(r.error||i.error||o.error||s.error||l.error)){const e={name:Ron()(n.fullName.value),company:Ron()(n.companyName.value),email:(0,Jb.A)(localStorage.getItem("ID_TOKEN")).email,phone:Ron()(n.phoneNumber.value),enquiry:Ron()(n.enquiry.value),topic:Ron()(n.subject.value)};a({variables:{replacements:JSON.stringify(e)}})}},[n,a]),o=(0,g.useCallback)(e=>{const{value:a,name:r}=e.target;t(s4n(s4n({},n),{},{[r]:{value:a}}))},[n]),l=(0,g.useCallback)((e,n)=>{const t={target:{name:n,value:e.value}};o(t)},[o]);return(0,Ze.jsxs)(u4n,{children:[(0,Ze.jsx)(p4n,{typescale:"title",size:"large",children:"Send us a message"}),(0,Ze.jsxs)(m4n,{name:"email-form",onSubmit:i,children:[(0,Ze.jsxs)(f4n,{children:[(0,Ze.jsx)(f.TextField,{name:"fullName",onChange:o,value:n.fullName.value,helperText:n.fullName.error,error:Boolean(n.fullName.error),placeholder:"John Doe",label:"Full name"}),(0,Ze.jsx)(f.TextField,{name:"companyName",onChange:o,value:n.companyName.value,helperText:n.companyName.error,error:Boolean(n.companyName.error),placeholder:"Rio AI Ltd",label:"Company name"}),(0,Ze.jsx)(f.TextField,{name:"phoneNumber",onChange:o,value:n.phoneNumber.value,helperText:n.phoneNumber.error,error:Boolean(n.phoneNumber.error),placeholder:"07000000000",label:"Phone number"}),(0,Ze.jsx)(f.Select,{name:"subject",options:[{value:"comply",label:"Comply"},{value:"data",label:"Data"},{value:"learn",label:"Engage"},{value:"other",label:"Other"},{value:"reporting",label:"Reporting"},{value:"upgrades",label:"Upgrades"}],onChange:e=>l(e,"subject"),value:n.subject.value,helperText:n.subject.error,error:Boolean(n.subject.error),placeholder:"Please choose",label:"What is your enquiry about?"})]}),(0,Ze.jsxs)(f4n,{children:[(0,Ze.jsx)(f.TextArea,{name:"enquiry",onChange:o,value:n.enquiry.value,helperText:n.enquiry.error,error:Boolean(n.enquiry.error),placeholder:"Please type your message here",label:"Enquiry",rows:9}),(0,Ze.jsx)(f.Button,{type:"submit",variant:"contained",color:"primary",sx:{width:"100%"},loading:r,disabled:r,children:"Send enquiry"})]})]})]})};var b4n;const h4n=(0,Ge.default)("div")(b4n||(b4n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  gap: 72px;\n"]))),v4n=()=>(0,Ze.jsx)(f.Page,{title:{content:"Contact Us",crumbs:[{label:"Contact"}]},children:(0,Ze.jsxs)(h4n,{children:[(0,Ze.jsx)(n4n,{}),(0,Ze.jsx)(g4n,{})]})});var x4n,T4n,O4n,k4n,j4n,C4n=t(8717);function S4n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const N4n=(0,f.styled)("div")(x4n||(x4n=S4n(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  margin: 0 auto;\n"]))),w4n=(0,f.styled)("div")(T4n||(T4n=S4n(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  width: 80px;\n  height: 80px;\n  border-radius: 50%;\n  background-color: ",";\n  margin-bottom: 24px;\n"])),e=>e.theme.sys.color.primaryContainer),D4n=(0,f.styled)(f.Icons.Check)(O4n||(O4n=S4n(["\n  width: 40px;\n  color: ",";\n"])),e=>e.theme.sys.color.primary),A4n=(0,f.styled)(f.Text)(k4n||(k4n=S4n(["\n  margin-bottom: 12px;\n  text-align: center;\n"]))),R4n=(0,f.styled)(f.Text)(j4n||(j4n=S4n(["\n  text-align: center;\n"]))),P4n=()=>(0,Ze.jsxs)(N4n,{children:[(0,Ze.jsx)(w4n,{children:(0,Ze.jsx)(D4n,{fontSize:"large"})}),(0,Ze.jsx)(A4n,{typescale:"title",size:"large",children:"Nothing to display..."}),(0,Ze.jsx)(R4n,{typescale:"body",size:"large",children:"If any validation or anomalies are found they will be displayed here"})]});var L4n;const I4n=(0,f.styled)("div")(L4n||(L4n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-top: 32px;\n  display: flex;\n  flex-direction: row;\n  gap: 16px;\n  justify-content: flex-end;\n"]))),E4n={[Vt.Ui.OnsiteWork]:"Onsite project work",[Vt.Ui.Headcount]:"Changes in occupancy rates (headcount)",[Vt.Ui.Floorspace]:"Changes in floorspace",[Vt.Ui.WaterLeak]:"Water leak",[Vt.Ui.OtherOperational]:"Other operational root cause",[Vt.Ui.BelowThreshold]:"Below threshold, not investigated",[Vt.Ui.SupplierDataIssue]:"Supplier data issue",[Vt.Ui.NoActionRequired]:"Within range of expected seasonality, no action required",[Vt.Ui.PendingSupplierResponse]:"Pending supplier response",[Vt.Ui.Other]:"Other"},_4n=Object.entries(E4n).map(e=>{let[n,t]=e;return{value:n,label:t}}),F4n=e=>{let{toBeIgnoredDataAnomalies:n,onClose:t,onConfirm:a,isAcceptFiltered:r,displayedRowCount:i}=e;const o=(0,g.useMemo)(()=>n.some(e=>Boolean(e.percentDiff))||r,[n,r]),l=(0,eg.A)(),[s,c]=(0,g.useState)({varianceReason:""}),[d,u]=(0,g.useState)(""),[p,m]=(0,g.useState)(""),y=(0,g.useCallback)(()=>o?d?(a(d||null,p||null),void t()):void c({varianceReason:"Required"}):o?void 0:(a(),void t()),[o,d,p,t,a]),b=(0,g.useMemo)(()=>r?"You're about to accept and clear filtered variances and anomalies. \n"+"This action will accept ".concat(i," filtered anomalies."):o?"You're about to accept and clear variances and anomalies":o?void 0:l.formatMessage({id:"pages.data.overview.confirmationDialog.title"}),[i,o,l,r]);return(0,Ze.jsxs)(f.Modal,{open:!0,onClose:t,title:b,titleMaxWidth:500,children:[o&&(0,Ze.jsxs)(f.Grid,{container:!0,columns:12,rowGap:4,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Select,{label:"Variance reason",value:d,error:Boolean(s.varianceReason),helperText:s.varianceReason,options:_4n,onChange:e=>{let{value:n}=e;u(n),c({varianceReason:""})}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextArea,{label:"Notes (optional)",value:p,onChange:e=>m(e.target.value)})})]}),(0,Ze.jsxs)(I4n,{children:[(0,Ze.jsx)(f.Button,{onClick:t,variant:"outlined",color:"primary",children:l.formatMessage({id:"pages.data.overview.confirmationDialog.disagree"})}),(0,Ze.jsx)(f.Button,{onClick:y,variant:"contained",color:"primary",children:l.formatMessage({id:"pages.data.overview.confirmationDialog.agree"})})]})]})};var B4n;function U4n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function M4n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?U4n(Object(t),!0).forEach(function(n){V4n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):U4n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function V4n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const z4n=(0,f.styled)("div")(B4n||(B4n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  height: 100%;\n  background-color: ",";\n  border-radius: 16px;\n  padding: 16px;\n  border: 1px solid ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{theme:n}=e;return n.sys.color.outlineVariant}),G4n=e=>{var n;let{data:t}=e;const[a,r]=(0,g.useState)(!0),i=(0,g.useRef)(null);(0,g.useLayoutEffect)(()=>{setTimeout(()=>{r(!1)},100)},[]);const o=(0,g.useMemo)(()=>{var e;return(null==t||null===(e=t.varianceTimeseries)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.map(e=>M4n(M4n({},e),{},{time:Wt()(e.time,"YYYY/M").format("YYYY/MM/DD")})))||[]},[t]),l=(0,g.useMemo)(()=>{switch(null==t?void 0:t.__typename){case"GasDataAnomaly":case"ElectricityDataAnomaly":case"HeatAndSteamDataAnomaly":return{title:"Meter (".concat(null==t?void 0:t.meterName,") consumption - historic data"),yAxisTitle:"Quantity Sum (kWh)"};default:return}},[t]);return null!=t&&t.varianceTimeseries?null!=t&&null!==(n=t.varianceTimeseries)&&void 0!==n&&n.error?(0,Ze.jsx)(z4n,{children:(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",textAlign:"center",children:t.varianceTimeseries.error})}):(0,Ze.jsx)(z4n,{children:!a&&(0,Ze.jsx)(f.LineChart,{size:f.ChartSize.Md,unit:"kWh",border:!1,data:o,disableLegend:!0,title:null==l?void 0:l.title,yAxisTitle:null==l?void 0:l.yAxisTitle,ref:i})}):null};function $4n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function W4n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$4n(Object(t),!0).forEach(function(n){q4n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$4n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function q4n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const J4n=e=>{let{data:n}=e;return n.user?"".concat(n.user.first_name," ").concat(n.user.last_name):"Automated"},Y4n=e=>{let{data:n}=e;return"".concat(n.locationName?n.locationName:"")},H4n=e=>{let{data:n}=e;return"".concat(n.meterName?n.meterName:"")},K4n=e=>{let{data:n}=e;return n.uploadedIn.fileName},Q4n=e=>{let{data:n}=e;return E4n[n.varianceReason]},Z4n={values:[null,...Object.keys(E4n)],valueFormatter:e=>E4n[e.value]||e.value};var X4n,e6n,n6n,t6n;function a6n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const r6n=(0,f.styled)("div")(X4n||(X4n=a6n(["\n  min-height: 480px;\n"]))),i6n=(0,f.styled)(f.AgGrid)(e6n||(e6n=a6n(["\n  flex: 1;\n  height: 480px;\n  .endDateHead,\n  .endDateCell {\n    padding-left: 0;\n  }\n\n  .ag-tooltip-custom {\n    background-color: transparent;\n    box-shadow: none;\n    border: none;\n    width: 700px;\n    height: 432px;\n  }\n"]))),o6n=(0,f.styled)("div")(n6n||(n6n=a6n(["\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  margin-bottom: 16px;\n  gap: 16px;\n"]))),l6n=(0,f.styled)(f.Button)(t6n||(t6n=a6n(["\n  width: 130px;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n"])));function s6n(){var e,n;const t=rt(),a=(0,eg.A)(),[r]=aqe(),i=(()=>{const e=rt(),{showNotification:n}=vt(),t=(0,eg.A)(),[a]=iqe(),r=(0,g.useCallback)(e=>t.formatMessage({id:"pages.dataAnomalies.transactionTypes.".concat(e)}),[t]),i=(0,g.useCallback)(e=>{let{data:n}=e;return r(n.__typename)},[r]),o=(0,g.useCallback)(async t=>{try{var i;const{field:n}=t.colDef;if(!n)throw new Error("Unfilterable column");if("ignored"===n)return void t.success(["0","1"]);const o=t.api.getFilterModel(),l=(null===(i=(await a({variables:{accountId:e,field:n,filters:ia(o)}})).data)||void 0===i?void 0:i.getDataAnomaliesFilter)||[];t.success(l.map(e=>"transactionType"===n?r(e):e))}catch(e){if(e instanceof Error&&"Virtual list has not been created."===e.message)return;n("Couldn't load filter values for column ".concat(t.colDef.field,": ").concat(e),"danger")}},[a,e,n,r]),l=(0,g.useMemo)(()=>({values:o,cache:!1}),[o]),s=(0,g.useMemo)(()=>W4n(W4n({},l),{},{valueFormatter:pa}),[l]);return(0,g.useMemo)(()=>[{headerName:"Utility",valueGetter:i,field:"transactionType",filterParams:l,filter:"agSetColumnFilter",checkboxSelection:!0,sortable:!0,maxWidth:200},{headerName:"Start date",field:"startDate",maxWidth:150,valueFormatter:da,filter:"agDateColumnFilter",sortable:!0},{headerName:"End date",field:"endDate",maxWidth:150,valueFormatter:da,filter:"agDateColumnFilter",sortable:!0,headerClass:"endDateHead",cellClass:["endDateCell"]},{hide:!0,headerName:"Detected time",field:"detectedAt",valueFormatter:ua,initialSort:"desc",filter:"agDateColumnFilter",sortable:!0},{headerName:"Location",field:"locationName",valueGetter:Y4n,filter:"agSetColumnFilter",filterParams:l,sortable:!0},{headerName:"Meter",field:"meterName",valueGetter:H4n,filter:"agSetColumnFilter",filterParams:l,sortable:!0},{headerName:"Chart",field:"varianceTimeseries",filter:!1,filterParams:l,sortable:!1,maxWidth:120,tooltipField:"reason",cellRenderer:PJ,tooltipComponent:G4n},{headerName:"Reason",field:"reason",minWidth:400,filter:"agTextColumnFilter",sortable:!0,tooltipField:"reason",tooltipComponent:G4n},{headerName:"% Variance",field:"percentDiff",filterParams:l,filter:"agNumberColumnFilter",sortable:!0},{headerName:"Variance Reason",field:"varianceReason",valueGetter:Q4n,minWidth:400,filter:"agSetColumnFilter",filterParams:Z4n,sortable:!0},{headerName:"Notes",field:"notes",minWidth:400,filter:"agTextColumnFilter",cellEditor:"agTextCellEditor",sortable:!0,editable:!0},{hide:!0,headerName:"Uploader",field:"user",valueGetter:J4n,filterParams:l,filter:"agSetColumnFilter",sortable:!0},{hide:!0,headerName:"Filename",field:"uploadedIn",valueGetter:K4n,filterParams:l,filter:"agSetColumnFilter",sortable:!0},{headerName:"Accepted",field:"ignored",valueFormatter:sa,filterParams:s,filter:"agSetColumnFilter",sortable:!0}],[l,i,s])})(),o=(0,g.useRef)(null),[l,s]=(0,g.useState)(!1),[c,d]=(0,g.useState)(null),[u,p]=(0,g.useState)(!1),[m,y]=(0,g.useState)([]),[b,h]=(0,g.useState)(!1),[v,x]=(0,g.useState)(!1),T=rc(),O=(0,g.useRef)(),[k]=rqe(),[j]=function(){const{showNotification:e}=vt();return(0,Ot.n)(nqe,{refetchQueries:["GetDataAnomaliesByAccountId","GetDataAnomaliesByAccountIdCount"],onCompleted:()=>{e("Those anomalies have been accepted, they will now appear under accepted variances","success")},onError:n=>{e("Anomalies haven't been accepted due to this error: ".concat(n),"danger")}})}(),C=(0,g.useCallback)(e=>{var n;if(null===(n=o.current)||void 0===n||!n.gridApi)return;const t=o.current.gridApi.getSelectedRows();p(!0),y(t),x(e||!1)},[]),S=(0,g.useCallback)(()=>{p(!1),y([]),x(!1)},[]),N=(0,g.useMemo)(()=>({ignored:{values:["0"],filterType:"set"}}),[]),w=(0,g.useCallback)(e=>{e.api.setFilterModel(N)},[N]),D=(0,g.useCallback)(()=>{var e;null!==(e=o.current)&&void 0!==e&&e.gridApi&&o.current.gridApi.setFilterModel(N)},[N]),A=(0,g.useMemo)(()=>({getRows:async e=>{var n;let{request:a,success:i,fail:o}=e;null===(n=O.current)||void 0===n||n.remove();const l=oa(a.sortModel),c=ia(a.filterModel);try{const{data:e,error:n}=await r({variables:{accountId:t,sort:l,filters:c,limit:20,offset:a.startRow||0},fetchPolicy:"network-only"});if(n)throw n;if(!e)throw new Error("Error at getDataAnomalies");if(!e.getDataAnomaliesByAccountId.rows.length&&!Object.keys(a.filterModel||{}).length)return s(!0);i({rowData:e.getDataAnomaliesByAccountId.rows,rowCount:e.getDataAnomaliesByAccountId.totalRows})}catch(e){d(e),o()}}}),[r,t]),R=!(null===(e=o.current)||void 0===e||!e.gridApi||(0,zt.isEqual)(o.current.gridApi.getFilterModel(),N)),P=(0,g.useCallback)(()=>{var e,n,t;null!==(e=o.current)&&void 0!==e&&e.gridApi&&(null===(n=o.current)||void 0===n||n.gridApi.refreshServerSide(),null===(t=o.current)||void 0===t||t.gridApi.deselectAll(),h(!1),x(!1))},[N]),L=e=>{var n;if(null!==(n=o.current)&&void 0!==n&&n.gridApi){const n=20*o.current.gridApi.paginationGetCurrentPage(),t=n+20-1,a=[];for(let e=n;e<=t;e++){const n=o.current.gridApi.getDisplayedRowAtIndex(e);n&&a.push(n)}if(e)return o.current.gridApi.deselectAll(),void h(!1);a.forEach(e=>{e.isSelected()||e.setSelected(!0)})}},I=(0,g.useMemo)(()=>T.dataTrackerAnomalies.some(e=>e.startsWith("ignoreDataAnomalies")),[T]),E={tooltipInteraction:!0,tooltipShowDelay:700,suppressRowClickSelection:!0,pagination:!0,paginationPageSize:20,cacheBlockSize:20,paginationPageSizeSelector:!1,rowModelType:"serverSide",serverSideDatasource:A,rowSelection:"multiple",onGridReady:w,getRowId:ba("id"),noRowsOverlayComponent:P4n,columnDefs:i,onSelectionChanged:()=>{var e;if(null===(e=o.current)||void 0===e||!e.gridApi)return;const n=o.current.gridApi.getSelectedRows();h(!(null==n||!n.length))},onTooltipShow(e){O.current=null==e?void 0:e.tooltipGui},onTooltipHide(){O.current=void 0}};return c?(0,Ze.jsx)(f.LoadFailed,{title:"Something went wrong",error:c}):l?(0,Ze.jsx)(P4n,{}):(0,Ze.jsxs)("div",{children:[(0,Ze.jsxs)(o6n,{children:[(0,Ze.jsx)(N$,{filtersApplied:R,resetGridState:D}),I&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(l6n,{color:"primary",variant:"outlined",onClick:()=>L(),disabled:!o.current,title:a.formatMessage({id:"pages.data.overview.selectAll"}),children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.selectAllButtonText"})}),b&&(0,Ze.jsx)(l6n,{color:"primary",variant:"outlined",onClick:()=>L(!0),disabled:!o.current,title:a.formatMessage({id:"pages.data.overview.deselectAll"}),children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.deselectAllButtonText"})}),(0,Ze.jsx)(l6n,{color:"primary",variant:"contained",onClick:()=>C(!1),title:a.formatMessage({id:"pages.data.overview.acceptInfo"}),children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.accept"})}),(0,Ze.jsx)(l6n,{color:"primary",onClick:()=>C(!0),title:a.formatMessage({id:"pages.data.overview.acceptInfo"}),disabled:!R,children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.acceptFiltered"})})]})]}),u&&(0,Ze.jsx)(F4n,{onClose:S,onConfirm:(e,n)=>{var a;if(null===(a=o.current)||void 0===a||!a.gridApi)return;const r=o.current.gridApi.getSelectedRows();if(v){var i;if(null===(i=o.current)||void 0===i||!i.gridApi)return;const a=ia(o.current.gridApi.getFilterModel());j({variables:{varianceReason:e,notes:n,accountId:t,filters:a},onCompleted:P})}else k({variables:{anomalyIds:r.map(e=>e.id),varianceReason:e,notes:n},onCompleted:P})},toBeIgnoredDataAnomalies:m,isAcceptFiltered:v,displayedRowCount:(null===(n=o.current)||void 0===n||null===(n=n.gridApi)||void 0===n?void 0:n.getDisplayedRowCount())||0}),(0,Ze.jsx)(r6n,{children:(0,Ze.jsx)(i6n,{ref:o,gridKey:"dataAnomaliesGridV2",gridOptions:E})})]})}var c6n,d6n;function u6n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const p6n=(0,f.styled)(f.Drawer)(c6n||(c6n=u6n(["\n  .DrawerSummaryClass {\n    border-radius: 14px;\n\n    &:hover {\n      background-color: ",";\n    }\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.secondaryContainer}),m6n=(0,f.styled)("div")(d6n||(d6n=u6n(["\n  font-size: ",";\n\n  &:before {\n    content: '';\n    display: inline-block;\n    width: 15px;\n    height: 15px;\n    border-radius: 7.5px;\n    background-color: ",";\n    margin-right: 10px;\n    position: relative;\n    top: 1px;\n    flex-shrink: 0;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.typescale.body.medium.size},e=>{let{theme:n,color:t}=e;return Gw()(n,t)}),f6n=()=>(0,Ze.jsxs)(p6n,{children:[(0,Ze.jsx)(f.DrawerSummary,{className:"DrawerSummaryClass",expandIcon:(0,Ze.jsx)(f.Icons.ExpandMore,{}),"aria-controls":"panel1a-content",children:(0,Ze.jsx)(m6n,{color:"customColors.warning.color",children:"Anomalies found in your data"})}),(0,Ze.jsx)(f.DrawerDetails,{children:(0,Ze.jsx)(s6n,{})})]});var y6n,g6n,b6n,h6n,v6n;function x6n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const T6n=(0,f.styled)("div")(y6n||(y6n=x6n(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  margin: 0 auto;\n"]))),O6n=(0,f.styled)("div")(g6n||(g6n=x6n(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  width: 80px;\n  height: 80px;\n  border-radius: 50%;\n  background-color: ",";\n  margin-bottom: 24px;\n"])),e=>e.theme.sys.color.primaryContainer),k6n=(0,f.styled)(f.Icons.Check)(b6n||(b6n=x6n(["\n  width: 40px;\n  color: ",";\n"])),e=>e.theme.sys.color.primary),j6n=(0,f.styled)(f.Text)(h6n||(h6n=x6n(["\n  margin-bottom: 12px;\n  text-align: center;\n"]))),C6n=(0,f.styled)(f.Text)(v6n||(v6n=x6n(["\n  text-align: center;\n"]))),S6n=()=>(0,Ze.jsxs)(T6n,{children:[(0,Ze.jsx)(O6n,{children:(0,Ze.jsx)(k6n,{fontSize:"large"})}),(0,Ze.jsx)(j6n,{typescale:"title",size:"large",children:"Nothing to display..."}),(0,Ze.jsx)(C6n,{typescale:"body",size:"large",children:"If any missing pieces of data are found they will be displayed here"})]});var N6n,w6n,D6n,A6n;function R6n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function P6n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R6n(Object(t),!0).forEach(function(n){L6n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R6n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function L6n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function I6n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const E6n=(0,f.styled)("div")(N6n||(N6n=I6n(["\n  min-height: 480px;\n"]))),_6n=(0,f.styled)(f.AgGrid)(w6n||(w6n=I6n(["\n  flex: 1;\n  height: 480px;\n"]))),F6n=(0,f.styled)("div")(D6n||(D6n=I6n(["\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  margin-bottom: 16px;\n  gap: 16px;\n"]))),B6n=(0,f.styled)(f.Button)(A6n||(A6n=I6n(["\n  width: 130px;\n"])));function U6n(){var e,n;const t=(0,eg.A)(),a=(0,g.useRef)(null),r=rt(),i=(0,N.m)(),{showNotification:o}=vt(),l=rc(),[s,c]=(0,g.useState)(!1),d=(0,g.useCallback)(()=>c(!0),[]),[u,p]=(0,g.useState)(null),[m,f]=(0,g.useState)(!1),[y,b]=(0,g.useState)(!1),[h]=(0,Ot.n)(Bt),[v]=(0,gs._)(Ft,{fetchPolicy:"network-only"}),x=(0,g.useCallback)(async e=>{const{data:{getDataTrackerValidationResults:{rows:n,totalRows:t}}}=await v({variables:P6n(P6n({},e),{},{accountId:r,isIgnored:!1})});return{rows:n,totalRows:t}},[r]),T=(0,g.useCallback)(async e=>{try{const{data:{getDataTrackerValidationFilters:n}}=await i.query({query:Fqe,variables:{accountId:r,field:e.colDef.colId||e.colDef.field}});e.success(n.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){o("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning"),de.Cp(n)}},[r,i,o]),O=(0,g.useMemo)(()=>({getRows:async e=>{let{request:n,success:t,fail:a}=e;try{const{startRow:e,sortModel:a,filterModel:r}=n,i=ia(r),{rows:o,totalRows:l}=await x({offset:e||0,limit:20,sort:oa(a),filters:i});if(t({rowData:o,rowCount:l}),0===l&&(0,zt.isEmpty)(i))return d()}catch(e){a(),de.Cp(e)}}}),[x,d]),k=()=>{var e;if(null===(e=a.current)||void 0===e||!e.gridApi)return;const n=a.current.gridApi.getSelectedRows();f(!!n.length)},j=(0,g.useCallback)(e=>{p(e.node)},[]),C=e=>{var n;if(null===(n=a.current)||void 0===n||!n.gridApi)return;const t=20*a.current.gridApi.paginationGetCurrentPage(),r=t+20-1,i=[];for(let e=t;e<=r;e++){const n=a.current.gridApi.getDisplayedRowAtIndex(e);n&&i.push(n)}if(e)return a.current.gridApi.deselectAll(),void f(!1);i.forEach(e=>{e.isSelected()||e.setSelected(!0)})},S=(0,g.useCallback)(async e=>{if(null===u)return;const n=e.newValue||null;if(n!==e.oldValue)try{u.updateData(P6n(P6n({},u.data),{},{note:e.newValue})),await h({variables:{input:[{id:e.data.id,accountId:r,note:n}]}}),u.setSelected(!1),o("The data tracker result note has been successfully updated!")}catch(n){u.updateData(P6n(P6n({},u.data),{},{note:e.oldValue})),o("Something went wrong. The data tracker result note wasn't updated.","danger")}},[r,h,o,u]),w=(0,g.useMemo)(()=>l.dataTracker.find(e=>e.startsWith("updateDataTrackerValidationResults")),[l]),D=(0,g.useMemo)(()=>({onCellEditingStopped:S,onCellEditingStarted:j,onSelectionChanged:k,suppressRowClickSelection:!0,pagination:!0,paginationPageSize:20,cacheBlockSize:20,paginationPageSizeSelector:!1,rowSelection:"multiple",rowModelType:"serverSide",serverSideDatasource:O,defaultColDef:{sortable:!0,filter:!0,cellStyle:{paddingTop:"5px",paddingBottom:"5px",height:"auto",wordBreak:"break-word",lineHeight:"20px"}},columnDefs:[{headerName:"Utility",headerTooltip:"Resource for which data is expected",checkboxSelection:!0,filterParams:{values:T,valueFormatter:la},field:"utility",minWidth:150,valueFormatter:e=>{let{value:n}=e;return(0,zt.capitalize)(n)}},{headerName:"Supplier",headerTooltip:"Upload supplier",filter:"agTextColumnFilter",filterParams:P6n({},{buttons:["reset","apply"],closeOnApply:!0}),field:"supplierName",minWidth:200},{headerName:"Start Date",headerTooltip:"Start date of the expected time frame",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},field:"startDate",minWidth:200},{headerName:"End Date",headerTooltip:"End date of the expected time frame",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Ht(n)},field:"endDate",minWidth:200},{headerName:"Location",filterParams:{values:T,valueFormatter:la},field:"locations",minWidth:200},{headerName:"Meter",filterParams:{values:T,valueFormatter:la},field:"meters",minWidth:200},{headerName:"Reason",headerTooltip:"Notification reason",filter:"agTextColumnFilter",filterParams:P6n({},{buttons:["reset","apply"],closeOnApply:!0}),field:"reason",minWidth:300},{headerName:"Notes",headerTooltip:"Notification notes can be left here",filter:"agTextColumnFilter",filterParams:P6n({},{buttons:["reset","apply"],closeOnApply:!0}),field:"note",editable:!0,cellEditor:"agTextCellEditor",valueGetter:e=>{let{data:{note:n}}=e;return n},valueSetter:e=>e.newValue!==e.oldValue,minWidth:200}],rowStyle:{width:"100%",display:"flex",alignItems:"center"}}),[S,j,O]);return s?(0,Ze.jsx)(S6n,{}):(0,Ze.jsxs)("div",{children:[(0,Ze.jsxs)(F6n,{children:[(0,Ze.jsx)(N$,{filtersApplied:null===(e=a.current)||void 0===e?void 0:e.filtersApplied,resetGridState:null===(n=a.current)||void 0===n?void 0:n.resetGridState}),!!w&&(0,Ze.jsx)(B6n,{variant:"outlined",onClick:()=>C(),title:t.formatMessage({id:"pages.data.overview.selectAll"}),children:t.formatMessage({id:"pages.data.overview.selectAllButtonText"})}),m&&(0,Ze.jsx)(B6n,{variant:"outlined",onClick:()=>C(!0),title:t.formatMessage({id:"pages.data.overview.deselectAll"}),children:t.formatMessage({id:"pages.data.overview.deselectAllButtonText"})}),!!w&&(0,Ze.jsx)(B6n,{variant:"contained",onClick:()=>{var e;if(null===(e=a.current)||void 0===e||!e.gridApi)return;const n=a.current.gridApi.getSelectedRows();0!==(null==n?void 0:n.length)&&b(!0)},title:t.formatMessage({id:"pages.data.overview.acceptInfo"}),children:t.formatMessage({id:"pages.data.overview.accept"})})]}),(0,Ze.jsx)(Z$,{open:y,title:t.formatMessage({id:"pages.data.overview.confirmationDialog.title"}),confirmButtonText:t.formatMessage({id:"pages.data.overview.confirmationDialog.agree"}),closeButtonText:t.formatMessage({id:"pages.data.overview.confirmationDialog.disagree"}),onConfirm:async()=>{var e;if(null===(e=a.current)||void 0===e||!e.gridApi)return;const n=a.current.gridApi.getSelectedRows();if(null!=n&&n.length)try{await h({variables:{input:null==n?void 0:n.map(e=>{let{id:n}=e;return{id:n.toString(),accountId:r,isIgnored:!0}})}}),o("The data tracker result(-s) has been successfully updated!"),null!==(t=a.current)&&void 0!==t&&t.gridApi&&(a.current.gridApi.refreshServerSide(),a.current.gridApi.deselectAll(),f(!1))}catch(e){o("Something went wrong. The data tracker result(-s) wasn't updated.","danger")}var t},onClose:()=>b(!1)}),(0,Ze.jsx)(E6n,{children:(0,Ze.jsx)(_6n,{ref:a,gridKey:"missingDataGridV2",gridOptions:D})})]})}var M6n,V6n;function z6n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const G6n=(0,f.styled)(f.Drawer)(M6n||(M6n=z6n(["\n  .DrawerSummaryClass {\n    border-radius: 14px;\n\n    &:hover {\n      background-color: ",";\n    }\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.secondaryContainer}),$6n=(0,f.styled)("div")(V6n||(V6n=z6n(["\n  font-size: ",";\n\n  &:before {\n    content: '';\n    display: inline-block;\n    width: 15px;\n    height: 15px;\n    border-radius: 7.5px;\n    background-color: ",";\n    margin-right: 10px;\n    position: relative;\n    top: 1px;\n    flex-shrink: 0;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.typescale.body.medium.size},e=>{let{theme:n,color:t}=e;return(0,zt.get)(n,t)}),W6n=()=>(0,Ze.jsxs)(G6n,{children:[(0,Ze.jsx)(f.DrawerSummary,{className:"DrawerSummaryClass",expandIcon:(0,Ze.jsx)(f.Icons.ExpandMore,{}),"aria-controls":"panel1a-content",children:(0,Ze.jsx)($6n,{color:"sys.color.error",children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.missingTransactions"})})}),(0,Ze.jsx)(f.DrawerDetails,{children:(0,Ze.jsx)(U6n,{})})]});var q6n,J6n,Y6n,H6n,K6n,Q6n,Z6n,X6n;function e7n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const n7n=(0,f.styled)("div")(q6n||(q6n=e7n(["\n  padding: 44px 0;\n  margin-bottom: 4px;\n  height: fit-content;\n  width: 100%;\n  font-family: 'Plus Jakarta Sans', Helvetica, Arial, sans-serif;\n"]))),t7n=(0,f.styled)("div")(J6n||(J6n=e7n(["\n  margin-right: 10px;\n  margin-left: 10px;\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n\n  svg {\n    width: 24px;\n    height: 24px;\n\n    path {\n      fill: ",";\n    }\n  }\n"])),e=>e.theme.palette.grey[600]),a7n=(0,f.styled)("div")(Y6n||(Y6n=e7n(["\n  display: flex;\n  flex-direction: row;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onBackground}),r7n=(0,f.styled)("div")(H6n||(H6n=e7n(["\n  margin: 10px;\n"]))),i7n=(0,f.styled)("div")(K6n||(K6n=e7n(["\n  margin-left: 16px;\n"]))),o7n=(0,f.styled)("div")(Q6n||(Q6n=e7n(["\n  display: flex;\n  flex-direction: column;\n  gap: 20px;\n"]))),l7n=(0,f.styled)(f.Text)(Z6n||(Z6n=e7n(["\n  margin: 5px;\n"]))),s7n=(0,f.styled)(f.Text)(X6n||(X6n=e7n(["\n  margin: 4px 0;\n"]))),c7n=()=>{const[e,n]=(0,g.useState)(null),t=(0,g.useCallback)(e=>{n(e.currentTarget)},[]),a=(0,g.useCallback)(()=>{n(null)},[]),r=Boolean(e),i=r?"simple-popover":void 0;return(0,Ze.jsxs)(n7n,{children:[(0,Ze.jsxs)($8n,{typescale:"body",size:"medium",children:[(0,Ze.jsxs)(a7n,{children:[(0,Ze.jsx)(f.Text,{typescale:"body",size:"large",children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.dataNotifications"})}),(0,Ze.jsx)(bWe,{"aria-describedby":i,onClick:t,children:(0,Ze.jsx)(t7n,{children:(0,Ze.jsx)(f.Icons.InfoOutlined,{})})})]}),(0,Ze.jsx)(oo.Ay,{id:i,open:r,anchorEl:e,sx:{width:"90%"},onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,Ze.jsxs)(r7n,{children:[(0,Ze.jsx)(l7n,{typescale:"body",size:"small",children:"The Rio platform automatically scans your data upon upload for any transactions which vary significantly from historic data. Rio also identifies gaps, flagging missing data from your suppliers, locations, and meters."}),(0,Ze.jsx)("br",{}),(0,Ze.jsx)(f.Text,{typescale:"label",size:"medium",fontStyle:"bold",children:"Missing data and empty transactions:"}),(0,Ze.jsx)(l7n,{typescale:"body",size:"small",children:"• Identifies missing data, or rows of data based on:"}),(0,Ze.jsxs)(i7n,{children:[(0,Ze.jsx)(s7n,{typescale:"body",size:"small",children:"○ Supplier"}),(0,Ze.jsx)(s7n,{typescale:"body",size:"small",children:"○ Locations"}),(0,Ze.jsx)(s7n,{typescale:"body",size:"small",children:"○ Meters"})]}),(0,Ze.jsxs)(f.Text,{typescale:"body",size:"small",style:{marginBottom:16},children:["For more information on configuring your data tracker see"," ",(0,Ze.jsx)(C4n.A,{target:"_blank",href:"https://support.rio.ai/knowledge/data-tracker-automated-upload-gap-analysis-in-rio",children:"support page"})]}),(0,Ze.jsx)(f.Text,{typescale:"label",size:"medium",fontStyle:"bold",children:"Anomalies found in your data:"}),(0,Ze.jsx)(l7n,{typescale:"body",size:"small",children:"• Identifies locations with data uploaded outside of the period a location is active in reporting (based on open/closed dates indicated in configuration)."}),(0,Ze.jsx)(i7n,{children:(0,Ze.jsx)(s7n,{typescale:"body",size:"small",fontStyle:"italic",children:"○ Example: Site A closed in December 2023, but Rio has detected data uploaded in January 2024"})}),(0,Ze.jsx)(l7n,{typescale:"body",size:"small",children:"• Identifies meters with zero readings provided"}),(0,Ze.jsx)(i7n,{children:(0,Ze.jsx)(s7n,{typescale:"body",size:"small",fontStyle:"italic",children:"○ Example: A reading of 0 kWh was uploaded to Meter A in January 2024"})}),(0,Ze.jsx)(l7n,{typescale:"body",size:"small",children:"• Identifies significant increases or decreases in data compared to historic utility profiles, based on configured thresholds"}),(0,Ze.jsx)(i7n,{children:(0,Ze.jsx)(s7n,{typescale:"body",size:"small",fontStyle:"italic",children:"○ Example: Your December 2023 electricity consumption for Meter A is 65% higher than November 2023’s reading"})}),(0,Ze.jsxs)(f.Text,{typescale:"body",size:"small",children:["For more information on configuring thresholds etc. see"," ",(0,Ze.jsx)(C4n.A,{target:"_blank",href:"https://support.rio.ai/knowledge/data-tracker-automated-variance-and-anomaly-detection-in-rio",children:"support page"})]})]})})]}),(0,Ze.jsxs)(o7n,{children:[(0,Ze.jsx)(W6n,{}),(0,Ze.jsx)(f6n,{})]})]})};var d7n,u7n,p7n,m7n,f7n;function y7n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const g7n=(0,f.styled)("div")(d7n||(d7n=y7n(["\n  gap: 6px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n\n  &:hover {\n    cursor: pointer;\n  }\n"]))),b7n=(0,f.styled)("div")(u7n||(u7n=y7n(["\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));\n  align-items: flex-start;\n  gap: 16px;\n  width: 100%;\n"]))),h7n=((0,f.styled)("div")(p7n||(p7n=y7n(["\n  text-transform: uppercase;\n  vertical-align: middle;\n"]))),(0,f.styled)(f.Text)(m7n||(m7n=y7n(["\n  width: 80px;\n  text-align: center;\n  color: ",";\n  line-height: 16px;\n  text-transform: none;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant})),v7n=(0,f.styled)("div")(f7n||(f7n=y7n(["\n  width: 80px;\n  height: 80px;\n  border-radius: 16px;\n  border: 1px solid #c7c5d0;\n  box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.05);\n  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n\n  svg {\n    width: 32px;\n    height: 32px;\n    color: ",";\n  }\n\n  &:hover {\n    background-color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.primary},e=>{let{theme:n}=e;return n.sys.color.secondaryContainer}),x7n=["buildingEnergyRatings","emissionsDatabase"],T7n=e=>{let{kind:n,to:t}=e;const a=(0,m.Zp)(),r=M$e(n),i=x7n.includes(n)?"emissionsDatabase"===n?"./emissionsDatabase/view":"./buildingEnergyRatings/view":t;return(0,Ze.jsxs)(g7n,{onClick:()=>a(i),children:[(0,Ze.jsx)(v7n,{children:r}),(0,Ze.jsx)(h7n,{typescale:"label",size:"small",children:(0,Ze.jsx)(Je.A,{id:"pages.data.subjects.".concat(n)})})]})},O7n=e=>{let{activeAccessControls:n,isPortfolio:t,isApi:a,dataAccessControls:r}=e;const i=(0,m.Zp)();if(t)return(0,Ze.jsx)(b7n,{children:(0,Ze.jsxs)(g7n,{onClick:()=>i("./investment/uploads"),children:[(0,Ze.jsx)(v7n,{children:(0,Ze.jsx)(sJe,{})}),(0,Ze.jsx)(h7n,{typescale:"label",size:"small",children:"Funds & Assets"})]})});if(a){const e=[];return null!=r&&r.oilAndGas&&e.push("oilProduction","salesData","liquidFuels","emissionsDatabase"),(0,Ze.jsx)(b7n,{children:e.map((e,n)=>(0,Ze.jsx)(T7n,{kind:e,to:"./".concat(jXe(e),"/uploads")},"".concat(e," - ").concat(n)))})}return(0,Ze.jsx)(b7n,{children:null==n?void 0:n.map((e,n)=>(0,Ze.jsx)(T7n,{kind:e,to:"./".concat(jXe(e),"/uploads")},"".concat(e," - ").concat(n)))})},k7n=t.p+"noData-6508859374a3545ad06c.svg";var j7n,C7n,S7n,N7n,w7n,D7n,A7n,R7n,P7n=t(20218),L7n=t.n(P7n),I7n=t(96628),E7n=t.n(I7n),_7n=t(33600),F7n=t.n(_7n),B7n=t(59190),U7n=t.n(B7n),M7n=t(93448),V7n=t.n(M7n),z7n=t(97230),G7n=t.n(z7n);function $7n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const W7n=(0,f.styled)("div")(j7n||(j7n=$7n(["\n  width: 100%;\n  height: 100%;\n  display: flex;\n  padding: 18px;\n  border-radius: 16px;\n  align-self: center;\n  flex-direction: column;\n  align-items: flex-start !important;\n  border-width: ",";\n  border-style: ",";\n  border-color: ",";\n  justify-content: ",";\n"])),e=>{let{border:n}=e;return n?"1px":"none"},e=>{let{isDataValid:n}=e;return n?"solid":"dashed"},e=>{let{border:n,theme:t}=e;return n&&t.sys.color.outlineVariant},e=>{let{isDataValid:n}=e;return n?"space-between":"space-around"}),q7n=(0,f.styled)("div")(C7n||(C7n=$7n(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n"]))),J7n=(0,f.styled)(q7n)(S7n||(S7n=$7n(["\n  margin: 2% auto;\n"]))),Y7n=(0,f.styled)("p")(N7n||(N7n=$7n(["\n  font-size: ",";\n  font-family: ",";\n  color: ",";\n"])),e=>{let{theme:n}=e;return"".concat(n.sys.typescale.title.small.size,"px")},e=>{let{theme:n}=e;return n.sys.typescale.title.medium.family},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),H7n=(0,f.styled)("p")(w7n||(w7n=$7n(["\n  font-size: ","px;\n  font-family: ",";\n  color: ",";\n  text-align: left;\n"])),e=>{let{theme:n}=e;return n.sys.typescale.title.medium.size},e=>{let{theme:n}=e;return n.sys.typescale.title.medium.family},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),K7n=(0,f.styled)("h3")(D7n||(D7n=$7n(["\n  font-size: ",";\n  font-family: ",";\n  color: ",";\n"])),e=>{let{theme:n}=e;return"".concat(n.sys.typescale.title.large.size,"px")},e=>{let{theme:n}=e;return n.sys.typescale.title.medium.family},e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),Q7n=(0,f.styled)(p.Link)(A7n||(A7n=$7n(["\n  text-decoration: underline;\n"]))),Z7n=(0,f.styled)("div")(R7n||(R7n=$7n(["\n  height: ",";\n  width: ",";\n  & > img {\n    height: 100%;\n    width: 100%;\n  }\n"])),e=>{let{size:n}=e;return"".concat(n,"px")},e=>{let{size:n}=e;return"".concat(n,"px")}),X7n=e=>{let{data:n,children:t,title:a="",sectionName:r,iconSize:i=80,border:o=!1,icon:l=k7n,suppressSuggestion:s=!1}=e;const c=(e=>!(U7n()(e)||V7n()(e)&&0===Math.round(e)||G7n()(e)&&"PieChartData"===Gw()(e,"__typename")&&(L7n()(Gw()(e,"series"),e=>G7n()(e)&&0===Math.round(Gw()(e,"absoluteValue",1)))||L7n()(Gw()(e,"drilldown"),e=>G7n()(e)&&0===Math.round(Gw()(e,"absoluteValue",1))))||E7n()(e)&&L7n()(e,e=>G7n()(e)&&0===Math.round(Gw()(e,"value",1)))||(G7n()(e)||E7n()(e))&&F7n()(e)))(n),d=oc();return c?(0,Ze.jsx)(Ze.Fragment,{children:t}):(0,Ze.jsxs)(W7n,{border:o,isDataValid:c,children:[(0,Ze.jsx)(H7n,{children:r}),(0,Ze.jsxs)(J7n,{children:[(0,Ze.jsx)(Z7n,{size:i,children:(0,Ze.jsx)(DEn,{src:l,alt:"No data"})}),!s&&(0,Ze.jsxs)(q7n,{children:[(0,Ze.jsx)(K7n,{children:a||"No data"}),(0,Ze.jsxs)(Y7n,{children:["Upload data in the ",(0,Ze.jsx)(Q7n,{to:"/".concat(d.data.root),children:"data"})," section"]})]})]})]})};var e8n,n8n,t8n=t(34140);function a8n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const r8n=(0,f.styled)(t8n.A)(e8n||(e8n=a8n(["\n  width: 100%;\n  max-width: 650px;\n  min-width: 487px;\n  min-height: 397px;\n  border-radius: 8px;\n  border: 1px solid ",";\n"])),e=>e.theme.sys.color.outlineVariant),i8n=(0,f.styled)("div")(n8n||(n8n=a8n(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n\n  svg {\n    fill: ",";\n  }\n"])),e=>e.theme.sys.color.primary),o8n={dataCompleteness:e=>(0,Ze.jsx)(f.CircularProgress,{mode:"simple-right",value:e.value,color:"secondary"}),dataQuality:e=>(0,Ze.jsx)(f.CircularProgress,{mode:"simple-right",value:e.value,color:"primary"}),chevron:()=>(0,Ze.jsx)(i8n,{children:(0,Ze.jsx)(f.Icons.ChevronRight,{})})},l8n=e=>{const n=(0,m.Zp)(),t=rt(),a=(0,g.useMemo)(()=>({rowData:[...e.data],pagination:!1,components:o8n,onRowClicked:e=>{const t=(e=>{switch(e.toLowerCase()){case"waste":return"/v2/data/waste/view";case"electricity":return"/v2/data/electricity/view";case"gas":case"natural gas":return"/v2/data/gas/view";case"water":return"/v2/data/water/view";case"materials":return"/v2/data/materials/view";case"fuel":return"/v2/data/fuel/view";case"transport":return"/v2/data/transport/view";case"refrigerants & other gases":case"refrigerants and other gases":return"/v2/data/refrigerants/view";case"heat & steam":case"heat and steam":case"heatsteam":return"/v2/data/heatSteam/view";case"building energy ratings":return"/v2/data/buildingEnergyRatings/view";case"home working":case"hotel stays":case"hotel stays & home working":case"hotel stays and home working":return"/v2/data/hotelStays/view";default:return""}})(e.data.utility);t&&n(t)},defaultColDef:{sortable:!1,filter:!1,suppressHeaderMenuButton:!0,suppressMovable:!0,resizable:!1,cellStyle:{display:"flex",alignItems:"center",paddingTop:"10px",paddingBottom:"10px",paddingLeft:"24px",paddingRight:"24px"}},rowStyle:{width:"100%",display:"flex",alignItems:"center"},columnDefs:[{headerName:"Utility",field:"utility",width:240,valueFormatter:e=>d1e(e.value)},{headerName:"Data quality",field:"dataQuality",cellRenderer:"dataQuality",width:160},{headerName:"Data completeness",field:"dataCompleteness",cellRenderer:"dataCompleteness",width:200},{headerName:"",field:"chevron",cellRenderer:"chevron",width:20,cellStyle:{paddingLeft:0,paddingRight:0}}]}),[e.data,n]);return(0,Ze.jsx)(r8n,{elevation:1,children:(0,Ze.jsx)(f.AgGrid,{gridKey:"DataCompletenessGridV2",gridOptions:a},t)})};var s8n;const c8n=(0,D.J1)(s8n||(s8n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetDataQualityPercentage($accountId: ID!, $from: AWSDate!, $to: AWSDate!) {\n    getDataQualityPercentage(accountId: $accountId, from: $from, to: $to) {\n      overallDataQuality\n      overallDataCompleteness\n      dataQualityBreakdown {\n        utility\n        dataQuality\n        dataCompleteness\n      }\n    }\n  }\n"])));var d8n,u8n,p8n,m8n,f8n,y8n,g8n,b8n,h8n,v8n,x8n,T8n;function O8n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const k8n=(0,f.styled)("div")(d8n||(d8n=O8n(["\n  display: flex;\n  flex-direction: column;\n  padding: 32px;\n  border-radius: 16px;\n  border: 1px solid ",";\n  background: ",";\n  gap: 24px;\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{theme:n}=e;return n.sys.color.surface}),j8n=(0,f.styled)("div")(u8n||(u8n=O8n(["\n  display: flex;\n  margin-bottom: auto;\n"]))),C8n=(0,f.styled)("div")(p8n||(p8n=O8n(["\n  margin-top: 8px;\n  min-width: 190px;\n  margin-right: 55px;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 24px;\n"]))),S8n=(0,f.styled)(f.Text)(m8n||(m8n=O8n(["\n  color: ",";\n"])),e=>e.theme.sys.color.onSurfaceVariant),N8n=(0,f.styled)("div")(f8n||(f8n=O8n(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 120px 32px 32px 32px;\n  width: 100%;\n"]))),w8n=(0,f.styled)(f.LinearProgress)(y8n||(y8n=O8n(["\n  width: 100%;\n  height: 3px;\n"]))),D8n=(0,f.styled)("div")(g8n||(g8n=O8n(["\n  display: flex;\n  flex-direction: row;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onBackground}),A8n=(0,f.styled)("div")(b8n||(b8n=O8n(["\n  margin-right: 10px;\n  margin-left: 10px;\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  cursor: pointer;\n\n  svg {\n    width: 24px;\n    height: 24px;\n\n    path {\n      fill: ",";\n    }\n  }\n"])),e=>e.theme.palette.grey[600]),R8n=Ge.default.span(h8n||(h8n=O8n(["\n  font-weight: bold;\n"]))),P8n=Ge.default.ol(v8n||(v8n=O8n(["\n  padding: 20px 0 0;\n"]))),L8n=Ge.default.li(x8n||(x8n=O8n(["\n  margin-bottom: 10px;\n"]))),I8n=Ge.default.div(T8n||(T8n=O8n(["\n  padding: 20px;\n  max-width: 800px;\n"]))),E8n=Wt()().subtract(1,"year").format("YYYY-MM-DD"),_8n=Fa().format("YYYY-MM-DD"),F8n=()=>{const e=rt(),{loading:n,error:t,data:a,refetch:r}=function(e,n,t){return(0,h.IT)(c8n,{variables:{accountId:e,from:n,to:t}})}(e,E8n,_8n),[i,o]=(0,g.useState)(null),l=Boolean(i),s=l?"simple-popover":void 0,c=(0,g.useCallback)(e=>{o(e.currentTarget)},[]),d=(0,g.useCallback)(()=>{o(null)},[]);return n?(0,Ze.jsx)(f.Loader,{size:100}):(0,Ze.jsx)(k8n,{children:(0,Ze.jsxs)(X7n,{sectionName:"Data quality & completeness",data:null==a?void 0:a.getDataQualityPercentage.overallDataQuality,iconSize:100,children:[(0,Ze.jsxs)(D8n,{children:[(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:"Data quality & completeness"}),(0,Ze.jsx)(A8n,{"aria-describedby":s,onClick:c,children:(0,Ze.jsx)(f.Icons.InfoOutlined,{})})]}),(0,Ze.jsx)(oo.Ay,{id:s,open:l,anchorEl:i,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:(0,Ze.jsxs)(I8n,{children:[(0,Ze.jsxs)(HWe.A,{variant:"body1",children:["Gain a high-level view of your data: ",(0,Ze.jsx)(R8n,{children:"Data Quality"})," and"," ",(0,Ze.jsx)(R8n,{children:"Data Completeness"})," per utility are calculated for the last 12 months of data. For example, if today is 01/09/2024, Rio will analyse the period from 01/09/2023 to 01/09/2024 to calculate the percentages seen below."]}),(0,Ze.jsxs)(P8n,{children:[(0,Ze.jsx)(L8n,{children:(0,Ze.jsxs)(HWe.A,{variant:"body2",children:[(0,Ze.jsx)(R8n,{children:"1. Data Quality"})," is calculated as the number of days with ",(0,Ze.jsx)("em",{children:"actual"})," data divided by the total number of days in the ",(0,Ze.jsx)("em",{children:"period"}),". For example, If you have ",(0,Ze.jsx)("em",{children:"actual"})," ","data available for 80 out of the 100 days in the ",(0,Ze.jsx)("em",{children:"period"}),", the ",(0,Ze.jsx)("em",{children:"Data Quality"})," would be calculated as 80%, indicating that 80% of the days have ",(0,Ze.jsx)("em",{children:"actual"})," readings (not estimated)."]})}),(0,Ze.jsx)(L8n,{children:(0,Ze.jsxs)(HWe.A,{variant:"body2",children:[(0,Ze.jsx)(R8n,{children:"2. Data Completeness"})," is analysed based on the number of days which have data uploaded within the last 12 months. For example, If Rio records data for 90 out of the 100 possible days, the Data Completeness would be 90%, meaning 90% of the days within the period have data uploaded in Rio."]})})]})]})}),(0,Ze.jsxs)(j8n,{children:[(0,Ze.jsxs)(C8n,{children:[(0,Ze.jsx)(f.Text,{typescale:"label",size:"small",children:"Organisation data quality"}),!n&&!t&&a&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.CircularProgress,{mode:"chart",value:null==a?void 0:a.getDataQualityPercentage.overallDataQuality}),(0,Ze.jsx)(f.CircularProgress,{mainContainerProps:{sx:{minWidth:"190px"}},mode:"simple-right",additionalText:"data completeness",value:null==a?void 0:a.getDataQualityPercentage.overallDataCompleteness,color:"secondary"})]})]}),n&&(0,Ze.jsx)(N8n,{children:(0,Ze.jsx)(w8n,{})}),!n&&!t&&a&&(0,Ze.jsx)(l8n,{data:(null==a?void 0:a.getDataQualityPercentage.dataQualityBreakdown)||[]}),!n&&t&&(0,Ze.jsx)(f.LoadFailed,{title:"Error at loading the data",error:t,retry:r})]}),(0,Ze.jsx)(S8n,{children:"Upload actual sustainability data for better Data Quality scores"})]})})};var B8n,U8n,M8n;function V8n(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const z8n=(0,f.styled)("div")(B8n||(B8n=V8n(["\n  width: 100%;\n"]))),G8n=(0,f.styled)(f.Text)(U8n||(U8n=V8n(["\n  margin-bottom: 24px;\n"]))),$8n=(0,f.styled)(f.Text)(M8n||(M8n=V8n(["\n  gap: 12px;\n  display: flex;\n  align-items: center;\n  margin-bottom: 16px;\n\n  svg {\n    width: 18px;\n    height: 18px;\n\n    path {\n      fill: ",";\n    }\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}).withComponent("div"),W8n=e=>{let{activeAccessControls:n,investment:t,dataAccessControls:a}=e;const r=localStorage.getItem("UPLOAD_CURRENT_TAB_V2")||null,i=(0,g.useMemo)(()=>t&&r?Number(r):0,[t,r]),[o,l]=(0,g.useState)(Number(i)),s=(0,g.useMemo)(()=>null==a?void 0:a.oilAndGas,[a]),c=(0,g.useCallback)(()=>{const e={label:mJe[0],children:(0,Ze.jsx)(O7n,{activeAccessControls:n})},r={label:mJe[1],children:(0,Ze.jsx)(O7n,{isPortfolio:!0})},i={label:mJe[2],children:(0,Ze.jsx)(O7n,{isApi:!0,dataAccessControls:a})},o=[e];return t&&o.push(r),s&&o.push(i),o},[n,t,s,a]),d=(0,g.useCallback)(e=>yJe(String(e)),[]);(0,g.useEffect)(()=>{var e;t?l(null!==(e=Number(r))&&void 0!==e?e:0):(l(0),yJe(String(0)))},[t,r]);const u=(0,g.useMemo)(()=>(0,Ze.jsx)(f.Tabs,{tabs:c(),currentTab:o,handlerChangeTab:d}),[o,c,d]);return(0,Ze.jsxs)(z8n,{children:[(0,Ze.jsx)(G8n,{typescale:"headline",size:"medium",children:(0,Ze.jsx)(Je.A,{id:"pages.data.overview.uploadHeader"})}),u,(0,Ze.jsx)(c7n,{}),(0,Ze.jsx)(F8n,{})]})};var q8n;const J8n=(0,qi.Ay)("div")(q8n||(q8n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  max-width: 260px;\n  height: max-content;\n  position: sticky;\n  top: 0;\n"]))),Y8n=e=>{let{activeAccessControls:n,inactiveAccessControls:t,apiAccessControls:a=[],dataAccessControls:r}=e;const i=(0,m.zy)(),{pathname:o}=i,l=(e,n)=>{const t="overview"===e?"./":"fundsAssets"===e?"./investment/view":"./".concat(jXe(e),"/view");return{to:t,item:(0,Ze.jsx)(Je.A,{id:"pages.data.subjects.".concat(n||e)}),isActive:o.includes(t)||"overview"===e}},s=n.map(e=>l(e)),c=t.map(e=>l(e)),d=a.map(e=>l(e)),{formatMessage:u}=(0,eg.A)();return(0,Ze.jsxs)(J8n,{children:[(0,Ze.jsx)(f.NavigationDrawer,{items:[l("overview")]}),(0,Ze.jsx)(f.NavigationDrawer,{title:u({id:"Organisation"}),items:s}),!!t.length&&(0,Ze.jsx)(f.NavigationDrawer,{title:u({id:"Portfolio"}),items:c}),!!a.length&&(0,Ze.jsx)(f.NavigationDrawer,{title:"American Petroleum Institute",items:d}),(null==r?void 0:r.insite)&&(0,Ze.jsx)(f.NavigationDrawer,{title:"InSite Estate",items:[l("inSiteLeases","inSiteContracts"),l("inSiteBreeams","inSiteBuildings"),l("inSiteLandParcels")]})]})};var H8n;const K8n=(0,qi.Ay)("div")(H8n||(H8n=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n  gap: 48px;\n  display: flex;\n"])));function Q8n(){var e,n,t;const a=Pu(),{data:r}=Td(),[i,o]=(0,g.useState)(!0);(0,g.useEffect)(()=>{setTimeout(()=>{o(!1)},500)},[o]);const l=["oilProduction","salesData","liquidFuels","emissionsDatabase"],s=Object.entries(r.data).reduce((e,n)=>{let[t,a]=n;return bJe.includes(t)&&a&&!l.includes(t)&&e.push(t),e},[]),c=r.data.oilAndGas?l:[],d=null!=r&&null!==(e=r.data)&&void 0!==e&&e.investment?["fundsAssets"]:[];return(0,Ze.jsx)(f.Page,{loading:i,title:{crumbs:[{to:"./",label:"Data"},{label:"Overview"}],content:"Upload data to help us assess your impact"},children:(0,Ze.jsxs)(K8n,{children:[(0,Ze.jsx)(Y8n,{activeAccessControls:s,inactiveAccessControls:d,apiAccessControls:c,dataAccessControls:null==a?void 0:a.accessControls.data}),(null==a||null===(n=a.accessControls)||void 0===n?void 0:n.data)&&(0,Ze.jsx)(W8n,{investment:null===(t=a.accessControls.data)||void 0===t?void 0:t.investment,activeAccessControls:s,dataAccessControls:a.accessControls.data})]})})}function Z8n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function X8n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z8n(Object(t),!0).forEach(function(n){e9n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z8n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function e9n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const n9n=[{label:"Data",to:".."},{label:"Gas"}],t9n={uploadReference:aDe,documentReference:rDe,link:eDe},a9n=()=>{const e=OVe(),[n]=Jm(vVe(),{fetchPolicy:"network-only"}),t=(0,g.useCallback)(async e=>{const{data:{getGasTransactionsPage:{totalRows:t,rows:a}}}=await n({variables:e});return{rows:a,totalRows:t}},[n]);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Jwe,{title:"Your gas data",defaultExportFileName:"gas-export",breadcrumbs:n9n,uploadLink:"../gas/uploads",config:X8n(X8n({},e),{},{components:t9n}),fetchRows:t,transactionType:Vt.D_.Gas})})};function r9n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function i9n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r9n(Object(t),!0).forEach(function(n){o9n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r9n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function o9n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const l9n=[{label:"Data",to:".."},{label:"Fuel"}],s9n={uploadReference:aDe,documentReference:rDe},c9n=()=>{const e=Sze(),[n]=Jm(kze,{fetchPolicy:"network-only"}),t=(0,g.useCallback)(async e=>{const{data:{getFuelTransactionPage:{totalRows:t,rows:a}}}=await n({variables:e});return{rows:a,totalRows:t}},[n]);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Jwe,{title:"Your fuel data",defaultExportFileName:"fuel-export",breadcrumbs:l9n,uploadLink:"../fuel/uploads",config:i9n(i9n({},e),{},{components:s9n}),fetchRows:t,transactionType:Vt.D_.Fuel})})};function d9n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function u9n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d9n(Object(t),!0).forEach(function(n){p9n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d9n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function p9n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const m9n=[{label:"Data",to:".."},{label:"Waste"}],f9n={uploadReference:aDe,documentReference:rDe},y9n="waste-export",g9n=()=>{const e=YMe({defaultVariant:"reporting",exportFileName:y9n}),n=JMe({fetchFilters:e.fetchFilters});return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Jwe,{title:"Your waste data",defaultExportFileName:y9n,breadcrumbs:m9n,uploadLink:"../waste/uploads",config:u9n(u9n({},n),{},{components:f9n}),fetchRows:e,transactionType:Vt.D_.Waste})})};function b9n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function h9n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b9n(Object(t),!0).forEach(function(n){v9n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b9n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function v9n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const x9n=[{label:"Data",to:".."},{label:"Materials"}],T9n={documentReference:rDe,uploadReference:aDe},O9n=e=>{let{dataAccessControls:n}=e;const t=Vze(),[a]=Jm(Bze,{fetchPolicy:"network-only"}),r=(0,g.useCallback)(async e=>{const{data:{getMaterialsTransactionsPage:{totalRows:n,rows:t}}}=await a({variables:e});return{rows:t,totalRows:n}},[a]);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Jwe,{title:"Your materials data",defaultExportFileName:"materials-export",breadcrumbs:x9n,uploadLink:"../materials/uploads",config:h9n(h9n({},t),{},{components:T9n}),fetchRows:r,transactionType:Vt.D_.Materials,extraButtons:(0,Ze.jsxs)(Ze.Fragment,{children:[n.scope3ActivityBasedMaterials&&(0,Ze.jsx)(f.Button,{to:"/data/s3c1-activity-based-materials/view",children:"Activity data"}),n.scope3SpendBasedMaterials&&(0,Ze.jsx)(f.Button,{to:"/data/s3c1-spend-based-materials/view",children:"Spend data"})]})})})};function k9n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function j9n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k9n(Object(t),!0).forEach(function(n){C9n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k9n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function C9n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const S9n=[{label:"Data",to:".."},{label:"Transport"}],N9n={uploadReference:aDe,documentReference:rDe},w9n="transport-export",D9n=()=>{const e=sze({defaultVariant:"reporting",exportFileName:w9n}),n=JVe({fetchFilters:e.fetchFilters});return(0,Ze.jsx)(Jwe,{title:"Your transport data",defaultExportFileName:w9n,breadcrumbs:S9n,uploadLink:"../transport/uploads",config:j9n(j9n({},n),{},{components:N9n}),fetchRows:e,transactionType:Vt.D_.Transport})};function A9n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function R9n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?A9n(Object(t),!0).forEach(function(n){P9n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A9n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function P9n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const L9n=[{label:"Data",to:".."},{label:"Heat and steam"}],I9n={tariffReference:nDe,uploadReference:aDe,documentReference:rDe,factorReference:eDe},E9n=()=>{const e=ODe(),[n]=Jm(vDe(),{fetchPolicy:"network-only"}),t=(0,g.useCallback)(async e=>{const{data:{getHeatSteamTransactionsPage:{totalRows:t,rows:a}}}=await n({variables:e});return{rows:a,totalRows:t}},[n]);return(0,Ze.jsx)(Jwe,{title:"Your heat and steam data",defaultExportFileName:"heatsteam-export",breadcrumbs:L9n,uploadLink:"../heatSteam/uploads",config:R9n(R9n({},e),{},{components:I9n}),fetchRows:t,transactionType:Vt.D_.Heatsteam})},_9n=[{label:"Data",to:".."},{label:"Building energy ratings"}],F9n=()=>{const e=a$e(),[n]=r$e(),t=(0,g.useCallback)(async e=>{const{data:t}=await n({variables:e});if(t){const{getBuildingEnergyRatingsByAccountId:{totalRows:e,rows:n}}=t;return{rows:n,totalRows:e}}throw new Error("Couldn't fetch building energy ratings")},[n]);return(0,Ze.jsx)(Jwe,{title:"Your building energy ratings data",defaultExportFileName:"building-energy-ratings",breadcrumbs:_9n,config:e,fetchRows:t,transactionType:"BUILDING_ENERGY_RATINGS"})};function B9n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function U9n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B9n(Object(t),!0).forEach(function(n){M9n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B9n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function M9n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const V9n=[{label:"Data",to:".."},{label:"Water"}],z9n={uploadReference:aDe,documentReference:rDe,factorReference:eDe},G9n="water-export",$9n=()=>{const e=BVe(),[n]=Jm(EVe,{fetchPolicy:"network-only"}),t=rt(),{getValueFromStorage:a}=(0,f.useLocalStorage)(f.AG_GRID_PARAMS_V2),r=(0,g.useCallback)(async e=>{const r=a(),i=af(r,t,G9n),{data:{getWaterTransactionPage:{totalRows:o,rows:l}}}=await n({variables:U9n(U9n({},e),{},{hiddenColumns:i})});return{rows:l,totalRows:o}},[t,a,n]);return(0,Ze.jsx)(Jwe,{title:"Your water data",defaultExportFileName:G9n,breadcrumbs:V9n,uploadLink:"../water/uploads",config:U9n(U9n({},e),{},{components:z9n}),fetchRows:r,transactionType:Vt.D_.Water})};function W9n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function q9n(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?W9n(Object(t),!0).forEach(function(n){J9n(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W9n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function J9n(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Y9n=[{label:"Data",to:".."},{label:"Hotel stays and home working"}],H9n={tariffReference:nDe,uploadReference:aDe,documentReference:rDe,link:eDe},K9n=()=>{const e=u$e(),[n]=Jm(s$e,{fetchPolicy:"network-only"}),t=(0,g.useMemo)(()=>q9n(q9n({},e),{},{components:H9n}),[e]),a=(0,g.useCallback)(async e=>{const{data:{getHotelStaysTransactionsPage:{totalRows:t,rows:a}}}=await n({variables:e});return{rows:a,totalRows:t}},[n]);return(0,Ze.jsx)(Jwe,{title:"Your hotel stays and home working data",breadcrumbs:Y9n,config:t,fetchRows:a,uploadLink:"../hotelStays/uploads",defaultExportFileName:"Hotel stays & home work export",transactionType:Vt.D_.Hotelstays})},Q9n=[{label:"Data",to:".."},{label:"Investment"}],Z9n=()=>{const e=LJe(),[n]=Jm(RJe,{fetchPolicy:"network-only"}),t=(0,g.useCallback)(async e=>{const{data:{getInvestmentTransactionsByAccountId:{totalRows:t,rows:a}}}=await n({variables:e});return{rows:a,totalRows:t}},[n]);return(0,Ze.jsx)(Jwe,{title:"Your investment data",defaultExportFileName:"investment-transactions",breadcrumbs:Q9n,uploadLink:"../investment/uploads",config:e,fetchRows:t,transactionType:Vt.D_.Investment})};function X9n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function eet(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?X9n(Object(t),!0).forEach(function(n){net(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X9n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function net(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const tet=[{label:"Data",to:".."},{label:"Electricity"}],aet={uploadReference:aDe,documentReference:rDe,tariffReference:nDe,factorReference:eDe},ret=()=>{const e=iDe(),[n]=Jm(Hwe(),{fetchPolicy:"network-only"}),t=(0,g.useCallback)(async e=>{const{data:{getElectricityTransactionsPage:{totalRows:t,rows:a}}}=await n({variables:e});return{rows:a,totalRows:t}},[n]);return(0,Ze.jsx)(Jwe,{title:"Your electricity data",defaultExportFileName:"electricity-export",breadcrumbs:tet,uploadLink:"../electricity/uploads",config:eet(eet({},e),{},{components:aet}),fetchRows:t,transactionType:Vt.D_.Electricity})};function iet(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function oet(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?iet(Object(t),!0).forEach(function(n){set(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):iet(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function set(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const cet=[{label:"Data",to:".."},{label:"Refrigerants and other gases"}],det={tariffReference:nDe,uploadReference:aDe,documentReference:rDe,factorReference:eDe},uet=()=>{const e=mDe(),[n]=Jm(uDe,{fetchPolicy:"network-only"}),t=(0,g.useCallback)(async e=>{const{data:{getRefrigerantTransactionsPage:{totalRows:t,rows:a}}}=await n({variables:e});return{rows:a,totalRows:t}},[n]);return(0,Ze.jsx)(Jwe,{title:"Your refrigerants and other gases data",defaultExportFileName:"refrigerants-export",breadcrumbs:cet,uploadLink:"../refrigerants/uploads",config:oet(oet({},e),{},{components:det}),fetchRows:t,transactionType:Vt.D_.Refrigerant})},pet=[{label:"Data",to:".."},{label:"Electricity",to:"/data/electricity/view"},{label:"Uploads"}],met=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"electricityUploadGridV2",title:"Here's your upload history",breadcrumbs:pet,uploadLink:"../electricity/uploads",config:e,dataType:Vt.D_.Electricity})},fet=[{label:"Data",to:".."},{label:"Waste",to:"/data/waste/view"},{label:"Uploads"}],yet=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"wasteUploadsGridV2",title:"Here's your upload history",breadcrumbs:fet,uploadLink:"../electricity/uploads",config:e,dataType:Vt.D_.Waste})},get=[{label:"Data",to:".."},{label:"Gas",to:"/data/gas/view"},{label:"Uploads"}],bet=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"gasUploadGridV2",title:"Here's your upload history",breadcrumbs:get,uploadLink:"../gas/uploads",config:e,dataType:Vt.D_.Gas})},het=[{label:"Data",to:".."},{label:"Water",to:"/data/water/view"},{label:"Uploads"}],vet=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"waterUploadGridV2",title:"Here's your upload history",breadcrumbs:het,uploadLink:"../water/uploads",config:e,dataType:Vt.D_.Water})},xet=[{label:"Data",to:".."},{label:"Transport",to:"/data/transport/view"},{label:"Uploads"}],Tet=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"transportUploadGridV2",title:"Here's your upload history",breadcrumbs:xet,uploadLink:"../transport/uploads",config:e,dataType:Vt.D_.Transport})},Oet=[{label:"Data",to:".."},{label:"Fuel",to:"/data/fuel/view"},{label:"Uploads"}],ket=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"fuelUploadGridV2",title:"Here's your upload history",breadcrumbs:Oet,uploadLink:"../fuel/uploads",config:e,dataType:Vt.D_.Fuel})},jet=[{label:"Data",to:".."},{label:"Materials",to:"/data/materials/view"},{label:"Uploads"}],Cet=e=>{let{dataAccessControls:n}=e;const t=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"materialsUploadGridV2",title:"Here's your upload history",breadcrumbs:jet,uploadLink:"../materials/uploads",config:t,dataType:Vt.D_.Materials,extraButtons:(0,Ze.jsxs)(Ze.Fragment,{children:[n.scope3ActivityBasedMaterials&&(0,Ze.jsx)(f.Button,{to:"/data/s3c1-activity-based-materials/uploads",children:"Activity data"}),n.scope3SpendBasedMaterials&&(0,Ze.jsx)(f.Button,{to:"/data/s3c1-spend-based-materials/uploads",children:"Spend data"})]})})},Net=[{label:"Data",to:".."},{label:"Hotel Stays",to:"/data/hotelStays/view"},{label:"Uploads"}],wet=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"hotelStaysUploadGridV2",title:"Here's your upload history",breadcrumbs:Net,uploadLink:"../hotelStays/uploads",config:e,dataType:Vt.D_.Hotelstays})},Det=[{label:"Data",to:".."},{label:"Heat & Steam",to:"/data/heatSteam/view"},{label:"Uploads"}],Aet=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"heatSteamUploadGridV2",title:"Here's your upload history",breadcrumbs:Det,uploadLink:"../heatSteam/uploads",config:e,dataType:Vt.D_.Heatsteam})},Ret=[{label:"Data",to:".."},{label:"Refrigerants",to:"/data/refrigerants/view"},{label:"Uploads"}],Pet=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"refrigerantUploadGridV2",title:"Here's your upload history",breadcrumbs:Ret,uploadLink:"../refrigerant/uploads",config:e,dataType:Vt.D_.Refrigerant})},Let=[{label:"Data",to:".."},{label:"Investment",to:"/data/investment/view"},{label:"Uploads"}],Iet=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{title:"Here's your upload history",gridKey:"investmentUploadGridV2",breadcrumbs:Let,uploadLink:"../investment/uploads",config:e,dataType:Vt.D_.Investment})},Eet=[{label:"Data",to:".."},{label:"Liquid fuels",to:"/data/liquid-fuels/view"},{label:"Uploads"}],_et=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"liquidFuelUploadGridV2",title:"Here's your upload history",breadcrumbs:Eet,uploadLink:"../liquid-fuels/uploads",config:e,dataType:Vt.D_.Liquidfuel})};var Fet,Bet,Uet,Met;function Vet(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const zet=(0,D.J1)(Fet||(Fet=Vet(["\n  query GetS3C1ActivityBasedMaterialTransactionsPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getS3C1ActivityBasedMaterialTransactionsPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        locationName\n        locationCode\n        locationEndDate\n        locationSharedEmissionPercentage\n        locationCustomAttributes\n        locationCountry\n        locationRegion\n        startDate\n        endDate\n        factorSet\n        materialType\n        subtype1\n        subtype2\n        subtype3\n        weight\n        weightUnit\n        weightInKg\n        weightUnitToKgConversionFactor\n        accuracy\n        unitsQuantity\n        totalCost\n        currency\n        notes\n        reference\n        invoiceNumber\n        evidenceReference\n        otherReference\n        tags\n        importBatchId\n        importBatchFileName\n        departments\n        supplier\n        scope3Emission\n        emissionFactorValue\n        factorKey\n        subcontractor\n        productCode\n        materialDescription\n        percentRecycledContent\n        distanceToSite\n        numberOfDeliveries\n        originOfCertification\n        origin\n        purchaseType\n        organisationalUnits\n        estimatesScenario\n      }\n    }\n  }\n"]))),Get=(0,D.J1)(Bet||(Bet=Vet(["\n  query GetS3C1ActivityBasedMaterialTransactionsPageFilter($accountId: ID!, $field: String!) {\n    getS3C1ActivityBasedMaterialTransactionsPageFilter(accountId: $accountId, field: $field) {\n      value\n      label\n    }\n  }\n"]))),$et=(0,D.J1)(Uet||(Uet=Vet(["\n  query GetS3C1SpendBasedMaterialTransactionsPage(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    getS3C1SpendBasedMaterialTransactionsPage(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        id\n        locationName\n        locationCode\n        locationEndDate\n        locationSharedEmissionPercentage\n        locationCustomAttributes\n        country\n        startDate\n        endDate\n        accuracy\n        estimatesScenario\n        purchaseType\n        supplier\n        factorSet\n        materialType\n        subtype1\n        subtype2\n        subtype3\n        amount\n        currency\n        factorCurrencyAmount\n        factorCurrencyCode\n        standardCurrencyAmount\n        notes\n        reference\n        invoiceNumber\n        evidenceReference\n        otherReference\n        tags\n        importBatchId\n        importBatchFileName\n        departments\n        scope3Emission\n        emissionFactorValue\n        factorKey\n        organisationalUnits\n      }\n    }\n  }\n"]))),Wet=(0,D.J1)(Met||(Met=Vet(["\n  query GetS3C1SpendBasedMaterialTransactionsPageFilter($accountId: ID!, $field: String!) {\n    getS3C1SpendBasedMaterialTransactionsPageFilter(accountId: $accountId, field: $field) {\n      value\n      label\n    }\n  }\n"])));function qet(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Jet(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qet(Object(t),!0).forEach(function(n){Yet(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qet(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Yet(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Het={documentReference:rDe,uploadReference:aDe},Ket=()=>{const e=function(){const e=(0,N.m)(),n=Pu(),t=null==n?void 0:n.id,a=null==n?void 0:n.accessControls.customFields,{showNotification:r}=vt(),i=async n=>{try{const{data:{getS3C1ActivityBasedMaterialTransactionsPageFilter:a}}=await e.query({query:Get,variables:{accountId:t,field:n.colDef.colId||n.colDef.field}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){r("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Location",field:"locationName",filterParams:{values:i,valueFormatter:la}},{headerName:"Location Code",field:"locationCode",filterParams:{values:i,valueFormatter:la}},...Do(Vt.D_.S3C1Activitybasedmaterial,null==n?void 0:n.accessControls),{headerName:"Shared Emission Percentage",field:"locationSharedEmissionPercentage",filter:"agNumberColumnFilter"},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter"},{headerName:"Country",field:"locationCountry",filterParams:{values:i,valueFormatter:la}},{headerName:"Region",field:"locationRegion",filterParams:{values:i,valueFormatter:la}},Zwe,{headerName:"Start date",field:"startDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter",initialSort:"desc"},{headerName:"End date",field:"endDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter"},{headerName:"Factor set",field:"factorSet",filterParams:{values:i,valueFormatter:la}},{headerName:"Material type",field:"materialType",filterParams:{values:i,valueFormatter:la}},{headerName:"Subtype 1",field:"subtype1",filterParams:{values:i,valueFormatter:la}},{headerName:"Subtype 2",field:"subtype2",filterParams:{values:i,valueFormatter:la}},{headerName:"Subtype 3",field:"subtype3",filterParams:{values:i,valueFormatter:la}},...Ho(Po(Vt.D_.S3C1Activitybasedmaterial,a)),{headerName:"Number of units",field:"unitsQuantity",filter:"agNumberColumnFilter"},{headerName:"Quantity",field:"weight",filter:"agNumberColumnFilter"},{headerName:"Unit of measurement",field:"weightUnit",width:250,filterParams:{values:i,valueFormatter:la}},{headerName:"Quantity in kg",field:"weightInKg",filter:"agNumberColumnFilter",valueFormatter:fi},{headerName:"Conversion factor from quantity unit to kg",field:"weightUnitToKgConversionFactor",filter:"agNumberColumnFilter",width:350,valueFormatter:e=>{let{value:n}=e;return null!=n?n:"Not available"}},{headerName:"Act/Est",field:"accuracy",filterParams:{values:i,valueFormatter:la}},Bo,...Ho(Fo(Vt.D_.S3C1Activitybasedmaterial,a,{getFilterValues:i,gridValueFormatter:la})),...Ho(_o(Vt.D_.S3C1Activitybasedmaterial,a,{getFilterValues:i,gridValueFormatter:la})),...Ho(Lo(Vt.D_.S3C1Activitybasedmaterial,a)),{headerName:"Supplier",field:"supplier",filterParams:{values:i,valueFormatter:la}},...Ho(Ao(Vt.D_.S3C1Activitybasedmaterial,a,{getFilterValues:i,gridValueFormatter:la})),{headerName:"Total cost",field:"totalCost",filter:"agNumberColumnFilter"},{headerName:"Currency",field:"currency",filterParams:{values:i,valueFormatter:la}},...Ho(Io(Vt.D_.S3C1Activitybasedmaterial,a)),...Ho(Eo(Vt.D_.S3C1Activitybasedmaterial,a)),...Ho(Ro(Vt.D_.S3C1Activitybasedmaterial,a)),{headerName:"Scope 3 emissions (kgCO2e)",field:"scope3Emission",filter:"agNumberColumnFilter",valueFormatter:yi},{headerName:"Emission factor value",field:"emissionFactorValue",filter:"agNumberColumnFilter"},{headerName:"Emission factor key",field:"factorKey",filterParams:"agTextColumnFilter"},{headerName:"Tags",field:"tags",filterParams:{values:i,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:i,valueFormatter:la}},{headerName:"Notes",field:"notes",filter:"agTextColumnFilter"},{headerName:"Reference",field:"reference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Invoice Number",field:"invoiceNumber",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Evidence Reference",field:"evidenceReference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:i,valueFormatter:la}},...Ho(wo(Vt.D_.S3C1Activitybasedmaterial,a))],reactiveCustomComponents:!0}}(),[n]=Jm(zet,{fetchPolicy:"network-only"}),t=(0,g.useCallback)(async e=>{const{data:{getS3C1ActivityBasedMaterialTransactionsPage:{totalRows:t,rows:a}}}=await n({variables:e});return{rows:a,totalRows:t}},[n]);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Jwe,{title:"Your activity based materials data",defaultExportFileName:"s3c1-activity-based-materials-export",breadcrumbs:[{label:"Data",to:".."},{label:"Materials",to:"/data/materials/view"},{label:"Activity data"}],uploadLink:"../s3c1-activity-based-materials/uploads",config:Jet(Jet({},e),{},{components:Het}),fetchRows:t,transactionType:Vt.D_.S3C1Activitybasedmaterial})})};function Qet(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Zet(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qet(Object(t),!0).forEach(function(n){Xet(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qet(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Xet(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ent={documentReference:rDe,uploadReference:aDe},nnt=()=>{const e=function(){const e=(0,N.m)(),n=Pu(),t=null==n?void 0:n.id,a=null==n?void 0:n.accessControls.customFields,{showNotification:r}=vt(),i=async n=>{try{const{data:{getS3C1SpendBasedMaterialTransactionsPageFilter:a}}=await e.query({query:Wet,variables:{accountId:t,field:n.colDef.colId||n.colDef.field}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){r("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning")}};return{getRowId:ba("id"),columnDefs:[{headerName:"Location",field:"locationName",filterParams:{values:i,valueFormatter:la}},{headerName:"Location Code",field:"locationCode",filterParams:{values:i,valueFormatter:la}},...Do(Vt.D_.S3C1Spendbasedmaterial,null==n?void 0:n.accessControls),{headerName:"Shared Emission Percentage",field:"locationSharedEmissionPercentage",filter:"agNumberColumnFilter"},{headerName:"Location Custom Attributes",field:"locationCustomAttributes",filter:"agTextColumnFilter"},Zwe,{headerName:"Country of spend",field:"country",filterParams:{values:i,valueFormatter:la}},{headerName:"Start date",field:"startDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter",initialSort:"desc"},{headerName:"End date",field:"endDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},cellStyle:{textAlign:"center"},filter:"agDateColumnFilter"},{headerName:"Supplier",field:"supplier",filterParams:{values:i,valueFormatter:la}},{headerName:"Factor set",field:"factorSet",filterParams:{values:i,valueFormatter:la}},{headerName:"Material type",field:"materialType",filterParams:{values:i,valueFormatter:la}},{headerName:"Subtype 1",field:"subtype1",filterParams:{values:i,valueFormatter:la}},{headerName:"Subtype 2",field:"subtype2",filterParams:{values:i,valueFormatter:la}},{headerName:"Subtype 3",field:"subtype3",filterParams:{values:i,valueFormatter:la}},{headerName:"Amount",field:"amount",filter:"agNumberColumnFilter"},{headerName:"Currency",field:"currency",filterParams:{values:i,valueFormatter:la}},{headerName:"Amount (in the factor's currency)",field:"factorCurrencyAmount",filter:"agNumberColumnFilter"},{headerName:"Factor currency code",field:"factorCurrencyCode",filterParams:{values:i,valueFormatter:la}},{headerName:"Amount in £",field:"standardCurrencyAmount",filter:"agNumberColumnFilter"},{headerName:"Act/Est",field:"accuracy",filterParams:{values:i,valueFormatter:la}},Bo,...Ho(wo(Vt.D_.S3C1Spendbasedmaterial,a)),{headerName:"Scope 3 emissions (kgCO2e)",field:"scope3Emission",filter:"agNumberColumnFilter",valueFormatter:yi},{headerName:"Emission factor value",field:"emissionFactorValue",filter:"agNumberColumnFilter"},{headerName:"Emission factor key",field:"factorKey",filterParams:"agTextColumnFilter"},{headerName:"Tags",field:"tags",filterParams:{values:i,valueFormatter:la}},{headerName:"Departments",field:"departments",filterParams:{values:i,valueFormatter:la}},{headerName:"Notes",field:"notes",filter:"agTextColumnFilter"},{headerName:"Reference",field:"reference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Invoice Number",field:"invoiceNumber",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Evidence Reference",field:"evidenceReference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Other Reference",field:"otherReference",filterParams:{values:i,valueFormatter:la},cellRenderer:"documentReference"},{headerName:"Upload Reference",field:"importBatchFileName",cellRenderer:"uploadReference",filterParams:{values:i,valueFormatter:la}}],reactiveCustomComponents:!0}}(),[n]=Jm($et,{fetchPolicy:"network-only"}),t=(0,g.useCallback)(async e=>{const{data:{getS3C1SpendBasedMaterialTransactionsPage:{totalRows:t,rows:a}}}=await n({variables:e});return{rows:a,totalRows:t}},[n]);return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Jwe,{title:"Your spend based materials data",defaultExportFileName:"s3c1-spend-based-materials-export",breadcrumbs:[{label:"Data",to:".."},{label:"Materials",to:"/data/materials/view"},{label:"Spend data"}],uploadLink:"../s3c1-spend-based-materials/uploads",config:Zet(Zet({},e),{},{components:ent}),fetchRows:t,transactionType:Vt.D_.S3C1Spendbasedmaterial})})},tnt=[{label:"Data",to:".."},{label:"Materials",to:"/data/materials/view"},{label:"Activity data",to:"/data/s3c1-activity-based-materials/view"},{label:"Uploads"}],ant=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"s3c1ActivityBasedMaterialsUploadGridV2",title:"Here's your upload history",breadcrumbs:tnt,uploadLink:"../s3c1-activity-based-materials/uploads",config:e,dataType:Vt.D_.S3C1Activitybasedmaterial})},rnt=[{label:"Data",to:".."},{label:"Materials",to:"/data/materials/view"},{label:"Spend data",to:"/data/s3c1-spend-based-materials/view"},{label:"Uploads"}],int=()=>{const e=_Ze();return(0,Ze.jsx)(EZe,{gridKey:"s3c1SpendBasedMaterialsUploadGridV2",title:"Here's your upload history",breadcrumbs:rnt,uploadLink:"../s3c1-spend-based-materials/uploads",config:e,dataType:Vt.D_.S3C1Spendbasedmaterial})},ont=()=>(0,Ze.jsx)(bXe,{});function lnt(e,n){const[t]=Jm(n,{fetchPolicy:"network-only"});return(0,g.useCallback)(async n=>{const{data:a}=await t({variables:n});return(null==a?void 0:a[e])||{rows:[],totalRows:0}},[])}var snt,cnt,dnt=t(93107),unt=t.n(dnt);function pnt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const mnt={property:["primaryPropertyName","primaryPropertyNumber","secondaryPropertyName","secondaryPropertyNumber","streetName","town","postcode","region","country","localAuthority","latitude","longitude","easting","northing","coordinateReferenceSystem","uprn","propertyFloorArea","propertyFloorAreaMeasurement","landArea","usage","ancientMonument","specialScientificInterest","organisationReference","organisation","parentOrganisation","userName","userEmail","securityClassification","reasonForArchivingARecord"],building:["listedBuilding","constructionDate","buildingCondition","buildingConditionDate"],contract:["acquisitionDate","physicalConstraints","contractFloorArea","contractFloorAreaMeasurement","value","valueType","valuationDate","capitalExpenditure","futureDisposalDate","futurePropertyDisposalValue","costMaintainingSurplusProperty","pfiEndDate"]},fnt=e=>(0,D.J1)(snt||(snt=pnt(["\n  query ","($accountId: ID!, $field: String!) {\n    ","(accountId: $accountId, field: $field) {\n      label\n      value\n    }\n  }\n"])),unt()(e),e),ynt=(e,n)=>(0,D.J1)(cnt||(cnt=pnt(["\n  query ","(\n    $accountId: ID!\n    $offset: Int\n    $limit: Int\n    $sort: [SortCommand!]\n    $filters: Filters\n  ) {\n    ","(\n      accountId: $accountId\n      offset: $offset\n      limit: $limit\n      sort: $sort\n      filters: $filters\n    ) {\n      totalRows\n      rows {\n        ","\n      }\n    }\n  }\n"])),unt()(e),e,n.join("\n")),gnt=ynt("getInSiteBreeamsPage",[...mnt.property,...mnt.building,"id","buildingId","propertyId","breeamRating","breeamCertificateRefNo"]),bnt=fnt("getInSiteBreeamsPageFilter"),hnt=e=>[{label:"Data",to:".."},{label:e}];function vnt(e){return{getRowId:ba("id"),columnDefs:e,suppressColumnVirtualisation:!0,autoSizeStrategy:{type:"fitCellContents"},defaultColDef:{resizable:!0,sortable:!0,filter:!0}}}function xnt(e,n){const[t]=(0,gs._)(n,{fetchPolicy:"network-only"}),a=rt(),{showNotification:r}=vt();return async n=>{let{colDef:i,success:o}=n;const{field:l,headerName:s}=i;try{const{data:n}=await t({variables:{accountId:a,field:l}});o(((null==n?void 0:n[e])||[]).map(e=>e.value?JSON.stringify(e):null))}catch(e){r("Couldn't load filter values for column \"".concat(s,'"'),"warning")}}}function Tnt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ont(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tnt(Object(t),!0).forEach(function(n){knt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tnt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function knt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const jnt=e=>({filter:"agSetColumnFilter",filterParams:{values:e,valueFormatter:la}}),Cnt={filter:"agDateColumnFilter",valueFormatter:ca},Snt={valueFormatter:sa,filter:"agSetColumnFilter",filterParams:{values:[!0,!1],valueFormatter:sa}},Nnt=e=>{let{getFilterValues:n}=e;return[{headerName:"Primary Property Name",field:"primaryPropertyName",filter:"agTextColumnFilter"},{headerName:"Primary Property Number",field:"primaryPropertyNumber",filter:"agTextColumnFilter"},{headerName:"Secondary Property Name",field:"secondaryPropertyName",filter:"agTextColumnFilter"},{headerName:"Secondary Property Number",field:"secondaryPropertyNumber",filter:"agTextColumnFilter"},Ont({headerName:"Street Name",field:"streetName"},jnt(n)),Ont({headerName:"Town",field:"town"},jnt(n)),{headerName:"Postcode",field:"postcode",filter:"agTextColumnFilter"},Ont({headerName:"Region",field:"region"},jnt(n)),Ont({headerName:"Country",field:"country"},jnt(n)),Ont({headerName:"Country",field:"country"},jnt(n)),Ont({headerName:"Local Authority",field:"localAuthority"},jnt(n)),Ont({headerName:"Coordinate Reference System (CRS)",field:"coordinateReferenceSystem"},jnt(n)),{headerName:"Unique Property Reference Number (UPRN)",field:"uprn",filter:"agTextColumnFilter"},{headerName:"Floor Area",field:"propertyFloorArea",filter:"agNumberColumnFilter"},Ont({headerName:"Floor Area Measurement",field:"propertyFloorAreaMeasurement"},jnt(n)),{headerName:"Land Area",field:"landArea",filter:"agNumberColumnFilter"},Ont({headerName:"Usage",field:"usage"},jnt(n)),Ont({headerName:"Ancient Monument",field:"ancientMonument"},Snt),Ont({headerName:"Special Scientific Interest",field:"specialScientificInterest"},Snt),Ont({headerName:"Organisation",field:"organisation"},jnt(n)),Ont({headerName:"Organisation",field:"organisation"},jnt(n)),{headerName:"Organisation Contact Name",field:"userName",filter:"agTextColumnFilter"},{headerName:"Organisation Contact Email",field:"userEmail",filter:"agTextColumnFilter"},Ont({headerName:"Parent Organisation",field:"parentOrganisation"},jnt(n)),Ont({headerName:"Security Classification",field:"securityClassification"},jnt(n)),Ont({headerName:"Reason for archiving a Record",field:"reasonForArchivingARecord"},jnt(n))]},wnt=e=>{let{getFilterValues:n}=e;return[Ont({headerName:"Listed Building",field:"listedBuilding"},jnt(n)),Ont({headerName:"Construction Date",field:"constructionDate"},Cnt),Ont({headerName:"Building Condition",field:"buildingCondition"},jnt(n)),Ont({headerName:"Building Report Condition Date",field:"buildingConditionDate"},Cnt)]},Dnt=e=>{let{getFilterValues:n}=e;return[Ont({headerName:"Acquisition Date",field:"acquisitionDate"},Cnt),Ont({headerName:"Physical Constraints",field:"physicalConstraints"},jnt(n)),{headerName:"Value",field:"value",filter:"agTextColumnFilter"},Ont({headerName:"Value Type",field:"valueType"},jnt(n)),Ont({headerName:"Valuation Date",field:"valuationDate"},Cnt),{headerName:"Capital Expenditure",field:"capitalExpenditure",filter:"agNumberColumnFilter"},Ont({headerName:"Future Disposal Date",field:"futureDisposalDate"},Cnt),{headerName:"Future Property Disposal Value",field:"futurePropertyDisposalValue",filter:"agNumberColumnFilter"},{headerName:"Cost of maintaining surplus Property",field:"costMaintainingSurplusProperty",filter:"agNumberColumnFilter"},Ont({headerName:"PFI End Date",field:"pfiEndDate"},Cnt)]};function Ant(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Rnt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ant(Object(t),!0).forEach(function(n){Pnt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ant(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Pnt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Lnt={dec:{path:"/data/insite-decs/view",title:"DEC"},epc:{path:"/data/insite-epcs/view",title:"EPC"},breeam:{path:"/data/insite-breeams/view",title:"BREEAM"}},Int={lease:{path:"/data/insite-leases/view",title:"Leases"},disposal:{path:"/data/insite-disposals/view",title:"Disposals"},vacantSpace:{path:"/data/insite-vacant-spaces/view",title:"Vacant spaces"},occupation:{path:"/data/insite-occupations/view",title:"Occupations"},occupancyFact:{path:"/data/insite-occupancy-facts/view",title:"Occupancy Facts"}},Ent=e=>{let{active:n}=e;return(0,Ze.jsx)(Fnt,{items:Lnt,active:n})},_nt=e=>{let{active:n}=e;return(0,Ze.jsx)(Fnt,{items:Int,active:n})};function Fnt(e){let{items:n,active:t}=e;const a=(0,g.useMemo)(()=>Object.entries(n).filter(e=>{let[n]=e;return n!==t}),[t]);return(0,Ze.jsx)(Ze.Fragment,{children:a.map((e,n)=>{let[t,a]=e;return(0,Ze.jsx)(f.Button,{to:a.path,children:a.title},n)})})}const Bnt=hnt("BREEAM");function Unt(){const e=lnt("getInSiteBreeamsPage",gnt),n=function(){const e=xnt("getInSiteBreeamsPageFilter",bnt);return vnt([...Nnt({getFilterValues:e}),...wnt({getFilterValues:e}),Rnt({headerName:"BREEAM Rating",field:"breeamRating"},jnt(e)),{headerName:"BREEAM Certificate Reference Number",field:"breeamCertificateRefNo",filter:"agTextColumnFilter"}])}();return(0,Ze.jsx)(Jwe,{title:"Your BREEAM data",defaultExportFileName:"insite-breeam-export",breadcrumbs:Bnt,config:n,fetchRows:e,extraButtons:(0,Ze.jsx)(Ent,{active:"breeam"})})}const Mnt=ynt("getInSiteLandParcelsPage",[...mnt.property,"id","propertyId","conservationArea","titleNumber"]),Vnt=fnt("getInSiteLandParcelsPageFilter");function znt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Gnt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?znt(Object(t),!0).forEach(function(n){$nt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):znt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function $nt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Wnt=hnt("Land parcels");function qnt(){const e=lnt("getInSiteLandParcelsPage",Mnt),n=function(){const e=xnt("getInSiteLandParcelsPageFilter",Vnt);return vnt([...Nnt({getFilterValues:e}),Gnt({headerName:"Conservation Area",field:"conservationArea"},Snt),{headerName:"Title Number",field:"titleNumber",filter:"agTextColumnFilter"}])}();return(0,Ze.jsx)(Jwe,{title:"Your land parcels data",defaultExportFileName:"insite-land-parcel-export",breadcrumbs:Wnt,config:n,fetchRows:e})}const Jnt=ynt("getInSiteDecsPage",[...mnt.property,...mnt.building,"id","buildingId","propertyId","buildingRating","certificateReference","expiryDate","operationalRating","operatingRatingValue","propertyReference","certificateIssueDate","outOfScopeReason"]),Ynt=fnt("getInSiteDecsPageFilter");function Hnt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Knt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Hnt(Object(t),!0).forEach(function(n){Qnt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hnt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Qnt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Znt=hnt("DEC");function Xnt(){const e=lnt("getInSiteDecsPage",Jnt),n=function(){const e=xnt("getInSiteDecsPageFilter",Ynt);return vnt([...Nnt({getFilterValues:e}),...wnt({getFilterValues:e}),Knt({headerName:"DEC Building Rating",field:"buildingRating"},jnt(e)),{headerName:"DEC Certificate Reference",field:"certificateReference",filter:"agTextColumnFilter"},Knt({headerName:"DEC Expiry Date",field:"expiryDate"},Cnt),Knt({headerName:"DEC Operational Rating",field:"operationalRating"},jnt(e)),{headerName:"DEC Operational Rating Value",field:"operatingRatingValue",filter:"agNumberColumnFilter"},{headerName:"DEC property Reference",field:"propertyReference",filter:"agTextColumnFilter"},Knt({headerName:"DEC Certificate Issue Date",field:"certificateIssueDate"},Cnt),Knt({headerName:"Out Of Scope Reason for DEC",field:"outOfScopeReason"},jnt(e))])}();return(0,Ze.jsx)(Jwe,{title:"Your DEC data",defaultExportFileName:"insite-dec-export",breadcrumbs:Znt,config:n,fetchRows:e,extraButtons:(0,Ze.jsx)(Ent,{active:"dec"})})}const ett=ynt("getInSiteEpcsPage",[...mnt.property,...mnt.building,"id","propertyId","buildingId","propertyRating","propertyReference","propertyRatingValue","certificateReference","expiryDate","certificateIssueDate","outOfScopeReason"]),ntt=fnt("getInSiteEpcsPageFilter");function ttt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function att(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ttt(Object(t),!0).forEach(function(n){rtt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ttt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rtt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const itt=hnt("EPC");function ott(){const e=lnt("getInSiteEpcsPage",ett),n=function(){const e=xnt("getInSiteEpcsPageFilter",ntt);return vnt([...Nnt({getFilterValues:e}),...wnt({getFilterValues:e}),att({headerName:"EPC Property Rating",field:"propertyRating"},jnt(e)),{headerName:"EPC Property Reference",field:"propertyReference",filter:"agTextColumnFilter"},{headerName:"EPC Property Rating Value",field:"propertyRatingValue",filter:"agNumberColumnFilter"},{headerName:"EPC Certificate Reference",field:"certificateReference",filter:"agTextColumnFilter"},att({headerName:"EPC Expiry Date",field:"expiryDate"},Cnt),att({headerName:"EPC Certificate Issue Date",field:"certificateIssueDate"},Cnt),att({headerName:"Out of Scope Reason for EPC",field:"outOfScopeReason"},jnt(e))])}();return(0,Ze.jsx)(Jwe,{title:"Your EPC data",defaultExportFileName:"insite-epc-export",breadcrumbs:itt,config:n,fetchRows:e,extraButtons:(0,Ze.jsx)(Ent,{active:"epc"})})}const ltt=ynt("getInSiteOccupationsPage",[...mnt.property,...mnt.contract,"id","propertyId","contractId","tenure"]),stt=fnt("getInSiteOccupationsPageFilter");function ctt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function dtt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ctt(Object(t),!0).forEach(function(n){utt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ctt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function utt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ptt=hnt("Occupations");function mtt(){const e=lnt("getInSiteOccupationsPage",ltt),n=function(){const e=xnt("getInSiteOccupationsPageFilter",stt);return vnt([...Nnt({getFilterValues:e}),...Dnt({getFilterValues:e}),dtt({headerName:"Floor area - tenure",field:"tenure"},jnt)])}();return(0,Ze.jsx)(Jwe,{title:"Your occupations data",defaultExportFileName:"insite-occupation-export",breadcrumbs:ptt,config:n,fetchRows:e,extraButtons:(0,Ze.jsx)(_nt,{active:"occupation"})})}const ftt=ynt("getInSiteOccupancyFactsPage",[...mnt.property,...mnt.contract,"id","propertyId","contractId","occupationId","rates","unitaryCharge","totalOperationalCosts","totalPropertyCosts"]),ytt=fnt("getInSiteOccupancyFactsPageFilter"),gtt=hnt("Occupancy facts");function btt(){const e=lnt("getInSiteOccupancyFactsPage",ftt),n=function(){const e=xnt("getInSiteOccupancyFactsPageFilter",ytt);return vnt([...Nnt({getFilterValues:e}),...Dnt({getFilterValues:e}),{headerName:"Rates",field:"rates",filter:"agNumberColumnFilter"},{headerName:"Unitary Charge",field:"unitaryCharge",filter:"agNumberColumnFilter"},{headerName:"Total Operational Costs (£)",field:"totalOperationalCosts",filter:"agNumberColumnFilter"},{headerName:"Total Property/Space Running Costs (£)",field:"totalPropertyCosts",filter:"agNumberColumnFilter"}])}();return(0,Ze.jsx)(Jwe,{title:"Your occupancy facts data",defaultExportFileName:"insite-occupancy-fact-export",breadcrumbs:gtt,config:n,fetchRows:e,extraButtons:(0,Ze.jsx)(_nt,{active:"occupancyFact"})})}const htt=ynt("getInSiteLeasesPage",[...mnt.property,...mnt.contract,"id","propertyId","contractId","rent","landlordName","licence","occupancyAgreementExpiryDate","earliestLeaseOccupancyAgreementBreakDate","actualLeaseOccupancyAgreementBreakDate","leaseOccupancyAgreementBreakNoticeTerm","occupancyAgreementLastBreakDate","occupancyAgreementBreakPenalty","postExpiryOccupancyAgreementStatus","occupancyPaymentFrequency","rentReviewFrequency","repairLiability","occupancyAgreementReviewDate","occupancyAgreementStartDate"]),vtt=fnt("getInSiteLeasesPageFilter");function xtt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ttt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xtt(Object(t),!0).forEach(function(n){Ott(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xtt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ott(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ktt=hnt("Leases");function jtt(){const e=lnt("getInSiteLeasesPage",htt),n=function(){const e=xnt("getInSiteLeasesPageFilter",vtt);return vnt([...Nnt({getFilterValues:e}),...Dnt({getFilterValues:e}),{headerName:"Rent",field:"rent",filter:"agNumberColumnFilter"},{headerName:"Landlord Name",field:"landlordName",filter:"agTextColumnFilter"},Ttt({headerName:"Licence Type",field:"licence"},jnt(e)),Ttt({headerName:"Lease or Occupancy Agreement Expiry Date",field:"occupancyAgreementExpiryDate"},Cnt),Ttt({headerName:"Earliest Lease or Occupancy Agreement Break Date",field:"earliestLeaseOccupancyAgreementBreakDate"},Cnt),Ttt({headerName:"Actual Lease or Occupancy Agreement Break Date",field:"actualLeaseOccupancyAgreementBreakDate"},Cnt),{headerName:"Lease or Occupancy Agreement Break Notice Term",field:"leaseOccupancyAgreementBreakNoticeTerm",filter:"agNumberColumnFilter"},Ttt({headerName:"Occupancy Agreement Last Break Date",field:"occupancyAgreementLastBreakDate"},Cnt),Ttt({headerName:"Occupancy Agreement Break Penalty",field:"occupancyAgreementBreakPenalty"},jnt(e)),Ttt({headerName:"Post-Expiry Occupancy  Agreement Status",field:"postExpiryOccupancyAgreementStatus"},Snt),Ttt({headerName:"Occupancy Payment Frequency",field:"occupancyPaymentFrequency"},jnt(e)),{headerName:"Rent Review Frequency",field:"rentReviewFrequency",filter:"agNumberColumnFilter"},Ttt({headerName:"Repair Liability",field:"repairLiability"},jnt(e)),Ttt({headerName:"Lease or Occupancy Agreement Review Date",field:"occupancyAgreementReviewDate"},Cnt),Ttt({headerName:"Lease or Occupancy Agreement Start Date",field:"occupancyAgreementStartDate"},Cnt)])}();return(0,Ze.jsx)(Jwe,{title:"Your leases data",defaultExportFileName:"insite-lease-export",breadcrumbs:ktt,config:n,fetchRows:e,extraButtons:(0,Ze.jsx)(_nt,{active:"lease"})})}const Ctt=ynt("getInSiteDisposalsPage",[...mnt.property,...mnt.contract,"id","propertyId","contractId","surplusStatus","disposalDate","statusOfSale","datePropertyDisposalReceiptClaimed","disposalMethod","disposalProceeds","embargoPeriodStatus","reasonForPropertyDisposal","totalSurplusLandArea","estimatedHousingCapacity"]),Stt=fnt("getInSiteDisposalsPageFilter");function Ntt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wtt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ntt(Object(t),!0).forEach(function(n){Dtt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ntt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Dtt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Att=hnt("Disposals");function Rtt(){const e=lnt("getInSiteDisposalsPage",Ctt),n=function(){const e=xnt("getInSiteDisposalsPageFilter",Stt);return vnt([...Nnt({getFilterValues:e}),...Dnt({getFilterValues:e}),wtt({headerName:"Surplus status",field:"surplusStatus"},jnt(e)),wtt({headerName:"Disposal Date",field:"disposalDate"},Cnt),wtt({headerName:"Status of Sale",field:"statusOfSale"},jnt(e)),wtt({headerName:"Date Property Receipt Claimed",field:"datePropertyDisposalReceiptClaimed"},Cnt),wtt({headerName:"Disposal Method",field:"disposalMethod"},jnt(e)),{headerName:"Disposal Proceeds",field:"disposalProceeds",filter:"agNumberColumnFilter"},wtt({headerName:"40-day expiry status",field:"embargoPeriodStatus"},jnt(e)),wtt({headerName:"Reason for Property Disposal",field:"reasonForPropertyDisposal"},jnt(e)),{headerName:"Total Surplus Area",field:"totalSurplusLandArea",filter:"agNumberColumnFilter"},{headerName:"Estimated Housing Capacity",field:"estimatedHousingCapacity",filter:"agNumberColumnFilter"}])}();return(0,Ze.jsx)(Jwe,{title:"Your disposals data",defaultExportFileName:"insite-disposal-export",breadcrumbs:Att,config:n,fetchRows:e,extraButtons:(0,Ze.jsx)(_nt,{active:"disposal"})})}const Ptt=ynt("getInSiteVacantSpacesPage",[...mnt.property,...mnt.contract,"id","propertyId","contractId","vacantSpaceFloorArea","vacantSpaceFloorAreaMeasurement","vacationDate","availableStartDate","status","description","availabilityEndDate","occupyingOrganisation","occupierContactName","occupierContactEmail"]),Ltt=fnt("getInSiteVacantSpacesPageFilter");function Itt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Ett(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Itt(Object(t),!0).forEach(function(n){_tt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Itt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _tt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Ftt=hnt("Vacant spaces");function Btt(){const e=lnt("getInSiteVacantSpacesPage",Ptt),n=function(){const e=xnt("getInSiteVacantSpacesPageFilter",Ltt);return vnt([...Nnt({getFilterValues:e}),...Dnt({getFilterValues:e}),{headerName:"Vacant Space - Floor Area",field:"vacantSpaceFloorArea",filter:"agNumberColumnFilter"},Ett({headerName:"Vacation Date",field:"vacationDate"},Cnt),Ett({headerName:"Vacant space Available Start Date",field:"availableStartDate"},Cnt),Ett({headerName:"Vacant space status",field:"status"},jnt(e)),{headerName:"Vacant Space Information on the vacant",field:"description",filter:"agTextColumnFilter"},Ett({headerName:"Vacant space Availability End Date",field:"availabilityEndDate"},Cnt),Ett({headerName:"Occupying Organisation",field:"occupyingOrganisation"},jnt(e)),{headerName:"Space Occupier Contact Name",field:"occupierContactName",filter:"agTextColumnFilter"},{headerName:"Space Occupier Contact Email",field:"occupierContactEmail",filter:"agTextColumnFilter"}])}();return(0,Ze.jsx)(Jwe,{title:"Your vacant spaces data",defaultExportFileName:"insite-vacant-space-export",breadcrumbs:Ftt,config:n,fetchRows:e,extraButtons:(0,Ze.jsx)(_nt,{active:"vacantSpace"})})}const Utt=e=>{let{dataAccessControls:n}=e;const{subject:t}=(0,m.g)();if(CXe(t,n))switch(t){case"waste":return(0,Ze.jsx)(g9n,{});case"electricity":return(0,Ze.jsx)(ret,{});case"gas":return(0,Ze.jsx)(a9n,{});case"water":return(0,Ze.jsx)($9n,{});case"transport":return(0,Ze.jsx)(D9n,{});case"fuel":return(0,Ze.jsx)(c9n,{});case"materials":return(0,Ze.jsx)(O9n,{dataAccessControls:n});case"refrigerants":return(0,Ze.jsx)(uet,{});case"heatSteam":return(0,Ze.jsx)(E9n,{});case"buildingEnergyRatings":return(0,Ze.jsx)(F9n,{});case"hotelStays":return(0,Ze.jsx)(K9n,{});case"investment":return(0,Ze.jsx)(Z9n,{});case"s3c1-activity-based-materials":return(0,Ze.jsx)(Ket,{});case"s3c1-spend-based-materials":return(0,Ze.jsx)(nnt,{});case"oilProduction":return(0,Ze.jsx)(ZJe,{});case"liquid-fuels":return(0,Ze.jsx)(lXe,{});case"salesData":return(0,Ze.jsx)(JZe,{});case"emissionsDatabase":return(0,Ze.jsx)(ont,{});case"insite-land-parcels":return(0,Ze.jsx)(qnt,{});case"insite-breeams":return(0,Ze.jsx)(Unt,{});case"insite-decs":return(0,Ze.jsx)(Xnt,{});case"insite-epcs":return(0,Ze.jsx)(ott,{});case"insite-occupations":return(0,Ze.jsx)(mtt,{});case"insite-occupancy-facts":return(0,Ze.jsx)(btt,{});case"insite-leases":return(0,Ze.jsx)(jtt,{});case"insite-disposals":return(0,Ze.jsx)(Rtt,{});case"insite-vacant-spaces":return(0,Ze.jsx)(Btt,{});default:return null}return(0,Ze.jsx)(m.C5,{to:"/v2/data"})},Mtt=e=>{let{dataAccessControls:n}=e;const{subject:t}=(0,m.g)();if(CXe(t,n))switch(t){case"waste":return(0,Ze.jsx)(yet,{});case"electricity":return(0,Ze.jsx)(met,{});case"gas":return(0,Ze.jsx)(bet,{});case"water":return(0,Ze.jsx)(vet,{});case"transport":return(0,Ze.jsx)(Tet,{});case"fuel":return(0,Ze.jsx)(ket,{});case"materials":return(0,Ze.jsx)(Cet,{dataAccessControls:n});case"hotelStays":return(0,Ze.jsx)(wet,{});case"heatSteam":return(0,Ze.jsx)(Aet,{});case"refrigerants":return(0,Ze.jsx)(Pet,{});case"investment":return(0,Ze.jsx)(Iet,{});case"s3c1-activity-based-materials":return(0,Ze.jsx)(ant,{});case"s3c1-spend-based-materials":return(0,Ze.jsx)(int,{});case"oilProduction":return(0,Ze.jsx)(UZe,{});case"liquid-fuels":return(0,Ze.jsx)(_et,{});case"salesData":return(0,Ze.jsx)(HZe,{});default:return null}return(0,Ze.jsx)(m.C5,{to:"/v2/data"})},Vtt=e=>{let{dataAccessControls:n}=e;const{subject:t}=(0,m.g)();if(CXe(t,n))switch(t){case"electricity":case"gas":case"water":case"heatSteam":return(0,Ze.jsx)(YGe,{utility:t.toUpperCase()});default:return null}return(0,Ze.jsx)(m.C5,{to:"/data"})},ztt=e=>{let{applicationData:{getAccountInfo:n}}=e;return(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"",element:(0,Ze.jsx)(Q8n,{})}),(0,Ze.jsx)(m.qh,{path:":subject/view",element:(0,Ze.jsx)(Utt,{dataAccessControls:n.accessControls.data})}),(0,Ze.jsx)(m.qh,{path:":subject/uploads",element:(0,Ze.jsx)(Mtt,{dataAccessControls:n.accessControls.data})}),(0,Ze.jsx)(m.qh,{path:":subject/uploads/ocr",element:(0,Ze.jsx)(Vtt,{dataAccessControls:n.accessControls.data})}),(0,Ze.jsx)(m.qh,{path:":subject/uploads/alias/:id",element:(0,Ze.jsx)(IRe,{})}),(0,Ze.jsx)(m.qh,{path:":subject/",element:(0,Ze.jsx)(m.C5,{to:"./view"})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:"/v2/data"})})]})};function Gtt(e){const{data:{antivirusStatus:n}={}}=e,t=(0,f.useTheme)();switch(n){case Vt.Qn.Infected:return(0,Ze.jsx)(f.Icons.Warning,{sx:{color:t.sys.color.error}});case Vt.Qn.Error:return(0,Ze.jsx)(f.Icons.Error,{sx:{color:t.customColors.warning.color}});case Vt.Qn.Pending:return(0,Ze.jsx)(f.Icons.Error,{sx:{color:t.sys.color.onSurface}});case Vt.Qn.Clean:return(0,Ze.jsx)(f.Icons.Check,{sx:{color:t.extendedColors.environmental.color}});default:return null}}var $tt;const Wtt=(0,f.styled)("span")($tt||($tt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 20px;\n  width: 20px;\n  border-radius: 50%;\n  display: flex;\n  background-color: ",";\n"])),e=>{switch(e.status){case"Overdue":return e.theme.sys.color.error;case"Due for review":return e.theme.customColors.warning.color;default:return e.theme.extendedColors.environmental.color}});function qtt(e){const{data:{reviewDateStatus:n}={}}=e;return n?(0,Ze.jsx)(Wtt,{status:n}):null}var Jtt;function Ytt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Htt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ytt(Object(t),!0).forEach(function(n){Ktt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ytt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ktt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Qtt=(0,f.styled)(f.AgGrid)(Jtt||(Jtt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: calc(100vh - 216px); // header + page title height\n  padding-bottom: 2px; // border bottom and shadow to show properly\n\n  "," {\n    height: calc(100vh - 268px); // header + page title height in lg\n  }\n"])),e=>{let{theme:n}=e;return n.breakpoints.down("lg")}),Ztt="checkbox";function Xtt(e){let{fetchRows:n,accountId:t,library:a,category:r,setGridApi:i,gridApi:o,onSelectionChanged:l,onPaginationChanged:s}=e;const c=(0,N.m)(),d=(0,m.Zp)(),{showNotification:u}=vt(),p=(0,g.useCallback)(async e=>{try{const{data:{getDocumentsPageFilter:n}}=await c.query({query:H$n,variables:{accountId:t,field:e.colDef.colId,library:a||null,category:r||null}});e.success(n.map(e=>e.value?JSON.stringify(e):e.value))}catch(n){u("Couldn't load filter values for column \"".concat(e.colDef.headerName,'"'),"warning"),de.Cp(n)}},[t,c,u,a,r]),f=(0,g.useMemo)(()=>({async getRows(e){try{const{startRow:a,sortModel:r,filterModel:i}=e.request,o={accountId:t,offset:a,limit:25,sort:oa(r),filters:ia(i)},{rows:l,totalRows:s}=await n(o);e.success({rowData:l,rowCount:s})}catch(n){de.Cp(n),e.fail()}}}),[t,n]),y=(0,g.useMemo)(()=>({antivirusStatus:Gtt,reviewStatus:qtt}),[]),b=(0,g.useCallback)(e=>{var n,t;if(Boolean(null===(n=e.event)||void 0===n||null===(n=n.target)||void 0===n||null===(t=n.closest)||void 0===t?void 0:t.call(n,'div[col-id="'.concat(Ztt,'"]'))))return;const i=a&&r?"/documents/".concat(a,"/").concat(r):"/documents/all";d("".concat(i,"/").concat(e.data.id))},[r,a,d]),h=(0,g.useCallback)(e=>{i(e.api)},[i]),v=(0,g.useMemo)(()=>({getRowId:e=>e.data.id,pagination:!0,paginationPageSize:25,paginationPageSizeSelector:!1,cacheBlockSize:25,rowModelType:"serverSide",defaultColDef:{sortable:!0,resizable:!0,filter:!0,wrapText:!0,autoHeight:!0,cellDataType:!1},columnDefs:[{headerName:"",colId:Ztt,field:Ztt,minWidth:60,checkboxSelection:!0,headerCheckboxSelection:!0,filter:!1,sortable:!1},{colId:"fileName",headerName:"File Name",filter:"agTextColumnFilter",filterParams:Htt({},{buttons:["reset","apply"],closeOnApply:!0}),field:"fileName"},{colId:"reviewDateStatus",headerName:"Review Date Status",field:"reviewDateStatus",filter:"agSetColumnFilter",cellStyle:{display:"flex",justifyContent:"center",alignItems:"center"},cellRenderer:"reviewStatus",filterParams:{values:p,valueFormatter:la}},{colId:"reviewDate",headerName:"Review Date",field:"reviewDate",filter:"agDateColumnFilter",filterParams:Htt({},{buttons:["reset","apply"],closeOnApply:!0}),valueFormatter:e=>{let{value:n}=e;return Yt(n)}},{colId:"referenceId",headerName:"ID",field:"referenceId",filter:"agTextColumnFilter",filterParams:Htt({},{buttons:["reset","apply"],closeOnApply:!0})},{colId:"createdByName",headerName:"Uploaded By",field:"createdByName",filter:"agSetColumnFilter",filterParams:{values:p,valueFormatter:la}},{colId:"createdAt",headerName:"Uploaded On",field:"createdAt",filter:"agDateColumnFilter",valueFormatter:e=>{let{value:n}=e;return Yt(n)},filterParams:Htt({},{buttons:["reset","apply"],closeOnApply:!0}),initialSort:"desc"},{colId:"updatedAt",headerName:"Last Updated On",field:"updatedAt",filter:"agDateColumnFilter",filterParams:Htt({},{buttons:["reset","apply"],closeOnApply:!0}),valueFormatter:e=>{let{value:n}=e;return Yt(n)}},{colId:"updatedByName",headerName:"Updated By",field:"updatedByName",filter:"agSetColumnFilter",filterParams:{values:p,valueFormatter:la}},{colId:"antivirusStatus",headerName:"Antivirus Status",field:"antivirusStatus",cellRenderer:"antivirusStatus",cellStyle:{textAlign:"center",verticalAlign:"middle"},filter:"agSetColumnFilter",filterParams:{values:p,valueFormatter:la}},{colId:"category",headerName:"Category",field:"category",filter:"agSetColumnFilter",filterParams:{values:p,valueFormatter:la}},{colId:"library",headerName:"Library",field:"library",filter:"agSetColumnFilter",filterParams:{values:p,valueFormatter:la}},{colId:"supplierName",headerName:"Supplier/Carrier",field:"supplierName",filter:"agSetColumnFilter",filterParams:{values:p,valueFormatter:la}},...k3({library:null==a?void 0:a.toUpperCase(),category:r})?[{colId:"startDate",headerName:"Start Date",field:"startDate",filter:"agDateColumnFilter",filterParams:Htt({},{buttons:["reset","apply"],closeOnApply:!0}),valueFormatter:e=>{let{value:n}=e;return Yt(n)}},{colId:"expirationDate",headerName:"Expiration Date",field:"expirationDate",filter:"agDateColumnFilter",filterParams:Htt({},{buttons:["reset","apply"],closeOnApply:!0}),valueFormatter:e=>{let{value:n}=e;return Yt(n)}}]:[],{colId:"tags",headerName:"Tags",field:"tags",valueFormatter:e=>{let{value:n}=e;return n?n.map(e=>{let{tagName:n}=e;return n}).join(", "):""},filter:"agSetColumnFilter",filterParams:{values:p,valueFormatter:la},sortable:!1},{colId:"locations",headerName:"Locations",field:"locations",valueFormatter:e=>{let{value:n}=e;return n?n.map(e=>{let{name:n}=e;return n}).join(", "):""},filter:"agSetColumnFilter",filterParams:{values:p,valueFormatter:la},sortable:!1},{colId:"notes",headerName:"Notes",field:"notes",filter:"agTextColumnFilter",autoHeight:!1,filterParams:Htt({},{buttons:["reset","apply"],closeOnApply:!0}),valueFormatter:e=>{let{value:n}=e;return n?(0,zt.truncate)(n,{length:45}):""},sortable:!1}],rowStyle:{width:"100%",display:"flex",alignItems:"center"},suppressRowClickSelection:!0,rowSelection:"multiple",isRowSelectable:e=>!!e.data&&e.data.antivirusStatus===gr&&e.data.source===br,key:"".concat(r,"-").concat(a),onCellClicked:b,serverSideDatasource:f,onGridReady:h,onSelectionChanged:l,onPaginationChanged:s,components:y}),[p,y,b,h,l,s,r,f,a]);(0,g.useEffect)(()=>{if(o&&r){const n=[JSON.stringify({__typename:"FilterData",label:r,value:r})];try{var e;null===(e=o.getColumnFilterInstance("category"))||void 0===e||e.then(e=>{var t;null==e||null===(t=e.setModel({values:n}))||void 0===t||t.then(()=>{null==o||o.onFilterChanged("columnFilter")})})}catch(e){u("Couldn't set filter for category \"".concat(r,'"'),"warning")}}},[o,r,u]);const x="".concat(t,"-").concat(a||"","-").concat(r||"","-documentsGridV2");return(0,Ze.jsx)(Qtt,{gridKey:x,gridOptions:v},x)}const eat=e=>{const{search:n,onSearchValueChange:t,placeholder:a="Search Documents..."}=e;return(0,Ze.jsx)(f.TextField,{type:"search",name:"DocumentFiles__Search",placeholder:a,value:n,onChange:t})};var nat,tat,aat;function rat(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function iat(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function oat(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const lat=(0,f.styled)(f.Text)(nat||(nat=oat(["\n  text-align: center;\n  margin: 16px auto;\n"]))),sat=(0,f.styled)("hr")(tat||(tat=oat(["\n  height: 1px;\n  background-color: ",";\n  margin: 16px 0;\n"])),e=>e.theme.sys.color.onSurface),cat=(0,f.styled)("div")(aat||(aat=oat(["\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n"])));function dat(e){let{isManagementSystem:n,library:t,category:a,folders:r=[],documentsExist:i=!1,searchValue:o="",searchPlaceholder:l,banners:s=[],onSearch:c=()=>{},gridApi:d,setGridApi:u=()=>{},showGrid:p,managementSystemId:m,managementSystemChapterId:f,onSelectionChanged:y,onPaginationChanged:b}=e;const h=(0,N.m)(),v=rt(),x=!r.length&&!i&&o,T=(0,g.useMemo)(()=>(i&&(o||n)||p)&&(0,Ze.jsx)(Xtt,{library:t,category:a,accountId:v,setGridApi:u,gridApi:d,onSelectionChanged:y,onPaginationChanged:b,fetchRows:async e=>{const n=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rat(Object(t),!0).forEach(function(n){iat(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rat(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},e);n.filters||(n.filters={});const r=T3(o,t,a,m,f),{filters:i}=n;r.set&&(null!=i&&i.set||(i.set=[]),i.set=i.set.concat(r.set).filter(e=>!!e.values.length)),r.text&&(null!=i&&i.text||(i.text=[]),i.text.push(...r.text));const{data:{getDocumentsPage:{totalRows:l,rows:s}}}=await h.query({query:K$n,variables:n,fetchPolicy:"network-only"});return{rows:s,totalRows:l}}},v),[i,o,n,p,t,a,v,u,d,y,b,m,f,h]);return(0,Ze.jsxs)("div",{children:[!p&&(0,Ze.jsxs)(cat,{children:[(0,Ze.jsx)(eat,{search:o,onSearchValueChange:e=>{let{target:{value:n}}=e;c(n)},placeholder:l}),(0,Ze.jsx)(cNe,{id:"documentBanners",staticBanners:s})]}),x?(0,Ze.jsx)(lat,{typescale:"title",size:"large",children:"No Results found for ".concat(o||"your search.")}):(0,Ze.jsxs)(Ze.Fragment,{children:[!!r.length&&(0,Ze.jsx)(G$n,{folders:r}),i&&!!r.length&&(o||m)&&(0,Ze.jsx)(sat,{}),T]})]})}var uat;const pat=(0,f.styled)(f.Button)(uat||(uat=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 160px;\n"]))),mat=e=>{let{gridApi:n,accountId:t,selectedDocumentIds:a,withExportPage:r=!0,disabled:i=!1}=e;const{showNotification:o}=vt(),l=(null==n?void 0:n.api)||n,[s]=(0,Ot.n)(Y$n,{onCompleted:()=>{o("Your documents have been exported. Note: Web Links or Dashboard References are skipped.","success")},onError:()=>{o("Something went wrong. Try reducing the number of documents in export.","danger")}}),c=(0,g.useCallback)(e=>e.filter(e=>e.antivirusStatus===gr&&e.source===br).map(e=>({id:e.id,name:e.fileName})),[]),d=(0,g.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=[];null==l||l.forEachNode(t=>{e&&!t.isSelected()||n.push(t.data)});const a=c(n);if(a.length){o("Starting document export. For large exports, please wait up to 30 seconds.","success");const{data:e}=await s({variables:{files:a,accountId:t}});null!=e&&e.getZippedFileExport&&window.open(e.getZippedFileExport)}else o("Your selection only contains Web Links and/or Dashboard References. These can not be exported.","danger")},[l,o,t,c,s]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(pat,{variant:"contained",onClick:()=>d(!0),disabled:0===a.length||i,children:["Export (",a.length,")"]}),r&&(0,Ze.jsx)(pat,{variant:"contained",onClick:()=>d(),disabled:i,children:"Export Page"})]})},fat=(0,f.styled)(f.Button)({height:"40px","& .MuiButton-startIcon":{marginRight:0}});function yat(e){let{folder:n}=e;const[t,a]=(0,g.useState)(!1),{purge:r,purging:i}=function(){const e=rt(),[n,{loading:t}]=(0,Ot.n)(c3),a=jy();return{purge:async t=>{let{id:r,parentId:i}=t;await n({variables:{accountId:e,ids:[r]}}),a([{fieldName:"getDocumentFolder",args:{accountId:e,id:r},broadcast:!1},{fieldName:"getDocumentFolders",args:{accountId:e,parentId:i},broadcast:!1}])},purging:t}}(),{showNotification:o}=vt(),l=(0,m.Zp)(),{canDeleteFolder:s}=L3();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(fat,{variant:"outlined",color:"error",onClick:()=>a(!0),disabled:!n.empty||!s,children:"Delete folder"}),(0,Ze.jsx)(Z$,{title:"Delete Folder",body:'Are you sure you want to delete "'.concat(n.name,'"?'),disabled:i,open:t,onClose:()=>a(!1),onConfirm:async()=>{try{await r(n),o("Folder has been deleted!","success");const e=["documents"];n.parentId&&e.push(n.parentId),l("/".concat(e.join("/")))}catch(e){de.Cp(e),o("Failed to delete folder. Please try again. If the problem persists, contact support.","danger")}}})]})}function gat(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function bat(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gat(Object(t),!0).forEach(function(n){hat(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gat(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hat(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function vat(e){let{setError:n,expectedErrors:t}=e;return e=>{if(e instanceof tW.K4){const{message:a}=e,r=t[a];if(r)return n(r.field,{message:r.message}),!0}return!1}}const xat="root";function Tat(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Oat(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tat(Object(t),!0).forEach(function(n){kat(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tat(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function kat(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const jat={"Folder must be unique":{field:"name",message:"Folder name already exists"}};function Cat(e){var n;let{onClose:t,parent:a,folder:r}=e;a=a||(null==r?void 0:r.parent);const i=!!r,[o,l]=(0,g.useState)(!1),s=function(e){let{folder:n}=e;const t=rt(),[a]=(0,Ot.n)(n?s3:l3),r=jy();return async e=>{const i="id"in e&&e.id?e:null,o=i?null:e,{data:l}=await a({variables:{input:bat(bat({},e),{},{accountId:t})}}),s=[{fieldName:"getDocumentFolders",args:{accountId:t,parentId:e.parentId}}];return i&&(null!=n&&n.parent&&i.parentId!==n.parent.id&&s.push({fieldName:"getDocumentFolders",args:{accountId:t,parentId:n.parent.id}}),s.push({fieldName:"getDocumentFolder",args:i.parentId?{accountId:t,id:i.id}:void 0}),s.push({fieldName:"getDocumentRecordById"}),s.push({fieldName:"getDocumentsPage"})),null!=o&&o.parentId&&s.push({fieldName:"getDocumentFolder",args:{accountId:t,id:o.parentId}}),r(s),(null==i?void 0:i.id)||l.createDocumentFolder}}({folder:r}),{showNotification:c}=vt(),d=function(e){let{preloaded:n,skip:t,excludeRoot:a}=e;const r=I3({preloaded:n,skip:t});return(0,g.useMemo)(()=>[...a?[]:[{value:xat,label:"No parent"}],...r.sort((e,n)=>n.value.localeCompare(e.value))],[r])}({preloaded:a,skip:i&&!a,excludeRoot:i&&!!a}),{handleSubmit:u,control:p,setError:m,formState:{isDirty:y,isValid:b}}=(0,Rw.mN)({defaultValues:{name:(null==r?void 0:r.name)||"",parent:(null===(n=a)||void 0===n?void 0:n.id)||xat},mode:"onChange"}),h=vat({setError:m,expectedErrors:jat}),v=b&&y&&!o;return(0,Ze.jsx)(f.Modal,{open:!0,onClose:()=>t(),title:"".concat(i?"Edit":"Create"," Folder"),children:(0,Ze.jsx)("form",{onSubmit:u(async e=>{let{parent:n,name:a}=e;l(!0);try{const e=n===xat?void 0:n,o=await s({name:a,parentId:e,id:null==r?void 0:r.id});c("'Folder has been ".concat(i?"updated":"created","!'"),"success"),t({name:a,id:o,parentId:e})}catch(e){h(e)||(de.Cp(e),c("Failed to ".concat(i?"update":"create"," folder. Please try again. If the problem persists, contact support."),"danger"))}finally{l(!1)}}),children:(0,Ze.jsxs)(f.Grid,{container:!0,spacing:3,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"parent",control:p,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(f.Select,Oat(Oat({},n),{},{label:"Parent folder",fullWidth:!0,options:d,disableSorting:!0,error:!!t,helperText:null==t?void 0:t.message,disabled:i&&!a,onChange:e=>{let{value:t}=e;return n.onChange(t)}}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"name",control:p,rules:{required:"Name is required",maxLength:{value:100,message:"Name cannot exceed 100 characters"}},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(f.TextField,Oat(Oat({},n),{},{label:"Name",fullWidth:!0,error:!!t,helperText:null==t?void 0:t.message}))}})}),(0,Ze.jsxs)(f.Grid,{size:12,container:!0,spacing:2,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,onClick:()=>t(),children:"Close"})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,variant:"contained",color:"primary",type:"submit",disabled:!v,children:o?"Submitting...":"Submit"})})]})]})})})}function Sat(e){let{folder:n,onComplete:t}=e;const[a,r]=(0,g.useState)(!1),{canEditFolder:i}=L3();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(fat,{variant:"outlined",disabled:!i,onClick:()=>r(!0),children:"Edit folder"}),a&&(0,Ze.jsx)(Cat,{onClose:e=>{e&&t&&t(e),r(!1)},folder:n})]})}var Nat;const wat=(0,f.styled)("span")(Nat||(Nat=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: fit-content;\n"])));function Dat(e){let{disabled:n,onClick:t}=e;const a=(0,Ze.jsx)(fat,{disabled:!!n,variant:"contained",onClick:t,startIcon:(0,Ze.jsx)(f.CustomIcons.Upload,{color:"onPrimary"}),children:"Upload"});return"string"==typeof n?(0,Ze.jsx)(zP.A,{title:n,children:(0,Ze.jsx)(wat,{children:a})}):a}var Aat;const Rat=(0,f.styled)("div")(Aat||(Aat=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  gap: 12px;\n"]))),Pat=e=>{var n;const t=(0,eg.A)(),{documentFolders:a}=e,r=rt(),{library:i,type:o}=(0,m.g)(),[l,s]=(0,g.useState)(),[c,d]=(0,g.useState)([]),u=rc(),p=!!u.document.find(e=>e.startsWith("create")),y=!!u.document.find(e=>e.startsWith("delete")),[b,v]=(0,g.useState)(!1),[x,T]=(0,g.useState)(!1),[O,k]=(0,kd.useQueryParam)("search",kd.StringParam),{showNotification:j}=vt(),C=(0,m.Zp)(),S=!!o&&O3(o),[N,{loading:w}]=(0,Ot.n)(a3,{onError:e=>{j("Failed to delete documents: ".concat(e.message),"danger")},onCompleted:()=>{j("Successfully deleted ".concat(c.length," document").concat(c.length>1?"s":""),"success"),d([]),setTimeout(()=>{null==l||l.refreshServerSide()},1e3)}}),D=jy(),A=function(e){let{id:n}=e;const t=rt(),{canGetFolder:a}=L3(),{data:r}=(0,h.IT)(m3,{variables:n?{accountId:t,id:n}:{},skip:!n||!a});return null==r?void 0:r.getDocumentFolder}({id:!(!o||!S)&&o}),R=(0,g.useMemo)(()=>o&&"all"!==o?S?{title:(null==A?void 0:A.name)||" ",filterValue:o}:i?a.find(e=>e.link===o):null:null,[i,o,a,S,A]),P=(0,g.useMemo)(()=>{const e=[{label:t.formatMessage({id:"pages.documents.breadcrumbs.one"}),to:"/documents"}];return S?A&&e.push({label:A.parent.name,to:"/documents/".concat(A.parent.id)}):i?e.push({label:Gt().capitalize(i),to:"/documents/".concat(i)}):e.push({label:"All",to:"/documents/all"}),e},[t,i,S,A]),L=(0,g.useMemo)(()=>(null==R?void 0:R.title)||"All Documents",[R]),{documentsExist:I,error:E,loading:_}=wWn({accountId:r,filters:T3(O||"")},!O),F=async e=>{e&&v(!1),setTimeout(()=>{null==l||l.refreshServerSide()},1e3)},B=(0,g.useCallback)(e=>{j(e.message,"danger")},[j]),U=(0,g.useCallback)(()=>{if(l){const e=[],n=l.paginationGetPageSize(),t=l.paginationGetCurrentPage()*n,a=t+n-1;l.forEachNode(n=>{var r;n.rowIndex>=t&&n.rowIndex<=a&&n.isSelected()&&e.push(null===(r=n.data)||void 0===r?void 0:r.id)}),d(e)}},[l]),M=(0,g.useCallback)(()=>{l&&l.deselectAll()},[l]),V=(0,g.useCallback)(()=>{l&&l.setFilterModel(null)},[l]),z=(0,g.useCallback)(()=>{c.length&&T(!0)},[c]),G=(0,g.useCallback)(async()=>{c.length&&(await N({variables:{ids:c}}),A&&D([{fieldName:"getDocumentFolder",args:{accountId:r,id:A.id}}]))},[N,c]),$=null==i?void 0:i.toUpperCase(),W=null===(n=x$n.find(e=>e.link===o))||void 0===n?void 0:n.filterValue;return(0,Ze.jsxs)(f.Page,{title:{crumbs:P,content:L,actionButton:(0,Ze.jsxs)(Rat,{children:[(0,Ze.jsx)(fat,{variant:"outlined",onClick:V,children:"Clear Filters"}),y&&(0,Ze.jsxs)(f.Button,{variant:"outlined",color:"primary",disabled:0===c.length||w,onClick:z,children:["Delete (",c.length,")"]}),A&&(0,Ze.jsx)(Sat,{folder:A,onComplete:e=>{A.parentId!==e.parentId&&C("/documents/".concat(e.parentId,"/").concat(e.id))}}),A&&(0,Ze.jsx)(yat,{folder:A}),p&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(mat,{gridApi:l,accountId:r,selectedDocumentIds:c,withExportPage:!1,disabled:w}),(0,Ze.jsx)(Dat,{onClick:()=>v(!0)})]})]})},loading:_&&!I,error:E,children:[(0,Ze.jsx)(dat,{showGrid:!!o||!i,library:i,category:null==R?void 0:R.filterValue,gridApi:l,setGridApi:s,searchValue:O,onSearch:k,documentsExist:I,onSelectionChanged:U,onPaginationChanged:M}),b&&(0,Ze.jsx)(b4,{single:k3({library:$,category:W}),predefinedValues:{library:$,category:W,customLibrary:null==A?void 0:A.parent,customCategory:A},onDismiss:()=>{v(!1)},onComplete:()=>{F(!0)},onUpload:()=>F(!1),onError:B}),(0,Ze.jsx)(Z$,{open:x,title:"Delete Documents",body:"Are you sure you want to delete ".concat(c.length," document").concat(c.length>1?"s":"","? This action cannot be undone."),confirmButtonText:"Delete",closeButtonText:"Cancel",confirmButtonColor:"primary",onConfirm:G,onClose:()=>T(!1),disabled:w})]})},Lat=e=>{var n,t,a,r;return[...null!=e&&null!==(n=e.type)&&void 0!==n&&n.length?[{title:"Type:",value:e.type.join(", ")}]:[],{title:"Review Date:",value:null!=e&&e.reviewDate?y3(e.reviewDate):"-"},{title:"".concat((null==e||null===(t=e.folders)||void 0===t?void 0:t.child.name)||(null==e?void 0:e.category)||"Reference"," ID:"),value:(null==e?void 0:e.referenceId)||"-"},{title:"Supplier/Carrier:",value:(null==e?void 0:e.supplierName)||"-"},...k3(e)?[{title:"Start date:",value:null!=e&&e.startDate?Yt(null==e?void 0:e.startDate):"-"},{title:"Expiration date:",value:null!=e&&e.expirationDate?Yt(null==e?void 0:e.expirationDate):"-"}]:[],...null!=e&&e.managementSystemCode?[{title:"Management System Reference:",value:e.managementSystemCode.toUpperCase()}]:[],{title:"Uploaded on:",value:e?g3(e.createdAt):"-"},{title:"Uploaded by:",value:null!=e&&e.createdBy?Vo(e.createdBy):"-"},{title:"Last updated on:",value:null!=e&&e.updatedAt?g3(e.updatedAt):"-"},{title:"Last updated by:",value:null!=e&&e.updatedBy?Vo(e.updatedBy):"-"},{title:"Tags:",value:null!=e&&null!==(a=e.tags)&&void 0!==a&&a.length?e.tags.map(e=>e.tagName).join(", "):"-"},{title:"Locations:",value:null!=e&&null!==(r=e.locations)&&void 0!==r&&r.length?e.locations.map(e=>e.name).join(", "):"-"},{title:"Notes:",value:(null==e?void 0:e.notes)||"-"}]};var Iat,Eat,_at,Fat,Bat,Uat,Mat,Vat,zat,Gat;function $at(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Wat=(0,f.styled)(f.Grid)(Iat||(Iat=$at(["\n  display: flex;\n  flex-direction: column;\n  margin-top: 16px;\n"]))),qat=(0,f.styled)(f.Grid)(Eat||(Eat=$at(["\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n"]))),Jat=(0,f.styled)(qat)(_at||(_at=$at(["\n  padding: 24px;\n  border-bottom: 1px solid ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.surfaceVariant}),Yat=(0,f.styled)(f.Text)(Fat||(Fat=$at([""]))).withComponent("h4"),Hat=(0,f.styled)(f.Grid)(Bat||(Bat=$at(["\n  display: flex;\n  flex-direction: column;\n  margin-left: 16px;\n  gap: 4px;\n"]))),Kat=(0,f.styled)(f.Grid)(Uat||(Uat=$at(["\n  display: flex;\n  align-items: center;\n  gap: 8px;\n"]))),Qat=(0,f.styled)(f.Icons.TextSnippetOutlined)(Mat||(Mat=$at(["\n  height: 56px;\n  width: 56px;\n"]))),Zat=(0,f.styled)(_we)(Vat||(Vat=$at(["\n  "," {\n    display: flex;\n    justify-content: space-between;\n  }\n"])),e=>{let{theme:n}=e;return n.breakpoints.down("md")}),Xat=(0,f.styled)(f.Button)(zat||(zat=$at(["\n  width: 100%;\n"]))),ert=(0,f.styled)(f.Modal)(Gat||(Gat=$at(["\n  .TitleClassName > h2 {\n    text-align: center;\n  }\n"]))),nrt=e=>{let{showDeleteModal:n,setShowDeleteModal:t,onDelete:a}=e;return(0,Ze.jsx)(ert,{open:n,titleClassName:"TitleClassName",title:"Are you sure you want to delete this Document?",onClose:()=>t(!1),children:(0,Ze.jsxs)(qat,{container:!0,children:[(0,Ze.jsx)(f.Grid,{size:5.5,children:(0,Ze.jsx)(Xat,{variant:"contained",onClick:a,children:"Yes"})}),(0,Ze.jsx)(f.Grid,{size:5.5,children:(0,Ze.jsx)(Xat,{variant:"contained",onClick:()=>t(!1),children:"No"})})]})})};function trt(){var e,n,t,a,r;const i=(0,m.Zp)(),o=rc(),{id:l,library:s}=(0,m.g)(),c=!s,{showNotification:d}=vt(),[u,p]=(0,g.useState)(!1),[y,b]=(0,g.useState)(!1),v=rt(),{token:x}=at(),[T]=(0,Ot.n)(t3),O=jy(),k={id:l,accountId:v},{data:j,error:C,loading:S}=(0,h.IT)(n3,{variables:k}),{getDocumentDownloadLink:w,retrievingDownloadLink:D}=function(){const e=rt(),[]=(0,g.useState)(),[n,{loading:t,error:a}]=(0,gs._)(f3),r=function(){const{showNotification:e}=vt();return()=>e("Unable to retrieve the download link. Please try again.","danger")}();return(0,g.useEffect)(()=>{a&&r()},[a]),{getDocumentDownloadLink:async t=>{if(!t)return null;try{const{data:a}=await n({variables:{accountId:e,documentId:t}});return null==a?void 0:a.getDocumentDownloadLink}catch(e){return r(),(0,de.Cp)(e),null}},retrievingDownloadLink:t}}(),A=null==j?void 0:j.getDocumentRecordById,R=(null==A?void 0:A.antivirusStatus)===gr,P=!o.document.find(e=>e.startsWith("create")),L=((e,n,t)=>{var a,r;return!(null===(a=e.document)||void 0===a||!a.find(e=>(null==e?void 0:e.startsWith(n))&&!e.endsWith("Own")))||(null===(r=e.document)||void 0===r?void 0:r.includes("".concat(n,"Own")))&&t})(o,"delete",(null==A||null===(e=A.createdBy)||void 0===e?void 0:e.id)===x.sub),I=(0,N.m)(),E=A?"".concat((null==A||null===(n=A.folders)||void 0===n?void 0:n.child.name)||A.category," Document"):"Document",_={crumbs:(()=>{const e=[{label:"Documents",to:"/documents"}];if(c)e.push({label:"All",to:"/documents/all"});else if(A){const{folders:n,library:t,category:a}=A;if(n)e.push({label:n.parent.name,to:"/documents/".concat(n.parent.id)}),e.push({label:n.child.name,to:"/documents/".concat(n.parent.id,"/").concat(n.child.id)});else if(t){const n=t.toLowerCase(),r=a,i=Gt().capitalize(t),o=Gt().startCase(a);e.push({label:"".concat(i),to:"/documents/".concat(n)}),e.push({label:"".concat(o),to:"/documents/".concat(n,"/").concat(r)})}}return e})(),content:E,actionButton:(0,Ze.jsxs)(Zat,{wrap:"wrap",container:!0,size:{xs:12,md:6},children:[(0,Ze.jsx)(Ewe,{size:{xs:5.5,md:2.5},children:(0,Ze.jsx)(f.Button,{variant:"contained",onClick:()=>i(-1),children:"Back"})}),(0,Ze.jsx)(Ewe,{size:{xs:5.5,md:2.5},children:(0,Ze.jsx)(f.Button,{variant:"contained",disabled:!R||D,onClick:async()=>{if(R){const e=A.link||await w(l);e&&window.open(e)}},children:D?"Opening...":"Open"})}),!P&&(0,Ze.jsx)(Ewe,{size:{xs:5.5,md:2.5},children:(0,Ze.jsx)(f.Button,{variant:"contained",disabled:!A,onClick:()=>b(!0),children:"Edit"})}),L&&(0,Ze.jsx)(Ewe,{size:{xs:5.5,md:2.5},children:(0,Ze.jsx)(f.Button,{variant:"contained",disabled:!A,onClick:()=>p(!0),children:"Delete"})})]})};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(f.Page,{loading:S,error:C,title:_,children:[(0,Ze.jsxs)(f.Grid,{container:!0,children:[(0,Ze.jsx)(Qat,{}),A&&(0,Ze.jsxs)(Hat,{children:[(0,Ze.jsx)(f.Text,{typescale:"headline",size:"small",children:Gt().truncate(A.fileName,{length:50})}),(0,Ze.jsxs)(Kat,{children:[(0,Ze.jsxs)(f.Text,{typescale:"title",size:"medium",children:[(null==A||null===(t=A.folders)||void 0===t?void 0:t.child.name)||A.category||""," |"]}),(0,Ze.jsxs)(f.Text,{typescale:"body",size:"large",children:["Uploaded on ",g3(A.createdAt)]})]})]})]}),(0,Ze.jsx)(Wat,{container:!0,children:Lat(A).map(e=>{let{title:n,value:t}=e;return(0,Ze.jsxs)(Jat,{container:!0,children:[(0,Ze.jsx)(Yat,{typescale:"title",size:"medium",children:n}),(0,Ze.jsx)(f.Text,{typescale:"body",size:"large",children:t})]},n)})})]}),(0,Ze.jsx)(nrt,{onDelete:async()=>{try{await T({variables:{id:l}});const e=[{fieldName:"getAspectById"},{fieldName:"getLegislationById"}];null!=A&&A.folderId&&e.push({fieldName:"getDocumentFolder",args:{accountId:v,id:A.folderId}}),O(e),i(-1),d("Document has been successfully deleted","success")}catch(e){d("An Error has occurred","danger")}finally{p(!1)}},showDeleteModal:u,setShowDeleteModal:p}),y&&A&&(0,Ze.jsx)(i4,{document:A,predefinedValues:{customLibrary:null===(a=A.folders)||void 0===a?void 0:a.parent,customCategory:null===(r=A.folders)||void 0===r?void 0:r.child},onComplete:e=>{I.writeQuery({query:n3,variables:k,data:{getDocumentRecordById:e}}),b(!1),d("Document has been edited!","success"),(A.library!==e.library||A.category!==e.category)&&!c&&i((e=>{let{library:n,category:t,id:a,folders:r}=e;const i="/documents";return n?r?"".concat(i,"/").concat(r.parent.id,"/").concat(r.child.id,"/").concat(a):"".concat(i,"/").concat(n.toLowerCase(),"/").concat(t,"/").concat(a):"".concat(i,"/all/").concat(a)})(e),{replace:!0})},onError:e=>d(e.message,"danger"),onDismiss:()=>b(!1)})]})}const art=e=>{let{libraries:n,types:t}=e;const[a,r]=(0,g.useState)(!1),[i,o]=(0,g.useState)(!1),{showNotification:l}=vt(),{data:s}=Td(),{canCreateFolder:c}=L3(),{library:d}=(0,m.g)(),u=!!d&&O3(d),p=(d?t.filter(e=>e.libraries.includes(d.toUpperCase())):n).map(e=>({id:e.id,name:e.title,url:"./".concat(e.link),icon:{color:x3("library"in e&&e.library?e.library:d),name:"folder"},disabled:!(!("accessControlIndexer"in e)||!e.accessControlIndexer||Gt().get(s,e.accessControlIndexer))})),{customFolders:y,parentFolder:b,loading:v}=function(e){let{parentId:n,skip:t}=e;const a=rt(),{canGetFolder:r}=L3(),{data:i,error:o,loading:l}=(0,h.IT)(n?p3:u3,{variables:{accountId:a,parentId:n},skip:t||!r});if(o)throw o;const s=null==i?void 0:i.getDocumentFolders,c=null==i?void 0:i.getDocumentFolder;return{customFolders:(0,g.useMemo)(()=>(s||[]).map(e=>({id:e.id,name:e.name,icon:{color:"quaternary",name:"folder"},url:"./".concat(e.id)})),[s,n]),parentFolder:c,loading:l}}({skip:!!d&&!u,parentId:d});return p.push(...y),(0,Ze.jsxs)(f.Page,{loading:v,title:{content:u?b?b.name:" ":d?"".concat(Gt().capitalize(d)," Documents"):"Documents",crumbs:(()=>{const e=[{label:"Documents",to:"../documents"}];return u?b&&e.push({label:b.name,to:"../../documents/".concat(b.id)}):d?e.push({label:Gt().capitalize(d),to:"../../documents/".concat(d)}):e.push({label:"Overview"}),e})(),actionButton:(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(fat,{variant:"outlined",disabled:!c,onClick:()=>o(!0),children:"Create folder"}),b&&(0,Ze.jsx)(Sat,{folder:b}),b&&(0,Ze.jsx)(yat,{folder:b}),(0,Ze.jsx)(Dat,{onClick:()=>r(!0),disabled:!(!u||0!==y.length)&&"Add a category to enable uploads"})]})},children:[!!p.length&&(0,Ze.jsx)(G$n,{folders:p}),a&&(0,Ze.jsx)(b4,{onDismiss:()=>r(!1),onError:e=>{l(e.message,"danger")},predefinedValues:{library:(null==d?void 0:d.toUpperCase())||null,customLibrary:b}}),i&&(0,Ze.jsx)(Cat,{onClose:()=>o(!1),parent:b})]})};function rrt(e){let{onDismiss:n,onError:t,onComplete:a,managementSystem:r,chapter:i,refetch:o}=e;const l=rt(),[s]=(0,Ot.n)(i3),c=(0,g.useMemo)(()=>ui(r,i||r),[i,r]),d=(0,g.useCallback)(async(e,n,c)=>{if(c.length)return t(new Error("".concat(c.length," of your documents failed to upload and thus weren't attached.")));await Promise.all(n.map(async e=>{try{await s({variables:{accountId:l,documentId:e.id,systemId:r.id,linkId:i?i.id:r.id}})}catch(e){e instanceof Error&&t(e)}})),a("Documents have been successfully attached."),o()},[l,s,i,r.id,a,t,o]);return(0,Ze.jsx)(b4,{predefinedValues:{library:Vt.zM.Governance,category:"Management Systems",managementSystemCode:c},onDismiss:n,onError:t,onComplete:d})}var irt;const ort=(0,f.styled)(f.Button)(irt||(irt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 40px;\n"])));function lrt(){const e=(0,eg.A)(),{id:n,itemId:t}=(0,m.g)(),{pathname:a}=(0,m.zy)(),{showNotification:r}=vt(),[i,o]=(0,g.useState)(),[l,s]=(0,g.useState)(!1),c=rt(),d=rc(),{data:u,loading:p,error:y,refetch:b}=(0,h.IT)(r3,{variables:{id:n,accountId:c},partialRefetch:!0,returnPartialData:!0,errorPolicy:"all"}),v=null==u?void 0:u.getManagementSystemById,x=(null==v?void 0:v.title)||"Management System",{tree:T}=oi(v),{folders:O}=vqn(v,T,t,a),k=Object.values(T).map(e=>bqn(e,a,t)),[j,C,S]=hf(k,["name","title","referenceId","managementSystemCode"]),[,N]=Dqn()(S,e=>"DocumentRecord"===e.__typename),w=j?N:O,D=Tqn(e,v,T,T[t]).map(e=>({to:e.to,label:e.title})),A={accountId:c,filters:T3(j,kqn,jqn,n,t||null)},{documentsExist:R}=wWn(A),P=(0,g.useCallback)(()=>s(!1),[]),L=(0,g.useCallback)(e=>{r(e,"success"),P()},[r,P]),I=(0,g.useCallback)(e=>{r(e.message,"danger"),P()},[r,P]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Page,{title:{crumbs:D,content:x,actionButton:!!d.governance.find(e=>e.startsWith("attachDocumentToManagementSystem"))&&(0,Ze.jsx)(ort,{variant:"contained",onClick:()=>s(!0),children:"Attach Documents"})},loading:p&&!R,error:y,children:(0,Ze.jsx)(dat,{folders:w,library:kqn,category:jqn,isManagementSystem:!0,documentsExist:R,searchValue:j,onSearch:C,gridApi:i,setGridApi:o,managementSystemId:n,managementSystemChapterId:t})}),l&&(0,Ze.jsx)(rrt,{managementSystem:v,chapter:T[t],onComplete:e=>L(e),onError:e=>I(e),onDismiss:P,refetch:()=>b({id:n,accountId:c})})]})}const srt=(0,Ye.Ay)(function(e){let{intl:n}=e;const t=rt(),a={accountId:t},{data:r}=(0,h.IT)(yfn,{variables:a}),{pathname:i}=(0,m.zy)(),o=Oqn((null==r?void 0:r.getAvailableManagementSystems)||[],i),[l,s]=(0,g.useState)(),c=xqn(n).map(e=>{let{to:n,title:t}=e;return{to:n,label:t}}),[d,u,p]=hf(o,["name"]),{documentsExist:y,error:b,loading:v}=wWn({accountId:t,filters:T3(d||"")},!d);return(0,Ze.jsx)(f.Page,{title:{crumbs:c,content:"Management Systems"},loading:v&&!y,error:b,children:(0,Ze.jsx)(dat,{folders:p,documentsExist:y,onSearch:u,gridApi:l,setGridApi:s,searchValue:d,searchPlaceholder:"Search management systems",library:kqn,category:jqn})})});var crt;const drt=(0,f.styled)("div")(crt||(crt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"]))),urt=()=>{const e=oc();return(0,Ze.jsx)(drt,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(art,{libraries:P3,types:x$n})}),(0,Ze.jsx)(m.qh,{path:e.docs.all,element:(0,Ze.jsx)(Pat,{documentFolders:x$n})}),(0,Ze.jsx)(m.qh,{path:"".concat(e.docs.all,"/:id"),element:(0,Ze.jsx)(trt,{})}),(0,Ze.jsx)(m.qh,{path:e.docs.systems,element:(0,Ze.jsx)(srt,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(e.docs.systems,"/:id"),element:(0,Ze.jsx)(lrt,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(e.docs.systems,"/:id/:itemId"),element:(0,Ze.jsx)(lrt,{})}),(0,Ze.jsx)(m.qh,{path:"/:library",element:(0,Ze.jsx)(gqn,{children:(0,Ze.jsx)(art,{libraries:P3,types:x$n})})}),(0,Ze.jsx)(m.qh,{path:"/:library/:type",element:(0,Ze.jsx)(gqn,{children:(0,Ze.jsx)(Pat,{documentFolders:x$n})})}),(0,Ze.jsx)(m.qh,{path:"/:library/:type/:id",element:(0,Ze.jsx)(gqn,{children:(0,Ze.jsx)(trt,{})})}),(0,Ze.jsx)(m.qh,{path:"/:library/:id/edit",element:(0,Ze.jsx)(gqn,{children:(0,Ze.jsx)(trt,{})})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:e.docs.root})})]})})};var prt;const mrt=kn("REACT_APP_FLOW_URI")||kn("REACT_APP_BASE_URL"),frt=(0,f.styled)("iframe")(prt||(prt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  height: 100vh;\n"]))),yrt=()=>(0,Ze.jsx)(frt,{id:"flowsFrame",src:"".concat(mrt,"/rio-flows/v2/flows/")});var grt,brt;function hrt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const vrt=(0,f.styled)("div")(grt||(grt=hrt(["\n  height: 100%;\n  overflow: visible;\n"]))),xrt=(0,f.styled)("div")(brt||(brt=hrt(["\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 2;\n  background: ",";\n  opacity: 0.5;\n  width: 100%;\n  height: 100%;\n"])),e=>{let{theme:n}=e;return n.sys.color.onPrimary}),Trt=()=>{const e=Pu(),n=!!e&&e.accessControls.flows;return(0,Ze.jsxs)(Ze.Fragment,{children:[!n&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(xrt,{}),(0,Ze.jsx)(Tn,{name:"FormsContainer_Access_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Flows",body:"Currently Flows are not included in your subscription, if you’d like access to Flows please contact Rio AI Ltd or get in touch with your Business Admin.",dismissable:!0,onDismiss:()=>{}})]}),n&&(0,Ze.jsx)(vrt,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(yrt,{})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(Xg,{})})]})})]})};var Ort,krt;function jrt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Crt=(0,f.styled)("div")(Ort||(Ort=jrt(["\n  flex: 1 1 auto;\n\n  // Fallbacks for IE\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-self: flex-center;\n\n  // CSS grid for real browsers\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n  grid-gap: 24px;\n"]))),Srt=(0,f.styled)(p.Link)(krt||(krt=jrt(["\n  ","\n"])),e=>e.disabled?"\n    opacity: 0.5;\n  ":""),Nrt=e=>{let{areas:n,accessControls:t}=e;return(0,Ze.jsx)(Crt,{children:n.map(e=>{let n=e.link;t[e.accessIndex]||(n="/contact");let a="";switch(e.icon){case"balance-scale":a="Balance";break;case"university":a="AccountBalance";break;case"clipboard-list":a="AssignmentOutlined";break;case"thumbs-up":a="ThumbUp";break;case"subscript":a="AdsClick";break;case"drafting-compass":a="Architecture";break;case"notes-medical":a="MedicalServices";break;case"scroll":a="AutoStories";break;default:a=""}const r=e.comingSoon||!t[e.accessIndex];let i="";return r&&!t[e.accessIndex]&&(i="Upgrade now"),r&&e.comingSoon&&(i="Coming soon"),(0,Ze.jsx)(Srt,{to:n,disabled:r,children:(0,Ze.jsx)(f.Card,{title:e.title,subContent:e.description,iconName:a,chipContent:i})},e.id)})})};var wrt;const Drt=(0,f.styled)("div")(wrt||(wrt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex-direction: column;\n"]))),Art=e=>{const{accessControls:n,isShouldUserUpgrade:t}=e,{data:a,loading:r}=Gm(),i=rc(),o=Sln.filter(e=>{var n;return!(null===(n=i[e.permissionSection])||void 0===n||!n.find(n=>n.startsWith(e.basePermission)))}),[l,s]=zt.partition(o,e=>!!e.restricted),c=((e,n)=>{const t=[];return e.forEach(e=>{var a;null!==(a=n[e.accessIndex])&&void 0!==a&&a.find(n=>n.id===e.restrictionId)&&t.push(e)}),t})(l,{systems:a}),d=s.concat(c);return(0,Ze.jsx)(f.Page,{title:{content:"Governance",crumbs:[{label:"Governance"},{label:"Areas"}]},children:(0,Ze.jsxs)(Drt,{children:[t&&(0,Ze.jsx)(Tn,{name:"ComplyContainer_Access_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Governance",body:"Currently Governance is not included in your subscription, if you'd like to use this tool to assess your compliance risk, upload evidence and get automated alerts please contact Rio AI Ltd or your Rio Business Admin.",dismissable:!1,onDismiss:()=>{}}),i.loading||r?(0,Ze.jsx)(f.Loader,{size:100}):(0,Ze.jsx)(Nrt,{areas:d,accessControls:n})]})})};var Rrt;function Prt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Lrt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Irt=(0,f.styled)(f.Grid)(Rrt||(Rrt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n  gap: 8px;\n"]))),Ert=(0,f.styled)("div")({padding:"30px 0"}),_rt=(0,f.styled)("div")(e=>{let{theme:n,type:t}=e;return{display:"column"===t?"block":"flex",padding:20,borderBottom:"1px solid ".concat(n.sys.color.surfaceVariant)}}),Frt=(0,f.styled)("div")(e=>{let{theme:n,type:t}=e;return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Prt(Object(t),!0).forEach(function(n){Lrt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Prt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({textAlign:"left",fontWeight:n.sys.typescale.label.medium.weight},"column"===t?{marginBottom:10}:{flex:1})}),Brt=(0,f.styled)("div")(e=>{let{type:n}=e;return{textAlign:"column"===n?"left":"right"}}),Urt=(0,f.styled)(p.Link)({display:"block",textDecoration:"underline","&:not(:last-child)":{marginBottom:3}});function Mrt(){const[e]=Jm(HD,{notifyOnNetworkStatusChange:!0,fetchPolicy:"network-only"});return async n=>{const{error:t,data:a}=await e({variables:n});if(t||!a)throw t||new Error("No data returned from query");return a.getAspectsByAccountId}}const Vrt=(e,n)=>{var t,a,r,i,o,l,s,c,d;return{id:(null==n?void 0:n.id)||null,accountId:e,scope:(null==n?void 0:n.scope)||Vt.HG.Account,locationIds:Zo(null==n?void 0:n.locations,xi),tagIds:Zo(null==n?void 0:n.tags,e=>{let{id:n,tagName:t}=e;return{value:n,label:t}}),ownerId:(null==n||null===(t=n.owner)||void 0===t?void 0:t.id)||"",activity:(null==n||null===(a=n.activity)||void 0===a?void 0:a.id)||"",departments:Zo(null==n?void 0:n.departments,xi),aspects:Zo(null==n?void 0:n.aspects,xi),impacts:Zo(null==n?void 0:n.impacts,xi),legislationIds:Zo(null==n?void 0:n.legislations,e=>{let{id:n,title:t}=e;return{value:n,label:t}}),likelihoodNoControl:(null==n||null===(r=n.likelihoodNoControl)||void 0===r?void 0:r.toString())||"",severityNoControl:(null==n||null===(i=n.severityNoControl)||void 0===i?void 0:i.toString())||"",emergencyConditions:Zo(null==n?void 0:n.emergencyConditions,xi),controlMeasures:Zo(null==n?void 0:n.controlMeasures,xi),likelihoodControl:(null==n||null===(o=n.likelihoodControl)||void 0===o?void 0:o.toString())||"",severityControl:(null==n||null===(l=n.severityControl)||void 0===l?void 0:l.toString())||"",reviewDate:(null==n?void 0:n.reviewDate)||"",status:(null==n||null===(s=n.status)||void 0===s?void 0:s.id)||"",taskId:(null==n||null===(c=n.task)||void 0===c?void 0:c.id)||"",authorId:(null==n||null===(d=n.author)||void 0===d?void 0:d.id)||"",createdDate:(null==n?void 0:n.createdDate)||null,evidence:null}},zrt={activities:Vt.G8.Activity,aspects:Vt.G8.Aspect,emergencyConditions:Vt.G8.EmergencyCondition,impacts:Vt.G8.Impact,controlMeasures:Vt.G8.ControlMeasure,statuses:Vt.G8.Status};function Grt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function $rt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Grt(Object(t),!0).forEach(function(n){Wrt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Grt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Wrt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const qrt={"Option with the same name already exists.":{field:"name",message:"This name is already taken"}},Jrt={activities:"Activity / Process",aspects:"Environmental Aspect",emergencyConditions:"Potential Emergency Condition",impacts:"Potential Environmental Impact",controlMeasures:"Relevant Control Measure",statuses:"Status"};function Yrt(e){let{onComplete:n,category:t}=e;const[a,r]=(0,g.useState)(!1),{showNotification:i}=vt(),o=function(){const[e]=(0,Ot.n)(ZD),n=rt(),t=jy();return async a=>{let{category:r,name:i}=a;const o=zrt[r],{data:l}=await e({variables:{input:{accountId:n,type:o,name:i}}});return t([{fieldName:"getAspectOptions",args:{accountId:n,type:o}}]),l.createAspectOption}}(),{handleSubmit:l,control:s,formState:{isDirty:c},setError:d}=(0,Rw.mN)({defaultValues:{name:""},mode:"onChange"}),u=vat({setError:d,expectedErrors:qrt}),p=async e=>{let{name:a}=e;r(!0);try{const e=await o({category:t,name:a});n(e)}catch(e){u(e)||(de.Cp(e),i('Failed to create "'.concat(Jrt[t],'". Retry or contact support.'),"danger"))}finally{r(!1)}},m=!a&&c;return(0,Ze.jsx)(f.Modal,{open:!0,title:"Create ".concat(Jrt[t]),onClose:()=>n(),children:(0,Ze.jsx)("form",{onSubmit:e=>{e.stopPropagation(),l(p)(e)},children:(0,Ze.jsxs)(f.Grid,{container:!0,spacing:3,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"name",control:s,rules:{required:"Name is required"},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(f.TextField,$rt($rt({},n),{},{label:"Name",fullWidth:!0,error:!!t,helperText:null==t?void 0:t.message}))}})}),(0,Ze.jsxs)(f.Grid,{size:12,container:!0,spacing:2,mt:3,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,onClick:()=>n(),children:"Cancel"})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,variant:"contained",loading:a,color:"primary",type:"submit",disabled:!m,children:"Create"})})]})]})})})}function Hrt(){const e=By("governance");return{get canCreateAspect(){return e("createAspect")},get canDeleteAspect(){return e("deleteAspect")},get canCreateAspectOption(){return e("createAspectOption")},get canDeleteAspectOption(){return e("deleteAspectOption")},canDeleteOwnAspect:n=>e("deleteAspect",n.author.id)}}function Krt(e){let{onComplete:n,option:t,category:a}=e;const r=gSn(),i=rt();return(0,Ze.jsx)(Z$,{open:!0,onClose:n,closeButtonText:"Cancel",onConfirm:async()=>{const e=t.value,n=zrt[a];await r({accountId:i,id:e,type:n})},title:"Delete Aspect Option",body:'The "'.concat(t.label,'" aspect option will be permanently deleted. Do you want to continue?'),confirmButtonText:"Delete"})}function Qrt(e){let{label:n,error:t,onChange:a,options:r,category:i,value:o,clearable:l,deletable:s}=e;const[c,d]=(0,g.useState)(!1),{canDeleteAspectOption:u}=Hrt(),[p,m]=(0,g.useState)();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Select,{label:n,fullWidth:!0,onChange:e=>{let{value:n}=e;return a(n)},error:!!t,helperText:t,disableSorting:!0,options:r.options[i],value:o,isLoading:r.loading,disabled:r.loading,onCreateNew:()=>d(!0),onClear:l?()=>a(""):void 0,onDeleteOption:s&&u?e=>m(e):void 0}),c&&(0,Ze.jsx)(Yrt,{category:i,onComplete:e=>{e&&a(e.id),d(!1)}}),p&&(0,Ze.jsx)(Krt,{category:i,option:p,onComplete:e=>{e&&p.value===o&&a(""),m(void 0)}})]})}function Zrt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Xrt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Zrt(Object(t),!0).forEach(function(n){eit(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Zrt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function eit(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const nit=e=>Xrt(Xrt({},xi(e)),{},{disabled:!(!e.referenced&&!e.isGlobal)&&"delete-only"});function tit(e){let{value:n,label:t="Department(s)",placeholder:a="Select department(s)",onChange:r,error:i}=e;const o=rc(),l=Pu(),[s,c]=(0,g.useState)(!1),d=o.account.some(e=>e.startsWith("createDepartment")),[u,p]=(0,g.useState)([...d?[{value:"NEW",label:"Create new ..."}]:[],...Zo(null==l?void 0:l.departments,xi)]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.MultiSelect,{error:!!i,helperText:i,options:u,value:n||void 0,label:t,placeholder:a,onCreate:()=>c(!0),onChange:r}),(0,Ze.jsx)(uW,{showCreateDepartment:s,setShowCreateDepartment:c,onComplete:(e,t)=>{let{createDepartment:a}=e;p(Zo(a,xi)),r([...n||[],xi(t)])}})]})}function ait(e){let{options:n,category:t,label:a,error:r,value:i,onChange:o,deletable:l}=e;const[s,c]=(0,g.useState)(!1),{canDeleteAspectOption:d}=Hrt(),[u,p]=(0,g.useState)();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.AutoComplete,{isMulti:!0,error:r,isLoading:n.loading,options:n.options[t],value:i||[],label:a,createOption:"NEW",onCreate:()=>c(!0),onChange:o,onDeleteOption:l&&d?e=>p(e):void 0}),s&&(0,Ze.jsx)(Yrt,{category:t,onComplete:e=>{e&&o([...i,xi(e)]),c(!1)}}),u&&(0,Ze.jsx)(Krt,{category:t,option:u,onComplete:e=>{e&&i.some(e=>{let{value:n}=e;return n===u.value})&&o(i.filter(e=>{let{value:n}=e;return n!==u.value})),p(void 0)}})]})}function rit(e){let{onChange:n,error:t,value:a}=e;const{options:r,loading:i}=function(){const e=rt(),{data:n,loading:t}=(0,h.IT)(_ln,{variables:{accountId:e}}),a=(0,g.useMemo)(()=>Zo(null==n?void 0:n.getAllLegislation,e=>{let{id:n,title:t}=e;return{value:n,label:t}}).sort((e,n)=>e.label.localeCompare(n.label)),[n]);return{options:a,loading:t}}();return(0,Ze.jsx)(f.AutoComplete,{isMulti:!0,error:t,isLoading:i,options:r,value:a||[],label:"Legislation Reference(s)",onChange:n})}function iit(e){let{onChange:n,error:t,options:a,label:r,clearable:i,value:o}=e;return(0,Ze.jsx)(f.Select,{value:o,onChange:e=>{let{value:t}=e;return n(t)},label:r,fullWidth:!0,error:!!t,helperText:t,options:a,onClear:i?()=>n(""):void 0})}const oit=["evidence"];function lit(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function sit(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?lit(Object(t),!0).forEach(function(n){cit(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):lit(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function cit(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function dit(){let{intent:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n]=TNn(),{token:t}=at(),a=Kcn(),r=jy();return async i=>{const{evidence:o}=i,l=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(i,oit),s=l.tagIds.map(e=>{let{value:n}=e;return n}),c=[];if(o){const e=await a(o.attachments,s,"Aspects and Impacts");c.push({notes:o.notes,documents:e})}const{data:d}=await n({variables:{input:Gt().omitBy(sit(sit({},l),{},{id:"edit"===e?l.id:(0,Ai.A)(),authorId:"edit"===e?l.authorId:t.sub,likelihoodNoControl:l.likelihoodNoControl?Number(l.likelihoodNoControl):null,likelihoodControl:l.likelihoodControl?Number(l.likelihoodControl):null,severityNoControl:l.severityNoControl?Number(l.severityNoControl):null,severityControl:l.severityControl?Number(l.severityControl):null,locationIds:l.locationIds.map(e=>{let{value:n}=e;return n}),tagIds:s,legislationIds:l.legislationIds.map(e=>{let{value:n}=e;return n}),impacts:l.impacts.map(e=>{let{value:n}=e;return n}),aspects:l.aspects.map(e=>{let{value:n}=e;return n}),emergencyConditions:l.emergencyConditions.map(e=>{let{value:n}=e;return n}),controlMeasures:l.controlMeasures.map(e=>{let{value:n}=e;return n}),departments:l.departments.map(e=>{let{value:n}=e;return n}),createdDate:"edit"===e?l.createdDate:new Date,editedDate:"edit"===e?new Date:null,editorId:"edit"===e?t.sub:null,reviewDate:l.reviewDate?Kt(l.reviewDate):null,evidenceNotes:c}),e=>null==e||""===e)}});return r([{fieldName:"getAspectsByAccountId",args:{accountId:i.accountId}},{fieldName:"getAspectOptions"},...i.id?[{fieldName:"getAspectById",args:{accountId:i.accountId,id:i.id}}]:[]]),d.createAspect}}function uit(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function pit(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const mit=(0,f.styled)(f.TextArea)({marginBottom:10}),fit=(0,f.styled)("div")({marginTop:5,marginBottom:20,display:"flex",justifyContent:"space-between",alignItems:"center",paddingLeft:15,paddingRight:15}),yit=(0,f.styled)("div")({display:"flex",justifyContent:"left",alignItems:"center",gap:1});function git(e){let{error:n,value:t,onChange:a}=e;const r=e=>{let{attachments:n,notes:r,removeAttachment:i}=e;const o=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uit(Object(t),!0).forEach(function(n){pit(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uit(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({},t||{attachments:[]});n&&o.attachments.push(...n),i&&(o.attachments=o.attachments.filter(e=>e.name!==i.name)),"string"==typeof r&&(o.notes=r);const l=!o.notes&&0===o.attachments.length;a(l?null:o)};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(mit,{size:"medium",onChange:e=>r({notes:e.target.value}),label:"Evidence Name",value:(null==t?void 0:t.notes)||"",helperText:n,error:!!n}),(null==t?void 0:t.attachments)&&t.attachments.map(e=>(0,Ze.jsxs)(fit,{children:[(0,Ze.jsxs)(yit,{children:[(0,Ze.jsx)(f.Icons.ArticleOutlined,{fontSize:"small"})," ",(0,Ze.jsx)(f.Text,{children:e.name})]}),(0,Ze.jsx)(_B.A,{onClick:()=>r({removeAttachment:e}),children:(0,Ze.jsx)(f.Icons.Clear,{fontSize:"small"})})]},e.name)),(0,Ze.jsx)(f.FileUploadButton,{multiple:!0,fullWidth:!0,accept:xr.allowedDocument.mimeType,onFileUpload:e=>r({attachments:e}),children:"Attach Evidence"})]})}const bit=e=>e&&e.notes&&0===e.attachments.length?"Please attach documents if you add notes.":void 0;function hit(e){let{aspect:n,onComplete:t}=e;return(0,Ze.jsx)(lUe,{open:!0,accountId:n.accountId,onComplete:()=>{},onDismiss:()=>t(),defaultValues:{scope:n.scope,tagIds:Xo(n.tags||[]).map(e=>{let{id:n}=e;return n}),locationIds:Xo(n.locations||[]).map(e=>{let{id:n}=e;return n}),category:Vt.Ix.Governance,subject:Vt.AR.Aspects,itemId:n.id},disabled:{scope:!0,category:!0,subject:!0,locations:!0,tags:!0,[Vt.AR.Aspects]:!0}})}function vit(e){let{onComplete:n,aspect:t}=e;const[a,r]=(0,g.useState)(!0),[i,o]=(0,g.useState)(!1);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Z$,{open:a,onClose:e=>{e?o(!0):n(),r(!1)},title:"Create Task",body:"Do you want to create an associated task?",confirmButtonText:"Yes",closeButtonText:"No"}),i&&(0,Ze.jsx)(hit,{onComplete:n,aspect:t})]})}function xit(e){let{onChange:n,error:t,tagIds:a,scope:r,locationIds:i,value:o}=e;const l=function(e){let{scope:n,locationIds:t,tagIds:a}=e;const r=rt(),{data:i,loading:o}=(0,h.IT)(OSn,{variables:{accountId:r,offset:0,sort:[{field:"firstName",order:"asc"}],filters:{text:[{filterType:Vt.pe.Text,field:"accountId",type:Vt.II.Equals,filter:r}],set:[...n===Vt.HG.Location&&t.length>0?[{filterType:Vt.pe.Set,field:"allowedLocations",values:t.map(e=>e.value)}]:[],...n===Vt.HG.Tag&&a.length>0?[{filterType:Vt.pe.Set,field:"allowedTags",values:a.map(e=>e.value)}]:[]]}},skip:!r,notifyOnNetworkStatusChange:!0});return{data:(0,g.useMemo)(()=>(e=>{var n;return(null==e||null===(n=e.getUsers)||void 0===n||null===(n=n.rows)||void 0===n?void 0:n.map(e=>({value:e.id,label:"".concat(e.firstName," ").concat(e.lastName)})))||[]})(i),[i]),loading:o}}({scope:r,tagIds:a,locationIds:i});return(0,Ze.jsx)(f.Select,{value:o,onChange:e=>{let{value:t}=e;return n(t)},label:"Owner",fullWidth:!0,error:!!t,helperText:t,options:l.data,isLoading:l.loading,disabled:l.loading,onClear:()=>n("")})}function Tit(){const e=By("task");return{get canCreateTask(){return e("create")}}}function Oit(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function kit(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Oit(Object(t),!0).forEach(function(n){jit(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Oit(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jit(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Cit=(0,f.styled)(f.Text)(e=>{let{theme:n}=e;return{color:n.sys.color.error,width:"100%"}});function Sit(e){let{onComplete:n,aspect:t,intent:a}=e;const r=rt(),[i,o]=(0,g.useState)(!0),[l,s]=(0,g.useState)(),{showNotification:c}=vt(),[d,u]=(0,g.useState)(!1),[p,m]=(0,g.useState)(),{canCreateTask:y}=Tit(),b=dit({intent:a}),{handleSubmit:h,control:v,watch:x,setValue:T,clearErrors:O,formState:{isDirty:k,dirtyFields:j}}=(0,Rw.mN)({defaultValues:Vrt(r,t)}),C=x("scope"),S=x("tagIds"),N=x("locationIds");(0,g.useEffect)(()=>{j.scope&&(T("locationIds",[]),T("tagIds",[]),T("ownerId",""),O(["locationIds","tagIds","ownerId"]))},[C]),(0,g.useEffect)(()=>{(j.tagIds||j.locationIds)&&(T("ownerId",""),O(["ownerId"]))},[S,N]);const w=function(){const{data:e,loading:n}=fSn(),{canCreateAspect:t}=Hrt();return{options:(0,g.useMemo)(()=>((e,n)=>{const t={};for(const a of mSn){const r="statuses"!==a&&n?[{value:"NEW",label:"Create new..."}]:[],i=(null==e?void 0:e[a])||[];t[a]=[...r,...i.map(nit).sort((e,n)=>e.label.localeCompare(n.label))]}return t})(e,t),[e,t]),loading:n}}(),D=function(){const e=VCn();return async n=>{const{totalRows:t}=await e({accountId:n.accountId,filters:ySn({scope:n.scope,activity:n.activity,locationIds:n.locationIds.map(e=>{let{value:n}=e;return n}),tagIds:n.tagIds.map(e=>{let{value:n}=e;return n}),departments:n.departments.map(e=>{let{value:n}=e;return n}),aspects:n.aspects.map(e=>{let{value:n}=e;return n}),impacts:n.impacts.map(e=>{let{value:n}=e;return n}),legislationIds:n.legislationIds.map(e=>{let{value:n}=e;return n})})});return t>=1}}(),A=e=>{n(e),c((0,Ze.jsx)(ONn,{aspectId:e.id,isUpdate:"edit"===a}),"success",{autoClose:2e4})},R="edit"===a?"Edit":"copy"===a?"Duplicate":"Create",P=!d&&k;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Modal,{open:i,title:"".concat(R," Aspect"),onClose:()=>n(),children:(0,Ze.jsx)("form",{onSubmit:h(async e=>{try{if(m(void 0),u(!0),"copy"===a&&await D(e))return void m("It seems you are attempting to create an aspect which already exists. Please create a unique aspect.");const n=await b(e);"edit"!==a&&!e.taskId&&y?(o(!1),s(n)):A(n)}catch(e){de.Cp(e),c("Something went wrong, please try again or contact support.","danger")}finally{u(!1)}}),children:(0,Ze.jsxs)(f.Grid,{container:!0,spacing:3,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"scope",control:v,rules:{required:"Scope is required"},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(iit,kit(kit({},n),{},{label:"Scope",error:null==t?void 0:t.message,options:Re}))}})}),C===Vt.HG.Location&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"locationIds",control:v,rules:{required:"Location is required"},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(C3,kit(kit({},n),{},{label:"Location(s)",error:null==t?void 0:t.message}))}})}),C===Vt.HG.Tag&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"tagIds",control:v,rules:{required:"Tag is required"},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(A3,kit(kit({},n),{},{label:"Tag(s)",accountId:r,error:null==t?void 0:t.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"departments",control:v,rules:{required:"Department is required"},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(tit,kit(kit({},n),{},{error:null==t?void 0:t.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"ownerId",control:v,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(xit,kit(kit({},n),{},{error:null==t?void 0:t.message,scope:C,locationIds:N,tagIds:S}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"activity",rules:{required:"Activity is required"},control:v,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(Qrt,kit(kit({},n),{},{category:"activities",options:w,label:"Activity / Process",error:null==t?void 0:t.message,deletable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"aspects",control:v,rules:{required:"Environmental Aspect is required"},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(ait,kit(kit({},n),{},{category:"aspects",options:w,label:"Environmental Aspect(s)",error:null==t?void 0:t.message,deletable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"impacts",control:v,rules:{required:"Potential Environmental Impact is required"},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(ait,kit(kit({},n),{},{category:"impacts",options:w,label:"Potential Environmental Impact(s)",error:null==t?void 0:t.message,deletable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"legislationIds",control:v,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(rit,kit(kit({},n),{},{error:null==t?void 0:t.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"likelihoodNoControl",control:v,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(iit,kit(kit({},n),{},{label:"Likelihood (no control)",error:null==t?void 0:t.message,options:oA,clearable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"severityNoControl",control:v,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(iit,kit(kit({},n),{},{label:"Severity (no control)",error:null==t?void 0:t.message,options:lA,clearable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"emergencyConditions",control:v,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(ait,kit(kit({},n),{},{category:"emergencyConditions",options:w,label:"Potential Emergency Condition(s)",error:null==t?void 0:t.message,deletable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"controlMeasures",control:v,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(ait,kit(kit({},n),{},{category:"controlMeasures",options:w,label:"Relevant Control Measure(s)",error:null==t?void 0:t.message,deletable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"likelihoodControl",control:v,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(iit,kit(kit({},n),{},{label:"Likelihood (with control)",error:null==t?void 0:t.message,options:oA,clearable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"severityControl",control:v,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(iit,kit(kit({},n),{},{label:"Severity (with control)",error:null==t?void 0:t.message,options:lA,clearable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"reviewDate",control:v,rules:{validate:J3()},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(f.DatePicker,kit(kit({},n),{},{label:"Review date",timezone:"utc",error:null==t?void 0:t.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"status",control:v,render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(Qrt,kit(kit({},n),{},{category:"statuses",options:w,label:"Status",error:null==t?void 0:t.message,clearable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"evidence",control:v,rules:{validate:bit},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(git,kit(kit({},n),{},{error:null==t?void 0:t.message}))}})}),p&&(0,Ze.jsx)(Cit,{children:p}),(0,Ze.jsxs)(f.Grid,{size:12,container:!0,spacing:2,mt:3,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,onClick:()=>n(),children:"Cancel"})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,variant:"contained",color:"primary",type:"submit",disabled:!P,loading:d,children:"edit"===a?"Save":"Create"})})]})]})})}),l&&(0,Ze.jsx)(vit,{aspect:l,onComplete:()=>{s(void 0),A(l)}})]})}function Nit(e){let{gridRef:n}=e;const{filtersApplied:t,resetGridState:a,gridApi:r}=n.current||{},[i,o]=(0,g.useState)(!1),l=Mrt(),{canCreateAspect:s}=Hrt();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(Irt,{children:[(0,Ze.jsx)(N$,{filtersApplied:t,resetGridState:a}),r&&(0,Ze.jsx)($P,{fetchRows:l,gridApi:r,defaultExportFileName:"aspects",columnsToSkip:["actions"]}),s&&(0,Ze.jsx)(STe,{hint:"Add a new aspect",icon:(0,Ze.jsx)(f.Icons.Add,{}),onClick:()=>o(!0)})]}),i&&(0,Ze.jsx)(Sit,{onComplete:e=>{o(!1),e&&(null==r||r.refreshServerSide({purge:!0}))}})]})}const wit=(0,f.styled)(f.TextField)({marginRight:10,marginTop:-14});function Dit(e){let{gridRef:n}=e;const{gridApi:t}=n.current||{},[a,r]=_Cn(),[i,o]=(0,g.useState)(a||"");(0,g.useEffect)(()=>{null==t||t.refreshServerSide({purge:!0})},[a]);const l=(0,oE.useDebouncedCallback)(e=>{r(e||null)},300);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.PageTitleHeader,{children:"Aspects & Impacts Register"}),(0,Ze.jsx)(wit,{label:"Search",value:i,onChange:e=>{return n=e.target.value,o(n),void l(n);var n}})]})}function Ait(e){let{data:n,api:t,rowIndex:a}=e;const[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)(),[s,c]=(0,g.useState)(!1),d=pSn(),u=rt(),{canCreateAspect:p,canDeleteOwnAspect:m,canDeleteAspect:y}=Hrt(),b=[];return p&&b.push({hint:"Edit",onClick:()=>{l("edit")},icon:(0,Ze.jsx)(f.Icons.Edit,{}),disabled:s},{hint:"Duplicate",onClick:()=>{l("copy")},icon:(0,Ze.jsx)(f.Icons.ContentCopy,{}),disabled:s}),y&&b.push({hint:"Delete",onClick:()=>i(!0),icon:(0,Ze.jsx)(f.Icons.Delete,{}),disabled:s||!m(n)}),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(yTe,{buttons:b}),(0,Ze.jsx)(Z$,{open:r,onClose:()=>i(!1),onConfirm:async()=>{c(!0);try{await d({id:n.id,accountId:u})}finally{c(!1),t.applyServerSideRowData({startRow:a,successParams:{rowData:[null]}})}},title:"Delete Aspect",body:"This action will permanently delete this aspect. Do you want to proceed?",confirmButtonText:"Delete"}),o&&(0,Ze.jsx)(Sit,{intent:o,aspect:n,onComplete:e=>{e&&("edit"===o?t.applyServerSideRowData({startRow:a,successParams:{rowData:[e]}}):null==t||t.refreshServerSide({purge:!0})),l(void 0)}})]})}function Rit(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Pit(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Rit(Object(t),!0).forEach(function(n){Lit(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Rit(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Lit(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Iit={legislationReference:e=>(0,Ze.jsx)(LCn,Pit(Pit({},e),{},{searchValue:MCn()||FCn()})),actions:e=>(0,Ze.jsx)(Ait,Pit({},e)),searchable:e=>(0,Ze.jsx)(qJ,Pit(Pit({},e),{},{searchValue:MCn()||FCn()}))};function Eit(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function _it(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Eit(Object(t),!0).forEach(function(n){Fit(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Eit(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Fit(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Bit=[{label:"Governance",to:"/governance"},{label:"Aspects & Impacts Register"}];function Uit(){const e=rt(),n=(0,g.useRef)(null),t="".concat(e,"_Governance_Aspects"),a=function(){const e=function(){const e=(0,N.m)(),n=(0,Ge.useTheme)(),t=rt(),{showNotification:a}=vt(),r={filter:"agSetColumnFilter",filterParams:{values:async n=>{try{const{data:{getAspectFilter:a}}=await e.query({query:eA,variables:{accountId:t,field:n.colDef.field}});n.success(a.map(e=>e.value?JSON.stringify(e):e.value))}catch(e){a("Couldn't load filter values for column \"".concat(n.colDef.headerName,'"'),"warning"),de.Cp(e),n.success([])}},valueFormatter:la,comparator:(e,n)=>{var t,a;return(null===(t=JSON.parse(e))||void 0===t?void 0:t.label)-(null===(a=JSON.parse(n))||void 0===a?void 0:a.label)}}},i=e=>{let{value:n}=e;return Array.isArray(n)?cCn(n):null==n?void 0:n.name};return(0,g.useMemo)(()=>[_it({headerName:"Aspect Id",field:"id",cellRenderer:"searchable",hide:!0},r),_it({headerName:"Scope",field:"scope",resizable:!0,valueFormatter:e=>{let{data:n}=e;return oCn(n.scope)}},_it(_it({},r),{},{filterParams:_it(_it({},r.filterParams),{},{valueFormatter:e=>oCn(la(e))})})),_it({headerName:"Scope (Tags)",cellRenderer:"searchable",field:"tags",resizable:!0,valueFormatter:e=>{let{data:n}=e;return sCn(n)}},r),_it({headerName:"Scope (Locations)",cellRenderer:"searchable",field:"locations",resizable:!0,valueFormatter:e=>{let{data:n}=e;return lCn(n)}},r),_it({headerName:"Departments",cellRenderer:"searchable",field:"departments",resizable:!0,valueFormatter:i},r),_it({headerName:"Activity / Process",cellRenderer:"searchable",field:"activity",valueFormatter:i},r),_it({headerName:"Environmental Aspect(s)",cellRenderer:"searchable",field:"aspects",valueFormatter:i},r),_it({headerName:"Potential Environmental Impact(s)",cellRenderer:"searchable",field:"impacts",valueFormatter:i},r),_it({headerName:"Legislation Reference(s)",field:"legislations",cellRenderer:"legislationReference",valueFormatter:e=>{let{value:n}=e;return null==n?void 0:n.map(e=>e.title).join(", ")}},r),{headerName:"Likelihood (no control)",cellRenderer:"searchable",field:"likelihoodNoControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Severity (no control)",cellRenderer:"searchable",field:"severityNoControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Significance (no control)",field:"significanceNoControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},_it({headerName:"Potential Emergency Condition(s)",cellRenderer:"searchable",field:"emergencyConditions",valueFormatter:i},r),_it({headerName:"Relevant Control Measure(s)",cellRenderer:"searchable",field:"controlMeasures",valueFormatter:i},r),{headerName:"Likelihood (with control)",cellRenderer:"searchable",field:"likelihoodControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Severity (with control)",cellRenderer:"searchable",field:"severityControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Significance (with control)",field:"significanceControl",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Review Date",field:"reviewDate",valueGetter:e=>e.data.reviewDate&&Ht(e.data.reviewDate)||"",cellStyle:{textAlign:"center"},width:140,filter:"agDateColumnFilter",filterParams:{filterOptions:["equals","greaterThan","lessThan","notEqual","inRange",{displayKey:"emptyValue",displayName:"Empty",filter:(e,n)=>!n}]}},{headerName:"Created Date",field:"createdDate",valueGetter:e=>e.data.createdDate&&Ht(e.data.createdDate)||"",cellStyle:{textAlign:"center"},width:140,filter:"agDateColumnFilter",filterParams:{filterOptions:["equals","greaterThan","lessThan","notEqual","inRange"]}},_it({headerName:"Owner",cellRenderer:"searchable",field:"owner.name",cellStyle:{textAlign:"center"}},r),_it({headerName:"Author",cellRenderer:"searchable",field:"author.name",cellStyle:{textAlign:"center"}},r),_it({headerName:"Status",cellRenderer:"searchable",field:"status",valueFormatter:i,cellStyle:e=>{var t;const a=null==e||null===(t=e.value)||void 0===t?void 0:t.name;return TCn(a,n)}},r),{headerName:"Active Tasks",cellRenderer:"searchable",field:"activeTasks",cellStyle:{textAlign:"center"},filter:"agNumberColumnFilter"},{headerName:"Actions",cellRenderer:"actions",sortable:!1,filter:!1,resizable:!1,maxWidth:200}],[t])}(),n=function(){const{showNotification:e}=vt(),n=rt(),t=Mrt();return(0,g.useMemo)(()=>({async getRows(a){let{request:r,success:i,fail:o}=a;const{startRow:l=0,endRow:s=25,sortModel:c,filterModel:d}=r;try{const{rows:e,totalRows:a}=await t({accountId:n,offset:l,limit:s-l,sort:vCn(c),filters:pCn(d,MCn()||FCn())});i({rowData:e,rowCount:a})}catch(n){e("Failed to update grid: ".concat(n),"danger"),de.Cp(n),o()}}}),[n])}(),t=function(){const e=(0,m.Zp)();return n=>{let{colDef:t,data:a}=n;!["actions","legislationReference"].includes(t.cellRenderer)&&a&&e("/governance/environmental-aspects/".concat(a.id))}}();return(0,g.useMemo)(()=>({columnDefs:e,serverSideDatasource:n,rowModelType:"serverSide",pagination:!0,paginationPageSize:25,paginationPageSizeSelector:[25,50,100],components:Iit,onCellClicked:t}),[e,n])}();return(0,Ze.jsx)(f.Page,{title:{content:(0,Ze.jsx)(Dit,{gridRef:n}),crumbs:Bit,actionButton:(0,Ze.jsx)(Nit,{gridRef:n})},children:(0,Ze.jsx)(f.AgGrid,{ref:n,gridKey:t,gridOptions:a})})}const Mit=["width","title"];function Vit(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function zit(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Vit(Object(t),!0).forEach(function(n){Git(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Vit(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Git(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const $it=(0,f.styled)(f.Button)(e=>{let{width:n}=e;return{width:n}});function Wit(e){let{width:n,title:t}=e,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,Mit);return(0,Ze.jsx)($it,zit(zit({},a),{},{width:n||150,variant:"contained",children:t}))}function qit(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Jit(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qit(Object(t),!0).forEach(function(n){Yit(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qit(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Yit(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Hit(e){let{onComplete:n,aspect:t}=e;const[a,r]=(0,g.useState)(!1),{handleSubmit:i,control:o,formState:{isDirty:l}}=(0,Rw.mN)({defaultValues:{evidence:null}}),s=rt(),c=dit({intent:"edit"}),{showNotification:d}=vt(),u=!a&&l;return(0,Ze.jsx)(f.Modal,{open:!0,title:"Add Evidence",onClose:()=>n(),children:(0,Ze.jsx)("form",{onSubmit:i(async e=>{let{evidence:a}=e;try{r(!0),await c(Jit(Jit({},Vrt(s,t)),{},{evidence:a})),d("Evidence successfully added."),n()}catch(e){de.Cp(e),d("Something went wrong, please try again or contact support.","danger")}finally{r(!1)}}),children:(0,Ze.jsxs)(f.Grid,{container:!0,spacing:3,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"evidence",control:o,rules:{validate:bit},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(git,Jit(Jit({},n),{},{error:null==t?void 0:t.message}))}})}),(0,Ze.jsxs)(f.Grid,{size:12,container:!0,spacing:2,mt:3,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,onClick:()=>n(),children:"Cancel"})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,variant:"contained",color:"primary",type:"submit",disabled:!u,loading:a,children:"Save"})})]})]})})})}function Kit(e){let{disabled:n,aspect:t}=e;const{canCreateAspect:a}=Hrt(),[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)(!1),[s,c]=(0,g.useState)(!1),{canCreateTask:d}=Tit(),u=[{title:"Edit aspect",trigger:()=>i(!0)}];return d&&u.push({title:"Create task",trigger:()=>c(!0)}),u.push({title:"Add evidence",trigger:()=>l(!0)}),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Irt,{children:a&&(0,Ze.jsx)(Ze.Fragment,{children:u.map(e=>{let{title:a,trigger:r}=e;return(0,Ze.jsx)(Wit,{title:a,onClick:r,disabled:n||!t},a)})})}),r&&(0,Ze.jsx)(Sit,{intent:"edit",aspect:t,onComplete:()=>i(!1)}),o&&(0,Ze.jsx)(Hit,{onComplete:()=>l(!1),aspect:t}),s&&(0,Ze.jsx)(hit,{onComplete:()=>c(!1),aspect:t})]})}const Qit=e=>""===e||null==e,Zit=(e,n)=>Qit(e)?"-":n?n(e):e.toString(),Xit=(e,n)=>{if(Qit(e)||0===e.length)return"-";const t=[];for(const a of e){if(Qit(a))continue;const e=n(a);Qit(e)||t.push(e)}return 0===t.length?"-":t.join(", ")},eot=e=>{const n=Xo(e||[]);return 0===n.length?"":n.map(e=>{let{id:n,title:t}=e;return(0,Ze.jsx)(Urt,{to:"/governance/legislation/".concat(n),children:t},n)})};function not(e){var n,t,a,r;let{aspect:i}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Status:"}),(0,Ze.jsx)(Brt,{children:Zit(null===(n=i.status)||void 0===n?void 0:n.name)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Review Date:"}),(0,Ze.jsx)(Brt,{children:Zit(i.reviewDate,Ht)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Scope:"}),(0,Ze.jsx)(Brt,{children:oCn(i.scope)})]}),i.scope===Vt.HG.Location&&(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Location:"}),(0,Ze.jsx)(Brt,{children:lCn(i)})]}),i.scope===Vt.HG.Tag&&(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Tags:"}),(0,Ze.jsx)(Brt,{children:sCn(i)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Departments:"}),(0,Ze.jsx)(Brt,{children:dCn(i.departments)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Activity / Process:"}),(0,Ze.jsx)(Brt,{children:Zit(null===(t=i.activity)||void 0===t?void 0:t.name)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Environmental Aspect(s):"}),(0,Ze.jsx)(Brt,{children:dCn(i.aspects)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Potential Environmental Impact(s):"}),(0,Ze.jsx)(Brt,{children:dCn(i.impacts)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Legislation Reference(s):"}),(0,Ze.jsx)(Brt,{children:eot(i.legislations)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Relevant Control Measure(s):"}),(0,Ze.jsx)(Brt,{children:dCn(i.controlMeasures)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Potential Emergency Condition(s):"}),(0,Ze.jsx)(Brt,{children:dCn(i.emergencyConditions)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Likelihood (no control):"}),(0,Ze.jsx)(Brt,{children:Zit(i.likelihoodNoControl)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Likelihood (with control):"}),(0,Ze.jsx)(Brt,{children:Zit(i.likelihoodControl)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Severity (no control):"}),(0,Ze.jsx)(Brt,{children:Zit(i.severityNoControl)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Severity (with control):"}),(0,Ze.jsx)(Brt,{children:Zit(i.severityControl)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Significance (no control):"}),(0,Ze.jsx)(Brt,{children:Zit(i.significanceNoControl)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Significance (with control):"}),(0,Ze.jsx)(Brt,{children:Zit(i.significanceControl)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Aspect Owner:"}),(0,Ze.jsx)(Brt,{children:Zit(null===(a=i.owner)||void 0===a?void 0:a.name)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Aspect Creator:"}),(0,Ze.jsx)(Brt,{children:Zit(i.author.name)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Edited by:"}),(0,Ze.jsx)(Brt,{children:Zit(null===(r=i.editor)||void 0===r?void 0:r.name)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Date Created:"}),(0,Ze.jsx)(Brt,{children:Zit(i.createdDate,Ht)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Date last edited:"}),(0,Ze.jsx)(Brt,{children:Zit(i.editedDate,Ht)})]})]})}const tot=(0,f.styled)(f.Text)({margin:"35px 0 15px 0"});function aot(e){let{children:n}=e;return(0,Ze.jsx)(tot,{typescale:"headline",size:"small",children:n})}const rot=(e,n)=>({HIGH:{icon:f.Icons.Warning,fill:n.ref.palette.error[70]},MEDIUM:{icon:f.Icons.Error,fill:Gw()(n,"customColors.warning.color")},LOW:{icon:f.Icons.Error,fill:n.ref.palette.secondary[50]},COMPLETED:{icon:f.Icons.Done,fill:Gw()(n,"extendedColors.environmental.color")},INCOMPLETED:{icon:f.Icons.Close,fill:n.ref.palette.error[70]},OVERDUE:{icon:f.Icons.Error,fill:Gw()(n,"customColors.warning.color")}}[e]||{});var iot;const oot=(0,f.styled)("div")(iot||(iot=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n\n  path {\n    fill: ",";\n  }\n"])),e=>e.fill);var lot,sot,cot;function dot(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const uot=(0,f.styled)("div")(lot||(lot=dot(["\n  position: absolute;\n  background-color: ",";\n  border: 2px solid ",";\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 44px;\n  width: 44px;\n  border-radius: 50%;\n  left: ","px;\n"])),e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>20*e.idx),pot=(0,f.styled)("img")(sot||(sot=dot(["\n  position: absolute;\n  border: 2px solid ",";\n  object-fit: contain;\n  height: 44px;\n  width: 44px;\n  border-radius: 50%;\n  z-index: 2;\n  left: ","px;\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>20*e.idx),mot=(0,f.styled)("div")(cot||(cot=dot(["\n  position: relative;\n  height: 46px;\n  padding: 0;\n"]))),fot=e=>{const{data:{owners:n=[]}={}}=e,t=n.slice().reverse().map((e,n)=>e.profilePicture?(0,Ze.jsx)(pot,{idx:n,src:e.profilePicture},e.profilePicture+e.first_name):(0,Ze.jsx)(uot,{idx:n,children:(0,Ze.jsx)(f.Text,{typescale:"headline",size:"small",children:e.first_name.charAt(0).toUpperCase()})}));return(0,Ze.jsx)(Ze.Fragment,{children:n.length?(0,Ze.jsx)(mot,{children:t}):(0,Ze.jsxs)(f.Text,{typescale:"body",size:"medium",children:[(0,Ze.jsx)(Je.A,{id:"pages.task.grid.column.emptyOwners"}),","]})})};var yot,got;function bot(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hot=(0,f.styled)("div")(yot||(yot=bot(["\n  background-color: ",";\n  border: 2px solid ",";\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 44px;\n  width: 44px;\n  border-radius: 50%;\n"])),e=>{let{theme:n}=e;return n.sys.color.surface},e=>{let{theme:n}=e;return n.sys.color.outlineVariant}),vot=(0,f.styled)("img")(got||(got=bot(["\n  border: 2px solid ",";\n  object-fit: contain;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 44px;\n  width: 44px;\n  border-radius: 50%;\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant});var xot;const Tot=(0,f.styled)("div")(xot||(xot=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  align-items: center;\n\n  path {\n    fill: ",";\n  }\n"])),e=>e.fill),Oot=e=>{const n=(0,f.useTheme)(),{data:{priority:t}}=e,{icon:a,fill:r}=rot(t,n);return(0,Ze.jsx)(Tot,{fill:r,children:(0,Ze.jsx)(a,{})})},kot=e=>{const{data:n}=e;return(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:ADe()(n.category)})},jot=e=>{const{data:{description:n}}=e;return n&&(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:n})};function Cot(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Sot(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Cot(Object(t),!0).forEach(function(n){Not(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Cot(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Not(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const wot={lineHeight:"21px",wordBreak:"inherit",display:"inline-block",alignItems:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},Dot={pagination:!0,paginationPageSize:25,paginationPageSizeSelector:[10,25,50,100],cacheBlockSize:25,suppressNoRowsOverlay:!0,defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0},cellStyle:{height:"auto"}},rowStyle:{width:"100%",display:"flex",alignItems:"center"}},Aot=[{colId:"dueDate",sort:"asc",sortIndex:0},{colId:"name",sort:"asc",sortIndex:1}],Rot=[{offValue:"Show My Tasks",onValue:"Show All Tasks"}],Pot=["columnDefs"];var Lot;function Iot(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Eot(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Iot(Object(t),!0).forEach(function(n){_ot(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Iot(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _ot(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Fot=(0,f.styled)(f.AgGrid)(Lot||(Lot=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: ","; // header + page title height\n  padding-bottom: 2px; // border bottom and shadow to show properly\n\n  .ag-sort-indicator-icon {\n    display: flex;\n    align-items: center;\n  }\n"])),e=>{let{height:n}=e;return n||"calc(100vh - 268px)"}),Bot={status:e=>{let{data:n}=e;const t=(0,f.useTheme)(),{isCompleted:a,dueDate:r}=n,i=a?"COMPLETED":new Date(r)>new Date?"INCOMPLETED":"OVERDUE",{icon:o,fill:l}=rot(i,t);return(0,Ze.jsx)(oot,{fill:l,children:(0,Ze.jsx)(o,{})})},priority:Oot,description:jot,category:kot,owners:fot,creator:e=>{const{data:{author:n}}=e;return n.profilePicture?(0,Ze.jsx)(vot,{src:n.profilePicture},n.profilePicture+n.first_name):(0,Ze.jsx)(hot,{children:(0,Ze.jsx)(f.Text,{typescale:"headline",size:"small",children:n.first_name.charAt(0).toUpperCase()})})},dueDate:e=>{const{data:{dueDate:n}}=e,t=Ht(n);return n&&(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:t})},completedAt:e=>{const{data:{completedAt:n}}=e,t=Ht(n);return n&&(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:t})}},Uot=e=>{const n=(0,m.Zp)(),{formatMessage:t}=(0,eg.A)(),{tasks:a,onGridReady:r,accountId:i,agGridRef:o,height:l}=e,s=(e=>({rowHeight:56,getRowId:ba("id"),columnDefs:[{headerName:"Priority",field:"priority",cellRenderer:"priority",minWidth:100,cellStyle:{verticalAlign:"middle"},filterParams:Sot(Sot({},{buttons:["reset","apply"],closeOnApply:!0}),{},{valueFormatter:aun})},{headerName:"Status",field:"status",cellRenderer:"status",valueGetter:e=>{let{data:n}=e;return run(n)},minWidth:50,cellStyle:{verticalAlign:"middle"},filterParams:Sot({},{buttons:["reset","apply"],closeOnApply:!0})},{headerName:e({id:"pages.task.grid.header.task"}),field:"name",filterParams:Sot({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:90,cellStyle:wot},{headerName:"Description",field:"description",sortable:!1,filter:!1,cellStyle:{}},{headerName:"Scope",field:"scope",filterParams:Sot({},{buttons:["reset","apply"],closeOnApply:!0}),valueFormatter:e=>{let{data:n}=e;return tun(n)},minWidth:130,cellStyle:wot},{headerName:e({id:"pages.task.grid.header.category"}),field:"category",cellRenderer:"category",filterParams:Sot({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:150},{headerName:e({id:"pages.task.grid.header.subject"}),field:"subject",valueGetter:e=>{let{data:n}=e;return ADe()(n.subject)},filterParams:Sot({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:110,cellStyle:wot},{headerName:e({id:"pages.task.grid.header.item"}),field:"subjectItem",valueGetter:e=>{let{data:n}=e;return eun(n)},filterParams:Sot({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120,cellStyle:wot},{headerName:e({id:"pages.task.grid.header.owners"}),field:"owners",cellRenderer:"owners",valueGetter:e=>{let{data:{owners:n=[]}}=e;return n.map(e=>{let{first_name:n,last_name:t}=e;return"".concat(n," ").concat(t)})},filterParams:Sot({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:90},{headerName:e({id:"pages.task.grid.header.creator"}),field:"author",cellRenderer:"creator",valueGetter:e=>{let{data:{author:n}}=e;return"".concat(n.first_name," ").concat(n.last_name)},filterParams:Sot({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:e({id:"pages.task.grid.header.date"}),field:"dueDate",cellRenderer:"dueDate",filter:"agDateColumnFilter",sort:"asc",filterParams:Sot(Sot({},{buttons:["reset","apply"],closeOnApply:!0}),{},{comparator:Aa}),minWidth:120},{headerName:e({id:"pages.task.grid.header.completedDate"}),field:"completedAt",cellRenderer:"completedAt",filter:"agDateColumnFilter",sort:"asc",filterParams:Sot(Sot({},{buttons:["reset","apply"],closeOnApply:!0}),{},{comparator:Aa}),minWidth:120},{headerName:e({id:"pages.task.grid.header.project"}),field:"project",valueGetter:e=>{let{data:{projectId:n}}=e;return(null==n?void 0:n.name)||""},filterParams:Sot({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:90,cellStyle:wot}]}))(t),{columnDefs:c}=s,d=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(s,Pot),u=Eot(Eot(Eot({},Dot),d),{},{columnDefs:null==c?void 0:c.map(e=>Eot(Eot({},e),{},{headerName:e.headerName?Gi(e.headerName):e.headerName})),components:Bot,onGridReady:r,onRowClicked:e=>{n("/tasks/".concat(e.data.id))},rowData:a});return(0,Ze.jsx)(Fot,{ref:o,height:l,gridKey:"".concat(i,"_tasksGrid"),gridOptions:u},i)};function Mot(e){let{aspectId:n}=e;const t=function(e){const n=rt(),{token:t}=at(),{data:a}=(0,h.IT)(ENn(),{variables:{accountId:n,userId:t.sub}});return(0,g.useMemo)(()=>((null==a?void 0:a.getTasksByAccountId)||[]).filter(n=>{var t;return(null===(t=n.item)||void 0===t?void 0:t.id)===e}),[a,e])}(n),a=rt(),r=(0,g.useRef)(null);return(0,Ze.jsx)(Uot,{tasks:t,accountId:a,agGridRef:r,height:"inherit"})}var Vot=t(22293);const zot=(0,f.styled)("div")({display:"flex",gap:16,flexWrap:"wrap"}),Got=(0,f.styled)(p.Link)(e=>{let{theme:n}=e;return{borderRadius:16,border:"1px solid ".concat(n.sys.color.surfaceVariant),padding:20,display:"flex",gap:3,"&:hover":{backgroundColor:n.sys.color.secondaryContainer}}});function $ot(e){let{documents:n}=e;return(0,Ze.jsx)(zot,{children:n.map(e=>{let{id:n,fileName:t}=e;return(0,Ze.jsxs)(Got,{to:"/documents/all/".concat(n),children:[(0,Ze.jsx)(Vot.A,{fontSize:"small"})," ",(0,Ze.jsx)(f.Text,{typescale:"title",size:"small",children:t})]},n)})})}const Wot=(0,f.styled)("div")(e=>{let{theme:n}=e;return{borderTop:"1px solid ".concat(n.sys.color.surfaceVariant),padding:"20px 10px"}}),qot=(0,f.styled)(f.Text)({marginBottom:20});function Jot(e){let{item:n}=e;const{notes:t,documents:a}=n;return(0,Ze.jsxs)(Wot,{children:[(0,Ze.jsx)(qot,{typescale:"body",size:"large",children:t}),(0,Ze.jsx)($ot,{documents:Xo(a||[])})]})}function Yot(e){let{aspect:n}=e;const{evidenceNotes:t}=n;return(0,Ze.jsxs)("div",{children:[t.map(e=>(0,Ze.jsx)(Jot,{item:e},e.id)),0===t.length&&(0,Ze.jsx)("p",{children:"There is no evidence currently associated with this aspect."})]})}const Hot=[{label:"Governance",to:"/governance"},{label:"Aspects & Impacts Register",to:"/governance/environmental-aspects"}];function Kot(){const{id:e}=(0,m.g)(),{data:n,loading:t}=function(e){const n=rt(),{data:t,loading:a}=(0,h.IT)(Rs,{variables:{accountId:n,id:e},skip:!e});return{data:(null==t?void 0:t.getAspectById)||void 0,loading:a}}(e);return(0,Ze.jsx)(f.Page,{loading:t,title:{content:"Aspect",crumbs:Hot,actionButton:(0,Ze.jsx)(Kit,{disabled:t,aspect:n})},children:(0,Ze.jsxs)(Ert,{children:[n&&(0,Ze.jsx)(not,{aspect:n}),(0,Ze.jsx)(aot,{children:"Tasks"}),e&&(0,Ze.jsx)(Mot,{aspectId:e}),(0,Ze.jsx)(aot,{children:"Evidence"}),n&&(0,Ze.jsx)(Yot,{aspect:n})]})})}const Qot={[Vt.mh.High]:{label:"High",color:"error"},[Vt.mh.Medium]:{label:"Medium",color:"warning"},[Vt.mh.NoteWorthy]:{label:"Note-worthy",color:"success"}},Zot=Object.entries(Qot).map(e=>{let[n,{label:t}]=e;return{value:n,label:t}});var Xot=t(24381),elt=t(66250),nlt=t(66196),tlt=t(46805),alt=t(19634);function rlt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ilt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rlt(Object(t),!0).forEach(function(n){olt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rlt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function olt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const llt={[Vt.PG.Notapplicable]:{label:"Not Applicable",icon:e=>(0,Ze.jsx)(alt.A,ilt(ilt({},e),{},{color:"disabled"}))},[Vt.PG.Indirectlyapplicable]:{label:"Indirectly Applicable",icon:e=>(0,Ze.jsx)(tlt.A,ilt(ilt({},e),{},{color:"warning"}))},[Vt.PG.Noncompliant]:{label:"Non Compliant",icon:e=>(0,Ze.jsx)(elt.A,ilt(ilt({},e),{},{color:"error"}))},[Vt.PG.Compliancerisk]:{label:"Compliance Risk",icon:e=>(0,Ze.jsx)(Xot.A,ilt(ilt({},e),{},{color:"warning"}))},[Vt.PG.Compliant]:{label:"Compliant",icon:e=>(0,Ze.jsx)(nlt.A,ilt(ilt({},e),{},{color:"success"}))}},slt=Object.entries(llt).map(e=>{let[n,{label:t}]=e;return{value:n,label:t}}),clt=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e?Qot[e].label:n},dlt=e=>{let{value:n}=e;return n?llt[n].label:"TBD"},ult=e=>{let{value:n}=e;return n?"Yes":"No"};var plt=t(33004);const mlt=(0,f.styled)(plt.A)({display:"block"});function flt(){return(0,Ze.jsx)(mlt,{color:"error",titleAccess:"Rio has detected a change to this legislation."})}var ylt;const glt=(0,f.styled)("div")(ylt||(ylt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 22px;\n  width: 32px;\n  border-radius: 5px;\n  border: 1px solid ",";\n  background: url(",") center center no-repeat;\n  background-size: cover;\n  overflow: hidden;\n  display: inline-block;\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{flag:n}=e;return i[n]});function blt(e){let{value:n}=e;return(0,Ze.jsx)(glt,{name:"LegislationTile__Flag",flag:n,alt:n,title:n})}const hlt=(0,f.styled)("div")({display:"flex",gap:8}),vlt=(0,f.styled)("div")({display:"flex",gap:2,alignItems:"center"}),xlt=(0,f.styled)("span")(e=>{let{theme:n,color:t}=e;return{fontWeight:"bold",color:n.palette[t].main}}),Tlt={listCountries:function(e){let{data:n}=e;return(0,Ze.jsx)(hlt,{children:null==n?void 0:n.countries.map(e=>(0,Ze.jsx)(blt,{value:e},e))})},activeFlag:function(e){let{value:n}=e;return n&&(0,Ze.jsx)(flt,{})},legislationStatus:function(e){let{value:n}=e;if(!n)return"TBD";if(!llt[n])return n;const{icon:t,label:a}=llt[n];return(0,Ze.jsxs)(vlt,{children:[t({fontSize:"small",sx:{display:"block"}})," ",a]})},legislationPriority:function(e){let{value:n}=e;if(!n)return"-";const{label:t,color:a}=Qot[n];return(0,Ze.jsx)(xlt,{color:a,children:t})}};const Olt=(0,f.styled)(f.Select)({width:"auto",minWidth:200});function klt(e){let{onChange:n,options:t,value:a}=e;return(0,Ze.jsx)(Olt,{disableSorting:!0,value:a||"",onChange:e=>{let{value:t}=e;return n(t)},options:t,placeholder:"Tag"})}function jlt(e){let{gridApi:n,loading:t}=e;const[a,r]=(0,g.useState)(!1);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(STe,{disabled:t,onClick:()=>r(!0),variant:"outlined",icon:(0,Ze.jsx)(f.CustomIcons.Download,{}),hint:"Export"}),(0,Ze.jsx)(UP,{show:a,onDismiss:()=>r(!1),defaultFileName:"legislation",onSubmit:e=>null==n?void 0:n.exportDataAsCsv({fileName:e})})]})}function Clt(e){let{skip:n}=e;const t=rt(),{data:a,loading:r}=(0,h.IT)(wf,{variables:{accountId:t},notifyOnNetworkStatusChange:!0,skip:n}),i=(null==a?void 0:a.getTagsByAccountId)||[];return[(0,g.useMemo)(()=>{const e=[];for(const n of i)null!=n&&n.legislationTag&&e.push({value:n.id,label:n.tagName});return e.sort((e,n)=>e.label.localeCompare(n.label)),e},[i]),r]}function Slt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Nlt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Slt(Object(t),!0).forEach(function(n){wlt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Slt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function wlt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Dlt=[{label:"Governance",to:"/governance"},{label:"Legislation"}];function Alt(e){let{accessControls:n}=e;const t=rt(),a=(0,g.useRef)(null),{tagLevelLegislation:r}=n,{filtersApplied:i,resetGridState:o,gridApi:l}=a.current||{},s="".concat(t,"_Governance_Legislation"),[c,d]=(0,g.useState)(),[u,p]=Clt({skip:!r});(0,g.useEffect)(()=>{var e;d(null===(e=u[0])||void 0===e?void 0:e.value)},[u]);const[y,b]=function(e){let{tagId:n,skip:t}=e;const a=rt(),r=Pu(),{data:i,loading:o}=(0,h.IT)(_ln,{variables:{accountId:a,tagId:n},fetchPolicy:n?"no-cache":"cache-first",notifyOnNetworkStatusChange:!0,skip:t}),l=null==r?void 0:r.departments;return[(0,g.useMemo)(()=>((null==i?void 0:i.getAllLegislation)||[]).map(e=>Nlt(Nlt({},e),{},{departments:ju(l||[],e.departmentIds)})),[i,l]),o]}({tagId:c,skip:p||r&&!c}),v=function(e){let{data:n,tagLevelLegislation:t,tagId:a}=e;const r=function(e){let{tagLevelLegislation:n}=e;return(0,g.useMemo)(()=>[{headerName:"Title",field:"title",minWidth:500,filter:"agTextColumnFilter"},{headerName:"Review Date",field:"reviewDate",valueFormatter:e=>{let{value:n}=e;return Ht(n)},filter:"agDateColumnFilter",filterParams:{comparator:Aa}},{headerName:"Compliance Status",field:"status",cellRenderer:"legislationStatus",minWidth:220,valueFormatter:dlt,filterParams:{cellRenderer:"legislationStatus"}},{headerName:"Priority",field:"priority",cellRenderer:"legislationPriority",valueFormatter:e=>{let{value:n}=e;return clt(n)},filterParams:{valueFormatter:e=>{let{value:n}=e;return clt(n,"(Blanks)")}}},{headerName:"Flagged",valueGetter:e=>{let{data:n}=e;return Pln(n.lastFlaggedForReview,n.lastClearedReviewFlag)},valueFormatter:ult,filterParams:{valueFormatter:ult},cellRenderer:"activeFlag"},{headerName:"Countries",field:"countries",cellRenderer:"listCountries",minWidth:250},...n?[]:[{headerName:"Scope (Tags)",field:"tags",valueGetter:e=>{var n;let{data:t}=e;return null===(n=t.tags)||void 0===n?void 0:n.map(e=>e.tagName)}}],{headerName:"Scope (Location)",field:"locations",valueGetter:e=>{var n;let{data:t}=e;return null===(n=t.locations)||void 0===n?void 0:n.map(e=>e.name)}},{headerName:"Scope (Departments)",field:"departments",valueGetter:e=>{var n;let{data:t}=e;return null===(n=t.departments)||void 0===n?void 0:n.map(e=>{let{label:n}=e;return n})}},{headerName:"Scope (Regions)",field:"regions",valueGetter:e=>{var n;let{data:t}=e;return null===(n=t.regions)||void 0===n?void 0:n.map(e=>{let{name:n}=e;return n})}}],[n])}({tagLevelLegislation:t}),[i,o]=(0,g.useState)(!1),l=(0,m.Zp)();return(0,g.useEffect)(()=>{i&&o(!1)},[i]),(0,g.useMemo)(()=>({columnDefs:r,rowData:n,components:Tlt,pagination:!0,onFilterChanged:()=>o(!0),paginationPageSize:25,paginationPageSizeSelector:[25,50,100],suppressNoRowsOverlay:!0,onRowClicked:e=>{let{data:n}=e;return l("./".concat(n.id).concat(a?"/".concat(a):""))},defaultColDef:{sortable:!0,resizable:!0,filter:!0,wrapText:!0,autoHeight:!0,cellStyle:{alignItems:"center",display:"flex"}}}),[r,n,a])}({data:y,tagLevelLegislation:r,tagId:c}),x=p||b;return(0,Ze.jsx)(f.Page,{loading:x,title:{content:(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.PageTitleHeader,{children:"Legislation"}),r&&(0,Ze.jsx)(klt,{value:c,onChange:d,options:u})]}),crumbs:Dlt,actionButton:(0,Ze.jsxs)(Irt,{children:[(0,Ze.jsx)(N$,{filtersApplied:i,resetGridState:o}),(0,Ze.jsx)(jlt,{gridApi:l,loading:x})]})},children:(0,Ze.jsx)(f.AgGrid,{ref:a,gridKey:s,gridOptions:v})})}function Rlt(){const e=Pu(),n=null==e?void 0:e.departments;return(0,g.useMemo)(()=>{const e=new Map;return null==n||n.forEach(n=>{n&&e.set(n.id,n)}),e},[n])}var Plt;const Llt=(0,D.J1)(Plt||(Plt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  query GetLocationMetaOptions($accountId: ID!) {\n    getLocationMetadataOptionsForAccount(accountId: $accountId) {\n      regions {\n        id\n        name\n      }\n    }\n  }\n"])));function Ilt(e){let{error:n,value:t,disabled:a,onChange:r,label:i}=e;const[o,l]=function(){const e=rt(),{data:n,loading:t}=(0,h.IT)(Llt,{variables:{accountId:e}});return[(0,g.useMemo)(()=>Zo(null==n?void 0:n.getLocationMetadataOptionsForAccount.regions,xi),[n]),t]}();return(0,Ze.jsx)(f.AutoComplete,{isMulti:!0,label:i||"Region(s)",options:o,onChange:r,isLoading:l,error:n,value:t,disabled:a,placeholder:"Start typing to search for a location"})}const Elt=(0,f.styled)("div")(e=>{let{theme:n}=e;return{display:"block",height:245,"& div.wrapper-class":{width:"100%","& div.editor-class":{height:"auto",minHeight:200,maxHeight:200,padding:"0 10px",fontFamily:n.sys.typescale.body.medium.family},"& div.toolbar-class":{fontFamily:n.sys.typescale.body.medium.family}}}}),_lt=(0,f.styled)(f.Text)({marginBottom:7});function Flt(e){let{value:n,onChange:t}=e;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(_lt,{typescale:"label",size:"large",children:"Applicability"}),(0,Ze.jsx)(Elt,{children:(0,Ze.jsx)(ze.j4,{onMarkdownChange:e=>t(gL(e)),sourceContent:n})})]})}const Blt=["id","tagId"];function Ult(){const e=By("governance");return{get canEditLegislationScopeData(){return e("attachContentToLegislation")},get canEditLegislationGeneralData(){return e("editLegislation")},get canAttachDocumentsToLegislation(){return e("attachDocumentToLegislation")}}}function Mlt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Vlt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Mlt(Object(t),!0).forEach(function(n){zlt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Mlt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zlt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Glt(e){let{onComplete:n,legislation:t,tagId:a}=e;const r=rt(),i=Rlt(),[o,l]=(0,g.useState)(!1),s=function(){const[e]=(0,Ot.n)(hdn),n=rt(),t=jy();return async a=>{let{id:r,tagId:i}=a,o=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(a,Blt);await e({variables:{accountId:n,id:r,tagId:i,linkId:r,content:o}}),t([{fieldName:"getLegislationById",args:{accountId:n,id:r,tagId:i}}])}}(),{showNotification:c}=vt(),{handleSubmit:d,control:u,formState:{isDirty:p}}=(0,Rw.mN)({defaultValues:{status:t.status||"",priority:t.priority||"",reviewDate:t.reviewDate||"",locations:Zo(t.locations,xi),tags:Zo(t.tags,e=>{let{id:n,tagName:t}=e;return{value:n,label:t}}),departments:Zo(t.departmentIds,(m=i,e=>{const n=m.get(e);return n?xi(n):null})),regions:Zo(t.regions,xi),applicability:t.applicability||"",notFlagged:!1}});var m;const{canEditLegislationScopeData:y,canEditLegislationGeneralData:b}=Ult(),h=!o&&p;return(0,Ze.jsx)(f.Modal,{open:!0,title:"Edit content",onClose:()=>n(),children:(0,Ze.jsx)("form",{onSubmit:d(async e=>{l(!0);try{await s({id:t.id,tagId:a,applicability:e.applicability,reviewDate:e.reviewDate?Kt(e.reviewDate):null,status:e.status||null,priority:e.priority||null,lastClearedReviewFlag:!e.notFlagged&&(r=e.reviewDate,i=t.reviewDate,(r=r||null)===(i=i||null)||null!==r&&null!==i&&Wt()(r).isSame(Wt()(i),"D"))?t.lastClearedReviewFlag:(new Date).toISOString(),regionIds:e.regions.map(e=>{let{value:n}=e;return n}),departmentIds:e.departments.map(e=>{let{value:n}=e;return n}),locationIds:e.locations.map(e=>{let{value:n}=e;return n}),tagIds:e.tags.map(e=>{let{value:n}=e;return n}),title:t.title}),c("Legislation content saved successfully."),n()}catch(e){de.Cp(e),c("Something went wrong, please try again or contact support.","danger")}finally{l(!1)}var r,i}),children:(0,Ze.jsxs)(f.Grid,{container:!0,spacing:3,children:[b&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"status",control:u,render:e=>{let{field:n}=e;return(0,Ze.jsx)(iit,Vlt(Vlt({},n),{},{label:"Status",options:slt,clearable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"priority",control:u,render:e=>{let{field:n}=e;return(0,Ze.jsx)(iit,Vlt(Vlt({},n),{},{label:"Priority",options:Zot,clearable:!0}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"reviewDate",control:u,rules:{validate:J3()},render:e=>{let{field:n,fieldState:{error:t}}=e;return(0,Ze.jsx)(f.DatePicker,Vlt(Vlt({},n),{},{timezone:"utc",label:"Review date",error:null==t?void 0:t.message}))}})}),Lln(t)&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"notFlagged",control:u,render:e=>{let{field:n}=e;return(0,Ze.jsx)(f.Checkbox,{onChange:(e,t)=>n.onChange(t),checked:n.value,label:"Clear flag"})}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"applicability",control:u,render:e=>{let{field:n}=e;return(0,Ze.jsx)(Flt,Vlt({},n))}})})]}),y&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"locations",control:u,render:e=>{let{field:n}=e;return(0,Ze.jsx)(C3,Vlt(Vlt({},n),{},{label:"Location(s)"}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"departments",control:u,render:e=>{let{field:n}=e;return(0,Ze.jsx)(tit,Vlt({},n))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"regions",control:u,render:e=>{let{field:n}=e;return(0,Ze.jsx)(Ilt,Vlt({},n))}})}),!a&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"tags",control:u,render:e=>{let{field:n}=e;return(0,Ze.jsx)(A3,Vlt(Vlt({},n),{},{label:"Tag(s)",accountId:r}))}})})]}),(0,Ze.jsxs)(f.Grid,{size:12,container:!0,spacing:2,mt:3,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,onClick:()=>n(),children:"Cancel"})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Button,{fullWidth:!0,variant:"contained",color:"primary",type:"submit",loading:o,disabled:!h,children:"Save"})})]})]})})})}function $lt(e){let{legislation:n,onComplete:t}=e;const a=rt();return(0,Ze.jsx)(lUe,{open:!0,accountId:a,onComplete:()=>{},onDismiss:()=>t(),defaultValues:{tagIds:Xo(n.tags||[]).map(e=>{let{id:n}=e;return n}),locationIds:Xo(n.locations||[]).map(e=>{let{id:n}=e;return n}),category:Vt.Ix.Governance,subject:Vt.AR.Legislation,itemId:n.id},disabled:{category:!0,subject:!0,locations:!0,tags:!0,[Vt.AR.Legislation]:!0}})}function Wlt(e){let{onComplete:n,legislation:t,tagId:a}=e;const r=function(){const e=rt(),n=jy(),[t]=(0,Ot.n)(vdn);return async a=>{let{legislationId:r,documentIds:i,tagId:o}=a;const l=[];if(await Promise.all(i.map(async n=>{try{await t({variables:{id:n,accountId:e,tagId:o,legislationId:r}})}catch(e){l.push(e)}})),n([{fieldName:"getLegislationById",args:{accountId:e,id:r,tagId:o}}]),l.length>0)throw l}}(),{showNotification:i}=vt();return(0,Ze.jsx)(b4,{predefinedValues:{library:Vt.zM.Governance,category:"Legislation",tags:a?[a]:[]},shouldParseIdFromFileName:!0,onDismiss:()=>n(),onTerminate:async(e,n)=>{n.length>0&&(n.forEach(e=>de.Cp(e)),i("Some documents couldn't be uploaded, please contact support.","danger"));try{e.length>0&&await r({legislationId:t.id,documentIds:e.map(e=>{let{id:n}=e;return n}),tagId:a})}catch(e){(Array.isArray(e)?e:[e]).forEach(e=>de.Cp(e)),i("Some documents couldn't be attached, please contact support.","danger")}}})}function qlt(e){let{disabled:n,legislation:t,tagId:a}=e;const[r,i]=(0,g.useState)(!1),[o,l]=(0,g.useState)(!1),[s,c]=(0,g.useState)(!1),{canCreateTask:d}=Tit(),{canAttachDocumentsToLegislation:u,canEditLegislationGeneralData:p,canEditLegislationScopeData:m}=Ult(),f=[];return(p||m)&&f.push({title:"Edit content",trigger:()=>i(!0)}),d&&f.push({title:"Create task",trigger:()=>l(!0)}),u&&f.push({title:"Upload documents",trigger:()=>c(!0)}),(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Irt,{children:f.map(e=>{let{title:a,trigger:r}=e;return(0,Ze.jsx)(Wit,{width:200,title:a,onClick:r,disabled:n||!t},a)})}),r&&(0,Ze.jsx)(Glt,{tagId:a,legislation:t,onComplete:()=>i(!1)}),o&&(0,Ze.jsx)($lt,{legislation:t,onComplete:()=>l(!1)}),s&&(0,Ze.jsx)(Wlt,{tagId:a,legislation:t,onComplete:()=>c(!1)})]})}const Jlt=(0,f.styled)(f.Text)({marginBottom:5}),Ylt=(0,f.styled)("div")({display:"flex",gap:8});function Hlt(e){let{legislation:n}=e;const{title:t,countries:a}=n;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Jlt,{typescale:"headline",size:"small",children:t}),(0,Ze.jsx)(Ylt,{children:a.map(e=>(0,Ze.jsx)(blt,{value:e},e))})]})}function Klt(e){let{tasks:n}=e;const t=(0,g.useRef)(null),a=rt();return(0,Ze.jsx)(Uot,{tasks:n,accountId:a,agGridRef:t,height:"inherit"})}const Qlt=(0,f.styled)("div")({display:"flex",gap:3,alignItems:"center"}),Zlt=(0,f.styled)("span")(e=>{let{theme:n,color:t}=e;return{color:n.palette[t].main}}),Xlt=e=>{const{icon:n,label:t}=llt[e];return(0,Ze.jsxs)(Qlt,{children:[n({})," ",t]})},est=e=>{const{color:n,label:t}=Qot[e];return(0,Ze.jsx)(Zlt,{color:n,children:t})},nst=e=>0===e.length?"-":e.map(e=>(0,Ze.jsx)(Urt,{to:e,children:e},e));function tst(e){let{legislation:n,tagLevelLegislation:t}=e;const{status:a,priority:r,synopsis:i,reviewDate:o,applicability:l,tags:s,regions:c,locations:d,departmentIds:u,links:p}=n,m=Rlt();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Status:"}),(0,Ze.jsx)(Brt,{children:Zit(a,Xlt)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Priority:"}),(0,Ze.jsx)(Brt,{children:Zit(r,est)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Review date:"}),(0,Ze.jsx)(Brt,{children:Zit(o,Ht)})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Flagged:"}),(0,Ze.jsx)(Brt,{children:Lln(n)?(0,Ze.jsx)(flt,{}):"-"})]}),(0,Ze.jsxs)(_rt,{type:"column",children:[(0,Ze.jsx)(Frt,{type:"column",children:"Synopsis:"}),(0,Ze.jsx)(Brt,{type:"column",children:(0,Ze.jsx)(ze.To,{source:i})})]}),(0,Ze.jsxs)(_rt,{type:"column",children:[(0,Ze.jsx)(Frt,{type:"column",children:"Applicability:"}),(0,Ze.jsx)(Brt,{type:"column",children:(0,Ze.jsx)(ze.To,{source:l})})]}),!t&&(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Tags:"}),(0,Ze.jsx)(Brt,{children:Xit(s,e=>{let{tagName:n}=e;return n})})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Locations:"}),(0,Ze.jsx)(Brt,{children:Xit(d,e=>{let{name:n}=e;return n})})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Departments:"}),(0,Ze.jsx)(Brt,{children:Xit(u,e=>{var n;return null===(n=m.get(e))||void 0===n?void 0:n.name})})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Regions:"}),(0,Ze.jsx)(Brt,{children:Xit(c,e=>{let{name:n}=e;return n})})]}),(0,Ze.jsxs)(_rt,{children:[(0,Ze.jsx)(Frt,{children:"Links:"}),(0,Ze.jsx)(Brt,{children:nst(p)})]})]})}const ast=[{label:"Governance",to:"/governance"},{label:"Legislation",to:"/governance/legislation"}],rst=(0,f.styled)("div")(e=>{let{theme:n}=e;return{marginBottom:25,padding:20,borderRadius:5,backgroundColor:n.palette.warning.light}});function ist(e){let{accessControls:n,isShouldUserUpgrade:t}=e;const{id:a,tagId:r}=(0,m.g)(),{tagLevelLegislation:i}=n,[o,l]=Clt({skip:!i}),[s,c]=function(e){let{id:n,tagId:t,tagLevelLegislation:a}=e;const r=rt(),{data:i,loading:o}=(0,h.IT)(bdn,{variables:{id:n,accountId:r,tagId:t},fetchPolicy:t?"network-only":"cache-first",notifyOnNetworkStatusChange:!0,skip:a&&!t||!n});return[null==i?void 0:i.getLegislationById,o]}({id:a,tagId:r,tagLevelLegislation:i}),d=(0,m.Zp)(),{tasks:u,documents:p}=s||{},y=c||l;return(0,Ze.jsxs)(f.Page,{loading:y,title:{content:(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.PageTitleHeader,{children:"Legislation Item"}),i&&(0,Ze.jsx)(klt,{value:r,onChange:e=>d("/governance/legislation/".concat(a,"/").concat(e)),options:o})]}),crumbs:ast,actionButton:(0,Ze.jsx)(qlt,{tagId:r,disabled:y,legislation:s})},children:[t&&(0,Ze.jsx)(rst,{children:(0,Ze.jsx)(Je.A,{id:"pages.governance.permissionsProblem"})}),s&&(0,Ze.jsx)(Hlt,{legislation:s}),(0,Ze.jsxs)(Ert,{children:[s&&(0,Ze.jsx)(tst,{legislation:s,tagLevelLegislation:i}),(0,Ze.jsx)(aot,{children:"Tasks"}),(0,Ze.jsx)(Klt,{tasks:u||[]}),(0,Ze.jsx)(aot,{children:"Attached Documents"}),null!=p&&p.length?(0,Ze.jsx)($ot,{documents:p}):(0,Ze.jsx)("p",{children:"There are no documents attached."})]})]})}var ost;const lst=(0,Ge.default)(ze.fv)(ost||(ost=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n  overflow-y: auto;\n"]))),sst=(e,n,t)=>null!=n&&n[t]?(0,Ze.jsx)(e,{}):(0,Ze.jsx)(m.C5,{to:"/governance"}),cst=()=>{const{data:{comply:e}}=Td(),{data:n}=Yp(),t=oc(),a=(null==n?void 0:n.role.role)===Vt.gG.Individual&&(null==n?void 0:n.account.type)===CI;return(0,Ze.jsx)(lst,{container:!0,item:!0,children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"",element:(0,Ze.jsx)(Art,{accessControls:e,isShouldUserUpgrade:a})}),(0,Ze.jsx)(m.qh,{path:t.governance.systems,element:sst(ofn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:t.governance.agreements,element:sst(ofn,e,"agreements")}),(0,Ze.jsx)(m.qh,{path:t.governance.frameworks,element:sst(ofn,e,"frameworks")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.systems,"/50f543aa-da72-4090-8f1f-0a1fbd218b0b/*"),element:sst(Qxn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.systems,"/:id/*"),element:sst(Evn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.agreements,"/:id/*"),element:sst(Evn,e,"agreements")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.frameworks,"/:id/*"),element:sst(Evn,e,"frameworks")}),(0,Ze.jsx)(m.qh,{path:t.governance.policies,element:sst(fkn,e,"policies")}),(0,Ze.jsx)(m.qh,{path:t.governance.targets,element:sst(tCn,e,"targets")}),(0,Ze.jsx)(m.qh,{path:t.governance.materiality,element:(0,Ze.jsx)(BDn,{materialities:UDn})}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.aspects,"-v1"),element:sst(RNn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:t.governance.aspects,element:sst(Uit,e,"systems")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.aspects,"-v1/:id"),element:sst(cwn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.aspects,"/:id"),element:sst(Kot,e,"systems")}),(0,Ze.jsx)(m.qh,{path:t.governance.health,element:sst(TDn,e,"systems")}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.legislation,"-v1"),element:(0,Ze.jsx)(xmn,{accessControls:e})}),(0,Ze.jsx)(m.qh,{path:t.governance.legislation,element:(0,Ze.jsx)(Alt,{accessControls:e})}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.legislation,"-v1/:id"),element:(0,Ze.jsx)(Lpn,{accessControls:e,isShouldUserUpgrade:a})}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.legislation,"-v1/:id/:tagId"),element:(0,Ze.jsx)(Lpn,{accessControls:e,isShouldUserUpgrade:a})}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.legislation,"/:id"),element:(0,Ze.jsx)(ist,{accessControls:e,isShouldUserUpgrade:a})}),(0,Ze.jsx)(m.qh,{path:"".concat(t.governance.legislation,"/:id/:tagId"),element:(0,Ze.jsx)(ist,{accessControls:e,isShouldUserUpgrade:a})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:t.governance.root})})]})})};var dst,ust;function pst(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(0,D.J1)(dst||(dst=pst(["\n  query GetHomePageLearnProgressData($userId: ID!, $continueLearningLimit: Int!) {\n    getLearnProgressLogByUserId(userId: $userId, limit: $continueLearningLimit, status: INPROGRESS) {\n      courseProgress\n      lastUpdatedAt\n      course {\n        id\n        name\n        metaData {\n          cpd\n          thumbnail\n          link\n        }\n      }\n    }\n  }\n"])));const mst=(0,D.J1)(ust||(ust=pst(["\n  query getHomePageEmissionData($accountId: ID!, $from: AWSDate!, $to: AWSDate!, $timeGranularity: TimeGranularity!) {\n    getTotalEmissions(accountId: $accountId, from: $from, to: $to)\n    getEmissionsPercentageBreakdownByScope(accountId: $accountId, from: $from, to: $to) {\n      series {\n        id\n        relativeValue\n        absoluteValue\n      }\n      drilldown {\n        id\n        parentId\n        relativeValue\n        absoluteValue\n      }\n    }\n    getEmissionsBySource(accountId: $accountId, timeGranularity: $timeGranularity, from: $from, to: $to) {\n      dimension\n      time\n      value\n    }\n    getEmissionsNetAndGross(accountId: $accountId, timeGranularity: $timeGranularity, from: $from, to: $to) {\n      dimension\n      time\n      value\n    }\n  }\n"])));var fst=t(98780);function yst(){const{token:e}=at(),n=rt();return Rt(tx,{variables:{accountId:n,pageNumber:1,userId:null==e?void 0:e.sub},skip:!e})}const gst=e=>{if(null==e||isNaN(e)||e<=0)return"Less than a minute";const n=525600,t=Math.floor(e/n),a=e%n,r=Math.floor(a/43800),i=a%43800,o=Math.floor(i/1440),l=i%1440,s=Math.floor(l/60),c=l%60,d=[];return t>0&&d.push("".concat(t," year").concat(t>1?"s":"")),r>0&&d.push("".concat(r," month").concat(r>1?"s":"")),o>0&&d.push("".concat(o," day").concat(o>1?"s":"")),s>0&&d.push("".concat(s," hour").concat(s>1?"s":"")),c>0&&d.push("".concat(c," minute").concat(c>1?"s":"")),d.join(" ")};var bst,hst,vst,xst,Tst=t(48809),Ost=t(86866);function kst(e){let{status:n}=e;return n===Vt.G1.Complete?(0,Ze.jsx)(Ost.A,{fontSize:"small",color:"primary",titleAccess:"Complete"}):n===Vt.G1.Inprogress?(0,Ze.jsx)(Tst.A,{fontSize:"small",color:"primary",titleAccess:"In progress"}):null}function jst(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Cst=(0,f.styled)(f.Card)(bst||(bst=jst(["\n  &:hover {\n    cursor: pointer;\n  }\n"]))),Sst=(0,f.styled)("div")(hst||(hst=jst(["\n  width: fit-content;\n  height: fit-content;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n"]))),Nst=(0,f.styled)("div",{shouldForwardProp:e=>"useGridView"!==e})(e=>{let{useGridView:n}=e;return{minWidth:260,width:n?"100%":260}}),wst=(0,f.styled)("div",{shouldForwardProp:e=>"useGridView"!==e})(e=>{let{useGridView:n}=e;return n?{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gridGap:25,padding:"5px 0"}:{display:"inline-flex",flexFlow:"row nowrap",alignItems:"flex-start",gap:"25px",minHeight:"246px",overflowX:"auto",whiteSpace:"nowrap",textOverflow:"ellipsis",padding:"0 3px 12px 3px"}}),Dst=(0,f.styled)("span")(vst||(vst=jst(["\n  display: flex;\n  width: 100%;\n  justify-content: space-between;\n  min-height: 21px;\n"]))),Ast=(0,f.styled)("span")(xst||(xst=jst(["\n  overflow: hidden;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n  width: 90%;\n"])));function Rst(e){let{courses:n,useGridView:t,title:a}=e;return(0,Ze.jsx)(wst,{useGridView:!!t,children:n.map(e=>{var n,r,i;return(0,Ze.jsx)(Nst,{useGridView:!!t,children:(0,Ze.jsx)(p.Link,{to:{pathname:"/v2/engage/course/".concat(e.id),search:a?"?bundle=".concat(a):void 0},children:(0,Ze.jsx)(Cst,{title:(0,Ze.jsxs)(Dst,{title:e.name,children:[(0,Ze.jsx)(Ast,{title:e.name,children:e.name}),(0,Ze.jsx)(Sst,{children:(0,Ze.jsx)(kst,{status:null===(n=e.userCourseMetaData)||void 0===n?void 0:n.courseProgress})})]}),subTitle:gst(null==e||null===(r=e.metaData)||void 0===r?void 0:r.cpd),src:null===(i=e.metaData)||void 0===i?void 0:i.thumbnail})})},e.id)})})}var Pst,Lst,Ist,Est;function _st(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Fst=(0,f.styled)("div")(Pst||(Pst=_st(["\n  display: flex;\n  align-items: center;\n  margin-bottom: 16px;\n\n  a {\n    font-size: 14px;\n    text-decoration: underline;\n    text-underline-offset: 3px;\n  }\n"]))),Bst=(0,f.styled)("section")(Lst||(Lst=_st(["\n  display: flex;\n  flex-flow: column nowrap;\n  margin-bottom: 32px;\n"]))),Ust=(0,f.styled)(f.Text)(Ist||(Ist=_st(["\n  margin-right: 8px;\n"]))).withComponent("h2"),Mst=(0,f.styled)(f.Text)(Est||(Est=_st(["\n  margin-top: -2px;\n  margin-bottom: 22px;\n"]))).withComponent(ze.To);function Vst(e){let{title:n,description:t,courses:a,bundleId:r}=e;const i=r||("string"==typeof n?n.toLowerCase():""),o=n&&"string"==typeof n?n:void 0;return(0,Ze.jsxs)(Bst,{children:[(0,Ze.jsxs)(Fst,{children:[(0,Ze.jsx)(Ust,{typescale:"title",size:"medium",children:n}),!!a.length&&i&&(0,Ze.jsx)(p.Link,{to:{pathname:"/v2/engage/".concat(i)},children:(0,Ze.jsx)(Je.A,{id:"pages.learn.viewLink",values:{amount:a.length}})})]}),t&&(0,Ze.jsx)("div",{title:t,children:(0,Ze.jsx)(Mst,{typescale:"body",size:"medium",source:Gt().truncate(t,{length:100,separator:" ",omission:" ..."}),children:t})}),(0,Ze.jsx)(Rst,{courses:a,title:o})]})}function zst(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Gst(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?zst(Object(t),!0).forEach(function(n){$st(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):zst(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function $st(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Wst=e=>!e.userCourseMetaData||e.userCourseMetaData&&![Vt.G1.Inprogress,Vt.G1.Complete].includes(e.userCourseMetaData.courseProgress),qst=e=>e.userCourseMetaData&&e.userCourseMetaData.courseProgress===Vt.G1.Inprogress,Jst=e=>e.userCourseMetaData&&e.userCourseMetaData.courseProgress===Vt.G1.Complete,Yst=(e,n)=>{var t,a,r,i;return(null===(t=e.userCourseMetaData)||void 0===t?void 0:t.lastUpdatedAt)>(null===(a=n.userCourseMetaData)||void 0===a?void 0:a.lastUpdatedAt)?-1:(null===(r=e.userCourseMetaData)||void 0===r?void 0:r.lastUpdatedAt)<(null===(i=n.userCourseMetaData)||void 0===i?void 0:i.lastUpdatedAt)?1:0};function Hst(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const t=(0,eg.A)(),a=Pu();return(0,g.useMemo)(()=>{const r={mandatoryList:[],showList:[],restrictedCourseList:[]};n.forEach(n=>{if(n.isbBundleShow){const t=e.filter(e=>n.courses.includes(e.id)),a=n.isMandatoryBundle?"mandatoryList":"showList",i=Gt().orderBy(t,e=>n.courses.indexOf(e.id),"asc");Gt().remove(i,e=>e.userCourseMetaData&&e.userCourseMetaData.courseProgress===Vt.G1.Complete),r[a].push(Gst(Gst({},n),{},{coursesList:i})),n.restricted&&n.courses.length&&(r.restrictedCourseList=[...r.restrictedCourseList,...i.slice(1,i.length).map(e=>e.id)])}});const i=e.filter(e=>e.accountId===(null==a?void 0:a.id));r.restrictedCourseList=Gt().uniq(r.restrictedCourseList),r.showList=Gt().orderBy(r.showList,e=>e.title.toLowerCase(),"asc");const o=e=>{var n;return(null===(n=e.coursesList)||void 0===n?void 0:n.length)>0};return[...r.mandatoryList.filter(o).map(e=>({bundleId:e.id,title:e.title,description:e.description,courses:e.coursesList})),{title:t.formatMessage({id:"pages.learn.banners.continue"}),courses:e.filter(qst).sort(Yst)},{title:t.formatMessage({id:"pages.learn.banners.explore"}),courses:e.filter(Wst).sort(Yst)},{title:"".concat(null==a?void 0:a.name," - Uploaded Courses"),courses:i.sort(Yst)},...r.showList.filter(o).map(e=>({bundleId:e.id,title:e.title,description:e.description,courses:e.coursesList})),{title:t.formatMessage({id:"pages.learn.banners.completed"}),courses:e.filter(Jst).sort(Yst)}].filter(e=>e.courses.length)},[t,e,n,a])}function Kst(e,n){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3?arguments[3]:void 0;const r=rt(),i=at();return Rt(n?rx:ax,{variables:{searchTerm:e,accountId:r,pageNumber:1,userId:i.token.sub,section:null!=n?n:"",bundleId:n},skip:!e&&t,fetchPolicy:a})}var Qst,Zst,Xst;function ect(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const nct=[{label:"Learn",to:"/v2/engage"}],tct=["explore","continue","completed","all"],act=(0,f.styled)(f.TextField)(Qst||(Qst=ect(["\n  margin-bottom: 32px;\n"]))),rct=(0,f.styled)("div")(Zst||(Zst=ect(["\n  display: flex;\n  flex-flow: column nowrap;\n"]))),ict=(0,f.styled)("div")(Xst||(Xst=ect(["\n  margin-bottom: 32px;\n"])));function oct(){var e;const{id:n="all"}=(0,m.g)(),[t,a]=(0,kd.useQueryParam)("search"),[r]=(0,oE.useDebounce)(t,600),i=tct.includes(n),{data:o,loading:l}=Kst(null!=r?r:"",i?null:n,!1,"cache-first"),s=null==o||null===(e=o.searchCourses)||void 0===e?void 0:e.data,c=null==o?void 0:o.getLearnBundleById,d=Hst(s,c?[c]:null==o?void 0:o.getLearnBundlesForAccount),u=(0,g.useMemo)(()=>d.find(e=>i?e.title.toLowerCase()===n:e.bundleId===n),[d,i,n]),p=i||null!=c&&c.title?{label:i?Yzn(n):null==c?void 0:c.title}:void 0,y=(0,g.useCallback)(e=>{a(e.target.value)},[a]);return(0,Ze.jsx)(f.Page,{title:{crumbs:p?[...nct,p]:nct,content:"Learn about sustainability"},loading:l,children:(0,Ze.jsxs)(rct,{children:[(0,Ze.jsx)(ict,{children:(0,Ze.jsx)(fJn,{})}),(0,Ze.jsx)(act,{name:"ConfigurationAccountsContainer__Controls__Search",type:"search",value:t,onChange:y,error:!1,placeholder:"Search"}),!(null==u||!u.courses.length)&&(0,Ze.jsx)(Rst,{useGridView:!0,title:u.title,courses:u.courses})]})})}var lct,sct,cct=t(53331),dct=t.n(cct);function uct(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const pct=(0,f.styled)("div")(lct||(lct=uct(["\n  padding: 24px 16px;\n  background-color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.errorContainer}),mct=(0,f.styled)(f.Text)(sct||(sct=uct(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}).withComponent("h3"),fct=e=>{let{relatedCourses:n}=e;return n.length?(0,Ze.jsx)(Vst,{title:(0,Ze.jsx)(Je.A,{id:"pages.coursesPreview.relatedCourses",defaultMessage:"Related courses"}),courses:n}):(0,Ze.jsx)(p.Link,{to:"/v2/engage",children:(0,Ze.jsx)(pct,{children:(0,Ze.jsx)(mct,{typescale:"title",size:"medium",children:(0,Ze.jsx)(Je.A,{id:"pages.coursesPreview.noResults"})})})})},yct=t.p+"learn-fb3ef984335dc9eb9679.svg";var gct;const bct=(0,f.styled)(f.Text)(gct||(gct=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  color: ",";\n  margin-bottom: 16px;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),hct={PDF:{NOTSTARTED:"",COMPLETE:"You have downloaded this file."},EMBED:{NOTSTARTED:"",INPROGRESS:"pages.coursesPreview.statuses.embed.inprogress",COMPLETE:"You have completed this course."},EXTERNAL:{},IFRAME:{},DOWNLOAD:{}},vct=e=>{let{courseProgress:n,handleType:t}=e;const a=hct[t][n];return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(bct,{typescale:"body",size:"large",children:a&&(0,Ze.jsx)(Je.A,{id:a})})})};var xct,Tct,Oct,kct,jct,Cct,Sct,Nct,wct;function Dct(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Act(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dct(Object(t),!0).forEach(function(n){Rct(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dct(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Rct(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Pct(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Lct=(0,f.styled)("div")(xct||(xct=Pct(["\n  width: 100%;\n  height: 100%;\n  padding: 24px;\n"]))),Ict=(0,f.styled)(f.Text)(Tct||(Tct=Pct(["\n  text-align: center;\n  color: ",";\n  margin-bottom: 24px;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurface}).withComponent("h2"),Ect=(0,f.styled)(f.Text)(Oct||(Oct=Pct(["\n  margin-bottom: 16px;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurface}),_ct=(0,f.styled)("div")(kct||(kct=Pct(["\n  display: flex;\n  gap: 16px;\n  justify-content: space-between;\n"]))),Fct=(0,f.styled)("div")(jct||(jct=Pct(["\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurface}),Bct=(0,f.styled)(f.Text)(Cct||(Cct=Pct([""]))).withComponent("span"),Uct=(0,f.styled)("div")(Sct||(Sct=Pct(["\n  display: flex;\n  width: 100%;\n  gap: 24px;\n  justify-content: space-between;\n  margin-top: 16px;\n"]))),Mct=(0,f.styled)(f.Button)(Nct||(Nct=Pct(["\n  width: 100%;\n"]))),Vct=(0,f.styled)(f.TextField)(wct||(wct=Pct(["\n  width: 196px;\n"])));function zct(e,n){return null==e?void 0:e.reduce((e,t)=>{var a;return Act(Act({},e),{},{[t.id]:null===(a=t.answers)||void 0===a||null===(a=a[n])||void 0===a?void 0:a.value})},{})}function Gct(e){var n;let{evaluation:t,onSubmit:a,onGoNext:r,goNextButtonTitle:i,reevaluation:o,type:l,isSubmitting:s}=e;const[c,d]=(0,g.useState)(zct(null==t?void 0:t.questions,0)),[u,p]=(0,g.useState)(zct(null==t?void 0:t.questions,1)),[m,y]=(0,g.useState)({}),b=null==t?void 0:t.questions.every(e=>{var n;return(null==e||null===(n=e.answers)||void 0===n?void 0:n.length)>=1}),h=null==t?void 0:t.questions.every(e=>{var n;return(null==e||null===(n=e.answers)||void 0===n?void 0:n.length)>=2});return(0,Ze.jsx)(Lct,{children:t?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Ict,{typescale:"headline",size:"small",children:null==t?void 0:t.name}),(0,Ze.jsx)(Ect,{typescale:"body",size:"large",children:null==t?void 0:t.description}),(0,Ze.jsx)(Fct,{children:null==t||null===(n=t.questions)||void 0===n?void 0:n.map((e,n)=>(0,Ze.jsxs)(_ct,{children:[(0,Ze.jsxs)(f.Text,{typescale:"body",size:"large",children:[(0,Ze.jsxs)(Bct,{typescale:"title",size:"medium",children:["Q",n+1,":"]}),e.text]}),(0,Ze.jsx)(Vct,{type:"number",value:c[e.id],error:o?null:m[e.id],placeholder:"".concat(t.scale.min,"-").concat(t.scale.max),disabled:b,inputProps:{min:t.scale.min,max:t.scale.max},onChange:n=>{d(Act(Act({},c),{},{[e.id]:n.target.value}))}}),o&&(0,Ze.jsx)(Vct,{type:"number",value:u[e.id],error:m[e.id],placeholder:"".concat(c[e.id]||t.scale.min,"-").concat(t.scale.max),inputProps:{min:t.scale.min,max:t.scale.max},disabled:h,onChange:n=>{p(Act(Act({},u),{},{[e.id]:n}))}})]},e.id))}),(0,Ze.jsxs)(Uct,{children:[(0,Ze.jsx)(Mct,{variant:"contained",onClick:r,children:i}),(0,Ze.jsxs)(Mct,{disabled:s||(o?h:b),onClick:()=>{const e=o?u:c,n=pv(t,e,o?c:null);if(Object.keys(n).length)return y(n);Object.keys(m).length&&y({}),a(Object.keys(e).map(n=>({questionId:n,value:e[n]})))},children:["Submit ",l]})]})]}):null})}var $ct,Wct,qct,Jct;function Yct(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Hct(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Yct(Object(t),!0).forEach(function(n){Kct(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Yct(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Kct(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Qct(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Zct=(0,f.styled)("div")($ct||($ct=Qct(["\n  height: 100%;\n"]))),Xct=(0,f.styled)("div")(Wct||(Wct=Qct(["\n  display: flex;\n  flex: auto;\n  height: auto;\n\n  div:has(> video) {\n    width: 100%;\n  }\n\n  iframe {\n    min-height: 90vh;\n  }\n"]))),edt=(0,f.styled)("div")(qct||(qct=Qct(["\n  justify-content: space-between;\n  display: flex;\n  gap: 16px;\n  width: 100%;\n"]))),ndt=(0,f.styled)(f.Button)(Jct||(Jct=Qct(["\n  flex-basis: 50%;\n"]))),tdt={display:"block"},adt=e=>{var n,t;let{onDismiss:a,course:r,link:i,courseRefetch:o=()=>{}}=e;const{showNotification:l}=vt(),{token:s}=at(),c=rt(),d=Mv(r,i,o),u=null===(n=r.assessment)||void 0===n||null===(n=n.questions)||void 0===n||null===(t=n.every)||void 0===t?void 0:t.call(n,e=>{var n;return(null===(n=e.answers)||void 0===n?void 0:n.length)>=1}),[p,m]=(0,g.useState)(r.assessment?0:1),[f,y]=(0,g.useState)(null),[b,h]=(0,g.useState)(!1),[v,{loading:x}]=(0,Ot.n)(Gb,{onError:e=>{y({color:"danger",message:e.message})}}),T=(0,g.useCallback)((e,n)=>t=>{t.writeQuery({query:ox,variables:{accountId:c,id:r.id,userId:s.sub,userIdNullable:s.sub},data:{getCourseById:Hct(Hct({},r),{},{[n]:Hct(Hct({},r[n]),{},{questions:r[n].questions.map(n=>{const t=e.find(e=>e.questionId===n.id),a=n.answers||[];return Hct(Hct({},n),{},{answers:a.concat([{givenAt:(new Date).toISOString(),value:t.value,__typename:"Answer"}])})})})})}})},[c,r,s]),O=(0,g.useCallback)(async(e,n)=>{await v({variables:{answers:e,userId:s.sub,courseId:r.id,evaluationId:r.reaction.id},update:T(e,n)})},[v,r,s.sub,T]);return(0,Ze.jsxs)(ze.aF,{height:"auto",maxHeight:"100%",minHeight:"-webkit-fill-available",span:12,onDismiss:a,style:tdt,show:!0,children:[0===p&&(0,Ze.jsx)(Gct,{type:"Pre-assessment",goNextButtonTitle:b?"Go to Post-assessment":"Go to Course",evaluation:r.assessment,onSubmit:e=>{O(e,"assessment"),o()},onGoNext:async()=>{r.type===Vt.US.Pdf?b?m(2):(await d(),h(!0)):m(1)},isSubmitting:x,reevaluation:!1}),1===p&&(0,Ze.jsxs)(Zct,{children:[(0,Ze.jsx)(Xct,{children:(0,Ze.jsx)(Xb,{course:r,link:i,courseRefetch:o,onCompleted:()=>{r.assesment&&u&&m(2)}})}),r.assessment&&u&&(0,Ze.jsxs)(edt,{children:[(0,Ze.jsx)(ndt,{variant:"contained",onClick:()=>{m(2)},children:"Go to Post-assessment"}),(0,Ze.jsx)(ndt,{onClick:a,children:"Close"})]}),!r.assessment&&r.reaction&&(0,Ze.jsxs)(edt,{children:[(0,Ze.jsx)(ndt,{variant:"contained",onClick:()=>{m(3)},children:"Go to Reaction"}),(0,Ze.jsx)(ndt,{onClick:a,children:"Close"})]})]}),2===p&&(0,Ze.jsx)(Gct,{type:"Post-assessment",goNextButtonTitle:r.reaction?"Go to reaction":"Close",evaluation:r.assessment,onSubmit:e=>O(e,"assessment"),onGoNext:()=>{r.reaction?m(3):a()},isSubmitting:x,reevaluation:!0}),3===p&&(0,Ze.jsx)(Gct,{type:"Reaction",goNextButtonTitle:"Close",evaluation:r.reaction,onSubmit:e=>O(e,"reaction"),isSubmitting:x,onGoNext:a,reevaluation:!1}),f&&l(f.message)]})};var rdt;const idt=(0,f.styled)(f.Button)(rdt||(rdt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-top: 16px;\n"]))),odt=iv(e=>{let{course:n,downloadLink:t,handleType:a,courseRefetch:r,name:i}=e;const[o,l]=(0,g.useState)(!1),s=Mv(n,t,r),c=Uv(n,r),d=a===Jr&&null===n.assessment,u=(0,g.useCallback)(()=>{d?s():a===qr?(c(),window.open(n.metaData.url,"_blank")):a===Wr?(c(),l(!0)):l(!0)},[d,a,s,c,n,l]);return(0,Ze.jsxs)(Ze.Fragment,{children:[o&&(0,Ze.jsx)(adt,{onDismiss:()=>{l(!1)},course:n,link:t,courseRefetch:r}),(0,Ze.jsx)(idt,{name:i,onClick:u,variant:"contained",children:d?"Download PDF":(0,Ze.jsx)(Je.A,{id:"pages.coursesPreview.startCourse"})})]})},"learn.preview",{closeLabel:"learnTour.close",joyrideOptions:{scrollToFirstStep:!1}});var ldt,sdt,cdt,ddt,udt,pdt,mdt,fdt,ydt;function gdt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const bdt=(0,f.styled)("div")(ldt||(ldt=gdt(["\n  width: 100%;\n  background: ",";\n  display: flex;\n  gap: 24px;\n  margin-bottom: 24px;\n"])),e=>{let{theme:n}=e;return n.sys.color.onPrimary}),hdt=(0,f.styled)(f.Text)(sdt||(sdt=gdt(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),vdt=(0,f.styled)("div")(cdt||(cdt=gdt(["\n  position: relative;\n  border-radius: 12px;\n  border: 1px solid ",";\n  box-shadow: ",";\n  padding: 0 0 75% 0;\n  background: "," url(",") center center no-repeat;\n  background-size: cover;\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>e.theme.sys.elevation[0],e=>{let{theme:n}=e;return n.sys.color.outlineVariant},e=>{let{src:n}=e;return n}),xdt=(0,f.styled)("div")(ddt||(ddt=gdt(["\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin-top: -50px;\n  margin-left: -50px;\n  border: 4px solid ",";\n  border-radius: 50%;\n  display: inline-flex;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100px;\n  width: 100px;\n"])),e=>{let{theme:n}=e;return n.sys.color.onPrimary}),Tdt=(0,f.styled)("img")(udt||(udt=gdt(["\n  width: 80%;\n  height: 80%;\n"]))),Odt=(0,f.styled)("div")(pdt||(pdt=gdt([""]))),kdt=(0,f.styled)("div")(mdt||(mdt=gdt(["\n  width: 25%;\n"]))),jdt=(0,f.styled)(f.Text)(fdt||(fdt=gdt(["\n  color: ",";\n  margin-bottom: 16px;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}).withComponent("h2"),Cdt=(0,f.styled)("div")(ydt||(ydt=gdt(["\n  display: flex;\n  gap: 16px;\n\n  svg {\n    width: 40px !important;\n    height: 40px !important;\n  }\n"]))),Sdt=e=>{let{course:n,userId:t,refetch:a}=e;const r=new Yr(n).getHandleMethod();return(0,Ze.jsxs)(bdt,{children:[(0,Ze.jsx)(kdt,{children:(0,Ze.jsx)(vdt,{name:"CoursePreview__Thumbnail",src:n.metaData.thumbnail,children:!n.metaData.thumbnail&&(0,Ze.jsx)(xdt,{children:(0,Ze.jsx)(Tdt,{src:yct})})})}),(0,Ze.jsxs)(Odt,{children:[(0,Ze.jsxs)(Cdt,{children:[(0,Ze.jsx)(jdt,{typescale:"headline",size:"large",children:n.name}),(0,Ze.jsx)(kst,{status:n.userCourseMetaData&&n.userCourseMetaData.courseProgress})]}),(0,Ze.jsx)(vct,{courseProgress:n.userCourseMetaData&&n.userCourseMetaData.courseProgress,handleType:r}),!!n.metaData.description&&(0,Ze.jsx)(hdt,{typescale:"body",size:"large",children:Ron()(n.metaData.description)}),(0,Ze.jsx)(odt,{course:n,handleType:r,downloadLink:n.metaData.link,userId:t,courseRefetch:a,name:"StartCourse-Button",steps:lv})]})]})};var Ndt,wdt=t(79568),Ddt=t.n(wdt);const Adt=Ge.default.div(Ndt||(Ndt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  overflow: auto;\n  height: 100%;\n"]))),Rdt=e=>dct()([{label:(0,Ze.jsx)(Je.A,{id:"pages.coursesPreview.breadcrumbs.three"}),to:"/v2/engage"},{label:e||!1},{label:(0,Ze.jsx)(Je.A,{id:"pages.coursesPreview.breadcrumbs.two"})}],e=>!!e.label),Pdt=(e,n,t)=>{var a;if(!e)return n?new Error(n.message):null!=t&&t.getUserCourse?null!=t&&null!==(a=t.getUserCourse)&&void 0!==a&&a.licence?void 0:new Error("No licence"):new Error("Not available")},Ldt=()=>{var e,n,t,a,r;const{bundleId:i,id:o}=(0,m.g)(),[l]=(0,p.useSearchParams)(),s=l.get("bundle")||void 0,{token:c}=at(),[d,u]=function(e){let{courseId:n,userId:t}=e;const a=rt();return[Rt(Ddt(),{variables:{accountId:a,courseId:n,userId:t}}),(0,h.IT)(Al(),{variables:{accountId:a,pageNumber:1,ownedCourses:!0}})]}({courseId:o,userId:c.sub,bundleId:i});return(0,Ze.jsx)(f.Page,{title:{crumbs:Rdt(s),content:(0,Ze.jsx)(Je.A,{id:"pages.coursesPreview.breadcrumbs.two"}),actionButton:(0,Ze.jsx)(f.Button,{to:"../",name:"CoursePreview__Button-back",variant:"contained",children:(0,Ze.jsx)(Je.A,{id:"pages.coursesPreview.backToLearn"})})},error:Pdt(d.loading,d.error,d.data),children:(0,Ze.jsxs)(Adt,{children:[(null===(e=d.data)||void 0===e?void 0:e.getUserCourse)&&(0,Ze.jsx)(Sdt,{userId:c.sub,course:null===(n=d.data)||void 0===n?void 0:n.getUserCourse,bundleId:i,refetch:d.refetch}),(null===(t=d.data)||void 0===t?void 0:t.getUserCourse)&&(null===(a=u.data)||void 0===a?void 0:a.getAvailableCourses)&&(0,Ze.jsx)(fct,{relatedCourses:null===(r=u.data.getAvailableCourses)||void 0===r?void 0:r.data.filter(e=>e.id!==o)})]})})};var Idt,Edt,_dt;function Fdt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Bdt=e=>dct()([{label:"Learn",to:"/v2/engage"},{label:e},{label:"Overview",to:"/v2/engage"}],e=>!!e.label),Udt=(0,f.styled)(f.TextField)(Idt||(Idt=Fdt(["\n  margin-bottom: 32px;\n"]))),Mdt=(0,f.styled)("div")(Edt||(Edt=Fdt(["\n  display: flex;\n  flex-flow: column nowrap;\n"]))),Vdt=(0,f.styled)("div")(_dt||(_dt=Fdt(["\n  margin-bottom: 32px;\n  max-height: 200px;\n"])));function zdt(){var e,n;const[t,a]=(0,kd.useQueryParam)("search"),r=(0,g.useCallback)(e=>{a(e.target.value)},[a]),{data:i,loading:o}=yst(),{data:l,loading:s}=Kst(t),c=Hst(t?null==l||null===(e=l.searchCourses)||void 0===e?void 0:e.data:null==i||null===(n=i.getAvailableCourses)||void 0===n?void 0:n.data,t?null==l?void 0:l.getLearnBundlesForAccount:null==i?void 0:i.getAvailableCourses.learnBundleList),[d]=(0,p.useSearchParams)(),u=d.get("bundle");return(0,Ze.jsx)(f.Page,{title:{crumbs:Bdt(u),content:"Learn about sustainability"},loading:o||s,children:(0,Ze.jsxs)(Mdt,{children:[(0,Ze.jsx)(Vdt,{children:(0,Ze.jsx)(fJn,{})}),(0,Ze.jsx)(Udt,{name:"ConfigurationAccountsContainer__Controls__Search",type:"search",value:t,onChange:r,error:!1,placeholder:"Search"}),c.map(e=>(0,Ze.jsx)(Vst,{title:e.title,description:e.description,courses:e.courses,bundleId:e.bundleId},e.title))]})})}var Gdt;const $dt=Ge.default.div(Gdt||(Gdt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n"]))),Wdt=e=>{let{applicationData:{getAccountInfo:n}}=e;const t=!n||n.accessControls.learn;return(0,Ze.jsx)($dt,{children:t?(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"",element:(0,Ze.jsx)(zdt,{})}),(0,Ze.jsx)(m.qh,{path:":id",element:(0,Ze.jsx)(oct,{})}),(0,Ze.jsx)(m.qh,{path:"course/:id",element:(0,Ze.jsx)(Ldt,{})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:"engage"})})]}):(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"",element:(0,Ze.jsx)(zdt,{})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:"engage"})})]})})};var qdt,Jdt,Ydt,Hdt,Kdt;function Qdt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Zdt=(0,f.styled)(f.Text)(qdt||(qdt=Qdt(["\n  margin-bottom: 24px;\n  color: ",";\n"])),e=>e.theme.sys.color.onSurface),Xdt=(0,f.styled)(f.Text)(Jdt||(Jdt=Qdt(["\n  color: ",";\n"])),e=>e.theme.sys.color.onSurface),eut=(0,f.styled)("div")(Ydt||(Ydt=Qdt(["\n  display: flex;\n  flex-flow: row nowrap;\n  gap: 24px;\n  margin-bottom: 14px;\n"]))),nut=(0,f.styled)("div")(Hdt||(Hdt=Qdt(["\n  display: flex;\n  width: 328px;\n  height: 80px;\n  overflow: hidden;\n  min-height: 80px;\n  min-width: 328px;\n  padding: 5px 30px;\n  align-items: start;\n  border-radius: 12px;\n  flex-direction: unset;\n  flex-direction: column;\n  align-items: flex-start;\n  justify-content: space-around;\n  color: ",";\n  box-shadow: ",";\n  background-color: ",";\n  border: 1px dashed ",";\n  margin-bottom: 12px;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurface},e=>{let{theme:n}=e;return n.sys.elevation[1]},e=>{let{theme:n}=e;return n.sys.color.onSecondary},e=>{let{theme:n}=e;return n.sys.color.outlineVariant}),tut=(0,f.styled)(f.Button)(Kdt||(Kdt=Qdt(["\n  width: 196px;\n"])));function aut(){var e;const n=_u(),{data:t,loading:a}=yst(),r=(0,g.useMemo)(()=>{var e;return(null==t||null===(e=t.getAvailableCourses)||void 0===e?void 0:e.data)||[]},[t]),i=Number((null==t||null===(e=t.getAvailableCourses)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.length)||1)-1,o=(e=>{if(e)return[...e].sort(()=>.5-Math.random()).slice(0,3)})(null==t?void 0:t.getAvailableCourses.data),{inProgressCourseExists:l,userHasCompletedCourses:s,userNeverStartedCourse:c}=(0,g.useMemo)(()=>{const e=r.some(e=>{var n;return"INPROGRESS"===(null===(n=e.userCourseMetaData)||void 0===n?void 0:n.courseProgress)});return{userHasCompletedCourses:r.some(e=>{var n;return"COMPLETE"===(null===(n=e.userCourseMetaData)||void 0===n?void 0:n.courseProgress)}),inProgressCourseExists:e,userNeverStartedCourse:r.every(e=>{var n;return null===e.userCourseMetaData||"NOTSTARTED"===(null==e||null===(n=e.userCourseMetaData)||void 0===n?void 0:n.courseProgress)})}},[r]),d=(0,g.useMemo)(()=>{let e;switch(!0){case s&&!l:e="Why not take another course";break;case c:e="Start your learning";break;case l:e="Continue your learning";break;default:e="Start your learning"}return"".concat(e,", ").concat(null==n?void 0:n.first_name).concat(s&&!l?"?":"")},[l,null==n?void 0:n.first_name,s,c]),u=(0,g.useMemo)(()=>c?o:l?r.filter(e=>{var n;return(null==e||null===(n=e.userCourseMetaData)||void 0===n?void 0:n.courseProgress)===Vt.G1.Inprogress}):r,[r,l,o,c]);return a?null:(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(Zdt,{typescale:"title",size:"medium",children:d}),(0,Ze.jsxs)(eut,{children:[(c||l)&&(null==u?void 0:u.map(e=>{var n,t;return(0,Ze.jsx)(p.Link,{to:"/v2/engage/course/".concat(null==e?void 0:e.id),children:(0,Ze.jsx)(f.HorizontalCard,{title:null==e?void 0:e.name,subTitle:gst(null==e||null===(n=e.metaData)||void 0===n?void 0:n.cpd),src:null==e||null===(t=e.metaData)||void 0===t?void 0:t.thumbnail})},e.id)})),s&&!l&&(0,Ze.jsx)(nut,{children:a?(0,Ze.jsx)(f.Loader,{size:35}):(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Xdt,{children:"".concat(i,"+ courses to choose from")}),(0,Ze.jsx)(tut,{variant:"text",to:"/v2/engage",children:"View all courses"})]})})]}),(r.length||l)&&(0,Ze.jsxs)(tut,{variant:"text",to:"/v2/engage",children:[(0,Ze.jsx)(fst.A,{fontSize:"small"}),"View all courses"]})]})}var rut,iut,out,lut;function sut(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const cut=(0,f.styled)("div")(rut||(rut=sut(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n"]))),dut=(0,f.styled)(f.Text)(iut||(iut=sut(["\n  color: ",";\n"])),e=>e.theme.sys.color.onSurface),uut=(0,f.styled)(H5n)(out||(out=sut(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  padding: 2px;\n"]))),put=(0,f.styled)(m6n)(lut||(lut=sut(["\n  min-height: 40px;\n  display: flex;\n  align-items: center;\n"])));function mut(){return(0,Ze.jsxs)(cut,{children:[(0,Ze.jsx)(dut,{typescale:"title",size:"medium",children:"Your data"}),(0,Ze.jsxs)(uut,{children:[(0,Ze.jsx)(f.DrawerLink,{to:"/v2/data",children:(0,Ze.jsx)(put,{color:"sys.color.error",children:"Missing data and empty transactions"})}),(0,Ze.jsx)(f.DrawerLink,{to:"/v2/data",children:(0,Ze.jsx)(put,{color:"customColors.warning.color",children:"Anomalies found in your data"})})]})]})}var fut,yut,gut;function but(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hut=(0,f.styled)("div")(fut||(fut=but(["\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  border-radius: 16px;\n  margin: 0px;\n  height: min-content;\n  padding: ",";\n  border: ",";\n"])),e=>{let{withPadding:n}=e;return n?"32px 18px;":"none"},e=>{let{border:n,theme:t}=e;return n?"1px solid ".concat(t.sys.color.outlineVariant):"none"}),vut=(0,f.styled)(f.ColumnChart)(yut||(yut=but(["\n  & > .ag-root-wrapper {\n    border: none !important;\n  }\n"]))),xut=(0,f.styled)("div")(gut||(gut=but(["\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  border-radius: 16px;\n  padding: ",";\n  border: ",";\n"])),e=>{let{withPadding:n}=e;return n?"24px 18px":0},e=>{let{border:n,theme:t}=e;return n?"1px solid ".concat(t.sys.color.outlineVariant):"none"}),Tut=e=>{var n;let{data:t}=e;const a=location.pathname,r=oc(),i=a==="/v2/".concat(r.home.root),o=!Object.values(r.home.impact).some(e=>a.includes(e)&&!i),l=[{to:"/".concat(r.home.root),item:"Total carbon",isActive:i},{to:"./".concat(r.home.impact.emissionByScope),item:"Emissions by Scope",isActive:a.includes(r.home.impact.emissionByScope)&&!a.includes("carbon")},{to:"./".concat(r.home.impact.emissionBySource),item:"Emissions by Source",isActive:a.includes(r.home.impact.emissionBySource)},{to:"./".concat(r.home.impact.grossNetEmission),item:"Gross & Net Emissions",isActive:a.includes(r.home.impact.grossNetEmission)}],s=null===(n=l.find(e=>e.item.includes(a)))||void 0===n?void 0:n.item,c=[{label:"Activity",children:(0,Ze.jsxs)(W5n,{children:[(0,Ze.jsx)(f.NavigationDrawer,{items:l}),(0,Ze.jsx)(J5n,{children:(e=>{switch(!0){case i:return(0,Ze.jsx)(X7n,{sectionName:s||"",data:e.getTotalEmissions,iconSize:100,children:(0,Ze.jsx)(f.KpiChartCard,{delay:.1,initialDelay:1,decimalPlaces:2,parentWidth:400,maxWidth:"unset",alignItems:"flex-start",title:"Total carbon (tCO2e) over previous 12 months",value:e.getTotalEmissions})});case a.includes(r.home.impact.emissionByScope)&&!a.includes("carbon"):return(0,Ze.jsx)(X7n,{sectionName:s||"",data:e.getEmissionsPercentageBreakdownByScope,iconSize:100,children:(0,Ze.jsx)(hut,{children:(0,Ze.jsx)(j2e,{title:"",scopeBreakdown:e.getEmissionsPercentageBreakdownByScope,border:!1})})});case a.includes(r.home.impact.emissionBySource):return(0,Ze.jsx)(X7n,{sectionName:s||"",data:e.getEmissionsBySource,iconSize:100,children:(0,Ze.jsx)(hut,{children:(0,Ze.jsx)(f.StackedChart,{enableLegend:!1,data:e.getEmissionsBySource,unit:"tCO2e",colors:l1e,size:f.ChartSize.Fluid,border:!1,dataLabels:{enabled:!1}})})});case a.includes(r.home.impact.grossNetEmission):return(0,Ze.jsx)(X7n,{sectionName:s||"",data:e.getEmissionsNetAndGross,iconSize:100,children:(0,Ze.jsx)(xut,{children:(0,Ze.jsx)(vut,{enableLegend:!1,data:e.getEmissionsNetAndGross||[],size:f.ChartSize.Fluid,unit:"tCO2e",border:!1,dataLabels:{enabled:!1}})})});default:return(0,Ze.jsx)(m.C5,{to:"/".concat(r.home.root)})}})(t)})]})}];return(0,Ze.jsxs)(G5n,{children:[o&&(0,Ze.jsx)(m.C5,{to:"/".concat(r.home.root)}),(0,Ze.jsxs)(q5n,{variant:"text",to:"/v2/reporting",children:[(0,Ze.jsx)(f.Icons.ArrowForward,{}),"View all reports"]}),(0,Ze.jsx)($5n,{typescale:"title",size:"medium",children:"Reporting"}),(0,Ze.jsx)(f.Tabs,{tabs:c})]})},Out=e=>{let{data:n}=e;return(0,Ze.jsxs)(V5n,{children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Tut,{data:n})}),(0,Ze.jsxs)(z5n,{children:[(0,Ze.jsx)(l3n,{}),(0,Ze.jsx)(mut,{})]})]})};var kut,jut,Cut,Sut,Nut,wut,Dut,Aut,Rut,Put;function Lut(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Iut=(0,f.styled)(f.Text)(kut||(kut=Lut(["\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n  height: 100%;\n  color: ",";\n"])),e=>e.theme.sys.color.onSurface),Eut=(0,f.styled)("div")(jut||(jut=Lut(["\n  display: flex;\n  flex-direction: column;\n"]))),_ut=(0,f.styled)("div")(Cut||(Cut=Lut(["\n  width: 88%;\n"]))),Fut=(0,f.styled)("div")(Sut||(Sut=Lut(["\n  width: 24px;\n  height: 24px;\n  border-radius: 50%;\n  border: ",";\n  background: ",";\n  margin-bottom: 12px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n\n  svg {\n    display: ",";\n    width: 16px;\n    height: 16px;\n    flex-shrink: 0;\n    color: ",";\n  }\n"])),e=>e.completed?"none":"1px solid ".concat(e.theme.sys.color.outlineVariant),e=>e.completed?e.theme.extendedColors.environmental.color:e.theme.sys.color.surface,e=>e.completed?"inline-block":"none",e=>e.theme.sys.color.onSurface),But=(0,f.styled)(f.Button)(Nut||(Nut=Lut(["\n  width: 180px;\n"]))),Uut=(0,f.styled)("div")(wut||(wut=Lut(["\n  display: flex;\n  padding: 2px;\n  margin-bottom: 12px;\n  flex-flow: row nowrap;\n  align-items: center;\n  "," {\n    flex-wrap: wrap;\n    flex-flow: column;\n  }\n"])),e=>{let{theme:n}=e;return n.breakpoints.down("lg")}),Mut=(0,f.styled)("div")(Dut||(Dut=Lut(["\n  width: 24px;\n  height: 24px;\n  margin: 12px;\n  border-radius: 12px;\n  border: 1px solid ",";\n"])),e=>e.theme.sys.color.outlineVariant),Vut=(0,f.styled)("div")(Aut||(Aut=Lut(["\n  width: 183px;\n  height: 97px;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-evenly;\n  flex-shrink: 0;\n  padding-left: 12px;\n  border-radius: 16px;\n  border: 1px solid ",";\n  background: ",";\n  box-shadow: ",";\n  position: relative;\n\n  &:hover {\n    background-color: ",";\n  }\n"])),e=>e.theme.sys.color.outlineVariant,e=>e.theme.sys.color.surface,e=>e.theme.sys.elevation[1],e=>{let{theme:n}=e;return n.sys.color.secondaryContainer}),zut=(0,f.styled)("div")(Rut||(Rut=Lut(["\n  &:not(:first-child) {\n    margin-left: 12px;\n    position: relative;\n  }\n  &:not(:first-child):before {\n    display: inline-block;\n    position: absolute;\n    top: 50%;\n    left: -13px;\n    width: 12px;\n    border-top: 1px dashed #c7c5d0;\n    content: '';\n    border-top: 1px dashed ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.outlineVariant}),Gut=(0,f.styled)(zut)(Put||(Put=Lut(["\n  width: 183px;\n  height: 97px;\n  border-radius: 16px;\n  position: relative;\n  border: ",";\n"])),e=>{let{isEmpty:n,theme:t}=e;return"1px ".concat(n?"solid":"dashed"," ").concat(t.sys.color.outlineVariant)}),$ut=()=>(0,Ze.jsx)(Gut,{children:(0,Ze.jsx)(Mut,{})}),Wut=e=>{let{tasks:n}=e;const t=(a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const n=(new Date).getTime(),t=n-2592e6,a=n+2592e6;return e.filter(e=>{const n=new Date(e.dueDate).getTime();return n>t&&n<a}).sort((e,n)=>new Date(e.dueDate).getTime()-new Date(n.dueDate).getTime()).slice(0,5)}(n),new Array(3).fill(null).map((e,n)=>a[n]));var a;return(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsxs)(f.Grid,{container:!0,children:[(0,Ze.jsx)(Iut,{typescale:"title",size:"medium",children:"Tasks"}),(0,Ze.jsx)(Y5n,{children:(0,Ze.jsx)(Uut,{children:null==t?void 0:t.map((e,n)=>e?(0,Ze.jsx)(zut,{title:e.name,children:(0,Ze.jsx)(p.Link,{to:"/v2/tasks/".concat(e.id),children:(0,Ze.jsxs)(Vut,{children:[(0,Ze.jsx)(Fut,{completed:e.isCompleted,children:(0,Ze.jsx)(f.Icons.Check,{})}),(0,Ze.jsx)(_ut,{children:(0,Ze.jsx)(Iut,{typescale:"body",size:"medium",children:e.name})})]})})},e.id):(0,Ze.jsx)($ut,{},"EmptyTask__".concat(n)))})}),(0,Ze.jsx)(Eut,{children:(0,Ze.jsxs)(But,{variant:"text",to:"/v2/tasks",children:[(0,Ze.jsx)(f.Icons.ArrowForward,{fontSize:"small"}),"View all tasks"]})})]})})};var qut;const Jut=(0,f.styled)("div")(qut||(qut=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 32px;\n"]))),Yut={content:"Sustainability is for everyone"};function Hut(e){let{applicationData:{getTasksByUserId:n}}=e;const[t,a]=N2e(),r=rt(),i=(0,m.Zp)(),o=oc(),l=_u(),{data:s,loading:c}=(0,h.IT)(mst,{variables:{accountId:r,timeGranularity:Vt.iG.Month,from:t.format("YYYY-MM-DD"),to:a.format("YYYY-MM-DD")}});return(0,g.useLayoutEffect)(()=>{var e;(null==l||null===(e=l.role)||void 0===e?void 0:e.role)===Vt.gG.Surveysonly&&i("/v2/".concat(o.surveys.root,"/").concat(o.surveys.sent.overview))},[]),(0,Ze.jsx)(f.Page,{title:Yut,children:(0,Ze.jsx)(Jut,{children:!c&&s?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(aut,{}),(0,Ze.jsx)(Out,{data:s}),n&&(0,Ze.jsx)(Wut,{tasks:n})]}):(0,Ze.jsx)(f.Loader,{})})})}function Kut(e){var n;let{applicationData:t}=e;const a=Ps("IMPACT_DASHBOARD",nr,"170b5402-e820-4579-a9e6-981c4573ab1f",tr,ir,or,"d9deba3c-33f1-4a58-b339-e82d0549850f",rr,lr,sr,cr,dr,...pr),r=null===(n=t.getAccountInfo)||void 0===n?void 0:n.customImpactDashboard;return a||r?(0,Ze.jsx)(iin,{customDashboard:r||void 0}):(0,Ze.jsx)(Hut,{applicationData:t})}var Qut=t(86257),Zut=t(77303),Xut=t(98415);function ept(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function npt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ept(Object(t),!0).forEach(function(n){tpt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ept(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function tpt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const apt={email:e=>(0,Qut.A)(e)?"":"Must be a valid email address",firstName:e=>(0,Zut.A)(e)?"First Name is required.":"",lastName:e=>(0,Zut.A)(e)?"Last Name is required.":"",mobile:e=>(0,Zut.A)(e)||(0,Xut.A)(e)?"":"Must be a valid mobile number.",phone:e=>(0,Zut.A)(e)||(0,o4n.A)(e)?"":"Must be a valid phone number."},rpt=e=>{let{user:n}=e;const{showNotification:t}=vt(),{first_name:a,last_name:r,jobTitle:i,phone:o,department:l,mobile:s,email:c,id:d,profilePicture:u,account:p}=n,[m,y]=(0,g.useState)({firstName:{value:a,error:""},lastName:{value:r,error:""},jobTitle:{value:i,error:""},phone:{value:o,error:""},department:{value:l,error:""},mobile:{value:s,error:""},email:{value:c,error:""}}),{showCreateDepartment:b,setShowCreateDepartment:h}=Cu(p.departments,m.department.value),[v,x]=(0,g.useState)(!1),[T,{loading:O}]=(0,Ot.n)(lXn,{onCompleted:()=>{t("User details have been updated.","success")},onError:()=>{t("Something went wrong. Please try again later.","danger")}}),k=(0,g.useMemo)(()=>{let e=!1;return Object.keys(m).forEach(n=>{m[n].error&&(e=!0)}),e},[m]),j=(0,g.useCallback)(e=>{x(!0),y(n=>{var t;return npt(npt({},n),{},{[e.target.name]:{value:e.target.value,error:null===(t=apt[e.target.name])||void 0===t?void 0:t.call(apt,e.target.value)}})})},[]),C=(0,g.useCallback)(e=>{x(!0),y(n=>npt(npt({},n),{},{department:{value:e.value,error:""}}))},[]),S=(0,g.useCallback)(()=>{T({variables:{id:d,account_id:n.account.id,email:m.email.value,previousEmail:n.email,first_name:m.firstName.value,last_name:m.lastName.value,jobTitle:m.jobTitle.value,department:"notSelected"!==m.department.value?m.department.value:null,phone:m.phone.value,mobile:m.mobile.value,profile:u}}),x(!1)},[d,m,n,u,T]),N=(0,g.useCallback)((e,n)=>{y(e=>npt(npt({},e),{},{department:{value:n.departmentId,error:""}}))},[]);return(0,Ze.jsxs)(g.Fragment,{children:[(0,Ze.jsx)(RA,{passedAccountId:p.id,showCreateDepartment:b,setShowCreateDepartment:h,onComplete:N}),(0,Ze.jsxs)(f.Grid,{container:!0,spacing:4,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{label:"First name",name:"firstName",onChange:j,value:m.firstName.value,helperText:m.firstName.error,error:Boolean(m.firstName.error)})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{label:"Last name",name:"lastName",onChange:j,value:m.lastName.value,helperText:m.lastName.error,error:Boolean(m.lastName.error)})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{label:"Job title (optional)",name:"jobTitle",onChange:j,value:m.jobTitle.value,helperText:m.jobTitle.error,error:Boolean(m.jobTitle.error)})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Select,{label:"Department (optional)",name:"department",options:p.departments.map(e=>({value:e.id,label:e.name})),onChange:C,value:m.department.value,helperText:m.department.error,error:Boolean(m.department.error)})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{label:"Phone number (optional)",name:"phone",onChange:j,value:m.phone.value,helperText:m.phone.error,error:Boolean(m.phone.error)})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{label:"Mobile number (optional)",name:"mobile",onChange:j,value:m.mobile.value,helperText:m.mobile.error,error:Boolean(m.mobile.error)})}),(0,Ze.jsx)(f.Grid,{size:16,children:(0,Ze.jsx)(f.TextField,{label:"Email address",name:"email",onChange:j,value:m.email.value,helperText:m.email.error,error:Boolean(m.email.error)})}),(0,Ze.jsx)(f.Grid,{size:16,children:(0,Ze.jsx)(f.Button,{disabled:!v||k||O,onClick:S,variant:"contained",color:"primary",loading:O,sx:{width:"100%"},children:"Update"})})]})]})};var ipt,opt,lpt,spt,cpt;function dpt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function upt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dpt(Object(t),!0).forEach(function(n){ppt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dpt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ppt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function mpt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const fpt=(0,f.styled)("div")(ipt||(ipt=mpt(["\n  display: flex;\n  gap: 72px;\n"]))),ypt=(0,f.styled)("div")(opt||(opt=mpt(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 32px;\n  width: 100%;\n  max-width: 300px;\n"]))),gpt=(0,f.styled)("div")(lpt||(lpt=mpt(["\n  display: flex;\n  align-items: center;\n  gap: 8px;\n"]))),bpt=(0,f.styled)(f.Text)(spt||(spt=mpt(["\n  text-align: center;\n"]))),hpt=(0,f.styled)("div")(cpt||(cpt=mpt(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 32px;\n  width: 100%;\n  max-width: 600px;\n"]))),vpt=()=>{const{showNotification:e}=vt(),[n,t]=(0,g.useState)(!1),[a]=(0,Ot.n)(sXn,{onCompleted:()=>{e("Profile picture has been updated","success"),t(!1)},onError:n=>{e("Something went wrong (".concat(n.message,"). Please try again later."),"danger"),t(!1)}}),{data:r,loading:i}=Yp();return(0,Ze.jsxs)(f.Page,{loading:i,title:{content:"My profile",crumbs:[{label:"My profile"}]},children:[n&&(0,Ze.jsx)(f.Modal,{open:!0,onClose:()=>t(!1),title:"Edit Profile Picture",children:(0,Ze.jsx)(f.ImageEditor,{defaultImageSrc:r.profilePicture,onSave:async e=>{await a({variables:upt(upt({},r),{},{account_id:r.account.id,previousEmail:r.email,imageData:e,contentType:"image/png",fileName:"".concat(r.id,".png"),profile:"".concat(kn("REACT_APP_PROFILE_BUCKET"),"/").concat(r.id,".png?time=").concat((new Date).toISOString())})})},shouldResetAfterSuccess:!0})}),(0,Ze.jsxs)(fpt,{children:[(0,Ze.jsxs)(ypt,{children:[(0,Ze.jsx)(ze.Y3,{border:!0,name:"profile-picture",src:r.profilePicture,size:"xl",accountName:r.first_name}),(0,Ze.jsxs)(gpt,{as:"button",sx:{cursor:"pointer"},onClick:()=>t(!0),children:[(0,Ze.jsx)(f.Icons.EditRounded,{}),(0,Ze.jsx)(f.Text,{typescale:"title",size:"medium",children:(0,Ze.jsx)(Je.A,{id:"profile.editProfilePicture"})})]}),(0,Ze.jsxs)(gpt,{children:[(0,Ze.jsx)(f.Icons.AssignmentIndRounded,{}),(0,Ze.jsx)(bpt,{typescale:"title",size:"medium",children:"".concat(r.first_name," ").concat(r.last_name)})]}),(0,Ze.jsxs)(gpt,{children:[(0,Ze.jsx)(f.Icons.ManageAccountsRounded,{}),(0,Ze.jsx)(bpt,{typescale:"title",size:"medium",children:r.role.name})]}),(0,Ze.jsxs)(gpt,{children:[(0,Ze.jsx)(f.Icons.ApartmentRounded,{}),(0,Ze.jsx)(bpt,{typescale:"title",size:"medium",children:r.account.name})]})]}),r&&(0,Ze.jsx)(hpt,{children:(0,Ze.jsx)(rpt,{user:r})})]})]})},xpt=(e,n,t,a,r)=>{const i=[{item:(0,Ze.jsx)(Je.A,{id:"pages.surveys.subjects.surveysSent"}),dropdownItems:[{item:(0,Ze.jsx)(Je.A,{id:"pages.surveys.subjects.overview"}),to:"./".concat(n.surveys.sent.overview),isActive:e.includes(n.surveys.sent.overview)},{item:(0,Ze.jsx)(Je.A,{id:"pages.surveys.subjects.contributors"}),to:"./".concat(n.surveys.sent.contributors),isActive:e.includes(n.surveys.sent.contributors)},{item:(0,Ze.jsx)(Je.A,{id:"pages.surveys.subjects.surveys"}),to:"./".concat(n.surveys.sent.surveys),isActive:e.includes(n.surveys.sent.surveys)}].filter(e=>!r||r&&!e.to.includes("contributors"))},{item:(0,Ze.jsx)(f.Badge,{badgeContent:t,anchorRightVerticalCenter:!!t,children:(0,Ze.jsx)(Je.A,{id:"pages.surveys.subjects.surveysReceived"})}),to:"./".concat(n.surveys.received.surveys),isActive:e.includes(n.surveys.received.surveys)}];return a?i:i.slice(1)},Tpt=(e,n,t,a,r,i,o,l,s,c,d)=>{var u,p;const m=null===(u=xpt(e,n,a,l,d))||void 0===u||null===(u=u[0].dropdownItems)||void 0===u?void 0:u.filter(e=>e.isActive&&e.item)[0],f=null==i?void 0:i.owner,y=null==i?void 0:i.survey;return(e.includes(n.surveys.received.surveys)?t?e.includes("response-log")?[{label:"Surveys Received",to:"./".concat(n.surveys.received.surveys)},{label:t,to:e.substring(0,e.lastIndexOf("/response-log"))},{label:"Response log"}]:[{label:"Surveys Received",to:"./".concat(n.surveys.received.surveys)},{label:t}]:[{label:"Surveys Received",to:"./".concat(n.surveys.received.surveys)},{label:(0,Ze.jsx)(Je.A,{id:"pages.surveys.subjects.received"})}]:t&&!e.includes(n.surveys.sent.contributors)?e.includes("survey-log")?[{label:"Surveys Sent",to:"./".concat(n.surveys.sent.overview)},{label:"All Surveys",to:"./".concat(n.surveys.sent.surveys)},{label:t,to:e.substring(0,e.lastIndexOf("/survey-log"))},{label:"Survey log"}]:[{label:"Surveys Sent",to:"./".concat(n.surveys.sent.overview)},{label:"All Surveys",to:"./".concat(n.surveys.sent.surveys)},{label:t}]:r&&e.includes(n.surveys.sent.contributors)&&!e.includes("response-log")?[{to:"./".concat(n.surveys.sent.overview),label:"Surveys sent"},{to:"./".concat(n.surveys.sent.contributors),label:"Contributors"},{label:s||c||r.name}]:i&&e.includes("submission")?[{to:"./".concat(n.surveys.sent.overview),label:"Surveys sent"},{to:"./".concat(n.surveys.sent.contributors),label:"Contributors"},{to:"./".concat(n.surveys.sent.contributors,"/").concat(null==f?void 0:f.id),label:null==f?void 0:f.name},{label:null==y?void 0:y.name}]:e.includes(n.surveys.sent.contributors)&&e.includes("response-log")?[{to:"./".concat(n.surveys.sent.overview),label:"Surveys sent"},{to:"./".concat(n.surveys.sent.contributors),label:"Contributors"},{to:"./".concat(n.surveys.sent.contributors,"/").concat(null==r?void 0:r.id),label:null==r?void 0:r.name},{label:null==o?void 0:o.name,to:"./".concat(n.surveys.sent.contributors,"/").concat(null==r?void 0:r.id,"/submission/").concat(null==o||null===(p=o.submission)||void 0===p?void 0:p.id)},{label:"Response log"}]:[{label:"Surveys Sent",to:"./".concat(n.surveys.sent.overview)},{label:(null==m?void 0:m.item)||(0,Ze.jsx)(Je.A,{id:"pages.surveys.subjects.overview"})}]).filter(e=>!d||d&&(!e.to||!e.to.includes("contributors")||e.to.includes("submission")))},Opt=(e,n,t,a,r)=>{return t&&e.includes(n.surveys.received.surveys)&&!e.includes("response-log")?Jo(t):a&&e.includes(n.surveys.sent.contributors)&&!e.includes("response-log")?Jo(a.name):r&&e.includes("submission")?Jo(null===(i=r.survey)||void 0===i?void 0:i.name):!e.includes(n.surveys.received.surveys)||t||e.includes("response-log")?r||!e.includes(n.surveys.sent.contributors)||e.includes("response-log")?!e.includes(n.surveys.sent.surveys)||t||e.includes("survey-log")?e.includes(n.surveys.sent.surveys)&&t&&!e.includes("survey-log")?Jo(t):e.includes("response-log")?"Response log":e.includes("survey-log")?"Survey log":"Ready made sustainability surveys":"All surveys":"Contributors":"Surveys received";var i},kpt=e=>{const n=e.split("/"),t=e.includes("contributors"),a=e.includes("response-log")&&t?n[n.length-3]:n[n.length-1],r=e.includes("survey-log")?e.match(/\/surveys\/sent\/surveys\/([a-f0-9-]+)\/survey-log/):e.match(/\/surveys\/received\/([a-f0-9-]+)\/response-log/);return r?r[1]:a},jpt=e=>/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/.test(e);var Cpt,Spt,Npt,wpt,Dpt,Apt;function Rpt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ppt=(0,f.styled)("div")(Cpt||(Cpt=Rpt(["\n  display: flex;\n  flex-direction: column;\n"]))),Lpt=(0,f.styled)("div")(Spt||(Spt=Rpt(["\n  padding: 8px 0 16px;\n  width: 100%;\n"]))),Ipt=(0,f.styled)("div")(Npt||(Npt=Rpt(["\n  display: grid;\n  grid-template-columns: repeat(4, minmax(10px, 1fr));\n  gap: 20px;\n  font-family: 'Plus Jakarta Sans';\n\n  @media (min-width: 1367px) and (max-width: 1600px) {\n    grid-template-columns: repeat(3, minmax(10px, 1fr));\n  }\n\n  @media (max-width: 1366px) {\n    grid-template-columns: repeat(2, minmax(10px, 1fr));\n  }\n"]))),Ept=(0,f.styled)("div")(wpt||(wpt=Rpt(["\n  position: absolute;\n  top: 0;\n  left: 16px;\n  right: 4px;\n  display: flex;\n  justify-content: space-between;\n  z-index: 10;\n  font-family: ",";\n  font-size: 12px !important;\n  line-height: 16px;\n\n  span {\n    top: 10px;\n  }\n"])),e=>{let{theme:n}=e;return n.sys.typescale.body.medium.family}),_pt=(0,f.styled)("div")(Dpt||(Dpt=Rpt(["\n  width: 100%;\n"]))),Fpt=(0,f.styled)(rFn.sN)(Apt||(Apt=Rpt(["\n  overflow: -moz-scrollbars-none;\n  scrollbar-width: none;\n  height: 100%;\n\n  & > div:first-child {\n    position: static !important;\n  }\n\n  &::-webkit-scrollbar {\n    display: none;\n  },\n"]))),Bpt=()=>{var e;const n=(0,m.Zp)(),t=rt(),{contributorId:a}=(0,m.g)(),{showNotification:r}=vt(),[i,o,l]=a.split(":"),{data:s,loading:c}=qDn(t,i,o,l),d=(null==s||null===(e=s.getMySurveyContributorById)||void 0===e?void 0:e.surveys)||[],u=(0,g.useCallback)((e,t)=>{if(t&&e.submission)return n("./submission/".concat(e.submission.id));r("This response is not currently in a reviewable state.","warning")},[n,r]),p=c?null:(0,Ze.jsx)(EEn,{});return(0,Ze.jsx)(Ze.Fragment,{children:d.length?(0,Ze.jsx)(Ipt,{children:null==d?void 0:d.map(e=>{var n,t,a;const r=YT(null===(n=e.submission)||void 0===n?void 0:n.status);return(0,Ze.jsx)(f.Card,{subContent:(0,Ze.jsx)(Vj,{deadlineDate:e.deadlineDate,fill:!0}),onClick:()=>u(e,r),title:e.name,children:(0,Ze.jsxs)(Ept,{children:[qT(e)&&(0,Ze.jsx)(XT,{status:null===(t=e.submission)||void 0===t?void 0:t.status,children:WT(null===(a=e.submission)||void 0===a?void 0:a.status)}),(0,Ze.jsx)(uO,{survey:e})]})},e.id)})}):p})};var Upt,Mpt,Vpt;function zpt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Gpt=(0,f.styled)("div")(Upt||(Upt=zpt(["\n  display: flex;\n  height: 100%;\n"]))),$pt=(0,f.styled)("div")(Mpt||(Mpt=zpt(["\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-end;\n  padding: 30px 20px;\n"]))),Wpt=(0,f.styled)(f.Button)(Vpt||(Vpt=zpt(["\n  margin-left: 20px;\n  width: 200px;\n"]))),qpt=e=>{let{survey:n}=e;const{loading:t,isLocked:a,expanded:r,collapse:i,saveSurvey:o,editingUser:l,surveyModel:s,handleSubmit:c,submitButtonDisabled:d,surveyStatusOverride:u}=cIn(n),[p,m]=(0,g.useState)(1===(null==s?void 0:s.pageCount)||!1),f=(0,g.useMemo)(()=>{return d||(e=n.submission)&&(e.status===Vt.ZU.Approved||e.status===Vt.ZU.ReadyForReview)||a||t;var e},[a,t,d,n.submission]);return(0,g.useEffect)(()=>{s&&(s.onCurrentPageChanged.add(e=>{m(e.currentPageNo+1>=e.visiblePageCount)}),s.onValueChanged.add(e=>{m(e.currentPageNo+1>=e.visiblePageCount)}))},[s]),(0,Ze.jsx)(Gpt,{children:(0,Ze.jsx)(xLn,{model:s,onDismiss:i,expanded:r,survey:n,isLocked:a,editingUser:l,saveSurvey:o,readonly:t,statusOverride:u,children:p&&(0,Ze.jsx)($pt,{children:(0,Ze.jsx)(Wpt,{onClick:c,variant:"contained",disabled:f,children:"Submit for review"})})})})},Jpt="contributorId",Ypt=()=>{const e=(0,m.zy)().pathname,n=kpt(e),t=rt(),[a]=(0,p.useSearchParams)(),r=a.get(Jpt),i=_u(),o=(0,g.useMemo)(()=>jpt(e)&&n,[n,e]),{data:l}=Rt(_f,{variables:{id:o,accountId:r||t,userId:(null==i?void 0:i.id)||""},fetchPolicy:"no-cache",keepErrorAfterUnmount:!0});return l&&(0,Ze.jsx)(qpt,{survey:l.getReceivedSurveyById})},Hpt=()=>{const e=(0,m.zy)().pathname,n=kpt(e),t=_u(),a=(0,g.useMemo)(()=>jpt(e)&&n,[n,e]),r=rt(),{data:i}=(0,h.IT)(_f,{variables:{id:a,accountId:r,userId:(null==t?void 0:t.id)||""},fetchPolicy:"no-cache"});return i?(0,Ze.jsx)(TIn,{survey:i.getReceivedSurveyById}):null};var Kpt,Qpt;function Zpt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Xpt=(0,f.styled)("div")(Kpt||(Kpt=Zpt(["\n  display: flex;\n  align-items: center;\n"]))),emt=(0,f.styled)("div")(Qpt||(Qpt=Zpt(["\n  position: relative;\n  margin-left: auto;\n  margin-right: 10px;\n  margin-bottom: auto;\n  justify-content: flex-end;\n  font-size: 1em;\n"])));function nmt(e){let{survey:n,withContributorTagging:t,withShowAnalysis:a,surveyLoader:r}=e;return(0,Ze.jsx)(Xpt,{children:(0,Ze.jsx)(emt,{children:(0,Ze.jsx)(aIn,{deadlineDate:n.deadlineDate,survey:n,withContributorTagging:t,withShowAnalysis:a,surveyLoader:r})})})}var tmt,amt,rmt,imt,omt,lmt,smt;function cmt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const dmt=(0,f.styled)(f.Text)(tmt||(tmt=cmt(["\n  margin-bottom: 12px;\n"]))).withComponent("h3"),umt=(0,f.styled)("div")(amt||(amt=cmt(["\n  display: flex;\n  flex-flow: wrap;\n  width: 100%;\n"]))),pmt=((0,f.styled)(umt)(rmt||(rmt=cmt(["\n  display: flex;\n  flex-flow: nowrap;\n"]))),(0,f.styled)("div")(imt||(imt=cmt(["\n  padding: 8px 12px;\n  flex: 1;\n  border: 1px solid ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.secondaryContainer}));var mmt,fmt,ymt,gmt;function bmt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(0,f.styled)(pmt)(omt||(omt=cmt(["\n  overflow: hidden;\n  flex: 0 1 50%;\n"]))),(0,f.styled)(pmt)(lmt||(lmt=cmt(["\n  display: flex;\n  flex-flow: column nowrap;\n  flex: 0 1 50%;\n  border-left: 0;\n"]))),(0,f.styled)(pmt)(smt||(smt=cmt(["\n  display: flex;\n  padding: 32px 20px 20px;\n  border-top: 0;\n"])));const hmt=(0,f.styled)("div")(mmt||(mmt=bmt(["\n  display: flex;\n  flex-direction: column;\n  pointer-events: none;\n"]))),vmt=(0,f.styled)("div")(fmt||(fmt=bmt(["\n  display: flex;\n  gap: 8px;\n"]))),xmt=(0,f.styled)("div")(ymt||(ymt=bmt(["\n  width: 100%;\n  display: flex;\n  justify-content: space-between;\n"]))),Tmt=(0,f.styled)(f.Text)(gmt||(gmt=bmt(["\n  text-decoration: underline;\n  cursor: pointer;\n"]))),Omt=e=>{let{categoryScore:n,withDetailedBreakdownLink:t}=e;const a=(0,f.useTheme)(),r=n.score/n.maxScore*100,i=(n.maxDataCompleteness-n.missingDataCount)/n.maxDataCompleteness*100,o=e=>e>sBn?{text:a.palette.success.main,progress:"success"}:e>cBn?{text:a.ref.palette.warning[70],progress:"warning"}:{text:a.palette.error.main,progress:"error"};return(0,Ze.jsxs)(hmt,{children:[(0,Ze.jsxs)(xmt,{children:[(0,Ze.jsx)(f.Text,{weight:600,children:n.categoryName}),t&&(0,Ze.jsx)(Tmt,{onClick:e=>{e.preventDefault(),e.stopPropagation()},children:"Detailed breakdown"})]}),(0,Ze.jsxs)(vmt,{children:[(0,Ze.jsx)(f.CircularProgress,{color:o(r).progress,textProps:{color:o(r).text,weight:600},mode:"simple-right",value:r,additionalText:"score"}),(0,Ze.jsx)(f.CircularProgress,{mode:"simple-right",value:i,additionalText:"data completeness"})]})]})};var kmt,jmt,Cmt=t(48835);function Smt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Nmt=(0,f.styled)("div")(kmt||(kmt=Smt(["\n  padding: 10px 0px;\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n"]))),wmt=(0,f.styled)(f.Text)(jmt||(jmt=Smt(["\n  display: flex;\n  align-items: center;\n  gap: 4px;\n  margin-top: 16px;\n"]))),Dmt=e=>e.scores.length?(0,Ze.jsx)(f.Modal,{open:!0,title:e.contributorName,onClose:e.onClose,children:(0,Ze.jsx)(Nmt,{children:e.scores.map((n,t)=>(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)("div",{children:[(0,Ze.jsx)(Omt,{categoryScore:n}),n.childCategoryScores.length>0&&(0,Ze.jsxs)(wmt,{children:["Breakdown ",(0,Ze.jsx)(f.Icons.PieChart,{fontSize:"small"})]}),(0,Ze.jsx)(Nmt,{children:n.childCategoryScores.map(e=>(0,Ze.jsx)(Omt,{categoryScore:e},e.categoryName))})]},n.categoryName),t!==e.scores.length-1&&(0,Ze.jsx)(Cmt.A,{})]}))})}):(0,Ze.jsx)(Ze.Fragment,{children:"-"});var Amt,Rmt,Pmt,Lmt;function Imt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Emt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Imt(Object(t),!0).forEach(function(n){_mt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Imt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _mt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Fmt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Bmt=(0,f.styled)(f.AgGrid)(Amt||(Amt=Fmt(["\n  flex: 1;\n  height: 480px;\n  padding-bottom: 2px; // border bottom and shadow to show properly\n\n  & .ag-paging-panel {\n    justify-content: flex-start;\n  }\n\n  && .ag-row:hover {\n    cursor: pointer;\n  }\n\n  &&& .ag-row .ag-cell:first-child {\n    padding-left: 12px;\n  }\n"]))),Umt=(0,f.styled)("div")(Rmt||(Rmt=Fmt(["\n  padding: 8px 4px;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 8px;\n"]))),Mmt=(0,f.styled)(f.Text)(Pmt||(Pmt=Fmt(["\n  text-decoration: underline;\n  cursor: pointer;\n"]))),Vmt=(0,f.styled)("div")(Lmt||(Lmt=Fmt(["\n  padding: 10px 0px;\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n"]))),zmt={filter:!1,sortable:!1,suppressFiltersToolPanel:!0,suppressHeaderMenuButton:!0},Gmt="score",$mt=e=>{let{scores:n}=e;const t=null==n?void 0:n.some(e=>e.childCategoryScores.length>0);return n&&n.length?(0,Ze.jsx)(Vmt,{children:n.map((e,n)=>(0,Ze.jsx)(Omt,{categoryScore:e,withDetailedBreakdownLink:0===n&&t},e.categoryName))}):(0,Ze.jsx)(Ze.Fragment,{children:"-"})},Wmt=e=>{let{keyMetrics:n}=e;return n&&n.length?(0,Ze.jsx)(Vmt,{children:n.map(e=>(0,Ze.jsxs)("div",{children:[(0,Ze.jsxs)(f.Text,{weight:600,children:[e.label,":"]})," ",(0,Ze.jsx)(f.Text,{children:(0,zt.capitalize)(e.value)||"-"})]},e.label))}):(0,Ze.jsx)(Ze.Fragment,{children:"-"})},qmt=e=>e.data.contributor.account.id,Jmt=e=>{var n,t;return Boolean(null===(n=e.event)||void 0===n||null===(n=n.target)||void 0===n||null===(t=n.closest)||void 0===t?void 0:t.call(n,'div[col-id="'.concat(Gmt,'"]')))},Ymt=e=>e.user?"".concat(e.user.first_name," ").concat(e.user.last_name," (").concat(e.user.email,")"):e.userGroup?e.userGroup.name:e.account?e.account.name:"-",Hmt=e=>{var n;let{submissionDetails:t,survey:a,onResponseDeleted:r,surveyLoader:i}=e;const{showNotification:o}=vt(),l=(0,m.Zp)(),[s,c]=(0,g.useState)(null),d=rt(),u=_u(),p=(null==u||null===(n=u.role)||void 0===n||null===(n=n.permissions)||void 0===n?void 0:n.survey)||[],y=p.includes("setSurveySubmissionChild")||p.includes("setSurveySubmissionAll"),b=p.includes("deleteSurveySubmissionChild")||p.includes("deleteSurveySubmissionAll"),h=!a.isIndividualContributor&&!a.isUserGroupContributor,v=a.automatedScoring,x=t.some(e=>{var n;return null===(n=e.keyMetrics)||void 0===n?void 0:n.length}),[T,O]=(0,g.useState)(null),[k,j]=(0,g.useState)(null),[C,{loading:S}]=function(e,n){const{showNotification:t}=vt();return(0,Ot.n)(BAn,{onCompleted:()=>{t("Survey response has been deleted.","success"),null==n||n()},onError:e=>{t("Something went wrong. If the problem persists, contact support. ".concat(e),"danger")}})}(a.id,()=>{i.load()}),N=(0,g.useCallback)((e,n)=>{j({submissionId:e,contributorName:n})},[j]),w=(0,g.useCallback)(async()=>{k&&(await C({variables:{submissionId:k.submissionId}}),null==r||r(k.submissionId),j(null))},[k,C,r]),D=(0,g.useCallback)(e=>{var n,t;const r=Jmt(e),i=null===(n=e.data.contributor)||void 0===n||null===(n=n.surveys)||void 0===n||null===(n=n.find(e=>e.id===a.id))||void 0===n?void 0:n.lockedBy,s=!!i&&i.id!==(null==u?void 0:u.id);if(!(null===(t=e.data.scores)||void 0===t?void 0:t.some(e=>e.childCategoryScores.length>0))||!r)return y?s?c(i):e.data.reviewable&&e.data.submission.id?l("../sent/contributors/".concat(e.data.contributor.account.id,"/submission/").concat(e.data.submission.id)):l("../received/".concat(a.id,"?").concat(Jpt,"=").concat(e.data.contributor.account.id)):void o("You don't have the correct permission to complete this survey.","warning")},[l,a.id,y,o,u]),A=(0,g.useCallback)(e=>{var n;const t=Jmt(e);(null===(n=e.data.scores)||void 0===n?void 0:n.some(e=>e.childCategoryScores.length>0))&&t||(e.data.reviewable?l("../sent/contributors/".concat(e.data.contributor.account.id,"/submission/").concat(e.data.submission.id)):o("The response of ".concat(Ymt(e.data.contributor)," is not currently in a reviewable state."),"warning"))},[l,o]),R=(0,g.useCallback)(e=>{const n={data:e,event:void 0};return h?D(n):A(n)},[A,D,h]),P=(0,g.useMemo)(()=>({status:e=>{var n,t;let{data:a}=e;return(0,Ze.jsx)(NPn,{typescale:"body",size:"medium",status:null===(n=a.submission)||void 0===n?void 0:n.status,children:WT(null===(t=a.submission)||void 0===t?void 0:t.status)})},actions:e=>{var n,t;let{data:a}=e;const r=Ymt(a.contributor),i=null===(n=a.submission)||void 0===n?void 0:n.id,o=h?a.reviewable?"Review":"Complete":"Open",l=!!h||a.reviewable,s=b&&(null===(t=a.submission)||void 0===t?void 0:t.status);return(0,Ze.jsxs)(Umt,{children:[l&&(0,Ze.jsx)(Mmt,{typescale:"body",size:"medium",onClick:e=>{e.stopPropagation(),R(a)},children:o}),s&&(0,Ze.jsx)(Mmt,{typescale:"body",size:"medium",onClick:e=>{e.stopPropagation(),N(i,r)},children:"Delete"}),!l&&!s&&(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:"-"})]})}}),[b,N,R,h]),L=(0,g.useMemo)(()=>({defaultColDef:zmt,getRowId:qmt,components:P,rowData:t,pagination:!1,suppressMovableColumns:!0,maintainColumnOrder:!0,getRowHeight:e=>{var n,t;const a=(null===(n=e.data.keyMetrics)||void 0===n?void 0:n.length)||0,r=(null===(t=e.data.scores)||void 0===t?void 0:t.length)||0,i=40*r+8*(r-1)+20,o=40*a+8*(a-1)+20;return Math.max(i,o,40)},columnDefs:[{colId:"name",headerName:"Name",valueGetter:e=>{let{data:{contributor:n}}=e;return Ymt(n)},sort:"asc",comparator:ka,minWidth:100},{colId:"status",headerName:"Response status",cellRenderer:"status",maxWidth:160},{colId:"keyMetrics",headerName:"Key metrics",field:"keyMetrics",cellRenderer:e=>(0,Ze.jsx)(Wmt,{keyMetrics:e.value}),minWidth:250,hide:!x},{colId:Gmt,headerName:"Score",field:"scores",cellRenderer:e=>(0,Ze.jsx)($mt,{scores:e.value}),onCellClicked:e=>{var n;(null===(n=e.value)||void 0===n?void 0:n.some(e=>e.childCategoryScores.length>0))&&O({scores:e.value,contributorName:Ymt(e.data.contributor)})},minWidth:300,hide:!v},{colId:"actions",headerName:"Actions",minWidth:200,cellRenderer:"actions"}]}),[t,v,x,P]),I=(0,g.useMemo)(()=>t.reduce((e,n)=>"".concat(e,"-").concat(n.contributor.user?n.contributor.user.id:n.contributor.account.id),""),[t]);return t?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Bmt,{gridOptions:L,gridKey:"surveyContributorsResponseGridV2"},"".concat(d,"-").concat(I)),T&&(0,Ze.jsx)(Dmt,Emt(Emt({},T),{},{onClose:()=>O(null)})),(0,Ze.jsx)(Z$,{open:Boolean(k),onClose:()=>j(null),onConfirm:async()=>{await w()},title:"Delete response",body:k?"This will delete the survey response for ".concat(k.contributorName,". Do you want to proceed?"):"",confirmButtonText:"Delete",disabled:S}),(0,Ze.jsx)(PFn,{open:Boolean(s),onClose:()=>c(null),lockedBy:s})]}):null},Kmt=e=>{let{survey:n,surveyLoader:t}=e;const a=!n.isIndividualContributor&&!n.isUserGroupContributor,r=n.isIndividualContributor&&!n.isUserGroupContributor,i=!n.isIndividualContributor&&n.isUserGroupContributor,o=(0,g.useMemo)(()=>(n.contributors||[]).map(e=>{var t;const o=n.submissions.find(n=>{return a?n.owner.id===e.account.id:r?n.userId===(null===(t=e.user)||void 0===t?void 0:t.id):!!i&&n.userGroupId===(null===(o=e.userGroup)||void 0===o?void 0:o.id);var t,o}),l=YT(null==o?void 0:o.status),s=o&&l&&n.automatedScoring?((e,n)=>{const t={},a={},r={},i={},o=()=>({score:0,maxScore:0,missingDataCount:0,maxDataCompleteness:0,notApplicableCount:0,didAnswerAtLeastOneQuestion:!1,childCategoryScores:{}});for(const n of(null==e||null===(l=e.template)||void 0===l?void 0:l.questions)||[]){var l,s,c;if(a[n.id]=n,!n)continue;const e=null===(s=n.category)||void 0===s||null===(s=s.parentCategory)||void 0===s?void 0:s.name,d=null===(c=n.category)||void 0===c?void 0:c.name,u=n.options||[];if(!d||!u.length)continue;e||t[d]||(t[d]=o()),e&&!t[e]&&(t[e]=o()),e&&t[e]&&!t[e].childCategoryScores[d]&&(t[e].childCategoryScores[d]=o());const p=u.reduce((e,t)=>((0,zt.set)(r,[n.id,t.name],t),Math.max(e,t.score||0)),0);i[n.id]=p,e?(t[e].maxScore+=p,t[e].childCategoryScores[d].maxScore+=p):t[d].maxScore+=p}const d=(e,n,t,a)=>{if(e[n].didAnswerAtLeastOneQuestion=!0,e[n].score+=t.score||0,e[n].maxDataCompleteness+=1,t.isDataMissingMarker&&(e[n].missingDataCount+=1),t.isNotApplicableMarker){const t=i[a];e[n].maxScore-=t,e[n].notApplicableCount+=1}};for(const e of n.answers){var u,p,m;const n=a[e.questionId];if(!n)continue;const i=null===(u=n.category)||void 0===u||null===(u=u.parentCategory)||void 0===u?void 0:u.name,o=null===(p=n.category)||void 0===p?void 0:p.name,l=e.answer.replace(/"/g,""),s=n.id,c=null===(m=r[s])||void 0===m?void 0:m[l];o&&c&&(!i&&t[o]&&d(t,o,c,s),i&&t[i]&&(d(t,i,c,s),t[i].childCategoryScores[o]&&d(t[i].childCategoryScores,o,c,s)))}return Object.entries(t).forEach(e=>{let[n,a]=e;0!==a.maxScore&&a.didAnswerAtLeastOneQuestion?Object.entries(a.childCategoryScores).forEach(e=>{let[n,t]=e;0!==t.maxScore&&t.didAnswerAtLeastOneQuestion||delete a.childCategoryScores[n]}):delete t[n]}),Object.entries(t).map(e=>{let[n,t]=e;return oBn(oBn({categoryName:n},t),{},{didAnswerAtLeastOneQuestion:void 0,childCategoryScores:Object.entries(t.childCategoryScores).map(e=>{let[n,t]=e;return oBn(oBn({categoryName:n},(0,zt.omit)(t,"childCategoryScores")),{},{didAnswerAtLeastOneQuestion:void 0})})})})})(n,o):null,c=my()(n.template.questions||[],"id"),d=(null==o||null===(t=o.answers)||void 0===t||null===(t=t.reduce((e,n)=>{var t;const a=c[n.questionId];if(!a||!a.isKeyMetric)return e;const r=n.answer.replace(/"/g,"");return[...e,{label:null===(t=c[n.questionId])||void 0===t?void 0:t.title,value:r}]},[]))||void 0===t?void 0:t.sort((e,n)=>e.label.localeCompare(n.label)))||[];return{contributor:e,submission:o,reviewable:l,scores:s,keyMetrics:d}}),[n,a,r,i]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(dmt,{typescale:"title",size:"medium",children:"Response by contributor"}),(0,Ze.jsx)(Hmt,{submissionDetails:o,survey:n,surveyLoader:t})]})};function Qmt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Zmt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qmt(Object(t),!0).forEach(function(n){Xmt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qmt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Xmt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function eft(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function nft(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?eft(Object(t),!0).forEach(function(n){tft(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):eft(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function tft(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const aft=nft(nft({},Zmt(Zmt({},rBn),{},{legend:Zmt(Zmt({},rBn.legend),{},{labelFormatter:function(){return this.name.replace(/: .+?$/,"")}})})),{},{title:{text:""},chart:{height:350,reflow:!0},plotOptions:{pie:{showInLegend:!0,dataLabels:{enabled:!1}}},legend:{align:"center",layout:"horizontal",verticalAlign:"bottom",margin:30,itemStyle:{fontSize:"1.27em",fontWeight:"normal"}},tooltip:{enabled:!1},credits:{enabled:!1}});function rft(e){let{contributors:n,submissions:t,isIndividualContributor:a,isUserGroupContributor:r}=e;const i=(0,f.useTheme)(),o=(e=>{let{contributors:n,submissions:t,isIndividualContributor:a,isUserGroupContributor:r}=e,i="";i=a?"userId":r?"userGroupId":"owner.id";const o=(0,zt.keyBy)(t,i),l=(n||[]).map(e=>{var n;let{account:t,user:i,userGroup:l}=e,s="";return s=a?(null==i?void 0:i.id)||"":r?(null==l?void 0:l.id)||"":t.id,null===(n=o[s])||void 0===n?void 0:n.status});return(0,zt.countBy)(l)})({contributors:n,submissions:t,isIndividualContributor:a,isUserGroupContributor:r}),l=(0,g.useMemo)(()=>Object.entries(o).map(e=>{let[n,t]=e;return{value:t,name:CPn(n),color:jPn(i,n)}}),[o,i]);return(0,Ze.jsx)(f.PieChart,{noDataStateSuppressSuggestion:!0,size:f.ChartSize.Fluid,customOptions:aft,unit:"submission(s)",data:l,border:!1})}var ift,oft,lft,sft;function cft(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function dft(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function uft(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dft(Object(t),!0).forEach(function(n){pft(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dft(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function pft(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const mft=(e,n)=>e>cBn&&e<sBn?n.customColors.warning.color:e>sBn?n.extendedColors.environmental.color:e<cBn?n.sys.color.error:n.customColors.warning.color,fft=(0,f.styled)(f.Text)(ift||(ift=cft(["\n  margin-top: 8px;\n  flex: 1;\n"]))),yft=(0,f.styled)(f.Text)(oft||(oft=cft(["\n  margin-top: 8px;\n  text-align: right;\n"]))),gft=(0,f.styled)("div")(lft||(lft=cft(["\n  width: 100%;\n  display: flex;\n  flex-flow: wrap;\n"]))),bft=(0,f.styled)("div")(sft||(sft=cft([""])));function hft(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vft(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hft(Object(t),!0).forEach(function(n){xft(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hft(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xft(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Tft,Oft,kft,jft;function Cft(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function Sft(e){let{survey:n}=e;const{contributors:t,submissions:a,isIndividualContributor:r,isUserGroupContributor:i}=n;return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(dmt,{typescale:"title",size:"medium",children:"Response status"}),(0,Ze.jsx)(rft,{contributors:t,submissions:a,isIndividualContributor:r,isUserGroupContributor:i})]})}vft(vft({},rBn),{},{chart:vft(vft({},rBn.chart),{},{type:"column"}),plotOptions:{column:{groupPadding:0,maxPointWidth:70}}}),(0,f.styled)(function(e){let{text:n,totals:t}=e;const a=(0,f.useTheme)(),r=(0,g.useRef)(null),i=t[0]>0?t[0]/t[1]*100:0,o=(0,g.useMemo)(()=>((e,n)=>uft(uft({},rBn),{},{chart:uft(uft({},rBn.chart),{},{type:"bar",height:14,spacing:[0,0,0,0]}),plotOptions:{bar:{showInLegend:!1}},xAxis:{visible:!1},yAxis:{visible:!1,max:100},series:[{data:[100],type:"bar",grouping:!1,color:n.sys.color.primaryContainer,borderRadius:6},{data:[e],color:mft(e,n),type:"bar",borderRadius:6}]}))(i,a),[a,i]);return(0,Ze.jsxs)(bft,{children:[(0,Ze.jsx)(gBn(),{highcharts:fBn(),options:o,ref:r}),(0,Ze.jsxs)(gft,{children:[(0,Ze.jsx)(fft,{typescale:"body",size:"medium",color:"normal",children:n}),(0,Ze.jsxs)(yft,{typescale:"body",size:"medium",color:"normal",children:[t[0]," / ",t[1]]})]})]})})(Tft||(Tft=Cft(["\n  flex: 0 0 50%;\n  margin: 10px 0;\n  text-transform: capitalize;\n"]))),(0,f.styled)("div")(Oft||(Oft=Cft(["\n  display: flex;\n  flex-direction: column;\n  align-items: stretch;\n"]))),(0,f.styled)("div")(kft||(kft=Cft(["\n  margin-bottom: 12px;\n  padding: 12px;\n  background: #00c8b511;\n  color: #45b7ad;\n  border-radius: 12px;\n"]))),(0,f.styled)(ek)(jft||(jft=Cft(["\n  margin-right: 12px;\n  vertical-align: middle;\n"])));const Nft=(0,g.memo)(function(e){let{survey:n}=e;return(0,Ze.jsx)(Sft,{survey:n})});var wft,Dft;function Aft(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Rft=(0,f.styled)("div")(wft||(wft=Aft(["\n  font-family: ",";\n  height: 100%;\n"])),e=>{let{theme:n}=e;return n.sys.typescale.label.small.family}),Pft=(0,f.styled)(f.Text)(Dft||(Dft=Aft(["\n  margin-bottom: 12px;\n"])));function Lft(e){var n,t,a;let{surveyLoader:r,latest:i=!0}=e;const o=_u(),l=Boolean(null===(n=r.survey)||void 0===n?void 0:n.dashboardId),s=(null==o?void 0:o.accessLevel)===Vt.HG.Tag&&0===(null===(t=r.survey)||void 0===t?void 0:t.contributors.length),c=null==o?void 0:o.role.permissions.survey.some(e=>["setSurveyContributorTagAll","setSurveyContributorTagParent","setSurveyContributorTagChild"].includes(e)),d=(null==o?void 0:o.accessLevel)===Vt.HG.Account&&c;return(0,g.useEffect)(()=>(r.survey||r.loading||r.load(),()=>{r.reset()}),[]),r.loading?(0,Ze.jsx)(f.Loader,{}):r.survey?(0,Ze.jsxs)(Rft,{children:[(0,Ze.jsx)(Pft,{typescale:"title",size:"large",children:null===(a=r.survey)||void 0===a?void 0:a.name}),s?(0,Ze.jsx)(f.Text,{typescale:"title",children:"You have no access to this survey"}):(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Nft,{survey:r.survey}),(0,Ze.jsx)(nmt,{survey:r.survey,latest:i,withContributorTagging:d,withShowAnalysis:l,surveyLoader:r}),(0,Ze.jsx)(Kmt,{survey:r.survey,surveyLoader:r})]})]}):(0,Ze.jsx)(EEn,{})}const Ift=g.memo(e=>{let{surveys:n,index:t,handleSurveyClick:a}=e;const r=(0,g.useMemo)(()=>n[t],[n,t]);return r?(0,Ze.jsxs)(_pt,{children:[(0,Ze.jsx)(f.Card,{subContent:(0,Ze.jsx)(Vj,{deadlineDate:r.deadlineDate,fill:!0}),onClick:()=>a(r.id),title:r.name,subTitle:qT(r)?"From ".concat(r.owner.name):" ",children:(0,Ze.jsxs)(Ept,{children:[qT(r)&&(0,Ze.jsx)(XT,{status:r.submissions[0].status,children:WT(r.submissions[0].status)}),(0,Ze.jsx)(uO,{survey:r})]})}),t===n.length-1&&(0,Ze.jsx)("div",{id:"sentinel"})]},r.id):null}),Eft=["style","children"];function _ft(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Fft(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_ft(Object(t),!0).forEach(function(n){Bft(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_ft(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Bft(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Uft=g.memo(e=>{let{surveys:n,handleSurveyClick:t}=e;const a=(0,g.useMemo)(()=>{const e={List:(0,g.forwardRef)((e,n)=>{let{style:t,children:a}=e,r=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,Eft);return(0,Ze.jsx)(Ipt,Fft(Fft({ref:n},r),{},{style:Fft({},t),children:a}))})};return e.List.displayName="List",e},[]),r=(0,g.useCallback)(e=>(0,Ze.jsx)(Ift,{index:e,surveys:n,handleSurveyClick:t}),[t,n]);return(0,Ze.jsx)(Fpt,{totalCount:n.length,components:a,itemContent:r})});function Mft(){const e=rt(),[n,t]=(0,g.useState)([]),[a,r]=(0,g.useState)(1),[i,o]=(0,g.useState)(1),[l,s]=(0,g.useState)(""),[c]=(0,oE.useDebounce)(l,600),d=XAn((0,g.useMemo)(()=>({accountId:e,offset:20*(i-1),limit:20,filters:{search:{field:["name"],value:c}}}),[e,i,c])),u=(0,m.Zp)(),p=(0,g.useCallback)(e=>u("./".concat(e)),[u]);(0,g.useEffect)(()=>{var e;null!=d&&null!==(e=d.data)&&void 0!==e&&null!==(e=e.getSurveysPage)&&void 0!==e&&e.totalRows&&!d.loading&&(r(Math.ceil(d.data.getSurveysPage.totalRows/20)),t(e=>{var n;return[...e,...(null==d||null===(n=d.data)||void 0===n||null===(n=n.getSurveysPage)||void 0===n?void 0:n.rows)||[]]}))},[d.loading]),(0,g.useEffect)(()=>{var e,n;null!=d&&null!==(e=d.data)&&void 0!==e&&e.getSurveysPage&&!d.loading&&c&&(r(Math.ceil(d.data.getSurveysPage.totalRows/20)),t((null==d||null===(n=d.data)||void 0===n||null===(n=n.getSurveysPage)||void 0===n?void 0:n.rows)||[]))},[d.loading,c]),(0,g.useEffect)(()=>{t([]),o(1)},[c,e]);const y=(0,g.useMemo)(()=>(0,zt.throttle)(()=>{d.loading||o(e=>e+1)},400,{trailing:!1}),[d.loading]),b=(0,g.useMemo)(()=>(0,zt.throttle)(()=>{const e=window.innerHeight+window.scrollY>=document.body.offsetHeight;!d.loading&&a>i&&e&&y()},400,{leading:!1}),[a,i,d.loading,y]);(0,g.useEffect)(()=>(window.addEventListener("scroll",b),()=>{b.cancel(),window.removeEventListener("scroll",b)}),[b]);const h=(0,g.useCallback)(e=>{s(e.target.value)},[s]),v=d.loading?null:(0,Ze.jsx)(EEn,{});return(0,Ze.jsxs)(Ppt,{children:[(0,Ze.jsx)(Lpt,{children:(0,Ze.jsx)(f.TextField,{name:"ConfigurationAccountsContainer__Controls__Search",type:"search",value:l,onChange:h,error:!1,placeholder:"Search"})}),n.length?(0,Ze.jsx)(Uft,{surveys:n,handleSurveyClick:p}):v]})}var Vft,zft,Gft,$ft,Wft,qft,Jft;function Yft(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Hft(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Yft(Object(t),!0).forEach(function(n){Kft(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Yft(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Kft(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Qft(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Zft=(0,Ge.default)("div")(Vft||(Vft=Qft(["\n  position: relative;\n  height: 100%;\n  overflow: hidden;\n"]))),Xft=(0,f.styled)("div")(zft||(zft=Qft(["\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 2;\n  background-color: ",";\n  opacity: 0.5;\n  width: 100%;\n  height: 100%;\n"])),e=>e.theme.sys.color.onSecondary),eyt=(0,Ge.default)("div")(Gft||(Gft=Qft(["\n  height: 100%;\n  display: flex;\n  gap: 40px;\n"]))),nyt=(0,f.styled)("div")($ft||($ft=Qft(["\n  flex: 1 1 auto;\n  background-color: ",";\n  height: 100%;\n"])),e=>e.theme.sys.color.onSecondary),tyt=(0,Ge.default)(f.Grid)(Wft||(Wft=Qft(["\n  display: flex;\n  flex: 1;\n  gap: 16px;\n  justify-content: flex-end;\n  align-items: center;\n"]))),ayt=(0,Ge.default)(f.Grid)(qft||(qft=Qft(["\n  & > button,\n  & > a {\n    width: 100%;\n    min-width: 190px;\n    max-height: 44px;\n  }\n"]))),ryt=(0,Ge.default)(Tn)(Jft||(Jft=Qft(["\n  margin-bottom: ",";\n  z-index: 3;\n  position: relative;\n"])),e=>e.theme.geometry.md.spacing),iyt=["template","submissions","owner","contributors"],oyt=e=>{var n,t,a,r,i;let{applicationData:{getAccountInfo:o,getUserInfoById:l,getReceivedSurveysPage:s}}=e;const c=oc(),d=(0,m.zy)().pathname,u=kpt(d),p=rt(),y=_u(),[b,h]=(0,g.useState)(!1),[v,x]=(0,g.useState)(!1),T=d.includes(c.surveys.sent.overview),O=(0,g.useMemo)(()=>jpt(d)&&u,[u,d]),k=T||O,j=null==y?void 0:y.role.permissions.survey.some(e=>["createSurveyAll","createSurveyParent","createSurveyChild"].includes(e)),C=(null==y?void 0:y.accessLevel)===Vt.HG.Tag,S=d.includes("submission"),N=d.includes(c.surveys.sent.contributors),[w,D,A]=N&&!S&&O?O.split(":"):"",{data:R}=WDn(p,w,D,A),P=null==R||null===(n=R.getMySurveyContributorById)||void 0===n?void 0:n.account,L=null!=R&&null!==(t=R.getMySurveyContributorById)&&void 0!==t&&t.user&&Boolean(D)?"".concat(null==R?void 0:R.getMySurveyContributorById.user.first_name," ").concat(R.getMySurveyContributorById.user.last_name):"",I=null!=R&&null!==(a=R.getMySurveyContributorById)&&void 0!==a&&a.userGroup&&Boolean(A)?null==R?void 0:R.getMySurveyContributorById.userGroup.name:"",E=null==R||null===(r=R.getMySurveyContributorById)||void 0===r||null===(r=r.surveys)||void 0===r?void 0:r.find(e=>e.id===(e=>{const n=e.split("/");return e.includes("contributors")?n[n.length-1]:""})(d)),_=KAn({id:O,fields:iyt}),F=O||T,B=S?O:"",{submission:U,expand:M,survey:V}=OIn(B||""),z=(0,g.useMemo)(()=>p5n(s.rows),[s]),G=F?null===(i=_.survey)||void 0===i?void 0:i.name:null,$=o.accessControls.surveys,W=l.role.permissions.survey.some(e=>e.startsWith("getSurveys")),q=l.role.permissions.survey.some(e=>e.startsWith("getReceivedSurveys")),J=(0,g.useCallback)(()=>h(e=>!e),[]),Y=(0,g.useCallback)(()=>x(e=>!e),[]),H=d.includes("log"),K=(0,g.useMemo)(()=>N&&!S||H?"":S?(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(APn,{expand:M}),(0,Ze.jsx)(xIn,{children:(0,Ze.jsx)(aIn,{survey:Hft(Hft({},V),{},{submission:U})})})]}):d.includes("received")?(0,Ze.jsx)(Hpt,{}):C||!j?null:(0,Ze.jsxs)(tyt,{wrap:"wrap",container:!0,spacing:2,children:[k&&(0,Ze.jsx)(ayt,{size:{xs:12,lg:5.5},children:(0,Ze.jsx)(f.Button,{variant:"outlined",onClick:J,children:"Edit survey"})}),(0,Ze.jsx)(ayt,{size:{xs:12,lg:5.5},children:(0,Ze.jsx)(f.Button,{variant:"contained",onClick:Y,startIcon:(0,Ze.jsx)(f.Icons.Add,{}),children:"Create a survey"})})]}),[H,M,k,V,d,U,S,N,J,Y,C,j]),Q=(0,g.useMemo)(()=>({content:Opt(d,c,G,P,U),crumbs:Tpt(d,c,G,z,P,U,E,W,L,I,C),actionButton:K}),[d,c,G,P,U,E,z,K,W,L,I,C]);return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(Zft,{children:[!$&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Xft,{}),(0,Ze.jsx)(ryt,{name:"FormsContainer_Access_NotificationBanner",icon:"exclamation-triangle",color:"danger",title:"Surveys",body:"Currently Surveys are not included in your subscription, if you’d like access to Surveys please contact Rio AI Ltd or get in touch with your Business Admin."})]}),(0,Ze.jsx)(f.Page,{title:Q,children:(0,Ze.jsxs)(eyt,{children:[(0,Ze.jsx)(f.NavigationDrawer,{items:xpt(d,c,z,W,C)}),(0,Ze.jsx)(nyt,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:c.surveys.sent.overview,element:W?(0,Ze.jsx)(Lft,{surveyLoader:_,latest:!0}):null}),(0,Ze.jsx)(m.qh,{path:c.surveys.sent.contributors,element:$Dn(cPn,W)}),(0,Ze.jsx)(m.qh,{path:c.surveys.sent.contributor,element:$Dn(Bpt,W)}),(0,Ze.jsx)(m.qh,{path:c.surveys.sent.contributorAuditLog,element:$Dn(FRn,W)}),(0,Ze.jsx)(m.qh,{path:c.surveys.sent.submission,element:$Dn(SIn,W)}),(0,Ze.jsx)(m.qh,{path:c.surveys.sent.surveys,element:$Dn(Mft,W)}),(0,Ze.jsx)(m.qh,{path:c.surveys.sent.survey,element:W?(0,Ze.jsx)(Lft,{surveyLoader:_,latest:!1}):null}),(0,Ze.jsx)(m.qh,{path:c.surveys.received.surveys,element:$Dn(zFn,q)}),(0,Ze.jsx)(m.qh,{path:c.surveys.received.survey,element:$Dn(Ypt,q)}),(0,Ze.jsx)(m.qh,{path:c.surveys.sent.auditLog,element:$Dn(rRn,W)}),(0,Ze.jsx)(m.qh,{path:c.surveys.received.auditLog,element:$Dn(LRn,q)}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(Xg,{})})]})})]})})]}),(0,Ze.jsx)(Z_n,{survey:_.survey,refetch:_.load,action:{editModalShown:b,createModalShown:v,toggleEditModal:J,toggleCreateModal:Y}})]})};var lyt;const syt=(0,f.styled)("div")(lyt||(lyt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  margin-top: 32px;\n  display: flex;\n  flex-direction: row;\n  gap: 16px;\n  justify-content: flex-end;\n"]))),cyt=e=>{let{onDismissClick:n,onConfirmClick:t,deleteObjectName:a,open:r}=e;return(0,Ze.jsxs)(f.Modal,{open:r,onClose:n,title:"Delete ".concat((0,zt.capitalize)(a)),children:[(0,Ze.jsxs)(f.Text,{typescale:"body",size:"medium",children:["This action will permanently delete this ",a,". Do you want to proceed?"]}),(0,Ze.jsxs)(syt,{children:[(0,Ze.jsx)(f.Button,{onClick:n,variant:"outlined","data-testid":"Abort_Deletion_Button",children:"Cancel"}),(0,Ze.jsx)(f.Button,{onClick:t,variant:"contained",color:"primary","data-testid":"Confirm_Deletion_Button",children:"Delete"})]})]})},dyt={label:"Loading...",value:"",disabled:!0},uyt={label:"No targets found",value:"",disabled:!0};function pyt(e){var n;let{value:t,name:a,onChange:r,disabled:i}=e;const o=rt(),{data:l,error:s,loading:c}=(0,h.IT)(Ds,{variables:{accountId:o,sort:{order:"asc",field:"activity.name"}}}),d=((null==l||null===(n=l.getAspectsByAccountId)||void 0===n?void 0:n.rows)||[]).map(e=>{var n;return{value:e.id,label:null===(n=e.activity)||void 0===n?void 0:n.name}}).sort((e,n)=>{var t;return(null===(t=e.label)||void 0===t?void 0:t.localeCompare(n.label||""))||1});return c||s||0!==d.length||d.unshift(uyt),(0,Ze.jsx)(f.Select,{name:a,label:"Aspects",placeholder:"Please select the Activity/Process",value:t,error:Boolean(s),helperText:null==s?void 0:s.message,onChange:r,disabled:i,options:c?[dyt]:d})}var myt,fyt;function yyt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gyt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yyt(Object(t),!0).forEach(function(n){byt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yyt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function byt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function hyt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const vyt=(0,f.styled)("div")(myt||(myt=hyt(["\n  display: flex;\n  gap: 16px;\n  align-items: center;\n"]))),xyt=(0,f.styled)(f.Button)(fyt||(fyt=hyt(["\n  width: 160px;\n"]))),Tyt=window.history.state&&window.history.state.idx>0,Oyt=e=>{var n,t,a,r,i,o,l;let{hasProjectsAccess:s=!1}=e;const c=rt(),d=rc(),u=pf(),p=d.task.some(e=>e.startsWith("edit")),y=d.task.some(e=>e.startsWith("delete")),{token:b}=at(),{showNotification:h}=vt(),[v,x]=(0,g.useState)({}),{id:T}=(0,m.g)(),O=(0,m.Zp)(),[k,j]=(0,g.useState)({}),[C,S]=(0,g.useState)(!1),N=oc(),{data:w,error:D,loading:A}=Rt(yKn(),{variables:{id:T},onCompleted:e=>{const n=null==e?void 0:e.getTaskById;x(bKn(n))}}),R=e=>O(e?-1:N.tasks.root),[P,{loading:L}]=(0,Ot.n)(Tun(),{onCompleted:()=>{h("Task has been successfully updated")},onError:()=>{h("Something went wrong! Please try again later.","danger")}}),[I,{loading:E}]=(0,Ot.n)(kun(),{onCompleted:()=>{R(Tyt),h("Task has been successfully deleted")},onError:()=>{h("Something went wrong! Please try again later.","danger")},refetchQueries:[{query:ENn(),variables:{accountId:c,userId:b.sub}}]}),_=e=>{Object.keys(k).find(n=>n===e.target.name)&&j(gyt(gyt({},k),{},{[e.target.name]:null})),x(gyt(gyt({},v),{},{[e.target.name]:e.target.value}))},F=(e,n,t)=>{Object.keys(k).find(n=>n===e)&&j(gyt(gyt({},k),{},{[e]:null})),x(gyt(gyt({},v),{},{[e]:n||null})),null==t||t()},B=(0,g.useCallback)(()=>{const e=hKn(v),n=nUe(e);(0,zt.isEmpty)(n)&&(j({}),P({variables:e,refetchQueries:["GetTaskById"]})),(0,zt.isEmpty)(n)||j(n)},[v,P]),U=null==w||null===(n=w.getTaskById)||void 0===n?void 0:n.name,M=(0,g.useMemo)(()=>{const e=[{label:"Tasks",to:N.tasks.root}];return U&&e.push({label:U}),e},[U,N.tasks.root]),V=A||L||E;return 0===Object.keys(v).length?null:(0,Ze.jsxs)(f.Page,{title:{content:(null==w||null===(t=w.getTaskById)||void 0===t?void 0:t.name)||"Task Details",crumbs:M,actionButton:(0,Ze.jsxs)(vyt,{children:[y&&(0,Ze.jsx)(xyt,{onClick:()=>S(!0),disabled:V,"data-testid":"Delete_Button",variant:"outlined",color:"primary",children:"Delete"}),(0,Ze.jsx)(xyt,{onClick:()=>R(Tyt),disabled:V,"data-testid":"Cancel_Button",variant:"outlined",color:"primary",children:"Cancel"}),p&&(0,Ze.jsx)(xyt,{onClick:B,disabled:V,"data-testid":"Save_Button",variant:"contained",color:"primary",children:"Save"})]})},loading:A,error:D,children:[(0,Ze.jsx)(cyt,{open:C,deleteObjectName:"task",onConfirmClick:()=>{var e;void 0!==(e=T)&&I({variables:{id:e}})},onDismissClick:()=>S(!1)}),(0,Ze.jsxs)(f.Grid,{container:!0,columns:12,rowSpacing:6,columnSpacing:4,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{"data-testid":"Task_Name",name:"name",label:"Name",value:v.name,onChange:_,error:Boolean(k.name),helperText:k.name})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextArea,{"data-testid":"Task_Description",name:"description",label:"Description",value:v.description,onChange:_,error:Boolean(k.description),helperText:k.description,disabled:!p,rows:5})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{"data-testid":"Task_Creator",name:"author",label:"Creator",value:v.author,onChange:_,disabled:!0})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{"data-testid":"Task_CreatedAt",name:"createdAt",label:"Created at",value:Yt(v.createdAt),onChange:_,disabled:!0})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.Checkbox,{label:"Completed",checked:v.isCompleted,onChange:()=>{x(gyt(gyt({},v),{},{isCompleted:!v.isCompleted}))}})}),(0,Ze.jsx)(f.Grid,{size:6,children:v.isCompleted&&(0,Ze.jsx)(f.DatePicker,{"data-testid":"Completed_Date",name:"completedAt",label:"Completion Date",value:v.isCompleted&&v.completedAt?new Date(v.completedAt):v.isCompleted?new Date:void 0,onChange:e=>{x(gyt(gyt({},v),{},{completedAt:e?new Date(e).toISOString():null}))},disabled:!p})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{"data-testid":"Task_Status",name:"status",label:"Status",onChange:_,value:v.isCompleted?"Completed":new Date(v.dueDate)>new Date?"Incompleted":"Overdue",disabled:!0})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.DatePicker,{"data-testid":"Due_Date",name:"dueDate",label:"Due date",value:v.dueDate?new Date(v.dueDate):void 0,onChange:e=>{x(gyt(gyt({},v),{},{dueDate:e?new Date(e).toISOString():null}))},error:k.dueDate,disabled:!p})}),(0,Ze.jsx)(f.Grid,{size:4,children:(0,Ze.jsx)(f.Select,{"data-testid":"Task_scope",name:"scope",label:"Scope",options:u,value:v.scope,onChange:e=>{let{value:n}=e;return F("scope",n)},disabled:!p})}),(0,Ze.jsx)(f.Grid,{size:4,children:(0,Ze.jsx)(f.Select,{"data-testid":"Task_priority",name:"priority",label:"Priority",value:v.priority,options:qBe.map(e=>gyt(gyt({},e),{},{label:e.label,value:e.value})),onChange:e=>{let{value:n}=e;return F("priority",n)},disabled:!p,error:Boolean(k.priority),helperText:k.priority})}),(0,Ze.jsx)(f.Grid,{size:4,children:(0,Ze.jsx)(f.Select,{"data-testid":"Task_category",name:"category",label:"Category",onChange:e=>{let{value:n}=e;return F("category",n,()=>x(e=>gyt(gyt({},e),{},{subject:null,item:null})))},value:v.category,options:WBe.map(e=>gyt(gyt({},e),{},{label:e.label,value:e.value})),disabled:!p,error:Boolean(k.category),helperText:k.category})}),v.scope===Vt.HG.Location&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(C3,{name:"locations",value:v.locations,onChange:e=>F("locations",e),disabled:!p})}),v.scope===Vt.HG.Tag&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(A3,{label:"Tags",name:"tags",accountId:c,value:v.tags||[],onChange:e=>F("tags",e),disabled:!p})}),"".concat(v.category)in mKn?(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Select,{name:"subject",label:"Subject",onChange:e=>{let{value:n}=e;return F("subject",n)},value:(null===(a=v.subject)||void 0===a?void 0:a.toUpperCase())||null,options:mKn[v.category],error:Boolean(k.subject),helperText:k.subject,disabled:!p})}):null,v.subject&&[Vt.AR.Legislation,Vt.AR.Aspects,Vt.AR.Targets].includes(v.subject)&&(0,Ze.jsxs)(Ze.Fragment,{children:[v.subject===Vt.AR.Legislation&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(DBe,{name:"itemId",onChange:e=>{let{value:n}=e;return F("itemId",n)},value:v.itemId||(null===(r=v.item)||void 0===r?void 0:r.id)||"",disabled:!p})}),v.subject===Vt.AR.Aspects&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(pyt,{name:"itemId",onChange:e=>{let{value:n}=e;return F("itemId",n)},value:v.itemId||(null===(i=v.item)||void 0===i?void 0:i.id)||"",disabled:!p})}),v.subject===Vt.AR.Targets&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(FBe,{name:"itemId",onChange:e=>{let{value:n}=e;return F("itemId",n)},value:v.itemId||(null===(o=v.item)||void 0===o?void 0:o.id)||"",disabled:!p})})]}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)($Be,{label:"Owners",onChange:e=>F("owners",e),value:v.owners,accountId:c,disabled:!p,error:k.owner})}),s&&(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(IBe,{name:"projectId",accountId:c,onChange:e=>{let{value:n}=e;return F("projectId",n)},value:v.projectId||(null==v||null===(l=v.project)||void 0===l?void 0:l.id)||""})})]})]})};var kyt,jyt,Cyt,Syt,Nyt;function wyt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Dyt=(0,f.styled)(f.Grid)(kyt||(kyt=wyt(["\n  display: flex;\n  width: 100%;\n  align-items: flex-end;\n  gap: 24px;\n  justify-content: flex-end;\n"]))),Ayt=(0,f.styled)(f.Grid)(jyt||(jyt=wyt(["\n  flex: 1;\n  display: flex;\n  align-items: flex-start;\n"]))),Ryt=(0,f.styled)("div")(Cyt||(Cyt=wyt(["\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  gap: 8px;\n"]))),Pyt=(0,f.styled)(f.Grid)(Syt||(Syt=wyt(["\n  min-width: 165px;\n"]))),Lyt=(0,f.styled)("span")(Nyt||(Nyt=wyt(["\n  height: fit-content;\n"]))),Iyt=e=>{let{hasProjectsAccess:n=!1}=e;const[t,a]=(0,g.useState)(null),r=null==t?void 0:t.gridApi,{token:i}=at(),o=rt(),l=rc(),{showNotification:s}=vt(),[c,d]=(0,g.useState)(!1),{showMine:u,setShowMine:p}=YHn(),[m,y]=(0,g.useState)(!1),b=l.task.find(e=>"getAll"===e||"getParent"===e),{data:h,loading:v,error:x}=Rt(ENn(),{variables:{accountId:o,userId:i.sub}}),T=(null==h?void 0:h.getTasksByAccountId)||[],O=h?nun(T):[],k=(0,g.useCallback)(e=>{a(e)},[]),j=(0,g.useCallback)(()=>{if(!r)return!1;const e=(null==r?void 0:r.getFilterModel())||{};u?delete e.owners:e.owners={type:"set",values:["".concat(i.given_name," ").concat(i.family_name)]},null==r||r.setFilterModel(e),p(e=>!e),c&&d(e=>!e)},[r,u,p,c,i.given_name,i.family_name]),C=(0,g.useCallback)(()=>y(!0),[]),S=(0,g.useCallback)(e=>{e.api.applyColumnState({state:Aot})},[]),N={content:"",actionButton:(0,Ze.jsxs)(Dyt,{container:!0,children:[b&&(0,Ze.jsx)(Ayt,{container:!0,children:(0,Ze.jsx)(Pyt,{size:{md:6,lg:3.5},children:(0,Ze.jsx)(f.SegmentedButton,{toggleOff:c,values:Rot,onClick:j})})}),(0,Ze.jsxs)(Ryt,{children:[(0,Ze.jsx)(N$,{filtersApplied:null==t?void 0:t.filtersApplied,resetGridState:()=>{null==t||t.resetGridState(),p(!1),d(!0)}}),!!l.task.find(e=>e.startsWith("create"))&&(0,Ze.jsx)(zP.A,{title:"Create Task",children:(0,Ze.jsx)(Lyt,{children:(0,Ze.jsx)(f.IconButton,{variant:"contained",onClick:C,children:(0,Ze.jsx)(f.Icons.Add,{})})})})]})]})};return(0,Ze.jsxs)(f.Page,{loading:v,error:x,title:N,children:[(0,Ze.jsx)(Uot,{agGridRef:k,accountId:o,tasks:O,onGridReady:S}),(0,Ze.jsx)(lUe,{onComplete:e=>{s(e.message,e.colour)},open:m,accountId:o,onDismiss:()=>y(!1),sourcePage:"TASKS",disabled:{[Vt.AR.Aspects]:!0},hasProjectsAccess:n})]})};var Eyt;const _yt=(0,f.styled)("div")(Eyt||(Eyt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  height: 100%;\n"]))),Fyt=e=>{let{hasProjectsAccess:n}=e;return(0,Ze.jsx)(_yt,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(Iyt,{hasProjectsAccess:n})}),(0,Ze.jsx)(m.qh,{path:"/:id",element:(0,Ze.jsx)(Oyt,{})})]})})};var Byt,Uyt,Myt,Vyt,zyt=t(86481);function Gyt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $yt=(0,Ge.default)(f.Text)(Byt||(Byt=Gyt(["\n  text-align: left;\n  align-items: center;\n  flex-flow: row nowrap;\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),Wyt=(0,Ge.default)(ze.fv)(Uyt||(Uyt=Gyt(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: ",";\n"])),e=>e.theme.geometry.xs.spacing),qyt=(0,Ge.default)(Wyt)(Myt||(Myt=Gyt(["\n  flex-basis: 120px;\n  max-width: 120px;\n"]))),Jyt=(0,Ge.default)(ze.fI)(Vyt||(Vyt=Gyt(["\n  width: fit-content;\n  max-width: 100vw;\n"]))),Yyt=e=>{let{file:n,onDelete:t,readOnly:a}=e;const r=n instanceof window.File;return(0,Ze.jsxs)(Jyt,{container:!0,children:[(0,Ze.jsx)(Wyt,{grow:"0",children:(0,Ze.jsx)(wyn,{size:"xxs",icon:"file",color:"tretiary"})}),(0,Ze.jsx)($yt,{children:r&&n.name}),!a&&(0,Ze.jsx)(qyt,{item:!0,grow:"0",children:(0,Ze.jsx)(f.Button,{type:"button",variant:"outlined",color:"primary",onClick:t,children:"Remove"})})]})},Hyt=[{value:"1",label:"No options",disabled:!0}];function Kyt(e){let{accountId:n,name:t,value:a,error:r,projectCategory:i,readOnly:o,isDisabled:l,onChange:s,className:c}=e;const{data:d,loading:u,error:p}=(0,h.IT)(kG,{variables:{accountId:n}}),m=(0,g.useMemo)(()=>{var e;return((i?null==d||null===(e=d.getProjectSchemes)||void 0===e?void 0:e.filter(e=>e.category.id===i.id):null==d?void 0:d.getProjectSchemes)||[]).map(xi)},[i,u]);return(0,Ze.jsx)(f.Select,{label:"Please select scheme",name:t||"scheme",value:a,prefix:"scheme-select",error:!!r||!!p,isLoading:u,onChange:s,readOnly:o||!1,options:m.length>0?m:Hyt,disabled:l||u,className:c,helperText:r})}const Qyt="Create new meter...",Zyt=[{field:"name",order:"asc"}],Xyt=e=>{let{value:n,setShowCreateLocation:t,onChange:a,error:r,dataSection:i,label:o,fullWidth:l=!0,createNew:s=!0,isMulti:c=!1}=e;const d=rc(),u=(0,g.useMemo)(()=>d.data.find(e=>e.startsWith("createEnergySource")),[d.data]),{data:p,loading:m,fetchMore:y}=nd(i,{withLocationData:!0,fetchPolicy:"network-only",notifyOnNetworkStatusChange:!0,variablesProps:{sort:Zyt,limit:Za}}),b=(0,g.useCallback)(async(e,n,t)=>{let a={};t&&(a={text:[{filterType:Vt.pe.Text,type:Vt.II.Contains,filter:t,field:"name"}]});const r=await y({variables:{offset:n,limit:e,filters:a,sort:Zyt}});return{total:r.data.getEnergySourceByAccountIdAndType.totalRows,options:Ti(r.data.getEnergySourceByAccountIdAndType.rows)}},[y]),h=(0,g.useCallback)(e=>{e.value===Qyt?t(!0):a(e)},[a,t]),v=(0,g.useMemo)(()=>Ti(p),[p]);return(0,Ze.jsx)(f.AutoComplete,{value:n,label:o,isMulti:c,fullWidth:l,loadMore:b,createOption:u&&s?Qyt:void 0,onChange:h,options:v,isLoading:m,error:(null==r?void 0:r.toString())||void 0})};var egt,ngt,tgt,agt,rgt,igt;function ogt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const lgt=(0,Ge.default)(f.Button)(egt||(egt=ogt(["\n  width: 100%;\n"]))),sgt=(0,Ge.default)(f.Text)(ngt||(ngt=ogt([""]))),cgt=(0,Ge.default)(f.Icons.InfoOutlined)(tgt||(tgt=ogt(["\n  margin-left: ",";\n"])),e=>e.theme.geometry.xs.spacing),dgt=Ge.default.div(agt||(agt=ogt(["\n  svg {\n    cursor: pointer;\n  }\n  display: flex;\n  align-items: center;\n"]))),ugt=(0,Ge.default)("div")(rgt||(rgt=ogt(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),pgt=(0,Ge.default)(f.FileUploadButton)(igt||(igt=ogt(["\n  margin-bottom: "," !important;\n  width: 100%;\n"])),e=>e.theme.geometry.xs.spacing);function mgt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function fgt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mgt(Object(t),!0).forEach(function(n){ygt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mgt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ygt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const ggt=e=>{var n;let{accountId:t,defaultValues:a,onDismiss:r,onComplete:i}=e;const{formatMessage:o}=(0,eg.A)(),l=(0,zyt.t)(IQn),{register:s,setValue:c,control:d,resetField:u,watch:p,trigger:m,handleSubmit:y,formState:{isValid:b}}=(0,Rw.mN)({resolver:l,defaultValues:{baselineStartDate:void 0,startDate:void 0,endDate:void 0,locations:[],owners:[],meters:[]},mode:"onChange"}),v=p("locations"),x=EQn(),T=(0,f.useTheme)(),[O,k]=(0,g.useState)(null),[j,C]=(0,g.useState)([]),[S,N]=(0,g.useState)(null),[w,{loading:D}]=(0,Ot.n)(wQn(),{onCompleted:()=>{i({message:o({id:"pages.project.messages.created"}),color:"success"}),r()},onError:()=>{i({message:o({id:"pages.project.messages.error"}),color:"danger"})}});(0,h.IT)(wG,{onCompleted:e=>{N((null==e?void 0:e.getProjectCategories)||[])},onError:()=>{N([])}});const A=null==S||null===(n=S.find(e=>e.name===Cd))||void 0===n?void 0:n.id,{data:R,loading:P}=(0,h.IT)(wG),L=(0,g.useMemo)(()=>{var e;return(null==R||null===(e=R.getProjectCategories)||void 0===e?void 0:e.map(xi))||[]},[P]),I=(0,g.useCallback)(async e=>{const n=[...j,...e];C(n)},[j,C]),E={color:T.palette.grey[600]};return(0,g.useEffect)(()=>{const e=p((e,n)=>{let{name:t}=n;"baselineStartDate"!==t&&"startDate"!==t||m(["startDate","baselineStartDate","endDate"])});return()=>null==e?void 0:e.unsubscribe()},[p,m]),(0,g.useEffect)(()=>{s("accountId",{value:t}),c("meters",[])},[t]),(0,Ze.jsx)(f.Modal,{open:!0,onClose:()=>r(),title:"Create New Project",children:(0,Ze.jsxs)("form",{onSubmit:y(async e=>{var n,t,r,i;const o=e.evidenceNotes,l=await x(j,o),s=fgt(fgt({},e),{},{currencyId:null,id:(null==a?void 0:a.id)||(0,Ai.A)(),cost:null===(n=e.cost)||void 0===n?void 0:n.toString(),startDate:Wt()(e.startDate,"MM/DD/YYYY").toISOString(!0),endDate:Wt()(e.endDate,"MM/DD/YYYY").toISOString(!0),baselineStartDate:Wt()(e.baselineStartDate,"MM/DD/YYYY").toISOString(!0),plannedBenefit:Number(e.plannedBenefit)||e.plannedBenefit,owners:(null===(t=e.owners)||void 0===t?void 0:t.map(e=>null==e?void 0:e.value))||[],locations:Array.isArray(e.locations)?null===(r=e.locations)||void 0===r?void 0:r.map(e=>null==e?void 0:e.value):[],meters:(null===(i=e.meters)||void 0===i?void 0:i.map(e=>null==e?void 0:e.value))||[],plannedCO2eChange:e.plannedCO2eChange&&Number(e.plannedCO2eChange)?Math.abs(Number(e.plannedCO2eChange)):e.plannedCO2eChange||null,plannedCostChange:e.plannedCostChange&&Number(e.plannedCostChange)?Math.abs(Number(e.plannedCostChange)):e.plannedCostChange||null,createdAt:(new Date).toISOString(),evidenceNotes:l});w({variables:s,refetchQueries:["GetProjects"]})}),children:[(0,Ze.jsxs)(f.Grid,{container:!0,columns:12,rowSpacing:3,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"name",control:d,render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.TextField,fgt(fgt({},a),{},{value:null==a?void 0:a.value,disabled:P,label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.name"}),"data-cy":"ProjectDetails__Input-name",error:!(null===(n=r.error)||void 0===n||!n.message),helperText:null===(t=r.error)||void 0===t?void 0:t.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"description",control:d,render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.TextArea,fgt(fgt({},a),{},{"data-cy":"ProjectDetails__Input-description",size:"medium",label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.description"}),name:"description",disabled:P,value:null==a?void 0:a.value,error:!(null===(n=r.error)||void 0===n||!n.message),helperText:null===(t=r.error)||void 0===t?void 0:t.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"impact",render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.TextField,fgt(fgt({},a),{},{label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.impact"}),"data-cy":"ProjectDetails__Input-impact",disabled:P,value:null==a?void 0:a.value,error:!(null===(n=r.error)||void 0===n||!n.message),helperText:null===(t=r.error)||void 0===t?void 0:t.message}))},control:d})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"priority",control:d,render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.Select,fgt(fgt({},a),{},{fullWidth:!0,label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.priority"}),name:"priority",className:"priority-select",disabled:P,onChange:e=>a.onChange(e.value),options:PKn,value:null==a?void 0:a.value,error:!(null===(n=r.error)||void 0===n||!n.message),helperText:null===(t=r.error)||void 0===t?void 0:t.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.Select,{fullWidth:!0,options:L,label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.category"}),value:null==O?void 0:O.id,onChange:e=>{k(e.value?{id:e.value,name:e.label}:null),u("meters"),u("schemeId")}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"locations",control:d,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(C3,fgt(fgt({},t),{},{name:"locations",value:t.value,onChange:e=>t.onChange(e),isSubmitting:P,disabled:P,defaultOptions:!1,error:null===(n=a.error)||void 0===n?void 0:n.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"schemeId",control:d,render:e=>{var n;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(Kyt,fgt(fgt({},a),{},{name:"schemeId",accountId:t,onChange:e=>{let{value:n}=e;a.onChange(n)},value:a.value,isDisabled:P,projectCategory:O,error:null===(n=r.error)||void 0===n?void 0:n.message,isClearable:!0}))}})}),(null==O?void 0:O.id)===A&&Array.isArray(v)&&null!=v&&v.length?(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"meters",control:d,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(Xyt,fgt(fgt({},t),{},{label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.meters"}),name:"meters",fullWidth:!0,isMulti:!0,dataSection:Vt.D_.Electricity,value:t.value,setShowCreateLocation:()=>{},createNew:!1,onChange:e=>t.onChange(e),error:null===(n=a.error)||void 0===n?void 0:n.message}))}})}):null,(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"owners",control:d,render:e=>{var n;let{field:a,fieldState:r}=e;return(0,g.createElement)($Be,fgt(fgt({},a),{},{key:a.name,onChange:e=>a.onChange(e),value:a.value||[],accountId:t,error:null===(n=r.error)||void 0===n?void 0:n.message,label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.owner"})}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"cost",control:d,render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.TextField,fgt(fgt({},a),{},{value:a.value,onChange:e=>a.onChange(e.target.value),label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.cost"}),"data-cy":"ProjectDetails__Input-cost",disabled:P,name:"cost",error:!(null===(n=r.error)||void 0===n||!n.message),helperText:null===(t=r.error)||void 0===t?void 0:t.message}))}})}),(0,Ze.jsxs)(f.Grid,{size:12,children:[(0,Ze.jsxs)(dgt,{children:[(0,Ze.jsx)(sgt,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.startDate"})}),(0,Ze.jsx)(zP.A,{title:"The date you would expect to start making savings from your project.",children:(0,Ze.jsx)(f.Text,{children:(0,Ze.jsx)(cgt,{sx:E})})})]}),(0,Ze.jsx)(Rw.xI,{name:"startDate",control:d,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.DatePicker,fgt(fgt({},t),{},{value:t.value,disabled:P,onChange:e=>{t.onChange(Wt().utc(e).format())},error:null===(n=a.error)||void 0===n?void 0:n.message}))}})]}),(0,Ze.jsxs)(f.Grid,{size:12,children:[(0,Ze.jsxs)(dgt,{children:[(0,Ze.jsx)(sgt,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.endDate"})}),(0,Ze.jsx)(zP.A,{title:"The date which you anticipate your planned savings to be realised.",children:(0,Ze.jsx)(f.Text,{children:(0,Ze.jsx)(cgt,{sx:E})})})]}),(0,Ze.jsx)(Rw.xI,{name:"endDate",control:d,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.DatePicker,fgt(fgt({},t),{},{value:t.value,disabled:P,onChange:e=>{t.onChange(Wt().utc(e).format())},name:"endDate",error:null===(n=a.error)||void 0===n?void 0:n.message}))}})]}),(0,Ze.jsxs)(f.Grid,{size:12,children:[(0,Ze.jsxs)(dgt,{children:[(0,Ze.jsx)(sgt,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.baselineStartDate"})}),(0,Ze.jsx)(zP.A,{title:"The annual period to compare project performance against.",children:(0,Ze.jsx)(f.Text,{children:(0,Ze.jsx)(cgt,{sx:E})})})]}),(0,Ze.jsx)(Rw.xI,{name:"baselineStartDate",control:d,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.DatePicker,fgt(fgt({},t),{},{value:t.value,disabled:P,onChange:e=>{t.onChange(Wt().utc(e).format())},name:"baselineStartDate",error:null===(n=a.error)||void 0===n?void 0:n.message}))}})]}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"plannedBenefit",control:d,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.TextField,fgt(fgt({},t),{},{value:null==t?void 0:t.value,"data-cy":"ProjectDetails__Input-plannedBenefit",disabled:P,name:"plannedBenefit",InputLabelProps:{style:{pointerEvents:"auto"}},label:(0,Ze.jsx)(Ze.Fragment,{children:(null==O?void 0:O.id)===A?(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedBenefitGeneration"}):(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedBenefit"}),AKn[(null==O?void 0:O.name)||"default"]]})}),helperText:null===(n=a.error)||void 0===n?void 0:n.message,error:a.invalid}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"plannedCO2eChange",control:d,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.TextField,fgt(fgt({},t),{},{value:null==t?void 0:t.value,label:(0,Ze.jsxs)(dgt,{children:[(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedCarbonChange"})}),(0,Ze.jsx)(zP.A,{title:"This figure should be positive. Negative values will be automatically converted to a positive value in the Project Dashboard.",children:(0,Ze.jsx)(f.Text,{children:(0,Ze.jsx)(cgt,{sx:E})})})]}),InputLabelProps:{style:{pointerEvents:"auto"}},"data-cy":"ProjectDetails__Input-plannedCO2eChange",disabled:P,name:"plannedCO2eChange",helperText:null===(n=a.error)||void 0===n?void 0:n.message,error:a.invalid}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"plannedCostChange",control:d,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.TextField,fgt(fgt({},t),{},{value:null==t?void 0:t.value,label:(0,Ze.jsxs)(dgt,{children:[(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedCostChange"})}),(0,Ze.jsx)(zP.A,{title:"This figure should be positive. Negative values will be automatically converted to a positive value in the Project Dashboard.",children:(0,Ze.jsx)(f.Text,{children:(0,Ze.jsx)(cgt,{sx:E})})})]}),"data-cy":"ProjectDetails__Input-plannedCostChange",disabled:P,helperText:null===(n=a.error)||void 0===n?void 0:n.message,error:a.invalid}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"frequency",control:d,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.Select,fgt(fgt({},t),{},{name:"frequency",label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.frequency"}),"data-cy":"frequency-select",disabled:P,onChange:e=>{let{value:n}=e;t.onChange(n)},value:t.value,options:RKn,helperText:null===(n=a.error)||void 0===n?void 0:n.message,error:a.invalid}))}})}),(0,Ze.jsxs)(f.Grid,{size:12,children:[(0,Ze.jsx)(dgt,{children:(0,Ze.jsx)(sgt,{children:"Evidence Name"})}),(0,Ze.jsx)(Rw.xI,{name:"evidenceNotes",control:d,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.TextArea,fgt(fgt({},t),{},{size:"medium",name:"notes",onChange:e=>t.onChange(e.target.value),value:null==t?void 0:t.value,helperText:null===(n=a.error)||void 0===n?void 0:n.message,error:a.invalid}))}}),(0,Ze.jsx)(dgt,{children:(0,Ze.jsx)(sgt,{children:"Evidence"})}),(0,Ze.jsx)(ugt,{children:!(null==j||!j.length)&&j.map(e=>(0,Ze.jsx)(Yyt,{file:e,readOnly:void 0,onDelete:()=>{C(j.filter(n=>n!==e))}},e instanceof window.File?null==e?void 0:e.name:e))}),(0,Ze.jsx)(pgt,{multiple:!0,fullWidth:!0,accept:xr.allowedDocument.mimeType,onFileUpload:I,children:"Attach Evidence"})]})]}),(0,Ze.jsx)(lgt,{fullWidth:!0,disabled:!b,loading:D,variant:"contained",type:"submit","data-cy":"CreateProjectModal__submit",children:(0,Ze.jsx)(Je.A,{id:"pages.project.create.submit"})})]})})},bgt={BGN:"лв",CZK:"Kč",DKK:"kr",EUR:"€",GBP:"£",HRK:"kn",GEL:"₾",HUF:"ft",NOK:"kr",PLN:"zł",RUB:"₽",RON:"lei",SEK:"kr",TRY:"₺",UAH:"₴",BRL:"R$",CAD:"$",CLP:"$",COP:"$",MXN:"$",PEN:"S/.",USD:"$",AUD:"$",BDT:"৳",CNY:"¥",HKD:"HK$",IDR:"Rp",INR:"₹",JPY:"¥",MYR:"RM",NZD:"$",PHP:"₱",PKR:"Rs",SGD:"$",KRW:"₩",LKR:"Rs",THB:"฿",VND:"₫"};function hgt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function vgt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?hgt(Object(t),!0).forEach(function(n){xgt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hgt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xgt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Tgt={lineHeight:"21px",wordBreak:"inherit",display:"inline-block",alignItems:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},Ogt={pagination:!0,paginationPageSize:25,paginationPageSizeSelector:[10,25,50,100],cacheBlockSize:25,suppressNoRowsOverlay:!0,defaultColDef:{sortable:!0,resizable:!0,filter:!0,autoHeight:!0,filterParams:{showTooltip:!0},cellStyle:{height:"auto"}},rowStyle:{width:"100%",display:"flex",alignItems:"center"}},kgt=[{colId:"startDate",sort:"asc",sortIndex:0},{colId:"name",sort:"asc",sortIndex:1}],jgt=[{offValue:"Show My Projects",onValue:"Show All Projects"}],Cgt=["columnDefs"];var Sgt;function Ngt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wgt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ngt(Object(t),!0).forEach(function(n){Dgt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ngt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Dgt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Agt=(0,f.styled)(f.AgGrid)(Sgt||(Sgt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  height: calc(100vh - 268px); // header + page title height\n  padding-bottom: 2px; // border bottom and shadow to show properly\n\n  .ag-sort-indicator-icon {\n    display: flex;\n    align-items: center;\n  }\n"]))),Rgt={category:kot,costCell:e=>{const{data:{cost:n,currencyId:t}}=e,{data:a}=(0,h.IT)(Nu()),r=(null==a?void 0:a.getAllCurrencyTypes)||[],i=(0,g.useMemo)(()=>{var e;const n=r.find(e=>e.id===t);return null!==(e=bgt[(null==n?void 0:n.name)||""])&&void 0!==e?e:null==n?void 0:n.name},[r,t]);return(0,Ze.jsxs)(f.Text,{typescale:"body",size:"medium",children:[n," ",i]})},description:jot,owners:fot,priority:Oot,startDate:e=>{const{data:{startDate:n}}=e,t=Ht(n);return n&&(0,Ze.jsx)(f.Text,{typescale:"body",size:"medium",children:t})}},Pgt=e=>{const n=(0,m.Zp)(),{projects:t,onGridReady:a,accountId:r,agGridRef:i}=e,{formatMessage:o}=(0,eg.A)(),l=(e=>({rowHeight:56,getRowId:ba("id"),columnDefs:[{headerName:e({id:"pages.project.grid.header.name"}),field:"name",filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:160,cellStyle:Tgt},{headerName:"Priority",field:"priority",minWidth:90,sortable:!1,filter:!0,hide:!0},{headerName:e({id:"pages.project.grid.header.impact"}),field:"impact",sortable:!1,filter:!1,width:200,minWidth:160,cellStyle:Tgt},{headerName:e({id:"pages.project.grid.header.description"}),field:"description",cellRenderer:"description",sortable:!1,filter:!1,minWidth:100,cellStyle:{textAlign:"center"}},{headerName:e({id:"pages.project.grid.header.locations"}),valueGetter:e=>{let{data:{locations:n}}=e;return null==n?void 0:n.map(e=>null==e?void 0:e.name)},field:"locations",filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:130,cellStyle:Tgt},{headerName:e({id:"pages.project.grid.header.meters"}),field:"meters",valueGetter:e=>{let{data:{meters:n}}=e;return null==n?void 0:n.map(e=>null==e?void 0:e.name)},filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:110,cellStyle:Tgt},{headerName:e({id:"pages.project.grid.header.category"}),field:"category",cellRenderer:"category",filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:150},{headerName:e({id:"pages.project.grid.header.scheme"}),field:"scheme",valueGetter:e=>{let{data:{scheme:n}}=e;return n?n.name:""},filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:110,cellStyle:Tgt},{headerName:e({id:"pages.project.grid.header.owners"}),field:"owners",cellRenderer:"owners",valueGetter:e=>{let{data:{owners:n=[]}}=e;return n.map(e=>{let{first_name:n,last_name:t}=e;return"".concat(n," ").concat(t)})},filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:90},{headerName:e({id:"pages.project.grid.header.cost"}),field:"cost",cellRenderer:"costCell",filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:e({id:"pages.project.grid.header.implementationDate"}),field:"startDate",cellRenderer:"startDate",filter:"agDateColumnFilter",filterParams:vgt(vgt({},{buttons:["reset","apply"],closeOnApply:!0}),{},{comparator:Aa}),minWidth:120},{headerName:e({id:"pages.project.grid.header.baselineDate"}),field:"baselineDate",cellStyle:Tgt,valueGetter:e=>{let{data:{baselineStartDate:n}}=e;return Ea([n,new Date(n).setFullYear(new Date(n).getFullYear()+1)])},filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:e({id:"pages.project.grid.header.benefitsDate"}),field:"benefitsDate",cellStyle:Tgt,valueGetter:e=>{let{data:{startDate:n,endDate:t}}=e;return Ea([n,t])},filterParams:vgt(vgt({},{buttons:["reset","apply"],closeOnApply:!0}),{},{comparator:Aa}),minWidth:120},{headerName:e({id:"pages.project.grid.header.plannedBenefit"}),field:"plannedBenefit",cellStyle:Tgt,filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:e({id:"pages.project.grid.header.plannedCostChange"}),field:"plannedCostChange",cellStyle:Tgt,filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:e({id:"pages.project.grid.header.plannedCO2eChange"}),field:"plannedCO2eChange",cellStyle:Tgt,filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120},{headerName:e({id:"pages.project.grid.header.frequency"}),field:"frequency",valueGetter:e=>{let{data:{frequency:n}}=e;return ADe()(n)},cellStyle:Tgt,filterParams:vgt({},{buttons:["reset","apply"],closeOnApply:!0}),minWidth:120}]}))(o),{columnDefs:s}=l,c=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(l,Cgt),d=wgt(wgt(wgt({},Ogt),c),{},{columnDefs:null==s?void 0:s.map(e=>wgt(wgt({},e),{},{headerName:e.headerName?Gi(e.headerName):e.headerName})),components:Rgt,onGridReady:a,onRowClicked:e=>{n("./".concat(e.data.id))},rowData:t});return(0,Ze.jsx)(Agt,{ref:i,gridKey:"".concat(r,"_projectsGridV2"),gridOptions:d},r)};var Lgt,Igt,Egt,_gt,Fgt;function Bgt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ugt=(0,f.styled)(f.Grid)(Lgt||(Lgt=Bgt(["\n  display: flex;\n  align-items: flex-end;\n  width: 100%;\n  gap: 24px;\n  justify-content: flex-end;\n"]))),Mgt=(0,f.styled)(f.Grid)(Igt||(Igt=Bgt(["\n  flex: 1;\n  display: flex;\n  align-items: flex-start;\n"]))),Vgt=(0,f.styled)("div")(Egt||(Egt=Bgt(["\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  gap: 8px;\n"])));(0,f.styled)(f.Button)(_gt||(_gt=Bgt(["\n  min-width: unset !important;\n  padding: 10px;\n\n  span {\n    margin-right: 0;\n  }\n"])));var zgt=function(e){return e[e.Create=0]="Create",e}(zgt||{});const Ggt=(0,f.styled)(f.Grid)(Fgt||(Fgt=Bgt(["\n  min-width: 165px;\n"]))),$gt=()=>{const[e,n]=(0,g.useState)(null),t=null==e?void 0:e.gridApi,a=rt(),{token:r}=at(),i=rc(),{showNotification:o}=vt(),l=Boolean(i.project.find(e=>e.startsWith("create"))),[s,c]=(0,g.useState)(void 0),{showMine:d,setShowMine:u}=sQn(),p=Boolean(i.project.find(e=>"getAll"===e)),{data:m,loading:y,refetch:b,error:h}=Rt(NG(),{variables:{accountId:a,userId:r.sub}}),v=(null==m?void 0:m.getProjects)||[],x=(0,g.useCallback)(e=>{n(e)},[]),T=(0,g.useCallback)(e=>{let{message:n,colour:t}=e;o(n,t)},[o]);(0,g.useEffect)(()=>{b({accountId:a,userId:r.sub})},[]);const O=(0,g.useCallback)(()=>{const e=(null==t?void 0:t.getFilterModel())||{};d?delete e.owners:e.owners={type:"set",values:["".concat(r.given_name," ").concat(r.family_name)]},null==t||t.setFilterModel(e),u(!d)},[t,u,d,r.family_name,r.given_name]),k=(0,g.useCallback)(e=>{e.api.applyColumnState({state:kgt})},[]),j={content:"",actionButton:(0,Ze.jsxs)(Ugt,{container:!0,children:[p&&(0,Ze.jsx)(Mgt,{container:!0,children:(0,Ze.jsx)(Ggt,{size:{md:6,lg:3.5},children:(0,Ze.jsx)(f.SegmentedButton,{values:jgt,onClick:O})})}),(0,Ze.jsxs)(Vgt,{children:[(0,Ze.jsx)(N$,{filtersApplied:null==e?void 0:e.filtersApplied,resetGridState:()=>{null==e||e.resetGridState(),u(!1)}}),l&&(0,Ze.jsx)(zP.A,{title:"Create project",children:(0,Ze.jsx)(f.IconButton,{variant:"contained",onClick:()=>c(zgt.Create),children:(0,Ze.jsx)(f.Icons.Add,{})})})]})]})};return(0,Ze.jsxs)(f.Page,{loading:y,error:h,title:j,children:[(0,Ze.jsx)(Pgt,{agGridRef:x,accountId:a,onGridReady:k,projects:v,showGoTo:!1}),s===zgt.Create&&(0,Ze.jsx)(ggt,{accountId:a,onDismiss:()=>c(void 0),onComplete:e=>T({message:e.message,colour:e.color})})]})};var Wgt,qgt,Jgt,Ygt,Hgt=t(48837),Kgt=t(51549),Qgt=t.n(Kgt);function Zgt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Xgt=(0,Ge.default)(ze.JU)(Wgt||(Wgt=Zgt(["\n  margin-right: ",";\n"])),e=>e.theme.geometry.xs.spacing),ebt=Ge.default.div(qgt||(qgt=Zgt(["\n  margin-top: ",";\n  margin-bottom: ",";\n  display: flex;\n  align-items: center;\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.geometry.xs.spacing),nbt=(0,Ge.default)(f.FileUploadButton)(Jgt||(Jgt=Zgt(["\n  width: 100%;\n"]))),tbt=(0,Ge.default)("div")(Ygt||(Ygt=Zgt(["\n  margin-bottom: ",";\n"])),e=>e.theme.geometry.xs.spacing),abt=e=>{let{evidenceDocuments:n,setEvidenceDocuments:t,evidenceNotes:a,setEvidenceNotes:r}=e;const i=(0,g.useCallback)(async e=>{const a=[...n,...e];t(a)},[n,t]);return(0,g.useEffect)(()=>()=>{r(""),t([])},[]),(0,Ze.jsxs)(f.Grid,{container:!0,direction:"column",columns:2,children:[(0,Ze.jsx)(ebt,{children:(0,Ze.jsx)(Xgt,{children:"Evidence Name"})}),(0,Ze.jsx)(f.TextArea,{size:"medium",onChange:e=>{r(e.target.value)},name:"notes",value:a}),(0,Ze.jsx)(ebt,{children:(0,Ze.jsx)(Xgt,{children:"Evidence"})}),(0,Ze.jsx)(tbt,{children:!(null==n||!n.length)&&n.map(e=>(0,Ze.jsx)(Yyt,{file:e,readOnly:void 0,onDelete:()=>{t(n.filter(n=>n!==e))}},e instanceof window.File?null==e?void 0:e.name:e.fileName))}),(0,Ze.jsx)(nbt,{multiple:!0,fullWidth:!0,accept:xr.allowedDocument.mimeType,onFileUpload:i,children:"Attach Evidence"})]})};var rbt;const ibt=(0,Ge.default)("div")(rbt||(rbt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}([""]))),obt=e=>{let{title:n,desc:t}=e;return(0,Ze.jsx)(ibt,{children:(0,Ze.jsx)(f.Card,{iconName:"Check",title:t,subContent:n})})};function lbt(e){var n,t;let{label:a,value:r,error:i,disabled:o,onChange:l,accountId:s,errorMessage:c,isSubmitting:d,name:u="metersIds",locationsToFilter:p,isGenerationMeters:m}=e;const y=null==p?void 0:p.map(e=>e.label),{data:b,loading:v}=(0,h.IT)(Qc,{variables:{accountId:s,field:"locationPointId"},fetchPolicy:"network-only"}),x=null==b||null===(n=b.getEnergySourcePageFilter)||void 0===n?void 0:n.filter(e=>null==y?void 0:y.includes(e.label)),T=(null==x?void 0:x.map(e=>e.value))||[],O=Bue(T,m),{data:k,loading:j}=(0,h.IT)(Hc,{variables:{accountId:s,filters:O,sort:[{field:"name",order:"asc"}]},skip:v,fetchPolicy:"network-only"});let C=(0,g.useMemo)(()=>{var e;const n=null==k||null===(e=k.getEnergySourceByAccountIdAndType)||void 0===e?void 0:e.rows;return(0,zt.sortBy)(null==n?void 0:n.map(xi),e=>null==e?void 0:e.label.trim().toLowerCase())},[null==k||null===(t=k.getEnergySourceByAccountIdAndType)||void 0===t?void 0:t.rows]);return p&&p.length>0&&!T.length&&(C=[{label:"There is no meters for selected locations",value:null,isDisabled:!0}]),(0,Ze.jsx)(f.MultiSelect,{name:u,value:r,label:a,error:i,options:C,onChange:l,helperText:c,disabled:d||o,isLoading:v||j,placeholder:"Start typing to search for a meter"})}var sbt,cbt,dbt,ubt,pbt,mbt,fbt,ybt,gbt,bbt,hbt,vbt,xbt,Tbt,Obt,kbt,jbt;function Cbt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Sbt=(0,Ge.default)("div")(sbt||(sbt=Cbt(["\n  display: flex;\n  gap: 22px;\n  align-items: center;\n"]))),Nbt=(0,Ge.default)(f.Button)(cbt||(cbt=Cbt(["\n  width: 160px;\n"]))),wbt=(0,Ge.default)("div")(dbt||(dbt=Cbt(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  background-color: ",";\n  width: 100%;\n"])),e=>e.theme.colors.basic.white),Dbt=(Ge.default.div(ubt||(ubt=Cbt(["\n  display: flex;\n  width: 100%;\n"]))),(0,Ge.default)(f.Button)(pbt||(pbt=Cbt(["\n  span {\n    margin-right: 0;\n  }\n  && {\n    padding: 0;\n    min-width: 40px;\n    max-width: 40px;\n    height: 40px;\n    margin: 10px;\n    border-radius: 50%;\n  }\n"])))),Abt=(0,Ge.default)(f.Button)(mbt||(mbt=Cbt(["\n  margin-top: 10px !important;\n  width: 100%;\n"]))),Rbt=(0,Ge.default)(p.Link)(fbt||(fbt=Cbt(["\n  width: fit-content;\n"]))),Pbt=(0,Ge.default)("div")(ybt||(ybt=Cbt(["\n  flex-direction: row;\n  padding: 0;\n  flex-wrap: wrap;\n  margin: 3px 0px;\n  width: 100%;\n  display: flex;\n  align-items: center;\n  gap: 10px;\n"]))),Lbt=(0,Ge.default)("div")(gbt||(gbt=Cbt(["\n  width: auto;\n"]))),Ibt=(0,Ge.default)("div")(bbt||(bbt=Cbt(["\n  display: grid;\n  justify-items: start;\n  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));\n  margin: 10px 0;\n  grid-gap: 10px;\n  grid-row-gap: 30px;\n  width: 100%;\n  grid-column-gap: 12px;\n"]))),Ebt=(0,Ge.default)("div")(hbt||(hbt=Cbt(["\n  min-width: 30vw;\n"]))),_bt=(0,Ge.default)("div")(vbt||(vbt=Cbt(["\n  padding-top: ",";\n"])),e=>e.theme.geometry.md.spacing),Fbt=(0,Ge.default)("div")(xbt||(xbt=Cbt(["\n  width: 100%;\n  display: flex;\n  flex-direction: row;\n  align-items: flex-start;\n  gap: ",";\n  margin-top: ",";\n  justify-content: ",";\n"])),e=>e.theme.geometry.md.spacing,e=>e.theme.geometry.sm.spacing,e=>{let{justifyContent:n}=e;return n||"space-around"}),Bbt=(0,Ge.default)(f.Text)(Tbt||(Tbt=Cbt(["\n  margin: ",";\n"])),e=>e.theme.geometry.xs.spacing),Ubt=(0,Ge.default)(f.TextField)(Obt||(Obt=Cbt(["\n  width: 100%;\n"]))),Mbt=Ge.default.div(kbt||(kbt=Cbt(["\n  svg {\n    cursor: pointer;\n  }\n\n  display: flex;\n  align-items: center;\n"]))),Vbt=(0,Ge.default)(f.Icons.InfoOutlined)(jbt||(jbt=Cbt(["\n  margin-left: ",";\n  color: ",";\n"])),e=>e.theme.geometry.xs.spacing,e=>e.theme.colors.warning.normal.background);function zbt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Gbt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?zbt(Object(t),!0).forEach(function(n){$bt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):zbt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function $bt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const Wbt=()=>{var e,n,t,a,r,i;const{id:o}=(0,m.g)(),l=(0,m.Zp)(),s=oc(),c=rt(void 0,{onChange:(0,g.useCallback)(()=>{l("/v2/".concat(s.projects.root))},[l,s])}),d=rc(),{showNotification:u}=vt(),[p,y]=(0,g.useState)(!1),[b,v]=(0,g.useState)(""),[x,T]=(0,g.useState)([]),[O,k]=(0,g.useState)(!1),[j,C]=(0,g.useState)(!1),[S,N]=(0,g.useState)(),w=d.project.some(e=>e.startsWith("edit")),D=d.task.some(e=>e.startsWith("create")),A=d.project.some(e=>e.startsWith("delete")),R=EQn(),P=window.history.state&&window.history.state.index>0,L=(0,zyt.t)(IQn),{data:I,formattedProjectData:E,loading:_,selectedProjectCategory:F,setSelectedProjectCategory:B}=(e=>{var n;const[t,a]=(0,g.useState)(),r=(0,h.IT)(ld,{variables:{id:e},skip:!(null!=e&&e.length),onCompleted:e=>{var n;a((null==e||null===(n=e.getProject.scheme)||void 0===n?void 0:n.category)||null)}}),i=(0,g.useMemo)(()=>{var e,n;return null!==(e=r.data)&&void 0!==e&&e.getProject?Ii(null===(n=r.data)||void 0===n?void 0:n.getProject):{}},[null===(n=r.data)||void 0===n?void 0:n.getProject]);return cd(cd({},r),{},{selectedProjectCategory:t,setSelectedProjectCategory:a,formattedProjectData:i})})(o),U=(0,g.useMemo)(()=>E?{id:o,accountId:c,name:(null==E?void 0:E.name)||"",description:(null==E?void 0:E.description)||"",cost:(null==E?void 0:E.cost)||0,priority:(null==E?void 0:E.priority)||"",impact:(null==E?void 0:E.impact)||"",frequency:(null==E?void 0:E.frequency)||"",owners:(null==E?void 0:E.owners)||[],baselineStartDate:(null==E?void 0:E.baselineStartDate)||"",startDate:(null==E?void 0:E.startDate)||"",endDate:(null==E?void 0:E.endDate)||"",schemeId:E.schemeId||"",locations:(null==E?void 0:E.locations)||[],meters:(null==E?void 0:E.meters)||[],evidenceNotes:(null==E?void 0:E.evidenceNotes)||[],plannedBenefit:(null==E?void 0:E.plannedBenefit)||0,plannedCO2eChange:(null==E?void 0:E.plannedCO2eChange)||0,plannedCostChange:(null==E?void 0:E.plannedCostChange)||0}:{},[E]),{reset:M,control:V,trigger:z,watch:G,setValue:$,handleSubmit:W,formState:q}=(0,Rw.mN)({resolver:L,mode:"onChange",defaultValues:U}),J=(0,f.useTheme)(),{isDirty:Y,isValid:H}=q,K=e=>({label:e.name,value:e.id});(0,h.IT)(wG,{onCompleted:e=>{N(null==e?void 0:e.getProjectCategories.map(K))},onError:()=>{N([])}});const Q=null==S||null===(e=S.find(e=>(null==e?void 0:e.label)===Cd))||void 0===e?void 0:e.value,Z=(0,g.useCallback)(e=>{let{message:n,colour:t}=e;u(n,t)},[u]),[X,{loading:ee}]=(0,Ot.n)(bZn,{onCompleted:()=>{u("Task has been deleted from this project")},onError:()=>{u("Something went wrong! Please try again later.","danger")}}),[ne,{loading:te}]=(0,Ot.n)(yZn,{onCompleted:()=>{u("Project has been successfully updated")},onError:()=>{u("Something went wrong! Please try again later.","danger")}}),[ae,{loading:re}]=(0,Ot.n)(mZn,{onCompleted:()=>{l(P?-1:s.projects.root),u("Project has been successfully deleted")},onError:()=>{u("Something went wrong! Please try again later.","danger")}}),ie=(0,g.useCallback)(e=>{const n=Fi(e);X({variables:n,refetchQueries:["GetProjectById"]})},[ne,H,c,b]),oe=(0,g.useCallback)(e=>{const n=((e,n,t)=>{var a,r,i,o,l,s;return Mi(Mi({},e),{},{accountId:n,priority:(null==e?void 0:e.priority)||"",id:(null==e?void 0:e.id)||(0,Ai.A)(),plannedBenefit:Number(e.plannedBenefit)||e.plannedBenefit,startDate:null!==(a=Wt()(e.startDate,"MM/DD/YYYY").toISOString(!0))&&void 0!==a?a:e.startDate,endDate:null!==(r=Wt()(e.endDate,"MM/DD/YYYY").toISOString(!0))&&void 0!==r?r:e.endDate,baselineStartDate:null!==(i=Wt()(e.baselineStartDate,"MM/DD/YYYY").toISOString(!0))&&void 0!==i?i:e.baselineStartDate,owners:null==e||null===(o=e.owners)||void 0===o?void 0:o.map(e=>e.value),locations:null==e||null===(l=e.locations)||void 0===l?void 0:l.map(e=>e.value),meters:null==e||null===(s=e.meters)||void 0===s?void 0:s.map(e=>e.value),plannedCO2eChange:e.plannedCO2eChange&&Number(e.plannedCO2eChange)?Math.abs(Number(e.plannedCO2eChange)):e.plannedCO2eChange,plannedCostChange:e.plannedCostChange&&Number(e.plannedCostChange)?Math.abs(Number(e.plannedCostChange)):e.plannedCostChange,createdAt:(new Date).toISOString(),evidenceNotes:Ei(t||[])})})(e,c,b);H&&ne({variables:n,refetchQueries:["GetProjectById"]})},[ne,H,c,b]),le=()=>{y(!1),v(""),T([])},se=null==I||null===(n=I.getProject)||void 0===n?void 0:n.name,ce=(0,g.useMemo)(()=>{const e=[{label:"Projects",to:s.projects.root}];return se&&e.push({label:se}),e},[se,s.projects.root]),de=_||te||ee||re,ue=(0,g.useCallback)(e=>{var n;return null===(n=e||[])||void 0===n?void 0:n.filter(e=>e.documents.length>0).reduce((e,n)=>(n.documents&&n.documents.length&&e.push(...n.documents),e),[])},[]),pe={color:J.palette.grey[600]};return(0,g.useEffect)(()=>{F7n()(U)||Qgt()(G(),U)||(M(U),ue(E.evidenceNotes))},[E]),E?(0,Ze.jsxs)(f.Page,{title:{content:(null==I||null===(t=I.getProjectById)||void 0===t?void 0:t.name)||"Project Details",crumbs:ce,actionButton:(0,Ze.jsxs)(Sbt,{children:[A&&(0,Ze.jsx)(Nbt,{onClick:()=>C(!0),disabled:!A,"data-testid":"Delete_Button",variant:"outlined",color:"primary",children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.delete"})}),(0,Ze.jsx)(Nbt,{onClick:()=>l(P?-1:s.projects.root),disabled:de,"data-testid":"Cancel_Button",variant:"outlined",color:"primary",children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.cancel"})}),(0,Ze.jsx)(Nbt,{disabled:de||!Y&&!_||!H,type:"button",onClick:W(oe),"data-testid":"Save_Button",variant:"contained",color:"primary",children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.save"})})]})},loading:de,error:void 0,children:[(0,Ze.jsx)(cyt,{open:j,deleteObjectName:"project",onConfirmClick:()=>{var e;void 0!==(e=o)&&ae({variables:{id:e}})},onDismissClick:()=>C(!1)},o),(0,Ze.jsx)(f.Modal,{title:"Add Evidence",onClose:le,open:p,children:(0,Ze.jsxs)(Ebt,{children:[(0,Ze.jsx)(abt,{evidenceDocuments:x,setEvidenceDocuments:T,evidenceNotes:b,setEvidenceNotes:v}),(0,Ze.jsx)(Abt,{type:"button",variant:"outlined",color:"primary",disabled:!x.length&&!b,onClick:async()=>{const e=await R(x,b),n=_i(E),t=Gbt(Gbt({},n),{},{evidenceNotes:n.evidenceNotes.concat(e)});ne({variables:t,refetchQueries:["GetProjectById"]}),le()},children:"Save Evidence"})]})}),de&&(0,Ze.jsx)(vyn,{"data-testid":"Loading_Indicator",children:(0,Ze.jsx)(f.Loader,{})}),(0,Ze.jsx)(lUe,{onComplete:e=>{Z(e)},accountId:c,onDismiss:()=>k(!1),sourcePage:"PROJECTS",projectId:o,hasProjectsAccess:!0,open:O}),!de&&!F7n()(E)&&(0,Ze.jsxs)(uyn,{children:[(0,Ze.jsx)("form",{onSubmit:W(oe),children:(0,Ze.jsxs)(f.Grid,{container:!0,columns:12,rowSpacing:3,children:[(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"name",control:V,render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.TextField,Gbt(Gbt({},a),{},{onChange:e=>a.onChange(e.target.value),disabled:de,label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.name"}),error:!(null===(n=r.error)||void 0===n||!n.message),helperText:null===(t=r.error)||void 0===t?void 0:t.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"description",control:V,render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.TextArea,Gbt(Gbt({},a),{},{"data-cy":"ProjectDetails__Input-description",size:"medium",label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.description"}),name:"description",disabled:de,value:null==a?void 0:a.value,error:!(null===(n=r.error)||void 0===n||!n.message),helperText:null===(t=r.error)||void 0===t?void 0:t.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"impact",render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.TextArea,Gbt(Gbt({},a),{},{label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.impact"}),"data-cy":"ProjectDetails__Input-impact",disabled:de,value:a.value,error:!(null===(n=r.error)||void 0===n||!n.message),helperText:null===(t=r.error)||void 0===t?void 0:t.message}))},control:V})}),(0,Ze.jsx)(f.Grid,{padding:0,size:12,children:(0,Ze.jsx)(Rw.xI,{name:"locations",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(C3,Gbt(Gbt({},t),{},{name:"locations",value:(null==t?void 0:t.value)||(null==E?void 0:E.locations),onChange:e=>t.onChange(e),isSubmitting:de,disabled:de,defaultOptions:!1,error:null===(n=a.error)||void 0===n?void 0:n.message}))}})}),(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"owners",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,g.createElement)($Be,Gbt(Gbt({},t),{},{key:t.name,onChange:e=>t.onChange(e),value:t.value,accountId:c,error:null===(n=a.error)||void 0===n?void 0:n.message,label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.owner"})}))}})}),(0,Ze.jsxs)(Fbt,{children:[(0,Ze.jsx)(Rw.xI,{name:"priority",control:V,render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.Select,Gbt(Gbt({},a),{},{label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.priority"}),name:"priority",className:"priority-select",disabled:de,onChange:e=>a.onChange(e.value),options:PKn,value:a.value,error:!(null===(n=r.error)||void 0===n||!n.message),helperText:null===(t=r.error)||void 0===t?void 0:t.message}))}}),(0,Ze.jsx)(f.Select,{options:S,label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.category"}),value:null==F?void 0:F.id,onChange:e=>{B(e.value?{id:e.value,name:e.label}:null),$("schemeId",""),$("meters",[]),z("schemeId")}})]}),(0,Ze.jsxs)(Fbt,{children:[(0,Ze.jsx)(Rw.xI,{name:"frequency",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.Select,Gbt(Gbt({},t),{},{name:"frequency",label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.frequency"}),"data-cy":"frequency-select",disabled:de,onChange:e=>{let{value:n}=e;t.onChange(n)},value:t.value,options:RKn,helperText:null===(n=a.error)||void 0===n?void 0:n.message,error:a.invalid}))}}),(0,Ze.jsx)(Rw.xI,{name:"schemeId",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(Kyt,Gbt(Gbt({},t),{},{name:"schemeId",accountId:c,onChange:e=>{let{value:n}=e;t.onChange(n)},value:t.value,isDisabled:de,projectCategory:F,error:null===(n=a.error)||void 0===n?void 0:n.message,isClearable:!0}))}})]}),(null==F?void 0:F.id)===Q||null!=E&&E.meters.length?(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"meters",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(lbt,{name:"meters",label:"Meters",value:t.value,accountId:c,disabled:!w,onChange:e=>t.onChange(e),errorMessage:null===(n=a.error)||void 0===n?void 0:n.message})}})}):null,(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(Rw.xI,{name:"cost",control:V,render:e=>{var n,t;let{field:a,fieldState:r}=e;return(0,Ze.jsx)(f.TextField,Gbt(Gbt({},a),{},{value:a.value,onChange:e=>a.onChange(e.target.value),label:(0,Ze.jsx)(Je.A,{id:"pages.project.details.cost"}),"data-cy":"ProjectDetails__Input-cost",disabled:de,name:"cost",error:!(null===(n=r.error)||void 0===n||!n.message),helperText:null===(t=r.error)||void 0===t?void 0:t.message}))}})}),(0,Ze.jsxs)(Fbt,{children:[(0,Ze.jsxs)(f.Grid,{minHeight:140,size:12,children:[(0,Ze.jsxs)(Mbt,{children:[(0,Ze.jsx)(Bbt,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.startDate"})}),(0,Ze.jsx)(zP.A,{title:"The date you would expect to start making savings from your project.",children:(0,Ze.jsx)(f.Text,{children:(0,Ze.jsx)(Vbt,{sx:pe})})})]}),(0,Ze.jsx)(Rw.xI,{name:"startDate",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.DatePicker,Gbt(Gbt({},t),{},{value:t.value,disabled:de,onChange:e=>{t.onChange(Wt().utc(e).format())},name:"startDate",error:null===(n=a.error)||void 0===n?void 0:n.message}))}})]}),(0,Ze.jsxs)(f.Grid,{minHeight:140,size:12,children:[(0,Ze.jsxs)(Mbt,{children:[(0,Ze.jsx)(Bbt,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.baselineStartDate"})}),(0,Ze.jsx)(zP.A,{title:"The date which you anticipate your planned savings to be realised.",children:(0,Ze.jsx)(f.Text,{children:(0,Ze.jsx)(Vbt,{sx:pe})})})]}),(0,Ze.jsx)(Rw.xI,{name:"baselineStartDate",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.DatePicker,Gbt(Gbt({},t),{},{value:t.value,disabled:de,onChange:e=>{t.onChange(Wt().utc(e).format())},name:"baselineStartDate",error:null===(n=a.error)||void 0===n?void 0:n.message}))}})]})]}),(0,Ze.jsxs)(f.Grid,{size:12,children:[(0,Ze.jsxs)(Mbt,{children:[(0,Ze.jsx)(Bbt,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.endDate"})}),(0,Ze.jsx)(zP.A,{title:"The annual period to compare project performance against.",children:(0,Ze.jsx)(f.Text,{children:(0,Ze.jsx)(Vbt,{sx:pe})})})]}),(0,Ze.jsx)(Rw.xI,{name:"endDate",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(f.DatePicker,Gbt(Gbt({},t),{},{value:t.value,disabled:de,onChange:e=>{t.onChange(Wt().utc(e).format())},name:"endDate",error:null===(n=a.error)||void 0===n?void 0:n.message}))}})]}),(0,Ze.jsxs)(Ibt,{children:[(0,Ze.jsx)(Rw.xI,{name:"plannedBenefit",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(Ubt,Gbt(Gbt({},t),{},{onChange:e=>t.onChange(e.target.value),value:null==t?void 0:t.value,"data-cy":"ProjectDetails__Input-plannedBenefit",disabled:de,name:"plannedBenefit",InputLabelProps:{style:{pointerEvents:"auto"}},label:(0,Ze.jsx)(Ze.Fragment,{children:(null==F?void 0:F.id)===Q?(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedBenefitGeneration"}):(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedBenefit"}),AKn[(null==F?void 0:F.name)||"default"]]})}),helperText:null===(n=a.error)||void 0===n?void 0:n.message,error:a.invalid}))}}),(0,Ze.jsx)(Rw.xI,{name:"plannedCO2eChange",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(Ubt,Gbt(Gbt({},t),{},{onChange:e=>t.onChange(e.target.value),value:null==t?void 0:t.value,label:(0,Ze.jsxs)(Mbt,{children:[(0,Ze.jsx)(Ze.Fragment,{children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedCarbonChange"})}),(0,Ze.jsx)(zP.A,{title:"This figure should be positive. Negative values will be automatically converted to a positive value in the Project Dashboard.",children:(0,Ze.jsx)(f.Text,{children:(0,Ze.jsx)(Vbt,{sx:pe})})})]}),InputLabelProps:{style:{pointerEvents:"auto"}},"data-cy":"ProjectDetails__Input-plannedCO2eChange",disabled:de,name:"plannedCO2eChange",helperText:null===(n=a.error)||void 0===n?void 0:n.message,error:a.invalid}))}}),(0,Ze.jsx)(Rw.xI,{name:"plannedCostChange",control:V,render:e=>{var n;let{field:t,fieldState:a}=e;return(0,Ze.jsx)(Ubt,Gbt(Gbt({},t),{},{onChange:e=>t.onChange(e.target.value),value:null==t?void 0:t.value,label:(0,Ze.jsxs)(Mbt,{children:[(0,Ze.jsx)(Je.A,{id:"pages.project.details.plannedCostChange"}),(0,Ze.jsx)(zP.A,{title:"This figure should be positive. Negative values will be automatically converted to a positive value in the Project Dashboard.",children:(0,Ze.jsx)(f.Text,{children:(0,Ze.jsx)(Vbt,{sx:pe})})})]}),"data-cy":"ProjectDetails__Input-plannedCostChange",disabled:de,helperText:null===(n=a.error)||void 0===n?void 0:n.message,error:a.invalid}))}})]})]})}),(0,Ze.jsxs)(_qe.A,{marginTop:"20px",children:[(0,Ze.jsxs)(Hgt.A,{flexDirection:"row",alignItems:"center",children:[(0,Ze.jsx)(f.Text,{size:"large",weight:"700",children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.tasks"})}),D&&(0,Ze.jsx)(zP.A,{title:"Create task",children:(0,Ze.jsx)(Dbt,{startIcon:(0,Ze.jsx)(f.Icons.Add,{}),variant:"contained",onClick:()=>k(!0)})})]}),!(null!=E&&null!==(a=E.tasks)&&void 0!==a&&a.length)&&(0,Ze.jsx)(f.Text,{size:"large",children:(0,Ze.jsx)(Je.A,{id:"pages.project.details.noTasks"})}),!(null==E||null===(r=E.tasks)||void 0===r||!r.length)&&(0,Ze.jsx)(LZn,{tasks:null==E?void 0:E.tasks,onTaskDelete:ie,canEditProject:w})]}),(0,Ze.jsx)(Hgt.A,{children:(0,Ze.jsx)(_bt,{children:(0,Ze.jsx)(ayn,{container:!0,item:!0,children:(0,Ze.jsxs)(wbt,{children:[(0,Ze.jsx)(iyn,{children:(0,Ze.jsx)(f.Text,{size:"large",weight:"700",children:"Evidence Library"})}),(0,Ze.jsxs)(Pbt,{children:[(0,Ze.jsx)(Lbt,{children:(0,Ze.jsx)(f.Card,{iconName:"AddCircleRounded",title:"Upload Evidence",disabled:!w,onClick:()=>y(!0),children:(0,Ze.jsx)(wyn,{icon:"add-circle",size:"50px"})},"upload-evidence")}),Array.isArray(null==E?void 0:E.evidenceNotes)?null==E||null===(i=E.evidenceNotes)||void 0===i?void 0:i.filter(e=>e.documents.length>0).map(e=>e.documents.map(n=>(0,Ze.jsx)(Rbt,{to:{pathname:"/documents/all/".concat(n.id)},children:(0,Ze.jsx)(obt,{title:n.fileName,desc:e.notes})},n.id))):null]})]})})})})]})]}):(0,Ze.jsx)(f.Loader,{size:100})};var qbt,Jbt;(0,f.styled)("div")(qbt||(qbt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  height: 100%;\n"])));const Ybt=(0,f.styled)("div")(Jbt||(Jbt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  width: 100%;\n  height: 100%;\n"]))),Hbt=()=>(0,Ze.jsx)(Ybt,{children:(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)($gt,{})}),(0,Ze.jsx)(m.qh,{path:"/:id",element:(0,Ze.jsx)(Wbt,{})})]})});var Kbt;const Qbt=(0,f.styled)("div")(Kbt||(Kbt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n\n  .MuiTabs-flexContainer {\n    padding: 0 32px;\n  }\n"]))),Zbt=e=>{var n;let{tab:t,hasProjectsAccess:a,hasTasksAccess:r}=e;const i=Pu(),o=null==i||null===(n=i.accessControls)||void 0===n?void 0:n.projects,l=[{label:"Tasks",to:"../tasks",children:(0,Ze.jsxs)(Ze.Fragment,{children:[!r&&(0,Ze.jsx)(nv,{name:"TasksAndProjects__NoResults",title:"Your account has no access to this section"}),r&&(0,Ze.jsx)(Fyt,{hasProjectsAccess:a})]})}],s=[...l,{label:"Projects",to:"../projects",children:(0,Ze.jsxs)(Ze.Fragment,{children:[!a&&(0,Ze.jsx)(XZn,{featureName:OR.PROJECTS,link:"/contact"}),a?(0,Ze.jsx)(Hbt,{}):""]})}],c=t.includes("tasks")||!o?0:1;return(0,Ze.jsx)(Qbt,{children:(0,Ze.jsx)(f.Tabs,{currentTab:c,tabs:o?s:l})})};function Xbt(){const[e,n,t,a]=(0,m.KC)();pc();const r=oc(),{getAccountInfo:{accessControls:i},getUserInfoById:{role:{permissions:o}}}=a,l=localStorage.getItem("failed_url"),s=(0,g.useMemo)(()=>ac(o),[o]),c={[Vt.gG.Surveysonly]:"/v2/surveys/received",[Vt.gG.Learner]:"/v2/".concat(r.learn.root)},d=a.getUserInfoById.role.role;return(0,m.Ye)((0,m.Eu)((0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(m.qh,{path:"".concat(r.home.root,"/*"),element:(0,Ze.jsx)(Kut,{applicationData:a})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.home.root,"/location/:locationId"),element:(0,Ze.jsx)(s3e,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.learn.root,"/*"),element:(0,Ze.jsx)(Wdt,{applicationData:a})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.governance.root,"/*"),element:(0,Ze.jsx)(cst,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.surveys.root,"/*"),element:(0,Ze.jsx)(oyt,{applicationData:a})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.data.root,"/*"),element:(0,Ze.jsx)(ztt,{applicationData:a})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.reporting.root,"/*"),element:(0,Ze.jsx)(Ton,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.docs.root,"/*"),element:(0,Ze.jsx)(urt,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.tasks.root,"/:id"),element:(0,Ze.jsx)(Oyt,{hasProjectsAccess:i.projects})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.tasks.root,"/*"),element:(0,Ze.jsx)(Zbt,{tab:r.tasks.root,hasProjectsAccess:i.projects,hasTasksAccess:i.tasks})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.projects.root,"/:id"),element:(0,Ze.jsx)(Wbt,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.projects.root,"/*"),element:(0,Ze.jsx)(Zbt,{tab:r.projects.root,hasProjectsAccess:i.projects,hasTasksAccess:i.tasks})}),!!s&&(0,Ze.jsx)(m.qh,{path:"".concat(r.configuration.root,"/*"),element:(0,Ze.jsx)(JCe,{massUploadFunction:e,setCreateMutation:(e,a)=>{n(e),a&&t(a)}})}),!!i.intelligence&&(0,Ze.jsx)(m.qh,{path:"".concat(r.intelligence.root,"/:id?"),element:(0,Ze.jsx)(J3n,{})}),!!i.flows&&(0,Ze.jsx)(m.qh,{path:"".concat(r.flows.root,"/*"),element:(0,Ze.jsx)(Trt,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.header.contact,"/*"),element:(0,Ze.jsx)(v4n,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.header.profile,"/*"),element:(0,Ze.jsx)(vpt,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(r.header.upgrade,"/*"),element:(0,Ze.jsx)(F2n,{})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(m.C5,{to:l||c[d]||"/".concat(r.home.root),replace:!0})})]})))}async function eht(e){const{data:n}=await _Oe.query({query:P,variables:{name:e}});return n.getUserInfoById.role.permissions}var nht,tht,aht;function rht(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const iht=(0,D.J1)(nht||(nht=rht(["\n  {\n    idToken @client {\n      sub\n      name\n    }\n  }\n"]))),oht=(0,D.J1)(tht||(tht=rht(["\n  {\n    currentAccountId @client\n  }\n"])));function lht(e){let{task:n}=e;const t=(null==n?void 0:n.includes("getAll"))||(null==n?void 0:n.includes("getParent"));return(0,D.J1)(aht||(aht=rht(["\n  query GetApplicationData("," $userIdString: String!, $accountId: ID!) {\n    getUserInfoById(id: $userIdString) {\n      ...getUserInfoFragment\n    }\n\n    getAccountInfo(id: $accountId) {\n      ...getAccountInfoFragment\n    }\n\n    getReceivedSurveysPage(accountId: $accountId) {\n      rows {\n        id\n        deadlineDate\n        submission {\n          id\n          status\n        }\n      }\n    }\n\n    ","\n  }\n  ","\n  ","\n"])),t?"$userId: ID!,":"",t?"getTasksByUserId(id: $userId, accountId: $accountId) {\n      id\n      isCompleted\n      dueDate\n      name\n      priority\n      owners {\n        id\n        first_name\n        last_name\n      }\n    }":"",R,bd)}function sht(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function cht(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sht(Object(t),!0).forEach(function(n){dht(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sht(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dht(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var uht,pht,mht,fht,yht,ght=t(85409);function bht(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const hht=(0,Ge.default)(ze.fv)(uht||(uht=bht(["\n  height: 100%;\n  width: 100%;\n  padding: ",";\n"])),e=>e.theme.geometry.md.spacing),vht=(0,Ge.default)(ze.fv)(pht||(pht=bht(["\n  text-align: center;\n"]))),xht=Ge.default.div(mht||(mht=bht(["\n  height: 70px;\n  width: 125px;\n  background: no-repeat top center / contain url(",");\n  margin-bottom: ",";\n  align-self: center;\n  flex: 0 0 auto;\n"])),On,e=>e.theme.geometry.sm.spacing),Tht=(0,Ge.default)(ze.$n)(fht||(fht=bht(["\n  margin-top: ",";\n  width: 140px;\n"])),e=>e.theme.geometry.sm.spacing),Oht=(0,Ge.default)(ze.EY)(yht||(yht=bht(["\n  margin-top: ",";\n  text-align: center;\n"])),e=>e.theme.geometry.sm.spacing);var kht=function(e){return e.OKTA="Okta",e.AZURE="Azure",e}(kht||{});let jht={"rio-azure-ad":kht.AZURE,okta:kht.OKTA};function Cht(){const[e,n]=(0,g.useState)(!1),t=(0,m.g)(),[a]=(0,Ot.n)(W),r=(0,g.useCallback)(()=>{n(!0),a({variables:{provider:t.providerId}})},[a,null==t?void 0:t.providerId]),i=!t.providerId||!(t.providerId in jht),o=oc();return"kier"===t.providerId?(0,Ze.jsx)(m.C5,{to:o.registration.login}):(0,Ze.jsxs)(hht,{container:!0,item:!0,distribution:"center",name:"login-container",children:[["Develop","QA","UAT"].includes((null==ght||null===(ght={NODE_ENV:"production",REACT_APP_LEARN_THUMBNAIL_UPLOAD:"https://vbmmdf81nl.execute-api.eu-west-2.amazonaws.com/live/learnthumbnailupload",REACT_APP_COGNITO_DOMAIN:"rio.auth.eu-west-2.amazoncognito.com",REACT_APP_RESOLVE_EXTERNAL_USER_URL:"https://zp73c6vc5l.execute-api.eu-west-2.amazonaws.com/current/resolve-external-user",REACT_APP_IDENTITY_POOL_ID:"eu-west-2:2fee832d-d0ba-420c-a056-0ed865cde419",REACT_APP_STRIPE_PUBLIC_KEY:"pk_live_51HLD9AEF3FA3cLa5DWIX6QpW41AHM0f5DALJjUtBoRhvP52iJrBkyGW9HajZ6MHF0M6weW7Nals5CkSZdULWyYyT00Pg5PgL0l",REACT_APP_PROFILE_BUCKET:"https://platform-profilepictures-live.s3.eu-west-2.amazonaws.com",REACT_APP_BANNER_CONTENT:"/VIDEO/LearnBanner.mp4",REACT_APP_AG_GRID_LICENSE_KEY:"Using_this_{AG_Grid}_Enterprise_key_{AG-063287}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{RIO_ESG_LTD}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{Rio}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{Rio}_need_to_be_licensed___{Rio}_has_been_granted_a_Deployment_License_Add-on_for_{1}_Production_Environment___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{30_September_2025}____[v3]_[01]_MTc1OTE4NjgwMDAwMA==8e1b4570338f7c27ca6155479e1e2c14",REACT_APP_DS_URL:"https://rio.ai",REACT_APP_LOCATION_PICTURE_BUCKET:"https://platform-location-pictures-live.s3.eu-west-2.amazonaws.com",REACT_APP_GOOGLE_ANALYTIC_KEY:"UA-74511216-3",REACT_APP_IMPACT_LOCATIONS_MAP_ID:"b3c1bd97c9d0fbf8",REACT_APP_AG_CHARTS_LICENSE_KEY:"Using_this_{AG_Charts}_Enterprise_key_{AG-085624}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Ditto_sustainability_limited}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{Rio}_only_for_{1}_Front-End_JavaScript_developer___All_Front-End_JavaScript_developers_working_on_{Rio}_need_to_be_licensed___{Rio}_has_been_granted_a_Deployment_License_Add-on_for_{1}_Production_Environment___This_key_works_with_{AG_Charts}_Enterprise_versions_released_before_{28_March_2026}____[v3]_[02]_MTc3NDY1NjAwMDAwMA==0f33e64d601fc4473c9e232e427c01f2",REACT_APP_DOCUMENT_UPLOAD:"https://1iyju5wg22.execute-api.eu-west-1.amazonaws.com/dev/documentupload",REACT_APP_INTELLIGENCE_API_STAGE:"live",REACT_APP_CONSULTATIONS_URL:"https://inference-engine.esg-r.io/api",REACT_APP_ENVIRONMENT_NAME:"Live",REACT_APP_USER_POOL_ID:"eu-west-2_CXMj8XQn0",REACT_APP_USER_POOL_WEB_CLIENT_ID:"2a8c10u5721464di89s75deqbr",REACT_APP_SENTRY_ENV:"LIVE",REACT_APP_BASE_URL:"https://sustainability.rio.ai",REACT_APP_DROMO_LICENSE_KEY:"a1fc32a8-fb02-4546-ad17-74254111f991",REACT_APP_HUBSPOT_TRACKER:"3847934",REACT_APP_GOOGLE_MAP_API_KEY:"AIzaSyD0bNhOInxPo2plOg1oxsYHeOsIXdefauE",REACT_APP_AZURE_SSO_APP_ID:"f7c97800-e70d-43a3-800e-64b6ba778a31",REACT_APP_AWS_REGION:"eu-west-2",REACT_APP_PINPOINT_REGION:"us-east-1",REACT_APP_GRAPHQL_URI:"https://kmkdrdo3dzcvnkzqzfnmfuwt4m.appsync-api.eu-west-2.amazonaws.com/graphql",REACT_APP_PINPOINT_APP_CLIENT_ID:"1b81e38efb7546329dd7eb32e0088b29"})||void 0===ght?void 0:ght.REACT_APP_ENVIRONMENT_NAME)||"Develop")&&(0,Ze.jsx)(Tn,{id:"banner",dismissable:!1,onDismiss:()=>null,name:"LoginContainer__NotificationBanner",color:"primary",icon:"exclamation-triangle",title:"This is the ".concat(kn("REACT_APP_ENVIRONMENT_NAME")," site"),body:"Please note that we regularly reset the data and anything you enter may be overwritten. We recommend that personal details of real individuals are not entered"}),(0,Ze.jsx)(ze.fI,{container:!0,item:!0,distribution:"center",children:(0,Ze.jsxs)(vht,{container:!0,vdistribution:"center",item:!0,itemAlign:"center",span:3,children:[(0,Ze.jsx)("a",{target:"__blank",href:kn("REACT_APP_DS_URL"),children:(0,Ze.jsx)(xht,{})}),(0,Ze.jsx)(ze.DZ,{size:"lg",children:(0,Ze.jsx)(Je.A,{id:"login.main.title"})}),(0,Ze.jsx)(ze.EY,{align:"center",children:(0,Ze.jsx)(Je.A,{id:"login.main.subheading"})}),i?(0,Ze.jsx)(Oht,{name:"formError",color:"danger",size:"sm",weight:"bold",children:(0,Ze.jsx)(Je.A,{id:"login.main.providerNotFound"})}):(0,Ze.jsx)(Tht,{name:"loginbutton",onClick:r,size:"sm",loading:e,children:(0,Ze.jsx)(Je.A,{id:"login.main.loginButtonSSO",values:{provider:null!=t&&t.providerId?jht[t.providerId]:"your IdP"}})})]})})]})}"Live"===kn("REACT_APP_ENVIRONMENT_NAME")&&(jht={luminor:kht.AZURE,kier:kht.AZURE,"british-council":kht.AZURE});const Sht=t.p+"microsoft-42b61fa109e1e5d566ff.svg",Nht=e=>{let{message:n}=e;switch(n){case"Incorrect username or password.":return"NotAuthorizedException";case"User does not exist.":return"UserNotFoundException";case"User is disabled.":return"UserDisabledException";case"Confirmation code cannot be empty":return"ConfirmationCodeEmptyException";case"Invalid code provided, please request a code again.":return"InvalidCodeException";default:return n}};var wht,Dht,Aht,Rht,Pht,Lht,Iht,Eht,_ht,Fht,Bht,Uht,Mht,Vht;function zht(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Ght=(0,f.styled)(f.TextField)(wht||(wht=zht(["\n  margin-top: 1rem;\n  margin-bottom: 1rem;\n"]))),$ht=(0,f.styled)("form")(Dht||(Dht=zht(["\n  width: 100%;\n"]))),Wht=(0,f.styled)("div")(Aht||(Aht=zht(["\n  display: flex;\n  align-items: center;\n  flex-direction: row;\n  gap: 5px;\n  justify-content: space-between;\n"]))),qht=(0,f.styled)("div")(Rht||(Rht=zht(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin: 1.5rem 0;\n"]))),Jht=(0,f.styled)("div")(Pht||(Pht=zht(["\n  align-items: center;\n  justify-content: center;\n  margin: 1.5rem 0;\n"]))),Yht=(0,f.styled)(f.Button)(Lht||(Lht=zht(["\n  flex: 1;\n  &:first-child {\n    text-align: left;\n  }\n  &:last-child {\n    text-align: right;\n  }\n\n  font-family: 'Plus Jakarta Sans';\n"]))),Hht=(0,f.styled)(f.Button)(Iht||(Iht=zht(["\n  padding-left: 3rem;\n  padding-right: 3rem;\n"]))),Kht=(0,f.styled)("img")(Eht||(Eht=zht([""]))),Qht=(0,f.styled)("div")(_ht||(_ht=zht(["\n  display: flex;\n  margin: 0 auto;\n  flex-direction: row;\n  gap: 5px;\n  justyify-conetent: center;\n  align-items: center;\n"]))),Zht=(0,f.styled)("div")(Fht||(Fht=zht(["\n  cursor: pointer;\n  width: 100%;\n  height: 40px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  border-radius: 25px;\n  border: 0.5px solid black;\n  pointer-events: ",";\n  opacity: ",";\n  &:hover {\n    transition: 0.3s;\n    background-color: ",";\n  }\n"])),e=>{let{isLoading:n}=e;return n?"none":"auto"},e=>{let{isLoading:n}=e;return n?"0.6":"1"},e=>{let{theme:n}=e;return n.sys.color.surfaceVariant}),Xht=(0,f.styled)("div")(Bht||(Bht=zht(["\n  display: flex;\n  width: 100%;\n  flex-direction: column;\n  justify-content: center;\n  gap: 10px;\n"]))),evt=(0,f.styled)("div")(Uht||(Uht=zht(["\n  display: flex;\n  align-items: center;\n  flex-direction: row;\n"]))),nvt=(0,f.styled)(f.Text)(Mht||(Mht=zht(["\n  margin: 0 auto;\n  text-align: center;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.outline}),tvt=(0,f.styled)(f.Text)(Vht||(Vht=zht(["\n  margin-bottom: 1rem;\n  text-align: center;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.error}),avt=e=>{let{onSSOClick:n,isLoading:t}=e;return(0,Ze.jsx)(Zht,{onClick:n,isLoading:t,"aria-disabled":t,children:(0,Ze.jsxs)(Qht,{children:[(0,Ze.jsx)(Kht,{src:Sht}),(0,Ze.jsx)(f.Text,{children:"Sign in with Microsoft"})]})})},rvt=e=>{let{loginError:n}=e;if(!n)return null;const t=(e=>({UserNotFoundException:"login.main.userNotFound",NotAuthorizedException:"login.main.incorrectPassword",UserDisabledException:"login.main.userDisabled",GeneralError:"login.main.generalError"}[e]))(n);return(0,Ze.jsx)(tvt,{color:"danger",size:"small",typescale:"label",children:t?(0,Ze.jsx)(Je.A,{id:t}):n})};function ivt(e){let{handleSubmit:n,handleChange:t,handleForgotPassword:a,email:r,password:i,isLoading:o,loginError:l,onSSOClick:s,supportsSSO:c}=e;const d=(0,eg.A)();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Logo,{height:"70px",style:{marginTop:"1rem",marginBottom:"2rem",marginLeft:"1rem"}}),(0,Ze.jsx)(f.Text,{size:"large",typescale:"title",children:(0,Ze.jsx)(Je.A,{id:"login.main.titleV2"})}),(0,Ze.jsx)(f.Text,{size:"large",typescale:"label",children:(0,Ze.jsx)(Je.A,{id:"login.main.subheadingV2"})}),(0,Ze.jsxs)($ht,{name:"login__form",onSubmit:n,children:[(0,Ze.jsx)(Ght,{name:"email",placeholder:d.formatMessage({id:"login.main.emailPlaceholder"}),value:r.value,error:!!r.error,onChange:t}),(0,Ze.jsx)(f.TextField,{name:"password",type:"password",placeholder:d.formatMessage({id:"login.main.passwordPlaceholder"}),value:i.value,error:!!i.error,onChange:t}),(0,Ze.jsxs)(qht,{children:[(0,Ze.jsx)(Yht,{variant:"text",id:"forgotPasswordTextLink",onClick:a,children:(0,Ze.jsx)(Je.A,{id:"login.main.forgotPassword"})}),(0,Ze.jsx)(Yht,{variant:"text",to:"/v2/register",children:(0,Ze.jsx)(Je.A,{id:"login.main.newRioUser"})})]}),(0,Ze.jsx)(Jht,{children:l&&(0,Ze.jsx)(rvt,{loginError:l})}),(0,Ze.jsxs)(Xht,{children:[(0,Ze.jsx)(Hht,{disabled:o,type:"submit",name:"loginbutton",loaderTheme:"dark",variant:"contained",children:(0,Ze.jsxs)(Wht,{children:[(0,Ze.jsx)(Je.A,{id:o?"login.main.loginButtonLoading":"login.main.loginButton"}),o&&(0,Ze.jsx)(f.Loader,{size:20})]})}),(0,Ze.jsx)(evt,{children:(0,Ze.jsx)(nvt,{children:"OR"})}),c&&(0,Ze.jsx)(avt,{onSSOClick:s,isLoading:o})]})]})]})}function ovt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function lvt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ovt(Object(t),!0).forEach(function(n){svt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ovt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function svt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const cvt={isLoading:!1,email:{value:"",error:""},password:{value:"",error:""},remember:{value:!1},formError:"",loginError:null,forgotPasswordModal:!1};function dvt(e,n){switch(n.type){case"form-value.change":return lvt(lvt({},e),{},{[n.name]:lvt(lvt({},[n.name]),{},{value:n.value})});case"loading.set":return lvt(lvt({},e),{},{isLoading:n.value});case"errors.set":return lvt(lvt({},e),{},{email:lvt(lvt({},e.email),{},{error:n.errors.email}),password:lvt(lvt({},e.password),{},{error:n.errors.password})});case"loginError.set":return lvt(lvt({},e),{},{loginError:n.error});case"forgotPassword.set":return lvt(lvt({},e),{},{forgotPasswordModal:n.value})}}const uvt=["username"];var pvt,mvt,fvt;function yvt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function gvt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yvt(Object(t),!0).forEach(function(n){bvt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yvt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function bvt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function hvt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const vvt=(0,f.styled)("div")(pvt||(pvt=hvt(["\n  display: block;\n  text-align: center;\n  padding: 0.3rem;\n"]))),xvt=(0,f.styled)("form")(mvt||(mvt=hvt(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  margin: 0.5rem 1.5rem;\n"]))),Tvt=(0,f.styled)("div")(fvt||(fvt=hvt(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n"]))),Ovt=e=>{let{username:n}=e,t=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,uvt);const{username:a,changeUsername:r,handleForgotPassword:i,success:o,error:l,loading:s}=function(e){const[n,t]=(0,g.useState)(!1),[a,r]=(0,g.useState)(!1),[i,o]=(0,g.useState)(e),[l,s]=(0,g.useState)(!1),[c]=(0,Ot.n)(J);return{handleForgotPassword:(0,g.useCallback)(e=>{if(e.preventDefault(),0===i.length)return s(!0);t(!0),c({variables:{username:i},onCompleted(){r(!0)},onError(){t(!1)}})},[r,c,t,i,s]),changeUsername:(0,g.useCallback)(e=>{s(!1),o(e.target.value)},[o]),username:i,success:a,error:l,loading:n}}(n),c=(0,eg.A)();return(0,Ze.jsxs)(vvt,gvt(gvt({},t),{},{children:[o&&(0,Ze.jsxs)(Tvt,{children:[(0,Ze.jsx)(f.Text,{size:"large",typescale:"title",sx:{marginBottom:"1rem"},children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.success.title"})}),(0,Ze.jsx)(f.Text,{size:"large",typescale:"label",sx:{marginBottom:"1rem"},children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.success.subheading"})}),(0,Ze.jsx)(f.Button,{name:"forgot-password-container__go-to-resetbutton",to:"/v2/reset-password?username=".concat(a),sx:{width:"fit-content"},children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.goToResetButton"})})]}),!o&&(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(f.Text,{size:"large",typescale:"title",sx:{marginBottom:"0.3rem"},children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.title"})}),(0,Ze.jsx)(f.Text,{sx:{textAlign:"center",marginBottom:"1rem"},size:"large",typescale:"label",children:(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.subheading"})}),(0,Ze.jsxs)(xvt,{onSubmit:i,children:[(0,Ze.jsx)(f.TextField,{name:"username",error:l,placeholder:c.formatMessage({id:"login.forgotPassword.usernamePlaceholder"}),value:a,onChange:r,sx:{marginBottom:"1.5rem"}}),(0,Ze.jsxs)(f.Button,{type:"submit",variant:"contained",name:"forgot-password-container__button",loading:s,sx:{alignSelf:"center"},children:[s&&(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.buttonSubmitting"}),!s&&(0,Ze.jsx)(Je.A,{id:"login.forgotPassword.submitButton"})]})]})]})]}))};var kvt,jvt,Cvt,Svt=t(55534),Nvt=t(75970),wvt=t(2919);class Dvt extends Error{}function Avt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Rvt=(0,f.styled)("div")(kvt||(kvt=Avt(["\n  display: flex;\n  flex-direction: column;\n  height: 100vh;\n  place-items: center;\n\n  & > #notification_banner {\n    position: absolute;\n    width: auto;\n    background-color: ",";\n  }\n"])),e=>{let{theme:n}=e;return n.sys.color.primary}),Pvt=(0,f.styled)("div")(jvt||(jvt=Avt(["\n  display: flex;\n  flex: 1;\n  justify-content: center;\n"]))),Lvt=(0,f.styled)("div")(Cvt||(Cvt=Avt(["\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  justify-content: center;\n  text-align: center;\n  align-items: center;\n  width: 30rem;\n"])));var Ivt,Evt,_vt,Fvt,Bvt,Uvt,Mvt,Vvt,zvt;function Gvt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const $vt=(0,f.styled)(f.Text)(Ivt||(Ivt=Gvt(["\n  padding: 24px 0;\n"]))).withComponent("h2"),Wvt=(0,f.styled)(f.Text)(Evt||(Evt=Gvt(["\n  padding: 0 0 24px;\n"]))),qvt=(0,f.styled)("a")(_vt||(_vt=Gvt(["\n  color: ",";\n"])),e=>e.theme.sys.color.primary),Jvt=(0,f.styled)(p.Link)(Fvt||(Fvt=Gvt([""]))),Yvt=(0,f.styled)(f.Button)(Bvt||(Bvt=Gvt(["\n  width: 100%;\n"]))),Hvt=(0,f.styled)("form")(Uvt||(Uvt=Gvt(["\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n"]))),Kvt=(0,f.styled)(f.Text)(Mvt||(Mvt=Gvt(["\n  padding: 16px 0;\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.error}),Qvt=(0,f.styled)(f.Grid)(Vvt||(Vvt=Gvt(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 100vh;\n"]))),Zvt=(0,f.styled)("div")(zvt||(zvt=Gvt(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  text-align: center;\n  align-items: center;\n  max-width: 480px;\n  width: 100%;\n"]))),Xvt=e=>{let{onSubmit:n,children:t,form:a,setErrors:r,name:i}=e;const o=(0,g.useCallback)(e=>{e.preventDefault();const t=nP(a);Object.keys(t).length?r(t):n(a)},[a,n,r]);return(0,Ze.jsx)(Hvt,{name:i,onSubmit:o,children:t})},ext=e=>{let{children:n,title:t}=e;return(0,Ze.jsx)(Qvt,{container:!0,children:(0,Ze.jsxs)(Zvt,{children:[(0,Ze.jsx)(f.Logo,{height:"70px",style:{marginTop:"1rem"}}),(0,Ze.jsx)($vt,{size:"large",typescale:"title",children:(0,Ze.jsx)(Je.A,{id:t})}),n]})})},nxt=e=>{let{terms:n,checked:t,onChange:a}=e;return(0,Ze.jsx)(f.Checkbox,{name:n,checked:t,label:(0,Ze.jsxs)(f.Text,{size:"medium",typescale:"body",children:[(0,Ze.jsx)(Je.A,{id:"login.termsAgreement.termsAgreementText"}),(0,Ze.jsx)(qvt,{href:"http://www.rio.ai/terms-of-".concat(n),target:"_blank",children:(0,Ze.jsx)(Je.A,{id:"login.termsAgreement.termsLinkText",values:{terms:(0,Ze.jsx)(Je.A,{id:"login.termsAgreement.".concat(n)})}})})]}),onChange:a})},txt=e=>{let{form:n,errors:t,handleChange:a,setErrors:r,handleCheckboxChange:i,handleCredentialsSubmit:o}=e;const l=(0,eg.A)();return(0,Ze.jsxs)(ext,{title:"login.registration.mainPage.title",children:[(0,Ze.jsx)(Wvt,{size:"small",typescale:"title",children:(0,Ze.jsx)(Je.A,{id:"login.registration.mainPage.subtitle"})}),(0,Ze.jsxs)(Xvt,{onSubmit:o,form:n,setErrors:r,name:"credentials",children:[(0,Ze.jsx)(f.TextField,{type:"email",value:n.email,error:!!t.email,placeholder:l.formatMessage({id:"login.registration.mainPage.emailPlaceholder"}),label:l.formatMessage({id:"login.registration.mainPage.emailPlaceholder"}),helperText:t.email&&l.formatMessage({id:"login.errors.validation.".concat(t.email)}),autoComplete:"email",name:"email",onChange:a,required:!0}),(0,Ze.jsx)(f.TextField,{type:"password",value:n.password,error:!!t.password,label:l.formatMessage({id:"login.registration.mainPage.passwordPlaceholder"}),helperText:t.password&&l.formatMessage({id:"login.errors.validation.".concat(t.password)}),placeholder:l.formatMessage({id:"login.registration.mainPage.passwordPlaceholder"}),autoComplete:"new-password",onChange:a,name:"password",required:!0}),(0,Ze.jsx)(f.TextField,{type:"password",value:n.passwordConfirmed,error:!!t.passwordConfirmed,label:l.formatMessage({id:"login.registration.mainPage.confirmPasswordPlaceholder"}),helperText:t.passwordConfirmed&&l.formatMessage({id:"login.errors.validation.".concat(t.passwordConfirmed)}),placeholder:l.formatMessage({id:"login.registration.mainPage.confirmPasswordPlaceholder"}),autoComplete:"new-password",onChange:a,name:"passwordConfirmed",required:!0}),(0,Ze.jsx)(nxt,{terms:"service",checked:n.agreedWithTermsOfService,onChange:()=>{i("service")}}),(0,Ze.jsx)(nxt,{terms:"use",checked:n.agreedWithTermsOfUse,onChange:()=>i("use")}),(0,Ze.jsx)(f.Button,{variant:"contained",type:"submit",disabled:!!Object.keys(t).length||!n.agreedWithTermsOfUse||!n.agreedWithTermsOfService,children:(0,Ze.jsx)(Je.A,{id:"login.registration.mainPage.nextButtonText"})})]})]})};function axt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function rxt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?axt(Object(t),!0).forEach(function(n){ixt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):axt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ixt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const oxt=e=>{let{form:n,errors:t,setErrors:a,handleChange:r,handleProfileChange:i,handleProfileSubmit:o}=e;const l=(0,eg.A)();return(0,Ze.jsx)(ext,{title:"login.registration.detailsPage.title",children:(0,Ze.jsxs)(Xvt,{onSubmit:o,name:"profile",form:n,setErrors:a,children:[(0,Ze.jsxs)(f.Grid,{container:!0,columnSpacing:4,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{type:"text",value:n.firstName,error:!!t.firstName,label:l.formatMessage({id:"login.registration.detailsPage.firstName"}),helperText:t.firstName&&l.formatMessage({id:"login.errors.validation.".concat(t.firstName)}),autoComplete:"given-name",name:"firstName",onChange:r,required:!0})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{type:"text",value:n.lastName,error:!!t.lastName,label:l.formatMessage({id:"login.registration.detailsPage.lastName"}),helperText:t.lastName&&l.formatMessage({id:"login.errors.validation.".concat(t.lastName)}),autoComplete:"family-name",name:"lastName",onChange:r,required:!0})})]}),(0,Ze.jsx)(f.Grid,{container:!0,children:(0,Ze.jsx)(f.Grid,{size:12,children:(0,Ze.jsx)(f.TextField,{type:"text",value:n.companyName,error:!!t.companyName,label:l.formatMessage({id:"login.registration.detailsPage.companyName"}),helperText:t.companyName&&l.formatMessage({id:"login.errors.validation.".concat(t.companyName)}),autoComplete:"organization",name:"companyName",onChange:r,required:!n.preferPersonalUse})})}),(0,Ze.jsx)(f.Grid,{container:!0,children:(0,Ze.jsx)(f.Checkbox,{name:"preferPersonalUse",checked:n.preferPersonalUse,label:l.formatMessage({id:"login.registration.detailsPage.personalUse"}),onChange:()=>{i(rxt(rxt({},n),{},{preferPersonalUse:!n.preferPersonalUse}))}})}),(0,Ze.jsxs)(f.Grid,{container:!0,columnSpacing:4,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(p.Link,{to:"/v2/register",children:(0,Ze.jsx)(Yvt,{variant:"outlined",type:"button",color:"primary",children:(0,Ze.jsx)(Je.A,{id:"login.registration.detailsPage.backButtonText"})})})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(Yvt,{variant:"contained",type:"submit",color:"primary",children:(0,Ze.jsx)(Je.A,{id:"login.registration.detailsPage.nextButtonText"})})})]})]})})},lxt=e=>{let{handleChange:n,errors:t,form:a,queryParams:r,setErrors:i,handleContactsSubmit:o}=e;const l=(0,eg.A)(),s=null==t?void 0:t.submit,c={"An account with the given email already exists.":(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Je.A,{id:"login.errors.existAccount",values:{email:a.email}}),(0,Ze.jsx)(Jvt,{to:"/v2/register".concat(r),onClick:()=>{i({})},children:(0,Ze.jsx)(Je.A,{id:"login.errors.changeEmail"})})]})},d=e=>{let{registrationError:n}=e;return n?(0,Ze.jsx)(Kvt,{size:"large",typescale:"label",children:n}):null};return(0,Ze.jsx)(ext,{title:"login.registration.contactPage.title",children:(0,Ze.jsxs)(Xvt,{name:"contacts",form:a,setErrors:i,onSubmit:()=>o(c),children:[(0,Ze.jsxs)(f.Grid,{container:!0,columnSpacing:4,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{type:"text",onChange:n,error:!!t.jobTitle,label:l.formatMessage({id:"login.registration.contactPage.jobTitle"}),helperText:t.jobTitle&&l.formatMessage({id:"login.errors.validation.".concat(t.jobTitle)}),value:a.jobTitle,autoComplete:"job",name:"jobTitle"})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{type:"text",error:!!t.department,label:l.formatMessage({id:"login.registration.contactPage.department"}),helperText:t.department&&l.formatMessage({id:"login.errors.validation.".concat(t.department)}),onChange:n,value:a.department,autoComplete:"department",name:"department"})})]}),(0,Ze.jsxs)(f.Grid,{container:!0,columnSpacing:4,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{type:"phone",onChange:n,error:!!t.phone,label:l.formatMessage({id:"login.registration.contactPage.phoneNumber"}),helperText:t.phone&&l.formatMessage({id:"login.errors.validation.".concat(t.phone)}),value:a.phone,autoComplete:"tel",name:"phone"})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(f.TextField,{type:"phone",onChange:n,error:!!t.mobile,label:l.formatMessage({id:"login.registration.contactPage.mobileNumber"}),helperText:t.mobile&&l.formatMessage({id:"login.errors.validation.".concat(t.mobile)}),value:a.mobile,autoComplete:"tel",name:"mobile"})})]}),s&&(0,Ze.jsx)(d,{registrationError:s}),(0,Ze.jsxs)(f.Grid,{container:!0,columnSpacing:4,children:[(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(p.Link,{to:"/v2/register/profile",children:(0,Ze.jsx)(Yvt,{variant:"outlined",type:"button",color:"primary",children:(0,Ze.jsx)(Je.A,{id:"login.registration.contactPage.backButtonText"})})})}),(0,Ze.jsx)(f.Grid,{size:6,children:(0,Ze.jsx)(Yvt,{variant:"contained",type:"submit",color:"primary",children:(0,Ze.jsx)(Je.A,{id:"login.registration.contactPage.finishButtonText"})})})]})]})})};var sxt,cxt,dxt,uxt,pxt;function mxt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const fxt=(0,f.styled)(f.Button)(sxt||(sxt=mxt(["\n  width: 100%;\n"]))),yxt=(0,f.styled)("div")(cxt||(cxt=mxt(["\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n"]))),gxt=(0,f.styled)(f.Text)(dxt||(dxt=mxt(["\n  color: ",";\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant}),bxt=(0,f.styled)(p.Link)(uxt||(uxt=mxt(["\n  color: ",";\n  font-size: ","px;\n  font-family: ",";\n  text-decoration: underline;\n  text-align: center;\n"])),e=>{let{theme:n}=e;return n.sys.color.onSurfaceVariant},e=>{let{theme:n}=e;return n.sys.typescale.body.large.size},e=>{let{theme:n}=e;return n.sys.typescale.body.large.family}),hxt=(0,f.styled)(f.Modal)(pxt||(pxt=mxt(["\n  .TitleClassName {\n    text-align: center;\n  }\n"]))),vxt=e=>{let{email:n,show:t,onDismiss:a,queryParams:r}=e;const{showNotification:i}=vt(),o=(0,g.useCallback)(async()=>{if(n)try{await y.N.resendSignUp(n.trim().toLowerCase()),i("Email has been sent again!")}catch(e){e instanceof Error?i("Email wasn't sent: ".concat(e.message)):i("An unexpected error occurred: ".concat(String(e)))}},[n,i]);return(0,Ze.jsx)(hxt,{title:"Verify your email address",open:t,onClose:a,titleClassName:"TitleClassName",children:(0,Ze.jsxs)(yxt,{children:[(0,Ze.jsx)(gxt,{typescale:"body",size:"large",children:"In order to start using your Rio account, you need to confirm your email address."}),(0,Ze.jsx)(fxt,{to:"/v2/verify-email".concat(r),variant:"contained",children:"Verify Email Address"}),(0,Ze.jsx)(bxt,{to:"",onClick:o,children:"Not received your confirmation? Resend Email"}),(0,Ze.jsx)(bxt,{to:"/v2/register",onClick:a,children:"Change Email Address"})]})})};var xxt,Txt,Oxt,kxt=t(18006);function jxt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function Cxt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jxt(Object(t),!0).forEach(function(n){Sxt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jxt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Sxt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Nxt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function wxt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Nxt(Object(t),!0).forEach(function(n){Dxt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Nxt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Dxt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Axt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}const Rxt=(0,f.styled)("div")(xxt||(xxt=Axt(["\n  display: flex;\n  flex-direction: column;\n  height: 100vh;\n  justify-content: center;\n  align-items: center;\n"]))),Pxt=(0,f.styled)(f.Button)(Txt||(Txt=Axt(["\n  width: 100%;\n  margin: 0;\n"]))),Lxt=(0,f.styled)("form")(Oxt||(Oxt=Axt(["\n  display: flex;\n  flex-direction: column;\n  gap: 1rem;\n  min-width: 30rem;\n  margin-top: 1rem;\n\n  button {\n    margin: auto;\n  }\n"]))),Ixt=e=>{let{error:n}=e;const t=(0,f.useTheme)();return n?(0,Ze.jsx)(f.Text,{size:"small",typescale:"label",sx:{color:t.sys.color.error},children:n}):null},Ext=e=>{let{children:n}=e;const t=(0,f.useTheme)();return(0,Ze.jsx)(f.Text,{size:"medium",typescale:"body",sx:{color:t.sys.color.error,marginTop:"0.5rem"},children:n})};var _xt=t(40833),Fxt=t(42656),Bxt=t(49603),Uxt=t(98724);function Mxt(e){let{children:n}=e;const t=Ts();return(0,Ze.jsx)(Gl.Provider,{value:t,children:n})}const Vxt=e=>{let{children:n}=e;const t=window._hsq=window._hsq||[],a=(0,m.zy)(),{token:r}=(rl(),at());return(0,g.useLayoutEffect)(()=>{const e=document.createElement("script");e.setAttribute("id","hs-script-loader"),e.setAttribute("src","https://js.hs-scripts.com/".concat(kn("REACT_APP_HUBSPOT_TRACKER"),".js")),document.head.appendChild(e)},[]),(0,g.useLayoutEffect)(()=>{t.push(["setPath",a.pathname]),t.push(["trackPageView"])},[a,t]),(0,g.useEffect)(()=>{r&&t.push(["identify",{email:null==r?void 0:r.email}])},[t,r]),n};var zxt;const Gxt=(0,Ge.createGlobalStyle)(zxt||(zxt=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n  div#hubspot-messages-iframe-container iframe {\n    display: none !important;\n  }\n"]))),$xt=["engage"],Wxt=e=>{let{children:n}=e;const t=(0,m.zy)(),a=$xt.some(e=>t.pathname.includes(e));return(0,g.useLayoutEffect)(()=>{const e=document.getElementById("hs-script-loader"),n=document.getElementById("hubspot-messages-iframe-container");e&&a&&document.head.removeChild(e),n&&a&&n.remove()},[a]),a?(0,Ze.jsxs)(g.Fragment,{children:[(0,Ze.jsx)(Gxt,{}),n]}):(0,Ze.jsx)(Vxt,{children:n})},qxt={"en-US":{home:{title:"Logged in home page",subtitle:"This is some simple localized text",lastCommit:"Last commit {commitId} by {author} at {timestamp}",logoutButtonLabel:"Log out",myProfile:"My Profile",contact:"Contact",search:"Search"},marketingHome:{title:"Logged out home page",loginButtonLabel:"Log in"},login:{registration:{mainPage:{title:"Welcome to Rio!",subtitle:"To get started please fill in your details below to set up an account",emailPlaceholder:"Email",passwordPlaceholder:"Password",confirmPasswordPlaceholder:"Confirm password",nextButtonText:"Next",submitButton:"Imposta password"},detailsPage:{title:"Now tell us more about you",firstName:"First Name",lastName:"Last Name",companyName:"Company Name",personalUse:"This account is for personal use",backButtonText:"Back to credentials",nextButtonText:"Next"},contactPage:{title:"How would we contact you?",jobTitle:"Job Title (Optional)",department:"Department (Optional)",phoneNumber:"Phone Number (Optional)",mobileNumber:"Mobile Number (Optional)",backButtonText:"Back to Profile",finishButtonText:"Finish"}},sidebar:{title:"Account Summary",step1:"About You",step2:"Your Plan",step3:"Your Subscription",trusted:"TRUSTED BY"},main:{title:"Welcome back!",titleV2:"Welcome!",subheading:"Please login to your account.",subheadingV2:"Please login to your account or sign up below",emailPlaceholder:"Email address",emailError:"Please enter a valid email address",passwordPlaceholder:"Password",passwordError:"Please enter a valid password",rememberLabel:"Remember me",loginButton:"Login",loginButtonLoading:"Logging in",loginButtonSSO:"Login with {provider}",userNotFound:"The username and password you entered did not match our records. Please double-check and try again.",incorrectPassword:"Incorrect credentials. Failure to log in 5 times will result in your account being locked.",userDisabled:"Your account has been disabled. Please contact an administrator.",generalError:"Something seems to have gone wrong. Please refresh and try again.",forgotPassword:"Forgot Password",newRioUser:"New to Rio? Register here",providerNotFound:"Provider not found, verify browser url."},setPassword:{title:"Set your password.",subheading:"Please set your new password.",oldPassword:"Temporary password",passwordPlaceholder:"New password",confirmPasswordPlaceholder:"Confirm password",submitButton:"Set password",userNotFound:"User not found. Please refresh and try again.",incorrectPassword:"Incorrect password. Please refresh and try again.",generalError:"Something seems to have gone wrong. Please refresh and try again."},resetPassword:{title:"Reset your password.",subheading:"Please reset your password to continue.",emailPlaceholder:"Email address",codePlaceholder:"Reset code",passwordPlaceholder:"New password",confirmPasswordPlaceholder:"Confirm password",submitButton:"Reset password",buttonSubmitting:"Resetting password",userNotFound:"User not found. Please refresh and try again.",incorrectPassword:"Incorrect password. Please refresh and try again.",confirmationCodeRequired:"Confirmation code is required.",invalidCode:"Invalid code provided, please go back and request a new code.",generalError:"Something seems to have gone wrong. Please refresh and try again.",limitExceeded:"Reset password limit exceeded please try again later.",expiredCode:"Invalid code provided, please go back and request a new code.",noCodeEntered:"Please enter the confirmation code - it can be found in your email.",noUsernameEntered:"Please enter the email of the account for which you have requested a password reset.",passwordsDontMatch:"Passwords do not match."},forgotPassword:{success:{title:"Password reset sent",subheading:"Please check your email for your password reset code"},title:"Forgotten your password?",subheading:"Enter your email below and we'll send you a password reset code",usernamePlaceholder:"Email address",submitButton:"Send Password Reset Code",buttonSubmitting:"Sending Password Reset Code",goToResetButton:"Enter your reset code"},termsAgreement:{termsAgreementText:"I agree to the ",termsLinkText:"Rio AI Ltd Terms of {terms}",service:"Service",use:"Use"},errors:{existAccount:"An account with the given email {email} already exists",changeEmail:"Change Email Address",validation:{missingEmail:"Please provide an email",invalidEmail:"The value you provided is invalid email address",missingPassword:"Please provide a password",confirmPassword:"Please confirm your password",mismatchPassword:"Passwords don't match",passwordPattern:"Password should contain at least 10 characters and shouldn’t contain leading and trailing white-spaces",companyName:"Please provide a company name",firstName:"Please provide your first name",lastName:"Please provide your last name"}}},sidebar:{homepage:"Home",learn:"Engage",governance:"Governance",data:"Data",surveys:"Surveys",reporting:"Reporting",documents:"Documents",intelligence:"Intelligence",flows:"Flows",configuration:"Configuration",tasks:"Tasks",support:"Support"},role:{SYSADMIN:"System Admin",BUSINESSADMIN:"Business Admin",BUSINESS:"Business User"},pages:{support:{contactInformation:"Contact information",header:"Send us a message",fullName:"Full name",companyName:"Company name",phoneNumber:"PhoneNumber",enquiryQuestion:"What is your enquiry about?",enquiry:"Enquiry",enquirySelectPlaceholder:"Please choose",enquiryPlaceholder:"Please type your message here...",send:"Send Enquiry",banner:{header:"Have you got a question?",message:"Head over to our support page {Link} for tips, advice, and answers to frequently asked questions.",link:"here"}},home:{welcome:"Welcome [FIRSTNAME], here's a few suggestions...",guidanceText:" ",dashboard:{learn:"Engage",governance:"Governance",analyse:"Analyse"},engageTasksStatuses:{incomplete:"Incomplete",completed:"Completed"}},learn:{heading:"Engage",breadcrumbs:{one:"Engage",two:"Courses"},banners:{explore:"Explore",continue:"Continue",completed:"Completed"},viewLink:"View All ({amount} Courses)"},coursesPreview:{breadcrumbs:{one:"Engage",two:"Course preview",three:"Learn"},backToEngage:"Back to Engage",backToLearn:"Back to Learn",startCourse:"Start course",statuses:{embed:{inprogress:"You have started this course."}},relatedCourses:"Related couses",noResults:"No related content found. This course is one of a kind; explore more subject areas from the Learn Homepage."},surveys:{nav:{heading:"Surveys"},subjects:{surveysSent:"Surveys sent",contributors:"Contributors",surveys:"All surveys",overview:"Overview",surveysReceived:"Surveys received",received:"Received"}},governance:{heading:"Governance",breadcrumbs:{one:"Governance",two:"Areas"},permissionsProblem:"Currently Governance is not included in your subscription, if you’d like to use this tool to assess your compliance risk, upload evidence and get automated alerts please contact Rio AI Ltd or your Rio Business Admin."},data:{heading:"Data",breadcrumbs:{one:"Data",two:"Subjects"},subjects:{wasteAlias:"Waste and Waste Locations",waste:"Waste",electricity:"Electricity",gas:"Natural Gas",fuel:"Fuel",water:"Water",materials:"Materials",refrigerants:"Refrigerants and Other Gases",heatSteam:"Heat and Steam",transport:"Transport",safety:"Health and Safety",employees:"Employees",engagement:"Community and Customer Engagement",ethics:"Business Ethics",biodiversity:"Biodiversity",buildingEnergyRatings:"Building Energy Ratings",hotelStays:"Hotel Stays & Home Working",location:"Location",overview:"Overview",investment:"Investment Transactions",fundsAssets:"Funds & Assets",oilProduction:"Production",salesData:"Sales Data",liquidFuels:"Liquid Fuels",emissionsDatabase:"Emissions Database",coreEstate:"Estates Configuration",oilAndGas:"Oil and Gas",inSiteContracts:"Contracts",inSiteBuildings:"Buildings",inSiteLandParcels:"Land Parcels"},overview:{upgrade:"Upgrade",collect:"COLLECT",about:"About Data Collection",dataCollection:"Data Collection",dataNotifications:"Data notifications",dataCompleteness:"Data completeness",dataQuality:"Data quality",missingTransactions:"Missing data and empty transactions",pendingTransactions:"transactions are pending and require approval",upload:"Upload",uploadHeader:"Quick Data Uploads",uploadText:"Uploading actual sustainability data is the best way to assess your impact",utilities:"Utilities",latestTransactions:"Latest transactions",utilityCol:"Utility",locationCol:"Location/Supplier",dateCol:"Date",uploadedCol:"Uploaded",accept:"Accept",acceptFiltered:"Accept Filtered",acceptInfo:"This clears the items from this section",clear:"This clears all selected filters",selectAll:"This selects all options on the current page",deselectAll:"This deselects all options on the current page",selectAllButtonText:"Select all",deselectAllButtonText:"Deselect all",clearButtonText:"Clear filters",confirmationDialog:{title:"Are you sure you want to accept and clear these items?",agree:"Yes, accept",disagree:"No, keep these visible"}}},reporting:{heading:"Reporting",breadcrumbs:{one:"Reporting",two:"Reports"}},intelligence:{heading:"Knowledge Bases",breadcrumbs:{one:"Intelligence",two:"Knowledge Bases"}},documents:{heading:"Documents",breadcrumbs:{one:"Documents",two:"Libraries"}},configuration:{account:{sections:{data:{name:"Data",buildingEnergyRatings:"Building Energy Ratings",electricity:"Electricity",fuel:"Fuel",gas:"Gas",heatSteam:"Heat & Steam",hotelStays:"Hotel Stays",materials:"Materials",refrigerants:"Refrigerants",transport:"Transport",waste:"Waste",water:"Water",investment:"Investment Transactions",scope3ActivityBasedMaterials:"Activity Based Materials",scope3SpendBasedMaterials:"Spend Based Materials",oilProduction:"Production",salesData:"Sales Data",liquidFuels:"Liquid Fuels",emissionsDatabase:"Emissions Database",coreEstate:"Estates Configuration",oilAndGas:"Oil and Gas",insite:"InSite Estate"},governance:{name:"Governance",agreements:"Agreements",frameworks:"Frameworks",legislation:"Legislation",policies:"Policies",systems:"Systems",tagLevelLegislation:"Tag Level Legislation",targets:"Targets"},other:{name:"Other",chatBot:"Chat Bot",dromoUpload:"Intelligent Upload",v2Design:"New Design",dataOverwriting:"Data Overwriting",dataTracker:"Data Tracker",engage:"Engage",flows:"Flows",intelligence:"RioBot",projects:"Projects",surveys:"Surveys",tasks:"Tasks",organisation:"Organisation"}}},nav:{heading:"Configuration",accounts:"Accounts",contractors:"Contractors",dashboards:{list:"Dashboards",subscriptions:"Dashboard Subscriptions"},meters:"Meters",learnContent:"Engage Content",learnSubscriptions:"Engage Subscriptions",evaluations:"Engage Evaluations",locations:"Locations",suppliers:"Suppliers",tags:"Tags",users:"Users",wasteStreams:"Streams",wasteHierarchies:"Waste Hierarchies",carbonConversionFactors:"Emission Factors",locationBased:"Location Based",marketBased:"Market Based",containerTypes:"Container Types",normalisers:"Normalisers",aliases:"Aliases",others:"Others",schemes:"Schemes",formTemplates:"Templates",formSubscriptions:"Template Subscriptions",questionsCategories:"Question Categories",questions:"Questions",flows:{configuration:"Configuration",subscriptions:"Subscriptions"},assetManagement:"Assets",funds:"Funds",engageBanners:"Engage Banners"},dataTracker:{container:{add:"+ Add Data Tracker Configuration",header:{anomaly:"Anomalies Thresholds",missing:"Frequency & Recurrence"}},modal:{account:"Account",supplier:"Supplier",thresholdPercentage:"Threshold Percentage",utilityType:"Utility Type (optional)",frequency:"Frequency",recurrence:"Recurrence",locations:"Locations (optional)",meters:"Meters (optional)",create:"Create",update:"Update",createHeader:"Create Data Tracker Configuration",updateHeader:"Update Data Tracker Configuration"}}},task:{grid:{header:{task:"Task",category:"Category",subject:"Subject",item:"Item",owners:"Owners",creator:"Creator",date:"Due Date",completedDate:"Completion Date",link:"Go To Task",project:"Project"},column:{emptyOwners:"Unassigned"}},details:{name:"Task Name",description:"Description",creator:"Creator",createdAt:"Created at",impact:"Scope of Area Project Is Impacting",locations:"Location(s)",priority:"Priority",category:"Category",scope:"Scope",owner:"Owners",relatedItem:"Related item",tags:"Tags",isCompleted:"Completed",completedAt:"Completion Date",subject:"Subject",dueDate:"Due Date",project:"Project",save:"Save",cancel:"Cancel",delete:"Delete",evidence:"Evidence",status:"Status",incomplete:"Incomplete",completed:"Completed"}},project:{grid:{header:{name:"Project name",impact:"Impact",description:"Description",locations:"Locations",category:"Category",scheme:"Scheme",meters:"Meters",owners:"Owners",cost:"Project cost",implementationDate:"Date of implementation",baselineDate:"Baseline year",benefitsDate:"Date for benefits to be realised",plannedBenefit:"Total planned benefit vs baseline year CONSUMPTION",plannedCostChange:"Total planned cost saving v baseline year COST",plannedCO2eChange:"Total planned carbon saving v baseline year CARBON",frequency:"Milestone frequency",notes:"Notes",evidence:"Evidence",action:"Action"},value:{emptyOwners:"Unassigned"}},create:{header:"Create New Project",submit:"Submit"},details:{name:"Project Name",description:"Description",impact:"Scope of Area Project Is Impacting",locations:"Location(s)",priority:"Priority",meters:"Meters",category:"Category",scheme:"Scheme",owner:"Owners",cost:"Project Cost (£)",currency:"Currency",startDate:"Implementation Date (Start Date)",endDate:"Date for planned benefits to be achieved (End Date)",baselineStartDate:"Baseline Year Start Date",plannedBenefit:"Planned Action (Consumption)",plannedBenefitGeneration:"Planned Action (Generation kwh)",plannedCarbonChange:"Planned Benefit (Carbon)",plannedCostChange:"Planned Benefit (Cost Saved)",frequency:"Milestone Frequency",tasks:"Tasks",addNewTask:"Add new task",save:"Save",cancel:"Cancel",delete:"Delete",noTasks:"There are no tasks for this project.",evidence:"Evidence"},messages:{created:"Project has been created.",error:"Something went wrong! Please try again later."}},dataAnomalies:{transactionTypes:{ELECTRICITY:"Electricity",FUEL:"Fuel",GAS:"Gas",MATERIALS:"Materials",TRANSPORT:"Transport",WASTE:"Waste",WATER:"Water",HOTELSTAYS:"Hotel stays",HEATSTEAM:"Heat & steam",ElectricityDataAnomaly:"Electricity",FuelDataAnomaly:"Fuel",GasDataAnomaly:"Gas",MaterialDataAnomaly:"Materials",TransportDataAnomaly:"Transport",WasteDataAnomaly:"Waste",WaterDataAnomaly:"Water",HotelStayDataAnomaly:"Hotel stays",HeatAndSteamDataAnomaly:"Heat & steam",RefrigerantDataAnomaly:"Refrigerants"}}},profile:{editProfilePicture:"Edit Profile Picture",firstName:"First name",lastName:"Last name",jobTitle:"Job title (optional)",department:"Department (optional)",phoneNumber:"Phone number (optional)",mobileNumber:"Mobile number (optional)",emailAddress:"Email address",update:"Update",userHaveBeenUpdated:"User details have been updated."},components:{selectPlaceholder:"Select..."},learnTour:{next:"Next",skip:"Skip",close:"Got it!",back:"Back",letsGo:"Let's go!",preview:{item1:{title:"And begin...",content:"Click start and enjoy…"}},home:{item1:{title:"Welcome {name},",content:"Make the world sustainable with Rio. Let’s show you how…"}},explore:{item1:{title:"Keep learning",content:"Explore our expert-authored sustainability content"},item2:{title:"See more",content:"Click the tile to understand the course"}}}},"it-IT":{home:{title:"Registrato in home page",subtitle:"Questo è un semplice testo localizzato",lastCommit:"Ultimo commit {commitId} da {autore} a {timestamp}",logoutButtonLabel:"Log out",myProfile:"Il mio profilo",contact:"Contattaci",search:"Cerca"},marketingHome:{title:"Registrati home page",loginButtonLabel:"Log in"},login:{registration:{mainPage:{title:"Benvenuto su Rio!",subtitle:"Per cominciare, per favore compila i campi sottostanti per creare un account",emailPlaceholder:"Email",passwordPlaceholder:"Password",confirmPasswordPlaceholder:"Conferma la password",nextButtonText:"Successivo",submitButton:"Imposta password"},detailsPage:{title:"Ora dicci di più su di te",firstName:"Nome",lastName:"Cognome",companyName:"Azienda",personalUse:"Questo account è per uso personale",backButtonText:"Torna alle credenziali",nextButtonText:"Successivo"},contactPage:{title:"Come possiamo contattarti?",jobTitle:"Professione (opzionale)",department:"Settore (opzionale)",phoneNumber:"Telefono fisso (opzionale)",mobileNumber:"Cellulare (opzionale)",backButtonText:"Torna al profilo",finishButtonText:"Termina"}},sidebar:{title:"Riepilogo Account",step1:"Su di Te",step2:"il Tuo Piano",step3:"il Tuo Abbonamento",trusted:"di FIDUCIA DA"},main:{title:"Bentornato!",subheading:"Si prega di accedere al tuo account.",emailPlaceholder:"Indirizzo email",emailError:"si Prega di inserire un indirizzo email valido",passwordPlaceholder:"Password",passwordError:"inserire una password valida",rememberLabel:"Ricordati di me",loginButton:"Login",loginButtonLoading:"Attendi",loginButtonSSO:"Login with {provider}",userNotFound:"Il nome utente e la password che hai inserito non corrispondono. Si prega di controllare e provare di nuovo.",incorrectPassword:"Le credenziali inserite non sono corrette. Dopo 5 tentativi falliti, il tuo account sarà sospeso.",userDisabled:"Your account è stato disabilitato. Si prega di contattare un administrator.",generalError:"Something sembra essere andato storto. Si prega di aggiornare e provare di nuovo.",forgotPassword:"Password dimenticata",newRioUser:"Nuovo utente? Registrati qui",providerNotFound:"Provider not found, verify browser url."},setPassword:{title:"Cambia la tua password.",subheading:"Per cortesia, imposta la tua nuova password.",oldPassword:"Password temporanea",passwordPlaceholder:"Nuova password",confirmPasswordPlaceholder:"Conferma password",submitButton:"Imposta password",userNotFound:"Utente non trovato. Si prega di aggiornare e provare again.",incorrectPassword:"Password errata. Si prega di aggiornare e provare again.",generalError:"Something sembra essere andato storto. Si prega di aggiornare e provare di nuovo."},resetPassword:{title:"Reimpostare la password.",subheading:"Reimposta la password per continuare.",emailPlaceholder:"Indirizzo email",codePlaceholder:"codice di Reset",passwordPlaceholder:"Nuova password",confirmPasswordPlaceholder:"Conferma password",submitButton:"Resetta la password",buttonSubmitting:"Attendi",userNotFound:"Utente non trovato. Si prega di aggiornare e riprovare.",incorrectPassword:"Password errata. Si prega di aggiornare e provare again.",confirmationCodeRequired:"È richiesto il codice di conferma.",invalidCode:"È stato fornito un codice non valido, torna indietro e richiedi un nuovo codice.",generalError:"Something sembra essere andato storto. Si prega di aggiornare e provare di nuovo.",limitExceeded:"Limite superato, riprova più tardi.",expiredCode:"È stato fornito un codice non valido, torna indietro e richiedi un nuovo codice.",noCodeEntered:"Inserisci il codice di conferma: puoi trovarlo nella tua email.",noUsernameEntered:"Inserisci l'e-mail dell'account per il quale hai richiesto la reimpostazione della password.",passwordsDontMatch:"Le passwords non corrispondono."},forgotPassword:{success:{title:"Reimpostazione della Password inviata",subheading:"per Favore controlla la tua e-mail per la reimpostazione della password codice"},title:"Hai dimenticato la password?",subheading:"Inserisci la tua mail qui e ti invieremo un codice per reimpostarla.",usernamePlaceholder:"Indirizzo email",submitButton:"Invia codice",buttonSubmitting:"Attendi",goToResetButton:"Inserisci il tuo codice di reset"},termsAgreement:{termsAgreementText:"Accetto i ",termsLinkText:"Termini di {terms} di Rio AI Ltd",service:"servizio",use:"utilizzo"},errors:{existAccount:"Esiste già un account associato alla mail {email}",changeEmail:"Cambia indirizzo email",validation:{missingEmail:"Inserisci un indirizzo email",invalidEmail:"L’indirizzo che hai inserito non è valido",missingPassword:"Inserisci una password",confirmPassword:"Conferma la tua password",mismatchPassword:"Le password non corrispondono",passwordPattern:"La password deve contenere almeno 10 caratteri e non devono esserci spazi vuoti",companyName:"Inserisci il nome dell’azienda",firstName:"Inserisci il tuo nome",lastName:"Inserisci il tuo cognome"}}},sidebar:{homepage:"Home",learn:"Formazione",governance:"Conformità",data:"Dati",surveys:"Sondaggi",reporting:"Report",documents:"Archivio",intelligence:"Consulente IA",flows:"Flussi",configuration:"Configurazione",tasks:"Compiti",support:"Supporto"},role:{SYSADMIN:"Sistema Admin",BUSINESSADMIN:"Business Admin",BUSINESS:"Utente Aziendale"},pages:{support:{contactInformation:"Informazioni di contatto",header:"Inviaci un messaggio",fullName:"Nome",companyName:"Azienda",phoneNumber:"Telefono",enquiryQuestion:"Cosa riguarda la tua richiesta?",enquiry:"Richiesta",enquirySelectPlaceholder:"Per favore, scegli",enquiryPlaceholder:"Digita il tuo messaggio...",send:"Invia richiesta",banner:{header:"Ti serve aiuto?",message:"Controlla la nostra {Link} per consigli e FAQ (in inglese).",link:"pagina di supporto"}},home:{welcome:"Benvenuto [FIRSTNAME], ecco un paio di suggerimenti...",guidanceText:"Clicca su «Formazione» nel menu a sinistra per vedere tutti i corsi disponibili.",dashboard:{learn:"Imparare",governance:"Rispettare",analyse:"Analizzare"},engageTasksStatuses:{incomplete:"Non completato",completed:"Completato"}},learn:{heading:"Formazione",breadcrumbs:{one:"Formazione",two:"Corsi"},banners:{explore:"Esplora",continue:"Continua",completed:"Completato"},viewLink:"Vedi tutti ({amount} corsi)"},coursesPreview:{breadcrumbs:{one:"Formazione",two:"Anteprima del corso"},backToEngage:"Torna alla pagina Formazione",startCourse:"Inizia il corso",statuses:{embed:{inprogress:"Hai già iniziato questo corso."}},relatedCourses:"Corsi correlati",noResults:"Non ci sono contenuti correlati. Esplora altri argomenti dalla pagina Formazione"},governance:{heading:"Libreria",breadcrumbs:{one:"Rispettare",two:"Libreria"}},surveys:{nav:{heading:"Sondaggi"},subjects:{surveysSent:"Sondaggi inviati",contributors:"Contributori",surveys:"Tutti i sondaggi",overview:"Panoramica",surveysReceived:"Sondaggi ricevute",received:"Ricevute"}},data:{heading:"Dati",breadcrumbs:{one:"Dati",two:"Soggetti"},subjects:{wasteAlias:"Rifiuti e luoghi dei rifiuti",waste:"Rifiuti",electricity:"Elettricità",gas:"Gas",fuel:"Carburante",water:"Acqua",materials:"Materiali",transport:"Trasporto",refrigerants:"Refrigeranti",heatSteam:"Calore e Vapore",buildingEnergyRatings:"Classificazioni energetiche degli edifici",hotelStays:"Soggiorni in hotel e lavoro a domicilio",location:"Posizione",overview:"Panoramica",investment:"Transazioni di investimento",fundsAssets:"Fondi e Asset",salesData:"Dati di Vendita",liquidFuels:"Combustibili Liquidi",coreEstate:"Estates Configuration",oilAndGas:"Petrolio e Gas",insiteContracts:"Contracts",inSiteBuildings:"Buildings",inSiteLandParcels:"Land Parcels"},overview:{upgrade:"Aggiornamento",collect:"RACCOGLIERE",about:"Informazioni sulla raccolta dei dati",dataCollection:"Raccolta Dati",dataNotifications:"Notifiche dei dati",dataCompleteness:"Completezza dei dati",dataQuality:"Qualità dei dati",missingTransactions:"Dati mancanti e transazioni vuote",pendingTransactions:"transazioni sono in sospeso e richiedono l'approvazione'",upload:"Caricamento",uploadHeader:"Caricamenti rapidi dei dati",uploadText:"Caricare dati reali sulla sostenibilità è il modo migliore per valutare il tuo impatto",utilities:"Utilità",latestTransactions:"Ultime transazioni",utilityCol:"Utilità",locationCol:"Posizione/Fornitore",dateCol:"Data",uploadedCol:"Caricato",accept:"Accettare",acceptFiltered:"Accettare Filtrato",acceptInfo:"Questo cancella gli elementi da questa sezione",clear:"Questo cancella tutti i filtri selezionati",deselectAll:"Ciò deseleziona tutte le opzioni nella pagina corrente",deselectAllButtonText:"Deselezionare tutto",clearButtonText:"Filtri chiari",confirmationDialog:{title:"Sei sicuro di voler accettare e cancellare questi elementi?",agree:"Sì, accetta",disagree:"No, tienili visibili"}}},reporting:{heading:"Segnalazione",breadcrumbs:{one:"Segnalazione",two:"Rapporti"}},intelligence:{heading:"Le Basi Di Conoscenza",breadcrumbs:{one:"Intelligenza",two:"Basi di Conoscenza"}},documents:{heading:"Libreria",breadcrumbs:{one:"Documenti",two:"Libreria"}},configuration:{account:{sections:{data:{name:"Dati",buildingEnergyRatings:"Classificazione energetica dell'edificio",electricity:"Elettricità",fuel:"Carburante",gas:"Gas",heatSteam:"Calore e vapore",hotelStays:"Soggiorni in hotel",materials:"Materiali",refrigerants:"Refrigeranti",transport:"Trasporto",waste:"Rifiuti",water:"Acqua",investment:"Transazioni di investimento",salesData:"Dati di Vendita",liquidFuels:"Combustibili Liquidi",emissionsDatabase:"Database delle Emissioni",coreEstate:"Estates Configuration",oilAndGas:"Petrolio e Gas",insite:"InSite Estate"},governance:{name:"Governance",agreements:"Accordi",frameworks:"Quadri",legislation:"Legislazione",policies:"Politiche",systems:"Sistemi",tagLevelLegislation:"Legislazione a livello di tag",targets:"Obiettivi"},other:{name:"Altro",chatBot:"Bot di chat",dromoUpload:"Dromo Caricamento",dataOverwriting:"Sovrascrittura dei dati",dataTracker:"Localizzatore di dati",engage:"Coinvolgere",flows:"Flussi",intelligence:"Intelligenza",projects:"Progetti",surveys:"Sondaggi",tasks:"Attività",organisation:"Organizzazione"}}},nav:{heading:"Configurazione",accounts:"Acconto",dataTrackerConfig:{missingThresholds:"Soglie mancanti",anomaliesThresholds:"Soglie di anomalie"},contractors:"Appaltatori",dashboards:"Cruscotti",dashboardSubscriptions:"Cruscotto Abbonamenti",meters:"Contatori Di Energia",learnContent:"Imparare Contenuti",learnSubscriptions:"Imparare Abbonamenti",evaluations:"Valutazioni",locations:"Posizioni",suppliers:"Fornitori",tags:"Etichetta",users:"Utenti",wasteStreams:"Flussi Di Rifiuti",wasteHierarchies:"Rifiuti Gerarchie",carbonConversionFactors:"Fattori di conversione del carbonio",marketBased:"Basato sulla mercato",locationBased:"Basato sulla posizione",containerTypes:"Tipi di container",others:"Altri",schemes:"Schemi",formTemplates:"Modelli di modulo",formSubscriptions:"Sottoscrizioni di moduli",questionsCategories:"Categorie di domande",questions:"domande",flows:{configuration:"Configurazione",subscriptions:"Sottoscriziones"},assetManagement:"Risorse",funds:"Fondi",engageBanners:"Striscioni"},dataTracker:{container:{add:"+ Aggiungi configurazione Data Tracker",header:"Data Tracker"},modal:{account:"Account",thresholdPercentage:"Percentuale di soglia",supplier:"Fornitore",frequency:"Frequenza traguardo",recurrence:"Ricorrenza",locations:"Località/i (opzionale)",meters:"Meters (opzionale)",create:"Creare",update:"Aggiorna",createHeader:"Crea configurazione Data Tracker",updateHeader:"Aggiorna configurazione Data Tracker"}}},task:{grid:{header:{task:"Compito",category:"Categoria",subject:"Soggetto",item:"Oggetto oggetto",owners:"Assegnatari",creator:"Creatore",date:"Scadenza",completedDate:"Data di completamento",link:"Vai all'attività",project:"Progetto"},column:{emptyOwners:"Non assegnato"}},details:{name:"Nome Compito",description:"Descrizione",creator:"Creatore",createdAt:"Creato a",impact:"L'ambito del progetto dell'area sta avendo un impatto",locations:"Località/i",priority:"Priorità",meters:"Contatori Di Energia",category:"Categoria",scope:"Scopo",owner:"Proprietari",relatedItem:"Related item",tags:"Etichetta",isCompleted:"Completato",completedAt:"Data di completamento",subject:"Soggetto",dueDate:"Scadenza",project:"Progetto",save:"Salva",delete:"Elimina",cancel:"Cancellare",evidence:"Evidenza",status:"Stato",incomplete:"Non completato",completed:"Completato"}},project:{grid:{header:{name:"Nome del progetto",impact:"Impatto",description:"Descrizione",locations:"Località",category:"Categoria",scheme:"Schema",meters:"Сontatori",owners:"Proprietari",cost:"Costo del progetto",implementationDate:"Data di attuazione",baselineDate:"Anno di riferimento",benefitsDate:"Data di realizzazione dei benefici",plannedBenefit:"Beneficio pianificato totale rispetto al CONSUMO dell'anno di riferimento",plannedCostChange:"Risparmio sui costi pianificato totale rispetto al COST dell'anno di riferimento",plannedCO2eChange:"Risparmio di carbonio totale pianificato rispetto all'anno di riferimento CARBONIO",frequency:"Frequenza traguardo",notes:"Note",evidence:"Prove",action:"Azione"},value:{emptyOwners:"Non assegnato"}},create:{header:"Crea nuovo Progetto",submit:"Invia"},details:{name:"Nome Progetto",description:"Descrizione",impact:"L'ambito del progetto dell'area sta avendo un impatto",locations:"Località/i",priority:"Priorità",category:"Categoria",scheme:"Schema",owner:"Proprietari",cost:"Progetto Costo (£)",currency:"Valuta",startDate:"Data di implementazione (data di inizio)",endDate:"Data per il raggiungimento dei benefici pianificati (Data di fine)",baselineStartDate:"Data di inizio dell'anno di riferimento",plannedBenefit:"Azione pianificata (consumo)",plannedBenefitGeneration:"Azione pianificata (Generazione kwh)",plannedCarbonChange:"Benefit previsto (carbonio)",plannedCostChange:"Vantaggio pianificato (costo risparmiato)",frequency:"Frequenza del traguardo",tasks:"Compiti",addNewTask:"Aggiungi una nuova attività",save:"Salva",delete:"Elimina",cancel:"Cancellare",noTasks:"Non ci sono azioni relative a questo progetto.",evidence:"Evidenza"},messages:{created:"Il progetto è stato creato.",error:"Qualcosa è andato storto! Per favore riprova più tardi."}},dataAnomalies:{transactionTypes:{ELECTRICITY:"Elettricità",FUEL:"Carburante",GAS:"Gas",MATERIALS:"Materiali",TRANSPORT:"Trasporto",WASTE:"Rifiuti",WATER:"Acqua",HOTELSTAYS:"Soggiorni in hotel e lavoro a domicilio",HEATSTEAM:"Calore e vapore",ElectricityDataAnomaly:"Elettricità",FuelDataAnomaly:"Carburante",GasDataAnomaly:"Gas",MaterialDataAnomaly:"Materiali",TransportDataAnomaly:"Trasporto",WasteDataAnomaly:"Rifiuti",WaterDataAnomaly:"Acqua",HotelStayDataAnomaly:"Soggiorni in hotel e lavoro a domicilio",HeatAndSteamDataAnomaly:"Calore e vapore",RefrigerantDataAnomaly:"Refrigeranti"}}},profile:{editProfilePicture:"Modifica immagine del profilo",firstName:"Nome",lastName:"Cognome",jobTitle:"Titolo professionale (opzionale)",department:"Settore (opzionale)",phoneNumber:"Telefono (opzionale)",mobileNumber:"Cellulare (opzionale)",emailAddress:"Indirizzo  email",update:"Aggiorna",userHaveBeenUpdated:"Dati del'utente aggiornati con successo."},components:{selectPlaceholder:"Seleciona"},learnTour:{next:"Successivo",skip:"Salta",close:"Ho capito!",back:"Indietro",letsGo:"Andiamo!",preview:{item1:{title:"Inizia…",content:"Clicca su Inizia il Corso, e buon proseguimento!"}},home:{item1:{title:"Benvenuto {name},",content:"Rendi il mondo più sostenibile con Rio. Ecco come…"}},explore:{item1:{title:"Continua ad imparare",content:"Esplora i nostri contenuti realizzati da persone esperte in sostenibilità"},item2:{title:"Scopri di più",content:"Clicca il titolo per saperne di più"}}}}},Jxt=e=>{let{children:n}=e;const t=(0,m.zy)(),a=st();return(0,g.useLayoutEffect)(()=>{const e=t.pathname.split("/").map(e=>(0,zt.startCase)(e.toString().toLowerCase())),n=e.length>1?e[1]:"",r=e.length>2?e[2]:"",i=a?r:n;document.title="Rio AI ".concat(i?"- ".concat(i):"")},[t,a]),(0,Ze.jsx)(g.Fragment,{children:n})};var Yxt=t(45688);const Hxt={auth:{clientId:kn("REACT_APP_AZURE_SSO_APP_ID"),authority:"https://login.microsoftonline.com/common"}};function Kxt(e){e instanceof Error&&"code"in e&&e.code===Bxt.lo.MISSING_TRANSLATION||console.error(e)}const Qxt=e=>{let{children:n}=e;const t=navigator.languages&&navigator.languages[0]||navigator.languages||navigator.language||"en-GB",a=rt(),r=Xa===a||er===a?"it-IT":t,i=qxt[r]?qxt[r]:qxt["en-US"],o=qxt[r]?t:"en-US";return(0,Ze.jsx)(Uxt.A,{onError:Kxt,locale:o,messages:Uo(i),children:n},o)},Zxt=new Yxt.vq(Hxt),Xxt=()=>(0,Ze.jsx)(Ge.ThemeProvider,{theme:ze.t6,children:(0,Ze.jsx)(f.ThemeProvider,{children:(0,Ze.jsx)(_xt.X,{client:_Oe,children:(0,Ze.jsx)(Svt.r7,{instance:Zxt,children:(0,Ze.jsx)(_2e.c4,{apiKey:F2e.apiKey,children:(0,Ze.jsx)(Qxt,{children:(0,Ze.jsx)(ht,{children:(0,Ze.jsx)(Mxt,{children:(0,Ze.jsx)(lIn,{children:(0,Ze.jsx)(kd.QueryParamProvider,{adapter:Fxt.S,children:(0,Ze.jsx)(Jxt,{children:(0,Ze.jsx)(Wxt,{children:(0,Ze.jsxs)(xin,{children:[(0,Ze.jsx)(m.sv,{})," ",(0,Ze.jsx)(p.ScrollRestoration,{})]})})})})})})})})})})})})});function eTt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function nTt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?eTt(Object(t),!0).forEach(function(n){tTt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):eTt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function tTt(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const aTt=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t=>{const a=(0,m.zy)();return(0,g.useEffect)(()=>{return e=a.pathname,s.Ay.set(nTt({page:e},n)),void s.Ay.pageview(e);var e},[a.pathname]),(0,Ze.jsx)(e,nTt({},t))}},rTt=aTt(e=>{let{component:n}=e;const{token:t,loading:a}=at(),r=(0,m.zy)();if(a)return null;if(t){var i;const e=r.pathname.startsWith("/v2/")?"/v2/":"/";return(0,Ze.jsx)(m.C5,{to:(null==r||null===(i=r.state)||void 0===i?void 0:i.from)||e})}return(0,Ze.jsx)(n,{})}),iTt=aTt(e=>{let{component:n,redirectUrl:t}=e;const{token:a,loading:r}=at(),i=(0,m.zy)();return(0,g.useMemo)(()=>r?null:a?(0,Ze.jsx)(n,{}):(0,Ze.jsx)(m.C5,{to:t,state:{from:i}}),[r,a,t,i,n])}),oTt=(0,p.createBrowserRouter)((0,m.Eu)((0,Ze.jsxs)(m.qh,{element:(0,Ze.jsx)(Xxt,{}),children:[(0,Ze.jsx)(m.qh,{path:ic.registration.verify,element:(0,Ze.jsx)(rTt,{component:Xy}),errorElement:(0,Ze.jsx)(wh,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(ic.registration.verify,"/:code"),element:(0,Ze.jsx)(rTt,{component:Xy}),errorElement:(0,Ze.jsx)(wh,{})}),(0,Ze.jsx)(m.qh,{path:ic.registration.setPassword,element:(0,Ze.jsx)(rTt,{component:function(){const e=(0,eg.A)(),n=((e,n)=>{if(!n)return"";const t=(e=>{const n=e.replace("?","").split("&"),t=[];for(let e=0;e<n.length;e++){const a=n[e].split("=");t[e]={key:a[0],value:a[1]}}return t})(n);for(let e=0;e<t.length;e++)if("email"===t[e].key)return t[e].value})(0,(0,m.zy)().search),[t,a]=(0,g.useState)({email:decodeURIComponent(n||""),oldPassword:{value:"",error:null},password1:{value:"",error:null},password2:{value:"",error:null},terms:{use:!1,service:!1}}),r=e=>{a(n=>Pg(Pg({},n),{},{[e.target.name]:Pg(Pg({},n[e.target.name]),{},{value:e.target.value})}))},[i,{loading:o}]=(0,Ot.n)(q),{data:{loginError:l}}=(0,h.IT)(z);return(0,Ze.jsx)(ug,{children:"NotAuthorizedException"===l?(0,Ze.jsx)(lg,{email:t.email}):(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(sg,{titleId:"login.setPassword.title",subtitleId:"login.setPassword.subheading"}),(0,Ze.jsxs)(fg,{name:"set-password__form",onSubmit:e=>((e,n)=>{if(e.preventDefault(),!t.oldPassword.value)return a(e=>Pg(Pg({},e),{},{oldPassword:Pg(Pg({},e.oldPassword),{},{error:"Please enter temporary password (Check email)."})}));const r=t.password1.value;if(r!==t.password2.value)return a(e=>Pg(Pg({},e),{},{password2:Pg(Pg({},e.password2),{},{error:"Passwords do not match"})}));const i=ng(r);if(i)return a(e=>Pg(Pg({},e),{},{password1:Pg(Pg({},e.password1),{},{error:i}),password2:Pg(Pg({},e.password2),{},{error:null})}));a(e=>{let{password1:n,password2:t}=e,a=function(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==n.indexOf(a))continue;t[a]=e[a]}return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,Ag);return Pg(Pg({},a),{},{password1:Pg(Pg({},n),{},{error:null}),password2:Pg(Pg({},t),{},{error:null})})}),n({variables:{email:t.email,oldPassword:t.oldPassword.value,password:t.password1.value}})})(e,i),children:[(0,Ze.jsx)(bg,{children:(0,Ze.jsx)(f.TextField,{type:"text",value:t.email,disabled:!0,label:"Email",required:!0})}),(0,Ze.jsx)(bg,{children:(0,Ze.jsx)(f.TextField,{name:"oldPassword",error:!!t.oldPassword.error,placeholder:e.formatMessage({id:"login.setPassword.oldPassword"}),label:e.formatMessage({id:"login.setPassword.oldPassword"}),value:t.oldPassword.value,helperText:t.oldPassword.error&&e.formatMessage({id:t.oldPassword.error}),onChange:r,type:"password",required:!0})}),(0,Ze.jsx)(bg,{children:(0,Ze.jsx)(f.TextField,{name:"password1",error:!!t.password1.error,placeholder:e.formatMessage({id:"login.setPassword.passwordPlaceholder"}),label:e.formatMessage({id:"login.setPassword.passwordPlaceholder"}),value:t.password1.value,onChange:r,helperText:t.password1.error&&e.formatMessage({id:t.password1.error}),type:"password",required:!0})}),(0,Ze.jsx)(bg,{children:(0,Ze.jsx)(f.TextField,{name:"password2",error:!!t.password2.error,placeholder:e.formatMessage({id:"login.setPassword.confirmPasswordPlaceholder"}),label:e.formatMessage({id:"login.setPassword.confirmPasswordPlaceholder"}),value:t.password2.value,onChange:r,helperText:t.password2.error&&e.formatMessage({id:t.password2.error}),type:"password",required:!0})}),(0,Ze.jsxs)(bg,{children:[(0,Ze.jsx)(Dg,{terms:"service",termsAgreement:t.terms.service,onChange:()=>a(e=>Pg(Pg({},e),{},{terms:{use:e.terms.use,service:!e.terms.service}}))}),(0,Ze.jsx)("br",{}),(0,Ze.jsx)(Dg,{terms:"use",termsAgreement:t.terms.use,onChange:()=>a(e=>Pg(Pg({},e),{},{terms:{use:!e.terms.use,service:e.terms.service}}))})]}),(0,Ze.jsx)(bg,{children:(0,Ze.jsx)(jg,{titleId:"login.setPassword.submitButton",disabled:!(t.terms.service&&t.terms.use)||o,loading:o,name:"set-password-container__button"})})]}),l&&(0,Ze.jsx)(Ng,{messageId:Ig(l)})]})})}}),errorElement:(0,Ze.jsx)(wh,{})}),(0,Ze.jsx)(m.qh,{path:ic.registration.resetPassword,element:(0,Ze.jsx)(rTt,{component:()=>{const e=(0,m.zy)(),n=(0,g.useMemo)(()=>{var n,t;const a=new URLSearchParams(e.search);return{username:null!==(n=a.get("username"))&&void 0!==n?n:"",code:null!==(t=a.get("code"))&&void 0!==t?t:""}},[e]),t=(0,eg.A)(),{state:a,loading:r,handleChange:i,handleResetPassword:o,loginError:l}=function(e,n){const[t,a]=(0,g.useState)({password1:{value:"",error:null,success:null},password2:{value:"",error:null,success:null},username:{value:e,error:null,success:null},confirmationCode:{value:n,error:null,success:null}}),[r,i]=(0,Ot.n)($),[o,l]=(0,g.useState)(null),[s,c]=(0,g.useState)(!1),d=(0,eg.A)(),u=(0,g.useCallback)((e,n,t,r)=>{if(0===e.length)return a(e=>wxt(wxt({},e),{},{username:wxt(wxt({},e.username),{},{error:d.formatMessage({id:"login.resetPassword.noUsernameEntered"})})})),!1;if(0===n.length)return a(e=>wxt(wxt({},e),{},{confirmationCode:wxt(wxt({},e.confirmationCode),{},{error:d.formatMessage({id:"login.resetPassword.noCodeEntered"})})})),!1;if(t!==r)return a(e=>wxt(wxt({},e),{},{password2:wxt(wxt({},e.password2),{},{error:d.formatMessage({id:"login.resetPassword.passwordsDontMatch"})})})),!1;const i=ng(t);return!i||(a(e=>wxt(wxt({},e),{},{password1:wxt(wxt({},e.password1),{},{error:i}),password2:wxt(wxt({},e.password2),{},{error:null})})),!1)},[a,d]),p=(0,g.useCallback)(e=>{a(n=>wxt(wxt({},n),{},{[e.target.name]:wxt(wxt({},n[e.target.name]),{},{value:e.target.value,error:!1})}))},[a]),m=(0,g.useCallback)(async e=>{e.preventDefault();const{username:{value:n},password1:{value:a},password2:{value:i},confirmationCode:{value:o}}=t;c(!0);try{if(!u(n,o,a,i))return;await y.N.forgotPasswordSubmit(n.toLocaleLowerCase(),o,a),await r({variables:{email:t.username.value.toLocaleLowerCase(),password:t.password1.value}})}catch(e){if(e instanceof Error){const n=(e=>{let{name:n,message:t}=e;return{UserNotFoundException:"login.resetPassword.userNotFound",NotAuthorizedException:"login.resetPassword.incorrectPassword",UserDisabledException:"login.main.userDisabled",ConfirmationCodeEmptyException:"login.resetPassword.confirmationCodeRequired",InvalidCodeException:"login.resetPassword.invalidCode",GeneralError:"login.resetPassword.generalError",LimitExceededException:"login.resetPassword.limitExceeded",ExpiredCodeException:"login.resetPassword.expiredCode"}[n]||t})(e);l(n)}de.Cp(e)}finally{c(!1)}},[t,r,l,c,u]);return(0,g.useMemo)(()=>({state:t,loading:s||i.loading,loginError:o,handleChange:p,handleResetPassword:m}),[t,s,i,o,p,m])}(n.username,n.code);return(0,Ze.jsxs)(Rxt,{children:[(0,Ze.jsx)(f.Logo,{height:"70px",style:{marginTop:"1rem",marginBottom:"2rem",marginLeft:"1rem"}}),(0,Ze.jsx)(f.Text,{size:"large",typescale:"title",children:(0,Ze.jsx)(Je.A,{id:"login.resetPassword.title"})}),(0,Ze.jsx)(f.Text,{size:"large",typescale:"label",children:(0,Ze.jsx)(Je.A,{id:"login.resetPassword.subheading"})}),(0,Ze.jsxs)(Lxt,{name:"reset-password__form",onSubmit:o,children:[(0,Ze.jsx)(f.TextField,{name:"username",error:!!a.username.error,placeholder:t.formatMessage({id:"login.resetPassword.emailPlaceholder"}),value:a.username.value,onChange:i}),(0,Ze.jsx)(Ixt,{error:a.username.error}),(0,Ze.jsx)(f.TextField,{name:"confirmationCode",error:!!a.confirmationCode.error,placeholder:t.formatMessage({id:"login.resetPassword.codePlaceholder"}),value:a.confirmationCode.value,onChange:i}),(0,Ze.jsx)(Ixt,{error:a.confirmationCode.error}),(0,Ze.jsx)(f.TextField,{name:"password1",error:!!a.password1.error,placeholder:t.formatMessage({id:"login.resetPassword.passwordPlaceholder"}),type:"password",value:a.password1.value,onChange:i,autoComplete:"new-password"}),(0,Ze.jsx)(Ixt,{error:a.password1.error}),(0,Ze.jsx)(f.TextField,{name:"password2",error:!!a.password2.error,placeholder:t.formatMessage({id:"login.resetPassword.confirmPasswordPlaceholder"}),type:"password",value:a.password2.value,onChange:i}),(0,Ze.jsx)(Ixt,{error:a.password2.error}),(0,Ze.jsx)(Pxt,{disabled:r,loading:r,variant:"contained",type:"submit",name:"reset-password-container__button",children:(0,Ze.jsx)(Je.A,{id:r?"login.resetPassword.buttonSubmitting":"login.resetPassword.submitButton"})})]}),l&&(0,Ze.jsx)(Ext,{children:(0,Ze.jsx)(Je.A,{id:l})})]})}}),errorElement:(0,Ze.jsx)(Rh,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(ic.registration.register,"/*"),element:(0,Ze.jsx)(rTt,{component:()=>{const{form:e,errors:n,setErrors:t,promptShown:a,queryParams:r,handleChange:i,handleClosePrompt:o,handleProfileChange:l,handleProfileSubmit:s,handleContactsSubmit:c,handleCheckboxChange:d,handleCredentialsSubmit:u}=(()=>{const e=(0,m.zy)(),n=(0,m.Zp)(),[{hubspotutk:t}]=(0,kxt.A)(["hubspotutk"]),a={email:"",password:"",passwordConfirmed:"",agreedWithTermsOfService:!1,agreedWithTermsOfUse:!1,firstName:"",lastName:"",companyName:"",preferPersonalUse:!1,phone:"",mobile:"",jobTitle:"",department:"",hutk:t||""},[r,i]=(0,g.useState)(a),[o,l]=(0,g.useState)({}),[s,c]=(0,g.useState)(!1),d=null==e?void 0:e.search,u=(0,g.useCallback)(()=>{c(!1)},[]),p=(0,g.useCallback)(e=>{const{name:n,value:t}=e.target,a=!!Object.keys(o).length,s=Cxt(Cxt({},r),{},{[n]:t});a&&l(nP(s)),i(e=>Cxt(Cxt({},e),{},{[n]:t}))},[o,r]),f=(0,g.useCallback)(e=>{i(n=>Cxt(Cxt({},n),e))},[]),b=(0,g.useCallback)(e=>{const n=!!Object.keys(o).length,t=Cxt(Cxt({},r),{},"use"===e?{agreedWithTermsOfUse:!r.agreedWithTermsOfUse}:{agreedWithTermsOfService:!r.agreedWithTermsOfService});n&&l(nP(t)),i(t)},[o,r]),h=(0,g.useCallback)(()=>{localStorage.setItem("MEMOIZED_EMAIL",r.email),n("/v2/register/profile".concat(d))},[r,n,d]),v=(0,g.useCallback)(async()=>{n("/v2/register/contacts".concat(d))},[n,d]),x=(0,g.useCallback)(async e=>{const n=r.email.trim().toLowerCase();try{var t;await y.N.signUp({password:r.password,username:n,attributes:{email:n,given_name:r.firstName.trim(),family_name:r.lastName.trim(),"custom:phone":r.phone.trim(),"custom:mobile_number":r.mobile.trim(),"custom:company_name":r.companyName.trim(),"custom:prefer_personal_use":String(r.preferPersonalUse),"custom:job_title":r.jobTitle.trim(),"custom:department":r.department.trim(),"custom:hutk":null===(t=r.hutk)||void 0===t?void 0:t.trim()}}),c(!0)}catch(n){if(n instanceof Error){const t=e[n.message]||n.message;l(Cxt(Cxt({},o),{},{submit:t}))}}},[o,r,c]);return(0,g.useMemo)(()=>({form:r,errors:o,setErrors:l,promptShown:s,queryParams:d,handleChange:p,handleClosePrompt:u,handleProfileSubmit:v,handleProfileChange:f,handleContactsSubmit:x,handleCheckboxChange:b,handleCredentialsSubmit:h}),[r,o,l,s,d,p,u,v,f,x,b,h])})();return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsxs)(m.BV,{children:[(0,Ze.jsx)(m.qh,{path:"/",element:(0,Ze.jsx)(txt,{form:e,errors:n,setErrors:t,handleChange:i,handleCheckboxChange:d,handleCredentialsSubmit:u})}),(0,Ze.jsx)(m.qh,{path:"/profile",element:(0,Ze.jsx)(oxt,{form:e,errors:n,setErrors:t,handleChange:i,handleProfileChange:l,handleProfileSubmit:s})}),(0,Ze.jsx)(m.qh,{path:"/contacts",element:(0,Ze.jsx)(lxt,{form:e,errors:n,setErrors:t,queryParams:r,handleChange:i,handleContactsSubmit:c})})]}),(0,Ze.jsx)(vxt,{show:a,email:e.email,onDismiss:o,queryParams:r})]})}}),errorElement:(0,Ze.jsx)(Rh,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(ic.registration.login),element:(0,Ze.jsx)(rTt,{component:()=>{const{handleChange:e,dismissForgotPassword:n,handleForgotPassword:t,handleSubmit:a,handleSSO:r,clearLoginError:i,state:o}=function(){const[e]=(0,Ot.n)($),[n,t]=(0,g.useReducer)(dvt,cvt),a=(0,eg.A)();return{handleChange:(0,g.useCallback)(e=>{const n=e.target,a=n.name,r=n.value;t({type:"form-value.change",name:a,value:r})},[t]),handleSubmit:(0,g.useCallback)(r=>{r.preventDefault();const i=n.email.value?"":a.formatMessage({id:"login.main.emailError"}),o=n.password.value?"":a.formatMessage({id:"login.main.passwordError"});t({type:"errors.set",errors:{email:i,password:o}}),n.email.value&&n.password.value&&(t({type:"loading.set",value:!0}),e({variables:{email:n.email.value,password:n.password.value},onCompleted(){t({type:"loading.set",value:!1})},onError:e=>{t({type:"loading.set",value:!1}),t({type:"loginError.set",error:Nht(e)})}}))},[n,t,a,e]),handleSSO:async n=>{let{email:a,token:r}=n;t({type:"loading.set",value:!0});try{await e({variables:{email:a,password:r,type:"sso"}}),t({type:"loading.set",value:!1})}catch(e){t({type:"loading.set",value:!1}),t({type:"loginError.set",error:Nht(Pr(e)?e:new Error("Unknown error"))})}},clearLoginError:()=>{t({type:"loginError.set",error:null})},handleForgotPassword:(0,g.useCallback)(()=>{t({type:"forgotPassword.set",value:!0})},[t]),dismissForgotPassword:(0,g.useCallback)(()=>{t({type:"forgotPassword.set",value:!1})},[t]),state:n}}(),{instance:l,inProgress:s}=(0,Svt.dk)(),[c,d]=(0,g.useState)(!1),[u,p]=(0,g.useState)(),m=o.isLoading||"none"!==s||c,y=u||o.loginError;return(0,Ze.jsxs)(Rvt,{children:[("Develop"===kn("REACT_APP_ENVIRONMENT_NAME")||"QA"===kn("REACT_APP_ENVIRONMENT_NAME")||"UAT"===kn("REACT_APP_ENVIRONMENT_NAME"))&&(0,Ze.jsx)(Tn,{id:"notification_banner",name:"LoginContainer__NotificationBanner",color:"primary",icon:"exclamation-triangle",title:"This is the ".concat(kn("REACT_APP_ENVIRONMENT_NAME")," site"),body:"Please note that we regularly reset the data and anything you enter may be overwritten. We recommend that personal details of real individuals are not entered",dismissable:!1,onDismiss:null}),(0,Ze.jsx)(f.Modal,{open:o.forgotPasswordModal,onClose:n,children:(0,Ze.jsx)(Ovt,{id:"forgotPasswordModal__Contents",username:o.email.value})}),(0,Ze.jsx)(Pvt,{children:(0,Ze.jsx)(Lvt,{children:(0,Ze.jsx)(ivt,{email:o.email,password:o.password,handleChange:e,handleForgotPassword:t,handleSubmit:e=>{p(void 0),i(),a(e)},isLoading:m,loginError:y,supportsSSO:!(!kn("REACT_APP_RESOLVE_EXTERNAL_USER_URL")||!kn("REACT_APP_AZURE_SSO_APP_ID")),onSSOClick:async()=>{d(!0);try{const e=await l.acquireTokenPopup({scopes:["User.Read","email","profile","openid"],prompt:"select_account"});p(void 0),i(),await async function(e){const n=kn("REACT_APP_RESOLVE_EXTERNAL_USER_URL");try{const{data:t}=await dOe().post(n,e);return t}catch(e){!function(e){if(!dOe().isAxiosError(e)||!e.response)throw e;const{status:n,data:t}=e.response;if(400===n&&"object"==typeof t&&"message"in t)throw new Dvt(t.message);throw e}(e)}}({email:e.account.username,accessToken:e.accessToken,idToken:e.idToken}),await r({email:e.account.username,token:e.idToken})}catch(e){if(function(e){return e instanceof Nvt.jT&&[wvt.fN].includes(e.errorCode)}(e))return;if(e instanceof Dvt)return void p(e.message);console.error(e),de.Cp(e),p("An unexpected error has occurred. Please contact the IT team for assistance.")}finally{d(!1)}}})})})]})}}),errorElement:(0,Ze.jsx)(Rh,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(ic.registration.login,"/:providerId"),element:(0,Ze.jsx)(rTt,{component:Cht}),errorElement:(0,Ze.jsx)(wh,{})}),(0,Ze.jsx)(m.qh,{path:"".concat(ic.registration.providerLogin,"/:providerId"),element:(0,Ze.jsx)(rTt,{component:Cht}),errorElement:(0,Ze.jsx)(wh,{})}),(0,Ze.jsx)(m.qh,{path:"v2/*",element:(0,Ze.jsx)(w5n,{}),loader:async e=>{let{request:n}=e;try{let e=await _Oe.query({query:iht});if(!e.data.idToken)try{const n=await y.N.currentSession();await et(n,_Oe),e=await _Oe.query({query:iht})}catch(e){await Xn(_Oe.cache);const t=new URL(n.url);return localStorage.getItem("from_logout")?localStorage.removeItem("from_logout"):localStorage.setItem("failed_url",null==t?void 0:t.pathname),(0,uf.V2)("/v2/login")}const{data:{currentAccountId:t}}=await _Oe.query({query:oht}),{idToken:a}=e.data,r=t||a.name;t||_Oe.writeQuery({query:oht,data:{currentAccountId:r}});try{const{data:e}=await _Oe.query({query:lht(await eht(a.sub)),variables:{accountId:r,userId:a.sub,userIdString:a.sub},fetchPolicy:"network-only"}),t=new URL(n.url);return e.getAccountInfo.accessControls.v2Design?cht(cht({},e),{},{idToken:a,currentAccountId:r}):(0,uf.V2)(t.pathname.replace(/\/v2\/?/,"/"))}catch(e){return await nt(_Oe.cache),(0,uf.V2)("/v2/login")}}catch(e){throw(0,de.Cp)(e),e}},errorElement:(0,Ze.jsx)(Rh,{}),children:(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(Xbt,{}),errorElement:(0,Ze.jsx)(Rh,{})})}),(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(iTt,{component:()=>{const[e,n]=(0,g.useState)([]),[t,a]=(0,g.useState)(),[r,i]=(0,g.useState)(),o=rc();pc();const{loading:l}=Td();return lt(),(0,Ze.jsxs)(zN,{id:"app-container",className:"v1",children:[(0,Ze.jsxs)(ze.fI,{container:!0,item:!0,children:[(0,Ze.jsx)(HC,{}),(0,Ze.jsxs)(GN,{container:!0,item:!0,name:"main",children:[(0,Ze.jsx)(dT,{}),(0,Ze.jsx)($N,{children:l||o.loading?(0,Ze.jsx)(WN,{}):(0,Ze.jsx)(m.sv,{context:[n,a,i]})})]}),e.length>0&&t&&(0,Ze.jsx)(oN,{items:e,dismiss:()=>n([]),createMutation:t,onComplete:r})]}),(0,Ze.jsx)(_N,{})]})},redirectUrl:ic.registration.login}),loader:async e=>{let{request:n}=e;try{const{data:{currentAccountId:e}}=await _Oe.query({query:_e});if(!e)return{};const{data:t}=await _Oe.query({query:hd,variables:{id:e}}),a=new URL(n.url);return t.getAccountInfo.accessControls.v2Design?(0,uf.V2)(a.pathname.replace("/","/v2/")):{}}catch(e){return{}}},errorElement:(0,Ze.jsx)(wh,{}),children:(0,Ze.jsx)(m.qh,{path:"*",element:(0,Ze.jsx)(H2n,{}),errorElement:(0,Ze.jsx)(wh,{})})})]}))),lTt={AWSPinpoint:{appId:kn("REACT_APP_PINPOINT_APP_CLIENT_ID"),region:kn("REACT_APP_PINPOINT_REGION"),mandatorySignIn:!1,disabled:window.Cypress}},sTt={aws_project_region:kn("REACT_APP_AWS_REGION"),aws_cognito_region:kn("REACT_APP_AWS_REGION"),Auth:{identityPoolId:kn("REACT_APP_IDENTITY_POOL_ID"),region:kn("REACT_APP_AWS_REGION"),userPoolId:kn("REACT_APP_USER_POOL_ID"),userPoolWebClientId:kn("REACT_APP_USER_POOL_WEB_CLIENT_ID"),oauth:{domain:kn("REACT_APP_COGNITO_DOMAIN"),scope:["email","profile","openid"],redirectSignIn:"".concat(kn("REACT_APP_BASE_URL"),"/login"),responseType:"code"}},Analytics:lTt};l.HA.configure(sTt),window.Cypress||kn("REACT_APP_GOOGLE_ANALYTIC_KEY")&&s.Ay.initialize(kn("REACT_APP_GOOGLE_ANALYTIC_KEY"),{debug:!1}),c.T({dsn:"https://c712cec004ed470f9d1f7041cd1ee7e3@o925114.ingest.sentry.io/5873743",environment:kn("REACT_APP_SENTRY_ENV"),integrations:[new u.IQ.Jh({traceFetch:!1}),new d.e({maskAllText:!1,blockAllMedia:!1})],tracesSampleRate:1,replaysOnErrorSampleRate:1,replaysSessionSampleRate:.1,enabled:"development"!==kn("NODE_ENV")}),(0,o.H)(document.getElementById("root")).render((0,Ze.jsx)(p.RouterProvider,{router:oTt}))},29147(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"DataOverwritingStrategyFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DataOverwritingStrategy"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"statusExplanation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"statusProgress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"batchType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"batchId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"numberOfRowsAnalyzing"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"numberOfRowsAfterMerge"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"numberOfDuplicatesFound"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"numberOfBatchesWithDuplicates"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"overwritingNeeded"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mergedFileS3Key"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mergedFileUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastUpdatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scheduledExecutionAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scheduledExecutionBy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"executedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"executionError"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"executionCloudWatchLogGroup"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"batchesSuitableForOverwriting"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dromoId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:538}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment DataOverwritingStrategyFields on DataOverwritingStrategy {\n  id\n  accountId\n  status\n  statusExplanation\n  statusProgress\n  key\n  createdAt\n  batchType\n  batchId\n  numberOfRowsAnalyzing\n  numberOfRowsAfterMerge\n  numberOfDuplicatesFound\n  numberOfBatchesWithDuplicates\n  overwritingNeeded\n  mergedFileS3Key\n  mergedFileUrl\n  createdBy\n  lastUpdatedAt\n  scheduledExecutionAt\n  scheduledExecutionBy\n  executedAt\n  executionError\n  executionCloudWatchLogGroup\n  batchesSuitableForOverwriting {\n    id\n    fileName\n    dromoId\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.DataOverwritingStrategyFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"DataOverwritingStrategyFields")},87653(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ExportProgressFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExportProgress"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"transactionType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rowsProcessingProgress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uploadProgress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exportStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastUpdatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rowsProcessed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]}]}}],loc:{start:0,end:235}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment ExportProgressFields on ExportProgress {\n  id\n  userId\n  accountId\n  transactionType\n  rowsProcessingProgress\n  uploadProgress\n  exportStatus\n  filename\n  errorMessage\n  createdAt\n  lastUpdatedAt\n  rowsProcessed\n  totalRows\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.ExportProgressFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"ExportProgressFields")},41621(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ExportProgressPayloadFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExportProgressPayload"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"transactionType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rowsProcessingProgress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"uploadProgress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"exportStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errorMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastUpdatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rowsProcessed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:298}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment ExportProgressPayloadFields on ExportProgressPayload {\n  userId\n  items {\n    id\n    userId\n    accountId\n    transactionType\n    rowsProcessingProgress\n    uploadProgress\n    exportStatus\n    filename\n    errorMessage\n    createdAt\n    lastUpdatedAt\n    rowsProcessed\n    totalRows\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.ExportProgressPayloadFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"ExportProgressPayloadFields")},13380(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ContainerTypeFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContainerType"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sizes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"volume"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"volumeUnit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"weight"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"weightUnit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:250}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment ContainerTypeFields on ContainerType {\n    id\n    name\n    sizes {\n        id\n        volume\n        volumeUnit {\n            id\n            name\n        }\n        weight\n        weightUnit {\n            id\n            name\n        }\n    }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.ContainerTypeFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"ContainerTypeFields")},33922(e,n,t){var a={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ElectricityTransactionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ElectricityTransactionPageItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"meterName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tariff"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tariffId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"supplier"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationEndDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationSharedEmissionPercentage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationCustomAttributes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startTime"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endTime"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reading"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accuracy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCostVat"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"chargePerKilowatt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonScope2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonScope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"kgCO2Scope2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"kgCO2Scope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"kgCH4Scope2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"kgCH4Scope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"kgN2OScope2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"kgN2OScope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"marketBasedCarbonScope2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"marketBasedCarbonScope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tdScope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"wttGenScope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"wttTdScope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invoiceNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidenceReference"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"otherReference"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"energySource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EnergySourceFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"importBatchFileName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"importBatchId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reportingYearOfFactors"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"factorsArePrivate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchaseType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"organisationalUnits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"estimatesScenario"},arguments:[],directives:[]}]}}],loc:{start:0,end:890}};a.loc.source={body:'#import "./EnergySourceFields.fragment.graphql"\n\nfragment ElectricityTransactionFields on ElectricityTransactionPageItem {\n  id\n  meterName\n  tariff\n  tariffId\n  supplier\n  tags\n  locationName\n  locationEndDate\n  locationSharedEmissionPercentage\n  locationCustomAttributes\n  startDate\n  startTime\n  endDate\n  endTime\n  quantity\n  reading\n  accuracy\n  totalCost\n  totalCostVat\n  chargePerKilowatt\n  carbonScope2\n  carbonScope3\n  kgCO2Scope2\n  kgCO2Scope3\n  kgCH4Scope2\n  kgCH4Scope3\n  kgN2OScope2\n  kgN2OScope3\n  marketBasedCarbonScope2\n  marketBasedCarbonScope3\n  tdScope3\n  wttGenScope3\n  wttTdScope3\n  activity\n  currency\n  comment\n  invoiceNumber\n  evidenceReference\n  otherReference\n  energySource {\n    ...EnergySourceFields\n  }\n  importBatchFileName\n  importBatchId\n  departments\n  reportingYearOfFactors\n  factorsArePrivate\n  purchaseType\n  organisationalUnits\n  estimatesScenario\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(53616).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.ElectricityTransactionFields=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"ElectricityTransactionFields")},53616(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"EnergySourceFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EnergySource"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationPoint"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"region"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"address"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"alpha2Code"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:248}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment EnergySourceFields on EnergySource {\n  id\n  name\n  locationPoint {\n    location {\n      code\n      region {\n        id\n        name\n      }\n      address {\n        country {\n          name\n          alpha2Code\n        }\n      }\n    }\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.EnergySourceFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"EnergySourceFields")},14639(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"EvaluationFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Evaluation"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scale"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"min"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"max"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"questions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:153}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment EvaluationFields on Evaluation {\n  id\n  name\n  description\n  type\n  accountId\n  scale {\n    min\n    max\n  }\n  questions {\n    id\n    text\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.EvaluationFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"EvaluationFields")},47826(e,n,t){var a={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"GasTransactionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"GasTransactionPageItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"meterName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationEndDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationSharedEmissionPercentage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationCustomAttributes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reading"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accuracy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCostVat"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonScope1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonScope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonEmissionCO2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonEmissionN2O"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonEmissionCH4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invoiceNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidenceReference"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"otherReference"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"energySource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EnergySourceFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"importBatchFileName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"importBatchId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"supplier"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reportingYearOfFactors"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchaseType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"organisationalUnits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"estimatesScenario"},arguments:[],directives:[]}]}}],loc:{start:0,end:676}};a.loc.source={body:'#import "./EnergySourceFields.fragment.graphql"\n\nfragment GasTransactionFields on GasTransactionPageItem {\n  id\n  meterName\n  tags\n  locationName\n  locationEndDate\n  locationSharedEmissionPercentage\n  locationCustomAttributes\n  startDate\n  endDate\n  quantity\n  reading\n  accuracy\n  totalCost\n  totalCostVat\n  carbonScope1\n  carbonScope3\n  carbonEmissionCO2\n  carbonEmissionN2O\n  carbonEmissionCH4\n  activity\n  currency\n  comment\n  invoiceNumber\n  evidenceReference\n  otherReference\n  energySource {\n    ...EnergySourceFields\n  }\n  importBatchFileName\n  importBatchId\n  departments\n  supplier\n  reportingYearOfFactors\n  purchaseType\n  organisationalUnits\n  estimatesScenario\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(53616).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GasTransactionFields=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GasTransactionFields")},1087(e,n,t){var a={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"HeatSteamTransactionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HeatSteamTransactionPageItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"meterName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tariff"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tariffId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"supplier"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationEndDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationSharedEmissionPercentage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationCustomAttributes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startTime"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endTime"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accuracy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalCostVat"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonScope2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonScope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"marketBasedCarbonScope2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"marketBasedCarbonScope3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonEmissionCO2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonEmissionN2O"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"carbonEmissionCH4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invoiceNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidenceReference"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"otherReference"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"energySource"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EnergySourceFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"importBatchFileName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"importBatchId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reportingYearOfFactors"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"purchaseType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"organisationalUnits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"estimatesScenario"},arguments:[],directives:[]}]}}],loc:{start:0,end:772}};a.loc.source={body:'#import "./EnergySourceFields.fragment.graphql"\n\nfragment HeatSteamTransactionFields on HeatSteamTransactionPageItem {\n  id\n  meterName\n  tariff\n  tariffId\n  supplier\n  tags\n  locationName\n  locationEndDate\n  locationSharedEmissionPercentage\n  locationCustomAttributes\n  startDate\n  startTime\n  endDate\n  endTime\n  quantity\n  accuracy\n  totalCost\n  totalCostVat\n  carbonScope2\n  carbonScope3\n  marketBasedCarbonScope2\n  marketBasedCarbonScope3\n  carbonEmissionCO2\n  carbonEmissionN2O\n  carbonEmissionCH4\n  activity\n  currency\n  comment\n  invoiceNumber\n  evidenceReference\n  otherReference\n  energySource {\n    ...EnergySourceFields\n  }\n  importBatchFileName\n  importBatchId\n  departments\n  reportingYearOfFactors\n  purchaseType\n  organisationalUnits\n  estimatesScenario\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(53616).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.HeatSteamTransactionFields=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"HeatSteamTransactionFields")},65718(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"LegislationFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Legislation"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"synopsis"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isActive"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"links"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"countries"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastFlaggedForReview"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"apiData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastModified"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:173}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment LegislationFields on Legislation {\n  id\n  title\n  synopsis\n  isActive\n  links\n  countries\n  type\n  lastFlaggedForReview\n  apiData {\n    path\n    lastModified\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.LegislationFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"LegislationFields")},94749(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"OilTransactionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OilTransactionPageItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assetId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assetName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"date"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"oilProductionBbl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gasExportKscf"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"waterProductionBbl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gasProductionKscf"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gasInjectionKscf"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelGasKscf"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flareGasKscf"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"prodWaterOverboardBwpd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"oilInWaterPpm"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"importBatchFileName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"importBatchId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mBoeAllPerDay"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mBoeGasPerDay"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelGasTCO2e"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelGasTCO2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelGasTCH4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelGasTN2O"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flareGasTCO2e"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flareGasTCO2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flareGasTCH4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flareGasTN2O"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ventingTCO2e"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ventingTCH4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fugitiveEmissionsTCO2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fugitiveEmissionsTCO2e"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fugitiveEmissionsTCH4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"otherParticulatesTNOx"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"otherParticulatesTSOx"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"otherParticulatesTCO"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"otherParticulatesTpm25"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gasCompositionId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scope1GhgEmissions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scope2GhgEmissions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scope3GhgEmissions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"monthlyAverageWaterLimitPPM1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"monthlyAverageWaterLimitP65"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"oilDischargeBpd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataMarker"},arguments:[],directives:[]}]}}],loc:{start:0,end:886}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment OilTransactionFields on OilTransactionPageItem {\n  id\n  assetId\n  assetName\n  date\n  oilProductionBbl\n  gasExportKscf\n  waterProductionBbl\n  gasProductionKscf\n  gasInjectionKscf\n  fuelGasKscf\n  flareGasKscf\n  prodWaterOverboardBwpd\n  oilInWaterPpm\n  notes\n  importBatchFileName\n  importBatchId\n  # Calculated fields\n  mBoeAllPerDay\n  mBoeGasPerDay\n  # --- Emissions fields ---\n  fuelGasTCO2e\n  fuelGasTCO2\n  fuelGasTCH4\n  fuelGasTN2O\n  flareGasTCO2e\n  flareGasTCO2\n  flareGasTCH4\n  flareGasTN2O\n  ventingTCO2e\n  ventingTCH4\n  fugitiveEmissionsTCO2\n  fugitiveEmissionsTCO2e\n  fugitiveEmissionsTCH4\n  otherParticulatesTNOx\n  otherParticulatesTSOx\n  otherParticulatesTCO\n  otherParticulatesTpm25\n  # ---\n  gasCompositionId\n  scope1GhgEmissions\n  scope2GhgEmissions\n  scope3GhgEmissions\n  monthlyAverageWaterLimitPPM1\n  monthlyAverageWaterLimitP65\n  oilDischargeBpd\n  dataMarker\n} ",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.OilTransactionFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"OilTransactionFields")},88894(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"ProjectFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Project"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"priority"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scheme"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"impact"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencyId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"baselineStartDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frequency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"plannedBenefit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"plannedCostChange"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"plannedCO2eChange"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owners"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"first_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"last_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profilePicture"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"meters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:434}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment ProjectFields on Project {\n  id\n  accountId\n  name\n  description\n  priority\n  scheme {\n    id\n    name\n    category {\n      id\n      name\n    }\n  }\n  impact\n  cost\n  currencyId\n  baselineStartDate\n  startDate\n  endDate\n  frequency\n  plannedBenefit\n  plannedCostChange\n  plannedCO2eChange\n  locations {\n    id\n    name\n  }\n  owners {\n    id\n    first_name\n    last_name\n    profilePicture\n  }\n  meters {\n    id\n    name\n  } \n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.ProjectFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"ProjectFields")},17101(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SalesDataTransactionFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SalesDataTransactionPageItem"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assetId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assetName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"date"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"volumeNaturalGas"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"volumeNaturalGasUnit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"volumeCrudeOilBbl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"importBatchFileName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"importBatchId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"naturalGasSalesVolumeM3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"crudeOilSalesVolumeM3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"soldProductEmissionsCO2e"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"soldProductEmissionsCO2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"soldProductEmissionsCH4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"soldProductEmissionsN2O"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scope1GhgEmissions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scope2GhgEmissions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scope3GhgEmissions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"departments"},arguments:[],directives:[]}]}}],loc:{start:0,end:475}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment SalesDataTransactionFields on SalesDataTransactionPageItem {\n  id\n  assetId\n  assetName\n  date\n  volumeNaturalGas\n  volumeNaturalGasUnit\n  volumeCrudeOilBbl\n  notes\n  importBatchFileName\n  importBatchId\n  # Calculated fields\n  naturalGasSalesVolumeM3\n  crudeOilSalesVolumeM3\n  soldProductEmissionsCO2e\n  soldProductEmissionsCO2\n  soldProductEmissionsCH4\n  soldProductEmissionsN2O\n  scope1GhgEmissions\n  scope2GhgEmissions\n  scope3GhgEmissions\n  tags\n  departments\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.SalesDataTransactionFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"SalesDataTransactionFields")},84477(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SupplierFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Supplier"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"utility"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"address"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"address1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"address2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"address3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"city"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"postcode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"alpha2Code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:286}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment SupplierFields on Supplier {\n    name\n    id\n    utility\n    type\n    address {\n        id\n        address1\n        address2\n        address3\n        city\n        phone1\n        postcode\n        country {\n            alpha2Code\n            name\n            id\n        }\n    }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.SupplierFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"SupplierFields")},28892(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TargetFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Target"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"scope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"topic"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"utility"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"normaliserType"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isRelative"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"baselineStartDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"baselineEndDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"configurationErrors"},arguments:[],directives:[]}]}}],loc:{start:0,end:348}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment TargetFields on Target {\n  id\n  name\n  scope\n  accountId\n  tagId\n  locationId\n  type {\n    id\n    name\n  }\n  topic {\n    id\n    name\n    unit {\n      id\n      name\n    }\n    utility\n  }\n  normaliserType {\n    id\n    name\n  }\n  value\n  isRelative\n  startDate\n  endDate\n  baselineStartDate\n  baselineEndDate\n  status\n  configurationErrors\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.TargetFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"TargetFields")},25032(e){var n={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"TaskFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Task"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"first_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"last_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profilePicture"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"scope"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subject"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"item"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Legislation"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Aspect"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"activity"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Target"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"dueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owners"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"first_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"last_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profilePicture"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"priority"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"projectId"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:595}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"fragment TaskFields on Task {\n  id\n  accountId\n  author {\n    id\n    first_name\n    last_name\n    profilePicture\n  }\n  scope\n  locations {\n    id\n    name\n  }\n  tags {\n    id\n    tagName\n  }\n  name\n  description\n  category\n  subject\n  item {\n    ... on Legislation {\n      id\n      title\n    }\n    ... on Aspect {\n      id\n      activity {\n        id\n        name\n      }\n    }\n    ... on Target {\n      id\n      name\n    }\n  }\n  dueDate\n  createdAt\n  completedAt\n  isCompleted\n  owners {\n    id\n    first_name\n    last_name\n    profilePicture\n  }\n  priority\n  projectId {\n    id\n    name\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.TaskFields=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"TaskFields")},18243(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"InitiateDataUpload"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"transactionType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TransactionType"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fileName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isDirectActivity"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"transpositionId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"initiateDataUpload"},arguments:[{kind:"Argument",name:{kind:"Name",value:"transactionType"},value:{kind:"Variable",name:{kind:"Name",value:"transactionType"}}},{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"fileName"},value:{kind:"Variable",name:{kind:"Name",value:"fileName"}}},{kind:"Argument",name:{kind:"Name",value:"isDirectActivity"},value:{kind:"Variable",name:{kind:"Name",value:"isDirectActivity"}}},{kind:"Argument",name:{kind:"Name",value:"transpositionId"},value:{kind:"Variable",name:{kind:"Name",value:"transpositionId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"signedUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"batchId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:359}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation InitiateDataUpload($transactionType: TransactionType!, $accountId: ID!, $fileName: String!, $isDirectActivity: Boolean, $transpositionId: ID) {\n  initiateDataUpload(transactionType: $transactionType, accountId: $accountId, fileName: $fileName, isDirectActivity: $isDirectActivity, transpositionId: $transpositionId) {\n    signedUrl\n    batchId\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.InitiateDataUpload=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"InitiateDataUpload")},2087(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UploadData"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"file"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"File"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fileName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"url"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uploadDataFile"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accId"}}},{kind:"Argument",name:{kind:"Name",value:"file"},value:{kind:"Variable",name:{kind:"Name",value:"file"}}},{kind:"Argument",name:{kind:"Name",value:"fileName"},value:{kind:"Variable",name:{kind:"Name",value:"fileName"}}},{kind:"Argument",name:{kind:"Name",value:"url"},value:{kind:"Variable",name:{kind:"Name",value:"url"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileUploaded"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:207}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation UploadData($accId: ID!, $file: File!, $fileName: String!, $url: String) {\n  uploadDataFile(accountId: $accId, file: $file, fileName: $fileName, url: $url) @client {\n    status\n    fileUploaded\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.UploadData=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"UploadData")},8296(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateDepartment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AccountDepartmentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDepartment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:119}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation CreateDepartment($input: AccountDepartmentInput!) {\n  createDepartment(input: $input) {\n    id\n    name\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.CreateDepartment=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"CreateDepartment")},66575(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SendEmail"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"replacements"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendEmail"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"name"},value:{kind:"StringValue",value:"RIO-INTERNAL-CONTACT",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"external"},value:{kind:"BooleanValue",value:!1}},{kind:"ObjectField",name:{kind:"Name",value:"replacements"},value:{kind:"Variable",name:{kind:"Name",value:"replacements"}}}]}}],directives:[]}]}}],loc:{start:0,end:145}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:'mutation SendEmail($replacements: String!) {\n  sendEmail(input: { name: "RIO-INTERNAL-CONTACT", external: false, replacements: $replacements })\n}',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.SendEmail=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"SendEmail")},29477(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AssignBatchAccountLicenceMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AssignAccountLicenceInput"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"assignBatchAccountLicence"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:218}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation AssignBatchAccountLicenceMutation($input: [AssignAccountLicenceInput!]!) {\n  assignBatchAccountLicence(input: $input) {\n    id\n    productId\n    ownerId\n    userId\n    status\n    createdAt\n    updatedAt\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.AssignBatchAccountLicenceMutation=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"AssignBatchAccountLicenceMutation")},77928(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AssignBatchLicencesMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AssignLicenceInput"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"assignBatchLicences"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:199}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation AssignBatchLicencesMutation($input: [AssignLicenceInput!]!) {\n  assignBatchLicences(input: $input) {\n    id\n    productId\n    ownerId\n    userId\n    status\n    createdAt\n    updatedAt\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.AssignBatchLicencesMutation=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"AssignBatchLicencesMutation")},73949(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateBatchLicencesMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateLicenceInput"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createBatchLicences"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:199}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation CreateBatchLicencesMutation($input: [CreateLicenceInput!]!) {\n  createBatchLicences(input: $input) {\n    id\n    productId\n    ownerId\n    userId\n    status\n    createdAt\n    updatedAt\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.CreateBatchLicencesMutation=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"CreateBatchLicencesMutation")},10529(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BuyProducts"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paymentMethod"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"items"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"couponId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"buyProducts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"paymentMethod"},value:{kind:"Variable",name:{kind:"Name",value:"paymentMethod"}}},{kind:"ObjectField",name:{kind:"Name",value:"items"},value:{kind:"Variable",name:{kind:"Name",value:"items"}}},{kind:"ObjectField",name:{kind:"Name",value:"couponId"},value:{kind:"Variable",name:{kind:"Name",value:"couponId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:197}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation BuyProducts($paymentMethod: String!, $items: [[String!]!]!, $couponId: String) {\n  buyProducts(input: { paymentMethod: $paymentMethod, items: $items, couponId: $couponId }) {\n    id\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.BuyProducts=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"BuyProducts")},32356(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BuySubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paymentMethod"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"items"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"couponId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"buySubscription"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"paymentMethod"},value:{kind:"Variable",name:{kind:"Name",value:"paymentMethod"}}},{kind:"ObjectField",name:{kind:"Name",value:"items"},value:{kind:"Variable",name:{kind:"Name",value:"items"}}},{kind:"ObjectField",name:{kind:"Name",value:"couponId"},value:{kind:"Variable",name:{kind:"Name",value:"couponId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:205}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation BuySubscription($paymentMethod: String!, $items: [[String!]!]!, $couponId: String) {\n  buySubscription(input: { paymentMethod: $paymentMethod, items: $items, couponId: $couponId }) {\n    id\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.BuySubscription=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"BuySubscription")},91690(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateProject"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owners"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"locations"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"description"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"priority"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ProjectPriority"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"schemeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"impact"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cost"}},type:{kind:"NamedType",name:{kind:"Name",value:"Float"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"currencyId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baselineStartDate"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"startDate"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"endDate"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"frequency"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"plannedBenefit"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"plannedCostChange"}},type:{kind:"NamedType",name:{kind:"Name",value:"Float"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"plannedCO2eChange"}},type:{kind:"NamedType",name:{kind:"Name",value:"Float"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"evidenceNotes"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ProjectEvidenceInput"}}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"meters"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createProject"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"owners"},value:{kind:"Variable",name:{kind:"Name",value:"owners"}}},{kind:"ObjectField",name:{kind:"Name",value:"locations"},value:{kind:"Variable",name:{kind:"Name",value:"locations"}}},{kind:"ObjectField",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"ObjectField",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"ObjectField",name:{kind:"Name",value:"description"},value:{kind:"Variable",name:{kind:"Name",value:"description"}}},{kind:"ObjectField",name:{kind:"Name",value:"priority"},value:{kind:"Variable",name:{kind:"Name",value:"priority"}}},{kind:"ObjectField",name:{kind:"Name",value:"schemeId"},value:{kind:"Variable",name:{kind:"Name",value:"schemeId"}}},{kind:"ObjectField",name:{kind:"Name",value:"impact"},value:{kind:"Variable",name:{kind:"Name",value:"impact"}}},{kind:"ObjectField",name:{kind:"Name",value:"cost"},value:{kind:"Variable",name:{kind:"Name",value:"cost"}}},{kind:"ObjectField",name:{kind:"Name",value:"currencyId"},value:{kind:"Variable",name:{kind:"Name",value:"currencyId"}}},{kind:"ObjectField",name:{kind:"Name",value:"baselineStartDate"},value:{kind:"Variable",name:{kind:"Name",value:"baselineStartDate"}}},{kind:"ObjectField",name:{kind:"Name",value:"startDate"},value:{kind:"Variable",name:{kind:"Name",value:"startDate"}}},{kind:"ObjectField",name:{kind:"Name",value:"endDate"},value:{kind:"Variable",name:{kind:"Name",value:"endDate"}}},{kind:"ObjectField",name:{kind:"Name",value:"frequency"},value:{kind:"Variable",name:{kind:"Name",value:"frequency"}}},{kind:"ObjectField",name:{kind:"Name",value:"plannedBenefit"},value:{kind:"Variable",name:{kind:"Name",value:"plannedBenefit"}}},{kind:"ObjectField",name:{kind:"Name",value:"plannedCostChange"},value:{kind:"Variable",name:{kind:"Name",value:"plannedCostChange"}}},{kind:"ObjectField",name:{kind:"Name",value:"plannedCO2eChange"},value:{kind:"Variable",name:{kind:"Name",value:"plannedCO2eChange"}}},{kind:"ObjectField",name:{kind:"Name",value:"evidenceNotes"},value:{kind:"Variable",name:{kind:"Name",value:"evidenceNotes"}}},{kind:"ObjectField",name:{kind:"Name",value:"meters"},value:{kind:"Variable",name:{kind:"Name",value:"meters"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ProjectFields"},directives:[]}]}}]}}],loc:{start:0,end:1034}};a.loc.source={body:'#import "../../fragments/ProjectFields.fragment.graphql"\n\nmutation CreateProject($id: ID!, $owners: [ID!]!, $locations: [ID!]!, $accountId: ID!, $name: String!, $description: String, $priority: ProjectPriority!, $schemeId: ID!, $impact: String, $cost: Float, $currencyId: ID, $baselineStartDate: String!, $startDate: String!, $endDate: String!, $frequency: String, $plannedBenefit: Float!, $plannedCostChange: Float, $plannedCO2eChange: Float, $evidenceNotes: [ProjectEvidenceInput!]!, $meters: [ID!]!) {\n  createProject(input: { id: $id, owners: $owners, locations: $locations, accountId: $accountId, name: $name, description: $description, priority: $priority, schemeId: $schemeId, impact: $impact, cost: $cost, currencyId: $currencyId, baselineStartDate: $baselineStartDate, startDate: $startDate, endDate: $endDate, frequency: $frequency, plannedBenefit: $plannedBenefit, plannedCostChange: $plannedCostChange, plannedCO2eChange: $plannedCO2eChange, evidenceNotes: $evidenceNotes, meters: $meters  }) {\n    ...ProjectFields\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(88894).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.CreateProject=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"CreateProject")},25180(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTarget"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"target"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TargetInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTarget"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"target"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Target"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TargetFields"},directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreateTargetErrors"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:259}};a.loc.source={body:'#import "../../fragments/TargetFields.fragment.graphql"\n\nmutation CreateTarget($target: TargetInput!) {\n  createTarget(input: $target) {\n    ... on Target {\n      ...TargetFields\n    }\n    ... on CreateTargetErrors {\n      __typename\n      errors\n    }\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(28892).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.CreateTarget=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"CreateTarget")},91153(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTarget"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"target"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TargetInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTarget"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"target"}}},{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Target"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TargetFields"},directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdateTargetErrors"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"errors"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:278}};a.loc.source={body:'#import "../../fragments/TargetFields.fragment.graphql"\n\nmutation UpdateTarget($target: TargetInput!, $id: ID!) {\n  updateTarget(input: $target, id: $id) {\n    ... on Target {\n      ...TargetFields\n    }\n    ... on UpdateTargetErrors {\n      __typename\n      errors\n    }\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(28892).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.UpdateTarget=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"UpdateTarget")},95196(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTask"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"description"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"scope"}},type:{kind:"NamedType",name:{kind:"Name",value:"Scope"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"locationIds"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"tagIds"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"category"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaskCategory"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subject"}},type:{kind:"NamedType",name:{kind:"Name",value:"TaskSubject"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"itemId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owners"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"priority"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaskPriority"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dueDate"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isCompleted"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"createdAt"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"projectId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTask"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"ObjectField",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"ObjectField",name:{kind:"Name",value:"description"},value:{kind:"Variable",name:{kind:"Name",value:"description"}}},{kind:"ObjectField",name:{kind:"Name",value:"scope"},value:{kind:"Variable",name:{kind:"Name",value:"scope"}}},{kind:"ObjectField",name:{kind:"Name",value:"locationIds"},value:{kind:"Variable",name:{kind:"Name",value:"locationIds"}}},{kind:"ObjectField",name:{kind:"Name",value:"tagIds"},value:{kind:"Variable",name:{kind:"Name",value:"tagIds"}}},{kind:"ObjectField",name:{kind:"Name",value:"category"},value:{kind:"Variable",name:{kind:"Name",value:"category"}}},{kind:"ObjectField",name:{kind:"Name",value:"subject"},value:{kind:"Variable",name:{kind:"Name",value:"subject"}}},{kind:"ObjectField",name:{kind:"Name",value:"itemId"},value:{kind:"Variable",name:{kind:"Name",value:"itemId"}}},{kind:"ObjectField",name:{kind:"Name",value:"dueDate"},value:{kind:"Variable",name:{kind:"Name",value:"dueDate"}}},{kind:"ObjectField",name:{kind:"Name",value:"owners"},value:{kind:"Variable",name:{kind:"Name",value:"owners"}}},{kind:"ObjectField",name:{kind:"Name",value:"priority"},value:{kind:"Variable",name:{kind:"Name",value:"priority"}}},{kind:"ObjectField",name:{kind:"Name",value:"isCompleted"},value:{kind:"Variable",name:{kind:"Name",value:"isCompleted"}}},{kind:"ObjectField",name:{kind:"Name",value:"createdAt"},value:{kind:"Variable",name:{kind:"Name",value:"createdAt"}}},{kind:"ObjectField",name:{kind:"Name",value:"projectId"},value:{kind:"Variable",name:{kind:"Name",value:"projectId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TaskFields"},directives:[]}]}}]}}],loc:{start:0,end:757}};a.loc.source={body:'#import "../../fragments/TaskFields.fragment.graphql"\n\nmutation CreateTask($id: ID!, $accountId: String!, $name: String!, $description: String!, $scope: Scope, $locationIds: [ID], $tagIds: [ID], $category: TaskCategory!, $subject: TaskSubject, $itemId: String, $owners: [String!], $priority: TaskPriority!, $dueDate: String!, $isCompleted: Boolean!, $createdAt: String!, $projectId: ID) {\n  createTask(input: { id: $id, accountId: $accountId, name: $name, description: $description, scope: $scope, locationIds: $locationIds, tagIds: $tagIds, category: $category, subject: $subject, itemId: $itemId, dueDate: $dueDate, owners: $owners, priority: $priority, isCompleted: $isCompleted, createdAt: $createdAt, projectId: $projectId }) {\n    ...TaskFields\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(25032).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.CreateTask=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"CreateTask")},7653(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateTaskEvidence"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"taskId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"evidenceType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaskEvidenceType"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"notes"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"documents"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createTaskEvidence"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"taskId"},value:{kind:"Variable",name:{kind:"Name",value:"taskId"}}},{kind:"ObjectField",name:{kind:"Name",value:"evidenceType"},value:{kind:"Variable",name:{kind:"Name",value:"evidenceType"}}},{kind:"ObjectField",name:{kind:"Name",value:"notes"},value:{kind:"Variable",name:{kind:"Name",value:"notes"}}},{kind:"ObjectField",name:{kind:"Name",value:"documents"},value:{kind:"Variable",name:{kind:"Name",value:"documents"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:264}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation CreateTaskEvidence($id: ID!, $taskId: ID!, $evidenceType: TaskEvidenceType!, $notes: String!, $documents: [ID!]) {\n  createTaskEvidence(input: { id: $id, taskId: $taskId, evidenceType: $evidenceType, notes: $notes, documents: $documents }) {\n    id\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.CreateTaskEvidence=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"CreateTaskEvidence")},7895(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteTask"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteTask"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:69}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation DeleteTask($id: ID!) {\n  deleteTask(id: $id) {\n    id\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.DeleteTask=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"DeleteTask")},77001(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateTask"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"description"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"scope"}},type:{kind:"NamedType",name:{kind:"Name",value:"Scope"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"locationIds"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"tagIds"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"category"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaskCategory"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subject"}},type:{kind:"NamedType",name:{kind:"Name",value:"TaskSubject"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"itemId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owners"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"priority"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TaskPriority"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dueDate"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isCompleted"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"createdAt"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"completedAt"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"projectId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateTask"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"ObjectField",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"ObjectField",name:{kind:"Name",value:"description"},value:{kind:"Variable",name:{kind:"Name",value:"description"}}},{kind:"ObjectField",name:{kind:"Name",value:"scope"},value:{kind:"Variable",name:{kind:"Name",value:"scope"}}},{kind:"ObjectField",name:{kind:"Name",value:"locationIds"},value:{kind:"Variable",name:{kind:"Name",value:"locationIds"}}},{kind:"ObjectField",name:{kind:"Name",value:"tagIds"},value:{kind:"Variable",name:{kind:"Name",value:"tagIds"}}},{kind:"ObjectField",name:{kind:"Name",value:"category"},value:{kind:"Variable",name:{kind:"Name",value:"category"}}},{kind:"ObjectField",name:{kind:"Name",value:"subject"},value:{kind:"Variable",name:{kind:"Name",value:"subject"}}},{kind:"ObjectField",name:{kind:"Name",value:"itemId"},value:{kind:"Variable",name:{kind:"Name",value:"itemId"}}},{kind:"ObjectField",name:{kind:"Name",value:"dueDate"},value:{kind:"Variable",name:{kind:"Name",value:"dueDate"}}},{kind:"ObjectField",name:{kind:"Name",value:"owners"},value:{kind:"Variable",name:{kind:"Name",value:"owners"}}},{kind:"ObjectField",name:{kind:"Name",value:"priority"},value:{kind:"Variable",name:{kind:"Name",value:"priority"}}},{kind:"ObjectField",name:{kind:"Name",value:"isCompleted"},value:{kind:"Variable",name:{kind:"Name",value:"isCompleted"}}},{kind:"ObjectField",name:{kind:"Name",value:"createdAt"},value:{kind:"Variable",name:{kind:"Name",value:"createdAt"}}},{kind:"ObjectField",name:{kind:"Name",value:"completedAt"},value:{kind:"Variable",name:{kind:"Name",value:"completedAt"}}},{kind:"ObjectField",name:{kind:"Name",value:"projectId"},value:{kind:"Variable",name:{kind:"Name",value:"projectId"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"category"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subject"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCompleted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owners"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"first_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"last_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profilePicture"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"locations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"priority"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"projectId"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:1080}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"mutation UpdateTask($id: ID!, $accountId: String!, $name: String!, $description: String!, $scope: Scope, $locationIds: [ID], $tagIds: [ID], $category: TaskCategory!, $subject: TaskSubject, $itemId: String, $owners: [String!], $priority: TaskPriority!, $dueDate: String!, $isCompleted: Boolean!, $createdAt: String!, $completedAt: String, $projectId: ID) {\n  updateTask(input: { id: $id, accountId: $accountId, name: $name, description: $description, scope: $scope, locationIds: $locationIds, tagIds: $tagIds, category: $category, subject: $subject, itemId: $itemId dueDate: $dueDate, owners: $owners, priority: $priority, isCompleted: $isCompleted, createdAt: $createdAt, completedAt: $completedAt, projectId: $projectId }) {\n    id\n    accountId\n    name\n    description\n    category\n    subject\n    dueDate\n    createdAt\n    completedAt\n    isCompleted\n    owners {\n      id\n      first_name\n      last_name\n      profilePicture\n    }\n    locations {\n      id\n      name\n    }\n    tags {\n      id\n      tagName\n    }\n    priority\n    projectId {\n      id\n      name\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.UpdateTask=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"UpdateTask")},24931(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSuppliersByAccountId"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getContainerTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ContainerTypeFields"},directives:[]}]}}]}}],loc:{start:0,end:147}};a.loc.source={body:'#import "../fragments/ContainerTypeFields.fragment.graphql"\n\nquery GetSuppliersByAccountId {\n  getContainerTypes {\n    ...ContainerTypeFields\n  }\n}',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(13380).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetSuppliersByAccountId=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetSuppliersByAccountId")},34862(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAccountInfoQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAccountInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"capacity"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:120}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAccountInfoQuery($id: ID!) {\n  getAccountInfo(id: $id) {\n    id\n    name\n    type\n    notes\n    capacity\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAccountInfoQuery=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAccountInfoQuery")},2646(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCurrencyTypes"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCurrencyTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:74}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllCurrencyTypes {\n  getAllCurrencyTypes {\n    id\n    name\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllCurrencyTypes=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllCurrencyTypes")},87228(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCurrencyOptions"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCurrencyTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:87}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetCurrencyOptions {\n  getAllCurrencyTypes {\n    value: id\n    label: name\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetCurrencyOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetCurrencyOptions")},68352(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetDocumentUploadLink"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"documentId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"mimeType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getDocumentUploadLink"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"documentId"},value:{kind:"Variable",name:{kind:"Name",value:"documentId"}}},{kind:"Argument",name:{kind:"Name",value:"mimeType"},value:{kind:"Variable",name:{kind:"Name",value:"mimeType"}}}],directives:[]}]}}],loc:{start:0,end:179}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetDocumentUploadLink($accountId: ID!, $documentId: ID!, $mimeType: String!) {\n  getDocumentUploadLink(accountId: $accountId, documentId: $documentId, mimeType: $mimeType)\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetDocumentUploadLink=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetDocumentUploadLink")},27351(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetElectricityTransactionGridColumns"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderDir"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"electricityTransactionGridColumns"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"display"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"field"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filterable"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:232}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetElectricityTransactionGridColumns($orderDir: String, $accountId: ID!) {\n  electricityTransactionGridColumns @client {\n    id\n    defaultName\n    displayName\n    display\n    width\n    dataType\n    field\n    filterable\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetElectricityTransactionGridColumns=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetElectricityTransactionGridColumns")},33140(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetElectricityTransactionsPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SortCommand"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"Filters"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getElectricityTransactionsPage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ElectricityTransactionFields"},directives:[]}]}}]}}]}}],loc:{start:0,end:395}};a.loc.source={body:'#import "../../fragments/ElectricityTransactionFields.fragment.graphql"\n\nquery GetElectricityTransactionsPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n  getElectricityTransactionsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n    totalRows\n    rows {\n      ...ElectricityTransactionFields\n    }\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(33922).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetElectricityTransactionsPage=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetElectricityTransactionsPage")},51998(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetElectricityTransactionsPageFilter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"field"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"energyType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TransactionType"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getEnergyTransactionsPageFilter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"field"},value:{kind:"Variable",name:{kind:"Name",value:"field"}}},{kind:"Argument",name:{kind:"Name",value:"energyType"},value:{kind:"Variable",name:{kind:"Name",value:"energyType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:235}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetElectricityTransactionsPageFilter($accountId: ID!, $field: String!, $energyType: TransactionType!) {\n  getEnergyTransactionsPageFilter(accountId: $accountId, field: $field, energyType: $energyType) {\n    label\n    value\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetElectricityTransactionsPageFilter=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetElectricityTransactionsPageFilter")},12505(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetEmissionsDatabaseFilters"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"field"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getEmissionsDatabaseFilters"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"field"},value:{kind:"Variable",name:{kind:"Name",value:"field"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:166}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetEmissionsDatabaseFilters($accountId: ID!, $field: String!) {\n  getEmissionsDatabaseFilters(accountId: $accountId, field: $field) {\n    value\n    label\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetEmissionsDatabaseFilters=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetEmissionsDatabaseFilters")},70359(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetEmissionsDatabasePage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SortCommand"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"Filters"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getEmissionsDatabasePage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"datasetName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"recordNo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assetId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"platforms"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"releaseValves"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dateOfEntryIntoDatabase"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataEntryByName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"recordDataDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assetField"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"typeOfFuelConsumption"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"units"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"oilProductionBbl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gasProductionKscf"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gasExportKscf"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gasInjectionKscf"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gasImport"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gasInjected"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelGasKscf"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flareGasKscf"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelUnits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quantityConsumed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"operationalControl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mboeAllPerDay"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mboeGasPerDay"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelGasCO2eT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelGasCO2T"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelGasCH4T"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuelGasN2OT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flareCO2eT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flareCO2T"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flareCH4T"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"flareN2OT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ventingCO2eT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ventingCH4T"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"liqFCO2eT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"liqFCO2EmissionsT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"liqFCH4EmissionsCO2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"liqFN2OEmissionsT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"liqFCH4EmissionsT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"liqFN2OEmissionsTonnesN2O"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fugitiveCO2e"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fugitiveCH4T"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gasCompositionRecordUsed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"naturalGasSalesVolume"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"crudeOilSalesVolume"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"naturalGasSalesVolumeUnit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"soldProductsCO2eT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"soldProductsCO2T"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"soldProductsCH4T"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"soldProductsN2OT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ghgScope1EmissionsT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ghgScope2EmissionsT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ghgScope3EmissionsT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"waterProductionBbl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"prodWaterOverboardBwpd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"oilInWaterPpm"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataMarker"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"codeForCheckingNewDataEntry"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"monthAvWaterLimitPPM1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"monthAverageLimitP65"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"oilDischargeBpd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"noxT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"soxT"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pm25T"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"coT"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:1767}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetEmissionsDatabasePage(\n  $accountId: ID!\n  $offset: Int\n  $limit: Int\n  $sort: [SortCommand!]\n  $filters: Filters\n) {\n  getEmissionsDatabasePage(\n    accountId: $accountId\n    offset: $offset\n    limit: $limit\n    sort: $sort\n    filters: $filters\n  ) {\n    totalRows\n    datasetName\n    rows {\n      id\n      recordNo\n      locationId\n      accountId\n      assetId\n      platforms\n      releaseValves\n      dateOfEntryIntoDatabase\n      dataEntryByName\n      recordDataDate\n      assetField\n      location\n      country\n      typeOfFuelConsumption\n      units\n      oilProductionBbl\n      gasProductionKscf\n      gasExportKscf\n      gasInjectionKscf\n      gasImport\n      gasInjected\n      fuelGasKscf\n      flareGasKscf\n      fuelType\n      fuelUnits\n      quantityConsumed\n      operationalControl\n      notes\n      mboeAllPerDay\n      mboeGasPerDay\n      fuelGasCO2eT\n      fuelGasCO2T\n      fuelGasCH4T\n      fuelGasN2OT\n      flareCO2eT\n      flareCO2T\n      flareCH4T\n      flareN2OT\n      ventingCO2eT\n      ventingCH4T\n      liqFCO2eT\n      liqFCO2EmissionsT\n      liqFCH4EmissionsCO2\n      liqFN2OEmissionsT\n      liqFCH4EmissionsT\n      liqFN2OEmissionsTonnesN2O\n      fugitiveCO2e\n      fugitiveCH4T\n      gasCompositionRecordUsed\n      naturalGasSalesVolume\n      crudeOilSalesVolume\n      naturalGasSalesVolumeUnit\n      soldProductsCO2eT\n      soldProductsCO2T\n      soldProductsCH4T\n      soldProductsN2OT\n      ghgScope1EmissionsT\n      ghgScope2EmissionsT\n      ghgScope3EmissionsT\n      waterProductionBbl\n      prodWaterOverboardBwpd\n      oilInWaterPpm\n      dataMarker\n      codeForCheckingNewDataEntry\n      monthAvWaterLimitPPM1\n      monthAverageLimitP65\n      oilDischargeBpd\n      noxT\n      soxT\n      pm25T\n      coT\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetEmissionsDatabasePage=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetEmissionsDatabasePage")},9908(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetLocationDataOfEnergySourceById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getEnergySourceById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locationPoint"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:214}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetLocationDataOfEnergySourceById($id: ID!) {\n  getEnergySourceById(id: $id) {\n    id\n    name\n    locationPoint {\n      id\n      name\n      location {\n        id\n        name\n        code\n      }\n    }\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetLocationDataOfEnergySourceById=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetLocationDataOfEnergySourceById")},87858(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAvailableCourses"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pageNumber"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownedCourses"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAvailableCourses"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"pageNumber"},value:{kind:"Variable",name:{kind:"Name",value:"pageNumber"}}},{kind:"Argument",name:{kind:"Name",value:"ownedCourses"},value:{kind:"Variable",name:{kind:"Name",value:"ownedCourses"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isLastPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalItemCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reaction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EvaluationFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"assessment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EvaluationFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"metaData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cpd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"openIframe"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"learnBundleList"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"courses"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:765}};a.loc.source={body:'#import "../../fragments/EvaluationFields.fragment.graphql"\n\nquery GetAvailableCourses($accountId: String!, $pageNumber: Int!, $ownedCourses: Boolean) {\n  getAvailableCourses(accountId: $accountId, pageNumber: $pageNumber, ownedCourses: $ownedCourses) {\n    isLastPage\n    totalItemCount\n    data {\n      id\n      name\n      type\n      accountId\n      reaction {\n        ...EvaluationFields\n      }\n      assessment {\n        ...EvaluationFields\n      }\n      metaData {\n        viewed\n        link\n        thumbnail\n        description\n        categories\n        cpd\n        passScore\n        url\n        openIframe\n      }\n    }\n    learnBundleList {\n      id\n      title\n      description\n      restricted\n      startDate\n      endDate\n      courses\n    }\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(14639).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetAvailableCourses=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetAvailableCourses")},68959(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getBundleByIdQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"bundleId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getBundleById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"bundleId"},value:{kind:"Variable",name:{kind:"Name",value:"bundleId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"courses"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isBundleHidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isbBundleShow"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isMandatoryBundle"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:237}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query getBundleByIdQuery($bundleId: String!) {\n  getBundleById(bundleId: $bundleId) {\n    id\n    title\n    description\n    restricted\n    startDate\n    endDate\n    courses\n    isBundleHidden\n    isbBundleShow\n    isMandatoryBundle\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.getBundleByIdQuery=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"getBundleByIdQuery")},2204(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCourseByIdQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getCourseById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metaData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"timeToComplete"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"progress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"duration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"views"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"highQualityLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lowQualityLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"downloadLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cpd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:396}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetCourseByIdQuery($id: ID!, $accountId: ID!) {\n  getCourseById(id: $id, accountId: $accountId) {\n    name\n    id\n    type\n    accountId\n    metaData {\n      link\n      viewed\n      thumbnail\n      description\n      timeToComplete\n      progress\n      duration\n      views\n      highQualityLink\n      lowQualityLink\n      downloadLink\n      cpd\n      passScore\n      categories\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetCourseByIdQuery=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetCourseByIdQuery")},79568(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetCoursePreviewPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"courseId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"bundleId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getUserCourse"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"courseId"},value:{kind:"Variable",name:{kind:"Name",value:"courseId"}}},{kind:"Argument",name:{kind:"Name",value:"bundleId"},value:{kind:"Variable",name:{kind:"Name",value:"bundleId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bundleIdList"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metaData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"timeToComplete"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"progress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"duration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"views"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"highQualityLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lowQualityLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"downloadLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cpd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"openIframe"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"assessment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EvaluationFields"},directives:[]},{kind:"Field",name:{kind:"Name",value:"questions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"courseId"},value:{kind:"Variable",name:{kind:"Name",value:"courseId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"givenAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"reaction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EvaluationFields"},directives:[]},{kind:"Field",name:{kind:"Name",value:"questions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"courseId"},value:{kind:"Variable",name:{kind:"Name",value:"courseId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"givenAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"userCourseMetaData"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"lastUpdatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"courseProgress"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"licence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:1085}};a.loc.source={body:'#import "../../fragments/EvaluationFields.fragment.graphql"\n\nquery GetCoursePreviewPage($accountId: ID!, $courseId: ID!, $userId: ID!, $bundleId: ID) {\n  getUserCourse(accountId: $accountId, courseId: $courseId, bundleId: $bundleId) {\n    name\n    id\n    type\n    accountId\n    bundleIdList\n    metaData {\n      link\n      viewed\n      thumbnail\n      description\n      timeToComplete\n      progress\n      duration\n      views\n      highQualityLink\n      lowQualityLink\n      downloadLink\n      cpd\n      passScore\n      openIframe\n      url\n      categories\n    }\n    assessment {\n      ...EvaluationFields\n      questions {\n        id\n        text\n        answers(userId: $userId, courseId: $courseId) {\n          givenAt\n          value\n        }\n      }\n    }\n    reaction {\n      ...EvaluationFields\n      questions {\n        id\n        text\n        answers(userId: $userId, courseId: $courseId) {\n          givenAt\n          value\n        }\n      }\n    }\n    userCourseMetaData(userId: $userId) {\n      lastUpdatedAt\n      courseProgress\n    }\n    licence {\n      id\n    }\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(14639).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetCoursePreviewPage=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetCoursePreviewPage")},26873(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getLearnBundleByIdQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"bundleId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getLearnBundleById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"bundleId"},value:{kind:"Variable",name:{kind:"Name",value:"bundleId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"courses"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isBundleHidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isbBundleShow"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isMandatoryBundle"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:291}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query getLearnBundleByIdQuery($accountId: String!, $bundleId: String!) {\n  getLearnBundleById(accountId: $accountId, bundleId: $bundleId) {\n    id\n    title\n    description\n    restricted\n    startDate\n    endDate\n    courses\n    isBundleHidden\n    isbBundleShow\n    isMandatoryBundle\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.getLearnBundleByIdQuery=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"getLearnBundleByIdQuery")},15789(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetUserCourseQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"courseId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userIdNullable"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"bundleId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getUserCourse"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"courseId"},value:{kind:"Variable",name:{kind:"Name",value:"courseId"}}},{kind:"Argument",name:{kind:"Name",value:"bundleId"},value:{kind:"Variable",name:{kind:"Name",value:"bundleId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bundleIdList"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metaData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"timeToComplete"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"progress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"duration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"views"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"highQualityLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lowQualityLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"downloadLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cpd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"openIframe"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"assessment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EvaluationFields"},directives:[]},{kind:"Field",name:{kind:"Name",value:"questions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"courseId"},value:{kind:"Variable",name:{kind:"Name",value:"courseId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"givenAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"reaction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EvaluationFields"},directives:[]},{kind:"Field",name:{kind:"Name",value:"questions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"answers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"courseId"},value:{kind:"Variable",name:{kind:"Name",value:"courseId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"givenAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"userCourseMetaData"},arguments:[{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userIdNullable"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"lastUpdatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"courseProgress"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"licence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:1113}};a.loc.source={body:'#import "../../fragments/EvaluationFields.fragment.graphql"\n\nquery GetUserCourseQuery($accountId: ID!, $courseId: ID!, $userIdNullable: ID!, $userId: ID!, $bundleId: ID) {\n  getUserCourse(accountId: $accountId, courseId: $courseId, bundleId: $bundleId) {\n    name\n    id\n    type\n    accountId\n    bundleIdList\n    metaData {\n      link\n      viewed\n      thumbnail\n      description\n      timeToComplete\n      progress\n      duration\n      views\n      highQualityLink\n      lowQualityLink\n      downloadLink\n      cpd\n      passScore\n      openIframe\n      url\n      categories\n    }\n    assessment {\n      ...EvaluationFields\n      questions {\n        id\n        text\n        answers(userId: $userId, courseId: $courseId) {\n          givenAt\n          value\n        }\n      }\n    }\n    reaction {\n      ...EvaluationFields\n      questions {\n        id\n        text\n        answers(userId: $userId, courseId: $courseId) {\n          givenAt\n          value\n        }\n      }\n    }\n    userCourseMetaData(userId: $userIdNullable) {\n      lastUpdatedAt\n      courseProgress\n    }\n    licence {\n      id\n    }\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(14639).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetUserCourseQuery=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetUserCourseQuery")},66259(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllFuelTypeOptions"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllFuelTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:85}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllFuelTypeOptions {\n  getAllFuelTypes {\n    value: id\n    label: name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllFuelTypeOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllFuelTypeOptions")},83785(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetFuelTransactionsPageFilter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"field"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getFuelTransactionsPageFilter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"field"},value:{kind:"Variable",name:{kind:"Name",value:"field"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:170}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetFuelTransactionsPageFilter($accountId: ID!, $field: String!) {\n  getFuelTransactionsPageFilter(accountId: $accountId, field: $field) {\n    label\n    value\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetFuelTransactionsPageFilter=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetFuelTransactionsPageFilter")},99451(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetGasTransactionGridColumns"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderDir"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gasTransactionGridColumns"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"display"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"field"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filterable"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:216}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetGasTransactionGridColumns($orderDir: String, $accountId: ID!) {\n  gasTransactionGridColumns @client {\n    id\n    defaultName\n    displayName\n    display\n    width\n    dataType\n    field\n    filterable\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetGasTransactionGridColumns=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetGasTransactionGridColumns")},86768(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetGasTransactionsPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SortCommand"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"Filters"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getGasTransactionsPage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"GasTransactionFields"},directives:[]}]}}]}}]}}],loc:{start:0,end:363}};a.loc.source={body:'#import "../../fragments/GasTransactionFields.fragment.graphql"\n\nquery GetGasTransactionsPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n  getGasTransactionsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n    totalRows\n    rows {\n      ...GasTransactionFields\n    }\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(47826).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetGasTransactionsPage=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetGasTransactionsPage")},330(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetGasTransactionsPageFilter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"field"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"energyType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TransactionType"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getEnergyTransactionsPageFilter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"field"},value:{kind:"Variable",name:{kind:"Name",value:"field"}}},{kind:"Argument",name:{kind:"Name",value:"energyType"},value:{kind:"Variable",name:{kind:"Name",value:"energyType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:227}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetGasTransactionsPageFilter($accountId: ID!, $field: String!, $energyType: TransactionType!) {\n  getEnergyTransactionsPageFilter(accountId: $accountId, field: $field, energyType: $energyType) {\n    label\n    value\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetGasTransactionsPageFilter=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetGasTransactionsPageFilter")},3158(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetLegislationOverviews"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllLegislation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:117}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetLegislationOverviews($accountId: ID!) {\n  getAllLegislation(accountId: $accountId) {\n    id\n    title\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetLegislationOverviews=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetLegislationOverviews")},78122(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetHeatSteamTransactionsPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SortCommand"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"Filters"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getHeatSteamTransactionsPage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"HeatSteamTransactionFields"},directives:[]}]}}]}}]}}],loc:{start:0,end:387}};a.loc.source={body:'#import "../../fragments/HeatSteamTransactionFields.fragment.graphql"\n\nquery GetHeatSteamTransactionsPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n  getHeatSteamTransactionsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n    totalRows\n    rows {\n      ...HeatSteamTransactionFields\n    }\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(1087).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetHeatSteamTransactionsPage=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetHeatSteamTransactionsPage")},60180(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetHeatSteamTransactionsPageFilter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"field"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"energyType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"TransactionType"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getEnergyTransactionsPageFilter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"field"},value:{kind:"Variable",name:{kind:"Name",value:"field"}}},{kind:"Argument",name:{kind:"Name",value:"energyType"},value:{kind:"Variable",name:{kind:"Name",value:"energyType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:233}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetHeatSteamTransactionsPageFilter($accountId: ID!, $field: String!, $energyType: TransactionType!) {\n  getEnergyTransactionsPageFilter(accountId: $accountId, field: $field, energyType: $energyType) {\n    label\n    value\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetHeatSteamTransactionsPageFilter=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetHeatSteamTransactionsPageFilter")},26270(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAccountLicencesQuery"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAccountLicences"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:144}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAccountLicencesQuery {\n  getAccountLicences {\n    id\n    createdAt\n    ownerId\n    productId\n    status\n    updatedAt\n    userId\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAccountLicencesQuery=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAccountLicencesQuery")},4271(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetLicencesByProductAndAccountQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"productId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getLicencesByProductAndAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"productId"},value:{kind:"Variable",name:{kind:"Name",value:"productId"}}},{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:256}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetLicencesByProductAndAccountQuery($productId: String!, $accountId: String!) {\n  getLicencesByProductAndAccount(productId: $productId, accountId: $accountId) {\n    id\n    createdAt\n    ownerId\n    productId\n    status\n    updatedAt\n    userId\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetLicencesByProductAndAccountQuery=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetLicencesByProductAndAccountQuery")},13758(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetProductLicencesQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"productId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getProductLicences"},arguments:[{kind:"Argument",name:{kind:"Name",value:"productId"},value:{kind:"Variable",name:{kind:"Name",value:"productId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownerId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:188}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetProductLicencesQuery($productId: String!) {\n  getProductLicences(productId: $productId) {\n    id\n    createdAt\n    ownerId\n    productId\n    status\n    updatedAt\n    userId\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetProductLicencesQuery=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetProductLicencesQuery")},35809(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAccountProductLicencesCountQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAccountProductLicencesCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:186}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAccountProductLicencesCountQuery($accountId: String!) {\n  getAccountProductLicencesCount(accountId: $accountId) {\n    productId\n    count {\n      status\n      count\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAccountProductLicencesCountQuery=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAccountProductLicencesCountQuery")},13426(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetLocationCodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"25"},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SortCommand"}}}},defaultValue:{kind:"ListValue",values:[]},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"Filters"}},defaultValue:{kind:"ObjectValue",fields:[]},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getLocationsPage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:295}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetLocationCodes($accountId: ID!, $offset: Int = 0, $limit: Int = 25, $sort: [SortCommand!] = [], $filters: Filters = {}) {\n  getLocationsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n    totalRows\n    rows {\n      id\n      code\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetLocationCodes=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetLocationCodes")},60680(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetLocationsByAccountId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"25"},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SortCommand"}}}},defaultValue:{kind:"ListValue",values:[]},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"Filters"}},defaultValue:{kind:"ObjectValue",fields:[]},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getLocationsPage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:302}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetLocationsByAccountId($accountId: ID!, $offset: Int = 0, $limit: Int = 25, $sort: [SortCommand!] = [], $filters: Filters = {}) {\n  getLocationsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n    totalRows\n    rows {\n      id\n      name\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetLocationsByAccountId=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetLocationsByAccountId")},92953(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetLocationOptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"25"},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SortCommand"}}}},defaultValue:{kind:"ListValue",values:[]},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"Filters"}},defaultValue:{kind:"ObjectValue",fields:[]},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getLocationsPage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:311}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetLocationOptions($accountId: ID!, $offset: Int = 0, $limit: Int = 25, $sort: [SortCommand!] = [], $filters: Filters = {}) {\n  getLocationsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n    totalRows\n    rows {\n      value: id\n      label: name\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetLocationOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetLocationOptions")},69627(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetProductsPaged"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getProductsPaged"},arguments:[{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"IntValue",value:"1"}},{kind:"Argument",name:{kind:"Name",value:"size"},value:{kind:"IntValue",value:"10"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"itemList"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stripeId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"price"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"productType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"image"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"bundlesList"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"restricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isBundleHidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isbBundleShow"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isMandatoryBundle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"courses"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metaData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categories"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"coursesList"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metaData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnail"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cpd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"passScore"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"timeToComplete"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"progress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"duration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"views"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"size"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"highQualityLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lowQualityLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"downloadLink"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasPreviousPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isFirstPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isLastPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"numberOfElements"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"page"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageSize"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:1105}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetProductsPaged {\n  getProductsPaged(page: 1, size: 10) {\n    content {\n      itemList {\n        id\n        stripeId\n        price\n        currency\n        productType\n        createdAt\n        image\n      }\n      bundlesList {\n        id\n        title\n        description\n        restricted\n        startDate\n        endDate\n        isBundleHidden\n        isbBundleShow\n        isMandatoryBundle\n        courses {\n          id\n          name\n          metaData {\n            link\n            description\n            thumbnail\n            categories\n          }\n        }\n      }\n      coursesList {\n        name\n        id\n        type\n        metaData {\n          link\n          viewed\n          thumbnail\n          description\n          cpd\n          passScore\n          timeToComplete\n          progress\n          duration\n          views\n          size\n          highQualityLink\n          lowQualityLink\n          downloadLink\n        }\n        accountId\n      }\n    }\n    count\n    hasPreviousPage\n    isFirstPage\n    isLastPage\n    numberOfElements\n    page\n    pageCount\n    pageSize\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetProductsPaged=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetProductsPaged")},88104(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPromotionCode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"code"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPromotionCode"},arguments:[{kind:"Argument",name:{kind:"Name",value:"code"},value:{kind:"Variable",name:{kind:"Name",value:"code"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"couponId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:165}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetPromotionCode($code: String!) {\n  getPromotionCode(code: $code) {\n    id\n    code\n    discount\n    type\n    couponId                                 \n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetPromotionCode=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetPromotionCode")},37308(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllMaterialOptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getMaterialsByAccountID"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:133}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllMaterialOptions($accountId: ID!) {\n  getMaterialsByAccountID(accountId: $accountId) {\n    value: id\n    label: name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllMaterialOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllMaterialOptions")},77154(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllMaterialOriginOptions"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllMaterialOriginTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:101}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllMaterialOriginOptions {\n  getAllMaterialOriginTypes {\n    value: id\n    label: name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllMaterialOriginOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllMaterialOriginOptions")},91512(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetMaterialsTransactionsPageFilter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"field"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getMaterialsTransactionsPageFilter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"field"},value:{kind:"Variable",name:{kind:"Name",value:"field"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:180}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetMaterialsTransactionsPageFilter($accountId: ID!, $field: String!) {\n  getMaterialsTransactionsPageFilter(accountId: $accountId, field: $field) {\n    label\n    value\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetMaterialsTransactionsPageFilter=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetMaterialsTransactionsPageFilter")},91053(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllUnitOptions"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllUnits"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:77}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllUnitOptions {\n  getAllUnits {\n    value: id\n    label: name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllUnitOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllUnitOptions")},94573(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetOilTransactionFilters"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"field"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getOilTransactionFilters"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"field"},value:{kind:"Variable",name:{kind:"Name",value:"field"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:160}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetOilTransactionFilters($accountId: ID!, $field: String!) {\n  getOilTransactionFilters(accountId: $accountId, field: $field) {\n    label\n    value\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetOilTransactionFilters=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetOilTransactionFilters")},97586(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetOilTransactionsPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SortCommand"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"Filters"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getOilTransactionsPage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"OilTransactionFields"},directives:[]}]}}]}}]}}],loc:{start:0,end:363}};a.loc.source={body:'#import "../../fragments/OilTransactionFields.fragment.graphql"\n\nquery GetOilTransactionsPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n  getOilTransactionsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n    totalRows\n    rows {\n      ...OilTransactionFields\n    }\n  }\n} ',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(94749).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetOilTransactionsPage=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetOilTransactionsPage")},11122(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetProjects"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getProjects"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ProjectFields"},directives:[]}]}}]}}],loc:{start:0,end:160}};a.loc.source={body:'#import "../../fragments/ProjectFields.fragment.graphql"\n\nquery GetProjects($accountId: ID!) {\n  getProjects(accountId: $accountId) {\n    ...ProjectFields\n  }\n}',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(88894).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetProjects=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetProjects")},20407(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetRefrigerantGasGroups"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRefrigerantGasGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:95}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetRefrigerantGasGroups {\n  getRefrigerantGasGroups {\n    value: id\n    label: name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetRefrigerantGasGroups=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetRefrigerantGasGroups")},25278(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetRefrigerantGasTypes"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRefrigerantGasTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:93}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetRefrigerantGasTypes {\n  getRefrigerantGasTypes {\n    value: id\n    label: name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetRefrigerantGasTypes=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetRefrigerantGasTypes")},14558(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSalesDataTransactionFilters"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"field"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSalesDataTransactionFilters"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"field"},value:{kind:"Variable",name:{kind:"Name",value:"field"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:172}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetSalesDataTransactionFilters($accountId: ID!, $field: String!) {\n  getSalesDataTransactionFilters(accountId: $accountId, field: $field) {\n    label\n    value\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetSalesDataTransactionFilters=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetSalesDataTransactionFilters")},72801(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSalesDataTransactionsPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SortCommand"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"Filters"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSalesDataTransactionsPage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SalesDataTransactionFields"},directives:[]}]}}]}}]}}],loc:{start:0,end:387}};a.loc.source={body:'#import "../../fragments/SalesDataTransactionFields.fragment.graphql"\n\nquery GetSalesDataTransactionsPage($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n  getSalesDataTransactionsPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n    totalRows\n    rows {\n      ...SalesDataTransactionFields\n    }\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(17101).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetSalesDataTransactionsPage=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetSalesDataTransactionsPage")},93785(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSurveyTemplatesByAccountId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSurveyTemplatesByAccountId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:145}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"  query GetSurveyTemplatesByAccountId($accountId: ID!) {\n    getSurveyTemplatesByAccountId(accountId: $accountId) {\n      id\n      name\n    }\n  }",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetSurveyTemplatesByAccountId=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetSurveyTemplatesByAccountId")},8455(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTargetTopics"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:81}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"{\n  getTargetTopics {\n    id\n    name\n    unit {\n      id\n      name\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n},41696(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTargetTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:43}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"{\n  getTargetTypes {\n    id\n    name\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n},16237(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTargetsByAccountId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTargetsByAccountId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TargetFields"},directives:[]}]}}]}}],loc:{start:0,end:179}};a.loc.source={body:'#import "../../fragments/TargetFields.fragment.graphql"\n\nquery GetTargetsByAccountId($accountId: ID!) {\n  getTargetsByAccountId(accountId: $accountId) {\n    ...TargetFields\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(28892).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetTargetsByAccountId=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetTargetsByAccountId")},53280(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTariffOptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getMarketCarbonConversionFactors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"tariff"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:138}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetTariffOptions($accountId: ID) {\n  getMarketCarbonConversionFactors(accountId: $accountId) {\n    value: id\n    label: tariff\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetTariffOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetTariffOptions")},67315(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTaskById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTaskById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TaskFields"},directives:[]},{kind:"Field",name:{kind:"Name",value:"evidence"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidenceType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"notes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documents"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileName"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:249}};a.loc.source={body:'#import "../../fragments/TaskFields.fragment.graphql"\n\nquery GetTaskById($id: ID!) {\n  getTaskById(id: $id) {\n    ...TaskFields\n    evidence {\n      id\n      evidenceType\n      notes\n      documents {\n        id\n        fileName\n      }\n    }\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(25032).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetTaskById=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetTaskById")},35885(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTasksByAccountId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTasksByAccountId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TaskFields"},directives:[]}]}}]}}],loc:{start:0,end:171}};a.loc.source={body:'#import "../../fragments/TaskFields.fragment.graphql"\n\nquery GetTasksByAccountId($accountId: ID!) {\n  getTasksByAccountId(accountId: $accountId) {\n    ...TaskFields\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(25032).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetTasksByAccountId=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetTasksByAccountId")},96625(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTasksByUserId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTasksByUserId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"TaskFields"},directives:[]}]}}]}}],loc:{start:0,end:192}};a.loc.source={body:'#import "../../fragments/TaskFields.fragment.graphql"\n\nquery GetTasksByUserId($userId: ID!, $accountId: ID!) {\n  getTasksByUserId(id: $userId, accountId: $accountId) {\n    ...TaskFields\n  }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(25032).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetTasksByUserId=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetTasksByUserId")},65522(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllJourneyTargets"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllJourneyTargets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:76}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllJourneyTargets {\n  getAllJourneyTargets {\n    id\n    name\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllJourneyTargets=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllJourneyTargets")},79294(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllTransportFuelTypes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"typeId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllTransportFuelTypes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"typeId"},value:{kind:"Variable",name:{kind:"Name",value:"typeId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:114}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllTransportFuelTypes($typeId: ID) {\n  getAllTransportFuelTypes(typeId: $typeId) {\n    id\n    name\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllTransportFuelTypes=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllTransportFuelTypes")},57310(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllTransportTypes"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllTransportTypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subtypes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:117}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllTransportTypes {\n  getAllTransportTypes {\n    id\n    name\n    subtypes {\n      id\n      name\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllTransportTypes=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllTransportTypes")},73543(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTransportTransactionGridColumns"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderDir"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transportTransactionGridColumns"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"display"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"field"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filterable"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:228}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetTransportTransactionGridColumns($orderDir: String, $accountId: ID!) {\n  transportTransactionGridColumns @client {\n    id\n    defaultName\n    displayName\n    display\n    width\n    dataType\n    field\n    filterable\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetTransportTransactionGridColumns=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetTransportTransactionGridColumns")},90156(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetUserInfoByAccountId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paginationToken"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getUserInfoByAccountId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"paginationToken"},value:{kind:"Variable",name:{kind:"Name",value:"paginationToken"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paginationToken"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"roles"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"first_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"last_name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"jobTitle"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"department"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mobile"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profilePicture"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"last_active_at"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"total_time_spent_ms"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"account"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"accessLevel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"allowedLocations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagName"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"allowedTags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"locations"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:766}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetUserInfoByAccountId($accountId: String!, $limit: Int!, $paginationToken: String) {\n  getUserInfoByAccountId(accountId: $accountId, limit: $limit, paginationToken: $paginationToken) {\n    paginationToken\n    users {\n      id\n      email\n      username\n      roles\n      first_name\n      last_name\n      jobTitle\n      department\n      mobile\n      phone\n      profilePicture\n      last_active_at\n      total_time_spent_ms\n      account {\n        id\n        name\n      }\n      role {\n        role\n        name\n      }\n      accessLevel\n      allowedLocations {\n        id\n        name\n        tags {\n          id\n          tagName\n        }\n      }\n      allowedTags {\n        id\n        tagName\n        locations {\n          id\n        }\n      }\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetUserInfoByAccountId=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetUserInfoByAccountId")},80691(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllContainerTypeSizeOptions"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getContainerTypeSizePage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"IntValue",value:"1"}},{kind:"Argument",name:{kind:"Name",value:"pageSize"},value:{kind:"IntValue",value:"100000"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"typeSizes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:156}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllContainerTypeSizeOptions {\n  getContainerTypeSizePage(page: 1, pageSize: 100000) {\n    typeSizes {\n      value: id\n      label: name\n    }\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllContainerTypeSizeOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllContainerTypeSizeOptions")},38649(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetWasteContractorOptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sort"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SortCommand"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"NamedType",name:{kind:"Name",value:"Filters"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSuppliersPage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"sort"},value:{kind:"Variable",name:{kind:"Name",value:"sort"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalRows"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:298}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetWasteContractorOptions($accountId: ID!, $offset: Int, $limit: Int, $sort: [SortCommand!], $filters: Filters) {\n  getSuppliersPage(accountId: $accountId, offset: $offset, limit: $limit, sort: $sort, filters: $filters) {\n    totalRows\n    rows {\n      value: id\n      label: name\n    }\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetWasteContractorOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetWasteContractorOptions")},47055(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllWasteInsOptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWasteInsByAccountId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"100000"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:126}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllWasteInsOptions($id: ID!) {\n  getWasteInsByAccountId(id: $id, limit: 100000) {\n    value: id\n    label: name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllWasteInsOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllWasteInsOptions")},23402(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllWasteOutsOptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWasteOutsByAccountId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"100000"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:128}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetAllWasteOutsOptions($id: ID!) {\n  getWasteOutsByAccountId(id: $id, limit: 100000) {\n    value: id\n    label: name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllWasteOutsOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllWasteOutsOptions")},81526(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllWasteStreamsOptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWasteStreamsByAccountId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"IntValue",value:"1"}},{kind:"Argument",name:{kind:"Name",value:"pageSize"},value:{kind:"IntValue",value:"100000"}},{kind:"Argument",name:{kind:"Name",value:"filterValue"},value:{kind:"StringValue",value:"",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"wasteStreams"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"value"},name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"label"},name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:213}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:'query GetAllWasteStreamsOptions($accountId: ID!) {\n  getWasteStreamsByAccountId(accountId: $accountId, page: 1, pageSize: 100000, filterValue: "") {\n    wasteStreams {\n      value: id\n      label: name\n    }\n  }\n}',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetAllWasteStreamsOptions=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetAllWasteStreamsOptions")},76486(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTreatmentProcesses"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllWasteTreatmentProcesses"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:85}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetTreatmentProcesses {\n  getAllWasteTreatmentProcesses {\n    id\n    name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetTreatmentProcesses=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetTreatmentProcesses")},6323(e,n,t){var a={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSuppliers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderDir"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getSuppliers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"IntValue",value:"1"}},{kind:"Argument",name:{kind:"Name",value:"pageSize"},value:{kind:"IntValue",value:"1000"}},{kind:"Argument",name:{kind:"Name",value:"filterValue"},value:{kind:"StringValue",value:"Carrier",block:!1}},{kind:"Argument",name:{kind:"Name",value:"filterExpression"},value:{kind:"EnumValue",value:"EQUAL"}},{kind:"Argument",name:{kind:"Name",value:"orderDir"},value:{kind:"Variable",name:{kind:"Name",value:"orderDir"}}},{kind:"Argument",name:{kind:"Name",value:"filterBy"},value:{kind:"StringValue",value:"carrierType",block:!1}},{kind:"Argument",name:{kind:"Name",value:"utility"},value:{kind:"EnumValue",value:"WASTE"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasPreviousPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isFirstPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isLastPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalItemCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"page"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageSize"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"suppliers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SupplierFields"},directives:[]}]}}]}}]}}],loc:{start:0,end:475}};a.loc.source={body:'#import "../../fragments/SupplierFields.fragment.graphql"\n\nquery GetSuppliers($orderDir: String, $accountId: ID!) {\n  getSuppliers(accountId: $accountId, page: 1, pageSize: 1000, filterValue: "Carrier", filterExpression: EQUAL, orderDir: $orderDir, filterBy: "carrierType", utility: WASTE) {\n    count\n    hasNextPage\n    hasPreviousPage\n    isFirstPage\n    isLastPage\n    pageCount\n    totalItemCount\n    page\n    pageSize\n    suppliers {\n      ...SupplierFields\n    }\n  }\n}',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var t=e.type;"NamedType"===t.kind&&n.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){i(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){i(e,n)}),e.definitions&&e.definitions.forEach(function(e){i(e,n)})}a.definitions=a.definitions.concat(t(84477).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var n=e.name.value;return!r[n]&&(r[n]=!0,!0)}));var o={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}a.definitions.forEach(function(e){if(e.name){var n=new Set;i(e,n),o[e.name.value]=n}}),e.exports=a,e.exports.GetSuppliers=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=o[n]||new Set,r=new Set,i=new Set;for(a.forEach(function(e){i.add(e)});i.size>0;){var s=i;i=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){i.add(e)}))})}return r.forEach(function(n){var a=l(e,n);a&&t.definitions.push(a)}),t}(a,"GetSuppliers")},40337(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetWasteContractors"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllWasteContractors"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:77}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetWasteContractors {\n  getAllWasteContractors {\n    id\n    name\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetWasteContractors=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetWasteContractors")},70303(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetWasteInsByAccountId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWasteInsByAccountId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:112}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetWasteInsByAccountId($accountId: ID!) {\n  getWasteInsByAccountId(id: $accountId) {\n    id\n    name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetWasteInsByAccountId=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetWasteInsByAccountId")},18552(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetWasteOutsByAccountId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWasteOutsByAccountId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:114}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetWasteOutsByAccountId($accountId: ID!) {\n  getWasteOutsByAccountId(id: $accountId) {\n    id\n    name\n  }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetWasteOutsByAccountId=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetWasteOutsByAccountId")},28342(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetWasteStreamsByAccountId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWasteStreamsByAccountId"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"IntValue",value:"1"}},{kind:"Argument",name:{kind:"Name",value:"pageSize"},value:{kind:"IntValue",value:"200"}},{kind:"Argument",name:{kind:"Name",value:"filterValue"},value:{kind:"StringValue",value:"",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"wasteStreams"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ewc"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:242}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:'query GetWasteStreamsByAccountId($accountId: ID!) {\n  getWasteStreamsByAccountId(accountId: $accountId, page: 1, pageSize: 200, filterValue: "") {\n    wasteStreams {\n      id\n      name,\n      ewc {\n        code\n        id\n      }\n    }\n  }\n}',name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetWasteStreamsByAccountId=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetWasteStreamsByAccountId")},95041(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetWasteTransactionGridColumns"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderDir"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"wasteTransactionGridColumns"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"client"},arguments:[]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"defaultName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"display"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"field"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filterable"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:220}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetWasteTransactionGridColumns($orderDir: String, $accountId: ID!) {\n  wasteTransactionGridColumns @client {\n    id\n    defaultName\n    displayName\n    display\n    width\n    dataType\n    field\n    filterable\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetWasteTransactionGridColumns=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetWasteTransactionGridColumns")},59802(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetWaterTransactionsPageFilter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"field"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getWaterTransactionsPageFilter"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"field"},value:{kind:"Variable",name:{kind:"Name",value:"field"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:172}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"query GetWaterTransactionsPageFilter($accountId: ID!, $field: String!) {\n  getWaterTransactionsPageFilter(accountId: $accountId, field: $field) {\n    label\n    value\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.GetWaterTransactionsPageFilter=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"GetWaterTransactionsPageFilter")},11845(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"OnAccountUpdated"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountUpdated"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoPath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"showChatBot"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"n3rgyUploadGranularity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"n3rgyConsentDocumentLink"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accessControls"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"learn"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"intelligence"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dromoUpload"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comply"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"legislation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagLevelLegislation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"policies"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"systems"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targets"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"frameworks"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"agreements"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"waste"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"electricity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"gas"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"water"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"materials"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fuel"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"transport"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"refrigerants"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"heatSteam"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"buildingEnergyRatings"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"children"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logoPath"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:675}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"subscription OnAccountUpdated($id: ID!) {\n  accountUpdated(id: $id) {\n    id\n    name\n    type\n    logoPath\n    showChatBot\n    n3rgyUploadGranularity\n    n3rgyConsentDocumentLink\n    accessControls {\n      learn\n      intelligence\n      dromoUpload\n      comply {\n        legislation\n        tagLevelLegislation\n        policies\n        systems\n        targets\n        frameworks\n        agreements\n      }\n      data {\n        waste\n        electricity\n        gas\n        water\n        materials\n        fuel\n        transport\n        refrigerants\n        heatSteam\n        buildingEnergyRatings\n      }\n    }\n    children {\n      id\n      name\n      logoPath\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.OnAccountUpdated=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"OnAccountUpdated")},73469(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"subscription",name:{kind:"Name",value:"LicencesPaidSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"licencesPaid"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:89}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){t(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){t(e,n)}),e.definitions&&e.definitions.forEach(function(e){t(e,n)})}n.loc.source={body:"subscription LicencesPaidSubscription($id: ID!) {\n  licencesPaid(id: $id) {\n    id\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var a={};function r(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}}),e.exports=n,e.exports.LicencesPaidSubscription=function(e,n){var t={kind:e.kind,definitions:[r(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,o=new Set,l=new Set;for(i.forEach(function(e){l.add(e)});l.size>0;){var s=l;l=new Set,s.forEach(function(e){o.has(e)||(o.add(e),(a[e]||new Set).forEach(function(e){l.add(e)}))})}return o.forEach(function(n){var a=r(e,n);a&&t.definitions.push(a)}),t}(n,"LicencesPaidSubscription")},54551(e,n,t){var a={"./af":20736,"./af.js":20736,"./ar":87292,"./ar-dz":307,"./ar-dz.js":307,"./ar-kw":35175,"./ar-kw.js":35175,"./ar-ly":11246,"./ar-ly.js":11246,"./ar-ma":97031,"./ar-ma.js":97031,"./ar-ps":12616,"./ar-ps.js":12616,"./ar-sa":90109,"./ar-sa.js":90109,"./ar-tn":51703,"./ar-tn.js":51703,"./ar.js":87292,"./az":20036,"./az.js":20036,"./be":90598,"./be.js":90598,"./bg":56892,"./bg.js":56892,"./bm":29326,"./bm.js":29326,"./bn":78955,"./bn-bd":59014,"./bn-bd.js":59014,"./bn.js":78955,"./bo":73284,"./bo.js":73284,"./br":89111,"./br.js":89111,"./bs":51603,"./bs.js":51603,"./ca":14219,"./ca.js":14219,"./cs":92445,"./cs.js":92445,"./cv":81682,"./cv.js":81682,"./cy":17555,"./cy.js":17555,"./da":24200,"./da.js":24200,"./de":18087,"./de-at":32568,"./de-at.js":32568,"./de-ch":76622,"./de-ch.js":76622,"./de.js":18087,"./dv":50989,"./dv.js":50989,"./el":39494,"./el.js":39494,"./en-au":58263,"./en-au.js":58263,"./en-ca":18317,"./en-ca.js":18317,"./en-gb":5712,"./en-gb.js":5712,"./en-ie":44879,"./en-ie.js":44879,"./en-il":39632,"./en-il.js":39632,"./en-in":76954,"./en-in.js":76954,"./en-nz":57321,"./en-nz.js":57321,"./en-sg":15903,"./en-sg.js":15903,"./eo":61251,"./eo.js":61251,"./es":5119,"./es-do":58949,"./es-do.js":58949,"./es-mx":84093,"./es-mx.js":84093,"./es-us":1748,"./es-us.js":1748,"./es.js":5119,"./et":98270,"./et.js":98270,"./eu":8189,"./eu.js":8189,"./fa":16054,"./fa.js":16054,"./fi":17022,"./fi.js":17022,"./fil":27928,"./fil.js":27928,"./fo":65064,"./fo.js":65064,"./fr":72163,"./fr-ca":46520,"./fr-ca.js":46520,"./fr-ch":45479,"./fr-ch.js":45479,"./fr.js":72163,"./fy":47502,"./fy.js":47502,"./ga":51623,"./ga.js":51623,"./gd":69948,"./gd.js":69948,"./gl":36868,"./gl.js":36868,"./gom-deva":99221,"./gom-deva.js":99221,"./gom-latn":40622,"./gom-latn.js":40622,"./gu":55827,"./gu.js":55827,"./he":90728,"./he.js":90728,"./hi":11628,"./hi.js":11628,"./hr":17517,"./hr.js":17517,"./hu":76664,"./hu.js":76664,"./hy-am":90959,"./hy-am.js":90959,"./id":41666,"./id.js":41666,"./is":99419,"./is.js":99419,"./it":88146,"./it-ch":72172,"./it-ch.js":72172,"./it.js":88146,"./ja":64370,"./ja.js":64370,"./jv":38539,"./jv.js":38539,"./ka":74659,"./ka.js":74659,"./kk":68173,"./kk.js":68173,"./km":38895,"./km.js":38895,"./kn":48354,"./kn.js":48354,"./ko":50417,"./ko.js":50417,"./ku":1943,"./ku-kmr":67240,"./ku-kmr.js":67240,"./ku.js":1943,"./ky":73531,"./ky.js":73531,"./lb":23129,"./lb.js":23129,"./lo":95358,"./lo.js":95358,"./lt":99056,"./lt.js":99056,"./lv":24773,"./lv.js":24773,"./me":94373,"./me.js":94373,"./mi":4753,"./mi.js":4753,"./mk":5148,"./mk.js":5148,"./ml":79086,"./ml.js":79086,"./mn":81028,"./mn.js":81028,"./mr":75328,"./mr.js":75328,"./ms":65047,"./ms-my":6358,"./ms-my.js":6358,"./ms.js":65047,"./mt":6518,"./mt.js":6518,"./my":31745,"./my.js":31745,"./nb":91211,"./nb.js":91211,"./ne":47778,"./ne.js":47778,"./nl":67081,"./nl-be":53003,"./nl-be.js":53003,"./nl.js":67081,"./nn":23591,"./nn.js":23591,"./oc-lnc":46783,"./oc-lnc.js":46783,"./pa-in":86314,"./pa-in.js":86314,"./pl":9567,"./pl.js":9567,"./pt":8263,"./pt-br":64684,"./pt-br.js":64684,"./pt.js":8263,"./ro":31156,"./ro.js":31156,"./ru":60582,"./ru.js":60582,"./sd":86152,"./sd.js":86152,"./se":20767,"./se.js":20767,"./si":7315,"./si.js":7315,"./sk":65333,"./sk.js":65333,"./sl":5952,"./sl.js":5952,"./sq":53451,"./sq.js":53451,"./sr":52238,"./sr-cyrl":48849,"./sr-cyrl.js":48849,"./sr.js":52238,"./ss":12941,"./ss.js":12941,"./sv":67490,"./sv.js":67490,"./sw":35377,"./sw.js":35377,"./ta":25336,"./ta.js":25336,"./te":41604,"./te.js":41604,"./tet":12706,"./tet.js":12706,"./tg":21838,"./tg.js":21838,"./th":72711,"./th.js":72711,"./tk":68986,"./tk.js":68986,"./tl-ph":61304,"./tl-ph.js":61304,"./tlh":74523,"./tlh.js":74523,"./tr":74497,"./tr.js":74497,"./tzl":36449,"./tzl.js":36449,"./tzm":82546,"./tzm-latn":98226,"./tzm-latn.js":98226,"./tzm.js":82546,"./ug-cn":2765,"./ug-cn.js":2765,"./uk":27767,"./uk.js":27767,"./ur":1560,"./ur.js":1560,"./uz":59472,"./uz-latn":62576,"./uz-latn.js":62576,"./uz.js":59472,"./vi":37582,"./vi.js":37582,"./x-pseudo":97150,"./x-pseudo.js":97150,"./yo":16535,"./yo.js":16535,"./zh-cn":23031,"./zh-cn.js":23031,"./zh-hk":10199,"./zh-hk.js":10199,"./zh-mo":28274,"./zh-mo.js":28274,"./zh-tw":95327,"./zh-tw.js":95327};function r(e){var n=i(e);return t(n)}function i(e){if(!t.o(a,e)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return a[e]}r.keys=function(){return Object.keys(a)},r.resolve=i,e.exports=r,r.id=54551},10070(e,n,t){"use strict";e.exports=t.p+"doubleArrow-f10d60fc20d7ff7de68c.svg"},8948(e,n,t){"use strict";e.exports=t.p+"arrowIcon-5cf60718a3369ed847a8.svg"},94282(e,n,t){"use strict";e.exports=t.p+"clearIcon-0e6b0ae4576b737ed2c5.svg"},91171(e,n,t){"use strict";e.exports=t.p+"errorIcon-2a1886631d6931166543.svg"},55595(){},92785(){},46216(){},3308(){},44507(){},57167(){},14058(){},19719(){},99603(){},87679(){},18418(e){"use strict";e.exports=JSON.parse('{"nm":"Flow 4","ddd":0,"h":91,"w":91,"meta":{"g":"LottieFiles Figma v67"},"layers":[{"ty":0,"nm":"ð¢ https://app.lottiefiles.com/animation/d6667ad2-c1f9-48b4-89cd-2905ad24a332","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":true,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"masksProperties":[{"nm":"","inv":false,"mode":"a","x":{"a":0,"k":0},"o":{"a":0,"k":100},"pt":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":18},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":42.3}]}}],"w":91,"h":91,"refId":"1","ind":1},{"ty":0,"nm":"ð¢ https://app.lottiefiles.com/animation/d6667ad2-c1f9-48b4-89cd-2905ad24a332","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":true,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"masksProperties":[{"nm":"","inv":false,"mode":"a","x":{"a":0,"k":0},"o":{"a":0,"k":100},"pt":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":18},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":42.3}]}}],"w":91,"h":91,"refId":"18","ind":2},{"ty":0,"nm":"green","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[90],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[180],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[270],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[360],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[450],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[540],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[630],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[720],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[720],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[810],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[900],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[990],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1080],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1170],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1260],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1350],"t":145},{"s":[1440],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"w":91,"h":91,"refId":"35","ind":3},{"ty":0,"nm":"purple","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[22.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[67.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[90],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[112.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[135],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[157.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[180],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[180],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[202.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[225],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[247.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[270],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[292.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[315],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[337.5],"t":145},{"s":[360],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"w":91,"h":91,"refId":"36","ind":4},{"ty":0,"nm":"pink","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[90],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[135],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[180],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[225],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[270],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[315],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[360],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[360],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[405],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[450],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[495],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[540],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[585],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[630],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[675],"t":145},{"s":[720],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"w":91,"h":91,"refId":"37","ind":5},{"ty":4,"nm":"blue","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":145},{"s":[20,20],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":145},{"s":[45,46],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":169}]}},{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":169}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.4229,0.6192,1],"t":145},{"s":[0.4229,0.6192,1],"t":169}]},"r":2,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}}],"ind":6}],"v":"5.7.0","fr":60,"op":168.96,"ip":0,"assets":[{"nm":"[Asset] ð¢ https://app.lottiefiles.com/animation/d6667ad2-c1f9-48b4-89cd-2905ad24a332","id":"1","layers":[{"ty":0,"nm":"Clip path group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"2","ind":1},{"ty":4,"nm":"ð¢ https://app.lottiefiles.com/animation/d6667ad2-c1f9-48b4-89cd-2905ad24a332 Bg","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":18},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":42.3}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1,1,1],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1,1,1],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1,1,1],"t":18},{"s":[1,1,1],"t":42.3}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]}}],"ind":2}]},{"nm":"[Asset] Clip path group","id":"2","layers":[{"ty":0,"nm":"__lottie_element_543","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"td":1,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"17","ind":1},{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"tt":1,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[59.02,59.02],"t":18},{"s":[59.02,59.02],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":118.03345489501953,"h":118.03345489501953,"refId":"3","ind":2}]},{"nm":"[Asset] Group","id":"3","layers":[{"ty":0,"nm":"Clip path group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[59.02,59.02],"t":18},{"s":[59.02,59.02],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[90],"t":18},{"s":[90],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"4","ind":1},{"ty":0,"nm":"Clip path group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[59.02,59.02],"t":18},{"s":[59.02,59.02],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[169.24],"t":18},{"s":[169.24],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"8","ind":2},{"ty":0,"nm":"Clip path group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[59.02,59.02],"t":18},{"s":[59.02,59.02],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[111.52],"t":18},{"s":[111.52],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"12","ind":3},{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":18},{"s":[20,20],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[58.52,59.52],"t":18},{"s":[58.52,59.52],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"16","ind":4}]},{"nm":"[Asset] Clip path group","id":"4","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":18},{"s":[11.67,12.34],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":18},{"s":[64.67,27.34],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"5","ind":1},{"ty":0,"nm":"__lottie_element_545","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"td":1,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"7","ind":2}]},{"nm":"[Asset] Group","id":"5","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":18},{"s":[11.67,12.34],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":18},{"s":[11.67,12.34],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"6","ind":1}]},{"nm":"[Asset] Group","id":"6","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[11.67,12.34],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[11.67,12.34],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0.0314,0.9216,0.651],"t":18}]},"r":2,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] __lottie_element_545","id":"7","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0,0,0],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] Clip path group","id":"8","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":18},{"s":[4,4],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":18},{"s":[60,68],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"9","ind":1},{"ty":0,"nm":"__lottie_element_555","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"td":1,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"11","ind":2}]},{"nm":"[Asset] Group","id":"9","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":18},{"s":[4,4],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":18},{"s":[4,4],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"10","ind":1}]},{"nm":"[Asset] Group","id":"10","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[4,4],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[4,4],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0.5687,0.4981,0.9961],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] __lottie_element_555","id":"11","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0,0,0],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] Clip path group","id":"12","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.5,7.5],"t":18},{"s":[7.5,7.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":18},{"s":[27.51,31.51],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"13","ind":1},{"ty":0,"nm":"__lottie_element_565","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"td":1,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"15","ind":2}]},{"nm":"[Asset] Group","id":"13","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.5,7.5],"t":18},{"s":[7.5,7.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.5,7.5],"t":18},{"s":[7.5,7.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"14","ind":1}]},{"nm":"[Asset] Group","id":"14","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[7.5,7.5],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[7.5,7.5],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0.8942,0.2589,1],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] __lottie_element_565","id":"15","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0,0,0],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] Group","id":"16","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[20,20],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[20,20],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":18}]}},{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[{"c":true,"i":[],"o":[],"v":[]}],"t":0},{"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0.4196,0.6157,1],"t":18}]},"r":2,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] __lottie_element_543","id":"17","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[0,0],[0,91],[91,91],[91,0]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[0,0],[0,91],[91,91],[91,0]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0,0,0],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] ð¢ https://app.lottiefiles.com/animation/d6667ad2-c1f9-48b4-89cd-2905ad24a332","id":"18","layers":[{"ty":0,"nm":"Clip path group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"19","ind":1},{"ty":4,"nm":"ð¢ https://app.lottiefiles.com/animation/d6667ad2-c1f9-48b4-89cd-2905ad24a332 Bg","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":18},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":42.3}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1,1,1],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1,1,1],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1,1,1],"t":18},{"s":[1,1,1],"t":42.3}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12.18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]}}],"ind":2}]},{"nm":"[Asset] Clip path group","id":"19","layers":[{"ty":0,"nm":"__lottie_element_543","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"td":1,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"34","ind":1},{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"tt":1,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.09,64.09],"t":18},{"s":[64.09,64.09],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":128.1800537109375,"h":128.1800537109375,"refId":"20","ind":2}]},{"nm":"[Asset] Group","id":"20","layers":[{"ty":0,"nm":"Clip path group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.09,64.09],"t":18},{"s":[64.09,64.09],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[-90],"t":18},{"s":[-90],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"21","ind":1},{"ty":0,"nm":"Clip path group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.09,64.09],"t":18},{"s":[64.09,64.09],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[154.94],"t":18},{"s":[154.94],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"25","ind":2},{"ty":0,"nm":"Clip path group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.09,64.09],"t":18},{"s":[64.09,64.09],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[-50.12],"t":18},{"s":[-50.12],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"29","ind":3},{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":18},{"s":[20,20],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[63.59,64.59],"t":18},{"s":[63.59,64.59],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"33","ind":4}]},{"nm":"[Asset] Clip path group","id":"21","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":18},{"s":[11.67,12.34],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":18},{"s":[64.67,27.34],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"22","ind":1},{"ty":0,"nm":"__lottie_element_545","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"td":1,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"24","ind":2}]},{"nm":"[Asset] Group","id":"22","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":18},{"s":[11.67,12.34],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":18},{"s":[11.67,12.34],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"23","ind":1}]},{"nm":"[Asset] Group","id":"23","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[11.67,12.34],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[11.67,12.34],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0.0314,0.9216,0.651],"t":18}]},"r":2,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] __lottie_element_545","id":"24","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0,0,0],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] Clip path group","id":"25","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":18},{"s":[4,4],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":18},{"s":[60,68],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"26","ind":1},{"ty":0,"nm":"__lottie_element_555","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"td":1,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"28","ind":2}]},{"nm":"[Asset] Group","id":"26","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":18},{"s":[4,4],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":18},{"s":[4,4],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80.57],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"27","ind":1}]},{"nm":"[Asset] Group","id":"27","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[4,4],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[4,4],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0.5687,0.4981,0.9961],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] __lottie_element_555","id":"28","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0,0,0],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] Clip path group","id":"29","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.5,7.5],"t":18},{"s":[7.5,7.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":18},{"s":[27.51,31.51],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"30","ind":1},{"ty":0,"nm":"__lottie_element_565","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"td":1,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"s":[45.5,45.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"32","ind":2}]},{"nm":"[Asset] Group","id":"30","layers":[{"ty":0,"nm":"Group","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.5,7.5],"t":18},{"s":[7.5,7.5],"t":42.3}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"s":[100,100],"t":42.3}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.5,7.5],"t":18},{"s":[7.5,7.5],"t":42.3}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"s":[0],"t":42.3}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":18},{"s":[0],"t":42.3}]}},"w":91,"h":91,"refId":"31","ind":1}]},{"nm":"[Asset] Group","id":"31","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[7.5,7.5],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[7.5,7.5],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0.8942,0.2589,1],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] __lottie_element_565","id":"32","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,0],[91,0],[91,91],[0,91],[0,0]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0,0,0],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] Group","id":"33","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[20,20],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[20,20],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":18}]}},{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[{"c":true,"i":[],"o":[],"v":[]}],"t":0},{"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0.4196,0.6157,1],"t":18}]},"r":2,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] __lottie_element_543","id":"34","layers":[{"ty":4,"nm":"Vector","sr":1,"st":0,"op":169.96,"ip":18,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":0},{"s":[100,100],"t":18}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":0},{"s":[45.5,45.5],"t":18}]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[0],"t":18}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"s":[0],"t":42.3}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[0,0],[0,91],[91,91],[91,0]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[0,0],[0,91],[91,91],[91,0]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0,0],"t":0},{"s":[0,0,0],"t":18}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100],"t":0},{"s":[100],"t":18}]}}],"ind":1}]},{"nm":"[Asset] green","id":"35","layers":[{"ty":4,"nm":"green","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":145},{"s":[11.67,12.34],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":145},{"s":[64.67,27.34],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":145},{"s":[100],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":169}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":145},{"s":[0.0314,0.9216,0.6549],"t":169}]},"r":2,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}}],"ind":1},{"ty":4,"nm":"green Bg","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":169}]}}],"ind":2}]},{"nm":"[Asset] purple","id":"36","layers":[{"ty":4,"nm":"purple","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":145},{"s":[4,4],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":145},{"s":[60,68],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":169}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":145},{"s":[0.5687,0.4981,0.9961],"t":169}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}}],"ind":1},{"ty":4,"nm":"purple Bg","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":169}]}}],"ind":2}]},{"nm":"[Asset] pink","id":"37","layers":[{"ty":4,"nm":"pink","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":145},{"s":[7.51,7.51],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":145},{"s":[27.51,31.51],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[95],"t":145},{"s":[95],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":169}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":145},{"s":[0.8942,0.2589,1],"t":169}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}}],"ind":1},{"ty":4,"nm":"pink Bg","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":169}]}}],"ind":2}]}]}')},9794(e){"use strict";e.exports=JSON.parse('{"nm":"Flow 2","ddd":0,"h":91,"w":91,"meta":{"g":"LottieFiles Figma v67"},"layers":[{"ty":0,"nm":"green","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[90],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[180],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[270],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[360],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[450],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[540],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[630],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[720],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[720],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[810],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[900],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[990],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1080],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1170],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1260],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[1350],"t":145},{"s":[1440],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"w":91,"h":91,"refId":"1","ind":1},{"ty":0,"nm":"purple","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[22.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[67.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[90],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[112.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[135],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[157.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[180],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[180],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[202.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[225],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[247.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[270],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[292.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[315],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[337.5],"t":145},{"s":[360],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"w":91,"h":91,"refId":"2","ind":2},{"ty":0,"nm":"pink","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[90],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[135],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[180],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[225],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[270],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[315],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[360],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[360],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[405],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[450],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[495],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[540],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[585],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[630],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[675],"t":145},{"s":[720],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"w":91,"h":91,"refId":"3","ind":3},{"ty":4,"nm":"blue","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[20,20],"t":145},{"s":[20,20],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45,46],"t":145},{"s":[45,46],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[7.81,-7.81],[-7.81,-7.81],[-7.81,7.81],[7.81,7.81]],"o":[[-7.81,-7.81],[-7.81,7.81],[7.81,7.81],[7.81,-7.81],[0,0]],"v":[[34.14,5.86],[5.86,5.86],[5.86,34.14],[34.14,34.14],[34.14,5.86]]}],"t":169}]}},{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[0,5.52],[5.52,0],[0,-5.52],[-5.52,0]],"o":[[5.52,0],[0,-5.52],[-5.52,0],[0,5.52],[0,0]],"v":[[20,30],[30,20],[20,10],[10,20],[20,30]]}],"t":169}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.1804,0.2432,1],"t":145},{"s":[0.1804,0.2432,1],"t":169}]},"r":2,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}}],"ind":4}],"v":"5.7.0","fr":60,"op":168.96,"ip":0,"assets":[{"nm":"[Asset] green","id":"1","layers":[{"ty":4,"nm":"green","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[11.67,12.34],"t":145},{"s":[11.67,12.34],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[64.67,27.34],"t":145},{"s":[64.67,27.34],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":145},{"s":[80],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[-2.44,-1.29],[-3.04,-7.41],[2.55,-1.05],[1.05,2.55],[4.97,2.62],[-1.29,2.44]],"o":[[1.29,-2.44],[7.03,3.7],[1.05,2.55],[-2.55,1.05],[-2.14,-5.22],[-2.44,-1.29],[0,0]],"v":[[0.58,2.67],[7.33,0.58],[22.97,17.78],[20.24,24.3],[13.72,21.57],[2.67,9.42],[0.58,2.67]]}],"t":169}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.0314,0.9216,0.6549],"t":145},{"s":[0.0314,0.9216,0.6549],"t":169}]},"r":2,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}}],"ind":1},{"ty":4,"nm":"green Bg","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":169}]}}],"ind":2}]},{"nm":"[Asset] purple","id":"2","layers":[{"ty":4,"nm":"purple","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[4,4],"t":145},{"s":[4,4],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[60,68],"t":145},{"s":[60,68],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":145},{"s":[80],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[0.23,-2.2],[2.2,0.23],[-0.23,2.2],[-2.2,-0.23]],"o":[[2.2,0.23],[-0.23,2.2],[-2.2,-0.23],[0.23,-2.2],[0,0]],"v":[[4.41,0.02],[7.98,4.41],[3.59,7.98],[0.02,3.59],[4.41,0.02]]}],"t":169}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.5687,0.4981,0.9961],"t":145},{"s":[0.5687,0.4981,0.9961],"t":169}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}}],"ind":1},{"ty":4,"nm":"purple Bg","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":169}]}}],"ind":2}]},{"nm":"[Asset] pink","id":"3","layers":[{"ty":4,"nm":"pink","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[7.51,7.51],"t":145},{"s":[7.51,7.51],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[27.51,31.51],"t":145},{"s":[27.51,31.51],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[80],"t":145},{"s":[80],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[-2.93,-2.93],[2.93,-2.93],[2.93,2.93],[-2.93,2.93]],"o":[[2.93,-2.93],[2.93,2.93],[-2.93,2.93],[-2.93,-2.93],[0,0]],"v":[[2.2,2.2],[12.81,2.2],[12.81,12.81],[2.2,12.81],[2.2,2.2]]}],"t":169}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0.8942,0.2589,1],"t":145},{"s":[0.8942,0.2589,1],"t":169}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}}],"ind":1},{"ty":4,"nm":"pink Bg","sr":1,"st":0,"op":169.96,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100,100],"t":145},{"s":[100,100],"t":169}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[45.5,45.5],"t":145},{"s":[45.5,45.5],"t":169}]},"r":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[0],"t":145},{"s":[0],"t":169}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[100],"t":145},{"s":[100],"t":169}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":0},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":6},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":12},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":18},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":42},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":48},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":54},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":60},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":84},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":85},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":91},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":97},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":103},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":127},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":133},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":139},{"o":{"x":0,"y":0},"i":{"x":1,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":145},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[91,0],[91,91],[0,91],[0,0]]}],"t":169}]}}],"ind":2}]}]}')},62651(e){"use strict";e.exports=JSON.parse('[{"section":"GENERAL","content":"Animals don’t pollute the environment. So please behave like animals.","source":null},{"section":"GENERAL","content":"The term sustainability has its most known roots in the 1987 Brundtland Report which officially defined sustainable development for the first time.","source":null},{"section":"GENERAL","content":"In 2016 many world leaders adopted the United Nation’s 17 global goals/Sustainable Development Goals to improve life all around the world and preserve the earth’s resources and fight climate change.","source":null},{"section":"GENERAL","content":"Climate change is defined as “a change of climate that is attributed directly or indirectly to human activity, that alters the composition of the global atmosphere, and that is in addition to natural climate variability over a comparable time period.”","source":null},{"section":"GENERAL","content":"When organic matter is composted, organic matter is converted into stable soil carbon, “while retaining water and nutrients of the original waste matter.” This results in carbon sequestration and the production of a high quality fertilizer.","source":null},{"section":"GENERAL","content":"When organic matter is landfilled it decomposes and produces gas methane which is up to 34 times more powerful than carbon dioxide over a century, thus contributing to climate change.","source":null},{"section":"GENERAL","content":"Nearly half of the solid waste produced globally is organic or biodegradable.","source":null},{"section":"GENERAL","content":"Agricultural Emissions could be reduced by as much as 70% by adopting a vegan diet and 63% by adopting a vegetarian diet.","source":null},{"section":"GENERAL","content":"Plant-rich diets reduce emissions and tend to be healthier, leading to lower rates of chronic disease.","source":null},{"section":"GENERAL","content":"The use of water efficient fittings and fixtures has the ability to cut water use in homes by 45%.","source":null},{"section":"GENERAL","content":"Water use has grown at more than twice the rate of population increase in the last century.","source":null},{"section":"GENERAL","content":"70% of the world is covered by water, yet only 2.5% of it is fresh and only 1% of it is easily accessible for human use.","source":null},{"section":"GENERAL","content":"If people worldwide switched to energy efficient light bulbs the world would save 105 billion euros annually.","source":null},{"section":"GENERAL","content":"Energy is the dominant contributor to climate change, accounting for around 60% of total global greenhouse gas emissions.","source":null},{"section":"GENERAL","content":"Human-caused emissions of carbon dioxide need to fall 45% from 2010 levels by 2030 and reach net-zero around 2050 to limit climate change catastrophe.","source":null},{"section":"GENERAL","content":"Recycling one ton of paper saves 2584l of oil, 26498l of water and 2.5 cubic meters of landfill space.","source":null},{"section":"GENERAL","content":"The world’s indigenous population makes up just 5% of the global population yet protects 80% of global biodiversity.","source":null},{"section":"GENERAL","content":"Plastic bags and Styrofoam containers can take up to thousands of years to decompose leading to marine animal death and the contamination of soil and water.","source":null},{"section":"GENERAL","content":"The production of plastic is largely reliant on fossil hydrocarbons, which are non-renewable resources which contribute to climate change.","source":null},{"section":"GENERAL","content":"The process of Aforestation (creating new forests where there were none) creates a carbon sink. This draws in and holds on to carbon and distributes it into the soil.","source":null},{"section":"GENERAL","content":"Recycled paper produces about 25% fewer total emissions than conventional paper.","source":null},{"section":"REPORTING","content":"Analysing complex datasets to give you a clear view of your environmental impact...","source":null},{"section":"REPORTING","content":"Drawing connections across thousands of data points... Building your eco-insightful dashboard.","source":null},{"section":"REPORTING","content":"Interpreting large volumes of data to create your sustainability snapshot... Hang tight!","source":null},{"section":"REPORTING","content":"Reviewing extensive datasets from multiple sites. We\'re almost ready.","source":null},{"section":"REPORTING","content":"Our system is sorting through massive data volumes. Almost there...","source":null},{"section":"GENERAL","content":"Sustainability is no longer about doing less harm. It’s about doing more good.","source":"Jochen Zeitz"},{"section":"GENERAL","content":"The greatest threat to our planet is the belief that someone else will save it.","source":"Robert Swan"},{"section":"GENERAL","content":"Sustainability is the key to our survival on this planet and will also determine success on all levels.","source":"Shari Arison"},{"section":"GENERAL","content":"To leave the world better than you found it, sometimes you have to pick up other people\'s trash.","source":"Bill Nye"},{"section":"GENERAL","content":"Sustainability is a journey, not a destination.","source":null},{"section":"GENERAL","content":"The best time to plant a tree was 20 years ago. The second best time is now.","source":null},{"section":"GENERAL","content":"It’s not about ideas. It’s about making ideas happen.","source":"Scott Belsky"},{"section":"GENERAL","content":"Act as if what you do makes a difference. It does.","source":"William James"},{"section":"GENERAL","content":"Sustainable development is the pathway to the future we want for all.","source":"Ban Ki-moon"},{"section":"GENERAL","content":"Sustainability is about ecology, economy, and equity.","source":"Ralph Bicknese"},{"section":"GENERAL","content":"Small acts, when multiplied by millions of people, can transform the world.","source":"Howard Zinn"},{"section":"GENERAL","content":"The only way forward, if we are going to improve the quality of the environment, is to get everybody involved.","source":"Richard Rogers"},{"section":"GENERAL","content":"Change is happening, whether we like it or not. We can either shape it or be shaped by it.","source":"David Suzuki"},{"section":"GENERAL","content":"The future depends on what we do in the present.","source":"Mahatma Gandhi"},{"section":"GENERAL","content":"We do not inherit the Earth from our ancestors, we borrow it from our children.","source":null}]')}},e=>{e.O(0,[126,212,118,208,803,716],()=>e(e.s=44273)),e.O()}]);
//# sourceMappingURL=main.c8d131dd766bbcc19563.js.map