@spscommerce/ds-react 8.26.0 → 8.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +546 -549
- package/lib/index.umd.cjs +22 -22
- package/package.json +12 -12
package/lib/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(_,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("@spscommerce/utils"),require("moment-timezone"),require("@spscommerce/ds-shared"),require("react-dom"),require("@spscommerce/ds-colors"),require("@sps-woodland/tabs"),require("@react-stately/collections"),require("@sps-woodland/illustrations")):typeof define=="function"&&define.amd?define(["exports","react","@spscommerce/utils","moment-timezone","@spscommerce/ds-shared","react-dom","@spscommerce/ds-colors","@sps-woodland/tabs","@react-stately/collections","@sps-woodland/illustrations"],x):(_=typeof globalThis<"u"?globalThis:_||self,x(_.DSReact={},_.React,_.utils,_.moment$4,_.dsShared,_.ReactDOM,_.dsColors,_.tabs,_.collections,_.illustrations))})(this,function(_,x,v,Je,G,bo,Oa,Ih,or,Wl){"use strict";var Jx=Object.defineProperty;var Nh=_=>{throw TypeError(_)};var Zx=(_,x,v)=>x in _?Jx(_,x,{enumerable:!0,configurable:!0,writable:!0,value:v}):_[x]=v;var Yt=(_,x,v)=>Zx(_,typeof x!="symbol"?x+"":x,v),kh=(_,x,v)=>x.has(_)||Nh("Cannot "+v);var rr=(_,x,v)=>(kh(_,x,"read from private field"),v?v.call(_):x.get(_)),La=(_,x,v)=>x.has(_)?Nh("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(_):x.set(_,v),hn=(_,x,v,Je)=>(kh(_,x,"write to private field"),Je?Je.call(_,v):x.set(_,v),v);var Qn,In,xn;function Gl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=Gl(x),ar=Gl(Je);function Yl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Yl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Y(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Yl(e))&&(r&&(r+=" "),r+=t);return r}const xh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ft=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=xh[n[e]&63];return t};function Sn(e){return x.useRef(e||ft())}function bt(e,t){const n=Sn(e),r=x.useRef(`${n.current}_ctrl`);return x.useEffect(()=>{t&&(t.id=r.current,t.update())},[t]),{wrapperId:n.current||void 0,controlId:r.current}}var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mh="[object Object]";function _h(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function Lh(e,t){return function(n){return e(t(n))}}var Oh=Function.prototype,Ul=Object.prototype,zl=Oh.toString,Ph=Ul.hasOwnProperty,Rh=zl.call(Object),Bh=Ul.toString,Ah=Lh(Object.getPrototypeOf,Object);function Fh(e){return!!e&&typeof e=="object"}function Vh(e){if(!Fh(e)||Bh.call(e)!=Mh||_h(e))return!1;var t=Ah(e);if(t===null)return!0;var n=Ph.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&zl.call(n)==Rh}var $h=Vh;const jl=Pa($h),Et=new Set,sr=new Set,zt=new Set,vo=new Set;function ql(e){Et.has(e)||zt.has(e)||vo.has(e)||sr.add(e)}function Jl(e){Et.has(e)||zt.has(e)||sr.has(e)||vo.add(e)}const et=ar.default||ar,ir="MM/DD/YYYY",Kh="MM/DD/YYYY hh:mm A",Hh="MM/DD/YYYY HH:mm",Wh="hh:mm A",Gh="HH:mm",Yh=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,_r=Symbol("Date Parse Error");function lr(e){return et.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const Q=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=et(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=Yh.exec(e);if(n){const[,r,a,s]=n;return Object.freeze({year:Number(s),month:Number(r),date:Number(a)})}}return Object.freeze({[_r]:!0,year:void 0,month:void 0,date:void 0})}return Object.freeze({year:e.year(),month:e.month()+1,date:e.date()})},createMomentFrom(e,t){if(!e)return null;let n=null;return typeof e=="string"?t?n=et(e,t,!0):n=et(e):et.isMoment(e)?n=e:n=Q.toMoment(e),n!==null&&et.isMoment(n)&&n.isValid()?n:Object.freeze({[_r]:!0,year:void 0,month:void 0,date:void 0})},getRangeSeparator(e){return e!=null&&e.includes("-")?"/":"-"},createRangeFrom(e,t){if(!e)return null;if(t){const n=Q.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(a=>Q.createFrom(a,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>Q.createFrom(n))},isValid(e){var t;return e?et.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=Q.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return Q.isValid(e)?e:null},toMoment(e){return e?et.isMoment(e)?e:et({...e,month:e.month-1}):null},toString(e,t){const n=Q.toMoment(e);return n&&n.isValid()?n.format(t||ir):""},toStringRange(e,t){if(!e)return"";const n=Q.getRangeSeparator(t);return e.slice(0,2).map(r=>Q.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&et.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${Gh}`):e.format(`${n} ${Wh}`):t?e.format(Hh):e.format(Kh):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=Q.getRangeSeparator(n);return e.map(a=>Q.toDateTimeString(a,t,n)).join(r)},create(){const e=new Date;return Object.freeze({year:e.getFullYear(),month:e.getMonth()+1,date:e.getDate()})},isSameDate(e,t){return e&&t&&e.year===t.year&&e.month===t.month&&e.date===t.date},isSameMonth(e,t){return e&&t&&e.year===t.year&&e.month===t.month},isAfter(e,t){return!e||!t?null:lr(e)>lr(t)},isBefore(e,t){return!e||!t?null:lr(e)<lr(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const r=lr(e),[a,s]=t.map(lr);return a&&s&&(n&&r>=a&&r<=s||!n&&r>a&&r<s)},prevMonth(e){return Object.freeze({year:e.month===1?e.year-1:e.year,month:e.month-1||12,date:e.date})},nextMonth(e){return Object.freeze({year:e.month===12?e.year+1:e.year,month:e.month+1>12?1:e.month+1,date:e.date})},createRangeFromPreset(e,t){if(typeof e.definition=="function")return e.definition();const n=et(),r=n.clone().subtract(et.duration(e.definition));return[Q.createFrom(r,t),Q.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();let t;e.definition==="P0D"?t=et().startOf("day"):t=et().subtract(et.duration(e.definition));const n=et().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n){return e&&et.isMoment(e)&&e.isValid()?Q.toDateTimeString(e,t,n).split(" "):["",t?"00:00":"12:00",t?void 0:"AM"]},getCurrentMoment(){return et()},validateTimeString(e,t=!1){if(!e)return!0;const n=e.split(":"),r=n[0]||"0",a=n[1]||"0",s=Number.isNaN(Number(r))?NaN:parseInt(r,10),l=Number.isNaN(Number(a))?NaN:parseInt(a,10),c=n.length<=2&&r.length<=2&&a.length<=2;return t?c&&s>=0&&s<=23&&l>=0&&l<=59:c&&(!Number.isNaN(s)&&r.length===1||s>=1)&&s<=12&&l>=0&&l<=59},padIncompleteTimeString(e,t=!1){if(!e)return"";const n=e.split(":"),r=parseInt(n[0]||"0",10),a=parseInt(n[1]||"0",10);if(t){const s=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}else{const s=r===0?"12":r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}}}),Ra=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],Ba=["00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"];let yo=ir;function Zl(e){yo=e}const Lr=function(t){if(Array.isArray(t)){const n=Lr(t[0]),r=Lr(t[1]);return n||r}if(t&&t.hasOwnProperty("year")){if(t[_r])return{dateFormat:yo};if(!Q.isValid(t))return{dateValidity:!0}}return null};Et.add("dateFormat"),Et.add("dateValidity");const Xl=function(t){if(Array.isArray(t)){const n=Lr(t);if(n)return n;if(t&&Q.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};Et.add("dateRangeOrder");const Ql=function({minDate:t,maxDate:n}){function r(a){const s=Q.isBefore(a,t),l=Q.isAfter(a,n),c={minExceeded:s?Q.toString(t,yo):null,maxExceeded:l?Q.toString(n,yo):null};return s||l?{dateConstraint:c}:null}return function(s){if(!s)return null;if(Array.isArray(s)){const l=r(s[0]),c=r(s[1]);return l||c}return s.hasOwnProperty("year")?r(s):null}};Et.add("dateConstraint");const Uh=Object.freeze(Object.defineProperty({__proto__:null,date:Lr,dateConstraint:Ql,dateRange:Xl,setDateFormat:Zl},Symbol.toStringTag,{value:"Module"}));function en(e,t){for(const n of[].concat(e)){const r=t(n);if(r)return r}return null}const zh=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>en(r,n)};Et.add("min");const jh=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>en(r,n)};sr.add("max");const qh=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};sr.add("required");const Jh=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>en(r,n)};Et.add("minLength");const Zh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};Et.add("minLengthArray");const Xh=function(t){function n(r){return r===void 0||r.toString().length<=t?null:{maxLength:t}}return r=>en(r,n)};zt.add("maxLength");const Qh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};Et.add("maxLengthArray");const eS=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(a){return n.test(a)?null:{pattern:t}}return a=>en(a,r)};Et.add("pattern");const tS=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return en(e,t)};zt.add("alpha");const nS=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return en(e,t)};zt.add("numeric");const rS=function(e){function t(n){return/^-?[0-9,. ]*$/.test(n)?null:{positiveOrNegativeNumber:!0}}return en(e,t)};zt.add("positiveOrNegativeNumber");const oS=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return en(e,t)};zt.add("nonNumeric");const To=Object.freeze({...Uh,min:zh,max:jh,required:qh,minLength:Jh,minLengthArray:Zh,maxLength:Xh,maxLengthArray:Qh,pattern:eS,alpha:tS,numeric:nS,nonNumeric:oS,positiveOrNegativeNumber:rS,OnBlurErrorKeys:Et});function Eo(e,t=[]){const n=t.reduce((r,a)=>Object.assign(r,a(e)||{}),{});return Object.keys(n).length?n:null}var jt=(e=>(e[e.ON_CHANGE=0]="ON_CHANGE",e[e.ON_BLUR=1]="ON_BLUR",e[e.ON_SUBMIT=2]="ON_SUBMIT",e))(jt||{});function aS(e,t={},n=[]){for(const[r,a]of Object.entries(t))a===0?ql(r):a===2&&Jl(r);return o.useCallback(e,n)}class Rn{constructor(t,n){Yt(this,"validators",[]);La(this,Qn,null);La(this,In,null);La(this,xn,null);Yt(this,"preventativeErrors",[]);Yt(this,"submitted",!1);this.path=t,this.update=n}get errors(){return rr(this,Qn)===null&&rr(this,In)===null&&rr(this,xn)===null?null:{...rr(this,Qn)??{},...rr(this,In)??{},...rr(this,xn)??{}}}setValidators(t){return this.update(this.path,null,void 0,t),this}validate(t,n,r=!1){if(this.validators&&this.validators.length>0){const a=Eo(t,this.validators);let s={onSubmit:{},onChange:{},onBlur:{}};a&&(s=Object.keys(a).reduce((l,c)=>(vo.has(c)?l.onSubmit[c]=a[c]:sr.has(c)?l.onChange[c]=a[c]:l.onBlur[c]=a[c],l),s)),(typeof n>"u"||n===jt.ON_CHANGE)&&hn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),(typeof n>"u"||n===jt.ON_BLUR)&&hn(this,xn,Object.keys(s.onBlur).length===0?null:s.onBlur),(typeof n>"u"||n===jt.ON_SUBMIT)&&(hn(this,Qn,Object.keys(s.onSubmit).length===0?null:s.onSubmit),hn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),hn(this,xn,Object.keys(s.onBlur).length===0?null:s.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(hn(this,Qn,null),hn(this,xn,null),hn(this,In,null),r||this.update());return this}isValid(){return!this.errors||this.isPristine()}hasErrors(){return!!this.errors}isVisibilyInvalid(){return!this.isValid()}hasError(t){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,t)}hasPreventativeError(t){return this.preventativeErrors.includes(t)}hasPreventativeErrors(){return this.preventativeErrors.length>0}isRequired(){return this.validators&&this.validators.indexOf(To.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}Qn=new WeakMap,In=new WeakMap,xn=new WeakMap;class Or extends Rn{constructor(){super(...arguments);Yt(this,"id",ft());Yt(this,"focused",!1);Yt(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=Eo(n,this.validators);if(r&&Object.keys(r).filter(s=>zt.has(s)).length>0){this.preventativeErrors=Object.keys(r);return}}this.update(this.path,n)}isPristine(){return this.pristine}markAsPristine(){return this.pristine=!0,this.update(),this}markAsDirty(){return this.pristine=!1,this.update(),this}isFocused(){return this.focused}markAsFocused(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this}markAsBlurred(){return this.update(this.path,null,!0),this.onBlur&&this.onBlur(),this.preventativeErrors=[],this}markAsSubmitted(){return this.submitted=!0,this.update(this.path,null,!1,void 0,!0),this}}class Bn extends Or{constructor(n,r,a){super(a?r:n,a||r);Yt(this,"fields");a&&this.inferMembers(n)}isFocused(){return super.isFocused()||this.rollup("isFocused")}isValid(){return super.isValid()&&this.rollup("isValid")}hasErrors(){return super.hasErrors()||Object.keys(this.fields).some(n=>this.fields[n].hasErrors())}contentsAreValid(){return this.rollup("isValid")&&this.rollup("contentsAreValid")}isPristine(){return super.isPristine()&&this.rollup("isPristine")}markAsPristine(){super.markAsPristine();for(const n of Object.keys(this.fields))this.fields[n].markAsPristine();return this}markAsDirty(){super.markAsDirty();for(const n of Object.keys(this.fields))this.fields[n].markAsDirty();return this}markAsBlurred(){super.markAsBlurred();for(const n of Object.keys(this.fields))this.fields[n].markAsBlurred();return this}markAsSubmitted(){super.markAsSubmitted();for(const n of Object.keys(this.fields))this.fields[n].markAsSubmitted();return this}inferSpsControl(n,r){return wo(n,[...this.path,r],this.update)}rollup(n){return Object.keys(this.fields).reduce((r,a)=>r&&(!this.fields[a][n]||this.fields[a][n]()),!0)}}class ec extends Bn{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class tc extends Bn{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function wo(e,t,n){return e instanceof Rn?(e.path=t,e.update=n,e):Array.isArray(e)?new tc(e,t,n):jl(e)?new ec(e,t,n):new Or(t,n)}function Pr(e,t){return t.length===0||!e?e:Pr(e.fields[t[0]],t.slice(1,t.length))}function Aa(e,t){if(t.length===0||!e)return[e];const n=t[0];if(t=t.slice(1,t.length),n==="*"){const r=Array.isArray(e.fields)?e.fields:Object.keys(e.fields).map(a=>e.fields[a]);return t.length===0?r:r.reduce((a,s)=>[...a,...Aa(s,t)],[])}return Aa(e.fields[n],t)}function Fa(e,t,n){for(const r of Object.keys(t)){const a=t[r];for(const s of Aa(e,r.split(".")))s&&a&&n(s,a)}}function Co(e,t,n,r=!1,a=!1){Fa(t,n,(s,l)=>{s.validators=typeof l=="function"?l(e):l,r&&s.validate(v.getPath(e,s.path),void 0,a)})}function Va(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((r,a)=>a===Number(n)?Va(r,t):r):jl(e)?Object.keys(e).reduce((r,a)=>Object.assign(r,{[a]:a===n?Va(e[a],t):e[a]}),{}):e}function sS(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function nc(e,t={}){sS(e);const[,n]=x.useState({}),r=x.useRef(!1);r.current=!1;const a=x.useRef(t),s=x.useCallback(h=>{var T,C;const S=u.current;let y;if(h)if(h.path)if(h.markAsBlurred){const E=Pr(S.formMeta,h.path);if(E){E.focused=!1;const N=v.getPath(S.formValue,h.path);E.validate(N,jt.ON_BLUR)}}else if(h.newValidators){if(a.current){const E=h.path.join(".");a.current={...a.current,[E]:h.newValidators},Co(S.formValue,S.formMeta,a.current,!0)}}else if(h.markAsSubmitted){const E=Pr(S.formMeta,h.path);if(E){E.submitted=!0;const N=v.getPath(S.formValue,h.path);E.validate(N,jt.ON_SUBMIT)}}else y=Va(S.formValue,h.path),v.setPath(y,h.path,h.value);else y=h.value;if((T=h==null?void 0:h.updateFormOptions)!=null&&T.validators&&(a.current={...a.current,...h.updateFormOptions.validators},Co(S.formValue,S.formMeta,a.current,((C=h.updateFormOptions)==null?void 0:C.runValidators)??!0)),y){S.formMeta.submitted=!1,v.deepFreeze(y);const E=v.diff(S.formValue,y);for(const{type:M,key:I,parentPath:k,objects:[,V]}of E){const A=Pr(S.formMeta,k);if(typeof I!="symbol"&&A){let w;switch(M){case v.DiffChange.ADDITION:A.fields[I]=wo(V[I],[...k,I],c);break;case v.DiffChange.DELETION:Array.isArray(A.fields)?A.fields[I]=void 0:delete A.fields[I];break;case v.DiffChange.ALTERATION:w=wo(V[I],[...k,I],c),(w instanceof Bn&&!(A.fields[I]instanceof Bn)||!(w instanceof Bn)&&A.fields[I]instanceof Bn)&&(w.pristine=!1,A.fields[I]=w);break}}}const N=new Set;if(E.filter(M=>M.type===v.DiffChange.DELETION).reduce((M,I)=>(M.has(I.parentPath)||M.add(I.parentPath),M),N),Array.from(N).forEach(M=>{const I=Pr(S.formMeta,M);Array.isArray(I.fields)&&(I.fields=I.fields.filter(k=>k!==void 0))}),a.current){Co(y,S.formMeta,a.current);const M=new Set;t&&Fa(S.formMeta,t,(I,k)=>{typeof k=="function"&&(I.validate(v.getPath(y,I.path)),M.add(I))});for(const{type:I,key:k,parentPath:V,objects:[,A]}of E)if(typeof k!="symbol"){let w=S.formMeta,P=y;if(w){for(const O of V)w=w.fields[O],P=P[O],M.has(w)||w.validate(P,jt.ON_CHANGE);if(I===v.DiffChange.ADDITION||I===v.DiffChange.ALTERATION){const O=w.fields[k];if(!M.has(O)&&(w.fields[k].validate(A[k],jt.ON_CHANGE),I===v.DiffChange.ADDITION&&O.fields))for(const[$,z]of Object.entries(O.fields))z.validate(A[k][$],jt.ON_CHANGE)}}}}}u.current={...S,formValue:y||S.formValue},r.current||n({})},[]),l=x.useCallback((h,S)=>{h||S?s({value:h,updateFormOptions:S}):s()},[s]),c=x.useCallback((h,S,y=!1,T,C=!1)=>{h?s({path:h,value:S,markAsBlurred:y,newValidators:T,markAsSubmitted:C}):l()},[s,l]),p=x.useMemo(()=>{v.deepFreeze(e);const h=wo(e,[],c);return t&&Co(e,h,t,!1,!0),h},[]),m=x.useCallback(()=>(u.current.formMeta.markAsDirty(),a.current&&Fa(u.current.formMeta,a.current,(h,S)=>{(typeof S=="function"||Array.isArray(S))&&h.validate(v.getPath(u.current.formValue,h.path))}),u.current.formMeta.isValid()),[]),f=x.useCallback(()=>u.current.formValue,[]),u=x.useRef({formValue:e,formMeta:p,updateForm:l,validateForm:m,getCurrentFormValue:f});return u.current}const at=o.forwardRef((e,t)=>{const{className:n,children:r,focusInputOnClick:a,formControl:s,formMeta:l,inputRef:c,onClick:p,...m}=e,f=o.useRef(),h=c||(t||f);function S(){h&&h!==t&&h.current&&h.current.focus()}function y(){h&&h!==t&&h.current&&l&&l instanceof Or&&l.markAsFocused()}function T(){h&&h!==t&&h.current&&l&&l instanceof Or&&l.markAsBlurred()}const C=Y("sps-form-group",(s&&s.isRequired()||l&&l.isRequired())&&"sps-form-group--required",(s&&!s.isValid()||l&&l.isVisibilyInvalid())&&"sps-form-group--error",l&&l.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function E(N){a&&S(),p&&p(N)}return o.useEffect(()=>{function N(M){M.target.classList.contains("sps-form-control__clear-btn")&&M.preventDefault()}return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),o.createElement("div",{...m,className:C,ref:t,tabIndex:-1,onClick:E,onFocus:y,onBlur:T},r)});Object.assign(at,{displayName:"SpsFormComponentWrapper"});function rc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function oc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function $a(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return oc(n.overflowY,t)||oc(n.overflowX,t)||function(r){var a=function(s){if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!a&&(a.clientHeight<r.scrollHeight||a.clientWidth<r.scrollWidth)}(e)}return!1}function Do(e,t,n,r,a,s,l,c){return s<e&&l>t||s>e&&l<t?0:s<=e&&c<=n||l>=t&&c>=n?s-e-r:l>t&&c<n||s<e&&c>n?l-t+a:0}var ac=function(e,t){var n=window,r=t.scrollMode,a=t.block,s=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,p=typeof l=="function"?l:function(ke){return ke!==l};if(!rc(e))throw new TypeError("Invalid target");for(var m,f,u=document.scrollingElement||document.documentElement,h=[],S=e;rc(S)&&p(S);){if((S=(f=(m=S).parentElement)==null?m.getRootNode().host||null:f)===u){h.push(S);break}S!=null&&S===document.body&&$a(S)&&!$a(document.documentElement)||S!=null&&$a(S,c)&&h.push(S)}for(var y=n.visualViewport?n.visualViewport.width:innerWidth,T=n.visualViewport?n.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,E=window.scrollY||pageYOffset,N=e.getBoundingClientRect(),M=N.height,I=N.width,k=N.top,V=N.right,A=N.bottom,w=N.left,P=a==="start"||a==="nearest"?k:a==="end"?A:k+M/2,O=s==="center"?w+I/2:s==="end"?V:w,$=[],z=0;z<h.length;z++){var L=h[z],J=L.getBoundingClientRect(),B=J.height,te=J.width,H=J.top,q=J.right,oe=J.bottom,W=J.left;if(r==="if-needed"&&k>=0&&w>=0&&A<=T&&V<=y&&k>=H&&A<=oe&&w>=W&&V<=q)return $;var j=getComputedStyle(L),ne=parseInt(j.borderLeftWidth,10),re=parseInt(j.borderTopWidth,10),U=parseInt(j.borderRightWidth,10),R=parseInt(j.borderBottomWidth,10),Z=0,ae=0,ee="offsetWidth"in L?L.offsetWidth-L.clientWidth-ne-U:0,de="offsetHeight"in L?L.offsetHeight-L.clientHeight-re-R:0,ie="offsetWidth"in L?L.offsetWidth===0?0:te/L.offsetWidth:0,le="offsetHeight"in L?L.offsetHeight===0?0:B/L.offsetHeight:0;if(u===L)Z=a==="start"?P:a==="end"?P-T:a==="nearest"?Do(E,E+T,T,re,R,E+P,E+P+M,M):P-T/2,ae=s==="start"?O:s==="center"?O-y/2:s==="end"?O-y:Do(C,C+y,y,ne,U,C+O,C+O+I,I),Z=Math.max(0,Z+E),ae=Math.max(0,ae+C);else{Z=a==="start"?P-H-re:a==="end"?P-oe+R+de:a==="nearest"?Do(H,oe,B,re,R+de,P,P+M,M):P-(H+B/2)+de/2,ae=s==="start"?O-W-ne:s==="center"?O-(W+te/2)+ee/2:s==="end"?O-q+U+ee:Do(W,q,te,ne,U+ee,O,O+I,I);var se=L.scrollLeft,Ne=L.scrollTop;P+=Ne-(Z=Math.max(0,Math.min(Ne+Z/le,L.scrollHeight-B/le+de))),O+=se-(ae=Math.max(0,Math.min(se+ae/ie,L.scrollWidth-te/ie+ee)))}$.push({el:L,top:Z,left:ae})}return $};function sc(e){return e===Object(e)&&Object.keys(e).length!==0}function iS(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var a=r.el,s=r.top,l=r.left;a.scroll&&n?a.scroll({top:s,left:l,behavior:t}):(a.scrollTop=s,a.scrollLeft=l)})}function lS(e){return e===!1?{block:"end",inline:"nearest"}:sc(e)?e:{block:"start",inline:"nearest"}}function No(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(sc(t)&&typeof t.behavior=="function")return t.behavior(n?ac(e,t):[]);if(n){var r=lS(t);return iS(ac(e,r),r.behavior)}}const Ka=Object.freeze(Object.defineProperty({__proto__:null,default:No},Symbol.toStringTag,{value:"Module"})),He=o.createContext(G.noI18nI18n),cS={alt:"string",size:"SpinnerSize",title:"string"};function Ha(e){const{alt:t,className:n,size:r=G.SpinnerSize.MEDIUM,"data-testid":a,title:s,unsafelyReplaceClassName:l,...c}=e,{t:p}=o.useContext(He),m=t||s||p("design-system:spinner.defaultAltText"),f=Y(l||"sps-spinner",`sps-spinner--${r}`,n);return o.createElement("i",{className:f,"data-testid":a,title:m,...c})}Object.assign(Ha,{props:cS,displayName:"SpsSpinner"});const dS=60;function ko(e){return typeof e>"u"?"inherit":`${e}px`}function Wa(e){switch(e){case G.Position.TOP_LEFT:return G.Position.BOTTOM_LEFT;case G.Position.TOP_MIDDLE:return G.Position.BOTTOM_MIDDLE;case G.Position.TOP_RIGHT:return G.Position.BOTTOM_RIGHT;case G.Position.RIGHT_TOP:return G.Position.LEFT_TOP;case G.Position.RIGHT_MIDDLE:return G.Position.LEFT_MIDDLE;case G.Position.RIGHT_BOTTOM:return G.Position.LEFT_BOTTOM;case G.Position.BOTTOM_RIGHT:return G.Position.TOP_RIGHT;case G.Position.BOTTOM_MIDDLE:return G.Position.TOP_MIDDLE;case G.Position.BOTTOM_LEFT:return G.Position.TOP_LEFT;case G.Position.LEFT_BOTTOM:return G.Position.RIGHT_BOTTOM;case G.Position.LEFT_MIDDLE:return G.Position.RIGHT_MIDDLE;case G.Position.LEFT_TOP:return G.Position.RIGHT_TOP}}function pS(e,t,n,r,a,s,l,c){const p=l&&l.current,m=p?p.scrollTop:window.pageYOffset,f=c?0:m,u=p?p.scrollLeft:window.pageXOffset,h=c?0:u,[S,y]=e.split(" ");let T,C,E,N;switch(S){case"top":E=t.height-n.top-f-s[0];break;case"left":C=t.width-n.left-h-s[0];break;case"right":N=n.right+h-s[0];break;case"bottom":T=n.bottom+f-s[0];break;default:throw new Error(`Invalid position ${e}`)}switch(y){case"left":N=n.left+h+s[1];break;case"top":T=n.top+f+s[1];break;case"middle":S==="top"||S==="bottom"?N=n.left+h+n.width/2-a/2+s[1]:(S==="left"||S==="right")&&(T=n.top+f+n.height/2-r.height/2+s[1]);break;case"bottom":E=t.height-n.bottom-f+s[1];break;case"right":C=t.width-n.right-h+s[1];break;default:throw new Error(`Invalid position ${e}`)}return[T,C,E,N]}function An(e,t,n,{altPosition:r,setMinWidth:a=!1,setWidth:s=!1,parentElementRef:l,fixed:c=!1,offsets:p=[0,0]}){if(e.current&&t.current){const m=e.current.getBoundingClientRect(),f=t.current.getBoundingClientRect(),u=Math.max(document.documentElement.clientHeight,window.innerHeight||0),h=document.documentElement.getBoundingClientRect().width;let y=((l==null?void 0:l.current)??document.documentElement).getBoundingClientRect();c&&(y={x:0,y:0,width:h,height:u,top:0,left:0,bottom:u,right:h,toJSON(){return{width:h,height:u,top:0,left:0,bottom:u,right:h}}});const[T,C]=n.split(" ");let E=n;if(r&&(T==="top"&&f.top-m.height<dS||T==="right"&&f.right+m.width>h||T==="bottom"&&f.bottom+m.height>u||T==="left"&&f.left-m.width<0)&&(E=r),C==="left"&&f.left+m.width+((p==null?void 0:p[1])??0)>document.documentElement.getBoundingClientRect().right)switch(T){case"bottom":E=G.Position.BOTTOM_RIGHT;break;case"top":E=G.Position.TOP_RIGHT;break}const N=a?Math.max(f.width,m.width):m.width,M=s?f.width:N,[I,k,V,A]=pS(E,y,f,m,M,p,l,c),w={top:ko(I),right:ko(k),bottom:ko(V),left:ko(A)};return c&&(w.position="fixed",w.zIndex=G.ZStratum.BAR),a&&(w.minWidth=`${f.width}px`),s&&(w.width=`${f.width}px`),[w,E===r]}return[{},!1]}const kt=x.createContext(null);function cr(e,t=[]){const n=x.useContext(kt);return x.useMemo(()=>r=>{const s=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let l=null,c=s.lastElementChild;for(;c&&c!==s.firstElementChild;){if(c.hasAttribute("data-portalid")&&c.getAttribute("data-portalid")===e){l=c;break}c=c.previousElementSibling}if(l)s.contains(l)||s.appendChild(l);else{l=document.createElement("div"),l.setAttribute("data-portalid",e);for(const p of t)l.classList.add(p);s.appendChild(l)}return bo.createPortal(r,l)},[n])}const Ga=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","1","2","3","4","5","6","7","8","9","0"];async function ic(e,t,n,r,a,s){const l=typeof e.options=="function"?e.options(t.value):e.options||[],c=l instanceof Promise,p=u=>u.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:c}),s.current=c?l:null;const m=c?await l||[]:l||[];if(c&&s.current!==l)return;let f=Array.from(m).filter(Boolean).map(u=>new G.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&f.unshift(new G.SpsOptionListOption(null,{text:e.nullOption})),t.value&&!e.disableDefaultOptionsFiltering){const u=p(t.value);n({replacementPattern:new RegExp(`(${u})`,"ig")}),f=f.filter(h=>{const S=new RegExp(u,"i"),y=p(h.text);return e.filterByTextAndCaptionKey?S.test(y)||S.test(p(h.caption)):S.test(y)})}else n({replacementPattern:null});if(e.disabledOptions)for(const u of f)e.disabledOptions.includes(u.value)&&(u.disabled=!0);r(Object.freeze(f)),e.onOptionListChanged&&e.onOptionListChanged(f.length),a(f.some(u=>u.value&&!!u.value.icon)),n({pending:!1})}function uS(e,t,n){const[r,a]=o.useState(Object.freeze([])),[s,l]=o.useState(!1),c=o.useRef(null),p=o.useRef(e.options);(typeof e.options!="function"||e.disableOptionsMemoization)&&(p.current=e.options);const m=o.useMemo(()=>typeof p.current=="function"?v.debounce(ic,typeof e.searchDebounce<"u"?e.searchDebounce:500):ic,[p.current,e.disabledOptions]);return o.useEffect(()=>{m(e,t,n,a,l,c)},[p.current,t.value,e.disabledOptions]),[r,s]}class gn{constructor(t,n){Yt(this,"nativeEvent");Yt(this,"currentTarget");Yt(this,"isPgStoppedInternal",!1);this.target=t,this.currentTarget=t,this.nativeEvent=new CustomEvent("change",n),Object.defineProperty(this.nativeEvent,"target",{value:t,writable:!1,configurable:!1,enumerable:!0})}get bubbles(){return this.nativeEvent.bubbles}get cancelable(){return this.nativeEvent.cancelable}get defaultPrevented(){return this.nativeEvent.defaultPrevented}get eventPhase(){return this.nativeEvent.eventPhase}get isTrusted(){return this.nativeEvent.isTrusted}get timeStamp(){return this.nativeEvent.timeStamp}get type(){return this.nativeEvent.type}preventDefault(){this.nativeEvent.preventDefault()}isDefaultPrevented(){return this.defaultPrevented}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPgStoppedInternal=!0}isPropagationStopped(){return this.isPgStoppedInternal}persist(){throw new Error("This is not a real React ChangeEvent. React does not permit the creation of SyntheticEvents in userland.")}}function mS(e,t){return{...e,...t}}function qt(e){return x.useReducer(mS,e)}function fS({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:a="Search…",searchInputRef:s}){const[l,c]=qt({isAsync:typeof t=="function",pending:!1,value:r,replacementPattern:null}),p=o.useCallback(S=>{c({value:S.target.value}),n&&n(S)},[n]),m=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),S.stopPropagation()},[]),f=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),c({value:""}),s!=null&&s.current&&(n&&n(new gn(s.current)),s.current.focus())},[n]),u=S=>{S&&(["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(S.key)||S.stopPropagation())};return o.useEffect(()=>{c({value:r})},[r]),[l.isAsync&&!e?o.createElement("div",{className:"sps-option-list__search sps-form-group sps-text-input"},o.createElement("div",{className:"sps-form-control"},!l.value&&o.createElement("i",{className:"sps-icon sps-icon-filter sps-text-input__icon"}),o.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:a,ref:s,value:l.value,onChange:p,onClick:m,onKeyDown:u}),l.value&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:f}))):o.createElement(o.Fragment,null),l,c]}const hS=No||Ka,SS=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"];function gS(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function lc(e,t,n){return typeof n.value=="function"&&n.disabled?!0:t?!!(e!=null&&e.find(r=>{var a;return r[t]&&r[t]===((a=n==null?void 0:n.value)==null?void 0:a[t])})):!1}const Rr=o.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:a,options:s,tall:l,textKey:c,valueKey:p,zeroState:m,hideInlineSearch:f,onSearchChange:u,search:h,searchDebounce:S,searchPlaceholder:y,onSpecialActionSelect:T,attachTo:C,className:E,conformWidth:N,id:M,ignoreWidthStyles:I,isOpen:k,keepOpen:V,keyDown:A,nullOption:w,onOptionListChanged:P,onOptionSelected:O,onPositionFlip:$,onSelfToggle:z,optionRole:L,positionOverride:J,selectedOption:B,specialAction:te,unsafelyReplaceClassName:H,loading:q,filterByTextAndCaptionKey:oe,maxHeightPx:W,maxHeightRem:j,disableOptionsMemoization:ne,disableDefaultOptionsFiltering:re,"data-testid":U,typeaheadEvent:R,...Z}=e,ae=o.useMemo(()=>te?new G.SpsOptionListOption(te,{textKey:"label",captionKey:"caption"}):null,[te]),[ee,de]=o.useState(-1),[ie,le]=o.useState(k),se=t||o.useRef(null),Ne=o.useRef(null),ke=o.useRef(null),it=cr("sps-option-list-portal"),lt=o.useContext(kt),[ut,ct]=J||[G.Position.BOTTOM_LEFT,G.Position.TOP_LEFT],[[Pt,je],fe]=o.useState([{},!1]),Fe=o.useRef(null),[ve,Le,ot]=fS({...e,searchInputRef:Fe}),[we,Ht]=uS(e,Le,ot);o.useEffect(()=>{R&&pt(R)},[R]),o.useEffect(()=>{fe(ie?An(se,C,ut,{altPosition:ct,setMinWidth:!I,setWidth:!I&&N,...lt}):[{},!1])},[ie,ut,ct,we]),o.useEffect(()=>{let be;return ie&&(be=()=>{ie&&fe(An(se,C,ut,{altPosition:ct,setMinWidth:!I,setWidth:!I&&N,...lt}))},document.addEventListener("scroll",be)),()=>{be&&document.removeEventListener("scroll",be)}},[ie]),o.useEffect(()=>{de(-1)},[Le]);const Mn=Y(H||"sps-option-list","z-stratum-dropdown",ie&&"sps-option-list--open",Le.isAsync&&"sps-option-list--searchable",je&&"sps-option-list--opens-upward",te&&te.label&&"sps-option-list--has-special-action",E),ue=Y(H||"sps-option-list__options",l&&"sps-option-list__options--tall"),Se=o.useCallback(()=>{ie||(le(!0),Fe.current&&Fe.current.focus(),de(-1),z&&z(!0))},[ie,z]),Oe=o.useCallback(()=>{ie&&(le(!1),de(-1),z&&z(!1))},[ie,z]),Ze=o.useCallback((be,Te)=>{Te||be&&!be.disabled&&(typeof be.value=="function"?(be.value(),T&&T()):typeof O=="function"&&O(be.value),V||Oe())},[O,Oe]),Ie=o.useCallback((be,Te,Xe)=>{be.stopPropagation(),Ze(Te,Xe)},[Ze]),dt=o.useRef(a||[]);dt.current=a||[];const Tt=o.useCallback(be=>{switch(be.key){case"Tab":case"Escape":Oe();break;case"Enter":if(ee>-1){const Te=we[ee]||ae;be.preventDefault();const Xe=!!Te&&lc(dt.current,r||"",Te);!Xe&&Te&&typeof O=="function"&&typeof Te.value=="function"?Te.value():Te&&Ze(Te,Xe)}break;case"Up":case"ArrowUp":{let Te=ee;je?ee<=-1?Te=we.length-1:ee===0?te&&(Te=we.length):ee<we.length&&(Te=ee-1):ee>-1&&(Te=ee-1),Te!==ee&&(be.preventDefault(),de(Te));break}case"Down":case"ArrowDown":{Se();let Te=ee;je?ee!==-1&&(ee>=we.length?Te=0:ee===we.length-1?Te=-1:Te=ee+1):ee<we.length-1+ +!!te&&(Te=ee+1),Te!==ee&&(be.preventDefault(),de(Te));break}default:Se()}},[Oe,Se,ee,Ze,O,je,we]),Ae=o.useCallback(be=>{Se();const Te=we.findIndex(Xe=>{if(Xe.textKey){const Rt=Xe.textKey;return Xe.value[Rt].toLowerCase().charAt([0])===be.key.toLocaleLowerCase()}return Xe.value.toString().toLowerCase().charAt([0])===be.key.toLocaleLowerCase()});Te>-1&&de(Te)},[we]),pt=o.useCallback(be=>{be&&(SS.includes(be.key)?Tt(be):Ga.includes(be.key)&&!f&&Ae(be))},[Oe,Se,ee,Ze,O,je,we]);o.useEffect(()=>{if(lt!==null&&document.getElementsByClassName("sps-modal__body").length>0){const be=()=>{z&&z(!1)},Te=document.getElementsByClassName("sps-modal__body")[0];return Te.addEventListener("scroll",be),()=>{Te.removeEventListener("scroll",be)}}},[]),o.useEffect(()=>{ie&&ke.current&&hS(ke.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[ee,ie]),o.useEffect(()=>{le(k),k?Fe.current&&Fe.current.focus():de(-1)},[k]),o.useEffect(()=>{A&&pt(A)},[A]),o.useEffect(()=>{!ie&&Ne.current&&(ot({value:""}),Ne.current.scrollTop=0),ie&&$&&$(je)},[ie]);const _n=W?W/16:j,Xt=_n?{maxHeight:`${_n}rem`}:{};function va(be,Te){return Te?o.createElement(o.Fragment,null,be.split(Te).map((Xe,Rt)=>Te.test(Xe)?o.createElement("u",{key:Rt},Xe):o.createElement(o.Fragment,{key:Rt},Xe))):o.createElement(o.Fragment,null,be)}return it(o.createElement("div",{className:Mn,id:M,"aria-activedescendant":ee>-1?`${M}-option-${ee}`:"",tabIndex:-1,ref:se,style:Pt,onMouseLeave:()=>de(-1),"data-testid":U,...Z},ve,o.createElement("div",{className:ue,ref:Ne,"data-testid":`${U}-options`,style:Xt},!q&&!Le.pending&&m&&we.length===0&&o.createElement("div",{className:"sps-option-list__zero-state"},m),(q||Le.pending)&&o.createElement("div",{className:"sps-option-list__loading"},o.createElement(Ha,null)),!q&&!Le.pending&&we.map((be,Te)=>{const Xe=`${M}-option-${Te}`,Rt=gS(be.value,B,r),me=lc(dt.current,r||"",be);return o.createElement("a",{key:Xe,id:Xe,role:L,"aria-selected":Rt,href:be.href,className:Y("sps-option-list__option",be.caption&&"sps-option-list__option--has-caption",be.disabled&&"sps-option-list__option--disabled",be.bold&&"sps-option-list__option--bold",(Rt||me)&&"sps-option-list__option--selected",ee===Te&&"sps-option-list__option--highlighted"),onClick:wl=>Ie(wl,be,me),onMouseOver:()=>de(Te),tabIndex:-1,ref:ee===Te?ke:null,"data-testid":`${U}-option-${Te}`},be.value&&be.value.icon&&o.createElement("i",{className:Y("sps-icon","sps-option-list__option-icon",`sps-icon-${String(be.value.icon)}`)}),(!be.value||!be.value.icon&&Ht)&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,va(be.text,Le.replacementPattern)),be.caption&&o.createElement("div",{className:"sps-option-list__option-caption"},o.createElement("span",null,va(be.caption,Le.replacementPattern))))})),ae&&(te==null?void 0:te.label)&&o.createElement("a",{className:Y("sps-option-list__option","sps-option-list__special-action",ee===we.length&&"sps-option-list__option--highlighted",te.disabled&&"sps-option-list__special-action--disabled"),href:ae.href,target:ae.href&&te.newTab?"_blank":"_self",onClick:be=>Ie(be,ae),onMouseOver:()=>de(we.length),"data-testid":`${U}-special-action`},te.icon&&o.createElement("i",{className:Y("sps-icon","sps-option-list__option-icon",`sps-icon-${String(te.icon)}`)}),!te.icon&&Ht&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,te.label))))});Object.assign(Rr,{displayName:"SpsOptionList"});function bS(e,t,n=[]){return o.useMemo(()=>{function r(a){return o.createElement(e,{...a,...t},a.children)}return r},n)}function vt(e){return typeof e=="function"?e():e}const cc=function({children:e,elements:t}){if(t.length===0)return o.createElement(o.Fragment,null,e);const[n,r]=Array.isArray(t[0])?t[0]:[t[0]];return o.createElement(n,{...r??{}},o.createElement(cc,{elements:t.slice(1)},e))},dc=function({children:e,providers:t=[],...n}){return o.createElement("div",{...n},o.createElement(cc,{elements:t},e))},vS=function({children:e,className:t,...n}){return o.createElement(dc,{className:`sps-app ${t}`,...n},e)};function It(e=[],t=[]){const n=Array.isArray(e)?v.flatten(e):[e],r=t.map(s=>Array.isArray(s)?s:[s]),a=new Array(r.length+1).fill(null).map(()=>[]);for(const s of n){let l=!1;for(let c=0;c<r.length;c+=1)for(const{type:p,props:m={}}of r[c])if(s.type===p&&Object.keys(m).every(u=>m[u]===s.props[u])){l=!0,a[c].push(s);break}l||a[a.length-1].push(s)}return a}function pc(e,t,n){const r=Object.entries(t).filter(([,s])=>typeof s!="string"&&s.deprecated).map(([s])=>s),a=r.map(s=>n[s]);o.useEffect(()=>{a.find(s=>typeof s<"u")&&console.warn(`The following prop(s) of ${e} are deprecated: ${r.join(", ")}`)},a)}function Ya(e,t){const n=x.useRef(!1);x.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Ua(e,t,n){const r=o.useRef(t(...n));o.useEffect(()=>(document.addEventListener(e,r.current,{capture:!0}),()=>document.removeEventListener(e,r.current)),[]),o.useEffect(()=>{document.removeEventListener(e,r.current),r.current=t(...n),document.addEventListener(e,r.current,{capture:!0})},n)}function uc(e,t,n){return function(a){var s,l;!((s=e.current)!=null&&s.contains(a.target))&&!((l=t.current)!=null&&l.contains(a.target))&&n()}}function dr(e,t,n){const r=o.useRef(!1),[a,s]=o.useState(!1),l=o.useCallback(()=>{r.current?r.current=!1:s(!0)},[]),c=o.useCallback((p=!1)=>{s(!1),r.current=p,n&&n()},[]);return Ua("mousedown",uc,[e,t,c]),Ua("pointerdown",uc,[e,t,c]),{showPopup:a,doShowPopup:l,doHidePopup:c}}const mc=e=>{const t=/(auto|scroll)/,n=(c,p)=>c.parentNode===null?p:n(c.parentNode,p.concat([c])),r=(c,p)=>getComputedStyle(c,null).getPropertyValue(p),a=c=>r(c,"overflow")+r(c,"overflow-y"),s=c=>t.test(a(c));return(c=>{if(!(c instanceof HTMLElement||c instanceof SVGElement))return;const p=n(c.parentNode,[]);for(let m=0;m<p.length;m+=1)if(s(p[m]))return p[m];return null})(e)};let za=0;function Io({isOpen:e,rootRef:t}){o.useLayoutEffect(()=>{let n,r,a;if(e&&t.current){za+=1,n=mc(t.current)||document.body,r=n===document.body?window.innerWidth-document.documentElement.clientWidth:n.offsetWidth-n.clientWidth,n.style.overflow="hidden";const s=window.getComputedStyle(n).paddingRight;if(n.style.paddingRight=s&&s!=="0px"?`calc(${s} + ${r}px)`:`${r}px`,n===document.body)if(a=document.getElementsByClassName("sps-navbar-container").item(0),a&&window.getComputedStyle(a).position==="fixed"){const l=window.getComputedStyle(a).paddingRight;a.style.paddingRight=l&&l!=="0px"?`calc(${l} + ${r}px)`:`${r}px`}else{const l=document.getElementsByTagName("nav").item(0);if(a=l==null?void 0:l.parentElement,a&&window.getComputedStyle(a).position==="fixed"){const c=window.getComputedStyle(a).paddingRight;a.style.paddingRight=c&&c!=="0px"?`calc(${c} + ${r}px)`:`${r}px`}}}return()=>{n&&(za-=1,za===0&&(n.style.overflow=null,n.style.paddingRight=null,a&&(a.style.paddingRight=null)))}},[e])}const yS={debounce:"number",disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",onChange:"React.ChangeEventHandler",onSelectionChange:"(newValue: string) => void",placeholder:"string",suggestions:{type:`
|
|
1
|
+
(function(_,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("@spscommerce/utils"),require("moment-timezone"),require("@spscommerce/ds-shared"),require("react-dom"),require("@spscommerce/ds-colors"),require("@sps-woodland/tabs"),require("@react-stately/collections"),require("@sps-woodland/illustrations")):typeof define=="function"&&define.amd?define(["exports","react","@spscommerce/utils","moment-timezone","@spscommerce/ds-shared","react-dom","@spscommerce/ds-colors","@sps-woodland/tabs","@react-stately/collections","@sps-woodland/illustrations"],x):(_=typeof globalThis<"u"?globalThis:_||self,x(_.DSReact={},_.React,_.utils,_.moment$4,_.dsShared,_.ReactDOM,_.dsColors,_.tabs,_.collections,_.illustrations))})(this,function(_,x,v,Je,G,bo,Oa,Ih,or,Wl){"use strict";var Jx=Object.defineProperty;var Nh=_=>{throw TypeError(_)};var Zx=(_,x,v)=>x in _?Jx(_,x,{enumerable:!0,configurable:!0,writable:!0,value:v}):_[x]=v;var Yt=(_,x,v)=>Zx(_,typeof x!="symbol"?x+"":x,v),kh=(_,x,v)=>x.has(_)||Nh("Cannot "+v);var rr=(_,x,v)=>(kh(_,x,"read from private field"),v?v.call(_):x.get(_)),La=(_,x,v)=>x.has(_)?Nh("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(_):x.set(_,v),hn=(_,x,v,Je)=>(kh(_,x,"write to private field"),Je?Je.call(_,v):x.set(_,v),v);var Qn,In,xn;function Gl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=Gl(x),ar=Gl(Je);function Yl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Yl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Y(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Yl(e))&&(r&&(r+=" "),r+=t);return r}const xh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ft=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=xh[n[e]&63];return t};function Sn(e){return x.useRef(e||ft())}function bt(e,t){const n=Sn(e),r=x.useRef(`${n.current}_ctrl`);return x.useEffect(()=>{t&&(t.id=r.current,t.update())},[t]),{wrapperId:n.current||void 0,controlId:r.current}}var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mh="[object Object]";function _h(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function Lh(e,t){return function(n){return e(t(n))}}var Oh=Function.prototype,Ul=Object.prototype,zl=Oh.toString,Ph=Ul.hasOwnProperty,Rh=zl.call(Object),Bh=Ul.toString,Ah=Lh(Object.getPrototypeOf,Object);function Fh(e){return!!e&&typeof e=="object"}function Vh(e){if(!Fh(e)||Bh.call(e)!=Mh||_h(e))return!1;var t=Ah(e);if(t===null)return!0;var n=Ph.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&zl.call(n)==Rh}var $h=Vh;const jl=Pa($h),Et=new Set,sr=new Set,zt=new Set,vo=new Set;function ql(e){Et.has(e)||zt.has(e)||vo.has(e)||sr.add(e)}function Jl(e){Et.has(e)||zt.has(e)||sr.has(e)||vo.add(e)}const tt=ar.default||ar,ir="MM/DD/YYYY",Kh="MM/DD/YYYY hh:mm A",Hh="MM/DD/YYYY HH:mm",Wh="hh:mm A",Gh="HH:mm",Yh=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,_r=Symbol("Date Parse Error");function lr(e){return tt.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const Q=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=tt(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=Yh.exec(e);if(n){const[,r,a,s]=n;return Object.freeze({year:Number(s),month:Number(r),date:Number(a)})}}return Object.freeze({[_r]:!0,year:void 0,month:void 0,date:void 0})}return Object.freeze({year:e.year(),month:e.month()+1,date:e.date()})},createMomentFrom(e,t){if(!e)return null;let n=null;return typeof e=="string"?t?n=tt(e,t,!0):n=tt(e):tt.isMoment(e)?n=e:n=Q.toMoment(e),n!==null&&tt.isMoment(n)&&n.isValid()?n:Object.freeze({[_r]:!0,year:void 0,month:void 0,date:void 0})},getRangeSeparator(e){return e!=null&&e.includes("-")?"/":"-"},createRangeFrom(e,t){if(!e)return null;if(t){const n=Q.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(a=>Q.createFrom(a,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>Q.createFrom(n))},isValid(e){var t;return e?tt.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=Q.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return Q.isValid(e)?e:null},toMoment(e){return e?tt.isMoment(e)?e:tt({...e,month:e.month-1}):null},toString(e,t){const n=Q.toMoment(e);return n&&n.isValid()?n.format(t||ir):""},toStringRange(e,t){if(!e)return"";const n=Q.getRangeSeparator(t);return e.slice(0,2).map(r=>Q.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&tt.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${Gh}`):e.format(`${n} ${Wh}`):t?e.format(Hh):e.format(Kh):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=Q.getRangeSeparator(n);return e.map(a=>Q.toDateTimeString(a,t,n)).join(r)},create(){const e=new Date;return Object.freeze({year:e.getFullYear(),month:e.getMonth()+1,date:e.getDate()})},isSameDate(e,t){return e&&t&&e.year===t.year&&e.month===t.month&&e.date===t.date},isSameMonth(e,t){return e&&t&&e.year===t.year&&e.month===t.month},isAfter(e,t){return!e||!t?null:lr(e)>lr(t)},isBefore(e,t){return!e||!t?null:lr(e)<lr(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const r=lr(e),[a,s]=t.map(lr);return a&&s&&(n&&r>=a&&r<=s||!n&&r>a&&r<s)},prevMonth(e){return Object.freeze({year:e.month===1?e.year-1:e.year,month:e.month-1||12,date:e.date})},nextMonth(e){return Object.freeze({year:e.month===12?e.year+1:e.year,month:e.month+1>12?1:e.month+1,date:e.date})},createRangeFromPreset(e,t){if(typeof e.definition=="function")return e.definition();const n=tt(),r=n.clone().subtract(tt.duration(e.definition));return[Q.createFrom(r,t),Q.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();let t;e.definition==="P0D"?t=tt().startOf("day"):t=tt().subtract(tt.duration(e.definition));const n=tt().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n){return e&&tt.isMoment(e)&&e.isValid()?Q.toDateTimeString(e,t,n).split(" "):["",t?"00:00":"12:00",t?void 0:"AM"]},getCurrentMoment(){return tt()},validateTimeString(e,t=!1){if(!e)return!0;const n=e.split(":"),r=n[0]||"0",a=n[1]||"0",s=Number.isNaN(Number(r))?NaN:parseInt(r,10),l=Number.isNaN(Number(a))?NaN:parseInt(a,10),c=n.length<=2&&r.length<=2&&a.length<=2;return t?c&&s>=0&&s<=23&&l>=0&&l<=59:c&&(!Number.isNaN(s)&&r.length===1||s>=1)&&s<=12&&l>=0&&l<=59},padIncompleteTimeString(e,t=!1){if(!e)return"";const n=e.split(":"),r=parseInt(n[0]||"0",10),a=parseInt(n[1]||"0",10);if(t){const s=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}else{const s=r===0?"12":r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}}}),Ra=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],Ba=["00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"];let yo=ir;function Zl(e){yo=e}const Lr=function(t){if(Array.isArray(t)){const n=Lr(t[0]),r=Lr(t[1]);return n||r}if(t&&t.hasOwnProperty("year")){if(t[_r])return{dateFormat:yo};if(!Q.isValid(t))return{dateValidity:!0}}return null};Et.add("dateFormat"),Et.add("dateValidity");const Xl=function(t){if(Array.isArray(t)){const n=Lr(t);if(n)return n;if(t&&Q.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};Et.add("dateRangeOrder");const Ql=function({minDate:t,maxDate:n}){function r(a){const s=Q.isBefore(a,t),l=Q.isAfter(a,n),c={minExceeded:s?Q.toString(t,yo):null,maxExceeded:l?Q.toString(n,yo):null};return s||l?{dateConstraint:c}:null}return function(s){if(!s)return null;if(Array.isArray(s)){const l=r(s[0]),c=r(s[1]);return l||c}return s.hasOwnProperty("year")?r(s):null}};Et.add("dateConstraint");const Uh=Object.freeze(Object.defineProperty({__proto__:null,date:Lr,dateConstraint:Ql,dateRange:Xl,setDateFormat:Zl},Symbol.toStringTag,{value:"Module"}));function en(e,t){for(const n of[].concat(e)){const r=t(n);if(r)return r}return null}const zh=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>en(r,n)};Et.add("min");const jh=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>en(r,n)};sr.add("max");const qh=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};sr.add("required");const Jh=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>en(r,n)};Et.add("minLength");const Zh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};Et.add("minLengthArray");const Xh=function(t){function n(r){return r===void 0||r.toString().length<=t?null:{maxLength:t}}return r=>en(r,n)};zt.add("maxLength");const Qh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};Et.add("maxLengthArray");const eS=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(a){return n.test(a)?null:{pattern:t}}return a=>en(a,r)};Et.add("pattern");const tS=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return en(e,t)};zt.add("alpha");const nS=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return en(e,t)};zt.add("numeric");const rS=function(e){function t(n){return/^-?[0-9,. ]*$/.test(n)?null:{positiveOrNegativeNumber:!0}}return en(e,t)};zt.add("positiveOrNegativeNumber");const oS=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return en(e,t)};zt.add("nonNumeric");const To=Object.freeze({...Uh,min:zh,max:jh,required:qh,minLength:Jh,minLengthArray:Zh,maxLength:Xh,maxLengthArray:Qh,pattern:eS,alpha:tS,numeric:nS,nonNumeric:oS,positiveOrNegativeNumber:rS,OnBlurErrorKeys:Et});function Eo(e,t=[]){const n=t.reduce((r,a)=>Object.assign(r,a(e)||{}),{});return Object.keys(n).length?n:null}var jt=(e=>(e[e.ON_CHANGE=0]="ON_CHANGE",e[e.ON_BLUR=1]="ON_BLUR",e[e.ON_SUBMIT=2]="ON_SUBMIT",e))(jt||{});function aS(e,t={},n=[]){for(const[r,a]of Object.entries(t))a===0?ql(r):a===2&&Jl(r);return o.useCallback(e,n)}class Rn{constructor(t,n){Yt(this,"validators",[]);La(this,Qn,null);La(this,In,null);La(this,xn,null);Yt(this,"preventativeErrors",[]);Yt(this,"submitted",!1);this.path=t,this.update=n}get errors(){return rr(this,Qn)===null&&rr(this,In)===null&&rr(this,xn)===null?null:{...rr(this,Qn)??{},...rr(this,In)??{},...rr(this,xn)??{}}}setValidators(t){return this.update(this.path,null,void 0,t),this}validate(t,n,r=!1){if(this.validators&&this.validators.length>0){const a=Eo(t,this.validators);let s={onSubmit:{},onChange:{},onBlur:{}};a&&(s=Object.keys(a).reduce((l,c)=>(vo.has(c)?l.onSubmit[c]=a[c]:sr.has(c)?l.onChange[c]=a[c]:l.onBlur[c]=a[c],l),s)),(typeof n>"u"||n===jt.ON_CHANGE)&&hn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),(typeof n>"u"||n===jt.ON_BLUR)&&hn(this,xn,Object.keys(s.onBlur).length===0?null:s.onBlur),(typeof n>"u"||n===jt.ON_SUBMIT)&&(hn(this,Qn,Object.keys(s.onSubmit).length===0?null:s.onSubmit),hn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),hn(this,xn,Object.keys(s.onBlur).length===0?null:s.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(hn(this,Qn,null),hn(this,xn,null),hn(this,In,null),r||this.update());return this}isValid(){return!this.errors||this.isPristine()}hasErrors(){return!!this.errors}isVisibilyInvalid(){return!this.isValid()}hasError(t){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,t)}hasPreventativeError(t){return this.preventativeErrors.includes(t)}hasPreventativeErrors(){return this.preventativeErrors.length>0}isRequired(){return this.validators&&this.validators.indexOf(To.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}Qn=new WeakMap,In=new WeakMap,xn=new WeakMap;class Or extends Rn{constructor(){super(...arguments);Yt(this,"id",ft());Yt(this,"focused",!1);Yt(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=Eo(n,this.validators);if(r&&Object.keys(r).filter(s=>zt.has(s)).length>0){this.preventativeErrors=Object.keys(r);return}}this.update(this.path,n)}isPristine(){return this.pristine}markAsPristine(){return this.pristine=!0,this.update(),this}markAsDirty(){return this.pristine=!1,this.update(),this}isFocused(){return this.focused}markAsFocused(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this}markAsBlurred(){return this.update(this.path,null,!0),this.onBlur&&this.onBlur(),this.preventativeErrors=[],this}markAsSubmitted(){return this.submitted=!0,this.update(this.path,null,!1,void 0,!0),this}}class Bn extends Or{constructor(n,r,a){super(a?r:n,a||r);Yt(this,"fields");a&&this.inferMembers(n)}isFocused(){return super.isFocused()||this.rollup("isFocused")}isValid(){return super.isValid()&&this.rollup("isValid")}hasErrors(){return super.hasErrors()||Object.keys(this.fields).some(n=>this.fields[n].hasErrors())}contentsAreValid(){return this.rollup("isValid")&&this.rollup("contentsAreValid")}isPristine(){return super.isPristine()&&this.rollup("isPristine")}markAsPristine(){super.markAsPristine();for(const n of Object.keys(this.fields))this.fields[n].markAsPristine();return this}markAsDirty(){super.markAsDirty();for(const n of Object.keys(this.fields))this.fields[n].markAsDirty();return this}markAsBlurred(){super.markAsBlurred();for(const n of Object.keys(this.fields))this.fields[n].markAsBlurred();return this}markAsSubmitted(){super.markAsSubmitted();for(const n of Object.keys(this.fields))this.fields[n].markAsSubmitted();return this}inferSpsControl(n,r){return wo(n,[...this.path,r],this.update)}rollup(n){return Object.keys(this.fields).reduce((r,a)=>r&&(!this.fields[a][n]||this.fields[a][n]()),!0)}}class ec extends Bn{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class tc extends Bn{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function wo(e,t,n){return e instanceof Rn?(e.path=t,e.update=n,e):Array.isArray(e)?new tc(e,t,n):jl(e)?new ec(e,t,n):new Or(t,n)}function Pr(e,t){return t.length===0||!e?e:Pr(e.fields[t[0]],t.slice(1,t.length))}function Aa(e,t){if(t.length===0||!e)return[e];const n=t[0];if(t=t.slice(1,t.length),n==="*"){const r=Array.isArray(e.fields)?e.fields:Object.keys(e.fields).map(a=>e.fields[a]);return t.length===0?r:r.reduce((a,s)=>[...a,...Aa(s,t)],[])}return Aa(e.fields[n],t)}function Fa(e,t,n){for(const r of Object.keys(t)){const a=t[r];for(const s of Aa(e,r.split(".")))s&&a&&n(s,a)}}function Co(e,t,n,r=!1,a=!1){Fa(t,n,(s,l)=>{s.validators=typeof l=="function"?l(e):l,r&&s.validate(v.getPath(e,s.path),void 0,a)})}function Va(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((r,a)=>a===Number(n)?Va(r,t):r):jl(e)?Object.keys(e).reduce((r,a)=>Object.assign(r,{[a]:a===n?Va(e[a],t):e[a]}),{}):e}function sS(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function nc(e,t={}){sS(e);const[,n]=x.useState({}),r=x.useRef(!1);r.current=!1;const a=x.useRef(t),s=x.useCallback(h=>{var T,C;const S=u.current;let y;if(h)if(h.path)if(h.markAsBlurred){const E=Pr(S.formMeta,h.path);if(E){E.focused=!1;const N=v.getPath(S.formValue,h.path);E.validate(N,jt.ON_BLUR)}}else if(h.newValidators){if(a.current){const E=h.path.join(".");a.current={...a.current,[E]:h.newValidators},Co(S.formValue,S.formMeta,a.current,!0)}}else if(h.markAsSubmitted){const E=Pr(S.formMeta,h.path);if(E){E.submitted=!0;const N=v.getPath(S.formValue,h.path);E.validate(N,jt.ON_SUBMIT)}}else y=Va(S.formValue,h.path),v.setPath(y,h.path,h.value);else y=h.value;if((T=h==null?void 0:h.updateFormOptions)!=null&&T.validators&&(a.current={...a.current,...h.updateFormOptions.validators},Co(S.formValue,S.formMeta,a.current,((C=h.updateFormOptions)==null?void 0:C.runValidators)??!0)),y){S.formMeta.submitted=!1,v.deepFreeze(y);const E=v.diff(S.formValue,y);for(const{type:M,key:I,parentPath:k,objects:[,V]}of E){const A=Pr(S.formMeta,k);if(typeof I!="symbol"&&A){let w;switch(M){case v.DiffChange.ADDITION:A.fields[I]=wo(V[I],[...k,I],c);break;case v.DiffChange.DELETION:Array.isArray(A.fields)?A.fields[I]=void 0:delete A.fields[I];break;case v.DiffChange.ALTERATION:w=wo(V[I],[...k,I],c),(w instanceof Bn&&!(A.fields[I]instanceof Bn)||!(w instanceof Bn)&&A.fields[I]instanceof Bn)&&(w.pristine=!1,A.fields[I]=w);break}}}const N=new Set;if(E.filter(M=>M.type===v.DiffChange.DELETION).reduce((M,I)=>(M.has(I.parentPath)||M.add(I.parentPath),M),N),Array.from(N).forEach(M=>{const I=Pr(S.formMeta,M);Array.isArray(I.fields)&&(I.fields=I.fields.filter(k=>k!==void 0))}),a.current){Co(y,S.formMeta,a.current);const M=new Set;t&&Fa(S.formMeta,t,(I,k)=>{typeof k=="function"&&(I.validate(v.getPath(y,I.path)),M.add(I))});for(const{type:I,key:k,parentPath:V,objects:[,A]}of E)if(typeof k!="symbol"){let w=S.formMeta,P=y;if(w){for(const O of V)w=w.fields[O],P=P[O],M.has(w)||w.validate(P,jt.ON_CHANGE);if(I===v.DiffChange.ADDITION||I===v.DiffChange.ALTERATION){const O=w.fields[k];if(!M.has(O)&&(w.fields[k].validate(A[k],jt.ON_CHANGE),I===v.DiffChange.ADDITION&&O.fields))for(const[$,z]of Object.entries(O.fields))z.validate(A[k][$],jt.ON_CHANGE)}}}}}u.current={...S,formValue:y||S.formValue},r.current||n({})},[]),l=x.useCallback((h,S)=>{h||S?s({value:h,updateFormOptions:S}):s()},[s]),c=x.useCallback((h,S,y=!1,T,C=!1)=>{h?s({path:h,value:S,markAsBlurred:y,newValidators:T,markAsSubmitted:C}):l()},[s,l]),p=x.useMemo(()=>{v.deepFreeze(e);const h=wo(e,[],c);return t&&Co(e,h,t,!1,!0),h},[]),m=x.useCallback(()=>(u.current.formMeta.markAsDirty(),a.current&&Fa(u.current.formMeta,a.current,(h,S)=>{(typeof S=="function"||Array.isArray(S))&&h.validate(v.getPath(u.current.formValue,h.path))}),u.current.formMeta.isValid()),[]),f=x.useCallback(()=>u.current.formValue,[]),u=x.useRef({formValue:e,formMeta:p,updateForm:l,validateForm:m,getCurrentFormValue:f});return u.current}const at=o.forwardRef((e,t)=>{const{className:n,children:r,focusInputOnClick:a,formControl:s,formMeta:l,inputRef:c,onClick:p,...m}=e,f=o.useRef(),h=c||(t||f);function S(){h&&h!==t&&h.current&&h.current.focus()}function y(){h&&h!==t&&h.current&&l&&l instanceof Or&&l.markAsFocused()}function T(){h&&h!==t&&h.current&&l&&l instanceof Or&&l.markAsBlurred()}const C=Y("sps-form-group",(s&&s.isRequired()||l&&l.isRequired())&&"sps-form-group--required",(s&&!s.isValid()||l&&l.isVisibilyInvalid())&&"sps-form-group--error",l&&l.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function E(N){a&&S(),p&&p(N)}return o.useEffect(()=>{function N(M){M.target.classList.contains("sps-form-control__clear-btn")&&M.preventDefault()}return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),o.createElement("div",{...m,className:C,ref:t,tabIndex:-1,onClick:E,onFocus:y,onBlur:T},r)});Object.assign(at,{displayName:"SpsFormComponentWrapper"});function rc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function oc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function $a(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return oc(n.overflowY,t)||oc(n.overflowX,t)||function(r){var a=function(s){if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!a&&(a.clientHeight<r.scrollHeight||a.clientWidth<r.scrollWidth)}(e)}return!1}function Do(e,t,n,r,a,s,l,c){return s<e&&l>t||s>e&&l<t?0:s<=e&&c<=n||l>=t&&c>=n?s-e-r:l>t&&c<n||s<e&&c>n?l-t+a:0}var ac=function(e,t){var n=window,r=t.scrollMode,a=t.block,s=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,p=typeof l=="function"?l:function(ke){return ke!==l};if(!rc(e))throw new TypeError("Invalid target");for(var m,f,u=document.scrollingElement||document.documentElement,h=[],S=e;rc(S)&&p(S);){if((S=(f=(m=S).parentElement)==null?m.getRootNode().host||null:f)===u){h.push(S);break}S!=null&&S===document.body&&$a(S)&&!$a(document.documentElement)||S!=null&&$a(S,c)&&h.push(S)}for(var y=n.visualViewport?n.visualViewport.width:innerWidth,T=n.visualViewport?n.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,E=window.scrollY||pageYOffset,N=e.getBoundingClientRect(),M=N.height,I=N.width,k=N.top,V=N.right,A=N.bottom,w=N.left,P=a==="start"||a==="nearest"?k:a==="end"?A:k+M/2,O=s==="center"?w+I/2:s==="end"?V:w,$=[],z=0;z<h.length;z++){var L=h[z],J=L.getBoundingClientRect(),B=J.height,te=J.width,H=J.top,q=J.right,oe=J.bottom,W=J.left;if(r==="if-needed"&&k>=0&&w>=0&&A<=T&&V<=y&&k>=H&&A<=oe&&w>=W&&V<=q)return $;var j=getComputedStyle(L),ne=parseInt(j.borderLeftWidth,10),re=parseInt(j.borderTopWidth,10),U=parseInt(j.borderRightWidth,10),R=parseInt(j.borderBottomWidth,10),Z=0,ae=0,ee="offsetWidth"in L?L.offsetWidth-L.clientWidth-ne-U:0,de="offsetHeight"in L?L.offsetHeight-L.clientHeight-re-R:0,ie="offsetWidth"in L?L.offsetWidth===0?0:te/L.offsetWidth:0,le="offsetHeight"in L?L.offsetHeight===0?0:B/L.offsetHeight:0;if(u===L)Z=a==="start"?P:a==="end"?P-T:a==="nearest"?Do(E,E+T,T,re,R,E+P,E+P+M,M):P-T/2,ae=s==="start"?O:s==="center"?O-y/2:s==="end"?O-y:Do(C,C+y,y,ne,U,C+O,C+O+I,I),Z=Math.max(0,Z+E),ae=Math.max(0,ae+C);else{Z=a==="start"?P-H-re:a==="end"?P-oe+R+de:a==="nearest"?Do(H,oe,B,re,R+de,P,P+M,M):P-(H+B/2)+de/2,ae=s==="start"?O-W-ne:s==="center"?O-(W+te/2)+ee/2:s==="end"?O-q+U+ee:Do(W,q,te,ne,U+ee,O,O+I,I);var se=L.scrollLeft,Ne=L.scrollTop;P+=Ne-(Z=Math.max(0,Math.min(Ne+Z/le,L.scrollHeight-B/le+de))),O+=se-(ae=Math.max(0,Math.min(se+ae/ie,L.scrollWidth-te/ie+ee)))}$.push({el:L,top:Z,left:ae})}return $};function sc(e){return e===Object(e)&&Object.keys(e).length!==0}function iS(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var a=r.el,s=r.top,l=r.left;a.scroll&&n?a.scroll({top:s,left:l,behavior:t}):(a.scrollTop=s,a.scrollLeft=l)})}function lS(e){return e===!1?{block:"end",inline:"nearest"}:sc(e)?e:{block:"start",inline:"nearest"}}function No(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(sc(t)&&typeof t.behavior=="function")return t.behavior(n?ac(e,t):[]);if(n){var r=lS(t);return iS(ac(e,r),r.behavior)}}const Ka=Object.freeze(Object.defineProperty({__proto__:null,default:No},Symbol.toStringTag,{value:"Module"})),He=o.createContext(G.noI18nI18n),cS={alt:"string",size:"SpinnerSize",title:"string"};function Ha(e){const{alt:t,className:n,size:r=G.SpinnerSize.MEDIUM,"data-testid":a,title:s,unsafelyReplaceClassName:l,...c}=e,{t:p}=o.useContext(He),m=t||s||p("design-system:spinner.defaultAltText"),f=Y(l||"sps-spinner",`sps-spinner--${r}`,n);return o.createElement("i",{className:f,"data-testid":a,title:m,...c})}Object.assign(Ha,{props:cS,displayName:"SpsSpinner"});const dS=60;function ko(e){return typeof e>"u"?"inherit":`${e}px`}function Wa(e){switch(e){case G.Position.TOP_LEFT:return G.Position.BOTTOM_LEFT;case G.Position.TOP_MIDDLE:return G.Position.BOTTOM_MIDDLE;case G.Position.TOP_RIGHT:return G.Position.BOTTOM_RIGHT;case G.Position.RIGHT_TOP:return G.Position.LEFT_TOP;case G.Position.RIGHT_MIDDLE:return G.Position.LEFT_MIDDLE;case G.Position.RIGHT_BOTTOM:return G.Position.LEFT_BOTTOM;case G.Position.BOTTOM_RIGHT:return G.Position.TOP_RIGHT;case G.Position.BOTTOM_MIDDLE:return G.Position.TOP_MIDDLE;case G.Position.BOTTOM_LEFT:return G.Position.TOP_LEFT;case G.Position.LEFT_BOTTOM:return G.Position.RIGHT_BOTTOM;case G.Position.LEFT_MIDDLE:return G.Position.RIGHT_MIDDLE;case G.Position.LEFT_TOP:return G.Position.RIGHT_TOP}}function pS(e,t,n,r,a,s,l,c){const p=l&&l.current,m=p?p.scrollTop:window.pageYOffset,f=c?0:m,u=p?p.scrollLeft:window.pageXOffset,h=c?0:u,[S,y]=e.split(" ");let T,C,E,N;switch(S){case"top":E=t.height-n.top-f-s[0];break;case"left":C=t.width-n.left-h-s[0];break;case"right":N=n.right+h-s[0];break;case"bottom":T=n.bottom+f-s[0];break;default:throw new Error(`Invalid position ${e}`)}switch(y){case"left":N=n.left+h+s[1];break;case"top":T=n.top+f+s[1];break;case"middle":S==="top"||S==="bottom"?N=n.left+h+n.width/2-a/2+s[1]:(S==="left"||S==="right")&&(T=n.top+f+n.height/2-r.height/2+s[1]);break;case"bottom":E=t.height-n.bottom-f+s[1];break;case"right":C=t.width-n.right-h+s[1];break;default:throw new Error(`Invalid position ${e}`)}return[T,C,E,N]}function An(e,t,n,{altPosition:r,setMinWidth:a=!1,setWidth:s=!1,parentElementRef:l,fixed:c=!1,offsets:p=[0,0]}){if(e.current&&t.current){const m=e.current.getBoundingClientRect(),f=t.current.getBoundingClientRect(),u=Math.max(document.documentElement.clientHeight,window.innerHeight||0),h=document.documentElement.getBoundingClientRect().width;let y=((l==null?void 0:l.current)??document.documentElement).getBoundingClientRect();c&&(y={x:0,y:0,width:h,height:u,top:0,left:0,bottom:u,right:h,toJSON(){return{width:h,height:u,top:0,left:0,bottom:u,right:h}}});const[T,C]=n.split(" ");let E=n;if(r&&(T==="top"&&f.top-m.height<dS||T==="right"&&f.right+m.width>h||T==="bottom"&&f.bottom+m.height>u||T==="left"&&f.left-m.width<0)&&(E=r),C==="left"&&f.left+m.width+((p==null?void 0:p[1])??0)>document.documentElement.getBoundingClientRect().right)switch(T){case"bottom":E=G.Position.BOTTOM_RIGHT;break;case"top":E=G.Position.TOP_RIGHT;break}const N=a?Math.max(f.width,m.width):m.width,M=s?f.width:N,[I,k,V,A]=pS(E,y,f,m,M,p,l,c),w={top:ko(I),right:ko(k),bottom:ko(V),left:ko(A)};return c&&(w.position="fixed",w.zIndex=G.ZStratum.BAR),a&&(w.minWidth=`${f.width}px`),s&&(w.width=`${f.width}px`),[w,E===r]}return[{},!1]}const kt=x.createContext(null);function cr(e,t=[]){const n=x.useContext(kt);return x.useMemo(()=>r=>{const s=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let l=null,c=s.lastElementChild;for(;c&&c!==s.firstElementChild;){if(c.hasAttribute("data-portalid")&&c.getAttribute("data-portalid")===e){l=c;break}c=c.previousElementSibling}if(l)s.contains(l)||s.appendChild(l);else{l=document.createElement("div"),l.setAttribute("data-portalid",e);for(const p of t)l.classList.add(p);s.appendChild(l)}return bo.createPortal(r,l)},[n])}const Ga=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","1","2","3","4","5","6","7","8","9","0"];async function ic(e,t,n,r,a,s){const l=typeof e.options=="function"?e.options(t.value):e.options||[],c=l instanceof Promise,p=u=>u.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:c}),s.current=c?l:null;const m=c?await l||[]:l||[];if(c&&s.current!==l)return;let f=Array.from(m).filter(Boolean).map(u=>new G.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&f.unshift(new G.SpsOptionListOption(null,{text:e.nullOption})),t.value&&!e.disableDefaultOptionsFiltering){const u=p(t.value);n({replacementPattern:new RegExp(`(${u})`,"ig")}),f=f.filter(h=>{const S=new RegExp(u,"i"),y=p(h.text);return e.filterByTextAndCaptionKey?S.test(y)||S.test(p(h.caption)):S.test(y)})}else n({replacementPattern:null});if(e.disabledOptions)for(const u of f)e.disabledOptions.includes(u.value)&&(u.disabled=!0);r(Object.freeze(f)),e.onOptionListChanged&&e.onOptionListChanged(f.length),a(f.some(u=>u.value&&!!u.value.icon)),n({pending:!1})}function uS(e,t,n){const[r,a]=o.useState(Object.freeze([])),[s,l]=o.useState(!1),c=o.useRef(null),p=o.useRef(e.options);(typeof e.options!="function"||e.disableOptionsMemoization)&&(p.current=e.options);const m=o.useMemo(()=>typeof p.current=="function"?v.debounce(ic,typeof e.searchDebounce<"u"?e.searchDebounce:500):ic,[p.current,e.disabledOptions]);return o.useEffect(()=>{m(e,t,n,a,l,c)},[p.current,t.value,e.disabledOptions]),[r,s]}class gn{constructor(t,n){Yt(this,"nativeEvent");Yt(this,"currentTarget");Yt(this,"isPgStoppedInternal",!1);this.target=t,this.currentTarget=t,this.nativeEvent=new CustomEvent("change",n),Object.defineProperty(this.nativeEvent,"target",{value:t,writable:!1,configurable:!1,enumerable:!0})}get bubbles(){return this.nativeEvent.bubbles}get cancelable(){return this.nativeEvent.cancelable}get defaultPrevented(){return this.nativeEvent.defaultPrevented}get eventPhase(){return this.nativeEvent.eventPhase}get isTrusted(){return this.nativeEvent.isTrusted}get timeStamp(){return this.nativeEvent.timeStamp}get type(){return this.nativeEvent.type}preventDefault(){this.nativeEvent.preventDefault()}isDefaultPrevented(){return this.defaultPrevented}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPgStoppedInternal=!0}isPropagationStopped(){return this.isPgStoppedInternal}persist(){throw new Error("This is not a real React ChangeEvent. React does not permit the creation of SyntheticEvents in userland.")}}function mS(e,t){return{...e,...t}}function qt(e){return x.useReducer(mS,e)}function fS({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:a="Search…",searchInputRef:s}){const[l,c]=qt({isAsync:typeof t=="function",pending:!1,value:r,replacementPattern:null}),p=o.useCallback(S=>{c({value:S.target.value}),n&&n(S)},[n]),m=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),S.stopPropagation()},[]),f=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),c({value:""}),s!=null&&s.current&&(n&&n(new gn(s.current)),s.current.focus())},[n]),u=S=>{S&&(["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(S.key)||S.stopPropagation())};return o.useEffect(()=>{c({value:r})},[r]),[l.isAsync&&!e?o.createElement("div",{className:"sps-option-list__search sps-form-group sps-text-input"},o.createElement("div",{className:"sps-form-control"},!l.value&&o.createElement("i",{className:"sps-icon sps-icon-filter sps-text-input__icon"}),o.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:a,ref:s,value:l.value,onChange:p,onClick:m,onKeyDown:u}),l.value&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:f}))):o.createElement(o.Fragment,null),l,c]}const hS=No||Ka,SS=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"];function gS(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function lc(e,t,n){return typeof n.value=="function"&&n.disabled?!0:t?!!(e!=null&&e.find(r=>{var a;return r[t]&&r[t]===((a=n==null?void 0:n.value)==null?void 0:a[t])})):!1}const Rr=o.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:a,options:s,tall:l,textKey:c,valueKey:p,zeroState:m,hideInlineSearch:f,onSearchChange:u,search:h,searchDebounce:S,searchPlaceholder:y,onSpecialActionSelect:T,attachTo:C,className:E,conformWidth:N,id:M,ignoreWidthStyles:I,isOpen:k,keepOpen:V,keyDown:A,nullOption:w,onOptionListChanged:P,onOptionSelected:O,onPositionFlip:$,onSelfToggle:z,optionRole:L,positionOverride:J,selectedOption:B,specialAction:te,unsafelyReplaceClassName:H,loading:q,filterByTextAndCaptionKey:oe,maxHeightPx:W,maxHeightRem:j,disableOptionsMemoization:ne,disableDefaultOptionsFiltering:re,"data-testid":U,typeaheadEvent:R,...Z}=e,ae=o.useMemo(()=>te?new G.SpsOptionListOption(te,{textKey:"label",captionKey:"caption"}):null,[te]),[ee,de]=o.useState(-1),[ie,le]=o.useState(k),se=t||o.useRef(null),Ne=o.useRef(null),ke=o.useRef(null),it=cr("sps-option-list-portal"),lt=o.useContext(kt),[ut,ct]=J||[G.Position.BOTTOM_LEFT,G.Position.TOP_LEFT],[[Pt,je],fe]=o.useState([{},!1]),Fe=o.useRef(null),[ve,Le,Qe]=fS({...e,searchInputRef:Fe}),[we,Ht]=uS(e,Le,Qe);o.useEffect(()=>{R&&pt(R)},[R]),o.useEffect(()=>{fe(ie?An(se,C,ut,{altPosition:ct,setMinWidth:!I,setWidth:!I&&N,...lt}):[{},!1])},[ie,ut,ct,we]),o.useEffect(()=>{let be;return ie&&(be=()=>{ie&&fe(An(se,C,ut,{altPosition:ct,setMinWidth:!I,setWidth:!I&&N,...lt}))},document.addEventListener("scroll",be)),()=>{be&&document.removeEventListener("scroll",be)}},[ie]),o.useEffect(()=>{de(-1)},[Le]);const Mn=Y(H||"sps-option-list","z-stratum-dropdown",ie&&"sps-option-list--open",Le.isAsync&&"sps-option-list--searchable",je&&"sps-option-list--opens-upward",te&&te.label&&"sps-option-list--has-special-action",E),ue=Y(H||"sps-option-list__options",l&&"sps-option-list__options--tall"),Se=o.useCallback(()=>{ie||(le(!0),Fe.current&&Fe.current.focus(),de(-1),z&&z(!0))},[ie,z]),Oe=o.useCallback(()=>{ie&&(le(!1),de(-1),z&&z(!1))},[ie,z]),Ze=o.useCallback((be,Te)=>{Te||be&&!be.disabled&&(typeof be.value=="function"?(be.value(),T&&T()):typeof O=="function"&&O(be.value),V||Oe())},[O,Oe]),Ie=o.useCallback((be,Te,Xe)=>{be.stopPropagation(),Ze(Te,Xe)},[Ze]),dt=o.useRef(a||[]);dt.current=a||[];const Tt=o.useCallback(be=>{switch(be.key){case"Tab":case"Escape":Oe();break;case"Enter":if(ee>-1){const Te=we[ee]||ae;be.preventDefault();const Xe=!!Te&&lc(dt.current,r||"",Te);!Xe&&Te&&typeof O=="function"&&typeof Te.value=="function"?Te.value():Te&&Ze(Te,Xe)}break;case"Up":case"ArrowUp":{let Te=ee;je?ee<=-1?Te=we.length-1:ee===0?te&&(Te=we.length):ee<we.length&&(Te=ee-1):ee>-1&&(Te=ee-1),Te!==ee&&(be.preventDefault(),de(Te));break}case"Down":case"ArrowDown":{Se();let Te=ee;je?ee!==-1&&(ee>=we.length?Te=0:ee===we.length-1?Te=-1:Te=ee+1):ee<we.length-1+ +!!te&&(Te=ee+1),Te!==ee&&(be.preventDefault(),de(Te));break}default:Se()}},[Oe,Se,ee,Ze,O,je,we]),Ae=o.useCallback(be=>{Se();const Te=we.findIndex(Xe=>{if(Xe.textKey){const Rt=Xe.textKey;return Xe.value[Rt].toLowerCase().charAt([0])===be.key.toLocaleLowerCase()}return Xe.value.toString().toLowerCase().charAt([0])===be.key.toLocaleLowerCase()});Te>-1&&de(Te)},[we]),pt=o.useCallback(be=>{be&&(SS.includes(be.key)?Tt(be):Ga.includes(be.key)&&!f&&Ae(be))},[Oe,Se,ee,Ze,O,je,we]);o.useEffect(()=>{if(lt!==null&&document.getElementsByClassName("sps-modal__body").length>0){const be=()=>{z&&z(!1)},Te=document.getElementsByClassName("sps-modal__body")[0];return Te.addEventListener("scroll",be),()=>{Te.removeEventListener("scroll",be)}}},[]),o.useEffect(()=>{ie&&ke.current&&hS(ke.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[ee,ie]),o.useEffect(()=>{le(k),k?Fe.current&&Fe.current.focus():de(-1)},[k]),o.useEffect(()=>{A&&pt(A)},[A]),o.useEffect(()=>{!ie&&Ne.current&&(Qe({value:""}),Ne.current.scrollTop=0),ie&&$&&$(je)},[ie]);const _n=W?W/16:j,Xt=_n?{maxHeight:`${_n}rem`}:{};function va(be,Te){return Te?o.createElement(o.Fragment,null,be.split(Te).map((Xe,Rt)=>Te.test(Xe)?o.createElement("u",{key:Rt},Xe):o.createElement(o.Fragment,{key:Rt},Xe))):o.createElement(o.Fragment,null,be)}return it(o.createElement("div",{className:Mn,id:M,"aria-activedescendant":ee>-1?`${M}-option-${ee}`:"",tabIndex:-1,ref:se,style:Pt,onMouseLeave:()=>de(-1),"data-testid":U,...Z},ve,o.createElement("div",{className:ue,ref:Ne,"data-testid":`${U}-options`,style:Xt},!q&&!Le.pending&&m&&we.length===0&&o.createElement("div",{className:"sps-option-list__zero-state"},m),(q||Le.pending)&&o.createElement("div",{className:"sps-option-list__loading"},o.createElement(Ha,null)),!q&&!Le.pending&&we.map((be,Te)=>{const Xe=`${M}-option-${Te}`,Rt=gS(be.value,B,r),me=lc(dt.current,r||"",be);return o.createElement("a",{key:Xe,id:Xe,role:L,"aria-selected":Rt,href:be.href,className:Y("sps-option-list__option",be.caption&&"sps-option-list__option--has-caption",be.disabled&&"sps-option-list__option--disabled",be.bold&&"sps-option-list__option--bold",(Rt||me)&&"sps-option-list__option--selected",ee===Te&&"sps-option-list__option--highlighted"),onClick:wl=>Ie(wl,be,me),onMouseOver:()=>de(Te),tabIndex:-1,ref:ee===Te?ke:null,"data-testid":`${U}-option-${Te}`},be.value&&be.value.icon&&o.createElement("i",{className:Y("sps-icon","sps-option-list__option-icon",`sps-icon-${String(be.value.icon)}`)}),(!be.value||!be.value.icon&&Ht)&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,va(be.text,Le.replacementPattern)),be.caption&&o.createElement("div",{className:"sps-option-list__option-caption"},o.createElement("span",null,va(be.caption,Le.replacementPattern))))})),ae&&(te==null?void 0:te.label)&&o.createElement("a",{className:Y("sps-option-list__option","sps-option-list__special-action",ee===we.length&&"sps-option-list__option--highlighted",te.disabled&&"sps-option-list__special-action--disabled"),href:ae.href,target:ae.href&&te.newTab?"_blank":"_self",onClick:be=>Ie(be,ae),onMouseOver:()=>de(we.length),"data-testid":`${U}-special-action`},te.icon&&o.createElement("i",{className:Y("sps-icon","sps-option-list__option-icon",`sps-icon-${String(te.icon)}`)}),!te.icon&&Ht&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,te.label))))});Object.assign(Rr,{displayName:"SpsOptionList"});function bS(e,t,n=[]){return o.useMemo(()=>{function r(a){return o.createElement(e,{...a,...t},a.children)}return r},n)}function vt(e){return typeof e=="function"?e():e}const cc=function({children:e,elements:t}){if(t.length===0)return o.createElement(o.Fragment,null,e);const[n,r]=Array.isArray(t[0])?t[0]:[t[0]];return o.createElement(n,{...r??{}},o.createElement(cc,{elements:t.slice(1)},e))},dc=function({children:e,providers:t=[],...n}){return o.createElement("div",{...n},o.createElement(cc,{elements:t},e))},vS=function({children:e,className:t,...n}){return o.createElement(dc,{className:`sps-app ${t}`,...n},e)};function It(e=[],t=[]){const n=Array.isArray(e)?v.flatten(e):[e],r=t.map(s=>Array.isArray(s)?s:[s]),a=new Array(r.length+1).fill(null).map(()=>[]);for(const s of n){let l=!1;for(let c=0;c<r.length;c+=1)for(const{type:p,props:m={}}of r[c])if(s.type===p&&Object.keys(m).every(u=>m[u]===s.props[u])){l=!0,a[c].push(s);break}l||a[a.length-1].push(s)}return a}function pc(e,t,n){const r=Object.entries(t).filter(([,s])=>typeof s!="string"&&s.deprecated).map(([s])=>s),a=r.map(s=>n[s]);o.useEffect(()=>{a.find(s=>typeof s<"u")&&console.warn(`The following prop(s) of ${e} are deprecated: ${r.join(", ")}`)},a)}function Ya(e,t){const n=x.useRef(!1);x.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Ua(e,t,n){const r=o.useRef(t(...n));o.useEffect(()=>(document.addEventListener(e,r.current,{capture:!0}),()=>document.removeEventListener(e,r.current)),[]),o.useEffect(()=>{document.removeEventListener(e,r.current),r.current=t(...n),document.addEventListener(e,r.current,{capture:!0})},n)}function uc(e,t,n){return function(a){var s,l;!((s=e.current)!=null&&s.contains(a.target))&&!((l=t.current)!=null&&l.contains(a.target))&&n()}}function dr(e,t,n){const r=o.useRef(!1),[a,s]=o.useState(!1),l=o.useCallback(()=>{r.current?r.current=!1:s(!0)},[]),c=o.useCallback((p=!1)=>{s(!1),r.current=p,n&&n()},[]);return Ua("mousedown",uc,[e,t,c]),Ua("pointerdown",uc,[e,t,c]),{showPopup:a,doShowPopup:l,doHidePopup:c}}const mc=e=>{const t=/(auto|scroll)/,n=(c,p)=>c.parentNode===null?p:n(c.parentNode,p.concat([c])),r=(c,p)=>getComputedStyle(c,null).getPropertyValue(p),a=c=>r(c,"overflow")+r(c,"overflow-y"),s=c=>t.test(a(c));return(c=>{if(!(c instanceof HTMLElement||c instanceof SVGElement))return;const p=n(c.parentNode,[]);for(let m=0;m<p.length;m+=1)if(s(p[m]))return p[m];return null})(e)};let za=0;function Io({isOpen:e,rootRef:t}){o.useLayoutEffect(()=>{let n,r,a;if(e&&t.current){za+=1,n=mc(t.current)||document.body,r=n===document.body?window.innerWidth-document.documentElement.clientWidth:n.offsetWidth-n.clientWidth,n.style.overflow="hidden";const s=window.getComputedStyle(n).paddingRight;if(n.style.paddingRight=s&&s!=="0px"?`calc(${s} + ${r}px)`:`${r}px`,n===document.body)if(a=document.getElementsByClassName("sps-navbar-container").item(0),a&&window.getComputedStyle(a).position==="fixed"){const l=window.getComputedStyle(a).paddingRight;a.style.paddingRight=l&&l!=="0px"?`calc(${l} + ${r}px)`:`${r}px`}else{const l=document.getElementsByTagName("nav").item(0);if(a=l==null?void 0:l.parentElement,a&&window.getComputedStyle(a).position==="fixed"){const c=window.getComputedStyle(a).paddingRight;a.style.paddingRight=c&&c!=="0px"?`calc(${c} + ${r}px)`:`${r}px`}}}return()=>{n&&(za-=1,za===0&&(n.style.overflow=null,n.style.paddingRight=null,a&&(a.style.paddingRight=null)))}},[e])}const yS={debounce:"number",disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",onChange:"React.ChangeEventHandler",onSelectionChange:"(newValue: string) => void",placeholder:"string",suggestions:{type:`
|
|
2
2
|
Eventually<Iterable<string>>
|
|
3
3
|
| ((filter?: string) => Eventually<Iterable<string>>)
|
|
4
4
|
`,required:!0},tallOptionList:"boolean",value:"string",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean",inputNotClearable:"boolean",autoFocusOnSelection:"boolean"};function Jt({className:e,debounce:t=0,disabled:n,formControl:r,formMeta:a,onChange:s,onSelectionChange:l,icon:c,id:p,placeholder:m="",suggestions:f,unsafelyReplaceClassName:u,tallOptionList:h,value:S="",zeroState:y,loading:T,maxHeightOptionListPx:C,maxHeightOptionListRem:E,disableOptionsMemoization:N,inputNotClearable:M,autoFocusOnSelection:I,"data-testid":k,...V}){const A=a||r,{wrapperId:w,controlId:P}=bt(p,A),[O,$]=qt({keyDown:null,opensUpward:!1}),z=o.useRef(null),L=o.useRef(null),J=o.useRef(null),{showPopup:B,doShowPopup:te,doHidePopup:H}=dr(z,J);function q(R,Z,ae=!1){A&&(A.setValue(R),A.markAsDirty()),l&&ae?l(R):s&&s(Z||new gn({value:R}))}function oe(R){L.current&&(L.current.value="",q("")),R.stopPropagation()}function W(R){q(R.target.value,R)}function j(R){n||(["Up","ArrowUp","Down","ArrowDown","Enter"].indexOf(R.key)>-1&&(R.preventDefault(),R.persist()),R.stopPropagation(),$({keyDown:R})),R.key==="Tab"&&H()}function ne(R){R?te():H()}function re(R){$({opensUpward:R})}const U=Y(u||"sps-autocomplete",B&&"sps-autocomplete--open",B&&"z-stratum-dropdown",O.opensUpward&&"sps-autocomplete--opens-upward",n&&"sps-form-control--disabled",e);return o.useEffect(()=>{let R;return B&&(R=()=>{H()},window.addEventListener("resize",R)),()=>{R&&window.removeEventListener("resize",R)}},[B]),Io({isOpen:B,rootRef:z}),o.createElement(at,{id:w,className:U,formControl:r,formMeta:a,inputRef:L,ref:z,focusInputOnClick:!0,onClick:R=>R.nativeEvent.stopImmediatePropagation(),"data-testid":`${k}`},o.createElement("div",{className:"sps-text-input"},o.createElement("div",{className:"sps-form-control"},c&&o.createElement("i",{className:Y("sps-text-input__icon","sps-icon",`sps-icon-${c}`)}),o.createElement("input",{type:"text",ref:L,value:S,className:"sps-text-input__input",placeholder:m,onFocus:te,onClick:te,onChange:W,onKeyDown:j,disabled:n,id:P,"data-testid":`${k}__input`,...V}),S&&!n&&!M&&o.createElement("i",{"aria-label":"clear",className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:R=>oe(R)}))),o.createElement(Rr,{id:`${w}_options`,ref:J,attachTo:z,isOpen:B,options:f,hideInlineSearch:!0,keyDown:O.keyDown,onOptionSelected:R=>{var Z;q(R,void 0,!0),I&&((Z=L.current)==null||Z.focus())},onPositionFlip:re,onSelfToggle:ne,offsets:[1,0],search:S,searchDebounce:t,tall:h,zeroState:y,loading:T,maxHeightPx:C,maxHeightRem:E,disableOptionsMemoization:N}))}Object.assign(Jt,{props:yS,displayName:"SpsAutocomplete"});const fc={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
@@ -356,7 +356,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var se=le(ae,ie,U,R,Z+".
|
|
|
356
356
|
*
|
|
357
357
|
* This source code is licensed under the MIT license found in the
|
|
358
358
|
* LICENSE file in the root directory of this source tree.
|
|
359
|
-
*/var zc;function eg(){return zc||(zc=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,a=60114,s=60109,l=60110,c=60112,p=60113,m=60120,f=60115,u=60116,h=60121,S=60122,y=60117,T=60129,C=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),n=E("react.fragment"),r=E("react.strict_mode"),a=E("react.profiler"),s=E("react.provider"),l=E("react.context"),c=E("react.forward_ref"),p=E("react.suspense"),m=E("react.suspense_list"),f=E("react.memo"),u=E("react.lazy"),h=E("react.block"),S=E("react.server.block"),y=E("react.fundamental"),E("react.scope"),E("react.opaque.id"),T=E("react.debug_trace_mode"),E("react.offscreen"),C=E("react.legacy_hidden")}var N=!1;function M(le){return!!(typeof le=="string"||typeof le=="function"||le===n||le===a||le===T||le===r||le===p||le===m||le===C||N||typeof le=="object"&&le!==null&&(le.$$typeof===u||le.$$typeof===f||le.$$typeof===s||le.$$typeof===l||le.$$typeof===c||le.$$typeof===y||le.$$typeof===h||le[0]===S))}function I(le){if(typeof le=="object"&&le!==null){var se=le.$$typeof;switch(se){case e:var Ne=le.type;switch(Ne){case n:case a:case r:case p:case m:return Ne;default:var ke=Ne&&Ne.$$typeof;switch(ke){case l:case c:case u:case f:case s:return ke;default:return se}}case t:return se}}}var k=l,V=s,A=e,w=c,P=n,O=u,$=f,z=t,L=a,J=r,B=p,te=!1,H=!1;function q(le){return te||(te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function oe(le){return H||(H=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(le){return I(le)===l}function j(le){return I(le)===s}function ne(le){return typeof le=="object"&&le!==null&&le.$$typeof===e}function re(le){return I(le)===c}function U(le){return I(le)===n}function R(le){return I(le)===u}function Z(le){return I(le)===f}function ae(le){return I(le)===t}function ee(le){return I(le)===a}function de(le){return I(le)===r}function ie(le){return I(le)===p}$e.ContextConsumer=k,$e.ContextProvider=V,$e.Element=A,$e.ForwardRef=w,$e.Fragment=P,$e.Lazy=O,$e.Memo=$,$e.Portal=z,$e.Profiler=L,$e.StrictMode=J,$e.Suspense=B,$e.isAsyncMode=q,$e.isConcurrentMode=oe,$e.isContextConsumer=W,$e.isContextProvider=j,$e.isElement=ne,$e.isForwardRef=re,$e.isFragment=U,$e.isLazy=R,$e.isMemo=Z,$e.isPortal=ae,$e.isProfiler=ee,$e.isStrictMode=de,$e.isSuspense=ie,$e.isValidElementType=M,$e.typeOf=I}()),$e}process.env.NODE_ENV==="production"?cs.exports=QS():cs.exports=eg();var jc=cs.exports,tg=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],ng=["reactReduxForwardedRef"],rg=[],og=[null,null],ag=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function sg(e,t){var n=e[1];return[t.payload,n+1]}function qc(e,t,n){Fc(function(){return e.apply(void 0,t)},n)}function ig(e,t,n,r,a,s,l){e.current=r,t.current=a,n.current=!1,s.current&&(s.current=null,l())}function lg(e,t,n,r,a,s,l,c,p,m){if(e){var f=!1,u=null,h=function(){if(!f){var T=t.getState(),C,E;try{C=r(T,a.current)}catch(N){E=N,u=N}E||(u=null),C===s.current?l.current||p():(s.current=C,c.current=C,l.current=!0,m({type:"STORE_UPDATED",payload:{error:E}}))}};n.onStateChange=h,n.trySubscribe(),h();var S=function(){if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return S}}var cg=function(){return[null,0]};function dg(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,a=r===void 0?function(V){return"ConnectAdvanced("+V+")"}:r,s=n.methodName,l=s===void 0?"connectAdvanced":s,c=n.renderCountProp,p=c===void 0?void 0:c,m=n.shouldHandleStateChanges,f=m===void 0?!0:m,u=n.storeKey,h=u===void 0?"store":u,S=n.withRef,y=S===void 0?!1:S,T=n.forwardRef,C=T===void 0?!1:T,E=n.context,N=E===void 0?ss:E,M=xo(n,tg);if(process.env.NODE_ENV!=="production"){if(p!==void 0)throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension");if(y)throw new Error("withRef is removed. To access the wrapped instance, use a ref on the connected component");var I="To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect";if(h!=="store")throw new Error("storeKey has been removed and does not do anything. "+I)}var k=N;return function(A){if(process.env.NODE_ENV!=="production"&&!jc.isValidElementType(A))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+ag(A)));var w=A.displayName||A.name||"Component",P=a(w),O=ye({},M,{getDisplayName:a,methodName:l,renderCountProp:p,shouldHandleStateChanges:f,storeKey:h,displayName:P,wrappedComponentName:w,WrappedComponent:A}),$=M.pure;function z(H){return e(H.dispatch,O)}var L=$?x.useMemo:function(H){return H()};function J(H){var q=x.useMemo(function(){var ve=H.reactReduxForwardedRef,Le=xo(H,ng);return[H.context,ve,Le]},[H]),oe=q[0],W=q[1],j=q[2],ne=x.useMemo(function(){return oe&&oe.Consumer&&jc.isContextConsumer(x.createElement(oe.Consumer,null))?oe:k},[oe,k]),re=x.useContext(ne),U=!!H.store&&!!H.store.getState&&!!H.store.dispatch,R=!!re&&!!re.store;if(process.env.NODE_ENV!=="production"&&!U&&!R)throw new Error('Could not find "store" in the context of '+('"'+P+'". Either wrap the root component in a <Provider>, ')+"or pass a custom React context provider to <Provider> and the corresponding "+("React context consumer to "+P+" in connect options."));var Z=U?H.store:re.store,ae=x.useMemo(function(){return z(Z)},[Z]),ee=x.useMemo(function(){if(!f)return og;var ve=Ac(Z,U?null:re.subscription),Le=ve.notifyNestedSubs.bind(ve);return[ve,Le]},[Z,U,re]),de=ee[0],ie=ee[1],le=x.useMemo(function(){return U?re:ye({},re,{subscription:de})},[U,re,de]),se=x.useReducer(sg,rg,cg),Ne=se[0],ke=Ne[0],it=se[1];if(ke&&ke.error)throw ke.error;var lt=x.useRef(),ut=x.useRef(j),ct=x.useRef(),Pt=x.useRef(!1),je=L(function(){return ct.current&&j===ut.current?ct.current:ae(Z.getState(),j)},[Z,ke,j]);qc(ig,[ut,lt,Pt,j,je,ct,ie]),qc(lg,[f,Z,de,ae,ut,lt,Pt,ct,ie,it],[Z,de,ae]);var fe=x.useMemo(function(){return x.createElement(A,ye({},je,{ref:W}))},[W,A,je]),Fe=x.useMemo(function(){return f?x.createElement(ne.Provider,{value:le},fe):fe},[ne,fe,le]);return Fe}var B=$?x.memo(J):J;if(B.WrappedComponent=A,B.displayName=J.displayName=P,C){var te=x.forwardRef(function(q,oe){return x.createElement(B,ye({},q,{reactReduxForwardedRef:oe}))});return te.displayName=P,te.WrappedComponent=A,Yc(te,A)}return Yc(B,A)}}function Jc(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ds(e,t){if(Jc(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Jc(e[n[a]],t[n[a]]))return!1;return!0}function pg(e,t){var n={},r=function(l){var c=e[l];typeof c=="function"&&(n[l]=function(){return t(c.apply(void 0,arguments))})};for(var a in e)r(a);return n}function ug(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function Zc(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Xc(e,t,n){ug(e)||Zc(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function ps(e){return function(n,r){var a=e(n,r);function s(){return a}return s.dependsOnOwnProps=!1,s}}function Qc(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function ed(e,t){return function(r,a){var s=a.displayName,l=function(p,m){return l.dependsOnOwnProps?l.mapToProps(p,m):l.mapToProps(p)};return l.dependsOnOwnProps=!0,l.mapToProps=function(p,m){l.mapToProps=e,l.dependsOnOwnProps=Qc(e);var f=l(p,m);return typeof f=="function"&&(l.mapToProps=f,l.dependsOnOwnProps=Qc(f),f=l(p,m)),process.env.NODE_ENV!=="production"&&Xc(f,s,t),f},l}}function mg(e){return typeof e=="function"?ed(e,"mapDispatchToProps"):void 0}function fg(e){return e?void 0:ps(function(t){return{dispatch:t}})}function hg(e){return e&&typeof e=="object"?ps(function(t){return pg(e,t)}):void 0}const Sg=[mg,fg,hg];function gg(e){return typeof e=="function"?ed(e,"mapStateToProps"):void 0}function bg(e){return e?void 0:ps(function(){return{}})}const vg=[gg,bg];function yg(e,t,n){return ye({},n,e,t)}function Tg(e){return function(n,r){var a=r.displayName,s=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(f,u,h){var S=e(f,u,h);return c?(!s||!l(S,p))&&(p=S):(c=!0,p=S,process.env.NODE_ENV!=="production"&&Xc(p,a,"mergeProps")),p}}}function Eg(e){return typeof e=="function"?Tg(e):void 0}function wg(e){return e?void 0:function(){return yg}}const Cg=[Eg,wg];function us(e,t,n){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||Zc("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps."));else throw new Error("Unexpected value for "+t+" in "+n+".")}function Dg(e,t,n,r){us(e,"mapStateToProps",r),us(t,"mapDispatchToProps",r),us(n,"mergeProps",r)}var Ng=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function kg(e,t,n,r){return function(s,l){return n(e(s,l),t(r,l),l)}}function Ig(e,t,n,r,a){var s=a.areStatesEqual,l=a.areOwnPropsEqual,c=a.areStatePropsEqual,p=!1,m,f,u,h,S;function y(M,I){return m=M,f=I,u=e(m,f),h=t(r,f),S=n(u,h,f),p=!0,S}function T(){return u=e(m,f),t.dependsOnOwnProps&&(h=t(r,f)),S=n(u,h,f),S}function C(){return e.dependsOnOwnProps&&(u=e(m,f)),t.dependsOnOwnProps&&(h=t(r,f)),S=n(u,h,f),S}function E(){var M=e(m,f),I=!c(M,u);return u=M,I&&(S=n(u,h,f)),S}function N(M,I){var k=!l(I,f),V=!s(M,m,I,f);return m=M,f=I,k&&V?T():k?C():V?E():S}return function(I,k){return p?N(I,k):y(I,k)}}function xg(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,s=xo(t,Ng),l=n(e,s),c=r(e,s),p=a(e,s);process.env.NODE_ENV!=="production"&&Dg(l,c,p,s.displayName);var m=s.pure?Ig:kg;return m(l,c,p,e,s)}var Mg=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ms(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(s,l){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+l.wrappedComponentName+".")}}function _g(e,t){return e===t}function Lg(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?dg:n,a=t.mapStateToPropsFactories,s=a===void 0?vg:a,l=t.mapDispatchToPropsFactories,c=l===void 0?Sg:l,p=t.mergePropsFactories,m=p===void 0?Cg:p,f=t.selectorFactory,u=f===void 0?xg:f;return function(S,y,T,C){C===void 0&&(C={});var E=C,N=E.pure,M=N===void 0?!0:N,I=E.areStatesEqual,k=I===void 0?_g:I,V=E.areOwnPropsEqual,A=V===void 0?ds:V,w=E.areStatePropsEqual,P=w===void 0?ds:w,O=E.areMergedPropsEqual,$=O===void 0?ds:O,z=xo(E,Mg),L=ms(S,s,"mapStateToProps"),J=ms(y,c,"mapDispatchToProps"),B=ms(T,m,"mergeProps");return r(u,ye({methodName:"connect",getDisplayName:function(H){return"Connect("+H+")"},shouldHandleStateChanges:!!S,initMapStateToProps:L,initMapDispatchToProps:J,initMergeProps:B,pure:M,areStatesEqual:k,areOwnPropsEqual:A,areStatePropsEqual:P,areMergedPropsEqual:$},z))}}const td=Lg();HS(bo.unstable_batchedUpdates);function Og(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function nd(e,t){var n=x.useState(function(){return{inputs:t,result:e()}})[0],r=x.useRef(!0),a=x.useRef(n),s=r.current||!!(t&&a.current.inputs&&Og(t,a.current.inputs)),l=s?a.current:{inputs:t,result:e()};return x.useEffect(function(){r.current=!1,a.current=l},[l]),l.result}function Pg(e,t){return nd(function(){return e},t)}var Me=nd,ge=Pg,Rg=process.env.NODE_ENV==="production",fs="Invariant failed";function rd(e,t){if(Rg)throw new Error(fs);var n=typeof t=="function"?t():t,r=n?"".concat(fs,": ").concat(n):fs;throw new Error(r)}var At=function(t){var n=t.top,r=t.right,a=t.bottom,s=t.left,l=r-s,c=a-n,p={top:n,right:r,bottom:a,left:s,width:l,height:c,x:s,y:n,center:{x:(r+s)/2,y:(a+n)/2}};return p},hs=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},od=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Bg=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Ss={top:0,right:0,bottom:0,left:0},gs=function(t){var n=t.borderBox,r=t.margin,a=r===void 0?Ss:r,s=t.border,l=s===void 0?Ss:s,c=t.padding,p=c===void 0?Ss:c,m=At(hs(n,a)),f=At(od(n,l)),u=At(od(f,p));return{marginBox:m,borderBox:At(n),paddingBox:f,contentBox:u,margin:a,border:l,padding:p}},xt=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var a=Number(n);return isNaN(a)&&(process.env.NODE_ENV!=="production"?rd(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):rd()),a},Ag=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Mo=function(t,n){var r=t.borderBox,a=t.border,s=t.margin,l=t.padding,c=Bg(r,n);return gs({borderBox:c,border:a,margin:s,padding:l})},_o=function(t,n){return n===void 0&&(n=Ag()),Mo(t,n)},ad=function(t,n){var r={top:xt(n.marginTop),right:xt(n.marginRight),bottom:xt(n.marginBottom),left:xt(n.marginLeft)},a={top:xt(n.paddingTop),right:xt(n.paddingRight),bottom:xt(n.paddingBottom),left:xt(n.paddingLeft)},s={top:xt(n.borderTopWidth),right:xt(n.borderRightWidth),bottom:xt(n.borderBottomWidth),left:xt(n.borderLeftWidth)};return gs({borderBox:t,margin:r,padding:a,border:s})},sd=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return ad(n,r)},id=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Fg(e,t){return!!(e===t||id(e)&&id(t))}function Vg(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Fg(e[n],t[n]))return!1;return!0}function tt(e,t){t===void 0&&(t=Vg);var n,r=[],a,s=!1;function l(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return s&&n===this&&t(c,r)||(a=e.apply(this,c),s=!0,n=this,r=c),a}return l}var Fr=function(t){var n=[],r=null,a=function(){for(var l=arguments.length,c=new Array(l),p=0;p<l;p++)c[p]=arguments[p];n=c,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return a.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},a},$g=process.env.NODE_ENV==="production",Kg=/[ \t]{2,}/g,Hg=/^[ \t]*/gm,ld=function(t){return t.replace(Kg," ").replace(Hg,"").trim()},Wg=function(t){return ld(`
|
|
359
|
+
*/var zc;function eg(){return zc||(zc=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,a=60114,s=60109,l=60110,c=60112,p=60113,m=60120,f=60115,u=60116,h=60121,S=60122,y=60117,T=60129,C=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),n=E("react.fragment"),r=E("react.strict_mode"),a=E("react.profiler"),s=E("react.provider"),l=E("react.context"),c=E("react.forward_ref"),p=E("react.suspense"),m=E("react.suspense_list"),f=E("react.memo"),u=E("react.lazy"),h=E("react.block"),S=E("react.server.block"),y=E("react.fundamental"),E("react.scope"),E("react.opaque.id"),T=E("react.debug_trace_mode"),E("react.offscreen"),C=E("react.legacy_hidden")}var N=!1;function M(le){return!!(typeof le=="string"||typeof le=="function"||le===n||le===a||le===T||le===r||le===p||le===m||le===C||N||typeof le=="object"&&le!==null&&(le.$$typeof===u||le.$$typeof===f||le.$$typeof===s||le.$$typeof===l||le.$$typeof===c||le.$$typeof===y||le.$$typeof===h||le[0]===S))}function I(le){if(typeof le=="object"&&le!==null){var se=le.$$typeof;switch(se){case e:var Ne=le.type;switch(Ne){case n:case a:case r:case p:case m:return Ne;default:var ke=Ne&&Ne.$$typeof;switch(ke){case l:case c:case u:case f:case s:return ke;default:return se}}case t:return se}}}var k=l,V=s,A=e,w=c,P=n,O=u,$=f,z=t,L=a,J=r,B=p,te=!1,H=!1;function q(le){return te||(te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function oe(le){return H||(H=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(le){return I(le)===l}function j(le){return I(le)===s}function ne(le){return typeof le=="object"&&le!==null&&le.$$typeof===e}function re(le){return I(le)===c}function U(le){return I(le)===n}function R(le){return I(le)===u}function Z(le){return I(le)===f}function ae(le){return I(le)===t}function ee(le){return I(le)===a}function de(le){return I(le)===r}function ie(le){return I(le)===p}$e.ContextConsumer=k,$e.ContextProvider=V,$e.Element=A,$e.ForwardRef=w,$e.Fragment=P,$e.Lazy=O,$e.Memo=$,$e.Portal=z,$e.Profiler=L,$e.StrictMode=J,$e.Suspense=B,$e.isAsyncMode=q,$e.isConcurrentMode=oe,$e.isContextConsumer=W,$e.isContextProvider=j,$e.isElement=ne,$e.isForwardRef=re,$e.isFragment=U,$e.isLazy=R,$e.isMemo=Z,$e.isPortal=ae,$e.isProfiler=ee,$e.isStrictMode=de,$e.isSuspense=ie,$e.isValidElementType=M,$e.typeOf=I}()),$e}process.env.NODE_ENV==="production"?cs.exports=QS():cs.exports=eg();var jc=cs.exports,tg=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],ng=["reactReduxForwardedRef"],rg=[],og=[null,null],ag=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function sg(e,t){var n=e[1];return[t.payload,n+1]}function qc(e,t,n){Fc(function(){return e.apply(void 0,t)},n)}function ig(e,t,n,r,a,s,l){e.current=r,t.current=a,n.current=!1,s.current&&(s.current=null,l())}function lg(e,t,n,r,a,s,l,c,p,m){if(e){var f=!1,u=null,h=function(){if(!f){var T=t.getState(),C,E;try{C=r(T,a.current)}catch(N){E=N,u=N}E||(u=null),C===s.current?l.current||p():(s.current=C,c.current=C,l.current=!0,m({type:"STORE_UPDATED",payload:{error:E}}))}};n.onStateChange=h,n.trySubscribe(),h();var S=function(){if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return S}}var cg=function(){return[null,0]};function dg(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,a=r===void 0?function(V){return"ConnectAdvanced("+V+")"}:r,s=n.methodName,l=s===void 0?"connectAdvanced":s,c=n.renderCountProp,p=c===void 0?void 0:c,m=n.shouldHandleStateChanges,f=m===void 0?!0:m,u=n.storeKey,h=u===void 0?"store":u,S=n.withRef,y=S===void 0?!1:S,T=n.forwardRef,C=T===void 0?!1:T,E=n.context,N=E===void 0?ss:E,M=xo(n,tg);if(process.env.NODE_ENV!=="production"){if(p!==void 0)throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension");if(y)throw new Error("withRef is removed. To access the wrapped instance, use a ref on the connected component");var I="To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect";if(h!=="store")throw new Error("storeKey has been removed and does not do anything. "+I)}var k=N;return function(A){if(process.env.NODE_ENV!=="production"&&!jc.isValidElementType(A))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+ag(A)));var w=A.displayName||A.name||"Component",P=a(w),O=ye({},M,{getDisplayName:a,methodName:l,renderCountProp:p,shouldHandleStateChanges:f,storeKey:h,displayName:P,wrappedComponentName:w,WrappedComponent:A}),$=M.pure;function z(H){return e(H.dispatch,O)}var L=$?x.useMemo:function(H){return H()};function J(H){var q=x.useMemo(function(){var ve=H.reactReduxForwardedRef,Le=xo(H,ng);return[H.context,ve,Le]},[H]),oe=q[0],W=q[1],j=q[2],ne=x.useMemo(function(){return oe&&oe.Consumer&&jc.isContextConsumer(x.createElement(oe.Consumer,null))?oe:k},[oe,k]),re=x.useContext(ne),U=!!H.store&&!!H.store.getState&&!!H.store.dispatch,R=!!re&&!!re.store;if(process.env.NODE_ENV!=="production"&&!U&&!R)throw new Error('Could not find "store" in the context of '+('"'+P+'". Either wrap the root component in a <Provider>, ')+"or pass a custom React context provider to <Provider> and the corresponding "+("React context consumer to "+P+" in connect options."));var Z=U?H.store:re.store,ae=x.useMemo(function(){return z(Z)},[Z]),ee=x.useMemo(function(){if(!f)return og;var ve=Ac(Z,U?null:re.subscription),Le=ve.notifyNestedSubs.bind(ve);return[ve,Le]},[Z,U,re]),de=ee[0],ie=ee[1],le=x.useMemo(function(){return U?re:ye({},re,{subscription:de})},[U,re,de]),se=x.useReducer(sg,rg,cg),Ne=se[0],ke=Ne[0],it=se[1];if(ke&&ke.error)throw ke.error;var lt=x.useRef(),ut=x.useRef(j),ct=x.useRef(),Pt=x.useRef(!1),je=L(function(){return ct.current&&j===ut.current?ct.current:ae(Z.getState(),j)},[Z,ke,j]);qc(ig,[ut,lt,Pt,j,je,ct,ie]),qc(lg,[f,Z,de,ae,ut,lt,Pt,ct,ie,it],[Z,de,ae]);var fe=x.useMemo(function(){return x.createElement(A,ye({},je,{ref:W}))},[W,A,je]),Fe=x.useMemo(function(){return f?x.createElement(ne.Provider,{value:le},fe):fe},[ne,fe,le]);return Fe}var B=$?x.memo(J):J;if(B.WrappedComponent=A,B.displayName=J.displayName=P,C){var te=x.forwardRef(function(q,oe){return x.createElement(B,ye({},q,{reactReduxForwardedRef:oe}))});return te.displayName=P,te.WrappedComponent=A,Yc(te,A)}return Yc(B,A)}}function Jc(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ds(e,t){if(Jc(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Jc(e[n[a]],t[n[a]]))return!1;return!0}function pg(e,t){var n={},r=function(l){var c=e[l];typeof c=="function"&&(n[l]=function(){return t(c.apply(void 0,arguments))})};for(var a in e)r(a);return n}function ug(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function Zc(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Xc(e,t,n){ug(e)||Zc(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function ps(e){return function(n,r){var a=e(n,r);function s(){return a}return s.dependsOnOwnProps=!1,s}}function Qc(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function ed(e,t){return function(r,a){var s=a.displayName,l=function(p,m){return l.dependsOnOwnProps?l.mapToProps(p,m):l.mapToProps(p)};return l.dependsOnOwnProps=!0,l.mapToProps=function(p,m){l.mapToProps=e,l.dependsOnOwnProps=Qc(e);var f=l(p,m);return typeof f=="function"&&(l.mapToProps=f,l.dependsOnOwnProps=Qc(f),f=l(p,m)),process.env.NODE_ENV!=="production"&&Xc(f,s,t),f},l}}function mg(e){return typeof e=="function"?ed(e,"mapDispatchToProps"):void 0}function fg(e){return e?void 0:ps(function(t){return{dispatch:t}})}function hg(e){return e&&typeof e=="object"?ps(function(t){return pg(e,t)}):void 0}const Sg=[mg,fg,hg];function gg(e){return typeof e=="function"?ed(e,"mapStateToProps"):void 0}function bg(e){return e?void 0:ps(function(){return{}})}const vg=[gg,bg];function yg(e,t,n){return ye({},n,e,t)}function Tg(e){return function(n,r){var a=r.displayName,s=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(f,u,h){var S=e(f,u,h);return c?(!s||!l(S,p))&&(p=S):(c=!0,p=S,process.env.NODE_ENV!=="production"&&Xc(p,a,"mergeProps")),p}}}function Eg(e){return typeof e=="function"?Tg(e):void 0}function wg(e){return e?void 0:function(){return yg}}const Cg=[Eg,wg];function us(e,t,n){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||Zc("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps."));else throw new Error("Unexpected value for "+t+" in "+n+".")}function Dg(e,t,n,r){us(e,"mapStateToProps",r),us(t,"mapDispatchToProps",r),us(n,"mergeProps",r)}var Ng=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function kg(e,t,n,r){return function(s,l){return n(e(s,l),t(r,l),l)}}function Ig(e,t,n,r,a){var s=a.areStatesEqual,l=a.areOwnPropsEqual,c=a.areStatePropsEqual,p=!1,m,f,u,h,S;function y(M,I){return m=M,f=I,u=e(m,f),h=t(r,f),S=n(u,h,f),p=!0,S}function T(){return u=e(m,f),t.dependsOnOwnProps&&(h=t(r,f)),S=n(u,h,f),S}function C(){return e.dependsOnOwnProps&&(u=e(m,f)),t.dependsOnOwnProps&&(h=t(r,f)),S=n(u,h,f),S}function E(){var M=e(m,f),I=!c(M,u);return u=M,I&&(S=n(u,h,f)),S}function N(M,I){var k=!l(I,f),V=!s(M,m,I,f);return m=M,f=I,k&&V?T():k?C():V?E():S}return function(I,k){return p?N(I,k):y(I,k)}}function xg(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,s=xo(t,Ng),l=n(e,s),c=r(e,s),p=a(e,s);process.env.NODE_ENV!=="production"&&Dg(l,c,p,s.displayName);var m=s.pure?Ig:kg;return m(l,c,p,e,s)}var Mg=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ms(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(s,l){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+l.wrappedComponentName+".")}}function _g(e,t){return e===t}function Lg(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?dg:n,a=t.mapStateToPropsFactories,s=a===void 0?vg:a,l=t.mapDispatchToPropsFactories,c=l===void 0?Sg:l,p=t.mergePropsFactories,m=p===void 0?Cg:p,f=t.selectorFactory,u=f===void 0?xg:f;return function(S,y,T,C){C===void 0&&(C={});var E=C,N=E.pure,M=N===void 0?!0:N,I=E.areStatesEqual,k=I===void 0?_g:I,V=E.areOwnPropsEqual,A=V===void 0?ds:V,w=E.areStatePropsEqual,P=w===void 0?ds:w,O=E.areMergedPropsEqual,$=O===void 0?ds:O,z=xo(E,Mg),L=ms(S,s,"mapStateToProps"),J=ms(y,c,"mapDispatchToProps"),B=ms(T,m,"mergeProps");return r(u,ye({methodName:"connect",getDisplayName:function(H){return"Connect("+H+")"},shouldHandleStateChanges:!!S,initMapStateToProps:L,initMapDispatchToProps:J,initMergeProps:B,pure:M,areStatesEqual:k,areOwnPropsEqual:A,areStatePropsEqual:P,areMergedPropsEqual:$},z))}}const td=Lg();HS(bo.unstable_batchedUpdates);function Og(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function nd(e,t){var n=x.useState(function(){return{inputs:t,result:e()}})[0],r=x.useRef(!0),a=x.useRef(n),s=r.current||!!(t&&a.current.inputs&&Og(t,a.current.inputs)),l=s?a.current:{inputs:t,result:e()};return x.useEffect(function(){r.current=!1,a.current=l},[l]),l.result}function Pg(e,t){return nd(function(){return e},t)}var Me=nd,ge=Pg,Rg=process.env.NODE_ENV==="production",fs="Invariant failed";function rd(e,t){if(Rg)throw new Error(fs);var n=typeof t=="function"?t():t,r=n?"".concat(fs,": ").concat(n):fs;throw new Error(r)}var At=function(t){var n=t.top,r=t.right,a=t.bottom,s=t.left,l=r-s,c=a-n,p={top:n,right:r,bottom:a,left:s,width:l,height:c,x:s,y:n,center:{x:(r+s)/2,y:(a+n)/2}};return p},hs=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},od=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Bg=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Ss={top:0,right:0,bottom:0,left:0},gs=function(t){var n=t.borderBox,r=t.margin,a=r===void 0?Ss:r,s=t.border,l=s===void 0?Ss:s,c=t.padding,p=c===void 0?Ss:c,m=At(hs(n,a)),f=At(od(n,l)),u=At(od(f,p));return{marginBox:m,borderBox:At(n),paddingBox:f,contentBox:u,margin:a,border:l,padding:p}},xt=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var a=Number(n);return isNaN(a)&&(process.env.NODE_ENV!=="production"?rd(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):rd()),a},Ag=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Mo=function(t,n){var r=t.borderBox,a=t.border,s=t.margin,l=t.padding,c=Bg(r,n);return gs({borderBox:c,border:a,margin:s,padding:l})},_o=function(t,n){return n===void 0&&(n=Ag()),Mo(t,n)},ad=function(t,n){var r={top:xt(n.marginTop),right:xt(n.marginRight),bottom:xt(n.marginBottom),left:xt(n.marginLeft)},a={top:xt(n.paddingTop),right:xt(n.paddingRight),bottom:xt(n.paddingBottom),left:xt(n.paddingLeft)},s={top:xt(n.borderTopWidth),right:xt(n.borderRightWidth),bottom:xt(n.borderBottomWidth),left:xt(n.borderLeftWidth)};return gs({borderBox:t,margin:r,padding:a,border:s})},sd=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return ad(n,r)},id=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Fg(e,t){return!!(e===t||id(e)&&id(t))}function Vg(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Fg(e[n],t[n]))return!1;return!0}function nt(e,t){t===void 0&&(t=Vg);var n,r=[],a,s=!1;function l(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return s&&n===this&&t(c,r)||(a=e.apply(this,c),s=!0,n=this,r=c),a}return l}var Fr=function(t){var n=[],r=null,a=function(){for(var l=arguments.length,c=new Array(l),p=0;p<l;p++)c[p]=arguments[p];n=c,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return a.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},a},$g=process.env.NODE_ENV==="production",Kg=/[ \t]{2,}/g,Hg=/^[ \t]*/gm,ld=function(t){return t.replace(Kg," ").replace(Hg,"").trim()},Wg=function(t){return ld(`
|
|
360
360
|
%creact-beautiful-dnd
|
|
361
361
|
|
|
362
362
|
%c`+ld(t)+`
|
|
@@ -401,7 +401,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var se=le(ae,ie,U,R,Z+".
|
|
|
401
401
|
`:`
|
|
402
402
|
The item has been dropped while not over a drop area.
|
|
403
403
|
`+md(t.source)+`
|
|
404
|
-
`},Oo={dragHandleUsageInstructions:qg,onDragStart:Jg,onDragUpdate:Zg,onDragEnd:Xg},nt={x:0,y:0},st=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},wt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},vn=function(t,n){return t.x===n.x&&t.y===n.y},ur=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},$n=function(t,n,r){var a;return r===void 0&&(r=0),a={},a[t]=n,a[t==="x"?"y":"x"]=r,a},$r=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},fd=function(t,n){return Math.min.apply(Math,n.map(function(r){return $r(t,r)}))},hd=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},Qg=function(e,t){var n=At({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},Kr=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Sd=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},eb={top:0,right:0,bottom:0,left:0},tb=function(t,n){return n?Kr(t,n.scroll.diff.displacement):t},nb=function(t,n,r){if(r&&r.increasedBy){var a;return ye({},t,(a={},a[n.end]=t[n.end]+r.increasedBy[n.line],a))}return t},rb=function(t,n){return n&&n.shouldClipSubject?Qg(n.pageMarginBox,t):At(t)},mr=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,a=e.frame,s=tb(t.marginBox,a),l=nb(s,r,n),c=rb(l,a);return{page:t,withPlaceholder:n,active:c}},vs=function(e,t){e.frame||(process.env.NODE_ENV,K());var n=e.frame,r=wt(t,n.scroll.initial),a=ur(r),s=ye({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}}),l=mr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s}),c=ye({},e,{frame:s,subject:l});return c};function ob(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Po(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function ys(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function yn(e,t){if(e.find)return e.find(t);var n=ys(e,t);if(n!==-1)return e[n]}function gd(e){return Array.prototype.slice.call(e)}var bd=tt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),vd=tt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Ro=tt(function(e){return Po(e)}),ab=tt(function(e){return Po(e)}),Kn=tt(function(e,t){var n=ab(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,a){return r.descriptor.index-a.descriptor.index});return n});function Ts(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Bo(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Ao=tt(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),sb=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.previousImpact;if(!r.isCombineEnabled)return null;var l=Ts(s);if(!l)return null;function c(T){var C={type:"COMBINE",combine:{draggableId:T,droppableId:r.descriptor.id}};return ye({},s,{at:C})}var p=s.displaced.all,m=p.length?p[0]:null;if(t)return m?c(m):null;var f=Ao(n,a);if(!m){if(!f.length)return null;var u=f[f.length-1];return c(u.descriptor.id)}var h=ys(f,function(T){return T.descriptor.id===m});h===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find displaced item in set"):K());var S=h-1;if(S<0)return null;var y=f[S];return c(y.descriptor.id)},fr=function(e,t){return e.descriptor.droppableId===t.descriptor.id},yd={point:nt,value:0},Hr={invisible:{},visible:{},all:[]},ib={displaced:Hr,displacedBy:yd,at:null},_t=function(e,t){return function(n){return e<=n&&n<=t}},Td=function(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(a)return!0;var s=t(r.top)||t(r.bottom),l=n(r.left)||n(r.right),c=s&&l;if(c)return!0;var p=r.top<e.top&&r.bottom>e.bottom,m=r.left<e.left&&r.right>e.right,f=p&&m;if(f)return!0;var u=p&&l||m&&s;return u}},lb=function(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return a}},Es={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Ed={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},cb=function(e){return function(t){var n=_t(t.top,t.bottom),r=_t(t.left,t.right);return function(a){return e===Es?n(a.top)&&n(a.bottom):r(a.left)&&r(a.right)}}},db=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:nt;return Kr(t,r)},pb=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},ub=function(t,n,r){return r(n)(t)},ws=function(t){var n=t.target,r=t.destination,a=t.viewport,s=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,c=s?db(n,r):n;return pb(c,r,l)&&ub(c,a,l)},mb=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:Td}))},wd=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:lb}))},fb=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:cb(t.destination.axis)}))},hb=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var a=n.invisible,s=n.visible;if(a[t])return!1;var l=s[t];return l?l.shouldAnimate:!0};function Sb(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return At(hs(n,r))}function Wr(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,a=e.viewport,s=e.forceShouldAnimate,l=e.last;return t.reduce(function(p,m){var f=Sb(m,r),u=m.descriptor.id;p.all.push(u);var h=mb({target:f,destination:n,viewport:a,withDroppableDisplacement:!0});if(!h)return p.invisible[m.descriptor.id]=!0,p;var S=hb(u,l,s),y={draggableId:u,shouldAnimate:S};return p.visible[u]=y,p},{all:[],visible:{},invisible:{}})}function gb(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function Cd(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,a=e.destination,s=gb(t,{inHomeList:n});return{displaced:Hr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:s}}}}function Fo(e){var t=e.draggable,n=e.insideDestination,r=e.destination,a=e.viewport,s=e.displacedBy,l=e.last,c=e.index,p=e.forceShouldAnimate,m=fr(t,r);if(c==null)return Cd({insideDestination:n,inHomeList:m,displacedBy:s,destination:r});var f=yn(n,function(T){return T.descriptor.index===c});if(!f)return Cd({insideDestination:n,inHomeList:m,displacedBy:s,destination:r});var u=Ao(t,n),h=n.indexOf(f),S=u.slice(h),y=Wr({afterDragging:S,destination:r,displacedBy:s,last:l,viewport:a.frame,forceShouldAnimate:p});return{displaced:y,displacedBy:s,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:c}}}}function Tn(e,t){return!!t.effected[e]}var bb=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,a=e.combine,s=e.afterCritical;if(!n.isCombineEnabled)return null;var l=a.draggableId,c=r[l],p=c.descriptor.index,m=Tn(l,s);return m?t?p:p-1:t?p+1:p},vb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,a=e.location;if(!r.length)return null;var s=a.index,l=t?s+1:s-1,c=r[0].descriptor.index,p=r[r.length-1].descriptor.index,m=n?p:p+1;return l<c||l>m?null:l},yb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,a=e.draggables,s=e.destination,l=e.insideDestination,c=e.previousImpact,p=e.viewport,m=e.afterCritical,f=c.at;if(f||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move in direction without previous impact location"):K()),f.type==="REORDER"){var u=vb({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:l});return u==null?null:Fo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:u})}var h=bb({isMovingForward:t,destination:s,displaced:c.displaced,draggables:a,combine:f.combine,afterCritical:m});return h==null?null:Fo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:h})},Tb=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,a=e.displacedBy,s=!!(t.visible[r]||t.invisible[r]);return Tn(r,n)?s?nt:ur(a.point):s?a.point:nt},Eb=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,a=Bo(n);a||(process.env.NODE_ENV,K());var s=a.draggableId,l=r[s].page.borderBox.center,c=Tb({displaced:n.displaced,afterCritical:t,combineWith:s,displacedBy:n.displacedBy});return st(l,c)},Dd=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},wb=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Cs=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},Nd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.end]+Dd(n,a),Cs(n,r.marginBox,a))},kd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.start]-wb(n,a),Cs(n,r.marginBox,a))},Cb=function(t){var n=t.axis,r=t.moveInto,a=t.isMoving;return $n(n.line,r.contentBox[n.start]+Dd(n,a),Cs(n,r.contentBox,a))},Db=function(e){var t=e.impact,n=e.draggable,r=e.draggables,a=e.droppable,s=e.afterCritical,l=Kn(a.descriptor.id,r),c=n.page,p=a.axis;if(!l.length)return Cb({axis:p,moveInto:a.page,isMoving:c});var m=t.displaced,f=t.displacedBy,u=m.all[0];if(u){var h=r[u];if(Tn(u,s))return kd({axis:p,moveRelativeTo:h.page,isMoving:c});var S=Mo(h.page,f.point);return kd({axis:p,moveRelativeTo:S,isMoving:c})}var y=l[l.length-1];if(y.descriptor.id===n.descriptor.id)return c.borderBox.center;if(Tn(y.descriptor.id,s)){var T=Mo(y.page,ur(s.displacedBy.point));return Nd({axis:p,moveRelativeTo:T,isMoving:c})}return Nd({axis:p,moveRelativeTo:y.page,isMoving:c})},Ds=function(e,t){var n=e.frame;return n?st(t,n.scroll.diff.displacement):t},Nb=function(t){var n=t.impact,r=t.draggable,a=t.droppable,s=t.draggables,l=t.afterCritical,c=r.page.borderBox.center,p=n.at;return!a||!p?c:p.type==="REORDER"?Db({impact:n,draggable:r,draggables:s,droppable:a,afterCritical:l}):Eb({impact:n,draggables:s,afterCritical:l})},Vo=function(e){var t=Nb(e),n=e.droppable,r=n?Ds(n,t):t;return r},Id=function(e,t){var n=wt(t,e.scroll.initial),r=ur(n),a=At({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),s={frame:a,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return s};function xd(e,t){return e.map(function(n){return t[n]})}function kb(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var Ib=function(e){var t=e.impact,n=e.viewport,r=e.destination,a=e.draggables,s=e.maxScrollChange,l=Id(n,st(n.scroll.current,s)),c=r.frame?vs(r,st(r.frame.scroll.current,s)):r,p=t.displaced,m=Wr({afterDragging:xd(p.all,a),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:p,forceShouldAnimate:!1}),f=Wr({afterDragging:xd(p.all,a),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),u={},h={},S=[p,m,f];p.all.forEach(function(T){var C=kb(T,S);if(C){h[T]=C;return}u[T]=!0});var y=ye({},t,{displaced:{all:p.all,invisible:u,visible:h}});return y},xb=function(e,t){return st(e.scroll.diff.displacement,t)},Ns=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,a=xb(r,t),s=wt(a,n.page.borderBox.center);return st(n.client.borderBox.center,s)},Md=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,a=e.viewport,s=e.withDroppableDisplacement,l=e.onlyOnMainAxis,c=l===void 0?!1:l,p=wt(r,t.page.borderBox.center),m=Kr(t.page.borderBox,p),f={target:m,destination:n,withDroppableDisplacement:s,viewport:a};return c?fb(f):wd(f)},Mb=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.draggables,s=e.previousImpact,l=e.viewport,c=e.previousPageBorderBoxCenter,p=e.previousClientSelection,m=e.afterCritical;if(!r.isEnabled)return null;var f=Kn(r.descriptor.id,a),u=fr(n,r),h=sb({isMovingForward:t,draggable:n,destination:r,insideDestination:f,previousImpact:s})||yb({isMovingForward:t,isInHomeList:u,draggable:n,draggables:a,destination:r,insideDestination:f,previousImpact:s,viewport:l,afterCritical:m});if(!h)return null;var S=Vo({impact:h,draggable:n,droppable:r,draggables:a,afterCritical:m}),y=Md({draggable:n,destination:r,newPageBorderBoxCenter:S,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(y){var T=Ns({pageBorderBoxCenter:S,draggable:n,viewport:l});return{clientSelection:T,impact:h,scrollJumpRequest:null}}var C=wt(S,c),E=Ib({impact:h,viewport:l,destination:r,draggables:a,maxScrollChange:C});return{clientSelection:p,impact:E,scrollJumpRequest:C}},ht=function(t){var n=t.subject.active;return n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get clipped area from droppable"):K()),n},_b=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,a=e.droppables,s=e.viewport,l=r.subject.active;if(!l)return null;var c=r.axis,p=_t(l[c.start],l[c.end]),m=Ro(a).filter(function(u){return u!==r}).filter(function(u){return u.isEnabled}).filter(function(u){return!!u.subject.active}).filter(function(u){return Td(s.frame)(ht(u))}).filter(function(u){var h=ht(u);return t?l[c.crossAxisEnd]<h[c.crossAxisEnd]:h[c.crossAxisStart]<l[c.crossAxisStart]}).filter(function(u){var h=ht(u),S=_t(h[c.start],h[c.end]);return p(h[c.start])||p(h[c.end])||S(l[c.start])||S(l[c.end])}).sort(function(u,h){var S=ht(u)[c.crossAxisStart],y=ht(h)[c.crossAxisStart];return t?S-y:y-S}).filter(function(u,h,S){return ht(u)[c.crossAxisStart]===ht(S[0])[c.crossAxisStart]});if(!m.length)return null;if(m.length===1)return m[0];var f=m.filter(function(u){var h=_t(ht(u)[c.start],ht(u)[c.end]);return h(n[c.line])});return f.length===1?f[0]:f.length>1?f.sort(function(u,h){return ht(u)[c.start]-ht(h)[c.start]})[0]:m.sort(function(u,h){var S=fd(n,Sd(ht(u))),y=fd(n,Sd(ht(h)));return S!==y?S-y:ht(u)[c.start]-ht(h)[c.start]})[0]},_d=function(t,n){var r=t.page.borderBox.center;return Tn(t.descriptor.id,n)?wt(r,n.displacedBy.point):r},Lb=function(t,n){var r=t.page.borderBox;return Tn(t.descriptor.id,n)?Kr(r,ur(n.displacedBy.point)):r},Ob=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,a=e.insideDestination,s=e.afterCritical,l=a.filter(function(c){return wd({target:Lb(c,s),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(c,p){var m=$r(t,Ds(r,_d(c,s))),f=$r(t,Ds(r,_d(p,s)));return m<f?-1:f<m?1:c.descriptor.index-p.descriptor.index});return l[0]||null},Gr=tt(function(t,n){var r=n[t.line];return{value:r,point:$n(t.line,r)}}),Pb=function(t,n,r){var a=t.axis;if(t.descriptor.mode==="virtual")return $n(a.line,n[a.line]);var s=t.subject.page.contentBox[a.size],l=Kn(t.descriptor.id,r),c=l.reduce(function(f,u){return f+u.client.marginBox[a.size]},0),p=c+n[a.line],m=p-s;return m<=0?null:$n(a.line,m)},Ld=function(t,n){return ye({},t,{scroll:ye({},t.scroll,{max:n})})},Od=function(t,n,r){var a=t.frame;fr(n,t)&&(process.env.NODE_ENV!=="production"?K(!1,"Should not add placeholder space to home list"):K()),t.subject.withPlaceholder&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot add placeholder size to a subject when it already has one"):K());var s=Gr(t.axis,n.displaceBy).point,l=Pb(t,s,r),c={placeholderSize:s,increasedBy:l,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!a){var p=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:t.frame});return ye({},t,{subject:p})}var m=l?st(a.scroll.max,l):a.scroll.max,f=Ld(a,m),u=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:f});return ye({},t,{subject:u,frame:f})},Rb=function(t){var n=t.subject.withPlaceholder;n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot remove placeholder form subject when there was none"):K());var r=t.frame;if(!r){var a=mr({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ye({},t,{subject:a})}var s=n.oldFrameMaxScroll;s||(process.env.NODE_ENV!=="production"?K(!1,"Expected droppable with frame to have old max frame scroll when removing placeholder"):K());var l=Ld(r,s),c=mr({page:t.subject.page,axis:t.axis,frame:l,withPlaceholder:null});return ye({},t,{subject:c,frame:l})},Bb=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,a=e.draggable,s=e.draggables,l=e.destination,c=e.viewport,p=e.afterCritical;if(!n){if(r.length)return null;var m={displaced:Hr,displacedBy:yd,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},f=Vo({impact:m,draggable:a,droppable:l,draggables:s,afterCritical:p}),u=fr(a,l)?l:Od(l,a,s),h=Md({draggable:a,destination:u,newPageBorderBoxCenter:f,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return h?m:null}var S=t[l.axis.line]<=n.page.borderBox.center[l.axis.line],y=function(){var C=n.descriptor.index;return n.descriptor.id===a.descriptor.id||S?C:C+1}(),T=Gr(l.axis,a.displaceBy);return Fo({draggable:a,insideDestination:r,destination:l,viewport:c,displacedBy:T,last:Hr,index:y})},Ab=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,a=e.isOver,s=e.draggables,l=e.droppables,c=e.viewport,p=e.afterCritical,m=_b({isMovingForward:t,pageBorderBoxCenter:n,source:a,droppables:l,viewport:c});if(!m)return null;var f=Kn(m.descriptor.id,s),u=Ob({pageBorderBoxCenter:n,viewport:c,destination:m,insideDestination:f,afterCritical:p}),h=Bb({previousPageBorderBoxCenter:n,destination:m,draggable:r,draggables:s,moveRelativeTo:u,insideDestination:f,viewport:c,afterCritical:p});if(!h)return null;var S=Vo({impact:h,draggable:r,droppable:m,draggables:s,afterCritical:p}),y=Ns({pageBorderBoxCenter:S,draggable:r,viewport:c});return{clientSelection:y,impact:h,scrollJumpRequest:null}},Ct=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},Fb=function(t,n){var r=Ct(t);return r?n[r]:null},Vb=function(e){var t=e.state,n=e.type,r=Fb(t.impact,t.dimensions.droppables),a=!!r,s=t.dimensions.droppables[t.critical.droppable.id],l=r||s,c=l.axis.direction,p=c==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||c==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(p&&!a)return null;var m=n==="MOVE_DOWN"||n==="MOVE_RIGHT",f=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,h=t.dimensions,S=h.draggables,y=h.droppables;return p?Mb({isMovingForward:m,previousPageBorderBoxCenter:u,draggable:f,destination:l,draggables:S,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Ab({isMovingForward:m,previousPageBorderBoxCenter:u,draggable:f,isOver:l,draggables:S,droppables:y,viewport:t.viewport,afterCritical:t.afterCritical})};function Hn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Pd(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(a){return t(a.y)&&n(a.x)}}function $b(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Kb(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,a=n.page.borderBox.center,s=r.map(function(l){var c=l.axis,p=$n(l.axis.line,t.center[c.line],l.page.borderBox.center[c.crossAxisLine]);return{id:l.descriptor.id,distance:$r(a,p)}}).sort(function(l,c){return c.distance-l.distance});return s[0]?s[0].id:null}function Hb(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,a=Ro(r).filter(function(s){if(!s.isEnabled)return!1;var l=s.subject.active;if(!l||!$b(t,l))return!1;if(Pd(l)(t.center))return!0;var c=s.axis,p=l.center[c.crossAxisLine],m=t[c.crossAxisStart],f=t[c.crossAxisEnd],u=_t(l[c.crossAxisStart],l[c.crossAxisEnd]),h=u(m),S=u(f);return!h&&!S?!0:h?m<p:f>p});return a.length?a.length===1?a[0].descriptor.id:Kb({pageBorderBox:t,draggable:n,candidates:a}):null}var Rd=function(t,n){return At(Kr(t,n))},Wb=function(e,t){var n=e.frame;return n?Rd(t,n.scroll.diff.value):t};function Bd(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function Gb(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var Yb=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.last,l=e.viewport,c=e.afterCritical,p=r.axis,m=Gr(r.axis,n.displaceBy),f=m.value,u=t[p.start],h=t[p.end],S=Ao(n,a),y=yn(S,function(C){var E=C.descriptor.id,N=C.page.borderBox.center[p.line],M=Tn(E,c),I=Bd({displaced:s,id:E});return M?I?h<=N:u<N-f:I?h<=N+f:u<N}),T=Gb({draggable:n,closest:y,inHomeList:fr(n,r)});return Fo({draggable:n,insideDestination:a,destination:r,viewport:l,last:s,displacedBy:m,index:T})},Ub=4,zb=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,a=e.destination,s=e.insideDestination,l=e.afterCritical;if(!a.isCombineEnabled)return null;var c=a.axis,p=Gr(a.axis,t.displaceBy),m=p.value,f=n[c.start],u=n[c.end],h=Ao(t,s),S=yn(h,function(T){var C=T.descriptor.id,E=T.page.borderBox,N=E[c.size],M=N/Ub,I=Tn(C,l),k=Bd({displaced:r.displaced,id:C});return I?k?u>E[c.start]+M&&u<E[c.end]-M:f>E[c.start]-m+M&&f<E[c.end]-m-M:k?u>E[c.start]+m+M&&u<E[c.end]+m-M:f>E[c.start]+M&&f<E[c.end]-M});if(!S)return null;var y={displacedBy:p,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:S.descriptor.id,droppableId:a.descriptor.id}}};return y},Ad=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,a=e.droppables,s=e.previousImpact,l=e.viewport,c=e.afterCritical,p=Rd(n.page.borderBox,t),m=Hb({pageBorderBox:p,draggable:n,droppables:a});if(!m)return ib;var f=a[m],u=Kn(f.descriptor.id,r),h=Wb(f,p);return zb({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:s,destination:f,insideDestination:u,afterCritical:c})||Yb({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:f,insideDestination:u,last:s.displaced,viewport:l,afterCritical:c})},ks=function(e,t){var n;return ye({},e,(n={},n[t.descriptor.id]=t,n))},jb=function(t){var n=t.previousImpact,r=t.impact,a=t.droppables,s=Ct(n),l=Ct(r);if(!s||s===l)return a;var c=a[s];if(!c.subject.withPlaceholder)return a;var p=Rb(c);return ks(a,p)},qb=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,a=e.previousImpact,s=e.impact,l=jb({previousImpact:a,impact:s,droppables:r}),c=Ct(s);if(!c)return l;var p=r[c];if(fr(t,p)||p.subject.withPlaceholder)return l;var m=Od(p,t,n);return ks(l,m)},Yr=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,a=e.viewport,s=e.impact,l=e.scrollJumpRequest,c=a||t.viewport,p=r||t.dimensions,m=n||t.current.client.selection,f=wt(m,t.initial.client.selection),u={offset:f,selection:m,borderBoxCenter:st(t.initial.client.borderBoxCenter,f)},h={selection:st(u.selection,c.scroll.current),borderBoxCenter:st(u.borderBoxCenter,c.scroll.current),offset:st(u.offset,c.scroll.diff.value)},S={client:u,page:h};if(t.phase==="COLLECTING")return ye({phase:"COLLECTING"},t,{dimensions:p,viewport:c,current:S});var y=p.draggables[t.critical.draggable.id],T=s||Ad({pageOffset:h.offset,draggable:y,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),C=qb({draggable:y,impact:T,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),E=ye({},t,{current:S,dimensions:{draggables:p.draggables,droppables:C},impact:T,viewport:c,scrollJumpRequest:l||null,forceShouldAnimate:l?!1:null});return E};function Jb(e,t){return e.map(function(n){return t[n]})}var Fd=function(e){var t=e.impact,n=e.viewport,r=e.draggables,a=e.destination,s=e.forceShouldAnimate,l=t.displaced,c=Jb(l.all,r),p=Wr({afterDragging:c,destination:a,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:s,last:l});return ye({},t,{displaced:p})},Vd=function(e){var t=e.impact,n=e.draggable,r=e.droppable,a=e.draggables,s=e.viewport,l=e.afterCritical,c=Vo({impact:t,draggable:n,draggables:a,droppable:r,afterCritical:l});return Ns({pageBorderBoxCenter:c,draggable:n,viewport:s})},$d=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&(process.env.NODE_ENV,K());var a=t.impact,s=r||t.viewport,l=n||t.dimensions,c=l.draggables,p=l.droppables,m=c[t.critical.draggable.id],f=Ct(a);f||(process.env.NODE_ENV!=="production"?K(!1,"Must be over a destination in SNAP movement mode"):K());var u=p[f],h=Fd({impact:a,viewport:s,destination:u,draggables:c}),S=Vd({impact:h,draggable:m,droppable:u,draggables:c,viewport:s,afterCritical:t.afterCritical});return Yr({impact:h,clientSelection:S,state:t,dimensions:l,viewport:s})},Zb=function(e){return{index:e.index,droppableId:e.droppableId}},Kd=function(e){var t=e.draggable,n=e.home,r=e.draggables,a=e.viewport,s=Gr(n.axis,t.displaceBy),l=Kn(n.descriptor.id,r),c=l.indexOf(t);c===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Expected draggable to be inside home list"):K());var p=l.slice(c+1),m=p.reduce(function(S,y){return S[y.descriptor.id]=!0,S},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:s,effected:m},u=Wr({afterDragging:p,destination:n,displacedBy:s,last:null,viewport:a.frame,forceShouldAnimate:!1}),h={displaced:u,displacedBy:s,at:{type:"REORDER",destination:Zb(t.descriptor)}};return{impact:h,afterCritical:f}},Xb=function(e,t){return{draggables:e.draggables,droppables:ks(e.droppables,t)}},Ur=function(t){process.env.NODE_ENV},zr=function(t){process.env.NODE_ENV},Qb=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,a=Mo(t.client,n),s=_o(a,r),l=ye({},t,{placeholder:ye({},t.placeholder,{client:a}),client:a,page:s});return l},ev=function(e){var t=e.frame;return t||(process.env.NODE_ENV!=="production"?K(!1,"Expected Droppable to have a frame"):K()),t},tv=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,a=r.scroll.diff.value;return t.map(function(s){var l=s.descriptor.droppableId,c=n[l],p=ev(c),m=p.scroll.diff.value,f=st(a,m),u=Qb({draggable:s,offset:f,initialWindowScroll:r.scroll.initial});return u})},nv=function(e){var t=e.state,n=e.published;Ur();var r=n.modified.map(function(M){var I=t.dimensions.droppables[M.droppableId],k=vs(I,M.scroll);return k}),a=ye({},t.dimensions.droppables,{},bd(r)),s=vd(tv({additions:n.additions,updatedDroppables:a,viewport:t.viewport})),l=ye({},t.dimensions.draggables,{},s);n.removals.forEach(function(M){delete l[M]});var c={droppables:a,draggables:l},p=Ct(t.impact),m=p?c.droppables[p]:null,f=c.draggables[t.critical.draggable.id],u=c.droppables[t.critical.droppable.id],h=Kd({draggable:f,home:u,draggables:l,viewport:t.viewport}),S=h.impact,y=h.afterCritical,T=m&&m.isCombineEnabled?t.impact:S,C=Ad({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:T,viewport:t.viewport,afterCritical:y});zr();var E=ye({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:C,onLiftImpact:S,dimensions:c,afterCritical:y,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return E;var N=ye({phase:"DROP_PENDING"},E,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return N},Is=function(t){return t.movementMode==="SNAP"},xs=function(t,n,r){var a=Xb(t.dimensions,n);return!Is(t)||r?Yr({state:t,dimensions:a}):$d({state:t,dimensions:a})};function Ms(e){return e.isDragging&&e.movementMode==="SNAP"?ye({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Hd={phase:"IDLE",completed:null,shouldFlush:!1},rv=function(e,t){if(e===void 0&&(e=Hd),t.type==="FLUSH")return ye({},Hd,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"INITIAL_PUBLISH must come after a IDLE phase"):K());var n=t.payload,r=n.critical,a=n.clientSelection,s=n.viewport,l=n.dimensions,c=n.movementMode,p=l.draggables[r.draggable.id],m=l.droppables[r.droppable.id],f={selection:a,borderBoxCenter:p.client.borderBox.center,offset:nt},u={client:f,page:{selection:st(f.selection,s.scroll.initial),borderBoxCenter:st(f.selection,s.scroll.initial),offset:st(f.selection,s.scroll.diff.value)}},h=Ro(l.droppables).every(function(le){return!le.isFixedOnPage}),S=Kd({draggable:p,home:m,draggables:l.draggables,viewport:s}),y=S.impact,T=S.afterCritical,C={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:l,initial:u,current:u,isWindowScrollAllowed:h,impact:y,afterCritical:T,onLiftImpact:y,viewport:s,scrollJumpRequest:null,forceShouldAnimate:null};return C}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?K(!1,"Collection cannot start from phase "+e.phase):K());var E=ye({phase:"COLLECTING"},e,{phase:"COLLECTING"});return E}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Unexpected "+t.type+" received in phase "+e.phase):K()),nv({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var N=t.payload.client;return vn(N,e.current.client.selection)?e:Yr({state:e,clientSelection:N,impact:Is(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Ms(e);Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var M=t.payload,I=M.id,k=M.newScroll,V=e.dimensions.droppables[I];if(!V)return e;var A=vs(V,k);return xs(e,A,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var w=t.payload,P=w.id,O=w.isEnabled,$=e.dimensions.droppables[P];$||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+P+"] to toggle its enabled state"):K()),$.isEnabled===O&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isEnabled to "+String(O)+`
|
|
404
|
+
`},Oo={dragHandleUsageInstructions:qg,onDragStart:Jg,onDragUpdate:Zg,onDragEnd:Xg},rt={x:0,y:0},st=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},wt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},vn=function(t,n){return t.x===n.x&&t.y===n.y},ur=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},$n=function(t,n,r){var a;return r===void 0&&(r=0),a={},a[t]=n,a[t==="x"?"y":"x"]=r,a},$r=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},fd=function(t,n){return Math.min.apply(Math,n.map(function(r){return $r(t,r)}))},hd=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},Qg=function(e,t){var n=At({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},Kr=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Sd=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},eb={top:0,right:0,bottom:0,left:0},tb=function(t,n){return n?Kr(t,n.scroll.diff.displacement):t},nb=function(t,n,r){if(r&&r.increasedBy){var a;return ye({},t,(a={},a[n.end]=t[n.end]+r.increasedBy[n.line],a))}return t},rb=function(t,n){return n&&n.shouldClipSubject?Qg(n.pageMarginBox,t):At(t)},mr=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,a=e.frame,s=tb(t.marginBox,a),l=nb(s,r,n),c=rb(l,a);return{page:t,withPlaceholder:n,active:c}},vs=function(e,t){e.frame||(process.env.NODE_ENV,K());var n=e.frame,r=wt(t,n.scroll.initial),a=ur(r),s=ye({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}}),l=mr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s}),c=ye({},e,{frame:s,subject:l});return c};function ob(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Po(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function ys(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function yn(e,t){if(e.find)return e.find(t);var n=ys(e,t);if(n!==-1)return e[n]}function gd(e){return Array.prototype.slice.call(e)}var bd=nt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),vd=nt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Ro=nt(function(e){return Po(e)}),ab=nt(function(e){return Po(e)}),Kn=nt(function(e,t){var n=ab(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,a){return r.descriptor.index-a.descriptor.index});return n});function Ts(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Bo(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Ao=nt(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),sb=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.previousImpact;if(!r.isCombineEnabled)return null;var l=Ts(s);if(!l)return null;function c(T){var C={type:"COMBINE",combine:{draggableId:T,droppableId:r.descriptor.id}};return ye({},s,{at:C})}var p=s.displaced.all,m=p.length?p[0]:null;if(t)return m?c(m):null;var f=Ao(n,a);if(!m){if(!f.length)return null;var u=f[f.length-1];return c(u.descriptor.id)}var h=ys(f,function(T){return T.descriptor.id===m});h===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find displaced item in set"):K());var S=h-1;if(S<0)return null;var y=f[S];return c(y.descriptor.id)},fr=function(e,t){return e.descriptor.droppableId===t.descriptor.id},yd={point:rt,value:0},Hr={invisible:{},visible:{},all:[]},ib={displaced:Hr,displacedBy:yd,at:null},_t=function(e,t){return function(n){return e<=n&&n<=t}},Td=function(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(a)return!0;var s=t(r.top)||t(r.bottom),l=n(r.left)||n(r.right),c=s&&l;if(c)return!0;var p=r.top<e.top&&r.bottom>e.bottom,m=r.left<e.left&&r.right>e.right,f=p&&m;if(f)return!0;var u=p&&l||m&&s;return u}},lb=function(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return a}},Es={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Ed={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},cb=function(e){return function(t){var n=_t(t.top,t.bottom),r=_t(t.left,t.right);return function(a){return e===Es?n(a.top)&&n(a.bottom):r(a.left)&&r(a.right)}}},db=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:rt;return Kr(t,r)},pb=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},ub=function(t,n,r){return r(n)(t)},ws=function(t){var n=t.target,r=t.destination,a=t.viewport,s=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,c=s?db(n,r):n;return pb(c,r,l)&&ub(c,a,l)},mb=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:Td}))},wd=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:lb}))},fb=function(t){return ws(ye({},t,{isVisibleThroughFrameFn:cb(t.destination.axis)}))},hb=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var a=n.invisible,s=n.visible;if(a[t])return!1;var l=s[t];return l?l.shouldAnimate:!0};function Sb(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return At(hs(n,r))}function Wr(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,a=e.viewport,s=e.forceShouldAnimate,l=e.last;return t.reduce(function(p,m){var f=Sb(m,r),u=m.descriptor.id;p.all.push(u);var h=mb({target:f,destination:n,viewport:a,withDroppableDisplacement:!0});if(!h)return p.invisible[m.descriptor.id]=!0,p;var S=hb(u,l,s),y={draggableId:u,shouldAnimate:S};return p.visible[u]=y,p},{all:[],visible:{},invisible:{}})}function gb(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function Cd(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,a=e.destination,s=gb(t,{inHomeList:n});return{displaced:Hr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:s}}}}function Fo(e){var t=e.draggable,n=e.insideDestination,r=e.destination,a=e.viewport,s=e.displacedBy,l=e.last,c=e.index,p=e.forceShouldAnimate,m=fr(t,r);if(c==null)return Cd({insideDestination:n,inHomeList:m,displacedBy:s,destination:r});var f=yn(n,function(T){return T.descriptor.index===c});if(!f)return Cd({insideDestination:n,inHomeList:m,displacedBy:s,destination:r});var u=Ao(t,n),h=n.indexOf(f),S=u.slice(h),y=Wr({afterDragging:S,destination:r,displacedBy:s,last:l,viewport:a.frame,forceShouldAnimate:p});return{displaced:y,displacedBy:s,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:c}}}}function Tn(e,t){return!!t.effected[e]}var bb=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,a=e.combine,s=e.afterCritical;if(!n.isCombineEnabled)return null;var l=a.draggableId,c=r[l],p=c.descriptor.index,m=Tn(l,s);return m?t?p:p-1:t?p+1:p},vb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,a=e.location;if(!r.length)return null;var s=a.index,l=t?s+1:s-1,c=r[0].descriptor.index,p=r[r.length-1].descriptor.index,m=n?p:p+1;return l<c||l>m?null:l},yb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,a=e.draggables,s=e.destination,l=e.insideDestination,c=e.previousImpact,p=e.viewport,m=e.afterCritical,f=c.at;if(f||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move in direction without previous impact location"):K()),f.type==="REORDER"){var u=vb({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:l});return u==null?null:Fo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:u})}var h=bb({isMovingForward:t,destination:s,displaced:c.displaced,draggables:a,combine:f.combine,afterCritical:m});return h==null?null:Fo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:h})},Tb=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,a=e.displacedBy,s=!!(t.visible[r]||t.invisible[r]);return Tn(r,n)?s?rt:ur(a.point):s?a.point:rt},Eb=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,a=Bo(n);a||(process.env.NODE_ENV,K());var s=a.draggableId,l=r[s].page.borderBox.center,c=Tb({displaced:n.displaced,afterCritical:t,combineWith:s,displacedBy:n.displacedBy});return st(l,c)},Dd=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},wb=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Cs=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},Nd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.end]+Dd(n,a),Cs(n,r.marginBox,a))},kd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.start]-wb(n,a),Cs(n,r.marginBox,a))},Cb=function(t){var n=t.axis,r=t.moveInto,a=t.isMoving;return $n(n.line,r.contentBox[n.start]+Dd(n,a),Cs(n,r.contentBox,a))},Db=function(e){var t=e.impact,n=e.draggable,r=e.draggables,a=e.droppable,s=e.afterCritical,l=Kn(a.descriptor.id,r),c=n.page,p=a.axis;if(!l.length)return Cb({axis:p,moveInto:a.page,isMoving:c});var m=t.displaced,f=t.displacedBy,u=m.all[0];if(u){var h=r[u];if(Tn(u,s))return kd({axis:p,moveRelativeTo:h.page,isMoving:c});var S=Mo(h.page,f.point);return kd({axis:p,moveRelativeTo:S,isMoving:c})}var y=l[l.length-1];if(y.descriptor.id===n.descriptor.id)return c.borderBox.center;if(Tn(y.descriptor.id,s)){var T=Mo(y.page,ur(s.displacedBy.point));return Nd({axis:p,moveRelativeTo:T,isMoving:c})}return Nd({axis:p,moveRelativeTo:y.page,isMoving:c})},Ds=function(e,t){var n=e.frame;return n?st(t,n.scroll.diff.displacement):t},Nb=function(t){var n=t.impact,r=t.draggable,a=t.droppable,s=t.draggables,l=t.afterCritical,c=r.page.borderBox.center,p=n.at;return!a||!p?c:p.type==="REORDER"?Db({impact:n,draggable:r,draggables:s,droppable:a,afterCritical:l}):Eb({impact:n,draggables:s,afterCritical:l})},Vo=function(e){var t=Nb(e),n=e.droppable,r=n?Ds(n,t):t;return r},Id=function(e,t){var n=wt(t,e.scroll.initial),r=ur(n),a=At({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),s={frame:a,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return s};function xd(e,t){return e.map(function(n){return t[n]})}function kb(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var Ib=function(e){var t=e.impact,n=e.viewport,r=e.destination,a=e.draggables,s=e.maxScrollChange,l=Id(n,st(n.scroll.current,s)),c=r.frame?vs(r,st(r.frame.scroll.current,s)):r,p=t.displaced,m=Wr({afterDragging:xd(p.all,a),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:p,forceShouldAnimate:!1}),f=Wr({afterDragging:xd(p.all,a),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),u={},h={},S=[p,m,f];p.all.forEach(function(T){var C=kb(T,S);if(C){h[T]=C;return}u[T]=!0});var y=ye({},t,{displaced:{all:p.all,invisible:u,visible:h}});return y},xb=function(e,t){return st(e.scroll.diff.displacement,t)},Ns=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,a=xb(r,t),s=wt(a,n.page.borderBox.center);return st(n.client.borderBox.center,s)},Md=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,a=e.viewport,s=e.withDroppableDisplacement,l=e.onlyOnMainAxis,c=l===void 0?!1:l,p=wt(r,t.page.borderBox.center),m=Kr(t.page.borderBox,p),f={target:m,destination:n,withDroppableDisplacement:s,viewport:a};return c?fb(f):wd(f)},Mb=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.draggables,s=e.previousImpact,l=e.viewport,c=e.previousPageBorderBoxCenter,p=e.previousClientSelection,m=e.afterCritical;if(!r.isEnabled)return null;var f=Kn(r.descriptor.id,a),u=fr(n,r),h=sb({isMovingForward:t,draggable:n,destination:r,insideDestination:f,previousImpact:s})||yb({isMovingForward:t,isInHomeList:u,draggable:n,draggables:a,destination:r,insideDestination:f,previousImpact:s,viewport:l,afterCritical:m});if(!h)return null;var S=Vo({impact:h,draggable:n,droppable:r,draggables:a,afterCritical:m}),y=Md({draggable:n,destination:r,newPageBorderBoxCenter:S,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(y){var T=Ns({pageBorderBoxCenter:S,draggable:n,viewport:l});return{clientSelection:T,impact:h,scrollJumpRequest:null}}var C=wt(S,c),E=Ib({impact:h,viewport:l,destination:r,draggables:a,maxScrollChange:C});return{clientSelection:p,impact:E,scrollJumpRequest:C}},ht=function(t){var n=t.subject.active;return n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get clipped area from droppable"):K()),n},_b=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,a=e.droppables,s=e.viewport,l=r.subject.active;if(!l)return null;var c=r.axis,p=_t(l[c.start],l[c.end]),m=Ro(a).filter(function(u){return u!==r}).filter(function(u){return u.isEnabled}).filter(function(u){return!!u.subject.active}).filter(function(u){return Td(s.frame)(ht(u))}).filter(function(u){var h=ht(u);return t?l[c.crossAxisEnd]<h[c.crossAxisEnd]:h[c.crossAxisStart]<l[c.crossAxisStart]}).filter(function(u){var h=ht(u),S=_t(h[c.start],h[c.end]);return p(h[c.start])||p(h[c.end])||S(l[c.start])||S(l[c.end])}).sort(function(u,h){var S=ht(u)[c.crossAxisStart],y=ht(h)[c.crossAxisStart];return t?S-y:y-S}).filter(function(u,h,S){return ht(u)[c.crossAxisStart]===ht(S[0])[c.crossAxisStart]});if(!m.length)return null;if(m.length===1)return m[0];var f=m.filter(function(u){var h=_t(ht(u)[c.start],ht(u)[c.end]);return h(n[c.line])});return f.length===1?f[0]:f.length>1?f.sort(function(u,h){return ht(u)[c.start]-ht(h)[c.start]})[0]:m.sort(function(u,h){var S=fd(n,Sd(ht(u))),y=fd(n,Sd(ht(h)));return S!==y?S-y:ht(u)[c.start]-ht(h)[c.start]})[0]},_d=function(t,n){var r=t.page.borderBox.center;return Tn(t.descriptor.id,n)?wt(r,n.displacedBy.point):r},Lb=function(t,n){var r=t.page.borderBox;return Tn(t.descriptor.id,n)?Kr(r,ur(n.displacedBy.point)):r},Ob=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,a=e.insideDestination,s=e.afterCritical,l=a.filter(function(c){return wd({target:Lb(c,s),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(c,p){var m=$r(t,Ds(r,_d(c,s))),f=$r(t,Ds(r,_d(p,s)));return m<f?-1:f<m?1:c.descriptor.index-p.descriptor.index});return l[0]||null},Gr=nt(function(t,n){var r=n[t.line];return{value:r,point:$n(t.line,r)}}),Pb=function(t,n,r){var a=t.axis;if(t.descriptor.mode==="virtual")return $n(a.line,n[a.line]);var s=t.subject.page.contentBox[a.size],l=Kn(t.descriptor.id,r),c=l.reduce(function(f,u){return f+u.client.marginBox[a.size]},0),p=c+n[a.line],m=p-s;return m<=0?null:$n(a.line,m)},Ld=function(t,n){return ye({},t,{scroll:ye({},t.scroll,{max:n})})},Od=function(t,n,r){var a=t.frame;fr(n,t)&&(process.env.NODE_ENV!=="production"?K(!1,"Should not add placeholder space to home list"):K()),t.subject.withPlaceholder&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot add placeholder size to a subject when it already has one"):K());var s=Gr(t.axis,n.displaceBy).point,l=Pb(t,s,r),c={placeholderSize:s,increasedBy:l,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!a){var p=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:t.frame});return ye({},t,{subject:p})}var m=l?st(a.scroll.max,l):a.scroll.max,f=Ld(a,m),u=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:f});return ye({},t,{subject:u,frame:f})},Rb=function(t){var n=t.subject.withPlaceholder;n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot remove placeholder form subject when there was none"):K());var r=t.frame;if(!r){var a=mr({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ye({},t,{subject:a})}var s=n.oldFrameMaxScroll;s||(process.env.NODE_ENV!=="production"?K(!1,"Expected droppable with frame to have old max frame scroll when removing placeholder"):K());var l=Ld(r,s),c=mr({page:t.subject.page,axis:t.axis,frame:l,withPlaceholder:null});return ye({},t,{subject:c,frame:l})},Bb=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,a=e.draggable,s=e.draggables,l=e.destination,c=e.viewport,p=e.afterCritical;if(!n){if(r.length)return null;var m={displaced:Hr,displacedBy:yd,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},f=Vo({impact:m,draggable:a,droppable:l,draggables:s,afterCritical:p}),u=fr(a,l)?l:Od(l,a,s),h=Md({draggable:a,destination:u,newPageBorderBoxCenter:f,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return h?m:null}var S=t[l.axis.line]<=n.page.borderBox.center[l.axis.line],y=function(){var C=n.descriptor.index;return n.descriptor.id===a.descriptor.id||S?C:C+1}(),T=Gr(l.axis,a.displaceBy);return Fo({draggable:a,insideDestination:r,destination:l,viewport:c,displacedBy:T,last:Hr,index:y})},Ab=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,a=e.isOver,s=e.draggables,l=e.droppables,c=e.viewport,p=e.afterCritical,m=_b({isMovingForward:t,pageBorderBoxCenter:n,source:a,droppables:l,viewport:c});if(!m)return null;var f=Kn(m.descriptor.id,s),u=Ob({pageBorderBoxCenter:n,viewport:c,destination:m,insideDestination:f,afterCritical:p}),h=Bb({previousPageBorderBoxCenter:n,destination:m,draggable:r,draggables:s,moveRelativeTo:u,insideDestination:f,viewport:c,afterCritical:p});if(!h)return null;var S=Vo({impact:h,draggable:r,droppable:m,draggables:s,afterCritical:p}),y=Ns({pageBorderBoxCenter:S,draggable:r,viewport:c});return{clientSelection:y,impact:h,scrollJumpRequest:null}},Ct=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},Fb=function(t,n){var r=Ct(t);return r?n[r]:null},Vb=function(e){var t=e.state,n=e.type,r=Fb(t.impact,t.dimensions.droppables),a=!!r,s=t.dimensions.droppables[t.critical.droppable.id],l=r||s,c=l.axis.direction,p=c==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||c==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(p&&!a)return null;var m=n==="MOVE_DOWN"||n==="MOVE_RIGHT",f=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,h=t.dimensions,S=h.draggables,y=h.droppables;return p?Mb({isMovingForward:m,previousPageBorderBoxCenter:u,draggable:f,destination:l,draggables:S,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Ab({isMovingForward:m,previousPageBorderBoxCenter:u,draggable:f,isOver:l,draggables:S,droppables:y,viewport:t.viewport,afterCritical:t.afterCritical})};function Hn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Pd(e){var t=_t(e.top,e.bottom),n=_t(e.left,e.right);return function(a){return t(a.y)&&n(a.x)}}function $b(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Kb(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,a=n.page.borderBox.center,s=r.map(function(l){var c=l.axis,p=$n(l.axis.line,t.center[c.line],l.page.borderBox.center[c.crossAxisLine]);return{id:l.descriptor.id,distance:$r(a,p)}}).sort(function(l,c){return c.distance-l.distance});return s[0]?s[0].id:null}function Hb(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,a=Ro(r).filter(function(s){if(!s.isEnabled)return!1;var l=s.subject.active;if(!l||!$b(t,l))return!1;if(Pd(l)(t.center))return!0;var c=s.axis,p=l.center[c.crossAxisLine],m=t[c.crossAxisStart],f=t[c.crossAxisEnd],u=_t(l[c.crossAxisStart],l[c.crossAxisEnd]),h=u(m),S=u(f);return!h&&!S?!0:h?m<p:f>p});return a.length?a.length===1?a[0].descriptor.id:Kb({pageBorderBox:t,draggable:n,candidates:a}):null}var Rd=function(t,n){return At(Kr(t,n))},Wb=function(e,t){var n=e.frame;return n?Rd(t,n.scroll.diff.value):t};function Bd(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function Gb(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var Yb=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.last,l=e.viewport,c=e.afterCritical,p=r.axis,m=Gr(r.axis,n.displaceBy),f=m.value,u=t[p.start],h=t[p.end],S=Ao(n,a),y=yn(S,function(C){var E=C.descriptor.id,N=C.page.borderBox.center[p.line],M=Tn(E,c),I=Bd({displaced:s,id:E});return M?I?h<=N:u<N-f:I?h<=N+f:u<N}),T=Gb({draggable:n,closest:y,inHomeList:fr(n,r)});return Fo({draggable:n,insideDestination:a,destination:r,viewport:l,last:s,displacedBy:m,index:T})},Ub=4,zb=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,a=e.destination,s=e.insideDestination,l=e.afterCritical;if(!a.isCombineEnabled)return null;var c=a.axis,p=Gr(a.axis,t.displaceBy),m=p.value,f=n[c.start],u=n[c.end],h=Ao(t,s),S=yn(h,function(T){var C=T.descriptor.id,E=T.page.borderBox,N=E[c.size],M=N/Ub,I=Tn(C,l),k=Bd({displaced:r.displaced,id:C});return I?k?u>E[c.start]+M&&u<E[c.end]-M:f>E[c.start]-m+M&&f<E[c.end]-m-M:k?u>E[c.start]+m+M&&u<E[c.end]+m-M:f>E[c.start]+M&&f<E[c.end]-M});if(!S)return null;var y={displacedBy:p,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:S.descriptor.id,droppableId:a.descriptor.id}}};return y},Ad=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,a=e.droppables,s=e.previousImpact,l=e.viewport,c=e.afterCritical,p=Rd(n.page.borderBox,t),m=Hb({pageBorderBox:p,draggable:n,droppables:a});if(!m)return ib;var f=a[m],u=Kn(f.descriptor.id,r),h=Wb(f,p);return zb({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:s,destination:f,insideDestination:u,afterCritical:c})||Yb({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:f,insideDestination:u,last:s.displaced,viewport:l,afterCritical:c})},ks=function(e,t){var n;return ye({},e,(n={},n[t.descriptor.id]=t,n))},jb=function(t){var n=t.previousImpact,r=t.impact,a=t.droppables,s=Ct(n),l=Ct(r);if(!s||s===l)return a;var c=a[s];if(!c.subject.withPlaceholder)return a;var p=Rb(c);return ks(a,p)},qb=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,a=e.previousImpact,s=e.impact,l=jb({previousImpact:a,impact:s,droppables:r}),c=Ct(s);if(!c)return l;var p=r[c];if(fr(t,p)||p.subject.withPlaceholder)return l;var m=Od(p,t,n);return ks(l,m)},Yr=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,a=e.viewport,s=e.impact,l=e.scrollJumpRequest,c=a||t.viewport,p=r||t.dimensions,m=n||t.current.client.selection,f=wt(m,t.initial.client.selection),u={offset:f,selection:m,borderBoxCenter:st(t.initial.client.borderBoxCenter,f)},h={selection:st(u.selection,c.scroll.current),borderBoxCenter:st(u.borderBoxCenter,c.scroll.current),offset:st(u.offset,c.scroll.diff.value)},S={client:u,page:h};if(t.phase==="COLLECTING")return ye({phase:"COLLECTING"},t,{dimensions:p,viewport:c,current:S});var y=p.draggables[t.critical.draggable.id],T=s||Ad({pageOffset:h.offset,draggable:y,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),C=qb({draggable:y,impact:T,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),E=ye({},t,{current:S,dimensions:{draggables:p.draggables,droppables:C},impact:T,viewport:c,scrollJumpRequest:l||null,forceShouldAnimate:l?!1:null});return E};function Jb(e,t){return e.map(function(n){return t[n]})}var Fd=function(e){var t=e.impact,n=e.viewport,r=e.draggables,a=e.destination,s=e.forceShouldAnimate,l=t.displaced,c=Jb(l.all,r),p=Wr({afterDragging:c,destination:a,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:s,last:l});return ye({},t,{displaced:p})},Vd=function(e){var t=e.impact,n=e.draggable,r=e.droppable,a=e.draggables,s=e.viewport,l=e.afterCritical,c=Vo({impact:t,draggable:n,draggables:a,droppable:r,afterCritical:l});return Ns({pageBorderBoxCenter:c,draggable:n,viewport:s})},$d=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&(process.env.NODE_ENV,K());var a=t.impact,s=r||t.viewport,l=n||t.dimensions,c=l.draggables,p=l.droppables,m=c[t.critical.draggable.id],f=Ct(a);f||(process.env.NODE_ENV!=="production"?K(!1,"Must be over a destination in SNAP movement mode"):K());var u=p[f],h=Fd({impact:a,viewport:s,destination:u,draggables:c}),S=Vd({impact:h,draggable:m,droppable:u,draggables:c,viewport:s,afterCritical:t.afterCritical});return Yr({impact:h,clientSelection:S,state:t,dimensions:l,viewport:s})},Zb=function(e){return{index:e.index,droppableId:e.droppableId}},Kd=function(e){var t=e.draggable,n=e.home,r=e.draggables,a=e.viewport,s=Gr(n.axis,t.displaceBy),l=Kn(n.descriptor.id,r),c=l.indexOf(t);c===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Expected draggable to be inside home list"):K());var p=l.slice(c+1),m=p.reduce(function(S,y){return S[y.descriptor.id]=!0,S},{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:s,effected:m},u=Wr({afterDragging:p,destination:n,displacedBy:s,last:null,viewport:a.frame,forceShouldAnimate:!1}),h={displaced:u,displacedBy:s,at:{type:"REORDER",destination:Zb(t.descriptor)}};return{impact:h,afterCritical:f}},Xb=function(e,t){return{draggables:e.draggables,droppables:ks(e.droppables,t)}},Ur=function(t){process.env.NODE_ENV},zr=function(t){process.env.NODE_ENV},Qb=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,a=Mo(t.client,n),s=_o(a,r),l=ye({},t,{placeholder:ye({},t.placeholder,{client:a}),client:a,page:s});return l},ev=function(e){var t=e.frame;return t||(process.env.NODE_ENV!=="production"?K(!1,"Expected Droppable to have a frame"):K()),t},tv=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,a=r.scroll.diff.value;return t.map(function(s){var l=s.descriptor.droppableId,c=n[l],p=ev(c),m=p.scroll.diff.value,f=st(a,m),u=Qb({draggable:s,offset:f,initialWindowScroll:r.scroll.initial});return u})},nv=function(e){var t=e.state,n=e.published;Ur();var r=n.modified.map(function(M){var I=t.dimensions.droppables[M.droppableId],k=vs(I,M.scroll);return k}),a=ye({},t.dimensions.droppables,{},bd(r)),s=vd(tv({additions:n.additions,updatedDroppables:a,viewport:t.viewport})),l=ye({},t.dimensions.draggables,{},s);n.removals.forEach(function(M){delete l[M]});var c={droppables:a,draggables:l},p=Ct(t.impact),m=p?c.droppables[p]:null,f=c.draggables[t.critical.draggable.id],u=c.droppables[t.critical.droppable.id],h=Kd({draggable:f,home:u,draggables:l,viewport:t.viewport}),S=h.impact,y=h.afterCritical,T=m&&m.isCombineEnabled?t.impact:S,C=Ad({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:T,viewport:t.viewport,afterCritical:y});zr();var E=ye({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:C,onLiftImpact:S,dimensions:c,afterCritical:y,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return E;var N=ye({phase:"DROP_PENDING"},E,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return N},Is=function(t){return t.movementMode==="SNAP"},xs=function(t,n,r){var a=Xb(t.dimensions,n);return!Is(t)||r?Yr({state:t,dimensions:a}):$d({state:t,dimensions:a})};function Ms(e){return e.isDragging&&e.movementMode==="SNAP"?ye({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Hd={phase:"IDLE",completed:null,shouldFlush:!1},rv=function(e,t){if(e===void 0&&(e=Hd),t.type==="FLUSH")return ye({},Hd,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"INITIAL_PUBLISH must come after a IDLE phase"):K());var n=t.payload,r=n.critical,a=n.clientSelection,s=n.viewport,l=n.dimensions,c=n.movementMode,p=l.draggables[r.draggable.id],m=l.droppables[r.droppable.id],f={selection:a,borderBoxCenter:p.client.borderBox.center,offset:rt},u={client:f,page:{selection:st(f.selection,s.scroll.initial),borderBoxCenter:st(f.selection,s.scroll.initial),offset:st(f.selection,s.scroll.diff.value)}},h=Ro(l.droppables).every(function(le){return!le.isFixedOnPage}),S=Kd({draggable:p,home:m,draggables:l.draggables,viewport:s}),y=S.impact,T=S.afterCritical,C={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:l,initial:u,current:u,isWindowScrollAllowed:h,impact:y,afterCritical:T,onLiftImpact:y,viewport:s,scrollJumpRequest:null,forceShouldAnimate:null};return C}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?K(!1,"Collection cannot start from phase "+e.phase):K());var E=ye({phase:"COLLECTING"},e,{phase:"COLLECTING"});return E}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Unexpected "+t.type+" received in phase "+e.phase):K()),nv({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var N=t.payload.client;return vn(N,e.current.client.selection)?e:Yr({state:e,clientSelection:N,impact:Is(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Ms(e);Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var M=t.payload,I=M.id,k=M.newScroll,V=e.dimensions.droppables[I];if(!V)return e;var A=vs(V,k);return xs(e,A,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var w=t.payload,P=w.id,O=w.isEnabled,$=e.dimensions.droppables[P];$||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+P+"] to toggle its enabled state"):K()),$.isEnabled===O&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isEnabled to "+String(O)+`
|
|
405
405
|
but it is already `+String($.isEnabled)):K());var z=ye({},$,{isEnabled:O});return xs(e,z,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var L=t.payload,J=L.id,B=L.isCombineEnabled,te=e.dimensions.droppables[J];te||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+J+"] to toggle its isCombineEnabled state"):K()),te.isCombineEnabled===B&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isCombineEnabled to "+String(B)+`
|
|
406
406
|
but it is already `+String(te.isCombineEnabled)):K());var H=ye({},te,{isCombineEnabled:B});return xs(e,H,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move by window in phase "+e.phase):K()),e.isWindowScrollAllowed||(process.env.NODE_ENV!=="production"?K(!1,"Window scrolling is currently not supported for fixed lists"):K());var q=t.payload.newScroll;if(vn(e.viewport.scroll.current,q))return Ms(e);var oe=Id(e.viewport,q);return Is(e)?$d({state:e,viewport:oe}):Yr({state:e,viewport:oe})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Hn(e))return e;var W=t.payload.maxScroll;if(vn(W,e.viewport.scroll.max))return e;var j=ye({},e.viewport,{scroll:ye({},e.viewport.scroll,{max:W})});return ye({phase:"DRAGGING"},e,{viewport:j})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?K(!1,t.type+" received while not in DRAGGING phase"):K());var ne=Vb({state:e,type:t.type});return ne?Yr({state:e,impact:ne.impact,clientSelection:ne.clientSelection,scrollJumpRequest:ne.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var re=t.payload.reason;e.phase!=="COLLECTING"&&(process.env.NODE_ENV!=="production"?K(!1,"Can only move into the DROP_PENDING phase from the COLLECTING phase"):K());var U=ye({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:re});return U}if(t.type==="DROP_ANIMATE"){var R=t.payload,Z=R.completed,ae=R.dropDuration,ee=R.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Cannot animate drop from phase "+e.phase):K());var de={phase:"DROP_ANIMATING",completed:Z,dropDuration:ae,newHomeClientOffset:ee,dimensions:e.dimensions};return de}if(t.type==="DROP_COMPLETE"){var ie=t.payload.completed;return{phase:"IDLE",completed:ie,shouldFlush:!1}}return e},ov=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},av=function(t){return{type:"LIFT",payload:t}},sv=function(t){return{type:"INITIAL_PUBLISH",payload:t}},iv=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},lv=function(){return{type:"COLLECTION_STARTING",payload:null}},cv=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},dv=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},pv=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},Wd=function(t){return{type:"MOVE",payload:t}},uv=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},mv=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},fv=function(){return{type:"MOVE_UP",payload:null}},hv=function(){return{type:"MOVE_DOWN",payload:null}},Sv=function(){return{type:"MOVE_RIGHT",payload:null}},gv=function(){return{type:"MOVE_LEFT",payload:null}},_s=function(){return{type:"FLUSH",payload:null}},bv=function(t){return{type:"DROP_ANIMATE",payload:t}},Ls=function(t){return{type:"DROP_COMPLETE",payload:t}},Gd=function(t){return{type:"DROP",payload:t}},vv=function(t){return{type:"DROP_PENDING",payload:t}},Yd=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function yv(e){if(!(e.length<=1)){for(var t=e.map(function(c){return c.descriptor.index}),n={},r=1;r<t.length;r++){var a=t[r],s=t[r-1];a!==s+1&&(n[a]=!0)}if(Object.keys(n).length){var l=t.map(function(c){var p=!!n[c];return p?"[🔥"+c+"]":""+c}).join(", ");process.env.NODE_ENV!=="production"&&We(`
|
|
407
407
|
Detected non-consecutive <Draggable /> indexes.
|
|
@@ -409,19 +409,19 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var se=le(ae,ie,U,R,Z+".
|
|
|
409
409
|
(This can cause unexpected bugs)
|
|
410
410
|
|
|
411
411
|
`+l+`
|
|
412
|
-
`)}}}function Tv(e,t){if(process.env.NODE_ENV!=="production"){var n=Kn(e.droppable.id,t.draggables);yv(n)}}var Ev=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(a){return function(s){if(s.type!=="LIFT"){a(s);return}var l=s.payload,c=l.id,p=l.clientSelection,m=l.movementMode,f=n();f.phase==="DROP_ANIMATING"&&r(Ls({completed:f.completed})),n().phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Unexpected phase to start a drag"):K()),r(_s()),r(ov({draggableId:c,movementMode:m}));var u={shouldPublishImmediately:m==="SNAP"},h={draggableId:c,scrollOptions:u},S=e.startPublishing(h),y=S.critical,T=S.dimensions,C=S.viewport;Tv(y,T),r(sv({critical:y,dimensions:T,clientSelection:p,movementMode:m,viewport:C}))}}}},wv=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},Os={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},jr={opacity:{drop:0,combining:.7},scale:{drop:.75}},Ps={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Wn=Ps.outOfTheWay+"s "+Os.outOfTheWay,qr={fluid:"opacity "+Wn,snap:"transform "+Wn+", opacity "+Wn,drop:function(t){var n=t+"s "+Os.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Wn,placeholder:"height "+Wn+", width "+Wn+", margin "+Wn},Ud=function(t){return vn(t,
|
|
412
|
+
`)}}}function Tv(e,t){if(process.env.NODE_ENV!=="production"){var n=Kn(e.droppable.id,t.draggables);yv(n)}}var Ev=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(a){return function(s){if(s.type!=="LIFT"){a(s);return}var l=s.payload,c=l.id,p=l.clientSelection,m=l.movementMode,f=n();f.phase==="DROP_ANIMATING"&&r(Ls({completed:f.completed})),n().phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Unexpected phase to start a drag"):K()),r(_s()),r(ov({draggableId:c,movementMode:m}));var u={shouldPublishImmediately:m==="SNAP"},h={draggableId:c,scrollOptions:u},S=e.startPublishing(h),y=S.critical,T=S.dimensions,C=S.viewport;Tv(y,T),r(sv({critical:y,dimensions:T,clientSelection:p,movementMode:m,viewport:C}))}}}},wv=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},Os={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},jr={opacity:{drop:0,combining:.7},scale:{drop:.75}},Ps={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Wn=Ps.outOfTheWay+"s "+Os.outOfTheWay,qr={fluid:"opacity "+Wn,snap:"transform "+Wn+", opacity "+Wn,drop:function(t){var n=t+"s "+Os.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Wn,placeholder:"height "+Wn+", width "+Wn+", margin "+Wn},Ud=function(t){return vn(t,rt)?null:"translate("+t.x+"px, "+t.y+"px)"},Rs={moveTo:Ud,drop:function(t,n){var r=Ud(t);return r?n?r+" scale("+jr.scale.drop+")":r:null}},Bs=Ps.minDropTime,zd=Ps.maxDropTime,Cv=zd-Bs,jd=1500,Dv=.6,Nv=function(e){var t=e.current,n=e.destination,r=e.reason,a=$r(t,n);if(a<=0)return Bs;if(a>=jd)return zd;var s=a/jd,l=Bs+Cv*s,c=r==="CANCEL"?l*Dv:l;return Number(c.toFixed(2))},kv=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,a=e.viewport,s=e.afterCritical,l=r.draggables,c=r.droppables,p=Ct(t),m=p?c[p]:null,f=c[n.descriptor.droppableId],u=Vd({impact:t,draggable:n,draggables:l,afterCritical:s,droppable:m||f,viewport:a}),h=wt(u,n.client.borderBox.center);return h},Iv=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,a=e.home,s=e.viewport,l=e.onLiftImpact;if(!r.at||n!=="DROP"){var c=Fd({draggables:t,impact:l,destination:a,viewport:s,forceShouldAnimate:!0});return{impact:c,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var p=ye({},r,{displaced:Hr});return{impact:p,didDropInsideDroppable:!0}},xv=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(a){if(a.type!=="DROP"){r(a);return}var s=t(),l=a.payload.reason;if(s.phase==="COLLECTING"){n(vv({reason:l}));return}if(s.phase!=="IDLE"){var c=s.phase==="DROP_PENDING"&&s.isWaiting;c&&(process.env.NODE_ENV!=="production"?K(!1,"A DROP action occurred while DROP_PENDING and still waiting"):K()),s.phase==="DRAGGING"||s.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Cannot drop in phase: "+s.phase):K());var p=s.critical,m=s.dimensions,f=m.draggables[s.critical.draggable.id],u=Iv({reason:l,lastImpact:s.impact,afterCritical:s.afterCritical,onLiftImpact:s.onLiftImpact,home:s.dimensions.droppables[s.critical.droppable.id],viewport:s.viewport,draggables:s.dimensions.draggables}),h=u.impact,S=u.didDropInsideDroppable,y=S?Ts(h):null,T=S?Bo(h):null,C={index:p.draggable.index,droppableId:p.droppable.id},E={draggableId:f.descriptor.id,type:f.descriptor.type,source:C,reason:l,mode:s.movementMode,destination:y,combine:T},N=kv({impact:h,draggable:f,dimensions:m,viewport:s.viewport,afterCritical:s.afterCritical}),M={critical:s.critical,afterCritical:s.afterCritical,result:E,impact:h},I=!vn(s.current.client.offset,N)||!!E.combine;if(!I){n(Ls({completed:M}));return}var k=Nv({current:s.current.client.offset,destination:N,reason:l}),V={newHomeClientOffset:N,dropDuration:k,completed:M};n(bv(V))}}}},qd=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Mv(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function _v(e){var t=e.onWindowScroll;function n(){t(qd())}var r=Fr(n),a=Mv(r),s=bn;function l(){return s!==bn}function c(){l()&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start scroll listener when already active"):K()),s=Mt(window,[a])}function p(){l()||(process.env.NODE_ENV!=="production"?K(!1,"Cannot stop scroll listener when not active"):K()),r.cancel(),s(),s=bn}return{start:c,stop:p,isActive:l}}var Lv=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},Ov=function(e){var t=_v({onWindowScroll:function(r){e.dispatch(uv({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&Lv(r)&&t.stop(),n(r)}}},Pv=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),a=function(l){if(t){process.env.NODE_ENV!=="production"&&We("Announcement already made. Not making a second announcement");return}if(n){process.env.NODE_ENV!=="production"&&We(`
|
|
413
413
|
Announcements cannot be made asynchronously.
|
|
414
414
|
Default message has already been announced.
|
|
415
|
-
`);return}t=!0,e(l),clearTimeout(r)};return a.wasCalled=function(){return t},a},Rv=function(){var e=[],t=function(s){var l=ys(e,function(m){return m.timerId===s});l===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find timer"):K());var c=e.splice(l,1),p=c[0];p.callback()},n=function(s){var l=setTimeout(function(){return t(l)}),c={timerId:l,callback:s};e.push(c)},r=function(){if(e.length){var s=[].concat(e);e.length=0,s.forEach(function(l){clearTimeout(l.timerId),l.callback()})}};return{add:n,flush:r}},Bv=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},Av=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},Fv=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,a=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&a},Jr=function(t,n){Ur(),n(),zr()},$o=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},As=function(t,n,r,a){if(!t){r(a(n));return}var s=Pv(r),l={announce:s};t(n,l),s.wasCalled()||r(a(n))},Vv=function(e,t){var n=Rv(),r=null,a=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeCapture as a drag start has already been published"):K()),Jr("onBeforeCapture",function(){var y=e().onBeforeCapture;if(y){var T={draggableId:h,mode:S};y(T)}})},s=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K()),Jr("onBeforeDragStart",function(){var y=e().onBeforeDragStart;y&&y($o(h,S))})},l=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K());var y=$o(h,S);r={mode:S,lastCritical:h,lastLocation:y.source,lastCombine:null},n.add(function(){Jr("onDragStart",function(){return As(e().onDragStart,y,t,Oo.onDragStart)})})},c=function(h,S){var y=Ts(S),T=Bo(S);r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragMove when onDragStart has not been called"):K());var C=!Fv(h,r.lastCritical);C&&(r.lastCritical=h);var E=!Bv(r.lastLocation,y);E&&(r.lastLocation=y);var N=!Av(r.lastCombine,T);if(N&&(r.lastCombine=T),!(!C&&!E&&!N)){var M=ye({},$o(h,r.mode),{combine:T,destination:y});n.add(function(){Jr("onDragUpdate",function(){return As(e().onDragUpdate,M,t,Oo.onDragUpdate)})})}},p=function(){r||(process.env.NODE_ENV!=="production"?K(!1,"Can only flush responders while dragging"):K()),n.flush()},m=function(h){r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragEnd when there is no matching onDragStart"):K()),r=null,Jr("onDragEnd",function(){return As(e().onDragEnd,h,t,Oo.onDragEnd)})},f=function(){if(r){var h=ye({},$o(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});m(h)}};return{beforeCapture:a,beforeStart:s,start:l,update:c,flush:p,drop:m,abort:f}},$v=function(e,t){var n=Vv(e,t);return function(r){return function(a){return function(s){if(s.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(s.payload.draggableId,s.payload.movementMode);return}if(s.type==="INITIAL_PUBLISH"){var l=s.payload.critical;n.beforeStart(l,s.payload.movementMode),a(s),n.start(l,s.payload.movementMode);return}if(s.type==="DROP_COMPLETE"){var c=s.payload.completed.result;n.flush(),a(s),n.drop(c);return}if(a(s),s.type==="FLUSH"){n.abort();return}var p=r.getState();p.phase==="DRAGGING"&&n.update(p.critical,p.impact)}}}},Kv=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot finish a drop animating when no drop is occurring"):K()),e.dispatch(Ls({completed:r.completed}))}}},Hv=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(a){return function(s){if((s.type==="FLUSH"||s.type==="DROP_COMPLETE"||s.type==="DROP_ANIMATION_FINISHED")&&r(),a(s),s.type==="DROP_ANIMATE"){var l={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var p=e.getState();p.phase==="DROP_ANIMATING"&&e.dispatch(Yd())}};n=requestAnimationFrame(function(){n=null,t=Mt(window,[l])})}}}},Wv=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},Gv=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var a=r.payload.completed.result;a.combine&&e.tryShiftRecord(a.draggableId,a.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},Yv=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},Uv=function(e){return function(t){return function(n){return function(r){if(Yv(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var a=t.getState();a.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?K(!1,"Expected phase to be DRAGGING after INITIAL_PUBLISH"):K()),e.start(a);return}n(r),e.scroll(t.getState())}}}},zv=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(Gd({reason:r.reason})))}}}},jv=process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"react-beautiful-dnd"}):Dc,qv=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,a=e.getResponders,s=e.announce,l=e.autoScroller;return Ec(rv,jv(_S(wv(r),Wv(t),Ev(t),xv,Kv,Hv,zv,Uv(l),Ov,Gv(n),$v(a,s))))},Fs=function(){return{additions:{},removals:{},modified:{}}};function Jv(e){var t=e.registry,n=e.callbacks,r=Fs(),a=null,s=function(){a||(n.collectionStarting(),a=requestAnimationFrame(function(){a=null,Ur();var f=r,u=f.additions,h=f.removals,S=f.modified,y=Object.keys(u).map(function(E){return t.draggable.getById(E).getDimension(
|
|
415
|
+
`);return}t=!0,e(l),clearTimeout(r)};return a.wasCalled=function(){return t},a},Rv=function(){var e=[],t=function(s){var l=ys(e,function(m){return m.timerId===s});l===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find timer"):K());var c=e.splice(l,1),p=c[0];p.callback()},n=function(s){var l=setTimeout(function(){return t(l)}),c={timerId:l,callback:s};e.push(c)},r=function(){if(e.length){var s=[].concat(e);e.length=0,s.forEach(function(l){clearTimeout(l.timerId),l.callback()})}};return{add:n,flush:r}},Bv=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},Av=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},Fv=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,a=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&a},Jr=function(t,n){Ur(),n(),zr()},$o=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},As=function(t,n,r,a){if(!t){r(a(n));return}var s=Pv(r),l={announce:s};t(n,l),s.wasCalled()||r(a(n))},Vv=function(e,t){var n=Rv(),r=null,a=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeCapture as a drag start has already been published"):K()),Jr("onBeforeCapture",function(){var y=e().onBeforeCapture;if(y){var T={draggableId:h,mode:S};y(T)}})},s=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K()),Jr("onBeforeDragStart",function(){var y=e().onBeforeDragStart;y&&y($o(h,S))})},l=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K());var y=$o(h,S);r={mode:S,lastCritical:h,lastLocation:y.source,lastCombine:null},n.add(function(){Jr("onDragStart",function(){return As(e().onDragStart,y,t,Oo.onDragStart)})})},c=function(h,S){var y=Ts(S),T=Bo(S);r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragMove when onDragStart has not been called"):K());var C=!Fv(h,r.lastCritical);C&&(r.lastCritical=h);var E=!Bv(r.lastLocation,y);E&&(r.lastLocation=y);var N=!Av(r.lastCombine,T);if(N&&(r.lastCombine=T),!(!C&&!E&&!N)){var M=ye({},$o(h,r.mode),{combine:T,destination:y});n.add(function(){Jr("onDragUpdate",function(){return As(e().onDragUpdate,M,t,Oo.onDragUpdate)})})}},p=function(){r||(process.env.NODE_ENV!=="production"?K(!1,"Can only flush responders while dragging"):K()),n.flush()},m=function(h){r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragEnd when there is no matching onDragStart"):K()),r=null,Jr("onDragEnd",function(){return As(e().onDragEnd,h,t,Oo.onDragEnd)})},f=function(){if(r){var h=ye({},$o(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});m(h)}};return{beforeCapture:a,beforeStart:s,start:l,update:c,flush:p,drop:m,abort:f}},$v=function(e,t){var n=Vv(e,t);return function(r){return function(a){return function(s){if(s.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(s.payload.draggableId,s.payload.movementMode);return}if(s.type==="INITIAL_PUBLISH"){var l=s.payload.critical;n.beforeStart(l,s.payload.movementMode),a(s),n.start(l,s.payload.movementMode);return}if(s.type==="DROP_COMPLETE"){var c=s.payload.completed.result;n.flush(),a(s),n.drop(c);return}if(a(s),s.type==="FLUSH"){n.abort();return}var p=r.getState();p.phase==="DRAGGING"&&n.update(p.critical,p.impact)}}}},Kv=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot finish a drop animating when no drop is occurring"):K()),e.dispatch(Ls({completed:r.completed}))}}},Hv=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(a){return function(s){if((s.type==="FLUSH"||s.type==="DROP_COMPLETE"||s.type==="DROP_ANIMATION_FINISHED")&&r(),a(s),s.type==="DROP_ANIMATE"){var l={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var p=e.getState();p.phase==="DROP_ANIMATING"&&e.dispatch(Yd())}};n=requestAnimationFrame(function(){n=null,t=Mt(window,[l])})}}}},Wv=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},Gv=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var a=r.payload.completed.result;a.combine&&e.tryShiftRecord(a.draggableId,a.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},Yv=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},Uv=function(e){return function(t){return function(n){return function(r){if(Yv(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var a=t.getState();a.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?K(!1,"Expected phase to be DRAGGING after INITIAL_PUBLISH"):K()),e.start(a);return}n(r),e.scroll(t.getState())}}}},zv=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(Gd({reason:r.reason})))}}}},jv=process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"react-beautiful-dnd"}):Dc,qv=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,a=e.getResponders,s=e.announce,l=e.autoScroller;return Ec(rv,jv(_S(wv(r),Wv(t),Ev(t),xv,Kv,Hv,zv,Uv(l),Ov,Gv(n),$v(a,s))))},Fs=function(){return{additions:{},removals:{},modified:{}}};function Jv(e){var t=e.registry,n=e.callbacks,r=Fs(),a=null,s=function(){a||(n.collectionStarting(),a=requestAnimationFrame(function(){a=null,Ur();var f=r,u=f.additions,h=f.removals,S=f.modified,y=Object.keys(u).map(function(E){return t.draggable.getById(E).getDimension(rt)}).sort(function(E,N){return E.descriptor.index-N.descriptor.index}),T=Object.keys(S).map(function(E){var N=t.droppable.getById(E),M=N.callbacks.getScrollWhileDragging();return{droppableId:E,scroll:M}}),C={additions:y,removals:Object.keys(h),modified:T};r=Fs(),zr(),n.publish(C)}))},l=function(f){var u=f.descriptor.id;r.additions[u]=f,r.modified[f.descriptor.droppableId]=!0,r.removals[u]&&delete r.removals[u],s()},c=function(f){var u=f.descriptor;r.removals[u.id]=!0,r.modified[u.droppableId]=!0,r.additions[u.id]&&delete r.additions[u.id],s()},p=function(){a&&(cancelAnimationFrame(a),a=null,r=Fs())};return{add:l,remove:c,stop:p}}var Jd=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,a=e.width,s=wt({x:n,y:t},{x:a,y:r}),l={x:Math.max(0,s.x),y:Math.max(0,s.y)};return l},Zd=function(){var e=document.documentElement;return e||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find document.documentElement"):K()),e},Xd=function(){var e=Zd(),t=Jd({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},Zv=function(){var e=qd(),t=Xd(),n=e.y,r=e.x,a=Zd(),s=a.clientWidth,l=a.clientHeight,c=r+s,p=n+l,m=At({top:n,left:r,right:c,bottom:p}),f={frame:m,scroll:{initial:e,current:e,max:t,diff:{value:rt,displacement:rt}}};return f},Xv=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;Ur();var a=Zv(),s=a.scroll.current,l=t.droppable,c=r.droppable.getAllByType(l.type).map(function(u){return u.callbacks.getDimensionAndWatchScroll(s,n)}),p=r.draggable.getAllByType(t.draggable.type).map(function(u){return u.getDimension(s)}),m={draggables:vd(p),droppables:bd(c)};zr();var f={dimensions:m,critical:t,viewport:a};return f};function Qd(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode!=="virtual"?(process.env.NODE_ENV!=="production"&&We(`
|
|
416
416
|
You are attempting to add or remove a Draggable [id: `+n.descriptor.id+`]
|
|
417
417
|
while a drag is occurring. This is only supported for virtual lists.
|
|
418
418
|
|
|
419
419
|
See https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/patterns/virtual-lists.md
|
|
420
|
-
`),!1):!0}var Qv=function(e,t){var n=null,r=Jv({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),a=function(S,y){e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update is enabled flag of Droppable "+S+" as it is not registered"):K()),n&&t.updateDroppableIsEnabled({id:S,isEnabled:y})},s=function(S,y){n&&(e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update isCombineEnabled flag of Droppable "+S+" as it is not registered"):K()),t.updateDroppableIsCombineEnabled({id:S,isCombineEnabled:y}))},l=function(S,y){n&&(e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update the scroll on Droppable "+S+" as it is not registered"):K()),t.updateDroppableScroll({id:S,newScroll:y}))},c=function(S,y){n&&e.droppable.getById(S).callbacks.scroll(y)},p=function(){if(n){r.stop();var S=n.critical.droppable;e.droppable.getAllByType(S.type).forEach(function(y){return y.callbacks.dragStopped()}),n.unsubscribe(),n=null}},m=function(S){n||(process.env.NODE_ENV!=="production"?K(!1,"Should only be subscribed when a collection is occurring"):K());var y=n.critical.draggable;S.type==="ADDITION"&&Qd(e,y,S.value)&&r.add(S.value),S.type==="REMOVAL"&&Qd(e,y,S.value)&&r.remove(S.value)},f=function(S){n&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start capturing critical dimensions as there is already a collection"):K());var y=e.draggable.getById(S.draggableId),T=e.droppable.getById(y.descriptor.droppableId),C={draggable:y.descriptor,droppable:T.descriptor},E=e.subscribe(m);return n={critical:C,unsubscribe:E},Xv({critical:C,registry:e,scrollOptions:S.scrollOptions})},u={updateDroppableIsEnabled:a,updateDroppableIsCombineEnabled:s,scrollDroppable:c,updateDroppableScroll:l,startPublishing:f,stopPublishing:p};return u},ep=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},ey=function(e){window.scrollBy(e.x,e.y)},ty=
|
|
420
|
+
`),!1):!0}var Qv=function(e,t){var n=null,r=Jv({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),a=function(S,y){e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update is enabled flag of Droppable "+S+" as it is not registered"):K()),n&&t.updateDroppableIsEnabled({id:S,isEnabled:y})},s=function(S,y){n&&(e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update isCombineEnabled flag of Droppable "+S+" as it is not registered"):K()),t.updateDroppableIsCombineEnabled({id:S,isCombineEnabled:y}))},l=function(S,y){n&&(e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update the scroll on Droppable "+S+" as it is not registered"):K()),t.updateDroppableScroll({id:S,newScroll:y}))},c=function(S,y){n&&e.droppable.getById(S).callbacks.scroll(y)},p=function(){if(n){r.stop();var S=n.critical.droppable;e.droppable.getAllByType(S.type).forEach(function(y){return y.callbacks.dragStopped()}),n.unsubscribe(),n=null}},m=function(S){n||(process.env.NODE_ENV!=="production"?K(!1,"Should only be subscribed when a collection is occurring"):K());var y=n.critical.draggable;S.type==="ADDITION"&&Qd(e,y,S.value)&&r.add(S.value),S.type==="REMOVAL"&&Qd(e,y,S.value)&&r.remove(S.value)},f=function(S){n&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start capturing critical dimensions as there is already a collection"):K());var y=e.draggable.getById(S.draggableId),T=e.droppable.getById(y.descriptor.droppableId),C={draggable:y.descriptor,droppable:T.descriptor},E=e.subscribe(m);return n={critical:C,unsubscribe:E},Xv({critical:C,registry:e,scrollOptions:S.scrollOptions})},u={updateDroppableIsEnabled:a,updateDroppableIsCombineEnabled:s,scrollDroppable:c,updateDroppableScroll:l,startPublishing:f,stopPublishing:p};return u},ep=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},ey=function(e){window.scrollBy(e.x,e.y)},ty=nt(function(e){return Ro(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),ny=function(t,n){var r=yn(ty(n),function(a){return a.frame||(process.env.NODE_ENV!=="production"?K(!1,"Invalid result"):K()),Pd(a.frame.pageMarginBox)(t)});return r},ry=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var a=r[n];return a.frame?a:null}var s=ny(t,r);return s},En={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},oy=function(e,t){var n=e[t.size]*En.startFromPercentage,r=e[t.size]*En.maxScrollAtPercentage,a={startScrollingFrom:n,maxScrollValueAt:r};return a},tp=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,a=n-t;if(a===0)return process.env.NODE_ENV!=="production"&&We(`
|
|
421
421
|
Detected distance range of 0 in the fluid auto scroller
|
|
422
422
|
This is unexpected and would cause a divide by 0 issue.
|
|
423
423
|
Not allowing an auto scroll
|
|
424
|
-
`),0;var s=r-t,l=s/a;return l},Vs=1,ay=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return En.maxPixelScroll;if(e===t.startScrollingFrom)return Vs;var n=tp({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,a=En.maxPixelScroll*En.ease(r);return Math.ceil(a)},np=En.durationDampening.accelerateAt,rp=En.durationDampening.stopDampeningAt,sy=function(e,t){var n=t,r=rp,a=Date.now(),s=a-n;if(s>=rp)return e;if(s<np)return Vs;var l=tp({startOfRange:np,endOfRange:r,current:s}),c=e*En.ease(l);return Math.ceil(c)},op=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,a=e.shouldUseTimeDampening,s=ay(t,n);return s===0?0:a?Math.max(sy(s,r),Vs):s},ap=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,a=e.axis,s=e.shouldUseTimeDampening,l=oy(t,a),c=n[a.end]<n[a.start];return c?op({distanceToEdge:n[a.end],thresholds:l,dragStartTime:r,shouldUseTimeDampening:s}):-1*op({distanceToEdge:n[a.start],thresholds:l,dragStartTime:r,shouldUseTimeDampening:s})},iy=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,a=n.height>t.height,s=n.width>t.width;return!s&&!a?r:s&&a?null:{x:s?0:r.x,y:a?0:r.y}},ly=hd(function(e){return e===0?0:e}),sp=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,a=e.center,s=e.shouldUseTimeDampening,l={top:a.y-n.top,right:n.right-a.x,bottom:n.bottom-a.y,left:a.x-n.left},c=ap({container:n,distanceToEdges:l,dragStartTime:t,axis:Es,shouldUseTimeDampening:s}),p=ap({container:n,distanceToEdges:l,dragStartTime:t,axis:Ed,shouldUseTimeDampening:s}),m=ly({x:p,y:c});if(vn(m,
|
|
424
|
+
`),0;var s=r-t,l=s/a;return l},Vs=1,ay=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return En.maxPixelScroll;if(e===t.startScrollingFrom)return Vs;var n=tp({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,a=En.maxPixelScroll*En.ease(r);return Math.ceil(a)},np=En.durationDampening.accelerateAt,rp=En.durationDampening.stopDampeningAt,sy=function(e,t){var n=t,r=rp,a=Date.now(),s=a-n;if(s>=rp)return e;if(s<np)return Vs;var l=tp({startOfRange:np,endOfRange:r,current:s}),c=e*En.ease(l);return Math.ceil(c)},op=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,a=e.shouldUseTimeDampening,s=ay(t,n);return s===0?0:a?Math.max(sy(s,r),Vs):s},ap=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,a=e.axis,s=e.shouldUseTimeDampening,l=oy(t,a),c=n[a.end]<n[a.start];return c?op({distanceToEdge:n[a.end],thresholds:l,dragStartTime:r,shouldUseTimeDampening:s}):-1*op({distanceToEdge:n[a.start],thresholds:l,dragStartTime:r,shouldUseTimeDampening:s})},iy=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,a=n.height>t.height,s=n.width>t.width;return!s&&!a?r:s&&a?null:{x:s?0:r.x,y:a?0:r.y}},ly=hd(function(e){return e===0?0:e}),sp=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,a=e.center,s=e.shouldUseTimeDampening,l={top:a.y-n.top,right:n.right-a.x,bottom:n.bottom-a.y,left:a.x-n.left},c=ap({container:n,distanceToEdges:l,dragStartTime:t,axis:Es,shouldUseTimeDampening:s}),p=ap({container:n,distanceToEdges:l,dragStartTime:t,axis:Ed,shouldUseTimeDampening:s}),m=ly({x:p,y:c});if(vn(m,rt))return null;var f=iy({container:n,subject:r,proposedScroll:m});return f?vn(f,rt)?null:f:null},cy=hd(function(e){return e===0?0:e>0?1:-1}),$s=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,a=t.change,s=st(n,a),l={x:e(s.x,r.x),y:e(s.y,r.y)};return vn(l,rt)?null:l}}(),ip=function(t){var n=t.max,r=t.current,a=t.change,s={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},l=cy(a),c=$s({max:s,current:r,change:l});return!c||l.x!==0&&c.x===0||l.y!==0&&c.y===0},Ks=function(t,n){return ip({current:t.scroll.current,max:t.scroll.max,change:n})},dy=function(t,n){if(!Ks(t,n))return null;var r=t.scroll.max,a=t.scroll.current;return $s({current:a,max:r,change:n})},Hs=function(t,n){var r=t.frame;return r?ip({current:r.scroll.current,max:r.scroll.max,change:n}):!1},py=function(t,n){var r=t.frame;return!r||!Hs(t,n)?null:$s({current:r.scroll.current,max:r.scroll.max,change:n})},uy=function(e){var t=e.viewport,n=e.subject,r=e.center,a=e.dragStartTime,s=e.shouldUseTimeDampening,l=sp({dragStartTime:a,container:t.frame,subject:n,center:r,shouldUseTimeDampening:s});return l&&Ks(t,l)?l:null},my=function(e){var t=e.droppable,n=e.subject,r=e.center,a=e.dragStartTime,s=e.shouldUseTimeDampening,l=t.frame;if(!l)return null;var c=sp({dragStartTime:a,container:l.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:s});return c&&Hs(t,c)?c:null},lp=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,a=e.scrollWindow,s=e.scrollDroppable,l=t.current.page.borderBoxCenter,c=t.dimensions.draggables[t.critical.draggable.id],p=c.page.marginBox;if(t.isWindowScrollAllowed){var m=t.viewport,f=uy({dragStartTime:n,viewport:m,subject:p,center:l,shouldUseTimeDampening:r});if(f){a(f);return}}var u=ry({center:l,destination:Ct(t.impact),droppables:t.dimensions.droppables});if(u){var h=my({dragStartTime:n,droppable:u,subject:p,center:l,shouldUseTimeDampening:r});h&&s(u.descriptor.id,h)}},fy=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Fr(t),a=Fr(n),s=null,l=function(f){s||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fluid scroll if not dragging"):K());var u=s,h=u.shouldUseTimeDampening,S=u.dragStartTime;lp({state:f,scrollWindow:r,scrollDroppable:a,dragStartTime:S,shouldUseTimeDampening:h})},c=function(f){Ur(),s&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start auto scrolling when already started"):K());var u=Date.now(),h=!1,S=function(){h=!0};lp({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:S,scrollDroppable:S}),s={dragStartTime:u,shouldUseTimeDampening:h},zr(),h&&l(f)},p=function(){s&&(r.cancel(),a.cancel(),s=null)};return{start:c,stop:p,scroll:l}},hy=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,a=function(m,f){var u=st(m.current.client.selection,f);t({client:u})},s=function(m,f){if(!Hs(m,f))return f;var u=py(m,f);if(!u)return n(m.descriptor.id,f),null;var h=wt(f,u);n(m.descriptor.id,h);var S=wt(f,h);return S},l=function(m,f,u){if(!m||!Ks(f,u))return u;var h=dy(f,u);if(!h)return r(u),null;var S=wt(u,h);r(S);var y=wt(u,S);return y},c=function(m){var f=m.scrollJumpRequest;if(f){var u=Ct(m.impact);u||(process.env.NODE_ENV!=="production"?K(!1,"Cannot perform a jump scroll when there is no destination"):K());var h=s(m.dimensions.droppables[u],f);if(h){var S=m.viewport,y=l(m.isWindowScrollAllowed,S,h);y&&a(m,y)}}};return c},Sy=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,a=fy({scrollWindow:n,scrollDroppable:t}),s=hy({move:r,scrollWindow:n,scrollDroppable:t}),l=function(m){if(m.phase==="DRAGGING"){if(m.movementMode==="FLUID"){a.scroll(m);return}m.scrollJumpRequest&&s(m)}},c={scroll:l,start:a.start,stop:a.stop};return c},hr="data-rbd",Sr=function(){var e=hr+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Ws=function(){var e=hr+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),gy=function(){var e=hr+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),cp={contextId:hr+"-scroll-container-context-id"},by=function(t){return function(n){return"["+n+'="'+t+'"]'}},Zr=function(t,n){return t.map(function(r){var a=r.styles[n];return a?r.selector+" { "+a+" }":""}).join(" ")},vy="pointer-events: none;",yy=function(e){var t=by(e),n=function(){var c=`
|
|
425
425
|
cursor: -webkit-grab;
|
|
426
426
|
cursor: grab;
|
|
427
427
|
`;return{selector:t(Sr.contextId),styles:{always:`
|
|
@@ -438,7 +438,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var se=le(ae,ie,U,R,Z+".
|
|
|
438
438
|
-moz-user-select: none;
|
|
439
439
|
-ms-user-select: none;
|
|
440
440
|
overflow-anchor: none;
|
|
441
|
-
`}},l=[r,n,a,s];return{always:Zr(l,"always"),resting:Zr(l,"resting"),dragging:Zr(l,"dragging"),dropAnimating:Zr(l,"dropAnimating"),userCancel:Zr(l,"userCancel")}},Dt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect,Gs=function(){var t=document.querySelector("head");return t||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find the head to append a style to"):K()),t},dp=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function Ty(e,t){var n=Me(function(){return yy(e)},[e]),r=x.useRef(null),a=x.useRef(null),s=ge(
|
|
441
|
+
`}},l=[r,n,a,s];return{always:Zr(l,"always"),resting:Zr(l,"resting"),dragging:Zr(l,"dragging"),dropAnimating:Zr(l,"dropAnimating"),userCancel:Zr(l,"userCancel")}},Dt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect,Gs=function(){var t=document.querySelector("head");return t||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find the head to append a style to"):K()),t},dp=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function Ty(e,t){var n=Me(function(){return yy(e)},[e]),r=x.useRef(null),a=x.useRef(null),s=ge(nt(function(u){var h=a.current;h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot set dynamic style element if it is not set"):K()),h.textContent=u}),[]),l=ge(function(u){var h=r.current;h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot set dynamic style element if it is not set"):K()),h.textContent=u},[]);Dt(function(){!r.current&&!a.current||(process.env.NODE_ENV!=="production"?K(!1,"style elements already mounted"):K());var u=dp(t),h=dp(t);return r.current=u,a.current=h,u.setAttribute(hr+"-always",e),h.setAttribute(hr+"-dynamic",e),Gs().appendChild(u),Gs().appendChild(h),l(n.always),s(n.resting),function(){var S=function(T){var C=T.current;C||(process.env.NODE_ENV!=="production"?K(!1,"Cannot unmount ref as it is not set"):K()),Gs().removeChild(C),T.current=null};S(r),S(a)}},[t,l,s,n.always,n.resting,e]);var c=ge(function(){return s(n.dragging)},[s,n.dragging]),p=ge(function(u){if(u==="DROP"){s(n.dropAnimating);return}s(n.userCancel)},[s,n.dropAnimating,n.userCancel]),m=ge(function(){a.current&&s(n.resting)},[s,n.resting]),f=Me(function(){return{dragging:c,dropping:p,resting:m}},[c,p,m]);return f}var pp=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Xr(e){return e instanceof pp(e).HTMLElement}function up(e,t){var n="["+Sr.contextId+'="'+e+'"]',r=gd(document.querySelectorAll(n));if(!r.length)return process.env.NODE_ENV!=="production"&&We('Unable to find any drag handles in the context "'+e+'"'),null;var a=yn(r,function(s){return s.getAttribute(Sr.draggableId)===t});return a?Xr(a)?a:(process.env.NODE_ENV!=="production"&&We("drag handle needs to be a HTMLElement"),null):(process.env.NODE_ENV!=="production"&&We('Unable to find drag handle with id "'+t+'" as no handle with a matching id was found'),null)}function Ey(e){var t=x.useRef({}),n=x.useRef(null),r=x.useRef(null),a=x.useRef(!1),s=ge(function(h,S){var y={id:h,focus:S};return t.current[h]=y,function(){var C=t.current,E=C[h];E!==y&&delete C[h]}},[]),l=ge(function(h){var S=up(e,h);S&&S!==document.activeElement&&S.focus()},[e]),c=ge(function(h,S){n.current===h&&(n.current=S)},[]),p=ge(function(){r.current||a.current&&(r.current=requestAnimationFrame(function(){r.current=null;var h=n.current;h&&l(h)}))},[l]),m=ge(function(h){n.current=null;var S=document.activeElement;S&&S.getAttribute(Sr.draggableId)===h&&(n.current=h)},[]);Dt(function(){return a.current=!0,function(){a.current=!1;var h=r.current;h&&cancelAnimationFrame(h)}},[]);var f=Me(function(){return{register:s,tryRecordFocus:m,tryRestoreFocusRecorded:p,tryShiftRecord:c}},[s,m,p,c]);return f}function wy(){var e={draggables:{},droppables:{}},t=[];function n(u){return t.push(u),function(){var S=t.indexOf(u);S!==-1&&t.splice(S,1)}}function r(u){t.length&&t.forEach(function(h){return h(u)})}function a(u){return e.draggables[u]||null}function s(u){var h=a(u);return h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find draggable entry with id ["+u+"]"):K()),h}var l={register:function(h){e.draggables[h.descriptor.id]=h,r({type:"ADDITION",value:h})},update:function(h,S){var y=e.draggables[S.descriptor.id];y&&y.uniqueId===h.uniqueId&&(delete e.draggables[S.descriptor.id],e.draggables[h.descriptor.id]=h)},unregister:function(h){var S=h.descriptor.id,y=a(S);y&&h.uniqueId===y.uniqueId&&(delete e.draggables[S],r({type:"REMOVAL",value:h}))},getById:s,findById:a,exists:function(h){return!!a(h)},getAllByType:function(h){return Po(e.draggables).filter(function(S){return S.descriptor.type===h})}};function c(u){return e.droppables[u]||null}function p(u){var h=c(u);return h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find droppable entry with id ["+u+"]"):K()),h}var m={register:function(h){e.droppables[h.descriptor.id]=h},unregister:function(h){var S=c(h.descriptor.id);S&&h.uniqueId===S.uniqueId&&delete e.droppables[h.descriptor.id]},getById:p,findById:c,exists:function(h){return!!c(h)},getAllByType:function(h){return Po(e.droppables).filter(function(S){return S.descriptor.type===h})}};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:l,droppable:m,subscribe:n,clean:f}}function Cy(){var e=Me(wy,[]);return x.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Ys=x.createContext(null),Qr=function(){var e=document.body;return e||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find document.body"):K()),e},Dy={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Ny=function(t){return"rbd-announcement-"+t};function ky(e){var t=Me(function(){return Ny(e)},[e]),n=x.useRef(null);x.useEffect(function(){var s=document.createElement("div");return n.current=s,s.id=t,s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true"),ye(s.style,Dy),Qr().appendChild(s),function(){setTimeout(function(){var p=Qr();p.contains(s)&&p.removeChild(s),s===n.current&&(n.current=null)})}},[t]);var r=ge(function(a){var s=n.current;if(s){s.textContent=a;return}process.env.NODE_ENV!=="production"&&We(`
|
|
442
442
|
A screen reader message was trying to be announced but it was unable to do so.
|
|
443
443
|
This can occur if you unmount your <DragDropContext /> in your onDragEnd.
|
|
444
444
|
Consider calling provided.announce() before the unmount so that the instruction will
|
|
@@ -507,7 +507,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var se=le(ae,ie,U,R,Z+".
|
|
|
507
507
|
Nested scroll containers are currently not supported.
|
|
508
508
|
|
|
509
509
|
We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131
|
|
510
|
-
`)}},Qs=function(e){return{x:e.scrollLeft,y:e.scrollTop}},_T=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},LT=function(e){var t=Mp(e),n=_T(e);return{closestScrollable:t,isFixedOnPage:n}},OT=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,a=e.isFixedOnPage,s=e.direction,l=e.client,c=e.page,p=e.closest,m=function(){if(!p)return null;var S=p.scrollSize,y=p.client,T=Jd({scrollHeight:S.scrollHeight,scrollWidth:S.scrollWidth,height:y.paddingBox.height,width:y.paddingBox.width});return{pageMarginBox:p.page.marginBox,frameClient:y,scrollSize:S,shouldClipSubject:p.shouldClipSubject,scroll:{initial:p.scroll,current:p.scroll,max:T,diff:{value:
|
|
510
|
+
`)}},Qs=function(e){return{x:e.scrollLeft,y:e.scrollTop}},_T=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},LT=function(e){var t=Mp(e),n=_T(e);return{closestScrollable:t,isFixedOnPage:n}},OT=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,a=e.isFixedOnPage,s=e.direction,l=e.client,c=e.page,p=e.closest,m=function(){if(!p)return null;var S=p.scrollSize,y=p.client,T=Jd({scrollHeight:S.scrollHeight,scrollWidth:S.scrollWidth,height:y.paddingBox.height,width:y.paddingBox.width});return{pageMarginBox:p.page.marginBox,frameClient:y,scrollSize:S,shouldClipSubject:p.shouldClipSubject,scroll:{initial:p.scroll,current:p.scroll,max:T,diff:{value:rt,displacement:rt}}}}(),f=s==="vertical"?Es:Ed,u=mr({page:c,withPlaceholder:null,axis:f,frame:m}),h={descriptor:t,isCombineEnabled:r,isFixedOnPage:a,axis:f,isEnabled:n,client:l,page:c,frame:m,subject:u};return h},PT=function(t,n){var r=sd(t);if(!n||t!==n)return r;var a=r.paddingBox.top-n.scrollTop,s=r.paddingBox.left-n.scrollLeft,l=a+n.scrollHeight,c=s+n.scrollWidth,p={top:a,right:c,bottom:l,left:s},m=hs(p,r.border),f=gs({borderBox:m,margin:r.margin,border:r.border,padding:r.padding});return f},RT=function(e){var t=e.ref,n=e.descriptor,r=e.env,a=e.windowScroll,s=e.direction,l=e.isDropDisabled,c=e.isCombineEnabled,p=e.shouldClipSubject,m=r.closestScrollable,f=PT(t,m),u=_o(f,a),h=function(){if(!m)return null;var y=sd(m),T={scrollHeight:m.scrollHeight,scrollWidth:m.scrollWidth};return{client:y,page:_o(y,a),scroll:Qs(m),scrollSize:T,shouldClipSubject:p}}(),S=OT({descriptor:n,isEnabled:!l,isCombineEnabled:c,isFixedOnPage:r.isFixedOnPage,direction:s,client:f,page:u,closest:h});return S},BT={passive:!1},AT={passive:!0},_p=function(e){return e.shouldPublishImmediately?BT:AT};function Yo(e){var t=x.useContext(e);return t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find required context"):K()),t}var Uo=function(t){return t&&t.env.closestScrollable||null};function FT(e){var t=x.useRef(null),n=Yo(Ko),r=Us("droppable"),a=n.registry,s=n.marshal,l=qs(e),c=Me(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),p=x.useRef(c),m=Me(function(){return nt(function(I,k){t.current||(process.env.NODE_ENV!=="production"?K(!1,"Can only update scroll when dragging"):K());var V={x:I,y:k};s.updateDroppableScroll(c.id,V)})},[c.id,s]),f=ge(function(){var I=t.current;return!I||!I.env.closestScrollable?rt:Qs(I.env.closestScrollable)},[]),u=ge(function(){var I=f();m(I.x,I.y)},[f,m]),h=Me(function(){return Fr(u)},[u]),S=ge(function(){var I=t.current,k=Uo(I);I&&k||(process.env.NODE_ENV!=="production"?K(!1,"Could not find scroll options while scrolling"):K());var V=I.scrollOptions;if(V.shouldPublishImmediately){u();return}h()},[h,u]),y=ge(function(I,k){t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot collect a droppable while a drag is occurring"):K());var V=l.current,A=V.getDroppableRef();A||(process.env.NODE_ENV!=="production"?K(!1,"Cannot collect without a droppable ref"):K());var w=LT(A),P={ref:A,descriptor:c,env:w,scrollOptions:k};t.current=P;var O=RT({ref:A,descriptor:c,env:w,windowScroll:I,direction:V.direction,isDropDisabled:V.isDropDisabled,isCombineEnabled:V.isCombineEnabled,shouldClipSubject:!V.ignoreContainerClipping}),$=w.closestScrollable;return $&&($.setAttribute(cp.contextId,n.contextId),$.addEventListener("scroll",S,_p(P.scrollOptions)),process.env.NODE_ENV!=="production"&&MT($)),O},[n.contextId,c,S,l]),T=ge(function(){var I=t.current,k=Uo(I);return I&&k||(process.env.NODE_ENV!=="production"?K(!1,"Can only recollect Droppable client for Droppables that have a scroll container"):K()),Qs(k)},[]),C=ge(function(){var I=t.current;I||(process.env.NODE_ENV!=="production"?K(!1,"Cannot stop drag when no active drag"):K());var k=Uo(I);t.current=null,k&&(h.cancel(),k.removeAttribute(cp.contextId),k.removeEventListener("scroll",S,_p(I.scrollOptions)))},[S,h]),E=ge(function(I){var k=t.current;k||(process.env.NODE_ENV!=="production"?K(!1,"Cannot scroll when there is no drag"):K());var V=Uo(k);V||(process.env.NODE_ENV!=="production"?K(!1,"Cannot scroll a droppable with no closest scrollable"):K()),V.scrollTop+=I.y,V.scrollLeft+=I.x},[]),N=Me(function(){return{getDimensionAndWatchScroll:y,getScrollWhileDragging:T,dragStopped:C,scroll:E}},[C,y,T,E]),M=Me(function(){return{uniqueId:r,descriptor:c,callbacks:N}},[N,c,r]);Dt(function(){return p.current=M.descriptor,a.droppable.register(M),function(){t.current&&(process.env.NODE_ENV!=="production"&&We("Unsupported: changing the droppableId or type of a Droppable during a drag"),C()),a.droppable.unregister(M)}},[N,c,C,M,s,a.droppable]),Dt(function(){t.current&&s.updateDroppableIsEnabled(p.current.id,!e.isDropDisabled)},[e.isDropDisabled,s]),Dt(function(){t.current&&s.updateDroppableIsCombineEnabled(p.current.id,e.isCombineEnabled)},[e.isCombineEnabled,s])}function ei(){}var Lp={width:0,height:0,margin:eb},VT=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,a=t.animate;return n||a==="close"?Lp:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},$T=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,a=t.animate,s=VT({isAnimatingOpenOnMount:n,placeholder:r,animate:a});return{display:r.display,boxSizing:"border-box",width:s.width,height:s.height,marginTop:s.margin.top,marginRight:s.margin.right,marginBottom:s.margin.bottom,marginLeft:s.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:a!=="none"?qr.placeholder:null}};function KT(e){var t=x.useRef(null),n=ge(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,a=e.onTransitionEnd,s=e.onClose,l=e.contextId,c=x.useState(e.animate==="open"),p=c[0],m=c[1];x.useEffect(function(){return p?r!=="open"?(n(),m(!1),ei):t.current?ei:(t.current=setTimeout(function(){t.current=null,m(!1)}),n):ei},[r,p,n]);var f=ge(function(h){h.propertyName==="height"&&(a(),r==="close"&&s())},[r,s,a]),u=$T({isAnimatingOpenOnMount:p,animate:e.animate,placeholder:e.placeholder});return x.createElement(e.placeholder.tagName,{style:u,"data-rbd-placeholder-context-id":l,onTransitionEnd:f,ref:e.innerRef})}var HT=x.memo(KT),ti=x.createContext(null);function Op(e){e&&Xr(e)||(process.env.NODE_ENV!=="production"?K(!1,`
|
|
511
511
|
provided.innerRef has not been provided with a HTMLElement.
|
|
512
512
|
|
|
513
513
|
You can find a guide on using the innerRef callback functions at:
|
|
@@ -518,8 +518,8 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var se=le(ae,ie,U,R,Z+".
|
|
|
518
518
|
|
|
519
519
|
Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.
|
|
520
520
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/api/droppable.md
|
|
521
|
-
`)}}],YT=[function(t){var n=t.props;n.renderClone||(process.env.NODE_ENV!=="production"?K(!1,"Must provide a clone render function (renderClone) for virtual lists"):K())},function(t){var n=t.getPlaceholderRef;n()&&(process.env.NODE_ENV!=="production"?K(!1,"Expected virtual list to not have a placeholder"):K())}];function UT(e){eo(function(){ri(e,WT),e.props.mode==="standard"&&ri(e,GT),e.props.mode==="virtual"&&ri(e,YT)})}var zT=function(e){gc(t,e);function t(){for(var r,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s))||this,r.state={isVisible:!!r.props.on,data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){r.state.animate==="close"&&r.setState({isVisible:!1})},r}t.getDerivedStateFromProps=function(a,s){return a.shouldAnimate?a.on?{isVisible:!0,data:a.on,animate:"open"}:s.isVisible?{isVisible:!0,data:s.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!a.on,data:a.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var a={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(a)},t}(x.PureComponent),Pp={dragging:5e3,dropAnimating:4500},jT=function(t,n){return n?qr.drop(n.duration):t?qr.snap:qr.fluid},qT=function(t,n){return t?n?jr.opacity.drop:jr.opacity.combining:null},JT=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function ZT(e){var t=e.dimension,n=t.client,r=e.offset,a=e.combineWith,s=e.dropping,l=!!a,c=JT(e),p=!!s,m=p?Rs.drop(r,l):Rs.moveTo(r),f={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:jT(c,s),transform:m,opacity:qT(l,p),zIndex:p?Pp.dropAnimating:Pp.dragging,pointerEvents:"none"};return f}function XT(e){return{transform:Rs.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function QT(e){return e.type==="DRAGGING"?ZT(e):XT(e)}function eE(e,t,n){n===void 0&&(n=
|
|
522
|
-
Provided: [type: `+typeof a+"] (value: "+a+")"):K(!1)),ob(e.index)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" requires an integer index prop"):K(!1)),e.mapped.type!=="DRAGGING"&&(Op(n()),e.isEnabled&&(up(t,a)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" Unable to find drag handle"):K(!1))))})}function rE(e){js(function(){var t=x.useRef(e);eo(function(){e!==t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Draggable isClone prop value changed during component life"):K(!1))},[e])})}function oE(e){e.preventDefault()}function aE(e){var t=x.useRef(null),n=ge(function(P){t.current=P},[]),r=ge(function(){return t.current},[]),a=Yo(Ko),s=a.contextId,l=a.dragHandleUsageInstructionsId,c=a.registry,p=Yo(ti),m=p.type,f=p.droppableId,u=Me(function(){return{id:e.draggableId,index:e.index,type:m,droppableId:f}},[e.draggableId,e.index,m,f]),h=e.children,S=e.draggableId,y=e.isEnabled,T=e.shouldRespectForcePress,C=e.canDragInteractiveElements,E=e.isClone,N=e.mapped,M=e.dropAnimationFinished;if(nE(e,s,r),rE(E),!E){var I=Me(function(){return{descriptor:u,registry:c,getDraggableRef:r,canDragInteractiveElements:C,shouldRespectForcePress:T,isEnabled:y}},[u,c,r,C,T,y]);tE(I)}var k=Me(function(){return y?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":S,"data-rbd-drag-handle-context-id":s,draggable:!1,onDragStart:oE}:null},[s,l,S,y]),V=ge(function(P){N.type==="DRAGGING"&&N.dropping&&P.propertyName==="transform"&&M()},[M,N]),A=Me(function(){var P=QT(N),O=N.type==="DRAGGING"&&N.dropping?V:null,$={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":s,"data-rbd-draggable-id":S,style:P,onTransitionEnd:O},dragHandleProps:k};return $},[s,k,S,N,V,n]),w=Me(function(){return{draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}},[u.droppableId,u.id,u.index,u.type]);return h(A,N.snapshot,w)}var Rp=function(e,t){return e===t},Bp=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},sE=function(t){return t.combine?t.combine.draggableId:null},iE=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function lE(){var e=tt(function(a,s){return{x:a,y:s}}),t=tt(function(a,s,l,c,p){return{isDragging:!0,isClone:s,isDropAnimating:!!p,dropAnimation:p,mode:a,draggingOver:l,combineWith:c,combineTargetFor:null}}),n=tt(function(a,s,l,c,p,m,f){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:m,mode:s,offset:a,dimension:l,forceShouldAnimate:f,snapshot:t(s,c,p,m,null)}}}),r=function(s,l){if(s.isDragging){if(s.critical.draggable.id!==l.draggableId)return null;var c=s.current.client.offset,p=s.dimensions.draggables[l.draggableId],m=Ct(s.impact),f=iE(s.impact),u=s.forceShouldAnimate;return n(e(c.x,c.y),s.movementMode,p,l.isClone,m,f,u)}if(s.phase==="DROP_ANIMATING"){var h=s.completed;if(h.result.draggableId!==l.draggableId)return null;var S=l.isClone,y=s.dimensions.draggables[l.draggableId],T=h.result,C=T.mode,E=Bp(T),N=sE(T),M=s.dropDuration,I={duration:M,curve:Os.drop,moveTo:s.newHomeClientOffset,opacity:N?jr.opacity.drop:null,scale:N?jr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:s.newHomeClientOffset,dimension:y,dropping:I,draggingOver:E,combineWith:N,mode:C,forceShouldAnimate:null,snapshot:t(C,S,E,N,I)}}}return null};return r}function Ap(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var cE={mapped:{type:"SECONDARY",offset:nt,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ap(null)}};function dE(){var e=tt(function(l,c){return{x:l,y:c}}),t=tt(Ap),n=tt(function(l,c,p){return c===void 0&&(c=null),{mapped:{type:"SECONDARY",offset:l,combineTargetFor:c,shouldAnimateDisplacement:p,snapshot:t(c)}}}),r=function(c){return c?n(nt,c,!0):null},a=function(c,p,m,f){var u=m.displaced.visible[c],h=!!(f.inVirtualList&&f.effected[c]),S=Bo(m),y=S&&S.draggableId===c?p:null;if(!u){if(!h)return r(y);if(m.displaced.invisible[c])return null;var T=ur(f.displacedBy.point),C=e(T.x,T.y);return n(C,y,!0)}if(h)return r(y);var E=m.displacedBy.point,N=e(E.x,E.y);return n(N,y,u.shouldAnimate)},s=function(c,p){if(c.isDragging)return c.critical.draggable.id===p.draggableId?null:a(p.draggableId,c.critical.draggable.id,c.impact,c.afterCritical);if(c.phase==="DROP_ANIMATING"){var m=c.completed;return m.result.draggableId===p.draggableId?null:a(p.draggableId,m.result.draggableId,m.impact,m.afterCritical)}return null};return s}var pE=function(){var t=lE(),n=dE(),r=function(s,l){return t(s,l)||n(s,l)||cE};return r},uE={dropAnimationFinished:Yd},mE=td(pE,uE,null,{context:Ys,pure:!0,areStatePropsEqual:Rp})(aE);function Fp(e){var t=Yo(ti),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:x.createElement(mE,e)}function Vp(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return x.createElement(Fp,ye({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function fE(e){var t=x.useContext(Ko);t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find app context"):K());var n=t.contextId,r=t.isMovementAllowed,a=x.useRef(null),s=x.useRef(null),l=e.children,c=e.droppableId,p=e.type,m=e.mode,f=e.direction,u=e.ignoreContainerClipping,h=e.isDropDisabled,S=e.isCombineEnabled,y=e.snapshot,T=e.useClone,C=e.updateViewportMaxScroll,E=e.getContainerForClone,N=ge(function(){return a.current},[]),M=ge(function(z){a.current=z},[]),I=ge(function(){return s.current},[]),k=ge(function(z){s.current=z},[]);UT({props:e,getDroppableRef:N,getPlaceholderRef:I});var V=ge(function(){r()&&C({maxScroll:Xd()})},[r,C]);FT({droppableId:c,type:p,mode:m,direction:f,isDropDisabled:h,isCombineEnabled:S,ignoreContainerClipping:u,getDroppableRef:N});var A=x.createElement(zT,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(z){var L=z.onClose,J=z.data,B=z.animate;return x.createElement(HT,{placeholder:J,onClose:L,innerRef:k,animate:B,contextId:n,onTransitionEnd:V})}),w=Me(function(){return{innerRef:M,placeholder:A,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}},[n,c,A,M]),P=T?T.dragging.draggableId:null,O=Me(function(){return{droppableId:c,type:p,isUsingCloneFor:P}},[c,P,p]);function $(){if(!T)return null;var z=T.dragging,L=T.render,J=x.createElement(Fp,{draggableId:z.draggableId,index:z.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(B,te){return L(B,te,z)});return bo.createPortal(J,E())}return x.createElement(ti.Provider,{value:O},l(w,y),$())}var oi=function(t,n){return t===n.droppable.type},$p=function(t,n){return n.draggables[t.draggable.id]},hE=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ye({},t,{shouldAnimatePlaceholder:!1}),r=tt(function(l){return{draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}}),a=tt(function(l,c,p,m,f,u){var h=f.descriptor.id,S=f.descriptor.droppableId===l;if(S){var y=u?{render:u,dragging:r(f.descriptor)}:null,T={isDraggingOver:p,draggingOverWith:p?h:null,draggingFromThisWith:h,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!1,snapshot:T,useClone:y}}if(!c)return n;if(!m)return t;var C={isDraggingOver:p,draggingOverWith:h,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!0,snapshot:C,useClone:null}}),s=function(c,p){var m=p.droppableId,f=p.type,u=!p.isDropDisabled,h=p.renderClone;if(c.isDragging){var S=c.critical;if(!oi(f,S))return n;var y=$p(S,c.dimensions),T=Ct(c.impact)===m;return a(m,u,T,T,y,h)}if(c.phase==="DROP_ANIMATING"){var C=c.completed;if(!oi(f,C.critical))return n;var E=$p(C.critical,c.dimensions);return a(m,u,Bp(C.result)===m,Ct(C.impact)===m,E,h)}if(c.phase==="IDLE"&&c.completed&&!c.shouldFlush){var N=c.completed;if(!oi(f,N.critical))return n;var M=Ct(N.impact)===m,I=!!(N.impact.at&&N.impact.at.type==="COMBINE"),k=N.critical.droppable.id===m;return M?I?t:n:k?t:n}return n};return s},SE={updateViewportMaxScroll:mv};function gE(){return document.body||(process.env.NODE_ENV!=="production"?K(!1,"document.body is not ready"):K()),document.body}var bE={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:gE},ai=td(hE,SE,null,{context:Ys,pure:!0,areStatePropsEqual:Rp})(fE);ai.defaultProps=bE;const vE={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"};function Ue(e){const{children:t,className:n,href:r,icon:a,kind:s=G.ButtonKind.DEFAULT,spinning:l,spinningTitle:c,type:p=G.ButtonType.BUTTON,unsafelyReplaceClassName:m,...f}=e;let{disabled:u}=e;l&&(u=!0);const{t:h}=o.useContext(He),S=Y(m||"sps-button",`sps-button--${s}`,u&&"sps-button--disabled",l&&"sps-button--spinning",n),y=a&&o.createElement("i",{className:Y("sps-icon",`sps-icon-${a}`),"aria-hidden":"true"}),T=l&&o.createElement("div",{className:"sps-spinner"},c||h("design-system:button.spinningTitle"));return o.createElement("div",{className:S},r?o.createElement("a",{...f,href:r,className:"sps-button__clickable-element"},y,t,T):o.createElement("button",{...f,type:p,className:"sps-button__clickable-element",disabled:u},y,t,T))}Object.assign(Ue,{props:vE,displayName:"SpsButton"});const yE={content:"ReactNodeLike",icon:"SpsIcon",title:"string"};function Kp(e){const{content:t,className:n,icon:r,title:a,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=Y(l||"sps-card__header",n);return o.createElement("div",{className:p,title:a,...c},o.createElement("div",{className:"sps-card__title"}," ",r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`})," ",a),o.createElement("div",{className:"sps-card__header-content"},t))}Object.assign(Kp,{props:yE,displayName:"SpsCardHeader"});const TE={icon:"SpsIcon",kind:"TagKind"};function Ft(e){const{children:t,className:n,icon:r,kind:a=G.TagKind.DEFAULT,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=o.Children.toArray(t).filter(f=>typeof f=="string").join(""),m=Y(l||"sps-tag",`sps-tag--${a}`,n);return o.createElement("span",{className:m,"data-testid":`${s}__tag`,title:p,...c},r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`,"data-testid":`${s}__icon`}),t)}Object.assign(Ft,{props:TE,displayName:"SpsTag"});const EE={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"};function si(e){const{activateTab:t,active:n,children:r,className:a,label:s,icon:l,id:c,index:p=0,tag:m,tagKind:f,tagIcon:u,"data-testid":h,unsafelyReplaceClassName:S,...y}=e,T=()=>{t&&t(this,p,r)},C=N=>{(N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),N.stopPropagation(),t&&t(this,p,r))},E=Y(S||"sps-nav__item","sps-nav__link",n&&"active",a);return o.createElement("a",{className:E,onClick:T,"data-toggle":"tab",id:c,role:"tab","aria-controls":c,...y,tabIndex:0,onKeyDown:C},l&&o.createElement("i",{className:`sps-icon sps-icon-${l}`}),o.createElement("span",null,s),m&&o.createElement(Ft,{kind:f||G.TagKind.KEY,icon:u},m))}Object.assign(si,{props:EE,displayName:"SpsCardTabbedPane"});function wE(e,t,n){const[r,a]=o.useState({index:0,content:null}),s=o.useCallback((l,c,p)=>{a({index:c,content:p})},[]);return o.useEffect(()=>{function l(m){for(const f of m){const u=f.props;a({...r,content:u.children});break}}function c(m,f){for(let u=0;u<=m.length;u+=1){const h=m[u];if(h&&h.props&&(h.props.id&&h.props.id===f||h.props.label&&h.props.label===f)){a({content:h.props.children,index:u});break}}}const p=o.Children.toArray(e);n&&t?c(p,t):n&&l(p)},[t,e]),[r,s]}const CE={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"};function ii(e){o.useEffect(()=>{console.log(["App developers: There's a new card component! Update for improved performance,","fewer bugs, and increased flexibility. Reach out to the design system help Slack","channel if you have any questions!"].join(" "))},[]);const{activeTab:t,children:n,className:r,footer:a,headerContent:s,headerIcon:l,headerTitle:c,"data-testid":p,unsafelyReplaceClassName:m,...f}=e,u=o.Children.toArray(n).some(T=>o.isValidElement(T)&&T.type===si),[h,S]=wE(n,t,u),y=Y(m||"sps-card",r);return o.createElement("div",{...f,className:y,"data-testid":`${p}__card`},(c||s)&&o.createElement(Kp,{title:c,content:vt(s),icon:l,"data-testid":`${p}__header`}),u===!0?o.createElement(o.Fragment,null,o.createElement("nav",{className:"sps-nav sps-nav--tabs",role:"tablist","data-testid":`${p}__tabs`},o.Children.map(n,(T,C)=>{if(o.isValidElement(T))return o.cloneElement(T,{active:C===h.index,index:C,activateTab:S,"data-testid":`${p}__tab`})})),o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body--tab-active`},h.content)):o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body`},n),a&&o.createElement("div",{className:"sps-card__footer","data-testid":`${p}__footer`},vt(a)))}Object.assign(ii,{props:CE,displayName:"SpsCard"});function li(e,t){const[n,...r]=v.crumblePath(t);return r.length?e.members[n].get(r):e.members[n]}function DE(e=[],t={}){return{validators:[],...t,_type:"Array",members:[...e],errors:null,invalid:!1,isValid(){const n=this;return!n.invalid&&n.members.every(r=>r.isValid())},isRequired(){const n=this;return n.validators&&n.validators.indexOf(To.required)>-1},hasError(n){const r=this;return r.errors&&Object.prototype.hasOwnProperty.call(r.errors,n)},length:e.length,setInitValue(n){for(const[r,a]of this.members.entries())a.setInitValue(n[r]);return this},getValue(){return this.members.map(n=>n.getValue())},setValue(n=[]){for(const[r,a]of this.members.entries())a.setValue(n[r]);return this},update(){return this},isFocused(){return this.members.some(n=>n.isFocused())},focus(){const n=this;return n.members.length&&n.members[0].focus(),this},blur(){for(const n of this.members)n.blur();return this},isPristine(){return this.members.every(n=>n.isPristine())},markAsPristine(){for(const n of this.members)n.markAsPristine();return this},markAsDirty(){for(const n of this.members)n.markAsDirty();return this},reset(n){const r=this;r.members=[...e],r.length=e.length;for(const[a,s]of r.members.entries())n&&a<n.length?s.reset(n[a]):s.reset();return r.update(),this},get(n){return li(this,n)},at(n){return this.members[n]},push(n){const r=this;return r.members.push(n),r.length=r.members.length,r.update(),this},insert(n,r){const a=this;return a.members.splice(n,0,r),a.length=a.members.length,a.update(),this},removeAt(n){const r=this;return r.members.splice(n,1),r.length=r.members.length,r.update(),this},setControl(n,r){const a=this;return a.members[n]=r,a.update(),this}}}function NE(e,t={}){return{validators:[],id:ft(),...t,_type:"Control",initValue:e,setInitValue(n){return this.value=n,this.initValue=n,this},value:e,getValue(){return this.value},setValue(n){return this.value=n,this.update(),this},errors:null,invalid:!1,isValid(){return!this.invalid},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},focused:!1,isFocused(){return this.focused},pristine:!0,isPristine(){return this.pristine},isRequired(){return this.validators&&this.validators.indexOf(To.required)>-1},update(){return this},focus(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this},blur(){return this.focused=!1,this.update(),this.onBlur&&this.onBlur(),this},markAsPristine(){return this.pristine=!0,this.update(),this},markAsDirty(){return this.pristine=!1,this.update(),this},reset(n=this.initValue){return this.value=n,this.pristine=!0,this.update(),this}}}function kE(e={},t={}){return{validators:[],...t,_type:"Group",members:{...e},errors:null,invalid:!1,isValid(){return!this.invalid&&Object.keys(this.members).every(n=>this.members[n].isValid())},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},setInitValue(n={}){for(const r of Object.keys(this.members))this.members[r].setInitValue(n[r]);return this},getValue(){return Object.keys(this.members).reduce((n,r)=>Object.assign(n,{[r]:this.members[r].getValue()}),{})},setValue(n={}){for(const r of Object.keys(this.members))this.members[r].setValue(n[r]);return this},update(){return this},isFocused(){return Object.keys(this.members).some(n=>this.members[n].isFocused())},focus(){const n=Object.keys(this.members);return n.length&&this.members[n[0]].focus(),this},blur(){for(const n of Object.keys(this.members))this.members[n].blur();return this},isPristine(){return Object.keys(this.members).every(n=>this.members[n].isPristine())},markAsPristine(){for(const n of Object.keys(this.members))this.members[n].markAsPristine();return this},markAsDirty(){for(const n of Object.keys(this.members))this.members[n].markAsDirty();return this},reset(n){this.members={...e};for(const r of Object.keys(this.members))n&&Object.prototype.hasOwnProperty.call(n,r)?this.members[r].reset(n[r]):this.members[r].reset();return this.update(),this},get(n){return li(this,n)},addControl(n,r){if(this.contains(n))throw new Error(`Form group already contains a control called "${n}".`);return this.members[n]=r,this.update(),this},removeControl(n){return delete this.members[n],this.update(),this},setControl(n,r){return this.members[n]=r,this.update(),this},contains(n){return Object.keys(this.members).indexOf(n)>-1}}}function IE(e,t){t&&e.setInitValue(t);const[n,r]=x.useState(),[a,s]=x.useState([]),[l,c]=x.useReducer(p=>{for(const m of a)for(const f of v.traversePath(p,m))f.validators&&f.validators.length&&(f.errors=Eo(f.getValue(),f.validators),f.invalid=!!f.errors&&!f.pristine);return r(void 0),s([]),{...p}},e);return v.forEachNestedObject(l,(p,m)=>{m._type&&(m.update=function(){return a.push(p),s(a),n||r(window.setTimeout(c,0)),this})}),l}function xE(e,t=null){const[n,r]=x.useState(t),a=x.useRef(()=>null);return x.useEffect(()=>{const s=()=>n;if(e.validators){const l=e.validators.indexOf(a.current);l===-1?e.validators.push(s):e.validators[l]=s,e.update(),a.current=s}},[n]),[n,r]}const Hp={formMeta:"SpsFormSetMeta<any>",onSubmit:"React.FormEventHandler"},no=o.forwardRef((e,t)=>{const{children:n,onSubmit:r,formArray:a,formGroup:s,formMeta:l,...c}=e,p=s||a;function m(f){f.preventDefault(),p&&p.markAsDirty(),l&&(l.markAsDirty(),l.markAsBlurred(),l.markAsSubmitted()),r&&r(f)}return o.createElement("form",{ref:t,onSubmit:m,...c},n)});Object.assign(no,{props:Hp,displayName:"SpsForm"});const Wp={},ME={ideal:{label:"Ideal",examples:{ideal:{react:v.code`
|
|
521
|
+
`)}}],YT=[function(t){var n=t.props;n.renderClone||(process.env.NODE_ENV!=="production"?K(!1,"Must provide a clone render function (renderClone) for virtual lists"):K())},function(t){var n=t.getPlaceholderRef;n()&&(process.env.NODE_ENV!=="production"?K(!1,"Expected virtual list to not have a placeholder"):K())}];function UT(e){eo(function(){ri(e,WT),e.props.mode==="standard"&&ri(e,GT),e.props.mode==="virtual"&&ri(e,YT)})}var zT=function(e){gc(t,e);function t(){for(var r,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s))||this,r.state={isVisible:!!r.props.on,data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){r.state.animate==="close"&&r.setState({isVisible:!1})},r}t.getDerivedStateFromProps=function(a,s){return a.shouldAnimate?a.on?{isVisible:!0,data:a.on,animate:"open"}:s.isVisible?{isVisible:!0,data:s.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!a.on,data:a.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var a={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(a)},t}(x.PureComponent),Pp={dragging:5e3,dropAnimating:4500},jT=function(t,n){return n?qr.drop(n.duration):t?qr.snap:qr.fluid},qT=function(t,n){return t?n?jr.opacity.drop:jr.opacity.combining:null},JT=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function ZT(e){var t=e.dimension,n=t.client,r=e.offset,a=e.combineWith,s=e.dropping,l=!!a,c=JT(e),p=!!s,m=p?Rs.drop(r,l):Rs.moveTo(r),f={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:jT(c,s),transform:m,opacity:qT(l,p),zIndex:p?Pp.dropAnimating:Pp.dragging,pointerEvents:"none"};return f}function XT(e){return{transform:Rs.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function QT(e){return e.type==="DRAGGING"?ZT(e):XT(e)}function eE(e,t,n){n===void 0&&(n=rt);var r=window.getComputedStyle(t),a=t.getBoundingClientRect(),s=ad(a,r),l=_o(s,n),c={client:s,tagName:t.tagName.toLowerCase(),display:r.display},p={x:s.marginBox.width,y:s.marginBox.height},m={descriptor:e,placeholder:c,displaceBy:p,client:s,page:l};return m}function tE(e){var t=Us("draggable"),n=e.descriptor,r=e.registry,a=e.getDraggableRef,s=e.canDragInteractiveElements,l=e.shouldRespectForcePress,c=e.isEnabled,p=Me(function(){return{canDragInteractiveElements:s,shouldRespectForcePress:l,isEnabled:c}},[s,c,l]),m=ge(function(S){var y=a();return y||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get dimension when no ref is set"):K()),eE(n,y,S)},[n,a]),f=Me(function(){return{uniqueId:t,descriptor:n,options:p,getDimension:m}},[n,m,p,t]),u=x.useRef(f),h=x.useRef(!0);Dt(function(){return r.draggable.register(u.current),function(){return r.draggable.unregister(u.current)}},[r.draggable]),Dt(function(){if(h.current){h.current=!1;return}var S=u.current;u.current=f,r.draggable.update(f,S)},[f,r.draggable])}function nE(e,t,n){eo(function(){function r(s){return"Draggable[id: "+s+"]: "}var a=e.draggableId;a||(process.env.NODE_ENV!=="production"?K(!1,"Draggable requires a draggableId"):K(!1)),typeof a!="string"&&(process.env.NODE_ENV!=="production"?K(!1,`Draggable requires a [string] draggableId.
|
|
522
|
+
Provided: [type: `+typeof a+"] (value: "+a+")"):K(!1)),ob(e.index)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" requires an integer index prop"):K(!1)),e.mapped.type!=="DRAGGING"&&(Op(n()),e.isEnabled&&(up(t,a)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" Unable to find drag handle"):K(!1))))})}function rE(e){js(function(){var t=x.useRef(e);eo(function(){e!==t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Draggable isClone prop value changed during component life"):K(!1))},[e])})}function oE(e){e.preventDefault()}function aE(e){var t=x.useRef(null),n=ge(function(P){t.current=P},[]),r=ge(function(){return t.current},[]),a=Yo(Ko),s=a.contextId,l=a.dragHandleUsageInstructionsId,c=a.registry,p=Yo(ti),m=p.type,f=p.droppableId,u=Me(function(){return{id:e.draggableId,index:e.index,type:m,droppableId:f}},[e.draggableId,e.index,m,f]),h=e.children,S=e.draggableId,y=e.isEnabled,T=e.shouldRespectForcePress,C=e.canDragInteractiveElements,E=e.isClone,N=e.mapped,M=e.dropAnimationFinished;if(nE(e,s,r),rE(E),!E){var I=Me(function(){return{descriptor:u,registry:c,getDraggableRef:r,canDragInteractiveElements:C,shouldRespectForcePress:T,isEnabled:y}},[u,c,r,C,T,y]);tE(I)}var k=Me(function(){return y?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":S,"data-rbd-drag-handle-context-id":s,draggable:!1,onDragStart:oE}:null},[s,l,S,y]),V=ge(function(P){N.type==="DRAGGING"&&N.dropping&&P.propertyName==="transform"&&M()},[M,N]),A=Me(function(){var P=QT(N),O=N.type==="DRAGGING"&&N.dropping?V:null,$={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":s,"data-rbd-draggable-id":S,style:P,onTransitionEnd:O},dragHandleProps:k};return $},[s,k,S,N,V,n]),w=Me(function(){return{draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}},[u.droppableId,u.id,u.index,u.type]);return h(A,N.snapshot,w)}var Rp=function(e,t){return e===t},Bp=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},sE=function(t){return t.combine?t.combine.draggableId:null},iE=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function lE(){var e=nt(function(a,s){return{x:a,y:s}}),t=nt(function(a,s,l,c,p){return{isDragging:!0,isClone:s,isDropAnimating:!!p,dropAnimation:p,mode:a,draggingOver:l,combineWith:c,combineTargetFor:null}}),n=nt(function(a,s,l,c,p,m,f){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:m,mode:s,offset:a,dimension:l,forceShouldAnimate:f,snapshot:t(s,c,p,m,null)}}}),r=function(s,l){if(s.isDragging){if(s.critical.draggable.id!==l.draggableId)return null;var c=s.current.client.offset,p=s.dimensions.draggables[l.draggableId],m=Ct(s.impact),f=iE(s.impact),u=s.forceShouldAnimate;return n(e(c.x,c.y),s.movementMode,p,l.isClone,m,f,u)}if(s.phase==="DROP_ANIMATING"){var h=s.completed;if(h.result.draggableId!==l.draggableId)return null;var S=l.isClone,y=s.dimensions.draggables[l.draggableId],T=h.result,C=T.mode,E=Bp(T),N=sE(T),M=s.dropDuration,I={duration:M,curve:Os.drop,moveTo:s.newHomeClientOffset,opacity:N?jr.opacity.drop:null,scale:N?jr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:s.newHomeClientOffset,dimension:y,dropping:I,draggingOver:E,combineWith:N,mode:C,forceShouldAnimate:null,snapshot:t(C,S,E,N,I)}}}return null};return r}function Ap(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var cE={mapped:{type:"SECONDARY",offset:rt,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ap(null)}};function dE(){var e=nt(function(l,c){return{x:l,y:c}}),t=nt(Ap),n=nt(function(l,c,p){return c===void 0&&(c=null),{mapped:{type:"SECONDARY",offset:l,combineTargetFor:c,shouldAnimateDisplacement:p,snapshot:t(c)}}}),r=function(c){return c?n(rt,c,!0):null},a=function(c,p,m,f){var u=m.displaced.visible[c],h=!!(f.inVirtualList&&f.effected[c]),S=Bo(m),y=S&&S.draggableId===c?p:null;if(!u){if(!h)return r(y);if(m.displaced.invisible[c])return null;var T=ur(f.displacedBy.point),C=e(T.x,T.y);return n(C,y,!0)}if(h)return r(y);var E=m.displacedBy.point,N=e(E.x,E.y);return n(N,y,u.shouldAnimate)},s=function(c,p){if(c.isDragging)return c.critical.draggable.id===p.draggableId?null:a(p.draggableId,c.critical.draggable.id,c.impact,c.afterCritical);if(c.phase==="DROP_ANIMATING"){var m=c.completed;return m.result.draggableId===p.draggableId?null:a(p.draggableId,m.result.draggableId,m.impact,m.afterCritical)}return null};return s}var pE=function(){var t=lE(),n=dE(),r=function(s,l){return t(s,l)||n(s,l)||cE};return r},uE={dropAnimationFinished:Yd},mE=td(pE,uE,null,{context:Ys,pure:!0,areStatePropsEqual:Rp})(aE);function Fp(e){var t=Yo(ti),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:x.createElement(mE,e)}function Vp(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return x.createElement(Fp,ye({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function fE(e){var t=x.useContext(Ko);t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find app context"):K());var n=t.contextId,r=t.isMovementAllowed,a=x.useRef(null),s=x.useRef(null),l=e.children,c=e.droppableId,p=e.type,m=e.mode,f=e.direction,u=e.ignoreContainerClipping,h=e.isDropDisabled,S=e.isCombineEnabled,y=e.snapshot,T=e.useClone,C=e.updateViewportMaxScroll,E=e.getContainerForClone,N=ge(function(){return a.current},[]),M=ge(function(z){a.current=z},[]),I=ge(function(){return s.current},[]),k=ge(function(z){s.current=z},[]);UT({props:e,getDroppableRef:N,getPlaceholderRef:I});var V=ge(function(){r()&&C({maxScroll:Xd()})},[r,C]);FT({droppableId:c,type:p,mode:m,direction:f,isDropDisabled:h,isCombineEnabled:S,ignoreContainerClipping:u,getDroppableRef:N});var A=x.createElement(zT,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(z){var L=z.onClose,J=z.data,B=z.animate;return x.createElement(HT,{placeholder:J,onClose:L,innerRef:k,animate:B,contextId:n,onTransitionEnd:V})}),w=Me(function(){return{innerRef:M,placeholder:A,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}},[n,c,A,M]),P=T?T.dragging.draggableId:null,O=Me(function(){return{droppableId:c,type:p,isUsingCloneFor:P}},[c,P,p]);function $(){if(!T)return null;var z=T.dragging,L=T.render,J=x.createElement(Fp,{draggableId:z.draggableId,index:z.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(B,te){return L(B,te,z)});return bo.createPortal(J,E())}return x.createElement(ti.Provider,{value:O},l(w,y),$())}var oi=function(t,n){return t===n.droppable.type},$p=function(t,n){return n.draggables[t.draggable.id]},hE=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ye({},t,{shouldAnimatePlaceholder:!1}),r=nt(function(l){return{draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}}),a=nt(function(l,c,p,m,f,u){var h=f.descriptor.id,S=f.descriptor.droppableId===l;if(S){var y=u?{render:u,dragging:r(f.descriptor)}:null,T={isDraggingOver:p,draggingOverWith:p?h:null,draggingFromThisWith:h,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!1,snapshot:T,useClone:y}}if(!c)return n;if(!m)return t;var C={isDraggingOver:p,draggingOverWith:h,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:f.placeholder,shouldAnimatePlaceholder:!0,snapshot:C,useClone:null}}),s=function(c,p){var m=p.droppableId,f=p.type,u=!p.isDropDisabled,h=p.renderClone;if(c.isDragging){var S=c.critical;if(!oi(f,S))return n;var y=$p(S,c.dimensions),T=Ct(c.impact)===m;return a(m,u,T,T,y,h)}if(c.phase==="DROP_ANIMATING"){var C=c.completed;if(!oi(f,C.critical))return n;var E=$p(C.critical,c.dimensions);return a(m,u,Bp(C.result)===m,Ct(C.impact)===m,E,h)}if(c.phase==="IDLE"&&c.completed&&!c.shouldFlush){var N=c.completed;if(!oi(f,N.critical))return n;var M=Ct(N.impact)===m,I=!!(N.impact.at&&N.impact.at.type==="COMBINE"),k=N.critical.droppable.id===m;return M?I?t:n:k?t:n}return n};return s},SE={updateViewportMaxScroll:mv};function gE(){return document.body||(process.env.NODE_ENV!=="production"?K(!1,"document.body is not ready"):K()),document.body}var bE={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:gE},ai=td(hE,SE,null,{context:Ys,pure:!0,areStatePropsEqual:Rp})(fE);ai.defaultProps=bE;const vE={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"};function Ue(e){const{children:t,className:n,href:r,icon:a,kind:s=G.ButtonKind.DEFAULT,spinning:l,spinningTitle:c,type:p=G.ButtonType.BUTTON,unsafelyReplaceClassName:m,...f}=e;let{disabled:u}=e;l&&(u=!0);const{t:h}=o.useContext(He),S=Y(m||"sps-button",`sps-button--${s}`,u&&"sps-button--disabled",l&&"sps-button--spinning",n),y=a&&o.createElement("i",{className:Y("sps-icon",`sps-icon-${a}`),"aria-hidden":"true"}),T=l&&o.createElement("div",{className:"sps-spinner"},c||h("design-system:button.spinningTitle"));return o.createElement("div",{className:S},r?o.createElement("a",{...f,href:r,className:"sps-button__clickable-element"},y,t,T):o.createElement("button",{...f,type:p,className:"sps-button__clickable-element",disabled:u},y,t,T))}Object.assign(Ue,{props:vE,displayName:"SpsButton"});const yE={content:"ReactNodeLike",icon:"SpsIcon",title:"string"};function Kp(e){const{content:t,className:n,icon:r,title:a,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=Y(l||"sps-card__header",n);return o.createElement("div",{className:p,title:a,...c},o.createElement("div",{className:"sps-card__title"}," ",r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`})," ",a),o.createElement("div",{className:"sps-card__header-content"},t))}Object.assign(Kp,{props:yE,displayName:"SpsCardHeader"});const TE={icon:"SpsIcon",kind:"TagKind"};function Ft(e){const{children:t,className:n,icon:r,kind:a=G.TagKind.DEFAULT,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=o.Children.toArray(t).filter(f=>typeof f=="string").join(""),m=Y(l||"sps-tag",`sps-tag--${a}`,n);return o.createElement("span",{className:m,"data-testid":`${s}__tag`,title:p,...c},r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`,"data-testid":`${s}__icon`}),t)}Object.assign(Ft,{props:TE,displayName:"SpsTag"});const EE={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"};function si(e){const{activateTab:t,active:n,children:r,className:a,label:s,icon:l,id:c,index:p=0,tag:m,tagKind:f,tagIcon:u,"data-testid":h,unsafelyReplaceClassName:S,...y}=e,T=()=>{t&&t(this,p,r)},C=N=>{(N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),N.stopPropagation(),t&&t(this,p,r))},E=Y(S||"sps-nav__item","sps-nav__link",n&&"active",a);return o.createElement("a",{className:E,onClick:T,"data-toggle":"tab",id:c,role:"tab","aria-controls":c,...y,tabIndex:0,onKeyDown:C},l&&o.createElement("i",{className:`sps-icon sps-icon-${l}`}),o.createElement("span",null,s),m&&o.createElement(Ft,{kind:f||G.TagKind.KEY,icon:u},m))}Object.assign(si,{props:EE,displayName:"SpsCardTabbedPane"});function wE(e,t,n){const[r,a]=o.useState({index:0,content:null}),s=o.useCallback((l,c,p)=>{a({index:c,content:p})},[]);return o.useEffect(()=>{function l(m){for(const f of m){const u=f.props;a({...r,content:u.children});break}}function c(m,f){for(let u=0;u<=m.length;u+=1){const h=m[u];if(h&&h.props&&(h.props.id&&h.props.id===f||h.props.label&&h.props.label===f)){a({content:h.props.children,index:u});break}}}const p=o.Children.toArray(e);n&&t?c(p,t):n&&l(p)},[t,e]),[r,s]}const CE={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"};function ii(e){o.useEffect(()=>{console.log(["App developers: There's a new card component! Update for improved performance,","fewer bugs, and increased flexibility. Reach out to the design system help Slack","channel if you have any questions!"].join(" "))},[]);const{activeTab:t,children:n,className:r,footer:a,headerContent:s,headerIcon:l,headerTitle:c,"data-testid":p,unsafelyReplaceClassName:m,...f}=e,u=o.Children.toArray(n).some(T=>o.isValidElement(T)&&T.type===si),[h,S]=wE(n,t,u),y=Y(m||"sps-card",r);return o.createElement("div",{...f,className:y,"data-testid":`${p}__card`},(c||s)&&o.createElement(Kp,{title:c,content:vt(s),icon:l,"data-testid":`${p}__header`}),u===!0?o.createElement(o.Fragment,null,o.createElement("nav",{className:"sps-nav sps-nav--tabs",role:"tablist","data-testid":`${p}__tabs`},o.Children.map(n,(T,C)=>{if(o.isValidElement(T))return o.cloneElement(T,{active:C===h.index,index:C,activateTab:S,"data-testid":`${p}__tab`})})),o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body--tab-active`},h.content)):o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body`},n),a&&o.createElement("div",{className:"sps-card__footer","data-testid":`${p}__footer`},vt(a)))}Object.assign(ii,{props:CE,displayName:"SpsCard"});function li(e,t){const[n,...r]=v.crumblePath(t);return r.length?e.members[n].get(r):e.members[n]}function DE(e=[],t={}){return{validators:[],...t,_type:"Array",members:[...e],errors:null,invalid:!1,isValid(){const n=this;return!n.invalid&&n.members.every(r=>r.isValid())},isRequired(){const n=this;return n.validators&&n.validators.indexOf(To.required)>-1},hasError(n){const r=this;return r.errors&&Object.prototype.hasOwnProperty.call(r.errors,n)},length:e.length,setInitValue(n){for(const[r,a]of this.members.entries())a.setInitValue(n[r]);return this},getValue(){return this.members.map(n=>n.getValue())},setValue(n=[]){for(const[r,a]of this.members.entries())a.setValue(n[r]);return this},update(){return this},isFocused(){return this.members.some(n=>n.isFocused())},focus(){const n=this;return n.members.length&&n.members[0].focus(),this},blur(){for(const n of this.members)n.blur();return this},isPristine(){return this.members.every(n=>n.isPristine())},markAsPristine(){for(const n of this.members)n.markAsPristine();return this},markAsDirty(){for(const n of this.members)n.markAsDirty();return this},reset(n){const r=this;r.members=[...e],r.length=e.length;for(const[a,s]of r.members.entries())n&&a<n.length?s.reset(n[a]):s.reset();return r.update(),this},get(n){return li(this,n)},at(n){return this.members[n]},push(n){const r=this;return r.members.push(n),r.length=r.members.length,r.update(),this},insert(n,r){const a=this;return a.members.splice(n,0,r),a.length=a.members.length,a.update(),this},removeAt(n){const r=this;return r.members.splice(n,1),r.length=r.members.length,r.update(),this},setControl(n,r){const a=this;return a.members[n]=r,a.update(),this}}}function NE(e,t={}){return{validators:[],id:ft(),...t,_type:"Control",initValue:e,setInitValue(n){return this.value=n,this.initValue=n,this},value:e,getValue(){return this.value},setValue(n){return this.value=n,this.update(),this},errors:null,invalid:!1,isValid(){return!this.invalid},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},focused:!1,isFocused(){return this.focused},pristine:!0,isPristine(){return this.pristine},isRequired(){return this.validators&&this.validators.indexOf(To.required)>-1},update(){return this},focus(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this},blur(){return this.focused=!1,this.update(),this.onBlur&&this.onBlur(),this},markAsPristine(){return this.pristine=!0,this.update(),this},markAsDirty(){return this.pristine=!1,this.update(),this},reset(n=this.initValue){return this.value=n,this.pristine=!0,this.update(),this}}}function kE(e={},t={}){return{validators:[],...t,_type:"Group",members:{...e},errors:null,invalid:!1,isValid(){return!this.invalid&&Object.keys(this.members).every(n=>this.members[n].isValid())},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},setInitValue(n={}){for(const r of Object.keys(this.members))this.members[r].setInitValue(n[r]);return this},getValue(){return Object.keys(this.members).reduce((n,r)=>Object.assign(n,{[r]:this.members[r].getValue()}),{})},setValue(n={}){for(const r of Object.keys(this.members))this.members[r].setValue(n[r]);return this},update(){return this},isFocused(){return Object.keys(this.members).some(n=>this.members[n].isFocused())},focus(){const n=Object.keys(this.members);return n.length&&this.members[n[0]].focus(),this},blur(){for(const n of Object.keys(this.members))this.members[n].blur();return this},isPristine(){return Object.keys(this.members).every(n=>this.members[n].isPristine())},markAsPristine(){for(const n of Object.keys(this.members))this.members[n].markAsPristine();return this},markAsDirty(){for(const n of Object.keys(this.members))this.members[n].markAsDirty();return this},reset(n){this.members={...e};for(const r of Object.keys(this.members))n&&Object.prototype.hasOwnProperty.call(n,r)?this.members[r].reset(n[r]):this.members[r].reset();return this.update(),this},get(n){return li(this,n)},addControl(n,r){if(this.contains(n))throw new Error(`Form group already contains a control called "${n}".`);return this.members[n]=r,this.update(),this},removeControl(n){return delete this.members[n],this.update(),this},setControl(n,r){return this.members[n]=r,this.update(),this},contains(n){return Object.keys(this.members).indexOf(n)>-1}}}function IE(e,t){t&&e.setInitValue(t);const[n,r]=x.useState(),[a,s]=x.useState([]),[l,c]=x.useReducer(p=>{for(const m of a)for(const f of v.traversePath(p,m))f.validators&&f.validators.length&&(f.errors=Eo(f.getValue(),f.validators),f.invalid=!!f.errors&&!f.pristine);return r(void 0),s([]),{...p}},e);return v.forEachNestedObject(l,(p,m)=>{m._type&&(m.update=function(){return a.push(p),s(a),n||r(window.setTimeout(c,0)),this})}),l}function xE(e,t=null){const[n,r]=x.useState(t),a=x.useRef(()=>null);return x.useEffect(()=>{const s=()=>n;if(e.validators){const l=e.validators.indexOf(a.current);l===-1?e.validators.push(s):e.validators[l]=s,e.update(),a.current=s}},[n]),[n,r]}const Hp={formMeta:"SpsFormSetMeta<any>",onSubmit:"React.FormEventHandler"},no=o.forwardRef((e,t)=>{const{children:n,onSubmit:r,formArray:a,formGroup:s,formMeta:l,...c}=e,p=s||a;function m(f){f.preventDefault(),p&&p.markAsDirty(),l&&(l.markAsDirty(),l.markAsBlurred(),l.markAsSubmitted()),r&&r(f)}return o.createElement("form",{ref:t,onSubmit:m,...c},n)});Object.assign(no,{props:Hp,displayName:"SpsForm"});const Wp={},ME={ideal:{label:"Ideal",examples:{ideal:{react:v.code`
|
|
523
523
|
import {
|
|
524
524
|
SpsForm,
|
|
525
525
|
SpsLabel,
|
|
@@ -1306,7 +1306,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var se=le(ae,ie,U,R,Z+".
|
|
|
1306
1306
|
</div>
|
|
1307
1307
|
);
|
|
1308
1308
|
}
|
|
1309
|
-
`}}}},$E={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDateRange | DatePreset>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:'(newDateRange: SimpleDateRange | DatePreset | null, preset?: DatePreset["definition"]) => void',presets:"Array<DatePreset>",selectedPreset:"string",onPresetChange:"(newPreset?: string) => void",value:"SimpleDateRange | DatePreset",showTwoMonths:"boolean",format:"string"},Qp="sps-datepicker",ui=[{definition:"P0D",label:"design-system:datepicker.preset.today"},{definition:"Before",label:"design-system:datepicker.preset.before"},{definition:"After",label:"design-system:datepicker.preset.after"},{definition:"P7D",label:"design-system:datepicker.preset.sevenDays"},{definition:"P30D",label:"design-system:datepicker.preset.thirtyDays"},{definition:"P60D",label:"design-system:datepicker.preset.sixtyDays"},{definition:"P90D",label:"design-system:datepicker.preset.ninetyDays"},{definition:"P1Y",label:"design-system:datepicker.preset.oneYear"}];function eu(e,t=""){return e.find(n=>n.definition===t)}function KE(e,t){return e.length===t.length&&e.every((n,r)=>n.definition===t[r].definition&&n.label===t[r].label)}function mi({children:e,className:t,disabled:n,formMeta:r,id:a,maxDate:s,minDate:l,onChange:c,presets:p=ui,selectedPreset:m,onPresetChange:f,value:u,showTwoMonths:h=!1,format:S,"data-testid":y,...T}){const{t:C}=o.useContext(He),{wrapperId:E,controlId:N}=bt(a,r),M=o.useRef(null),I=o.useRef(null),k=o.useRef(null),[V,A]=o.useState(Array.isArray(u)?Q.toStringRange(u,S):""),[w,P]=o.useState(eu(p,m)||null),[O,$]=o.useState(),{showPopup:z,doShowPopup:L,doHidePopup:J}=dr(M,k);function B(R,Z){r&&(r.setValue(R),r.markAsDirty()),c&&c(R,Z)}o.useEffect(()=>{P(eu(p,m)||null)},[m]);function te(R){return R&&/^design-system:/.test(R.label)?C(R.label):(R==null?void 0:R.label)??""}function H(R){const Z=u||[];let ae,ee=w;const de=ee?te(ee):"";de==="Before"?ae=[null,R]:de==="After"?ae=[R,null]:!Z[0]||Z[1]||Q.isBefore(R,Z[0])?ae=[R,null]:ae=[Z[0],R],(ae[0]&&ae[1]||de==="Before"||de==="After")&&(J(!0),I&&I.current&&I.current.focus()),ee&&de!=="Before"&&de!=="After"&&(P(null),ee=null),B(ae,ee==null?void 0:ee.definition),A(Q.toStringRange(ae,S)),$(void 0)}function q(R){A(R.target.value);let Z=Q.createRangeFrom(R.target.value,S),ae=w;const ee=ae?te(ae):"";Array.isArray(Z)&&(Z[0]&&Z[1]&&(ee==="Before"||ee==="After")?(P(null),ae=null):ee==="Before"&&Z[0]!==null?Z=[null,Z[0]]:ee==="After"&&Z[0]!==null&&(Z=[Z[0],null])),B(Z,ae==null?void 0:ae.definition),$(void 0)}function oe(){A(""),B(),$(void 0),P(null)}function W(R){switch(R.key){case"Tab":J();break;case"Backspace":R.target.selectionStart===0&&u&&w&&oe();break}}function j(R){if(f&&(R==null?void 0:R.definition)!==m&&f(typeof(R==null?void 0:R.definition)=="string"?R==null?void 0:R.definition:""),!R){P(null),B();return}P(R);let Z=Q.createRangeFromPreset(R,S);const ae=R&&te(R),ee=Q.getRangeSeparator(S);(ae==="Before"||ae==="After")&&u&&u[0]&&u[1]?Z=Q.createRangeFrom(ee,S):ae==="Before"?Z=Q.createRangeFrom(`${ee}${Q.toString(u&&(u[0]||u[1]),S)}`):ae==="After"&&(Z=Q.createRangeFrom(`${Q.toString(u&&(u[0]||u[1]),S)}${ee}`)),JSON.stringify(u)!==JSON.stringify(Z)&&B(Z,R==null?void 0:R.definition)}o.useEffect(()=>{if(!u){P(null);return}if(!KE(p,ui)&&Array.isArray(u)){const R=Q.toStringRange(u,S),Z=p.find(ae=>R===Q.toStringRange(Q.createRangeFromPreset(ae,S),S));Z?j(Z):u[0]&&u[1]&&P(null)}},[u,S]),o.useEffect(()=>{const R=["Before","After"].includes(te(w));!u||w&&!R?A(""):Array.isArray(u)&&((!u[0]||!u[0].hasOwnProperty(_r))&&(!u[1]||!u[1].hasOwnProperty(_r))&&A(Q.toStringRange(u,S)),w||$(void 0))},[u,w,S]);const ne=Y(Qp,"sps-text-input",z&&`${Qp}--open`,t);let re=V;const U=Q.getRangeSeparator(S);return w&&te(w)==="Before"&&V.startsWith(U)?re=V.substring(1):w&&te(w)==="After"&&V.endsWith(U)&&(re=V.substring(0,V.length-1)),o.createElement(o.Fragment,null,o.createElement(at,{id:E,className:ne,formMeta:r,inputRef:I,focusInputOnClick:!0,ref:M},o.createElement("div",{className:Y("sps-form-control",n&&"disabled")},o.createElement("i",{className:Y("sps-text-input__icon","sps-icon","sps-icon-calendar")}),w&&o.createElement("div",{"data-testid":`${y}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},te(w))),o.createElement("input",{type:"text",ref:I,className:"sps-text-input__input","data-testid":`${y}_date_input`,id:N,placeholder:!V&&!w?(S==null?void 0:S.toUpperCase())||ir:void 0,onChange:q,onClick:L,onFocus:L,onKeyDown:W,value:re,disabled:n,...T}),u&&!n&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:oe}))),o.createElement(Jo,{isOpen:z,attachTo:M,ref:k},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},C("design-system:datepicker.presetsLabel")),o.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{"data-testid":`${y}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${E}__range-custom`,className:"sps-custom-control__input",checked:!w,name:`sps-date-range-picker-${E}__range`,onChange:()=>j()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${E}__range-custom`},C("design-system:datepicker.preset.custom"))),p.map((R,Z)=>o.createElement("div",{key:te(R),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${y}_preset_option_${R.label}`,id:`sps-date-range-picker-${E}__range-${Z}`,name:`sps-date-range-picker-${E}__range`,onChange:()=>j(R),checked:w!=null&&w.definition?w.definition===R.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${E}__range-${Z}`},te(R)))))),o.createElement(qo,{"data-testid":`${y}_calendar`,selectedRange:Array.isArray(u)?u:O,onNewSelection:H,minDate:l,maxDate:s,showTwoMonths:h,selectedPreset:w&&te(w),isOpen:z})))}Object.assign(mi,{props:$E,displayName:"SpsDateRangePicker"});const tu={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
1309
|
+
`}}}},$E={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDateRange | DatePreset>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:'(newDateRange: SimpleDateRange | DatePreset | null, preset?: DatePreset["definition"]) => void',presets:"Array<DatePreset>",selectedPreset:"string",onPresetChange:"(newPreset?: string) => void",value:"SimpleDateRange | DatePreset",showTwoMonths:"boolean",format:"string"},Qp="sps-datepicker",ui=[{definition:"P0D",label:"design-system:datepicker.preset.today"},{definition:"Before",label:"design-system:datepicker.preset.before"},{definition:"After",label:"design-system:datepicker.preset.after"},{definition:"P7D",label:"design-system:datepicker.preset.sevenDays"},{definition:"P30D",label:"design-system:datepicker.preset.thirtyDays"},{definition:"P60D",label:"design-system:datepicker.preset.sixtyDays"},{definition:"P90D",label:"design-system:datepicker.preset.ninetyDays"},{definition:"P1Y",label:"design-system:datepicker.preset.oneYear"}];function eu(e,t=""){return e.find(n=>n.definition===t)}function KE(e,t){return e.length===t.length&&e.every((n,r)=>n.definition===t[r].definition&&n.label===t[r].label)}function mi({children:e,className:t,disabled:n,formMeta:r,id:a,maxDate:s,minDate:l,onChange:c,presets:p=ui,selectedPreset:m,onPresetChange:f,value:u,showTwoMonths:h=!1,format:S,"data-testid":y,...T}){const{t:C}=o.useContext(He),{wrapperId:E,controlId:N}=bt(a,r),M=o.useRef(null),I=o.useRef(null),k=o.useRef(null),[V,A]=o.useState(Array.isArray(u)?Q.toStringRange(u,S):""),[w,P]=o.useState(eu(p,m)||null),[O,$]=o.useState(),{showPopup:z,doShowPopup:L,doHidePopup:J}=dr(M,k);function B(R,Z){r&&(r.setValue(R),r.markAsDirty()),c&&c(R,Z)}o.useEffect(()=>{P(eu(p,m)||null)},[m]);function te(R){return R&&/^design-system:/.test(R.label)?C(R.label):(R==null?void 0:R.label)??""}function H(R){const Z=u||[];let ae,ee=w;const de=ee?te(ee):"";de==="Before"?ae=[null,R]:de==="After"?ae=[R,null]:!Z[0]||Z[1]||Q.isBefore(R,Z[0])?ae=[R,null]:ae=[Z[0],R],(ae[0]&&ae[1]||de==="Before"||de==="After")&&(J(!0),I&&I.current&&I.current.focus()),ee&&de!=="Before"&&de!=="After"&&(P(null),ee=null),B(ae,ee==null?void 0:ee.definition),A(Q.toStringRange(ae,S)),$(void 0)}function q(R){A(R.target.value);let Z=Q.createRangeFrom(R.target.value,S),ae=w;const ee=ae?te(ae):"";Array.isArray(Z)&&(Z[0]&&Z[1]&&(ee==="Before"||ee==="After")?(P(null),ae=null):ee==="Before"&&Z[0]!==null?Z=[null,Z[0]]:ee==="After"&&Z[0]!==null&&(Z=[Z[0],null])),B(Z,ae==null?void 0:ae.definition),$(void 0)}function oe(){A(""),B(),$(void 0),P(null)}function W(R){switch(R.key){case"Tab":J();break;case"Backspace":R.target.selectionStart===0&&u&&w&&oe();break}}function j(R){if(f&&(R==null?void 0:R.definition)!==m&&f(typeof(R==null?void 0:R.definition)=="string"?R==null?void 0:R.definition:""),!R){P(null),B();return}P(R);let Z=Q.createRangeFromPreset(R,S);const ae=R&&te(R),ee=Q.getRangeSeparator(S);(ae==="Before"||ae==="After")&&u&&u[0]&&u[1]?Z=Q.createRangeFrom(ee,S):ae==="Before"?Z=Q.createRangeFrom(`${ee}${Q.toString(u&&(u[0]||u[1]),S)}`):ae==="After"&&(Z=Q.createRangeFrom(`${Q.toString(u&&(u[0]||u[1]),S)}${ee}`)),JSON.stringify(u)!==JSON.stringify(Z)&&B(Z,R==null?void 0:R.definition)}o.useEffect(()=>{if(!u||Array.isArray(u)&&!u.length){P(null);return}if(!KE(p,ui)&&Array.isArray(u)){const R=Q.toStringRange(u,S),Z=p.find(ae=>R===Q.toStringRange(Q.createRangeFromPreset(ae,S),S));Z?j(Z):u[0]&&u[1]&&P(null)}},[u,S]),o.useEffect(()=>{const R=["Before","After"].includes(te(w));!u||w&&!R?A(""):Array.isArray(u)&&((!u[0]||!u[0].hasOwnProperty(_r))&&(!u[1]||!u[1].hasOwnProperty(_r))&&A(Q.toStringRange(u,S)),w||$(void 0))},[u,w,S]);const ne=Y(Qp,"sps-text-input",z&&`${Qp}--open`,t);let re=V;const U=Q.getRangeSeparator(S);return w&&te(w)==="Before"&&V.startsWith(U)?re=V.substring(1):w&&te(w)==="After"&&V.endsWith(U)&&(re=V.substring(0,V.length-1)),o.createElement(o.Fragment,null,o.createElement(at,{id:E,className:ne,formMeta:r,inputRef:I,focusInputOnClick:!0,ref:M},o.createElement("div",{className:Y("sps-form-control",n&&"disabled")},o.createElement("i",{className:Y("sps-text-input__icon","sps-icon","sps-icon-calendar")}),w&&o.createElement("div",{"data-testid":`${y}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},te(w))),o.createElement("input",{type:"text",ref:I,className:"sps-text-input__input","data-testid":`${y}_date_input`,id:N,placeholder:!V&&!w?(S==null?void 0:S.toUpperCase())||ir:void 0,onChange:q,onClick:L,onFocus:L,onKeyDown:W,value:re,disabled:n,...T}),u&&!n&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:oe}))),o.createElement(Jo,{isOpen:z,attachTo:M,ref:k},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},C("design-system:datepicker.presetsLabel")),o.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{"data-testid":`${y}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${E}__range-custom`,className:"sps-custom-control__input",checked:!w,name:`sps-date-range-picker-${E}__range`,onChange:()=>j()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${E}__range-custom`},C("design-system:datepicker.preset.custom"))),p.map((R,Z)=>o.createElement("div",{key:te(R),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${y}_preset_option_${R.label}`,id:`sps-date-range-picker-${E}__range-${Z}`,name:`sps-date-range-picker-${E}__range`,onChange:()=>j(R),checked:w!=null&&w.definition?w.definition===R.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${E}__range-${Z}`},te(R)))))),o.createElement(qo,{"data-testid":`${y}_calendar`,selectedRange:Array.isArray(u)?u:O,onNewSelection:H,minDate:l,maxDate:s,showTwoMonths:h,selectedPreset:w&&te(w),isOpen:z})))}Object.assign(mi,{props:$E,displayName:"SpsDateRangePicker"});const tu={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
1310
1310
|
import {
|
|
1311
1311
|
useSpsForm,
|
|
1312
1312
|
SpsLabel,
|
|
@@ -1823,7 +1823,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var se=le(ae,ie,U,R,Z+".
|
|
|
1823
1823
|
</div>
|
|
1824
1824
|
);
|
|
1825
1825
|
}
|
|
1826
|
-
`}}}},GE={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"};function br({children:e,className:t,formArray:n,formGroup:r,formMeta:a,stacked:s,"data-testid":l,unsafelyReplaceClassName:c,...p}){const m=r||n,f=m||a,[u,h]=o.useState(!1);o.useEffect(()=>{if(f){const y=f.isFocused();!u&&y&&f.onFocus?f.onFocus():u&&!y&&f.onBlur&&f.onBlur(),h(y)}});const S=Y(c||"sps-form-group",(m&&m.invalid||a&&(!a.isValid()||!a.contentsAreValid()))&&"sps-form-group--error",t);return o.createElement("div",{className:S,"data-testid":l,...p},o.createElement("div",{className:Y("sps-input-group",s&&"sps-input-group--stacked")},e))}Object.assign(br,{props:GE,displayName:"SpsInputGroup"});const YE={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleMomentRange>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newMomentRange: SimpleMomentRange) => void",presets:"Array<DateTimePreset>",value:"SimpleMomentRange",showTwoMonths:"boolean",twentyFourHour:"boolean",format:"string",placeholder12h:"string",placeholder24h:"string"},ru="sps-datepicker",ou=["AM","PM"],au=[{definition:"P0D",label:"design-system:datepicker.preset.today"},{definition:"() => [null, {month: 1, date: 1, year: 3000}]",label:"design-system:datepicker.preset.before"},{definition:"() => [{month: 1, date: 1, year: 1990}, null]",label:"design-system:datepicker.preset.after"},{definition:"P7D",label:"design-system:datepicker.preset.sevenDays"},{definition:"P30D",label:"design-system:datepicker.preset.thirtyDays"},{definition:"P60D",label:"design-system:datepicker.preset.sixtyDays"},{definition:"P90D",label:"design-system:datepicker.preset.ninetyDays"},{definition:"P1Y",label:"design-system:datepicker.preset.oneYear"}];function fi({className:e,disabled:t,formMeta:n,id:r,maxDate:a,minDate:s,onChange:l,presets:c=au,value:p,showTwoMonths:m=!1,twentyFourHour:f=!1,format:u,"data-testid":h,placeholder24h:S="00:00",placeholder12h:y="12:00"}){const{t:T}=o.useContext(He),{wrapperId:C,controlId:E}=bt(r&&`${r}_from`,n),{wrapperId:N,controlId:M}=bt(r&&`${r}_to`,n),I=o.useRef(null),k=o.useRef(null),V=o.useRef(null),A=o.useRef(null),w=o.useRef(null),P=Q.splitMomentInDateTimeParts(Array.isArray(p)?p[0]:void 0,f,u),O=Q.splitMomentInDateTimeParts(Array.isArray(p)?p[1]:void 0,f,u),[$,z]=o.useState(P[0]),[L,J]=o.useState(O[0]),[B,te]=o.useState(P[1]),[H,q]=o.useState(O[1]),[oe,W]=o.useState(P[2]),[j,ne]=o.useState(O[2]),[re,U]=o.useState(null),{showPopup:R,doShowPopup:Z,doHidePopup:ae}=dr(I,w);function ee(ue){n&&(n.setValue(ue),n.markAsDirty()),l&&l(ue)}function de(ue){return ue&&/^design-system:/.test(ue.label)?T(ue.label):ue.label}const ie=re&&de(re)==="Before",le=re&&de(re)==="After";function se(ue){const Se=p||[],Oe=Q.toMoment(ue);let Ze;if(ie)Ze=[null,Oe],ae(!0);else if(le)Ze=[Oe,null],ae(!0);else if(!Se[0]||Se[1]||Oe!=null&&Oe.isBefore(Se[0])){let Ie=parseInt((B==null?void 0:B.split(":")[0])||"0",10);!f&&Ie===12&&(Ie=0);const dt=parseInt((B==null?void 0:B.split(":")[1])||"0",10);Oe==null||Oe.set("hour",oe==="PM"?12+Ie:Ie<12?Ie:0),Oe==null||Oe.set("minute",dt),Ze=[Oe,null],U(null)}else{let Ie=parseInt((H==null?void 0:H.split(":")[0])||"0",10);!f&&Ie===12&&(Ie=0);const dt=parseInt((H==null?void 0:H.split(":")[1])||"0",10);Oe==null||Oe.set("hour",j==="PM"?12+Ie:Ie),Oe==null||Oe.set("minute",dt),Ze=[Se[0],Oe],ae(!0),U(null)}ee(Ze)}function Ne(ue){z(ue.target.value)}function ke(ue){Q.validateTimeString(ue.target.value,f)&&te(ue.target.value)}function it(ue,Se,Oe){const Ze=$,Ie=Se??B,dt=oe;if(Ze===P[0]&&Ie===P[1]&&dt===P[2])return;const Tt=Q.createFrom(Ze,u);if(Tt&&Q.isValid(Tt)){const Ae=Q.toMoment(Tt);let pt=parseInt((Ie==null?void 0:Ie.split(":")[0])||"0",10);!f&&pt===12&&(pt=0);const _n=parseInt((Ie==null?void 0:Ie.split(":")[1])||"0",10);Ae==null||Ae.set("hour",dt==="PM"?12+pt:pt),Ae==null||Ae.set("minute",_n);const Xt=[Ae,(Ae==null?void 0:Ae.isBefore(p==null?void 0:p[1]))&&(p==null?void 0:p[1])||null];ee(Xt)}}function lt(ue){Q.validateTimeString(ue??B,f)&&(te(Q.padIncompleteTimeString(ue??B,f)),setTimeout(()=>it(void 0,ue),0))}function ut(ue){W(ue.target.value)}function ct(ue){Q.validateTimeString(ue,f)&&(te(ue),setTimeout(()=>lt(ue),0))}o.useEffect(()=>{oe!==P[2]&&it()},[oe]);function Pt(ue){J(ue.target.value)}function je(ue){Q.validateTimeString(ue.target.value,f)&&q(ue.target.value)}function fe(ue,Se,Oe){const Ze=L,Ie=Se??H,dt=j;if(Ze===O[0]&&Ie===O[1]&&dt===O[2])return;const Tt=Q.createFrom(Ze,u);if(Tt&&Q.isValid(Tt)){const Ae=Q.toMoment(Tt);let pt=parseInt((Ie==null?void 0:Ie.split(":")[0])||"0",10);!f&&pt===12&&(pt=0);const _n=parseInt((Ie==null?void 0:Ie.split(":")[1])||"0",10);Ae==null||Ae.set("hour",dt==="PM"?12+pt:pt),Ae==null||Ae.set("minute",_n);const Xt=[(Ae==null?void 0:Ae.isAfter(p==null?void 0:p[0]))&&(p==null?void 0:p[0])||null,Ae];ee(Xt)}}function Fe(ue){Q.validateTimeString(ue??H,f)&&(q(Q.padIncompleteTimeString(ue??H,f)),setTimeout(()=>fe(void 0,ue),0))}function ve(ue){ne(ue.target.value)}function Le(ue){Q.validateTimeString(ue,f)&&(q(ue),setTimeout(()=>Fe(ue),0))}o.useEffect(()=>{j!==O[2]&&fe()},[j]);function ot(){ee([null,null]),U(null)}function we(ue){return function(Se){switch(Se.key){case"Tab":ae();break;case"Backspace":Se.target.selectionStart===0&&p&&!Array.isArray(p)&&ot();break;case"Enter":ue==="from"?it():ue==="to"&&fe();break}}}function Ht(ue){if(!ue){U(null),ee([null,null]);return}U(ue);const Se=Q.createDateTimeRangeFromPreset(ue);ue&&de(ue)==="Before"?!p||Array.isArray(p)&&p[0]&&p[1]?ee([null,null]):Array.isArray(p)&&p[0]?ee([null,Q.toMoment(Q.createFrom(p[0],u))]):Array.isArray(p)&&p[1]&&ee([null,Q.toMoment(Q.createFrom(p[1],u))]):ue&&de(ue)==="After"?!p||Array.isArray(p)&&p[0]&&p[1]?ee([null,null]):Array.isArray(p)&&p[0]?ee([Q.toMoment(Q.createFrom(p[0],u)),null]):Array.isArray(p)&&p[1]&&ee([Q.toMoment(Q.createFrom(p[1],u)),null]):JSON.stringify(p)!==JSON.stringify(Se)&&ee([Se[0],Se[1]])}o.useEffect(()=>{if(p&&Array.isArray(p)){if(p[0]&&!p[1]){const ue=c.find(Se=>de(Se)==="After");ue&&Ht(ue)}else if(!p[0]&&p[1]){const ue=c.find(Se=>de(Se)==="Before");ue&&Ht(ue)}else if(p[0]&&p[1]){const ue=Q.toDateTimeStringRange(p,f,u),Se=c.find(Oe=>ue===Q.toDateTimeStringRange(Q.createDateTimeRangeFromPreset(Oe),f,u));Se&&Ht(Se)}}},[]),o.useEffect(()=>{P[0]?z(P[0]):z(""),P[1]?te(P[1]):te(f?"00:00":"12:00"),f||(P[2]?W(P[2]):W("AM")),O[0]?J(O[0]):J(""),O[1]?q(O[1]):q(f?"00:00":"12:00"),f||(O[2]?ne(O[2]):ne("AM"))},[P[0],P[1],P[2],O[0],O[1],O[2],f]);const Mn=Y(ru,"sps-text-input",R&&`${ru}--open`,e);return o.createElement(o.Fragment,null,o.createElement("div",{className:Y("sps-datetime-range-picker")},o.createElement("div",{className:Y("sps-datetime-range-picker__pair")},o.createElement(at,{id:C,className:Mn,formMeta:n,inputRef:k,focusInputOnClick:!0,ref:I},o.createElement("div",{className:Y("sps-form-control",t&&"disabled")},o.createElement("i",{className:Y("sps-text-input__icon","sps-icon","sps-icon-calendar")}),re&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},de(re))),o.createElement("input",{type:"text",ref:k,className:"sps-text-input__input","data-testid":`${h}_from_date_input`,id:E,placeholder:!$&&!re?(u==null?void 0:u.toUpperCase())||ir:ie?O[0]:le?P[0]:void 0,onChange:Ne,onClick:Z,onFocus:Z,onBlur:()=>it(),onKeyDown:we("from"),value:re?"":$,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:ot}))),!re&&!f?o.createElement(br,null,o.createElement(Jt,{className:"sps-time-input",placeholder:y,suggestions:Ra,zeroState:"Custom time",value:B,onChange:ke,onBlur:()=>lt(),onSelectionChange:ct,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Yn,{options:ou,value:oe,onChange:ut,disabled:t,notClearable:!0})):o.createElement(Jt,{className:"sps-time-input",placeholder:S,suggestions:Ba,zeroState:"Custom time",value:B,onChange:ke,onBlur:()=>lt(),onSelectionChange:ct,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0})),!re&&o.createElement("span",{className:Y("sps-datepicker__to")},"to"),!re&&o.createElement("div",{className:Y("sps-datetime-range-picker__pair")},o.createElement(at,{id:N,className:Mn,formMeta:n,inputRef:A,focusInputOnClick:!0,ref:V},o.createElement("div",{className:Y("sps-form-control",t&&"disabled")},o.createElement("i",{className:Y("sps-text-input__icon","sps-icon","sps-icon-calendar")}),re&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},de(re))),o.createElement("input",{type:"text",ref:A,className:"sps-text-input__input","data-testid":`${h}_to_date_input`,id:M,placeholder:!L&&!re?(u==null?void 0:u.toUpperCase())||ir:void 0,onChange:Pt,onClick:Z,onFocus:Z,onKeyDown:we("to"),onBlur:()=>fe(),value:L,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:ot}))),f?o.createElement(Jt,{className:"sps-time-input",placeholder:S,suggestions:Ba,zeroState:"Custom time",value:H,onChange:je,onBlur:()=>Fe(),onSelectionChange:Le,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(br,null,o.createElement(Jt,{className:"sps-time-input",placeholder:y,suggestions:Ra,zeroState:"Custom time",value:H,onChange:je,onBlur:()=>Fe(),onSelectionChange:Le,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Yn,{options:ou,value:j,onChange:ve,disabled:t,notClearable:!0})))),o.createElement(Jo,{isOpen:R,attachTo:I,ref:w},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},T("design-system:datepicker.presetsLabel")),o.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{"data-testid":`${h}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${C}__range-custom`,className:"sps-custom-control__input",checked:!re,name:`sps-date-range-picker-${C}__range`,onChange:()=>Ht()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${C}__range-custom`},T("design-system:datepicker.preset.custom"))),c.map((ue,Se)=>o.createElement("div",{key:de(ue),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${h}_preset_option_${ue.label}`,id:`sps-date-range-picker-${C}__range-${Se}`,name:`sps-date-range-picker-${C}__range`,onChange:()=>Ht(ue),checked:re!=null&&re.definition?re.definition===ue.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${C}__range-${Se}`},de(ue)))))),o.createElement(qo,{"data-testid":`${h}_calendar`,selectedRange:Array.isArray(p)?[Q.createFrom(p[0],u),Q.createFrom(p[1],u)]:void 0,onNewSelection:se,minDate:s,maxDate:a,showTwoMonths:m,selectedPreset:re&&de(re)})))}Object.assign(fi,{props:YE,displayName:"SpsDateTimeRangePicker"});const su={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
1826
|
+
`}}}},GE={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"};function br({children:e,className:t,formArray:n,formGroup:r,formMeta:a,stacked:s,"data-testid":l,unsafelyReplaceClassName:c,...p}){const m=r||n,f=m||a,[u,h]=o.useState(!1);o.useEffect(()=>{if(f){const y=f.isFocused();!u&&y&&f.onFocus?f.onFocus():u&&!y&&f.onBlur&&f.onBlur(),h(y)}});const S=Y(c||"sps-form-group",(m&&m.invalid||a&&(!a.isValid()||!a.contentsAreValid()))&&"sps-form-group--error",t);return o.createElement("div",{className:S,"data-testid":l,...p},o.createElement("div",{className:Y("sps-input-group",s&&"sps-input-group--stacked")},e))}Object.assign(br,{props:GE,displayName:"SpsInputGroup"});const YE={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleMomentRange>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newMomentRange: SimpleMomentRange) => void",presets:"Array<DateTimePreset>",value:"SimpleMomentRange",showTwoMonths:"boolean",twentyFourHour:"boolean",format:"string",placeholder12h:"string",placeholder24h:"string"},ru="sps-datepicker",ou=["AM","PM"],au=[{definition:"P0D",label:"design-system:datepicker.preset.today"},{definition:"() => [null, {month: 1, date: 1, year: 3000}]",label:"design-system:datepicker.preset.before"},{definition:"() => [{month: 1, date: 1, year: 1990}, null]",label:"design-system:datepicker.preset.after"},{definition:"P7D",label:"design-system:datepicker.preset.sevenDays"},{definition:"P30D",label:"design-system:datepicker.preset.thirtyDays"},{definition:"P60D",label:"design-system:datepicker.preset.sixtyDays"},{definition:"P90D",label:"design-system:datepicker.preset.ninetyDays"},{definition:"P1Y",label:"design-system:datepicker.preset.oneYear"}];function fi({className:e,disabled:t,formMeta:n,id:r,maxDate:a,minDate:s,onChange:l,presets:c=au,value:p,showTwoMonths:m=!1,twentyFourHour:f=!1,format:u,"data-testid":h,placeholder24h:S="00:00",placeholder12h:y="12:00"}){const{t:T}=o.useContext(He),{wrapperId:C,controlId:E}=bt(r&&`${r}_from`,n),{wrapperId:N,controlId:M}=bt(r&&`${r}_to`,n),I=o.useRef(null),k=o.useRef(null),V=o.useRef(null),A=o.useRef(null),w=o.useRef(null),P=Q.splitMomentInDateTimeParts(Array.isArray(p)?p[0]:void 0,f,u),O=Q.splitMomentInDateTimeParts(Array.isArray(p)?p[1]:void 0,f,u),[$,z]=o.useState(P[0]),[L,J]=o.useState(O[0]),[B,te]=o.useState(P[1]),[H,q]=o.useState(O[1]),[oe,W]=o.useState(P[2]),[j,ne]=o.useState(O[2]),[re,U]=o.useState(null),{showPopup:R,doShowPopup:Z,doHidePopup:ae}=dr(I,w);function ee(ue){n&&(n.setValue(ue),n.markAsDirty()),l&&l(ue)}function de(ue){return ue&&/^design-system:/.test(ue.label)?T(ue.label):ue.label}const ie=re&&de(re)==="Before",le=re&&de(re)==="After";function se(ue){const Se=p||[],Oe=Q.toMoment(ue);let Ze;if(ie)Ze=[null,Oe],ae(!0);else if(le)Ze=[Oe,null],ae(!0);else if(!Se[0]||Se[1]||Oe!=null&&Oe.isBefore(Se[0])){let Ie=parseInt((B==null?void 0:B.split(":")[0])||"0",10);!f&&Ie===12&&(Ie=0);const dt=parseInt((B==null?void 0:B.split(":")[1])||"0",10);Oe==null||Oe.set("hour",oe==="PM"?12+Ie:Ie<12?Ie:0),Oe==null||Oe.set("minute",dt),Ze=[Oe,null],U(null)}else{let Ie=parseInt((H==null?void 0:H.split(":")[0])||"0",10);!f&&Ie===12&&(Ie=0);const dt=parseInt((H==null?void 0:H.split(":")[1])||"0",10);Oe==null||Oe.set("hour",j==="PM"?12+Ie:Ie),Oe==null||Oe.set("minute",dt),Ze=[Se[0],Oe],ae(!0),U(null)}ee(Ze)}function Ne(ue){z(ue.target.value)}function ke(ue){Q.validateTimeString(ue.target.value,f)&&te(ue.target.value)}function it(ue,Se,Oe){const Ze=$,Ie=Se??B,dt=oe;if(Ze===P[0]&&Ie===P[1]&&dt===P[2])return;const Tt=Q.createFrom(Ze,u);if(Tt&&Q.isValid(Tt)){const Ae=Q.toMoment(Tt);let pt=parseInt((Ie==null?void 0:Ie.split(":")[0])||"0",10);!f&&pt===12&&(pt=0);const _n=parseInt((Ie==null?void 0:Ie.split(":")[1])||"0",10);Ae==null||Ae.set("hour",dt==="PM"?12+pt:pt),Ae==null||Ae.set("minute",_n);const Xt=[Ae,(Ae==null?void 0:Ae.isBefore(p==null?void 0:p[1]))&&(p==null?void 0:p[1])||null];ee(Xt)}}function lt(ue){Q.validateTimeString(ue??B,f)&&(te(Q.padIncompleteTimeString(ue??B,f)),setTimeout(()=>it(void 0,ue),0))}function ut(ue){W(ue.target.value)}function ct(ue){Q.validateTimeString(ue,f)&&(te(ue),setTimeout(()=>lt(ue),0))}o.useEffect(()=>{oe!==P[2]&&it()},[oe]);function Pt(ue){J(ue.target.value)}function je(ue){Q.validateTimeString(ue.target.value,f)&&q(ue.target.value)}function fe(ue,Se,Oe){const Ze=L,Ie=Se??H,dt=j;if(Ze===O[0]&&Ie===O[1]&&dt===O[2])return;const Tt=Q.createFrom(Ze,u);if(Tt&&Q.isValid(Tt)){const Ae=Q.toMoment(Tt);let pt=parseInt((Ie==null?void 0:Ie.split(":")[0])||"0",10);!f&&pt===12&&(pt=0);const _n=parseInt((Ie==null?void 0:Ie.split(":")[1])||"0",10);Ae==null||Ae.set("hour",dt==="PM"?12+pt:pt),Ae==null||Ae.set("minute",_n);const Xt=[(Ae==null?void 0:Ae.isAfter(p==null?void 0:p[0]))&&(p==null?void 0:p[0])||null,Ae];ee(Xt)}}function Fe(ue){Q.validateTimeString(ue??H,f)&&(q(Q.padIncompleteTimeString(ue??H,f)),setTimeout(()=>fe(void 0,ue),0))}function ve(ue){ne(ue.target.value)}function Le(ue){Q.validateTimeString(ue,f)&&(q(ue),setTimeout(()=>Fe(ue),0))}o.useEffect(()=>{j!==O[2]&&fe()},[j]);function Qe(){ee([null,null]),U(null)}function we(ue){return function(Se){switch(Se.key){case"Tab":ae();break;case"Backspace":Se.target.selectionStart===0&&p&&!Array.isArray(p)&&Qe();break;case"Enter":ue==="from"?it():ue==="to"&&fe();break}}}function Ht(ue){if(!ue){U(null),ee([null,null]);return}U(ue);const Se=Q.createDateTimeRangeFromPreset(ue);ue&&de(ue)==="Before"?!p||Array.isArray(p)&&p[0]&&p[1]?ee([null,null]):Array.isArray(p)&&p[0]?ee([null,Q.toMoment(Q.createFrom(p[0],u))]):Array.isArray(p)&&p[1]&&ee([null,Q.toMoment(Q.createFrom(p[1],u))]):ue&&de(ue)==="After"?!p||Array.isArray(p)&&p[0]&&p[1]?ee([null,null]):Array.isArray(p)&&p[0]?ee([Q.toMoment(Q.createFrom(p[0],u)),null]):Array.isArray(p)&&p[1]&&ee([Q.toMoment(Q.createFrom(p[1],u)),null]):JSON.stringify(p)!==JSON.stringify(Se)&&ee([Se[0],Se[1]])}o.useEffect(()=>{p&&Array.isArray(p)&&!p.length&&Qe()},[p]),o.useEffect(()=>{if(p&&Array.isArray(p)&&Array.isArray(p)){if(p[0]&&!p[1]){const ue=c.find(Se=>de(Se)==="After");ue&&Ht(ue)}else if(!p[0]&&p[1]){const ue=c.find(Se=>de(Se)==="Before");ue&&Ht(ue)}else if(p[0]&&p[1]){const ue=Q.toDateTimeStringRange(p,f,u),Se=c.find(Oe=>ue===Q.toDateTimeStringRange(Q.createDateTimeRangeFromPreset(Oe),f,u));Se&&Ht(Se)}}},[]),o.useEffect(()=>{P[0]?z(P[0]):z(""),P[1]?te(P[1]):te(f?"00:00":"12:00"),f||(P[2]?W(P[2]):W("AM")),O[0]?J(O[0]):J(""),O[1]?q(O[1]):q(f?"00:00":"12:00"),f||(O[2]?ne(O[2]):ne("AM"))},[P[0],P[1],P[2],O[0],O[1],O[2],f]);const Mn=Y(ru,"sps-text-input",R&&`${ru}--open`,e);return o.createElement(o.Fragment,null,o.createElement("div",{className:Y("sps-datetime-range-picker")},o.createElement("div",{className:Y("sps-datetime-range-picker__pair")},o.createElement(at,{id:C,className:Mn,formMeta:n,inputRef:k,focusInputOnClick:!0,ref:I},o.createElement("div",{className:Y("sps-form-control",t&&"disabled")},o.createElement("i",{className:Y("sps-text-input__icon","sps-icon","sps-icon-calendar")}),re&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},de(re))),o.createElement("input",{type:"text",ref:k,className:"sps-text-input__input","data-testid":`${h}_from_date_input`,id:E,placeholder:!$&&!re?(u==null?void 0:u.toUpperCase())||ir:ie?O[0]:le?P[0]:void 0,onChange:Ne,onClick:Z,onFocus:Z,onBlur:()=>it(),onKeyDown:we("from"),value:re?"":$,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:Qe}))),!re&&!f?o.createElement(br,null,o.createElement(Jt,{className:"sps-time-input",placeholder:y,suggestions:Ra,zeroState:"Custom time",value:B,onChange:ke,onBlur:()=>lt(),onSelectionChange:ct,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Yn,{options:ou,value:oe,onChange:ut,disabled:t,notClearable:!0})):o.createElement(Jt,{className:"sps-time-input",placeholder:S,suggestions:Ba,zeroState:"Custom time",value:B,onChange:ke,onBlur:()=>lt(),onSelectionChange:ct,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0})),!re&&o.createElement("span",{className:Y("sps-datepicker__to")},"to"),!re&&o.createElement("div",{className:Y("sps-datetime-range-picker__pair")},o.createElement(at,{id:N,className:Mn,formMeta:n,inputRef:A,focusInputOnClick:!0,ref:V},o.createElement("div",{className:Y("sps-form-control",t&&"disabled")},o.createElement("i",{className:Y("sps-text-input__icon","sps-icon","sps-icon-calendar")}),re&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},de(re))),o.createElement("input",{type:"text",ref:A,className:"sps-text-input__input","data-testid":`${h}_to_date_input`,id:M,placeholder:!L&&!re?(u==null?void 0:u.toUpperCase())||ir:void 0,onChange:Pt,onClick:Z,onFocus:Z,onKeyDown:we("to"),onBlur:()=>fe(),value:L,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:Qe}))),f?o.createElement(Jt,{className:"sps-time-input",placeholder:S,suggestions:Ba,zeroState:"Custom time",value:H,onChange:je,onBlur:()=>Fe(),onSelectionChange:Le,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(br,null,o.createElement(Jt,{className:"sps-time-input",placeholder:y,suggestions:Ra,zeroState:"Custom time",value:H,onChange:je,onBlur:()=>Fe(),onSelectionChange:Le,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Yn,{options:ou,value:j,onChange:ve,disabled:t,notClearable:!0})))),o.createElement(Jo,{isOpen:R,attachTo:I,ref:w},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},T("design-system:datepicker.presetsLabel")),o.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{"data-testid":`${h}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${C}__range-custom`,className:"sps-custom-control__input",checked:!re,name:`sps-date-range-picker-${C}__range`,onChange:()=>Ht()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${C}__range-custom`},T("design-system:datepicker.preset.custom"))),c.map((ue,Se)=>o.createElement("div",{key:de(ue),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${h}_preset_option_${ue.label}`,id:`sps-date-range-picker-${C}__range-${Se}`,name:`sps-date-range-picker-${C}__range`,onChange:()=>Ht(ue),checked:re!=null&&re.definition?re.definition===ue.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${C}__range-${Se}`},de(ue)))))),o.createElement(qo,{"data-testid":`${h}_calendar`,selectedRange:Array.isArray(p)?[Q.createFrom(p[0],u),Q.createFrom(p[1],u)]:void 0,onNewSelection:se,minDate:s,maxDate:a,showTwoMonths:m,selectedPreset:re&&de(re)})))}Object.assign(fi,{props:YE,displayName:"SpsDateTimeRangePicker"});const su={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
1827
1827
|
import {
|
|
1828
1828
|
useSpsForm,
|
|
1829
1829
|
SpsLabel,
|
|
@@ -1974,7 +1974,7 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var se=le(ae,ie,U,R,Z+".
|
|
|
1974
1974
|
`}}}};function Zt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var hi={exports:{}},iu;function tn(){return iu||(iu=1,function(e,t){(function(n,r){e.exports=r()})(Ut,function(){var n;function r(){return n.apply(null,arguments)}function a(i){n=i}function s(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function l(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function c(i,d){return Object.prototype.hasOwnProperty.call(i,d)}function p(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var d;for(d in i)if(c(i,d))return!1;return!0}function m(i){return i===void 0}function f(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function u(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function h(i,d){var g=[],b,D=i.length;for(b=0;b<D;++b)g.push(d(i[b],b));return g}function S(i,d){for(var g in d)c(d,g)&&(i[g]=d[g]);return c(d,"toString")&&(i.toString=d.toString),c(d,"valueOf")&&(i.valueOf=d.valueOf),i}function y(i,d,g,b){return rh(i,d,g,b,!0).utc()}function T(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function C(i){return i._pf==null&&(i._pf=T()),i._pf}var E;Array.prototype.some?E=Array.prototype.some:E=function(i){var d=Object(this),g=d.length>>>0,b;for(b=0;b<g;b++)if(b in d&&i.call(this,d[b],b,d))return!0;return!1};function N(i){var d=null,g=!1,b=i._d&&!isNaN(i._d.getTime());if(b&&(d=C(i),g=E.call(d.parsedDateParts,function(D){return D!=null}),b=d.overflow<0&&!d.empty&&!d.invalidEra&&!d.invalidMonth&&!d.invalidWeekday&&!d.weekdayMismatch&&!d.nullInput&&!d.invalidFormat&&!d.userInvalidated&&(!d.meridiem||d.meridiem&&g),i._strict&&(b=b&&d.charsLeftOver===0&&d.unusedTokens.length===0&&d.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(i))i._isValid=b;else return b;return i._isValid}function M(i){var d=y(NaN);return i!=null?S(C(d),i):C(d).userInvalidated=!0,d}var I=r.momentProperties=[],k=!1;function V(i,d){var g,b,D,F=I.length;if(m(d._isAMomentObject)||(i._isAMomentObject=d._isAMomentObject),m(d._i)||(i._i=d._i),m(d._f)||(i._f=d._f),m(d._l)||(i._l=d._l),m(d._strict)||(i._strict=d._strict),m(d._tzm)||(i._tzm=d._tzm),m(d._isUTC)||(i._isUTC=d._isUTC),m(d._offset)||(i._offset=d._offset),m(d._pf)||(i._pf=C(d)),m(d._locale)||(i._locale=d._locale),F>0)for(g=0;g<F;g++)b=I[g],D=d[b],m(D)||(i[b]=D);return i}function A(i){V(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),k===!1&&(k=!0,r.updateOffset(this),k=!1)}function w(i){return i instanceof A||i!=null&&i._isAMomentObject!=null}function P(i){r.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+i)}function O(i,d){var g=!0;return S(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,i),g){var b=[],D,F,X,he=arguments.length;for(F=0;F<he;F++){if(D="",typeof arguments[F]=="object"){D+=`
|
|
1975
1975
|
[`+F+"] ";for(X in arguments[0])c(arguments[0],X)&&(D+=X+": "+arguments[0][X]+", ");D=D.slice(0,-2)}else D=arguments[F];b.push(D)}P(i+`
|
|
1976
1976
|
Arguments: `+Array.prototype.slice.call(b).join("")+`
|
|
1977
|
-
`+new Error().stack),g=!1}return d.apply(this,arguments)},d)}var $={};function z(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),$[i]||(P(d),$[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function L(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function J(i){var d,g;for(g in i)c(i,g)&&(d=i[g],L(d)?this[g]=d:this["_"+g]=d);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function B(i,d){var g=S({},i),b;for(b in d)c(d,b)&&(l(i[b])&&l(d[b])?(g[b]={},S(g[b],i[b]),S(g[b],d[b])):d[b]!=null?g[b]=d[b]:delete g[b]);for(b in i)c(i,b)&&!c(d,b)&&l(i[b])&&(g[b]=S({},g[b]));return g}function te(i){i!=null&&this.set(i)}var H;Object.keys?H=Object.keys:H=function(i){var d,g=[];for(d in i)c(i,d)&&g.push(d);return g};var q={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function oe(i,d,g){var b=this._calendar[i]||this._calendar.sameElse;return L(b)?b.call(d,g):b}function W(i,d,g){var b=""+Math.abs(i),D=d-b.length,F=i>=0;return(F?g?"+":"":"-")+Math.pow(10,Math.max(0,D)).toString().substr(1)+b}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,re={},U={};function R(i,d,g,b){var D=b;typeof b=="string"&&(D=function(){return this[b]()}),i&&(U[i]=D),d&&(U[d[0]]=function(){return W(D.apply(this,arguments),d[1],d[2])}),g&&(U[g]=function(){return this.localeData().ordinal(D.apply(this,arguments),i)})}function Z(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function ae(i){var d=i.match(j),g,b;for(g=0,b=d.length;g<b;g++)U[d[g]]?d[g]=U[d[g]]:d[g]=Z(d[g]);return function(D){var F="",X;for(X=0;X<b;X++)F+=L(d[X])?d[X].call(D,i):d[X];return F}}function ee(i,d){return i.isValid()?(d=de(d,i.localeData()),re[d]=re[d]||ae(d),re[d](i)):i.localeData().invalidDate()}function de(i,d){var g=5;function b(D){return d.longDateFormat(D)||D}for(ne.lastIndex=0;g>=0&&ne.test(i);)i=i.replace(ne,b),ne.lastIndex=0,g-=1;return i}var ie={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function le(i){var d=this._longDateFormat[i],g=this._longDateFormat[i.toUpperCase()];return d||!g?d:(this._longDateFormat[i]=g.match(j).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[i])}var se="Invalid date";function Ne(){return this._invalidDate}var ke="%d",it=/\d{1,2}/;function lt(i){return this._ordinal.replace("%d",i)}var ut={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ct(i,d,g,b){var D=this._relativeTime[g];return L(D)?D(i,d,g,b):D.replace(/%d/i,i)}function Pt(i,d){var g=this._relativeTime[i>0?"future":"past"];return L(g)?g(d):g.replace(/%s/i,d)}var je={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function fe(i){return typeof i=="string"?je[i]||je[i.toLowerCase()]:void 0}function Fe(i){var d={},g,b;for(b in i)c(i,b)&&(g=fe(b),g&&(d[g]=i[b]));return d}var ve={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Le(i){var d=[],g;for(g in i)c(i,g)&&d.push({unit:g,priority:ve[g]});return d.sort(function(b,D){return b.priority-D.priority}),d}var ot=/\d/,we=/\d\d/,Ht=/\d{3}/,Mn=/\d{4}/,ue=/[+-]?\d{6}/,Se=/\d\d?/,Oe=/\d\d\d\d?/,Ze=/\d\d\d\d\d\d?/,Ie=/\d{1,3}/,dt=/\d{1,4}/,Tt=/[+-]?\d{1,6}/,Ae=/\d+/,pt=/[+-]?\d+/,_n=/Z|[+-]\d\d:?\d\d/gi,Xt=/Z|[+-]\d\d(?::?\d\d)?/gi,va=/[+-]?\d+(\.\d{1,3})?/,be=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Te=/^[1-9]\d?/,Xe=/^([1-9]\d|\d)/,Rt;Rt={};function me(i,d,g){Rt[i]=L(d)?d:function(b,D){return b&&g?g:d}}function wl(i,d){return c(Rt,i)?Rt[i](d._strict,d._locale):new RegExp(bN(i))}function bN(i){return an(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,g,b,D,F){return g||b||D||F}))}function an(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Bt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function Ce(i){var d=+i,g=0;return d!==0&&isFinite(d)&&(g=Bt(d)),g}var Cl={};function Ke(i,d){var g,b=d,D;for(typeof i=="string"&&(i=[i]),f(d)&&(b=function(F,X){X[d]=Ce(F)}),D=i.length,g=0;g<D;g++)Cl[i[g]]=b}function co(i,d){Ke(i,function(g,b,D,F){D._w=D._w||{},d(g,D._w,D,F)})}function vN(i,d,g){d!=null&&c(Cl,i)&&Cl[i](d,g._a,g,i)}function ya(i){return i%4===0&&i%100!==0||i%400===0}var mt=0,sn=1,Qt=2,Qe=3,Wt=4,ln=5,er=6,yN=7,TN=8;R("Y",0,0,function(){var i=this.year();return i<=9999?W(i,4):"+"+i}),R(0,["YY",2],0,function(){return this.year()%100}),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),me("Y",pt),me("YY",Se,we),me("YYYY",dt,Mn),me("YYYYY",Tt,ue),me("YYYYYY",Tt,ue),Ke(["YYYYY","YYYYYY"],mt),Ke("YYYY",function(i,d){d[mt]=i.length===2?r.parseTwoDigitYear(i):Ce(i)}),Ke("YY",function(i,d){d[mt]=r.parseTwoDigitYear(i)}),Ke("Y",function(i,d){d[mt]=parseInt(i,10)});function po(i){return ya(i)?366:365}r.parseTwoDigitYear=function(i){return Ce(i)+(Ce(i)>68?1900:2e3)};var Kf=Dr("FullYear",!0);function EN(){return ya(this.year())}function Dr(i,d){return function(g){return g!=null?(Hf(this,i,g),r.updateOffset(this,d),this):uo(this,i)}}function uo(i,d){if(!i.isValid())return NaN;var g=i._d,b=i._isUTC;switch(d){case"Milliseconds":return b?g.getUTCMilliseconds():g.getMilliseconds();case"Seconds":return b?g.getUTCSeconds():g.getSeconds();case"Minutes":return b?g.getUTCMinutes():g.getMinutes();case"Hours":return b?g.getUTCHours():g.getHours();case"Date":return b?g.getUTCDate():g.getDate();case"Day":return b?g.getUTCDay():g.getDay();case"Month":return b?g.getUTCMonth():g.getMonth();case"FullYear":return b?g.getUTCFullYear():g.getFullYear();default:return NaN}}function Hf(i,d,g){var b,D,F,X,he;if(!(!i.isValid()||isNaN(g))){switch(b=i._d,D=i._isUTC,d){case"Milliseconds":return void(D?b.setUTCMilliseconds(g):b.setMilliseconds(g));case"Seconds":return void(D?b.setUTCSeconds(g):b.setSeconds(g));case"Minutes":return void(D?b.setUTCMinutes(g):b.setMinutes(g));case"Hours":return void(D?b.setUTCHours(g):b.setHours(g));case"Date":return void(D?b.setUTCDate(g):b.setDate(g));case"FullYear":break;default:return}F=g,X=i.month(),he=i.date(),he=he===29&&X===1&&!ya(F)?28:he,D?b.setUTCFullYear(F,X,he):b.setFullYear(F,X,he)}}function wN(i){return i=fe(i),L(this[i])?this[i]():this}function CN(i,d){if(typeof i=="object"){i=Fe(i);var g=Le(i),b,D=g.length;for(b=0;b<D;b++)this[g[b].unit](i[g[b].unit])}else if(i=fe(i),L(this[i]))return this[i](d);return this}function DN(i,d){return(i%d+d)%d}var qe;Array.prototype.indexOf?qe=Array.prototype.indexOf:qe=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function Dl(i,d){if(isNaN(i)||isNaN(d))return NaN;var g=DN(d,12);return i+=(d-g)/12,g===1?ya(i)?29:28:31-g%7%2}R("M",["MM",2],"Mo",function(){return this.month()+1}),R("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),R("MMMM",0,0,function(i){return this.localeData().months(this,i)}),me("M",Se,Te),me("MM",Se,we),me("MMM",function(i,d){return d.monthsShortRegex(i)}),me("MMMM",function(i,d){return d.monthsRegex(i)}),Ke(["M","MM"],function(i,d){d[sn]=Ce(i)-1}),Ke(["MMM","MMMM"],function(i,d,g,b){var D=g._locale.monthsParse(i,b,g._strict);D!=null?d[sn]=D:C(g).invalidMonth=i});var NN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Wf="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Gf=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,kN=be,IN=be;function xN(i,d){return i?s(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Gf).test(d)?"format":"standalone"][i.month()]:s(this._months)?this._months:this._months.standalone}function MN(i,d){return i?s(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Gf.test(d)?"format":"standalone"][i.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function _N(i,d,g){var b,D,F,X=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)F=y([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(F,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(F,"").toLocaleLowerCase();return g?d==="MMM"?(D=qe.call(this._shortMonthsParse,X),D!==-1?D:null):(D=qe.call(this._longMonthsParse,X),D!==-1?D:null):d==="MMM"?(D=qe.call(this._shortMonthsParse,X),D!==-1?D:(D=qe.call(this._longMonthsParse,X),D!==-1?D:null)):(D=qe.call(this._longMonthsParse,X),D!==-1?D:(D=qe.call(this._shortMonthsParse,X),D!==-1?D:null))}function LN(i,d,g){var b,D,F;if(this._monthsParseExact)return _N.call(this,i,d,g);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(D=y([2e3,b]),g&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(D,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(D,"").replace(".","")+"$","i")),!g&&!this._monthsParse[b]&&(F="^"+this.months(D,"")+"|^"+this.monthsShort(D,""),this._monthsParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="MMMM"&&this._longMonthsParse[b].test(i))return b;if(g&&d==="MMM"&&this._shortMonthsParse[b].test(i))return b;if(!g&&this._monthsParse[b].test(i))return b}}function Yf(i,d){if(!i.isValid())return i;if(typeof d=="string"){if(/^\d+$/.test(d))d=Ce(d);else if(d=i.localeData().monthsParse(d),!f(d))return i}var g=d,b=i.date();return b=b<29?b:Math.min(b,Dl(i.year(),g)),i._isUTC?i._d.setUTCMonth(g,b):i._d.setMonth(g,b),i}function Uf(i){return i!=null?(Yf(this,i),r.updateOffset(this,!0),this):uo(this,"Month")}function ON(){return Dl(this.year(),this.month())}function PN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||zf.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=kN),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function RN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||zf.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=IN),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function zf(){function i(Ee,De){return De.length-Ee.length}var d=[],g=[],b=[],D,F,X,he;for(D=0;D<12;D++)F=y([2e3,D]),X=an(this.monthsShort(F,"")),he=an(this.months(F,"")),d.push(X),g.push(he),b.push(he),b.push(X);d.sort(i),g.sort(i),b.sort(i),this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function BN(i,d,g,b,D,F,X){var he;return i<100&&i>=0?(he=new Date(i+400,d,g,b,D,F,X),isFinite(he.getFullYear())&&he.setFullYear(i)):he=new Date(i,d,g,b,D,F,X),he}function mo(i){var d,g;return i<100&&i>=0?(g=Array.prototype.slice.call(arguments),g[0]=i+400,d=new Date(Date.UTC.apply(null,g)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(i)):d=new Date(Date.UTC.apply(null,arguments)),d}function Ta(i,d,g){var b=7+d-g,D=(7+mo(i,0,b).getUTCDay()-d)%7;return-D+b-1}function jf(i,d,g,b,D){var F=(7+g-b)%7,X=Ta(i,b,D),he=1+7*(d-1)+F+X,Ee,De;return he<=0?(Ee=i-1,De=po(Ee)+he):he>po(i)?(Ee=i+1,De=he-po(i)):(Ee=i,De=he),{year:Ee,dayOfYear:De}}function fo(i,d,g){var b=Ta(i.year(),d,g),D=Math.floor((i.dayOfYear()-b-1)/7)+1,F,X;return D<1?(X=i.year()-1,F=D+cn(X,d,g)):D>cn(i.year(),d,g)?(F=D-cn(i.year(),d,g),X=i.year()+1):(X=i.year(),F=D),{week:F,year:X}}function cn(i,d,g){var b=Ta(i,d,g),D=Ta(i+1,d,g);return(po(i)-b+D)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),me("w",Se,Te),me("ww",Se,we),me("W",Se,Te),me("WW",Se,we),co(["w","ww","W","WW"],function(i,d,g,b){d[b.substr(0,1)]=Ce(i)});function AN(i){return fo(i,this._week.dow,this._week.doy).week}var FN={dow:0,doy:6};function VN(){return this._week.dow}function $N(){return this._week.doy}function KN(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function HN(i){var d=fo(this,1,4).week;return i==null?d:this.add((i-d)*7,"d")}R("d",0,"do","day"),R("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),R("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),R("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),me("d",Se),me("e",Se),me("E",Se),me("dd",function(i,d){return d.weekdaysMinRegex(i)}),me("ddd",function(i,d){return d.weekdaysShortRegex(i)}),me("dddd",function(i,d){return d.weekdaysRegex(i)}),co(["dd","ddd","dddd"],function(i,d,g,b){var D=g._locale.weekdaysParse(i,b,g._strict);D!=null?d.d=D:C(g).invalidWeekday=i}),co(["d","e","E"],function(i,d,g,b){d[b]=Ce(i)});function WN(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function GN(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Nl(i,d){return i.slice(d,7).concat(i.slice(0,d))}var YN="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),qf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),UN="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zN=be,jN=be,qN=be;function JN(i,d){var g=s(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Nl(g,this._week.dow):i?g[i.day()]:g}function ZN(i){return i===!0?Nl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function XN(i){return i===!0?Nl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function QN(i,d,g){var b,D,F,X=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)F=y([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(F,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(F,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(F,"").toLocaleLowerCase();return g?d==="dddd"?(D=qe.call(this._weekdaysParse,X),D!==-1?D:null):d==="ddd"?(D=qe.call(this._shortWeekdaysParse,X),D!==-1?D:null):(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null):d==="dddd"?(D=qe.call(this._weekdaysParse,X),D!==-1||(D=qe.call(this._shortWeekdaysParse,X),D!==-1)?D:(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null)):d==="ddd"?(D=qe.call(this._shortWeekdaysParse,X),D!==-1||(D=qe.call(this._weekdaysParse,X),D!==-1)?D:(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null)):(D=qe.call(this._minWeekdaysParse,X),D!==-1||(D=qe.call(this._weekdaysParse,X),D!==-1)?D:(D=qe.call(this._shortWeekdaysParse,X),D!==-1?D:null))}function ek(i,d,g){var b,D,F;if(this._weekdaysParseExact)return QN.call(this,i,d,g);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(D=y([2e3,1]).day(b),g&&!this._fullWeekdaysParse[b]&&(this._fullWeekdaysParse[b]=new RegExp("^"+this.weekdays(D,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[b]=new RegExp("^"+this.weekdaysShort(D,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[b]=new RegExp("^"+this.weekdaysMin(D,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[b]||(F="^"+this.weekdays(D,"")+"|^"+this.weekdaysShort(D,"")+"|^"+this.weekdaysMin(D,""),this._weekdaysParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="dddd"&&this._fullWeekdaysParse[b].test(i))return b;if(g&&d==="ddd"&&this._shortWeekdaysParse[b].test(i))return b;if(g&&d==="dd"&&this._minWeekdaysParse[b].test(i))return b;if(!g&&this._weekdaysParse[b].test(i))return b}}function tk(i){if(!this.isValid())return i!=null?this:NaN;var d=uo(this,"Day");return i!=null?(i=WN(i,this.localeData()),this.add(i-d,"d")):d}function nk(i){if(!this.isValid())return i!=null?this:NaN;var d=(this.day()+7-this.localeData()._week.dow)%7;return i==null?d:this.add(i-d,"d")}function rk(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=GN(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function ok(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=zN),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function ak(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jN),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function sk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qN),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function kl(){function i(gt,fn){return fn.length-gt.length}var d=[],g=[],b=[],D=[],F,X,he,Ee,De;for(F=0;F<7;F++)X=y([2e3,1]).day(F),he=an(this.weekdaysMin(X,"")),Ee=an(this.weekdaysShort(X,"")),De=an(this.weekdays(X,"")),d.push(he),g.push(Ee),b.push(De),D.push(he),D.push(Ee),D.push(De);d.sort(i),g.sort(i),b.sort(i),D.sort(i),this._weekdaysRegex=new RegExp("^("+D.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+b.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Il(){return this.hours()%12||12}function ik(){return this.hours()||24}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,Il),R("k",["kk",2],0,ik),R("hmm",0,0,function(){return""+Il.apply(this)+W(this.minutes(),2)}),R("hmmss",0,0,function(){return""+Il.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),R("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),R("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)});function Jf(i,d){R(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}Jf("a",!0),Jf("A",!1);function Zf(i,d){return d._meridiemParse}me("a",Zf),me("A",Zf),me("H",Se,Xe),me("h",Se,Te),me("k",Se,Te),me("HH",Se,we),me("hh",Se,we),me("kk",Se,we),me("hmm",Oe),me("hmmss",Ze),me("Hmm",Oe),me("Hmmss",Ze),Ke(["H","HH"],Qe),Ke(["k","kk"],function(i,d,g){var b=Ce(i);d[Qe]=b===24?0:b}),Ke(["a","A"],function(i,d,g){g._isPm=g._locale.isPM(i),g._meridiem=i}),Ke(["h","hh"],function(i,d,g){d[Qe]=Ce(i),C(g).bigHour=!0}),Ke("hmm",function(i,d,g){var b=i.length-2;d[Qe]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b)),C(g).bigHour=!0}),Ke("hmmss",function(i,d,g){var b=i.length-4,D=i.length-2;d[Qe]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D)),C(g).bigHour=!0}),Ke("Hmm",function(i,d,g){var b=i.length-2;d[Qe]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b))}),Ke("Hmmss",function(i,d,g){var b=i.length-4,D=i.length-2;d[Qe]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D))});function lk(i){return(i+"").toLowerCase().charAt(0)==="p"}var ck=/[ap]\.?m?\.?/i,dk=Dr("Hours",!0);function pk(i,d,g){return i>11?g?"pm":"PM":g?"am":"AM"}var Xf={calendar:q,longDateFormat:ie,invalidDate:se,ordinal:ke,dayOfMonthOrdinalParse:it,relativeTime:ut,months:NN,monthsShort:Wf,week:FN,weekdays:YN,weekdaysMin:UN,weekdaysShort:qf,meridiemParse:ck},ze={},ho={},So;function uk(i,d){var g,b=Math.min(i.length,d.length);for(g=0;g<b;g+=1)if(i[g]!==d[g])return g;return b}function Qf(i){return i&&i.toLowerCase().replace("_","-")}function mk(i){for(var d=0,g,b,D,F;d<i.length;){for(F=Qf(i[d]).split("-"),g=F.length,b=Qf(i[d+1]),b=b?b.split("-"):null;g>0;){if(D=Ea(F.slice(0,g).join("-")),D)return D;if(b&&b.length>=g&&uk(F,b)>=g-1)break;g--}d++}return So}function fk(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Ea(i){var d=null,g;if(ze[i]===void 0&&e&&e.exports&&fk(i))try{d=So._abbr,g=Zt,g("./locale/"+i),Ln(d)}catch{ze[i]=null}return ze[i]}function Ln(i,d){var g;return i&&(m(d)?g=dn(i):g=xl(i,d),g?So=g:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),So._abbr}function xl(i,d){if(d!==null){var g,b=Xf;if(d.abbr=i,ze[i]!=null)z("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),b=ze[i]._config;else if(d.parentLocale!=null)if(ze[d.parentLocale]!=null)b=ze[d.parentLocale]._config;else if(g=Ea(d.parentLocale),g!=null)b=g._config;else return ho[d.parentLocale]||(ho[d.parentLocale]=[]),ho[d.parentLocale].push({name:i,config:d}),null;return ze[i]=new te(B(b,d)),ho[i]&&ho[i].forEach(function(D){xl(D.name,D.config)}),Ln(i),ze[i]}else return delete ze[i],null}function hk(i,d){if(d!=null){var g,b,D=Xf;ze[i]!=null&&ze[i].parentLocale!=null?ze[i].set(B(ze[i]._config,d)):(b=Ea(i),b!=null&&(D=b._config),d=B(D,d),b==null&&(d.abbr=i),g=new te(d),g.parentLocale=ze[i],ze[i]=g),Ln(i)}else ze[i]!=null&&(ze[i].parentLocale!=null?(ze[i]=ze[i].parentLocale,i===Ln()&&Ln(i)):ze[i]!=null&&delete ze[i]);return ze[i]}function dn(i){var d;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return So;if(!s(i)){if(d=Ea(i),d)return d;i=[i]}return mk(i)}function Sk(){return H(ze)}function Ml(i){var d,g=i._a;return g&&C(i).overflow===-2&&(d=g[sn]<0||g[sn]>11?sn:g[Qt]<1||g[Qt]>Dl(g[mt],g[sn])?Qt:g[Qe]<0||g[Qe]>24||g[Qe]===24&&(g[Wt]!==0||g[ln]!==0||g[er]!==0)?Qe:g[Wt]<0||g[Wt]>59?Wt:g[ln]<0||g[ln]>59?ln:g[er]<0||g[er]>999?er:-1,C(i)._overflowDayOfYear&&(d<mt||d>Qt)&&(d=Qt),C(i)._overflowWeeks&&d===-1&&(d=yN),C(i)._overflowWeekday&&d===-1&&(d=TN),C(i).overflow=d),i}var gk=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bk=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vk=/Z|[+-]\d\d(?::?\d\d)?/,wa=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_l=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yk=/^\/?Date\((-?\d+)/i,Tk=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ek={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function eh(i){var d,g,b=i._i,D=gk.exec(b)||bk.exec(b),F,X,he,Ee,De=wa.length,gt=_l.length;if(D){for(C(i).iso=!0,d=0,g=De;d<g;d++)if(wa[d][1].exec(D[1])){X=wa[d][0],F=wa[d][2]!==!1;break}if(X==null){i._isValid=!1;return}if(D[3]){for(d=0,g=gt;d<g;d++)if(_l[d][1].exec(D[3])){he=(D[2]||" ")+_l[d][0];break}if(he==null){i._isValid=!1;return}}if(!F&&he!=null){i._isValid=!1;return}if(D[4])if(vk.exec(D[4]))Ee="Z";else{i._isValid=!1;return}i._f=X+(he||"")+(Ee||""),Ol(i)}else i._isValid=!1}function wk(i,d,g,b,D,F){var X=[Ck(i),Wf.indexOf(d),parseInt(g,10),parseInt(b,10),parseInt(D,10)];return F&&X.push(parseInt(F,10)),X}function Ck(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function Dk(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Nk(i,d,g){if(i){var b=qf.indexOf(i),D=new Date(d[0],d[1],d[2]).getDay();if(b!==D)return C(g).weekdayMismatch=!0,g._isValid=!1,!1}return!0}function kk(i,d,g){if(i)return Ek[i];if(d)return 0;var b=parseInt(g,10),D=b%100,F=(b-D)/100;return F*60+D}function th(i){var d=Tk.exec(Dk(i._i)),g;if(d){if(g=wk(d[4],d[3],d[2],d[5],d[6],d[7]),!Nk(d[1],g,i))return;i._a=g,i._tzm=kk(d[8],d[9],d[10]),i._d=mo.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),C(i).rfc2822=!0}else i._isValid=!1}function Ik(i){var d=yk.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(eh(i),i._isValid===!1)delete i._isValid;else return;if(th(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:r.createFromInputFallback(i)}r.createFromInputFallback=O("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function Nr(i,d,g){return i??d??g}function xk(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function Ll(i){var d,g,b=[],D,F,X;if(!i._d){for(D=xk(i),i._w&&i._a[Qt]==null&&i._a[sn]==null&&Mk(i),i._dayOfYear!=null&&(X=Nr(i._a[mt],D[mt]),(i._dayOfYear>po(X)||i._dayOfYear===0)&&(C(i)._overflowDayOfYear=!0),g=mo(X,0,i._dayOfYear),i._a[sn]=g.getUTCMonth(),i._a[Qt]=g.getUTCDate()),d=0;d<3&&i._a[d]==null;++d)i._a[d]=b[d]=D[d];for(;d<7;d++)i._a[d]=b[d]=i._a[d]==null?d===2?1:0:i._a[d];i._a[Qe]===24&&i._a[Wt]===0&&i._a[ln]===0&&i._a[er]===0&&(i._nextDay=!0,i._a[Qe]=0),i._d=(i._useUTC?mo:BN).apply(null,b),F=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[Qe]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==F&&(C(i).weekdayMismatch=!0)}}function Mk(i){var d,g,b,D,F,X,he,Ee,De;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(F=1,X=4,g=Nr(d.GG,i._a[mt],fo(Ye(),1,4).year),b=Nr(d.W,1),D=Nr(d.E,1),(D<1||D>7)&&(Ee=!0)):(F=i._locale._week.dow,X=i._locale._week.doy,De=fo(Ye(),F,X),g=Nr(d.gg,i._a[mt],De.year),b=Nr(d.w,De.week),d.d!=null?(D=d.d,(D<0||D>6)&&(Ee=!0)):d.e!=null?(D=d.e+F,(d.e<0||d.e>6)&&(Ee=!0)):D=F),b<1||b>cn(g,F,X)?C(i)._overflowWeeks=!0:Ee!=null?C(i)._overflowWeekday=!0:(he=jf(g,b,D,F,X),i._a[mt]=he.year,i._dayOfYear=he.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Ol(i){if(i._f===r.ISO_8601){eh(i);return}if(i._f===r.RFC_2822){th(i);return}i._a=[],C(i).empty=!0;var d=""+i._i,g,b,D,F,X,he=d.length,Ee=0,De,gt;for(D=de(i._f,i._locale).match(j)||[],gt=D.length,g=0;g<gt;g++)F=D[g],b=(d.match(wl(F,i))||[])[0],b&&(X=d.substr(0,d.indexOf(b)),X.length>0&&C(i).unusedInput.push(X),d=d.slice(d.indexOf(b)+b.length),Ee+=b.length),U[F]?(b?C(i).empty=!1:C(i).unusedTokens.push(F),vN(F,b,i)):i._strict&&!b&&C(i).unusedTokens.push(F);C(i).charsLeftOver=he-Ee,d.length>0&&C(i).unusedInput.push(d),i._a[Qe]<=12&&C(i).bigHour===!0&&i._a[Qe]>0&&(C(i).bigHour=void 0),C(i).parsedDateParts=i._a.slice(0),C(i).meridiem=i._meridiem,i._a[Qe]=_k(i._locale,i._a[Qe],i._meridiem),De=C(i).era,De!==null&&(i._a[mt]=i._locale.erasConvertYear(De,i._a[mt])),Ll(i),Ml(i)}function _k(i,d,g){var b;return g==null?d:i.meridiemHour!=null?i.meridiemHour(d,g):(i.isPM!=null&&(b=i.isPM(g),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function Lk(i){var d,g,b,D,F,X,he=!1,Ee=i._f.length;if(Ee===0){C(i).invalidFormat=!0,i._d=new Date(NaN);return}for(D=0;D<Ee;D++)F=0,X=!1,d=V({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[D],Ol(d),N(d)&&(X=!0),F+=C(d).charsLeftOver,F+=C(d).unusedTokens.length*10,C(d).score=F,he?F<b&&(b=F,g=d):(b==null||F<b||X)&&(b=F,g=d,X&&(he=!0));S(i,g||d)}function Ok(i){if(!i._d){var d=Fe(i._i),g=d.day===void 0?d.date:d.day;i._a=h([d.year,d.month,g,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),Ll(i)}}function Pk(i){var d=new A(Ml(nh(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function nh(i){var d=i._i,g=i._f;return i._locale=i._locale||dn(i._l),d===null||g===void 0&&d===""?M({nullInput:!0}):(typeof d=="string"&&(i._i=d=i._locale.preparse(d)),w(d)?new A(Ml(d)):(u(d)?i._d=d:s(g)?Lk(i):g?Ol(i):Rk(i),N(i)||(i._d=null),i))}function Rk(i){var d=i._i;m(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?Ik(i):s(d)?(i._a=h(d.slice(0),function(g){return parseInt(g,10)}),Ll(i)):l(d)?Ok(i):f(d)?i._d=new Date(d):r.createFromInputFallback(i)}function rh(i,d,g,b,D){var F={};return(d===!0||d===!1)&&(b=d,d=void 0),(g===!0||g===!1)&&(b=g,g=void 0),(l(i)&&p(i)||s(i)&&i.length===0)&&(i=void 0),F._isAMomentObject=!0,F._useUTC=F._isUTC=D,F._l=g,F._i=i,F._f=d,F._strict=b,Pk(F)}function Ye(i,d,g,b){return rh(i,d,g,b,!1)}var Bk=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ye.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:M()}),Ak=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ye.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:M()});function oh(i,d){var g,b;if(d.length===1&&s(d[0])&&(d=d[0]),!d.length)return Ye();for(g=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][i](g))&&(g=d[b]);return g}function Fk(){var i=[].slice.call(arguments,0);return oh("isBefore",i)}function Vk(){var i=[].slice.call(arguments,0);return oh("isAfter",i)}var $k=function(){return Date.now?Date.now():+new Date},go=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Kk(i){var d,g=!1,b,D=go.length;for(d in i)if(c(i,d)&&!(qe.call(go,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<D;++b)if(i[go[b]]){if(g)return!1;parseFloat(i[go[b]])!==Ce(i[go[b]])&&(g=!0)}return!0}function Hk(){return this._isValid}function Wk(){return Gt(NaN)}function Ca(i){var d=Fe(i),g=d.year||0,b=d.quarter||0,D=d.month||0,F=d.week||d.isoWeek||0,X=d.day||0,he=d.hour||0,Ee=d.minute||0,De=d.second||0,gt=d.millisecond||0;this._isValid=Kk(d),this._milliseconds=+gt+De*1e3+Ee*6e4+he*1e3*60*60,this._days=+X+F*7,this._months=+D+b*3+g*12,this._data={},this._locale=dn(),this._bubble()}function Da(i){return i instanceof Ca}function Pl(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function Gk(i,d,g){var b=Math.min(i.length,d.length),D=Math.abs(i.length-d.length),F=0,X;for(X=0;X<b;X++)Ce(i[X])!==Ce(d[X])&&F++;return F+D}function ah(i,d){R(i,0,0,function(){var g=this.utcOffset(),b="+";return g<0&&(g=-g,b="-"),b+W(~~(g/60),2)+d+W(~~g%60,2)})}ah("Z",":"),ah("ZZ",""),me("Z",Xt),me("ZZ",Xt),Ke(["Z","ZZ"],function(i,d,g){g._useUTC=!0,g._tzm=Rl(Xt,i)});var Yk=/([\+\-]|\d\d)/gi;function Rl(i,d){var g=(d||"").match(i),b,D,F;return g===null?null:(b=g[g.length-1]||[],D=(b+"").match(Yk)||["-",0,0],F=+(D[1]*60)+Ce(D[2]),F===0?0:D[0]==="+"?F:-F)}function Bl(i,d){var g,b;return d._isUTC?(g=d.clone(),b=(w(i)||u(i)?i.valueOf():Ye(i).valueOf())-g.valueOf(),g._d.setTime(g._d.valueOf()+b),r.updateOffset(g,!1),g):Ye(i).local()}function Al(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function Uk(i,d,g){var b=this._offset||0,D;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Rl(Xt,i),i===null)return this}else Math.abs(i)<16&&!g&&(i=i*60);return!this._isUTC&&d&&(D=Al(this)),this._offset=i,this._isUTC=!0,D!=null&&this.add(D,"m"),b!==i&&(!d||this._changeInProgress?ch(this,Gt(i-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Al(this)}function zk(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function jk(i){return this.utcOffset(0,i)}function qk(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Al(this),"m")),this}function Jk(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Rl(_n,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function Zk(i){return this.isValid()?(i=i?Ye(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function Xk(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Qk(){if(!m(this._isDSTShifted))return this._isDSTShifted;var i={},d;return V(i,this),i=nh(i),i._a?(d=i._isUTC?y(i._a):Ye(i._a),this._isDSTShifted=this.isValid()&&Gk(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function eI(){return this.isValid()?!this._isUTC:!1}function tI(){return this.isValid()?this._isUTC:!1}function sh(){return this.isValid()?this._isUTC&&this._offset===0:!1}var nI=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,rI=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Gt(i,d){var g=i,b=null,D,F,X;return Da(i)?g={ms:i._milliseconds,d:i._days,M:i._months}:f(i)||!isNaN(+i)?(g={},d?g[d]=+i:g.milliseconds=+i):(b=nI.exec(i))?(D=b[1]==="-"?-1:1,g={y:0,d:Ce(b[Qt])*D,h:Ce(b[Qe])*D,m:Ce(b[Wt])*D,s:Ce(b[ln])*D,ms:Ce(Pl(b[er]*1e3))*D}):(b=rI.exec(i))?(D=b[1]==="-"?-1:1,g={y:tr(b[2],D),M:tr(b[3],D),w:tr(b[4],D),d:tr(b[5],D),h:tr(b[6],D),m:tr(b[7],D),s:tr(b[8],D)}):g==null?g={}:typeof g=="object"&&("from"in g||"to"in g)&&(X=oI(Ye(g.from),Ye(g.to)),g={},g.ms=X.milliseconds,g.M=X.months),F=new Ca(g),Da(i)&&c(i,"_locale")&&(F._locale=i._locale),Da(i)&&c(i,"_isValid")&&(F._isValid=i._isValid),F}Gt.fn=Ca.prototype,Gt.invalid=Wk;function tr(i,d){var g=i&&parseFloat(i.replace(",","."));return(isNaN(g)?0:g)*d}function ih(i,d){var g={};return g.months=d.month()-i.month()+(d.year()-i.year())*12,i.clone().add(g.months,"M").isAfter(d)&&--g.months,g.milliseconds=+d-+i.clone().add(g.months,"M"),g}function oI(i,d){var g;return i.isValid()&&d.isValid()?(d=Bl(d,i),i.isBefore(d)?g=ih(i,d):(g=ih(d,i),g.milliseconds=-g.milliseconds,g.months=-g.months),g):{milliseconds:0,months:0}}function lh(i,d){return function(g,b){var D,F;return b!==null&&!isNaN(+b)&&(z(d,"moment()."+d+"(period, number) is deprecated. Please use moment()."+d+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),F=g,g=b,b=F),D=Gt(g,b),ch(this,D,i),this}}function ch(i,d,g,b){var D=d._milliseconds,F=Pl(d._days),X=Pl(d._months);i.isValid()&&(b=b??!0,X&&Yf(i,uo(i,"Month")+X*g),F&&Hf(i,"Date",uo(i,"Date")+F*g),D&&i._d.setTime(i._d.valueOf()+D*g),b&&r.updateOffset(i,F||X))}var aI=lh(1,"add"),sI=lh(-1,"subtract");function dh(i){return typeof i=="string"||i instanceof String}function iI(i){return w(i)||u(i)||dh(i)||f(i)||cI(i)||lI(i)||i===null||i===void 0}function lI(i){var d=l(i)&&!p(i),g=!1,b=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],D,F,X=b.length;for(D=0;D<X;D+=1)F=b[D],g=g||c(i,F);return d&&g}function cI(i){var d=s(i),g=!1;return d&&(g=i.filter(function(b){return!f(b)&&dh(i)}).length===0),d&&g}function dI(i){var d=l(i)&&!p(i),g=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],D,F;for(D=0;D<b.length;D+=1)F=b[D],g=g||c(i,F);return d&&g}function pI(i,d){var g=i.diff(d,"days",!0);return g<-6?"sameElse":g<-1?"lastWeek":g<0?"lastDay":g<1?"sameDay":g<2?"nextDay":g<7?"nextWeek":"sameElse"}function uI(i,d){arguments.length===1&&(arguments[0]?iI(arguments[0])?(i=arguments[0],d=void 0):dI(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var g=i||Ye(),b=Bl(g,this).startOf("day"),D=r.calendarFormat(this,b)||"sameElse",F=d&&(L(d[D])?d[D].call(this,g):d[D]);return this.format(F||this.localeData().calendar(D,this,Ye(g)))}function mI(){return new A(this)}function fI(i,d){var g=w(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(d).valueOf()):!1}function hI(i,d){var g=w(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(d).valueOf()<g.valueOf()):!1}function SI(i,d,g,b){var D=w(i)?i:Ye(i),F=w(d)?d:Ye(d);return this.isValid()&&D.isValid()&&F.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(D,g):!this.isBefore(D,g))&&(b[1]===")"?this.isBefore(F,g):!this.isAfter(F,g))):!1}function gI(i,d){var g=w(i)?i:Ye(i),b;return this.isValid()&&g.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()===g.valueOf():(b=g.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function bI(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function vI(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function yI(i,d,g){var b,D,F;if(!this.isValid())return NaN;if(b=Bl(i,this),!b.isValid())return NaN;switch(D=(b.utcOffset()-this.utcOffset())*6e4,d=fe(d),d){case"year":F=Na(this,b)/12;break;case"month":F=Na(this,b);break;case"quarter":F=Na(this,b)/3;break;case"second":F=(this-b)/1e3;break;case"minute":F=(this-b)/6e4;break;case"hour":F=(this-b)/36e5;break;case"day":F=(this-b-D)/864e5;break;case"week":F=(this-b-D)/6048e5;break;default:F=this-b}return g?F:Bt(F)}function Na(i,d){if(i.date()<d.date())return-Na(d,i);var g=(d.year()-i.year())*12+(d.month()-i.month()),b=i.clone().add(g,"months"),D,F;return d-b<0?(D=i.clone().add(g-1,"months"),F=(d-b)/(b-D)):(D=i.clone().add(g+1,"months"),F=(d-b)/(D-b)),-(g+F)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function TI(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function EI(i){if(!this.isValid())return null;var d=i!==!0,g=d?this.clone().utc():this;return g.year()<0||g.year()>9999?ee(g,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ee(g,"Z")):ee(g,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wI(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",d="",g,b,D,F;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),g="["+i+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",D="-MM-DD[T]HH:mm:ss.SSS",F=d+'[")]',this.format(g+b+D+F)}function CI(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=ee(this,i);return this.localeData().postformat(d)}function DI(i,d){return this.isValid()&&(w(i)&&i.isValid()||Ye(i).isValid())?Gt({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function NI(i){return this.from(Ye(),i)}function kI(i,d){return this.isValid()&&(w(i)&&i.isValid()||Ye(i).isValid())?Gt({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function II(i){return this.to(Ye(),i)}function ph(i){var d;return i===void 0?this._locale._abbr:(d=dn(i),d!=null&&(this._locale=d),this)}var uh=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function mh(){return this._locale}var ka=1e3,kr=60*ka,Ia=60*kr,fh=(365*400+97)*24*Ia;function Ir(i,d){return(i%d+d)%d}function hh(i,d,g){return i<100&&i>=0?new Date(i+400,d,g)-fh:new Date(i,d,g).valueOf()}function Sh(i,d,g){return i<100&&i>=0?Date.UTC(i+400,d,g)-fh:Date.UTC(i,d,g)}function xI(i){var d,g;if(i=fe(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Sh:hh,i){case"year":d=g(this.year(),0,1);break;case"quarter":d=g(this.year(),this.month()-this.month()%3,1);break;case"month":d=g(this.year(),this.month(),1);break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=g(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=Ir(d+(this._isUTC?0:this.utcOffset()*kr),Ia);break;case"minute":d=this._d.valueOf(),d-=Ir(d,kr);break;case"second":d=this._d.valueOf(),d-=Ir(d,ka);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function MI(i){var d,g;if(i=fe(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Sh:hh,i){case"year":d=g(this.year()+1,0,1)-1;break;case"quarter":d=g(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=g(this.year(),this.month()+1,1)-1;break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=g(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=Ia-Ir(d+(this._isUTC?0:this.utcOffset()*kr),Ia)-1;break;case"minute":d=this._d.valueOf(),d+=kr-Ir(d,kr)-1;break;case"second":d=this._d.valueOf(),d+=ka-Ir(d,ka)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function _I(){return this._d.valueOf()-(this._offset||0)*6e4}function LI(){return Math.floor(this.valueOf()/1e3)}function OI(){return new Date(this.valueOf())}function PI(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function RI(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function BI(){return this.isValid()?this.toISOString():null}function AI(){return N(this)}function FI(){return S({},C(this))}function VI(){return C(this).overflow}function $I(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),me("N",Fl),me("NN",Fl),me("NNN",Fl),me("NNNN",ZI),me("NNNNN",XI),Ke(["N","NN","NNN","NNNN","NNNNN"],function(i,d,g,b){var D=g._locale.erasParse(i,b,g._strict);D?C(g).era=D:C(g).invalidEra=i}),me("y",Ae),me("yy",Ae),me("yyy",Ae),me("yyyy",Ae),me("yo",QI),Ke(["y","yy","yyy","yyyy"],mt),Ke(["yo"],function(i,d,g,b){var D;g._locale._eraYearOrdinalRegex&&(D=i.match(g._locale._eraYearOrdinalRegex)),g._locale.eraYearOrdinalParse?d[mt]=g._locale.eraYearOrdinalParse(i,D):d[mt]=parseInt(i,10)});function KI(i,d){var g,b,D,F=this._eras||dn("en")._eras;for(g=0,b=F.length;g<b;++g){switch(typeof F[g].since){case"string":D=r(F[g].since).startOf("day"),F[g].since=D.valueOf();break}switch(typeof F[g].until){case"undefined":F[g].until=1/0;break;case"string":D=r(F[g].until).startOf("day").valueOf(),F[g].until=D.valueOf();break}}return F}function HI(i,d,g){var b,D,F=this.eras(),X,he,Ee;for(i=i.toUpperCase(),b=0,D=F.length;b<D;++b)if(X=F[b].name.toUpperCase(),he=F[b].abbr.toUpperCase(),Ee=F[b].narrow.toUpperCase(),g)switch(d){case"N":case"NN":case"NNN":if(he===i)return F[b];break;case"NNNN":if(X===i)return F[b];break;case"NNNNN":if(Ee===i)return F[b];break}else if([X,he,Ee].indexOf(i)>=0)return F[b]}function WI(i,d){var g=i.since<=i.until?1:-1;return d===void 0?r(i.since).year():r(i.since).year()+(d-i.offset)*g}function GI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].name;return""}function YI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].narrow;return""}function UI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].abbr;return""}function zI(){var i,d,g,b,D=this.localeData().eras();for(i=0,d=D.length;i<d;++i)if(g=D[i].since<=D[i].until?1:-1,b=this.clone().startOf("day").valueOf(),D[i].since<=b&&b<=D[i].until||D[i].until<=b&&b<=D[i].since)return(this.year()-r(D[i].since).year())*g+D[i].offset;return this.year()}function jI(i){return c(this,"_erasNameRegex")||Vl.call(this),i?this._erasNameRegex:this._erasRegex}function qI(i){return c(this,"_erasAbbrRegex")||Vl.call(this),i?this._erasAbbrRegex:this._erasRegex}function JI(i){return c(this,"_erasNarrowRegex")||Vl.call(this),i?this._erasNarrowRegex:this._erasRegex}function Fl(i,d){return d.erasAbbrRegex(i)}function ZI(i,d){return d.erasNameRegex(i)}function XI(i,d){return d.erasNarrowRegex(i)}function QI(i,d){return d._eraYearOrdinalRegex||Ae}function Vl(){var i=[],d=[],g=[],b=[],D,F,X,he,Ee,De=this.eras();for(D=0,F=De.length;D<F;++D)X=an(De[D].name),he=an(De[D].abbr),Ee=an(De[D].narrow),d.push(X),i.push(he),g.push(Ee),b.push(X),b.push(he),b.push(Ee);this._erasRegex=new RegExp("^("+b.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+d.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+g.join("|")+")","i")}R(0,["gg",2],0,function(){return this.weekYear()%100}),R(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xa(i,d){R(0,[i,i.length],0,d)}xa("gggg","weekYear"),xa("ggggg","weekYear"),xa("GGGG","isoWeekYear"),xa("GGGGG","isoWeekYear"),me("G",pt),me("g",pt),me("GG",Se,we),me("gg",Se,we),me("GGGG",dt,Mn),me("gggg",dt,Mn),me("GGGGG",Tt,ue),me("ggggg",Tt,ue),co(["gggg","ggggg","GGGG","GGGGG"],function(i,d,g,b){d[b.substr(0,2)]=Ce(i)}),co(["gg","GG"],function(i,d,g,b){d[b]=r.parseTwoDigitYear(i)});function ex(i){return gh.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function tx(i){return gh.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function nx(){return cn(this.year(),1,4)}function rx(){return cn(this.isoWeekYear(),1,4)}function ox(){var i=this.localeData()._week;return cn(this.year(),i.dow,i.doy)}function ax(){var i=this.localeData()._week;return cn(this.weekYear(),i.dow,i.doy)}function gh(i,d,g,b,D){var F;return i==null?fo(this,b,D).year:(F=cn(i,b,D),d>F&&(d=F),sx.call(this,i,d,g,b,D))}function sx(i,d,g,b,D){var F=jf(i,d,g,b,D),X=mo(F.year,0,F.dayOfYear);return this.year(X.getUTCFullYear()),this.month(X.getUTCMonth()),this.date(X.getUTCDate()),this}R("Q",0,"Qo","quarter"),me("Q",ot),Ke("Q",function(i,d){d[sn]=(Ce(i)-1)*3});function ix(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}R("D",["DD",2],"Do","date"),me("D",Se,Te),me("DD",Se,we),me("Do",function(i,d){return i?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),Ke(["D","DD"],Qt),Ke("Do",function(i,d){d[Qt]=Ce(i.match(Se)[0])});var bh=Dr("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),me("DDD",Ie),me("DDDD",Ht),Ke(["DDD","DDDD"],function(i,d,g){g._dayOfYear=Ce(i)});function lx(i){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?d:this.add(i-d,"d")}R("m",["mm",2],0,"minute"),me("m",Se,Xe),me("mm",Se,we),Ke(["m","mm"],Wt);var cx=Dr("Minutes",!1);R("s",["ss",2],0,"second"),me("s",Se,Xe),me("ss",Se,we),Ke(["s","ss"],ln);var dx=Dr("Seconds",!1);R("S",0,0,function(){return~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return this.millisecond()*10}),R(0,["SSSSS",5],0,function(){return this.millisecond()*100}),R(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),R(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),R(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),R(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),me("S",Ie,ot),me("SS",Ie,we),me("SSS",Ie,Ht);var On,vh;for(On="SSSS";On.length<=9;On+="S")me(On,Ae);function px(i,d){d[er]=Ce(("0."+i)*1e3)}for(On="S";On.length<=9;On+="S")Ke(On,px);vh=Dr("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");function ux(){return this._isUTC?"UTC":""}function mx(){return this._isUTC?"Coordinated Universal Time":""}var ce=A.prototype;ce.add=aI,ce.calendar=uI,ce.clone=mI,ce.diff=yI,ce.endOf=MI,ce.format=CI,ce.from=DI,ce.fromNow=NI,ce.to=kI,ce.toNow=II,ce.get=wN,ce.invalidAt=VI,ce.isAfter=fI,ce.isBefore=hI,ce.isBetween=SI,ce.isSame=gI,ce.isSameOrAfter=bI,ce.isSameOrBefore=vI,ce.isValid=AI,ce.lang=uh,ce.locale=ph,ce.localeData=mh,ce.max=Ak,ce.min=Bk,ce.parsingFlags=FI,ce.set=CN,ce.startOf=xI,ce.subtract=sI,ce.toArray=PI,ce.toObject=RI,ce.toDate=OI,ce.toISOString=EI,ce.inspect=wI,typeof Symbol<"u"&&Symbol.for!=null&&(ce[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ce.toJSON=BI,ce.toString=TI,ce.unix=LI,ce.valueOf=_I,ce.creationData=$I,ce.eraName=GI,ce.eraNarrow=YI,ce.eraAbbr=UI,ce.eraYear=zI,ce.year=Kf,ce.isLeapYear=EN,ce.weekYear=ex,ce.isoWeekYear=tx,ce.quarter=ce.quarters=ix,ce.month=Uf,ce.daysInMonth=ON,ce.week=ce.weeks=KN,ce.isoWeek=ce.isoWeeks=HN,ce.weeksInYear=ox,ce.weeksInWeekYear=ax,ce.isoWeeksInYear=nx,ce.isoWeeksInISOWeekYear=rx,ce.date=bh,ce.day=ce.days=tk,ce.weekday=nk,ce.isoWeekday=rk,ce.dayOfYear=lx,ce.hour=ce.hours=dk,ce.minute=ce.minutes=cx,ce.second=ce.seconds=dx,ce.millisecond=ce.milliseconds=vh,ce.utcOffset=Uk,ce.utc=jk,ce.local=qk,ce.parseZone=Jk,ce.hasAlignedHourOffset=Zk,ce.isDST=Xk,ce.isLocal=eI,ce.isUtcOffset=tI,ce.isUtc=sh,ce.isUTC=sh,ce.zoneAbbr=ux,ce.zoneName=mx,ce.dates=O("dates accessor is deprecated. Use date instead.",bh),ce.months=O("months accessor is deprecated. Use month instead",Uf),ce.years=O("years accessor is deprecated. Use year instead",Kf),ce.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zk),ce.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Qk);function fx(i){return Ye(i*1e3)}function hx(){return Ye.apply(null,arguments).parseZone()}function yh(i){return i}var Pe=te.prototype;Pe.calendar=oe,Pe.longDateFormat=le,Pe.invalidDate=Ne,Pe.ordinal=lt,Pe.preparse=yh,Pe.postformat=yh,Pe.relativeTime=ct,Pe.pastFuture=Pt,Pe.set=J,Pe.eras=KI,Pe.erasParse=HI,Pe.erasConvertYear=WI,Pe.erasAbbrRegex=qI,Pe.erasNameRegex=jI,Pe.erasNarrowRegex=JI,Pe.months=xN,Pe.monthsShort=MN,Pe.monthsParse=LN,Pe.monthsRegex=RN,Pe.monthsShortRegex=PN,Pe.week=AN,Pe.firstDayOfYear=$N,Pe.firstDayOfWeek=VN,Pe.weekdays=JN,Pe.weekdaysMin=XN,Pe.weekdaysShort=ZN,Pe.weekdaysParse=ek,Pe.weekdaysRegex=ok,Pe.weekdaysShortRegex=ak,Pe.weekdaysMinRegex=sk,Pe.isPM=lk,Pe.meridiem=pk;function Ma(i,d,g,b){var D=dn(),F=y().set(b,d);return D[g](F,i)}function Th(i,d,g){if(f(i)&&(d=i,i=void 0),i=i||"",d!=null)return Ma(i,d,g,"month");var b,D=[];for(b=0;b<12;b++)D[b]=Ma(i,b,g,"month");return D}function $l(i,d,g,b){typeof i=="boolean"?(f(d)&&(g=d,d=void 0),d=d||""):(d=i,g=d,i=!1,f(d)&&(g=d,d=void 0),d=d||"");var D=dn(),F=i?D._week.dow:0,X,he=[];if(g!=null)return Ma(d,(g+F)%7,b,"day");for(X=0;X<7;X++)he[X]=Ma(d,(X+F)%7,b,"day");return he}function Sx(i,d){return Th(i,d,"months")}function gx(i,d){return Th(i,d,"monthsShort")}function bx(i,d,g){return $l(i,d,g,"weekdays")}function vx(i,d,g){return $l(i,d,g,"weekdaysShort")}function yx(i,d,g){return $l(i,d,g,"weekdaysMin")}Ln("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var d=i%10,g=Ce(i%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return i+g}}),r.lang=O("moment.lang is deprecated. Use moment.locale instead.",Ln),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",dn);var pn=Math.abs;function Tx(){var i=this._data;return this._milliseconds=pn(this._milliseconds),this._days=pn(this._days),this._months=pn(this._months),i.milliseconds=pn(i.milliseconds),i.seconds=pn(i.seconds),i.minutes=pn(i.minutes),i.hours=pn(i.hours),i.months=pn(i.months),i.years=pn(i.years),this}function Eh(i,d,g,b){var D=Gt(d,g);return i._milliseconds+=b*D._milliseconds,i._days+=b*D._days,i._months+=b*D._months,i._bubble()}function Ex(i,d){return Eh(this,i,d,1)}function wx(i,d){return Eh(this,i,d,-1)}function wh(i){return i<0?Math.floor(i):Math.ceil(i)}function Cx(){var i=this._milliseconds,d=this._days,g=this._months,b=this._data,D,F,X,he,Ee;return i>=0&&d>=0&&g>=0||i<=0&&d<=0&&g<=0||(i+=wh(Kl(g)+d)*864e5,d=0,g=0),b.milliseconds=i%1e3,D=Bt(i/1e3),b.seconds=D%60,F=Bt(D/60),b.minutes=F%60,X=Bt(F/60),b.hours=X%24,d+=Bt(X/24),Ee=Bt(Ch(d)),g+=Ee,d-=wh(Kl(Ee)),he=Bt(g/12),g%=12,b.days=d,b.months=g,b.years=he,this}function Ch(i){return i*4800/146097}function Kl(i){return i*146097/4800}function Dx(i){if(!this.isValid())return NaN;var d,g,b=this._milliseconds;if(i=fe(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,g=this._months+Ch(d),i){case"month":return g;case"quarter":return g/3;case"year":return g/12}else switch(d=this._days+Math.round(Kl(this._months)),i){case"week":return d/7+b/6048e5;case"day":return d+b/864e5;case"hour":return d*24+b/36e5;case"minute":return d*1440+b/6e4;case"second":return d*86400+b/1e3;case"millisecond":return Math.floor(d*864e5)+b;default:throw new Error("Unknown unit "+i)}}function un(i){return function(){return this.as(i)}}var Dh=un("ms"),Nx=un("s"),kx=un("m"),Ix=un("h"),xx=un("d"),Mx=un("w"),_x=un("M"),Lx=un("Q"),Ox=un("y"),Px=Dh;function Rx(){return Gt(this)}function Bx(i){return i=fe(i),this.isValid()?this[i+"s"]():NaN}function nr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Ax=nr("milliseconds"),Fx=nr("seconds"),Vx=nr("minutes"),$x=nr("hours"),Kx=nr("days"),Hx=nr("months"),Wx=nr("years");function Gx(){return Bt(this.days()/7)}var mn=Math.round,xr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Yx(i,d,g,b,D){return D.relativeTime(d||1,!!g,i,b)}function Ux(i,d,g,b){var D=Gt(i).abs(),F=mn(D.as("s")),X=mn(D.as("m")),he=mn(D.as("h")),Ee=mn(D.as("d")),De=mn(D.as("M")),gt=mn(D.as("w")),fn=mn(D.as("y")),Pn=F<=g.ss&&["s",F]||F<g.s&&["ss",F]||X<=1&&["m"]||X<g.m&&["mm",X]||he<=1&&["h"]||he<g.h&&["hh",he]||Ee<=1&&["d"]||Ee<g.d&&["dd",Ee];return g.w!=null&&(Pn=Pn||gt<=1&&["w"]||gt<g.w&&["ww",gt]),Pn=Pn||De<=1&&["M"]||De<g.M&&["MM",De]||fn<=1&&["y"]||["yy",fn],Pn[2]=d,Pn[3]=+i>0,Pn[4]=b,Yx.apply(null,Pn)}function zx(i){return i===void 0?mn:typeof i=="function"?(mn=i,!0):!1}function jx(i,d){return xr[i]===void 0?!1:d===void 0?xr[i]:(xr[i]=d,i==="s"&&(xr.ss=d-1),!0)}function qx(i,d){if(!this.isValid())return this.localeData().invalidDate();var g=!1,b=xr,D,F;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(g=i),typeof d=="object"&&(b=Object.assign({},xr,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),D=this.localeData(),F=Ux(this,!g,b,D),g&&(F=D.pastFuture(+this,F)),D.postformat(F)}var Hl=Math.abs;function Mr(i){return(i>0)-(i<0)||+i}function _a(){if(!this.isValid())return this.localeData().invalidDate();var i=Hl(this._milliseconds)/1e3,d=Hl(this._days),g=Hl(this._months),b,D,F,X,he=this.asSeconds(),Ee,De,gt,fn;return he?(b=Bt(i/60),D=Bt(b/60),i%=60,b%=60,F=Bt(g/12),g%=12,X=i?i.toFixed(3).replace(/\.?0+$/,""):"",Ee=he<0?"-":"",De=Mr(this._months)!==Mr(he)?"-":"",gt=Mr(this._days)!==Mr(he)?"-":"",fn=Mr(this._milliseconds)!==Mr(he)?"-":"",Ee+"P"+(F?De+F+"Y":"")+(g?De+g+"M":"")+(d?gt+d+"D":"")+(D||b||i?"T":"")+(D?fn+D+"H":"")+(b?fn+b+"M":"")+(i?fn+X+"S":"")):"P0D"}var xe=Ca.prototype;xe.isValid=Hk,xe.abs=Tx,xe.add=Ex,xe.subtract=wx,xe.as=Dx,xe.asMilliseconds=Dh,xe.asSeconds=Nx,xe.asMinutes=kx,xe.asHours=Ix,xe.asDays=xx,xe.asWeeks=Mx,xe.asMonths=_x,xe.asQuarters=Lx,xe.asYears=Ox,xe.valueOf=Px,xe._bubble=Cx,xe.clone=Rx,xe.get=Bx,xe.milliseconds=Ax,xe.seconds=Fx,xe.minutes=Vx,xe.hours=$x,xe.days=Kx,xe.weeks=Gx,xe.months=Hx,xe.years=Wx,xe.humanize=qx,xe.toISOString=_a,xe.toString=_a,xe.toJSON=_a,xe.locale=ph,xe.localeData=mh,xe.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_a),xe.lang=uh,R("X",0,0,"unix"),R("x",0,0,"valueOf"),me("x",pt),me("X",va),Ke("X",function(i,d,g){g._d=new Date(parseFloat(i)*1e3)}),Ke("x",function(i,d,g){g._d=new Date(Ce(i))});//! moment.js
|
|
1977
|
+
`+new Error().stack),g=!1}return d.apply(this,arguments)},d)}var $={};function z(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),$[i]||(P(d),$[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function L(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function J(i){var d,g;for(g in i)c(i,g)&&(d=i[g],L(d)?this[g]=d:this["_"+g]=d);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function B(i,d){var g=S({},i),b;for(b in d)c(d,b)&&(l(i[b])&&l(d[b])?(g[b]={},S(g[b],i[b]),S(g[b],d[b])):d[b]!=null?g[b]=d[b]:delete g[b]);for(b in i)c(i,b)&&!c(d,b)&&l(i[b])&&(g[b]=S({},g[b]));return g}function te(i){i!=null&&this.set(i)}var H;Object.keys?H=Object.keys:H=function(i){var d,g=[];for(d in i)c(i,d)&&g.push(d);return g};var q={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function oe(i,d,g){var b=this._calendar[i]||this._calendar.sameElse;return L(b)?b.call(d,g):b}function W(i,d,g){var b=""+Math.abs(i),D=d-b.length,F=i>=0;return(F?g?"+":"":"-")+Math.pow(10,Math.max(0,D)).toString().substr(1)+b}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,re={},U={};function R(i,d,g,b){var D=b;typeof b=="string"&&(D=function(){return this[b]()}),i&&(U[i]=D),d&&(U[d[0]]=function(){return W(D.apply(this,arguments),d[1],d[2])}),g&&(U[g]=function(){return this.localeData().ordinal(D.apply(this,arguments),i)})}function Z(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function ae(i){var d=i.match(j),g,b;for(g=0,b=d.length;g<b;g++)U[d[g]]?d[g]=U[d[g]]:d[g]=Z(d[g]);return function(D){var F="",X;for(X=0;X<b;X++)F+=L(d[X])?d[X].call(D,i):d[X];return F}}function ee(i,d){return i.isValid()?(d=de(d,i.localeData()),re[d]=re[d]||ae(d),re[d](i)):i.localeData().invalidDate()}function de(i,d){var g=5;function b(D){return d.longDateFormat(D)||D}for(ne.lastIndex=0;g>=0&&ne.test(i);)i=i.replace(ne,b),ne.lastIndex=0,g-=1;return i}var ie={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function le(i){var d=this._longDateFormat[i],g=this._longDateFormat[i.toUpperCase()];return d||!g?d:(this._longDateFormat[i]=g.match(j).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[i])}var se="Invalid date";function Ne(){return this._invalidDate}var ke="%d",it=/\d{1,2}/;function lt(i){return this._ordinal.replace("%d",i)}var ut={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ct(i,d,g,b){var D=this._relativeTime[g];return L(D)?D(i,d,g,b):D.replace(/%d/i,i)}function Pt(i,d){var g=this._relativeTime[i>0?"future":"past"];return L(g)?g(d):g.replace(/%s/i,d)}var je={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function fe(i){return typeof i=="string"?je[i]||je[i.toLowerCase()]:void 0}function Fe(i){var d={},g,b;for(b in i)c(i,b)&&(g=fe(b),g&&(d[g]=i[b]));return d}var ve={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Le(i){var d=[],g;for(g in i)c(i,g)&&d.push({unit:g,priority:ve[g]});return d.sort(function(b,D){return b.priority-D.priority}),d}var Qe=/\d/,we=/\d\d/,Ht=/\d{3}/,Mn=/\d{4}/,ue=/[+-]?\d{6}/,Se=/\d\d?/,Oe=/\d\d\d\d?/,Ze=/\d\d\d\d\d\d?/,Ie=/\d{1,3}/,dt=/\d{1,4}/,Tt=/[+-]?\d{1,6}/,Ae=/\d+/,pt=/[+-]?\d+/,_n=/Z|[+-]\d\d:?\d\d/gi,Xt=/Z|[+-]\d\d(?::?\d\d)?/gi,va=/[+-]?\d+(\.\d{1,3})?/,be=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Te=/^[1-9]\d?/,Xe=/^([1-9]\d|\d)/,Rt;Rt={};function me(i,d,g){Rt[i]=L(d)?d:function(b,D){return b&&g?g:d}}function wl(i,d){return c(Rt,i)?Rt[i](d._strict,d._locale):new RegExp(bN(i))}function bN(i){return an(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,g,b,D,F){return g||b||D||F}))}function an(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Bt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function Ce(i){var d=+i,g=0;return d!==0&&isFinite(d)&&(g=Bt(d)),g}var Cl={};function Ke(i,d){var g,b=d,D;for(typeof i=="string"&&(i=[i]),f(d)&&(b=function(F,X){X[d]=Ce(F)}),D=i.length,g=0;g<D;g++)Cl[i[g]]=b}function co(i,d){Ke(i,function(g,b,D,F){D._w=D._w||{},d(g,D._w,D,F)})}function vN(i,d,g){d!=null&&c(Cl,i)&&Cl[i](d,g._a,g,i)}function ya(i){return i%4===0&&i%100!==0||i%400===0}var mt=0,sn=1,Qt=2,et=3,Wt=4,ln=5,er=6,yN=7,TN=8;R("Y",0,0,function(){var i=this.year();return i<=9999?W(i,4):"+"+i}),R(0,["YY",2],0,function(){return this.year()%100}),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),me("Y",pt),me("YY",Se,we),me("YYYY",dt,Mn),me("YYYYY",Tt,ue),me("YYYYYY",Tt,ue),Ke(["YYYYY","YYYYYY"],mt),Ke("YYYY",function(i,d){d[mt]=i.length===2?r.parseTwoDigitYear(i):Ce(i)}),Ke("YY",function(i,d){d[mt]=r.parseTwoDigitYear(i)}),Ke("Y",function(i,d){d[mt]=parseInt(i,10)});function po(i){return ya(i)?366:365}r.parseTwoDigitYear=function(i){return Ce(i)+(Ce(i)>68?1900:2e3)};var Kf=Dr("FullYear",!0);function EN(){return ya(this.year())}function Dr(i,d){return function(g){return g!=null?(Hf(this,i,g),r.updateOffset(this,d),this):uo(this,i)}}function uo(i,d){if(!i.isValid())return NaN;var g=i._d,b=i._isUTC;switch(d){case"Milliseconds":return b?g.getUTCMilliseconds():g.getMilliseconds();case"Seconds":return b?g.getUTCSeconds():g.getSeconds();case"Minutes":return b?g.getUTCMinutes():g.getMinutes();case"Hours":return b?g.getUTCHours():g.getHours();case"Date":return b?g.getUTCDate():g.getDate();case"Day":return b?g.getUTCDay():g.getDay();case"Month":return b?g.getUTCMonth():g.getMonth();case"FullYear":return b?g.getUTCFullYear():g.getFullYear();default:return NaN}}function Hf(i,d,g){var b,D,F,X,he;if(!(!i.isValid()||isNaN(g))){switch(b=i._d,D=i._isUTC,d){case"Milliseconds":return void(D?b.setUTCMilliseconds(g):b.setMilliseconds(g));case"Seconds":return void(D?b.setUTCSeconds(g):b.setSeconds(g));case"Minutes":return void(D?b.setUTCMinutes(g):b.setMinutes(g));case"Hours":return void(D?b.setUTCHours(g):b.setHours(g));case"Date":return void(D?b.setUTCDate(g):b.setDate(g));case"FullYear":break;default:return}F=g,X=i.month(),he=i.date(),he=he===29&&X===1&&!ya(F)?28:he,D?b.setUTCFullYear(F,X,he):b.setFullYear(F,X,he)}}function wN(i){return i=fe(i),L(this[i])?this[i]():this}function CN(i,d){if(typeof i=="object"){i=Fe(i);var g=Le(i),b,D=g.length;for(b=0;b<D;b++)this[g[b].unit](i[g[b].unit])}else if(i=fe(i),L(this[i]))return this[i](d);return this}function DN(i,d){return(i%d+d)%d}var qe;Array.prototype.indexOf?qe=Array.prototype.indexOf:qe=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function Dl(i,d){if(isNaN(i)||isNaN(d))return NaN;var g=DN(d,12);return i+=(d-g)/12,g===1?ya(i)?29:28:31-g%7%2}R("M",["MM",2],"Mo",function(){return this.month()+1}),R("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),R("MMMM",0,0,function(i){return this.localeData().months(this,i)}),me("M",Se,Te),me("MM",Se,we),me("MMM",function(i,d){return d.monthsShortRegex(i)}),me("MMMM",function(i,d){return d.monthsRegex(i)}),Ke(["M","MM"],function(i,d){d[sn]=Ce(i)-1}),Ke(["MMM","MMMM"],function(i,d,g,b){var D=g._locale.monthsParse(i,b,g._strict);D!=null?d[sn]=D:C(g).invalidMonth=i});var NN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Wf="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Gf=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,kN=be,IN=be;function xN(i,d){return i?s(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Gf).test(d)?"format":"standalone"][i.month()]:s(this._months)?this._months:this._months.standalone}function MN(i,d){return i?s(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Gf.test(d)?"format":"standalone"][i.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function _N(i,d,g){var b,D,F,X=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)F=y([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(F,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(F,"").toLocaleLowerCase();return g?d==="MMM"?(D=qe.call(this._shortMonthsParse,X),D!==-1?D:null):(D=qe.call(this._longMonthsParse,X),D!==-1?D:null):d==="MMM"?(D=qe.call(this._shortMonthsParse,X),D!==-1?D:(D=qe.call(this._longMonthsParse,X),D!==-1?D:null)):(D=qe.call(this._longMonthsParse,X),D!==-1?D:(D=qe.call(this._shortMonthsParse,X),D!==-1?D:null))}function LN(i,d,g){var b,D,F;if(this._monthsParseExact)return _N.call(this,i,d,g);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(D=y([2e3,b]),g&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(D,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(D,"").replace(".","")+"$","i")),!g&&!this._monthsParse[b]&&(F="^"+this.months(D,"")+"|^"+this.monthsShort(D,""),this._monthsParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="MMMM"&&this._longMonthsParse[b].test(i))return b;if(g&&d==="MMM"&&this._shortMonthsParse[b].test(i))return b;if(!g&&this._monthsParse[b].test(i))return b}}function Yf(i,d){if(!i.isValid())return i;if(typeof d=="string"){if(/^\d+$/.test(d))d=Ce(d);else if(d=i.localeData().monthsParse(d),!f(d))return i}var g=d,b=i.date();return b=b<29?b:Math.min(b,Dl(i.year(),g)),i._isUTC?i._d.setUTCMonth(g,b):i._d.setMonth(g,b),i}function Uf(i){return i!=null?(Yf(this,i),r.updateOffset(this,!0),this):uo(this,"Month")}function ON(){return Dl(this.year(),this.month())}function PN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||zf.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=kN),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function RN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||zf.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=IN),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function zf(){function i(Ee,De){return De.length-Ee.length}var d=[],g=[],b=[],D,F,X,he;for(D=0;D<12;D++)F=y([2e3,D]),X=an(this.monthsShort(F,"")),he=an(this.months(F,"")),d.push(X),g.push(he),b.push(he),b.push(X);d.sort(i),g.sort(i),b.sort(i),this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function BN(i,d,g,b,D,F,X){var he;return i<100&&i>=0?(he=new Date(i+400,d,g,b,D,F,X),isFinite(he.getFullYear())&&he.setFullYear(i)):he=new Date(i,d,g,b,D,F,X),he}function mo(i){var d,g;return i<100&&i>=0?(g=Array.prototype.slice.call(arguments),g[0]=i+400,d=new Date(Date.UTC.apply(null,g)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(i)):d=new Date(Date.UTC.apply(null,arguments)),d}function Ta(i,d,g){var b=7+d-g,D=(7+mo(i,0,b).getUTCDay()-d)%7;return-D+b-1}function jf(i,d,g,b,D){var F=(7+g-b)%7,X=Ta(i,b,D),he=1+7*(d-1)+F+X,Ee,De;return he<=0?(Ee=i-1,De=po(Ee)+he):he>po(i)?(Ee=i+1,De=he-po(i)):(Ee=i,De=he),{year:Ee,dayOfYear:De}}function fo(i,d,g){var b=Ta(i.year(),d,g),D=Math.floor((i.dayOfYear()-b-1)/7)+1,F,X;return D<1?(X=i.year()-1,F=D+cn(X,d,g)):D>cn(i.year(),d,g)?(F=D-cn(i.year(),d,g),X=i.year()+1):(X=i.year(),F=D),{week:F,year:X}}function cn(i,d,g){var b=Ta(i,d,g),D=Ta(i+1,d,g);return(po(i)-b+D)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),me("w",Se,Te),me("ww",Se,we),me("W",Se,Te),me("WW",Se,we),co(["w","ww","W","WW"],function(i,d,g,b){d[b.substr(0,1)]=Ce(i)});function AN(i){return fo(i,this._week.dow,this._week.doy).week}var FN={dow:0,doy:6};function VN(){return this._week.dow}function $N(){return this._week.doy}function KN(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function HN(i){var d=fo(this,1,4).week;return i==null?d:this.add((i-d)*7,"d")}R("d",0,"do","day"),R("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),R("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),R("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),me("d",Se),me("e",Se),me("E",Se),me("dd",function(i,d){return d.weekdaysMinRegex(i)}),me("ddd",function(i,d){return d.weekdaysShortRegex(i)}),me("dddd",function(i,d){return d.weekdaysRegex(i)}),co(["dd","ddd","dddd"],function(i,d,g,b){var D=g._locale.weekdaysParse(i,b,g._strict);D!=null?d.d=D:C(g).invalidWeekday=i}),co(["d","e","E"],function(i,d,g,b){d[b]=Ce(i)});function WN(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function GN(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Nl(i,d){return i.slice(d,7).concat(i.slice(0,d))}var YN="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),qf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),UN="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zN=be,jN=be,qN=be;function JN(i,d){var g=s(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Nl(g,this._week.dow):i?g[i.day()]:g}function ZN(i){return i===!0?Nl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function XN(i){return i===!0?Nl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function QN(i,d,g){var b,D,F,X=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)F=y([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(F,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(F,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(F,"").toLocaleLowerCase();return g?d==="dddd"?(D=qe.call(this._weekdaysParse,X),D!==-1?D:null):d==="ddd"?(D=qe.call(this._shortWeekdaysParse,X),D!==-1?D:null):(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null):d==="dddd"?(D=qe.call(this._weekdaysParse,X),D!==-1||(D=qe.call(this._shortWeekdaysParse,X),D!==-1)?D:(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null)):d==="ddd"?(D=qe.call(this._shortWeekdaysParse,X),D!==-1||(D=qe.call(this._weekdaysParse,X),D!==-1)?D:(D=qe.call(this._minWeekdaysParse,X),D!==-1?D:null)):(D=qe.call(this._minWeekdaysParse,X),D!==-1||(D=qe.call(this._weekdaysParse,X),D!==-1)?D:(D=qe.call(this._shortWeekdaysParse,X),D!==-1?D:null))}function ek(i,d,g){var b,D,F;if(this._weekdaysParseExact)return QN.call(this,i,d,g);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(D=y([2e3,1]).day(b),g&&!this._fullWeekdaysParse[b]&&(this._fullWeekdaysParse[b]=new RegExp("^"+this.weekdays(D,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[b]=new RegExp("^"+this.weekdaysShort(D,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[b]=new RegExp("^"+this.weekdaysMin(D,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[b]||(F="^"+this.weekdays(D,"")+"|^"+this.weekdaysShort(D,"")+"|^"+this.weekdaysMin(D,""),this._weekdaysParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="dddd"&&this._fullWeekdaysParse[b].test(i))return b;if(g&&d==="ddd"&&this._shortWeekdaysParse[b].test(i))return b;if(g&&d==="dd"&&this._minWeekdaysParse[b].test(i))return b;if(!g&&this._weekdaysParse[b].test(i))return b}}function tk(i){if(!this.isValid())return i!=null?this:NaN;var d=uo(this,"Day");return i!=null?(i=WN(i,this.localeData()),this.add(i-d,"d")):d}function nk(i){if(!this.isValid())return i!=null?this:NaN;var d=(this.day()+7-this.localeData()._week.dow)%7;return i==null?d:this.add(i-d,"d")}function rk(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=GN(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function ok(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=zN),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function ak(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jN),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function sk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||kl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qN),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function kl(){function i(gt,fn){return fn.length-gt.length}var d=[],g=[],b=[],D=[],F,X,he,Ee,De;for(F=0;F<7;F++)X=y([2e3,1]).day(F),he=an(this.weekdaysMin(X,"")),Ee=an(this.weekdaysShort(X,"")),De=an(this.weekdays(X,"")),d.push(he),g.push(Ee),b.push(De),D.push(he),D.push(Ee),D.push(De);d.sort(i),g.sort(i),b.sort(i),D.sort(i),this._weekdaysRegex=new RegExp("^("+D.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+b.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Il(){return this.hours()%12||12}function ik(){return this.hours()||24}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,Il),R("k",["kk",2],0,ik),R("hmm",0,0,function(){return""+Il.apply(this)+W(this.minutes(),2)}),R("hmmss",0,0,function(){return""+Il.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),R("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),R("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)});function Jf(i,d){R(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}Jf("a",!0),Jf("A",!1);function Zf(i,d){return d._meridiemParse}me("a",Zf),me("A",Zf),me("H",Se,Xe),me("h",Se,Te),me("k",Se,Te),me("HH",Se,we),me("hh",Se,we),me("kk",Se,we),me("hmm",Oe),me("hmmss",Ze),me("Hmm",Oe),me("Hmmss",Ze),Ke(["H","HH"],et),Ke(["k","kk"],function(i,d,g){var b=Ce(i);d[et]=b===24?0:b}),Ke(["a","A"],function(i,d,g){g._isPm=g._locale.isPM(i),g._meridiem=i}),Ke(["h","hh"],function(i,d,g){d[et]=Ce(i),C(g).bigHour=!0}),Ke("hmm",function(i,d,g){var b=i.length-2;d[et]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b)),C(g).bigHour=!0}),Ke("hmmss",function(i,d,g){var b=i.length-4,D=i.length-2;d[et]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D)),C(g).bigHour=!0}),Ke("Hmm",function(i,d,g){var b=i.length-2;d[et]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b))}),Ke("Hmmss",function(i,d,g){var b=i.length-4,D=i.length-2;d[et]=Ce(i.substr(0,b)),d[Wt]=Ce(i.substr(b,2)),d[ln]=Ce(i.substr(D))});function lk(i){return(i+"").toLowerCase().charAt(0)==="p"}var ck=/[ap]\.?m?\.?/i,dk=Dr("Hours",!0);function pk(i,d,g){return i>11?g?"pm":"PM":g?"am":"AM"}var Xf={calendar:q,longDateFormat:ie,invalidDate:se,ordinal:ke,dayOfMonthOrdinalParse:it,relativeTime:ut,months:NN,monthsShort:Wf,week:FN,weekdays:YN,weekdaysMin:UN,weekdaysShort:qf,meridiemParse:ck},ze={},ho={},So;function uk(i,d){var g,b=Math.min(i.length,d.length);for(g=0;g<b;g+=1)if(i[g]!==d[g])return g;return b}function Qf(i){return i&&i.toLowerCase().replace("_","-")}function mk(i){for(var d=0,g,b,D,F;d<i.length;){for(F=Qf(i[d]).split("-"),g=F.length,b=Qf(i[d+1]),b=b?b.split("-"):null;g>0;){if(D=Ea(F.slice(0,g).join("-")),D)return D;if(b&&b.length>=g&&uk(F,b)>=g-1)break;g--}d++}return So}function fk(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Ea(i){var d=null,g;if(ze[i]===void 0&&e&&e.exports&&fk(i))try{d=So._abbr,g=Zt,g("./locale/"+i),Ln(d)}catch{ze[i]=null}return ze[i]}function Ln(i,d){var g;return i&&(m(d)?g=dn(i):g=xl(i,d),g?So=g:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),So._abbr}function xl(i,d){if(d!==null){var g,b=Xf;if(d.abbr=i,ze[i]!=null)z("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),b=ze[i]._config;else if(d.parentLocale!=null)if(ze[d.parentLocale]!=null)b=ze[d.parentLocale]._config;else if(g=Ea(d.parentLocale),g!=null)b=g._config;else return ho[d.parentLocale]||(ho[d.parentLocale]=[]),ho[d.parentLocale].push({name:i,config:d}),null;return ze[i]=new te(B(b,d)),ho[i]&&ho[i].forEach(function(D){xl(D.name,D.config)}),Ln(i),ze[i]}else return delete ze[i],null}function hk(i,d){if(d!=null){var g,b,D=Xf;ze[i]!=null&&ze[i].parentLocale!=null?ze[i].set(B(ze[i]._config,d)):(b=Ea(i),b!=null&&(D=b._config),d=B(D,d),b==null&&(d.abbr=i),g=new te(d),g.parentLocale=ze[i],ze[i]=g),Ln(i)}else ze[i]!=null&&(ze[i].parentLocale!=null?(ze[i]=ze[i].parentLocale,i===Ln()&&Ln(i)):ze[i]!=null&&delete ze[i]);return ze[i]}function dn(i){var d;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return So;if(!s(i)){if(d=Ea(i),d)return d;i=[i]}return mk(i)}function Sk(){return H(ze)}function Ml(i){var d,g=i._a;return g&&C(i).overflow===-2&&(d=g[sn]<0||g[sn]>11?sn:g[Qt]<1||g[Qt]>Dl(g[mt],g[sn])?Qt:g[et]<0||g[et]>24||g[et]===24&&(g[Wt]!==0||g[ln]!==0||g[er]!==0)?et:g[Wt]<0||g[Wt]>59?Wt:g[ln]<0||g[ln]>59?ln:g[er]<0||g[er]>999?er:-1,C(i)._overflowDayOfYear&&(d<mt||d>Qt)&&(d=Qt),C(i)._overflowWeeks&&d===-1&&(d=yN),C(i)._overflowWeekday&&d===-1&&(d=TN),C(i).overflow=d),i}var gk=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bk=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vk=/Z|[+-]\d\d(?::?\d\d)?/,wa=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_l=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yk=/^\/?Date\((-?\d+)/i,Tk=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ek={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function eh(i){var d,g,b=i._i,D=gk.exec(b)||bk.exec(b),F,X,he,Ee,De=wa.length,gt=_l.length;if(D){for(C(i).iso=!0,d=0,g=De;d<g;d++)if(wa[d][1].exec(D[1])){X=wa[d][0],F=wa[d][2]!==!1;break}if(X==null){i._isValid=!1;return}if(D[3]){for(d=0,g=gt;d<g;d++)if(_l[d][1].exec(D[3])){he=(D[2]||" ")+_l[d][0];break}if(he==null){i._isValid=!1;return}}if(!F&&he!=null){i._isValid=!1;return}if(D[4])if(vk.exec(D[4]))Ee="Z";else{i._isValid=!1;return}i._f=X+(he||"")+(Ee||""),Ol(i)}else i._isValid=!1}function wk(i,d,g,b,D,F){var X=[Ck(i),Wf.indexOf(d),parseInt(g,10),parseInt(b,10),parseInt(D,10)];return F&&X.push(parseInt(F,10)),X}function Ck(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function Dk(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Nk(i,d,g){if(i){var b=qf.indexOf(i),D=new Date(d[0],d[1],d[2]).getDay();if(b!==D)return C(g).weekdayMismatch=!0,g._isValid=!1,!1}return!0}function kk(i,d,g){if(i)return Ek[i];if(d)return 0;var b=parseInt(g,10),D=b%100,F=(b-D)/100;return F*60+D}function th(i){var d=Tk.exec(Dk(i._i)),g;if(d){if(g=wk(d[4],d[3],d[2],d[5],d[6],d[7]),!Nk(d[1],g,i))return;i._a=g,i._tzm=kk(d[8],d[9],d[10]),i._d=mo.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),C(i).rfc2822=!0}else i._isValid=!1}function Ik(i){var d=yk.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(eh(i),i._isValid===!1)delete i._isValid;else return;if(th(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:r.createFromInputFallback(i)}r.createFromInputFallback=O("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function Nr(i,d,g){return i??d??g}function xk(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function Ll(i){var d,g,b=[],D,F,X;if(!i._d){for(D=xk(i),i._w&&i._a[Qt]==null&&i._a[sn]==null&&Mk(i),i._dayOfYear!=null&&(X=Nr(i._a[mt],D[mt]),(i._dayOfYear>po(X)||i._dayOfYear===0)&&(C(i)._overflowDayOfYear=!0),g=mo(X,0,i._dayOfYear),i._a[sn]=g.getUTCMonth(),i._a[Qt]=g.getUTCDate()),d=0;d<3&&i._a[d]==null;++d)i._a[d]=b[d]=D[d];for(;d<7;d++)i._a[d]=b[d]=i._a[d]==null?d===2?1:0:i._a[d];i._a[et]===24&&i._a[Wt]===0&&i._a[ln]===0&&i._a[er]===0&&(i._nextDay=!0,i._a[et]=0),i._d=(i._useUTC?mo:BN).apply(null,b),F=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[et]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==F&&(C(i).weekdayMismatch=!0)}}function Mk(i){var d,g,b,D,F,X,he,Ee,De;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(F=1,X=4,g=Nr(d.GG,i._a[mt],fo(Ye(),1,4).year),b=Nr(d.W,1),D=Nr(d.E,1),(D<1||D>7)&&(Ee=!0)):(F=i._locale._week.dow,X=i._locale._week.doy,De=fo(Ye(),F,X),g=Nr(d.gg,i._a[mt],De.year),b=Nr(d.w,De.week),d.d!=null?(D=d.d,(D<0||D>6)&&(Ee=!0)):d.e!=null?(D=d.e+F,(d.e<0||d.e>6)&&(Ee=!0)):D=F),b<1||b>cn(g,F,X)?C(i)._overflowWeeks=!0:Ee!=null?C(i)._overflowWeekday=!0:(he=jf(g,b,D,F,X),i._a[mt]=he.year,i._dayOfYear=he.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Ol(i){if(i._f===r.ISO_8601){eh(i);return}if(i._f===r.RFC_2822){th(i);return}i._a=[],C(i).empty=!0;var d=""+i._i,g,b,D,F,X,he=d.length,Ee=0,De,gt;for(D=de(i._f,i._locale).match(j)||[],gt=D.length,g=0;g<gt;g++)F=D[g],b=(d.match(wl(F,i))||[])[0],b&&(X=d.substr(0,d.indexOf(b)),X.length>0&&C(i).unusedInput.push(X),d=d.slice(d.indexOf(b)+b.length),Ee+=b.length),U[F]?(b?C(i).empty=!1:C(i).unusedTokens.push(F),vN(F,b,i)):i._strict&&!b&&C(i).unusedTokens.push(F);C(i).charsLeftOver=he-Ee,d.length>0&&C(i).unusedInput.push(d),i._a[et]<=12&&C(i).bigHour===!0&&i._a[et]>0&&(C(i).bigHour=void 0),C(i).parsedDateParts=i._a.slice(0),C(i).meridiem=i._meridiem,i._a[et]=_k(i._locale,i._a[et],i._meridiem),De=C(i).era,De!==null&&(i._a[mt]=i._locale.erasConvertYear(De,i._a[mt])),Ll(i),Ml(i)}function _k(i,d,g){var b;return g==null?d:i.meridiemHour!=null?i.meridiemHour(d,g):(i.isPM!=null&&(b=i.isPM(g),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function Lk(i){var d,g,b,D,F,X,he=!1,Ee=i._f.length;if(Ee===0){C(i).invalidFormat=!0,i._d=new Date(NaN);return}for(D=0;D<Ee;D++)F=0,X=!1,d=V({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[D],Ol(d),N(d)&&(X=!0),F+=C(d).charsLeftOver,F+=C(d).unusedTokens.length*10,C(d).score=F,he?F<b&&(b=F,g=d):(b==null||F<b||X)&&(b=F,g=d,X&&(he=!0));S(i,g||d)}function Ok(i){if(!i._d){var d=Fe(i._i),g=d.day===void 0?d.date:d.day;i._a=h([d.year,d.month,g,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),Ll(i)}}function Pk(i){var d=new A(Ml(nh(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function nh(i){var d=i._i,g=i._f;return i._locale=i._locale||dn(i._l),d===null||g===void 0&&d===""?M({nullInput:!0}):(typeof d=="string"&&(i._i=d=i._locale.preparse(d)),w(d)?new A(Ml(d)):(u(d)?i._d=d:s(g)?Lk(i):g?Ol(i):Rk(i),N(i)||(i._d=null),i))}function Rk(i){var d=i._i;m(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?Ik(i):s(d)?(i._a=h(d.slice(0),function(g){return parseInt(g,10)}),Ll(i)):l(d)?Ok(i):f(d)?i._d=new Date(d):r.createFromInputFallback(i)}function rh(i,d,g,b,D){var F={};return(d===!0||d===!1)&&(b=d,d=void 0),(g===!0||g===!1)&&(b=g,g=void 0),(l(i)&&p(i)||s(i)&&i.length===0)&&(i=void 0),F._isAMomentObject=!0,F._useUTC=F._isUTC=D,F._l=g,F._i=i,F._f=d,F._strict=b,Pk(F)}function Ye(i,d,g,b){return rh(i,d,g,b,!1)}var Bk=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ye.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:M()}),Ak=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ye.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:M()});function oh(i,d){var g,b;if(d.length===1&&s(d[0])&&(d=d[0]),!d.length)return Ye();for(g=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][i](g))&&(g=d[b]);return g}function Fk(){var i=[].slice.call(arguments,0);return oh("isBefore",i)}function Vk(){var i=[].slice.call(arguments,0);return oh("isAfter",i)}var $k=function(){return Date.now?Date.now():+new Date},go=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Kk(i){var d,g=!1,b,D=go.length;for(d in i)if(c(i,d)&&!(qe.call(go,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<D;++b)if(i[go[b]]){if(g)return!1;parseFloat(i[go[b]])!==Ce(i[go[b]])&&(g=!0)}return!0}function Hk(){return this._isValid}function Wk(){return Gt(NaN)}function Ca(i){var d=Fe(i),g=d.year||0,b=d.quarter||0,D=d.month||0,F=d.week||d.isoWeek||0,X=d.day||0,he=d.hour||0,Ee=d.minute||0,De=d.second||0,gt=d.millisecond||0;this._isValid=Kk(d),this._milliseconds=+gt+De*1e3+Ee*6e4+he*1e3*60*60,this._days=+X+F*7,this._months=+D+b*3+g*12,this._data={},this._locale=dn(),this._bubble()}function Da(i){return i instanceof Ca}function Pl(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function Gk(i,d,g){var b=Math.min(i.length,d.length),D=Math.abs(i.length-d.length),F=0,X;for(X=0;X<b;X++)Ce(i[X])!==Ce(d[X])&&F++;return F+D}function ah(i,d){R(i,0,0,function(){var g=this.utcOffset(),b="+";return g<0&&(g=-g,b="-"),b+W(~~(g/60),2)+d+W(~~g%60,2)})}ah("Z",":"),ah("ZZ",""),me("Z",Xt),me("ZZ",Xt),Ke(["Z","ZZ"],function(i,d,g){g._useUTC=!0,g._tzm=Rl(Xt,i)});var Yk=/([\+\-]|\d\d)/gi;function Rl(i,d){var g=(d||"").match(i),b,D,F;return g===null?null:(b=g[g.length-1]||[],D=(b+"").match(Yk)||["-",0,0],F=+(D[1]*60)+Ce(D[2]),F===0?0:D[0]==="+"?F:-F)}function Bl(i,d){var g,b;return d._isUTC?(g=d.clone(),b=(w(i)||u(i)?i.valueOf():Ye(i).valueOf())-g.valueOf(),g._d.setTime(g._d.valueOf()+b),r.updateOffset(g,!1),g):Ye(i).local()}function Al(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function Uk(i,d,g){var b=this._offset||0,D;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Rl(Xt,i),i===null)return this}else Math.abs(i)<16&&!g&&(i=i*60);return!this._isUTC&&d&&(D=Al(this)),this._offset=i,this._isUTC=!0,D!=null&&this.add(D,"m"),b!==i&&(!d||this._changeInProgress?ch(this,Gt(i-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Al(this)}function zk(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function jk(i){return this.utcOffset(0,i)}function qk(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Al(this),"m")),this}function Jk(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Rl(_n,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function Zk(i){return this.isValid()?(i=i?Ye(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function Xk(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Qk(){if(!m(this._isDSTShifted))return this._isDSTShifted;var i={},d;return V(i,this),i=nh(i),i._a?(d=i._isUTC?y(i._a):Ye(i._a),this._isDSTShifted=this.isValid()&&Gk(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function eI(){return this.isValid()?!this._isUTC:!1}function tI(){return this.isValid()?this._isUTC:!1}function sh(){return this.isValid()?this._isUTC&&this._offset===0:!1}var nI=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,rI=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Gt(i,d){var g=i,b=null,D,F,X;return Da(i)?g={ms:i._milliseconds,d:i._days,M:i._months}:f(i)||!isNaN(+i)?(g={},d?g[d]=+i:g.milliseconds=+i):(b=nI.exec(i))?(D=b[1]==="-"?-1:1,g={y:0,d:Ce(b[Qt])*D,h:Ce(b[et])*D,m:Ce(b[Wt])*D,s:Ce(b[ln])*D,ms:Ce(Pl(b[er]*1e3))*D}):(b=rI.exec(i))?(D=b[1]==="-"?-1:1,g={y:tr(b[2],D),M:tr(b[3],D),w:tr(b[4],D),d:tr(b[5],D),h:tr(b[6],D),m:tr(b[7],D),s:tr(b[8],D)}):g==null?g={}:typeof g=="object"&&("from"in g||"to"in g)&&(X=oI(Ye(g.from),Ye(g.to)),g={},g.ms=X.milliseconds,g.M=X.months),F=new Ca(g),Da(i)&&c(i,"_locale")&&(F._locale=i._locale),Da(i)&&c(i,"_isValid")&&(F._isValid=i._isValid),F}Gt.fn=Ca.prototype,Gt.invalid=Wk;function tr(i,d){var g=i&&parseFloat(i.replace(",","."));return(isNaN(g)?0:g)*d}function ih(i,d){var g={};return g.months=d.month()-i.month()+(d.year()-i.year())*12,i.clone().add(g.months,"M").isAfter(d)&&--g.months,g.milliseconds=+d-+i.clone().add(g.months,"M"),g}function oI(i,d){var g;return i.isValid()&&d.isValid()?(d=Bl(d,i),i.isBefore(d)?g=ih(i,d):(g=ih(d,i),g.milliseconds=-g.milliseconds,g.months=-g.months),g):{milliseconds:0,months:0}}function lh(i,d){return function(g,b){var D,F;return b!==null&&!isNaN(+b)&&(z(d,"moment()."+d+"(period, number) is deprecated. Please use moment()."+d+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),F=g,g=b,b=F),D=Gt(g,b),ch(this,D,i),this}}function ch(i,d,g,b){var D=d._milliseconds,F=Pl(d._days),X=Pl(d._months);i.isValid()&&(b=b??!0,X&&Yf(i,uo(i,"Month")+X*g),F&&Hf(i,"Date",uo(i,"Date")+F*g),D&&i._d.setTime(i._d.valueOf()+D*g),b&&r.updateOffset(i,F||X))}var aI=lh(1,"add"),sI=lh(-1,"subtract");function dh(i){return typeof i=="string"||i instanceof String}function iI(i){return w(i)||u(i)||dh(i)||f(i)||cI(i)||lI(i)||i===null||i===void 0}function lI(i){var d=l(i)&&!p(i),g=!1,b=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],D,F,X=b.length;for(D=0;D<X;D+=1)F=b[D],g=g||c(i,F);return d&&g}function cI(i){var d=s(i),g=!1;return d&&(g=i.filter(function(b){return!f(b)&&dh(i)}).length===0),d&&g}function dI(i){var d=l(i)&&!p(i),g=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],D,F;for(D=0;D<b.length;D+=1)F=b[D],g=g||c(i,F);return d&&g}function pI(i,d){var g=i.diff(d,"days",!0);return g<-6?"sameElse":g<-1?"lastWeek":g<0?"lastDay":g<1?"sameDay":g<2?"nextDay":g<7?"nextWeek":"sameElse"}function uI(i,d){arguments.length===1&&(arguments[0]?iI(arguments[0])?(i=arguments[0],d=void 0):dI(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var g=i||Ye(),b=Bl(g,this).startOf("day"),D=r.calendarFormat(this,b)||"sameElse",F=d&&(L(d[D])?d[D].call(this,g):d[D]);return this.format(F||this.localeData().calendar(D,this,Ye(g)))}function mI(){return new A(this)}function fI(i,d){var g=w(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(d).valueOf()):!1}function hI(i,d){var g=w(i)?i:Ye(i);return this.isValid()&&g.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(d).valueOf()<g.valueOf()):!1}function SI(i,d,g,b){var D=w(i)?i:Ye(i),F=w(d)?d:Ye(d);return this.isValid()&&D.isValid()&&F.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(D,g):!this.isBefore(D,g))&&(b[1]===")"?this.isBefore(F,g):!this.isAfter(F,g))):!1}function gI(i,d){var g=w(i)?i:Ye(i),b;return this.isValid()&&g.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()===g.valueOf():(b=g.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function bI(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function vI(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function yI(i,d,g){var b,D,F;if(!this.isValid())return NaN;if(b=Bl(i,this),!b.isValid())return NaN;switch(D=(b.utcOffset()-this.utcOffset())*6e4,d=fe(d),d){case"year":F=Na(this,b)/12;break;case"month":F=Na(this,b);break;case"quarter":F=Na(this,b)/3;break;case"second":F=(this-b)/1e3;break;case"minute":F=(this-b)/6e4;break;case"hour":F=(this-b)/36e5;break;case"day":F=(this-b-D)/864e5;break;case"week":F=(this-b-D)/6048e5;break;default:F=this-b}return g?F:Bt(F)}function Na(i,d){if(i.date()<d.date())return-Na(d,i);var g=(d.year()-i.year())*12+(d.month()-i.month()),b=i.clone().add(g,"months"),D,F;return d-b<0?(D=i.clone().add(g-1,"months"),F=(d-b)/(b-D)):(D=i.clone().add(g+1,"months"),F=(d-b)/(D-b)),-(g+F)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function TI(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function EI(i){if(!this.isValid())return null;var d=i!==!0,g=d?this.clone().utc():this;return g.year()<0||g.year()>9999?ee(g,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ee(g,"Z")):ee(g,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wI(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",d="",g,b,D,F;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),g="["+i+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",D="-MM-DD[T]HH:mm:ss.SSS",F=d+'[")]',this.format(g+b+D+F)}function CI(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=ee(this,i);return this.localeData().postformat(d)}function DI(i,d){return this.isValid()&&(w(i)&&i.isValid()||Ye(i).isValid())?Gt({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function NI(i){return this.from(Ye(),i)}function kI(i,d){return this.isValid()&&(w(i)&&i.isValid()||Ye(i).isValid())?Gt({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function II(i){return this.to(Ye(),i)}function ph(i){var d;return i===void 0?this._locale._abbr:(d=dn(i),d!=null&&(this._locale=d),this)}var uh=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function mh(){return this._locale}var ka=1e3,kr=60*ka,Ia=60*kr,fh=(365*400+97)*24*Ia;function Ir(i,d){return(i%d+d)%d}function hh(i,d,g){return i<100&&i>=0?new Date(i+400,d,g)-fh:new Date(i,d,g).valueOf()}function Sh(i,d,g){return i<100&&i>=0?Date.UTC(i+400,d,g)-fh:Date.UTC(i,d,g)}function xI(i){var d,g;if(i=fe(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Sh:hh,i){case"year":d=g(this.year(),0,1);break;case"quarter":d=g(this.year(),this.month()-this.month()%3,1);break;case"month":d=g(this.year(),this.month(),1);break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=g(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=Ir(d+(this._isUTC?0:this.utcOffset()*kr),Ia);break;case"minute":d=this._d.valueOf(),d-=Ir(d,kr);break;case"second":d=this._d.valueOf(),d-=Ir(d,ka);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function MI(i){var d,g;if(i=fe(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Sh:hh,i){case"year":d=g(this.year()+1,0,1)-1;break;case"quarter":d=g(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=g(this.year(),this.month()+1,1)-1;break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=g(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=Ia-Ir(d+(this._isUTC?0:this.utcOffset()*kr),Ia)-1;break;case"minute":d=this._d.valueOf(),d+=kr-Ir(d,kr)-1;break;case"second":d=this._d.valueOf(),d+=ka-Ir(d,ka)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function _I(){return this._d.valueOf()-(this._offset||0)*6e4}function LI(){return Math.floor(this.valueOf()/1e3)}function OI(){return new Date(this.valueOf())}function PI(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function RI(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function BI(){return this.isValid()?this.toISOString():null}function AI(){return N(this)}function FI(){return S({},C(this))}function VI(){return C(this).overflow}function $I(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),me("N",Fl),me("NN",Fl),me("NNN",Fl),me("NNNN",ZI),me("NNNNN",XI),Ke(["N","NN","NNN","NNNN","NNNNN"],function(i,d,g,b){var D=g._locale.erasParse(i,b,g._strict);D?C(g).era=D:C(g).invalidEra=i}),me("y",Ae),me("yy",Ae),me("yyy",Ae),me("yyyy",Ae),me("yo",QI),Ke(["y","yy","yyy","yyyy"],mt),Ke(["yo"],function(i,d,g,b){var D;g._locale._eraYearOrdinalRegex&&(D=i.match(g._locale._eraYearOrdinalRegex)),g._locale.eraYearOrdinalParse?d[mt]=g._locale.eraYearOrdinalParse(i,D):d[mt]=parseInt(i,10)});function KI(i,d){var g,b,D,F=this._eras||dn("en")._eras;for(g=0,b=F.length;g<b;++g){switch(typeof F[g].since){case"string":D=r(F[g].since).startOf("day"),F[g].since=D.valueOf();break}switch(typeof F[g].until){case"undefined":F[g].until=1/0;break;case"string":D=r(F[g].until).startOf("day").valueOf(),F[g].until=D.valueOf();break}}return F}function HI(i,d,g){var b,D,F=this.eras(),X,he,Ee;for(i=i.toUpperCase(),b=0,D=F.length;b<D;++b)if(X=F[b].name.toUpperCase(),he=F[b].abbr.toUpperCase(),Ee=F[b].narrow.toUpperCase(),g)switch(d){case"N":case"NN":case"NNN":if(he===i)return F[b];break;case"NNNN":if(X===i)return F[b];break;case"NNNNN":if(Ee===i)return F[b];break}else if([X,he,Ee].indexOf(i)>=0)return F[b]}function WI(i,d){var g=i.since<=i.until?1:-1;return d===void 0?r(i.since).year():r(i.since).year()+(d-i.offset)*g}function GI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].name;return""}function YI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].narrow;return""}function UI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].abbr;return""}function zI(){var i,d,g,b,D=this.localeData().eras();for(i=0,d=D.length;i<d;++i)if(g=D[i].since<=D[i].until?1:-1,b=this.clone().startOf("day").valueOf(),D[i].since<=b&&b<=D[i].until||D[i].until<=b&&b<=D[i].since)return(this.year()-r(D[i].since).year())*g+D[i].offset;return this.year()}function jI(i){return c(this,"_erasNameRegex")||Vl.call(this),i?this._erasNameRegex:this._erasRegex}function qI(i){return c(this,"_erasAbbrRegex")||Vl.call(this),i?this._erasAbbrRegex:this._erasRegex}function JI(i){return c(this,"_erasNarrowRegex")||Vl.call(this),i?this._erasNarrowRegex:this._erasRegex}function Fl(i,d){return d.erasAbbrRegex(i)}function ZI(i,d){return d.erasNameRegex(i)}function XI(i,d){return d.erasNarrowRegex(i)}function QI(i,d){return d._eraYearOrdinalRegex||Ae}function Vl(){var i=[],d=[],g=[],b=[],D,F,X,he,Ee,De=this.eras();for(D=0,F=De.length;D<F;++D)X=an(De[D].name),he=an(De[D].abbr),Ee=an(De[D].narrow),d.push(X),i.push(he),g.push(Ee),b.push(X),b.push(he),b.push(Ee);this._erasRegex=new RegExp("^("+b.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+d.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+g.join("|")+")","i")}R(0,["gg",2],0,function(){return this.weekYear()%100}),R(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xa(i,d){R(0,[i,i.length],0,d)}xa("gggg","weekYear"),xa("ggggg","weekYear"),xa("GGGG","isoWeekYear"),xa("GGGGG","isoWeekYear"),me("G",pt),me("g",pt),me("GG",Se,we),me("gg",Se,we),me("GGGG",dt,Mn),me("gggg",dt,Mn),me("GGGGG",Tt,ue),me("ggggg",Tt,ue),co(["gggg","ggggg","GGGG","GGGGG"],function(i,d,g,b){d[b.substr(0,2)]=Ce(i)}),co(["gg","GG"],function(i,d,g,b){d[b]=r.parseTwoDigitYear(i)});function ex(i){return gh.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function tx(i){return gh.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function nx(){return cn(this.year(),1,4)}function rx(){return cn(this.isoWeekYear(),1,4)}function ox(){var i=this.localeData()._week;return cn(this.year(),i.dow,i.doy)}function ax(){var i=this.localeData()._week;return cn(this.weekYear(),i.dow,i.doy)}function gh(i,d,g,b,D){var F;return i==null?fo(this,b,D).year:(F=cn(i,b,D),d>F&&(d=F),sx.call(this,i,d,g,b,D))}function sx(i,d,g,b,D){var F=jf(i,d,g,b,D),X=mo(F.year,0,F.dayOfYear);return this.year(X.getUTCFullYear()),this.month(X.getUTCMonth()),this.date(X.getUTCDate()),this}R("Q",0,"Qo","quarter"),me("Q",Qe),Ke("Q",function(i,d){d[sn]=(Ce(i)-1)*3});function ix(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}R("D",["DD",2],"Do","date"),me("D",Se,Te),me("DD",Se,we),me("Do",function(i,d){return i?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),Ke(["D","DD"],Qt),Ke("Do",function(i,d){d[Qt]=Ce(i.match(Se)[0])});var bh=Dr("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),me("DDD",Ie),me("DDDD",Ht),Ke(["DDD","DDDD"],function(i,d,g){g._dayOfYear=Ce(i)});function lx(i){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?d:this.add(i-d,"d")}R("m",["mm",2],0,"minute"),me("m",Se,Xe),me("mm",Se,we),Ke(["m","mm"],Wt);var cx=Dr("Minutes",!1);R("s",["ss",2],0,"second"),me("s",Se,Xe),me("ss",Se,we),Ke(["s","ss"],ln);var dx=Dr("Seconds",!1);R("S",0,0,function(){return~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return this.millisecond()*10}),R(0,["SSSSS",5],0,function(){return this.millisecond()*100}),R(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),R(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),R(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),R(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),me("S",Ie,Qe),me("SS",Ie,we),me("SSS",Ie,Ht);var On,vh;for(On="SSSS";On.length<=9;On+="S")me(On,Ae);function px(i,d){d[er]=Ce(("0."+i)*1e3)}for(On="S";On.length<=9;On+="S")Ke(On,px);vh=Dr("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");function ux(){return this._isUTC?"UTC":""}function mx(){return this._isUTC?"Coordinated Universal Time":""}var ce=A.prototype;ce.add=aI,ce.calendar=uI,ce.clone=mI,ce.diff=yI,ce.endOf=MI,ce.format=CI,ce.from=DI,ce.fromNow=NI,ce.to=kI,ce.toNow=II,ce.get=wN,ce.invalidAt=VI,ce.isAfter=fI,ce.isBefore=hI,ce.isBetween=SI,ce.isSame=gI,ce.isSameOrAfter=bI,ce.isSameOrBefore=vI,ce.isValid=AI,ce.lang=uh,ce.locale=ph,ce.localeData=mh,ce.max=Ak,ce.min=Bk,ce.parsingFlags=FI,ce.set=CN,ce.startOf=xI,ce.subtract=sI,ce.toArray=PI,ce.toObject=RI,ce.toDate=OI,ce.toISOString=EI,ce.inspect=wI,typeof Symbol<"u"&&Symbol.for!=null&&(ce[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ce.toJSON=BI,ce.toString=TI,ce.unix=LI,ce.valueOf=_I,ce.creationData=$I,ce.eraName=GI,ce.eraNarrow=YI,ce.eraAbbr=UI,ce.eraYear=zI,ce.year=Kf,ce.isLeapYear=EN,ce.weekYear=ex,ce.isoWeekYear=tx,ce.quarter=ce.quarters=ix,ce.month=Uf,ce.daysInMonth=ON,ce.week=ce.weeks=KN,ce.isoWeek=ce.isoWeeks=HN,ce.weeksInYear=ox,ce.weeksInWeekYear=ax,ce.isoWeeksInYear=nx,ce.isoWeeksInISOWeekYear=rx,ce.date=bh,ce.day=ce.days=tk,ce.weekday=nk,ce.isoWeekday=rk,ce.dayOfYear=lx,ce.hour=ce.hours=dk,ce.minute=ce.minutes=cx,ce.second=ce.seconds=dx,ce.millisecond=ce.milliseconds=vh,ce.utcOffset=Uk,ce.utc=jk,ce.local=qk,ce.parseZone=Jk,ce.hasAlignedHourOffset=Zk,ce.isDST=Xk,ce.isLocal=eI,ce.isUtcOffset=tI,ce.isUtc=sh,ce.isUTC=sh,ce.zoneAbbr=ux,ce.zoneName=mx,ce.dates=O("dates accessor is deprecated. Use date instead.",bh),ce.months=O("months accessor is deprecated. Use month instead",Uf),ce.years=O("years accessor is deprecated. Use year instead",Kf),ce.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zk),ce.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Qk);function fx(i){return Ye(i*1e3)}function hx(){return Ye.apply(null,arguments).parseZone()}function yh(i){return i}var Pe=te.prototype;Pe.calendar=oe,Pe.longDateFormat=le,Pe.invalidDate=Ne,Pe.ordinal=lt,Pe.preparse=yh,Pe.postformat=yh,Pe.relativeTime=ct,Pe.pastFuture=Pt,Pe.set=J,Pe.eras=KI,Pe.erasParse=HI,Pe.erasConvertYear=WI,Pe.erasAbbrRegex=qI,Pe.erasNameRegex=jI,Pe.erasNarrowRegex=JI,Pe.months=xN,Pe.monthsShort=MN,Pe.monthsParse=LN,Pe.monthsRegex=RN,Pe.monthsShortRegex=PN,Pe.week=AN,Pe.firstDayOfYear=$N,Pe.firstDayOfWeek=VN,Pe.weekdays=JN,Pe.weekdaysMin=XN,Pe.weekdaysShort=ZN,Pe.weekdaysParse=ek,Pe.weekdaysRegex=ok,Pe.weekdaysShortRegex=ak,Pe.weekdaysMinRegex=sk,Pe.isPM=lk,Pe.meridiem=pk;function Ma(i,d,g,b){var D=dn(),F=y().set(b,d);return D[g](F,i)}function Th(i,d,g){if(f(i)&&(d=i,i=void 0),i=i||"",d!=null)return Ma(i,d,g,"month");var b,D=[];for(b=0;b<12;b++)D[b]=Ma(i,b,g,"month");return D}function $l(i,d,g,b){typeof i=="boolean"?(f(d)&&(g=d,d=void 0),d=d||""):(d=i,g=d,i=!1,f(d)&&(g=d,d=void 0),d=d||"");var D=dn(),F=i?D._week.dow:0,X,he=[];if(g!=null)return Ma(d,(g+F)%7,b,"day");for(X=0;X<7;X++)he[X]=Ma(d,(X+F)%7,b,"day");return he}function Sx(i,d){return Th(i,d,"months")}function gx(i,d){return Th(i,d,"monthsShort")}function bx(i,d,g){return $l(i,d,g,"weekdays")}function vx(i,d,g){return $l(i,d,g,"weekdaysShort")}function yx(i,d,g){return $l(i,d,g,"weekdaysMin")}Ln("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var d=i%10,g=Ce(i%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return i+g}}),r.lang=O("moment.lang is deprecated. Use moment.locale instead.",Ln),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",dn);var pn=Math.abs;function Tx(){var i=this._data;return this._milliseconds=pn(this._milliseconds),this._days=pn(this._days),this._months=pn(this._months),i.milliseconds=pn(i.milliseconds),i.seconds=pn(i.seconds),i.minutes=pn(i.minutes),i.hours=pn(i.hours),i.months=pn(i.months),i.years=pn(i.years),this}function Eh(i,d,g,b){var D=Gt(d,g);return i._milliseconds+=b*D._milliseconds,i._days+=b*D._days,i._months+=b*D._months,i._bubble()}function Ex(i,d){return Eh(this,i,d,1)}function wx(i,d){return Eh(this,i,d,-1)}function wh(i){return i<0?Math.floor(i):Math.ceil(i)}function Cx(){var i=this._milliseconds,d=this._days,g=this._months,b=this._data,D,F,X,he,Ee;return i>=0&&d>=0&&g>=0||i<=0&&d<=0&&g<=0||(i+=wh(Kl(g)+d)*864e5,d=0,g=0),b.milliseconds=i%1e3,D=Bt(i/1e3),b.seconds=D%60,F=Bt(D/60),b.minutes=F%60,X=Bt(F/60),b.hours=X%24,d+=Bt(X/24),Ee=Bt(Ch(d)),g+=Ee,d-=wh(Kl(Ee)),he=Bt(g/12),g%=12,b.days=d,b.months=g,b.years=he,this}function Ch(i){return i*4800/146097}function Kl(i){return i*146097/4800}function Dx(i){if(!this.isValid())return NaN;var d,g,b=this._milliseconds;if(i=fe(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,g=this._months+Ch(d),i){case"month":return g;case"quarter":return g/3;case"year":return g/12}else switch(d=this._days+Math.round(Kl(this._months)),i){case"week":return d/7+b/6048e5;case"day":return d+b/864e5;case"hour":return d*24+b/36e5;case"minute":return d*1440+b/6e4;case"second":return d*86400+b/1e3;case"millisecond":return Math.floor(d*864e5)+b;default:throw new Error("Unknown unit "+i)}}function un(i){return function(){return this.as(i)}}var Dh=un("ms"),Nx=un("s"),kx=un("m"),Ix=un("h"),xx=un("d"),Mx=un("w"),_x=un("M"),Lx=un("Q"),Ox=un("y"),Px=Dh;function Rx(){return Gt(this)}function Bx(i){return i=fe(i),this.isValid()?this[i+"s"]():NaN}function nr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Ax=nr("milliseconds"),Fx=nr("seconds"),Vx=nr("minutes"),$x=nr("hours"),Kx=nr("days"),Hx=nr("months"),Wx=nr("years");function Gx(){return Bt(this.days()/7)}var mn=Math.round,xr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Yx(i,d,g,b,D){return D.relativeTime(d||1,!!g,i,b)}function Ux(i,d,g,b){var D=Gt(i).abs(),F=mn(D.as("s")),X=mn(D.as("m")),he=mn(D.as("h")),Ee=mn(D.as("d")),De=mn(D.as("M")),gt=mn(D.as("w")),fn=mn(D.as("y")),Pn=F<=g.ss&&["s",F]||F<g.s&&["ss",F]||X<=1&&["m"]||X<g.m&&["mm",X]||he<=1&&["h"]||he<g.h&&["hh",he]||Ee<=1&&["d"]||Ee<g.d&&["dd",Ee];return g.w!=null&&(Pn=Pn||gt<=1&&["w"]||gt<g.w&&["ww",gt]),Pn=Pn||De<=1&&["M"]||De<g.M&&["MM",De]||fn<=1&&["y"]||["yy",fn],Pn[2]=d,Pn[3]=+i>0,Pn[4]=b,Yx.apply(null,Pn)}function zx(i){return i===void 0?mn:typeof i=="function"?(mn=i,!0):!1}function jx(i,d){return xr[i]===void 0?!1:d===void 0?xr[i]:(xr[i]=d,i==="s"&&(xr.ss=d-1),!0)}function qx(i,d){if(!this.isValid())return this.localeData().invalidDate();var g=!1,b=xr,D,F;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(g=i),typeof d=="object"&&(b=Object.assign({},xr,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),D=this.localeData(),F=Ux(this,!g,b,D),g&&(F=D.pastFuture(+this,F)),D.postformat(F)}var Hl=Math.abs;function Mr(i){return(i>0)-(i<0)||+i}function _a(){if(!this.isValid())return this.localeData().invalidDate();var i=Hl(this._milliseconds)/1e3,d=Hl(this._days),g=Hl(this._months),b,D,F,X,he=this.asSeconds(),Ee,De,gt,fn;return he?(b=Bt(i/60),D=Bt(b/60),i%=60,b%=60,F=Bt(g/12),g%=12,X=i?i.toFixed(3).replace(/\.?0+$/,""):"",Ee=he<0?"-":"",De=Mr(this._months)!==Mr(he)?"-":"",gt=Mr(this._days)!==Mr(he)?"-":"",fn=Mr(this._milliseconds)!==Mr(he)?"-":"",Ee+"P"+(F?De+F+"Y":"")+(g?De+g+"M":"")+(d?gt+d+"D":"")+(D||b||i?"T":"")+(D?fn+D+"H":"")+(b?fn+b+"M":"")+(i?fn+X+"S":"")):"P0D"}var xe=Ca.prototype;xe.isValid=Hk,xe.abs=Tx,xe.add=Ex,xe.subtract=wx,xe.as=Dx,xe.asMilliseconds=Dh,xe.asSeconds=Nx,xe.asMinutes=kx,xe.asHours=Ix,xe.asDays=xx,xe.asWeeks=Mx,xe.asMonths=_x,xe.asQuarters=Lx,xe.asYears=Ox,xe.valueOf=Px,xe._bubble=Cx,xe.clone=Rx,xe.get=Bx,xe.milliseconds=Ax,xe.seconds=Fx,xe.minutes=Vx,xe.hours=$x,xe.days=Kx,xe.weeks=Gx,xe.months=Hx,xe.years=Wx,xe.humanize=qx,xe.toISOString=_a,xe.toString=_a,xe.toJSON=_a,xe.locale=ph,xe.localeData=mh,xe.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_a),xe.lang=uh,R("X",0,0,"unix"),R("x",0,0,"valueOf"),me("x",pt),me("X",va),Ke("X",function(i,d,g){g._d=new Date(parseFloat(i)*1e3)}),Ke("x",function(i,d,g){g._d=new Date(Ce(i))});//! moment.js
|
|
1978
1978
|
return r.version="2.30.1",a(Ye),r.fn=ce,r.min=Fk,r.max=Vk,r.now=$k,r.utc=y,r.unix=fx,r.months=Sx,r.isDate=u,r.locale=Ln,r.invalid=M,r.duration=Gt,r.isMoment=w,r.weekdays=bx,r.parseZone=hx,r.localeData=dn,r.isDuration=Da,r.monthsShort=gx,r.weekdaysMin=yx,r.defineLocale=xl,r.updateLocale=hk,r.locales=Sk,r.weekdaysShort=vx,r.normalizeUnits=fe,r.relativeTimeRounding=zx,r.relativeTimeThreshold=jx,r.calendarFormat=pI,r.prototype=ce,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})}(hi)),hi.exports}(function(e,t){(function(n,r){r(typeof Zt=="function"?tn():n.moment)})(Ut,function(n){//! moment.js locale configuration
|
|
1979
1979
|
var r=n.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var s=a%10,l=~~(a%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return a+l},week:{dow:0,doy:4}});return r})})(),function(e,t){(function(n,r){r(typeof Zt=="function"?tn():n.moment)})(Ut,function(n){//! moment.js locale configuration
|
|
1980
1980
|
var r=n.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var s=a%10,l=~~(a%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return a+l}});return r})}(),function(e,t){(function(n,r){r(typeof Zt=="function"?tn():n.moment)})(Ut,function(n){//! moment.js locale configuration
|
|
@@ -3176,7 +3176,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
3176
3176
|
calc(100% - ${p}px) 0,
|
|
3177
3177
|
${c}px ${-a}px,
|
|
3178
3178
|
calc(100% - ${p+r}px) ${-a}px`}else e.current.style.backgroundPosition=`0 0, 100% 0, 0 ${-a}px,
|
|
3179
|
-
calc(100% - ${r}px) ${-a}px`};return e.current&&(t(),e.current.addEventListener("scroll",t),window.addEventListener("scroll",t)),()=>{e.current&&e.current.removeEventListener("scroll",t),window.removeEventListener("scroll",t)}})},iw=(e,t,n)=>{o.useLayoutEffect(()=>{const r=e.current;if(!r)return;const a=r==null?void 0:r.querySelector("thead"),s=r==null?void 0:r.querySelector("table"),l=s==null?void 0:s.querySelector("tbody>tr"),c=l==null?void 0:l.querySelectorAll("td"),p=(a==null?void 0:a.querySelectorAll("th"))||[],m=document.body.querySelector(".sps-navbar-container");let f=r==null?void 0:r.querySelector(".placeholder-head"),u;const h=()=>{a&&(a.style.position=t?"sticky":"",a.style.top=t?"0":"",a.style.overflow="",a.style.maxWidth="",a.style.width="",a.style.minWidth=""),f&&(f.style.width="",f.style.height=""),c&&Array.from(c).forEach((C,E)=>{const N=p[E];if(N){const M=N.getAttribute("data-resizekey"),I=M&&n?n[M]:void 0;if(I){const k=`${I}px`;N.style.minWidth=k,N.style.maxWidth=k,N.style.width=k,C.style.minWidth=k,C.style.maxWidth=k,C.style.width=k}else N.style.minWidth="",N.style.width="",N.style.maxWidth="",C.style.minWidth="",C.style.width="",C.style.maxWidth=""}else C.style.minWidth="",C.style.width="",C.style.maxWidth=""})},S=()=>{a&&r&&(a.scrollLeft=r.scrollLeft)},y=()=>{let C=null;u===window?C=m?m.getBoundingClientRect().height:0:u instanceof HTMLElement&&(C=u.getBoundingClientRect().top);const E=r.scrollLeft,N=a==null?void 0:a.getBoundingClientRect(),M=r.getBoundingClientRect();if(C&&N&&N.top<=C&&C<=M.bottom-N.height&&M.top<=C){if(c&&Array.from(c).forEach((I,k)=>{const V=I.getBoundingClientRect().width,A=p[k].getBoundingClientRect().width,w=`${Math.max(V,A)}px`;p[k].style.minWidth=w,p[k].style.width=w,p[k].style.maxWidth=w,I.style.minWidth=w,I.style.width=w,I.style.maxWidth=w}),a&&e.current){a.style.position="fixed",a.style.top=`${C}px`,a.style.overflow="hidden";const I=e.current.offsetWidth-e.current.clientWidth,k=`${M.width-I}px`;a.style.maxWidth=k,a.style.width=k,a.style.minWidth=k}f||(f=document.createElement("div"),f.style.width=`${N.width}px`,f.style.height=`${N.height}px`,f.className="placeholder-head",r.insertBefore(f,s))}else f&&(r.removeChild(f),f=null,h());r.scrollLeft=E,S()},T=()=>{h(),y(),S()};return a&&a.classList.contains("sps-table__head--pinned")&&(u=mc(r)||window,u.addEventListener("scroll",y),window.addEventListener("resize",T),r.addEventListener("scroll",S),T()),()=>{u&&(u.removeEventListener("scroll",y),window.removeEventListener("resize",T)),r.removeEventListener("scroll",S)}})},lw=(e,t)=>{const n=()=>{if(!e.current||!t)return;const r=e.current,a=r==null?void 0:r.querySelector("table > thead"),s=r==null?void 0:r.querySelector("table"),l=r==null?void 0:r.querySelector(".shadow--top"),c=r==null?void 0:r.querySelector(".shadow--bottom");if(a&&s&&l&&c){c.style.left="0",c.style.bottom="0",l.style.left="0";const p=r.offsetHeight-(r==null?void 0:r.clientHeight),m=s.getBoundingClientRect().height,f=a.getBoundingClientRect().height,u=r.scrollTop,h=m+p-r.getBoundingClientRect().height-r.scrollTop,S=r.scrollLeft;c.style.bottom=`${-u}px`,c.style.left=`${S}px`,c.style.opacity=h>0?"1":"0",l.style.top=`${u+f}px`,l.style.left=`${S}px`,l.style.opacity=u>0?"1":"0"}};o.useLayoutEffect(()=>{if(e.current&&t){const r=e.current.querySelector("table > thead");return r&&(r.style.position="sticky",r.style.top="0",r.style.zIndex="2",r.style.backgroundColor="#fff"),e.current.addEventListener("scroll",n),()=>{var a;(a=e.current)==null||a.removeEventListener("scroll",n)}}},[]),o.useLayoutEffect(()=>{e.current&&t&&n()})},cw={sort:"SortedColumn",onSortChange:"SortChangeHandler",selectable:"boolean",maxHeightPx:"number",maxHeightRem:"number",resizeable:"boolean",resizeState:"ResizeState",onResizeStateChange:"ResizeStateChangeHandler"};function jn({children:e,className:t,onSortChange:n,sort:r,"data-testid":a,unsafelyReplaceClassName:s,maxHeightPx:l,maxHeightRem:c,resizeable:p,resizeState:m,onResizeStateChange:f,...u}){const h=Y(s||"sps-table-container",t),S=l?l/16:c,y=S?{maxHeight:`${S}rem`}:{},T=o.useRef(null);return lw(T,S),sw(T),iw(T,S,m),o.createElement(aw,{resizeable:p,resizeState:m,onResizeStateChange:f,sort:r,onSortChange:n},o.createElement("div",{ref:T,className:h,style:y},o.createElement("div",{className:"sps-table__shadow shadow--top"}),o.createElement("div",{className:"sps-table__shadow shadow--bottom"}),o.createElement("table",{className:"sps-table",role:"table","data-testid":`${a}`,...u},e)))}Object.assign(jn,{props:cw,displayName:"SpsTable"});function Eu(e){if(!e||!e.parentElement)return null;let t=e.parentElement;for(;t;){if(t.tagName.toLowerCase()==="table")return t;t=t.parentElement}return null}const wu=({tableHeaderRef:e,resizerRef:t,resizeKey:n})=>{const{resizeable:r,resizeState:a,setSingleResizeState:s}=o.useContext(ta),l=!!r&&!!n,c=l?a==null?void 0:a[n]:0;return o.useLayoutEffect(()=>{var V,A;let p,m=c,f=0;const u=Eu(e.current),h=(V=e.current)==null?void 0:V.querySelector(".sps-table__column-resizer"),S=(A=e.current)==null?void 0:A.querySelector(".sps-table__column-resizer-guide");function y(){if(e.current&&p&&(h&&(h.style.backgroundColor=Oa.colors.blue200),S&&u&&(S.style.height=`${u.getBoundingClientRect().height}px`,S.style.display="block"),u)){const w=u.querySelectorAll("thead > tr > th");for(let P=0;P<w.length;P+=1){const O=w[P].querySelector(".sps-table__column-resizer");w[P].style.cursor="col-resize",w[P]!==e.current&&O&&(w[P].classList.remove("sps-table__header--resizeable"),O.style.display="none")}}}function T(){e.current&&p&&h&&S&&(h.style.right=`${f}px`,S.style.right=`${f}px`)}function C(){if(e.current){const w=m?`${m}px`:"";e.current.style.width=w,e.current.style.maxWidth=w,e.current.style.minWidth=w;const P=e.current.querySelector(".sps-table__header-cell-body");if(P&&(P.style.overflow=w?"hidden":"",P.style.textOverflow=w?"ellipsis":""),h&&S&&(h.style.right="0",h.style.backgroundColor="",S.style.right="0",S.style.display="none"),e.current.classList.contains("sps-table__cell--pinned")||(e.current.style.position="relative"),u){const O=u.querySelectorAll("thead > tr > th");for(let $=0;$<O.length;$+=1){const z=O[$].querySelector(".sps-table__header-cell-body"),L=O[$].querySelector(".sps-table__column-resizer");O[$].style.cursor="default",O[$]!==e.current&&L&&(O[$].classList.add("sps-table__header--resizeable"),L.style.display="block"),z!=null&&z.textContent&&!z.title&&(z.title=z.textContent)}}}}const E=w=>{e.current&&(w.preventDefault(),p=w.clientX,m=e.current.clientWidth,y())},N=w=>{if(!p||!e.current)return;const P=Math.max(Math.min(p-w.clientX,40),-40);P!==0&&(p=w.clientX,f+=P,m=Math.max(m-P,40),T())},M=()=>{!e.current||!p||(p=0,f=0,C(),s(n,m))},I=()=>{m=0,C(),s(n,m)};let k=!1;return l&&t.current&&(t.current.addEventListener("dragstart",E),t.current.addEventListener("mousedown",E),t.current.addEventListener("dblclick",I),window.addEventListener("mousemove",N),window.addEventListener("dragend",M),window.addEventListener("mouseup",M),k=!0,C()),()=>{t.current&&k&&(t.current.removeEventListener("dragstart",E),t.current.removeEventListener("mousedown",E),t.current.removeEventListener("dblclick",I)),k&&(window.removeEventListener("mousemove",N),window.removeEventListener("dragend",M),window.removeEventListener("mouseup",M))}},[l,c,n,s]),{isResizeable:l}},Cu=e=>{const{resizeable:t,resizeState:n}=o.useContext(ta);o.useLayoutEffect(()=>{if(!t||!n||!e.current)return;const r=Eu(e.current);if(!r)return;const a=r.querySelector(`thead > tr > th:nth-of-type(${e.current.cellIndex+1})`);if(!a)return;const s=a.getAttribute("data-resizekey");if(!s)return;const l=n[s],c=l?`${l}px`:"";e.current.style.width=c,e.current.style.maxWidth=c,e.current.style.minWidth=c,e.current.style.overflowWrap=c?"break-word":"",e.current.style.whiteSpace=c?"normal":"",e.current.title||(e.current.title=e.current.textContent||"")})},Du={controlCell:"boolean",sortKey:"string",resizeKey:"string",pinned:"boolean"};function rt({children:e,className:t,controlCell:n,sortKey:r,resizeKey:a="","data-testid":s,unsafelyReplaceClassName:l,pinned:c=!1,...p}){const{sort:m,setSort:f}=o.useContext(ta),u=m==null?void 0:m.find(N=>N.key===r),h=()=>{if(r&&!n){const N=(u==null?void 0:u.direction)===G.SortDirection.ASCENDING?G.SortDirection.DESCENDING:G.SortDirection.ASCENDING;f([{key:r,direction:N}])}},S=N=>{(N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),h())},y=o.useRef(null);Tu(c,y);const T=o.useRef(null),{isResizeable:C}=wu({tableHeaderRef:y,resizerRef:T,resizeKey:a}),E=Y(l||"sps-table__header",n&&"sps-table__header--control",!r&&"sps-table__header--sort-disabled",(u==null?void 0:u.direction)===G.SortDirection.ASCENDING&&"sps-table__header--sorted-asc",(u==null?void 0:u.direction)===G.SortDirection.DESCENDING&&"sps-table__header--sorted-desc",c&&"sps-table__cell--pinned",C&&"sps-table__header--resizeable",t);return o.createElement("th",{className:E,ref:y,role:"columnheader","aria-sort":(u==null?void 0:u.direction)||"none","data-testid":`${s}__header`,"data-resizekey":a||void 0,...p},o.createElement("span",{className:"sps-table__header-cell-body","data-testid":`${s}__header-cell-body`,onClick:h,tabIndex:r?0:void 0,onKeyDown:S},e),C&&o.createElement(o.Fragment,null,o.createElement("span",{ref:T,className:Y("sps-table__column-resizer")}),o.createElement("span",{className:Y("sps-table__column-resizer-guide")})))}Object.assign(rt,{props:Du,displayName:"SpsTableHeader"});function Nu(e){return o.createElement(rt,{...e})}Object.assign(Nu,{props:Du,displayName:"SpsTh"});const ku={pinned:"boolean"};function wn({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,pinned:a,...s}){const l=Y(r||"sps-table__head",a&&"sps-table__head--pinned",t);return o.createElement("thead",{className:l,"data-testid":`${n}__head`,...s},e)}Object.assign(wn,{props:ku,displayName:"SpsTableHead"});function Iu(e){return o.createElement(wn,{...e})}Object.assign(Iu,{props:ku,displayName:"SpsThead"});const xu={};function Ge({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,...a}){const s=Y(r||"sps-table__row",t);return o.createElement("tr",{className:s,role:"row","data-testid":`${n}__row`,...a},e)}Object.assign(Ge,{props:xu,displayName:"SpsTableRow"});function Mu(e){return o.createElement(Ge,{...e})}Object.assign(Mu,{props:xu,displayName:"SpsTr"});const _u={};function Cn(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=Y(a||"sps-table__body",n);return o.createElement("tbody",{className:l,"data-testid":`${r}__body`,...s},t)}Object.assign(Cn,{props:_u,displayName:"SpsTableBody"});function Lu(e){return o.createElement(Cn,{...e})}Object.assign(Lu,{props:_u,displayName:"SpsTbody"});const Ou={buttonCell:"boolean",controlCell:"boolean",wrap:"SpsTableCellWrapWidth",pinned:"boolean"};function pe(e){const{buttonCell:t,children:n,className:r,controlCell:a,"data-testid":s,unsafelyReplaceClassName:l,wrap:c,pinned:p=!1,...m}=e,f=Y(l||"sps-table__cell",t&&"sps-table__cell--button-cell",a&&"sps-table__cell--control",c&&`sps-table__cell--text-wrap-${c}`,p&&"sps-table__cell--pinned",r),u=o.useRef(null);return Tu(p,u),Cu(u),o.createElement("td",{className:f,ref:u,role:"cell","data-testid":`${s}__cell`,...m},n)}Object.assign(pe,{props:Ou,displayName:"SpsTableCell"});function Pu(e){return o.createElement(pe,{...e})}Object.assign(Pu,{props:Ou,displayName:"SpsTd"});const dw={};function Ru(e){const{children:t,className:n,unsafelyReplaceClassName:r,...a}=e,[s,l,c]=It(t,[{type:Ue,props:{kind:G.ButtonKind.LINK}},[{type:Ue,props:{kind:G.ButtonKind.ICON}},{type:zn}]]),p=s.length>0&&(l.length>0||c.length>0),m=l.length>0&&c.length>0,f=Y(r||"sps-button-group",n);return o.createElement("div",{className:f,...a},s.length>0&&s,p&&o.createElement("div",{className:"sps-vertical-rule"}),l.length>0&&l,m&&o.createElement("div",{className:"sps-vertical-rule"}),c.length>0&&c)}Object.assign(Ru,{props:dw,displayName:"SpsButtonGroup"});const pw={basic:{label:"Basic Buttons",description:({NavigateTo:e})=>o.createElement("span",{className:"sps-body-14 mt-4"},"The most common type of button that can be used in most cases. Example: Basic Buttons in a"," ",o.createElement(e,{to:"Modal"},"Modal"),"."),examples:{basic:{description:"Without Icons",imports:v.code`
|
|
3179
|
+
calc(100% - ${r}px) ${-a}px`};return e.current&&(t(),e.current.addEventListener("scroll",t),window.addEventListener("scroll",t)),()=>{e.current&&e.current.removeEventListener("scroll",t),window.removeEventListener("scroll",t)}})},iw=(e,t,n)=>{o.useLayoutEffect(()=>{const r=e.current;if(!r)return;const a=r==null?void 0:r.querySelector("thead"),s=r==null?void 0:r.querySelector("table"),l=s==null?void 0:s.querySelector("tbody>tr"),c=l==null?void 0:l.querySelectorAll("td"),p=(a==null?void 0:a.querySelectorAll("th"))||[],m=document.body.querySelector(".sps-navbar-container");let f=r==null?void 0:r.querySelector(".placeholder-head"),u;const h=()=>{a&&(a.style.position=t?"sticky":"",a.style.top=t?"0":"",a.style.overflow="",a.style.maxWidth="",a.style.width="",a.style.minWidth=""),f&&(f.style.width="",f.style.height=""),c&&Array.from(c).forEach((C,E)=>{const N=p[E];if(N){const M=N.getAttribute("data-resizekey"),I=M&&n?n[M]:void 0;if(I){const k=`${I}px`;N.style.minWidth=k,N.style.maxWidth=k,N.style.width=k,C.style.minWidth=k,C.style.maxWidth=k,C.style.width=k}else N.style.minWidth="",N.style.width="",N.style.maxWidth="",C.style.minWidth="",C.style.width="",C.style.maxWidth=""}else C.style.minWidth="",C.style.width="",C.style.maxWidth=""})},S=()=>{a&&r&&(a.scrollLeft=r.scrollLeft)},y=()=>{let C=null;u===window?C=m?m.getBoundingClientRect().height:0:u instanceof HTMLElement&&(C=u.getBoundingClientRect().top);const E=r.scrollLeft,N=a==null?void 0:a.getBoundingClientRect(),M=r.getBoundingClientRect();if(C&&N&&N.top<=C&&C<=M.bottom-N.height&&M.top<=C){if(c&&Array.from(c).forEach((I,k)=>{const V=I.getBoundingClientRect().width,A=p[k].getBoundingClientRect().width,w=`${Math.max(V,A)}px`;p[k].style.minWidth=w,p[k].style.width=w,p[k].style.maxWidth=w,I.style.minWidth=w,I.style.width=w,I.style.maxWidth=w}),a&&e.current){a.style.position="fixed",a.style.top=`${C}px`,a.style.overflow="hidden";const I=e.current.offsetWidth-e.current.clientWidth,k=`${M.width-I}px`;a.style.maxWidth=k,a.style.width=k,a.style.minWidth=k}f||(f=document.createElement("div"),f.style.width=`${N.width}px`,f.style.height=`${N.height}px`,f.className="placeholder-head",r.insertBefore(f,s))}else f&&(r.removeChild(f),f=null,h());r.scrollLeft=E,S()},T=()=>{h(),y(),S()};return a&&a.classList.contains("sps-table__head--pinned")&&(u=mc(r)||window,u.addEventListener("scroll",y),window.addEventListener("resize",T),r.addEventListener("scroll",S),T()),()=>{u&&(u.removeEventListener("scroll",y),window.removeEventListener("resize",T)),r.removeEventListener("scroll",S)}})},lw=(e,t)=>{const n=()=>{if(!e.current||!t)return;const r=e.current,a=r==null?void 0:r.querySelector("table > thead"),s=r==null?void 0:r.querySelector("table"),l=r==null?void 0:r.querySelector(".shadow--top"),c=r==null?void 0:r.querySelector(".shadow--bottom");if(a&&s&&l&&c){c.style.left="0",c.style.bottom="0",l.style.left="0";const p=r.offsetHeight-(r==null?void 0:r.clientHeight),m=s.getBoundingClientRect().height,f=a.getBoundingClientRect().height,u=r.scrollTop,h=m+p-r.getBoundingClientRect().height-r.scrollTop,S=r.scrollLeft;c.style.bottom=`${-u}px`,c.style.left=`${S}px`,c.style.opacity=h>0?"1":"0",l.style.top=`${u+f}px`,l.style.left=`${S}px`,l.style.opacity=u>0?"1":"0"}};o.useLayoutEffect(()=>{if(e.current&&t){const r=e.current.querySelector("table > thead");return r&&(r.style.position="sticky",r.style.top="0",r.style.zIndex="2",r.style.backgroundColor="#fff"),e.current.addEventListener("scroll",n),()=>{var a;(a=e.current)==null||a.removeEventListener("scroll",n)}}},[]),o.useLayoutEffect(()=>{e.current&&t&&n()})},cw={sort:"SortedColumn",onSortChange:"SortChangeHandler",selectable:"boolean",maxHeightPx:"number",maxHeightRem:"number",resizeable:"boolean",resizeState:"ResizeState",onResizeStateChange:"ResizeStateChangeHandler"};function jn({children:e,className:t,onSortChange:n,sort:r,"data-testid":a,unsafelyReplaceClassName:s,maxHeightPx:l,maxHeightRem:c,resizeable:p,resizeState:m,onResizeStateChange:f,...u}){const h=Y(s||"sps-table-container",t),S=l?l/16:c,y=S?{maxHeight:`${S}rem`}:{},T=o.useRef(null);return lw(T,S),sw(T),iw(T,S,m),o.createElement(aw,{resizeable:p,resizeState:m,onResizeStateChange:f,sort:r,onSortChange:n},o.createElement("div",{ref:T,className:h,style:y},o.createElement("div",{className:"sps-table__shadow shadow--top"}),o.createElement("div",{className:"sps-table__shadow shadow--bottom"}),o.createElement("table",{className:"sps-table",role:"table","data-testid":`${a}`,...u},e)))}Object.assign(jn,{props:cw,displayName:"SpsTable"});function Eu(e){if(!e||!e.parentElement)return null;let t=e.parentElement;for(;t;){if(t.tagName.toLowerCase()==="table")return t;t=t.parentElement}return null}const wu=({tableHeaderRef:e,resizerRef:t,resizeKey:n})=>{const{resizeable:r,resizeState:a,setSingleResizeState:s}=o.useContext(ta),l=!!r&&!!n,c=l?a==null?void 0:a[n]:0;return o.useLayoutEffect(()=>{var V,A;let p,m=c,f=0;const u=Eu(e.current),h=(V=e.current)==null?void 0:V.querySelector(".sps-table__column-resizer"),S=(A=e.current)==null?void 0:A.querySelector(".sps-table__column-resizer-guide");function y(){if(e.current&&p&&(h&&(h.style.backgroundColor=Oa.colors.blue200),S&&u&&(S.style.height=`${u.getBoundingClientRect().height}px`,S.style.display="block"),u)){const w=u.querySelectorAll("thead > tr > th");for(let P=0;P<w.length;P+=1){const O=w[P].querySelector(".sps-table__column-resizer");w[P].style.cursor="col-resize",w[P]!==e.current&&O&&(w[P].classList.remove("sps-table__header--resizeable"),O.style.display="none")}}}function T(){e.current&&p&&h&&S&&(h.style.right=`${f}px`,S.style.right=`${f}px`)}function C(){if(e.current){const w=m?`${m}px`:"";e.current.style.width=w,e.current.style.maxWidth=w,e.current.style.minWidth=w;const P=e.current.querySelector(".sps-table__header-cell-body");if(P&&(P.style.overflow=w?"hidden":"",P.style.textOverflow=w?"ellipsis":""),h&&S&&(h.style.right="0",h.style.backgroundColor="",S.style.right="0",S.style.display="none"),e.current.classList.contains("sps-table__cell--pinned")||(e.current.style.position="relative"),u){const O=u.querySelectorAll("thead > tr > th");for(let $=0;$<O.length;$+=1){const z=O[$].querySelector(".sps-table__header-cell-body"),L=O[$].querySelector(".sps-table__column-resizer");O[$].style.cursor="default",O[$]!==e.current&&L&&(O[$].classList.add("sps-table__header--resizeable"),L.style.display="block"),z!=null&&z.textContent&&!z.title&&(z.title=z.textContent)}}}}const E=w=>{e.current&&(w.preventDefault(),p=w.clientX,m=e.current.clientWidth,y())},N=w=>{if(!p||!e.current)return;const P=Math.max(Math.min(p-w.clientX,40),-40);P!==0&&(p=w.clientX,f+=P,m=Math.max(m-P,40),T())},M=()=>{!e.current||!p||(p=0,f=0,C(),s(n,m))},I=()=>{m=0,C(),s(n,m)};let k=!1;return l&&t.current&&(t.current.addEventListener("dragstart",E),t.current.addEventListener("mousedown",E),t.current.addEventListener("dblclick",I),window.addEventListener("mousemove",N),window.addEventListener("dragend",M),window.addEventListener("mouseup",M),k=!0,C()),()=>{t.current&&k&&(t.current.removeEventListener("dragstart",E),t.current.removeEventListener("mousedown",E),t.current.removeEventListener("dblclick",I)),k&&(window.removeEventListener("mousemove",N),window.removeEventListener("dragend",M),window.removeEventListener("mouseup",M))}},[l,c,n,s]),{isResizeable:l}},Cu=e=>{const{resizeable:t,resizeState:n}=o.useContext(ta);o.useLayoutEffect(()=>{if(!t||!n||!e.current)return;const r=Eu(e.current);if(!r)return;const a=r.querySelector(`thead > tr > th:nth-of-type(${e.current.cellIndex+1})`);if(!a)return;const s=a.getAttribute("data-resizekey");if(!s)return;const l=n[s],c=l?`${l}px`:"";e.current.style.width=c,e.current.style.maxWidth=c,e.current.style.minWidth=c,e.current.style.overflowWrap=c?"break-word":"",e.current.style.whiteSpace=c?"normal":"",e.current.title||(e.current.title=e.current.textContent||"")})},Du={controlCell:"boolean",sortKey:"string",resizeKey:"string",pinned:"boolean"};function ot({children:e,className:t,controlCell:n,sortKey:r,resizeKey:a="","data-testid":s,unsafelyReplaceClassName:l,pinned:c=!1,...p}){const{sort:m,setSort:f}=o.useContext(ta),u=m==null?void 0:m.find(N=>N.key===r),h=()=>{if(r&&!n){const N=(u==null?void 0:u.direction)===G.SortDirection.ASCENDING?G.SortDirection.DESCENDING:G.SortDirection.ASCENDING;f([{key:r,direction:N}])}},S=N=>{(N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),h())},y=o.useRef(null);Tu(c,y);const T=o.useRef(null),{isResizeable:C}=wu({tableHeaderRef:y,resizerRef:T,resizeKey:a}),E=Y(l||"sps-table__header",n&&"sps-table__header--control",!r&&"sps-table__header--sort-disabled",(u==null?void 0:u.direction)===G.SortDirection.ASCENDING&&"sps-table__header--sorted-asc",(u==null?void 0:u.direction)===G.SortDirection.DESCENDING&&"sps-table__header--sorted-desc",c&&"sps-table__cell--pinned",C&&"sps-table__header--resizeable",t);return o.createElement("th",{className:E,ref:y,role:"columnheader","aria-sort":(u==null?void 0:u.direction)||"none","data-testid":`${s}__header`,"data-resizekey":a||void 0,...p},o.createElement("span",{className:"sps-table__header-cell-body","data-testid":`${s}__header-cell-body`,onClick:h,tabIndex:r?0:void 0,onKeyDown:S},e),C&&o.createElement(o.Fragment,null,o.createElement("span",{ref:T,className:Y("sps-table__column-resizer")}),o.createElement("span",{className:Y("sps-table__column-resizer-guide")})))}Object.assign(ot,{props:Du,displayName:"SpsTableHeader"});function Nu(e){return o.createElement(ot,{...e})}Object.assign(Nu,{props:Du,displayName:"SpsTh"});const ku={pinned:"boolean"};function wn({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,pinned:a,...s}){const l=Y(r||"sps-table__head",a&&"sps-table__head--pinned",t);return o.createElement("thead",{className:l,"data-testid":`${n}__head`,...s},e)}Object.assign(wn,{props:ku,displayName:"SpsTableHead"});function Iu(e){return o.createElement(wn,{...e})}Object.assign(Iu,{props:ku,displayName:"SpsThead"});const xu={};function Ge({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,...a}){const s=Y(r||"sps-table__row",t);return o.createElement("tr",{className:s,role:"row","data-testid":`${n}__row`,...a},e)}Object.assign(Ge,{props:xu,displayName:"SpsTableRow"});function Mu(e){return o.createElement(Ge,{...e})}Object.assign(Mu,{props:xu,displayName:"SpsTr"});const _u={};function Cn(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=Y(a||"sps-table__body",n);return o.createElement("tbody",{className:l,"data-testid":`${r}__body`,...s},t)}Object.assign(Cn,{props:_u,displayName:"SpsTableBody"});function Lu(e){return o.createElement(Cn,{...e})}Object.assign(Lu,{props:_u,displayName:"SpsTbody"});const Ou={buttonCell:"boolean",controlCell:"boolean",wrap:"SpsTableCellWrapWidth",pinned:"boolean"};function pe(e){const{buttonCell:t,children:n,className:r,controlCell:a,"data-testid":s,unsafelyReplaceClassName:l,wrap:c,pinned:p=!1,...m}=e,f=Y(l||"sps-table__cell",t&&"sps-table__cell--button-cell",a&&"sps-table__cell--control",c&&`sps-table__cell--text-wrap-${c}`,p&&"sps-table__cell--pinned",r),u=o.useRef(null);return Tu(p,u),Cu(u),o.createElement("td",{className:f,ref:u,role:"cell","data-testid":`${s}__cell`,...m},n)}Object.assign(pe,{props:Ou,displayName:"SpsTableCell"});function Pu(e){return o.createElement(pe,{...e})}Object.assign(Pu,{props:Ou,displayName:"SpsTd"});const dw={};function Ru(e){const{children:t,className:n,unsafelyReplaceClassName:r,...a}=e,[s,l,c]=It(t,[{type:Ue,props:{kind:G.ButtonKind.LINK}},[{type:Ue,props:{kind:G.ButtonKind.ICON}},{type:zn}]]),p=s.length>0&&(l.length>0||c.length>0),m=l.length>0&&c.length>0,f=Y(r||"sps-button-group",n);return o.createElement("div",{className:f,...a},s.length>0&&s,p&&o.createElement("div",{className:"sps-vertical-rule"}),l.length>0&&l,m&&o.createElement("div",{className:"sps-vertical-rule"}),c.length>0&&c)}Object.assign(Ru,{props:dw,displayName:"SpsButtonGroup"});const pw={basic:{label:"Basic Buttons",description:({NavigateTo:e})=>o.createElement("span",{className:"sps-body-14 mt-4"},"The most common type of button that can be used in most cases. Example: Basic Buttons in a"," ",o.createElement(e,{to:"Modal"},"Modal"),"."),examples:{basic:{description:"Without Icons",imports:v.code`
|
|
3180
3180
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
3181
3181
|
import { ButtonKind } from "@spscommerce/ds-shared";
|
|
3182
3182
|
`,jsx:v.code`
|
|
@@ -4892,7 +4892,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
4892
4892
|
</>
|
|
4893
4893
|
)
|
|
4894
4894
|
}
|
|
4895
|
-
`}}}},Fu={general:{label:"General Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("p",null,"The Action Bar is divided into three sections: Selection Counter, Action Buttons, and Clear Button. It spans the entire width of the browser window. The count in the Selection Counter persists across paginated views"),o.createElement("p",null,"For more information on acceptable content varieties in the Action Buttons section, refer to the Button Groups section on the"," ",o.createElement(e,{to:"button"},"Buttons")," page"),o.createElement("img",{src:"assets/images/list-action-bar-example.svg",alt:"A List Action Bar with labels on each section",className:"w-100 mb-3"}),o.createElement(jn,null,o.createElement(wn,null,o.createElement(
|
|
4895
|
+
`}}}},Fu={general:{label:"General Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("p",null,"The Action Bar is divided into three sections: Selection Counter, Action Buttons, and Clear Button. It spans the entire width of the browser window. The count in the Selection Counter persists across paginated views"),o.createElement("p",null,"For more information on acceptable content varieties in the Action Buttons section, refer to the Button Groups section on the"," ",o.createElement(e,{to:"button"},"Buttons")," page"),o.createElement("img",{src:"assets/images/list-action-bar-example.svg",alt:"A List Action Bar with labels on each section",className:"w-100 mb-3"}),o.createElement(jn,null,o.createElement(wn,null,o.createElement(ot,null,"Order"),o.createElement(ot,null,"Section"),o.createElement(ot,null,"Content Varieties")),o.createElement(Cn,null,o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"1")),o.createElement(pe,null,"Selection Counter"),o.createElement(pe,null)),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"2")),o.createElement(pe,null,"Action Buttons"),o.createElement(pe,null)),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"3")),o.createElement(pe,null,"Clear Button"),o.createElement(pe,null,o.createElement(Ft,{className:"mr-1"},"Basic Buttons"),o.createElement(Ft,{className:"mr-1"},"Icon Buttons"),o.createElement(Ft,{className:"mr-1"},"Text Buttons"))))))}},hw={kind:"FeedbackBlockKind",message:{type:"string",required:!0}};function Ei(e){const{className:t,kind:n=G.FeedbackBlockKind.INFO,message:r,"data-testid":a,unsafelyReplaceClassName:s,...l}=e,c=Y(s||"sps-micro-block",`sps-micro-block--${n}`,t);return o.createElement("div",{className:c,"data-testid":a,...l},o.createElement("i",{className:`sps-icon sps-icon-${G.FeedbackBlockIcons[n]}`,"aria-hidden":"true","data-testid":`${a}__icon`}),o.createElement("span",null,r))}Object.assign(Ei,{props:hw,displayName:"SpsMicroBlock"});const Vu={infoBlock:{label:"Info Micro Block",examples:{infoBlock:{imports:v.code`
|
|
4896
4896
|
import { SpsMicroBlock } from "@spscommerce/ds-react";
|
|
4897
4897
|
import { FeedbackBlockKind } from "@spscommerce/ds-shared";
|
|
4898
4898
|
`,jsx:v.code`
|
|
@@ -5387,7 +5387,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
5387
5387
|
</>
|
|
5388
5388
|
);
|
|
5389
5389
|
}
|
|
5390
|
-
`}}}},bw={captionKey:"string",clearSearchOnBlur:"boolean",clearSearchOnEnter:"boolean",debounce:"number",disabled:"boolean",disableSelected:"boolean",comparisonKey:"string",formMeta:"SpsFormFieldMeta<any[]>",hideSelected:"boolean",icon:"SpsIcon",onChange:"ChangeEventHandler",onSearchChange:"(searchText: string) => void",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",placeholder:"string",tallOptionList:"boolean",textKey:"string",value:"any",zeroState:"string",loading:"boolean",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function Di({action:e,captionKey:t,className:n,clearSearchOnBlur:r,clearSearchOnEnter:a,debounce:s,disabled:l,disableSelected:c=!1,comparisonKey:p,formControl:m,formMeta:f,hideSelected:u,id:h,onChange:S,onSearchChange:y,options:T,placeholder:C,tallOptionList:E,textKey:N,unsafelyReplaceClassName:M,value:I,zeroState:k="There are no matching options.",loading:V,filterByTextAndCaptionKey:A,icon:w,maxHeightOptionListPx:P,maxHeightOptionListRem:O,disableOptionsMemoization:$,"data-testid":z,...L}){const J=I??[],B=f||m,{wrapperId:te,controlId:H}=bt(h,B),[q,oe]=qt({keyDown:null,opensUpward:!1,searchText:"",activeTagIndex:null,optionIds:""});o.useEffect(()=>{y&&y(q.searchText)},[q.searchText]);const W=o.useRef(null),j=o.useRef(null),ne=o.useRef(null),re=o.useRef(null),U=o.useRef(null);function R(){r&&oe({searchText:""})}const{showPopup:Z,doShowPopup:ae,doHidePopup:ee}=dr(W,re,R);function de(){oe({activeTagIndex:null}),ae()}function ie(){setTimeout(()=>{var ve;(ve=ne.current)==null||ve.focus()},0)}function le(ve){if(U.current&&U.current.children.length&&typeof ve=="number"){const Le=U.current.children[ve],
|
|
5390
|
+
`}}}},bw={captionKey:"string",clearSearchOnBlur:"boolean",clearSearchOnEnter:"boolean",debounce:"number",disabled:"boolean",disableSelected:"boolean",comparisonKey:"string",formMeta:"SpsFormFieldMeta<any[]>",hideSelected:"boolean",icon:"SpsIcon",onChange:"ChangeEventHandler",onSearchChange:"(searchText: string) => void",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",placeholder:"string",tallOptionList:"boolean",textKey:"string",value:"any",zeroState:"string",loading:"boolean",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function Di({action:e,captionKey:t,className:n,clearSearchOnBlur:r,clearSearchOnEnter:a,debounce:s,disabled:l,disableSelected:c=!1,comparisonKey:p,formControl:m,formMeta:f,hideSelected:u,id:h,onChange:S,onSearchChange:y,options:T,placeholder:C,tallOptionList:E,textKey:N,unsafelyReplaceClassName:M,value:I,zeroState:k="There are no matching options.",loading:V,filterByTextAndCaptionKey:A,icon:w,maxHeightOptionListPx:P,maxHeightOptionListRem:O,disableOptionsMemoization:$,"data-testid":z,...L}){const J=I??[],B=f||m,{wrapperId:te,controlId:H}=bt(h,B),[q,oe]=qt({keyDown:null,opensUpward:!1,searchText:"",activeTagIndex:null,optionIds:""});o.useEffect(()=>{y&&y(q.searchText)},[q.searchText]);const W=o.useRef(null),j=o.useRef(null),ne=o.useRef(null),re=o.useRef(null),U=o.useRef(null);function R(){r&&oe({searchText:""})}const{showPopup:Z,doShowPopup:ae,doHidePopup:ee}=dr(W,re,R);function de(){oe({activeTagIndex:null}),ae()}function ie(){setTimeout(()=>{var ve;(ve=ne.current)==null||ve.focus()},0)}function le(ve){if(U.current&&U.current.children.length&&typeof ve=="number"){const Le=U.current.children[ve],Qe=Le==null?void 0:Le.querySelector(".sps-clickable-tag__icon");Qe&&Qe.focus()}}function se(ve){oe({searchText:""}),B&&(B.setValue(ve),B.markAsDirty()),S&&S(new gn({value:ve}))}function Ne(ve){J.indexOf(ve)===-1&&se([...J,ve]),ie()}function ke(ve){const Le=J.filter((Qe,we)=>we!==ve);se(Le)}function it(ve){oe({searchText:ve.target.value})}function lt(ve){var Le,Qe;if(!l){const we=!u&&!ve.target.selectionStart&&J&&J.length;switch(ve.key){case"Backspace":if(q.activeTagIndex===J.length-1){ke(q.activeTagIndex),ie();return}if(q.activeTagIndex!==null){ke(q.activeTagIndex);return}if(we){se(J.slice(0,J.length-1));return}break;case"Delete":if(q.activeTagIndex!==null){ke(q.activeTagIndex);return}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":ve.preventDefault();break;case"Left":case"ArrowLeft":if(we){q.activeTagIndex===null?(oe({activeTagIndex:J.length-1}),ee(),le(J.length-1)):q.activeTagIndex>0&&(oe({activeTagIndex:q.activeTagIndex-1}),ee(),le(q.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if(q.activeTagIndex!==null){q.activeTagIndex===J.length-1?(oe({activeTagIndex:null}),ae(),(Le=ne.current)==null||Le.focus()):(oe({activeTagIndex:q.activeTagIndex+1}),le(q.activeTagIndex+1));return}break;case"Tab":ee();break;case"Escape":ee(),(Qe=ne.current)==null||Qe.blur();break;case"Enter":a&&oe({searchText:""});break}ve.persist(),oe({keyDown:ve})}}function ut(ve){oe({opensUpward:ve})}function ct(ve){se([]),ve.stopPropagation()}function Pt(ve){oe({optionIds:new Array(ve).fill("").map((Le,Qe)=>`${te}-options-option-${Qe}`).join(",")})}const je=o.useCallback(()=>{oe({searchText:""}),ie()},[]),fe=Y(M||"sps-multi-select",Z&&"sps-multi-select--open",Z&&"z-stratum-dropdown",q.opensUpward&&"sps-multi-select--opens-upward",l&&"sps-form-control--disabled",n),Fe=new Array(J.length).fill(0).map((ve,Le)=>`${te}_tag-${Le}`);return o.useEffect(()=>{let ve;return Z&&(ve=()=>{ee()},window.addEventListener("resize",ve)),()=>{ve&&window.removeEventListener("resize",ve)}},[Z]),Io({isOpen:Z,rootRef:W}),o.createElement(at,{id:te,className:fe,formControl:m,formMeta:f,ref:W,inputRef:ne,focusInputOnClick:!0,onKeyDown:lt,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":Fe[q.activeTagIndex||0],"aria-owns":q.optionIds},o.createElement("div",{className:"sps-text-input",ref:j},o.createElement("div",{className:Y("sps-form-control",J&&!l&&"sps-form-control--clearable")},w&&o.createElement("i",{className:Y("sps-text-input__icon","sps-icon",`sps-icon-${w}`)}),o.createElement("div",{className:"sps-multi-select__tags-and-input",ref:U},u?null:J.map((ve,Le)=>o.createElement(Br,{id:Fe[Le],role:"option",disabled:l,"aria-selected":"true",key:Fe[Le],onRemove:()=>ke(Le)},N?ve[N]:ve)),o.createElement("input",{type:"text",ref:ne,"data-testid":`${z}__option-list-input`,value:q.searchText,className:"sps-text-input__input",placeholder:J.length===0?C:void 0,id:H,onClick:de,onChange:it,onFocus:de,onKeyDown:lt,disabled:l,role:"listbox","aria-multiselectable":"true","aria-owns":Fe.join(" "),...L})),J.length!==0&&!l?o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:ve=>ct(ve)}):null)),o.createElement(Rr,{id:`${te}_options`,ref:re,"data-testid":`${z}__option-list`,attachTo:j,captionKey:t,disabledOptions:c?J:null,isOpen:Z,comparisonKey:p,keepOpen:!0,keyDown:q.keyDown,options:T,specialAction:e,onOptionSelected:Ne,onPositionFlip:ut,hideInlineSearch:!0,optionRole:"option",onOptionListChanged:Pt,filterByTextAndCaptionKey:A,searchDebounce:s,search:q.searchText,tall:E,textKey:N,zeroState:k,loading:V,maxHeightPx:P,maxHeightRem:O,disableOptionsMemoization:$,onSpecialActionSelect:je}))}Object.assign(Di,{props:bw,displayName:"SpsMultiSelect"});const Hu={general:{label:"General Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use a Mulit-Select"),o.createElement("ul",null,o.createElement("li",null,"When a list of predetermined values can be provided and the input allows multiple entries.")),o.createElement("h5",null,"Do Not Use a Multi-Select:"),o.createElement("ul",null,o.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",o.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead."),o.createElement("li",null,"When it is ideal to display all available options without requiring a click. Consider"," ",o.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead.")),o.createElement("h5",null,"Using Multi-Selects in a Form"),o.createElement("p",null,"Reference the ",o.createElement(e,{to:"form"},"Forms")," page for guidelines for placing"," ",o.createElement(e,{to:"text-inputs"},"Inputs")," in Form Layouts."))},basicMuliSelect:{label:"Basic Multi-Selects",description:"Basic Multi-Selects include a label and dropdown menu including a list of options. The user is allowed to make a single selection.",examples:{basic:{react:v.code`
|
|
5391
5391
|
import {
|
|
5392
5392
|
SpsLabel,
|
|
5393
5393
|
SpsMultiSelect,
|
|
@@ -9137,7 +9137,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9137
9137
|
</>
|
|
9138
9138
|
);
|
|
9139
9139
|
}
|
|
9140
|
-
`}}}},Ww={Autocomplete:{components:[Jt],examples:fc},Checkboxes:{components:[Fn],examples:hc},"Clickable Tags":{components:[Br],examples:Sc},"Column Chooser":{components:[ci,zo],examples:Gp},"Conditional Fields":{description:()=>o.createElement("p",null,"A conditional field is one that is only available when a certain option is selected amongst a set of checkboxes or radio buttons."),components:[Wi],examples:mm},"Content Rows":{components:[di,Gn,jo],examples:Yp},"Content Sections":{components:[bi],examples:bu},"Date Pickers":{components:[pi],examples:Xp},"Date Range Pickers":{components:[mi],examples:tu},"Date Time Range Pickers":{components:[fi],examples:su},Datetime:{components:[Si],examples:lu},"Time Input":{components:[Yi],examples:gm},"Description Lists":{description:()=>o.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[Zo,Xo,ea],examples:Su},Dropdown:{components:[zn,gi],examples:gu},"Filter Panel":{components:[Vi,$i,Ki,Hi],examples:um},Form:{components:[no],examples:Wp},Incrementor:{components:[vi],examples:vu},Label:{description:()=>o.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[yi],examples:yu},"List Action Bar":{description:()=>o.createElement("p",null,"The List Action Bar contains the action buttons relevant to selected items from a Table List, Row List, or Card List. The List Action Bar is only visible when one or more list items have been selected and appears anchored to the bottom of the page above all other content."),components:[Ti],examples:Fu},"Micro Block":{components:[Ei],examples:Vu},Modals:{description:()=>o.createElement("p",null,"Modals are overlays on a page that focus a user’s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),components:[wi,na],examples:Ku},"Multi Select":{description:()=>o.createElement("p",null,"Multi-Selects consist of a Label and a dropdown menu from which a user selects one or more values from a list of pre-defined options."),components:[Di],examples:Hu},"Multi Value Text Input":{description:()=>o.createElement("p",null,"To be determined."),components:[Gi],examples:hm},Pagination:{description:()=>o.createElement("p",null,"The Pagination component allows users to navigate lists of records and control the number of records displayed on each page. The records can span across multiple pages, or within sections of a page."),components:[Ni,ra],examples:Wu},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[ki],examples:Gu},Selects:{description:"Selects consist off a Label and a dropdown menu from which a user selects a value from a list of pre-defined options.",components:[Yn],examples:nu},"Side Navigation":{description:"Side Navigations are used to provide quick access to a series of related pages or content. It can be used to navigate between different page views, or as an anchor-style menu to scroll to specific content on the same page.",components:[Uu],examples:zu},"Split Button":{components:[Ii],examples:ju},"Summary List Row":{components:[xi,Mi,oo],examples:qu},Tables:{description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("div",{className:"sps-body-14"},"Tables (along with ",o.createElement(e,{to:"content-rows"},"Content Rows")," and"," ",o.createElement(e,{to:"content-tiles"},"Content Tiles"),") are one of three options for displaying a list of records on a page."),o.createElement("br",null),o.createElement("div",{className:"sps-body-14"},"Tables are the ideal solution for displaying tabular data, especially when the listed records contain a considerable amount of data points. While tables are primarily used to display an extensive list of records, often in a paginated format, they can also be used to display smaller sets of tabular data in any context.")),components:[jn,Cn,pe,wn,rt,Ge],examples:Au},"Task Queue":{components:[_i],examples:Ju},"Text Inputs":{description:()=>o.createElement("p",null,"Text Inputs consist of a Label and a field in which a user enters a short value."),components:[aa],examples:Zu},"Text Areas":{description:()=>o.createElement("p",null,"Text Areas consist of a Label and a field in which a user enters a long value."),components:[Li],examples:Xu},Toggles:{description:()=>o.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[Oi],examples:em},Tooltips:{components:[Lt,Pi],examples:tm},Wizard:{components:[Bi,Ai],examples:om},Workflow:{components:[sa,ia,la,ca],examples:pm,notices:[Rw]},"Slide In Panels":{description:"",components:[Ci],examples:$u}},bm=new WeakMap;function da(e,t,n){return e?(typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${bm.get(e)}-${n}-${t}`):""}const ao=typeof document<"u"?x.useLayoutEffect:()=>{};function yr(e){const t=x.useRef(null);return ao(()=>{t.current=e},[e]),x.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const pa={prefix:String(Math.round(Math.random()*1e10)),current:0},vm=x.createContext(pa),Gw=x.createContext(!1);let Yw=!!(typeof window<"u"&&window.document&&window.document.createElement),Ui=new WeakMap;function Uw(e=!1){let t=x.useContext(vm),n=x.useRef(null);if(n.current===null&&!e){var r,a;let s=(a=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let l=Ui.get(s);l==null?Ui.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==l.state&&(t.current=l.id,Ui.delete(s))}n.current=++t.current}return n.current}function zw(e){let t=x.useContext(vm);t===pa&&!Yw&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Uw(!!e),r=t===pa&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function jw(e){let t=x.useId(),[n]=x.useState(ym()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${pa.prefix}`;return e||`${r}-${t}`}const qw=typeof x.useId=="function"?jw:zw;function Jw(){return!1}function Zw(){return!0}function Xw(e){return()=>{}}function ym(){return typeof x.useSyncExternalStore=="function"?x.useSyncExternalStore(Xw,Jw,Zw):x.useContext(Gw)}let Qw=!!(typeof window<"u"&&window.document&&window.document.createElement),Dn=new Map;function Tm(e){let[t,n]=x.useState(e),r=x.useRef(null),a=qw(t),s=x.useCallback(l=>{r.current=l},[]);return Qw&&(Dn.has(a)&&!Dn.get(a).includes(s)?Dn.set(a,[...Dn.get(a),s]):Dn.set(a,[s])),ao(()=>{let l=a;return()=>{Dn.delete(l)}},[a]),x.useEffect(()=>{let l=r.current;l&&(r.current=null,n(l))}),a}function eC(e,t){if(e===t)return e;let n=Dn.get(e);if(n)return n.forEach(a=>a(t)),t;let r=Dn.get(t);return r?(r.forEach(a=>a(e)),e):t}function Em(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Nt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},qn=e=>e&&"window"in e&&e.window===e?e:Nt(e).defaultView||window;function wm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=wm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tC(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=wm(e))&&(r&&(r+=" "),r+=t);return r}function Nn(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let a in r){let s=t[a],l=r[a];typeof s=="function"&&typeof l=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Em(s,l):(a==="className"||a==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?t[a]=tC(s,l):a==="id"&&s&&l?t.id=eC(s,l):t[a]=l!==void 0?l:s}}return t}const nC=new Set(["id"]),rC=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),oC=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),aC=/^(data-.*)$/;function sC(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,s={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(nC.has(l)||n&&rC.has(l)||r&&oC.has(l)||a!=null&&a.has(l)||aC.test(l))&&(s[l]=e[l]);return s}function nn(e){if(iC())e.focus({preventScroll:!0});else{let t=lC(e);e.focus(),cC(t)}}let ua=null;function iC(){if(ua==null){ua=!1;try{document.createElement("div").focus({get preventScroll(){return ua=!0,!0}})}catch{}}return ua}function lC(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function cC(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function ma(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function zi(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function rn(e){let t=null;return()=>(t==null&&(t=e()),t)}const Jn=rn(function(){return zi(/^Mac/i)}),dC=rn(function(){return zi(/^iPhone/i)}),Cm=rn(function(){return zi(/^iPad/i)||Jn()&&navigator.maxTouchPoints>1}),ji=rn(function(){return dC()||Cm()}),pC=rn(function(){return Jn()||ji()}),uC=rn(function(){return ma(/AppleWebKit/i)&&!mC()}),mC=rn(function(){return ma(/Chrome/i)}),Dm=rn(function(){return ma(/Android/i)}),fC=rn(function(){return ma(/Firefox/i)}),hC=x.createContext({isNative:!0,open:gC,useHref:e=>e});function qi(){return x.useContext(hC)}function Zn(e,t,n=!0){var r,a;let{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}=t;fC()&&(!((a=window.event)===null||a===void 0||(r=a.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Jn()?s=!0:l=!0);let m=uC()&&Jn()&&!Cm()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}):new MouseEvent("click",{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p,bubbles:!0,cancelable:!0});Zn.isOpening=n,nn(e),e.dispatchEvent(m),Zn.isOpening=!1}Zn.isOpening=!1;function SC(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function gC(e,t){SC(e,n=>Zn(n,t))}function bC(e){let t=qi();var n;const r=t.useHref((n=e==null?void 0:e.href)!==null&&n!==void 0?n:"");return{href:e!=null&&e.href?r:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}let Tr=new Map,Ji=new Set;function Nm(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=Tr.get(r.target);a||(a=new Set,Tr.set(r.target,a),r.target.addEventListener("transitioncancel",n,{once:!0})),a.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let a=Tr.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),Tr.delete(r.target)),Tr.size===0)){for(let s of Ji)s();Ji.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Nm():document.addEventListener("DOMContentLoaded",Nm));function km(e){requestAnimationFrame(()=>{Tr.size===0?e():Ji.add(e)})}function Im(){let e=x.useRef(new Map),t=x.useCallback((a,s,l,c)=>{let p=c!=null&&c.once?(...m)=>{e.current.delete(l),l(...m)}:l;e.current.set(l,{type:s,eventTarget:a,fn:p,options:c}),a.addEventListener(s,l,c)},[]),n=x.useCallback((a,s,l,c)=>{var p;let m=((p=e.current.get(l))===null||p===void 0?void 0:p.fn)||l;a.removeEventListener(s,m,c),e.current.delete(l)},[]),r=x.useCallback(()=>{e.current.forEach((a,s)=>{n(a.eventTarget,a.type,s,a.options)})},[n]);return x.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function xm(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=Tm(n),a&&r?a=[...new Set([n,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!r&&!a&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":a}}function vC(e,t){ao(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function yC(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function TC(e,t){const n=[];for(;e&&e!==document.documentElement;)yC(e,t)&&n.push(e),e=e.parentElement;return n}let EC=0;const Zi=new Map;function wC(e){let[t,n]=x.useState();return ao(()=>{if(!e)return;let r=Zi.get(e);if(r)n(r.element.id);else{let a=`react-aria-description-${EC++}`;n(a);let s=document.createElement("div");s.id=a,s.style.display="none",s.textContent=e,document.body.appendChild(s),r={refCount:0,element:s},Zi.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Zi.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Mm(e,t,n,r){let a=yr(n),s=n==null;x.useEffect(()=>{if(s||!e.current)return;let l=e.current;return l.addEventListener(t,a,r),()=>{l.removeEventListener(t,a,r)}},[e,t,r,s,a])}function _m(e,t){let n=Lm(e,t,"left"),r=Lm(e,t,"top"),a=t.offsetWidth,s=t.offsetHeight,l=e.scrollLeft,c=e.scrollTop,{borderTopWidth:p,borderLeftWidth:m}=getComputedStyle(e),f=e.scrollLeft+parseInt(m,10),u=e.scrollTop+parseInt(p,10),h=f+e.clientWidth,S=u+e.clientHeight;n<=l?l=n-parseInt(m,10):n+a>h&&(l+=n+a-h),r<=u?c=r-parseInt(p,10):r+s>S&&(c+=r+s-S),e.scrollLeft=l,e.scrollTop=c}function Lm(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){a-=e[r];break}t=t.offsetParent}return a}function Om(e,t){if(document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let p=TC(e);for(let m of p)_m(m,e)}else{var n;let{left:p,top:m}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:f,top:u}=e.getBoundingClientRect();if(Math.abs(p-f)>1||Math.abs(m-u)>1){var r,a,s;t==null||(a=t.containingElement)===null||a===void 0||(r=a.scrollIntoView)===null||r===void 0||r.call(a,{block:"center",inline:"center"}),(s=e.scrollIntoView)===null||s===void 0||s.call(e,{block:"nearest"})}}}}function Xi(e){return e.mozInputSource===0&&e.isTrusted?!0:Dm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function CC(e){return!Dm()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Pm(e,t,n){let[r,a]=x.useState(e||t),s=x.useRef(e!==void 0),l=e!==void 0;x.useEffect(()=>{let m=s.current;m!==l&&console.warn(`WARN: A component changed from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let c=l?e:r,p=x.useCallback((m,...f)=>{let u=(h,...S)=>{n&&(Object.is(c,h)||n(h,...S)),l||(c=h)};typeof m=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((S,...y)=>{let T=m(l?c:S,...y);return u(T,...f),l?S:T})):(l||a(m),u(m,...f))},[l,c,n]);return[c,p]}function Qi(e){return pC()?e.altKey:e.ctrlKey}function Er(e){return Jn()?e.metaKey:e.ctrlKey}const DC=1e3;function NC(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,a=x.useRef({search:"",timeout:null}).current,s=l=>{let c=kC(l.key);if(!c||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))return;c===" "&&a.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),a.search+=c;let p=t.getKeyForSearch(a.search,n.focusedKey);p==null&&(p=t.getKeyForSearch(a.search)),p!=null&&(n.setFocusedKey(p),r&&r(p)),clearTimeout(a.timeout),a.timeout=setTimeout(()=>{a.search=""},DC)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:null}}}function kC(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}let wr="default",el="",fa=new WeakMap;function Rm(e){if(ji()){if(wr==="default"){const t=Nt(e);el=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}wr="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(fa.set(e,e.style.userSelect),e.style.userSelect="none")}function ha(e){if(ji()){if(wr!=="disabled")return;wr="restoring",setTimeout(()=>{km(()=>{if(wr==="restoring"){const t=Nt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=el||""),el="",wr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&fa.has(e)){let t=fa.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),fa.delete(e)}}const Bm=x.createContext({register:()=>{}});Bm.displayName="PressResponderContext";function IC(e,t){return t.get?t.get.call(e):t.value}function Am(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function xC(e,t){var n=Am(e,t,"get");return IC(e,n)}function MC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _C(e,t,n){MC(e,t),t.set(e,n)}function LC(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Fm(e,t,n){var r=Am(e,t,"set");return LC(e,r,n),n}function OC(e){let t=x.useContext(Bm);if(t){let{register:n,...r}=t;e=Nn(r,e),n()}return vC(t,e.ref),e}var Sa=new WeakMap;class ga{continuePropagation(){Fm(this,Sa,!1)}get shouldStopPropagation(){return xC(this,Sa)}constructor(t,n,r,a){_C(this,Sa,{writable:!0,value:void 0}),Fm(this,Sa,!0);var s;let l=(s=a==null?void 0:a.target)!==null&&s!==void 0?s:r.currentTarget;const c=l==null?void 0:l.getBoundingClientRect();let p,m=0,f,u=null;r.clientX!=null&&r.clientY!=null&&(f=r.clientX,u=r.clientY),c&&(f!=null&&u!=null?(p=f-c.left,m=u-c.top):(p=c.width/2,m=c.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=p,this.y=m}}const Vm=Symbol("linkClicked");function $m(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:s,isDisabled:l,isPressed:c,preventFocusOnPress:p,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:f,ref:u,...h}=OC(e),[S,y]=x.useState(!1),T=x.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:C,removeAllGlobalListeners:E}=Im(),N=yr((w,P)=>{let O=T.current;if(l||O.didFirePressStart)return!1;let $=!0;if(O.isTriggeringEvent=!0,r){let z=new ga("pressstart",P,w);r(z),$=z.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,y(!0),$}),M=yr((w,P,O=!0)=>{let $=T.current;if(!$.didFirePressStart)return!1;$.ignoreClickAfterPress=!0,$.didFirePressStart=!1,$.isTriggeringEvent=!0;let z=!0;if(a){let L=new ga("pressend",P,w);a(L),z=L.shouldStopPropagation}if(n&&n(!1),y(!1),t&&O&&!l){let L=new ga("press",P,w);t(L),z&&(z=L.shouldStopPropagation)}return $.isTriggeringEvent=!1,z}),I=yr((w,P)=>{let O=T.current;if(l)return!1;if(s){O.isTriggeringEvent=!0;let $=new ga("pressup",P,w);return s($),O.isTriggeringEvent=!1,$.shouldStopPropagation}return!0}),k=yr(w=>{let P=T.current;P.isPressed&&P.target&&(P.isOverTarget&&P.pointerType!=null&&M(on(P.target,w),P.pointerType,!1),P.isPressed=!1,P.isOverTarget=!1,P.activePointerId=null,P.pointerType=null,E(),f||ha(P.target))}),V=yr(w=>{m&&k(w)}),A=x.useMemo(()=>{let w=T.current,P={onKeyDown($){if(nl($.nativeEvent,$.currentTarget)&&$.currentTarget.contains($.target)){var z;Wm($.target,$.key)&&$.preventDefault();let L=!0;if(!w.isPressed&&!$.repeat){w.target=$.currentTarget,w.isPressed=!0,L=N($,"keyboard");let J=$.currentTarget,B=te=>{nl(te,J)&&!te.repeat&&J.contains(te.target)&&w.target&&I(on(w.target,te),"keyboard")};C(Nt($.currentTarget),"keyup",Em(B,O),!0)}L&&$.stopPropagation(),$.metaKey&&Jn()&&((z=w.metaKeyEvents)===null||z===void 0||z.set($.key,$.nativeEvent))}else $.key==="Meta"&&(w.metaKeyEvents=new Map)},onClick($){if(!($&&!$.currentTarget.contains($.target))&&$&&$.button===0&&!w.isTriggeringEvent&&!Zn.isOpening){let z=!0;if(l&&$.preventDefault(),!w.ignoreClickAfterPress&&!w.ignoreEmulatedMouseEvents&&!w.isPressed&&(w.pointerType==="virtual"||Xi($.nativeEvent))){!l&&!p&&nn($.currentTarget);let L=N($,"virtual"),J=I($,"virtual"),B=M($,"virtual");z=L&&J&&B}w.ignoreEmulatedMouseEvents=!1,w.ignoreClickAfterPress=!1,z&&$.stopPropagation()}}},O=$=>{var z;if(w.isPressed&&w.target&&nl($,w.target)){var L;Wm($.target,$.key)&&$.preventDefault();let B=$.target;M(on(w.target,$),"keyboard",w.target.contains(B)),E(),$.key!=="Enter"&&tl(w.target)&&w.target.contains(B)&&!$[Vm]&&($[Vm]=!0,Zn(w.target,$,!1)),w.isPressed=!1,(L=w.metaKeyEvents)===null||L===void 0||L.delete($.key)}else if($.key==="Meta"&&(!((z=w.metaKeyEvents)===null||z===void 0)&&z.size)){var J;let B=w.metaKeyEvents;w.metaKeyEvents=void 0;for(let te of B.values())(J=w.target)===null||J===void 0||J.dispatchEvent(new KeyboardEvent("keyup",te))}};if(typeof PointerEvent<"u"){P.onPointerDown=B=>{if(B.button!==0||!B.currentTarget.contains(B.target))return;if(CC(B.nativeEvent)){w.pointerType="virtual";return}rl(B.currentTarget)&&B.preventDefault(),w.pointerType=B.pointerType;let te=!0;w.isPressed||(w.isPressed=!0,w.isOverTarget=!0,w.activePointerId=B.pointerId,w.target=B.currentTarget,!l&&!p&&nn(B.currentTarget),f||Rm(w.target),te=N(B,w.pointerType),C(Nt(B.currentTarget),"pointermove",$,!1),C(Nt(B.currentTarget),"pointerup",z,!1),C(Nt(B.currentTarget),"pointercancel",J,!1)),te&&B.stopPropagation()},P.onMouseDown=B=>{B.currentTarget.contains(B.target)&&B.button===0&&(rl(B.currentTarget)&&B.preventDefault(),B.stopPropagation())},P.onPointerUp=B=>{!B.currentTarget.contains(B.target)||w.pointerType==="virtual"||B.button===0&&Cr(B,B.currentTarget)&&I(B,w.pointerType||B.pointerType)};let $=B=>{B.pointerId===w.activePointerId&&(w.target&&Cr(B,w.target)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,N(on(w.target,B),w.pointerType)):w.target&&w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,M(on(w.target,B),w.pointerType,!1),V(B)))},z=B=>{B.pointerId===w.activePointerId&&w.isPressed&&B.button===0&&w.target&&(Cr(B,w.target)&&w.pointerType!=null?M(on(w.target,B),w.pointerType):w.isOverTarget&&w.pointerType!=null&&M(on(w.target,B),w.pointerType,!1),w.isPressed=!1,w.isOverTarget=!1,w.activePointerId=null,w.pointerType=null,E(),f||ha(w.target),"ontouchend"in w.target&&B.pointerType!=="mouse"&&C(w.target,"touchend",L,{once:!0}))},L=B=>{Hm(B.target)&&B.preventDefault()},J=B=>{k(B)};P.onDragStart=B=>{B.currentTarget.contains(B.target)&&k(B)}}else{P.onMouseDown=L=>{if(L.button!==0||!L.currentTarget.contains(L.target))return;if(rl(L.currentTarget)&&L.preventDefault(),w.ignoreEmulatedMouseEvents){L.stopPropagation();return}w.isPressed=!0,w.isOverTarget=!0,w.target=L.currentTarget,w.pointerType=Xi(L.nativeEvent)?"virtual":"mouse",!l&&!p&&nn(L.currentTarget),N(L,w.pointerType)&&L.stopPropagation(),C(Nt(L.currentTarget),"mouseup",$,!1)},P.onMouseEnter=L=>{if(!L.currentTarget.contains(L.target))return;let J=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!0,J=N(L,w.pointerType)),J&&L.stopPropagation()},P.onMouseLeave=L=>{if(!L.currentTarget.contains(L.target))return;let J=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!1,J=M(L,w.pointerType,!1),V(L)),J&&L.stopPropagation()},P.onMouseUp=L=>{L.currentTarget.contains(L.target)&&!w.ignoreEmulatedMouseEvents&&L.button===0&&I(L,w.pointerType||"mouse")};let $=L=>{if(L.button===0){if(w.isPressed=!1,E(),w.ignoreEmulatedMouseEvents){w.ignoreEmulatedMouseEvents=!1;return}w.target&&Cr(L,w.target)&&w.pointerType!=null?M(on(w.target,L),w.pointerType):w.target&&w.isOverTarget&&w.pointerType!=null&&M(on(w.target,L),w.pointerType,!1),w.isOverTarget=!1}};P.onTouchStart=L=>{if(!L.currentTarget.contains(L.target))return;let J=PC(L.nativeEvent);if(!J)return;w.activePointerId=J.identifier,w.ignoreEmulatedMouseEvents=!0,w.isOverTarget=!0,w.isPressed=!0,w.target=L.currentTarget,w.pointerType="touch",!l&&!p&&nn(L.currentTarget),f||Rm(w.target),N(kn(w.target,L),w.pointerType)&&L.stopPropagation(),C(qn(L.currentTarget),"scroll",z,!0)},P.onTouchMove=L=>{if(!L.currentTarget.contains(L.target))return;if(!w.isPressed){L.stopPropagation();return}let J=Km(L.nativeEvent,w.activePointerId),B=!0;J&&Cr(J,L.currentTarget)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,B=N(kn(w.target,L),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,B=M(kn(w.target,L),w.pointerType,!1),V(kn(w.target,L))),B&&L.stopPropagation()},P.onTouchEnd=L=>{if(!L.currentTarget.contains(L.target))return;if(!w.isPressed){L.stopPropagation();return}let J=Km(L.nativeEvent,w.activePointerId),B=!0;J&&Cr(J,L.currentTarget)&&w.pointerType!=null?(I(kn(w.target,L),w.pointerType),B=M(kn(w.target,L),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(B=M(kn(w.target,L),w.pointerType,!1)),B&&L.stopPropagation(),w.isPressed=!1,w.activePointerId=null,w.isOverTarget=!1,w.ignoreEmulatedMouseEvents=!0,w.target&&!f&&ha(w.target),E()},P.onTouchCancel=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),w.isPressed&&k(kn(w.target,L)))};let z=L=>{w.isPressed&&L.target.contains(w.target)&&k({currentTarget:w.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};P.onDragStart=L=>{L.currentTarget.contains(L.target)&&k(L)}}return P},[C,l,p,E,f,k,V,M,N,I]);return x.useEffect(()=>()=>{var w;f||ha((w=T.current.target)!==null&&w!==void 0?w:void 0)},[f]),{isPressed:c||S,pressProps:Nn(h,A)}}function tl(e){return e.tagName==="A"&&e.hasAttribute("href")}function nl(e,t){const{key:n,code:r}=e,a=t,s=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof qn(a).HTMLInputElement&&!Gm(a,n)||a instanceof qn(a).HTMLTextAreaElement||a.isContentEditable)&&!((s==="link"||!s&&tl(a))&&n!=="Enter")}function PC(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function Km(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const a=n[r];if(a.identifier===t)return a}return null}function kn(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function on(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function RC(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function BC(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Cr(e,t){let n=t.getBoundingClientRect(),r=RC(e);return BC(n,r)}function rl(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function Hm(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!tl(e)}function Wm(e,t){return e instanceof HTMLInputElement?!Gm(e,t):Hm(e)}const AC=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Gm(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":AC.has(e.type)}let so=null,FC=new Set,io=new Map,Xn=!1,ol=!1;function al(e,t){for(let n of FC)n(e,t)}function VC(e){return!(e.metaKey||!Jn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ba(e){Xn=!0,VC(e)&&(so="keyboard",al("keyboard",e))}function Ot(e){so="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Xn=!0,al("pointer",e))}function Ym(e){Xi(e)&&(Xn=!0,so="virtual")}function Um(e){e.target===window||e.target===document||(!Xn&&!ol&&(so="virtual",al("virtual",e)),Xn=!1,ol=!1)}function zm(){Xn=!1,ol=!0}function jm(e){if(typeof window>"u"||io.get(qn(e)))return;const t=qn(e),n=Nt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Xn=!0,r.apply(this,arguments)},n.addEventListener("keydown",ba,!0),n.addEventListener("keyup",ba,!0),n.addEventListener("click",Ym,!0),t.addEventListener("focus",Um,!0),t.addEventListener("blur",zm,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ot,!0),n.addEventListener("pointermove",Ot,!0),n.addEventListener("pointerup",Ot,!0)):(n.addEventListener("mousedown",Ot,!0),n.addEventListener("mousemove",Ot,!0),n.addEventListener("mouseup",Ot,!0)),t.addEventListener("beforeunload",()=>{qm(e)},{once:!0}),io.set(t,{focus:r})}const qm=(e,t)=>{const n=qn(e),r=Nt(e);t&&r.removeEventListener("DOMContentLoaded",t),io.has(n)&&(n.HTMLElement.prototype.focus=io.get(n).focus,r.removeEventListener("keydown",ba,!0),r.removeEventListener("keyup",ba,!0),r.removeEventListener("click",Ym,!0),n.removeEventListener("focus",Um,!0),n.removeEventListener("blur",zm,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ot,!0),r.removeEventListener("pointermove",Ot,!0),r.removeEventListener("pointerup",Ot,!0)):(r.removeEventListener("mousedown",Ot,!0),r.removeEventListener("mousemove",Ot,!0),r.removeEventListener("mouseup",Ot,!0)),io.delete(n))};function $C(e){const t=Nt(e);let n;return t.readyState!=="loading"?jm(e):(n=()=>{jm(e)},t.addEventListener("DOMContentLoaded",n)),()=>qm(e,n)}typeof document<"u"&&$C();function sl(){return so}const KC=500;function HC(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:a,threshold:s=KC,accessibilityDescription:l}=e;const c=x.useRef(void 0);let{addGlobalListener:p,removeGlobalListener:m}=Im(),{pressProps:f}=$m({isDisabled:t,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(n&&n({...h,type:"longpressstart"}),c.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),a&&a({...h,type:"longpress"}),c.current=void 0},s),h.pointerType==="touch")){let S=y=>{y.preventDefault()};p(h.target,"contextmenu",S,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{m(h.target,"contextmenu",S)},30)},{once:!0})}},onPressEnd(h){c.current&&clearTimeout(c.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),u=wC(a&&!t?l:void 0);return{longPressProps:Nn(f,u)}}function il(e){const t=Nt(e);if(sl()==="virtual"){let n=t.activeElement;km(()=>{t.activeElement===n&&e.isConnected&&nn(e)})}else nn(e)}function WC(e){const t=qn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,a=n!=="none"&&r!=="hidden"&&r!=="collapse";if(a){const{getComputedStyle:s}=e.ownerDocument.defaultView;let{display:l,visibility:c}=s(e);a=l!=="none"&&c!=="hidden"&&c!=="collapse"}return a}function GC(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Jm(e,t){return e.nodeName!=="#comment"&&WC(e)&&GC(e,t)&&(!e.parentElement||Jm(e.parentElement,e))}const ll=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],YC=ll.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ll.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const UC=ll.join(':not([hidden]):not([tabindex="-1"]),');function Zm(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Xm(e,t,n){let r=t!=null&&t.tabbable?UC:YC,a=Nt(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&Jm(s)&&(!n||Zm(s,n))&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}class cl{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let a=this.fastMap.get(n??null);if(!a)return;let s=new Qm({scopeRef:t});a.addChild(s),s.parent=a,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Zm(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let a=n.children;r&&(r.removeChild(n),a.size>0&&a.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new cl;var r;for(let a of this.traverse())n.addTreeNode(a.scopeRef,(r=(t=a.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,a.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Qm({scopeRef:null}),this.fastMap.set(null,this.root)}}class Qm{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new cl;function zC(e,t){let n=t==null?void 0:t.isDisabled,[r,a]=x.useState(!1);return ao(()=>{if(e!=null&&e.current&&!n){let s=()=>{if(e.current){let c=Xm(e.current,{tabbable:!0});a(!!c.nextNode())}};s();let l=new MutationObserver(s);return l.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{l.disconnect()}}}),n?!1:r}const jC=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),qC=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function JC(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return jC.has(n.script)}let t=e.split("-")[0];return qC.has(t)}const ZC=Symbol.for("react-aria.i18n.locale");function ef(){let e=typeof window<"u"&&window[ZC]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:JC(e)?"rtl":"ltr"}}let dl=ef(),lo=new Set;function tf(){dl=ef();for(let e of lo)e(dl)}function XC(){let e=ym(),[t,n]=x.useState(dl);return x.useEffect(()=>(lo.size===0&&window.addEventListener("languagechange",tf),lo.add(n),()=>{lo.delete(n),lo.size===0&&window.removeEventListener("languagechange",tf)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const QC=x.createContext(null);function nf(){let e=XC();return x.useContext(QC)||e}function eD(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:a=!1,shouldFocusWrap:s=!1,disallowEmptySelection:l=!1,disallowSelectAll:c=!1,selectOnFocus:p=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:f,allowsTabNavigation:u=!1,isVirtualized:h,scrollRef:S=r,linkBehavior:y="action"}=e,{direction:T}=nf(),C=qi(),E=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current.contains(O.target))return;const $=(U,R)=>{if(U!=null){if(t.isLink(U)&&y==="selection"&&p&&!Qi(O)){bo.flushSync(()=>{t.setFocusedKey(U,R)});let Z=S.current.querySelector(`[data-key="${CSS.escape(U.toString())}"]`),ae=t.getItemProps(U);C.open(Z,O,ae.href,ae.routerOptions);return}if(t.setFocusedKey(U,R),t.isLink(U)&&y==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(U):p&&!Qi(O)&&t.replaceSelection(U)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){var z,L,J;let U=t.focusedKey!=null?(z=n.getKeyBelow)===null||z===void 0?void 0:z.call(n,t.focusedKey):(L=n.getFirstKey)===null||L===void 0?void 0:L.call(n);U==null&&s&&(U=(J=n.getFirstKey)===null||J===void 0?void 0:J.call(n,t.focusedKey)),U!=null&&(O.preventDefault(),$(U))}break;case"ArrowUp":if(n.getKeyAbove){var B,te,H;let U=t.focusedKey!=null?(B=n.getKeyAbove)===null||B===void 0?void 0:B.call(n,t.focusedKey):(te=n.getLastKey)===null||te===void 0?void 0:te.call(n);U==null&&s&&(U=(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,t.focusedKey)),U!=null&&(O.preventDefault(),$(U))}break;case"ArrowLeft":if(n.getKeyLeftOf){var q,oe,W;let U=(q=n.getKeyLeftOf)===null||q===void 0?void 0:q.call(n,t.focusedKey);U==null&&s&&(U=T==="rtl"?(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey):(W=n.getLastKey)===null||W===void 0?void 0:W.call(n,t.focusedKey)),U!=null&&(O.preventDefault(),$(U,T==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var j,ne,re;let U=(j=n.getKeyRightOf)===null||j===void 0?void 0:j.call(n,t.focusedKey);U==null&&s&&(U=T==="rtl"?(ne=n.getLastKey)===null||ne===void 0?void 0:ne.call(n,t.focusedKey):(re=n.getFirstKey)===null||re===void 0?void 0:re.call(n,t.focusedKey)),U!=null&&(O.preventDefault(),$(U,T==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){O.preventDefault();let U=n.getFirstKey(t.focusedKey,Er(O));t.setFocusedKey(U),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(U):p&&t.replaceSelection(U)}break;case"End":if(n.getLastKey){O.preventDefault();let U=n.getLastKey(t.focusedKey,Er(O));t.setFocusedKey(U),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(U):p&&t.replaceSelection(U)}break;case"PageDown":if(n.getKeyPageBelow){let U=n.getKeyPageBelow(t.focusedKey);U!=null&&(O.preventDefault(),$(U))}break;case"PageUp":if(n.getKeyPageAbove){let U=n.getKeyPageAbove(t.focusedKey);U!=null&&(O.preventDefault(),$(U))}break;case"a":Er(O)&&t.selectionMode==="multiple"&&c!==!0&&(O.preventDefault(),t.selectAll());break;case"Escape":!l&&t.selectedKeys.size!==0&&(O.stopPropagation(),O.preventDefault(),t.clearSelection());break;case"Tab":if(!u){if(O.shiftKey)r.current.focus();else{let U=Xm(r.current,{tabbable:!0}),R,Z;do Z=U.lastChild(),Z&&(R=Z);while(Z);R&&!R.contains(document.activeElement)&&nn(R)}break}}},N=x.useRef({top:0,left:0});Mm(S,"scroll",h?null:()=>{N.current={top:S.current.scrollTop,left:S.current.scrollLeft}});let M=O=>{if(t.isFocused){O.currentTarget.contains(O.target)||t.setFocused(!1);return}if(O.currentTarget.contains(O.target)){if(t.setFocused(!0),t.focusedKey==null){let L=B=>{B!=null&&(t.setFocusedKey(B),p&&t.replaceSelection(B))},J=O.relatedTarget;var $,z;J&&O.currentTarget.compareDocumentPosition(J)&Node.DOCUMENT_POSITION_FOLLOWING?L(($=t.lastSelectedKey)!==null&&$!==void 0?$:n.getLastKey()):L((z=t.firstSelectedKey)!==null&&z!==void 0?z:n.getFirstKey())}else h||(S.current.scrollTop=N.current.top,S.current.scrollLeft=N.current.left);if(t.focusedKey!=null){let L=S.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);L&&(L.contains(document.activeElement)||nn(L),sl()==="keyboard"&&Om(L,{containingElement:r.current}))}}},I=O=>{O.currentTarget.contains(O.relatedTarget)||t.setFocused(!1)};const k=x.useRef(a);x.useEffect(()=>{if(k.current){let O=null;a==="first"&&(O=n.getFirstKey()),a==="last"&&(O=n.getLastKey());let $=t.selectedKeys;if($.size){for(let z of $)if(t.canSelectItem(z)){O=z;break}}t.setFocused(!0),t.setFocusedKey(O),O==null&&!f&&il(r.current)}},[]);let V=x.useRef(t.focusedKey);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==V.current||k.current)&&(S!=null&&S.current)){let O=sl(),$=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!$)return;(O==="keyboard"||k.current)&&(_m(S.current,$),O!=="virtual"&&Om($,{containingElement:r.current}))}!f&&t.isFocused&&t.focusedKey==null&&V.current!=null&&il(r.current),V.current=t.focusedKey,k.current=!1}),Mm(r,"react-aria-focus-scope-restore",O=>{O.preventDefault(),t.setFocused(!0)});let A={onKeyDown:E,onFocus:M,onBlur:I,onMouseDown(O){S.current===O.target&&O.preventDefault()}},{typeSelectProps:w}=NC({keyboardDelegate:n,selectionManager:t});m||(A=Nn(w,A));let P;return f||(P=t.focusedKey==null?0:-1),{collectionProps:{...A,tabIndex:P}}}function tD(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:a,shouldUseVirtualFocus:s,focus:l,isDisabled:c,onAction:p,allowsDifferentPressOrigin:m,linkBehavior:f="action"}=e,u=qi(),h=H=>{if(H.pointerType==="keyboard"&&Qi(H))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(f==="selection"){let q=t.getItemProps(n);u.open(r.current,H,q.href,q.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(f==="override"||f==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):H&&H.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||H&&(Er(H)||H.pointerType==="touch"||H.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};x.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!s&&(l?l():document.activeElement!==r.current&&il(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,s]),c=c||t.isDisabled(n);let S={};!s&&!c?S={tabIndex:n===t.focusedKey?0:-1,onFocus(H){H.target===r.current&&t.setFocusedKey(n)}}:c&&(S.onMouseDown=H=>{H.preventDefault()});let y=t.isLink(n)&&f==="override",T=t.isLink(n)&&f!=="selection"&&f!=="none",C=!c&&t.canSelectItem(n)&&!y,E=(p||T)&&!c,N=E&&(t.selectionBehavior==="replace"?!C:!C||t.isEmpty),M=E&&C&&t.selectionBehavior==="replace",I=N||M,k=x.useRef(null),V=I&&C,A=x.useRef(!1),w=x.useRef(!1),P=H=>{if(p&&p(),T){let q=t.getItemProps(n);u.open(r.current,H,q.href,q.routerOptions)}},O={};a?(O.onPressStart=H=>{k.current=H.pointerType,A.current=V,H.pointerType==="keyboard"&&(!I||of())&&h(H)},m?(O.onPressUp=N?null:H=>{H.pointerType!=="keyboard"&&C&&h(H)},O.onPress=N?P:null):O.onPress=H=>{if(N||M&&H.pointerType!=="mouse"){if(H.pointerType==="keyboard"&&!rf())return;P(H)}else H.pointerType!=="keyboard"&&C&&h(H)}):(O.onPressStart=H=>{k.current=H.pointerType,A.current=V,w.current=N,C&&(H.pointerType==="mouse"&&!N||H.pointerType==="keyboard"&&(!E||of()))&&h(H)},O.onPress=H=>{(H.pointerType==="touch"||H.pointerType==="pen"||H.pointerType==="virtual"||H.pointerType==="keyboard"&&I&&rf()||H.pointerType==="mouse"&&w.current)&&(I?P(H):C&&h(H))}),S["data-key"]=n,O.preventFocusOnPress=s;let{pressProps:$,isPressed:z}=$m(O),L=M?H=>{k.current==="mouse"&&(H.stopPropagation(),H.preventDefault(),P(H))}:void 0,{longPressProps:J}=HC({isDisabled:!V,onLongPress(H){H.pointerType==="touch"&&(h(H),t.setSelectionBehavior("toggle"))}}),B=H=>{k.current==="touch"&&A.current&&H.preventDefault()},te=t.isLink(n)?H=>{Zn.isOpening||H.preventDefault()}:void 0;return{itemProps:Nn(S,C||N?$:{},V?J:{},{onDoubleClick:L,onDragStartCapture:B,onClick:te}),isPressed:z,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:c,allowsSelection:C,hasAction:I}}function rf(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function of(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}function nD(e,t,n){let{key:r,isDisabled:a,shouldSelectOnPressUp:s}=e,{selectionManager:l,selectedKey:c}=t,p=r===c,m=a||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:f,isPressed:u}=tD({selectionManager:l,key:r,ref:n,isDisabled:m,shouldSelectOnPressUp:s,linkBehavior:"selection"}),h=da(t,r,"tab"),S=da(t,r,"tabpanel"),{tabIndex:y}=f,T=t.collection.getItem(r),C=sC(T==null?void 0:T.props,{labelable:!0});delete C.id;let E=bC(T==null?void 0:T.props);return{tabProps:Nn(C,E,f,{id:h,"aria-selected":p,"aria-disabled":m||void 0,"aria-controls":p?S:void 0,tabIndex:m?void 0:y,role:"tab"}),isSelected:p,isDisabled:m,isPressed:u}}function rD(e,t,n){let r=zC(n)?void 0:0;var a;const s=da(t,(a=e.id)!==null&&a!==void 0?a:t==null?void 0:t.selectedKey,"tabpanel"),l=xm({...e,id:s,"aria-labelledby":da(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:Nn(l,{tabIndex:r,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class oD{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}isDisabled(t){var n,r;return this.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.isDisabled(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.isDisabled(t)&&(t=this.getPreviousKey(t)),t}getKeyAbove(t){return this.tabDirection?null:this.getPreviousKey(t)}getKeyBelow(t){return this.tabDirection?null:this.getNextKey(t)}getNextKey(t){do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(this.isDisabled(t));return t}getPreviousKey(t){do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(this.isDisabled(t));return t}constructor(t,n,r,a=new Set){this.collection=t,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=a,this.tabDirection=r==="horizontal"}}function aD(e,t,n){let{orientation:r="horizontal",keyboardActivation:a="automatic"}=e,{collection:s,selectionManager:l,disabledKeys:c}=t,{direction:p}=nf(),m=x.useMemo(()=>new oD(s,p,r,c),[s,c,r,p]),{collectionProps:f}=eD({ref:n,selectionManager:l,keyboardDelegate:m,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),u=Tm();bm.set(t,u);let h=xm({...e,id:u});return{tabListProps:{...Nn(f,h),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function af({item:e,state:t}){const{key:n}=e,r=o.useRef(null),{tabProps:a}=nD({key:n},t,r),s=t.selectedKey===n,l=t.disabledKeys.has(n);return o.createElement("div",{...a,ref:r,className:Y("sps-nav__item","sps-nav__link",s&&"active",l&&"sps-nav__item--disabled")},e.rendered)}function sf({state:e,...t}){const n=o.useRef(null),{tabPanelProps:r}=rD(t,e,n);return o.createElement("div",{...r,ref:n,className:"sps-card__body"},e.selectedItem?e.selectedItem.props.children:null)}class lf{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){let n=this.keyMap.get(t);return(n==null?void 0:n.childNodes)||[]}constructor(t){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t;let n=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let c of l.childNodes)n(c)};for(let l of t)n(l);let r=null,a=0;for(let[l,c]of this.keyMap)r?(r.nextKey=l,c.prevKey=r.key):(this.firstKey=l,c.prevKey=void 0),c.type==="item"&&(c.index=a++),r=c,r.nextKey=void 0;var s;this.lastKey=(s=r==null?void 0:r.key)!==null&&s!==void 0?s:null}}class Kt extends Set{constructor(t,n,r){super(t),t instanceof Kt?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function sD(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function iD(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:a="toggle",disabledBehavior:s="all"}=e,l=x.useRef(!1),[,c]=x.useState(!1),p=x.useRef(null),m=x.useRef(null),[,f]=x.useState(null),u=x.useMemo(()=>cf(e.selectedKeys),[e.selectedKeys]),h=x.useMemo(()=>cf(e.defaultSelectedKeys,new Kt),[e.defaultSelectedKeys]),[S,y]=Pm(u,h,e.onSelectionChange),T=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[C,E]=x.useState(a);a==="replace"&&C==="toggle"&&typeof S=="object"&&S.size===0&&E("replace");let N=x.useRef(a);return x.useEffect(()=>{a!==N.current&&(E(a),N.current=a)},[a]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:C,setSelectionBehavior:E,get isFocused(){return l.current},setFocused(M){l.current=M,c(M)},get focusedKey(){return p.current},get childFocusStrategy(){return m.current},setFocusedKey(M,I="first"){p.current=M,m.current=I,f(M)},selectedKeys:S,setSelectedKeys(M){(r||!sD(M,S))&&y(M)},disabledKeys:T,disabledBehavior:s}}function cf(e,t){return e?e==="all"?"all":new Kt(e):t}class lD{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){return this.state.selectionMode==="none"?!1:(t=this.getKey(t),this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t))}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&or.compareNodeOrder(this.collection,r,t)<0)&&(t=r)}return t==null?void 0:t.key}get lastSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&or.compareNodeOrder(this.collection,r,t)>0)&&(t=r)}return t==null?void 0:t.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}t=this.getKey(t);let n;if(this.state.selectedKeys==="all")n=new Kt([t],t,t);else{let s=this.state.selectedKeys;var r;let l=(r=s.anchorKey)!==null&&r!==void 0?r:t;n=new Kt(s,l,t);var a;for(let c of this.getKeyRange(l,(a=s.currentKey)!==null&&a!==void 0?a:t))n.delete(c);for(let c of this.getKeyRange(t,l))this.canSelectItem(c)&&n.add(c)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let r=this.collection.getItem(t),a=this.collection.getItem(n);return r&&a?or.compareNodeOrder(this.collection,r,a)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let a=[],s=t;for(;s!=null;){let l=this.collection.getItem(s);if((l&&l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&a.push(s),s===n)return a;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}if(t=this.getKey(t),t==null)return;let n=new Kt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none"||(t=this.getKey(t),t==null))return;let n=this.canSelectItem(t)?new Kt([t],t,t):new Kt;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Kt;for(let r of t)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){let a=this.collection.getItem(r);a.type==="item"&&t.push(r),a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n(or.getFirstItem(or.getChildNodes(a,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Kt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}constructor(t,n,r){this.collection=t,this.state=n;var a;this.allowsCellSelection=(a=r==null?void 0:r.allowsCellSelection)!==null&&a!==void 0?a:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function cD(e){let{filter:t,layoutDelegate:n}=e,r=iD(e),a=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=x.useCallback(f=>t?new lf(t(f)):new lf(f),[t]),l=x.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),c=or.useCollection(e,s,l),p=x.useMemo(()=>new lD(c,r,{layoutDelegate:n}),[c,r,n]);const m=x.useRef(null);return x.useEffect(()=>{if(r.focusedKey!=null&&!c.getItem(r.focusedKey)&&m.current){const E=m.current.getItem(r.focusedKey),N=[...m.current.getKeys()].map(w=>{const P=m.current.getItem(w);return(P==null?void 0:P.type)==="item"?P:null}).filter(w=>w!==null),M=[...c.getKeys()].map(w=>{const P=c.getItem(w);return(P==null?void 0:P.type)==="item"?P:null}).filter(w=>w!==null);var f,u;const I=((f=N==null?void 0:N.length)!==null&&f!==void 0?f:0)-((u=M==null?void 0:M.length)!==null&&u!==void 0?u:0);var h,S,y;let k=Math.min(I>1?Math.max(((h=E==null?void 0:E.index)!==null&&h!==void 0?h:0)-I+1,0):(S=E==null?void 0:E.index)!==null&&S!==void 0?S:0,((y=M==null?void 0:M.length)!==null&&y!==void 0?y:0)-1),V=null,A=!1;for(;k>=0;){if(!p.isDisabled(M[k].key)){V=M[k];break}if(k<M.length-1&&!A)k++;else{A=!0;var T,C;k>((T=E==null?void 0:E.index)!==null&&T!==void 0?T:0)&&(k=(C=E==null?void 0:E.index)!==null&&C!==void 0?C:0),k--}}r.setFocusedKey(V?V.key:null)}m.current=c},[c,p,r,r.focusedKey]),{collection:c,disabledKeys:a,selectionManager:p}}function dD(e){var t;let[n,r]=Pm(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),a=x.useMemo(()=>n!=null?[n]:[],[n]),{collection:s,disabledKeys:l,selectionManager:c}=cD({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:m=>{if(m==="all")return;var f;let u=(f=m.values().next().value)!==null&&f!==void 0?f:null;u===n&&e.onSelectionChange&&e.onSelectionChange(u),r(u)}}),p=n!=null?s.getItem(n):null;return{collection:s,disabledKeys:l,selectionManager:c,selectedKey:n,setSelectedKey:r,selectedItem:p}}function pD(e){var t;let n=dD({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:df(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:r,collection:a,selectedKey:s}=n,l=x.useRef(s);return x.useEffect(()=>{let c=s;(r.isEmpty||!a.getItem(c))&&(c=df(a,n.disabledKeys),c!=null&&r.setSelectedKeys([c])),(c!=null&&r.focusedKey==null||!r.isFocused&&c!==l.current)&&r.setFocusedKey(c),l.current=c}),{...n,isDisabled:e.isDisabled||!1}}function df(e,t){let n=null;if(e){var r,a,s,l;for(n=e.getFirstKey();(t.has(n)||!((a=e.getItem(n))===null||a===void 0||(r=a.props)===null||r===void 0)&&r.isDisabled)&&n!==e.getLastKey();)n=e.getKeyAfter(n);(t.has(n)||!((l=e.getItem(n))===null||l===void 0||(s=l.props)===null||s===void 0)&&s.isDisabled)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}const uD={},mD={};function pl(e){const t=pD(e),n=o.useRef(null),{tabListProps:r}=aD(e,t,n);return o.createElement(o.Fragment,null,o.createElement("div",{...r,ref:n,className:"sps-nav sps-nav--tabs sps-tabs-v2"},[...t.collection].map(a=>o.createElement(af,{key:a.key,item:a,state:t}))),o.createElement(sf,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(pl,{props:uD,propTypes:mD,displayName:"SpsTabsV2"});const fD={};function ul({children:e,className:t,...n}){return o.createElement("div",{className:Y("sps-card__footer",t),...n},e)}Object.assign(ul,{props:fD,displayName:"SpsCardV2Footer"});const hD={};function ml({children:e,className:t,...n}){return o.createElement("div",{className:Y("sps-card__header",t),...n},e)}Object.assign(ml,{props:hD,displayName:"SpsCardV2Header"});const SD={};function pf({children:e,className:t,...n}){const[r,a,s,l,c]=It(e,[{type:ml},{type:pl},{type:Ih.Tabs},{type:ul}]),p=a.length>0?a:s;return o.createElement("div",{className:Y("sps-card",t),...n},r,p.length>0?p:o.createElement("div",{className:"sps-card__body"},c),l)}Object.assign(pf,{props:SD,displayName:"SpsCardV2"});const gD={};function uf({children:e,className:t,...n}){return o.createElement("div",{className:Y("sps-card__title",t),...n},e)}Object.assign(uf,{props:gD,displayName:"SpsCardV2Title"});const bD={...Hp,controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"};function mf(e){const{children:t,className:n,controlsDisabled:r,footerLinks:a,formArray:s,formGroup:l,formMeta:c,isOpen:p,onClear:m,onSubmit:f,unsafelyReplaceClassName:u,...h}=e,{t:S}=o.useContext(He);function y(){m&&m()}const T=Y(u||"sps-advanced-search",p&&"sps-advanced-search--open",n);return o.createElement("div",{className:T,...h},o.createElement(no,{onSubmit:f,formArray:s,formGroup:l,formMeta:c},o.createElement("div",{className:"sps-advanced-search__form"},t),o.createElement("div",{className:"sps-advanced-search__footer"},a&&o.createElement("div",{id:"footer_links"},vt(a)),o.createElement("div",{className:"sps-advanced-search__footer-controls"},o.createElement(Ue,{kind:G.ButtonKind.DEFAULT,type:G.ButtonType.BUTTON,className:"mr-2",onClick:y,disabled:r},S("design-system:advancedSearch.clear")),o.createElement(Ue,{kind:G.ButtonKind.KEY,type:G.ButtonType.SUBMIT,disabled:r},S("design-system:advancedSearch.search"))))))}Object.assign(mf,{props:bD,displayName:"SpsAdvancedSearch"});const vD={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>o.createElement(o.Fragment,null,o.createElement("p",null,'Advanced Search is comprised of a panel of input fields, and a text button that exposes and hides the panel. By default, the Advanced Search panel is hidden (with the exception of "Advanced Search Only" scenarios).'),o.createElement("p",null,"Advanced Search works in conjunction with the"," ",o.createElement(e,{to:"list-toolbar"},"List Bar")," and"," ",o.createElement(e,{to:"search-results-bar"},"Search Results")," components. Refer to those pages for additional details."),o.createElement("p",null,"Use the following guidelines when including Advanced Search on your page:",o.createElement("ul",null,o.createElement("li",null,"The Advanced Search Panel can contain any number of input fields."),o.createElement("li",null,"The Advanced Search Panel can place input fields in any unique layout to best serve the needs of the search criteria, but must adhere to the rules of the"," ",o.createElement(t,{to:"/style-and-layout/grid/"},"SPS Grid")," and guidelines for"," ",o.createElement(e,{to:"form"},"Form Layouts"),"."))))},basic:{label:"Basic Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("p",null,"A Basic Advanced Search consists of the List Bar with a search input and an Advanced Search text button. For more details on additional button and component options in the List Bar reference the ",o.createElement(e,{to:"list-toolbar"},"List Bar")," page.")),examples:{basic:{react:v.code`
|
|
9140
|
+
`}}}},Ww={Autocomplete:{components:[Jt],examples:fc},Checkboxes:{components:[Fn],examples:hc},"Clickable Tags":{components:[Br],examples:Sc},"Column Chooser":{components:[ci,zo],examples:Gp},"Conditional Fields":{description:()=>o.createElement("p",null,"A conditional field is one that is only available when a certain option is selected amongst a set of checkboxes or radio buttons."),components:[Wi],examples:mm},"Content Rows":{components:[di,Gn,jo],examples:Yp},"Content Sections":{components:[bi],examples:bu},"Date Pickers":{components:[pi],examples:Xp},"Date Range Pickers":{components:[mi],examples:tu},"Date Time Range Pickers":{components:[fi],examples:su},Datetime:{components:[Si],examples:lu},"Time Input":{components:[Yi],examples:gm},"Description Lists":{description:()=>o.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[Zo,Xo,ea],examples:Su},Dropdown:{components:[zn,gi],examples:gu},"Filter Panel":{components:[Vi,$i,Ki,Hi],examples:um},Form:{components:[no],examples:Wp},Incrementor:{components:[vi],examples:vu},Label:{description:()=>o.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[yi],examples:yu},"List Action Bar":{description:()=>o.createElement("p",null,"The List Action Bar contains the action buttons relevant to selected items from a Table List, Row List, or Card List. The List Action Bar is only visible when one or more list items have been selected and appears anchored to the bottom of the page above all other content."),components:[Ti],examples:Fu},"Micro Block":{components:[Ei],examples:Vu},Modals:{description:()=>o.createElement("p",null,"Modals are overlays on a page that focus a user’s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),components:[wi,na],examples:Ku},"Multi Select":{description:()=>o.createElement("p",null,"Multi-Selects consist of a Label and a dropdown menu from which a user selects one or more values from a list of pre-defined options."),components:[Di],examples:Hu},"Multi Value Text Input":{description:()=>o.createElement("p",null,"To be determined."),components:[Gi],examples:hm},Pagination:{description:()=>o.createElement("p",null,"The Pagination component allows users to navigate lists of records and control the number of records displayed on each page. The records can span across multiple pages, or within sections of a page."),components:[Ni,ra],examples:Wu},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[ki],examples:Gu},Selects:{description:"Selects consist off a Label and a dropdown menu from which a user selects a value from a list of pre-defined options.",components:[Yn],examples:nu},"Side Navigation":{description:"Side Navigations are used to provide quick access to a series of related pages or content. It can be used to navigate between different page views, or as an anchor-style menu to scroll to specific content on the same page.",components:[Uu],examples:zu},"Split Button":{components:[Ii],examples:ju},"Summary List Row":{components:[xi,Mi,oo],examples:qu},Tables:{description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("div",{className:"sps-body-14"},"Tables (along with ",o.createElement(e,{to:"content-rows"},"Content Rows")," and"," ",o.createElement(e,{to:"content-tiles"},"Content Tiles"),") are one of three options for displaying a list of records on a page."),o.createElement("br",null),o.createElement("div",{className:"sps-body-14"},"Tables are the ideal solution for displaying tabular data, especially when the listed records contain a considerable amount of data points. While tables are primarily used to display an extensive list of records, often in a paginated format, they can also be used to display smaller sets of tabular data in any context.")),components:[jn,Cn,pe,wn,ot,Ge],examples:Au},"Task Queue":{components:[_i],examples:Ju},"Text Inputs":{description:()=>o.createElement("p",null,"Text Inputs consist of a Label and a field in which a user enters a short value."),components:[aa],examples:Zu},"Text Areas":{description:()=>o.createElement("p",null,"Text Areas consist of a Label and a field in which a user enters a long value."),components:[Li],examples:Xu},Toggles:{description:()=>o.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[Oi],examples:em},Tooltips:{components:[Lt,Pi],examples:tm},Wizard:{components:[Bi,Ai],examples:om},Workflow:{components:[sa,ia,la,ca],examples:pm,notices:[Rw]},"Slide In Panels":{description:"",components:[Ci],examples:$u}},bm=new WeakMap;function da(e,t,n){return e?(typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${bm.get(e)}-${n}-${t}`):""}const ao=typeof document<"u"?x.useLayoutEffect:()=>{};function yr(e){const t=x.useRef(null);return ao(()=>{t.current=e},[e]),x.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const pa={prefix:String(Math.round(Math.random()*1e10)),current:0},vm=x.createContext(pa),Gw=x.createContext(!1);let Yw=!!(typeof window<"u"&&window.document&&window.document.createElement),Ui=new WeakMap;function Uw(e=!1){let t=x.useContext(vm),n=x.useRef(null);if(n.current===null&&!e){var r,a;let s=(a=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let l=Ui.get(s);l==null?Ui.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==l.state&&(t.current=l.id,Ui.delete(s))}n.current=++t.current}return n.current}function zw(e){let t=x.useContext(vm);t===pa&&!Yw&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Uw(!!e),r=t===pa&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function jw(e){let t=x.useId(),[n]=x.useState(ym()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${pa.prefix}`;return e||`${r}-${t}`}const qw=typeof x.useId=="function"?jw:zw;function Jw(){return!1}function Zw(){return!0}function Xw(e){return()=>{}}function ym(){return typeof x.useSyncExternalStore=="function"?x.useSyncExternalStore(Xw,Jw,Zw):x.useContext(Gw)}let Qw=!!(typeof window<"u"&&window.document&&window.document.createElement),Dn=new Map;function Tm(e){let[t,n]=x.useState(e),r=x.useRef(null),a=qw(t),s=x.useCallback(l=>{r.current=l},[]);return Qw&&(Dn.has(a)&&!Dn.get(a).includes(s)?Dn.set(a,[...Dn.get(a),s]):Dn.set(a,[s])),ao(()=>{let l=a;return()=>{Dn.delete(l)}},[a]),x.useEffect(()=>{let l=r.current;l&&(r.current=null,n(l))}),a}function eC(e,t){if(e===t)return e;let n=Dn.get(e);if(n)return n.forEach(a=>a(t)),t;let r=Dn.get(t);return r?(r.forEach(a=>a(e)),e):t}function Em(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Nt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},qn=e=>e&&"window"in e&&e.window===e?e:Nt(e).defaultView||window;function wm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=wm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tC(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=wm(e))&&(r&&(r+=" "),r+=t);return r}function Nn(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let a in r){let s=t[a],l=r[a];typeof s=="function"&&typeof l=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Em(s,l):(a==="className"||a==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?t[a]=tC(s,l):a==="id"&&s&&l?t.id=eC(s,l):t[a]=l!==void 0?l:s}}return t}const nC=new Set(["id"]),rC=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),oC=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),aC=/^(data-.*)$/;function sC(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,s={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(nC.has(l)||n&&rC.has(l)||r&&oC.has(l)||a!=null&&a.has(l)||aC.test(l))&&(s[l]=e[l]);return s}function nn(e){if(iC())e.focus({preventScroll:!0});else{let t=lC(e);e.focus(),cC(t)}}let ua=null;function iC(){if(ua==null){ua=!1;try{document.createElement("div").focus({get preventScroll(){return ua=!0,!0}})}catch{}}return ua}function lC(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function cC(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function ma(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function zi(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function rn(e){let t=null;return()=>(t==null&&(t=e()),t)}const Jn=rn(function(){return zi(/^Mac/i)}),dC=rn(function(){return zi(/^iPhone/i)}),Cm=rn(function(){return zi(/^iPad/i)||Jn()&&navigator.maxTouchPoints>1}),ji=rn(function(){return dC()||Cm()}),pC=rn(function(){return Jn()||ji()}),uC=rn(function(){return ma(/AppleWebKit/i)&&!mC()}),mC=rn(function(){return ma(/Chrome/i)}),Dm=rn(function(){return ma(/Android/i)}),fC=rn(function(){return ma(/Firefox/i)}),hC=x.createContext({isNative:!0,open:gC,useHref:e=>e});function qi(){return x.useContext(hC)}function Zn(e,t,n=!0){var r,a;let{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}=t;fC()&&(!((a=window.event)===null||a===void 0||(r=a.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Jn()?s=!0:l=!0);let m=uC()&&Jn()&&!Cm()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}):new MouseEvent("click",{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p,bubbles:!0,cancelable:!0});Zn.isOpening=n,nn(e),e.dispatchEvent(m),Zn.isOpening=!1}Zn.isOpening=!1;function SC(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function gC(e,t){SC(e,n=>Zn(n,t))}function bC(e){let t=qi();var n;const r=t.useHref((n=e==null?void 0:e.href)!==null&&n!==void 0?n:"");return{href:e!=null&&e.href?r:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}let Tr=new Map,Ji=new Set;function Nm(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=Tr.get(r.target);a||(a=new Set,Tr.set(r.target,a),r.target.addEventListener("transitioncancel",n,{once:!0})),a.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let a=Tr.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),Tr.delete(r.target)),Tr.size===0)){for(let s of Ji)s();Ji.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Nm():document.addEventListener("DOMContentLoaded",Nm));function km(e){requestAnimationFrame(()=>{Tr.size===0?e():Ji.add(e)})}function Im(){let e=x.useRef(new Map),t=x.useCallback((a,s,l,c)=>{let p=c!=null&&c.once?(...m)=>{e.current.delete(l),l(...m)}:l;e.current.set(l,{type:s,eventTarget:a,fn:p,options:c}),a.addEventListener(s,l,c)},[]),n=x.useCallback((a,s,l,c)=>{var p;let m=((p=e.current.get(l))===null||p===void 0?void 0:p.fn)||l;a.removeEventListener(s,m,c),e.current.delete(l)},[]),r=x.useCallback(()=>{e.current.forEach((a,s)=>{n(a.eventTarget,a.type,s,a.options)})},[n]);return x.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function xm(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=Tm(n),a&&r?a=[...new Set([n,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!r&&!a&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":a}}function vC(e,t){ao(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function yC(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function TC(e,t){const n=[];for(;e&&e!==document.documentElement;)yC(e,t)&&n.push(e),e=e.parentElement;return n}let EC=0;const Zi=new Map;function wC(e){let[t,n]=x.useState();return ao(()=>{if(!e)return;let r=Zi.get(e);if(r)n(r.element.id);else{let a=`react-aria-description-${EC++}`;n(a);let s=document.createElement("div");s.id=a,s.style.display="none",s.textContent=e,document.body.appendChild(s),r={refCount:0,element:s},Zi.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Zi.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Mm(e,t,n,r){let a=yr(n),s=n==null;x.useEffect(()=>{if(s||!e.current)return;let l=e.current;return l.addEventListener(t,a,r),()=>{l.removeEventListener(t,a,r)}},[e,t,r,s,a])}function _m(e,t){let n=Lm(e,t,"left"),r=Lm(e,t,"top"),a=t.offsetWidth,s=t.offsetHeight,l=e.scrollLeft,c=e.scrollTop,{borderTopWidth:p,borderLeftWidth:m}=getComputedStyle(e),f=e.scrollLeft+parseInt(m,10),u=e.scrollTop+parseInt(p,10),h=f+e.clientWidth,S=u+e.clientHeight;n<=l?l=n-parseInt(m,10):n+a>h&&(l+=n+a-h),r<=u?c=r-parseInt(p,10):r+s>S&&(c+=r+s-S),e.scrollLeft=l,e.scrollTop=c}function Lm(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){a-=e[r];break}t=t.offsetParent}return a}function Om(e,t){if(document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let p=TC(e);for(let m of p)_m(m,e)}else{var n;let{left:p,top:m}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:f,top:u}=e.getBoundingClientRect();if(Math.abs(p-f)>1||Math.abs(m-u)>1){var r,a,s;t==null||(a=t.containingElement)===null||a===void 0||(r=a.scrollIntoView)===null||r===void 0||r.call(a,{block:"center",inline:"center"}),(s=e.scrollIntoView)===null||s===void 0||s.call(e,{block:"nearest"})}}}}function Xi(e){return e.mozInputSource===0&&e.isTrusted?!0:Dm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function CC(e){return!Dm()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Pm(e,t,n){let[r,a]=x.useState(e||t),s=x.useRef(e!==void 0),l=e!==void 0;x.useEffect(()=>{let m=s.current;m!==l&&console.warn(`WARN: A component changed from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let c=l?e:r,p=x.useCallback((m,...f)=>{let u=(h,...S)=>{n&&(Object.is(c,h)||n(h,...S)),l||(c=h)};typeof m=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((S,...y)=>{let T=m(l?c:S,...y);return u(T,...f),l?S:T})):(l||a(m),u(m,...f))},[l,c,n]);return[c,p]}function Qi(e){return pC()?e.altKey:e.ctrlKey}function Er(e){return Jn()?e.metaKey:e.ctrlKey}const DC=1e3;function NC(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,a=x.useRef({search:"",timeout:null}).current,s=l=>{let c=kC(l.key);if(!c||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))return;c===" "&&a.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),a.search+=c;let p=t.getKeyForSearch(a.search,n.focusedKey);p==null&&(p=t.getKeyForSearch(a.search)),p!=null&&(n.setFocusedKey(p),r&&r(p)),clearTimeout(a.timeout),a.timeout=setTimeout(()=>{a.search=""},DC)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:null}}}function kC(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}let wr="default",el="",fa=new WeakMap;function Rm(e){if(ji()){if(wr==="default"){const t=Nt(e);el=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}wr="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(fa.set(e,e.style.userSelect),e.style.userSelect="none")}function ha(e){if(ji()){if(wr!=="disabled")return;wr="restoring",setTimeout(()=>{km(()=>{if(wr==="restoring"){const t=Nt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=el||""),el="",wr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&fa.has(e)){let t=fa.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),fa.delete(e)}}const Bm=x.createContext({register:()=>{}});Bm.displayName="PressResponderContext";function IC(e,t){return t.get?t.get.call(e):t.value}function Am(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function xC(e,t){var n=Am(e,t,"get");return IC(e,n)}function MC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _C(e,t,n){MC(e,t),t.set(e,n)}function LC(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Fm(e,t,n){var r=Am(e,t,"set");return LC(e,r,n),n}function OC(e){let t=x.useContext(Bm);if(t){let{register:n,...r}=t;e=Nn(r,e),n()}return vC(t,e.ref),e}var Sa=new WeakMap;class ga{continuePropagation(){Fm(this,Sa,!1)}get shouldStopPropagation(){return xC(this,Sa)}constructor(t,n,r,a){_C(this,Sa,{writable:!0,value:void 0}),Fm(this,Sa,!0);var s;let l=(s=a==null?void 0:a.target)!==null&&s!==void 0?s:r.currentTarget;const c=l==null?void 0:l.getBoundingClientRect();let p,m=0,f,u=null;r.clientX!=null&&r.clientY!=null&&(f=r.clientX,u=r.clientY),c&&(f!=null&&u!=null?(p=f-c.left,m=u-c.top):(p=c.width/2,m=c.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=p,this.y=m}}const Vm=Symbol("linkClicked");function $m(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:s,isDisabled:l,isPressed:c,preventFocusOnPress:p,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:f,ref:u,...h}=OC(e),[S,y]=x.useState(!1),T=x.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:C,removeAllGlobalListeners:E}=Im(),N=yr((w,P)=>{let O=T.current;if(l||O.didFirePressStart)return!1;let $=!0;if(O.isTriggeringEvent=!0,r){let z=new ga("pressstart",P,w);r(z),$=z.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,y(!0),$}),M=yr((w,P,O=!0)=>{let $=T.current;if(!$.didFirePressStart)return!1;$.ignoreClickAfterPress=!0,$.didFirePressStart=!1,$.isTriggeringEvent=!0;let z=!0;if(a){let L=new ga("pressend",P,w);a(L),z=L.shouldStopPropagation}if(n&&n(!1),y(!1),t&&O&&!l){let L=new ga("press",P,w);t(L),z&&(z=L.shouldStopPropagation)}return $.isTriggeringEvent=!1,z}),I=yr((w,P)=>{let O=T.current;if(l)return!1;if(s){O.isTriggeringEvent=!0;let $=new ga("pressup",P,w);return s($),O.isTriggeringEvent=!1,$.shouldStopPropagation}return!0}),k=yr(w=>{let P=T.current;P.isPressed&&P.target&&(P.isOverTarget&&P.pointerType!=null&&M(on(P.target,w),P.pointerType,!1),P.isPressed=!1,P.isOverTarget=!1,P.activePointerId=null,P.pointerType=null,E(),f||ha(P.target))}),V=yr(w=>{m&&k(w)}),A=x.useMemo(()=>{let w=T.current,P={onKeyDown($){if(nl($.nativeEvent,$.currentTarget)&&$.currentTarget.contains($.target)){var z;Wm($.target,$.key)&&$.preventDefault();let L=!0;if(!w.isPressed&&!$.repeat){w.target=$.currentTarget,w.isPressed=!0,L=N($,"keyboard");let J=$.currentTarget,B=te=>{nl(te,J)&&!te.repeat&&J.contains(te.target)&&w.target&&I(on(w.target,te),"keyboard")};C(Nt($.currentTarget),"keyup",Em(B,O),!0)}L&&$.stopPropagation(),$.metaKey&&Jn()&&((z=w.metaKeyEvents)===null||z===void 0||z.set($.key,$.nativeEvent))}else $.key==="Meta"&&(w.metaKeyEvents=new Map)},onClick($){if(!($&&!$.currentTarget.contains($.target))&&$&&$.button===0&&!w.isTriggeringEvent&&!Zn.isOpening){let z=!0;if(l&&$.preventDefault(),!w.ignoreClickAfterPress&&!w.ignoreEmulatedMouseEvents&&!w.isPressed&&(w.pointerType==="virtual"||Xi($.nativeEvent))){!l&&!p&&nn($.currentTarget);let L=N($,"virtual"),J=I($,"virtual"),B=M($,"virtual");z=L&&J&&B}w.ignoreEmulatedMouseEvents=!1,w.ignoreClickAfterPress=!1,z&&$.stopPropagation()}}},O=$=>{var z;if(w.isPressed&&w.target&&nl($,w.target)){var L;Wm($.target,$.key)&&$.preventDefault();let B=$.target;M(on(w.target,$),"keyboard",w.target.contains(B)),E(),$.key!=="Enter"&&tl(w.target)&&w.target.contains(B)&&!$[Vm]&&($[Vm]=!0,Zn(w.target,$,!1)),w.isPressed=!1,(L=w.metaKeyEvents)===null||L===void 0||L.delete($.key)}else if($.key==="Meta"&&(!((z=w.metaKeyEvents)===null||z===void 0)&&z.size)){var J;let B=w.metaKeyEvents;w.metaKeyEvents=void 0;for(let te of B.values())(J=w.target)===null||J===void 0||J.dispatchEvent(new KeyboardEvent("keyup",te))}};if(typeof PointerEvent<"u"){P.onPointerDown=B=>{if(B.button!==0||!B.currentTarget.contains(B.target))return;if(CC(B.nativeEvent)){w.pointerType="virtual";return}rl(B.currentTarget)&&B.preventDefault(),w.pointerType=B.pointerType;let te=!0;w.isPressed||(w.isPressed=!0,w.isOverTarget=!0,w.activePointerId=B.pointerId,w.target=B.currentTarget,!l&&!p&&nn(B.currentTarget),f||Rm(w.target),te=N(B,w.pointerType),C(Nt(B.currentTarget),"pointermove",$,!1),C(Nt(B.currentTarget),"pointerup",z,!1),C(Nt(B.currentTarget),"pointercancel",J,!1)),te&&B.stopPropagation()},P.onMouseDown=B=>{B.currentTarget.contains(B.target)&&B.button===0&&(rl(B.currentTarget)&&B.preventDefault(),B.stopPropagation())},P.onPointerUp=B=>{!B.currentTarget.contains(B.target)||w.pointerType==="virtual"||B.button===0&&Cr(B,B.currentTarget)&&I(B,w.pointerType||B.pointerType)};let $=B=>{B.pointerId===w.activePointerId&&(w.target&&Cr(B,w.target)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,N(on(w.target,B),w.pointerType)):w.target&&w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,M(on(w.target,B),w.pointerType,!1),V(B)))},z=B=>{B.pointerId===w.activePointerId&&w.isPressed&&B.button===0&&w.target&&(Cr(B,w.target)&&w.pointerType!=null?M(on(w.target,B),w.pointerType):w.isOverTarget&&w.pointerType!=null&&M(on(w.target,B),w.pointerType,!1),w.isPressed=!1,w.isOverTarget=!1,w.activePointerId=null,w.pointerType=null,E(),f||ha(w.target),"ontouchend"in w.target&&B.pointerType!=="mouse"&&C(w.target,"touchend",L,{once:!0}))},L=B=>{Hm(B.target)&&B.preventDefault()},J=B=>{k(B)};P.onDragStart=B=>{B.currentTarget.contains(B.target)&&k(B)}}else{P.onMouseDown=L=>{if(L.button!==0||!L.currentTarget.contains(L.target))return;if(rl(L.currentTarget)&&L.preventDefault(),w.ignoreEmulatedMouseEvents){L.stopPropagation();return}w.isPressed=!0,w.isOverTarget=!0,w.target=L.currentTarget,w.pointerType=Xi(L.nativeEvent)?"virtual":"mouse",!l&&!p&&nn(L.currentTarget),N(L,w.pointerType)&&L.stopPropagation(),C(Nt(L.currentTarget),"mouseup",$,!1)},P.onMouseEnter=L=>{if(!L.currentTarget.contains(L.target))return;let J=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!0,J=N(L,w.pointerType)),J&&L.stopPropagation()},P.onMouseLeave=L=>{if(!L.currentTarget.contains(L.target))return;let J=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!1,J=M(L,w.pointerType,!1),V(L)),J&&L.stopPropagation()},P.onMouseUp=L=>{L.currentTarget.contains(L.target)&&!w.ignoreEmulatedMouseEvents&&L.button===0&&I(L,w.pointerType||"mouse")};let $=L=>{if(L.button===0){if(w.isPressed=!1,E(),w.ignoreEmulatedMouseEvents){w.ignoreEmulatedMouseEvents=!1;return}w.target&&Cr(L,w.target)&&w.pointerType!=null?M(on(w.target,L),w.pointerType):w.target&&w.isOverTarget&&w.pointerType!=null&&M(on(w.target,L),w.pointerType,!1),w.isOverTarget=!1}};P.onTouchStart=L=>{if(!L.currentTarget.contains(L.target))return;let J=PC(L.nativeEvent);if(!J)return;w.activePointerId=J.identifier,w.ignoreEmulatedMouseEvents=!0,w.isOverTarget=!0,w.isPressed=!0,w.target=L.currentTarget,w.pointerType="touch",!l&&!p&&nn(L.currentTarget),f||Rm(w.target),N(kn(w.target,L),w.pointerType)&&L.stopPropagation(),C(qn(L.currentTarget),"scroll",z,!0)},P.onTouchMove=L=>{if(!L.currentTarget.contains(L.target))return;if(!w.isPressed){L.stopPropagation();return}let J=Km(L.nativeEvent,w.activePointerId),B=!0;J&&Cr(J,L.currentTarget)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,B=N(kn(w.target,L),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,B=M(kn(w.target,L),w.pointerType,!1),V(kn(w.target,L))),B&&L.stopPropagation()},P.onTouchEnd=L=>{if(!L.currentTarget.contains(L.target))return;if(!w.isPressed){L.stopPropagation();return}let J=Km(L.nativeEvent,w.activePointerId),B=!0;J&&Cr(J,L.currentTarget)&&w.pointerType!=null?(I(kn(w.target,L),w.pointerType),B=M(kn(w.target,L),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(B=M(kn(w.target,L),w.pointerType,!1)),B&&L.stopPropagation(),w.isPressed=!1,w.activePointerId=null,w.isOverTarget=!1,w.ignoreEmulatedMouseEvents=!0,w.target&&!f&&ha(w.target),E()},P.onTouchCancel=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),w.isPressed&&k(kn(w.target,L)))};let z=L=>{w.isPressed&&L.target.contains(w.target)&&k({currentTarget:w.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};P.onDragStart=L=>{L.currentTarget.contains(L.target)&&k(L)}}return P},[C,l,p,E,f,k,V,M,N,I]);return x.useEffect(()=>()=>{var w;f||ha((w=T.current.target)!==null&&w!==void 0?w:void 0)},[f]),{isPressed:c||S,pressProps:Nn(h,A)}}function tl(e){return e.tagName==="A"&&e.hasAttribute("href")}function nl(e,t){const{key:n,code:r}=e,a=t,s=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof qn(a).HTMLInputElement&&!Gm(a,n)||a instanceof qn(a).HTMLTextAreaElement||a.isContentEditable)&&!((s==="link"||!s&&tl(a))&&n!=="Enter")}function PC(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function Km(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const a=n[r];if(a.identifier===t)return a}return null}function kn(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function on(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function RC(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function BC(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Cr(e,t){let n=t.getBoundingClientRect(),r=RC(e);return BC(n,r)}function rl(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function Hm(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!tl(e)}function Wm(e,t){return e instanceof HTMLInputElement?!Gm(e,t):Hm(e)}const AC=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Gm(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":AC.has(e.type)}let so=null,FC=new Set,io=new Map,Xn=!1,ol=!1;function al(e,t){for(let n of FC)n(e,t)}function VC(e){return!(e.metaKey||!Jn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ba(e){Xn=!0,VC(e)&&(so="keyboard",al("keyboard",e))}function Ot(e){so="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Xn=!0,al("pointer",e))}function Ym(e){Xi(e)&&(Xn=!0,so="virtual")}function Um(e){e.target===window||e.target===document||(!Xn&&!ol&&(so="virtual",al("virtual",e)),Xn=!1,ol=!1)}function zm(){Xn=!1,ol=!0}function jm(e){if(typeof window>"u"||io.get(qn(e)))return;const t=qn(e),n=Nt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Xn=!0,r.apply(this,arguments)},n.addEventListener("keydown",ba,!0),n.addEventListener("keyup",ba,!0),n.addEventListener("click",Ym,!0),t.addEventListener("focus",Um,!0),t.addEventListener("blur",zm,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ot,!0),n.addEventListener("pointermove",Ot,!0),n.addEventListener("pointerup",Ot,!0)):(n.addEventListener("mousedown",Ot,!0),n.addEventListener("mousemove",Ot,!0),n.addEventListener("mouseup",Ot,!0)),t.addEventListener("beforeunload",()=>{qm(e)},{once:!0}),io.set(t,{focus:r})}const qm=(e,t)=>{const n=qn(e),r=Nt(e);t&&r.removeEventListener("DOMContentLoaded",t),io.has(n)&&(n.HTMLElement.prototype.focus=io.get(n).focus,r.removeEventListener("keydown",ba,!0),r.removeEventListener("keyup",ba,!0),r.removeEventListener("click",Ym,!0),n.removeEventListener("focus",Um,!0),n.removeEventListener("blur",zm,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ot,!0),r.removeEventListener("pointermove",Ot,!0),r.removeEventListener("pointerup",Ot,!0)):(r.removeEventListener("mousedown",Ot,!0),r.removeEventListener("mousemove",Ot,!0),r.removeEventListener("mouseup",Ot,!0)),io.delete(n))};function $C(e){const t=Nt(e);let n;return t.readyState!=="loading"?jm(e):(n=()=>{jm(e)},t.addEventListener("DOMContentLoaded",n)),()=>qm(e,n)}typeof document<"u"&&$C();function sl(){return so}const KC=500;function HC(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:a,threshold:s=KC,accessibilityDescription:l}=e;const c=x.useRef(void 0);let{addGlobalListener:p,removeGlobalListener:m}=Im(),{pressProps:f}=$m({isDisabled:t,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(n&&n({...h,type:"longpressstart"}),c.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),a&&a({...h,type:"longpress"}),c.current=void 0},s),h.pointerType==="touch")){let S=y=>{y.preventDefault()};p(h.target,"contextmenu",S,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{m(h.target,"contextmenu",S)},30)},{once:!0})}},onPressEnd(h){c.current&&clearTimeout(c.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),u=wC(a&&!t?l:void 0);return{longPressProps:Nn(f,u)}}function il(e){const t=Nt(e);if(sl()==="virtual"){let n=t.activeElement;km(()=>{t.activeElement===n&&e.isConnected&&nn(e)})}else nn(e)}function WC(e){const t=qn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,a=n!=="none"&&r!=="hidden"&&r!=="collapse";if(a){const{getComputedStyle:s}=e.ownerDocument.defaultView;let{display:l,visibility:c}=s(e);a=l!=="none"&&c!=="hidden"&&c!=="collapse"}return a}function GC(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Jm(e,t){return e.nodeName!=="#comment"&&WC(e)&&GC(e,t)&&(!e.parentElement||Jm(e.parentElement,e))}const ll=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],YC=ll.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ll.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const UC=ll.join(':not([hidden]):not([tabindex="-1"]),');function Zm(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Xm(e,t,n){let r=t!=null&&t.tabbable?UC:YC,a=Nt(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&Jm(s)&&(!n||Zm(s,n))&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}class cl{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let a=this.fastMap.get(n??null);if(!a)return;let s=new Qm({scopeRef:t});a.addChild(s),s.parent=a,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Zm(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let a=n.children;r&&(r.removeChild(n),a.size>0&&a.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new cl;var r;for(let a of this.traverse())n.addTreeNode(a.scopeRef,(r=(t=a.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,a.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Qm({scopeRef:null}),this.fastMap.set(null,this.root)}}class Qm{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new cl;function zC(e,t){let n=t==null?void 0:t.isDisabled,[r,a]=x.useState(!1);return ao(()=>{if(e!=null&&e.current&&!n){let s=()=>{if(e.current){let c=Xm(e.current,{tabbable:!0});a(!!c.nextNode())}};s();let l=new MutationObserver(s);return l.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{l.disconnect()}}}),n?!1:r}const jC=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),qC=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function JC(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return jC.has(n.script)}let t=e.split("-")[0];return qC.has(t)}const ZC=Symbol.for("react-aria.i18n.locale");function ef(){let e=typeof window<"u"&&window[ZC]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:JC(e)?"rtl":"ltr"}}let dl=ef(),lo=new Set;function tf(){dl=ef();for(let e of lo)e(dl)}function XC(){let e=ym(),[t,n]=x.useState(dl);return x.useEffect(()=>(lo.size===0&&window.addEventListener("languagechange",tf),lo.add(n),()=>{lo.delete(n),lo.size===0&&window.removeEventListener("languagechange",tf)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const QC=x.createContext(null);function nf(){let e=XC();return x.useContext(QC)||e}function eD(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:a=!1,shouldFocusWrap:s=!1,disallowEmptySelection:l=!1,disallowSelectAll:c=!1,selectOnFocus:p=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:f,allowsTabNavigation:u=!1,isVirtualized:h,scrollRef:S=r,linkBehavior:y="action"}=e,{direction:T}=nf(),C=qi(),E=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current.contains(O.target))return;const $=(U,R)=>{if(U!=null){if(t.isLink(U)&&y==="selection"&&p&&!Qi(O)){bo.flushSync(()=>{t.setFocusedKey(U,R)});let Z=S.current.querySelector(`[data-key="${CSS.escape(U.toString())}"]`),ae=t.getItemProps(U);C.open(Z,O,ae.href,ae.routerOptions);return}if(t.setFocusedKey(U,R),t.isLink(U)&&y==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(U):p&&!Qi(O)&&t.replaceSelection(U)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){var z,L,J;let U=t.focusedKey!=null?(z=n.getKeyBelow)===null||z===void 0?void 0:z.call(n,t.focusedKey):(L=n.getFirstKey)===null||L===void 0?void 0:L.call(n);U==null&&s&&(U=(J=n.getFirstKey)===null||J===void 0?void 0:J.call(n,t.focusedKey)),U!=null&&(O.preventDefault(),$(U))}break;case"ArrowUp":if(n.getKeyAbove){var B,te,H;let U=t.focusedKey!=null?(B=n.getKeyAbove)===null||B===void 0?void 0:B.call(n,t.focusedKey):(te=n.getLastKey)===null||te===void 0?void 0:te.call(n);U==null&&s&&(U=(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,t.focusedKey)),U!=null&&(O.preventDefault(),$(U))}break;case"ArrowLeft":if(n.getKeyLeftOf){var q,oe,W;let U=(q=n.getKeyLeftOf)===null||q===void 0?void 0:q.call(n,t.focusedKey);U==null&&s&&(U=T==="rtl"?(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey):(W=n.getLastKey)===null||W===void 0?void 0:W.call(n,t.focusedKey)),U!=null&&(O.preventDefault(),$(U,T==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var j,ne,re;let U=(j=n.getKeyRightOf)===null||j===void 0?void 0:j.call(n,t.focusedKey);U==null&&s&&(U=T==="rtl"?(ne=n.getLastKey)===null||ne===void 0?void 0:ne.call(n,t.focusedKey):(re=n.getFirstKey)===null||re===void 0?void 0:re.call(n,t.focusedKey)),U!=null&&(O.preventDefault(),$(U,T==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){O.preventDefault();let U=n.getFirstKey(t.focusedKey,Er(O));t.setFocusedKey(U),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(U):p&&t.replaceSelection(U)}break;case"End":if(n.getLastKey){O.preventDefault();let U=n.getLastKey(t.focusedKey,Er(O));t.setFocusedKey(U),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(U):p&&t.replaceSelection(U)}break;case"PageDown":if(n.getKeyPageBelow){let U=n.getKeyPageBelow(t.focusedKey);U!=null&&(O.preventDefault(),$(U))}break;case"PageUp":if(n.getKeyPageAbove){let U=n.getKeyPageAbove(t.focusedKey);U!=null&&(O.preventDefault(),$(U))}break;case"a":Er(O)&&t.selectionMode==="multiple"&&c!==!0&&(O.preventDefault(),t.selectAll());break;case"Escape":!l&&t.selectedKeys.size!==0&&(O.stopPropagation(),O.preventDefault(),t.clearSelection());break;case"Tab":if(!u){if(O.shiftKey)r.current.focus();else{let U=Xm(r.current,{tabbable:!0}),R,Z;do Z=U.lastChild(),Z&&(R=Z);while(Z);R&&!R.contains(document.activeElement)&&nn(R)}break}}},N=x.useRef({top:0,left:0});Mm(S,"scroll",h?null:()=>{N.current={top:S.current.scrollTop,left:S.current.scrollLeft}});let M=O=>{if(t.isFocused){O.currentTarget.contains(O.target)||t.setFocused(!1);return}if(O.currentTarget.contains(O.target)){if(t.setFocused(!0),t.focusedKey==null){let L=B=>{B!=null&&(t.setFocusedKey(B),p&&t.replaceSelection(B))},J=O.relatedTarget;var $,z;J&&O.currentTarget.compareDocumentPosition(J)&Node.DOCUMENT_POSITION_FOLLOWING?L(($=t.lastSelectedKey)!==null&&$!==void 0?$:n.getLastKey()):L((z=t.firstSelectedKey)!==null&&z!==void 0?z:n.getFirstKey())}else h||(S.current.scrollTop=N.current.top,S.current.scrollLeft=N.current.left);if(t.focusedKey!=null){let L=S.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);L&&(L.contains(document.activeElement)||nn(L),sl()==="keyboard"&&Om(L,{containingElement:r.current}))}}},I=O=>{O.currentTarget.contains(O.relatedTarget)||t.setFocused(!1)};const k=x.useRef(a);x.useEffect(()=>{if(k.current){let O=null;a==="first"&&(O=n.getFirstKey()),a==="last"&&(O=n.getLastKey());let $=t.selectedKeys;if($.size){for(let z of $)if(t.canSelectItem(z)){O=z;break}}t.setFocused(!0),t.setFocusedKey(O),O==null&&!f&&il(r.current)}},[]);let V=x.useRef(t.focusedKey);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==V.current||k.current)&&(S!=null&&S.current)){let O=sl(),$=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!$)return;(O==="keyboard"||k.current)&&(_m(S.current,$),O!=="virtual"&&Om($,{containingElement:r.current}))}!f&&t.isFocused&&t.focusedKey==null&&V.current!=null&&il(r.current),V.current=t.focusedKey,k.current=!1}),Mm(r,"react-aria-focus-scope-restore",O=>{O.preventDefault(),t.setFocused(!0)});let A={onKeyDown:E,onFocus:M,onBlur:I,onMouseDown(O){S.current===O.target&&O.preventDefault()}},{typeSelectProps:w}=NC({keyboardDelegate:n,selectionManager:t});m||(A=Nn(w,A));let P;return f||(P=t.focusedKey==null?0:-1),{collectionProps:{...A,tabIndex:P}}}function tD(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:a,shouldUseVirtualFocus:s,focus:l,isDisabled:c,onAction:p,allowsDifferentPressOrigin:m,linkBehavior:f="action"}=e,u=qi(),h=H=>{if(H.pointerType==="keyboard"&&Qi(H))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(f==="selection"){let q=t.getItemProps(n);u.open(r.current,H,q.href,q.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(f==="override"||f==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):H&&H.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||H&&(Er(H)||H.pointerType==="touch"||H.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};x.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!s&&(l?l():document.activeElement!==r.current&&il(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,s]),c=c||t.isDisabled(n);let S={};!s&&!c?S={tabIndex:n===t.focusedKey?0:-1,onFocus(H){H.target===r.current&&t.setFocusedKey(n)}}:c&&(S.onMouseDown=H=>{H.preventDefault()});let y=t.isLink(n)&&f==="override",T=t.isLink(n)&&f!=="selection"&&f!=="none",C=!c&&t.canSelectItem(n)&&!y,E=(p||T)&&!c,N=E&&(t.selectionBehavior==="replace"?!C:!C||t.isEmpty),M=E&&C&&t.selectionBehavior==="replace",I=N||M,k=x.useRef(null),V=I&&C,A=x.useRef(!1),w=x.useRef(!1),P=H=>{if(p&&p(),T){let q=t.getItemProps(n);u.open(r.current,H,q.href,q.routerOptions)}},O={};a?(O.onPressStart=H=>{k.current=H.pointerType,A.current=V,H.pointerType==="keyboard"&&(!I||of())&&h(H)},m?(O.onPressUp=N?null:H=>{H.pointerType!=="keyboard"&&C&&h(H)},O.onPress=N?P:null):O.onPress=H=>{if(N||M&&H.pointerType!=="mouse"){if(H.pointerType==="keyboard"&&!rf())return;P(H)}else H.pointerType!=="keyboard"&&C&&h(H)}):(O.onPressStart=H=>{k.current=H.pointerType,A.current=V,w.current=N,C&&(H.pointerType==="mouse"&&!N||H.pointerType==="keyboard"&&(!E||of()))&&h(H)},O.onPress=H=>{(H.pointerType==="touch"||H.pointerType==="pen"||H.pointerType==="virtual"||H.pointerType==="keyboard"&&I&&rf()||H.pointerType==="mouse"&&w.current)&&(I?P(H):C&&h(H))}),S["data-key"]=n,O.preventFocusOnPress=s;let{pressProps:$,isPressed:z}=$m(O),L=M?H=>{k.current==="mouse"&&(H.stopPropagation(),H.preventDefault(),P(H))}:void 0,{longPressProps:J}=HC({isDisabled:!V,onLongPress(H){H.pointerType==="touch"&&(h(H),t.setSelectionBehavior("toggle"))}}),B=H=>{k.current==="touch"&&A.current&&H.preventDefault()},te=t.isLink(n)?H=>{Zn.isOpening||H.preventDefault()}:void 0;return{itemProps:Nn(S,C||N?$:{},V?J:{},{onDoubleClick:L,onDragStartCapture:B,onClick:te}),isPressed:z,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:c,allowsSelection:C,hasAction:I}}function rf(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function of(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}function nD(e,t,n){let{key:r,isDisabled:a,shouldSelectOnPressUp:s}=e,{selectionManager:l,selectedKey:c}=t,p=r===c,m=a||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:f,isPressed:u}=tD({selectionManager:l,key:r,ref:n,isDisabled:m,shouldSelectOnPressUp:s,linkBehavior:"selection"}),h=da(t,r,"tab"),S=da(t,r,"tabpanel"),{tabIndex:y}=f,T=t.collection.getItem(r),C=sC(T==null?void 0:T.props,{labelable:!0});delete C.id;let E=bC(T==null?void 0:T.props);return{tabProps:Nn(C,E,f,{id:h,"aria-selected":p,"aria-disabled":m||void 0,"aria-controls":p?S:void 0,tabIndex:m?void 0:y,role:"tab"}),isSelected:p,isDisabled:m,isPressed:u}}function rD(e,t,n){let r=zC(n)?void 0:0;var a;const s=da(t,(a=e.id)!==null&&a!==void 0?a:t==null?void 0:t.selectedKey,"tabpanel"),l=xm({...e,id:s,"aria-labelledby":da(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:Nn(l,{tabIndex:r,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class oD{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}isDisabled(t){var n,r;return this.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.isDisabled(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.isDisabled(t)&&(t=this.getPreviousKey(t)),t}getKeyAbove(t){return this.tabDirection?null:this.getPreviousKey(t)}getKeyBelow(t){return this.tabDirection?null:this.getNextKey(t)}getNextKey(t){do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(this.isDisabled(t));return t}getPreviousKey(t){do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(this.isDisabled(t));return t}constructor(t,n,r,a=new Set){this.collection=t,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=a,this.tabDirection=r==="horizontal"}}function aD(e,t,n){let{orientation:r="horizontal",keyboardActivation:a="automatic"}=e,{collection:s,selectionManager:l,disabledKeys:c}=t,{direction:p}=nf(),m=x.useMemo(()=>new oD(s,p,r,c),[s,c,r,p]),{collectionProps:f}=eD({ref:n,selectionManager:l,keyboardDelegate:m,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),u=Tm();bm.set(t,u);let h=xm({...e,id:u});return{tabListProps:{...Nn(f,h),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function af({item:e,state:t}){const{key:n}=e,r=o.useRef(null),{tabProps:a}=nD({key:n},t,r),s=t.selectedKey===n,l=t.disabledKeys.has(n);return o.createElement("div",{...a,ref:r,className:Y("sps-nav__item","sps-nav__link",s&&"active",l&&"sps-nav__item--disabled")},e.rendered)}function sf({state:e,...t}){const n=o.useRef(null),{tabPanelProps:r}=rD(t,e,n);return o.createElement("div",{...r,ref:n,className:"sps-card__body"},e.selectedItem?e.selectedItem.props.children:null)}class lf{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){let n=this.keyMap.get(t);return(n==null?void 0:n.childNodes)||[]}constructor(t){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t;let n=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let c of l.childNodes)n(c)};for(let l of t)n(l);let r=null,a=0;for(let[l,c]of this.keyMap)r?(r.nextKey=l,c.prevKey=r.key):(this.firstKey=l,c.prevKey=void 0),c.type==="item"&&(c.index=a++),r=c,r.nextKey=void 0;var s;this.lastKey=(s=r==null?void 0:r.key)!==null&&s!==void 0?s:null}}class Kt extends Set{constructor(t,n,r){super(t),t instanceof Kt?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function sD(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function iD(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:a="toggle",disabledBehavior:s="all"}=e,l=x.useRef(!1),[,c]=x.useState(!1),p=x.useRef(null),m=x.useRef(null),[,f]=x.useState(null),u=x.useMemo(()=>cf(e.selectedKeys),[e.selectedKeys]),h=x.useMemo(()=>cf(e.defaultSelectedKeys,new Kt),[e.defaultSelectedKeys]),[S,y]=Pm(u,h,e.onSelectionChange),T=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[C,E]=x.useState(a);a==="replace"&&C==="toggle"&&typeof S=="object"&&S.size===0&&E("replace");let N=x.useRef(a);return x.useEffect(()=>{a!==N.current&&(E(a),N.current=a)},[a]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:C,setSelectionBehavior:E,get isFocused(){return l.current},setFocused(M){l.current=M,c(M)},get focusedKey(){return p.current},get childFocusStrategy(){return m.current},setFocusedKey(M,I="first"){p.current=M,m.current=I,f(M)},selectedKeys:S,setSelectedKeys(M){(r||!sD(M,S))&&y(M)},disabledKeys:T,disabledBehavior:s}}function cf(e,t){return e?e==="all"?"all":new Kt(e):t}class lD{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){return this.state.selectionMode==="none"?!1:(t=this.getKey(t),this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t))}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&or.compareNodeOrder(this.collection,r,t)<0)&&(t=r)}return t==null?void 0:t.key}get lastSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&or.compareNodeOrder(this.collection,r,t)>0)&&(t=r)}return t==null?void 0:t.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}t=this.getKey(t);let n;if(this.state.selectedKeys==="all")n=new Kt([t],t,t);else{let s=this.state.selectedKeys;var r;let l=(r=s.anchorKey)!==null&&r!==void 0?r:t;n=new Kt(s,l,t);var a;for(let c of this.getKeyRange(l,(a=s.currentKey)!==null&&a!==void 0?a:t))n.delete(c);for(let c of this.getKeyRange(t,l))this.canSelectItem(c)&&n.add(c)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let r=this.collection.getItem(t),a=this.collection.getItem(n);return r&&a?or.compareNodeOrder(this.collection,r,a)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let a=[],s=t;for(;s!=null;){let l=this.collection.getItem(s);if((l&&l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&a.push(s),s===n)return a;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}if(t=this.getKey(t),t==null)return;let n=new Kt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none"||(t=this.getKey(t),t==null))return;let n=this.canSelectItem(t)?new Kt([t],t,t):new Kt;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Kt;for(let r of t)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){let a=this.collection.getItem(r);a.type==="item"&&t.push(r),a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n(or.getFirstItem(or.getChildNodes(a,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Kt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}constructor(t,n,r){this.collection=t,this.state=n;var a;this.allowsCellSelection=(a=r==null?void 0:r.allowsCellSelection)!==null&&a!==void 0?a:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function cD(e){let{filter:t,layoutDelegate:n}=e,r=iD(e),a=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=x.useCallback(f=>t?new lf(t(f)):new lf(f),[t]),l=x.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),c=or.useCollection(e,s,l),p=x.useMemo(()=>new lD(c,r,{layoutDelegate:n}),[c,r,n]);const m=x.useRef(null);return x.useEffect(()=>{if(r.focusedKey!=null&&!c.getItem(r.focusedKey)&&m.current){const E=m.current.getItem(r.focusedKey),N=[...m.current.getKeys()].map(w=>{const P=m.current.getItem(w);return(P==null?void 0:P.type)==="item"?P:null}).filter(w=>w!==null),M=[...c.getKeys()].map(w=>{const P=c.getItem(w);return(P==null?void 0:P.type)==="item"?P:null}).filter(w=>w!==null);var f,u;const I=((f=N==null?void 0:N.length)!==null&&f!==void 0?f:0)-((u=M==null?void 0:M.length)!==null&&u!==void 0?u:0);var h,S,y;let k=Math.min(I>1?Math.max(((h=E==null?void 0:E.index)!==null&&h!==void 0?h:0)-I+1,0):(S=E==null?void 0:E.index)!==null&&S!==void 0?S:0,((y=M==null?void 0:M.length)!==null&&y!==void 0?y:0)-1),V=null,A=!1;for(;k>=0;){if(!p.isDisabled(M[k].key)){V=M[k];break}if(k<M.length-1&&!A)k++;else{A=!0;var T,C;k>((T=E==null?void 0:E.index)!==null&&T!==void 0?T:0)&&(k=(C=E==null?void 0:E.index)!==null&&C!==void 0?C:0),k--}}r.setFocusedKey(V?V.key:null)}m.current=c},[c,p,r,r.focusedKey]),{collection:c,disabledKeys:a,selectionManager:p}}function dD(e){var t;let[n,r]=Pm(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),a=x.useMemo(()=>n!=null?[n]:[],[n]),{collection:s,disabledKeys:l,selectionManager:c}=cD({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:m=>{if(m==="all")return;var f;let u=(f=m.values().next().value)!==null&&f!==void 0?f:null;u===n&&e.onSelectionChange&&e.onSelectionChange(u),r(u)}}),p=n!=null?s.getItem(n):null;return{collection:s,disabledKeys:l,selectionManager:c,selectedKey:n,setSelectedKey:r,selectedItem:p}}function pD(e){var t;let n=dD({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:df(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:r,collection:a,selectedKey:s}=n,l=x.useRef(s);return x.useEffect(()=>{let c=s;(r.isEmpty||!a.getItem(c))&&(c=df(a,n.disabledKeys),c!=null&&r.setSelectedKeys([c])),(c!=null&&r.focusedKey==null||!r.isFocused&&c!==l.current)&&r.setFocusedKey(c),l.current=c}),{...n,isDisabled:e.isDisabled||!1}}function df(e,t){let n=null;if(e){var r,a,s,l;for(n=e.getFirstKey();(t.has(n)||!((a=e.getItem(n))===null||a===void 0||(r=a.props)===null||r===void 0)&&r.isDisabled)&&n!==e.getLastKey();)n=e.getKeyAfter(n);(t.has(n)||!((l=e.getItem(n))===null||l===void 0||(s=l.props)===null||s===void 0)&&s.isDisabled)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}const uD={},mD={};function pl(e){const t=pD(e),n=o.useRef(null),{tabListProps:r}=aD(e,t,n);return o.createElement(o.Fragment,null,o.createElement("div",{...r,ref:n,className:"sps-nav sps-nav--tabs sps-tabs-v2"},[...t.collection].map(a=>o.createElement(af,{key:a.key,item:a,state:t}))),o.createElement(sf,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(pl,{props:uD,propTypes:mD,displayName:"SpsTabsV2"});const fD={};function ul({children:e,className:t,...n}){return o.createElement("div",{className:Y("sps-card__footer",t),...n},e)}Object.assign(ul,{props:fD,displayName:"SpsCardV2Footer"});const hD={};function ml({children:e,className:t,...n}){return o.createElement("div",{className:Y("sps-card__header",t),...n},e)}Object.assign(ml,{props:hD,displayName:"SpsCardV2Header"});const SD={};function pf({children:e,className:t,...n}){const[r,a,s,l,c]=It(e,[{type:ml},{type:pl},{type:Ih.Tabs},{type:ul}]),p=a.length>0?a:s;return o.createElement("div",{className:Y("sps-card",t),...n},r,p.length>0?p:o.createElement("div",{className:"sps-card__body"},c),l)}Object.assign(pf,{props:SD,displayName:"SpsCardV2"});const gD={};function uf({children:e,className:t,...n}){return o.createElement("div",{className:Y("sps-card__title",t),...n},e)}Object.assign(uf,{props:gD,displayName:"SpsCardV2Title"});const bD={...Hp,controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"};function mf(e){const{children:t,className:n,controlsDisabled:r,footerLinks:a,formArray:s,formGroup:l,formMeta:c,isOpen:p,onClear:m,onSubmit:f,unsafelyReplaceClassName:u,...h}=e,{t:S}=o.useContext(He);function y(){m&&m()}const T=Y(u||"sps-advanced-search",p&&"sps-advanced-search--open",n);return o.createElement("div",{className:T,...h},o.createElement(no,{onSubmit:f,formArray:s,formGroup:l,formMeta:c},o.createElement("div",{className:"sps-advanced-search__form"},t),o.createElement("div",{className:"sps-advanced-search__footer"},a&&o.createElement("div",{id:"footer_links"},vt(a)),o.createElement("div",{className:"sps-advanced-search__footer-controls"},o.createElement(Ue,{kind:G.ButtonKind.DEFAULT,type:G.ButtonType.BUTTON,className:"mr-2",onClick:y,disabled:r},S("design-system:advancedSearch.clear")),o.createElement(Ue,{kind:G.ButtonKind.KEY,type:G.ButtonType.SUBMIT,disabled:r},S("design-system:advancedSearch.search"))))))}Object.assign(mf,{props:bD,displayName:"SpsAdvancedSearch"});const vD={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>o.createElement(o.Fragment,null,o.createElement("p",null,'Advanced Search is comprised of a panel of input fields, and a text button that exposes and hides the panel. By default, the Advanced Search panel is hidden (with the exception of "Advanced Search Only" scenarios).'),o.createElement("p",null,"Advanced Search works in conjunction with the"," ",o.createElement(e,{to:"list-toolbar"},"List Bar")," and"," ",o.createElement(e,{to:"search-results-bar"},"Search Results")," components. Refer to those pages for additional details."),o.createElement("p",null,"Use the following guidelines when including Advanced Search on your page:",o.createElement("ul",null,o.createElement("li",null,"The Advanced Search Panel can contain any number of input fields."),o.createElement("li",null,"The Advanced Search Panel can place input fields in any unique layout to best serve the needs of the search criteria, but must adhere to the rules of the"," ",o.createElement(t,{to:"/style-and-layout/grid/"},"SPS Grid")," and guidelines for"," ",o.createElement(e,{to:"form"},"Form Layouts"),"."))))},basic:{label:"Basic Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("p",null,"A Basic Advanced Search consists of the List Bar with a search input and an Advanced Search text button. For more details on additional button and component options in the List Bar reference the ",o.createElement(e,{to:"list-toolbar"},"List Bar")," page.")),examples:{basic:{react:v.code`
|
|
9141
9141
|
import {
|
|
9142
9142
|
SpsListToolbar,
|
|
9143
9143
|
SpsListToolbarSearch,
|
|
@@ -10033,7 +10033,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10033
10033
|
</>
|
|
10034
10034
|
)
|
|
10035
10035
|
}
|
|
10036
|
-
`}}}},$D={onSubmit:"FormEventHandler"};function bl(e){const{children:t,onSubmit:n}=e;function r(a){a.preventDefault(),n&&n(a)}return o.createElement("form",{onSubmit:r,className:"sps-list-toolbar__search-form",noValidate:!0},o.createElement(br,{className:"sps-list-toolbar__search-field"},t))}Object.assign(bl,{props:$D,displayName:"SpsListToolbarSearch"});const KD={};function vl(e){const{children:t}=e;return o.createElement("div",null,t)}Object.assign(vl,{props:KD,displayName:"SpsListToolbarSearchInfo"});const HD={activeTab:"SpsTab",advancedSearch:"{ isOpen: boolean, enteredFields: number }",onToggleAdvancedSearch:"(boolean) => void",onTabChange:"(SpsTab) => void",title:"string",tabs:"Array<SpsTab>",onToolbarPinned:"(boolean) => void",selectable:"boolean",isSelected:"boolean",isIndeterminate:"boolean",onSelectionChange:"(boolean) => void",pinResultsBar:"boolean",pinToolbar:"boolean"};function Tf(e){const{activeTab:t,advancedSearch:n,children:r,className:a,onToggleAdvancedSearch:s,onTabChange:l,tabs:c,title:p,unsafelyReplaceClassName:m,onToolbarPinned:f,selectable:u,isSelected:h,isIndeterminate:S,onSelectionChange:y,pinResultsBar:T,pinToolbar:C=!0,"data-testid":E,...N}=e,{t:M}=o.useContext(He);let I=null;const[k,V]=o.useState(!1),A=o.useRef(null),w=o.useRef(null),P=v.lockToAnimationFrames(()=>{if(A.current&&C){const oe=A.current.getBoundingClientRect();oe&&oe.height>0&&oe.top<=60&&(typeof I=="number"?window.scrollY<I&&(I=null,V(!1)):(I=window.scrollY,V(!0),s&&s(!1)))}});o.useEffect(()=>(window.addEventListener("scroll",P),()=>{window.removeEventListener("scroll",P)}),[]);const O=o.useRef();o.useLayoutEffect(()=>{if(w.current&&A.current&&C){if(k&&O.current)w.current.style.height=O.current.height,w.current.style.width=O.current.width,w.current.style.marginBottom=O.current.marginBottom;else if(!k){w.current.style.height="",w.current.style.width="",w.current.style.marginBottom="";const oe=window.getComputedStyle(A.current);O.current={height:oe.height,width:oe.width,marginBottom:oe.marginBottom}}}},[k]);function $(oe){l&&l(oe)}function z(){s&&s(!(n!=null&&n.isOpen))}function L(oe){f&&f(oe)}o.useEffect(()=>{L(k)},[k]);const J=Y(m||"sps-list-toolbar",k&&C&&"sps-list-toolbar--pinned",k&&C&&"z-stratum-toolbar",n&&n.isOpen&&"sps-list-toolbar--advanced-search-open",a),[B,te,H,q]=It(r,[{type:bl},{type:vl},{type:gl}]);return o.createElement("div",{className:"sps-list-toolbar__wrapper",ref:w},o.createElement("div",{className:J,"data-testid":E,ref:A,...N},o.createElement("div",{className:"sps-list-toolbar__content"},!!u&&o.createElement("div",{className:"sps-list-toolbar__selection-controls"},o.createElement(Fn,{checked:h,indeterminate:S,onChange:()=>{y==null||y(!h)}})),c&&o.createElement(vf,{tabs:c,onTabChange:$,activeTab:t,"data-testid":`${E}__tabs`}),o.createElement("div",{className:"sps-list-toolbar__search-controls"},!p&&B,!p&&te,B.length>0&&n&&o.createElement("div",{className:"sps-list-toolbar__advanced-search-toggle","data-testid":`${E}__advanced-search`},o.createElement("div",{className:"sps-list-toolbar__advanced-search-toggle-button-wrapper"},o.createElement(Ue,{kind:G.ButtonKind.LINK,onClick:z},M("design-system:listToolbar.advancedSearchToggle"))),(n.enteredFields||0)>0&&o.createElement(Ft,{"data-testid":`${E}__entered_fields`,kind:G.TagKind.INFO},o.createElement("span",null,n.enteredFields))),p&&o.createElement("div",{"data-testid":`${E}-title`,className:"sps-list-toolbar__advanced-search-title"},p)),k?o.createElement("div",{className:"sps-list-toolbar__header-content"},o.createElement(kt.Provider,{value:{fixed:!0}},q)):o.createElement("div",{className:"sps-list-toolbar__header-content"},q)),o.createElement("div",null,(!k||T)&&H)))}Object.assign(Tf,{props:HD,displayName:"SpsListToolbar"});const WD={options:"SortOption[]",activeOption:"SortOption",onSortChange:"(option: SortOption) => void",defaultOption:"SortOption"};function Ef(e){const{options:t,onSortChange:n,defaultOption:r,activeOption:a,className:s,unsafelyReplaceClassName:l}=e,c=(t||[]).map(m=>[{label:m.label,icon:m.icon},()=>{n&&n(m)}]),p=Y(l||"sps-list-toolbar-sort-by",s);return o.createElement(zn,{className:p,icon:(a==null?void 0:a.icon)||(r==null?void 0:r.icon),label:(a==null?void 0:a.label)||(r==null?void 0:r.label),options:c})}Object.assign(Ef,{props:WD,displayName:"SpsListToolbarSortBy"});function wf(){const[e,t]=o.useState(!1);function n(){t(!1)}function r(){t(!0)}return o.createElement(o.Fragment,null,o.createElement("p",null,"The List Bar is divided into a number of different sections. It spans the entire width of the corresponding list."),o.createElement(Ue,{kind:G.ButtonKind.LINK,onClick:r},"View Content Order Example"),o.createElement(hl,{isOpen:e,onClose:n},o.createElement("h1",null,"Content Order"),o.createElement("img",{src:"assets/images/list-toolbar-example.svg",alt:"A List Toolbar with labels on each section",className:"w-100 mb-3"}),o.createElement(jn,null,o.createElement(wn,null,o.createElement(
|
|
10036
|
+
`}}}},$D={onSubmit:"FormEventHandler"};function bl(e){const{children:t,onSubmit:n}=e;function r(a){a.preventDefault(),n&&n(a)}return o.createElement("form",{onSubmit:r,className:"sps-list-toolbar__search-form",noValidate:!0},o.createElement(br,{className:"sps-list-toolbar__search-field"},t))}Object.assign(bl,{props:$D,displayName:"SpsListToolbarSearch"});const KD={};function vl(e){const{children:t}=e;return o.createElement("div",null,t)}Object.assign(vl,{props:KD,displayName:"SpsListToolbarSearchInfo"});const HD={activeTab:"SpsTab",advancedSearch:"{ isOpen: boolean, enteredFields: number }",onToggleAdvancedSearch:"(boolean) => void",onTabChange:"(SpsTab) => void",title:"string",tabs:"Array<SpsTab>",onToolbarPinned:"(boolean) => void",selectable:"boolean",isSelected:"boolean",isIndeterminate:"boolean",onSelectionChange:"(boolean) => void",pinResultsBar:"boolean",pinToolbar:"boolean"};function Tf(e){const{activeTab:t,advancedSearch:n,children:r,className:a,onToggleAdvancedSearch:s,onTabChange:l,tabs:c,title:p,unsafelyReplaceClassName:m,onToolbarPinned:f,selectable:u,isSelected:h,isIndeterminate:S,onSelectionChange:y,pinResultsBar:T,pinToolbar:C=!0,"data-testid":E,...N}=e,{t:M}=o.useContext(He);let I=null;const[k,V]=o.useState(!1),A=o.useRef(null),w=o.useRef(null),P=v.lockToAnimationFrames(()=>{if(A.current&&C){const oe=A.current.getBoundingClientRect();oe&&oe.height>0&&oe.top<=60&&(typeof I=="number"?window.scrollY<I&&(I=null,V(!1)):(I=window.scrollY,V(!0),s&&s(!1)))}});o.useEffect(()=>(window.addEventListener("scroll",P),()=>{window.removeEventListener("scroll",P)}),[]);const O=o.useRef();o.useLayoutEffect(()=>{if(w.current&&A.current&&C){if(k&&O.current)w.current.style.height=O.current.height,w.current.style.width=O.current.width,w.current.style.marginBottom=O.current.marginBottom;else if(!k){w.current.style.height="",w.current.style.width="",w.current.style.marginBottom="";const oe=window.getComputedStyle(A.current);O.current={height:oe.height,width:oe.width,marginBottom:oe.marginBottom}}}},[k]);function $(oe){l&&l(oe)}function z(){s&&s(!(n!=null&&n.isOpen))}function L(oe){f&&f(oe)}o.useEffect(()=>{L(k)},[k]);const J=Y(m||"sps-list-toolbar",k&&C&&"sps-list-toolbar--pinned",k&&C&&"z-stratum-toolbar",n&&n.isOpen&&"sps-list-toolbar--advanced-search-open",a),[B,te,H,q]=It(r,[{type:bl},{type:vl},{type:gl}]);return o.createElement("div",{className:"sps-list-toolbar__wrapper",ref:w},o.createElement("div",{className:J,"data-testid":E,ref:A,...N},o.createElement("div",{className:"sps-list-toolbar__content"},!!u&&o.createElement("div",{className:"sps-list-toolbar__selection-controls"},o.createElement(Fn,{checked:h,indeterminate:S,onChange:()=>{y==null||y(!h)}})),c&&o.createElement(vf,{tabs:c,onTabChange:$,activeTab:t,"data-testid":`${E}__tabs`}),o.createElement("div",{className:"sps-list-toolbar__search-controls"},!p&&B,!p&&te,B.length>0&&n&&o.createElement("div",{className:"sps-list-toolbar__advanced-search-toggle","data-testid":`${E}__advanced-search`},o.createElement("div",{className:"sps-list-toolbar__advanced-search-toggle-button-wrapper"},o.createElement(Ue,{kind:G.ButtonKind.LINK,onClick:z},M("design-system:listToolbar.advancedSearchToggle"))),(n.enteredFields||0)>0&&o.createElement(Ft,{"data-testid":`${E}__entered_fields`,kind:G.TagKind.INFO},o.createElement("span",null,n.enteredFields))),p&&o.createElement("div",{"data-testid":`${E}-title`,className:"sps-list-toolbar__advanced-search-title"},p)),k?o.createElement("div",{className:"sps-list-toolbar__header-content"},o.createElement(kt.Provider,{value:{fixed:!0}},q)):o.createElement("div",{className:"sps-list-toolbar__header-content"},q)),o.createElement("div",null,(!k||T)&&H)))}Object.assign(Tf,{props:HD,displayName:"SpsListToolbar"});const WD={options:"SortOption[]",activeOption:"SortOption",onSortChange:"(option: SortOption) => void",defaultOption:"SortOption"};function Ef(e){const{options:t,onSortChange:n,defaultOption:r,activeOption:a,className:s,unsafelyReplaceClassName:l}=e,c=(t||[]).map(m=>[{label:m.label,icon:m.icon},()=>{n&&n(m)}]),p=Y(l||"sps-list-toolbar-sort-by",s);return o.createElement(zn,{className:p,icon:(a==null?void 0:a.icon)||(r==null?void 0:r.icon),label:(a==null?void 0:a.label)||(r==null?void 0:r.label),options:c})}Object.assign(Ef,{props:WD,displayName:"SpsListToolbarSortBy"});function wf(){const[e,t]=o.useState(!1);function n(){t(!1)}function r(){t(!0)}return o.createElement(o.Fragment,null,o.createElement("p",null,"The List Bar is divided into a number of different sections. It spans the entire width of the corresponding list."),o.createElement(Ue,{kind:G.ButtonKind.LINK,onClick:r},"View Content Order Example"),o.createElement(hl,{isOpen:e,onClose:n},o.createElement("h1",null,"Content Order"),o.createElement("img",{src:"assets/images/list-toolbar-example.svg",alt:"A List Toolbar with labels on each section",className:"w-100 mb-3"}),o.createElement(jn,null,o.createElement(wn,null,o.createElement(ot,{style:{width:"80px"}},"Order"),o.createElement(ot,null,"Section"),o.createElement(ot,null,"Notes")),o.createElement(Cn,null,o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"1")),o.createElement(pe,null,"Checkbox"),o.createElement(pe,null,"For Content Rows and Content Tiles only.")),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"2")),o.createElement(pe,null,"Search/Filter Box"),o.createElement(pe,null)),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"3")),o.createElement(pe,null,"Saved Search"),o.createElement(pe,null)),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"4")),o.createElement(pe,null,"Advanced Search"),o.createElement(pe,null,"For more information, visit the Advanced Search page.")),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"5")),o.createElement(pe,null,"Column Editor"),o.createElement(pe,{wrap:500},"Use for Tables only. For more information, visit the Column Editor page.")),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"6")),o.createElement(pe,null,"List View Selector"),o.createElement(pe,null)),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"7")),o.createElement(pe,null,"Sorting"),o.createElement(pe,null)),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"8")),o.createElement(pe,null,"Buttons"),o.createElement(pe,{wrap:500},"Buttons always appear in the rightmost section of the List Toolbar. For the ordering of Buttons, refer to the Button Groups section on the Buttons page."))))))}const GD={general:{label:"General Usage",description:()=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use a List Toolbar:"),o.createElement("ul",null,o.createElement("li",null,"When list content needs to be searched, filtered, sorted, or otherwise interacted with.")),o.createElement("h5",null,"Avoid a List Toolbar:"),o.createElement("ul",null,o.createElement("li",null,"When no list is present."),o.createElement("li",null,"When there will always be a small number of elements in the list, or the list does not require searching, filtering, or other actions.")))},contentOrder:{label:"Content Order",description:o.createElement(wf,null)},checkbox:{label:"Checkbox",description:({NavigateTo:e})=>o.createElement("p",null,"Use a Checkbox in the List Toolbar when items in a"," ",o.createElement(e,{to:"Content rows"},"Content Row")," or"," ",o.createElement(e,{to:"Content tiles"},"Content Tile")," are selectable. The Checkbox selects all items in the list, and will cause the Action Bar to appear. Do not use this with a Table, as Tables have a built-in checkbox in the header row."),examples:{checkbox:{react:v.code`
|
|
10037
10037
|
import {
|
|
10038
10038
|
SpsListToolbar,
|
|
10039
10039
|
SpsListToolbarSearch,
|
|
@@ -10863,7 +10863,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10863
10863
|
</SpsProductBar>
|
|
10864
10864
|
)
|
|
10865
10865
|
}
|
|
10866
|
-
`}}}},QD={percentComplete:"number",title:"string",detail:"string",disabled:"boolean",onClose:"() => void"};function If(e){const{children:t,className:n,detail:r,disabled:a,onClose:s,percentComplete:l=0,title:c,"data-testid":p,unsafelyReplaceClassName:m,...f}=e,{t:u}=o.useContext(He),h=Y(m||"sps-progress-bar",l===1&&"sps-progress-bar--complete",a&&"sps-progress-bar--disabled",n);return o.createElement("div",{className:h,...f},o.createElement("div",{className:"sps-progress-bar__content"},c&&o.createElement("div",{className:"sps-progress-bar__heading"},o.createElement("div",{className:"sps-progress-bar__title"},c),o.createElement("div",{className:"sps-progress-bar__percentage"},`${Math.floor(l*100)}%`)),o.createElement("div",{className:"sps-progress-bar__bar-background"},o.createElement("div",{className:"sps-progress-bar__bar-progress",style:{width:`${l*100}%`}})),r&&o.createElement("div",{className:"sps-progress-bar__detail"},r)),s&&o.createElement("div",{className:"sps-progress-bar__close-button"},o.createElement(Ue,{kind:G.ButtonKind.ICON,icon:G.SpsIcon.X,onClick:s,title:u("design-system:progressBar.closeButtonTitle")})))}Object.assign(If,{props:QD,displayName:"SpsProgressBar"});const eN={general:{label:"General Usage",customSection:()=>o.createElement(o.Fragment,null,o.createElement("h4",null,"General Usage"),o.createElement("p",null,"Progress Bars can be used in a variety of situations, but the most common use case is to show the live progress of a process such as a file upload or the processing of a digital payload."),o.createElement("p",null,"For processes that typically complete within minutes or less, opt for the Standard Progress Bar."),o.createElement("p",null,"For processes that are divided into specific steps that are accomplished over a longer period of time, opt for the Stepped Progress Bar."))},standard:{label:"Standard Progress Bar",description:()=>o.createElement(o.Fragment,null,o.createElement("p",null,"Standard Progress Bars are comprised of the following Required and Optional elements."),o.createElement("img",{src:"assets/images/progress-bar-example.svg",alt:"A Progress Bar with labels on each section",className:"w-100 mb-3"}),o.createElement(jn,null,o.createElement(wn,null,o.createElement(
|
|
10866
|
+
`}}}},QD={percentComplete:"number",title:"string",detail:"string",disabled:"boolean",onClose:"() => void"};function If(e){const{children:t,className:n,detail:r,disabled:a,onClose:s,percentComplete:l=0,title:c,"data-testid":p,unsafelyReplaceClassName:m,...f}=e,{t:u}=o.useContext(He),h=Y(m||"sps-progress-bar",l===1&&"sps-progress-bar--complete",a&&"sps-progress-bar--disabled",n);return o.createElement("div",{className:h,...f},o.createElement("div",{className:"sps-progress-bar__content"},c&&o.createElement("div",{className:"sps-progress-bar__heading"},o.createElement("div",{className:"sps-progress-bar__title"},c),o.createElement("div",{className:"sps-progress-bar__percentage"},`${Math.floor(l*100)}%`)),o.createElement("div",{className:"sps-progress-bar__bar-background"},o.createElement("div",{className:"sps-progress-bar__bar-progress",style:{width:`${l*100}%`}})),r&&o.createElement("div",{className:"sps-progress-bar__detail"},r)),s&&o.createElement("div",{className:"sps-progress-bar__close-button"},o.createElement(Ue,{kind:G.ButtonKind.ICON,icon:G.SpsIcon.X,onClick:s,title:u("design-system:progressBar.closeButtonTitle")})))}Object.assign(If,{props:QD,displayName:"SpsProgressBar"});const eN={general:{label:"General Usage",customSection:()=>o.createElement(o.Fragment,null,o.createElement("h4",null,"General Usage"),o.createElement("p",null,"Progress Bars can be used in a variety of situations, but the most common use case is to show the live progress of a process such as a file upload or the processing of a digital payload."),o.createElement("p",null,"For processes that typically complete within minutes or less, opt for the Standard Progress Bar."),o.createElement("p",null,"For processes that are divided into specific steps that are accomplished over a longer period of time, opt for the Stepped Progress Bar."))},standard:{label:"Standard Progress Bar",description:()=>o.createElement(o.Fragment,null,o.createElement("p",null,"Standard Progress Bars are comprised of the following Required and Optional elements."),o.createElement("img",{src:"assets/images/progress-bar-example.svg",alt:"A Progress Bar with labels on each section",className:"w-100 mb-3"}),o.createElement(jn,null,o.createElement(wn,null,o.createElement(ot,null,"Section"),o.createElement(ot,null,"Content Type"),o.createElement(ot,null,"Required"),o.createElement(ot,null,"Description/Guidelines")),o.createElement(Cn,null,o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"1")),o.createElement(pe,null,"Title"),o.createElement(pe,null,"No"),o.createElement(pe,{wrap:400},"Use the Title when it provides necessary or helpful detail about the file or action that is being processed.")),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"2")),o.createElement(pe,null,"Progress Meter"),o.createElement(pe,null,"Yes"),o.createElement(pe,null)),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"3")),o.createElement(pe,null,"Progress Counter"),o.createElement(pe,null,"No"),o.createElement(pe,{wrap:400},"The Progress Counter should not be used without the existence of a Title.")),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"4")),o.createElement(pe,null,"Clear Button"),o.createElement(pe,null,"No"),o.createElement(pe,{wrap:400},"If the process requires the option to be cancelled or removed from a list the clear button can be used.")),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"5")),o.createElement(pe,null,"Progress Details"),o.createElement(pe,null,"No"),o.createElement(pe,{wrap:400},"Progress Details provide more context for the user and are especially useful when the process includes multiple steps."))))),examples:{standard:{label:"Building Standard Progress Bars",description:()=>o.createElement("p",null,"The Standard Progress Bar is designed to expand to fit the entire width of its container. View the diagram above for rules regarding including or excluding certain elements."),react:v.code`
|
|
10867
10867
|
import { SpsCard, SpsProgressBar } from "@spscommerce/ds-react";
|
|
10868
10868
|
function Component() {
|
|
10869
10869
|
function handleClose() {
|
|
@@ -10973,7 +10973,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10973
10973
|
</>
|
|
10974
10974
|
)
|
|
10975
10975
|
}
|
|
10976
|
-
`}}}},iN={title:"string",stepsCount:"number",completedStepsCount:"number",disabled:"boolean",showStepsCounter:"boolean",color:"SteppedProgressBarColor",data:"SteppedProgressBarData[]"};function Lf(e){const{title:t,stepsCount:n,completedStepsCount:r=0,disabled:a,showStepsCounter:s,className:l,data:c,color:p=G.SteppedProgressBarColor.PURPLE}=e,m=Array.from(Array(n)).map((u,h)=>({id:Sn().current||void 0,...c==null?void 0:c.find(S=>S.index===h)})),f=Y("sps-stepped-progress-bar",`sps-stepped-progress-bar--${p}`,r===n&&"sps-stepped-progress-bar--complete",a&&"sps-stepped-progress-bar--disabled",l);return o.createElement("div",{className:f},o.createElement("div",{className:"sps-stepped-progress-bar__content"},(t||s)&&o.createElement("div",{className:"sps-progress-bar__heading"},t&&o.createElement("div",{className:"sps-progress-bar__title"},t),s&&o.createElement("div",{className:"sps-stepped-progress-bar__percentage"},`${r} of ${n} Complete`)),o.createElement("ul",{className:"sps-stepped-progress-bar__bar-background d-flex align-items-center list-unstyled mb-0"},m.map((u,h)=>o.createElement("li",{id:u.id,key:u.id,className:Y("sps-stepped-progress-bar__step",r>h&&!u.skipped&&"sps-stepped-progress-bar__step-complete")},u.icon&&o.createElement(Vt,{icon:u.icon,size:G.SpsIconSize.SMALL,className:Y("d-block",(u.index||0)>r-1?"gray400":"white")}),u.title&&u.id&&o.createElement(Lt,{for:u.id,title:u.title},u.description))))))}Object.assign(Lf,{props:iN,displayName:"SpsSteppedProgressBar"});const lN={standard:{label:"Stepped Progress Bar",description:()=>o.createElement(o.Fragment,null,o.createElement("p",null,"Stepped Progress Bars are comprised of the following Required and Optional elements."),o.createElement("img",{src:"assets/images/stepped-progress-bar-example.svg",alt:"A Progress Bar with labels on each section",className:"w-100 mb-3"}),o.createElement(jn,null,o.createElement(wn,null,o.createElement(
|
|
10976
|
+
`}}}},iN={title:"string",stepsCount:"number",completedStepsCount:"number",disabled:"boolean",showStepsCounter:"boolean",color:"SteppedProgressBarColor",data:"SteppedProgressBarData[]"};function Lf(e){const{title:t,stepsCount:n,completedStepsCount:r=0,disabled:a,showStepsCounter:s,className:l,data:c,color:p=G.SteppedProgressBarColor.PURPLE}=e,m=Array.from(Array(n)).map((u,h)=>({id:Sn().current||void 0,...c==null?void 0:c.find(S=>S.index===h)})),f=Y("sps-stepped-progress-bar",`sps-stepped-progress-bar--${p}`,r===n&&"sps-stepped-progress-bar--complete",a&&"sps-stepped-progress-bar--disabled",l);return o.createElement("div",{className:f},o.createElement("div",{className:"sps-stepped-progress-bar__content"},(t||s)&&o.createElement("div",{className:"sps-progress-bar__heading"},t&&o.createElement("div",{className:"sps-progress-bar__title"},t),s&&o.createElement("div",{className:"sps-stepped-progress-bar__percentage"},`${r} of ${n} Complete`)),o.createElement("ul",{className:"sps-stepped-progress-bar__bar-background d-flex align-items-center list-unstyled mb-0"},m.map((u,h)=>o.createElement("li",{id:u.id,key:u.id,className:Y("sps-stepped-progress-bar__step",r>h&&!u.skipped&&"sps-stepped-progress-bar__step-complete")},u.icon&&o.createElement(Vt,{icon:u.icon,size:G.SpsIconSize.SMALL,className:Y("d-block",(u.index||0)>r-1?"gray400":"white")}),u.title&&u.id&&o.createElement(Lt,{for:u.id,title:u.title},u.description))))))}Object.assign(Lf,{props:iN,displayName:"SpsSteppedProgressBar"});const lN={standard:{label:"Stepped Progress Bar",description:()=>o.createElement(o.Fragment,null,o.createElement("p",null,"Stepped Progress Bars are comprised of the following Required and Optional elements."),o.createElement("img",{src:"assets/images/stepped-progress-bar-example.svg",alt:"A Progress Bar with labels on each section",className:"w-100 mb-3"}),o.createElement(jn,null,o.createElement(wn,null,o.createElement(ot,null,"Section"),o.createElement(ot,null,"Content Type"),o.createElement(ot,null,"Required"),o.createElement(ot,null,"Description/Guidelines")),o.createElement(Cn,null,o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"1")),o.createElement(pe,null,"Title"),o.createElement(pe,null,"No"),o.createElement(pe,{wrap:400},"Use the Title when it provides necessary or helpful detail about the file or action that is being processed.")),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"2")),o.createElement(pe,null,"Progress Meter"),o.createElement(pe,null,"Yes"),o.createElement(pe,null)),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"3")),o.createElement(pe,null,"Progress Counter"),o.createElement(pe,null,"No"),o.createElement(pe,{wrap:400},"The Progress Counter should not be used without the existence of a Title.")),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"4")),o.createElement(pe,null,"Step icons"),o.createElement(pe,null,"No"),o.createElement(pe,{wrap:400},"Icons can be set inside of steps for visual emphasis.")),o.createElement(Ge,null,o.createElement(pe,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"5")),o.createElement(pe,null,"Step Tooltips"),o.createElement(pe,null,"No"),o.createElement(pe,{wrap:400},"Tooltips can be utilized to provide more details about each specific step. Tooltips can be exposed on click or hover."))))),examples:{standard:{description:()=>o.createElement(o.Fragment,null,o.createElement("h4",null,"Building Stepped Progress Bars"),o.createElement("p",null,"The Stepped Progress Bar is designed to expand to fit the entire width of its container. View the diagram above for rules regarding including or excluding certain elements.")),react:v.code`
|
|
10977
10977
|
import { SpsCard, SpsSteppedProgressBar } from "@spscommerce/ds-react";
|
|
10978
10978
|
function Component() {
|
|
10979
10979
|
const data = [
|
|
@@ -11441,4 +11441,4 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
11441
11441
|
</SpsCard>
|
|
11442
11442
|
</div>
|
|
11443
11443
|
</div>
|
|
11444
|
-
`}}}};_.AsTypingErrorKeys=sr,_.ContentOrderExample=wf,_.DEFAULT_DATETIME_PRESETS=au,_.DEFAULT_PRESETS=ui,_.DragDropContext=kp,_.Draggable=Vp,_.Droppable=ai,_.FauxChangeEvent=gn,_.I18nContext=He,_.MANIFEST=Ww,_.ModalAction=Cf,_.OnBlurErrorKeys=Et,_.OnSubmitErrorKeys=vo,_.PortalContext=kt,_.PreventativeErrorKeys=zt,_.Provide=dc,_.SimpleDateUtils=Q,_.SpsAddRemoveFormRowExamples=ME,_.SpsAdvancedSearch=mf,_.SpsAdvancedSearchExamples=vD,_.SpsApp=vS,_.SpsAutocomplete=Jt,_.SpsAutocompleteExamples=fc,_.SpsButton=Ue,_.SpsButtonExamples=pw,_.SpsButtonGroup=Ru,_.SpsCard=ii,_.SpsCardTabbedPane=si,_.SpsCardV2=pf,_.SpsCardV2Footer=ul,_.SpsCardV2Header=ml,_.SpsCardV2Title=uf,_.SpsCheckbox=Fn,_.SpsCheckboxDropdown=gi,_.SpsCheckboxExamples=hc,_.SpsClickableTag=Br,_.SpsClickableTagExamples=Sc,_.SpsColumnChooser=ci,_.SpsColumnChooserColumn=zo,_.SpsColumnChooserExamples=Gp,_.SpsConditionalField=Wi,_.SpsConditionalFieldExamples=mm,_.SpsContentRow=di,_.SpsContentRowCol=Gn,_.SpsContentRowExamples=Yp,_.SpsContentRowExpansion=jo,_.SpsContextBar=yD,_.SpsCurrencyInput=ff,_.SpsCurrencyInputExamples=CD,_.SpsDateRangePicker=mi,_.SpsDateRangePickerExamples=tu,_.SpsDateTime=Si,_.SpsDateTimeRangePicker=fi,_.SpsDateTimeRangePickerExamples=su,_.SpsDatepicker=pi,_.SpsDatepickerExamples=Xp,_.SpsDatetimeExamples=lu,_.SpsDd=uu,_.SpsDescriptionList=Zo,_.SpsDescriptionListDefinition=Xo,_.SpsDescriptionListExamples=Su,_.SpsDescriptionListTerm=ea,_.SpsDl=du,_.SpsDropdown=zn,_.SpsDropdownExamples=gu,_.SpsDt=hu,_.SpsFeedbackBlock=Fi,_.SpsFeedbackBlockExamples=Pw,_.SpsFieldset=bi,_.SpsFieldsetExamples=bu,_.SpsFilterPanel=Vi,_.SpsFilterPanelCap=Ki,_.SpsFilterPanelExamples=um,_.SpsFilterPanelFilterBox=Hi,_.SpsFilterPanelSection=$i,_.SpsFilterTile=Rf,_.SpsFilterTileList=Bf,_.SpsFilterTileListExamples=fN,_.SpsFocusedTask=hl,_.SpsFocusedTaskActions=fl,_.SpsFocusedTaskExamples=kD,_.SpsForm=no,_.SpsFormArrayMeta=tc,_.SpsFormComponentWrapper=at,_.SpsFormExamples=Wp,_.SpsFormFieldMeta=Or,_.SpsFormGroupMeta=ec,_.SpsFormMetaBase=Rn,_.SpsFormSetMeta=Bn,_.SpsGrowler=Sl,_.SpsGrowlerExamples=MD,_.SpsI=Vt,_.SpsIconButtonPanel=Bu,_.SpsIncrementor=vi,_.SpsIncrementorExamples=vu,_.SpsInputGroup=br,_.SpsInsightTile=hf,_.SpsInsights=_D,_.SpsKeyValueList=Sf,_.SpsKeyValueListItem=gf,_.SpsKeyValueTag=bf,_.SpsKeyValueTagExamples=BD,_.SpsLabel=yi,_.SpsLabelExamples=yu,_.SpsListActionBar=Ti,_.SpsListActionBarExamples=Fu,_.SpsListToolbar=Tf,_.SpsListToolbarExamples=GD,_.SpsListToolbarSearch=bl,_.SpsListToolbarSearchInfo=vl,_.SpsListToolbarSortBy=Ef,_.SpsMicroBlock=Ei,_.SpsMicroBlockExamples=Vu,_.SpsMicroZeroState=Vf,_.SpsModal=wi,_.SpsModalExamples=Ku,_.SpsModalFooter=na,_.SpsMultiSelect=Di,_.SpsMultiSelectExamples=Hu,_.SpsMultiValueTextInput=Gi,_.SpsMultiValueTextInputExamples=hm,_.SpsPageSelector=ra,_.SpsPageSubtitle=Nf,_.SpsPageTitle=Df,_.SpsPageTitleExamples=qD,_.SpsPagination=Ni,_.SpsPaginationExamples=Wu,_.SpsProductBar=kf,_.SpsProductBarExamples=XD,_.SpsProductBarTab=yl,_.SpsProgressBar=If,_.SpsProgressBarExamples=eN,_.SpsProgressRing=Ri,_.SpsRadioButton=ki,_.SpsRadioButtonExamples=Gu,_.SpsScrollableContainer=xf,_.SpsSearchResultsBar=yf,_.SpsSearchResultsBarExamples=VD,_.SpsSearchResultsBarV2=gl,_.SpsSelect=Yn,_.SpsSelectExamples=nu,_.SpsSideNav=Uu,_.SpsSideNavExamples=zu,_.SpsSlackLink=Mf,_.SpsSlackLinkExamples=rN,_.SpsSlideInPanel=Ci,_.SpsSlideInPanelExamples=$u,_.SpsSortingHeader=_f,_.SpsSortingHeaderCell=Tl,_.SpsSortingHeaderExamples=sN,_.SpsSpinner=Ha,_.SpsSplitButton=Ii,_.SpsSplitButtonExamples=ju,_.SpsSteppedProgressBar=Lf,_.SpsSteppedProgressBarExamples=lN,_.SpsSummaryListColumn=Mi,_.SpsSummaryListExamples=qu,_.SpsSummaryListExpansion=oo,_.SpsSummaryListRow=xi,_.SpsTab=af,_.SpsTabPanel=sf,_.SpsTable=jn,_.SpsTableBody=Cn,_.SpsTableCell=pe,_.SpsTableExamples=Au,_.SpsTableHead=wn,_.SpsTableHeader=
|
|
11444
|
+
`}}}};_.AsTypingErrorKeys=sr,_.ContentOrderExample=wf,_.DEFAULT_DATETIME_PRESETS=au,_.DEFAULT_PRESETS=ui,_.DragDropContext=kp,_.Draggable=Vp,_.Droppable=ai,_.FauxChangeEvent=gn,_.I18nContext=He,_.MANIFEST=Ww,_.ModalAction=Cf,_.OnBlurErrorKeys=Et,_.OnSubmitErrorKeys=vo,_.PortalContext=kt,_.PreventativeErrorKeys=zt,_.Provide=dc,_.SimpleDateUtils=Q,_.SpsAddRemoveFormRowExamples=ME,_.SpsAdvancedSearch=mf,_.SpsAdvancedSearchExamples=vD,_.SpsApp=vS,_.SpsAutocomplete=Jt,_.SpsAutocompleteExamples=fc,_.SpsButton=Ue,_.SpsButtonExamples=pw,_.SpsButtonGroup=Ru,_.SpsCard=ii,_.SpsCardTabbedPane=si,_.SpsCardV2=pf,_.SpsCardV2Footer=ul,_.SpsCardV2Header=ml,_.SpsCardV2Title=uf,_.SpsCheckbox=Fn,_.SpsCheckboxDropdown=gi,_.SpsCheckboxExamples=hc,_.SpsClickableTag=Br,_.SpsClickableTagExamples=Sc,_.SpsColumnChooser=ci,_.SpsColumnChooserColumn=zo,_.SpsColumnChooserExamples=Gp,_.SpsConditionalField=Wi,_.SpsConditionalFieldExamples=mm,_.SpsContentRow=di,_.SpsContentRowCol=Gn,_.SpsContentRowExamples=Yp,_.SpsContentRowExpansion=jo,_.SpsContextBar=yD,_.SpsCurrencyInput=ff,_.SpsCurrencyInputExamples=CD,_.SpsDateRangePicker=mi,_.SpsDateRangePickerExamples=tu,_.SpsDateTime=Si,_.SpsDateTimeRangePicker=fi,_.SpsDateTimeRangePickerExamples=su,_.SpsDatepicker=pi,_.SpsDatepickerExamples=Xp,_.SpsDatetimeExamples=lu,_.SpsDd=uu,_.SpsDescriptionList=Zo,_.SpsDescriptionListDefinition=Xo,_.SpsDescriptionListExamples=Su,_.SpsDescriptionListTerm=ea,_.SpsDl=du,_.SpsDropdown=zn,_.SpsDropdownExamples=gu,_.SpsDt=hu,_.SpsFeedbackBlock=Fi,_.SpsFeedbackBlockExamples=Pw,_.SpsFieldset=bi,_.SpsFieldsetExamples=bu,_.SpsFilterPanel=Vi,_.SpsFilterPanelCap=Ki,_.SpsFilterPanelExamples=um,_.SpsFilterPanelFilterBox=Hi,_.SpsFilterPanelSection=$i,_.SpsFilterTile=Rf,_.SpsFilterTileList=Bf,_.SpsFilterTileListExamples=fN,_.SpsFocusedTask=hl,_.SpsFocusedTaskActions=fl,_.SpsFocusedTaskExamples=kD,_.SpsForm=no,_.SpsFormArrayMeta=tc,_.SpsFormComponentWrapper=at,_.SpsFormExamples=Wp,_.SpsFormFieldMeta=Or,_.SpsFormGroupMeta=ec,_.SpsFormMetaBase=Rn,_.SpsFormSetMeta=Bn,_.SpsGrowler=Sl,_.SpsGrowlerExamples=MD,_.SpsI=Vt,_.SpsIconButtonPanel=Bu,_.SpsIncrementor=vi,_.SpsIncrementorExamples=vu,_.SpsInputGroup=br,_.SpsInsightTile=hf,_.SpsInsights=_D,_.SpsKeyValueList=Sf,_.SpsKeyValueListItem=gf,_.SpsKeyValueTag=bf,_.SpsKeyValueTagExamples=BD,_.SpsLabel=yi,_.SpsLabelExamples=yu,_.SpsListActionBar=Ti,_.SpsListActionBarExamples=Fu,_.SpsListToolbar=Tf,_.SpsListToolbarExamples=GD,_.SpsListToolbarSearch=bl,_.SpsListToolbarSearchInfo=vl,_.SpsListToolbarSortBy=Ef,_.SpsMicroBlock=Ei,_.SpsMicroBlockExamples=Vu,_.SpsMicroZeroState=Vf,_.SpsModal=wi,_.SpsModalExamples=Ku,_.SpsModalFooter=na,_.SpsMultiSelect=Di,_.SpsMultiSelectExamples=Hu,_.SpsMultiValueTextInput=Gi,_.SpsMultiValueTextInputExamples=hm,_.SpsPageSelector=ra,_.SpsPageSubtitle=Nf,_.SpsPageTitle=Df,_.SpsPageTitleExamples=qD,_.SpsPagination=Ni,_.SpsPaginationExamples=Wu,_.SpsProductBar=kf,_.SpsProductBarExamples=XD,_.SpsProductBarTab=yl,_.SpsProgressBar=If,_.SpsProgressBarExamples=eN,_.SpsProgressRing=Ri,_.SpsRadioButton=ki,_.SpsRadioButtonExamples=Gu,_.SpsScrollableContainer=xf,_.SpsSearchResultsBar=yf,_.SpsSearchResultsBarExamples=VD,_.SpsSearchResultsBarV2=gl,_.SpsSelect=Yn,_.SpsSelectExamples=nu,_.SpsSideNav=Uu,_.SpsSideNavExamples=zu,_.SpsSlackLink=Mf,_.SpsSlackLinkExamples=rN,_.SpsSlideInPanel=Ci,_.SpsSlideInPanelExamples=$u,_.SpsSortingHeader=_f,_.SpsSortingHeaderCell=Tl,_.SpsSortingHeaderExamples=sN,_.SpsSpinner=Ha,_.SpsSplitButton=Ii,_.SpsSplitButtonExamples=ju,_.SpsSteppedProgressBar=Lf,_.SpsSteppedProgressBarExamples=lN,_.SpsSummaryListColumn=Mi,_.SpsSummaryListExamples=qu,_.SpsSummaryListExpansion=oo,_.SpsSummaryListRow=xi,_.SpsTab=af,_.SpsTabPanel=sf,_.SpsTable=jn,_.SpsTableBody=Cn,_.SpsTableCell=pe,_.SpsTableExamples=Au,_.SpsTableHead=wn,_.SpsTableHeader=ot,_.SpsTableRow=Ge,_.SpsTabsV2=pl,_.SpsTag=Ft,_.SpsTagExamples=fw,_.SpsTaskQueue=_i,_.SpsTaskQueueExamples=Ju,_.SpsTbody=Lu,_.SpsTd=Pu,_.SpsTextInput=aa,_.SpsTextInputExamples=Zu,_.SpsTextarea=Li,_.SpsTextareaExamples=Xu,_.SpsTh=Nu,_.SpsThead=Iu,_.SpsTile=Of,_.SpsTileList=Pf,_.SpsTileListExamples=pN,_.SpsTimeInput=Yi,_.SpsTimeInputExamples=gm,_.SpsToggle=Oi,_.SpsToggleExamples=em,_.SpsTooltip=Lt,_.SpsTooltipExamples=tm,_.SpsTooltipTitle=Pi,_.SpsTr=Mu,_.SpsValidators=To,_.SpsVerticalRule=El,_.SpsVr=Ff,_.SpsWf=rm,_.SpsWfDoc=sm,_.SpsWfDs=lm,_.SpsWfStep=dm,_.SpsWizardExamples=om,_.SpsWizardSidebar=Bi,_.SpsWizardSubstep=Ai,_.SpsWorkflow=sa,_.SpsWorkflowDocument=ia,_.SpsWorkflowDocumentStatus=la,_.SpsWorkflowExamples=pm,_.SpsWorkflowStep=ca,_.SpsZeroState=$f,_.SpsZeroStateExamples=gN,_.TooltipVisibility=_e,_.ValidationMode=jt,_.addOnChangeErrorKey=ql,_.addOnSubmitErrorKey=Jl,_.bindProps=bS,_.contentOf=vt,_.date=Lr,_.dateConstraint=Ql,_.dateRange=Xl,_.findParentBranches=oa,_.flipPosition=Wa,_.formArray=DE,_.formControl=NE,_.formGroup=kE,_.getMember=li,_.getPosition=An,_.letterAndNumberKeys=Ga,_.resetServerContext=CT,_.selectChildren=It,_.setDateFormat=Zl,_.toggleTooltipState=Qo,_.useCheckDeprecatedProps=pc,_.useColumnCellResizer=Cu,_.useColumnHeaderResizer=wu,_.useCustomValidator=aS,_.useDidUpdateEffect=Ya,_.useDocumentEventListener=Ua,_.useElementId=Sn,_.useForm=IE,_.useGrowlers=xD,_.useInputPopup=dr,_.useKeyboardSensor=Tp,_.useModals=YD,_.useMouseSensor=yp,_.usePatchReducer=qt,_.usePortal=cr,_.useServerSideValidation=xE,_.useSpsAction=UD,_.useSpsForm=nc,_.useTouchSensor=Ep,_.validate=Eo,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|