Skip to content

Commit

Permalink
2413-351308a7abe8f3da.js.download
Browse files Browse the repository at this point in the history
Stock control supervisors
  • Loading branch information
bombastictranz authored Apr 8, 2024
1 parent d03ee2c commit a3e10ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 2413-351308a7abe8f3da.js.download
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2413],{62413:function(e,t,n){n.d(t,{Kb:function(){return Q}});var r=n(13980),i=n.n(r),u=n(2784),o=(n(96629),n(64358)),s=n(5163);let c=0;function a(){}function l(e,t){if(!e)return;(0,o.Z)(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((e=>{let{el:t,top:n,left:r}=e;t.scrollTop=n,t.scrollLeft=r}))}function d(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function g(e,t){let n;function r(){n&&clearTimeout(n)}function i(){for(var i=arguments.length,u=new Array(i),o=0;o<i;o++)u[o]=arguments[o];r(),n=setTimeout((()=>{n=null,e(...u)}),t)}return i.cancel=r,i}function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.some((t=>(t&&t(e,...r),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault)))}}function p(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>{"function"===typeof t?t(e):t&&(t.current=e)}))}}function f(){return String(c++)}function m(e){let{isOpen:t,resultCount:n,previousResultCount:r}=e;return t?n?n!==r?`${n} result${1===n?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function I(e,t){return Object.keys(e).reduce(((n,r)=>(n[r]=b(t,r)?t[r]:e[r],n)),{})}function b(e,t){return void 0!==e[t]}function v(e){const{key:t,keyCode:n}=e;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?`Arrow${t}`:t}function y(e,t,n,r,i){if(void 0===i&&(i=!0),0===n)return-1;const u=n-1;("number"!==typeof t||t<0||t>=n)&&(t=e>0?-1:u+1);let o=t+e;o<0?o=i?u:0:o>u&&(o=i?0:u);const s=x(e,o,n,r,i);return-1===s?t>=n?-1:t:s}function x(e,t,n,r,i){const u=r(t);if(!u||!u.hasAttribute("disabled"))return t;if(e>0){for(let o=t+1;o<n;o++)if(!r(o).hasAttribute("disabled"))return o}else for(let o=t-1;o>=0;o--)if(!r(o).hasAttribute("disabled"))return o;return i?e>0?x(1,0,n,r,!1):x(-1,n-1,n,r,!1):-1}function w(e,t,n,r){return void 0===r&&(r=!0),t.some((t=>t&&(d(t,e,n)||r&&d(t,n.document.activeElement,n))))}const k=g((e=>{O(e).textContent=""}),500);function E(e,t){const n=O(t);e&&(n.textContent=e,k(t))}function O(e){void 0===e&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const C={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function M(e,t,n){const{props:r,type:i}=e,u={};Object.keys(t).forEach((r=>{!function(e,t,n,r){const{props:i,type:u}=t,o=`on${F(e)}Change`;i[o]&&void 0!==r[e]&&r[e]!==n[e]&&i[o]({type:u,...r})}(r,e,t,n),n[r]!==t[r]&&(u[r]=n[r])})),r.onStateChange&&Object.keys(u).length&&r.onStateChange({type:i,...u})}const V=g(((e,t)=>{E(e(),t)}),200),R="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?u.useLayoutEffect:u.useEffect;function S(e){let{id:t=`downshift-${f()}`,labelId:n,menuId:r,getItemId:i,toggleButtonId:o,inputId:s}=e;return(0,u.useRef)({labelId:n||`${t}-label`,menuId:r||`${t}-menu`,getItemId:i||(e=>`${t}-item-${e}`),toggleButtonId:o||`${t}-toggle-button`,inputId:s||`${t}-input`}).current}function D(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function F(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function T(e){const t=(0,u.useRef)(e);return t.current=e,t}function L(e,t,n){const r=(0,u.useRef)(),i=(0,u.useRef)(),o=(0,u.useCallback)(((t,n)=>{i.current=n,t=I(t,n.props);const r=e(t,n);return n.props.stateReducer(t,{...n,changes:r})}),[e]),[s,c]=(0,u.useReducer)(o,t),a=T(n),l=(0,u.useCallback)((e=>c({props:a.current,...e})),[a]),d=i.current;return(0,u.useEffect)((()=>{d&&r.current&&r.current!==s&&M(d,I(r.current,d.props),s),r.current=s}),[s,n,d]),[s,l]}const A={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){const{selectedItem:t,itemToString:n}=e;return t?`${n(t)} has been selected.`:""},scrollIntoView:l,circularNavigation:!1,environment:"undefined"===typeof window?{}:window};function N(e,t,n){void 0===n&&(n=C);const r=e[`default${F(t)}`];return void 0!==r?r:n[t]}function $(e,t,n){void 0===n&&(n=C);const r=e[t];if(void 0!==r)return r;const i=e[`initial${F(t)}`];return void 0!==i?i:N(e,t,n)}function K(e){const t=$(e,"selectedItem"),n=$(e,"isOpen"),r=$(e,"highlightedIndex"),i=$(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function _(e,t,n,r){const{items:i,initialHighlightedIndex:u,defaultHighlightedIndex:o}=e,{selectedItem:s,highlightedIndex:c}=t;return 0===i.length?-1:void 0!==u&&c===u?u:void 0!==o?o:s?0===n?i.indexOf(s):y(n,i.indexOf(s),i.length,r,!1):0===n?-1:n<0?i.length-1:0}function P(e,t,n,r){const i=(0,u.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,u.useEffect)((()=>{const u=()=>{i.current.isMouseDown=!0},o=u=>{i.current.isMouseDown=!1,e&&!w(u.target,t.map((e=>e.current)),n)&&r()},s=()=>{i.current.isTouchMove=!1},c=()=>{i.current.isTouchMove=!0},a=u=>{!e||i.current.isTouchMove||w(u.target,t.map((e=>e.current)),n,!1)||r()};return n.addEventListener("mousedown",u),n.addEventListener("mouseup",o),n.addEventListener("touchstart",s),n.addEventListener("touchmove",c),n.addEventListener("touchend",a),function(){n.removeEventListener("mousedown",u),n.removeEventListener("mouseup",o),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",a)}}),[e,n]),i}let B=()=>a;function j(e,t,n){let{isInitialMount:r,highlightedIndex:i,items:o,environment:s,...c}=n;(0,u.useEffect)((()=>{r||V((()=>e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length,...c})),s.document)}),t)}function H(e){let{highlightedIndex:t,isOpen:n,itemRefs:r,getItemNodeFromIndex:i,menuElement:o,scrollIntoView:s}=e;const c=(0,u.useRef)(!0);return R((()=>{t<0||!n||!Object.keys(r.current).length||(!1===c.current?c.current=!0:s(i(t),o))}),[t]),c}let U=a;function q(e,t,n){const{type:r,props:i}=t;let u;switch(r){case n.ItemMouseMove:u={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:u={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:u={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:_(i,e,0)};break;case n.FunctionOpenMenu:u={isOpen:!0,highlightedIndex:_(i,e,0)};break;case n.FunctionCloseMenu:u={isOpen:!1};break;case n.FunctionSetHighlightedIndex:u={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:u={inputValue:t.inputValue};break;case n.FunctionReset:u={highlightedIndex:N(i,"highlightedIndex"),isOpen:N(i,"isOpen"),selectedItem:N(i,"selectedItem"),inputValue:N(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...u}}i().array.isRequired,i().func,i().func,i().func,i().bool,i().number,i().number,i().number,i().bool,i().bool,i().bool,i().any,i().any,i().any,i().string,i().string,i().string,i().func,i().string,i().func,i().func,i().func,i().func,i().func,i().shape({addEventListener:i().func,removeEventListener:i().func,document:i().shape({getElementById:i().func,activeElement:i().any,body:i().any})});(0,s.__assign)((0,s.__assign)({},A),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(1===n?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}});var z=Object.freeze({__proto__:null,InputKeyDownArrowDown:0,InputKeyDownArrowUp:1,InputKeyDownEscape:2,InputKeyDownHome:3,InputKeyDownEnd:4,InputKeyDownEnter:5,InputChange:6,InputBlur:7,MenuMouseLeave:8,ItemMouseMove:9,ItemClick:10,ToggleButtonClick:11,FunctionToggleMenu:12,FunctionOpenMenu:13,FunctionCloseMenu:14,FunctionSetHighlightedIndex:15,FunctionSelectItem:16,FunctionSetInputValue:17,FunctionReset:18,ControlledPropUpdatedSelectedItem:19});i().array.isRequired,i().func,i().func,i().func,i().bool,i().number,i().number,i().number,i().bool,i().bool,i().bool,i().any,i().any,i().any,i().string,i().string,i().string,i().string,i().string,i().string,i().func,i().string,i().string,i().func,i().func,i().func,i().func,i().func,i().func,i().shape({addEventListener:i().func,removeEventListener:i().func,document:i().shape({getElementById:i().func,activeElement:i().any,body:i().any})});let Z=a;const G={...A,getA11yStatusMessage:m,circularNavigation:!0};function J(e,t){const{type:n,props:r,shiftKey:i}=t;let u;switch(n){case 10:u={isOpen:N(r,"isOpen"),highlightedIndex:N(r,"highlightedIndex"),selectedItem:r.items[t.index],inputValue:r.itemToString(r.items[t.index])};break;case 0:u=e.isOpen?{highlightedIndex:y(i?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)}:{highlightedIndex:_(r,e,1,t.getItemNodeFromIndex),isOpen:r.items.length>=0};break;case 1:u=e.isOpen?{highlightedIndex:y(i?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)}:{highlightedIndex:_(r,e,-1,t.getItemNodeFromIndex),isOpen:r.items.length>=0};break;case 5:u={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex],isOpen:N(r,"isOpen"),highlightedIndex:N(r,"highlightedIndex"),inputValue:r.itemToString(r.items[e.highlightedIndex])}};break;case 2:u={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case 3:u={highlightedIndex:x(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case 4:u={highlightedIndex:x(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case 7:u={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:r.items[e.highlightedIndex],inputValue:r.itemToString(r.items[e.highlightedIndex])}};break;case 6:u={isOpen:!0,highlightedIndex:N(r,"highlightedIndex"),inputValue:t.inputValue};break;case 16:u={selectedItem:t.selectedItem,inputValue:r.itemToString(t.selectedItem)};break;case 19:u={inputValue:t.inputValue};break;default:return q(e,t,z)}return{...e,...u}}function Q(e){void 0===e&&(e={}),Z(e,Q);const t={...G,...e},{initialIsOpen:n,defaultIsOpen:r,items:i,scrollIntoView:o,environment:s,getA11yStatusMessage:c,getA11ySelectionMessage:a,itemToString:l}=t,d=function(e){const t=K(e),{selectedItem:n}=t;let{inputValue:r}=t;return""===r&&n&&void 0===e.defaultInputValue&&void 0===e.initialInputValue&&void 0===e.inputValue&&(r=e.itemToString(n)),{...t,inputValue:r}}(t),[g,f]=function(e,t,n){const r=(0,u.useRef)(),[i,o]=L(e,t,n);return(0,u.useEffect)((()=>{b(n,"selectedItem")&&(r.current!==n.selectedItem&&o({type:19,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)})),[I(i,n),o]}(J,d,t),{isOpen:m,highlightedIndex:y,selectedItem:x,inputValue:w}=g,k=(0,u.useRef)(null),E=(0,u.useRef)({}),O=(0,u.useRef)(null),C=(0,u.useRef)(null),M=(0,u.useRef)(null),V=(0,u.useRef)(!0),R=S(t),F=(0,u.useRef)(),A=T({state:g,props:t}),N=(0,u.useCallback)((e=>E.current[R.getItemId(e)]),[R]);j(c,[m,y,w,i],{isInitialMount:V.current,previousResultCount:F.current,items:i,environment:s,itemToString:l,...g}),j(a,[x],{isInitialMount:V.current,previousResultCount:F.current,items:i,environment:s,itemToString:l,...g});const $=H({menuElement:k.current,highlightedIndex:y,isOpen:m,itemRefs:E,scrollIntoView:o,getItemNodeFromIndex:N});U({isInitialMount:V.current,props:t,state:g}),(0,u.useEffect)((()=>{(n||r||m)&&O.current&&O.current.focus()}),[]),(0,u.useEffect)((()=>{V.current||(F.current=i.length)}));const _=P(m,[M,k,C],s,(()=>{f({type:7,selectItem:!1})})),q=B();(0,u.useEffect)((()=>{V.current=!1}),[]),(0,u.useEffect)((()=>{m||(E.current={})}),[m]);const z=(0,u.useMemo)((()=>({ArrowDown(e){e.preventDefault(),f({type:0,shiftKey:e.shiftKey,getItemNodeFromIndex:N})},ArrowUp(e){e.preventDefault(),f({type:1,shiftKey:e.shiftKey,getItemNodeFromIndex:N})},Home(e){A.current.state.isOpen&&(e.preventDefault(),f({type:3,getItemNodeFromIndex:N}))},End(e){A.current.state.isOpen&&(e.preventDefault(),f({type:4,getItemNodeFromIndex:N}))},Escape(e){const t=A.current.state;(t.isOpen||t.inputValue||t.selectedItem||t.highlightedIndex>-1)&&(e.preventDefault(),f({type:2}))},Enter(e){const t=A.current.state;!t.isOpen||t.highlightedIndex<0||229===e.which||(e.preventDefault(),f({type:5,getItemNodeFromIndex:N}))}})),[f,A,N]),W=(0,u.useCallback)((e=>({id:R.labelId,htmlFor:R.inputId,...e})),[R]),X=(0,u.useCallback)((function(e,t){let{onMouseLeave:n,refKey:r="ref",ref:i,...u}=void 0===e?{}:e,{suppressRefError:o=!1}=void 0===t?{}:t;return q("getMenuProps",o,r,k),{[r]:p(i,(e=>{k.current=e})),id:R.menuId,role:"listbox","aria-labelledby":R.labelId,onMouseLeave:h(n,(()=>{f({type:8})})),...u}}),[f,q,R]),Y=(0,u.useCallback)((function(e){let{item:t,index:n,refKey:r="ref",ref:i,onMouseMove:u,onMouseDown:o,onClick:s,onPress:c,disabled:a,...l}=void 0===e?{}:e;const{props:d,state:g}=A.current,m=D(n,t,d.items);if(m<0)throw new Error("Pass either item or item index in getItemProps!");const I=s;return{[r]:p(i,(e=>{e&&(E.current[R.getItemId(m)]=e)})),disabled:a,role:"option","aria-selected":`${m===g.highlightedIndex}`,id:R.getItemId(m),...!a&&{onClick:h(I,(()=>{f({type:10,index:n})}))},onMouseMove:h(u,(()=>{n!==g.highlightedIndex&&($.current=!1,f({type:9,index:n,disabled:a}))})),onMouseDown:h(o,(e=>e.preventDefault())),...l}}),[f,A,$,R]),ee=(0,u.useCallback)((function(e){let{onClick:t,onPress:n,refKey:r="ref",ref:i,...u}=void 0===e?{}:e;return{[r]:p(i,(e=>{C.current=e})),id:R.toggleButtonId,tabIndex:-1,...!u.disabled&&{onClick:h(t,(()=>{f({type:11}),!A.current.state.isOpen&&O.current&&O.current.focus()}))},...u}}),[f,A,R]),te=(0,u.useCallback)((function(e,t){let{onKeyDown:n,onChange:r,onInput:i,onBlur:u,onChangeText:o,refKey:s="ref",ref:c,...a}=void 0===e?{}:e,{suppressRefError:l=!1}=void 0===t?{}:t;q("getInputProps",l,s,O);const d=A.current.state,g=e=>{const t=v(e);t&&z[t]&&z[t](e)},m=e=>{f({type:6,inputValue:e.target.value})},I=()=>{d.isOpen&&!_.current.isMouseDown&&f({type:7,selectItem:!0})};let b={};return a.disabled||(b={onChange:h(r,i,m),onKeyDown:h(n,g),onBlur:h(u,I)}),{[s]:p(c,(e=>{O.current=e})),id:R.inputId,"aria-autocomplete":"list","aria-controls":R.menuId,...d.isOpen&&d.highlightedIndex>-1&&{"aria-activedescendant":R.getItemId(d.highlightedIndex)},"aria-labelledby":R.labelId,autoComplete:"off",value:d.inputValue,...b,...a}}),[f,z,A,_,q,R]),ne=(0,u.useCallback)((function(e,t){let{refKey:n="ref",ref:r,...i}=void 0===e?{}:e,{suppressRefError:u=!1}=void 0===t?{}:t;return q("getComboboxProps",u,n,M),{[n]:p(r,(e=>{M.current=e})),role:"combobox","aria-haspopup":"listbox","aria-owns":R.menuId,"aria-expanded":A.current.state.isOpen,...i}}),[A,q,R]),re=(0,u.useCallback)((()=>{f({type:12})}),[f]),ie=(0,u.useCallback)((()=>{f({type:14})}),[f]),ue=(0,u.useCallback)((()=>{f({type:13})}),[f]),oe=(0,u.useCallback)((e=>{f({type:15,highlightedIndex:e})}),[f]),se=(0,u.useCallback)((e=>{f({type:16,selectedItem:e})}),[f]);return{getItemProps:Y,getLabelProps:W,getMenuProps:X,getInputProps:te,getComboboxProps:ne,getToggleButtonProps:ee,toggleMenu:re,openMenu:ue,closeMenu:ie,setHighlightedIndex:oe,setInputValue:(0,u.useCallback)((e=>{f({type:17,inputValue:e})}),[f]),selectItem:se,reset:(0,u.useCallback)((()=>{f({type:18})}),[f]),highlightedIndex:y,isOpen:m,selectedItem:x,inputValue:w}}Q.stateChangeTypes=z;i().array,i().array,i().array,i().func,i().func,i().func,i().number,i().number,i().number,i().func,i().func,i().string,i().string,i().shape({addEventListener:i().func,removeEventListener:i().func,document:i().shape({getElementById:i().func,activeElement:i().any,body:i().any})})},67937:function(e,t){var n=60103,r=60106,i=60107,u=60108,o=60114,s=60109,c=60110,a=60112,l=60113,d=60120,g=60115,h=60116,p=60121,f=60122,m=60117,I=60129,b=60131;if("function"===typeof Symbol&&Symbol.for){var v=Symbol.for;n=v("react.element"),r=v("react.portal"),i=v("react.fragment"),u=v("react.strict_mode"),o=v("react.profiler"),s=v("react.provider"),c=v("react.context"),a=v("react.forward_ref"),l=v("react.suspense"),d=v("react.suspense_list"),g=v("react.memo"),h=v("react.lazy"),p=v("react.block"),f=v("react.server.block"),m=v("react.fundamental"),I=v("react.debug_trace_mode"),b=v("react.legacy_hidden")}function y(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case o:case u:case l:case d:return e;default:switch(e=e&&e.$$typeof){case c:case a:case h:case g:case s:return e;default:return t}}case r:return t}}}},96629:function(e,t,n){n(67937)}}]);
//# sourceMappingURL=2413-351308a7abe8f3da.js.map

0 comments on commit a3e10ee

Please sign in to comment.