@spscommerce/ds-react 8.32.1 → 8.32.2
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 +89 -98
- package/lib/index.umd.cjs +20 -20
- 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,Ze,Y,yo,Oa,xh,ar,Hl){"use strict";var Zx=Object.defineProperty;var kh=_=>{throw TypeError(_)};var Xx=(_,x,v)=>x in _?Zx(_,x,{enumerable:!0,configurable:!0,writable:!0,value:v}):_[x]=v;var zt=(_,x,v)=>Xx(_,typeof x!="symbol"?x+"":x,v),Ih=(_,x,v)=>x.has(_)||kh("Cannot "+v);var or=(_,x,v)=>(Ih(_,x,"read from private field"),v?v.call(_):x.get(_)),La=(_,x,v)=>x.has(_)?kh("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(_):x.set(_,v),Sn=(_,x,v,Ze)=>(Ih(_,x,"write to private field"),Ze?Ze.call(_,v):x.set(_,v),v);var er,xn,Mn;function Wl(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=Wl(x),sr=Wl(Ze);function Gl(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=Gl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function U(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Gl(e))&&(r&&(r+=" "),r+=t);return r}const Mh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ft=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Mh[n[e]&63];return t};function gn(e){return x.useRef(e||ft())}function ht(e,t){const n=gn(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 jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _h="[object Object]";function Lh(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function Oh(e,t){return function(n){return e(t(n))}}var Rh=Function.prototype,Yl=Object.prototype,Ul=Rh.toString,Bh=Yl.hasOwnProperty,Ph=Ul.call(Object),Ah=Yl.toString,Fh=Oh(Object.getPrototypeOf,Object);function Vh(e){return!!e&&typeof e=="object"}function $h(e){if(!Vh(e)||Ah.call(e)!=_h||Lh(e))return!1;var t=Fh(e);if(t===null)return!0;var n=Bh.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ul.call(n)==Ph}var Kh=$h;const zl=Ra(Kh),Ct=new Set,ir=new Set,qt=new Set,To=new Set;function jl(e){Ct.has(e)||qt.has(e)||To.has(e)||ir.add(e)}function ql(e){Ct.has(e)||qt.has(e)||ir.has(e)||To.add(e)}const at=sr.default||sr,lr="MM/DD/YYYY",Hh="MM/DD/YYYY hh:mm A",Wh="MM/DD/YYYY HH:mm",Gh="hh:mm A",Yh="HH:mm",Uh=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,Lr=Symbol("Date Parse Error");function cr(e){return at.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const ne=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=at(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=Uh.exec(e);if(n){const[,r,a,s]=n;return Object.freeze({year:Number(s),month:Number(r),date:Number(a)})}}return Object.freeze({[Lr]:!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=at(e,t,!0):n=at(e):at.isMoment(e)?n=e:n=ne.toMoment(e),n!==null&&at.isMoment(n)&&n.isValid()?n:Object.freeze({[Lr]:!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=ne.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(a=>ne.createFrom(a,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>ne.createFrom(n))},isValid(e){var t;return e?at.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=ne.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return ne.isValid(e)?e:null},toMoment(e){return e?at.isMoment(e)?e:at({...e,month:e.month-1}):null},toString(e,t){const n=ne.toMoment(e);return n&&n.isValid()?n.format(t||lr):""},toStringRange(e,t){if(!e)return"";const n=ne.getRangeSeparator(t);return e.slice(0,2).map(r=>ne.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&at.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${Yh}`):e.format(`${n} ${Gh}`):t?e.format(Wh):e.format(Hh):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=ne.getRangeSeparator(n);return e.map(a=>ne.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:cr(e)>cr(t)},isBefore(e,t){return!e||!t?null:cr(e)<cr(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const r=cr(e),[a,s]=t.map(cr);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=at(),r=n.clone().subtract(at.duration(e.definition));return[ne.createFrom(r,t),ne.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();let t;e.definition==="P0D"?t=at().startOf("day"):t=at().subtract(at.duration(e.definition));const n=at().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n,r=!1){let a="";t?a=r?"23:59":"00:00":a=r?"11:59":"12:00";const s=r?"PM":"AM";return e&&at.isMoment(e)&&e.isValid()?ne.toDateTimeString(e,t,n).split(" "):["",a,t?void 0:s]},getCurrentMoment(){return at()},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}`}}}),Ba=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],Pa=["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 Eo=lr;function Jl(e){Eo=e}const Or=function(t){if(Array.isArray(t)){const n=Or(t[0]),r=Or(t[1]);return n||r}if(t&&t.hasOwnProperty("year")){if(t[Lr])return{dateFormat:Eo};if(!ne.isValid(t))return{dateValidity:!0}}return null};Ct.add("dateFormat"),Ct.add("dateValidity");const Zl=function(t){if(Array.isArray(t)){const n=Or(t);if(n)return n;if(t&&ne.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};Ct.add("dateRangeOrder");const Xl=function({minDate:t,maxDate:n}){function r(a){const s=ne.isBefore(a,t),l=ne.isAfter(a,n),c={minExceeded:s?ne.toString(t,Eo):null,maxExceeded:l?ne.toString(n,Eo):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}};Ct.add("dateConstraint");const zh=Object.freeze(Object.defineProperty({__proto__:null,date:Or,dateConstraint:Xl,dateRange:Zl,setDateFormat:Jl},Symbol.toStringTag,{value:"Module"}));function tn(e,t){for(const n of[].concat(e)){const r=t(n);if(r)return r}return null}const jh=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>tn(r,n)};Ct.add("min");const qh=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>tn(r,n)};ir.add("max");const Jh=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};ir.add("required");const Zh=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>tn(r,n)};Ct.add("minLength");const Xh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};Ct.add("minLengthArray");const Qh=function(t){function n(r){return r===void 0||r.toString().length<=t?null:{maxLength:t}}return r=>tn(r,n)};qt.add("maxLength");const eS=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};Ct.add("maxLengthArray");const tS=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(a){return n.test(a)?null:{pattern:t}}return a=>tn(a,r)};Ct.add("pattern");const nS=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return tn(e,t)};qt.add("alpha");const rS=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return tn(e,t)};qt.add("numeric");const oS=function(e){function t(n){return/^-?[0-9,. ]*$/.test(n)?null:{positiveOrNegativeNumber:!0}}return tn(e,t)};qt.add("positiveOrNegativeNumber");const aS=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return tn(e,t)};qt.add("nonNumeric");const wo=Object.freeze({...zh,min:jh,max:qh,required:Jh,minLength:Zh,minLengthArray:Xh,maxLength:Qh,maxLengthArray:eS,pattern:tS,alpha:nS,numeric:rS,nonNumeric:aS,positiveOrNegativeNumber:oS,OnBlurErrorKeys:Ct});function Co(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 sS(e,t={},n=[]){for(const[r,a]of Object.entries(t))a===0?jl(r):a===2&&ql(r);return o.useCallback(e,n)}class Pn{constructor(t,n){zt(this,"validators",[]);La(this,er,null);La(this,xn,null);La(this,Mn,null);zt(this,"preventativeErrors",[]);zt(this,"submitted",!1);this.path=t,this.update=n}get errors(){return or(this,er)===null&&or(this,xn)===null&&or(this,Mn)===null?null:{...or(this,er)??{},...or(this,xn)??{},...or(this,Mn)??{}}}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=Co(t,this.validators);let s={onSubmit:{},onChange:{},onBlur:{}};a&&(s=Object.keys(a).reduce((l,c)=>(To.has(c)?l.onSubmit[c]=a[c]:ir.has(c)?l.onChange[c]=a[c]:l.onBlur[c]=a[c],l),s)),(typeof n>"u"||n===Jt.ON_CHANGE)&&Sn(this,xn,Object.keys(s.onChange).length===0?null:s.onChange),(typeof n>"u"||n===Jt.ON_BLUR)&&Sn(this,Mn,Object.keys(s.onBlur).length===0?null:s.onBlur),(typeof n>"u"||n===Jt.ON_SUBMIT)&&(Sn(this,er,Object.keys(s.onSubmit).length===0?null:s.onSubmit),Sn(this,xn,Object.keys(s.onChange).length===0?null:s.onChange),Sn(this,Mn,Object.keys(s.onBlur).length===0?null:s.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(Sn(this,er,null),Sn(this,Mn,null),Sn(this,xn,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(wo.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}er=new WeakMap,xn=new WeakMap,Mn=new WeakMap;class Rr extends Pn{constructor(){super(...arguments);zt(this,"id",ft());zt(this,"focused",!1);zt(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=Co(n,this.validators);if(r&&Object.keys(r).filter(s=>qt.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 An extends Rr{constructor(n,r,a){super(a?r:n,a||r);zt(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 Do(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 Ql extends An{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class ec extends An{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function Do(e,t,n){return e instanceof Pn?(e.path=t,e.update=n,e):Array.isArray(e)?new ec(e,t,n):zl(e)?new Ql(e,t,n):new Rr(t,n)}function Br(e,t){return t.length===0||!e?e:Br(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 No(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):zl(e)?Object.keys(e).reduce((r,a)=>Object.assign(r,{[a]:a===n?Va(e[a],t):e[a]}),{}):e}function iS(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function tc(e,t={}){iS(e);const[,n]=x.useState({}),r=x.useRef(!1);r.current=!1;const a=x.useRef(t),s=x.useCallback(h=>{var w,T;const g=u.current;let y;if(h)if(h.path)if(h.markAsBlurred){const E=Br(g.formMeta,h.path);if(E){E.focused=!1;const D=v.getPath(g.formValue,h.path);E.validate(D,Jt.ON_BLUR)}}else if(h.newValidators){if(a.current){const E=h.path.join(".");a.current={...a.current,[E]:h.newValidators},No(g.formValue,g.formMeta,a.current,!0)}}else if(h.markAsSubmitted){const E=Br(g.formMeta,h.path);if(E){E.submitted=!0;const D=v.getPath(g.formValue,h.path);E.validate(D,Jt.ON_SUBMIT)}}else y=Va(g.formValue,h.path),v.setPath(y,h.path,h.value);else y=h.value;if((w=h==null?void 0:h.updateFormOptions)!=null&&w.validators&&(a.current={...a.current,...h.updateFormOptions.validators},No(g.formValue,g.formMeta,a.current,((T=h.updateFormOptions)==null?void 0:T.runValidators)??!0)),y){g.formMeta.submitted=!1,v.deepFreeze(y);const E=v.diff(g.formValue,y);for(const{type:M,key:I,parentPath:k,objects:[,F]}of E){const P=Br(g.formMeta,k);if(typeof I!="symbol"&&P){let C;switch(M){case v.DiffChange.ADDITION:P.fields[I]=Do(F[I],[...k,I],c);break;case v.DiffChange.DELETION:Array.isArray(P.fields)?P.fields[I]=void 0:delete P.fields[I];break;case v.DiffChange.ALTERATION:C=Do(F[I],[...k,I],c),(C instanceof An&&!(P.fields[I]instanceof An)||!(C instanceof An)&&P.fields[I]instanceof An)&&(C.pristine=!1,P.fields[I]=C);break}}}const D=new Set;if(E.filter(M=>M.type===v.DiffChange.DELETION).reduce((M,I)=>(M.has(I.parentPath)||M.add(I.parentPath),M),D),Array.from(D).forEach(M=>{const I=Br(g.formMeta,M);Array.isArray(I.fields)&&(I.fields=I.fields.filter(k=>k!==void 0))}),a.current){No(y,g.formMeta,a.current);const M=new Set;t&&Fa(g.formMeta,t,(I,k)=>{typeof k=="function"&&(I.validate(v.getPath(y,I.path)),M.add(I))});for(const{type:I,key:k,parentPath:F,objects:[,P]}of E)if(typeof k!="symbol"){let C=g.formMeta,R=y;if(C){for(const O of F)C=C.fields[O],R=R[O],M.has(C)||C.validate(R,Jt.ON_CHANGE);if(I===v.DiffChange.ADDITION||I===v.DiffChange.ALTERATION){const O=C.fields[k];if(!M.has(O)&&(C.fields[k].validate(P[k],Jt.ON_CHANGE),I===v.DiffChange.ADDITION&&O.fields))for(const[$,z]of Object.entries(O.fields))z.validate(P[k][$],Jt.ON_CHANGE)}}}}}u.current={...g,formValue:y||g.formValue},r.current||n({})},[]),l=x.useCallback((h,g)=>{h||g?s({value:h,updateFormOptions:g}):s()},[s]),c=x.useCallback((h,g,y=!1,w,T=!1)=>{h?s({path:h,value:g,markAsBlurred:y,newValidators:w,markAsSubmitted:T}):l()},[s,l]),p=x.useMemo(()=>{v.deepFreeze(e);const h=Do(e,[],c);return t&&No(e,h,t,!1,!0),h},[]),f=x.useCallback(()=>(u.current.formMeta.markAsDirty(),a.current&&Fa(u.current.formMeta,a.current,(h,g)=>{(typeof g=="function"||Array.isArray(g))&&h.validate(v.getPath(u.current.formValue,h.path))}),u.current.formMeta.isValid()),[]),m=x.useCallback(()=>u.current.formValue,[]),u=x.useRef({formValue:e,formMeta:p,updateForm:l,validateForm:f,getCurrentFormValue:m});return u.current}const tt=o.forwardRef((e,t)=>{const{className:n,children:r,focusInputOnClick:a,formControl:s,formMeta:l,inputRef:c,onClick:p,...f}=e,m=o.useRef(),h=c||(t||m);function g(){h&&h!==t&&h.current&&h.current.focus()}function y(){h&&h!==t&&h.current&&l&&l instanceof Rr&&l.markAsFocused()}function w(){h&&h!==t&&h.current&&l&&l instanceof Rr&&l.markAsBlurred()}const T=U("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(D){a&&g(),p&&p(D)}return o.useEffect(()=>{function D(M){M.target.classList.contains("sps-form-control__clear-btn")&&M.preventDefault()}return document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[]),o.createElement("div",{...f,className:T,ref:t,tabIndex:-1,onClick:E,onFocus:y,onBlur:w},r)});Object.assign(tt,{displayName:"SpsFormComponentWrapper"});function nc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function rc(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 rc(n.overflowY,t)||rc(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 ko(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 oc=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(Pe){return Pe!==l};if(!nc(e))throw new TypeError("Invalid target");for(var f,m,u=document.scrollingElement||document.documentElement,h=[],g=e;nc(g)&&p(g);){if((g=(m=(f=g).parentElement)==null?f.getRootNode().host||null:m)===u){h.push(g);break}g!=null&&g===document.body&&$a(g)&&!$a(document.documentElement)||g!=null&&$a(g,c)&&h.push(g)}for(var y=n.visualViewport?n.visualViewport.width:innerWidth,w=n.visualViewport?n.visualViewport.height:innerHeight,T=window.scrollX||pageXOffset,E=window.scrollY||pageYOffset,D=e.getBoundingClientRect(),M=D.height,I=D.width,k=D.top,F=D.right,P=D.bottom,C=D.left,R=a==="start"||a==="nearest"?k:a==="end"?P:k+M/2,O=s==="center"?C+I/2:s==="end"?F:C,$=[],z=0;z<h.length;z++){var L=h[z],oe=L.getBoundingClientRect(),B=oe.height,ee=oe.width,W=oe.top,j=oe.right,re=oe.bottom,H=oe.left;if(r==="if-needed"&&k>=0&&C>=0&&P<=w&&F<=y&&k>=W&&P<=re&&C>=H&&F<=j)return $;var J=getComputedStyle(L),ae=parseInt(J.borderLeftWidth,10),ie=parseInt(J.borderTopWidth,10),q=parseInt(J.borderRightWidth,10),V=parseInt(J.borderBottomWidth,10),G=0,Z=0,te="offsetWidth"in L?L.offsetWidth-L.clientWidth-ae-q:0,de="offsetHeight"in L?L.offsetHeight-L.clientHeight-ie-V:0,pe="offsetWidth"in L?L.offsetWidth===0?0:ee/L.offsetWidth:0,X="offsetHeight"in L?L.offsetHeight===0?0:B/L.offsetHeight:0;if(u===L)G=a==="start"?R:a==="end"?R-w:a==="nearest"?ko(E,E+w,w,ie,V,E+R,E+R+M,M):R-w/2,Z=s==="start"?O:s==="center"?O-y/2:s==="end"?O-y:ko(T,T+y,y,ae,q,T+O,T+O+I,I),G=Math.max(0,G+E),Z=Math.max(0,Z+T);else{G=a==="start"?R-W-ie:a==="end"?R-re+V+de:a==="nearest"?ko(W,re,B,ie,V+de,R,R+M,M):R-(W+B/2)+de/2,Z=s==="start"?O-H-ae:s==="center"?O-(H+ee/2)+te/2:s==="end"?O-j+q+te:ko(H,j,ee,ae,q+te,O,O+I,I);var se=L.scrollLeft,we=L.scrollTop;R+=we-(G=Math.max(0,Math.min(we+G/X,L.scrollHeight-B/X+de))),O+=se-(Z=Math.max(0,Math.min(se+Z/pe,L.scrollWidth-ee/pe+te)))}$.push({el:L,top:G,left:Z})}return $};function ac(e){return e===Object(e)&&Object.keys(e).length!==0}function lS(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 cS(e){return e===!1?{block:"end",inline:"nearest"}:ac(e)?e:{block:"start",inline:"nearest"}}function Io(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(ac(t)&&typeof t.behavior=="function")return t.behavior(n?oc(e,t):[]);if(n){var r=cS(t);return lS(oc(e,r),r.behavior)}}const Ka=Object.freeze(Object.defineProperty({__proto__:null,default:Io},Symbol.toStringTag,{value:"Module"})),Ke=o.createContext(Y.noI18nI18n),dS={alt:"string",size:"SpinnerSize",title:"string"};function Ha(e){const{alt:t,className:n,size:r=Y.SpinnerSize.MEDIUM,"data-testid":a,title:s,unsafelyReplaceClassName:l,...c}=e,{t:p}=o.useContext(Ke),f=t||s||p("design-system:spinner.defaultAltText",{defaultValue:"Loading..."}),m=U(l||"sps-spinner",`sps-spinner--${r}`,n);return o.createElement("i",{className:m,"data-testid":a,title:f,...c})}Object.assign(Ha,{props:dS,displayName:"SpsSpinner"});const pS=60;function xo(e){return typeof e>"u"?"inherit":`${e}px`}function Wa(e){switch(e){case Y.Position.TOP_LEFT:return Y.Position.BOTTOM_LEFT;case Y.Position.TOP_MIDDLE:return Y.Position.BOTTOM_MIDDLE;case Y.Position.TOP_RIGHT:return Y.Position.BOTTOM_RIGHT;case Y.Position.RIGHT_TOP:return Y.Position.LEFT_TOP;case Y.Position.RIGHT_MIDDLE:return Y.Position.LEFT_MIDDLE;case Y.Position.RIGHT_BOTTOM:return Y.Position.LEFT_BOTTOM;case Y.Position.BOTTOM_RIGHT:return Y.Position.TOP_RIGHT;case Y.Position.BOTTOM_MIDDLE:return Y.Position.TOP_MIDDLE;case Y.Position.BOTTOM_LEFT:return Y.Position.TOP_LEFT;case Y.Position.LEFT_BOTTOM:return Y.Position.RIGHT_BOTTOM;case Y.Position.LEFT_MIDDLE:return Y.Position.RIGHT_MIDDLE;case Y.Position.LEFT_TOP:return Y.Position.RIGHT_TOP}}function uS(e,t,n,r,a,s,l,c){const p=l&&l.current,f=p?p.scrollTop:window.pageYOffset,m=c?0:f,u=p?p.scrollLeft:window.pageXOffset,h=c?0:u,[g,y]=e.split(" ");let w,T,E,D;switch(g){case"top":E=t.height-n.top-m-s[0];break;case"left":T=t.width-n.left-h-s[0];break;case"right":D=n.right+h-s[0];break;case"bottom":w=n.bottom+m-s[0];break;default:throw new Error(`Invalid position ${e}`)}switch(y){case"left":D=n.left+h+s[1];break;case"top":w=n.top+m+s[1];break;case"middle":g==="top"||g==="bottom"?D=n.left+h+n.width/2-a/2+s[1]:(g==="left"||g==="right")&&(w=n.top+m+n.height/2-r.height/2+s[1]);break;case"bottom":E=t.height-n.bottom-m+s[1];break;case"right":T=t.width-n.right-h+s[1];break;default:throw new Error(`Invalid position ${e}`)}return[w,T,E,D]}function Fn(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 f=e.current.getBoundingClientRect(),m=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[w,T]=n.split(" ");let E=n;if(r&&(w==="top"&&m.top-f.height<pS||w==="right"&&m.right+f.width>h||w==="bottom"&&m.bottom+f.height>u||w==="left"&&m.left-f.width<0)&&(E=r),T==="left"&&m.left+f.width+((p==null?void 0:p[1])??0)>document.documentElement.getBoundingClientRect().right)switch(w){case"bottom":E=Y.Position.BOTTOM_RIGHT;break;case"top":E=Y.Position.TOP_RIGHT;break}const D=a?Math.max(m.width,f.width):f.width,M=s?m.width:D,[I,k,F,P]=uS(E,y,m,f,M,p,l,c),C={top:xo(I),right:xo(k),bottom:xo(F),left:xo(P)};return c&&(C.position="fixed",C.zIndex=Y.ZStratum.BAR),a&&(C.minWidth=`${m.width}px`),s&&(C.width=`${m.width}px`),[C,E===r]}return[{},!1]}const xt=x.createContext(null);function dr(e,t=[]){const n=x.useContext(xt);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 yo.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 sc(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 f=c?await l||[]:l||[];if(c&&s.current!==l)return;let m=Array.from(f).filter(Boolean).map(u=>new Y.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&m.unshift(new Y.SpsOptionListOption(null,{text:e.nullOption})),t.value&&!e.disableDefaultOptionsFiltering){const u=p(t.value);n({replacementPattern:new RegExp(`(${u})`,"ig")}),m=m.filter(h=>{const g=new RegExp(u,"i"),y=p(h.text);return e.filterByTextAndCaptionKey?g.test(y)||g.test(p(h.caption)):g.test(y)})}else n({replacementPattern:null});if(e.disabledOptions)for(const u of m)e.disabledOptions.includes(u.value)&&(u.disabled=!0);r(Object.freeze(m)),e.onOptionListChanged&&e.onOptionListChanged(m.length),a(m.some(u=>u.value&&!!u.value.icon)),n({pending:!1})}function mS(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 f=o.useMemo(()=>typeof p.current=="function"?v.debounce(sc,typeof e.searchDebounce<"u"?e.searchDebounce:500):sc,[p.current,e.disabledOptions]);return o.useEffect(()=>{f(e,t,n,a,l,c)},[p.current,t.value,e.disabledOptions]),[r,s]}class bn{constructor(t,n){zt(this,"nativeEvent");zt(this,"currentTarget");zt(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 fS(e,t){return{...e,...t}}function Zt(e){return x.useReducer(fS,e)}function hS({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:a="Search…",searchInputRef:s}){const[l,c]=Zt({isAsync:typeof t=="function",pending:!1,value:r,replacementPattern:null}),p=o.useCallback(g=>{c({value:g.target.value}),n&&n(g)},[n]),f=o.useCallback(g=>{g.nativeEvent.stopImmediatePropagation(),g.stopPropagation()},[]),m=o.useCallback(g=>{g.nativeEvent.stopImmediatePropagation(),c({value:""}),s!=null&&s.current&&(n&&n(new bn(s.current)),s.current.focus())},[n]),u=g=>{g&&(["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(g.key)||g.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:f,onKeyDown:u}),l.value&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:m}))):o.createElement(o.Fragment,null),l,c]}const SS=Io||Ka,gS=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"];function bS(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function ic(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 Pr=o.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:a,options:s,tall:l,textKey:c,valueKey:p,zeroState:f,hideInlineSearch:m,onSearchChange:u,search:h,searchDebounce:g,searchPlaceholder:y,onSpecialActionSelect:w,attachTo:T,className:E,conformWidth:D,id:M,ignoreWidthStyles:I,isOpen:k,keepOpen:F,keyDown:P,nullOption:C,onOptionListChanged:R,onOptionSelected:O,onPositionFlip:$,onSelfToggle:z,optionRole:L,positionOverride:oe,selectedOption:B,specialAction:ee,unsafelyReplaceClassName:W,loading:j,filterByTextAndCaptionKey:re,maxHeightPx:H,maxHeightRem:J,disableOptionsMemoization:ae,disableDefaultOptionsFiltering:ie,"data-testid":q,typeaheadEvent:V,...G}=e,Z=o.useMemo(()=>ee?new Y.SpsOptionListOption(ee,{textKey:"label",captionKey:"caption"}):null,[ee]),[te,de]=o.useState(-1),[pe,X]=o.useState(k),se=t||o.useRef(null),we=o.useRef(null),Pe=o.useRef(null),pt=dr("sps-option-list-portal"),bt=o.useContext(xt),[nt,rt]=oe||[Y.Position.BOTTOM_LEFT,Y.Position.TOP_LEFT],[[Pt,Xe],He]=o.useState([{},!1]),ge=o.useRef(null),[Ve,he,qe]=hS({...e,searchInputRef:ge}),[Ee,vt]=mS(e,he,qe);o.useEffect(()=>{V&&yt(V)},[V]),o.useEffect(()=>{He(pe?Fn(se,T,nt,{altPosition:rt,setMinWidth:!I,setWidth:!I&&D,...bt}):[{},!1])},[pe,nt,rt,Ee]),o.useEffect(()=>{let Se;return pe&&(Se=()=>{pe&&He(Fn(se,T,nt,{altPosition:rt,setMinWidth:!I,setWidth:!I&&D,...bt}))},document.addEventListener("scroll",Se)),()=>{Se&&document.removeEventListener("scroll",Se)}},[pe]),o.useEffect(()=>{de(-1)},[he]);const _n=U(W||"sps-option-list","z-stratum-dropdown",pe&&"sps-option-list--open",he.isAsync&&"sps-option-list--searchable",Xe&&"sps-option-list--opens-upward",ee&&ee.label&&"sps-option-list--has-special-action",E),At=U(W||"sps-option-list__options",l&&"sps-option-list__options--tall"),Ie=o.useCallback(()=>{pe||(X(!0),ge.current&&ge.current.focus(),de(-1),z&&z(!0))},[pe,z]),ce=o.useCallback(()=>{pe&&(X(!1),de(-1),z&&z(!1))},[pe,z]),De=o.useCallback((Se,ye)=>{ye||Se&&!Se.disabled&&(typeof Se.value=="function"?(Se.value(),w&&w()):typeof O=="function"&&O(Se.value),F||ce())},[O,ce]),Ne=o.useCallback((Se,ye,et)=>{Se.stopPropagation(),De(ye,et)},[De]),Qe=o.useRef(a||[]);Qe.current=a||[];const Le=o.useCallback(Se=>{switch(Se.key){case"Tab":case"Escape":ce();break;case"Enter":if(te>-1){const ye=Ee[te]||Z;Se.preventDefault();const et=!!ye&&ic(Qe.current,r||"",ye);!et&&ye&&typeof O=="function"&&typeof ye.value=="function"?ye.value():ye&&De(ye,et)}break;case"Up":case"ArrowUp":{let ye=te;Xe?te<=-1?ye=Ee.length-1:te===0?ee&&(ye=Ee.length):te<Ee.length&&(ye=te-1):te>-1&&(ye=te-1),ye!==te&&(Se.preventDefault(),de(ye));break}case"Down":case"ArrowDown":{Ie();let ye=te;Xe?te!==-1&&(te>=Ee.length?ye=0:te===Ee.length-1?ye=-1:ye=te+1):te<Ee.length-1+ +!!ee&&(ye=te+1),ye!==te&&(Se.preventDefault(),de(ye));break}default:Ie()}},[ce,Ie,te,De,O,Xe,Ee]),ct=o.useCallback(Se=>{Ie();const ye=Ee.findIndex(et=>{if(et.textKey){const Ft=et.textKey;return et.value[Ft].toLowerCase().charAt([0])===Se.key.toLocaleLowerCase()}return et.value.toString().toLowerCase().charAt([0])===Se.key.toLocaleLowerCase()});ye>-1&&de(ye)},[Ee]),yt=o.useCallback(Se=>{Se&&(gS.includes(Se.key)?Le(Se):Ga.includes(Se.key)&&!m&&ct(Se))},[ce,Ie,te,De,O,Xe,Ee]);o.useEffect(()=>{if(bt!==null&&document.getElementsByClassName("sps-modal__body").length>0){const Se=()=>{z&&z(!1)},ye=document.getElementsByClassName("sps-modal__body")[0];return ye.addEventListener("scroll",Se),()=>{ye.removeEventListener("scroll",Se)}}},[]),o.useEffect(()=>{pe&&Pe.current&&SS(Pe.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[te,pe]),o.useEffect(()=>{X(k),k?ge.current&&ge.current.focus():de(-1)},[k]),o.useEffect(()=>{P&&yt(P)},[P]),o.useEffect(()=>{!pe&&we.current&&(qe({value:""}),we.current.scrollTop=0),pe&&$&&$(Xe)},[pe]);const Ge=H?H/16:J,ut=Ge?{maxHeight:`${Ge}rem`}:{};function Ln(Se,ye){return ye?o.createElement(o.Fragment,null,Se.split(ye).map((et,Ft)=>ye.test(et)?o.createElement("u",{key:Ft},et):o.createElement(o.Fragment,{key:Ft},et))):o.createElement(o.Fragment,null,Se)}return pt(o.createElement("div",{className:_n,id:M,"aria-activedescendant":te>-1?`${M}-option-${te}`:"",tabIndex:-1,ref:se,style:Pt,onMouseLeave:()=>de(-1),"data-testid":q,...G},Ve,o.createElement("div",{className:At,ref:we,"data-testid":`${q}-options`,style:ut},!j&&!he.pending&&f&&Ee.length===0&&o.createElement("div",{className:"sps-option-list__zero-state"},f),(j||he.pending)&&o.createElement("div",{className:"sps-option-list__loading"},o.createElement(Ha,null)),!j&&!he.pending&&Ee.map((Se,ye)=>{const et=`${M}-option-${ye}`,Ft=bS(Se.value,B,r),me=ic(Qe.current,r||"",Se);return o.createElement("a",{key:et,id:et,role:L,"aria-selected":Ft,href:Se.href,className:U("sps-option-list__option",Se.caption&&"sps-option-list__option--has-caption",Se.disabled&&"sps-option-list__option--disabled",Se.bold&&"sps-option-list__option--bold",(Ft||me)&&"sps-option-list__option--selected",te===ye&&"sps-option-list__option--highlighted"),onClick:El=>Ne(El,Se,me),onMouseOver:()=>de(ye),tabIndex:-1,ref:te===ye?Pe:null,"data-testid":`${q}-option-${ye}`},Se.value&&Se.value.icon&&o.createElement("i",{className:U("sps-icon","sps-option-list__option-icon",`sps-icon-${String(Se.value.icon)}`)}),(!Se.value||!Se.value.icon&&vt)&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,Ln(Se.text,he.replacementPattern)),Se.caption&&o.createElement("div",{className:"sps-option-list__option-caption"},o.createElement("span",null,Ln(Se.caption,he.replacementPattern))))})),Z&&(ee==null?void 0:ee.label)&&o.createElement("a",{className:U("sps-option-list__option","sps-option-list__special-action",te===Ee.length&&"sps-option-list__option--highlighted",ee.disabled&&"sps-option-list__special-action--disabled"),href:Z.href,target:Z.href&&ee.newTab?"_blank":"_self",onClick:Se=>Ne(Se,Z),onMouseOver:()=>de(Ee.length),"data-testid":`${q}-special-action`},ee.icon&&o.createElement("i",{className:U("sps-icon","sps-option-list__option-icon",`sps-icon-${String(ee.icon)}`)}),!ee.icon&&vt&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,ee.label))))});Object.assign(Pr,{displayName:"SpsOptionList"});function vS(e,t,n=[]){return o.useMemo(()=>{function r(a){return o.createElement(e,{...a,...t},a.children)}return r},n)}function Et(e){return typeof e=="function"?e():e}const lc=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(lc,{elements:t.slice(1)},e))},cc=function({children:e,providers:t=[],...n}){return o.createElement("div",{...n},o.createElement(lc,{elements:t},e))},yS=function({children:e,className:t,...n}){return o.createElement(cc,{className:`sps-app ${t}`,...n},e)};function Mt(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:f={}}of r[c])if(s.type===p&&Object.keys(f).every(u=>f[u]===s.props[u])){l=!0,a[c].push(s);break}l||a[a.length-1].push(s)}return a}function dc(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 pc(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 pr(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",pc,[e,t,c]),Ua("pointerdown",pc,[e,t,c]),{showPopup:a,doShowPopup:l,doHidePopup:c}}const uc=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 f=0;f<p.length;f+=1)if(s(p[f]))return p[f];return null})(e)};let za=0;function Ar({isOpen:e,rootRef:t}){o.useLayoutEffect(()=>{let n,r,a;if(e&&t.current){za+=1,n=uc(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 TS={debounce:"number",disabled:"boolean",conformWidth:"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,Ze,Y,yo,Oa,xh,ar,Hl){"use strict";var Zx=Object.defineProperty;var kh=_=>{throw TypeError(_)};var Xx=(_,x,v)=>x in _?Zx(_,x,{enumerable:!0,configurable:!0,writable:!0,value:v}):_[x]=v;var zt=(_,x,v)=>Xx(_,typeof x!="symbol"?x+"":x,v),Ih=(_,x,v)=>x.has(_)||kh("Cannot "+v);var or=(_,x,v)=>(Ih(_,x,"read from private field"),v?v.call(_):x.get(_)),La=(_,x,v)=>x.has(_)?kh("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(_):x.set(_,v),Sn=(_,x,v,Ze)=>(Ih(_,x,"write to private field"),Ze?Ze.call(_,v):x.set(_,v),v);var er,xn,Mn;function Wl(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=Wl(x),sr=Wl(Ze);function Gl(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=Gl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function U(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Gl(e))&&(r&&(r+=" "),r+=t);return r}const Mh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ft=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Mh[n[e]&63];return t};function gn(e){return x.useRef(e||ft())}function ht(e,t){const n=gn(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 jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _h="[object Object]";function Lh(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function Oh(e,t){return function(n){return e(t(n))}}var Rh=Function.prototype,Yl=Object.prototype,Ul=Rh.toString,Bh=Yl.hasOwnProperty,Ph=Ul.call(Object),Ah=Yl.toString,Fh=Oh(Object.getPrototypeOf,Object);function Vh(e){return!!e&&typeof e=="object"}function $h(e){if(!Vh(e)||Ah.call(e)!=_h||Lh(e))return!1;var t=Fh(e);if(t===null)return!0;var n=Bh.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ul.call(n)==Ph}var Kh=$h;const zl=Ra(Kh),Ct=new Set,ir=new Set,qt=new Set,To=new Set;function jl(e){Ct.has(e)||qt.has(e)||To.has(e)||ir.add(e)}function ql(e){Ct.has(e)||qt.has(e)||ir.has(e)||To.add(e)}const ct=sr.default||sr,lr="MM/DD/YYYY",Hh="MM/DD/YYYY hh:mm A",Wh="MM/DD/YYYY HH:mm",Gh="hh:mm A",Yh="HH:mm",Uh=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,Lr=Symbol("Date Parse Error");function cr(e){return ct.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const ne=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=ct(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=Uh.exec(e);if(n){const[,r,a,s]=n;return Object.freeze({year:Number(s),month:Number(r),date:Number(a)})}}return Object.freeze({[Lr]:!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=ct(e,t,!0):n=ct(e):ct.isMoment(e)?n=e:n=ne.toMoment(e),n!==null&&ct.isMoment(n)&&n.isValid()?n:Object.freeze({[Lr]:!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=ne.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(a=>ne.createFrom(a,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>ne.createFrom(n))},isValid(e){var t;return e?ct.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=ne.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return ne.isValid(e)?e:null},toMoment(e){return e?ct.isMoment(e)?e:ct({...e,month:e.month-1}):null},toString(e,t){const n=ne.toMoment(e);return n&&n.isValid()?n.format(t||lr):""},toStringRange(e,t){if(!e)return"";const n=ne.getRangeSeparator(t);return e.slice(0,2).map(r=>ne.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&ct.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${Yh}`):e.format(`${n} ${Gh}`):t?e.format(Wh):e.format(Hh):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=ne.getRangeSeparator(n);return e.map(a=>ne.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:cr(e)>cr(t)},isBefore(e,t){return!e||!t?null:cr(e)<cr(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const r=cr(e),[a,s]=t.map(cr);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=ct(),r=n.clone().subtract(ct.duration(e.definition));return[ne.createFrom(r,t),ne.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();const t=ct().subtract(ct.duration(e.definition)).startOf("day"),n=ct().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n,r=!1){let a="";t?a=r?"23:59":"00:00":a=r?"11:59":"12:00";const s=r?"PM":"AM";return e&&ct.isMoment(e)&&e.isValid()?ne.toDateTimeString(e,t,n).split(" "):["",a,t?void 0:s]},getCurrentMoment(){return ct()},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}`}}}),Ba=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],Pa=["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 Eo=lr;function Jl(e){Eo=e}const Or=function(t){if(Array.isArray(t)){const n=Or(t[0]),r=Or(t[1]);return n||r}if(t&&t.hasOwnProperty("year")){if(t[Lr])return{dateFormat:Eo};if(!ne.isValid(t))return{dateValidity:!0}}return null};Ct.add("dateFormat"),Ct.add("dateValidity");const Zl=function(t){if(Array.isArray(t)){const n=Or(t);if(n)return n;if(t&&ne.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};Ct.add("dateRangeOrder");const Xl=function({minDate:t,maxDate:n}){function r(a){const s=ne.isBefore(a,t),l=ne.isAfter(a,n),c={minExceeded:s?ne.toString(t,Eo):null,maxExceeded:l?ne.toString(n,Eo):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}};Ct.add("dateConstraint");const zh=Object.freeze(Object.defineProperty({__proto__:null,date:Or,dateConstraint:Xl,dateRange:Zl,setDateFormat:Jl},Symbol.toStringTag,{value:"Module"}));function tn(e,t){for(const n of[].concat(e)){const r=t(n);if(r)return r}return null}const jh=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>tn(r,n)};Ct.add("min");const qh=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>tn(r,n)};ir.add("max");const Jh=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};ir.add("required");const Zh=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>tn(r,n)};Ct.add("minLength");const Xh=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};Ct.add("minLengthArray");const Qh=function(t){function n(r){return r===void 0||r.toString().length<=t?null:{maxLength:t}}return r=>tn(r,n)};qt.add("maxLength");const eS=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};Ct.add("maxLengthArray");const tS=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(a){return n.test(a)?null:{pattern:t}}return a=>tn(a,r)};Ct.add("pattern");const nS=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return tn(e,t)};qt.add("alpha");const rS=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return tn(e,t)};qt.add("numeric");const oS=function(e){function t(n){return/^-?[0-9,. ]*$/.test(n)?null:{positiveOrNegativeNumber:!0}}return tn(e,t)};qt.add("positiveOrNegativeNumber");const aS=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return tn(e,t)};qt.add("nonNumeric");const wo=Object.freeze({...zh,min:jh,max:qh,required:Jh,minLength:Zh,minLengthArray:Xh,maxLength:Qh,maxLengthArray:eS,pattern:tS,alpha:nS,numeric:rS,nonNumeric:aS,positiveOrNegativeNumber:oS,OnBlurErrorKeys:Ct});function Co(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 sS(e,t={},n=[]){for(const[r,a]of Object.entries(t))a===0?jl(r):a===2&&ql(r);return o.useCallback(e,n)}class Pn{constructor(t,n){zt(this,"validators",[]);La(this,er,null);La(this,xn,null);La(this,Mn,null);zt(this,"preventativeErrors",[]);zt(this,"submitted",!1);this.path=t,this.update=n}get errors(){return or(this,er)===null&&or(this,xn)===null&&or(this,Mn)===null?null:{...or(this,er)??{},...or(this,xn)??{},...or(this,Mn)??{}}}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=Co(t,this.validators);let s={onSubmit:{},onChange:{},onBlur:{}};a&&(s=Object.keys(a).reduce((l,c)=>(To.has(c)?l.onSubmit[c]=a[c]:ir.has(c)?l.onChange[c]=a[c]:l.onBlur[c]=a[c],l),s)),(typeof n>"u"||n===Jt.ON_CHANGE)&&Sn(this,xn,Object.keys(s.onChange).length===0?null:s.onChange),(typeof n>"u"||n===Jt.ON_BLUR)&&Sn(this,Mn,Object.keys(s.onBlur).length===0?null:s.onBlur),(typeof n>"u"||n===Jt.ON_SUBMIT)&&(Sn(this,er,Object.keys(s.onSubmit).length===0?null:s.onSubmit),Sn(this,xn,Object.keys(s.onChange).length===0?null:s.onChange),Sn(this,Mn,Object.keys(s.onBlur).length===0?null:s.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(Sn(this,er,null),Sn(this,Mn,null),Sn(this,xn,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(wo.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}er=new WeakMap,xn=new WeakMap,Mn=new WeakMap;class Rr extends Pn{constructor(){super(...arguments);zt(this,"id",ft());zt(this,"focused",!1);zt(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=Co(n,this.validators);if(r&&Object.keys(r).filter(s=>qt.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 An extends Rr{constructor(n,r,a){super(a?r:n,a||r);zt(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 Do(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 Ql extends An{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class ec extends An{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function Do(e,t,n){return e instanceof Pn?(e.path=t,e.update=n,e):Array.isArray(e)?new ec(e,t,n):zl(e)?new Ql(e,t,n):new Rr(t,n)}function Br(e,t){return t.length===0||!e?e:Br(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 No(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):zl(e)?Object.keys(e).reduce((r,a)=>Object.assign(r,{[a]:a===n?Va(e[a],t):e[a]}),{}):e}function iS(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function tc(e,t={}){iS(e);const[,n]=x.useState({}),r=x.useRef(!1);r.current=!1;const a=x.useRef(t),s=x.useCallback(h=>{var w,T;const g=u.current;let y;if(h)if(h.path)if(h.markAsBlurred){const E=Br(g.formMeta,h.path);if(E){E.focused=!1;const D=v.getPath(g.formValue,h.path);E.validate(D,Jt.ON_BLUR)}}else if(h.newValidators){if(a.current){const E=h.path.join(".");a.current={...a.current,[E]:h.newValidators},No(g.formValue,g.formMeta,a.current,!0)}}else if(h.markAsSubmitted){const E=Br(g.formMeta,h.path);if(E){E.submitted=!0;const D=v.getPath(g.formValue,h.path);E.validate(D,Jt.ON_SUBMIT)}}else y=Va(g.formValue,h.path),v.setPath(y,h.path,h.value);else y=h.value;if((w=h==null?void 0:h.updateFormOptions)!=null&&w.validators&&(a.current={...a.current,...h.updateFormOptions.validators},No(g.formValue,g.formMeta,a.current,((T=h.updateFormOptions)==null?void 0:T.runValidators)??!0)),y){g.formMeta.submitted=!1,v.deepFreeze(y);const E=v.diff(g.formValue,y);for(const{type:M,key:I,parentPath:k,objects:[,F]}of E){const P=Br(g.formMeta,k);if(typeof I!="symbol"&&P){let C;switch(M){case v.DiffChange.ADDITION:P.fields[I]=Do(F[I],[...k,I],c);break;case v.DiffChange.DELETION:Array.isArray(P.fields)?P.fields[I]=void 0:delete P.fields[I];break;case v.DiffChange.ALTERATION:C=Do(F[I],[...k,I],c),(C instanceof An&&!(P.fields[I]instanceof An)||!(C instanceof An)&&P.fields[I]instanceof An)&&(C.pristine=!1,P.fields[I]=C);break}}}const D=new Set;if(E.filter(M=>M.type===v.DiffChange.DELETION).reduce((M,I)=>(M.has(I.parentPath)||M.add(I.parentPath),M),D),Array.from(D).forEach(M=>{const I=Br(g.formMeta,M);Array.isArray(I.fields)&&(I.fields=I.fields.filter(k=>k!==void 0))}),a.current){No(y,g.formMeta,a.current);const M=new Set;t&&Fa(g.formMeta,t,(I,k)=>{typeof k=="function"&&(I.validate(v.getPath(y,I.path)),M.add(I))});for(const{type:I,key:k,parentPath:F,objects:[,P]}of E)if(typeof k!="symbol"){let C=g.formMeta,R=y;if(C){for(const O of F)C=C.fields[O],R=R[O],M.has(C)||C.validate(R,Jt.ON_CHANGE);if(I===v.DiffChange.ADDITION||I===v.DiffChange.ALTERATION){const O=C.fields[k];if(!M.has(O)&&(C.fields[k].validate(P[k],Jt.ON_CHANGE),I===v.DiffChange.ADDITION&&O.fields))for(const[$,z]of Object.entries(O.fields))z.validate(P[k][$],Jt.ON_CHANGE)}}}}}u.current={...g,formValue:y||g.formValue},r.current||n({})},[]),l=x.useCallback((h,g)=>{h||g?s({value:h,updateFormOptions:g}):s()},[s]),c=x.useCallback((h,g,y=!1,w,T=!1)=>{h?s({path:h,value:g,markAsBlurred:y,newValidators:w,markAsSubmitted:T}):l()},[s,l]),p=x.useMemo(()=>{v.deepFreeze(e);const h=Do(e,[],c);return t&&No(e,h,t,!1,!0),h},[]),f=x.useCallback(()=>(u.current.formMeta.markAsDirty(),a.current&&Fa(u.current.formMeta,a.current,(h,g)=>{(typeof g=="function"||Array.isArray(g))&&h.validate(v.getPath(u.current.formValue,h.path))}),u.current.formMeta.isValid()),[]),m=x.useCallback(()=>u.current.formValue,[]),u=x.useRef({formValue:e,formMeta:p,updateForm:l,validateForm:f,getCurrentFormValue:m});return u.current}const tt=o.forwardRef((e,t)=>{const{className:n,children:r,focusInputOnClick:a,formControl:s,formMeta:l,inputRef:c,onClick:p,...f}=e,m=o.useRef(),h=c||(t||m);function g(){h&&h!==t&&h.current&&h.current.focus()}function y(){h&&h!==t&&h.current&&l&&l instanceof Rr&&l.markAsFocused()}function w(){h&&h!==t&&h.current&&l&&l instanceof Rr&&l.markAsBlurred()}const T=U("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(D){a&&g(),p&&p(D)}return o.useEffect(()=>{function D(M){M.target.classList.contains("sps-form-control__clear-btn")&&M.preventDefault()}return document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[]),o.createElement("div",{...f,className:T,ref:t,tabIndex:-1,onClick:E,onFocus:y,onBlur:w},r)});Object.assign(tt,{displayName:"SpsFormComponentWrapper"});function nc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function rc(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 rc(n.overflowY,t)||rc(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 ko(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 oc=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(Pe){return Pe!==l};if(!nc(e))throw new TypeError("Invalid target");for(var f,m,u=document.scrollingElement||document.documentElement,h=[],g=e;nc(g)&&p(g);){if((g=(m=(f=g).parentElement)==null?f.getRootNode().host||null:m)===u){h.push(g);break}g!=null&&g===document.body&&$a(g)&&!$a(document.documentElement)||g!=null&&$a(g,c)&&h.push(g)}for(var y=n.visualViewport?n.visualViewport.width:innerWidth,w=n.visualViewport?n.visualViewport.height:innerHeight,T=window.scrollX||pageXOffset,E=window.scrollY||pageYOffset,D=e.getBoundingClientRect(),M=D.height,I=D.width,k=D.top,F=D.right,P=D.bottom,C=D.left,R=a==="start"||a==="nearest"?k:a==="end"?P:k+M/2,O=s==="center"?C+I/2:s==="end"?F:C,$=[],z=0;z<h.length;z++){var L=h[z],oe=L.getBoundingClientRect(),B=oe.height,ee=oe.width,W=oe.top,j=oe.right,re=oe.bottom,H=oe.left;if(r==="if-needed"&&k>=0&&C>=0&&P<=w&&F<=y&&k>=W&&P<=re&&C>=H&&F<=j)return $;var J=getComputedStyle(L),ae=parseInt(J.borderLeftWidth,10),ie=parseInt(J.borderTopWidth,10),q=parseInt(J.borderRightWidth,10),V=parseInt(J.borderBottomWidth,10),G=0,Z=0,te="offsetWidth"in L?L.offsetWidth-L.clientWidth-ae-q:0,de="offsetHeight"in L?L.offsetHeight-L.clientHeight-ie-V:0,pe="offsetWidth"in L?L.offsetWidth===0?0:ee/L.offsetWidth:0,X="offsetHeight"in L?L.offsetHeight===0?0:B/L.offsetHeight:0;if(u===L)G=a==="start"?R:a==="end"?R-w:a==="nearest"?ko(E,E+w,w,ie,V,E+R,E+R+M,M):R-w/2,Z=s==="start"?O:s==="center"?O-y/2:s==="end"?O-y:ko(T,T+y,y,ae,q,T+O,T+O+I,I),G=Math.max(0,G+E),Z=Math.max(0,Z+T);else{G=a==="start"?R-W-ie:a==="end"?R-re+V+de:a==="nearest"?ko(W,re,B,ie,V+de,R,R+M,M):R-(W+B/2)+de/2,Z=s==="start"?O-H-ae:s==="center"?O-(H+ee/2)+te/2:s==="end"?O-j+q+te:ko(H,j,ee,ae,q+te,O,O+I,I);var se=L.scrollLeft,we=L.scrollTop;R+=we-(G=Math.max(0,Math.min(we+G/X,L.scrollHeight-B/X+de))),O+=se-(Z=Math.max(0,Math.min(se+Z/pe,L.scrollWidth-ee/pe+te)))}$.push({el:L,top:G,left:Z})}return $};function ac(e){return e===Object(e)&&Object.keys(e).length!==0}function lS(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 cS(e){return e===!1?{block:"end",inline:"nearest"}:ac(e)?e:{block:"start",inline:"nearest"}}function Io(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(ac(t)&&typeof t.behavior=="function")return t.behavior(n?oc(e,t):[]);if(n){var r=cS(t);return lS(oc(e,r),r.behavior)}}const Ka=Object.freeze(Object.defineProperty({__proto__:null,default:Io},Symbol.toStringTag,{value:"Module"})),Ke=o.createContext(Y.noI18nI18n),dS={alt:"string",size:"SpinnerSize",title:"string"};function Ha(e){const{alt:t,className:n,size:r=Y.SpinnerSize.MEDIUM,"data-testid":a,title:s,unsafelyReplaceClassName:l,...c}=e,{t:p}=o.useContext(Ke),f=t||s||p("design-system:spinner.defaultAltText",{defaultValue:"Loading..."}),m=U(l||"sps-spinner",`sps-spinner--${r}`,n);return o.createElement("i",{className:m,"data-testid":a,title:f,...c})}Object.assign(Ha,{props:dS,displayName:"SpsSpinner"});const pS=60;function xo(e){return typeof e>"u"?"inherit":`${e}px`}function Wa(e){switch(e){case Y.Position.TOP_LEFT:return Y.Position.BOTTOM_LEFT;case Y.Position.TOP_MIDDLE:return Y.Position.BOTTOM_MIDDLE;case Y.Position.TOP_RIGHT:return Y.Position.BOTTOM_RIGHT;case Y.Position.RIGHT_TOP:return Y.Position.LEFT_TOP;case Y.Position.RIGHT_MIDDLE:return Y.Position.LEFT_MIDDLE;case Y.Position.RIGHT_BOTTOM:return Y.Position.LEFT_BOTTOM;case Y.Position.BOTTOM_RIGHT:return Y.Position.TOP_RIGHT;case Y.Position.BOTTOM_MIDDLE:return Y.Position.TOP_MIDDLE;case Y.Position.BOTTOM_LEFT:return Y.Position.TOP_LEFT;case Y.Position.LEFT_BOTTOM:return Y.Position.RIGHT_BOTTOM;case Y.Position.LEFT_MIDDLE:return Y.Position.RIGHT_MIDDLE;case Y.Position.LEFT_TOP:return Y.Position.RIGHT_TOP}}function uS(e,t,n,r,a,s,l,c){const p=l&&l.current,f=p?p.scrollTop:window.pageYOffset,m=c?0:f,u=p?p.scrollLeft:window.pageXOffset,h=c?0:u,[g,y]=e.split(" ");let w,T,E,D;switch(g){case"top":E=t.height-n.top-m-s[0];break;case"left":T=t.width-n.left-h-s[0];break;case"right":D=n.right+h-s[0];break;case"bottom":w=n.bottom+m-s[0];break;default:throw new Error(`Invalid position ${e}`)}switch(y){case"left":D=n.left+h+s[1];break;case"top":w=n.top+m+s[1];break;case"middle":g==="top"||g==="bottom"?D=n.left+h+n.width/2-a/2+s[1]:(g==="left"||g==="right")&&(w=n.top+m+n.height/2-r.height/2+s[1]);break;case"bottom":E=t.height-n.bottom-m+s[1];break;case"right":T=t.width-n.right-h+s[1];break;default:throw new Error(`Invalid position ${e}`)}return[w,T,E,D]}function Fn(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 f=e.current.getBoundingClientRect(),m=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[w,T]=n.split(" ");let E=n;if(r&&(w==="top"&&m.top-f.height<pS||w==="right"&&m.right+f.width>h||w==="bottom"&&m.bottom+f.height>u||w==="left"&&m.left-f.width<0)&&(E=r),T==="left"&&m.left+f.width+((p==null?void 0:p[1])??0)>document.documentElement.getBoundingClientRect().right)switch(w){case"bottom":E=Y.Position.BOTTOM_RIGHT;break;case"top":E=Y.Position.TOP_RIGHT;break}const D=a?Math.max(m.width,f.width):f.width,M=s?m.width:D,[I,k,F,P]=uS(E,y,m,f,M,p,l,c),C={top:xo(I),right:xo(k),bottom:xo(F),left:xo(P)};return c&&(C.position="fixed",C.zIndex=Y.ZStratum.BAR),a&&(C.minWidth=`${m.width}px`),s&&(C.width=`${m.width}px`),[C,E===r]}return[{},!1]}const xt=x.createContext(null);function dr(e,t=[]){const n=x.useContext(xt);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 yo.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 sc(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 f=c?await l||[]:l||[];if(c&&s.current!==l)return;let m=Array.from(f).filter(Boolean).map(u=>new Y.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&m.unshift(new Y.SpsOptionListOption(null,{text:e.nullOption})),t.value&&!e.disableDefaultOptionsFiltering){const u=p(t.value);n({replacementPattern:new RegExp(`(${u})`,"ig")}),m=m.filter(h=>{const g=new RegExp(u,"i"),y=p(h.text);return e.filterByTextAndCaptionKey?g.test(y)||g.test(p(h.caption)):g.test(y)})}else n({replacementPattern:null});if(e.disabledOptions)for(const u of m)e.disabledOptions.includes(u.value)&&(u.disabled=!0);r(Object.freeze(m)),e.onOptionListChanged&&e.onOptionListChanged(m.length),a(m.some(u=>u.value&&!!u.value.icon)),n({pending:!1})}function mS(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 f=o.useMemo(()=>typeof p.current=="function"?v.debounce(sc,typeof e.searchDebounce<"u"?e.searchDebounce:500):sc,[p.current,e.disabledOptions]);return o.useEffect(()=>{f(e,t,n,a,l,c)},[p.current,t.value,e.disabledOptions]),[r,s]}class bn{constructor(t,n){zt(this,"nativeEvent");zt(this,"currentTarget");zt(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 fS(e,t){return{...e,...t}}function Zt(e){return x.useReducer(fS,e)}function hS({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:a="Search…",searchInputRef:s}){const[l,c]=Zt({isAsync:typeof t=="function",pending:!1,value:r,replacementPattern:null}),p=o.useCallback(g=>{c({value:g.target.value}),n&&n(g)},[n]),f=o.useCallback(g=>{g.nativeEvent.stopImmediatePropagation(),g.stopPropagation()},[]),m=o.useCallback(g=>{g.nativeEvent.stopImmediatePropagation(),c({value:""}),s!=null&&s.current&&(n&&n(new bn(s.current)),s.current.focus())},[n]),u=g=>{g&&(["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(g.key)||g.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:f,onKeyDown:u}),l.value&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:m}))):o.createElement(o.Fragment,null),l,c]}const SS=Io||Ka,gS=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"];function bS(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function ic(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 Pr=o.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:a,options:s,tall:l,textKey:c,valueKey:p,zeroState:f,hideInlineSearch:m,onSearchChange:u,search:h,searchDebounce:g,searchPlaceholder:y,onSpecialActionSelect:w,attachTo:T,className:E,conformWidth:D,id:M,ignoreWidthStyles:I,isOpen:k,keepOpen:F,keyDown:P,nullOption:C,onOptionListChanged:R,onOptionSelected:O,onPositionFlip:$,onSelfToggle:z,optionRole:L,positionOverride:oe,selectedOption:B,specialAction:ee,unsafelyReplaceClassName:W,loading:j,filterByTextAndCaptionKey:re,maxHeightPx:H,maxHeightRem:J,disableOptionsMemoization:ae,disableDefaultOptionsFiltering:ie,"data-testid":q,typeaheadEvent:V,...G}=e,Z=o.useMemo(()=>ee?new Y.SpsOptionListOption(ee,{textKey:"label",captionKey:"caption"}):null,[ee]),[te,de]=o.useState(-1),[pe,X]=o.useState(k),se=t||o.useRef(null),we=o.useRef(null),Pe=o.useRef(null),pt=dr("sps-option-list-portal"),bt=o.useContext(xt),[nt,rt]=oe||[Y.Position.BOTTOM_LEFT,Y.Position.TOP_LEFT],[[Pt,Xe],He]=o.useState([{},!1]),ge=o.useRef(null),[Ve,he,qe]=hS({...e,searchInputRef:ge}),[Ee,vt]=mS(e,he,qe);o.useEffect(()=>{V&&yt(V)},[V]),o.useEffect(()=>{He(pe?Fn(se,T,nt,{altPosition:rt,setMinWidth:!I,setWidth:!I&&D,...bt}):[{},!1])},[pe,nt,rt,Ee]),o.useEffect(()=>{let Se;return pe&&(Se=()=>{pe&&He(Fn(se,T,nt,{altPosition:rt,setMinWidth:!I,setWidth:!I&&D,...bt}))},document.addEventListener("scroll",Se)),()=>{Se&&document.removeEventListener("scroll",Se)}},[pe]),o.useEffect(()=>{de(-1)},[he]);const _n=U(W||"sps-option-list","z-stratum-dropdown",pe&&"sps-option-list--open",he.isAsync&&"sps-option-list--searchable",Xe&&"sps-option-list--opens-upward",ee&&ee.label&&"sps-option-list--has-special-action",E),At=U(W||"sps-option-list__options",l&&"sps-option-list__options--tall"),Ie=o.useCallback(()=>{pe||(X(!0),ge.current&&ge.current.focus(),de(-1),z&&z(!0))},[pe,z]),ce=o.useCallback(()=>{pe&&(X(!1),de(-1),z&&z(!1))},[pe,z]),De=o.useCallback((Se,ye)=>{ye||Se&&!Se.disabled&&(typeof Se.value=="function"?(Se.value(),w&&w()):typeof O=="function"&&O(Se.value),F||ce())},[O,ce]),Ne=o.useCallback((Se,ye,et)=>{Se.stopPropagation(),De(ye,et)},[De]),Qe=o.useRef(a||[]);Qe.current=a||[];const Le=o.useCallback(Se=>{switch(Se.key){case"Tab":case"Escape":ce();break;case"Enter":if(te>-1){const ye=Ee[te]||Z;Se.preventDefault();const et=!!ye&&ic(Qe.current,r||"",ye);!et&&ye&&typeof O=="function"&&typeof ye.value=="function"?ye.value():ye&&De(ye,et)}break;case"Up":case"ArrowUp":{let ye=te;Xe?te<=-1?ye=Ee.length-1:te===0?ee&&(ye=Ee.length):te<Ee.length&&(ye=te-1):te>-1&&(ye=te-1),ye!==te&&(Se.preventDefault(),de(ye));break}case"Down":case"ArrowDown":{Ie();let ye=te;Xe?te!==-1&&(te>=Ee.length?ye=0:te===Ee.length-1?ye=-1:ye=te+1):te<Ee.length-1+ +!!ee&&(ye=te+1),ye!==te&&(Se.preventDefault(),de(ye));break}default:Ie()}},[ce,Ie,te,De,O,Xe,Ee]),lt=o.useCallback(Se=>{Ie();const ye=Ee.findIndex(et=>{if(et.textKey){const Ft=et.textKey;return et.value[Ft].toLowerCase().charAt([0])===Se.key.toLocaleLowerCase()}return et.value.toString().toLowerCase().charAt([0])===Se.key.toLocaleLowerCase()});ye>-1&&de(ye)},[Ee]),yt=o.useCallback(Se=>{Se&&(gS.includes(Se.key)?Le(Se):Ga.includes(Se.key)&&!m&<(Se))},[ce,Ie,te,De,O,Xe,Ee]);o.useEffect(()=>{if(bt!==null&&document.getElementsByClassName("sps-modal__body").length>0){const Se=()=>{z&&z(!1)},ye=document.getElementsByClassName("sps-modal__body")[0];return ye.addEventListener("scroll",Se),()=>{ye.removeEventListener("scroll",Se)}}},[]),o.useEffect(()=>{pe&&Pe.current&&SS(Pe.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[te,pe]),o.useEffect(()=>{X(k),k?ge.current&&ge.current.focus():de(-1)},[k]),o.useEffect(()=>{P&&yt(P)},[P]),o.useEffect(()=>{!pe&&we.current&&(qe({value:""}),we.current.scrollTop=0),pe&&$&&$(Xe)},[pe]);const Ge=H?H/16:J,ut=Ge?{maxHeight:`${Ge}rem`}:{};function Ln(Se,ye){return ye?o.createElement(o.Fragment,null,Se.split(ye).map((et,Ft)=>ye.test(et)?o.createElement("u",{key:Ft},et):o.createElement(o.Fragment,{key:Ft},et))):o.createElement(o.Fragment,null,Se)}return pt(o.createElement("div",{className:_n,id:M,"aria-activedescendant":te>-1?`${M}-option-${te}`:"",tabIndex:-1,ref:se,style:Pt,onMouseLeave:()=>de(-1),"data-testid":q,...G},Ve,o.createElement("div",{className:At,ref:we,"data-testid":`${q}-options`,style:ut},!j&&!he.pending&&f&&Ee.length===0&&o.createElement("div",{className:"sps-option-list__zero-state"},f),(j||he.pending)&&o.createElement("div",{className:"sps-option-list__loading"},o.createElement(Ha,null)),!j&&!he.pending&&Ee.map((Se,ye)=>{const et=`${M}-option-${ye}`,Ft=bS(Se.value,B,r),me=ic(Qe.current,r||"",Se);return o.createElement("a",{key:et,id:et,role:L,"aria-selected":Ft,href:Se.href,className:U("sps-option-list__option",Se.caption&&"sps-option-list__option--has-caption",Se.disabled&&"sps-option-list__option--disabled",Se.bold&&"sps-option-list__option--bold",(Ft||me)&&"sps-option-list__option--selected",te===ye&&"sps-option-list__option--highlighted"),onClick:El=>Ne(El,Se,me),onMouseOver:()=>de(ye),tabIndex:-1,ref:te===ye?Pe:null,"data-testid":`${q}-option-${ye}`},Se.value&&Se.value.icon&&o.createElement("i",{className:U("sps-icon","sps-option-list__option-icon",`sps-icon-${String(Se.value.icon)}`)}),(!Se.value||!Se.value.icon&&vt)&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,Ln(Se.text,he.replacementPattern)),Se.caption&&o.createElement("div",{className:"sps-option-list__option-caption"},o.createElement("span",null,Ln(Se.caption,he.replacementPattern))))})),Z&&(ee==null?void 0:ee.label)&&o.createElement("a",{className:U("sps-option-list__option","sps-option-list__special-action",te===Ee.length&&"sps-option-list__option--highlighted",ee.disabled&&"sps-option-list__special-action--disabled"),href:Z.href,target:Z.href&&ee.newTab?"_blank":"_self",onClick:Se=>Ne(Se,Z),onMouseOver:()=>de(Ee.length),"data-testid":`${q}-special-action`},ee.icon&&o.createElement("i",{className:U("sps-icon","sps-option-list__option-icon",`sps-icon-${String(ee.icon)}`)}),!ee.icon&&vt&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,ee.label))))});Object.assign(Pr,{displayName:"SpsOptionList"});function vS(e,t,n=[]){return o.useMemo(()=>{function r(a){return o.createElement(e,{...a,...t},a.children)}return r},n)}function Et(e){return typeof e=="function"?e():e}const lc=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(lc,{elements:t.slice(1)},e))},cc=function({children:e,providers:t=[],...n}){return o.createElement("div",{...n},o.createElement(lc,{elements:t},e))},yS=function({children:e,className:t,...n}){return o.createElement(cc,{className:`sps-app ${t}`,...n},e)};function Mt(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:f={}}of r[c])if(s.type===p&&Object.keys(f).every(u=>f[u]===s.props[u])){l=!0,a[c].push(s);break}l||a[a.length-1].push(s)}return a}function dc(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 pc(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 pr(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",pc,[e,t,c]),Ua("pointerdown",pc,[e,t,c]),{showPopup:a,doShowPopup:l,doHidePopup:c}}const uc=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 f=0;f<p.length;f+=1)if(s(p[f]))return p[f];return null})(e)};let za=0;function Ar({isOpen:e,rootRef:t}){o.useLayoutEffect(()=>{let n,r,a;if(e&&t.current){za+=1,n=uc(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 TS={debounce:"number",disabled:"boolean",conformWidth:"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 Xt({className:e,debounce:t=0,disabled:n,conformWidth:r,formControl:a,formMeta:s,onChange:l,onSelectionChange:c,icon:p,id:f,placeholder:m="",suggestions:u,unsafelyReplaceClassName:h,tallOptionList:g,value:y="",zeroState:w,loading:T,maxHeightOptionListPx:E,maxHeightOptionListRem:D,disableOptionsMemoization:M,inputNotClearable:I,autoFocusOnSelection:k,"data-testid":F,...P}){const C=s||a,{wrapperId:R,controlId:O}=ht(f,C),[$,z]=Zt({keyDown:null,opensUpward:!1}),L=o.useRef(null),oe=o.useRef(null),B=o.useRef(null),{showPopup:ee,doShowPopup:W,doHidePopup:j}=pr(L,B);function re(G,Z,te=!1){C&&(C.setValue(G),C.markAsDirty()),c&&te?c(G):l&&l(Z||new bn({value:G}))}function H(G){oe.current&&(oe.current.value="",re("")),G.stopPropagation()}function J(G){re(G.target.value,G)}function ae(G){n||(["Up","ArrowUp","Down","ArrowDown","Enter"].indexOf(G.key)>-1&&(G.preventDefault(),G.persist()),G.stopPropagation(),z({keyDown:G})),G.key==="Tab"&&j()}function ie(G){G?W():j()}function q(G){z({opensUpward:G})}const V=U(h||"sps-autocomplete",ee&&"sps-autocomplete--open",ee&&"z-stratum-dropdown",$.opensUpward&&"sps-autocomplete--opens-upward",n&&"sps-form-control--disabled",e);return o.useEffect(()=>{let G;return ee&&(G=()=>{j()},window.addEventListener("resize",G)),()=>{G&&window.removeEventListener("resize",G)}},[ee]),Ar({isOpen:ee,rootRef:L}),o.createElement(tt,{id:R,className:V,formControl:a,formMeta:s,inputRef:oe,ref:L,focusInputOnClick:!0,onClick:G=>G.nativeEvent.stopImmediatePropagation(),"data-testid":`${F}`},o.createElement("div",{className:"sps-text-input"},o.createElement("div",{className:"sps-form-control"},p&&o.createElement("i",{className:U("sps-text-input__icon","sps-icon",`sps-icon-${p}`)}),o.createElement("input",{type:"text",ref:oe,value:y,className:"sps-text-input__input",placeholder:m,onFocus:W,onClick:W,onChange:J,onKeyDown:ae,disabled:n,id:O,"data-testid":`${F}__input`,...P}),y&&!n&&!I&&o.createElement("i",{"aria-label":"clear",className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:G=>H(G)}))),o.createElement(Pr,{id:`${R}_options`,ref:B,attachTo:L,isOpen:ee,options:u,hideInlineSearch:!0,keyDown:$.keyDown,onOptionSelected:G=>{var Z;re(G,void 0,!0),k&&((Z=oe.current)==null||Z.focus())},onPositionFlip:q,onSelfToggle:ie,offsets:[1,0],search:y,searchDebounce:t,tall:g,zeroState:w,loading:T,maxHeightPx:E,maxHeightRem:D,disableOptionsMemoization:M,conformWidth:r}))}Object.assign(Xt,{props:TS,displayName:"SpsAutocomplete"});const mc={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
@@ -356,7 +356,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=X(Z,pe,q,V,G+"."+
|
|
|
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 tg(){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,f=60120,m=60115,u=60116,h=60121,g=60122,y=60117,w=60129,T=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"),f=E("react.suspense_list"),m=E("react.memo"),u=E("react.lazy"),h=E("react.block"),g=E("react.server.block"),y=E("react.fundamental"),E("react.scope"),E("react.opaque.id"),w=E("react.debug_trace_mode"),E("react.offscreen"),T=E("react.legacy_hidden")}var D=!1;function M(X){return!!(typeof X=="string"||typeof X=="function"||X===n||X===a||X===w||X===r||X===p||X===f||X===T||D||typeof X=="object"&&X!==null&&(X.$$typeof===u||X.$$typeof===m||X.$$typeof===s||X.$$typeof===l||X.$$typeof===c||X.$$typeof===y||X.$$typeof===h||X[0]===g))}function I(X){if(typeof X=="object"&&X!==null){var se=X.$$typeof;switch(se){case e:var we=X.type;switch(we){case n:case a:case r:case p:case f:return we;default:var Pe=we&&we.$$typeof;switch(Pe){case l:case c:case u:case m:case s:return Pe;default:return se}}case t:return se}}}var k=l,F=s,P=e,C=c,R=n,O=u,$=m,z=t,L=a,oe=r,B=p,ee=!1,W=!1;function j(X){return ee||(ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function re(X){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(X){return I(X)===l}function J(X){return I(X)===s}function ae(X){return typeof X=="object"&&X!==null&&X.$$typeof===e}function ie(X){return I(X)===c}function q(X){return I(X)===n}function V(X){return I(X)===u}function G(X){return I(X)===m}function Z(X){return I(X)===t}function te(X){return I(X)===a}function de(X){return I(X)===r}function pe(X){return I(X)===p}Fe.ContextConsumer=k,Fe.ContextProvider=F,Fe.Element=P,Fe.ForwardRef=C,Fe.Fragment=R,Fe.Lazy=O,Fe.Memo=$,Fe.Portal=z,Fe.Profiler=L,Fe.StrictMode=oe,Fe.Suspense=B,Fe.isAsyncMode=j,Fe.isConcurrentMode=re,Fe.isContextConsumer=H,Fe.isContextProvider=J,Fe.isElement=ae,Fe.isForwardRef=ie,Fe.isFragment=q,Fe.isLazy=V,Fe.isMemo=G,Fe.isPortal=Z,Fe.isProfiler=te,Fe.isStrictMode=de,Fe.isSuspense=pe,Fe.isValidElementType=M,Fe.typeOf=I}()),Fe}process.env.NODE_ENV==="production"?ls.exports=eg():ls.exports=tg();var jc=ls.exports,ng=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],rg=["reactReduxForwardedRef"],og=[],ag=[null,null],sg=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function ig(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 lg(e,t,n,r,a,s,l){e.current=r,t.current=a,n.current=!1,s.current&&(s.current=null,l())}function cg(e,t,n,r,a,s,l,c,p,f){if(e){var m=!1,u=null,h=function(){if(!m){var w=t.getState(),T,E;try{T=r(w,a.current)}catch(D){E=D,u=D}E||(u=null),T===s.current?l.current||p():(s.current=T,c.current=T,l.current=!0,f({type:"STORE_UPDATED",payload:{error:E}}))}};n.onStateChange=h,n.trySubscribe(),h();var g=function(){if(m=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return g}}var dg=function(){return[null,0]};function pg(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,a=r===void 0?function(F){return"ConnectAdvanced("+F+")"}:r,s=n.methodName,l=s===void 0?"connectAdvanced":s,c=n.renderCountProp,p=c===void 0?void 0:c,f=n.shouldHandleStateChanges,m=f===void 0?!0:f,u=n.storeKey,h=u===void 0?"store":u,g=n.withRef,y=g===void 0?!1:g,w=n.forwardRef,T=w===void 0?!1:w,E=n.context,D=E===void 0?as:E,M=Mo(n,ng);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=D;return function(P){if(process.env.NODE_ENV!=="production"&&!jc.isValidElementType(P))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+sg(P)));var C=P.displayName||P.name||"Component",R=a(C),O=ve({},M,{getDisplayName:a,methodName:l,renderCountProp:p,shouldHandleStateChanges:m,storeKey:h,displayName:R,wrappedComponentName:C,WrappedComponent:P}),$=M.pure;function z(W){return e(W.dispatch,O)}var L=$?x.useMemo:function(W){return W()};function oe(W){var j=x.useMemo(function(){var Ve=W.reactReduxForwardedRef,he=Mo(W,rg);return[W.context,Ve,he]},[W]),re=j[0],H=j[1],J=j[2],ae=x.useMemo(function(){return re&&re.Consumer&&jc.isContextConsumer(x.createElement(re.Consumer,null))?re:k},[re,k]),ie=x.useContext(ae),q=!!W.store&&!!W.store.getState&&!!W.store.dispatch,V=!!ie&&!!ie.store;if(process.env.NODE_ENV!=="production"&&!q&&!V)throw new Error('Could not find "store" in the context of '+('"'+R+'". Either wrap the root component in a <Provider>, ')+"or pass a custom React context provider to <Provider> and the corresponding "+("React context consumer to "+R+" in connect options."));var G=q?W.store:ie.store,Z=x.useMemo(function(){return z(G)},[G]),te=x.useMemo(function(){if(!m)return ag;var Ve=Ac(G,q?null:ie.subscription),he=Ve.notifyNestedSubs.bind(Ve);return[Ve,he]},[G,q,ie]),de=te[0],pe=te[1],X=x.useMemo(function(){return q?ie:ve({},ie,{subscription:de})},[q,ie,de]),se=x.useReducer(ig,og,dg),we=se[0],Pe=we[0],pt=se[1];if(Pe&&Pe.error)throw Pe.error;var bt=x.useRef(),nt=x.useRef(J),rt=x.useRef(),Pt=x.useRef(!1),Xe=L(function(){return rt.current&&J===nt.current?rt.current:Z(G.getState(),J)},[G,Pe,J]);qc(lg,[nt,bt,Pt,J,Xe,rt,pe]),qc(cg,[m,G,de,Z,nt,bt,Pt,rt,pe,pt],[G,de,Z]);var He=x.useMemo(function(){return x.createElement(P,ve({},Xe,{ref:H}))},[H,P,Xe]),ge=x.useMemo(function(){return m?x.createElement(ae.Provider,{value:X},He):He},[ae,He,X]);return ge}var B=$?x.memo(oe):oe;if(B.WrappedComponent=P,B.displayName=oe.displayName=R,T){var ee=x.forwardRef(function(j,re){return x.createElement(B,ve({},j,{reactReduxForwardedRef:re}))});return ee.displayName=R,ee.WrappedComponent=P,Yc(ee,P)}return Yc(B,P)}}function Jc(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function cs(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 ug(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 mg(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){mg(e)||Zc(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function ds(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,f){return l.dependsOnOwnProps?l.mapToProps(p,f):l.mapToProps(p)};return l.dependsOnOwnProps=!0,l.mapToProps=function(p,f){l.mapToProps=e,l.dependsOnOwnProps=Qc(e);var m=l(p,f);return typeof m=="function"&&(l.mapToProps=m,l.dependsOnOwnProps=Qc(m),m=l(p,f)),process.env.NODE_ENV!=="production"&&Xc(m,s,t),m},l}}function fg(e){return typeof e=="function"?ed(e,"mapDispatchToProps"):void 0}function hg(e){return e?void 0:ds(function(t){return{dispatch:t}})}function Sg(e){return e&&typeof e=="object"?ds(function(t){return ug(e,t)}):void 0}const gg=[fg,hg,Sg];function bg(e){return typeof e=="function"?ed(e,"mapStateToProps"):void 0}function vg(e){return e?void 0:ds(function(){return{}})}const yg=[bg,vg];function Tg(e,t,n){return ve({},n,e,t)}function Eg(e){return function(n,r){var a=r.displayName,s=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(m,u,h){var g=e(m,u,h);return c?(!s||!l(g,p))&&(p=g):(c=!0,p=g,process.env.NODE_ENV!=="production"&&Xc(p,a,"mergeProps")),p}}}function wg(e){return typeof e=="function"?Eg(e):void 0}function Cg(e){return e?void 0:function(){return Tg}}const Dg=[wg,Cg];function ps(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 Ng(e,t,n,r){ps(e,"mapStateToProps",r),ps(t,"mapDispatchToProps",r),ps(n,"mergeProps",r)}var kg=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Ig(e,t,n,r){return function(s,l){return n(e(s,l),t(r,l),l)}}function xg(e,t,n,r,a){var s=a.areStatesEqual,l=a.areOwnPropsEqual,c=a.areStatePropsEqual,p=!1,f,m,u,h,g;function y(M,I){return f=M,m=I,u=e(f,m),h=t(r,m),g=n(u,h,m),p=!0,g}function w(){return u=e(f,m),t.dependsOnOwnProps&&(h=t(r,m)),g=n(u,h,m),g}function T(){return e.dependsOnOwnProps&&(u=e(f,m)),t.dependsOnOwnProps&&(h=t(r,m)),g=n(u,h,m),g}function E(){var M=e(f,m),I=!c(M,u);return u=M,I&&(g=n(u,h,m)),g}function D(M,I){var k=!l(I,m),F=!s(M,f,I,m);return f=M,m=I,k&&F?w():k?T():F?E():g}return function(I,k){return p?D(I,k):y(I,k)}}function Mg(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,s=Mo(t,kg),l=n(e,s),c=r(e,s),p=a(e,s);process.env.NODE_ENV!=="production"&&Ng(l,c,p,s.displayName);var f=s.pure?xg:Ig;return f(l,c,p,e,s)}var _g=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function us(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 Lg(e,t){return e===t}function Og(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?pg:n,a=t.mapStateToPropsFactories,s=a===void 0?yg:a,l=t.mapDispatchToPropsFactories,c=l===void 0?gg:l,p=t.mergePropsFactories,f=p===void 0?Dg:p,m=t.selectorFactory,u=m===void 0?Mg:m;return function(g,y,w,T){T===void 0&&(T={});var E=T,D=E.pure,M=D===void 0?!0:D,I=E.areStatesEqual,k=I===void 0?Lg:I,F=E.areOwnPropsEqual,P=F===void 0?cs:F,C=E.areStatePropsEqual,R=C===void 0?cs:C,O=E.areMergedPropsEqual,$=O===void 0?cs:O,z=Mo(E,_g),L=us(g,s,"mapStateToProps"),oe=us(y,c,"mapDispatchToProps"),B=us(w,f,"mergeProps");return r(u,ve({methodName:"connect",getDisplayName:function(W){return"Connect("+W+")"},shouldHandleStateChanges:!!g,initMapStateToProps:L,initMapDispatchToProps:oe,initMergeProps:B,pure:M,areStatesEqual:k,areOwnPropsEqual:P,areStatePropsEqual:R,areMergedPropsEqual:$},z))}}const td=Og();WS(yo.unstable_batchedUpdates);function Rg(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&&Rg(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 Bg(e,t){return nd(function(){return e},t)}var Me=nd,be=Bg,Pg=process.env.NODE_ENV==="production",ms="Invariant failed";function rd(e,t){if(Pg)throw new Error(ms);var n=typeof t=="function"?t():t,r=n?"".concat(ms,": ").concat(n):ms;throw new Error(r)}var $t=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},fs=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}},Ag=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},hs={top:0,right:0,bottom:0,left:0},Ss=function(t){var n=t.borderBox,r=t.margin,a=r===void 0?hs:r,s=t.border,l=s===void 0?hs:s,c=t.padding,p=c===void 0?hs:c,f=$t(fs(n,a)),m=$t(od(n,l)),u=$t(od(m,p));return{marginBox:f,borderBox:$t(n),paddingBox:m,contentBox:u,margin:a,border:l,padding:p}},_t=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},Fg=function(){return{x:window.pageXOffset,y:window.pageYOffset}},_o=function(t,n){var r=t.borderBox,a=t.border,s=t.margin,l=t.padding,c=Ag(r,n);return Ss({borderBox:c,border:a,margin:s,padding:l})},Lo=function(t,n){return n===void 0&&(n=Fg()),_o(t,n)},ad=function(t,n){var r={top:_t(n.marginTop),right:_t(n.marginRight),bottom:_t(n.marginBottom),left:_t(n.marginLeft)},a={top:_t(n.paddingTop),right:_t(n.paddingRight),bottom:_t(n.paddingBottom),left:_t(n.paddingLeft)},s={top:_t(n.borderTopWidth),right:_t(n.borderRightWidth),bottom:_t(n.borderBottomWidth),left:_t(n.borderLeftWidth)};return Ss({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 Vg(e,t){return!!(e===t||id(e)&&id(t))}function $g(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Vg(e[n],t[n]))return!1;return!0}function st(e,t){t===void 0&&(t=$g);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 $r=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},Kg=process.env.NODE_ENV==="production",Hg=/[ \t]{2,}/g,Wg=/^[ \t]*/gm,ld=function(t){return t.replace(Hg," ").replace(Wg,"").trim()},Gg=function(t){return ld(`
|
|
359
|
+
*/var zc;function tg(){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,f=60120,m=60115,u=60116,h=60121,g=60122,y=60117,w=60129,T=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"),f=E("react.suspense_list"),m=E("react.memo"),u=E("react.lazy"),h=E("react.block"),g=E("react.server.block"),y=E("react.fundamental"),E("react.scope"),E("react.opaque.id"),w=E("react.debug_trace_mode"),E("react.offscreen"),T=E("react.legacy_hidden")}var D=!1;function M(X){return!!(typeof X=="string"||typeof X=="function"||X===n||X===a||X===w||X===r||X===p||X===f||X===T||D||typeof X=="object"&&X!==null&&(X.$$typeof===u||X.$$typeof===m||X.$$typeof===s||X.$$typeof===l||X.$$typeof===c||X.$$typeof===y||X.$$typeof===h||X[0]===g))}function I(X){if(typeof X=="object"&&X!==null){var se=X.$$typeof;switch(se){case e:var we=X.type;switch(we){case n:case a:case r:case p:case f:return we;default:var Pe=we&&we.$$typeof;switch(Pe){case l:case c:case u:case m:case s:return Pe;default:return se}}case t:return se}}}var k=l,F=s,P=e,C=c,R=n,O=u,$=m,z=t,L=a,oe=r,B=p,ee=!1,W=!1;function j(X){return ee||(ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function re(X){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(X){return I(X)===l}function J(X){return I(X)===s}function ae(X){return typeof X=="object"&&X!==null&&X.$$typeof===e}function ie(X){return I(X)===c}function q(X){return I(X)===n}function V(X){return I(X)===u}function G(X){return I(X)===m}function Z(X){return I(X)===t}function te(X){return I(X)===a}function de(X){return I(X)===r}function pe(X){return I(X)===p}Fe.ContextConsumer=k,Fe.ContextProvider=F,Fe.Element=P,Fe.ForwardRef=C,Fe.Fragment=R,Fe.Lazy=O,Fe.Memo=$,Fe.Portal=z,Fe.Profiler=L,Fe.StrictMode=oe,Fe.Suspense=B,Fe.isAsyncMode=j,Fe.isConcurrentMode=re,Fe.isContextConsumer=H,Fe.isContextProvider=J,Fe.isElement=ae,Fe.isForwardRef=ie,Fe.isFragment=q,Fe.isLazy=V,Fe.isMemo=G,Fe.isPortal=Z,Fe.isProfiler=te,Fe.isStrictMode=de,Fe.isSuspense=pe,Fe.isValidElementType=M,Fe.typeOf=I}()),Fe}process.env.NODE_ENV==="production"?ls.exports=eg():ls.exports=tg();var jc=ls.exports,ng=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],rg=["reactReduxForwardedRef"],og=[],ag=[null,null],sg=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function ig(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 lg(e,t,n,r,a,s,l){e.current=r,t.current=a,n.current=!1,s.current&&(s.current=null,l())}function cg(e,t,n,r,a,s,l,c,p,f){if(e){var m=!1,u=null,h=function(){if(!m){var w=t.getState(),T,E;try{T=r(w,a.current)}catch(D){E=D,u=D}E||(u=null),T===s.current?l.current||p():(s.current=T,c.current=T,l.current=!0,f({type:"STORE_UPDATED",payload:{error:E}}))}};n.onStateChange=h,n.trySubscribe(),h();var g=function(){if(m=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return g}}var dg=function(){return[null,0]};function pg(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,a=r===void 0?function(F){return"ConnectAdvanced("+F+")"}:r,s=n.methodName,l=s===void 0?"connectAdvanced":s,c=n.renderCountProp,p=c===void 0?void 0:c,f=n.shouldHandleStateChanges,m=f===void 0?!0:f,u=n.storeKey,h=u===void 0?"store":u,g=n.withRef,y=g===void 0?!1:g,w=n.forwardRef,T=w===void 0?!1:w,E=n.context,D=E===void 0?as:E,M=Mo(n,ng);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=D;return function(P){if(process.env.NODE_ENV!=="production"&&!jc.isValidElementType(P))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+sg(P)));var C=P.displayName||P.name||"Component",R=a(C),O=ve({},M,{getDisplayName:a,methodName:l,renderCountProp:p,shouldHandleStateChanges:m,storeKey:h,displayName:R,wrappedComponentName:C,WrappedComponent:P}),$=M.pure;function z(W){return e(W.dispatch,O)}var L=$?x.useMemo:function(W){return W()};function oe(W){var j=x.useMemo(function(){var Ve=W.reactReduxForwardedRef,he=Mo(W,rg);return[W.context,Ve,he]},[W]),re=j[0],H=j[1],J=j[2],ae=x.useMemo(function(){return re&&re.Consumer&&jc.isContextConsumer(x.createElement(re.Consumer,null))?re:k},[re,k]),ie=x.useContext(ae),q=!!W.store&&!!W.store.getState&&!!W.store.dispatch,V=!!ie&&!!ie.store;if(process.env.NODE_ENV!=="production"&&!q&&!V)throw new Error('Could not find "store" in the context of '+('"'+R+'". Either wrap the root component in a <Provider>, ')+"or pass a custom React context provider to <Provider> and the corresponding "+("React context consumer to "+R+" in connect options."));var G=q?W.store:ie.store,Z=x.useMemo(function(){return z(G)},[G]),te=x.useMemo(function(){if(!m)return ag;var Ve=Ac(G,q?null:ie.subscription),he=Ve.notifyNestedSubs.bind(Ve);return[Ve,he]},[G,q,ie]),de=te[0],pe=te[1],X=x.useMemo(function(){return q?ie:ve({},ie,{subscription:de})},[q,ie,de]),se=x.useReducer(ig,og,dg),we=se[0],Pe=we[0],pt=se[1];if(Pe&&Pe.error)throw Pe.error;var bt=x.useRef(),nt=x.useRef(J),rt=x.useRef(),Pt=x.useRef(!1),Xe=L(function(){return rt.current&&J===nt.current?rt.current:Z(G.getState(),J)},[G,Pe,J]);qc(lg,[nt,bt,Pt,J,Xe,rt,pe]),qc(cg,[m,G,de,Z,nt,bt,Pt,rt,pe,pt],[G,de,Z]);var He=x.useMemo(function(){return x.createElement(P,ve({},Xe,{ref:H}))},[H,P,Xe]),ge=x.useMemo(function(){return m?x.createElement(ae.Provider,{value:X},He):He},[ae,He,X]);return ge}var B=$?x.memo(oe):oe;if(B.WrappedComponent=P,B.displayName=oe.displayName=R,T){var ee=x.forwardRef(function(j,re){return x.createElement(B,ve({},j,{reactReduxForwardedRef:re}))});return ee.displayName=R,ee.WrappedComponent=P,Yc(ee,P)}return Yc(B,P)}}function Jc(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function cs(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 ug(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 mg(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){mg(e)||Zc(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function ds(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,f){return l.dependsOnOwnProps?l.mapToProps(p,f):l.mapToProps(p)};return l.dependsOnOwnProps=!0,l.mapToProps=function(p,f){l.mapToProps=e,l.dependsOnOwnProps=Qc(e);var m=l(p,f);return typeof m=="function"&&(l.mapToProps=m,l.dependsOnOwnProps=Qc(m),m=l(p,f)),process.env.NODE_ENV!=="production"&&Xc(m,s,t),m},l}}function fg(e){return typeof e=="function"?ed(e,"mapDispatchToProps"):void 0}function hg(e){return e?void 0:ds(function(t){return{dispatch:t}})}function Sg(e){return e&&typeof e=="object"?ds(function(t){return ug(e,t)}):void 0}const gg=[fg,hg,Sg];function bg(e){return typeof e=="function"?ed(e,"mapStateToProps"):void 0}function vg(e){return e?void 0:ds(function(){return{}})}const yg=[bg,vg];function Tg(e,t,n){return ve({},n,e,t)}function Eg(e){return function(n,r){var a=r.displayName,s=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(m,u,h){var g=e(m,u,h);return c?(!s||!l(g,p))&&(p=g):(c=!0,p=g,process.env.NODE_ENV!=="production"&&Xc(p,a,"mergeProps")),p}}}function wg(e){return typeof e=="function"?Eg(e):void 0}function Cg(e){return e?void 0:function(){return Tg}}const Dg=[wg,Cg];function ps(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 Ng(e,t,n,r){ps(e,"mapStateToProps",r),ps(t,"mapDispatchToProps",r),ps(n,"mergeProps",r)}var kg=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Ig(e,t,n,r){return function(s,l){return n(e(s,l),t(r,l),l)}}function xg(e,t,n,r,a){var s=a.areStatesEqual,l=a.areOwnPropsEqual,c=a.areStatePropsEqual,p=!1,f,m,u,h,g;function y(M,I){return f=M,m=I,u=e(f,m),h=t(r,m),g=n(u,h,m),p=!0,g}function w(){return u=e(f,m),t.dependsOnOwnProps&&(h=t(r,m)),g=n(u,h,m),g}function T(){return e.dependsOnOwnProps&&(u=e(f,m)),t.dependsOnOwnProps&&(h=t(r,m)),g=n(u,h,m),g}function E(){var M=e(f,m),I=!c(M,u);return u=M,I&&(g=n(u,h,m)),g}function D(M,I){var k=!l(I,m),F=!s(M,f,I,m);return f=M,m=I,k&&F?w():k?T():F?E():g}return function(I,k){return p?D(I,k):y(I,k)}}function Mg(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,s=Mo(t,kg),l=n(e,s),c=r(e,s),p=a(e,s);process.env.NODE_ENV!=="production"&&Ng(l,c,p,s.displayName);var f=s.pure?xg:Ig;return f(l,c,p,e,s)}var _g=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function us(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 Lg(e,t){return e===t}function Og(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?pg:n,a=t.mapStateToPropsFactories,s=a===void 0?yg:a,l=t.mapDispatchToPropsFactories,c=l===void 0?gg:l,p=t.mergePropsFactories,f=p===void 0?Dg:p,m=t.selectorFactory,u=m===void 0?Mg:m;return function(g,y,w,T){T===void 0&&(T={});var E=T,D=E.pure,M=D===void 0?!0:D,I=E.areStatesEqual,k=I===void 0?Lg:I,F=E.areOwnPropsEqual,P=F===void 0?cs:F,C=E.areStatePropsEqual,R=C===void 0?cs:C,O=E.areMergedPropsEqual,$=O===void 0?cs:O,z=Mo(E,_g),L=us(g,s,"mapStateToProps"),oe=us(y,c,"mapDispatchToProps"),B=us(w,f,"mergeProps");return r(u,ve({methodName:"connect",getDisplayName:function(W){return"Connect("+W+")"},shouldHandleStateChanges:!!g,initMapStateToProps:L,initMapDispatchToProps:oe,initMergeProps:B,pure:M,areStatesEqual:k,areOwnPropsEqual:P,areStatePropsEqual:R,areMergedPropsEqual:$},z))}}const td=Og();WS(yo.unstable_batchedUpdates);function Rg(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&&Rg(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 Bg(e,t){return nd(function(){return e},t)}var Me=nd,be=Bg,Pg=process.env.NODE_ENV==="production",ms="Invariant failed";function rd(e,t){if(Pg)throw new Error(ms);var n=typeof t=="function"?t():t,r=n?"".concat(ms,": ").concat(n):ms;throw new Error(r)}var $t=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},fs=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}},Ag=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},hs={top:0,right:0,bottom:0,left:0},Ss=function(t){var n=t.borderBox,r=t.margin,a=r===void 0?hs:r,s=t.border,l=s===void 0?hs:s,c=t.padding,p=c===void 0?hs:c,f=$t(fs(n,a)),m=$t(od(n,l)),u=$t(od(m,p));return{marginBox:f,borderBox:$t(n),paddingBox:m,contentBox:u,margin:a,border:l,padding:p}},_t=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},Fg=function(){return{x:window.pageXOffset,y:window.pageYOffset}},_o=function(t,n){var r=t.borderBox,a=t.border,s=t.margin,l=t.padding,c=Ag(r,n);return Ss({borderBox:c,border:a,margin:s,padding:l})},Lo=function(t,n){return n===void 0&&(n=Fg()),_o(t,n)},ad=function(t,n){var r={top:_t(n.marginTop),right:_t(n.marginRight),bottom:_t(n.marginBottom),left:_t(n.marginLeft)},a={top:_t(n.paddingTop),right:_t(n.paddingRight),bottom:_t(n.paddingBottom),left:_t(n.paddingLeft)},s={top:_t(n.borderTopWidth),right:_t(n.borderRightWidth),bottom:_t(n.borderBottomWidth),left:_t(n.borderLeftWidth)};return Ss({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 Vg(e,t){return!!(e===t||id(e)&&id(t))}function $g(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Vg(e[n],t[n]))return!1;return!0}function at(e,t){t===void 0&&(t=$g);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 $r=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},Kg=process.env.NODE_ENV==="production",Hg=/[ \t]{2,}/g,Wg=/^[ \t]*/gm,ld=function(t){return t.replace(Hg," ").replace(Wg,"").trim()},Gg=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(H),null," "));var se=X(Z,pe,q,V,G+"."+
|
|
|
401
401
|
`:`
|
|
402
402
|
The item has been dropped while not over a drop area.
|
|
403
403
|
`+md(t.source)+`
|
|
404
|
-
`},Ro={dragHandleUsageInstructions:Jg,onDragStart:Zg,onDragUpdate:Xg,onDragEnd:Qg},it={x:0,y:0},dt=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Dt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},yn=function(t,n){return t.x===n.x&&t.y===n.y},mr=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Kn=function(t,n,r){var a;return r===void 0&&(r=0),a={},a[t]=n,a[t==="x"?"y":"x"]=r,a},Hr=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 Hr(t,r)}))},hd=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},eb=function(e,t){var n=$t({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},Wr=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}]},tb={top:0,right:0,bottom:0,left:0},nb=function(t,n){return n?Wr(t,n.scroll.diff.displacement):t},rb=function(t,n,r){if(r&&r.increasedBy){var a;return ve({},t,(a={},a[n.end]=t[n.end]+r.increasedBy[n.line],a))}return t},ob=function(t,n){return n&&n.shouldClipSubject?eb(n.pageMarginBox,t):$t(t)},fr=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,a=e.frame,s=nb(t.marginBox,a),l=rb(s,r,n),c=ob(l,a);return{page:t,withPlaceholder:n,active:c}},bs=function(e,t){e.frame||(process.env.NODE_ENV,K());var n=e.frame,r=Dt(t,n.scroll.initial),a=mr(r),s=ve({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}}),l=fr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s}),c=ve({},e,{frame:s,subject:l});return c};function ab(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Bo(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function vs(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 Tn(e,t){if(e.find)return e.find(t);var n=vs(e,t);if(n!==-1)return e[n]}function gd(e){return Array.prototype.slice.call(e)}var bd=st(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),vd=st(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Po=st(function(e){return Bo(e)}),sb=st(function(e){return Bo(e)}),Hn=st(function(e,t){var n=sb(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,a){return r.descriptor.index-a.descriptor.index});return n});function ys(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Ao(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Fo=st(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),ib=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=ys(s);if(!l)return null;function c(w){var T={type:"COMBINE",combine:{draggableId:w,droppableId:r.descriptor.id}};return ve({},s,{at:T})}var p=s.displaced.all,f=p.length?p[0]:null;if(t)return f?c(f):null;var m=Fo(n,a);if(!f){if(!m.length)return null;var u=m[m.length-1];return c(u.descriptor.id)}var h=vs(m,function(w){return w.descriptor.id===f});h===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find displaced item in set"):K());var g=h-1;if(g<0)return null;var y=m[g];return c(y.descriptor.id)},hr=function(e,t){return e.descriptor.droppableId===t.descriptor.id},yd={point:it,value:0},Gr={invisible:{},visible:{},all:[]},lb={displaced:Gr,displacedBy:yd,at:null},Ot=function(e,t){return function(n){return e<=n&&n<=t}},Td=function(e){var t=Ot(e.top,e.bottom),n=Ot(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,f=r.left<e.left&&r.right>e.right,m=p&&f;if(m)return!0;var u=p&&l||f&&s;return u}},cb=function(e){var t=Ot(e.top,e.bottom),n=Ot(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return a}},Ts={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"},db=function(e){return function(t){var n=Ot(t.top,t.bottom),r=Ot(t.left,t.right);return function(a){return e===Ts?n(a.top)&&n(a.bottom):r(a.left)&&r(a.right)}}},pb=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:it;return Wr(t,r)},ub=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},mb=function(t,n,r){return r(n)(t)},Es=function(t){var n=t.target,r=t.destination,a=t.viewport,s=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,c=s?pb(n,r):n;return ub(c,r,l)&&mb(c,a,l)},fb=function(t){return Es(ve({},t,{isVisibleThroughFrameFn:Td}))},wd=function(t){return Es(ve({},t,{isVisibleThroughFrameFn:cb}))},hb=function(t){return Es(ve({},t,{isVisibleThroughFrameFn:db(t.destination.axis)}))},Sb=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 gb(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return $t(fs(n,r))}function Yr(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,f){var m=gb(f,r),u=f.descriptor.id;p.all.push(u);var h=fb({target:m,destination:n,viewport:a,withDroppableDisplacement:!0});if(!h)return p.invisible[f.descriptor.id]=!0,p;var g=Sb(u,l,s),y={draggableId:u,shouldAnimate:g};return p.visible[u]=y,p},{all:[],visible:{},invisible:{}})}function bb(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=bb(t,{inHomeList:n});return{displaced:Gr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:s}}}}function Vo(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,f=hr(t,r);if(c==null)return Cd({insideDestination:n,inHomeList:f,displacedBy:s,destination:r});var m=Tn(n,function(w){return w.descriptor.index===c});if(!m)return Cd({insideDestination:n,inHomeList:f,displacedBy:s,destination:r});var u=Fo(t,n),h=n.indexOf(m),g=u.slice(h),y=Yr({afterDragging:g,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 En(e,t){return!!t.effected[e]}var vb=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,f=En(l,s);return f?t?p:p-1:t?p+1:p},yb=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,f=n?p:p+1;return l<c||l>f?null:l},Tb=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,f=e.afterCritical,m=c.at;if(m||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move in direction without previous impact location"):K()),m.type==="REORDER"){var u=yb({isMovingForward:t,isInHomeList:n,location:m.destination,insideDestination:l});return u==null?null:Vo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:u})}var h=vb({isMovingForward:t,destination:s,displaced:c.displaced,draggables:a,combine:m.combine,afterCritical:f});return h==null?null:Vo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:h})},Eb=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,a=e.displacedBy,s=!!(t.visible[r]||t.invisible[r]);return En(r,n)?s?it:mr(a.point):s?a.point:it},wb=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,a=Ao(n);a||(process.env.NODE_ENV,K());var s=a.draggableId,l=r[s].page.borderBox.center,c=Eb({displaced:n.displaced,afterCritical:t,combineWith:s,displacedBy:n.displacedBy});return dt(l,c)},Dd=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},Cb=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},ws=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 Kn(n.line,r.marginBox[n.end]+Dd(n,a),ws(n,r.marginBox,a))},kd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return Kn(n.line,r.marginBox[n.start]-Cb(n,a),ws(n,r.marginBox,a))},Db=function(t){var n=t.axis,r=t.moveInto,a=t.isMoving;return Kn(n.line,r.contentBox[n.start]+Dd(n,a),ws(n,r.contentBox,a))},Nb=function(e){var t=e.impact,n=e.draggable,r=e.draggables,a=e.droppable,s=e.afterCritical,l=Hn(a.descriptor.id,r),c=n.page,p=a.axis;if(!l.length)return Db({axis:p,moveInto:a.page,isMoving:c});var f=t.displaced,m=t.displacedBy,u=f.all[0];if(u){var h=r[u];if(En(u,s))return kd({axis:p,moveRelativeTo:h.page,isMoving:c});var g=_o(h.page,m.point);return kd({axis:p,moveRelativeTo:g,isMoving:c})}var y=l[l.length-1];if(y.descriptor.id===n.descriptor.id)return c.borderBox.center;if(En(y.descriptor.id,s)){var w=_o(y.page,mr(s.displacedBy.point));return Nd({axis:p,moveRelativeTo:w,isMoving:c})}return Nd({axis:p,moveRelativeTo:y.page,isMoving:c})},Cs=function(e,t){var n=e.frame;return n?dt(t,n.scroll.diff.displacement):t},kb=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"?Nb({impact:n,draggable:r,draggables:s,droppable:a,afterCritical:l}):wb({impact:n,draggables:s,afterCritical:l})},$o=function(e){var t=kb(e),n=e.droppable,r=n?Cs(n,t):t;return r},Id=function(e,t){var n=Dt(t,e.scroll.initial),r=mr(n),a=$t({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 Ib(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var xb=function(e){var t=e.impact,n=e.viewport,r=e.destination,a=e.draggables,s=e.maxScrollChange,l=Id(n,dt(n.scroll.current,s)),c=r.frame?bs(r,dt(r.frame.scroll.current,s)):r,p=t.displaced,f=Yr({afterDragging:xd(p.all,a),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:p,forceShouldAnimate:!1}),m=Yr({afterDragging:xd(p.all,a),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),u={},h={},g=[p,f,m];p.all.forEach(function(w){var T=Ib(w,g);if(T){h[w]=T;return}u[w]=!0});var y=ve({},t,{displaced:{all:p.all,invisible:u,visible:h}});return y},Mb=function(e,t){return dt(e.scroll.diff.displacement,t)},Ds=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,a=Mb(r,t),s=Dt(a,n.page.borderBox.center);return dt(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=Dt(r,t.page.borderBox.center),f=Wr(t.page.borderBox,p),m={target:f,destination:n,withDroppableDisplacement:s,viewport:a};return c?hb(m):wd(m)},_b=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,f=e.afterCritical;if(!r.isEnabled)return null;var m=Hn(r.descriptor.id,a),u=hr(n,r),h=ib({isMovingForward:t,draggable:n,destination:r,insideDestination:m,previousImpact:s})||Tb({isMovingForward:t,isInHomeList:u,draggable:n,draggables:a,destination:r,insideDestination:m,previousImpact:s,viewport:l,afterCritical:f});if(!h)return null;var g=$o({impact:h,draggable:n,droppable:r,draggables:a,afterCritical:f}),y=Md({draggable:n,destination:r,newPageBorderBoxCenter:g,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(y){var w=Ds({pageBorderBoxCenter:g,draggable:n,viewport:l});return{clientSelection:w,impact:h,scrollJumpRequest:null}}var T=Dt(g,c),E=xb({impact:h,viewport:l,destination:r,draggables:a,maxScrollChange:T});return{clientSelection:p,impact:E,scrollJumpRequest:T}},St=function(t){var n=t.subject.active;return n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get clipped area from droppable"):K()),n},Lb=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=Ot(l[c.start],l[c.end]),f=Po(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)(St(u))}).filter(function(u){var h=St(u);return t?l[c.crossAxisEnd]<h[c.crossAxisEnd]:h[c.crossAxisStart]<l[c.crossAxisStart]}).filter(function(u){var h=St(u),g=Ot(h[c.start],h[c.end]);return p(h[c.start])||p(h[c.end])||g(l[c.start])||g(l[c.end])}).sort(function(u,h){var g=St(u)[c.crossAxisStart],y=St(h)[c.crossAxisStart];return t?g-y:y-g}).filter(function(u,h,g){return St(u)[c.crossAxisStart]===St(g[0])[c.crossAxisStart]});if(!f.length)return null;if(f.length===1)return f[0];var m=f.filter(function(u){var h=Ot(St(u)[c.start],St(u)[c.end]);return h(n[c.line])});return m.length===1?m[0]:m.length>1?m.sort(function(u,h){return St(u)[c.start]-St(h)[c.start]})[0]:f.sort(function(u,h){var g=fd(n,Sd(St(u))),y=fd(n,Sd(St(h)));return g!==y?g-y:St(u)[c.start]-St(h)[c.start]})[0]},_d=function(t,n){var r=t.page.borderBox.center;return En(t.descriptor.id,n)?Dt(r,n.displacedBy.point):r},Ob=function(t,n){var r=t.page.borderBox;return En(t.descriptor.id,n)?Wr(r,mr(n.displacedBy.point)):r},Rb=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:Ob(c,s),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(c,p){var f=Hr(t,Cs(r,_d(c,s))),m=Hr(t,Cs(r,_d(p,s)));return f<m?-1:m<f?1:c.descriptor.index-p.descriptor.index});return l[0]||null},Ur=st(function(t,n){var r=n[t.line];return{value:r,point:Kn(t.line,r)}}),Bb=function(t,n,r){var a=t.axis;if(t.descriptor.mode==="virtual")return Kn(a.line,n[a.line]);var s=t.subject.page.contentBox[a.size],l=Hn(t.descriptor.id,r),c=l.reduce(function(m,u){return m+u.client.marginBox[a.size]},0),p=c+n[a.line],f=p-s;return f<=0?null:Kn(a.line,f)},Ld=function(t,n){return ve({},t,{scroll:ve({},t.scroll,{max:n})})},Od=function(t,n,r){var a=t.frame;hr(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=Ur(t.axis,n.displaceBy).point,l=Bb(t,s,r),c={placeholderSize:s,increasedBy:l,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!a){var p=fr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:t.frame});return ve({},t,{subject:p})}var f=l?dt(a.scroll.max,l):a.scroll.max,m=Ld(a,f),u=fr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:m});return ve({},t,{subject:u,frame:m})},Pb=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=fr({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ve({},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=fr({page:t.subject.page,axis:t.axis,frame:l,withPlaceholder:null});return ve({},t,{subject:c,frame:l})},Ab=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 f={displaced:Gr,displacedBy:yd,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},m=$o({impact:f,draggable:a,droppable:l,draggables:s,afterCritical:p}),u=hr(a,l)?l:Od(l,a,s),h=Md({draggable:a,destination:u,newPageBorderBoxCenter:m,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return h?f:null}var g=t[l.axis.line]<=n.page.borderBox.center[l.axis.line],y=function(){var T=n.descriptor.index;return n.descriptor.id===a.descriptor.id||g?T:T+1}(),w=Ur(l.axis,a.displaceBy);return Vo({draggable:a,insideDestination:r,destination:l,viewport:c,displacedBy:w,last:Gr,index:y})},Fb=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,f=Lb({isMovingForward:t,pageBorderBoxCenter:n,source:a,droppables:l,viewport:c});if(!f)return null;var m=Hn(f.descriptor.id,s),u=Rb({pageBorderBoxCenter:n,viewport:c,destination:f,insideDestination:m,afterCritical:p}),h=Ab({previousPageBorderBoxCenter:n,destination:f,draggable:r,draggables:s,moveRelativeTo:u,insideDestination:m,viewport:c,afterCritical:p});if(!h)return null;var g=$o({impact:h,draggable:r,droppable:f,draggables:s,afterCritical:p}),y=Ds({pageBorderBoxCenter:g,draggable:r,viewport:c});return{clientSelection:y,impact:h,scrollJumpRequest:null}},Nt=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},Vb=function(t,n){var r=Nt(t);return r?n[r]:null},$b=function(e){var t=e.state,n=e.type,r=Vb(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 f=n==="MOVE_DOWN"||n==="MOVE_RIGHT",m=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,h=t.dimensions,g=h.draggables,y=h.droppables;return p?_b({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,destination:l,draggables:g,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Fb({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,isOver:l,draggables:g,droppables:y,viewport:t.viewport,afterCritical:t.afterCritical})};function Wn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Rd(e){var t=Ot(e.top,e.bottom),n=Ot(e.left,e.right);return function(a){return t(a.y)&&n(a.x)}}function Kb(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Hb(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=Kn(l.axis.line,t.center[c.line],l.page.borderBox.center[c.crossAxisLine]);return{id:l.descriptor.id,distance:Hr(a,p)}}).sort(function(l,c){return c.distance-l.distance});return s[0]?s[0].id:null}function Wb(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,a=Po(r).filter(function(s){if(!s.isEnabled)return!1;var l=s.subject.active;if(!l||!Kb(t,l))return!1;if(Rd(l)(t.center))return!0;var c=s.axis,p=l.center[c.crossAxisLine],f=t[c.crossAxisStart],m=t[c.crossAxisEnd],u=Ot(l[c.crossAxisStart],l[c.crossAxisEnd]),h=u(f),g=u(m);return!h&&!g?!0:h?f<p:m>p});return a.length?a.length===1?a[0].descriptor.id:Hb({pageBorderBox:t,draggable:n,candidates:a}):null}var Bd=function(t,n){return $t(Wr(t,n))},Gb=function(e,t){var n=e.frame;return n?Bd(t,n.scroll.diff.value):t};function Pd(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function Yb(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 Ub=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,f=Ur(r.axis,n.displaceBy),m=f.value,u=t[p.start],h=t[p.end],g=Fo(n,a),y=Tn(g,function(T){var E=T.descriptor.id,D=T.page.borderBox.center[p.line],M=En(E,c),I=Pd({displaced:s,id:E});return M?I?h<=D:u<D-m:I?h<=D+m:u<D}),w=Yb({draggable:n,closest:y,inHomeList:hr(n,r)});return Vo({draggable:n,insideDestination:a,destination:r,viewport:l,last:s,displacedBy:f,index:w})},zb=4,jb=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=Ur(a.axis,t.displaceBy),f=p.value,m=n[c.start],u=n[c.end],h=Fo(t,s),g=Tn(h,function(w){var T=w.descriptor.id,E=w.page.borderBox,D=E[c.size],M=D/zb,I=En(T,l),k=Pd({displaced:r.displaced,id:T});return I?k?u>E[c.start]+M&&u<E[c.end]-M:m>E[c.start]-f+M&&m<E[c.end]-f-M:k?u>E[c.start]+f+M&&u<E[c.end]+f-M:m>E[c.start]+M&&m<E[c.end]-M});if(!g)return null;var y={displacedBy:p,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:g.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=Bd(n.page.borderBox,t),f=Wb({pageBorderBox:p,draggable:n,droppables:a});if(!f)return lb;var m=a[f],u=Hn(m.descriptor.id,r),h=Gb(m,p);return jb({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:s,destination:m,insideDestination:u,afterCritical:c})||Ub({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:m,insideDestination:u,last:s.displaced,viewport:l,afterCritical:c})},Ns=function(e,t){var n;return ve({},e,(n={},n[t.descriptor.id]=t,n))},qb=function(t){var n=t.previousImpact,r=t.impact,a=t.droppables,s=Nt(n),l=Nt(r);if(!s||s===l)return a;var c=a[s];if(!c.subject.withPlaceholder)return a;var p=Pb(c);return Ns(a,p)},Jb=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,a=e.previousImpact,s=e.impact,l=qb({previousImpact:a,impact:s,droppables:r}),c=Nt(s);if(!c)return l;var p=r[c];if(hr(t,p)||p.subject.withPlaceholder)return l;var f=Od(p,t,n);return Ns(l,f)},zr=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,f=n||t.current.client.selection,m=Dt(f,t.initial.client.selection),u={offset:m,selection:f,borderBoxCenter:dt(t.initial.client.borderBoxCenter,m)},h={selection:dt(u.selection,c.scroll.current),borderBoxCenter:dt(u.borderBoxCenter,c.scroll.current),offset:dt(u.offset,c.scroll.diff.value)},g={client:u,page:h};if(t.phase==="COLLECTING")return ve({phase:"COLLECTING"},t,{dimensions:p,viewport:c,current:g});var y=p.draggables[t.critical.draggable.id],w=s||Ad({pageOffset:h.offset,draggable:y,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),T=Jb({draggable:y,impact:w,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),E=ve({},t,{current:g,dimensions:{draggables:p.draggables,droppables:T},impact:w,viewport:c,scrollJumpRequest:l||null,forceShouldAnimate:l?!1:null});return E};function Zb(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=Zb(l.all,r),p=Yr({afterDragging:c,destination:a,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:s,last:l});return ve({},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=$o({impact:t,draggable:n,draggables:a,droppable:r,afterCritical:l});return Ds({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,f=c[t.critical.draggable.id],m=Nt(a);m||(process.env.NODE_ENV!=="production"?K(!1,"Must be over a destination in SNAP movement mode"):K());var u=p[m],h=Fd({impact:a,viewport:s,destination:u,draggables:c}),g=Vd({impact:h,draggable:f,droppable:u,draggables:c,viewport:s,afterCritical:t.afterCritical});return zr({impact:h,clientSelection:g,state:t,dimensions:l,viewport:s})},Xb=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=Ur(n.axis,t.displaceBy),l=Hn(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),f=p.reduce(function(g,y){return g[y.descriptor.id]=!0,g},{}),m={inVirtualList:n.descriptor.mode==="virtual",displacedBy:s,effected:f},u=Yr({afterDragging:p,destination:n,displacedBy:s,last:null,viewport:a.frame,forceShouldAnimate:!1}),h={displaced:u,displacedBy:s,at:{type:"REORDER",destination:Xb(t.descriptor)}};return{impact:h,afterCritical:m}},Qb=function(e,t){return{draggables:e.draggables,droppables:Ns(e.droppables,t)}},jr=function(t){process.env.NODE_ENV},qr=function(t){process.env.NODE_ENV},ev=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,a=_o(t.client,n),s=Lo(a,r),l=ve({},t,{placeholder:ve({},t.placeholder,{client:a}),client:a,page:s});return l},tv=function(e){var t=e.frame;return t||(process.env.NODE_ENV!=="production"?K(!1,"Expected Droppable to have a frame"):K()),t},nv=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=tv(c),f=p.scroll.diff.value,m=dt(a,f),u=ev({draggable:s,offset:m,initialWindowScroll:r.scroll.initial});return u})},rv=function(e){var t=e.state,n=e.published;jr();var r=n.modified.map(function(M){var I=t.dimensions.droppables[M.droppableId],k=bs(I,M.scroll);return k}),a=ve({},t.dimensions.droppables,{},bd(r)),s=vd(nv({additions:n.additions,updatedDroppables:a,viewport:t.viewport})),l=ve({},t.dimensions.draggables,{},s);n.removals.forEach(function(M){delete l[M]});var c={droppables:a,draggables:l},p=Nt(t.impact),f=p?c.droppables[p]:null,m=c.draggables[t.critical.draggable.id],u=c.droppables[t.critical.droppable.id],h=Kd({draggable:m,home:u,draggables:l,viewport:t.viewport}),g=h.impact,y=h.afterCritical,w=f&&f.isCombineEnabled?t.impact:g,T=Ad({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:w,viewport:t.viewport,afterCritical:y});qr();var E=ve({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:T,onLiftImpact:g,dimensions:c,afterCritical:y,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return E;var D=ve({phase:"DROP_PENDING"},E,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return D},ks=function(t){return t.movementMode==="SNAP"},Is=function(t,n,r){var a=Qb(t.dimensions,n);return!ks(t)||r?zr({state:t,dimensions:a}):$d({state:t,dimensions:a})};function xs(e){return e.isDragging&&e.movementMode==="SNAP"?ve({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Hd={phase:"IDLE",completed:null,shouldFlush:!1},ov=function(e,t){if(e===void 0&&(e=Hd),t.type==="FLUSH")return ve({},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],f=l.droppables[r.droppable.id],m={selection:a,borderBoxCenter:p.client.borderBox.center,offset:it},u={client:m,page:{selection:dt(m.selection,s.scroll.initial),borderBoxCenter:dt(m.selection,s.scroll.initial),offset:dt(m.selection,s.scroll.diff.value)}},h=Po(l.droppables).every(function(X){return!X.isFixedOnPage}),g=Kd({draggable:p,home:f,draggables:l.draggables,viewport:s}),y=g.impact,w=g.afterCritical,T={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:l,initial:u,current:u,isWindowScrollAllowed:h,impact:y,afterCritical:w,onLiftImpact:y,viewport:s,scrollJumpRequest:null,forceShouldAnimate:null};return T}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=ve({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()),rv({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Wn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var D=t.payload.client;return yn(D,e.current.client.selection)?e:zr({state:e,clientSelection:D,impact:ks(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return xs(e);Wn(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,F=e.dimensions.droppables[I];if(!F)return e;var P=bs(F,k);return Is(e,P,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Wn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var C=t.payload,R=C.id,O=C.isEnabled,$=e.dimensions.droppables[R];$||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+R+"] to toggle its enabled state"):K()),$.isEnabled===O&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isEnabled to "+String(O)+`
|
|
404
|
+
`},Ro={dragHandleUsageInstructions:Jg,onDragStart:Zg,onDragUpdate:Xg,onDragEnd:Qg},st={x:0,y:0},dt=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Dt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},yn=function(t,n){return t.x===n.x&&t.y===n.y},mr=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Kn=function(t,n,r){var a;return r===void 0&&(r=0),a={},a[t]=n,a[t==="x"?"y":"x"]=r,a},Hr=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 Hr(t,r)}))},hd=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},eb=function(e,t){var n=$t({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},Wr=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}]},tb={top:0,right:0,bottom:0,left:0},nb=function(t,n){return n?Wr(t,n.scroll.diff.displacement):t},rb=function(t,n,r){if(r&&r.increasedBy){var a;return ve({},t,(a={},a[n.end]=t[n.end]+r.increasedBy[n.line],a))}return t},ob=function(t,n){return n&&n.shouldClipSubject?eb(n.pageMarginBox,t):$t(t)},fr=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,a=e.frame,s=nb(t.marginBox,a),l=rb(s,r,n),c=ob(l,a);return{page:t,withPlaceholder:n,active:c}},bs=function(e,t){e.frame||(process.env.NODE_ENV,K());var n=e.frame,r=Dt(t,n.scroll.initial),a=mr(r),s=ve({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}}),l=fr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s}),c=ve({},e,{frame:s,subject:l});return c};function ab(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Bo(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function vs(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 Tn(e,t){if(e.find)return e.find(t);var n=vs(e,t);if(n!==-1)return e[n]}function gd(e){return Array.prototype.slice.call(e)}var bd=at(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),vd=at(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Po=at(function(e){return Bo(e)}),sb=at(function(e){return Bo(e)}),Hn=at(function(e,t){var n=sb(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,a){return r.descriptor.index-a.descriptor.index});return n});function ys(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Ao(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Fo=at(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),ib=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=ys(s);if(!l)return null;function c(w){var T={type:"COMBINE",combine:{draggableId:w,droppableId:r.descriptor.id}};return ve({},s,{at:T})}var p=s.displaced.all,f=p.length?p[0]:null;if(t)return f?c(f):null;var m=Fo(n,a);if(!f){if(!m.length)return null;var u=m[m.length-1];return c(u.descriptor.id)}var h=vs(m,function(w){return w.descriptor.id===f});h===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find displaced item in set"):K());var g=h-1;if(g<0)return null;var y=m[g];return c(y.descriptor.id)},hr=function(e,t){return e.descriptor.droppableId===t.descriptor.id},yd={point:st,value:0},Gr={invisible:{},visible:{},all:[]},lb={displaced:Gr,displacedBy:yd,at:null},Ot=function(e,t){return function(n){return e<=n&&n<=t}},Td=function(e){var t=Ot(e.top,e.bottom),n=Ot(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,f=r.left<e.left&&r.right>e.right,m=p&&f;if(m)return!0;var u=p&&l||f&&s;return u}},cb=function(e){var t=Ot(e.top,e.bottom),n=Ot(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return a}},Ts={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"},db=function(e){return function(t){var n=Ot(t.top,t.bottom),r=Ot(t.left,t.right);return function(a){return e===Ts?n(a.top)&&n(a.bottom):r(a.left)&&r(a.right)}}},pb=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:st;return Wr(t,r)},ub=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},mb=function(t,n,r){return r(n)(t)},Es=function(t){var n=t.target,r=t.destination,a=t.viewport,s=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,c=s?pb(n,r):n;return ub(c,r,l)&&mb(c,a,l)},fb=function(t){return Es(ve({},t,{isVisibleThroughFrameFn:Td}))},wd=function(t){return Es(ve({},t,{isVisibleThroughFrameFn:cb}))},hb=function(t){return Es(ve({},t,{isVisibleThroughFrameFn:db(t.destination.axis)}))},Sb=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 gb(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return $t(fs(n,r))}function Yr(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,f){var m=gb(f,r),u=f.descriptor.id;p.all.push(u);var h=fb({target:m,destination:n,viewport:a,withDroppableDisplacement:!0});if(!h)return p.invisible[f.descriptor.id]=!0,p;var g=Sb(u,l,s),y={draggableId:u,shouldAnimate:g};return p.visible[u]=y,p},{all:[],visible:{},invisible:{}})}function bb(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=bb(t,{inHomeList:n});return{displaced:Gr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:s}}}}function Vo(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,f=hr(t,r);if(c==null)return Cd({insideDestination:n,inHomeList:f,displacedBy:s,destination:r});var m=Tn(n,function(w){return w.descriptor.index===c});if(!m)return Cd({insideDestination:n,inHomeList:f,displacedBy:s,destination:r});var u=Fo(t,n),h=n.indexOf(m),g=u.slice(h),y=Yr({afterDragging:g,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 En(e,t){return!!t.effected[e]}var vb=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,f=En(l,s);return f?t?p:p-1:t?p+1:p},yb=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,f=n?p:p+1;return l<c||l>f?null:l},Tb=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,f=e.afterCritical,m=c.at;if(m||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move in direction without previous impact location"):K()),m.type==="REORDER"){var u=yb({isMovingForward:t,isInHomeList:n,location:m.destination,insideDestination:l});return u==null?null:Vo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:u})}var h=vb({isMovingForward:t,destination:s,displaced:c.displaced,draggables:a,combine:m.combine,afterCritical:f});return h==null?null:Vo({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:h})},Eb=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,a=e.displacedBy,s=!!(t.visible[r]||t.invisible[r]);return En(r,n)?s?st:mr(a.point):s?a.point:st},wb=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,a=Ao(n);a||(process.env.NODE_ENV,K());var s=a.draggableId,l=r[s].page.borderBox.center,c=Eb({displaced:n.displaced,afterCritical:t,combineWith:s,displacedBy:n.displacedBy});return dt(l,c)},Dd=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},Cb=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},ws=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 Kn(n.line,r.marginBox[n.end]+Dd(n,a),ws(n,r.marginBox,a))},kd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return Kn(n.line,r.marginBox[n.start]-Cb(n,a),ws(n,r.marginBox,a))},Db=function(t){var n=t.axis,r=t.moveInto,a=t.isMoving;return Kn(n.line,r.contentBox[n.start]+Dd(n,a),ws(n,r.contentBox,a))},Nb=function(e){var t=e.impact,n=e.draggable,r=e.draggables,a=e.droppable,s=e.afterCritical,l=Hn(a.descriptor.id,r),c=n.page,p=a.axis;if(!l.length)return Db({axis:p,moveInto:a.page,isMoving:c});var f=t.displaced,m=t.displacedBy,u=f.all[0];if(u){var h=r[u];if(En(u,s))return kd({axis:p,moveRelativeTo:h.page,isMoving:c});var g=_o(h.page,m.point);return kd({axis:p,moveRelativeTo:g,isMoving:c})}var y=l[l.length-1];if(y.descriptor.id===n.descriptor.id)return c.borderBox.center;if(En(y.descriptor.id,s)){var w=_o(y.page,mr(s.displacedBy.point));return Nd({axis:p,moveRelativeTo:w,isMoving:c})}return Nd({axis:p,moveRelativeTo:y.page,isMoving:c})},Cs=function(e,t){var n=e.frame;return n?dt(t,n.scroll.diff.displacement):t},kb=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"?Nb({impact:n,draggable:r,draggables:s,droppable:a,afterCritical:l}):wb({impact:n,draggables:s,afterCritical:l})},$o=function(e){var t=kb(e),n=e.droppable,r=n?Cs(n,t):t;return r},Id=function(e,t){var n=Dt(t,e.scroll.initial),r=mr(n),a=$t({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 Ib(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var xb=function(e){var t=e.impact,n=e.viewport,r=e.destination,a=e.draggables,s=e.maxScrollChange,l=Id(n,dt(n.scroll.current,s)),c=r.frame?bs(r,dt(r.frame.scroll.current,s)):r,p=t.displaced,f=Yr({afterDragging:xd(p.all,a),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:p,forceShouldAnimate:!1}),m=Yr({afterDragging:xd(p.all,a),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),u={},h={},g=[p,f,m];p.all.forEach(function(w){var T=Ib(w,g);if(T){h[w]=T;return}u[w]=!0});var y=ve({},t,{displaced:{all:p.all,invisible:u,visible:h}});return y},Mb=function(e,t){return dt(e.scroll.diff.displacement,t)},Ds=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,a=Mb(r,t),s=Dt(a,n.page.borderBox.center);return dt(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=Dt(r,t.page.borderBox.center),f=Wr(t.page.borderBox,p),m={target:f,destination:n,withDroppableDisplacement:s,viewport:a};return c?hb(m):wd(m)},_b=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,f=e.afterCritical;if(!r.isEnabled)return null;var m=Hn(r.descriptor.id,a),u=hr(n,r),h=ib({isMovingForward:t,draggable:n,destination:r,insideDestination:m,previousImpact:s})||Tb({isMovingForward:t,isInHomeList:u,draggable:n,draggables:a,destination:r,insideDestination:m,previousImpact:s,viewport:l,afterCritical:f});if(!h)return null;var g=$o({impact:h,draggable:n,droppable:r,draggables:a,afterCritical:f}),y=Md({draggable:n,destination:r,newPageBorderBoxCenter:g,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(y){var w=Ds({pageBorderBoxCenter:g,draggable:n,viewport:l});return{clientSelection:w,impact:h,scrollJumpRequest:null}}var T=Dt(g,c),E=xb({impact:h,viewport:l,destination:r,draggables:a,maxScrollChange:T});return{clientSelection:p,impact:E,scrollJumpRequest:T}},St=function(t){var n=t.subject.active;return n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get clipped area from droppable"):K()),n},Lb=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=Ot(l[c.start],l[c.end]),f=Po(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)(St(u))}).filter(function(u){var h=St(u);return t?l[c.crossAxisEnd]<h[c.crossAxisEnd]:h[c.crossAxisStart]<l[c.crossAxisStart]}).filter(function(u){var h=St(u),g=Ot(h[c.start],h[c.end]);return p(h[c.start])||p(h[c.end])||g(l[c.start])||g(l[c.end])}).sort(function(u,h){var g=St(u)[c.crossAxisStart],y=St(h)[c.crossAxisStart];return t?g-y:y-g}).filter(function(u,h,g){return St(u)[c.crossAxisStart]===St(g[0])[c.crossAxisStart]});if(!f.length)return null;if(f.length===1)return f[0];var m=f.filter(function(u){var h=Ot(St(u)[c.start],St(u)[c.end]);return h(n[c.line])});return m.length===1?m[0]:m.length>1?m.sort(function(u,h){return St(u)[c.start]-St(h)[c.start]})[0]:f.sort(function(u,h){var g=fd(n,Sd(St(u))),y=fd(n,Sd(St(h)));return g!==y?g-y:St(u)[c.start]-St(h)[c.start]})[0]},_d=function(t,n){var r=t.page.borderBox.center;return En(t.descriptor.id,n)?Dt(r,n.displacedBy.point):r},Ob=function(t,n){var r=t.page.borderBox;return En(t.descriptor.id,n)?Wr(r,mr(n.displacedBy.point)):r},Rb=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:Ob(c,s),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(c,p){var f=Hr(t,Cs(r,_d(c,s))),m=Hr(t,Cs(r,_d(p,s)));return f<m?-1:m<f?1:c.descriptor.index-p.descriptor.index});return l[0]||null},Ur=at(function(t,n){var r=n[t.line];return{value:r,point:Kn(t.line,r)}}),Bb=function(t,n,r){var a=t.axis;if(t.descriptor.mode==="virtual")return Kn(a.line,n[a.line]);var s=t.subject.page.contentBox[a.size],l=Hn(t.descriptor.id,r),c=l.reduce(function(m,u){return m+u.client.marginBox[a.size]},0),p=c+n[a.line],f=p-s;return f<=0?null:Kn(a.line,f)},Ld=function(t,n){return ve({},t,{scroll:ve({},t.scroll,{max:n})})},Od=function(t,n,r){var a=t.frame;hr(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=Ur(t.axis,n.displaceBy).point,l=Bb(t,s,r),c={placeholderSize:s,increasedBy:l,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!a){var p=fr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:t.frame});return ve({},t,{subject:p})}var f=l?dt(a.scroll.max,l):a.scroll.max,m=Ld(a,f),u=fr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:m});return ve({},t,{subject:u,frame:m})},Pb=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=fr({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ve({},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=fr({page:t.subject.page,axis:t.axis,frame:l,withPlaceholder:null});return ve({},t,{subject:c,frame:l})},Ab=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 f={displaced:Gr,displacedBy:yd,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},m=$o({impact:f,draggable:a,droppable:l,draggables:s,afterCritical:p}),u=hr(a,l)?l:Od(l,a,s),h=Md({draggable:a,destination:u,newPageBorderBoxCenter:m,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return h?f:null}var g=t[l.axis.line]<=n.page.borderBox.center[l.axis.line],y=function(){var T=n.descriptor.index;return n.descriptor.id===a.descriptor.id||g?T:T+1}(),w=Ur(l.axis,a.displaceBy);return Vo({draggable:a,insideDestination:r,destination:l,viewport:c,displacedBy:w,last:Gr,index:y})},Fb=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,f=Lb({isMovingForward:t,pageBorderBoxCenter:n,source:a,droppables:l,viewport:c});if(!f)return null;var m=Hn(f.descriptor.id,s),u=Rb({pageBorderBoxCenter:n,viewport:c,destination:f,insideDestination:m,afterCritical:p}),h=Ab({previousPageBorderBoxCenter:n,destination:f,draggable:r,draggables:s,moveRelativeTo:u,insideDestination:m,viewport:c,afterCritical:p});if(!h)return null;var g=$o({impact:h,draggable:r,droppable:f,draggables:s,afterCritical:p}),y=Ds({pageBorderBoxCenter:g,draggable:r,viewport:c});return{clientSelection:y,impact:h,scrollJumpRequest:null}},Nt=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},Vb=function(t,n){var r=Nt(t);return r?n[r]:null},$b=function(e){var t=e.state,n=e.type,r=Vb(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 f=n==="MOVE_DOWN"||n==="MOVE_RIGHT",m=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,h=t.dimensions,g=h.draggables,y=h.droppables;return p?_b({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,destination:l,draggables:g,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Fb({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,isOver:l,draggables:g,droppables:y,viewport:t.viewport,afterCritical:t.afterCritical})};function Wn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Rd(e){var t=Ot(e.top,e.bottom),n=Ot(e.left,e.right);return function(a){return t(a.y)&&n(a.x)}}function Kb(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Hb(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=Kn(l.axis.line,t.center[c.line],l.page.borderBox.center[c.crossAxisLine]);return{id:l.descriptor.id,distance:Hr(a,p)}}).sort(function(l,c){return c.distance-l.distance});return s[0]?s[0].id:null}function Wb(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,a=Po(r).filter(function(s){if(!s.isEnabled)return!1;var l=s.subject.active;if(!l||!Kb(t,l))return!1;if(Rd(l)(t.center))return!0;var c=s.axis,p=l.center[c.crossAxisLine],f=t[c.crossAxisStart],m=t[c.crossAxisEnd],u=Ot(l[c.crossAxisStart],l[c.crossAxisEnd]),h=u(f),g=u(m);return!h&&!g?!0:h?f<p:m>p});return a.length?a.length===1?a[0].descriptor.id:Hb({pageBorderBox:t,draggable:n,candidates:a}):null}var Bd=function(t,n){return $t(Wr(t,n))},Gb=function(e,t){var n=e.frame;return n?Bd(t,n.scroll.diff.value):t};function Pd(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function Yb(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 Ub=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,f=Ur(r.axis,n.displaceBy),m=f.value,u=t[p.start],h=t[p.end],g=Fo(n,a),y=Tn(g,function(T){var E=T.descriptor.id,D=T.page.borderBox.center[p.line],M=En(E,c),I=Pd({displaced:s,id:E});return M?I?h<=D:u<D-m:I?h<=D+m:u<D}),w=Yb({draggable:n,closest:y,inHomeList:hr(n,r)});return Vo({draggable:n,insideDestination:a,destination:r,viewport:l,last:s,displacedBy:f,index:w})},zb=4,jb=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=Ur(a.axis,t.displaceBy),f=p.value,m=n[c.start],u=n[c.end],h=Fo(t,s),g=Tn(h,function(w){var T=w.descriptor.id,E=w.page.borderBox,D=E[c.size],M=D/zb,I=En(T,l),k=Pd({displaced:r.displaced,id:T});return I?k?u>E[c.start]+M&&u<E[c.end]-M:m>E[c.start]-f+M&&m<E[c.end]-f-M:k?u>E[c.start]+f+M&&u<E[c.end]+f-M:m>E[c.start]+M&&m<E[c.end]-M});if(!g)return null;var y={displacedBy:p,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:g.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=Bd(n.page.borderBox,t),f=Wb({pageBorderBox:p,draggable:n,droppables:a});if(!f)return lb;var m=a[f],u=Hn(m.descriptor.id,r),h=Gb(m,p);return jb({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:s,destination:m,insideDestination:u,afterCritical:c})||Ub({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:m,insideDestination:u,last:s.displaced,viewport:l,afterCritical:c})},Ns=function(e,t){var n;return ve({},e,(n={},n[t.descriptor.id]=t,n))},qb=function(t){var n=t.previousImpact,r=t.impact,a=t.droppables,s=Nt(n),l=Nt(r);if(!s||s===l)return a;var c=a[s];if(!c.subject.withPlaceholder)return a;var p=Pb(c);return Ns(a,p)},Jb=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,a=e.previousImpact,s=e.impact,l=qb({previousImpact:a,impact:s,droppables:r}),c=Nt(s);if(!c)return l;var p=r[c];if(hr(t,p)||p.subject.withPlaceholder)return l;var f=Od(p,t,n);return Ns(l,f)},zr=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,f=n||t.current.client.selection,m=Dt(f,t.initial.client.selection),u={offset:m,selection:f,borderBoxCenter:dt(t.initial.client.borderBoxCenter,m)},h={selection:dt(u.selection,c.scroll.current),borderBoxCenter:dt(u.borderBoxCenter,c.scroll.current),offset:dt(u.offset,c.scroll.diff.value)},g={client:u,page:h};if(t.phase==="COLLECTING")return ve({phase:"COLLECTING"},t,{dimensions:p,viewport:c,current:g});var y=p.draggables[t.critical.draggable.id],w=s||Ad({pageOffset:h.offset,draggable:y,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),T=Jb({draggable:y,impact:w,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),E=ve({},t,{current:g,dimensions:{draggables:p.draggables,droppables:T},impact:w,viewport:c,scrollJumpRequest:l||null,forceShouldAnimate:l?!1:null});return E};function Zb(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=Zb(l.all,r),p=Yr({afterDragging:c,destination:a,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:s,last:l});return ve({},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=$o({impact:t,draggable:n,draggables:a,droppable:r,afterCritical:l});return Ds({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,f=c[t.critical.draggable.id],m=Nt(a);m||(process.env.NODE_ENV!=="production"?K(!1,"Must be over a destination in SNAP movement mode"):K());var u=p[m],h=Fd({impact:a,viewport:s,destination:u,draggables:c}),g=Vd({impact:h,draggable:f,droppable:u,draggables:c,viewport:s,afterCritical:t.afterCritical});return zr({impact:h,clientSelection:g,state:t,dimensions:l,viewport:s})},Xb=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=Ur(n.axis,t.displaceBy),l=Hn(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),f=p.reduce(function(g,y){return g[y.descriptor.id]=!0,g},{}),m={inVirtualList:n.descriptor.mode==="virtual",displacedBy:s,effected:f},u=Yr({afterDragging:p,destination:n,displacedBy:s,last:null,viewport:a.frame,forceShouldAnimate:!1}),h={displaced:u,displacedBy:s,at:{type:"REORDER",destination:Xb(t.descriptor)}};return{impact:h,afterCritical:m}},Qb=function(e,t){return{draggables:e.draggables,droppables:Ns(e.droppables,t)}},jr=function(t){process.env.NODE_ENV},qr=function(t){process.env.NODE_ENV},ev=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,a=_o(t.client,n),s=Lo(a,r),l=ve({},t,{placeholder:ve({},t.placeholder,{client:a}),client:a,page:s});return l},tv=function(e){var t=e.frame;return t||(process.env.NODE_ENV!=="production"?K(!1,"Expected Droppable to have a frame"):K()),t},nv=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=tv(c),f=p.scroll.diff.value,m=dt(a,f),u=ev({draggable:s,offset:m,initialWindowScroll:r.scroll.initial});return u})},rv=function(e){var t=e.state,n=e.published;jr();var r=n.modified.map(function(M){var I=t.dimensions.droppables[M.droppableId],k=bs(I,M.scroll);return k}),a=ve({},t.dimensions.droppables,{},bd(r)),s=vd(nv({additions:n.additions,updatedDroppables:a,viewport:t.viewport})),l=ve({},t.dimensions.draggables,{},s);n.removals.forEach(function(M){delete l[M]});var c={droppables:a,draggables:l},p=Nt(t.impact),f=p?c.droppables[p]:null,m=c.draggables[t.critical.draggable.id],u=c.droppables[t.critical.droppable.id],h=Kd({draggable:m,home:u,draggables:l,viewport:t.viewport}),g=h.impact,y=h.afterCritical,w=f&&f.isCombineEnabled?t.impact:g,T=Ad({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:w,viewport:t.viewport,afterCritical:y});qr();var E=ve({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:T,onLiftImpact:g,dimensions:c,afterCritical:y,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return E;var D=ve({phase:"DROP_PENDING"},E,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return D},ks=function(t){return t.movementMode==="SNAP"},Is=function(t,n,r){var a=Qb(t.dimensions,n);return!ks(t)||r?zr({state:t,dimensions:a}):$d({state:t,dimensions:a})};function xs(e){return e.isDragging&&e.movementMode==="SNAP"?ve({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Hd={phase:"IDLE",completed:null,shouldFlush:!1},ov=function(e,t){if(e===void 0&&(e=Hd),t.type==="FLUSH")return ve({},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],f=l.droppables[r.droppable.id],m={selection:a,borderBoxCenter:p.client.borderBox.center,offset:st},u={client:m,page:{selection:dt(m.selection,s.scroll.initial),borderBoxCenter:dt(m.selection,s.scroll.initial),offset:dt(m.selection,s.scroll.diff.value)}},h=Po(l.droppables).every(function(X){return!X.isFixedOnPage}),g=Kd({draggable:p,home:f,draggables:l.draggables,viewport:s}),y=g.impact,w=g.afterCritical,T={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:l,initial:u,current:u,isWindowScrollAllowed:h,impact:y,afterCritical:w,onLiftImpact:y,viewport:s,scrollJumpRequest:null,forceShouldAnimate:null};return T}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=ve({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()),rv({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Wn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var D=t.payload.client;return yn(D,e.current.client.selection)?e:zr({state:e,clientSelection:D,impact:ks(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return xs(e);Wn(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,F=e.dimensions.droppables[I];if(!F)return e;var P=bs(F,k);return Is(e,P,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Wn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var C=t.payload,R=C.id,O=C.isEnabled,$=e.dimensions.droppables[R];$||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+R+"] 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=ve({},$,{isEnabled:O});return Is(e,z,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Wn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var L=t.payload,oe=L.id,B=L.isCombineEnabled,ee=e.dimensions.droppables[oe];ee||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+oe+"] to toggle its isCombineEnabled state"):K()),ee.isCombineEnabled===B&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isCombineEnabled to "+String(B)+`
|
|
406
406
|
but it is already `+String(ee.isCombineEnabled)):K());var W=ve({},ee,{isCombineEnabled:B});return Is(e,W,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Wn(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 j=t.payload.newScroll;if(yn(e.viewport.scroll.current,j))return xs(e);var re=Id(e.viewport,j);return ks(e)?$d({state:e,viewport:re}):zr({state:e,viewport:re})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Wn(e))return e;var H=t.payload.maxScroll;if(yn(H,e.viewport.scroll.max))return e;var J=ve({},e.viewport,{scroll:ve({},e.viewport.scroll,{max:H})});return ve({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 ae=$b({state:e,type:t.type});return ae?zr({state:e,impact:ae.impact,clientSelection:ae.clientSelection,scrollJumpRequest:ae.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var ie=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 q=ve({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:ie});return q}if(t.type==="DROP_ANIMATE"){var V=t.payload,G=V.completed,Z=V.dropDuration,te=V.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:G,dropDuration:Z,newHomeClientOffset:te,dimensions:e.dimensions};return de}if(t.type==="DROP_COMPLETE"){var pe=t.payload.completed;return{phase:"IDLE",completed:pe,shouldFlush:!1}}return e},av=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},sv=function(t){return{type:"LIFT",payload:t}},iv=function(t){return{type:"INITIAL_PUBLISH",payload:t}},lv=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},cv=function(){return{type:"COLLECTION_STARTING",payload:null}},dv=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},pv=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},uv=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},Wd=function(t){return{type:"MOVE",payload:t}},mv=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},fv=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},hv=function(){return{type:"MOVE_UP",payload:null}},Sv=function(){return{type:"MOVE_DOWN",payload:null}},gv=function(){return{type:"MOVE_RIGHT",payload:null}},bv=function(){return{type:"MOVE_LEFT",payload:null}},Ms=function(){return{type:"FLUSH",payload:null}},vv=function(t){return{type:"DROP_ANIMATE",payload:t}},_s=function(t){return{type:"DROP_COMPLETE",payload:t}},Gd=function(t){return{type:"DROP",payload:t}},yv=function(t){return{type:"DROP_PENDING",payload:t}},Yd=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function Tv(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(H),null," "));var se=X(Z,pe,q,V,G+"."+
|
|
|
409
409
|
(This can cause unexpected bugs)
|
|
410
410
|
|
|
411
411
|
`+l+`
|
|
412
|
-
`)}}}function Ev(e,t){if(process.env.NODE_ENV!=="production"){var n=Hn(e.droppable.id,t.draggables);Tv(n)}}var wv=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,f=l.movementMode,m=n();m.phase==="DROP_ANIMATING"&&r(_s({completed:m.completed})),n().phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Unexpected phase to start a drag"):K()),r(Ms()),r(av({draggableId:c,movementMode:f}));var u={shouldPublishImmediately:f==="SNAP"},h={draggableId:c,scrollOptions:u},g=e.startPublishing(h),y=g.critical,w=g.dimensions,T=g.viewport;Ev(y,w),r(iv({critical:y,dimensions:w,clientSelection:p,movementMode:f,viewport:T}))}}}},Cv=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)}}}},Ls={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Jr={opacity:{drop:0,combining:.7},scale:{drop:.75}},Os={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Gn=Os.outOfTheWay+"s "+Ls.outOfTheWay,Zr={fluid:"opacity "+Gn,snap:"transform "+Gn+", opacity "+Gn,drop:function(t){var n=t+"s "+Ls.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Gn,placeholder:"height "+Gn+", width "+Gn+", margin "+Gn},Ud=function(t){return yn(t,
|
|
412
|
+
`)}}}function Ev(e,t){if(process.env.NODE_ENV!=="production"){var n=Hn(e.droppable.id,t.draggables);Tv(n)}}var wv=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,f=l.movementMode,m=n();m.phase==="DROP_ANIMATING"&&r(_s({completed:m.completed})),n().phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Unexpected phase to start a drag"):K()),r(Ms()),r(av({draggableId:c,movementMode:f}));var u={shouldPublishImmediately:f==="SNAP"},h={draggableId:c,scrollOptions:u},g=e.startPublishing(h),y=g.critical,w=g.dimensions,T=g.viewport;Ev(y,w),r(iv({critical:y,dimensions:w,clientSelection:p,movementMode:f,viewport:T}))}}}},Cv=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)}}}},Ls={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Jr={opacity:{drop:0,combining:.7},scale:{drop:.75}},Os={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Gn=Os.outOfTheWay+"s "+Ls.outOfTheWay,Zr={fluid:"opacity "+Gn,snap:"transform "+Gn+", opacity "+Gn,drop:function(t){var n=t+"s "+Ls.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Gn,placeholder:"height "+Gn+", width "+Gn+", margin "+Gn},Ud=function(t){return yn(t,st)?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=Os.minDropTime,zd=Os.maxDropTime,Dv=zd-Bs,jd=1500,Nv=.6,kv=function(e){var t=e.current,n=e.destination,r=e.reason,a=Hr(t,n);if(a<=0)return Bs;if(a>=jd)return zd;var s=a/jd,l=Bs+Dv*s,c=r==="CANCEL"?l*Nv:l;return Number(c.toFixed(2))},Iv=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=Nt(t),f=p?c[p]:null,m=c[n.descriptor.droppableId],u=Vd({impact:t,draggable:n,draggables:l,afterCritical:s,droppable:f||m,viewport:a}),h=Dt(u,n.client.borderBox.center);return h},xv=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=ve({},r,{displaced:Gr});return{impact:p,didDropInsideDroppable:!0}},Mv=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(yv({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,f=s.dimensions,m=f.draggables[s.critical.draggable.id],u=xv({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,g=u.didDropInsideDroppable,y=g?ys(h):null,w=g?Ao(h):null,T={index:p.draggable.index,droppableId:p.droppable.id},E={draggableId:m.descriptor.id,type:m.descriptor.type,source:T,reason:l,mode:s.movementMode,destination:y,combine:w},D=Iv({impact:h,draggable:m,dimensions:f,viewport:s.viewport,afterCritical:s.afterCritical}),M={critical:s.critical,afterCritical:s.afterCritical,result:E,impact:h},I=!yn(s.current.client.offset,D)||!!E.combine;if(!I){n(_s({completed:M}));return}var k=kv({current:s.current.client.offset,destination:D,reason:l}),F={newHomeClientOffset:D,dropDuration:k,completed:M};n(vv(F))}}}},qd=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function _v(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function Lv(e){var t=e.onWindowScroll;function n(){t(qd())}var r=$r(n),a=_v(r),s=vn;function l(){return s!==vn}function c(){l()&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start scroll listener when already active"):K()),s=Lt(window,[a])}function p(){l()||(process.env.NODE_ENV!=="production"?K(!1,"Cannot stop scroll listener when not active"):K()),r.cancel(),s(),s=vn}return{start:c,stop:p,isActive:l}}var Ov=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},Rv=function(e){var t=Lv({onWindowScroll:function(r){e.dispatch(mv({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&Ov(r)&&t.stop(),n(r)}}},Bv=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},Pv=function(){var e=[],t=function(s){var l=vs(e,function(f){return f.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}},Av=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},Fv=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},Vv=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},Xr=function(t,n){jr(),n(),qr()},Ko=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},Ps=function(t,n,r,a){if(!t){r(a(n));return}var s=Bv(r),l={announce:s};t(n,l),s.wasCalled()||r(a(n))},$v=function(e,t){var n=Pv(),r=null,a=function(h,g){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeCapture as a drag start has already been published"):K()),Xr("onBeforeCapture",function(){var y=e().onBeforeCapture;if(y){var w={draggableId:h,mode:g};y(w)}})},s=function(h,g){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K()),Xr("onBeforeDragStart",function(){var y=e().onBeforeDragStart;y&&y(Ko(h,g))})},l=function(h,g){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K());var y=Ko(h,g);r={mode:g,lastCritical:h,lastLocation:y.source,lastCombine:null},n.add(function(){Xr("onDragStart",function(){return Ps(e().onDragStart,y,t,Ro.onDragStart)})})},c=function(h,g){var y=ys(g),w=Ao(g);r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragMove when onDragStart has not been called"):K());var T=!Vv(h,r.lastCritical);T&&(r.lastCritical=h);var E=!Av(r.lastLocation,y);E&&(r.lastLocation=y);var D=!Fv(r.lastCombine,w);if(D&&(r.lastCombine=w),!(!T&&!E&&!D)){var M=ve({},Ko(h,r.mode),{combine:w,destination:y});n.add(function(){Xr("onDragUpdate",function(){return Ps(e().onDragUpdate,M,t,Ro.onDragUpdate)})})}},p=function(){r||(process.env.NODE_ENV!=="production"?K(!1,"Can only flush responders while dragging"):K()),n.flush()},f=function(h){r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragEnd when there is no matching onDragStart"):K()),r=null,Xr("onDragEnd",function(){return Ps(e().onDragEnd,h,t,Ro.onDragEnd)})},m=function(){if(r){var h=ve({},Ko(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});f(h)}};return{beforeCapture:a,beforeStart:s,start:l,update:c,flush:p,drop:f,abort:m}},Kv=function(e,t){var n=$v(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)}}}},Hv=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(_s({completed:r.completed}))}}},Wv=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=Lt(window,[l])})}}}},Gv=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)}}}},Yv=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()}}}}}},Uv=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},zv=function(e){return function(t){return function(n){return function(r){if(Uv(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())}}}},jv=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})))}}}},qv=process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"react-beautiful-dnd"}):Dc,Jv=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,a=e.getResponders,s=e.announce,l=e.autoScroller;return Ec(ov,qv(LS(Cv(r),Gv(t),wv(t),Mv,Hv,Wv,jv,zv(l),Rv,Yv(n),Kv(a,s))))},As=function(){return{additions:{},removals:{},modified:{}}};function Zv(e){var t=e.registry,n=e.callbacks,r=As(),a=null,s=function(){a||(n.collectionStarting(),a=requestAnimationFrame(function(){a=null,jr();var m=r,u=m.additions,h=m.removals,g=m.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},Pv=function(){var e=[],t=function(s){var l=vs(e,function(f){return f.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}},Av=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},Fv=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},Vv=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},Xr=function(t,n){jr(),n(),qr()},Ko=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},Ps=function(t,n,r,a){if(!t){r(a(n));return}var s=Bv(r),l={announce:s};t(n,l),s.wasCalled()||r(a(n))},$v=function(e,t){var n=Pv(),r=null,a=function(h,g){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeCapture as a drag start has already been published"):K()),Xr("onBeforeCapture",function(){var y=e().onBeforeCapture;if(y){var w={draggableId:h,mode:g};y(w)}})},s=function(h,g){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K()),Xr("onBeforeDragStart",function(){var y=e().onBeforeDragStart;y&&y(Ko(h,g))})},l=function(h,g){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K());var y=Ko(h,g);r={mode:g,lastCritical:h,lastLocation:y.source,lastCombine:null},n.add(function(){Xr("onDragStart",function(){return Ps(e().onDragStart,y,t,Ro.onDragStart)})})},c=function(h,g){var y=ys(g),w=Ao(g);r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragMove when onDragStart has not been called"):K());var T=!Vv(h,r.lastCritical);T&&(r.lastCritical=h);var E=!Av(r.lastLocation,y);E&&(r.lastLocation=y);var D=!Fv(r.lastCombine,w);if(D&&(r.lastCombine=w),!(!T&&!E&&!D)){var M=ve({},Ko(h,r.mode),{combine:w,destination:y});n.add(function(){Xr("onDragUpdate",function(){return Ps(e().onDragUpdate,M,t,Ro.onDragUpdate)})})}},p=function(){r||(process.env.NODE_ENV!=="production"?K(!1,"Can only flush responders while dragging"):K()),n.flush()},f=function(h){r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragEnd when there is no matching onDragStart"):K()),r=null,Xr("onDragEnd",function(){return Ps(e().onDragEnd,h,t,Ro.onDragEnd)})},m=function(){if(r){var h=ve({},Ko(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});f(h)}};return{beforeCapture:a,beforeStart:s,start:l,update:c,flush:p,drop:f,abort:m}},Kv=function(e,t){var n=$v(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)}}}},Hv=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(_s({completed:r.completed}))}}},Wv=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=Lt(window,[l])})}}}},Gv=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)}}}},Yv=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()}}}}}},Uv=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},zv=function(e){return function(t){return function(n){return function(r){if(Uv(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())}}}},jv=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})))}}}},qv=process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"react-beautiful-dnd"}):Dc,Jv=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,a=e.getResponders,s=e.announce,l=e.autoScroller;return Ec(ov,qv(LS(Cv(r),Gv(t),wv(t),Mv,Hv,Wv,jv,zv(l),Rv,Yv(n),Kv(a,s))))},As=function(){return{additions:{},removals:{},modified:{}}};function Zv(e){var t=e.registry,n=e.callbacks,r=As(),a=null,s=function(){a||(n.collectionStarting(),a=requestAnimationFrame(function(){a=null,jr();var m=r,u=m.additions,h=m.removals,g=m.modified,y=Object.keys(u).map(function(E){return t.draggable.getById(E).getDimension(st)}).sort(function(E,D){return E.descriptor.index-D.descriptor.index}),w=Object.keys(g).map(function(E){var D=t.droppable.getById(E),M=D.callbacks.getScrollWhileDragging();return{droppableId:E,scroll:M}}),T={additions:y,removals:Object.keys(h),modified:w};r=As(),qr(),n.publish(T)}))},l=function(m){var u=m.descriptor.id;r.additions[u]=m,r.modified[m.descriptor.droppableId]=!0,r.removals[u]&&delete r.removals[u],s()},c=function(m){var u=m.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=As())};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=Dt({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},Xv=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,f=$t({top:n,left:r,right:c,bottom:p}),m={frame:f,scroll:{initial:e,current:e,max:t,diff:{value:st,displacement:st}}};return m},Qv=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;jr();var a=Xv(),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)}),f={draggables:vd(p),droppables:bd(c)};qr();var m={dimensions:f,critical:t,viewport:a};return m};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 ey=function(e,t){var n=null,r=Zv({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),a=function(g,y){e.droppable.exists(g)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update is enabled flag of Droppable "+g+" as it is not registered"):K()),n&&t.updateDroppableIsEnabled({id:g,isEnabled:y})},s=function(g,y){n&&(e.droppable.exists(g)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update isCombineEnabled flag of Droppable "+g+" as it is not registered"):K()),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:y}))},l=function(g,y){n&&(e.droppable.exists(g)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update the scroll on Droppable "+g+" as it is not registered"):K()),t.updateDroppableScroll({id:g,newScroll:y}))},c=function(g,y){n&&e.droppable.getById(g).callbacks.scroll(y)},p=function(){if(n){r.stop();var g=n.critical.droppable;e.droppable.getAllByType(g.type).forEach(function(y){return y.callbacks.dragStopped()}),n.unsubscribe(),n=null}},f=function(g){n||(process.env.NODE_ENV!=="production"?K(!1,"Should only be subscribed when a collection is occurring"):K());var y=n.critical.draggable;g.type==="ADDITION"&&Qd(e,y,g.value)&&r.add(g.value),g.type==="REMOVAL"&&Qd(e,y,g.value)&&r.remove(g.value)},m=function(g){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(g.draggableId),w=e.droppable.getById(y.descriptor.droppableId),T={draggable:y.descriptor,droppable:w.descriptor},E=e.subscribe(f);return n={critical:T,unsubscribe:E},Qv({critical:T,registry:e,scrollOptions:g.scrollOptions})},u={updateDroppableIsEnabled:a,updateDroppableIsCombineEnabled:s,scrollDroppable:c,updateDroppableScroll:l,startPublishing:m,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"},ty=function(e){window.scrollBy(e.x,e.y)},ny=
|
|
420
|
+
`),!1):!0}var ey=function(e,t){var n=null,r=Zv({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),a=function(g,y){e.droppable.exists(g)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update is enabled flag of Droppable "+g+" as it is not registered"):K()),n&&t.updateDroppableIsEnabled({id:g,isEnabled:y})},s=function(g,y){n&&(e.droppable.exists(g)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update isCombineEnabled flag of Droppable "+g+" as it is not registered"):K()),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:y}))},l=function(g,y){n&&(e.droppable.exists(g)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update the scroll on Droppable "+g+" as it is not registered"):K()),t.updateDroppableScroll({id:g,newScroll:y}))},c=function(g,y){n&&e.droppable.getById(g).callbacks.scroll(y)},p=function(){if(n){r.stop();var g=n.critical.droppable;e.droppable.getAllByType(g.type).forEach(function(y){return y.callbacks.dragStopped()}),n.unsubscribe(),n=null}},f=function(g){n||(process.env.NODE_ENV!=="production"?K(!1,"Should only be subscribed when a collection is occurring"):K());var y=n.critical.draggable;g.type==="ADDITION"&&Qd(e,y,g.value)&&r.add(g.value),g.type==="REMOVAL"&&Qd(e,y,g.value)&&r.remove(g.value)},m=function(g){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(g.draggableId),w=e.droppable.getById(y.descriptor.droppableId),T={draggable:y.descriptor,droppable:w.descriptor},E=e.subscribe(f);return n={critical:T,unsubscribe:E},Qv({critical:T,registry:e,scrollOptions:g.scrollOptions})},u={updateDroppableIsEnabled:a,updateDroppableIsCombineEnabled:s,scrollDroppable:c,updateDroppableScroll:l,startPublishing:m,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"},ty=function(e){window.scrollBy(e.x,e.y)},ny=at(function(e){return Po(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),ry=function(t,n){var r=Tn(ny(n),function(a){return a.frame||(process.env.NODE_ENV!=="production"?K(!1,"Invalid result"):K()),Rd(a.frame.pageMarginBox)(t)});return r},oy=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=ry(t,r);return s},wn={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},ay=function(e,t){var n=e[t.size]*wn.startFromPercentage,r=e[t.size]*wn.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},Fs=1,sy=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return wn.maxPixelScroll;if(e===t.startScrollingFrom)return Fs;var n=tp({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,a=wn.maxPixelScroll*wn.ease(r);return Math.ceil(a)},np=wn.durationDampening.accelerateAt,rp=wn.durationDampening.stopDampeningAt,iy=function(e,t){var n=t,r=rp,a=Date.now(),s=a-n;if(s>=rp)return e;if(s<np)return Fs;var l=tp({startOfRange:np,endOfRange:r,current:s}),c=e*wn.ease(l);return Math.ceil(c)},op=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,a=e.shouldUseTimeDampening,s=sy(t,n);return s===0?0:a?Math.max(iy(s,r),Fs):s},ap=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,a=e.axis,s=e.shouldUseTimeDampening,l=ay(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})},ly=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}},cy=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:Ts,shouldUseTimeDampening:s}),p=ap({container:n,distanceToEdges:l,dragStartTime:t,axis:Ed,shouldUseTimeDampening:s}),f=cy({x:p,y:c});if(yn(f,
|
|
424
|
+
`),0;var s=r-t,l=s/a;return l},Fs=1,sy=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return wn.maxPixelScroll;if(e===t.startScrollingFrom)return Fs;var n=tp({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,a=wn.maxPixelScroll*wn.ease(r);return Math.ceil(a)},np=wn.durationDampening.accelerateAt,rp=wn.durationDampening.stopDampeningAt,iy=function(e,t){var n=t,r=rp,a=Date.now(),s=a-n;if(s>=rp)return e;if(s<np)return Fs;var l=tp({startOfRange:np,endOfRange:r,current:s}),c=e*wn.ease(l);return Math.ceil(c)},op=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,a=e.shouldUseTimeDampening,s=sy(t,n);return s===0?0:a?Math.max(iy(s,r),Fs):s},ap=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,a=e.axis,s=e.shouldUseTimeDampening,l=ay(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})},ly=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}},cy=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:Ts,shouldUseTimeDampening:s}),p=ap({container:n,distanceToEdges:l,dragStartTime:t,axis:Ed,shouldUseTimeDampening:s}),f=cy({x:p,y:c});if(yn(f,st))return null;var m=ly({container:n,subject:r,proposedScroll:f});return m?yn(m,st)?null:m:null},dy=hd(function(e){return e===0?0:e>0?1:-1}),Vs=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=dt(n,a),l={x:e(s.x,r.x),y:e(s.y,r.y)};return yn(l,st)?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=dy(a),c=Vs({max:s,current:r,change:l});return!c||l.x!==0&&c.x===0||l.y!==0&&c.y===0},$s=function(t,n){return ip({current:t.scroll.current,max:t.scroll.max,change:n})},py=function(t,n){if(!$s(t,n))return null;var r=t.scroll.max,a=t.scroll.current;return Vs({current:a,max:r,change:n})},Ks=function(t,n){var r=t.frame;return r?ip({current:r.scroll.current,max:r.scroll.max,change:n}):!1},uy=function(t,n){var r=t.frame;return!r||!Ks(t,n)?null:Vs({current:r.scroll.current,max:r.scroll.max,change:n})},my=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&&$s(t,l)?l:null},fy=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&&Ks(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 f=t.viewport,m=my({dragStartTime:n,viewport:f,subject:p,center:l,shouldUseTimeDampening:r});if(m){a(m);return}}var u=oy({center:l,destination:Nt(t.impact),droppables:t.dimensions.droppables});if(u){var h=fy({dragStartTime:n,droppable:u,subject:p,center:l,shouldUseTimeDampening:r});h&&s(u.descriptor.id,h)}},hy=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=$r(t),a=$r(n),s=null,l=function(m){s||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fluid scroll if not dragging"):K());var u=s,h=u.shouldUseTimeDampening,g=u.dragStartTime;lp({state:m,scrollWindow:r,scrollDroppable:a,dragStartTime:g,shouldUseTimeDampening:h})},c=function(m){jr(),s&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start auto scrolling when already started"):K());var u=Date.now(),h=!1,g=function(){h=!0};lp({state:m,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:g,scrollDroppable:g}),s={dragStartTime:u,shouldUseTimeDampening:h},qr(),h&&l(m)},p=function(){s&&(r.cancel(),a.cancel(),s=null)};return{start:c,stop:p,scroll:l}},Sy=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,a=function(f,m){var u=dt(f.current.client.selection,m);t({client:u})},s=function(f,m){if(!Ks(f,m))return m;var u=uy(f,m);if(!u)return n(f.descriptor.id,m),null;var h=Dt(m,u);n(f.descriptor.id,h);var g=Dt(m,h);return g},l=function(f,m,u){if(!f||!$s(m,u))return u;var h=py(m,u);if(!h)return r(u),null;var g=Dt(u,h);r(g);var y=Dt(u,g);return y},c=function(f){var m=f.scrollJumpRequest;if(m){var u=Nt(f.impact);u||(process.env.NODE_ENV!=="production"?K(!1,"Cannot perform a jump scroll when there is no destination"):K());var h=s(f.dimensions.droppables[u],m);if(h){var g=f.viewport,y=l(f.isWindowScrollAllowed,g,h);y&&a(f,y)}}};return c},gy=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,a=hy({scrollWindow:n,scrollDroppable:t}),s=Sy({move:r,scrollWindow:n,scrollDroppable:t}),l=function(f){if(f.phase==="DRAGGING"){if(f.movementMode==="FLUID"){a.scroll(f);return}f.scrollJumpRequest&&s(f)}},c={scroll:l,start:a.start,stop:a.stop};return c},Sr="data-rbd",gr=function(){var e=Sr+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Hs=function(){var e=Sr+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),by=function(){var e=Sr+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),cp={contextId:Sr+"-scroll-container-context-id"},vy=function(t){return function(n){return"["+n+'="'+t+'"]'}},Qr=function(t,n){return t.map(function(r){var a=r.styles[n];return a?r.selector+" { "+a+" }":""}).join(" ")},yy="pointer-events: none;",Ty=function(e){var t=vy(e),n=function(){var c=`
|
|
425
425
|
cursor: -webkit-grab;
|
|
426
426
|
cursor: grab;
|
|
427
427
|
`;return{selector:t(gr.contextId),styles:{always:`
|
|
@@ -438,7 +438,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=X(Z,pe,q,V,G+"."+
|
|
|
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:Qr(l,"always"),resting:Qr(l,"resting"),dragging:Qr(l,"dragging"),dropAnimating:Qr(l,"dropAnimating"),userCancel:Qr(l,"userCancel")}},kt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect,Ws=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 Ey(e,t){var n=Me(function(){return Ty(e)},[e]),r=x.useRef(null),a=x.useRef(null),s=be(
|
|
441
|
+
`}},l=[r,n,a,s];return{always:Qr(l,"always"),resting:Qr(l,"resting"),dragging:Qr(l,"dragging"),dropAnimating:Qr(l,"dropAnimating"),userCancel:Qr(l,"userCancel")}},kt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect,Ws=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 Ey(e,t){var n=Me(function(){return Ty(e)},[e]),r=x.useRef(null),a=x.useRef(null),s=be(at(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=be(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},[]);kt(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(Sr+"-always",e),h.setAttribute(Sr+"-dynamic",e),Ws().appendChild(u),Ws().appendChild(h),l(n.always),s(n.resting),function(){var g=function(w){var T=w.current;T||(process.env.NODE_ENV!=="production"?K(!1,"Cannot unmount ref as it is not set"):K()),Ws().removeChild(T),w.current=null};g(r),g(a)}},[t,l,s,n.always,n.resting,e]);var c=be(function(){return s(n.dragging)},[s,n.dragging]),p=be(function(u){if(u==="DROP"){s(n.dropAnimating);return}s(n.userCancel)},[s,n.dropAnimating,n.userCancel]),f=be(function(){a.current&&s(n.resting)},[s,n.resting]),m=Me(function(){return{dragging:c,dropping:p,resting:f}},[c,p,f]);return m}var pp=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function eo(e){return e instanceof pp(e).HTMLElement}function up(e,t){var n="["+gr.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=Tn(r,function(s){return s.getAttribute(gr.draggableId)===t});return a?eo(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 wy(e){var t=x.useRef({}),n=x.useRef(null),r=x.useRef(null),a=x.useRef(!1),s=be(function(h,g){var y={id:h,focus:g};return t.current[h]=y,function(){var T=t.current,E=T[h];E!==y&&delete T[h]}},[]),l=be(function(h){var g=up(e,h);g&&g!==document.activeElement&&g.focus()},[e]),c=be(function(h,g){n.current===h&&(n.current=g)},[]),p=be(function(){r.current||a.current&&(r.current=requestAnimationFrame(function(){r.current=null;var h=n.current;h&&l(h)}))},[l]),f=be(function(h){n.current=null;var g=document.activeElement;g&&g.getAttribute(gr.draggableId)===h&&(n.current=h)},[]);kt(function(){return a.current=!0,function(){a.current=!1;var h=r.current;h&&cancelAnimationFrame(h)}},[]);var m=Me(function(){return{register:s,tryRecordFocus:f,tryRestoreFocusRecorded:p,tryShiftRecord:c}},[s,f,p,c]);return m}function Cy(){var e={draggables:{},droppables:{}},t=[];function n(u){return t.push(u),function(){var g=t.indexOf(u);g!==-1&&t.splice(g,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,g){var y=e.draggables[g.descriptor.id];y&&y.uniqueId===h.uniqueId&&(delete e.draggables[g.descriptor.id],e.draggables[h.descriptor.id]=h)},unregister:function(h){var g=h.descriptor.id,y=a(g);y&&h.uniqueId===y.uniqueId&&(delete e.draggables[g],r({type:"REMOVAL",value:h}))},getById:s,findById:a,exists:function(h){return!!a(h)},getAllByType:function(h){return Bo(e.draggables).filter(function(g){return g.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 f={register:function(h){e.droppables[h.descriptor.id]=h},unregister:function(h){var g=c(h.descriptor.id);g&&h.uniqueId===g.uniqueId&&delete e.droppables[h.descriptor.id]},getById:p,findById:c,exists:function(h){return!!c(h)},getAllByType:function(h){return Bo(e.droppables).filter(function(g){return g.descriptor.type===h})}};function m(){e.draggables={},e.droppables={},t.length=0}return{draggable:l,droppable:f,subscribe:n,clean:m}}function Dy(){var e=Me(Cy,[]);return x.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Gs=x.createContext(null),to=function(){var e=document.body;return e||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find document.body"):K()),e},Ny={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},ky=function(t){return"rbd-announcement-"+t};function Iy(e){var t=Me(function(){return ky(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"),ve(s.style,Ny),to().appendChild(s),function(){setTimeout(function(){var p=to();p.contains(s)&&p.removeChild(s),s===n.current&&(n.current=null)})}},[t]);var r=be(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(H),null," "));var se=X(Z,pe,q,V,G+"."+
|
|
|
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
|
-
`)}},Xs=function(e){return{x:e.scrollLeft,y:e.scrollTop}},LT=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},OT=function(e){var t=Mp(e),n=LT(e);return{closestScrollable:t,isFixedOnPage:n}},RT=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,f=function(){if(!p)return null;var g=p.scrollSize,y=p.client,w=Jd({scrollHeight:g.scrollHeight,scrollWidth:g.scrollWidth,height:y.paddingBox.height,width:y.paddingBox.width});return{pageMarginBox:p.page.marginBox,frameClient:y,scrollSize:g,shouldClipSubject:p.shouldClipSubject,scroll:{initial:p.scroll,current:p.scroll,max:w,diff:{value:
|
|
510
|
+
`)}},Xs=function(e){return{x:e.scrollLeft,y:e.scrollTop}},LT=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},OT=function(e){var t=Mp(e),n=LT(e);return{closestScrollable:t,isFixedOnPage:n}},RT=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,f=function(){if(!p)return null;var g=p.scrollSize,y=p.client,w=Jd({scrollHeight:g.scrollHeight,scrollWidth:g.scrollWidth,height:y.paddingBox.height,width:y.paddingBox.width});return{pageMarginBox:p.page.marginBox,frameClient:y,scrollSize:g,shouldClipSubject:p.shouldClipSubject,scroll:{initial:p.scroll,current:p.scroll,max:w,diff:{value:st,displacement:st}}}}(),m=s==="vertical"?Ts:Ed,u=fr({page:c,withPlaceholder:null,axis:m,frame:f}),h={descriptor:t,isCombineEnabled:r,isFixedOnPage:a,axis:m,isEnabled:n,client:l,page:c,frame:f,subject:u};return h},BT=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},f=fs(p,r.border),m=Ss({borderBox:f,margin:r.margin,border:r.border,padding:r.padding});return m},PT=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,f=r.closestScrollable,m=BT(t,f),u=Lo(m,a),h=function(){if(!f)return null;var y=sd(f),w={scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth};return{client:y,page:Lo(y,a),scroll:Xs(f),scrollSize:w,shouldClipSubject:p}}(),g=RT({descriptor:n,isEnabled:!l,isCombineEnabled:c,isFixedOnPage:r.isFixedOnPage,direction:s,client:m,page:u,closest:h});return g},AT={passive:!1},FT={passive:!0},_p=function(e){return e.shouldPublishImmediately?AT:FT};function Uo(e){var t=x.useContext(e);return t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find required context"):K()),t}var zo=function(t){return t&&t.env.closestScrollable||null};function VT(e){var t=x.useRef(null),n=Uo(Ho),r=Ys("droppable"),a=n.registry,s=n.marshal,l=js(e),c=Me(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),p=x.useRef(c),f=Me(function(){return at(function(I,k){t.current||(process.env.NODE_ENV!=="production"?K(!1,"Can only update scroll when dragging"):K());var F={x:I,y:k};s.updateDroppableScroll(c.id,F)})},[c.id,s]),m=be(function(){var I=t.current;return!I||!I.env.closestScrollable?st:Xs(I.env.closestScrollable)},[]),u=be(function(){var I=m();f(I.x,I.y)},[m,f]),h=Me(function(){return $r(u)},[u]),g=be(function(){var I=t.current,k=zo(I);I&&k||(process.env.NODE_ENV!=="production"?K(!1,"Could not find scroll options while scrolling"):K());var F=I.scrollOptions;if(F.shouldPublishImmediately){u();return}h()},[h,u]),y=be(function(I,k){t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot collect a droppable while a drag is occurring"):K());var F=l.current,P=F.getDroppableRef();P||(process.env.NODE_ENV!=="production"?K(!1,"Cannot collect without a droppable ref"):K());var C=OT(P),R={ref:P,descriptor:c,env:C,scrollOptions:k};t.current=R;var O=PT({ref:P,descriptor:c,env:C,windowScroll:I,direction:F.direction,isDropDisabled:F.isDropDisabled,isCombineEnabled:F.isCombineEnabled,shouldClipSubject:!F.ignoreContainerClipping}),$=C.closestScrollable;return $&&($.setAttribute(cp.contextId,n.contextId),$.addEventListener("scroll",g,_p(R.scrollOptions)),process.env.NODE_ENV!=="production"&&_T($)),O},[n.contextId,c,g,l]),w=be(function(){var I=t.current,k=zo(I);return I&&k||(process.env.NODE_ENV!=="production"?K(!1,"Can only recollect Droppable client for Droppables that have a scroll container"):K()),Xs(k)},[]),T=be(function(){var I=t.current;I||(process.env.NODE_ENV!=="production"?K(!1,"Cannot stop drag when no active drag"):K());var k=zo(I);t.current=null,k&&(h.cancel(),k.removeAttribute(cp.contextId),k.removeEventListener("scroll",g,_p(I.scrollOptions)))},[g,h]),E=be(function(I){var k=t.current;k||(process.env.NODE_ENV!=="production"?K(!1,"Cannot scroll when there is no drag"):K());var F=zo(k);F||(process.env.NODE_ENV!=="production"?K(!1,"Cannot scroll a droppable with no closest scrollable"):K()),F.scrollTop+=I.y,F.scrollLeft+=I.x},[]),D=Me(function(){return{getDimensionAndWatchScroll:y,getScrollWhileDragging:w,dragStopped:T,scroll:E}},[T,y,w,E]),M=Me(function(){return{uniqueId:r,descriptor:c,callbacks:D}},[D,c,r]);kt(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"),T()),a.droppable.unregister(M)}},[D,c,T,M,s,a.droppable]),kt(function(){t.current&&s.updateDroppableIsEnabled(p.current.id,!e.isDropDisabled)},[e.isDropDisabled,s]),kt(function(){t.current&&s.updateDroppableIsCombineEnabled(p.current.id,e.isCombineEnabled)},[e.isCombineEnabled,s])}function Qs(){}var Lp={width:0,height:0,margin:tb},$T=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}},KT=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,a=t.animate,s=$T({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"?Zr.placeholder:null}};function HT(e){var t=x.useRef(null),n=be(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],f=c[1];x.useEffect(function(){return p?r!=="open"?(n(),f(!1),Qs):t.current?Qs:(t.current=setTimeout(function(){t.current=null,f(!1)}),n):Qs},[r,p,n]);var m=be(function(h){h.propertyName==="height"&&(a(),r==="close"&&s())},[r,s,a]),u=KT({isAnimatingOpenOnMount:p,animate:e.animate,placeholder:e.placeholder});return x.createElement(e.placeholder.tagName,{style:u,"data-rbd-placeholder-context-id":l,onTransitionEnd:m,ref:e.innerRef})}var WT=x.memo(HT),ei=x.createContext(null);function Op(e){e&&eo(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(H),null," "));var se=X(Z,pe,q,V,G+"."+
|
|
|
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
|
-
`)}}],UT=[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 zT(e){no(function(){ni(e,GT),e.props.mode==="standard"&&ni(e,YT),e.props.mode==="virtual"&&ni(e,UT)})}var jT=function(e){Sc(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),Rp={dragging:5e3,dropAnimating:4500},qT=function(t,n){return n?Zr.drop(n.duration):t?Zr.snap:Zr.fluid},JT=function(t,n){return t?n?Jr.opacity.drop:Jr.opacity.combining:null},ZT=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function XT(e){var t=e.dimension,n=t.client,r=e.offset,a=e.combineWith,s=e.dropping,l=!!a,c=ZT(e),p=!!s,f=p?Rs.drop(r,l):Rs.moveTo(r),m={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:qT(c,s),transform:f,opacity:JT(l,p),zIndex:p?Rp.dropAnimating:Rp.dragging,pointerEvents:"none"};return m}function QT(e){return{transform:Rs.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function eE(e){return e.type==="DRAGGING"?XT(e):QT(e)}function tE(e,t,n){n===void 0&&(n=
|
|
522
|
-
Provided: [type: `+typeof a+"] (value: "+a+")"):K(!1)),ab(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 oE(e){zs(function(){var t=x.useRef(e);no(function(){e!==t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Draggable isClone prop value changed during component life"):K(!1))},[e])})}function aE(e){e.preventDefault()}function sE(e){var t=x.useRef(null),n=be(function(R){t.current=R},[]),r=be(function(){return t.current},[]),a=Uo(Ho),s=a.contextId,l=a.dragHandleUsageInstructionsId,c=a.registry,p=Uo(ei),f=p.type,m=p.droppableId,u=Me(function(){return{id:e.draggableId,index:e.index,type:f,droppableId:m}},[e.draggableId,e.index,f,m]),h=e.children,g=e.draggableId,y=e.isEnabled,w=e.shouldRespectForcePress,T=e.canDragInteractiveElements,E=e.isClone,D=e.mapped,M=e.dropAnimationFinished;if(rE(e,s,r),oE(E),!E){var I=Me(function(){return{descriptor:u,registry:c,getDraggableRef:r,canDragInteractiveElements:T,shouldRespectForcePress:w,isEnabled:y}},[u,c,r,T,w,y]);nE(I)}var k=Me(function(){return y?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":g,"data-rbd-drag-handle-context-id":s,draggable:!1,onDragStart:aE}:null},[s,l,g,y]),F=be(function(R){D.type==="DRAGGING"&&D.dropping&&R.propertyName==="transform"&&M()},[M,D]),P=Me(function(){var R=eE(D),O=D.type==="DRAGGING"&&D.dropping?F:null,$={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":s,"data-rbd-draggable-id":g,style:R,onTransitionEnd:O},dragHandleProps:k};return $},[s,k,g,D,F,n]),C=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(P,D.snapshot,C)}var Bp=function(e,t){return e===t},Pp=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},iE=function(t){return t.combine?t.combine.draggableId:null},lE=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function cE(){var e=st(function(a,s){return{x:a,y:s}}),t=st(function(a,s,l,c,p){return{isDragging:!0,isClone:s,isDropAnimating:!!p,dropAnimation:p,mode:a,draggingOver:l,combineWith:c,combineTargetFor:null}}),n=st(function(a,s,l,c,p,f,m){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:f,mode:s,offset:a,dimension:l,forceShouldAnimate:m,snapshot:t(s,c,p,f,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],f=Nt(s.impact),m=lE(s.impact),u=s.forceShouldAnimate;return n(e(c.x,c.y),s.movementMode,p,l.isClone,f,m,u)}if(s.phase==="DROP_ANIMATING"){var h=s.completed;if(h.result.draggableId!==l.draggableId)return null;var g=l.isClone,y=s.dimensions.draggables[l.draggableId],w=h.result,T=w.mode,E=Pp(w),D=iE(w),M=s.dropDuration,I={duration:M,curve:Ls.drop,moveTo:s.newHomeClientOffset,opacity:D?Jr.opacity.drop:null,scale:D?Jr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:s.newHomeClientOffset,dimension:y,dropping:I,draggingOver:E,combineWith:D,mode:T,forceShouldAnimate:null,snapshot:t(T,g,E,D,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 dE={mapped:{type:"SECONDARY",offset:it,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ap(null)}};function pE(){var e=st(function(l,c){return{x:l,y:c}}),t=st(Ap),n=st(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(it,c,!0):null},a=function(c,p,f,m){var u=f.displaced.visible[c],h=!!(m.inVirtualList&&m.effected[c]),g=Ao(f),y=g&&g.draggableId===c?p:null;if(!u){if(!h)return r(y);if(f.displaced.invisible[c])return null;var w=mr(m.displacedBy.point),T=e(w.x,w.y);return n(T,y,!0)}if(h)return r(y);var E=f.displacedBy.point,D=e(E.x,E.y);return n(D,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 f=c.completed;return f.result.draggableId===p.draggableId?null:a(p.draggableId,f.result.draggableId,f.impact,f.afterCritical)}return null};return s}var uE=function(){var t=cE(),n=pE(),r=function(s,l){return t(s,l)||n(s,l)||dE};return r},mE={dropAnimationFinished:Yd},fE=td(uE,mE,null,{context:Gs,pure:!0,areStatePropsEqual:Bp})(sE);function Fp(e){var t=Uo(ei),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:x.createElement(fE,e)}function Vp(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return x.createElement(Fp,ve({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function hE(e){var t=x.useContext(Ho);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,f=e.mode,m=e.direction,u=e.ignoreContainerClipping,h=e.isDropDisabled,g=e.isCombineEnabled,y=e.snapshot,w=e.useClone,T=e.updateViewportMaxScroll,E=e.getContainerForClone,D=be(function(){return a.current},[]),M=be(function(z){a.current=z},[]),I=be(function(){return s.current},[]),k=be(function(z){s.current=z},[]);zT({props:e,getDroppableRef:D,getPlaceholderRef:I});var F=be(function(){r()&&T({maxScroll:Xd()})},[r,T]);VT({droppableId:c,type:p,mode:f,direction:m,isDropDisabled:h,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:D});var P=x.createElement(jT,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(z){var L=z.onClose,oe=z.data,B=z.animate;return x.createElement(WT,{placeholder:oe,onClose:L,innerRef:k,animate:B,contextId:n,onTransitionEnd:F})}),C=Me(function(){return{innerRef:M,placeholder:P,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}},[n,c,P,M]),R=w?w.dragging.draggableId:null,O=Me(function(){return{droppableId:c,type:p,isUsingCloneFor:R}},[c,R,p]);function $(){if(!w)return null;var z=w.dragging,L=w.render,oe=x.createElement(Fp,{draggableId:z.draggableId,index:z.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(B,ee){return L(B,ee,z)});return yo.createPortal(oe,E())}return x.createElement(ei.Provider,{value:O},l(C,y),$())}var ri=function(t,n){return t===n.droppable.type},$p=function(t,n){return n.draggables[t.draggable.id]},SE=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ve({},t,{shouldAnimatePlaceholder:!1}),r=st(function(l){return{draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}}),a=st(function(l,c,p,f,m,u){var h=m.descriptor.id,g=m.descriptor.droppableId===l;if(g){var y=u?{render:u,dragging:r(m.descriptor)}:null,w={isDraggingOver:p,draggingOverWith:p?h:null,draggingFromThisWith:h,isUsingPlaceholder:!0};return{placeholder:m.placeholder,shouldAnimatePlaceholder:!1,snapshot:w,useClone:y}}if(!c)return n;if(!f)return t;var T={isDraggingOver:p,draggingOverWith:h,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:m.placeholder,shouldAnimatePlaceholder:!0,snapshot:T,useClone:null}}),s=function(c,p){var f=p.droppableId,m=p.type,u=!p.isDropDisabled,h=p.renderClone;if(c.isDragging){var g=c.critical;if(!ri(m,g))return n;var y=$p(g,c.dimensions),w=Nt(c.impact)===f;return a(f,u,w,w,y,h)}if(c.phase==="DROP_ANIMATING"){var T=c.completed;if(!ri(m,T.critical))return n;var E=$p(T.critical,c.dimensions);return a(f,u,Pp(T.result)===f,Nt(T.impact)===f,E,h)}if(c.phase==="IDLE"&&c.completed&&!c.shouldFlush){var D=c.completed;if(!ri(m,D.critical))return n;var M=Nt(D.impact)===f,I=!!(D.impact.at&&D.impact.at.type==="COMBINE"),k=D.critical.droppable.id===f;return M?I?t:n:k?t:n}return n};return s},gE={updateViewportMaxScroll:fv};function bE(){return document.body||(process.env.NODE_ENV!=="production"?K(!1,"document.body is not ready"):K()),document.body}var vE={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:bE},oi=td(SE,gE,null,{context:Gs,pure:!0,areStatePropsEqual:Bp})(hE);oi.defaultProps=vE;const yE={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"};function ze(e){const{children:t,className:n,href:r,icon:a,kind:s=Y.ButtonKind.DEFAULT,spinning:l,spinningTitle:c,type:p=Y.ButtonType.BUTTON,unsafelyReplaceClassName:f,...m}=e;let{disabled:u}=e;l&&(u=!0);const{t:h}=o.useContext(Ke),g=U(f||"sps-button",`sps-button--${s}`,u&&"sps-button--disabled",l&&"sps-button--spinning",n),y=a&&o.createElement("i",{className:U("sps-icon",`sps-icon-${a}`),"aria-hidden":"true"}),w=l&&o.createElement("div",{className:"sps-spinner"},c||h("design-system:button.spinningTitle"));return o.createElement("div",{className:g},r?o.createElement("a",{...m,href:r,className:"sps-button__clickable-element"},y,t,w):o.createElement("button",{...m,type:p,className:"sps-button__clickable-element",disabled:u},y,t,w))}Object.assign(ze,{props:yE,displayName:"SpsButton"});const TE={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=U(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:TE,displayName:"SpsCardHeader"});const EE={icon:"SpsIcon",kind:"TagKind"};function Kt(e){const{children:t,className:n,icon:r,kind:a=Y.TagKind.DEFAULT,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=o.Children.toArray(t).filter(m=>typeof m=="string").join(""),f=U(l||"sps-tag",`sps-tag--${a}`,n);return o.createElement("span",{className:f,"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(Kt,{props:EE,displayName:"SpsTag"});const wE={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"};function ai(e){const{activateTab:t,active:n,children:r,className:a,label:s,icon:l,id:c,index:p=0,tag:f,tagKind:m,tagIcon:u,"data-testid":h,unsafelyReplaceClassName:g,...y}=e,w=()=>{t&&t(this,p,r)},T=D=>{(D.key==="Enter"||D.key===" "||D.key==="Spacebar")&&(D.preventDefault(),D.stopPropagation(),t&&t(this,p,r))},E=U(g||"sps-nav__item","sps-nav__link",n&&"active",a);return o.createElement("a",{className:E,onClick:w,"data-toggle":"tab",id:c,role:"tab","aria-controls":c,...y,tabIndex:0,onKeyDown:T},l&&o.createElement("i",{className:`sps-icon sps-icon-${l}`}),o.createElement("span",null,s),f&&o.createElement(Kt,{kind:m||Y.TagKind.KEY,icon:u},f))}Object.assign(ai,{props:wE,displayName:"SpsCardTabbedPane"});function CE(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(f){for(const m of f){const u=m.props;a({...r,content:u.children});break}}function c(f,m){for(let u=0;u<=f.length;u+=1){const h=f[u];if(h&&h.props&&(h.props.id&&h.props.id===m||h.props.label&&h.props.label===m)){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 DE={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"};function si(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:f,...m}=e,u=o.Children.toArray(n).some(w=>o.isValidElement(w)&&w.type===ai),[h,g]=CE(n,t,u),y=U(f||"sps-card",r);return o.createElement("div",{...m,className:y,"data-testid":`${p}__card`},(c||s)&&o.createElement(Kp,{title:c,content:Et(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,(w,T)=>{if(o.isValidElement(w))return o.cloneElement(w,{active:T===h.index,index:T,activateTab:g,"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`},Et(a)))}Object.assign(si,{props:DE,displayName:"SpsCard"});function ii(e,t){const[n,...r]=v.crumblePath(t);return r.length?e.members[n].get(r):e.members[n]}function NE(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(wo.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 ii(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 kE(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(wo.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 IE(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 ii(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 xE(e,t){t&&e.setInitValue(t);const[n,r]=x.useState(),[a,s]=x.useState([]),[l,c]=x.useReducer(p=>{for(const f of a)for(const m of v.traversePath(p,f))m.validators&&m.validators.length&&(m.errors=Co(m.getValue(),m.validators),m.invalid=!!m.errors&&!m.pristine);return r(void 0),s([]),{...p}},e);return v.forEachNestedObject(l,(p,f)=>{f._type&&(f.update=function(){return a.push(p),s(a),n||r(window.setTimeout(c,0)),this})}),l}function ME(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"},oo=o.forwardRef((e,t)=>{const{children:n,onSubmit:r,formArray:a,formGroup:s,formMeta:l,...c}=e,p=s||a;function f(m){m.preventDefault(),p&&p.markAsDirty(),l&&(l.markAsDirty(),l.markAsBlurred(),l.markAsSubmitted()),r&&r(m)}return o.createElement("form",{ref:t,onSubmit:f,...c},n)});Object.assign(oo,{props:Hp,displayName:"SpsForm"});const Wp={},_E={ideal:{label:"Ideal",examples:{ideal:{react:v.code`
|
|
521
|
+
`)}}],UT=[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 zT(e){no(function(){ni(e,GT),e.props.mode==="standard"&&ni(e,YT),e.props.mode==="virtual"&&ni(e,UT)})}var jT=function(e){Sc(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),Rp={dragging:5e3,dropAnimating:4500},qT=function(t,n){return n?Zr.drop(n.duration):t?Zr.snap:Zr.fluid},JT=function(t,n){return t?n?Jr.opacity.drop:Jr.opacity.combining:null},ZT=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function XT(e){var t=e.dimension,n=t.client,r=e.offset,a=e.combineWith,s=e.dropping,l=!!a,c=ZT(e),p=!!s,f=p?Rs.drop(r,l):Rs.moveTo(r),m={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:qT(c,s),transform:f,opacity:JT(l,p),zIndex:p?Rp.dropAnimating:Rp.dragging,pointerEvents:"none"};return m}function QT(e){return{transform:Rs.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function eE(e){return e.type==="DRAGGING"?XT(e):QT(e)}function tE(e,t,n){n===void 0&&(n=st);var r=window.getComputedStyle(t),a=t.getBoundingClientRect(),s=ad(a,r),l=Lo(s,n),c={client:s,tagName:t.tagName.toLowerCase(),display:r.display},p={x:s.marginBox.width,y:s.marginBox.height},f={descriptor:e,placeholder:c,displaceBy:p,client:s,page:l};return f}function nE(e){var t=Ys("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]),f=be(function(g){var y=a();return y||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get dimension when no ref is set"):K()),tE(n,y,g)},[n,a]),m=Me(function(){return{uniqueId:t,descriptor:n,options:p,getDimension:f}},[n,f,p,t]),u=x.useRef(m),h=x.useRef(!0);kt(function(){return r.draggable.register(u.current),function(){return r.draggable.unregister(u.current)}},[r.draggable]),kt(function(){if(h.current){h.current=!1;return}var g=u.current;u.current=m,r.draggable.update(m,g)},[m,r.draggable])}function rE(e,t,n){no(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)),ab(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 oE(e){zs(function(){var t=x.useRef(e);no(function(){e!==t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Draggable isClone prop value changed during component life"):K(!1))},[e])})}function aE(e){e.preventDefault()}function sE(e){var t=x.useRef(null),n=be(function(R){t.current=R},[]),r=be(function(){return t.current},[]),a=Uo(Ho),s=a.contextId,l=a.dragHandleUsageInstructionsId,c=a.registry,p=Uo(ei),f=p.type,m=p.droppableId,u=Me(function(){return{id:e.draggableId,index:e.index,type:f,droppableId:m}},[e.draggableId,e.index,f,m]),h=e.children,g=e.draggableId,y=e.isEnabled,w=e.shouldRespectForcePress,T=e.canDragInteractiveElements,E=e.isClone,D=e.mapped,M=e.dropAnimationFinished;if(rE(e,s,r),oE(E),!E){var I=Me(function(){return{descriptor:u,registry:c,getDraggableRef:r,canDragInteractiveElements:T,shouldRespectForcePress:w,isEnabled:y}},[u,c,r,T,w,y]);nE(I)}var k=Me(function(){return y?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":g,"data-rbd-drag-handle-context-id":s,draggable:!1,onDragStart:aE}:null},[s,l,g,y]),F=be(function(R){D.type==="DRAGGING"&&D.dropping&&R.propertyName==="transform"&&M()},[M,D]),P=Me(function(){var R=eE(D),O=D.type==="DRAGGING"&&D.dropping?F:null,$={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":s,"data-rbd-draggable-id":g,style:R,onTransitionEnd:O},dragHandleProps:k};return $},[s,k,g,D,F,n]),C=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(P,D.snapshot,C)}var Bp=function(e,t){return e===t},Pp=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},iE=function(t){return t.combine?t.combine.draggableId:null},lE=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function cE(){var e=at(function(a,s){return{x:a,y:s}}),t=at(function(a,s,l,c,p){return{isDragging:!0,isClone:s,isDropAnimating:!!p,dropAnimation:p,mode:a,draggingOver:l,combineWith:c,combineTargetFor:null}}),n=at(function(a,s,l,c,p,f,m){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:f,mode:s,offset:a,dimension:l,forceShouldAnimate:m,snapshot:t(s,c,p,f,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],f=Nt(s.impact),m=lE(s.impact),u=s.forceShouldAnimate;return n(e(c.x,c.y),s.movementMode,p,l.isClone,f,m,u)}if(s.phase==="DROP_ANIMATING"){var h=s.completed;if(h.result.draggableId!==l.draggableId)return null;var g=l.isClone,y=s.dimensions.draggables[l.draggableId],w=h.result,T=w.mode,E=Pp(w),D=iE(w),M=s.dropDuration,I={duration:M,curve:Ls.drop,moveTo:s.newHomeClientOffset,opacity:D?Jr.opacity.drop:null,scale:D?Jr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:s.newHomeClientOffset,dimension:y,dropping:I,draggingOver:E,combineWith:D,mode:T,forceShouldAnimate:null,snapshot:t(T,g,E,D,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 dE={mapped:{type:"SECONDARY",offset:st,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ap(null)}};function pE(){var e=at(function(l,c){return{x:l,y:c}}),t=at(Ap),n=at(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(st,c,!0):null},a=function(c,p,f,m){var u=f.displaced.visible[c],h=!!(m.inVirtualList&&m.effected[c]),g=Ao(f),y=g&&g.draggableId===c?p:null;if(!u){if(!h)return r(y);if(f.displaced.invisible[c])return null;var w=mr(m.displacedBy.point),T=e(w.x,w.y);return n(T,y,!0)}if(h)return r(y);var E=f.displacedBy.point,D=e(E.x,E.y);return n(D,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 f=c.completed;return f.result.draggableId===p.draggableId?null:a(p.draggableId,f.result.draggableId,f.impact,f.afterCritical)}return null};return s}var uE=function(){var t=cE(),n=pE(),r=function(s,l){return t(s,l)||n(s,l)||dE};return r},mE={dropAnimationFinished:Yd},fE=td(uE,mE,null,{context:Gs,pure:!0,areStatePropsEqual:Bp})(sE);function Fp(e){var t=Uo(ei),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:x.createElement(fE,e)}function Vp(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return x.createElement(Fp,ve({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function hE(e){var t=x.useContext(Ho);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,f=e.mode,m=e.direction,u=e.ignoreContainerClipping,h=e.isDropDisabled,g=e.isCombineEnabled,y=e.snapshot,w=e.useClone,T=e.updateViewportMaxScroll,E=e.getContainerForClone,D=be(function(){return a.current},[]),M=be(function(z){a.current=z},[]),I=be(function(){return s.current},[]),k=be(function(z){s.current=z},[]);zT({props:e,getDroppableRef:D,getPlaceholderRef:I});var F=be(function(){r()&&T({maxScroll:Xd()})},[r,T]);VT({droppableId:c,type:p,mode:f,direction:m,isDropDisabled:h,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:D});var P=x.createElement(jT,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(z){var L=z.onClose,oe=z.data,B=z.animate;return x.createElement(WT,{placeholder:oe,onClose:L,innerRef:k,animate:B,contextId:n,onTransitionEnd:F})}),C=Me(function(){return{innerRef:M,placeholder:P,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}},[n,c,P,M]),R=w?w.dragging.draggableId:null,O=Me(function(){return{droppableId:c,type:p,isUsingCloneFor:R}},[c,R,p]);function $(){if(!w)return null;var z=w.dragging,L=w.render,oe=x.createElement(Fp,{draggableId:z.draggableId,index:z.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(B,ee){return L(B,ee,z)});return yo.createPortal(oe,E())}return x.createElement(ei.Provider,{value:O},l(C,y),$())}var ri=function(t,n){return t===n.droppable.type},$p=function(t,n){return n.draggables[t.draggable.id]},SE=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ve({},t,{shouldAnimatePlaceholder:!1}),r=at(function(l){return{draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}}),a=at(function(l,c,p,f,m,u){var h=m.descriptor.id,g=m.descriptor.droppableId===l;if(g){var y=u?{render:u,dragging:r(m.descriptor)}:null,w={isDraggingOver:p,draggingOverWith:p?h:null,draggingFromThisWith:h,isUsingPlaceholder:!0};return{placeholder:m.placeholder,shouldAnimatePlaceholder:!1,snapshot:w,useClone:y}}if(!c)return n;if(!f)return t;var T={isDraggingOver:p,draggingOverWith:h,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:m.placeholder,shouldAnimatePlaceholder:!0,snapshot:T,useClone:null}}),s=function(c,p){var f=p.droppableId,m=p.type,u=!p.isDropDisabled,h=p.renderClone;if(c.isDragging){var g=c.critical;if(!ri(m,g))return n;var y=$p(g,c.dimensions),w=Nt(c.impact)===f;return a(f,u,w,w,y,h)}if(c.phase==="DROP_ANIMATING"){var T=c.completed;if(!ri(m,T.critical))return n;var E=$p(T.critical,c.dimensions);return a(f,u,Pp(T.result)===f,Nt(T.impact)===f,E,h)}if(c.phase==="IDLE"&&c.completed&&!c.shouldFlush){var D=c.completed;if(!ri(m,D.critical))return n;var M=Nt(D.impact)===f,I=!!(D.impact.at&&D.impact.at.type==="COMBINE"),k=D.critical.droppable.id===f;return M?I?t:n:k?t:n}return n};return s},gE={updateViewportMaxScroll:fv};function bE(){return document.body||(process.env.NODE_ENV!=="production"?K(!1,"document.body is not ready"):K()),document.body}var vE={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:bE},oi=td(SE,gE,null,{context:Gs,pure:!0,areStatePropsEqual:Bp})(hE);oi.defaultProps=vE;const yE={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"};function ze(e){const{children:t,className:n,href:r,icon:a,kind:s=Y.ButtonKind.DEFAULT,spinning:l,spinningTitle:c,type:p=Y.ButtonType.BUTTON,unsafelyReplaceClassName:f,...m}=e;let{disabled:u}=e;l&&(u=!0);const{t:h}=o.useContext(Ke),g=U(f||"sps-button",`sps-button--${s}`,u&&"sps-button--disabled",l&&"sps-button--spinning",n),y=a&&o.createElement("i",{className:U("sps-icon",`sps-icon-${a}`),"aria-hidden":"true"}),w=l&&o.createElement("div",{className:"sps-spinner"},c||h("design-system:button.spinningTitle"));return o.createElement("div",{className:g},r?o.createElement("a",{...m,href:r,className:"sps-button__clickable-element"},y,t,w):o.createElement("button",{...m,type:p,className:"sps-button__clickable-element",disabled:u},y,t,w))}Object.assign(ze,{props:yE,displayName:"SpsButton"});const TE={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=U(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:TE,displayName:"SpsCardHeader"});const EE={icon:"SpsIcon",kind:"TagKind"};function Kt(e){const{children:t,className:n,icon:r,kind:a=Y.TagKind.DEFAULT,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=o.Children.toArray(t).filter(m=>typeof m=="string").join(""),f=U(l||"sps-tag",`sps-tag--${a}`,n);return o.createElement("span",{className:f,"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(Kt,{props:EE,displayName:"SpsTag"});const wE={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"};function ai(e){const{activateTab:t,active:n,children:r,className:a,label:s,icon:l,id:c,index:p=0,tag:f,tagKind:m,tagIcon:u,"data-testid":h,unsafelyReplaceClassName:g,...y}=e,w=()=>{t&&t(this,p,r)},T=D=>{(D.key==="Enter"||D.key===" "||D.key==="Spacebar")&&(D.preventDefault(),D.stopPropagation(),t&&t(this,p,r))},E=U(g||"sps-nav__item","sps-nav__link",n&&"active",a);return o.createElement("a",{className:E,onClick:w,"data-toggle":"tab",id:c,role:"tab","aria-controls":c,...y,tabIndex:0,onKeyDown:T},l&&o.createElement("i",{className:`sps-icon sps-icon-${l}`}),o.createElement("span",null,s),f&&o.createElement(Kt,{kind:m||Y.TagKind.KEY,icon:u},f))}Object.assign(ai,{props:wE,displayName:"SpsCardTabbedPane"});function CE(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(f){for(const m of f){const u=m.props;a({...r,content:u.children});break}}function c(f,m){for(let u=0;u<=f.length;u+=1){const h=f[u];if(h&&h.props&&(h.props.id&&h.props.id===m||h.props.label&&h.props.label===m)){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 DE={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"};function si(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:f,...m}=e,u=o.Children.toArray(n).some(w=>o.isValidElement(w)&&w.type===ai),[h,g]=CE(n,t,u),y=U(f||"sps-card",r);return o.createElement("div",{...m,className:y,"data-testid":`${p}__card`},(c||s)&&o.createElement(Kp,{title:c,content:Et(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,(w,T)=>{if(o.isValidElement(w))return o.cloneElement(w,{active:T===h.index,index:T,activateTab:g,"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`},Et(a)))}Object.assign(si,{props:DE,displayName:"SpsCard"});function ii(e,t){const[n,...r]=v.crumblePath(t);return r.length?e.members[n].get(r):e.members[n]}function NE(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(wo.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 ii(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 kE(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(wo.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 IE(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 ii(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 xE(e,t){t&&e.setInitValue(t);const[n,r]=x.useState(),[a,s]=x.useState([]),[l,c]=x.useReducer(p=>{for(const f of a)for(const m of v.traversePath(p,f))m.validators&&m.validators.length&&(m.errors=Co(m.getValue(),m.validators),m.invalid=!!m.errors&&!m.pristine);return r(void 0),s([]),{...p}},e);return v.forEachNestedObject(l,(p,f)=>{f._type&&(f.update=function(){return a.push(p),s(a),n||r(window.setTimeout(c,0)),this})}),l}function ME(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"},oo=o.forwardRef((e,t)=>{const{children:n,onSubmit:r,formArray:a,formGroup:s,formMeta:l,...c}=e,p=s||a;function f(m){m.preventDefault(),p&&p.markAsDirty(),l&&(l.markAsDirty(),l.markAsBlurred(),l.markAsSubmitted()),r&&r(m)}return o.createElement("form",{ref:t,onSubmit:f,...c},n)});Object.assign(oo,{props:Hp,displayName:"SpsForm"});const Wp={},_E={ideal:{label:"Ideal",examples:{ideal:{react:v.code`
|
|
523
523
|
import {
|
|
524
524
|
SpsForm,
|
|
525
525
|
SpsLabel,
|
|
@@ -1823,7 +1823,7 @@ Valid keys: `+JSON.stringify(Object.keys(H),null," "));var se=X(Z,pe,q,V,G+"."+
|
|
|
1823
1823
|
</div>
|
|
1824
1824
|
);
|
|
1825
1825
|
}
|
|
1826
|
-
`}}}},YE={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"};function vr({children:e,className:t,formArray:n,formGroup:r,formMeta:a,stacked:s,"data-testid":l,unsafelyReplaceClassName:c,...p}){const f=r||n,m=f||a,[u,h]=o.useState(!1);o.useEffect(()=>{if(m){const y=m.isFocused();!u&&y&&m.onFocus?m.onFocus():u&&!y&&m.onBlur&&m.onBlur(),h(y)}});const g=U(c||"sps-form-group",(f&&f.invalid||a&&(!a.isValid()||!a.contentsAreValid()))&&"sps-form-group--error",t);return o.createElement("div",{className:g,"data-testid":l,...p},o.createElement("div",{className:U("sps-input-group",s&&"sps-input-group--stacked")},e))}Object.assign(vr,{props:YE,displayName:"SpsInputGroup"});const UE={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",selectedPreset:"string",onPresetChange:"(newPreset?: string) => void"},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 su(e,t=""){return e.find(n=>n.definition===t)}function mi({className:e,disabled:t,formMeta:n,id:r,maxDate:a,minDate:s,onChange:l,presets:c=au,value:p,showTwoMonths:f=!1,twentyFourHour:m=!1,format:u,"data-testid":h,placeholder24h:g="00:00",placeholder12h:y="12:00",selectedPreset:w,onPresetChange:T}){const{t:E}=o.useContext(Ke),{wrapperId:D,controlId:M}=ht(r&&`${r}_from`,n),{wrapperId:I,controlId:k}=ht(r&&`${r}_to`,n),F=o.useRef(null),P=o.useRef(null),C=o.useRef(null),R=o.useRef(null),O=o.useRef(null),$=ne.splitMomentInDateTimeParts(Array.isArray(p)?p[0]:void 0,m,u),z=ne.splitMomentInDateTimeParts(Array.isArray(p)?p[1]:void 0,m,u,!0),[L,oe]=o.useState($[0]),[B,ee]=o.useState(z[0]),[W,j]=o.useState($[1]),[re,H]=o.useState(z[1]),[J,ae]=o.useState($[2]),[ie,q]=o.useState(z[2]),[V,G]=o.useState(su(c,w)||null),{showPopup:Z,doShowPopup:te,doHidePopup:de}=pr(F,O);o.useEffect(()=>{G(su(c,w)||null)},[w]);function pe(ce){n&&(n.setValue(ce),n.markAsDirty()),l&&l(ce)}function X(ce){return ce&&(/^design-system:/.test(ce.label)?E(ce.label):ce.label)}const se=X(V)==="Before",we=X(V)==="After";function Pe(ce){const De=p||[],Ne=ne.toMoment(ce);let Qe;if(se)Qe=[null,Ne],de(!0),T==null||T(X(V));else if(we)Qe=[Ne,null],de(!0),T==null||T(X(V));else if(!De[0]||De[1]||Ne!=null&&Ne.isBefore(ne.toMoment(ne.createFrom(De[0],u)))){let Le=parseInt((W==null?void 0:W.split(":")[0])||"0",10);!m&&Le===12&&(Le=0);const ct=parseInt((W==null?void 0:W.split(":")[1])||"0",10);Ne==null||Ne.set("hour",J==="PM"?12+Le:Le<12?Le:0),Ne==null||Ne.set("minute",ct),Qe=[Ne,null],G(null),T==null||T(null)}else{let Le=parseInt((re==null?void 0:re.split(":")[0])||"0",10);!m&&Le===12&&(Le=0);const ct=parseInt((re==null?void 0:re.split(":")[1])||"0",10);Ne==null||Ne.set("hour",ie==="PM"?12+Le:Le),Ne==null||Ne.set("minute",ct),Ne!=null&&Ne.isBefore(De[0])?Qe=[Ne,null]:(Qe=[De[0],Ne],de(!0)),T==null||T(null),G(null)}pe(Qe)}function pt(ce){oe(ce.target.value),V!==null&&(G(null),T==null||T(null))}function bt(ce){ne.validateTimeString(ce.target.value,m)&&(j(ce.target.value),V!==null&&(G(null),T==null||T(null)))}function nt(ce,De,Ne){const Qe=L,Le=De??W,ct=J;if(Qe===$[0]&&Le===$[1]&&ct===$[2])return;const yt=ne.createFrom(Qe,u);if(yt&&ne.isValid(yt)){const Ge=ne.toMoment(yt);let ut=parseInt((Le==null?void 0:Le.split(":")[0])||"0",10);!m&&ut===12&&(ut=0);const Ln=parseInt((Le==null?void 0:Le.split(":")[1])||"0",10);Ge==null||Ge.set("hour",ct==="PM"?12+ut:ut),Ge==null||Ge.set("minute",Ln);const Se=[Ge,(Ge==null?void 0:Ge.isBefore(p==null?void 0:p[1]))&&(p==null?void 0:p[1])||null];pe(Se)}}function rt(ce){ne.validateTimeString(ce??W,m)&&(j(ne.padIncompleteTimeString(ce??W,m)),setTimeout(()=>nt(void 0,ce),0))}function Pt(ce){ae(ce.target.value)}function Xe(ce){ne.validateTimeString(ce,m)&&(j(ce),setTimeout(()=>rt(ce),0))}o.useEffect(()=>{J!==$[2]&&nt()},[J]);function He(ce){ee(ce.target.value)}function ge(ce){ne.validateTimeString(ce.target.value,m)&&H(ce.target.value)}function Ve(ce,De,Ne){const Qe=B,Le=De??re,ct=ie;if(Qe===z[0]&&Le===z[1]&&ct===z[2])return;const yt=ne.createFrom(Qe,u);if(yt&&ne.isValid(yt)){const Ge=ne.toMoment(yt);let ut=parseInt((Le==null?void 0:Le.split(":")[0])||"0",10);!m&&ut===12&&(ut=0);const Ln=parseInt((Le==null?void 0:Le.split(":")[1])||"0",10);Ge==null||Ge.set("hour",ct==="PM"?12+ut:ut),Ge==null||Ge.set("minute",Ln);const Se=[(Ge==null?void 0:Ge.isAfter(p==null?void 0:p[0]))&&(p==null?void 0:p[0])||null,Ge];pe(Se)}}function he(ce){ne.validateTimeString(ce??re,m)&&(H(ne.padIncompleteTimeString(ce??re,m)),setTimeout(()=>Ve(void 0,ce),0))}function qe(ce){q(ce.target.value)}function Ee(ce){ne.validateTimeString(ce,m)&&(H(ce),setTimeout(()=>he(ce),0))}o.useEffect(()=>{ie!==z[2]&&Ve()},[ie]);function vt(){pe([null,null]),G(null),T==null||T(null)}function _n(ce){return function(De){switch(De.key){case"Tab":de();break;case"Backspace":De.target.selectionStart===0&&p&&!Array.isArray(p)&&vt();break;case"Enter":ce==="from"?nt():ce==="to"&&Ve();break}}}function At(ce){if(!ce){G(null),pe([null,null]),T==null||T(null);return}G(ce);const De=ne.createDateTimeRangeFromPreset(ce);ce&&X(ce)==="Before"?!p||Array.isArray(p)&&p[0]&&p[1]?pe([null,null]):Array.isArray(p)&&p[0]?pe([null,ne.toMoment(ne.createFrom(p[0],u))]):Array.isArray(p)&&p[1]&&pe([null,ne.toMoment(ne.createFrom(p[1],u))]):ce&&X(ce)==="After"?!p||Array.isArray(p)&&p[0]&&p[1]?pe([null,null]):Array.isArray(p)&&p[0]?pe([ne.toMoment(ne.createFrom(p[0],u)),null]):Array.isArray(p)&&p[1]&&pe([ne.toMoment(ne.createFrom(p[1],u)),null]):JSON.stringify(p)!==JSON.stringify(De)&&pe([De[0],De[1]]),T&&(ce==null?void 0:ce.definition)!==w&&T(typeof(ce==null?void 0:ce.definition)=="string"?ce==null?void 0:ce.definition:X(ce))}o.useEffect(()=>{p&&Array.isArray(p)&&!p.length&&vt()},[p]),o.useEffect(()=>{if(p&&Array.isArray(p)&&Array.isArray(p)){if(p[0]&&!p[1]){const ce=c.find(De=>X(De)==="After");ce&&At(ce)}else if(!p[0]&&p[1]){const ce=c.find(De=>X(De)==="Before");ce&&At(ce)}else if(p[0]&&p[1]){const ce=ne.toDateTimeStringRange(p,m,u),De=c.find(Ne=>ce===ne.toDateTimeStringRange(ne.createDateTimeRangeFromPreset(Ne),m,u));De&&At(De)}}},[]),o.useEffect(()=>{$[0]?oe($[0]):oe(""),$[1]?j($[1]):j(m?"00:00":"12:00"),m||($[2]?ae($[2]):ae("AM")),z[0]?ee(z[0]):ee(""),z[1]?H(z[1]):H(m?"23:59":"11:59"),m||(z[2]?q(z[2]):q("PM"))},[$[0],$[1],$[2],z[0],z[1],z[2],m]);const Ie=U(ru,"sps-text-input",Z&&`${ru}--open`,e);return o.createElement(o.Fragment,null,o.createElement("div",{className:U("sps-datetime-range-picker")},o.createElement("div",{className:U("sps-datetime-range-picker__pair")},o.createElement(tt,{id:D,className:Ie,formMeta:n,inputRef:P,focusInputOnClick:!0,ref:F},o.createElement("div",{className:U("sps-form-control",t&&"disabled")},o.createElement("i",{className:U("sps-text-input__icon","sps-icon","sps-icon-calendar")}),V&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},X(V))),o.createElement("input",{type:"text",ref:P,className:"sps-text-input__input","data-testid":`${h}_from_date_input`,id:M,placeholder:!L&&!V?(u==null?void 0:u.toUpperCase())||lr:se?z[0]:we?$[0]:void 0,onChange:pt,onClick:te,onFocus:te,onBlur:()=>nt(),onKeyDown:_n("from"),value:V?"":L,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:vt}))),!V&&(m?o.createElement(Xt,{className:"sps-time-input",placeholder:g,suggestions:Pa,zeroState:"Custom time",value:W,onChange:bt,onBlur:()=>rt(),onSelectionChange:Xe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(vr,null,o.createElement(Xt,{className:"sps-time-input",placeholder:y,suggestions:Ba,zeroState:"Custom time",value:W,onChange:bt,onBlur:()=>rt(),onSelectionChange:Xe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Un,{options:ou,value:J,onChange:Pt,disabled:t,notClearable:!0})))),!V&&o.createElement("span",{className:U("sps-datepicker__to")},"to"),!V&&o.createElement("div",{className:U("sps-datetime-range-picker__pair")},o.createElement(tt,{id:I,className:Ie,formMeta:n,inputRef:R,focusInputOnClick:!0,ref:C},o.createElement("div",{className:U("sps-form-control",t&&"disabled")},o.createElement("i",{className:U("sps-text-input__icon","sps-icon","sps-icon-calendar")}),V&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},X(V))),o.createElement("input",{type:"text",ref:R,className:"sps-text-input__input","data-testid":`${h}_to_date_input`,id:k,placeholder:!B&&!V?(u==null?void 0:u.toUpperCase())||lr:void 0,onChange:He,onClick:te,onFocus:te,onKeyDown:_n("to"),onBlur:()=>Ve(),value:B,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:vt}))),m?o.createElement(Xt,{className:"sps-time-input",placeholder:g,suggestions:Pa,zeroState:"Custom time",value:re,onChange:ge,onBlur:()=>he(),onSelectionChange:Ee,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(vr,null,o.createElement(Xt,{className:"sps-time-input",placeholder:y,suggestions:Ba,zeroState:"Custom time",value:re,onChange:ge,onBlur:()=>he(),onSelectionChange:Ee,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Un,{options:ou,value:ie,onChange:qe,disabled:t,notClearable:!0})))),o.createElement(Zo,{isOpen:Z,attachTo:F,ref:O},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},E("design-system:datepicker.presetsLabel",{defaultValue:"Ranges"})),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-${D}__range-custom`,className:"sps-custom-control__input",checked:!V,name:`sps-date-range-picker-${D}__range`,onChange:()=>At()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${D}__range-custom`},E("design-system:datepicker.preset.custom",{defaultValue:"Custom"}))),c.map((ce,De)=>o.createElement("div",{key:X(ce),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${h}_preset_option_${ce.label}`,id:`sps-date-range-picker-${D}__range-${De}`,name:`sps-date-range-picker-${D}__range`,onChange:()=>At(ce),checked:V!=null&&V.definition?V.definition===ce.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${D}__range-${De}`},X(ce)))))),o.createElement(Jo,{"data-testid":`${h}_calendar`,selectedRange:Array.isArray(p)?[ne.createFrom(p[0],u),ne.createFrom(p[1],u)]:void 0,onNewSelection:Pe,minDate:s,maxDate:a,showTwoMonths:f,selectedPreset:V&&X(V)})))}Object.assign(mi,{props:UE,displayName:"SpsDateTimeRangePicker"});const iu={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
1826
|
+
`}}}},YE={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"};function vr({children:e,className:t,formArray:n,formGroup:r,formMeta:a,stacked:s,"data-testid":l,unsafelyReplaceClassName:c,...p}){const f=r||n,m=f||a,[u,h]=o.useState(!1);o.useEffect(()=>{if(m){const y=m.isFocused();!u&&y&&m.onFocus?m.onFocus():u&&!y&&m.onBlur&&m.onBlur(),h(y)}});const g=U(c||"sps-form-group",(f&&f.invalid||a&&(!a.isValid()||!a.contentsAreValid()))&&"sps-form-group--error",t);return o.createElement("div",{className:g,"data-testid":l,...p},o.createElement("div",{className:U("sps-input-group",s&&"sps-input-group--stacked")},e))}Object.assign(vr,{props:YE,displayName:"SpsInputGroup"});const UE={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",selectedPreset:"string",onPresetChange:"(newPreset?: string) => void"},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 su(e,t=""){return e.find(n=>n.definition===t)}function mi({className:e,disabled:t,formMeta:n,id:r,maxDate:a,minDate:s,onChange:l,presets:c=au,value:p,showTwoMonths:f=!1,twentyFourHour:m=!1,format:u,"data-testid":h,placeholder24h:g="00:00",placeholder12h:y="12:00",selectedPreset:w,onPresetChange:T}){const{t:E}=o.useContext(Ke),{wrapperId:D,controlId:M}=ht(r&&`${r}_from`,n),{wrapperId:I,controlId:k}=ht(r&&`${r}_to`,n),F=o.useRef(null),P=o.useRef(null),C=o.useRef(null),R=o.useRef(null),O=o.useRef(null),$=ne.splitMomentInDateTimeParts(Array.isArray(p)?p[0]:void 0,m,u),z=ne.splitMomentInDateTimeParts(Array.isArray(p)?p[1]:void 0,m,u,!0),[L,oe]=o.useState($[0]),[B,ee]=o.useState(z[0]),[W,j]=o.useState($[1]),[re,H]=o.useState(z[1]),[J,ae]=o.useState($[2]),[ie,q]=o.useState(z[2]),[V,G]=o.useState(su(c,w)||null),{showPopup:Z,doShowPopup:te,doHidePopup:de}=pr(F,O);o.useEffect(()=>{G(su(c,w)||null)},[w]);function pe(ce){n&&(n.setValue(ce),n.markAsDirty()),l&&l(ce)}function X(ce){return ce&&(/^design-system:/.test(ce.label)?E(ce.label):ce.label)}const se=X(V)==="Before",we=X(V)==="After";function Pe(ce){const De=p||[],Ne=ne.toMoment(ce);let Qe;if(se)Qe=[null,Ne],de(!0),T==null||T(X(V));else if(we)Qe=[Ne,null],de(!0),T==null||T(X(V));else if(!De[0]||De[1]||Ne!=null&&Ne.isBefore(ne.toMoment(ne.createFrom(De[0],u)))){let Le=parseInt((W==null?void 0:W.split(":")[0])||"0",10);!m&&Le===12&&(Le=0);const lt=parseInt((W==null?void 0:W.split(":")[1])||"0",10);Ne==null||Ne.set("hour",J==="PM"?12+Le:Le<12?Le:0),Ne==null||Ne.set("minute",lt),Qe=[Ne,null],G(null),T==null||T(null)}else{let Le=parseInt((re==null?void 0:re.split(":")[0])||"0",10);!m&&Le===12&&(Le=0);const lt=parseInt((re==null?void 0:re.split(":")[1])||"0",10);Ne==null||Ne.set("hour",ie==="PM"?12+Le:Le),Ne==null||Ne.set("minute",lt),Ne!=null&&Ne.isBefore(De[0])?Qe=[Ne,null]:(Qe=[De[0],Ne],de(!0)),T==null||T(null),G(null)}pe(Qe)}function pt(ce){oe(ce.target.value),V!==null&&(G(null),T==null||T(null))}function bt(ce){ne.validateTimeString(ce.target.value,m)&&(j(ce.target.value),V!==null&&(G(null),T==null||T(null)))}function nt(ce,De,Ne){const Qe=L,Le=De??W,lt=J;if(Qe===$[0]&&Le===$[1]&<===$[2])return;const yt=ne.createFrom(Qe,u);if(yt&&ne.isValid(yt)){const Ge=ne.toMoment(yt);let ut=parseInt((Le==null?void 0:Le.split(":")[0])||"0",10);!m&&ut===12&&(ut=0);const Ln=parseInt((Le==null?void 0:Le.split(":")[1])||"0",10);Ge==null||Ge.set("hour",lt==="PM"?12+ut:ut),Ge==null||Ge.set("minute",Ln);const Se=[Ge,(Ge==null?void 0:Ge.isBefore(p==null?void 0:p[1]))&&(p==null?void 0:p[1])||null];pe(Se)}}function rt(ce){ne.validateTimeString(ce??W,m)&&(j(ne.padIncompleteTimeString(ce??W,m)),setTimeout(()=>nt(void 0,ce),0))}function Pt(ce){ae(ce.target.value)}function Xe(ce){ne.validateTimeString(ce,m)&&(j(ce),setTimeout(()=>rt(ce),0))}o.useEffect(()=>{J!==$[2]&&nt()},[J]);function He(ce){ee(ce.target.value)}function ge(ce){ne.validateTimeString(ce.target.value,m)&&H(ce.target.value)}function Ve(ce,De,Ne){const Qe=B,Le=De??re,lt=ie;if(Qe===z[0]&&Le===z[1]&<===z[2])return;const yt=ne.createFrom(Qe,u);if(yt&&ne.isValid(yt)){const Ge=ne.toMoment(yt);let ut=parseInt((Le==null?void 0:Le.split(":")[0])||"0",10);!m&&ut===12&&(ut=0);const Ln=parseInt((Le==null?void 0:Le.split(":")[1])||"0",10);Ge==null||Ge.set("hour",lt==="PM"?12+ut:ut),Ge==null||Ge.set("minute",Ln);const Se=[(Ge==null?void 0:Ge.isAfter(p==null?void 0:p[0]))&&(p==null?void 0:p[0])||null,Ge];pe(Se)}}function he(ce){ne.validateTimeString(ce??re,m)&&(H(ne.padIncompleteTimeString(ce??re,m)),setTimeout(()=>Ve(void 0,ce),0))}function qe(ce){q(ce.target.value)}function Ee(ce){ne.validateTimeString(ce,m)&&(H(ce),setTimeout(()=>he(ce),0))}o.useEffect(()=>{ie!==z[2]&&Ve()},[ie]);function vt(){pe([null,null]),G(null),T==null||T(null)}function _n(ce){return function(De){switch(De.key){case"Tab":de();break;case"Backspace":De.target.selectionStart===0&&p&&!Array.isArray(p)&&vt();break;case"Enter":ce==="from"?nt():ce==="to"&&Ve();break}}}function At(ce){if(!ce){G(null),pe([null,null]),T==null||T(null);return}G(ce);const De=ne.createDateTimeRangeFromPreset(ce);ce&&X(ce)==="Before"?!p||Array.isArray(p)&&p[0]&&p[1]?pe([null,null]):Array.isArray(p)&&p[0]?pe([null,ne.toMoment(ne.createFrom(p[0],u))]):Array.isArray(p)&&p[1]&&pe([null,ne.toMoment(ne.createFrom(p[1],u))]):ce&&X(ce)==="After"?!p||Array.isArray(p)&&p[0]&&p[1]?pe([null,null]):Array.isArray(p)&&p[0]?pe([ne.toMoment(ne.createFrom(p[0],u)),null]):Array.isArray(p)&&p[1]&&pe([ne.toMoment(ne.createFrom(p[1],u)),null]):JSON.stringify(p)!==JSON.stringify(De)&&pe([De[0],De[1]]),T&&(ce==null?void 0:ce.definition)!==w&&T(typeof(ce==null?void 0:ce.definition)=="string"?ce==null?void 0:ce.definition:X(ce))}o.useEffect(()=>{p&&Array.isArray(p)&&!p.length&&vt()},[p]),o.useEffect(()=>{if(p&&Array.isArray(p)&&Array.isArray(p)){if(p[0]&&!p[1]){const ce=c.find(De=>X(De)==="After");ce&&At(ce)}else if(!p[0]&&p[1]){const ce=c.find(De=>X(De)==="Before");ce&&At(ce)}else if(p[0]&&p[1]){const ce=ne.toDateTimeStringRange(p,m,u),De=c.find(Ne=>ce===ne.toDateTimeStringRange(ne.createDateTimeRangeFromPreset(Ne),m,u));De&&At(De)}}},[]),o.useEffect(()=>{$[0]?oe($[0]):oe(""),$[1]?j($[1]):j(m?"00:00":"12:00"),m||($[2]?ae($[2]):ae("AM")),z[0]?ee(z[0]):ee(""),z[1]?H(z[1]):H(m?"23:59":"11:59"),m||(z[2]?q(z[2]):q("PM"))},[$[0],$[1],$[2],z[0],z[1],z[2],m]);const Ie=U(ru,"sps-text-input",Z&&`${ru}--open`,e);return o.createElement(o.Fragment,null,o.createElement("div",{className:U("sps-datetime-range-picker")},o.createElement("div",{className:U("sps-datetime-range-picker__pair")},o.createElement(tt,{id:D,className:Ie,formMeta:n,inputRef:P,focusInputOnClick:!0,ref:F},o.createElement("div",{className:U("sps-form-control",t&&"disabled")},o.createElement("i",{className:U("sps-text-input__icon","sps-icon","sps-icon-calendar")}),V&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},X(V))),o.createElement("input",{type:"text",ref:P,className:"sps-text-input__input","data-testid":`${h}_from_date_input`,id:M,placeholder:!L&&!V?(u==null?void 0:u.toUpperCase())||lr:se?z[0]:we?$[0]:void 0,onChange:pt,onClick:te,onFocus:te,onBlur:()=>nt(),onKeyDown:_n("from"),value:V?"":L,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:vt}))),!V&&(m?o.createElement(Xt,{className:"sps-time-input",placeholder:g,suggestions:Pa,zeroState:"Custom time",value:W,onChange:bt,onBlur:()=>rt(),onSelectionChange:Xe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(vr,null,o.createElement(Xt,{className:"sps-time-input",placeholder:y,suggestions:Ba,zeroState:"Custom time",value:W,onChange:bt,onBlur:()=>rt(),onSelectionChange:Xe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Un,{options:ou,value:J,onChange:Pt,disabled:t,notClearable:!0})))),!V&&o.createElement("span",{className:U("sps-datepicker__to")},"to"),!V&&o.createElement("div",{className:U("sps-datetime-range-picker__pair")},o.createElement(tt,{id:I,className:Ie,formMeta:n,inputRef:R,focusInputOnClick:!0,ref:C},o.createElement("div",{className:U("sps-form-control",t&&"disabled")},o.createElement("i",{className:U("sps-text-input__icon","sps-icon","sps-icon-calendar")}),V&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},X(V))),o.createElement("input",{type:"text",ref:R,className:"sps-text-input__input","data-testid":`${h}_to_date_input`,id:k,placeholder:!B&&!V?(u==null?void 0:u.toUpperCase())||lr:void 0,onChange:He,onClick:te,onFocus:te,onKeyDown:_n("to"),onBlur:()=>Ve(),value:B,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:vt}))),m?o.createElement(Xt,{className:"sps-time-input",placeholder:g,suggestions:Pa,zeroState:"Custom time",value:re,onChange:ge,onBlur:()=>he(),onSelectionChange:Ee,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(vr,null,o.createElement(Xt,{className:"sps-time-input",placeholder:y,suggestions:Ba,zeroState:"Custom time",value:re,onChange:ge,onBlur:()=>he(),onSelectionChange:Ee,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Un,{options:ou,value:ie,onChange:qe,disabled:t,notClearable:!0})))),o.createElement(Zo,{isOpen:Z,attachTo:F,ref:O},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},E("design-system:datepicker.presetsLabel",{defaultValue:"Ranges"})),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-${D}__range-custom`,className:"sps-custom-control__input",checked:!V,name:`sps-date-range-picker-${D}__range`,onChange:()=>At()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${D}__range-custom`},E("design-system:datepicker.preset.custom",{defaultValue:"Custom"}))),c.map((ce,De)=>o.createElement("div",{key:X(ce),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${h}_preset_option_${ce.label}`,id:`sps-date-range-picker-${D}__range-${De}`,name:`sps-date-range-picker-${D}__range`,onChange:()=>At(ce),checked:V!=null&&V.definition?V.definition===ce.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${D}__range-${De}`},X(ce)))))),o.createElement(Jo,{"data-testid":`${h}_calendar`,selectedRange:Array.isArray(p)?[ne.createFrom(p[0],u),ne.createFrom(p[1],u)]:void 0,onNewSelection:Pe,minDate:s,maxDate:a,showTwoMonths:f,selectedPreset:V&&X(V)})))}Object.assign(mi,{props:UE,displayName:"SpsDateTimeRangePicker"});const iu={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(H),null," "));var se=X(Z,pe,q,V,G+"."+
|
|
|
1974
1974
|
`}}}};function Qt(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 fi={exports:{}},lu;function nn(){return lu||(lu=1,function(e,t){(function(n,r){e.exports=r()})(jt,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 f(i){return i===void 0}function m(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 S=[],b,N=i.length;for(b=0;b<N;++b)S.push(d(i[b],b));return S}function g(i,d){for(var S in d)c(d,S)&&(i[S]=d[S]);return c(d,"toString")&&(i.toString=d.toString),c(d,"valueOf")&&(i.valueOf=d.valueOf),i}function y(i,d,S,b){return oh(i,d,S,b,!0).utc()}function w(){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 T(i){return i._pf==null&&(i._pf=w()),i._pf}var E;Array.prototype.some?E=Array.prototype.some:E=function(i){var d=Object(this),S=d.length>>>0,b;for(b=0;b<S;b++)if(b in d&&i.call(this,d[b],b,d))return!0;return!1};function D(i){var d=null,S=!1,b=i._d&&!isNaN(i._d.getTime());if(b&&(d=T(i),S=E.call(d.parsedDateParts,function(N){return N!=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&&S),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?g(T(d),i):T(d).userInvalidated=!0,d}var I=r.momentProperties=[],k=!1;function F(i,d){var S,b,N,A=I.length;if(f(d._isAMomentObject)||(i._isAMomentObject=d._isAMomentObject),f(d._i)||(i._i=d._i),f(d._f)||(i._f=d._f),f(d._l)||(i._l=d._l),f(d._strict)||(i._strict=d._strict),f(d._tzm)||(i._tzm=d._tzm),f(d._isUTC)||(i._isUTC=d._isUTC),f(d._offset)||(i._offset=d._offset),f(d._pf)||(i._pf=T(d)),f(d._locale)||(i._locale=d._locale),A>0)for(S=0;S<A;S++)b=I[S],N=d[b],f(N)||(i[b]=N);return i}function P(i){F(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 C(i){return i instanceof P||i!=null&&i._isAMomentObject!=null}function R(i){r.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+i)}function O(i,d){var S=!0;return g(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,i),S){var b=[],N,A,Q,fe=arguments.length;for(A=0;A<fe;A++){if(N="",typeof arguments[A]=="object"){N+=`
|
|
1975
1975
|
[`+A+"] ";for(Q in arguments[0])c(arguments[0],Q)&&(N+=Q+": "+arguments[0][Q]+", ");N=N.slice(0,-2)}else N=arguments[A];b.push(N)}R(i+`
|
|
1976
1976
|
Arguments: `+Array.prototype.slice.call(b).join("")+`
|
|
1977
|
-
`+new Error().stack),S=!1}return d.apply(this,arguments)},d)}var $={};function z(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),$[i]||(R(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 oe(i){var d,S;for(S in i)c(i,S)&&(d=i[S],L(d)?this[S]=d:this["_"+S]=d);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function B(i,d){var S=g({},i),b;for(b in d)c(d,b)&&(l(i[b])&&l(d[b])?(S[b]={},g(S[b],i[b]),g(S[b],d[b])):d[b]!=null?S[b]=d[b]:delete S[b]);for(b in i)c(i,b)&&!c(d,b)&&l(i[b])&&(S[b]=g({},S[b]));return S}function ee(i){i!=null&&this.set(i)}var W;Object.keys?W=Object.keys:W=function(i){var d,S=[];for(d in i)c(i,d)&&S.push(d);return S};var j={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function re(i,d,S){var b=this._calendar[i]||this._calendar.sameElse;return L(b)?b.call(d,S):b}function H(i,d,S){var b=""+Math.abs(i),N=d-b.length,A=i>=0;return(A?S?"+":"":"-")+Math.pow(10,Math.max(0,N)).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,ae=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ie={},q={};function V(i,d,S,b){var N=b;typeof b=="string"&&(N=function(){return this[b]()}),i&&(q[i]=N),d&&(q[d[0]]=function(){return H(N.apply(this,arguments),d[1],d[2])}),S&&(q[S]=function(){return this.localeData().ordinal(N.apply(this,arguments),i)})}function G(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Z(i){var d=i.match(J),S,b;for(S=0,b=d.length;S<b;S++)q[d[S]]?d[S]=q[d[S]]:d[S]=G(d[S]);return function(N){var A="",Q;for(Q=0;Q<b;Q++)A+=L(d[Q])?d[Q].call(N,i):d[Q];return A}}function te(i,d){return i.isValid()?(d=de(d,i.localeData()),ie[d]=ie[d]||Z(d),ie[d](i)):i.localeData().invalidDate()}function de(i,d){var S=5;function b(N){return d.longDateFormat(N)||N}for(ae.lastIndex=0;S>=0&&ae.test(i);)i=i.replace(ae,b),ae.lastIndex=0,S-=1;return i}var pe={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 X(i){var d=this._longDateFormat[i],S=this._longDateFormat[i.toUpperCase()];return d||!S?d:(this._longDateFormat[i]=S.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 we(){return this._invalidDate}var Pe="%d",pt=/\d{1,2}/;function bt(i){return this._ordinal.replace("%d",i)}var nt={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 rt(i,d,S,b){var N=this._relativeTime[S];return L(N)?N(i,d,S,b):N.replace(/%d/i,i)}function Pt(i,d){var S=this._relativeTime[i>0?"future":"past"];return L(S)?S(d):S.replace(/%s/i,d)}var Xe={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 He(i){return typeof i=="string"?Xe[i]||Xe[i.toLowerCase()]:void 0}function ge(i){var d={},S,b;for(b in i)c(i,b)&&(S=He(b),S&&(d[S]=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 he(i){var d=[],S;for(S in i)c(i,S)&&d.push({unit:S,priority:Ve[S]});return d.sort(function(b,N){return b.priority-N.priority}),d}var qe=/\d/,Ee=/\d\d/,vt=/\d{3}/,_n=/\d{4}/,At=/[+-]?\d{6}/,Ie=/\d\d?/,ce=/\d\d\d\d?/,De=/\d\d\d\d\d\d?/,Ne=/\d{1,3}/,Qe=/\d{1,4}/,Le=/[+-]?\d{1,6}/,ct=/\d+/,yt=/[+-]?\d+/,Ge=/Z|[+-]\d\d:?\d\d/gi,ut=/Z|[+-]\d\d(?::?\d\d)?/gi,Ln=/[+-]?\d+(\.\d{1,3})?/,Se=/[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,ye=/^[1-9]\d?/,et=/^([1-9]\d|\d)/,Ft;Ft={};function me(i,d,S){Ft[i]=L(d)?d:function(b,N){return b&&S?S:d}}function El(i,d){return c(Ft,i)?Ft[i](d._strict,d._locale):new RegExp(vN(i))}function vN(i){return sn(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,S,b,N,A){return S||b||N||A}))}function sn(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Vt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function Ce(i){var d=+i,S=0;return d!==0&&isFinite(d)&&(S=Vt(d)),S}var wl={};function $e(i,d){var S,b=d,N;for(typeof i=="string"&&(i=[i]),m(d)&&(b=function(A,Q){Q[d]=Ce(A)}),N=i.length,S=0;S<N;S++)wl[i[S]]=b}function uo(i,d){$e(i,function(S,b,N,A){N._w=N._w||{},d(S,N._w,N,A)})}function yN(i,d,S){d!=null&&c(wl,i)&&wl[i](d,S._a,S,i)}function ya(i){return i%4===0&&i%100!==0||i%400===0}var mt=0,ln=1,en=2,ot=3,Yt=4,cn=5,tr=6,TN=7,EN=8;V("Y",0,0,function(){var i=this.year();return i<=9999?H(i,4):"+"+i}),V(0,["YY",2],0,function(){return this.year()%100}),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),me("Y",yt),me("YY",Ie,Ee),me("YYYY",Qe,_n),me("YYYYY",Le,At),me("YYYYYY",Le,At),$e(["YYYYY","YYYYYY"],mt),$e("YYYY",function(i,d){d[mt]=i.length===2?r.parseTwoDigitYear(i):Ce(i)}),$e("YY",function(i,d){d[mt]=r.parseTwoDigitYear(i)}),$e("Y",function(i,d){d[mt]=parseInt(i,10)});function mo(i){return ya(i)?366:365}r.parseTwoDigitYear=function(i){return Ce(i)+(Ce(i)>68?1900:2e3)};var Hf=Nr("FullYear",!0);function wN(){return ya(this.year())}function Nr(i,d){return function(S){return S!=null?(Wf(this,i,S),r.updateOffset(this,d),this):fo(this,i)}}function fo(i,d){if(!i.isValid())return NaN;var S=i._d,b=i._isUTC;switch(d){case"Milliseconds":return b?S.getUTCMilliseconds():S.getMilliseconds();case"Seconds":return b?S.getUTCSeconds():S.getSeconds();case"Minutes":return b?S.getUTCMinutes():S.getMinutes();case"Hours":return b?S.getUTCHours():S.getHours();case"Date":return b?S.getUTCDate():S.getDate();case"Day":return b?S.getUTCDay():S.getDay();case"Month":return b?S.getUTCMonth():S.getMonth();case"FullYear":return b?S.getUTCFullYear():S.getFullYear();default:return NaN}}function Wf(i,d,S){var b,N,A,Q,fe;if(!(!i.isValid()||isNaN(S))){switch(b=i._d,N=i._isUTC,d){case"Milliseconds":return void(N?b.setUTCMilliseconds(S):b.setMilliseconds(S));case"Seconds":return void(N?b.setUTCSeconds(S):b.setSeconds(S));case"Minutes":return void(N?b.setUTCMinutes(S):b.setMinutes(S));case"Hours":return void(N?b.setUTCHours(S):b.setHours(S));case"Date":return void(N?b.setUTCDate(S):b.setDate(S));case"FullYear":break;default:return}A=S,Q=i.month(),fe=i.date(),fe=fe===29&&Q===1&&!ya(A)?28:fe,N?b.setUTCFullYear(A,Q,fe):b.setFullYear(A,Q,fe)}}function CN(i){return i=He(i),L(this[i])?this[i]():this}function DN(i,d){if(typeof i=="object"){i=ge(i);var S=he(i),b,N=S.length;for(b=0;b<N;b++)this[S[b].unit](i[S[b].unit])}else if(i=He(i),L(this[i]))return this[i](d);return this}function NN(i,d){return(i%d+d)%d}var Je;Array.prototype.indexOf?Je=Array.prototype.indexOf:Je=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function Cl(i,d){if(isNaN(i)||isNaN(d))return NaN;var S=NN(d,12);return i+=(d-S)/12,S===1?ya(i)?29:28:31-S%7%2}V("M",["MM",2],"Mo",function(){return this.month()+1}),V("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),V("MMMM",0,0,function(i){return this.localeData().months(this,i)}),me("M",Ie,ye),me("MM",Ie,Ee),me("MMM",function(i,d){return d.monthsShortRegex(i)}),me("MMMM",function(i,d){return d.monthsRegex(i)}),$e(["M","MM"],function(i,d){d[ln]=Ce(i)-1}),$e(["MMM","MMMM"],function(i,d,S,b){var N=S._locale.monthsParse(i,b,S._strict);N!=null?d[ln]=N:T(S).invalidMonth=i});var kN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Gf="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Yf=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,IN=Se,xN=Se;function MN(i,d){return i?s(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Yf).test(d)?"format":"standalone"][i.month()]:s(this._months)?this._months:this._months.standalone}function _N(i,d){return i?s(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Yf.test(d)?"format":"standalone"][i.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function LN(i,d,S){var b,N,A,Q=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)A=y([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(A,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(A,"").toLocaleLowerCase();return S?d==="MMM"?(N=Je.call(this._shortMonthsParse,Q),N!==-1?N:null):(N=Je.call(this._longMonthsParse,Q),N!==-1?N:null):d==="MMM"?(N=Je.call(this._shortMonthsParse,Q),N!==-1?N:(N=Je.call(this._longMonthsParse,Q),N!==-1?N:null)):(N=Je.call(this._longMonthsParse,Q),N!==-1?N:(N=Je.call(this._shortMonthsParse,Q),N!==-1?N:null))}function ON(i,d,S){var b,N,A;if(this._monthsParseExact)return LN.call(this,i,d,S);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(N=y([2e3,b]),S&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(N,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(N,"").replace(".","")+"$","i")),!S&&!this._monthsParse[b]&&(A="^"+this.months(N,"")+"|^"+this.monthsShort(N,""),this._monthsParse[b]=new RegExp(A.replace(".",""),"i")),S&&d==="MMMM"&&this._longMonthsParse[b].test(i))return b;if(S&&d==="MMM"&&this._shortMonthsParse[b].test(i))return b;if(!S&&this._monthsParse[b].test(i))return b}}function Uf(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),!m(d))return i}var S=d,b=i.date();return b=b<29?b:Math.min(b,Cl(i.year(),S)),i._isUTC?i._d.setUTCMonth(S,b):i._d.setMonth(S,b),i}function zf(i){return i!=null?(Uf(this,i),r.updateOffset(this,!0),this):fo(this,"Month")}function RN(){return Cl(this.year(),this.month())}function BN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||jf.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=IN),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function PN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||jf.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=xN),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function jf(){function i(Te,ke){return ke.length-Te.length}var d=[],S=[],b=[],N,A,Q,fe;for(N=0;N<12;N++)A=y([2e3,N]),Q=sn(this.monthsShort(A,"")),fe=sn(this.months(A,"")),d.push(Q),S.push(fe),b.push(fe),b.push(Q);d.sort(i),S.sort(i),b.sort(i),this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function AN(i,d,S,b,N,A,Q){var fe;return i<100&&i>=0?(fe=new Date(i+400,d,S,b,N,A,Q),isFinite(fe.getFullYear())&&fe.setFullYear(i)):fe=new Date(i,d,S,b,N,A,Q),fe}function ho(i){var d,S;return i<100&&i>=0?(S=Array.prototype.slice.call(arguments),S[0]=i+400,d=new Date(Date.UTC.apply(null,S)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(i)):d=new Date(Date.UTC.apply(null,arguments)),d}function Ta(i,d,S){var b=7+d-S,N=(7+ho(i,0,b).getUTCDay()-d)%7;return-N+b-1}function qf(i,d,S,b,N){var A=(7+S-b)%7,Q=Ta(i,b,N),fe=1+7*(d-1)+A+Q,Te,ke;return fe<=0?(Te=i-1,ke=mo(Te)+fe):fe>mo(i)?(Te=i+1,ke=fe-mo(i)):(Te=i,ke=fe),{year:Te,dayOfYear:ke}}function So(i,d,S){var b=Ta(i.year(),d,S),N=Math.floor((i.dayOfYear()-b-1)/7)+1,A,Q;return N<1?(Q=i.year()-1,A=N+dn(Q,d,S)):N>dn(i.year(),d,S)?(A=N-dn(i.year(),d,S),Q=i.year()+1):(Q=i.year(),A=N),{week:A,year:Q}}function dn(i,d,S){var b=Ta(i,d,S),N=Ta(i+1,d,S);return(mo(i)-b+N)/7}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),me("w",Ie,ye),me("ww",Ie,Ee),me("W",Ie,ye),me("WW",Ie,Ee),uo(["w","ww","W","WW"],function(i,d,S,b){d[b.substr(0,1)]=Ce(i)});function FN(i){return So(i,this._week.dow,this._week.doy).week}var VN={dow:0,doy:6};function $N(){return this._week.dow}function KN(){return this._week.doy}function HN(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function WN(i){var d=So(this,1,4).week;return i==null?d:this.add((i-d)*7,"d")}V("d",0,"do","day"),V("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),V("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),V("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),me("d",Ie),me("e",Ie),me("E",Ie),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)}),uo(["dd","ddd","dddd"],function(i,d,S,b){var N=S._locale.weekdaysParse(i,b,S._strict);N!=null?d.d=N:T(S).invalidWeekday=i}),uo(["d","e","E"],function(i,d,S,b){d[b]=Ce(i)});function GN(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function YN(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Dl(i,d){return i.slice(d,7).concat(i.slice(0,d))}var UN="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Jf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zN="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),jN=Se,qN=Se,JN=Se;function ZN(i,d){var S=s(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Dl(S,this._week.dow):i?S[i.day()]:S}function XN(i){return i===!0?Dl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function QN(i){return i===!0?Dl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function ek(i,d,S){var b,N,A,Q=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)A=y([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(A,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(A,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(A,"").toLocaleLowerCase();return S?d==="dddd"?(N=Je.call(this._weekdaysParse,Q),N!==-1?N:null):d==="ddd"?(N=Je.call(this._shortWeekdaysParse,Q),N!==-1?N:null):(N=Je.call(this._minWeekdaysParse,Q),N!==-1?N:null):d==="dddd"?(N=Je.call(this._weekdaysParse,Q),N!==-1||(N=Je.call(this._shortWeekdaysParse,Q),N!==-1)?N:(N=Je.call(this._minWeekdaysParse,Q),N!==-1?N:null)):d==="ddd"?(N=Je.call(this._shortWeekdaysParse,Q),N!==-1||(N=Je.call(this._weekdaysParse,Q),N!==-1)?N:(N=Je.call(this._minWeekdaysParse,Q),N!==-1?N:null)):(N=Je.call(this._minWeekdaysParse,Q),N!==-1||(N=Je.call(this._weekdaysParse,Q),N!==-1)?N:(N=Je.call(this._shortWeekdaysParse,Q),N!==-1?N:null))}function tk(i,d,S){var b,N,A;if(this._weekdaysParseExact)return ek.call(this,i,d,S);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(N=y([2e3,1]).day(b),S&&!this._fullWeekdaysParse[b]&&(this._fullWeekdaysParse[b]=new RegExp("^"+this.weekdays(N,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[b]=new RegExp("^"+this.weekdaysShort(N,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[b]=new RegExp("^"+this.weekdaysMin(N,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[b]||(A="^"+this.weekdays(N,"")+"|^"+this.weekdaysShort(N,"")+"|^"+this.weekdaysMin(N,""),this._weekdaysParse[b]=new RegExp(A.replace(".",""),"i")),S&&d==="dddd"&&this._fullWeekdaysParse[b].test(i))return b;if(S&&d==="ddd"&&this._shortWeekdaysParse[b].test(i))return b;if(S&&d==="dd"&&this._minWeekdaysParse[b].test(i))return b;if(!S&&this._weekdaysParse[b].test(i))return b}}function nk(i){if(!this.isValid())return i!=null?this:NaN;var d=fo(this,"Day");return i!=null?(i=GN(i,this.localeData()),this.add(i-d,"d")):d}function rk(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 ok(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=YN(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function ak(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Nl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=jN),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function sk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Nl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qN),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ik(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Nl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=JN),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Nl(){function i(Tt,hn){return hn.length-Tt.length}var d=[],S=[],b=[],N=[],A,Q,fe,Te,ke;for(A=0;A<7;A++)Q=y([2e3,1]).day(A),fe=sn(this.weekdaysMin(Q,"")),Te=sn(this.weekdaysShort(Q,"")),ke=sn(this.weekdays(Q,"")),d.push(fe),S.push(Te),b.push(ke),N.push(fe),N.push(Te),N.push(ke);d.sort(i),S.sort(i),b.sort(i),N.sort(i),this._weekdaysRegex=new RegExp("^("+N.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+b.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function kl(){return this.hours()%12||12}function lk(){return this.hours()||24}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,kl),V("k",["kk",2],0,lk),V("hmm",0,0,function(){return""+kl.apply(this)+H(this.minutes(),2)}),V("hmmss",0,0,function(){return""+kl.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+H(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+H(this.minutes(),2)+H(this.seconds(),2)});function Zf(i,d){V(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}Zf("a",!0),Zf("A",!1);function Xf(i,d){return d._meridiemParse}me("a",Xf),me("A",Xf),me("H",Ie,et),me("h",Ie,ye),me("k",Ie,ye),me("HH",Ie,Ee),me("hh",Ie,Ee),me("kk",Ie,Ee),me("hmm",ce),me("hmmss",De),me("Hmm",ce),me("Hmmss",De),$e(["H","HH"],ot),$e(["k","kk"],function(i,d,S){var b=Ce(i);d[ot]=b===24?0:b}),$e(["a","A"],function(i,d,S){S._isPm=S._locale.isPM(i),S._meridiem=i}),$e(["h","hh"],function(i,d,S){d[ot]=Ce(i),T(S).bigHour=!0}),$e("hmm",function(i,d,S){var b=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Yt]=Ce(i.substr(b)),T(S).bigHour=!0}),$e("hmmss",function(i,d,S){var b=i.length-4,N=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Yt]=Ce(i.substr(b,2)),d[cn]=Ce(i.substr(N)),T(S).bigHour=!0}),$e("Hmm",function(i,d,S){var b=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Yt]=Ce(i.substr(b))}),$e("Hmmss",function(i,d,S){var b=i.length-4,N=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Yt]=Ce(i.substr(b,2)),d[cn]=Ce(i.substr(N))});function ck(i){return(i+"").toLowerCase().charAt(0)==="p"}var dk=/[ap]\.?m?\.?/i,pk=Nr("Hours",!0);function uk(i,d,S){return i>11?S?"pm":"PM":S?"am":"AM"}var Qf={calendar:j,longDateFormat:pe,invalidDate:se,ordinal:Pe,dayOfMonthOrdinalParse:pt,relativeTime:nt,months:kN,monthsShort:Gf,week:VN,weekdays:UN,weekdaysMin:zN,weekdaysShort:Jf,meridiemParse:dk},je={},go={},bo;function mk(i,d){var S,b=Math.min(i.length,d.length);for(S=0;S<b;S+=1)if(i[S]!==d[S])return S;return b}function eh(i){return i&&i.toLowerCase().replace("_","-")}function fk(i){for(var d=0,S,b,N,A;d<i.length;){for(A=eh(i[d]).split("-"),S=A.length,b=eh(i[d+1]),b=b?b.split("-"):null;S>0;){if(N=Ea(A.slice(0,S).join("-")),N)return N;if(b&&b.length>=S&&mk(A,b)>=S-1)break;S--}d++}return bo}function hk(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Ea(i){var d=null,S;if(je[i]===void 0&&e&&e.exports&&hk(i))try{d=bo._abbr,S=Qt,S("./locale/"+i),On(d)}catch{je[i]=null}return je[i]}function On(i,d){var S;return i&&(f(d)?S=pn(i):S=Il(i,d),S?bo=S:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),bo._abbr}function Il(i,d){if(d!==null){var S,b=Qf;if(d.abbr=i,je[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=je[i]._config;else if(d.parentLocale!=null)if(je[d.parentLocale]!=null)b=je[d.parentLocale]._config;else if(S=Ea(d.parentLocale),S!=null)b=S._config;else return go[d.parentLocale]||(go[d.parentLocale]=[]),go[d.parentLocale].push({name:i,config:d}),null;return je[i]=new ee(B(b,d)),go[i]&&go[i].forEach(function(N){Il(N.name,N.config)}),On(i),je[i]}else return delete je[i],null}function Sk(i,d){if(d!=null){var S,b,N=Qf;je[i]!=null&&je[i].parentLocale!=null?je[i].set(B(je[i]._config,d)):(b=Ea(i),b!=null&&(N=b._config),d=B(N,d),b==null&&(d.abbr=i),S=new ee(d),S.parentLocale=je[i],je[i]=S),On(i)}else je[i]!=null&&(je[i].parentLocale!=null?(je[i]=je[i].parentLocale,i===On()&&On(i)):je[i]!=null&&delete je[i]);return je[i]}function pn(i){var d;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return bo;if(!s(i)){if(d=Ea(i),d)return d;i=[i]}return fk(i)}function gk(){return W(je)}function xl(i){var d,S=i._a;return S&&T(i).overflow===-2&&(d=S[ln]<0||S[ln]>11?ln:S[en]<1||S[en]>Cl(S[mt],S[ln])?en:S[ot]<0||S[ot]>24||S[ot]===24&&(S[Yt]!==0||S[cn]!==0||S[tr]!==0)?ot:S[Yt]<0||S[Yt]>59?Yt:S[cn]<0||S[cn]>59?cn:S[tr]<0||S[tr]>999?tr:-1,T(i)._overflowDayOfYear&&(d<mt||d>en)&&(d=en),T(i)._overflowWeeks&&d===-1&&(d=TN),T(i)._overflowWeekday&&d===-1&&(d=EN),T(i).overflow=d),i}var 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=/^\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)?)?$/,yk=/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]],Ml=[["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/]],Tk=/^\/?Date\((-?\d+)/i,Ek=/^(?:(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}))$/,wk={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 th(i){var d,S,b=i._i,N=bk.exec(b)||vk.exec(b),A,Q,fe,Te,ke=wa.length,Tt=Ml.length;if(N){for(T(i).iso=!0,d=0,S=ke;d<S;d++)if(wa[d][1].exec(N[1])){Q=wa[d][0],A=wa[d][2]!==!1;break}if(Q==null){i._isValid=!1;return}if(N[3]){for(d=0,S=Tt;d<S;d++)if(Ml[d][1].exec(N[3])){fe=(N[2]||" ")+Ml[d][0];break}if(fe==null){i._isValid=!1;return}}if(!A&&fe!=null){i._isValid=!1;return}if(N[4])if(yk.exec(N[4]))Te="Z";else{i._isValid=!1;return}i._f=Q+(fe||"")+(Te||""),Ll(i)}else i._isValid=!1}function Ck(i,d,S,b,N,A){var Q=[Dk(i),Gf.indexOf(d),parseInt(S,10),parseInt(b,10),parseInt(N,10)];return A&&Q.push(parseInt(A,10)),Q}function Dk(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function Nk(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function kk(i,d,S){if(i){var b=Jf.indexOf(i),N=new Date(d[0],d[1],d[2]).getDay();if(b!==N)return T(S).weekdayMismatch=!0,S._isValid=!1,!1}return!0}function Ik(i,d,S){if(i)return wk[i];if(d)return 0;var b=parseInt(S,10),N=b%100,A=(b-N)/100;return A*60+N}function nh(i){var d=Ek.exec(Nk(i._i)),S;if(d){if(S=Ck(d[4],d[3],d[2],d[5],d[6],d[7]),!kk(d[1],S,i))return;i._a=S,i._tzm=Ik(d[8],d[9],d[10]),i._d=ho.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),T(i).rfc2822=!0}else i._isValid=!1}function xk(i){var d=Tk.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(th(i),i._isValid===!1)delete i._isValid;else return;if(nh(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 kr(i,d,S){return i??d??S}function Mk(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function _l(i){var d,S,b=[],N,A,Q;if(!i._d){for(N=Mk(i),i._w&&i._a[en]==null&&i._a[ln]==null&&_k(i),i._dayOfYear!=null&&(Q=kr(i._a[mt],N[mt]),(i._dayOfYear>mo(Q)||i._dayOfYear===0)&&(T(i)._overflowDayOfYear=!0),S=ho(Q,0,i._dayOfYear),i._a[ln]=S.getUTCMonth(),i._a[en]=S.getUTCDate()),d=0;d<3&&i._a[d]==null;++d)i._a[d]=b[d]=N[d];for(;d<7;d++)i._a[d]=b[d]=i._a[d]==null?d===2?1:0:i._a[d];i._a[ot]===24&&i._a[Yt]===0&&i._a[cn]===0&&i._a[tr]===0&&(i._nextDay=!0,i._a[ot]=0),i._d=(i._useUTC?ho:AN).apply(null,b),A=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ot]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==A&&(T(i).weekdayMismatch=!0)}}function _k(i){var d,S,b,N,A,Q,fe,Te,ke;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(A=1,Q=4,S=kr(d.GG,i._a[mt],So(Ue(),1,4).year),b=kr(d.W,1),N=kr(d.E,1),(N<1||N>7)&&(Te=!0)):(A=i._locale._week.dow,Q=i._locale._week.doy,ke=So(Ue(),A,Q),S=kr(d.gg,i._a[mt],ke.year),b=kr(d.w,ke.week),d.d!=null?(N=d.d,(N<0||N>6)&&(Te=!0)):d.e!=null?(N=d.e+A,(d.e<0||d.e>6)&&(Te=!0)):N=A),b<1||b>dn(S,A,Q)?T(i)._overflowWeeks=!0:Te!=null?T(i)._overflowWeekday=!0:(fe=qf(S,b,N,A,Q),i._a[mt]=fe.year,i._dayOfYear=fe.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Ll(i){if(i._f===r.ISO_8601){th(i);return}if(i._f===r.RFC_2822){nh(i);return}i._a=[],T(i).empty=!0;var d=""+i._i,S,b,N,A,Q,fe=d.length,Te=0,ke,Tt;for(N=de(i._f,i._locale).match(J)||[],Tt=N.length,S=0;S<Tt;S++)A=N[S],b=(d.match(El(A,i))||[])[0],b&&(Q=d.substr(0,d.indexOf(b)),Q.length>0&&T(i).unusedInput.push(Q),d=d.slice(d.indexOf(b)+b.length),Te+=b.length),q[A]?(b?T(i).empty=!1:T(i).unusedTokens.push(A),yN(A,b,i)):i._strict&&!b&&T(i).unusedTokens.push(A);T(i).charsLeftOver=fe-Te,d.length>0&&T(i).unusedInput.push(d),i._a[ot]<=12&&T(i).bigHour===!0&&i._a[ot]>0&&(T(i).bigHour=void 0),T(i).parsedDateParts=i._a.slice(0),T(i).meridiem=i._meridiem,i._a[ot]=Lk(i._locale,i._a[ot],i._meridiem),ke=T(i).era,ke!==null&&(i._a[mt]=i._locale.erasConvertYear(ke,i._a[mt])),_l(i),xl(i)}function Lk(i,d,S){var b;return S==null?d:i.meridiemHour!=null?i.meridiemHour(d,S):(i.isPM!=null&&(b=i.isPM(S),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function Ok(i){var d,S,b,N,A,Q,fe=!1,Te=i._f.length;if(Te===0){T(i).invalidFormat=!0,i._d=new Date(NaN);return}for(N=0;N<Te;N++)A=0,Q=!1,d=F({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[N],Ll(d),D(d)&&(Q=!0),A+=T(d).charsLeftOver,A+=T(d).unusedTokens.length*10,T(d).score=A,fe?A<b&&(b=A,S=d):(b==null||A<b||Q)&&(b=A,S=d,Q&&(fe=!0));g(i,S||d)}function Rk(i){if(!i._d){var d=ge(i._i),S=d.day===void 0?d.date:d.day;i._a=h([d.year,d.month,S,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),_l(i)}}function Bk(i){var d=new P(xl(rh(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function rh(i){var d=i._i,S=i._f;return i._locale=i._locale||pn(i._l),d===null||S===void 0&&d===""?M({nullInput:!0}):(typeof d=="string"&&(i._i=d=i._locale.preparse(d)),C(d)?new P(xl(d)):(u(d)?i._d=d:s(S)?Ok(i):S?Ll(i):Pk(i),D(i)||(i._d=null),i))}function Pk(i){var d=i._i;f(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?xk(i):s(d)?(i._a=h(d.slice(0),function(S){return parseInt(S,10)}),_l(i)):l(d)?Rk(i):m(d)?i._d=new Date(d):r.createFromInputFallback(i)}function oh(i,d,S,b,N){var A={};return(d===!0||d===!1)&&(b=d,d=void 0),(S===!0||S===!1)&&(b=S,S=void 0),(l(i)&&p(i)||s(i)&&i.length===0)&&(i=void 0),A._isAMomentObject=!0,A._useUTC=A._isUTC=N,A._l=S,A._i=i,A._f=d,A._strict=b,Bk(A)}function Ue(i,d,S,b){return oh(i,d,S,b,!1)}var Ak=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ue.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:M()}),Fk=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ue.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:M()});function ah(i,d){var S,b;if(d.length===1&&s(d[0])&&(d=d[0]),!d.length)return Ue();for(S=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][i](S))&&(S=d[b]);return S}function Vk(){var i=[].slice.call(arguments,0);return ah("isBefore",i)}function $k(){var i=[].slice.call(arguments,0);return ah("isAfter",i)}var Kk=function(){return Date.now?Date.now():+new Date},vo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Hk(i){var d,S=!1,b,N=vo.length;for(d in i)if(c(i,d)&&!(Je.call(vo,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<N;++b)if(i[vo[b]]){if(S)return!1;parseFloat(i[vo[b]])!==Ce(i[vo[b]])&&(S=!0)}return!0}function Wk(){return this._isValid}function Gk(){return Ut(NaN)}function Ca(i){var d=ge(i),S=d.year||0,b=d.quarter||0,N=d.month||0,A=d.week||d.isoWeek||0,Q=d.day||0,fe=d.hour||0,Te=d.minute||0,ke=d.second||0,Tt=d.millisecond||0;this._isValid=Hk(d),this._milliseconds=+Tt+ke*1e3+Te*6e4+fe*1e3*60*60,this._days=+Q+A*7,this._months=+N+b*3+S*12,this._data={},this._locale=pn(),this._bubble()}function Da(i){return i instanceof Ca}function Ol(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function Yk(i,d,S){var b=Math.min(i.length,d.length),N=Math.abs(i.length-d.length),A=0,Q;for(Q=0;Q<b;Q++)Ce(i[Q])!==Ce(d[Q])&&A++;return A+N}function sh(i,d){V(i,0,0,function(){var S=this.utcOffset(),b="+";return S<0&&(S=-S,b="-"),b+H(~~(S/60),2)+d+H(~~S%60,2)})}sh("Z",":"),sh("ZZ",""),me("Z",ut),me("ZZ",ut),$e(["Z","ZZ"],function(i,d,S){S._useUTC=!0,S._tzm=Rl(ut,i)});var Uk=/([\+\-]|\d\d)/gi;function Rl(i,d){var S=(d||"").match(i),b,N,A;return S===null?null:(b=S[S.length-1]||[],N=(b+"").match(Uk)||["-",0,0],A=+(N[1]*60)+Ce(N[2]),A===0?0:N[0]==="+"?A:-A)}function Bl(i,d){var S,b;return d._isUTC?(S=d.clone(),b=(C(i)||u(i)?i.valueOf():Ue(i).valueOf())-S.valueOf(),S._d.setTime(S._d.valueOf()+b),r.updateOffset(S,!1),S):Ue(i).local()}function Pl(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function zk(i,d,S){var b=this._offset||0,N;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Rl(ut,i),i===null)return this}else Math.abs(i)<16&&!S&&(i=i*60);return!this._isUTC&&d&&(N=Pl(this)),this._offset=i,this._isUTC=!0,N!=null&&this.add(N,"m"),b!==i&&(!d||this._changeInProgress?dh(this,Ut(i-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Pl(this)}function jk(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function qk(i){return this.utcOffset(0,i)}function Jk(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Pl(this),"m")),this}function Zk(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Rl(Ge,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function Xk(i){return this.isValid()?(i=i?Ue(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function Qk(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function eI(){if(!f(this._isDSTShifted))return this._isDSTShifted;var i={},d;return F(i,this),i=rh(i),i._a?(d=i._isUTC?y(i._a):Ue(i._a),this._isDSTShifted=this.isValid()&&Yk(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function tI(){return this.isValid()?!this._isUTC:!1}function nI(){return this.isValid()?this._isUTC:!1}function ih(){return this.isValid()?this._isUTC&&this._offset===0:!1}var rI=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,oI=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ut(i,d){var S=i,b=null,N,A,Q;return Da(i)?S={ms:i._milliseconds,d:i._days,M:i._months}:m(i)||!isNaN(+i)?(S={},d?S[d]=+i:S.milliseconds=+i):(b=rI.exec(i))?(N=b[1]==="-"?-1:1,S={y:0,d:Ce(b[en])*N,h:Ce(b[ot])*N,m:Ce(b[Yt])*N,s:Ce(b[cn])*N,ms:Ce(Ol(b[tr]*1e3))*N}):(b=oI.exec(i))?(N=b[1]==="-"?-1:1,S={y:nr(b[2],N),M:nr(b[3],N),w:nr(b[4],N),d:nr(b[5],N),h:nr(b[6],N),m:nr(b[7],N),s:nr(b[8],N)}):S==null?S={}:typeof S=="object"&&("from"in S||"to"in S)&&(Q=aI(Ue(S.from),Ue(S.to)),S={},S.ms=Q.milliseconds,S.M=Q.months),A=new Ca(S),Da(i)&&c(i,"_locale")&&(A._locale=i._locale),Da(i)&&c(i,"_isValid")&&(A._isValid=i._isValid),A}Ut.fn=Ca.prototype,Ut.invalid=Gk;function nr(i,d){var S=i&&parseFloat(i.replace(",","."));return(isNaN(S)?0:S)*d}function lh(i,d){var S={};return S.months=d.month()-i.month()+(d.year()-i.year())*12,i.clone().add(S.months,"M").isAfter(d)&&--S.months,S.milliseconds=+d-+i.clone().add(S.months,"M"),S}function aI(i,d){var S;return i.isValid()&&d.isValid()?(d=Bl(d,i),i.isBefore(d)?S=lh(i,d):(S=lh(d,i),S.milliseconds=-S.milliseconds,S.months=-S.months),S):{milliseconds:0,months:0}}function ch(i,d){return function(S,b){var N,A;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."),A=S,S=b,b=A),N=Ut(S,b),dh(this,N,i),this}}function dh(i,d,S,b){var N=d._milliseconds,A=Ol(d._days),Q=Ol(d._months);i.isValid()&&(b=b??!0,Q&&Uf(i,fo(i,"Month")+Q*S),A&&Wf(i,"Date",fo(i,"Date")+A*S),N&&i._d.setTime(i._d.valueOf()+N*S),b&&r.updateOffset(i,A||Q))}var sI=ch(1,"add"),iI=ch(-1,"subtract");function ph(i){return typeof i=="string"||i instanceof String}function lI(i){return C(i)||u(i)||ph(i)||m(i)||dI(i)||cI(i)||i===null||i===void 0}function cI(i){var d=l(i)&&!p(i),S=!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"],N,A,Q=b.length;for(N=0;N<Q;N+=1)A=b[N],S=S||c(i,A);return d&&S}function dI(i){var d=s(i),S=!1;return d&&(S=i.filter(function(b){return!m(b)&&ph(i)}).length===0),d&&S}function pI(i){var d=l(i)&&!p(i),S=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],N,A;for(N=0;N<b.length;N+=1)A=b[N],S=S||c(i,A);return d&&S}function uI(i,d){var S=i.diff(d,"days",!0);return S<-6?"sameElse":S<-1?"lastWeek":S<0?"lastDay":S<1?"sameDay":S<2?"nextDay":S<7?"nextWeek":"sameElse"}function mI(i,d){arguments.length===1&&(arguments[0]?lI(arguments[0])?(i=arguments[0],d=void 0):pI(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var S=i||Ue(),b=Bl(S,this).startOf("day"),N=r.calendarFormat(this,b)||"sameElse",A=d&&(L(d[N])?d[N].call(this,S):d[N]);return this.format(A||this.localeData().calendar(N,this,Ue(S)))}function fI(){return new P(this)}function hI(i,d){var S=C(i)?i:Ue(i);return this.isValid()&&S.isValid()?(d=He(d)||"millisecond",d==="millisecond"?this.valueOf()>S.valueOf():S.valueOf()<this.clone().startOf(d).valueOf()):!1}function SI(i,d){var S=C(i)?i:Ue(i);return this.isValid()&&S.isValid()?(d=He(d)||"millisecond",d==="millisecond"?this.valueOf()<S.valueOf():this.clone().endOf(d).valueOf()<S.valueOf()):!1}function gI(i,d,S,b){var N=C(i)?i:Ue(i),A=C(d)?d:Ue(d);return this.isValid()&&N.isValid()&&A.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(N,S):!this.isBefore(N,S))&&(b[1]===")"?this.isBefore(A,S):!this.isAfter(A,S))):!1}function bI(i,d){var S=C(i)?i:Ue(i),b;return this.isValid()&&S.isValid()?(d=He(d)||"millisecond",d==="millisecond"?this.valueOf()===S.valueOf():(b=S.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function vI(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function yI(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function TI(i,d,S){var b,N,A;if(!this.isValid())return NaN;if(b=Bl(i,this),!b.isValid())return NaN;switch(N=(b.utcOffset()-this.utcOffset())*6e4,d=He(d),d){case"year":A=Na(this,b)/12;break;case"month":A=Na(this,b);break;case"quarter":A=Na(this,b)/3;break;case"second":A=(this-b)/1e3;break;case"minute":A=(this-b)/6e4;break;case"hour":A=(this-b)/36e5;break;case"day":A=(this-b-N)/864e5;break;case"week":A=(this-b-N)/6048e5;break;default:A=this-b}return S?A:Vt(A)}function Na(i,d){if(i.date()<d.date())return-Na(d,i);var S=(d.year()-i.year())*12+(d.month()-i.month()),b=i.clone().add(S,"months"),N,A;return d-b<0?(N=i.clone().add(S-1,"months"),A=(d-b)/(b-N)):(N=i.clone().add(S+1,"months"),A=(d-b)/(N-b)),-(S+A)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function EI(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function wI(i){if(!this.isValid())return null;var d=i!==!0,S=d?this.clone().utc():this;return S.year()<0||S.year()>9999?te(S,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",te(S,"Z")):te(S,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function CI(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",d="",S,b,N,A;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),S="["+i+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",N="-MM-DD[T]HH:mm:ss.SSS",A=d+'[")]',this.format(S+b+N+A)}function DI(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=te(this,i);return this.localeData().postformat(d)}function NI(i,d){return this.isValid()&&(C(i)&&i.isValid()||Ue(i).isValid())?Ut({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function kI(i){return this.from(Ue(),i)}function II(i,d){return this.isValid()&&(C(i)&&i.isValid()||Ue(i).isValid())?Ut({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function xI(i){return this.to(Ue(),i)}function uh(i){var d;return i===void 0?this._locale._abbr:(d=pn(i),d!=null&&(this._locale=d),this)}var mh=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 fh(){return this._locale}var ka=1e3,Ir=60*ka,Ia=60*Ir,hh=(365*400+97)*24*Ia;function xr(i,d){return(i%d+d)%d}function Sh(i,d,S){return i<100&&i>=0?new Date(i+400,d,S)-hh:new Date(i,d,S).valueOf()}function gh(i,d,S){return i<100&&i>=0?Date.UTC(i+400,d,S)-hh:Date.UTC(i,d,S)}function MI(i){var d,S;if(i=He(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(S=this._isUTC?gh:Sh,i){case"year":d=S(this.year(),0,1);break;case"quarter":d=S(this.year(),this.month()-this.month()%3,1);break;case"month":d=S(this.year(),this.month(),1);break;case"week":d=S(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=S(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=S(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=xr(d+(this._isUTC?0:this.utcOffset()*Ir),Ia);break;case"minute":d=this._d.valueOf(),d-=xr(d,Ir);break;case"second":d=this._d.valueOf(),d-=xr(d,ka);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function _I(i){var d,S;if(i=He(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(S=this._isUTC?gh:Sh,i){case"year":d=S(this.year()+1,0,1)-1;break;case"quarter":d=S(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=S(this.year(),this.month()+1,1)-1;break;case"week":d=S(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=S(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=S(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=Ia-xr(d+(this._isUTC?0:this.utcOffset()*Ir),Ia)-1;break;case"minute":d=this._d.valueOf(),d+=Ir-xr(d,Ir)-1;break;case"second":d=this._d.valueOf(),d+=ka-xr(d,ka)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function LI(){return this._d.valueOf()-(this._offset||0)*6e4}function OI(){return Math.floor(this.valueOf()/1e3)}function RI(){return new Date(this.valueOf())}function BI(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function PI(){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 AI(){return this.isValid()?this.toISOString():null}function FI(){return D(this)}function VI(){return g({},T(this))}function $I(){return T(this).overflow}function KI(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),me("N",Al),me("NN",Al),me("NNN",Al),me("NNNN",XI),me("NNNNN",QI),$e(["N","NN","NNN","NNNN","NNNNN"],function(i,d,S,b){var N=S._locale.erasParse(i,b,S._strict);N?T(S).era=N:T(S).invalidEra=i}),me("y",ct),me("yy",ct),me("yyy",ct),me("yyyy",ct),me("yo",ex),$e(["y","yy","yyy","yyyy"],mt),$e(["yo"],function(i,d,S,b){var N;S._locale._eraYearOrdinalRegex&&(N=i.match(S._locale._eraYearOrdinalRegex)),S._locale.eraYearOrdinalParse?d[mt]=S._locale.eraYearOrdinalParse(i,N):d[mt]=parseInt(i,10)});function HI(i,d){var S,b,N,A=this._eras||pn("en")._eras;for(S=0,b=A.length;S<b;++S){switch(typeof A[S].since){case"string":N=r(A[S].since).startOf("day"),A[S].since=N.valueOf();break}switch(typeof A[S].until){case"undefined":A[S].until=1/0;break;case"string":N=r(A[S].until).startOf("day").valueOf(),A[S].until=N.valueOf();break}}return A}function WI(i,d,S){var b,N,A=this.eras(),Q,fe,Te;for(i=i.toUpperCase(),b=0,N=A.length;b<N;++b)if(Q=A[b].name.toUpperCase(),fe=A[b].abbr.toUpperCase(),Te=A[b].narrow.toUpperCase(),S)switch(d){case"N":case"NN":case"NNN":if(fe===i)return A[b];break;case"NNNN":if(Q===i)return A[b];break;case"NNNNN":if(Te===i)return A[b];break}else if([Q,fe,Te].indexOf(i)>=0)return A[b]}function GI(i,d){var S=i.since<=i.until?1:-1;return d===void 0?r(i.since).year():r(i.since).year()+(d-i.offset)*S}function YI(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].name;return""}function UI(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].narrow;return""}function zI(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].abbr;return""}function jI(){var i,d,S,b,N=this.localeData().eras();for(i=0,d=N.length;i<d;++i)if(S=N[i].since<=N[i].until?1:-1,b=this.clone().startOf("day").valueOf(),N[i].since<=b&&b<=N[i].until||N[i].until<=b&&b<=N[i].since)return(this.year()-r(N[i].since).year())*S+N[i].offset;return this.year()}function qI(i){return c(this,"_erasNameRegex")||Fl.call(this),i?this._erasNameRegex:this._erasRegex}function JI(i){return c(this,"_erasAbbrRegex")||Fl.call(this),i?this._erasAbbrRegex:this._erasRegex}function ZI(i){return c(this,"_erasNarrowRegex")||Fl.call(this),i?this._erasNarrowRegex:this._erasRegex}function Al(i,d){return d.erasAbbrRegex(i)}function XI(i,d){return d.erasNameRegex(i)}function QI(i,d){return d.erasNarrowRegex(i)}function ex(i,d){return d._eraYearOrdinalRegex||ct}function Fl(){var i=[],d=[],S=[],b=[],N,A,Q,fe,Te,ke=this.eras();for(N=0,A=ke.length;N<A;++N)Q=sn(ke[N].name),fe=sn(ke[N].abbr),Te=sn(ke[N].narrow),d.push(Q),i.push(fe),S.push(Te),b.push(Q),b.push(fe),b.push(Te);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("^("+S.join("|")+")","i")}V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xa(i,d){V(0,[i,i.length],0,d)}xa("gggg","weekYear"),xa("ggggg","weekYear"),xa("GGGG","isoWeekYear"),xa("GGGGG","isoWeekYear"),me("G",yt),me("g",yt),me("GG",Ie,Ee),me("gg",Ie,Ee),me("GGGG",Qe,_n),me("gggg",Qe,_n),me("GGGGG",Le,At),me("ggggg",Le,At),uo(["gggg","ggggg","GGGG","GGGGG"],function(i,d,S,b){d[b.substr(0,2)]=Ce(i)}),uo(["gg","GG"],function(i,d,S,b){d[b]=r.parseTwoDigitYear(i)});function tx(i){return bh.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function nx(i){return bh.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function rx(){return dn(this.year(),1,4)}function ox(){return dn(this.isoWeekYear(),1,4)}function ax(){var i=this.localeData()._week;return dn(this.year(),i.dow,i.doy)}function sx(){var i=this.localeData()._week;return dn(this.weekYear(),i.dow,i.doy)}function bh(i,d,S,b,N){var A;return i==null?So(this,b,N).year:(A=dn(i,b,N),d>A&&(d=A),ix.call(this,i,d,S,b,N))}function ix(i,d,S,b,N){var A=qf(i,d,S,b,N),Q=ho(A.year,0,A.dayOfYear);return this.year(Q.getUTCFullYear()),this.month(Q.getUTCMonth()),this.date(Q.getUTCDate()),this}V("Q",0,"Qo","quarter"),me("Q",qe),$e("Q",function(i,d){d[ln]=(Ce(i)-1)*3});function lx(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}V("D",["DD",2],"Do","date"),me("D",Ie,ye),me("DD",Ie,Ee),me("Do",function(i,d){return i?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),$e(["D","DD"],en),$e("Do",function(i,d){d[en]=Ce(i.match(Ie)[0])});var vh=Nr("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),me("DDD",Ne),me("DDDD",vt),$e(["DDD","DDDD"],function(i,d,S){S._dayOfYear=Ce(i)});function cx(i){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?d:this.add(i-d,"d")}V("m",["mm",2],0,"minute"),me("m",Ie,et),me("mm",Ie,Ee),$e(["m","mm"],Yt);var dx=Nr("Minutes",!1);V("s",["ss",2],0,"second"),me("s",Ie,et),me("ss",Ie,Ee),$e(["s","ss"],cn);var px=Nr("Seconds",!1);V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return this.millisecond()*10}),V(0,["SSSSS",5],0,function(){return this.millisecond()*100}),V(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),V(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),V(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),V(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),me("S",Ne,qe),me("SS",Ne,Ee),me("SSS",Ne,vt);var Rn,yh;for(Rn="SSSS";Rn.length<=9;Rn+="S")me(Rn,ct);function ux(i,d){d[tr]=Ce(("0."+i)*1e3)}for(Rn="S";Rn.length<=9;Rn+="S")$e(Rn,ux);yh=Nr("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");function mx(){return this._isUTC?"UTC":""}function fx(){return this._isUTC?"Coordinated Universal Time":""}var le=P.prototype;le.add=sI,le.calendar=mI,le.clone=fI,le.diff=TI,le.endOf=_I,le.format=DI,le.from=NI,le.fromNow=kI,le.to=II,le.toNow=xI,le.get=CN,le.invalidAt=$I,le.isAfter=hI,le.isBefore=SI,le.isBetween=gI,le.isSame=bI,le.isSameOrAfter=vI,le.isSameOrBefore=yI,le.isValid=FI,le.lang=mh,le.locale=uh,le.localeData=fh,le.max=Fk,le.min=Ak,le.parsingFlags=VI,le.set=DN,le.startOf=MI,le.subtract=iI,le.toArray=BI,le.toObject=PI,le.toDate=RI,le.toISOString=wI,le.inspect=CI,typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),le.toJSON=AI,le.toString=EI,le.unix=OI,le.valueOf=LI,le.creationData=KI,le.eraName=YI,le.eraNarrow=UI,le.eraAbbr=zI,le.eraYear=jI,le.year=Hf,le.isLeapYear=wN,le.weekYear=tx,le.isoWeekYear=nx,le.quarter=le.quarters=lx,le.month=zf,le.daysInMonth=RN,le.week=le.weeks=HN,le.isoWeek=le.isoWeeks=WN,le.weeksInYear=ax,le.weeksInWeekYear=sx,le.isoWeeksInYear=rx,le.isoWeeksInISOWeekYear=ox,le.date=vh,le.day=le.days=nk,le.weekday=rk,le.isoWeekday=ok,le.dayOfYear=cx,le.hour=le.hours=pk,le.minute=le.minutes=dx,le.second=le.seconds=px,le.millisecond=le.milliseconds=yh,le.utcOffset=zk,le.utc=qk,le.local=Jk,le.parseZone=Zk,le.hasAlignedHourOffset=Xk,le.isDST=Qk,le.isLocal=tI,le.isUtcOffset=nI,le.isUtc=ih,le.isUTC=ih,le.zoneAbbr=mx,le.zoneName=fx,le.dates=O("dates accessor is deprecated. Use date instead.",vh),le.months=O("months accessor is deprecated. Use month instead",zf),le.years=O("years accessor is deprecated. Use year instead",Hf),le.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",jk),le.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",eI);function hx(i){return Ue(i*1e3)}function Sx(){return Ue.apply(null,arguments).parseZone()}function Th(i){return i}var Oe=ee.prototype;Oe.calendar=re,Oe.longDateFormat=X,Oe.invalidDate=we,Oe.ordinal=bt,Oe.preparse=Th,Oe.postformat=Th,Oe.relativeTime=rt,Oe.pastFuture=Pt,Oe.set=oe,Oe.eras=HI,Oe.erasParse=WI,Oe.erasConvertYear=GI,Oe.erasAbbrRegex=JI,Oe.erasNameRegex=qI,Oe.erasNarrowRegex=ZI,Oe.months=MN,Oe.monthsShort=_N,Oe.monthsParse=ON,Oe.monthsRegex=PN,Oe.monthsShortRegex=BN,Oe.week=FN,Oe.firstDayOfYear=KN,Oe.firstDayOfWeek=$N,Oe.weekdays=ZN,Oe.weekdaysMin=QN,Oe.weekdaysShort=XN,Oe.weekdaysParse=tk,Oe.weekdaysRegex=ak,Oe.weekdaysShortRegex=sk,Oe.weekdaysMinRegex=ik,Oe.isPM=ck,Oe.meridiem=uk;function Ma(i,d,S,b){var N=pn(),A=y().set(b,d);return N[S](A,i)}function Eh(i,d,S){if(m(i)&&(d=i,i=void 0),i=i||"",d!=null)return Ma(i,d,S,"month");var b,N=[];for(b=0;b<12;b++)N[b]=Ma(i,b,S,"month");return N}function Vl(i,d,S,b){typeof i=="boolean"?(m(d)&&(S=d,d=void 0),d=d||""):(d=i,S=d,i=!1,m(d)&&(S=d,d=void 0),d=d||"");var N=pn(),A=i?N._week.dow:0,Q,fe=[];if(S!=null)return Ma(d,(S+A)%7,b,"day");for(Q=0;Q<7;Q++)fe[Q]=Ma(d,(Q+A)%7,b,"day");return fe}function gx(i,d){return Eh(i,d,"months")}function bx(i,d){return Eh(i,d,"monthsShort")}function vx(i,d,S){return Vl(i,d,S,"weekdays")}function yx(i,d,S){return Vl(i,d,S,"weekdaysShort")}function Tx(i,d,S){return Vl(i,d,S,"weekdaysMin")}On("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,S=Ce(i%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return i+S}}),r.lang=O("moment.lang is deprecated. Use moment.locale instead.",On),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",pn);var un=Math.abs;function Ex(){var i=this._data;return this._milliseconds=un(this._milliseconds),this._days=un(this._days),this._months=un(this._months),i.milliseconds=un(i.milliseconds),i.seconds=un(i.seconds),i.minutes=un(i.minutes),i.hours=un(i.hours),i.months=un(i.months),i.years=un(i.years),this}function wh(i,d,S,b){var N=Ut(d,S);return i._milliseconds+=b*N._milliseconds,i._days+=b*N._days,i._months+=b*N._months,i._bubble()}function wx(i,d){return wh(this,i,d,1)}function Cx(i,d){return wh(this,i,d,-1)}function Ch(i){return i<0?Math.floor(i):Math.ceil(i)}function Dx(){var i=this._milliseconds,d=this._days,S=this._months,b=this._data,N,A,Q,fe,Te;return i>=0&&d>=0&&S>=0||i<=0&&d<=0&&S<=0||(i+=Ch($l(S)+d)*864e5,d=0,S=0),b.milliseconds=i%1e3,N=Vt(i/1e3),b.seconds=N%60,A=Vt(N/60),b.minutes=A%60,Q=Vt(A/60),b.hours=Q%24,d+=Vt(Q/24),Te=Vt(Dh(d)),S+=Te,d-=Ch($l(Te)),fe=Vt(S/12),S%=12,b.days=d,b.months=S,b.years=fe,this}function Dh(i){return i*4800/146097}function $l(i){return i*146097/4800}function Nx(i){if(!this.isValid())return NaN;var d,S,b=this._milliseconds;if(i=He(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,S=this._months+Dh(d),i){case"month":return S;case"quarter":return S/3;case"year":return S/12}else switch(d=this._days+Math.round($l(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 mn(i){return function(){return this.as(i)}}var Nh=mn("ms"),kx=mn("s"),Ix=mn("m"),xx=mn("h"),Mx=mn("d"),_x=mn("w"),Lx=mn("M"),Ox=mn("Q"),Rx=mn("y"),Bx=Nh;function Px(){return Ut(this)}function Ax(i){return i=He(i),this.isValid()?this[i+"s"]():NaN}function rr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Fx=rr("milliseconds"),Vx=rr("seconds"),$x=rr("minutes"),Kx=rr("hours"),Hx=rr("days"),Wx=rr("months"),Gx=rr("years");function Yx(){return Vt(this.days()/7)}var fn=Math.round,Mr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Ux(i,d,S,b,N){return N.relativeTime(d||1,!!S,i,b)}function zx(i,d,S,b){var N=Ut(i).abs(),A=fn(N.as("s")),Q=fn(N.as("m")),fe=fn(N.as("h")),Te=fn(N.as("d")),ke=fn(N.as("M")),Tt=fn(N.as("w")),hn=fn(N.as("y")),Bn=A<=S.ss&&["s",A]||A<S.s&&["ss",A]||Q<=1&&["m"]||Q<S.m&&["mm",Q]||fe<=1&&["h"]||fe<S.h&&["hh",fe]||Te<=1&&["d"]||Te<S.d&&["dd",Te];return S.w!=null&&(Bn=Bn||Tt<=1&&["w"]||Tt<S.w&&["ww",Tt]),Bn=Bn||ke<=1&&["M"]||ke<S.M&&["MM",ke]||hn<=1&&["y"]||["yy",hn],Bn[2]=d,Bn[3]=+i>0,Bn[4]=b,Ux.apply(null,Bn)}function jx(i){return i===void 0?fn:typeof i=="function"?(fn=i,!0):!1}function qx(i,d){return Mr[i]===void 0?!1:d===void 0?Mr[i]:(Mr[i]=d,i==="s"&&(Mr.ss=d-1),!0)}function Jx(i,d){if(!this.isValid())return this.localeData().invalidDate();var S=!1,b=Mr,N,A;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(S=i),typeof d=="object"&&(b=Object.assign({},Mr,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),N=this.localeData(),A=zx(this,!S,b,N),S&&(A=N.pastFuture(+this,A)),N.postformat(A)}var Kl=Math.abs;function _r(i){return(i>0)-(i<0)||+i}function _a(){if(!this.isValid())return this.localeData().invalidDate();var i=Kl(this._milliseconds)/1e3,d=Kl(this._days),S=Kl(this._months),b,N,A,Q,fe=this.asSeconds(),Te,ke,Tt,hn;return fe?(b=Vt(i/60),N=Vt(b/60),i%=60,b%=60,A=Vt(S/12),S%=12,Q=i?i.toFixed(3).replace(/\.?0+$/,""):"",Te=fe<0?"-":"",ke=_r(this._months)!==_r(fe)?"-":"",Tt=_r(this._days)!==_r(fe)?"-":"",hn=_r(this._milliseconds)!==_r(fe)?"-":"",Te+"P"+(A?ke+A+"Y":"")+(S?ke+S+"M":"")+(d?Tt+d+"D":"")+(N||b||i?"T":"")+(N?hn+N+"H":"")+(b?hn+b+"M":"")+(i?hn+Q+"S":"")):"P0D"}var xe=Ca.prototype;xe.isValid=Wk,xe.abs=Ex,xe.add=wx,xe.subtract=Cx,xe.as=Nx,xe.asMilliseconds=Nh,xe.asSeconds=kx,xe.asMinutes=Ix,xe.asHours=xx,xe.asDays=Mx,xe.asWeeks=_x,xe.asMonths=Lx,xe.asQuarters=Ox,xe.asYears=Rx,xe.valueOf=Bx,xe._bubble=Dx,xe.clone=Px,xe.get=Ax,xe.milliseconds=Fx,xe.seconds=Vx,xe.minutes=$x,xe.hours=Kx,xe.days=Hx,xe.weeks=Yx,xe.months=Wx,xe.years=Gx,xe.humanize=Jx,xe.toISOString=_a,xe.toString=_a,xe.toJSON=_a,xe.locale=uh,xe.localeData=fh,xe.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_a),xe.lang=mh,V("X",0,0,"unix"),V("x",0,0,"valueOf"),me("x",yt),me("X",Ln),$e("X",function(i,d,S){S._d=new Date(parseFloat(i)*1e3)}),$e("x",function(i,d,S){S._d=new Date(Ce(i))});//! moment.js
|
|
1977
|
+
`+new Error().stack),S=!1}return d.apply(this,arguments)},d)}var $={};function z(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),$[i]||(R(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 oe(i){var d,S;for(S in i)c(i,S)&&(d=i[S],L(d)?this[S]=d:this["_"+S]=d);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function B(i,d){var S=g({},i),b;for(b in d)c(d,b)&&(l(i[b])&&l(d[b])?(S[b]={},g(S[b],i[b]),g(S[b],d[b])):d[b]!=null?S[b]=d[b]:delete S[b]);for(b in i)c(i,b)&&!c(d,b)&&l(i[b])&&(S[b]=g({},S[b]));return S}function ee(i){i!=null&&this.set(i)}var W;Object.keys?W=Object.keys:W=function(i){var d,S=[];for(d in i)c(i,d)&&S.push(d);return S};var j={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function re(i,d,S){var b=this._calendar[i]||this._calendar.sameElse;return L(b)?b.call(d,S):b}function H(i,d,S){var b=""+Math.abs(i),N=d-b.length,A=i>=0;return(A?S?"+":"":"-")+Math.pow(10,Math.max(0,N)).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,ae=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ie={},q={};function V(i,d,S,b){var N=b;typeof b=="string"&&(N=function(){return this[b]()}),i&&(q[i]=N),d&&(q[d[0]]=function(){return H(N.apply(this,arguments),d[1],d[2])}),S&&(q[S]=function(){return this.localeData().ordinal(N.apply(this,arguments),i)})}function G(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Z(i){var d=i.match(J),S,b;for(S=0,b=d.length;S<b;S++)q[d[S]]?d[S]=q[d[S]]:d[S]=G(d[S]);return function(N){var A="",Q;for(Q=0;Q<b;Q++)A+=L(d[Q])?d[Q].call(N,i):d[Q];return A}}function te(i,d){return i.isValid()?(d=de(d,i.localeData()),ie[d]=ie[d]||Z(d),ie[d](i)):i.localeData().invalidDate()}function de(i,d){var S=5;function b(N){return d.longDateFormat(N)||N}for(ae.lastIndex=0;S>=0&&ae.test(i);)i=i.replace(ae,b),ae.lastIndex=0,S-=1;return i}var pe={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 X(i){var d=this._longDateFormat[i],S=this._longDateFormat[i.toUpperCase()];return d||!S?d:(this._longDateFormat[i]=S.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 we(){return this._invalidDate}var Pe="%d",pt=/\d{1,2}/;function bt(i){return this._ordinal.replace("%d",i)}var nt={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 rt(i,d,S,b){var N=this._relativeTime[S];return L(N)?N(i,d,S,b):N.replace(/%d/i,i)}function Pt(i,d){var S=this._relativeTime[i>0?"future":"past"];return L(S)?S(d):S.replace(/%s/i,d)}var Xe={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 He(i){return typeof i=="string"?Xe[i]||Xe[i.toLowerCase()]:void 0}function ge(i){var d={},S,b;for(b in i)c(i,b)&&(S=He(b),S&&(d[S]=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 he(i){var d=[],S;for(S in i)c(i,S)&&d.push({unit:S,priority:Ve[S]});return d.sort(function(b,N){return b.priority-N.priority}),d}var qe=/\d/,Ee=/\d\d/,vt=/\d{3}/,_n=/\d{4}/,At=/[+-]?\d{6}/,Ie=/\d\d?/,ce=/\d\d\d\d?/,De=/\d\d\d\d\d\d?/,Ne=/\d{1,3}/,Qe=/\d{1,4}/,Le=/[+-]?\d{1,6}/,lt=/\d+/,yt=/[+-]?\d+/,Ge=/Z|[+-]\d\d:?\d\d/gi,ut=/Z|[+-]\d\d(?::?\d\d)?/gi,Ln=/[+-]?\d+(\.\d{1,3})?/,Se=/[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,ye=/^[1-9]\d?/,et=/^([1-9]\d|\d)/,Ft;Ft={};function me(i,d,S){Ft[i]=L(d)?d:function(b,N){return b&&S?S:d}}function El(i,d){return c(Ft,i)?Ft[i](d._strict,d._locale):new RegExp(vN(i))}function vN(i){return sn(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,S,b,N,A){return S||b||N||A}))}function sn(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Vt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function Ce(i){var d=+i,S=0;return d!==0&&isFinite(d)&&(S=Vt(d)),S}var wl={};function $e(i,d){var S,b=d,N;for(typeof i=="string"&&(i=[i]),m(d)&&(b=function(A,Q){Q[d]=Ce(A)}),N=i.length,S=0;S<N;S++)wl[i[S]]=b}function uo(i,d){$e(i,function(S,b,N,A){N._w=N._w||{},d(S,N._w,N,A)})}function yN(i,d,S){d!=null&&c(wl,i)&&wl[i](d,S._a,S,i)}function ya(i){return i%4===0&&i%100!==0||i%400===0}var mt=0,ln=1,en=2,ot=3,Yt=4,cn=5,tr=6,TN=7,EN=8;V("Y",0,0,function(){var i=this.year();return i<=9999?H(i,4):"+"+i}),V(0,["YY",2],0,function(){return this.year()%100}),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),me("Y",yt),me("YY",Ie,Ee),me("YYYY",Qe,_n),me("YYYYY",Le,At),me("YYYYYY",Le,At),$e(["YYYYY","YYYYYY"],mt),$e("YYYY",function(i,d){d[mt]=i.length===2?r.parseTwoDigitYear(i):Ce(i)}),$e("YY",function(i,d){d[mt]=r.parseTwoDigitYear(i)}),$e("Y",function(i,d){d[mt]=parseInt(i,10)});function mo(i){return ya(i)?366:365}r.parseTwoDigitYear=function(i){return Ce(i)+(Ce(i)>68?1900:2e3)};var Hf=Nr("FullYear",!0);function wN(){return ya(this.year())}function Nr(i,d){return function(S){return S!=null?(Wf(this,i,S),r.updateOffset(this,d),this):fo(this,i)}}function fo(i,d){if(!i.isValid())return NaN;var S=i._d,b=i._isUTC;switch(d){case"Milliseconds":return b?S.getUTCMilliseconds():S.getMilliseconds();case"Seconds":return b?S.getUTCSeconds():S.getSeconds();case"Minutes":return b?S.getUTCMinutes():S.getMinutes();case"Hours":return b?S.getUTCHours():S.getHours();case"Date":return b?S.getUTCDate():S.getDate();case"Day":return b?S.getUTCDay():S.getDay();case"Month":return b?S.getUTCMonth():S.getMonth();case"FullYear":return b?S.getUTCFullYear():S.getFullYear();default:return NaN}}function Wf(i,d,S){var b,N,A,Q,fe;if(!(!i.isValid()||isNaN(S))){switch(b=i._d,N=i._isUTC,d){case"Milliseconds":return void(N?b.setUTCMilliseconds(S):b.setMilliseconds(S));case"Seconds":return void(N?b.setUTCSeconds(S):b.setSeconds(S));case"Minutes":return void(N?b.setUTCMinutes(S):b.setMinutes(S));case"Hours":return void(N?b.setUTCHours(S):b.setHours(S));case"Date":return void(N?b.setUTCDate(S):b.setDate(S));case"FullYear":break;default:return}A=S,Q=i.month(),fe=i.date(),fe=fe===29&&Q===1&&!ya(A)?28:fe,N?b.setUTCFullYear(A,Q,fe):b.setFullYear(A,Q,fe)}}function CN(i){return i=He(i),L(this[i])?this[i]():this}function DN(i,d){if(typeof i=="object"){i=ge(i);var S=he(i),b,N=S.length;for(b=0;b<N;b++)this[S[b].unit](i[S[b].unit])}else if(i=He(i),L(this[i]))return this[i](d);return this}function NN(i,d){return(i%d+d)%d}var Je;Array.prototype.indexOf?Je=Array.prototype.indexOf:Je=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function Cl(i,d){if(isNaN(i)||isNaN(d))return NaN;var S=NN(d,12);return i+=(d-S)/12,S===1?ya(i)?29:28:31-S%7%2}V("M",["MM",2],"Mo",function(){return this.month()+1}),V("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),V("MMMM",0,0,function(i){return this.localeData().months(this,i)}),me("M",Ie,ye),me("MM",Ie,Ee),me("MMM",function(i,d){return d.monthsShortRegex(i)}),me("MMMM",function(i,d){return d.monthsRegex(i)}),$e(["M","MM"],function(i,d){d[ln]=Ce(i)-1}),$e(["MMM","MMMM"],function(i,d,S,b){var N=S._locale.monthsParse(i,b,S._strict);N!=null?d[ln]=N:T(S).invalidMonth=i});var kN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Gf="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Yf=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,IN=Se,xN=Se;function MN(i,d){return i?s(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Yf).test(d)?"format":"standalone"][i.month()]:s(this._months)?this._months:this._months.standalone}function _N(i,d){return i?s(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Yf.test(d)?"format":"standalone"][i.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function LN(i,d,S){var b,N,A,Q=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)A=y([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(A,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(A,"").toLocaleLowerCase();return S?d==="MMM"?(N=Je.call(this._shortMonthsParse,Q),N!==-1?N:null):(N=Je.call(this._longMonthsParse,Q),N!==-1?N:null):d==="MMM"?(N=Je.call(this._shortMonthsParse,Q),N!==-1?N:(N=Je.call(this._longMonthsParse,Q),N!==-1?N:null)):(N=Je.call(this._longMonthsParse,Q),N!==-1?N:(N=Je.call(this._shortMonthsParse,Q),N!==-1?N:null))}function ON(i,d,S){var b,N,A;if(this._monthsParseExact)return LN.call(this,i,d,S);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(N=y([2e3,b]),S&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(N,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(N,"").replace(".","")+"$","i")),!S&&!this._monthsParse[b]&&(A="^"+this.months(N,"")+"|^"+this.monthsShort(N,""),this._monthsParse[b]=new RegExp(A.replace(".",""),"i")),S&&d==="MMMM"&&this._longMonthsParse[b].test(i))return b;if(S&&d==="MMM"&&this._shortMonthsParse[b].test(i))return b;if(!S&&this._monthsParse[b].test(i))return b}}function Uf(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),!m(d))return i}var S=d,b=i.date();return b=b<29?b:Math.min(b,Cl(i.year(),S)),i._isUTC?i._d.setUTCMonth(S,b):i._d.setMonth(S,b),i}function zf(i){return i!=null?(Uf(this,i),r.updateOffset(this,!0),this):fo(this,"Month")}function RN(){return Cl(this.year(),this.month())}function BN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||jf.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=IN),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function PN(i){return this._monthsParseExact?(c(this,"_monthsRegex")||jf.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=xN),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function jf(){function i(Te,ke){return ke.length-Te.length}var d=[],S=[],b=[],N,A,Q,fe;for(N=0;N<12;N++)A=y([2e3,N]),Q=sn(this.monthsShort(A,"")),fe=sn(this.months(A,"")),d.push(Q),S.push(fe),b.push(fe),b.push(Q);d.sort(i),S.sort(i),b.sort(i),this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function AN(i,d,S,b,N,A,Q){var fe;return i<100&&i>=0?(fe=new Date(i+400,d,S,b,N,A,Q),isFinite(fe.getFullYear())&&fe.setFullYear(i)):fe=new Date(i,d,S,b,N,A,Q),fe}function ho(i){var d,S;return i<100&&i>=0?(S=Array.prototype.slice.call(arguments),S[0]=i+400,d=new Date(Date.UTC.apply(null,S)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(i)):d=new Date(Date.UTC.apply(null,arguments)),d}function Ta(i,d,S){var b=7+d-S,N=(7+ho(i,0,b).getUTCDay()-d)%7;return-N+b-1}function qf(i,d,S,b,N){var A=(7+S-b)%7,Q=Ta(i,b,N),fe=1+7*(d-1)+A+Q,Te,ke;return fe<=0?(Te=i-1,ke=mo(Te)+fe):fe>mo(i)?(Te=i+1,ke=fe-mo(i)):(Te=i,ke=fe),{year:Te,dayOfYear:ke}}function So(i,d,S){var b=Ta(i.year(),d,S),N=Math.floor((i.dayOfYear()-b-1)/7)+1,A,Q;return N<1?(Q=i.year()-1,A=N+dn(Q,d,S)):N>dn(i.year(),d,S)?(A=N-dn(i.year(),d,S),Q=i.year()+1):(Q=i.year(),A=N),{week:A,year:Q}}function dn(i,d,S){var b=Ta(i,d,S),N=Ta(i+1,d,S);return(mo(i)-b+N)/7}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),me("w",Ie,ye),me("ww",Ie,Ee),me("W",Ie,ye),me("WW",Ie,Ee),uo(["w","ww","W","WW"],function(i,d,S,b){d[b.substr(0,1)]=Ce(i)});function FN(i){return So(i,this._week.dow,this._week.doy).week}var VN={dow:0,doy:6};function $N(){return this._week.dow}function KN(){return this._week.doy}function HN(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function WN(i){var d=So(this,1,4).week;return i==null?d:this.add((i-d)*7,"d")}V("d",0,"do","day"),V("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),V("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),V("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),me("d",Ie),me("e",Ie),me("E",Ie),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)}),uo(["dd","ddd","dddd"],function(i,d,S,b){var N=S._locale.weekdaysParse(i,b,S._strict);N!=null?d.d=N:T(S).invalidWeekday=i}),uo(["d","e","E"],function(i,d,S,b){d[b]=Ce(i)});function GN(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function YN(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Dl(i,d){return i.slice(d,7).concat(i.slice(0,d))}var UN="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Jf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zN="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),jN=Se,qN=Se,JN=Se;function ZN(i,d){var S=s(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Dl(S,this._week.dow):i?S[i.day()]:S}function XN(i){return i===!0?Dl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function QN(i){return i===!0?Dl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function ek(i,d,S){var b,N,A,Q=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)A=y([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(A,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(A,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(A,"").toLocaleLowerCase();return S?d==="dddd"?(N=Je.call(this._weekdaysParse,Q),N!==-1?N:null):d==="ddd"?(N=Je.call(this._shortWeekdaysParse,Q),N!==-1?N:null):(N=Je.call(this._minWeekdaysParse,Q),N!==-1?N:null):d==="dddd"?(N=Je.call(this._weekdaysParse,Q),N!==-1||(N=Je.call(this._shortWeekdaysParse,Q),N!==-1)?N:(N=Je.call(this._minWeekdaysParse,Q),N!==-1?N:null)):d==="ddd"?(N=Je.call(this._shortWeekdaysParse,Q),N!==-1||(N=Je.call(this._weekdaysParse,Q),N!==-1)?N:(N=Je.call(this._minWeekdaysParse,Q),N!==-1?N:null)):(N=Je.call(this._minWeekdaysParse,Q),N!==-1||(N=Je.call(this._weekdaysParse,Q),N!==-1)?N:(N=Je.call(this._shortWeekdaysParse,Q),N!==-1?N:null))}function tk(i,d,S){var b,N,A;if(this._weekdaysParseExact)return ek.call(this,i,d,S);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(N=y([2e3,1]).day(b),S&&!this._fullWeekdaysParse[b]&&(this._fullWeekdaysParse[b]=new RegExp("^"+this.weekdays(N,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[b]=new RegExp("^"+this.weekdaysShort(N,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[b]=new RegExp("^"+this.weekdaysMin(N,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[b]||(A="^"+this.weekdays(N,"")+"|^"+this.weekdaysShort(N,"")+"|^"+this.weekdaysMin(N,""),this._weekdaysParse[b]=new RegExp(A.replace(".",""),"i")),S&&d==="dddd"&&this._fullWeekdaysParse[b].test(i))return b;if(S&&d==="ddd"&&this._shortWeekdaysParse[b].test(i))return b;if(S&&d==="dd"&&this._minWeekdaysParse[b].test(i))return b;if(!S&&this._weekdaysParse[b].test(i))return b}}function nk(i){if(!this.isValid())return i!=null?this:NaN;var d=fo(this,"Day");return i!=null?(i=GN(i,this.localeData()),this.add(i-d,"d")):d}function rk(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 ok(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=YN(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function ak(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Nl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=jN),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function sk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Nl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qN),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ik(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Nl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=JN),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Nl(){function i(Tt,hn){return hn.length-Tt.length}var d=[],S=[],b=[],N=[],A,Q,fe,Te,ke;for(A=0;A<7;A++)Q=y([2e3,1]).day(A),fe=sn(this.weekdaysMin(Q,"")),Te=sn(this.weekdaysShort(Q,"")),ke=sn(this.weekdays(Q,"")),d.push(fe),S.push(Te),b.push(ke),N.push(fe),N.push(Te),N.push(ke);d.sort(i),S.sort(i),b.sort(i),N.sort(i),this._weekdaysRegex=new RegExp("^("+N.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+b.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function kl(){return this.hours()%12||12}function lk(){return this.hours()||24}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,kl),V("k",["kk",2],0,lk),V("hmm",0,0,function(){return""+kl.apply(this)+H(this.minutes(),2)}),V("hmmss",0,0,function(){return""+kl.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+H(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+H(this.minutes(),2)+H(this.seconds(),2)});function Zf(i,d){V(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}Zf("a",!0),Zf("A",!1);function Xf(i,d){return d._meridiemParse}me("a",Xf),me("A",Xf),me("H",Ie,et),me("h",Ie,ye),me("k",Ie,ye),me("HH",Ie,Ee),me("hh",Ie,Ee),me("kk",Ie,Ee),me("hmm",ce),me("hmmss",De),me("Hmm",ce),me("Hmmss",De),$e(["H","HH"],ot),$e(["k","kk"],function(i,d,S){var b=Ce(i);d[ot]=b===24?0:b}),$e(["a","A"],function(i,d,S){S._isPm=S._locale.isPM(i),S._meridiem=i}),$e(["h","hh"],function(i,d,S){d[ot]=Ce(i),T(S).bigHour=!0}),$e("hmm",function(i,d,S){var b=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Yt]=Ce(i.substr(b)),T(S).bigHour=!0}),$e("hmmss",function(i,d,S){var b=i.length-4,N=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Yt]=Ce(i.substr(b,2)),d[cn]=Ce(i.substr(N)),T(S).bigHour=!0}),$e("Hmm",function(i,d,S){var b=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Yt]=Ce(i.substr(b))}),$e("Hmmss",function(i,d,S){var b=i.length-4,N=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Yt]=Ce(i.substr(b,2)),d[cn]=Ce(i.substr(N))});function ck(i){return(i+"").toLowerCase().charAt(0)==="p"}var dk=/[ap]\.?m?\.?/i,pk=Nr("Hours",!0);function uk(i,d,S){return i>11?S?"pm":"PM":S?"am":"AM"}var Qf={calendar:j,longDateFormat:pe,invalidDate:se,ordinal:Pe,dayOfMonthOrdinalParse:pt,relativeTime:nt,months:kN,monthsShort:Gf,week:VN,weekdays:UN,weekdaysMin:zN,weekdaysShort:Jf,meridiemParse:dk},je={},go={},bo;function mk(i,d){var S,b=Math.min(i.length,d.length);for(S=0;S<b;S+=1)if(i[S]!==d[S])return S;return b}function eh(i){return i&&i.toLowerCase().replace("_","-")}function fk(i){for(var d=0,S,b,N,A;d<i.length;){for(A=eh(i[d]).split("-"),S=A.length,b=eh(i[d+1]),b=b?b.split("-"):null;S>0;){if(N=Ea(A.slice(0,S).join("-")),N)return N;if(b&&b.length>=S&&mk(A,b)>=S-1)break;S--}d++}return bo}function hk(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Ea(i){var d=null,S;if(je[i]===void 0&&e&&e.exports&&hk(i))try{d=bo._abbr,S=Qt,S("./locale/"+i),On(d)}catch{je[i]=null}return je[i]}function On(i,d){var S;return i&&(f(d)?S=pn(i):S=Il(i,d),S?bo=S:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),bo._abbr}function Il(i,d){if(d!==null){var S,b=Qf;if(d.abbr=i,je[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=je[i]._config;else if(d.parentLocale!=null)if(je[d.parentLocale]!=null)b=je[d.parentLocale]._config;else if(S=Ea(d.parentLocale),S!=null)b=S._config;else return go[d.parentLocale]||(go[d.parentLocale]=[]),go[d.parentLocale].push({name:i,config:d}),null;return je[i]=new ee(B(b,d)),go[i]&&go[i].forEach(function(N){Il(N.name,N.config)}),On(i),je[i]}else return delete je[i],null}function Sk(i,d){if(d!=null){var S,b,N=Qf;je[i]!=null&&je[i].parentLocale!=null?je[i].set(B(je[i]._config,d)):(b=Ea(i),b!=null&&(N=b._config),d=B(N,d),b==null&&(d.abbr=i),S=new ee(d),S.parentLocale=je[i],je[i]=S),On(i)}else je[i]!=null&&(je[i].parentLocale!=null?(je[i]=je[i].parentLocale,i===On()&&On(i)):je[i]!=null&&delete je[i]);return je[i]}function pn(i){var d;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return bo;if(!s(i)){if(d=Ea(i),d)return d;i=[i]}return fk(i)}function gk(){return W(je)}function xl(i){var d,S=i._a;return S&&T(i).overflow===-2&&(d=S[ln]<0||S[ln]>11?ln:S[en]<1||S[en]>Cl(S[mt],S[ln])?en:S[ot]<0||S[ot]>24||S[ot]===24&&(S[Yt]!==0||S[cn]!==0||S[tr]!==0)?ot:S[Yt]<0||S[Yt]>59?Yt:S[cn]<0||S[cn]>59?cn:S[tr]<0||S[tr]>999?tr:-1,T(i)._overflowDayOfYear&&(d<mt||d>en)&&(d=en),T(i)._overflowWeeks&&d===-1&&(d=TN),T(i)._overflowWeekday&&d===-1&&(d=EN),T(i).overflow=d),i}var 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=/^\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)?)?$/,yk=/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]],Ml=[["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/]],Tk=/^\/?Date\((-?\d+)/i,Ek=/^(?:(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}))$/,wk={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 th(i){var d,S,b=i._i,N=bk.exec(b)||vk.exec(b),A,Q,fe,Te,ke=wa.length,Tt=Ml.length;if(N){for(T(i).iso=!0,d=0,S=ke;d<S;d++)if(wa[d][1].exec(N[1])){Q=wa[d][0],A=wa[d][2]!==!1;break}if(Q==null){i._isValid=!1;return}if(N[3]){for(d=0,S=Tt;d<S;d++)if(Ml[d][1].exec(N[3])){fe=(N[2]||" ")+Ml[d][0];break}if(fe==null){i._isValid=!1;return}}if(!A&&fe!=null){i._isValid=!1;return}if(N[4])if(yk.exec(N[4]))Te="Z";else{i._isValid=!1;return}i._f=Q+(fe||"")+(Te||""),Ll(i)}else i._isValid=!1}function Ck(i,d,S,b,N,A){var Q=[Dk(i),Gf.indexOf(d),parseInt(S,10),parseInt(b,10),parseInt(N,10)];return A&&Q.push(parseInt(A,10)),Q}function Dk(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function Nk(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function kk(i,d,S){if(i){var b=Jf.indexOf(i),N=new Date(d[0],d[1],d[2]).getDay();if(b!==N)return T(S).weekdayMismatch=!0,S._isValid=!1,!1}return!0}function Ik(i,d,S){if(i)return wk[i];if(d)return 0;var b=parseInt(S,10),N=b%100,A=(b-N)/100;return A*60+N}function nh(i){var d=Ek.exec(Nk(i._i)),S;if(d){if(S=Ck(d[4],d[3],d[2],d[5],d[6],d[7]),!kk(d[1],S,i))return;i._a=S,i._tzm=Ik(d[8],d[9],d[10]),i._d=ho.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),T(i).rfc2822=!0}else i._isValid=!1}function xk(i){var d=Tk.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(th(i),i._isValid===!1)delete i._isValid;else return;if(nh(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 kr(i,d,S){return i??d??S}function Mk(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function _l(i){var d,S,b=[],N,A,Q;if(!i._d){for(N=Mk(i),i._w&&i._a[en]==null&&i._a[ln]==null&&_k(i),i._dayOfYear!=null&&(Q=kr(i._a[mt],N[mt]),(i._dayOfYear>mo(Q)||i._dayOfYear===0)&&(T(i)._overflowDayOfYear=!0),S=ho(Q,0,i._dayOfYear),i._a[ln]=S.getUTCMonth(),i._a[en]=S.getUTCDate()),d=0;d<3&&i._a[d]==null;++d)i._a[d]=b[d]=N[d];for(;d<7;d++)i._a[d]=b[d]=i._a[d]==null?d===2?1:0:i._a[d];i._a[ot]===24&&i._a[Yt]===0&&i._a[cn]===0&&i._a[tr]===0&&(i._nextDay=!0,i._a[ot]=0),i._d=(i._useUTC?ho:AN).apply(null,b),A=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ot]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==A&&(T(i).weekdayMismatch=!0)}}function _k(i){var d,S,b,N,A,Q,fe,Te,ke;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(A=1,Q=4,S=kr(d.GG,i._a[mt],So(Ue(),1,4).year),b=kr(d.W,1),N=kr(d.E,1),(N<1||N>7)&&(Te=!0)):(A=i._locale._week.dow,Q=i._locale._week.doy,ke=So(Ue(),A,Q),S=kr(d.gg,i._a[mt],ke.year),b=kr(d.w,ke.week),d.d!=null?(N=d.d,(N<0||N>6)&&(Te=!0)):d.e!=null?(N=d.e+A,(d.e<0||d.e>6)&&(Te=!0)):N=A),b<1||b>dn(S,A,Q)?T(i)._overflowWeeks=!0:Te!=null?T(i)._overflowWeekday=!0:(fe=qf(S,b,N,A,Q),i._a[mt]=fe.year,i._dayOfYear=fe.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Ll(i){if(i._f===r.ISO_8601){th(i);return}if(i._f===r.RFC_2822){nh(i);return}i._a=[],T(i).empty=!0;var d=""+i._i,S,b,N,A,Q,fe=d.length,Te=0,ke,Tt;for(N=de(i._f,i._locale).match(J)||[],Tt=N.length,S=0;S<Tt;S++)A=N[S],b=(d.match(El(A,i))||[])[0],b&&(Q=d.substr(0,d.indexOf(b)),Q.length>0&&T(i).unusedInput.push(Q),d=d.slice(d.indexOf(b)+b.length),Te+=b.length),q[A]?(b?T(i).empty=!1:T(i).unusedTokens.push(A),yN(A,b,i)):i._strict&&!b&&T(i).unusedTokens.push(A);T(i).charsLeftOver=fe-Te,d.length>0&&T(i).unusedInput.push(d),i._a[ot]<=12&&T(i).bigHour===!0&&i._a[ot]>0&&(T(i).bigHour=void 0),T(i).parsedDateParts=i._a.slice(0),T(i).meridiem=i._meridiem,i._a[ot]=Lk(i._locale,i._a[ot],i._meridiem),ke=T(i).era,ke!==null&&(i._a[mt]=i._locale.erasConvertYear(ke,i._a[mt])),_l(i),xl(i)}function Lk(i,d,S){var b;return S==null?d:i.meridiemHour!=null?i.meridiemHour(d,S):(i.isPM!=null&&(b=i.isPM(S),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function Ok(i){var d,S,b,N,A,Q,fe=!1,Te=i._f.length;if(Te===0){T(i).invalidFormat=!0,i._d=new Date(NaN);return}for(N=0;N<Te;N++)A=0,Q=!1,d=F({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[N],Ll(d),D(d)&&(Q=!0),A+=T(d).charsLeftOver,A+=T(d).unusedTokens.length*10,T(d).score=A,fe?A<b&&(b=A,S=d):(b==null||A<b||Q)&&(b=A,S=d,Q&&(fe=!0));g(i,S||d)}function Rk(i){if(!i._d){var d=ge(i._i),S=d.day===void 0?d.date:d.day;i._a=h([d.year,d.month,S,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),_l(i)}}function Bk(i){var d=new P(xl(rh(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function rh(i){var d=i._i,S=i._f;return i._locale=i._locale||pn(i._l),d===null||S===void 0&&d===""?M({nullInput:!0}):(typeof d=="string"&&(i._i=d=i._locale.preparse(d)),C(d)?new P(xl(d)):(u(d)?i._d=d:s(S)?Ok(i):S?Ll(i):Pk(i),D(i)||(i._d=null),i))}function Pk(i){var d=i._i;f(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?xk(i):s(d)?(i._a=h(d.slice(0),function(S){return parseInt(S,10)}),_l(i)):l(d)?Rk(i):m(d)?i._d=new Date(d):r.createFromInputFallback(i)}function oh(i,d,S,b,N){var A={};return(d===!0||d===!1)&&(b=d,d=void 0),(S===!0||S===!1)&&(b=S,S=void 0),(l(i)&&p(i)||s(i)&&i.length===0)&&(i=void 0),A._isAMomentObject=!0,A._useUTC=A._isUTC=N,A._l=S,A._i=i,A._f=d,A._strict=b,Bk(A)}function Ue(i,d,S,b){return oh(i,d,S,b,!1)}var Ak=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ue.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:M()}),Fk=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ue.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:M()});function ah(i,d){var S,b;if(d.length===1&&s(d[0])&&(d=d[0]),!d.length)return Ue();for(S=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][i](S))&&(S=d[b]);return S}function Vk(){var i=[].slice.call(arguments,0);return ah("isBefore",i)}function $k(){var i=[].slice.call(arguments,0);return ah("isAfter",i)}var Kk=function(){return Date.now?Date.now():+new Date},vo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Hk(i){var d,S=!1,b,N=vo.length;for(d in i)if(c(i,d)&&!(Je.call(vo,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<N;++b)if(i[vo[b]]){if(S)return!1;parseFloat(i[vo[b]])!==Ce(i[vo[b]])&&(S=!0)}return!0}function Wk(){return this._isValid}function Gk(){return Ut(NaN)}function Ca(i){var d=ge(i),S=d.year||0,b=d.quarter||0,N=d.month||0,A=d.week||d.isoWeek||0,Q=d.day||0,fe=d.hour||0,Te=d.minute||0,ke=d.second||0,Tt=d.millisecond||0;this._isValid=Hk(d),this._milliseconds=+Tt+ke*1e3+Te*6e4+fe*1e3*60*60,this._days=+Q+A*7,this._months=+N+b*3+S*12,this._data={},this._locale=pn(),this._bubble()}function Da(i){return i instanceof Ca}function Ol(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function Yk(i,d,S){var b=Math.min(i.length,d.length),N=Math.abs(i.length-d.length),A=0,Q;for(Q=0;Q<b;Q++)Ce(i[Q])!==Ce(d[Q])&&A++;return A+N}function sh(i,d){V(i,0,0,function(){var S=this.utcOffset(),b="+";return S<0&&(S=-S,b="-"),b+H(~~(S/60),2)+d+H(~~S%60,2)})}sh("Z",":"),sh("ZZ",""),me("Z",ut),me("ZZ",ut),$e(["Z","ZZ"],function(i,d,S){S._useUTC=!0,S._tzm=Rl(ut,i)});var Uk=/([\+\-]|\d\d)/gi;function Rl(i,d){var S=(d||"").match(i),b,N,A;return S===null?null:(b=S[S.length-1]||[],N=(b+"").match(Uk)||["-",0,0],A=+(N[1]*60)+Ce(N[2]),A===0?0:N[0]==="+"?A:-A)}function Bl(i,d){var S,b;return d._isUTC?(S=d.clone(),b=(C(i)||u(i)?i.valueOf():Ue(i).valueOf())-S.valueOf(),S._d.setTime(S._d.valueOf()+b),r.updateOffset(S,!1),S):Ue(i).local()}function Pl(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function zk(i,d,S){var b=this._offset||0,N;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Rl(ut,i),i===null)return this}else Math.abs(i)<16&&!S&&(i=i*60);return!this._isUTC&&d&&(N=Pl(this)),this._offset=i,this._isUTC=!0,N!=null&&this.add(N,"m"),b!==i&&(!d||this._changeInProgress?dh(this,Ut(i-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Pl(this)}function jk(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function qk(i){return this.utcOffset(0,i)}function Jk(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Pl(this),"m")),this}function Zk(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Rl(Ge,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function Xk(i){return this.isValid()?(i=i?Ue(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function Qk(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function eI(){if(!f(this._isDSTShifted))return this._isDSTShifted;var i={},d;return F(i,this),i=rh(i),i._a?(d=i._isUTC?y(i._a):Ue(i._a),this._isDSTShifted=this.isValid()&&Yk(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function tI(){return this.isValid()?!this._isUTC:!1}function nI(){return this.isValid()?this._isUTC:!1}function ih(){return this.isValid()?this._isUTC&&this._offset===0:!1}var rI=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,oI=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ut(i,d){var S=i,b=null,N,A,Q;return Da(i)?S={ms:i._milliseconds,d:i._days,M:i._months}:m(i)||!isNaN(+i)?(S={},d?S[d]=+i:S.milliseconds=+i):(b=rI.exec(i))?(N=b[1]==="-"?-1:1,S={y:0,d:Ce(b[en])*N,h:Ce(b[ot])*N,m:Ce(b[Yt])*N,s:Ce(b[cn])*N,ms:Ce(Ol(b[tr]*1e3))*N}):(b=oI.exec(i))?(N=b[1]==="-"?-1:1,S={y:nr(b[2],N),M:nr(b[3],N),w:nr(b[4],N),d:nr(b[5],N),h:nr(b[6],N),m:nr(b[7],N),s:nr(b[8],N)}):S==null?S={}:typeof S=="object"&&("from"in S||"to"in S)&&(Q=aI(Ue(S.from),Ue(S.to)),S={},S.ms=Q.milliseconds,S.M=Q.months),A=new Ca(S),Da(i)&&c(i,"_locale")&&(A._locale=i._locale),Da(i)&&c(i,"_isValid")&&(A._isValid=i._isValid),A}Ut.fn=Ca.prototype,Ut.invalid=Gk;function nr(i,d){var S=i&&parseFloat(i.replace(",","."));return(isNaN(S)?0:S)*d}function lh(i,d){var S={};return S.months=d.month()-i.month()+(d.year()-i.year())*12,i.clone().add(S.months,"M").isAfter(d)&&--S.months,S.milliseconds=+d-+i.clone().add(S.months,"M"),S}function aI(i,d){var S;return i.isValid()&&d.isValid()?(d=Bl(d,i),i.isBefore(d)?S=lh(i,d):(S=lh(d,i),S.milliseconds=-S.milliseconds,S.months=-S.months),S):{milliseconds:0,months:0}}function ch(i,d){return function(S,b){var N,A;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."),A=S,S=b,b=A),N=Ut(S,b),dh(this,N,i),this}}function dh(i,d,S,b){var N=d._milliseconds,A=Ol(d._days),Q=Ol(d._months);i.isValid()&&(b=b??!0,Q&&Uf(i,fo(i,"Month")+Q*S),A&&Wf(i,"Date",fo(i,"Date")+A*S),N&&i._d.setTime(i._d.valueOf()+N*S),b&&r.updateOffset(i,A||Q))}var sI=ch(1,"add"),iI=ch(-1,"subtract");function ph(i){return typeof i=="string"||i instanceof String}function lI(i){return C(i)||u(i)||ph(i)||m(i)||dI(i)||cI(i)||i===null||i===void 0}function cI(i){var d=l(i)&&!p(i),S=!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"],N,A,Q=b.length;for(N=0;N<Q;N+=1)A=b[N],S=S||c(i,A);return d&&S}function dI(i){var d=s(i),S=!1;return d&&(S=i.filter(function(b){return!m(b)&&ph(i)}).length===0),d&&S}function pI(i){var d=l(i)&&!p(i),S=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],N,A;for(N=0;N<b.length;N+=1)A=b[N],S=S||c(i,A);return d&&S}function uI(i,d){var S=i.diff(d,"days",!0);return S<-6?"sameElse":S<-1?"lastWeek":S<0?"lastDay":S<1?"sameDay":S<2?"nextDay":S<7?"nextWeek":"sameElse"}function mI(i,d){arguments.length===1&&(arguments[0]?lI(arguments[0])?(i=arguments[0],d=void 0):pI(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var S=i||Ue(),b=Bl(S,this).startOf("day"),N=r.calendarFormat(this,b)||"sameElse",A=d&&(L(d[N])?d[N].call(this,S):d[N]);return this.format(A||this.localeData().calendar(N,this,Ue(S)))}function fI(){return new P(this)}function hI(i,d){var S=C(i)?i:Ue(i);return this.isValid()&&S.isValid()?(d=He(d)||"millisecond",d==="millisecond"?this.valueOf()>S.valueOf():S.valueOf()<this.clone().startOf(d).valueOf()):!1}function SI(i,d){var S=C(i)?i:Ue(i);return this.isValid()&&S.isValid()?(d=He(d)||"millisecond",d==="millisecond"?this.valueOf()<S.valueOf():this.clone().endOf(d).valueOf()<S.valueOf()):!1}function gI(i,d,S,b){var N=C(i)?i:Ue(i),A=C(d)?d:Ue(d);return this.isValid()&&N.isValid()&&A.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(N,S):!this.isBefore(N,S))&&(b[1]===")"?this.isBefore(A,S):!this.isAfter(A,S))):!1}function bI(i,d){var S=C(i)?i:Ue(i),b;return this.isValid()&&S.isValid()?(d=He(d)||"millisecond",d==="millisecond"?this.valueOf()===S.valueOf():(b=S.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function vI(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function yI(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function TI(i,d,S){var b,N,A;if(!this.isValid())return NaN;if(b=Bl(i,this),!b.isValid())return NaN;switch(N=(b.utcOffset()-this.utcOffset())*6e4,d=He(d),d){case"year":A=Na(this,b)/12;break;case"month":A=Na(this,b);break;case"quarter":A=Na(this,b)/3;break;case"second":A=(this-b)/1e3;break;case"minute":A=(this-b)/6e4;break;case"hour":A=(this-b)/36e5;break;case"day":A=(this-b-N)/864e5;break;case"week":A=(this-b-N)/6048e5;break;default:A=this-b}return S?A:Vt(A)}function Na(i,d){if(i.date()<d.date())return-Na(d,i);var S=(d.year()-i.year())*12+(d.month()-i.month()),b=i.clone().add(S,"months"),N,A;return d-b<0?(N=i.clone().add(S-1,"months"),A=(d-b)/(b-N)):(N=i.clone().add(S+1,"months"),A=(d-b)/(N-b)),-(S+A)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function EI(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function wI(i){if(!this.isValid())return null;var d=i!==!0,S=d?this.clone().utc():this;return S.year()<0||S.year()>9999?te(S,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",te(S,"Z")):te(S,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function CI(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",d="",S,b,N,A;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),S="["+i+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",N="-MM-DD[T]HH:mm:ss.SSS",A=d+'[")]',this.format(S+b+N+A)}function DI(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=te(this,i);return this.localeData().postformat(d)}function NI(i,d){return this.isValid()&&(C(i)&&i.isValid()||Ue(i).isValid())?Ut({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function kI(i){return this.from(Ue(),i)}function II(i,d){return this.isValid()&&(C(i)&&i.isValid()||Ue(i).isValid())?Ut({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function xI(i){return this.to(Ue(),i)}function uh(i){var d;return i===void 0?this._locale._abbr:(d=pn(i),d!=null&&(this._locale=d),this)}var mh=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 fh(){return this._locale}var ka=1e3,Ir=60*ka,Ia=60*Ir,hh=(365*400+97)*24*Ia;function xr(i,d){return(i%d+d)%d}function Sh(i,d,S){return i<100&&i>=0?new Date(i+400,d,S)-hh:new Date(i,d,S).valueOf()}function gh(i,d,S){return i<100&&i>=0?Date.UTC(i+400,d,S)-hh:Date.UTC(i,d,S)}function MI(i){var d,S;if(i=He(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(S=this._isUTC?gh:Sh,i){case"year":d=S(this.year(),0,1);break;case"quarter":d=S(this.year(),this.month()-this.month()%3,1);break;case"month":d=S(this.year(),this.month(),1);break;case"week":d=S(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=S(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=S(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=xr(d+(this._isUTC?0:this.utcOffset()*Ir),Ia);break;case"minute":d=this._d.valueOf(),d-=xr(d,Ir);break;case"second":d=this._d.valueOf(),d-=xr(d,ka);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function _I(i){var d,S;if(i=He(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(S=this._isUTC?gh:Sh,i){case"year":d=S(this.year()+1,0,1)-1;break;case"quarter":d=S(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=S(this.year(),this.month()+1,1)-1;break;case"week":d=S(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=S(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=S(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=Ia-xr(d+(this._isUTC?0:this.utcOffset()*Ir),Ia)-1;break;case"minute":d=this._d.valueOf(),d+=Ir-xr(d,Ir)-1;break;case"second":d=this._d.valueOf(),d+=ka-xr(d,ka)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function LI(){return this._d.valueOf()-(this._offset||0)*6e4}function OI(){return Math.floor(this.valueOf()/1e3)}function RI(){return new Date(this.valueOf())}function BI(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function PI(){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 AI(){return this.isValid()?this.toISOString():null}function FI(){return D(this)}function VI(){return g({},T(this))}function $I(){return T(this).overflow}function KI(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),me("N",Al),me("NN",Al),me("NNN",Al),me("NNNN",XI),me("NNNNN",QI),$e(["N","NN","NNN","NNNN","NNNNN"],function(i,d,S,b){var N=S._locale.erasParse(i,b,S._strict);N?T(S).era=N:T(S).invalidEra=i}),me("y",lt),me("yy",lt),me("yyy",lt),me("yyyy",lt),me("yo",ex),$e(["y","yy","yyy","yyyy"],mt),$e(["yo"],function(i,d,S,b){var N;S._locale._eraYearOrdinalRegex&&(N=i.match(S._locale._eraYearOrdinalRegex)),S._locale.eraYearOrdinalParse?d[mt]=S._locale.eraYearOrdinalParse(i,N):d[mt]=parseInt(i,10)});function HI(i,d){var S,b,N,A=this._eras||pn("en")._eras;for(S=0,b=A.length;S<b;++S){switch(typeof A[S].since){case"string":N=r(A[S].since).startOf("day"),A[S].since=N.valueOf();break}switch(typeof A[S].until){case"undefined":A[S].until=1/0;break;case"string":N=r(A[S].until).startOf("day").valueOf(),A[S].until=N.valueOf();break}}return A}function WI(i,d,S){var b,N,A=this.eras(),Q,fe,Te;for(i=i.toUpperCase(),b=0,N=A.length;b<N;++b)if(Q=A[b].name.toUpperCase(),fe=A[b].abbr.toUpperCase(),Te=A[b].narrow.toUpperCase(),S)switch(d){case"N":case"NN":case"NNN":if(fe===i)return A[b];break;case"NNNN":if(Q===i)return A[b];break;case"NNNNN":if(Te===i)return A[b];break}else if([Q,fe,Te].indexOf(i)>=0)return A[b]}function GI(i,d){var S=i.since<=i.until?1:-1;return d===void 0?r(i.since).year():r(i.since).year()+(d-i.offset)*S}function YI(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].name;return""}function UI(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].narrow;return""}function zI(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].abbr;return""}function jI(){var i,d,S,b,N=this.localeData().eras();for(i=0,d=N.length;i<d;++i)if(S=N[i].since<=N[i].until?1:-1,b=this.clone().startOf("day").valueOf(),N[i].since<=b&&b<=N[i].until||N[i].until<=b&&b<=N[i].since)return(this.year()-r(N[i].since).year())*S+N[i].offset;return this.year()}function qI(i){return c(this,"_erasNameRegex")||Fl.call(this),i?this._erasNameRegex:this._erasRegex}function JI(i){return c(this,"_erasAbbrRegex")||Fl.call(this),i?this._erasAbbrRegex:this._erasRegex}function ZI(i){return c(this,"_erasNarrowRegex")||Fl.call(this),i?this._erasNarrowRegex:this._erasRegex}function Al(i,d){return d.erasAbbrRegex(i)}function XI(i,d){return d.erasNameRegex(i)}function QI(i,d){return d.erasNarrowRegex(i)}function ex(i,d){return d._eraYearOrdinalRegex||lt}function Fl(){var i=[],d=[],S=[],b=[],N,A,Q,fe,Te,ke=this.eras();for(N=0,A=ke.length;N<A;++N)Q=sn(ke[N].name),fe=sn(ke[N].abbr),Te=sn(ke[N].narrow),d.push(Q),i.push(fe),S.push(Te),b.push(Q),b.push(fe),b.push(Te);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("^("+S.join("|")+")","i")}V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xa(i,d){V(0,[i,i.length],0,d)}xa("gggg","weekYear"),xa("ggggg","weekYear"),xa("GGGG","isoWeekYear"),xa("GGGGG","isoWeekYear"),me("G",yt),me("g",yt),me("GG",Ie,Ee),me("gg",Ie,Ee),me("GGGG",Qe,_n),me("gggg",Qe,_n),me("GGGGG",Le,At),me("ggggg",Le,At),uo(["gggg","ggggg","GGGG","GGGGG"],function(i,d,S,b){d[b.substr(0,2)]=Ce(i)}),uo(["gg","GG"],function(i,d,S,b){d[b]=r.parseTwoDigitYear(i)});function tx(i){return bh.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function nx(i){return bh.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function rx(){return dn(this.year(),1,4)}function ox(){return dn(this.isoWeekYear(),1,4)}function ax(){var i=this.localeData()._week;return dn(this.year(),i.dow,i.doy)}function sx(){var i=this.localeData()._week;return dn(this.weekYear(),i.dow,i.doy)}function bh(i,d,S,b,N){var A;return i==null?So(this,b,N).year:(A=dn(i,b,N),d>A&&(d=A),ix.call(this,i,d,S,b,N))}function ix(i,d,S,b,N){var A=qf(i,d,S,b,N),Q=ho(A.year,0,A.dayOfYear);return this.year(Q.getUTCFullYear()),this.month(Q.getUTCMonth()),this.date(Q.getUTCDate()),this}V("Q",0,"Qo","quarter"),me("Q",qe),$e("Q",function(i,d){d[ln]=(Ce(i)-1)*3});function lx(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}V("D",["DD",2],"Do","date"),me("D",Ie,ye),me("DD",Ie,Ee),me("Do",function(i,d){return i?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),$e(["D","DD"],en),$e("Do",function(i,d){d[en]=Ce(i.match(Ie)[0])});var vh=Nr("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),me("DDD",Ne),me("DDDD",vt),$e(["DDD","DDDD"],function(i,d,S){S._dayOfYear=Ce(i)});function cx(i){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?d:this.add(i-d,"d")}V("m",["mm",2],0,"minute"),me("m",Ie,et),me("mm",Ie,Ee),$e(["m","mm"],Yt);var dx=Nr("Minutes",!1);V("s",["ss",2],0,"second"),me("s",Ie,et),me("ss",Ie,Ee),$e(["s","ss"],cn);var px=Nr("Seconds",!1);V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return this.millisecond()*10}),V(0,["SSSSS",5],0,function(){return this.millisecond()*100}),V(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),V(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),V(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),V(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),me("S",Ne,qe),me("SS",Ne,Ee),me("SSS",Ne,vt);var Rn,yh;for(Rn="SSSS";Rn.length<=9;Rn+="S")me(Rn,lt);function ux(i,d){d[tr]=Ce(("0."+i)*1e3)}for(Rn="S";Rn.length<=9;Rn+="S")$e(Rn,ux);yh=Nr("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");function mx(){return this._isUTC?"UTC":""}function fx(){return this._isUTC?"Coordinated Universal Time":""}var le=P.prototype;le.add=sI,le.calendar=mI,le.clone=fI,le.diff=TI,le.endOf=_I,le.format=DI,le.from=NI,le.fromNow=kI,le.to=II,le.toNow=xI,le.get=CN,le.invalidAt=$I,le.isAfter=hI,le.isBefore=SI,le.isBetween=gI,le.isSame=bI,le.isSameOrAfter=vI,le.isSameOrBefore=yI,le.isValid=FI,le.lang=mh,le.locale=uh,le.localeData=fh,le.max=Fk,le.min=Ak,le.parsingFlags=VI,le.set=DN,le.startOf=MI,le.subtract=iI,le.toArray=BI,le.toObject=PI,le.toDate=RI,le.toISOString=wI,le.inspect=CI,typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),le.toJSON=AI,le.toString=EI,le.unix=OI,le.valueOf=LI,le.creationData=KI,le.eraName=YI,le.eraNarrow=UI,le.eraAbbr=zI,le.eraYear=jI,le.year=Hf,le.isLeapYear=wN,le.weekYear=tx,le.isoWeekYear=nx,le.quarter=le.quarters=lx,le.month=zf,le.daysInMonth=RN,le.week=le.weeks=HN,le.isoWeek=le.isoWeeks=WN,le.weeksInYear=ax,le.weeksInWeekYear=sx,le.isoWeeksInYear=rx,le.isoWeeksInISOWeekYear=ox,le.date=vh,le.day=le.days=nk,le.weekday=rk,le.isoWeekday=ok,le.dayOfYear=cx,le.hour=le.hours=pk,le.minute=le.minutes=dx,le.second=le.seconds=px,le.millisecond=le.milliseconds=yh,le.utcOffset=zk,le.utc=qk,le.local=Jk,le.parseZone=Zk,le.hasAlignedHourOffset=Xk,le.isDST=Qk,le.isLocal=tI,le.isUtcOffset=nI,le.isUtc=ih,le.isUTC=ih,le.zoneAbbr=mx,le.zoneName=fx,le.dates=O("dates accessor is deprecated. Use date instead.",vh),le.months=O("months accessor is deprecated. Use month instead",zf),le.years=O("years accessor is deprecated. Use year instead",Hf),le.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",jk),le.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",eI);function hx(i){return Ue(i*1e3)}function Sx(){return Ue.apply(null,arguments).parseZone()}function Th(i){return i}var Oe=ee.prototype;Oe.calendar=re,Oe.longDateFormat=X,Oe.invalidDate=we,Oe.ordinal=bt,Oe.preparse=Th,Oe.postformat=Th,Oe.relativeTime=rt,Oe.pastFuture=Pt,Oe.set=oe,Oe.eras=HI,Oe.erasParse=WI,Oe.erasConvertYear=GI,Oe.erasAbbrRegex=JI,Oe.erasNameRegex=qI,Oe.erasNarrowRegex=ZI,Oe.months=MN,Oe.monthsShort=_N,Oe.monthsParse=ON,Oe.monthsRegex=PN,Oe.monthsShortRegex=BN,Oe.week=FN,Oe.firstDayOfYear=KN,Oe.firstDayOfWeek=$N,Oe.weekdays=ZN,Oe.weekdaysMin=QN,Oe.weekdaysShort=XN,Oe.weekdaysParse=tk,Oe.weekdaysRegex=ak,Oe.weekdaysShortRegex=sk,Oe.weekdaysMinRegex=ik,Oe.isPM=ck,Oe.meridiem=uk;function Ma(i,d,S,b){var N=pn(),A=y().set(b,d);return N[S](A,i)}function Eh(i,d,S){if(m(i)&&(d=i,i=void 0),i=i||"",d!=null)return Ma(i,d,S,"month");var b,N=[];for(b=0;b<12;b++)N[b]=Ma(i,b,S,"month");return N}function Vl(i,d,S,b){typeof i=="boolean"?(m(d)&&(S=d,d=void 0),d=d||""):(d=i,S=d,i=!1,m(d)&&(S=d,d=void 0),d=d||"");var N=pn(),A=i?N._week.dow:0,Q,fe=[];if(S!=null)return Ma(d,(S+A)%7,b,"day");for(Q=0;Q<7;Q++)fe[Q]=Ma(d,(Q+A)%7,b,"day");return fe}function gx(i,d){return Eh(i,d,"months")}function bx(i,d){return Eh(i,d,"monthsShort")}function vx(i,d,S){return Vl(i,d,S,"weekdays")}function yx(i,d,S){return Vl(i,d,S,"weekdaysShort")}function Tx(i,d,S){return Vl(i,d,S,"weekdaysMin")}On("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,S=Ce(i%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return i+S}}),r.lang=O("moment.lang is deprecated. Use moment.locale instead.",On),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",pn);var un=Math.abs;function Ex(){var i=this._data;return this._milliseconds=un(this._milliseconds),this._days=un(this._days),this._months=un(this._months),i.milliseconds=un(i.milliseconds),i.seconds=un(i.seconds),i.minutes=un(i.minutes),i.hours=un(i.hours),i.months=un(i.months),i.years=un(i.years),this}function wh(i,d,S,b){var N=Ut(d,S);return i._milliseconds+=b*N._milliseconds,i._days+=b*N._days,i._months+=b*N._months,i._bubble()}function wx(i,d){return wh(this,i,d,1)}function Cx(i,d){return wh(this,i,d,-1)}function Ch(i){return i<0?Math.floor(i):Math.ceil(i)}function Dx(){var i=this._milliseconds,d=this._days,S=this._months,b=this._data,N,A,Q,fe,Te;return i>=0&&d>=0&&S>=0||i<=0&&d<=0&&S<=0||(i+=Ch($l(S)+d)*864e5,d=0,S=0),b.milliseconds=i%1e3,N=Vt(i/1e3),b.seconds=N%60,A=Vt(N/60),b.minutes=A%60,Q=Vt(A/60),b.hours=Q%24,d+=Vt(Q/24),Te=Vt(Dh(d)),S+=Te,d-=Ch($l(Te)),fe=Vt(S/12),S%=12,b.days=d,b.months=S,b.years=fe,this}function Dh(i){return i*4800/146097}function $l(i){return i*146097/4800}function Nx(i){if(!this.isValid())return NaN;var d,S,b=this._milliseconds;if(i=He(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,S=this._months+Dh(d),i){case"month":return S;case"quarter":return S/3;case"year":return S/12}else switch(d=this._days+Math.round($l(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 mn(i){return function(){return this.as(i)}}var Nh=mn("ms"),kx=mn("s"),Ix=mn("m"),xx=mn("h"),Mx=mn("d"),_x=mn("w"),Lx=mn("M"),Ox=mn("Q"),Rx=mn("y"),Bx=Nh;function Px(){return Ut(this)}function Ax(i){return i=He(i),this.isValid()?this[i+"s"]():NaN}function rr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Fx=rr("milliseconds"),Vx=rr("seconds"),$x=rr("minutes"),Kx=rr("hours"),Hx=rr("days"),Wx=rr("months"),Gx=rr("years");function Yx(){return Vt(this.days()/7)}var fn=Math.round,Mr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Ux(i,d,S,b,N){return N.relativeTime(d||1,!!S,i,b)}function zx(i,d,S,b){var N=Ut(i).abs(),A=fn(N.as("s")),Q=fn(N.as("m")),fe=fn(N.as("h")),Te=fn(N.as("d")),ke=fn(N.as("M")),Tt=fn(N.as("w")),hn=fn(N.as("y")),Bn=A<=S.ss&&["s",A]||A<S.s&&["ss",A]||Q<=1&&["m"]||Q<S.m&&["mm",Q]||fe<=1&&["h"]||fe<S.h&&["hh",fe]||Te<=1&&["d"]||Te<S.d&&["dd",Te];return S.w!=null&&(Bn=Bn||Tt<=1&&["w"]||Tt<S.w&&["ww",Tt]),Bn=Bn||ke<=1&&["M"]||ke<S.M&&["MM",ke]||hn<=1&&["y"]||["yy",hn],Bn[2]=d,Bn[3]=+i>0,Bn[4]=b,Ux.apply(null,Bn)}function jx(i){return i===void 0?fn:typeof i=="function"?(fn=i,!0):!1}function qx(i,d){return Mr[i]===void 0?!1:d===void 0?Mr[i]:(Mr[i]=d,i==="s"&&(Mr.ss=d-1),!0)}function Jx(i,d){if(!this.isValid())return this.localeData().invalidDate();var S=!1,b=Mr,N,A;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(S=i),typeof d=="object"&&(b=Object.assign({},Mr,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),N=this.localeData(),A=zx(this,!S,b,N),S&&(A=N.pastFuture(+this,A)),N.postformat(A)}var Kl=Math.abs;function _r(i){return(i>0)-(i<0)||+i}function _a(){if(!this.isValid())return this.localeData().invalidDate();var i=Kl(this._milliseconds)/1e3,d=Kl(this._days),S=Kl(this._months),b,N,A,Q,fe=this.asSeconds(),Te,ke,Tt,hn;return fe?(b=Vt(i/60),N=Vt(b/60),i%=60,b%=60,A=Vt(S/12),S%=12,Q=i?i.toFixed(3).replace(/\.?0+$/,""):"",Te=fe<0?"-":"",ke=_r(this._months)!==_r(fe)?"-":"",Tt=_r(this._days)!==_r(fe)?"-":"",hn=_r(this._milliseconds)!==_r(fe)?"-":"",Te+"P"+(A?ke+A+"Y":"")+(S?ke+S+"M":"")+(d?Tt+d+"D":"")+(N||b||i?"T":"")+(N?hn+N+"H":"")+(b?hn+b+"M":"")+(i?hn+Q+"S":"")):"P0D"}var xe=Ca.prototype;xe.isValid=Wk,xe.abs=Ex,xe.add=wx,xe.subtract=Cx,xe.as=Nx,xe.asMilliseconds=Nh,xe.asSeconds=kx,xe.asMinutes=Ix,xe.asHours=xx,xe.asDays=Mx,xe.asWeeks=_x,xe.asMonths=Lx,xe.asQuarters=Ox,xe.asYears=Rx,xe.valueOf=Bx,xe._bubble=Dx,xe.clone=Px,xe.get=Ax,xe.milliseconds=Fx,xe.seconds=Vx,xe.minutes=$x,xe.hours=Kx,xe.days=Hx,xe.weeks=Yx,xe.months=Wx,xe.years=Gx,xe.humanize=Jx,xe.toISOString=_a,xe.toString=_a,xe.toJSON=_a,xe.locale=uh,xe.localeData=fh,xe.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_a),xe.lang=mh,V("X",0,0,"unix"),V("x",0,0,"valueOf"),me("x",yt),me("X",Ln),$e("X",function(i,d,S){S._d=new Date(parseFloat(i)*1e3)}),$e("x",function(i,d,S){S._d=new Date(Ce(i))});//! moment.js
|
|
1978
1978
|
return r.version="2.30.1",a(Ue),r.fn=le,r.min=Vk,r.max=$k,r.now=Kk,r.utc=y,r.unix=hx,r.months=gx,r.isDate=u,r.locale=On,r.invalid=M,r.duration=Ut,r.isMoment=C,r.weekdays=vx,r.parseZone=Sx,r.localeData=pn,r.isDuration=Da,r.monthsShort=bx,r.weekdaysMin=Tx,r.defineLocale=Il,r.updateLocale=Sk,r.locales=gk,r.weekdaysShort=yx,r.normalizeUnits=He,r.relativeTimeRounding=jx,r.relativeTimeThreshold=qx,r.calendarFormat=uI,r.prototype=le,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})}(fi)),fi.exports}(function(e,t){(function(n,r){r(typeof Qt=="function"?nn():n.moment)})(jt,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 Qt=="function"?nn():n.moment)})(jt,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 Qt=="function"?nn():n.moment)})(jt,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)}})},lw=(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"))||[],f=document.body.querySelector(".sps-navbar-container");let m=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=""),m&&(m.style.width="",m.style.height=""),c&&Array.from(c).forEach((T,E)=>{const D=p[E];if(D){const M=D.getAttribute("data-resizekey"),I=M&&n?n[M]:void 0;if(I){const k=`${I}px`;D.style.minWidth=k,D.style.maxWidth=k,D.style.width=k,T.style.minWidth=k,T.style.maxWidth=k,T.style.width=k}else D.style.minWidth="",D.style.width="",D.style.maxWidth="",T.style.minWidth="",T.style.width="",T.style.maxWidth=""}else T.style.minWidth="",T.style.width="",T.style.maxWidth=""})},g=()=>{a&&r&&(a.scrollLeft=r.scrollLeft)},y=()=>{let T=null;u===window?T=f?f.getBoundingClientRect().height:0:u instanceof HTMLElement&&(T=u.getBoundingClientRect().top);const E=r.scrollLeft,D=a==null?void 0:a.getBoundingClientRect(),M=r.getBoundingClientRect();if(T&&D&&D.top<=T&&T<=M.bottom-D.height&&M.top<=T){if(c&&Array.from(c).forEach((I,k)=>{const F=I.getBoundingClientRect().width,P=p[k].getBoundingClientRect().width,C=`${Math.max(F,P)}px`;p[k].style.minWidth=C,p[k].style.width=C,p[k].style.maxWidth=C,I.style.minWidth=C,I.style.width=C,I.style.maxWidth=C}),a&&e.current){a.style.position="fixed",a.style.top=`${T}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}m||(m=document.createElement("div"),m.style.width=`${D.width}px`,m.style.height=`${D.height}px`,m.className="placeholder-head",r.insertBefore(m,s))}else m&&(r.removeChild(m),m=null,h());r.scrollLeft=E,g()},w=()=>{h(),y(),g()};return a&&a.classList.contains("sps-table__head--pinned")&&(u=uc(r)||window,u.addEventListener("scroll",y),window.addEventListener("resize",w),r.addEventListener("scroll",g),w()),()=>{u&&(u.removeEventListener("scroll",y),window.removeEventListener("resize",w)),r.removeEventListener("scroll",g)}})},cw=(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),f=s.getBoundingClientRect().height,m=a.getBoundingClientRect().height,u=r.scrollTop,h=f+p-r.getBoundingClientRect().height-r.scrollTop,g=r.scrollLeft;c.style.bottom=`${-u}px`,c.style.left=`${g}px`,c.style.opacity=h>0?"1":"0",l.style.top=`${u+m}px`,l.style.left=`${g}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()})},dw={sort:"SortedColumn",onSortChange:"SortChangeHandler",selectable:"boolean",maxHeightPx:"number",maxHeightRem:"number",resizeable:"boolean",resizeState:"ResizeState",onResizeStateChange:"ResizeStateChangeHandler"};function qn({children:e,className:t,onSortChange:n,sort:r,"data-testid":a,unsafelyReplaceClassName:s,maxHeightPx:l,maxHeightRem:c,resizeable:p,resizeState:f,onResizeStateChange:m,...u}){const h=U(s||"sps-table-container",t),g=l?l/16:c,y=g?{maxHeight:`${g}rem`}:{},w=o.useRef(null);return cw(w,g),iw(w),lw(w,g,f),o.createElement(sw,{resizeable:p,resizeState:f,onResizeStateChange:m,sort:r,onSortChange:n},o.createElement("div",{ref:w,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(qn,{props:dw,displayName:"SpsTable"});function wu(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 Cu=({tableHeaderRef:e,resizerRef:t,resizeKey:n})=>{const{resizeable:r,resizeState:a,setSingleResizeState:s}=o.useContext(na),l=!!r&&!!n,c=l?a==null?void 0:a[n]:0;return o.useLayoutEffect(()=>{var F,P;let p,f=c,m=0;const u=wu(e.current),h=(F=e.current)==null?void 0:F.querySelector(".sps-table__column-resizer"),g=(P=e.current)==null?void 0:P.querySelector(".sps-table__column-resizer-guide");function y(){if(e.current&&p&&(h&&(h.style.backgroundColor=Oa.colors.blue200,h.style.zIndex="999"),g&&u&&(g.style.height=`${u.getBoundingClientRect().height}px`,g.style.display="block"),u)){const C=u.querySelectorAll("thead > tr > th");for(let R=0;R<C.length;R+=1){const O=C[R].querySelector(".sps-table__column-resizer");C[R].style.cursor="col-resize",C[R]!==e.current&&O&&(C[R].classList.remove("sps-table__header--resizeable"),O.style.display="none")}}}function w(){e.current&&p&&h&&g&&(h.style.right=`${m}px`,h.style.zIndex="999",g.style.right=`${m}px`)}function T(){if(e.current){const C=f?`${f}px`:"";e.current.style.width=C,e.current.style.maxWidth=C,e.current.style.minWidth=C;const R=e.current.querySelector(".sps-table__header-cell-body");if(R&&(R.style.overflow=C?"hidden":"",R.style.textOverflow=C?"ellipsis":""),h&&g&&(h.style.right="0",h.style.backgroundColor="",h.style.zIndex="0",g.style.right="0",g.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=C=>{e.current&&(C.preventDefault(),p=C.clientX,f=e.current.clientWidth,y())},D=C=>{if(!p||!e.current)return;const R=Math.max(Math.min(p-C.clientX,40),-40);R!==0&&(p=C.clientX,m+=R,f=Math.max(f-R,40),w())},M=()=>{!e.current||!p||(p=0,m=0,T(),s(n,f))},I=()=>{f=0,T(),s(n,f)};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",D),window.addEventListener("dragend",M),window.addEventListener("mouseup",M),k=!0,T()),()=>{t.current&&k&&(t.current.removeEventListener("dragstart",E),t.current.removeEventListener("mousedown",E),t.current.removeEventListener("dblclick",I)),k&&(window.removeEventListener("mousemove",D),window.removeEventListener("dragend",M),window.removeEventListener("mouseup",M))}},[l,c,n,s]),{isResizeable:l}},Du=e=>{const{resizeable:t,resizeState:n}=o.useContext(na);o.useLayoutEffect(()=>{if(!t||!n||!e.current)return;const r=wu(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||"")})},Nu={controlCell:"boolean",sortKey:"string",resizeKey:"string",pinned:"boolean"};function lt({children:e,className:t,controlCell:n,sortKey:r,resizeKey:a="","data-testid":s,unsafelyReplaceClassName:l,pinned:c=!1,...p}){const{sort:f,setSort:m}=o.useContext(na),u=f==null?void 0:f.find(D=>D.key===r),h=()=>{if(r&&!n){const D=(u==null?void 0:u.direction)===Y.SortDirection.ASCENDING?Y.SortDirection.DESCENDING:Y.SortDirection.ASCENDING;m([{key:r,direction:D}])}},g=D=>{(D.key==="Enter"||D.key===" "||D.key==="Spacebar")&&(D.preventDefault(),h())},y=o.useRef(null);Eu(c,y);const w=o.useRef(null),{isResizeable:T}=Cu({tableHeaderRef:y,resizerRef:w,resizeKey:a}),E=U(l||"sps-table__header",n&&"sps-table__header--control",!r&&"sps-table__header--sort-disabled",(u==null?void 0:u.direction)===Y.SortDirection.ASCENDING&&"sps-table__header--sorted-asc",(u==null?void 0:u.direction)===Y.SortDirection.DESCENDING&&"sps-table__header--sorted-desc",c&&"sps-table__cell--pinned",T&&"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:g},e),T&&o.createElement(o.Fragment,null,o.createElement("span",{ref:w,className:U("sps-table__column-resizer")}),o.createElement("span",{className:U("sps-table__column-resizer-guide")})))}Object.assign(lt,{props:Nu,displayName:"SpsTableHeader"});function ku(e){return o.createElement(lt,{...e})}Object.assign(ku,{props:Nu,displayName:"SpsTh"});const Iu={pinned:"boolean"};function Cn({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,pinned:a,...s}){const l=U(r||"sps-table__head",a&&"sps-table__head--pinned",t);return o.createElement("thead",{className:l,"data-testid":`${n}__head`,...s},e)}Object.assign(Cn,{props:Iu,displayName:"SpsTableHead"});function xu(e){return o.createElement(Cn,{...e})}Object.assign(xu,{props:Iu,displayName:"SpsThead"});const Mu={};function Ye({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,...a}){const s=U(r||"sps-table__row",t);return o.createElement("tr",{className:s,role:"row","data-testid":`${n}__row`,...a},e)}Object.assign(Ye,{props:Mu,displayName:"SpsTableRow"});function _u(e){return o.createElement(Ye,{...e})}Object.assign(_u,{props:Mu,displayName:"SpsTr"});const Lu={};function Dn(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=U(a||"sps-table__body",n);return o.createElement("tbody",{className:l,"data-testid":`${r}__body`,...s},t)}Object.assign(Dn,{props:Lu,displayName:"SpsTableBody"});function Ou(e){return o.createElement(Dn,{...e})}Object.assign(Ou,{props:Lu,displayName:"SpsTbody"});const Ru={buttonCell:"boolean",controlCell:"boolean",wrap:"SpsTableCellWrapWidth",pinned:"boolean"};function ue(e){const{buttonCell:t,children:n,className:r,controlCell:a,"data-testid":s,unsafelyReplaceClassName:l,wrap:c,pinned:p=!1,...f}=e,m=U(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 Eu(p,u),Du(u),o.createElement("td",{className:m,ref:u,role:"cell","data-testid":`${s}__cell`,...f},n)}Object.assign(ue,{props:Ru,displayName:"SpsTableCell"});function Bu(e){return o.createElement(ue,{...e})}Object.assign(Bu,{props:Ru,displayName:"SpsTd"});const pw={};function Pu(e){const{children:t,className:n,unsafelyReplaceClassName:r,...a}=e,[s,l,c]=Mt(t,[{type:ze,props:{kind:Y.ButtonKind.LINK}},[{type:ze,props:{kind:Y.ButtonKind.ICON}},{type:jn}]]),p=s.length>0&&(l.length>0||c.length>0),f=l.length>0&&c.length>0,m=U(r||"sps-button-group",n);return o.createElement("div",{className:m,...a},s.length>0&&s,p&&o.createElement("div",{className:"sps-vertical-rule"}),l.length>0&&l,f&&o.createElement("div",{className:"sps-vertical-rule"}),c.length>0&&c)}Object.assign(Pu,{props:pw,displayName:"SpsButtonGroup"});const uw={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)}})},lw=(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"))||[],f=document.body.querySelector(".sps-navbar-container");let m=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=""),m&&(m.style.width="",m.style.height=""),c&&Array.from(c).forEach((T,E)=>{const D=p[E];if(D){const M=D.getAttribute("data-resizekey"),I=M&&n?n[M]:void 0;if(I){const k=`${I}px`;D.style.minWidth=k,D.style.maxWidth=k,D.style.width=k,T.style.minWidth=k,T.style.maxWidth=k,T.style.width=k}else D.style.minWidth="",D.style.width="",D.style.maxWidth="",T.style.minWidth="",T.style.width="",T.style.maxWidth=""}else T.style.minWidth="",T.style.width="",T.style.maxWidth=""})},g=()=>{a&&r&&(a.scrollLeft=r.scrollLeft)},y=()=>{let T=null;u===window?T=f?f.getBoundingClientRect().height:0:u instanceof HTMLElement&&(T=u.getBoundingClientRect().top);const E=r.scrollLeft,D=a==null?void 0:a.getBoundingClientRect(),M=r.getBoundingClientRect();if(T&&D&&D.top<=T&&T<=M.bottom-D.height&&M.top<=T){if(c&&Array.from(c).forEach((I,k)=>{const F=I.getBoundingClientRect().width,P=p[k].getBoundingClientRect().width,C=`${Math.max(F,P)}px`;p[k].style.minWidth=C,p[k].style.width=C,p[k].style.maxWidth=C,I.style.minWidth=C,I.style.width=C,I.style.maxWidth=C}),a&&e.current){a.style.position="fixed",a.style.top=`${T}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}m||(m=document.createElement("div"),m.style.width=`${D.width}px`,m.style.height=`${D.height}px`,m.className="placeholder-head",r.insertBefore(m,s))}else m&&(r.removeChild(m),m=null,h());r.scrollLeft=E,g()},w=()=>{h(),y(),g()};return a&&a.classList.contains("sps-table__head--pinned")&&(u=uc(r)||window,u.addEventListener("scroll",y),window.addEventListener("resize",w),r.addEventListener("scroll",g),w()),()=>{u&&(u.removeEventListener("scroll",y),window.removeEventListener("resize",w)),r.removeEventListener("scroll",g)}})},cw=(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),f=s.getBoundingClientRect().height,m=a.getBoundingClientRect().height,u=r.scrollTop,h=f+p-r.getBoundingClientRect().height-r.scrollTop,g=r.scrollLeft;c.style.bottom=`${-u}px`,c.style.left=`${g}px`,c.style.opacity=h>0?"1":"0",l.style.top=`${u+m}px`,l.style.left=`${g}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()})},dw={sort:"SortedColumn",onSortChange:"SortChangeHandler",selectable:"boolean",maxHeightPx:"number",maxHeightRem:"number",resizeable:"boolean",resizeState:"ResizeState",onResizeStateChange:"ResizeStateChangeHandler"};function qn({children:e,className:t,onSortChange:n,sort:r,"data-testid":a,unsafelyReplaceClassName:s,maxHeightPx:l,maxHeightRem:c,resizeable:p,resizeState:f,onResizeStateChange:m,...u}){const h=U(s||"sps-table-container",t),g=l?l/16:c,y=g?{maxHeight:`${g}rem`}:{},w=o.useRef(null);return cw(w,g),iw(w),lw(w,g,f),o.createElement(sw,{resizeable:p,resizeState:f,onResizeStateChange:m,sort:r,onSortChange:n},o.createElement("div",{ref:w,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(qn,{props:dw,displayName:"SpsTable"});function wu(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 Cu=({tableHeaderRef:e,resizerRef:t,resizeKey:n})=>{const{resizeable:r,resizeState:a,setSingleResizeState:s}=o.useContext(na),l=!!r&&!!n,c=l?a==null?void 0:a[n]:0;return o.useLayoutEffect(()=>{var F,P;let p,f=c,m=0;const u=wu(e.current),h=(F=e.current)==null?void 0:F.querySelector(".sps-table__column-resizer"),g=(P=e.current)==null?void 0:P.querySelector(".sps-table__column-resizer-guide");function y(){if(e.current&&p&&(h&&(h.style.backgroundColor=Oa.colors.blue200,h.style.zIndex="999"),g&&u&&(g.style.height=`${u.getBoundingClientRect().height}px`,g.style.display="block"),u)){const C=u.querySelectorAll("thead > tr > th");for(let R=0;R<C.length;R+=1){const O=C[R].querySelector(".sps-table__column-resizer");C[R].style.cursor="col-resize",C[R]!==e.current&&O&&(C[R].classList.remove("sps-table__header--resizeable"),O.style.display="none")}}}function w(){e.current&&p&&h&&g&&(h.style.right=`${m}px`,h.style.zIndex="999",g.style.right=`${m}px`)}function T(){if(e.current){const C=f?`${f}px`:"";e.current.style.width=C,e.current.style.maxWidth=C,e.current.style.minWidth=C;const R=e.current.querySelector(".sps-table__header-cell-body");if(R&&(R.style.overflow=C?"hidden":"",R.style.textOverflow=C?"ellipsis":""),h&&g&&(h.style.right="0",h.style.backgroundColor="",h.style.zIndex="0",g.style.right="0",g.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=C=>{e.current&&(C.preventDefault(),p=C.clientX,f=e.current.clientWidth,y())},D=C=>{if(!p||!e.current)return;const R=Math.max(Math.min(p-C.clientX,40),-40);R!==0&&(p=C.clientX,m+=R,f=Math.max(f-R,40),w())},M=()=>{!e.current||!p||(p=0,m=0,T(),s(n,f))},I=()=>{f=0,T(),s(n,f)};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",D),window.addEventListener("dragend",M),window.addEventListener("mouseup",M),k=!0,T()),()=>{t.current&&k&&(t.current.removeEventListener("dragstart",E),t.current.removeEventListener("mousedown",E),t.current.removeEventListener("dblclick",I)),k&&(window.removeEventListener("mousemove",D),window.removeEventListener("dragend",M),window.removeEventListener("mouseup",M))}},[l,c,n,s]),{isResizeable:l}},Du=e=>{const{resizeable:t,resizeState:n}=o.useContext(na);o.useLayoutEffect(()=>{if(!t||!n||!e.current)return;const r=wu(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||"")})},Nu={controlCell:"boolean",sortKey:"string",resizeKey:"string",pinned:"boolean"};function it({children:e,className:t,controlCell:n,sortKey:r,resizeKey:a="","data-testid":s,unsafelyReplaceClassName:l,pinned:c=!1,...p}){const{sort:f,setSort:m}=o.useContext(na),u=f==null?void 0:f.find(D=>D.key===r),h=()=>{if(r&&!n){const D=(u==null?void 0:u.direction)===Y.SortDirection.ASCENDING?Y.SortDirection.DESCENDING:Y.SortDirection.ASCENDING;m([{key:r,direction:D}])}},g=D=>{(D.key==="Enter"||D.key===" "||D.key==="Spacebar")&&(D.preventDefault(),h())},y=o.useRef(null);Eu(c,y);const w=o.useRef(null),{isResizeable:T}=Cu({tableHeaderRef:y,resizerRef:w,resizeKey:a}),E=U(l||"sps-table__header",n&&"sps-table__header--control",!r&&"sps-table__header--sort-disabled",(u==null?void 0:u.direction)===Y.SortDirection.ASCENDING&&"sps-table__header--sorted-asc",(u==null?void 0:u.direction)===Y.SortDirection.DESCENDING&&"sps-table__header--sorted-desc",c&&"sps-table__cell--pinned",T&&"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:g},e),T&&o.createElement(o.Fragment,null,o.createElement("span",{ref:w,className:U("sps-table__column-resizer")}),o.createElement("span",{className:U("sps-table__column-resizer-guide")})))}Object.assign(it,{props:Nu,displayName:"SpsTableHeader"});function ku(e){return o.createElement(it,{...e})}Object.assign(ku,{props:Nu,displayName:"SpsTh"});const Iu={pinned:"boolean"};function Cn({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,pinned:a,...s}){const l=U(r||"sps-table__head",a&&"sps-table__head--pinned",t);return o.createElement("thead",{className:l,"data-testid":`${n}__head`,...s},e)}Object.assign(Cn,{props:Iu,displayName:"SpsTableHead"});function xu(e){return o.createElement(Cn,{...e})}Object.assign(xu,{props:Iu,displayName:"SpsThead"});const Mu={};function Ye({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,...a}){const s=U(r||"sps-table__row",t);return o.createElement("tr",{className:s,role:"row","data-testid":`${n}__row`,...a},e)}Object.assign(Ye,{props:Mu,displayName:"SpsTableRow"});function _u(e){return o.createElement(Ye,{...e})}Object.assign(_u,{props:Mu,displayName:"SpsTr"});const Lu={};function Dn(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=U(a||"sps-table__body",n);return o.createElement("tbody",{className:l,"data-testid":`${r}__body`,...s},t)}Object.assign(Dn,{props:Lu,displayName:"SpsTableBody"});function Ou(e){return o.createElement(Dn,{...e})}Object.assign(Ou,{props:Lu,displayName:"SpsTbody"});const Ru={buttonCell:"boolean",controlCell:"boolean",wrap:"SpsTableCellWrapWidth",pinned:"boolean"};function ue(e){const{buttonCell:t,children:n,className:r,controlCell:a,"data-testid":s,unsafelyReplaceClassName:l,wrap:c,pinned:p=!1,...f}=e,m=U(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 Eu(p,u),Du(u),o.createElement("td",{className:m,ref:u,role:"cell","data-testid":`${s}__cell`,...f},n)}Object.assign(ue,{props:Ru,displayName:"SpsTableCell"});function Bu(e){return o.createElement(ue,{...e})}Object.assign(Bu,{props:Ru,displayName:"SpsTd"});const pw={};function Pu(e){const{children:t,className:n,unsafelyReplaceClassName:r,...a}=e,[s,l,c]=Mt(t,[{type:ze,props:{kind:Y.ButtonKind.LINK}},[{type:ze,props:{kind:Y.ButtonKind.ICON}},{type:jn}]]),p=s.length>0&&(l.length>0||c.length>0),f=l.length>0&&c.length>0,m=U(r||"sps-button-group",n);return o.createElement("div",{className:m,...a},s.length>0&&s,p&&o.createElement("div",{className:"sps-vertical-rule"}),l.length>0&&l,f&&o.createElement("div",{className:"sps-vertical-rule"}),c.length>0&&c)}Object.assign(Pu,{props:pw,displayName:"SpsButtonGroup"});const uw={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
|
-
`}}}},Vu={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(qn,null,o.createElement(Cn,null,o.createElement(
|
|
4895
|
+
`}}}},Vu={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(qn,null,o.createElement(Cn,null,o.createElement(it,null,"Order"),o.createElement(it,null,"Section"),o.createElement(it,null,"Content Varieties")),o.createElement(Dn,null,o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"1")),o.createElement(ue,null,"Selection Counter"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"2")),o.createElement(ue,null,"Action Buttons"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"3")),o.createElement(ue,null,"Clear Button"),o.createElement(ue,null,o.createElement(Kt,{className:"mr-1"},"Basic Buttons"),o.createElement(Kt,{className:"mr-1"},"Icon Buttons"),o.createElement(Kt,{className:"mr-1"},"Text Buttons"))))))}},Sw={kind:"FeedbackBlockKind",message:{type:"string",required:!0}};function Ti(e){const{className:t,kind:n=Y.FeedbackBlockKind.INFO,message:r,"data-testid":a,unsafelyReplaceClassName:s,...l}=e,c=U(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-${Y.FeedbackBlockIcons[n]}`,"aria-hidden":"true","data-testid":`${a}__icon`}),o.createElement("span",null,r))}Object.assign(Ti,{props:Sw,displayName:"SpsMicroBlock"});const $u={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`
|
|
@@ -9137,7 +9137,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9137
9137
|
</>
|
|
9138
9138
|
);
|
|
9139
9139
|
}
|
|
9140
|
-
`}}}},Gw={Autocomplete:{components:[Xt],examples:mc},Checkboxes:{components:[Vn],examples:fc},"Clickable Tags":{components:[Fr],examples:hc},"Column Chooser":{components:[li,jo],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:[Hi],examples:fm},"Content Rows":{components:[ci,Yn,qo],examples:Yp},"Content Sections":{components:[gi],examples:vu},"Date Pickers":{components:[di],examples:Xp},"Date Range Pickers":{components:[ui],examples:tu},"Date Time Range Pickers":{components:[mi],examples:iu},Datetime:{components:[hi],examples:cu},"Time Input":{components:[Gi],examples:bm},"Description Lists":{description:()=>o.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[Xo,Qo,ta],examples:gu},Dropdown:{components:[jn,Si],examples:bu},"Filter Panel":{components:[Fi,Vi,$i,Ki],examples:mm},Form:{components:[oo],examples:Wp},Incrementor:{components:[bi],examples:yu},Label:{description:()=>o.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[vi],examples:Tu},"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:[yi],examples:Vu},"Micro Block":{components:[Ti],examples:$u},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:[Ei,ra],examples:Hu},"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:[Ci],examples:Wu},"Multi Value Text Input":{description:()=>o.createElement("p",null,"To be determined."),components:[Wi],examples:Sm},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:[Di,oa],examples:Gu},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[Ni],examples:Yu},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:[Un],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:[zu],examples:ju},"Split Button":{components:[ki],examples:qu},"Summary List Row":{components:[Ii,xi,so],examples:Ju},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:[qn,Dn,ue,Cn,lt,Ye],examples:Fu},"Task Queue":{components:[Mi],examples:Zu},"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:[sa],examples:Xu},"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:[_i],examples:Qu},Toggles:{description:()=>o.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[Li],examples:tm},Tooltips:{components:[Rt,Oi],examples:nm},Wizard:{components:[Bi,Pi],examples:am},Workflow:{components:[ia,la,ca,da],examples:um,notices:[Pw]},"Slide In Panels":{description:"",components:[wi],examples:Ku}},vm=new WeakMap;function pa(e,t,n){return e?(typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${vm.get(e)}-${n}-${t}`):""}const io=typeof document<"u"?x.useLayoutEffect:()=>{};function Tr(e){const t=x.useRef(null);return io(()=>{t.current=e},[e]),x.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const ua={prefix:String(Math.round(Math.random()*1e10)),current:0},ym=x.createContext(ua),Yw=x.createContext(!1);let Uw=!!(typeof window<"u"&&window.document&&window.document.createElement),Yi=new WeakMap;function zw(e=!1){let t=x.useContext(ym),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=Yi.get(s);l==null?Yi.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==l.state&&(t.current=l.id,Yi.delete(s))}n.current=++t.current}return n.current}function jw(e){let t=x.useContext(ym);t===ua&&!Uw&&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=zw(!!e),r=t===ua&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function qw(e){let t=x.useId(),[n]=x.useState(Tm()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${ua.prefix}`;return e||`${r}-${t}`}const Jw=typeof x.useId=="function"?qw:jw;function Zw(){return!1}function Xw(){return!0}function Qw(e){return()=>{}}function Tm(){return typeof x.useSyncExternalStore=="function"?x.useSyncExternalStore(Qw,Zw,Xw):x.useContext(Yw)}let eC=!!(typeof window<"u"&&window.document&&window.document.createElement),Nn=new Map;function Em(e){let[t,n]=x.useState(e),r=x.useRef(null),a=Jw(t),s=x.useCallback(l=>{r.current=l},[]);return eC&&(Nn.has(a)&&!Nn.get(a).includes(s)?Nn.set(a,[...Nn.get(a),s]):Nn.set(a,[s])),io(()=>{let l=a;return()=>{Nn.delete(l)}},[a]),x.useEffect(()=>{let l=r.current;l&&(r.current=null,n(l))}),a}function tC(e,t){if(e===t)return e;let n=Nn.get(e);if(n)return n.forEach(a=>a(t)),t;let r=Nn.get(t);return r?(r.forEach(a=>a(e)),e):t}function wm(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const It=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Jn=e=>e&&"window"in e&&e.window===e?e:It(e).defaultView||window;function Cm(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=Cm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nC(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Cm(e))&&(r&&(r+=" "),r+=t);return r}function kn(...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]=wm(s,l):(a==="className"||a==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?t[a]=nC(s,l):a==="id"&&s&&l?t.id=tC(s,l):t[a]=l!==void 0?l:s}}return t}const rC=new Set(["id"]),oC=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),aC=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),sC=/^(data-.*)$/;function iC(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,s={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(rC.has(l)||n&&oC.has(l)||r&&aC.has(l)||a!=null&&a.has(l)||sC.test(l))&&(s[l]=e[l]);return s}function rn(e){if(lC())e.focus({preventScroll:!0});else{let t=cC(e);e.focus(),dC(t)}}let ma=null;function lC(){if(ma==null){ma=!1;try{document.createElement("div").focus({get preventScroll(){return ma=!0,!0}})}catch{}}return ma}function cC(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 dC(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function fa(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 Ui(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 on(e){let t=null;return()=>(t==null&&(t=e()),t)}const Zn=on(function(){return Ui(/^Mac/i)}),pC=on(function(){return Ui(/^iPhone/i)}),Dm=on(function(){return Ui(/^iPad/i)||Zn()&&navigator.maxTouchPoints>1}),zi=on(function(){return pC()||Dm()}),uC=on(function(){return Zn()||zi()}),mC=on(function(){return fa(/AppleWebKit/i)&&!fC()}),fC=on(function(){return fa(/Chrome/i)}),Nm=on(function(){return fa(/Android/i)}),hC=on(function(){return fa(/Firefox/i)}),SC=x.createContext({isNative:!0,open:bC,useHref:e=>e});function ji(){return x.useContext(SC)}function Xn(e,t,n=!0){var r,a;let{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}=t;hC()&&(!((a=window.event)===null||a===void 0||(r=a.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Zn()?s=!0:l=!0);let f=mC()&&Zn()&&!Dm()?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});Xn.isOpening=n,rn(e),e.dispatchEvent(f),Xn.isOpening=!1}Xn.isOpening=!1;function gC(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 bC(e,t){gC(e,n=>Xn(n,t))}function vC(e){let t=ji();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 Er=new Map,qi=new Set;function km(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=Er.get(r.target);a||(a=new Set,Er.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=Er.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),Er.delete(r.target)),Er.size===0)){for(let s of qi)s();qi.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?km():document.addEventListener("DOMContentLoaded",km));function Im(e){requestAnimationFrame(()=>{Er.size===0?e():qi.add(e)})}function xm(){let e=x.useRef(new Map),t=x.useCallback((a,s,l,c)=>{let p=c!=null&&c.once?(...f)=>{e.current.delete(l),l(...f)}: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 f=((p=e.current.get(l))===null||p===void 0?void 0:p.fn)||l;a.removeEventListener(s,f,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 Mm(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=Em(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 yC(e,t){io(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function TC(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 EC(e,t){const n=[];for(;e&&e!==document.documentElement;)TC(e,t)&&n.push(e),e=e.parentElement;return n}let wC=0;const Ji=new Map;function CC(e){let[t,n]=x.useState();return io(()=>{if(!e)return;let r=Ji.get(e);if(r)n(r.element.id);else{let a=`react-aria-description-${wC++}`;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},Ji.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Ji.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function _m(e,t,n,r){let a=Tr(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 Lm(e,t){let n=Om(e,t,"left"),r=Om(e,t,"top"),a=t.offsetWidth,s=t.offsetHeight,l=e.scrollLeft,c=e.scrollTop,{borderTopWidth:p,borderLeftWidth:f}=getComputedStyle(e),m=e.scrollLeft+parseInt(f,10),u=e.scrollTop+parseInt(p,10),h=m+e.clientWidth,g=u+e.clientHeight;n<=l?l=n-parseInt(f,10):n+a>h&&(l+=n+a-h),r<=u?c=r-parseInt(p,10):r+s>g&&(c+=r+s-g),e.scrollLeft=l,e.scrollTop=c}function Om(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 Rm(e,t){if(document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let p=EC(e);for(let f of p)Lm(f,e)}else{var n;let{left:p,top:f}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:m,top:u}=e.getBoundingClientRect();if(Math.abs(p-m)>1||Math.abs(f-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 Zi(e){return e.mozInputSource===0&&e.isTrusted?!0:Nm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function DC(e){return!Nm()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Bm(e,t,n){let[r,a]=x.useState(e||t),s=x.useRef(e!==void 0),l=e!==void 0;x.useEffect(()=>{let f=s.current;f!==l&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let c=l?e:r,p=x.useCallback((f,...m)=>{let u=(h,...g)=>{n&&(Object.is(c,h)||n(h,...g)),l||(c=h)};typeof f=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((g,...y)=>{let w=f(l?c:g,...y);return u(w,...m),l?g:w})):(l||a(f),u(f,...m))},[l,c,n]);return[c,p]}function Xi(e){return uC()?e.altKey:e.ctrlKey}function wr(e){return Zn()?e.metaKey:e.ctrlKey}const NC=1e3;function kC(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,a=x.useRef({search:"",timeout:null}).current,s=l=>{let c=IC(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=""},NC)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:null}}}function IC(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}let Cr="default",Qi="",ha=new WeakMap;function Pm(e){if(zi()){if(Cr==="default"){const t=It(e);Qi=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Cr="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(ha.set(e,e.style.userSelect),e.style.userSelect="none")}function Sa(e){if(zi()){if(Cr!=="disabled")return;Cr="restoring",setTimeout(()=>{Im(()=>{if(Cr==="restoring"){const t=It(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Qi||""),Qi="",Cr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&ha.has(e)){let t=ha.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),ha.delete(e)}}const Am=x.createContext({register:()=>{}});Am.displayName="PressResponderContext";function xC(e,t){return t.get?t.get.call(e):t.value}function Fm(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function MC(e,t){var n=Fm(e,t,"get");return xC(e,n)}function _C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function LC(e,t,n){_C(e,t),t.set(e,n)}function OC(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 Vm(e,t,n){var r=Fm(e,t,"set");return OC(e,r,n),n}function RC(e){let t=x.useContext(Am);if(t){let{register:n,...r}=t;e=kn(r,e),n()}return yC(t,e.ref),e}var ga=new WeakMap;class ba{continuePropagation(){Vm(this,ga,!1)}get shouldStopPropagation(){return MC(this,ga)}constructor(t,n,r,a){LC(this,ga,{writable:!0,value:void 0}),Vm(this,ga,!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,f=0,m,u=null;r.clientX!=null&&r.clientY!=null&&(m=r.clientX,u=r.clientY),c&&(m!=null&&u!=null?(p=m-c.left,f=u-c.top):(p=c.width/2,f=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=f}}const $m=Symbol("linkClicked");function Km(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:s,isDisabled:l,isPressed:c,preventFocusOnPress:p,shouldCancelOnPointerExit:f,allowTextSelectionOnPress:m,ref:u,...h}=RC(e),[g,y]=x.useState(!1),w=x.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:T,removeAllGlobalListeners:E}=xm(),D=Tr((C,R)=>{let O=w.current;if(l||O.didFirePressStart)return!1;let $=!0;if(O.isTriggeringEvent=!0,r){let z=new ba("pressstart",R,C);r(z),$=z.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,y(!0),$}),M=Tr((C,R,O=!0)=>{let $=w.current;if(!$.didFirePressStart)return!1;$.ignoreClickAfterPress=!0,$.didFirePressStart=!1,$.isTriggeringEvent=!0;let z=!0;if(a){let L=new ba("pressend",R,C);a(L),z=L.shouldStopPropagation}if(n&&n(!1),y(!1),t&&O&&!l){let L=new ba("press",R,C);t(L),z&&(z=L.shouldStopPropagation)}return $.isTriggeringEvent=!1,z}),I=Tr((C,R)=>{let O=w.current;if(l)return!1;if(s){O.isTriggeringEvent=!0;let $=new ba("pressup",R,C);return s($),O.isTriggeringEvent=!1,$.shouldStopPropagation}return!0}),k=Tr(C=>{let R=w.current;R.isPressed&&R.target&&(R.isOverTarget&&R.pointerType!=null&&M(an(R.target,C),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,E(),m||Sa(R.target))}),F=Tr(C=>{f&&k(C)}),P=x.useMemo(()=>{let C=w.current,R={onKeyDown($){if(tl($.nativeEvent,$.currentTarget)&&$.currentTarget.contains($.target)){var z;Gm($.target,$.key)&&$.preventDefault();let L=!0;if(!C.isPressed&&!$.repeat){C.target=$.currentTarget,C.isPressed=!0,L=D($,"keyboard");let oe=$.currentTarget,B=ee=>{tl(ee,oe)&&!ee.repeat&&oe.contains(ee.target)&&C.target&&I(an(C.target,ee),"keyboard")};T(It($.currentTarget),"keyup",wm(B,O),!0)}L&&$.stopPropagation(),$.metaKey&&Zn()&&((z=C.metaKeyEvents)===null||z===void 0||z.set($.key,$.nativeEvent))}else $.key==="Meta"&&(C.metaKeyEvents=new Map)},onClick($){if(!($&&!$.currentTarget.contains($.target))&&$&&$.button===0&&!C.isTriggeringEvent&&!Xn.isOpening){let z=!0;if(l&&$.preventDefault(),!C.ignoreClickAfterPress&&!C.ignoreEmulatedMouseEvents&&!C.isPressed&&(C.pointerType==="virtual"||Zi($.nativeEvent))){!l&&!p&&rn($.currentTarget);let L=D($,"virtual"),oe=I($,"virtual"),B=M($,"virtual");z=L&&oe&&B}C.ignoreEmulatedMouseEvents=!1,C.ignoreClickAfterPress=!1,z&&$.stopPropagation()}}},O=$=>{var z;if(C.isPressed&&C.target&&tl($,C.target)){var L;Gm($.target,$.key)&&$.preventDefault();let B=$.target;M(an(C.target,$),"keyboard",C.target.contains(B)),E(),$.key!=="Enter"&&el(C.target)&&C.target.contains(B)&&!$[$m]&&($[$m]=!0,Xn(C.target,$,!1)),C.isPressed=!1,(L=C.metaKeyEvents)===null||L===void 0||L.delete($.key)}else if($.key==="Meta"&&(!((z=C.metaKeyEvents)===null||z===void 0)&&z.size)){var oe;let B=C.metaKeyEvents;C.metaKeyEvents=void 0;for(let ee of B.values())(oe=C.target)===null||oe===void 0||oe.dispatchEvent(new KeyboardEvent("keyup",ee))}};if(typeof PointerEvent<"u"){R.onPointerDown=B=>{if(B.button!==0||!B.currentTarget.contains(B.target))return;if(DC(B.nativeEvent)){C.pointerType="virtual";return}nl(B.currentTarget)&&B.preventDefault(),C.pointerType=B.pointerType;let ee=!0;C.isPressed||(C.isPressed=!0,C.isOverTarget=!0,C.activePointerId=B.pointerId,C.target=B.currentTarget,!l&&!p&&rn(B.currentTarget),m||Pm(C.target),ee=D(B,C.pointerType),T(It(B.currentTarget),"pointermove",$,!1),T(It(B.currentTarget),"pointerup",z,!1),T(It(B.currentTarget),"pointercancel",oe,!1)),ee&&B.stopPropagation()},R.onMouseDown=B=>{B.currentTarget.contains(B.target)&&B.button===0&&(nl(B.currentTarget)&&B.preventDefault(),B.stopPropagation())},R.onPointerUp=B=>{!B.currentTarget.contains(B.target)||C.pointerType==="virtual"||B.button===0&&Dr(B,B.currentTarget)&&I(B,C.pointerType||B.pointerType)};let $=B=>{B.pointerId===C.activePointerId&&(C.target&&Dr(B,C.target)?!C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!0,D(an(C.target,B),C.pointerType)):C.target&&C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!1,M(an(C.target,B),C.pointerType,!1),F(B)))},z=B=>{B.pointerId===C.activePointerId&&C.isPressed&&B.button===0&&C.target&&(Dr(B,C.target)&&C.pointerType!=null?M(an(C.target,B),C.pointerType):C.isOverTarget&&C.pointerType!=null&&M(an(C.target,B),C.pointerType,!1),C.isPressed=!1,C.isOverTarget=!1,C.activePointerId=null,C.pointerType=null,E(),m||Sa(C.target),"ontouchend"in C.target&&B.pointerType!=="mouse"&&T(C.target,"touchend",L,{once:!0}))},L=B=>{Wm(B.target)&&B.preventDefault()},oe=B=>{k(B)};R.onDragStart=B=>{B.currentTarget.contains(B.target)&&k(B)}}else{R.onMouseDown=L=>{if(L.button!==0||!L.currentTarget.contains(L.target))return;if(nl(L.currentTarget)&&L.preventDefault(),C.ignoreEmulatedMouseEvents){L.stopPropagation();return}C.isPressed=!0,C.isOverTarget=!0,C.target=L.currentTarget,C.pointerType=Zi(L.nativeEvent)?"virtual":"mouse",!l&&!p&&rn(L.currentTarget),D(L,C.pointerType)&&L.stopPropagation(),T(It(L.currentTarget),"mouseup",$,!1)},R.onMouseEnter=L=>{if(!L.currentTarget.contains(L.target))return;let oe=!0;C.isPressed&&!C.ignoreEmulatedMouseEvents&&C.pointerType!=null&&(C.isOverTarget=!0,oe=D(L,C.pointerType)),oe&&L.stopPropagation()},R.onMouseLeave=L=>{if(!L.currentTarget.contains(L.target))return;let oe=!0;C.isPressed&&!C.ignoreEmulatedMouseEvents&&C.pointerType!=null&&(C.isOverTarget=!1,oe=M(L,C.pointerType,!1),F(L)),oe&&L.stopPropagation()},R.onMouseUp=L=>{L.currentTarget.contains(L.target)&&!C.ignoreEmulatedMouseEvents&&L.button===0&&I(L,C.pointerType||"mouse")};let $=L=>{if(L.button===0){if(C.isPressed=!1,E(),C.ignoreEmulatedMouseEvents){C.ignoreEmulatedMouseEvents=!1;return}C.target&&Dr(L,C.target)&&C.pointerType!=null?M(an(C.target,L),C.pointerType):C.target&&C.isOverTarget&&C.pointerType!=null&&M(an(C.target,L),C.pointerType,!1),C.isOverTarget=!1}};R.onTouchStart=L=>{if(!L.currentTarget.contains(L.target))return;let oe=BC(L.nativeEvent);if(!oe)return;C.activePointerId=oe.identifier,C.ignoreEmulatedMouseEvents=!0,C.isOverTarget=!0,C.isPressed=!0,C.target=L.currentTarget,C.pointerType="touch",!l&&!p&&rn(L.currentTarget),m||Pm(C.target),D(In(C.target,L),C.pointerType)&&L.stopPropagation(),T(Jn(L.currentTarget),"scroll",z,!0)},R.onTouchMove=L=>{if(!L.currentTarget.contains(L.target))return;if(!C.isPressed){L.stopPropagation();return}let oe=Hm(L.nativeEvent,C.activePointerId),B=!0;oe&&Dr(oe,L.currentTarget)?!C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!0,B=D(In(C.target,L),C.pointerType)):C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!1,B=M(In(C.target,L),C.pointerType,!1),F(In(C.target,L))),B&&L.stopPropagation()},R.onTouchEnd=L=>{if(!L.currentTarget.contains(L.target))return;if(!C.isPressed){L.stopPropagation();return}let oe=Hm(L.nativeEvent,C.activePointerId),B=!0;oe&&Dr(oe,L.currentTarget)&&C.pointerType!=null?(I(In(C.target,L),C.pointerType),B=M(In(C.target,L),C.pointerType)):C.isOverTarget&&C.pointerType!=null&&(B=M(In(C.target,L),C.pointerType,!1)),B&&L.stopPropagation(),C.isPressed=!1,C.activePointerId=null,C.isOverTarget=!1,C.ignoreEmulatedMouseEvents=!0,C.target&&!m&&Sa(C.target),E()},R.onTouchCancel=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),C.isPressed&&k(In(C.target,L)))};let z=L=>{C.isPressed&&L.target.contains(C.target)&&k({currentTarget:C.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=L=>{L.currentTarget.contains(L.target)&&k(L)}}return R},[T,l,p,E,m,k,F,M,D,I]);return x.useEffect(()=>()=>{var C;m||Sa((C=w.current.target)!==null&&C!==void 0?C:void 0)},[m]),{isPressed:c||g,pressProps:kn(h,P)}}function el(e){return e.tagName==="A"&&e.hasAttribute("href")}function tl(e,t){const{key:n,code:r}=e,a=t,s=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof Jn(a).HTMLInputElement&&!Ym(a,n)||a instanceof Jn(a).HTMLTextAreaElement||a.isContentEditable)&&!((s==="link"||!s&&el(a))&&n!=="Enter")}function BC(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function Hm(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 In(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 an(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 PC(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 AC(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Dr(e,t){let n=t.getBoundingClientRect(),r=PC(e);return AC(n,r)}function nl(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function Wm(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!el(e)}function Gm(e,t){return e instanceof HTMLInputElement?!Ym(e,t):Wm(e)}const FC=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ym(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":FC.has(e.type)}let lo=null,VC=new Set,co=new Map,Qn=!1,rl=!1;function ol(e,t){for(let n of VC)n(e,t)}function $C(e){return!(e.metaKey||!Zn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function va(e){Qn=!0,$C(e)&&(lo="keyboard",ol("keyboard",e))}function Bt(e){lo="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Qn=!0,ol("pointer",e))}function Um(e){Zi(e)&&(Qn=!0,lo="virtual")}function zm(e){e.target===window||e.target===document||(!Qn&&!rl&&(lo="virtual",ol("virtual",e)),Qn=!1,rl=!1)}function jm(){Qn=!1,rl=!0}function qm(e){if(typeof window>"u"||co.get(Jn(e)))return;const t=Jn(e),n=It(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Qn=!0,r.apply(this,arguments)},n.addEventListener("keydown",va,!0),n.addEventListener("keyup",va,!0),n.addEventListener("click",Um,!0),t.addEventListener("focus",zm,!0),t.addEventListener("blur",jm,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Bt,!0),n.addEventListener("pointermove",Bt,!0),n.addEventListener("pointerup",Bt,!0)):(n.addEventListener("mousedown",Bt,!0),n.addEventListener("mousemove",Bt,!0),n.addEventListener("mouseup",Bt,!0)),t.addEventListener("beforeunload",()=>{Jm(e)},{once:!0}),co.set(t,{focus:r})}const Jm=(e,t)=>{const n=Jn(e),r=It(e);t&&r.removeEventListener("DOMContentLoaded",t),co.has(n)&&(n.HTMLElement.prototype.focus=co.get(n).focus,r.removeEventListener("keydown",va,!0),r.removeEventListener("keyup",va,!0),r.removeEventListener("click",Um,!0),n.removeEventListener("focus",zm,!0),n.removeEventListener("blur",jm,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Bt,!0),r.removeEventListener("pointermove",Bt,!0),r.removeEventListener("pointerup",Bt,!0)):(r.removeEventListener("mousedown",Bt,!0),r.removeEventListener("mousemove",Bt,!0),r.removeEventListener("mouseup",Bt,!0)),co.delete(n))};function KC(e){const t=It(e);let n;return t.readyState!=="loading"?qm(e):(n=()=>{qm(e)},t.addEventListener("DOMContentLoaded",n)),()=>Jm(e,n)}typeof document<"u"&&KC();function al(){return lo}const HC=500;function WC(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:a,threshold:s=HC,accessibilityDescription:l}=e;const c=x.useRef(void 0);let{addGlobalListener:p,removeGlobalListener:f}=xm(),{pressProps:m}=Km({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 g=y=>{y.preventDefault()};p(h.target,"contextmenu",g,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{f(h.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(h){c.current&&clearTimeout(c.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),u=CC(a&&!t?l:void 0);return{longPressProps:kn(m,u)}}function sl(e){const t=It(e);if(al()==="virtual"){let n=t.activeElement;Im(()=>{t.activeElement===n&&e.isConnected&&rn(e)})}else rn(e)}function GC(e){const t=Jn(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 YC(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 Zm(e,t){return e.nodeName!=="#comment"&&GC(e)&&YC(e,t)&&(!e.parentElement||Zm(e.parentElement,e))}const il=["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]"],UC=il.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";il.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const zC=il.join(':not([hidden]):not([tabindex="-1"]),');function Xm(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Qm(e,t,n){let r=t!=null&&t.tabbable?zC:UC,a=It(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)&&Zm(s)&&(!n||Xm(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 ll{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 ef({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&&Xm(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 ll;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 ef({scopeRef:null}),this.fastMap.set(null,this.root)}}class ef{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 ll;function jC(e,t){let n=t==null?void 0:t.isDisabled,[r,a]=x.useState(!1);return io(()=>{if(e!=null&&e.current&&!n){let s=()=>{if(e.current){let c=Qm(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 qC=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),JC=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function ZC(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 qC.has(n.script)}let t=e.split("-")[0];return JC.has(t)}const XC=Symbol.for("react-aria.i18n.locale");function tf(){let e=typeof window<"u"&&window[XC]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:ZC(e)?"rtl":"ltr"}}let cl=tf(),po=new Set;function nf(){cl=tf();for(let e of po)e(cl)}function QC(){let e=Tm(),[t,n]=x.useState(cl);return x.useEffect(()=>(po.size===0&&window.addEventListener("languagechange",nf),po.add(n),()=>{po.delete(n),po.size===0&&window.removeEventListener("languagechange",nf)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const eD=x.createContext(null);function rf(){let e=QC();return x.useContext(eD)||e}function tD(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:f=!1,shouldUseVirtualFocus:m,allowsTabNavigation:u=!1,isVirtualized:h,scrollRef:g=r,linkBehavior:y="action"}=e,{direction:w}=rf(),T=ji(),E=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current.contains(O.target))return;const $=(q,V)=>{if(q!=null){if(t.isLink(q)&&y==="selection"&&p&&!Xi(O)){yo.flushSync(()=>{t.setFocusedKey(q,V)});let G=g.current.querySelector(`[data-key="${CSS.escape(q.toString())}"]`),Z=t.getItemProps(q);T.open(G,O,Z.href,Z.routerOptions);return}if(t.setFocusedKey(q,V),t.isLink(q)&&y==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(q):p&&!Xi(O)&&t.replaceSelection(q)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){var z,L,oe;let q=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);q==null&&s&&(q=(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),q!=null&&(O.preventDefault(),$(q))}break;case"ArrowUp":if(n.getKeyAbove){var B,ee,W;let q=t.focusedKey!=null?(B=n.getKeyAbove)===null||B===void 0?void 0:B.call(n,t.focusedKey):(ee=n.getLastKey)===null||ee===void 0?void 0:ee.call(n);q==null&&s&&(q=(W=n.getLastKey)===null||W===void 0?void 0:W.call(n,t.focusedKey)),q!=null&&(O.preventDefault(),$(q))}break;case"ArrowLeft":if(n.getKeyLeftOf){var j,re,H;let q=(j=n.getKeyLeftOf)===null||j===void 0?void 0:j.call(n,t.focusedKey);q==null&&s&&(q=w==="rtl"?(re=n.getFirstKey)===null||re===void 0?void 0:re.call(n,t.focusedKey):(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,t.focusedKey)),q!=null&&(O.preventDefault(),$(q,w==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var J,ae,ie;let q=(J=n.getKeyRightOf)===null||J===void 0?void 0:J.call(n,t.focusedKey);q==null&&s&&(q=w==="rtl"?(ae=n.getLastKey)===null||ae===void 0?void 0:ae.call(n,t.focusedKey):(ie=n.getFirstKey)===null||ie===void 0?void 0:ie.call(n,t.focusedKey)),q!=null&&(O.preventDefault(),$(q,w==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){O.preventDefault();let q=n.getFirstKey(t.focusedKey,wr(O));t.setFocusedKey(q),wr(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(q):p&&t.replaceSelection(q)}break;case"End":if(n.getLastKey){O.preventDefault();let q=n.getLastKey(t.focusedKey,wr(O));t.setFocusedKey(q),wr(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(q):p&&t.replaceSelection(q)}break;case"PageDown":if(n.getKeyPageBelow){let q=n.getKeyPageBelow(t.focusedKey);q!=null&&(O.preventDefault(),$(q))}break;case"PageUp":if(n.getKeyPageAbove){let q=n.getKeyPageAbove(t.focusedKey);q!=null&&(O.preventDefault(),$(q))}break;case"a":wr(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 q=Qm(r.current,{tabbable:!0}),V,G;do G=q.lastChild(),G&&(V=G);while(G);V&&!V.contains(document.activeElement)&&rn(V)}break}}},D=x.useRef({top:0,left:0});_m(g,"scroll",h?null:()=>{D.current={top:g.current.scrollTop,left:g.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))},oe=O.relatedTarget;var $,z;oe&&O.currentTarget.compareDocumentPosition(oe)&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||(g.current.scrollTop=D.current.top,g.current.scrollLeft=D.current.left);if(t.focusedKey!=null){let L=g.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);L&&(L.contains(document.activeElement)||rn(L),al()==="keyboard"&&Rm(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&&!m&&sl(r.current)}},[]);let F=x.useRef(t.focusedKey);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==F.current||k.current)&&(g!=null&&g.current)){let O=al(),$=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!$)return;(O==="keyboard"||k.current)&&(Lm(g.current,$),O!=="virtual"&&Rm($,{containingElement:r.current}))}!m&&t.isFocused&&t.focusedKey==null&&F.current!=null&&sl(r.current),F.current=t.focusedKey,k.current=!1}),_m(r,"react-aria-focus-scope-restore",O=>{O.preventDefault(),t.setFocused(!0)});let P={onKeyDown:E,onFocus:M,onBlur:I,onMouseDown(O){g.current===O.target&&O.preventDefault()}},{typeSelectProps:C}=kC({keyboardDelegate:n,selectionManager:t});f||(P=kn(C,P));let R;return m||(R=t.focusedKey==null?0:-1),{collectionProps:{...P,tabIndex:R}}}function nD(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:a,shouldUseVirtualFocus:s,focus:l,isDisabled:c,onAction:p,allowsDifferentPressOrigin:f,linkBehavior:m="action"}=e,u=ji(),h=W=>{if(W.pointerType==="keyboard"&&Xi(W))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(m==="selection"){let j=t.getItemProps(n);u.open(r.current,W,j.href,j.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(m==="override"||m==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):W&&W.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||W&&(wr(W)||W.pointerType==="touch"||W.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};x.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!s&&(l?l():document.activeElement!==r.current&&sl(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,s]),c=c||t.isDisabled(n);let g={};!s&&!c?g={tabIndex:n===t.focusedKey?0:-1,onFocus(W){W.target===r.current&&t.setFocusedKey(n)}}:c&&(g.onMouseDown=W=>{W.preventDefault()});let y=t.isLink(n)&&m==="override",w=t.isLink(n)&&m!=="selection"&&m!=="none",T=!c&&t.canSelectItem(n)&&!y,E=(p||w)&&!c,D=E&&(t.selectionBehavior==="replace"?!T:!T||t.isEmpty),M=E&&T&&t.selectionBehavior==="replace",I=D||M,k=x.useRef(null),F=I&&T,P=x.useRef(!1),C=x.useRef(!1),R=W=>{if(p&&p(),w){let j=t.getItemProps(n);u.open(r.current,W,j.href,j.routerOptions)}},O={};a?(O.onPressStart=W=>{k.current=W.pointerType,P.current=F,W.pointerType==="keyboard"&&(!I||af())&&h(W)},f?(O.onPressUp=D?null:W=>{W.pointerType!=="keyboard"&&T&&h(W)},O.onPress=D?R:null):O.onPress=W=>{if(D||M&&W.pointerType!=="mouse"){if(W.pointerType==="keyboard"&&!of())return;R(W)}else W.pointerType!=="keyboard"&&T&&h(W)}):(O.onPressStart=W=>{k.current=W.pointerType,P.current=F,C.current=D,T&&(W.pointerType==="mouse"&&!D||W.pointerType==="keyboard"&&(!E||af()))&&h(W)},O.onPress=W=>{(W.pointerType==="touch"||W.pointerType==="pen"||W.pointerType==="virtual"||W.pointerType==="keyboard"&&I&&of()||W.pointerType==="mouse"&&C.current)&&(I?R(W):T&&h(W))}),g["data-key"]=n,O.preventFocusOnPress=s;let{pressProps:$,isPressed:z}=Km(O),L=M?W=>{k.current==="mouse"&&(W.stopPropagation(),W.preventDefault(),R(W))}:void 0,{longPressProps:oe}=WC({isDisabled:!F,onLongPress(W){W.pointerType==="touch"&&(h(W),t.setSelectionBehavior("toggle"))}}),B=W=>{k.current==="touch"&&P.current&&W.preventDefault()},ee=t.isLink(n)?W=>{Xn.isOpening||W.preventDefault()}:void 0;return{itemProps:kn(g,T||D?$:{},F?oe:{},{onDoubleClick:L,onDragStartCapture:B,onClick:ee}),isPressed:z,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:c,allowsSelection:T,hasAction:I}}function of(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function af(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}function rD(e,t,n){let{key:r,isDisabled:a,shouldSelectOnPressUp:s}=e,{selectionManager:l,selectedKey:c}=t,p=r===c,f=a||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:m,isPressed:u}=nD({selectionManager:l,key:r,ref:n,isDisabled:f,shouldSelectOnPressUp:s,linkBehavior:"selection"}),h=pa(t,r,"tab"),g=pa(t,r,"tabpanel"),{tabIndex:y}=m,w=t.collection.getItem(r),T=iC(w==null?void 0:w.props,{labelable:!0});delete T.id;let E=vC(w==null?void 0:w.props);return{tabProps:kn(T,E,m,{id:h,"aria-selected":p,"aria-disabled":f||void 0,"aria-controls":p?g:void 0,tabIndex:f?void 0:y,role:"tab"}),isSelected:p,isDisabled:f,isPressed:u}}function oD(e,t,n){let r=jC(n)?void 0:0;var a;const s=pa(t,(a=e.id)!==null&&a!==void 0?a:t==null?void 0:t.selectedKey,"tabpanel"),l=Mm({...e,id:s,"aria-labelledby":pa(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:kn(l,{tabIndex:r,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class aD{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 sD(e,t,n){let{orientation:r="horizontal",keyboardActivation:a="automatic"}=e,{collection:s,selectionManager:l,disabledKeys:c}=t,{direction:p}=rf(),f=x.useMemo(()=>new aD(s,p,r,c),[s,c,r,p]),{collectionProps:m}=tD({ref:n,selectionManager:l,keyboardDelegate:f,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),u=Em();vm.set(t,u);let h=Mm({...e,id:u});return{tabListProps:{...kn(m,h),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function sf({item:e,state:t}){const{key:n}=e,r=o.useRef(null),{tabProps:a}=rD({key:n},t,r),s=t.selectedKey===n,l=t.disabledKeys.has(n);return o.createElement("div",{...a,ref:r,className:U("sps-nav__item","sps-nav__link",s&&"active",l&&"sps-nav__item--disabled")},e.rendered)}function lf({state:e,...t}){const n=o.useRef(null),{tabPanelProps:r}=oD(t,e,n);return o.createElement("div",{...r,ref:n,className:"sps-card__body"},e.selectedItem?e.selectedItem.props.children:null)}class cf{*[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 Gt extends Set{constructor(t,n,r){super(t),t instanceof Gt?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function iD(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function lD(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),f=x.useRef(null),[,m]=x.useState(null),u=x.useMemo(()=>df(e.selectedKeys),[e.selectedKeys]),h=x.useMemo(()=>df(e.defaultSelectedKeys,new Gt),[e.defaultSelectedKeys]),[g,y]=Bm(u,h,e.onSelectionChange),w=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[T,E]=x.useState(a);a==="replace"&&T==="toggle"&&typeof g=="object"&&g.size===0&&E("replace");let D=x.useRef(a);return x.useEffect(()=>{a!==D.current&&(E(a),D.current=a)},[a]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:E,get isFocused(){return l.current},setFocused(M){l.current=M,c(M)},get focusedKey(){return p.current},get childFocusStrategy(){return f.current},setFocusedKey(M,I="first"){p.current=M,f.current=I,m(M)},selectedKeys:g,setSelectedKeys(M){(r||!iD(M,g))&&y(M)},disabledKeys:w,disabledBehavior:s}}function df(e,t){return e?e==="all"?"all":new Gt(e):t}class cD{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&&ar.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&&ar.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 Gt([t],t,t);else{let s=this.state.selectedKeys;var r;let l=(r=s.anchorKey)!==null&&r!==void 0?r:t;n=new Gt(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?ar.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 Gt(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 Gt([t],t,t):new Gt;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Gt;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(ar.getFirstItem(ar.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 Gt)}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 dD(e){let{filter:t,layoutDelegate:n}=e,r=lD(e),a=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=x.useCallback(m=>t?new cf(t(m)):new cf(m),[t]),l=x.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),c=ar.useCollection(e,s,l),p=x.useMemo(()=>new cD(c,r,{layoutDelegate:n}),[c,r,n]);const f=x.useRef(null);return x.useEffect(()=>{if(r.focusedKey!=null&&!c.getItem(r.focusedKey)&&f.current){const E=f.current.getItem(r.focusedKey),D=[...f.current.getKeys()].map(C=>{const R=f.current.getItem(C);return(R==null?void 0:R.type)==="item"?R:null}).filter(C=>C!==null),M=[...c.getKeys()].map(C=>{const R=c.getItem(C);return(R==null?void 0:R.type)==="item"?R:null}).filter(C=>C!==null);var m,u;const I=((m=D==null?void 0:D.length)!==null&&m!==void 0?m:0)-((u=M==null?void 0:M.length)!==null&&u!==void 0?u:0);var h,g,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):(g=E==null?void 0:E.index)!==null&&g!==void 0?g:0,((y=M==null?void 0:M.length)!==null&&y!==void 0?y:0)-1),F=null,P=!1;for(;k>=0;){if(!p.isDisabled(M[k].key)){F=M[k];break}if(k<M.length-1&&!P)k++;else{P=!0;var w,T;k>((w=E==null?void 0:E.index)!==null&&w!==void 0?w:0)&&(k=(T=E==null?void 0:E.index)!==null&&T!==void 0?T:0),k--}}r.setFocusedKey(F?F.key:null)}f.current=c},[c,p,r,r.focusedKey]),{collection:c,disabledKeys:a,selectionManager:p}}function pD(e){var t;let[n,r]=Bm(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}=dD({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:f=>{if(f==="all")return;var m;let u=(m=f.values().next().value)!==null&&m!==void 0?m: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 uD(e){var t;let n=pD({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:pf(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=pf(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 pf(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 mD={},fD={};function dl(e){const t=uD(e),n=o.useRef(null),{tabListProps:r}=sD(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(sf,{key:a.key,item:a,state:t}))),o.createElement(lf,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(dl,{props:mD,propTypes:fD,displayName:"SpsTabsV2"});const hD={};function pl({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__footer",t),...n},e)}Object.assign(pl,{props:hD,displayName:"SpsCardV2Footer"});const SD={};function ul({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__header",t),...n},e)}Object.assign(ul,{props:SD,displayName:"SpsCardV2Header"});const gD={};function uf({children:e,className:t,...n}){const[r,a,s,l,c]=Mt(e,[{type:ul},{type:dl},{type:xh.Tabs},{type:pl}]),p=a.length>0?a:s;return o.createElement("div",{className:U("sps-card",t),...n},r,p.length>0?p:o.createElement("div",{className:"sps-card__body"},c),l)}Object.assign(uf,{props:gD,displayName:"SpsCardV2"});const bD={};function mf({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__title",t),...n},e)}Object.assign(mf,{props:bD,displayName:"SpsCardV2Title"});const vD={...Hp,controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"};function ff(e){const{children:t,className:n,controlsDisabled:r,footerLinks:a,formArray:s,formGroup:l,formMeta:c,isOpen:p,onClear:f,onSubmit:m,unsafelyReplaceClassName:u,...h}=e,{t:g}=o.useContext(Ke);function y(){f&&f()}const w=U(u||"sps-advanced-search",p&&"sps-advanced-search--open",n);return o.createElement("div",{className:w,...h},o.createElement(oo,{onSubmit:m,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"},Et(a)),o.createElement("div",{className:"sps-advanced-search__footer-controls"},o.createElement(ze,{kind:Y.ButtonKind.DEFAULT,type:Y.ButtonType.BUTTON,className:"mr-2",onClick:y,disabled:r},g("design-system:advancedSearch.clear")),o.createElement(ze,{kind:Y.ButtonKind.KEY,type:Y.ButtonType.SUBMIT,disabled:r},g("design-system:advancedSearch.search"))))))}Object.assign(ff,{props:vD,displayName:"SpsAdvancedSearch"});const yD={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
|
+
`}}}},Gw={Autocomplete:{components:[Xt],examples:mc},Checkboxes:{components:[Vn],examples:fc},"Clickable Tags":{components:[Fr],examples:hc},"Column Chooser":{components:[li,jo],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:[Hi],examples:fm},"Content Rows":{components:[ci,Yn,qo],examples:Yp},"Content Sections":{components:[gi],examples:vu},"Date Pickers":{components:[di],examples:Xp},"Date Range Pickers":{components:[ui],examples:tu},"Date Time Range Pickers":{components:[mi],examples:iu},Datetime:{components:[hi],examples:cu},"Time Input":{components:[Gi],examples:bm},"Description Lists":{description:()=>o.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[Xo,Qo,ta],examples:gu},Dropdown:{components:[jn,Si],examples:bu},"Filter Panel":{components:[Fi,Vi,$i,Ki],examples:mm},Form:{components:[oo],examples:Wp},Incrementor:{components:[bi],examples:yu},Label:{description:()=>o.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[vi],examples:Tu},"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:[yi],examples:Vu},"Micro Block":{components:[Ti],examples:$u},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:[Ei,ra],examples:Hu},"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:[Ci],examples:Wu},"Multi Value Text Input":{description:()=>o.createElement("p",null,"To be determined."),components:[Wi],examples:Sm},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:[Di,oa],examples:Gu},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[Ni],examples:Yu},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:[Un],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:[zu],examples:ju},"Split Button":{components:[ki],examples:qu},"Summary List Row":{components:[Ii,xi,so],examples:Ju},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:[qn,Dn,ue,Cn,it,Ye],examples:Fu},"Task Queue":{components:[Mi],examples:Zu},"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:[sa],examples:Xu},"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:[_i],examples:Qu},Toggles:{description:()=>o.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[Li],examples:tm},Tooltips:{components:[Rt,Oi],examples:nm},Wizard:{components:[Bi,Pi],examples:am},Workflow:{components:[ia,la,ca,da],examples:um,notices:[Pw]},"Slide In Panels":{description:"",components:[wi],examples:Ku}},vm=new WeakMap;function pa(e,t,n){return e?(typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${vm.get(e)}-${n}-${t}`):""}const io=typeof document<"u"?x.useLayoutEffect:()=>{};function Tr(e){const t=x.useRef(null);return io(()=>{t.current=e},[e]),x.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const ua={prefix:String(Math.round(Math.random()*1e10)),current:0},ym=x.createContext(ua),Yw=x.createContext(!1);let Uw=!!(typeof window<"u"&&window.document&&window.document.createElement),Yi=new WeakMap;function zw(e=!1){let t=x.useContext(ym),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=Yi.get(s);l==null?Yi.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==l.state&&(t.current=l.id,Yi.delete(s))}n.current=++t.current}return n.current}function jw(e){let t=x.useContext(ym);t===ua&&!Uw&&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=zw(!!e),r=t===ua&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function qw(e){let t=x.useId(),[n]=x.useState(Tm()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${ua.prefix}`;return e||`${r}-${t}`}const Jw=typeof x.useId=="function"?qw:jw;function Zw(){return!1}function Xw(){return!0}function Qw(e){return()=>{}}function Tm(){return typeof x.useSyncExternalStore=="function"?x.useSyncExternalStore(Qw,Zw,Xw):x.useContext(Yw)}let eC=!!(typeof window<"u"&&window.document&&window.document.createElement),Nn=new Map;function Em(e){let[t,n]=x.useState(e),r=x.useRef(null),a=Jw(t),s=x.useCallback(l=>{r.current=l},[]);return eC&&(Nn.has(a)&&!Nn.get(a).includes(s)?Nn.set(a,[...Nn.get(a),s]):Nn.set(a,[s])),io(()=>{let l=a;return()=>{Nn.delete(l)}},[a]),x.useEffect(()=>{let l=r.current;l&&(r.current=null,n(l))}),a}function tC(e,t){if(e===t)return e;let n=Nn.get(e);if(n)return n.forEach(a=>a(t)),t;let r=Nn.get(t);return r?(r.forEach(a=>a(e)),e):t}function wm(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const It=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Jn=e=>e&&"window"in e&&e.window===e?e:It(e).defaultView||window;function Cm(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=Cm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nC(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Cm(e))&&(r&&(r+=" "),r+=t);return r}function kn(...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]=wm(s,l):(a==="className"||a==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?t[a]=nC(s,l):a==="id"&&s&&l?t.id=tC(s,l):t[a]=l!==void 0?l:s}}return t}const rC=new Set(["id"]),oC=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),aC=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),sC=/^(data-.*)$/;function iC(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,s={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(rC.has(l)||n&&oC.has(l)||r&&aC.has(l)||a!=null&&a.has(l)||sC.test(l))&&(s[l]=e[l]);return s}function rn(e){if(lC())e.focus({preventScroll:!0});else{let t=cC(e);e.focus(),dC(t)}}let ma=null;function lC(){if(ma==null){ma=!1;try{document.createElement("div").focus({get preventScroll(){return ma=!0,!0}})}catch{}}return ma}function cC(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 dC(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function fa(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 Ui(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 on(e){let t=null;return()=>(t==null&&(t=e()),t)}const Zn=on(function(){return Ui(/^Mac/i)}),pC=on(function(){return Ui(/^iPhone/i)}),Dm=on(function(){return Ui(/^iPad/i)||Zn()&&navigator.maxTouchPoints>1}),zi=on(function(){return pC()||Dm()}),uC=on(function(){return Zn()||zi()}),mC=on(function(){return fa(/AppleWebKit/i)&&!fC()}),fC=on(function(){return fa(/Chrome/i)}),Nm=on(function(){return fa(/Android/i)}),hC=on(function(){return fa(/Firefox/i)}),SC=x.createContext({isNative:!0,open:bC,useHref:e=>e});function ji(){return x.useContext(SC)}function Xn(e,t,n=!0){var r,a;let{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}=t;hC()&&(!((a=window.event)===null||a===void 0||(r=a.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Zn()?s=!0:l=!0);let f=mC()&&Zn()&&!Dm()?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});Xn.isOpening=n,rn(e),e.dispatchEvent(f),Xn.isOpening=!1}Xn.isOpening=!1;function gC(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 bC(e,t){gC(e,n=>Xn(n,t))}function vC(e){let t=ji();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 Er=new Map,qi=new Set;function km(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=Er.get(r.target);a||(a=new Set,Er.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=Er.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),Er.delete(r.target)),Er.size===0)){for(let s of qi)s();qi.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?km():document.addEventListener("DOMContentLoaded",km));function Im(e){requestAnimationFrame(()=>{Er.size===0?e():qi.add(e)})}function xm(){let e=x.useRef(new Map),t=x.useCallback((a,s,l,c)=>{let p=c!=null&&c.once?(...f)=>{e.current.delete(l),l(...f)}: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 f=((p=e.current.get(l))===null||p===void 0?void 0:p.fn)||l;a.removeEventListener(s,f,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 Mm(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=Em(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 yC(e,t){io(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function TC(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 EC(e,t){const n=[];for(;e&&e!==document.documentElement;)TC(e,t)&&n.push(e),e=e.parentElement;return n}let wC=0;const Ji=new Map;function CC(e){let[t,n]=x.useState();return io(()=>{if(!e)return;let r=Ji.get(e);if(r)n(r.element.id);else{let a=`react-aria-description-${wC++}`;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},Ji.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Ji.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function _m(e,t,n,r){let a=Tr(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 Lm(e,t){let n=Om(e,t,"left"),r=Om(e,t,"top"),a=t.offsetWidth,s=t.offsetHeight,l=e.scrollLeft,c=e.scrollTop,{borderTopWidth:p,borderLeftWidth:f}=getComputedStyle(e),m=e.scrollLeft+parseInt(f,10),u=e.scrollTop+parseInt(p,10),h=m+e.clientWidth,g=u+e.clientHeight;n<=l?l=n-parseInt(f,10):n+a>h&&(l+=n+a-h),r<=u?c=r-parseInt(p,10):r+s>g&&(c+=r+s-g),e.scrollLeft=l,e.scrollTop=c}function Om(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 Rm(e,t){if(document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let p=EC(e);for(let f of p)Lm(f,e)}else{var n;let{left:p,top:f}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:m,top:u}=e.getBoundingClientRect();if(Math.abs(p-m)>1||Math.abs(f-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 Zi(e){return e.mozInputSource===0&&e.isTrusted?!0:Nm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function DC(e){return!Nm()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Bm(e,t,n){let[r,a]=x.useState(e||t),s=x.useRef(e!==void 0),l=e!==void 0;x.useEffect(()=>{let f=s.current;f!==l&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let c=l?e:r,p=x.useCallback((f,...m)=>{let u=(h,...g)=>{n&&(Object.is(c,h)||n(h,...g)),l||(c=h)};typeof f=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((g,...y)=>{let w=f(l?c:g,...y);return u(w,...m),l?g:w})):(l||a(f),u(f,...m))},[l,c,n]);return[c,p]}function Xi(e){return uC()?e.altKey:e.ctrlKey}function wr(e){return Zn()?e.metaKey:e.ctrlKey}const NC=1e3;function kC(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,a=x.useRef({search:"",timeout:null}).current,s=l=>{let c=IC(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=""},NC)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:null}}}function IC(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}let Cr="default",Qi="",ha=new WeakMap;function Pm(e){if(zi()){if(Cr==="default"){const t=It(e);Qi=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Cr="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(ha.set(e,e.style.userSelect),e.style.userSelect="none")}function Sa(e){if(zi()){if(Cr!=="disabled")return;Cr="restoring",setTimeout(()=>{Im(()=>{if(Cr==="restoring"){const t=It(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Qi||""),Qi="",Cr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&ha.has(e)){let t=ha.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),ha.delete(e)}}const Am=x.createContext({register:()=>{}});Am.displayName="PressResponderContext";function xC(e,t){return t.get?t.get.call(e):t.value}function Fm(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function MC(e,t){var n=Fm(e,t,"get");return xC(e,n)}function _C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function LC(e,t,n){_C(e,t),t.set(e,n)}function OC(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 Vm(e,t,n){var r=Fm(e,t,"set");return OC(e,r,n),n}function RC(e){let t=x.useContext(Am);if(t){let{register:n,...r}=t;e=kn(r,e),n()}return yC(t,e.ref),e}var ga=new WeakMap;class ba{continuePropagation(){Vm(this,ga,!1)}get shouldStopPropagation(){return MC(this,ga)}constructor(t,n,r,a){LC(this,ga,{writable:!0,value:void 0}),Vm(this,ga,!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,f=0,m,u=null;r.clientX!=null&&r.clientY!=null&&(m=r.clientX,u=r.clientY),c&&(m!=null&&u!=null?(p=m-c.left,f=u-c.top):(p=c.width/2,f=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=f}}const $m=Symbol("linkClicked");function Km(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:s,isDisabled:l,isPressed:c,preventFocusOnPress:p,shouldCancelOnPointerExit:f,allowTextSelectionOnPress:m,ref:u,...h}=RC(e),[g,y]=x.useState(!1),w=x.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:T,removeAllGlobalListeners:E}=xm(),D=Tr((C,R)=>{let O=w.current;if(l||O.didFirePressStart)return!1;let $=!0;if(O.isTriggeringEvent=!0,r){let z=new ba("pressstart",R,C);r(z),$=z.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,y(!0),$}),M=Tr((C,R,O=!0)=>{let $=w.current;if(!$.didFirePressStart)return!1;$.ignoreClickAfterPress=!0,$.didFirePressStart=!1,$.isTriggeringEvent=!0;let z=!0;if(a){let L=new ba("pressend",R,C);a(L),z=L.shouldStopPropagation}if(n&&n(!1),y(!1),t&&O&&!l){let L=new ba("press",R,C);t(L),z&&(z=L.shouldStopPropagation)}return $.isTriggeringEvent=!1,z}),I=Tr((C,R)=>{let O=w.current;if(l)return!1;if(s){O.isTriggeringEvent=!0;let $=new ba("pressup",R,C);return s($),O.isTriggeringEvent=!1,$.shouldStopPropagation}return!0}),k=Tr(C=>{let R=w.current;R.isPressed&&R.target&&(R.isOverTarget&&R.pointerType!=null&&M(an(R.target,C),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,E(),m||Sa(R.target))}),F=Tr(C=>{f&&k(C)}),P=x.useMemo(()=>{let C=w.current,R={onKeyDown($){if(tl($.nativeEvent,$.currentTarget)&&$.currentTarget.contains($.target)){var z;Gm($.target,$.key)&&$.preventDefault();let L=!0;if(!C.isPressed&&!$.repeat){C.target=$.currentTarget,C.isPressed=!0,L=D($,"keyboard");let oe=$.currentTarget,B=ee=>{tl(ee,oe)&&!ee.repeat&&oe.contains(ee.target)&&C.target&&I(an(C.target,ee),"keyboard")};T(It($.currentTarget),"keyup",wm(B,O),!0)}L&&$.stopPropagation(),$.metaKey&&Zn()&&((z=C.metaKeyEvents)===null||z===void 0||z.set($.key,$.nativeEvent))}else $.key==="Meta"&&(C.metaKeyEvents=new Map)},onClick($){if(!($&&!$.currentTarget.contains($.target))&&$&&$.button===0&&!C.isTriggeringEvent&&!Xn.isOpening){let z=!0;if(l&&$.preventDefault(),!C.ignoreClickAfterPress&&!C.ignoreEmulatedMouseEvents&&!C.isPressed&&(C.pointerType==="virtual"||Zi($.nativeEvent))){!l&&!p&&rn($.currentTarget);let L=D($,"virtual"),oe=I($,"virtual"),B=M($,"virtual");z=L&&oe&&B}C.ignoreEmulatedMouseEvents=!1,C.ignoreClickAfterPress=!1,z&&$.stopPropagation()}}},O=$=>{var z;if(C.isPressed&&C.target&&tl($,C.target)){var L;Gm($.target,$.key)&&$.preventDefault();let B=$.target;M(an(C.target,$),"keyboard",C.target.contains(B)),E(),$.key!=="Enter"&&el(C.target)&&C.target.contains(B)&&!$[$m]&&($[$m]=!0,Xn(C.target,$,!1)),C.isPressed=!1,(L=C.metaKeyEvents)===null||L===void 0||L.delete($.key)}else if($.key==="Meta"&&(!((z=C.metaKeyEvents)===null||z===void 0)&&z.size)){var oe;let B=C.metaKeyEvents;C.metaKeyEvents=void 0;for(let ee of B.values())(oe=C.target)===null||oe===void 0||oe.dispatchEvent(new KeyboardEvent("keyup",ee))}};if(typeof PointerEvent<"u"){R.onPointerDown=B=>{if(B.button!==0||!B.currentTarget.contains(B.target))return;if(DC(B.nativeEvent)){C.pointerType="virtual";return}nl(B.currentTarget)&&B.preventDefault(),C.pointerType=B.pointerType;let ee=!0;C.isPressed||(C.isPressed=!0,C.isOverTarget=!0,C.activePointerId=B.pointerId,C.target=B.currentTarget,!l&&!p&&rn(B.currentTarget),m||Pm(C.target),ee=D(B,C.pointerType),T(It(B.currentTarget),"pointermove",$,!1),T(It(B.currentTarget),"pointerup",z,!1),T(It(B.currentTarget),"pointercancel",oe,!1)),ee&&B.stopPropagation()},R.onMouseDown=B=>{B.currentTarget.contains(B.target)&&B.button===0&&(nl(B.currentTarget)&&B.preventDefault(),B.stopPropagation())},R.onPointerUp=B=>{!B.currentTarget.contains(B.target)||C.pointerType==="virtual"||B.button===0&&Dr(B,B.currentTarget)&&I(B,C.pointerType||B.pointerType)};let $=B=>{B.pointerId===C.activePointerId&&(C.target&&Dr(B,C.target)?!C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!0,D(an(C.target,B),C.pointerType)):C.target&&C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!1,M(an(C.target,B),C.pointerType,!1),F(B)))},z=B=>{B.pointerId===C.activePointerId&&C.isPressed&&B.button===0&&C.target&&(Dr(B,C.target)&&C.pointerType!=null?M(an(C.target,B),C.pointerType):C.isOverTarget&&C.pointerType!=null&&M(an(C.target,B),C.pointerType,!1),C.isPressed=!1,C.isOverTarget=!1,C.activePointerId=null,C.pointerType=null,E(),m||Sa(C.target),"ontouchend"in C.target&&B.pointerType!=="mouse"&&T(C.target,"touchend",L,{once:!0}))},L=B=>{Wm(B.target)&&B.preventDefault()},oe=B=>{k(B)};R.onDragStart=B=>{B.currentTarget.contains(B.target)&&k(B)}}else{R.onMouseDown=L=>{if(L.button!==0||!L.currentTarget.contains(L.target))return;if(nl(L.currentTarget)&&L.preventDefault(),C.ignoreEmulatedMouseEvents){L.stopPropagation();return}C.isPressed=!0,C.isOverTarget=!0,C.target=L.currentTarget,C.pointerType=Zi(L.nativeEvent)?"virtual":"mouse",!l&&!p&&rn(L.currentTarget),D(L,C.pointerType)&&L.stopPropagation(),T(It(L.currentTarget),"mouseup",$,!1)},R.onMouseEnter=L=>{if(!L.currentTarget.contains(L.target))return;let oe=!0;C.isPressed&&!C.ignoreEmulatedMouseEvents&&C.pointerType!=null&&(C.isOverTarget=!0,oe=D(L,C.pointerType)),oe&&L.stopPropagation()},R.onMouseLeave=L=>{if(!L.currentTarget.contains(L.target))return;let oe=!0;C.isPressed&&!C.ignoreEmulatedMouseEvents&&C.pointerType!=null&&(C.isOverTarget=!1,oe=M(L,C.pointerType,!1),F(L)),oe&&L.stopPropagation()},R.onMouseUp=L=>{L.currentTarget.contains(L.target)&&!C.ignoreEmulatedMouseEvents&&L.button===0&&I(L,C.pointerType||"mouse")};let $=L=>{if(L.button===0){if(C.isPressed=!1,E(),C.ignoreEmulatedMouseEvents){C.ignoreEmulatedMouseEvents=!1;return}C.target&&Dr(L,C.target)&&C.pointerType!=null?M(an(C.target,L),C.pointerType):C.target&&C.isOverTarget&&C.pointerType!=null&&M(an(C.target,L),C.pointerType,!1),C.isOverTarget=!1}};R.onTouchStart=L=>{if(!L.currentTarget.contains(L.target))return;let oe=BC(L.nativeEvent);if(!oe)return;C.activePointerId=oe.identifier,C.ignoreEmulatedMouseEvents=!0,C.isOverTarget=!0,C.isPressed=!0,C.target=L.currentTarget,C.pointerType="touch",!l&&!p&&rn(L.currentTarget),m||Pm(C.target),D(In(C.target,L),C.pointerType)&&L.stopPropagation(),T(Jn(L.currentTarget),"scroll",z,!0)},R.onTouchMove=L=>{if(!L.currentTarget.contains(L.target))return;if(!C.isPressed){L.stopPropagation();return}let oe=Hm(L.nativeEvent,C.activePointerId),B=!0;oe&&Dr(oe,L.currentTarget)?!C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!0,B=D(In(C.target,L),C.pointerType)):C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!1,B=M(In(C.target,L),C.pointerType,!1),F(In(C.target,L))),B&&L.stopPropagation()},R.onTouchEnd=L=>{if(!L.currentTarget.contains(L.target))return;if(!C.isPressed){L.stopPropagation();return}let oe=Hm(L.nativeEvent,C.activePointerId),B=!0;oe&&Dr(oe,L.currentTarget)&&C.pointerType!=null?(I(In(C.target,L),C.pointerType),B=M(In(C.target,L),C.pointerType)):C.isOverTarget&&C.pointerType!=null&&(B=M(In(C.target,L),C.pointerType,!1)),B&&L.stopPropagation(),C.isPressed=!1,C.activePointerId=null,C.isOverTarget=!1,C.ignoreEmulatedMouseEvents=!0,C.target&&!m&&Sa(C.target),E()},R.onTouchCancel=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),C.isPressed&&k(In(C.target,L)))};let z=L=>{C.isPressed&&L.target.contains(C.target)&&k({currentTarget:C.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=L=>{L.currentTarget.contains(L.target)&&k(L)}}return R},[T,l,p,E,m,k,F,M,D,I]);return x.useEffect(()=>()=>{var C;m||Sa((C=w.current.target)!==null&&C!==void 0?C:void 0)},[m]),{isPressed:c||g,pressProps:kn(h,P)}}function el(e){return e.tagName==="A"&&e.hasAttribute("href")}function tl(e,t){const{key:n,code:r}=e,a=t,s=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof Jn(a).HTMLInputElement&&!Ym(a,n)||a instanceof Jn(a).HTMLTextAreaElement||a.isContentEditable)&&!((s==="link"||!s&&el(a))&&n!=="Enter")}function BC(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function Hm(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 In(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 an(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 PC(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 AC(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Dr(e,t){let n=t.getBoundingClientRect(),r=PC(e);return AC(n,r)}function nl(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function Wm(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!el(e)}function Gm(e,t){return e instanceof HTMLInputElement?!Ym(e,t):Wm(e)}const FC=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ym(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":FC.has(e.type)}let lo=null,VC=new Set,co=new Map,Qn=!1,rl=!1;function ol(e,t){for(let n of VC)n(e,t)}function $C(e){return!(e.metaKey||!Zn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function va(e){Qn=!0,$C(e)&&(lo="keyboard",ol("keyboard",e))}function Bt(e){lo="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Qn=!0,ol("pointer",e))}function Um(e){Zi(e)&&(Qn=!0,lo="virtual")}function zm(e){e.target===window||e.target===document||(!Qn&&!rl&&(lo="virtual",ol("virtual",e)),Qn=!1,rl=!1)}function jm(){Qn=!1,rl=!0}function qm(e){if(typeof window>"u"||co.get(Jn(e)))return;const t=Jn(e),n=It(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Qn=!0,r.apply(this,arguments)},n.addEventListener("keydown",va,!0),n.addEventListener("keyup",va,!0),n.addEventListener("click",Um,!0),t.addEventListener("focus",zm,!0),t.addEventListener("blur",jm,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Bt,!0),n.addEventListener("pointermove",Bt,!0),n.addEventListener("pointerup",Bt,!0)):(n.addEventListener("mousedown",Bt,!0),n.addEventListener("mousemove",Bt,!0),n.addEventListener("mouseup",Bt,!0)),t.addEventListener("beforeunload",()=>{Jm(e)},{once:!0}),co.set(t,{focus:r})}const Jm=(e,t)=>{const n=Jn(e),r=It(e);t&&r.removeEventListener("DOMContentLoaded",t),co.has(n)&&(n.HTMLElement.prototype.focus=co.get(n).focus,r.removeEventListener("keydown",va,!0),r.removeEventListener("keyup",va,!0),r.removeEventListener("click",Um,!0),n.removeEventListener("focus",zm,!0),n.removeEventListener("blur",jm,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Bt,!0),r.removeEventListener("pointermove",Bt,!0),r.removeEventListener("pointerup",Bt,!0)):(r.removeEventListener("mousedown",Bt,!0),r.removeEventListener("mousemove",Bt,!0),r.removeEventListener("mouseup",Bt,!0)),co.delete(n))};function KC(e){const t=It(e);let n;return t.readyState!=="loading"?qm(e):(n=()=>{qm(e)},t.addEventListener("DOMContentLoaded",n)),()=>Jm(e,n)}typeof document<"u"&&KC();function al(){return lo}const HC=500;function WC(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:a,threshold:s=HC,accessibilityDescription:l}=e;const c=x.useRef(void 0);let{addGlobalListener:p,removeGlobalListener:f}=xm(),{pressProps:m}=Km({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 g=y=>{y.preventDefault()};p(h.target,"contextmenu",g,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{f(h.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(h){c.current&&clearTimeout(c.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),u=CC(a&&!t?l:void 0);return{longPressProps:kn(m,u)}}function sl(e){const t=It(e);if(al()==="virtual"){let n=t.activeElement;Im(()=>{t.activeElement===n&&e.isConnected&&rn(e)})}else rn(e)}function GC(e){const t=Jn(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 YC(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 Zm(e,t){return e.nodeName!=="#comment"&&GC(e)&&YC(e,t)&&(!e.parentElement||Zm(e.parentElement,e))}const il=["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]"],UC=il.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";il.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const zC=il.join(':not([hidden]):not([tabindex="-1"]),');function Xm(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Qm(e,t,n){let r=t!=null&&t.tabbable?zC:UC,a=It(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)&&Zm(s)&&(!n||Xm(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 ll{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 ef({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&&Xm(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 ll;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 ef({scopeRef:null}),this.fastMap.set(null,this.root)}}class ef{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 ll;function jC(e,t){let n=t==null?void 0:t.isDisabled,[r,a]=x.useState(!1);return io(()=>{if(e!=null&&e.current&&!n){let s=()=>{if(e.current){let c=Qm(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 qC=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),JC=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function ZC(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 qC.has(n.script)}let t=e.split("-")[0];return JC.has(t)}const XC=Symbol.for("react-aria.i18n.locale");function tf(){let e=typeof window<"u"&&window[XC]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:ZC(e)?"rtl":"ltr"}}let cl=tf(),po=new Set;function nf(){cl=tf();for(let e of po)e(cl)}function QC(){let e=Tm(),[t,n]=x.useState(cl);return x.useEffect(()=>(po.size===0&&window.addEventListener("languagechange",nf),po.add(n),()=>{po.delete(n),po.size===0&&window.removeEventListener("languagechange",nf)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const eD=x.createContext(null);function rf(){let e=QC();return x.useContext(eD)||e}function tD(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:f=!1,shouldUseVirtualFocus:m,allowsTabNavigation:u=!1,isVirtualized:h,scrollRef:g=r,linkBehavior:y="action"}=e,{direction:w}=rf(),T=ji(),E=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current.contains(O.target))return;const $=(q,V)=>{if(q!=null){if(t.isLink(q)&&y==="selection"&&p&&!Xi(O)){yo.flushSync(()=>{t.setFocusedKey(q,V)});let G=g.current.querySelector(`[data-key="${CSS.escape(q.toString())}"]`),Z=t.getItemProps(q);T.open(G,O,Z.href,Z.routerOptions);return}if(t.setFocusedKey(q,V),t.isLink(q)&&y==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(q):p&&!Xi(O)&&t.replaceSelection(q)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){var z,L,oe;let q=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);q==null&&s&&(q=(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),q!=null&&(O.preventDefault(),$(q))}break;case"ArrowUp":if(n.getKeyAbove){var B,ee,W;let q=t.focusedKey!=null?(B=n.getKeyAbove)===null||B===void 0?void 0:B.call(n,t.focusedKey):(ee=n.getLastKey)===null||ee===void 0?void 0:ee.call(n);q==null&&s&&(q=(W=n.getLastKey)===null||W===void 0?void 0:W.call(n,t.focusedKey)),q!=null&&(O.preventDefault(),$(q))}break;case"ArrowLeft":if(n.getKeyLeftOf){var j,re,H;let q=(j=n.getKeyLeftOf)===null||j===void 0?void 0:j.call(n,t.focusedKey);q==null&&s&&(q=w==="rtl"?(re=n.getFirstKey)===null||re===void 0?void 0:re.call(n,t.focusedKey):(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,t.focusedKey)),q!=null&&(O.preventDefault(),$(q,w==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var J,ae,ie;let q=(J=n.getKeyRightOf)===null||J===void 0?void 0:J.call(n,t.focusedKey);q==null&&s&&(q=w==="rtl"?(ae=n.getLastKey)===null||ae===void 0?void 0:ae.call(n,t.focusedKey):(ie=n.getFirstKey)===null||ie===void 0?void 0:ie.call(n,t.focusedKey)),q!=null&&(O.preventDefault(),$(q,w==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){O.preventDefault();let q=n.getFirstKey(t.focusedKey,wr(O));t.setFocusedKey(q),wr(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(q):p&&t.replaceSelection(q)}break;case"End":if(n.getLastKey){O.preventDefault();let q=n.getLastKey(t.focusedKey,wr(O));t.setFocusedKey(q),wr(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(q):p&&t.replaceSelection(q)}break;case"PageDown":if(n.getKeyPageBelow){let q=n.getKeyPageBelow(t.focusedKey);q!=null&&(O.preventDefault(),$(q))}break;case"PageUp":if(n.getKeyPageAbove){let q=n.getKeyPageAbove(t.focusedKey);q!=null&&(O.preventDefault(),$(q))}break;case"a":wr(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 q=Qm(r.current,{tabbable:!0}),V,G;do G=q.lastChild(),G&&(V=G);while(G);V&&!V.contains(document.activeElement)&&rn(V)}break}}},D=x.useRef({top:0,left:0});_m(g,"scroll",h?null:()=>{D.current={top:g.current.scrollTop,left:g.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))},oe=O.relatedTarget;var $,z;oe&&O.currentTarget.compareDocumentPosition(oe)&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||(g.current.scrollTop=D.current.top,g.current.scrollLeft=D.current.left);if(t.focusedKey!=null){let L=g.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);L&&(L.contains(document.activeElement)||rn(L),al()==="keyboard"&&Rm(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&&!m&&sl(r.current)}},[]);let F=x.useRef(t.focusedKey);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==F.current||k.current)&&(g!=null&&g.current)){let O=al(),$=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!$)return;(O==="keyboard"||k.current)&&(Lm(g.current,$),O!=="virtual"&&Rm($,{containingElement:r.current}))}!m&&t.isFocused&&t.focusedKey==null&&F.current!=null&&sl(r.current),F.current=t.focusedKey,k.current=!1}),_m(r,"react-aria-focus-scope-restore",O=>{O.preventDefault(),t.setFocused(!0)});let P={onKeyDown:E,onFocus:M,onBlur:I,onMouseDown(O){g.current===O.target&&O.preventDefault()}},{typeSelectProps:C}=kC({keyboardDelegate:n,selectionManager:t});f||(P=kn(C,P));let R;return m||(R=t.focusedKey==null?0:-1),{collectionProps:{...P,tabIndex:R}}}function nD(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:a,shouldUseVirtualFocus:s,focus:l,isDisabled:c,onAction:p,allowsDifferentPressOrigin:f,linkBehavior:m="action"}=e,u=ji(),h=W=>{if(W.pointerType==="keyboard"&&Xi(W))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(m==="selection"){let j=t.getItemProps(n);u.open(r.current,W,j.href,j.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(m==="override"||m==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):W&&W.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||W&&(wr(W)||W.pointerType==="touch"||W.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};x.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!s&&(l?l():document.activeElement!==r.current&&sl(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,s]),c=c||t.isDisabled(n);let g={};!s&&!c?g={tabIndex:n===t.focusedKey?0:-1,onFocus(W){W.target===r.current&&t.setFocusedKey(n)}}:c&&(g.onMouseDown=W=>{W.preventDefault()});let y=t.isLink(n)&&m==="override",w=t.isLink(n)&&m!=="selection"&&m!=="none",T=!c&&t.canSelectItem(n)&&!y,E=(p||w)&&!c,D=E&&(t.selectionBehavior==="replace"?!T:!T||t.isEmpty),M=E&&T&&t.selectionBehavior==="replace",I=D||M,k=x.useRef(null),F=I&&T,P=x.useRef(!1),C=x.useRef(!1),R=W=>{if(p&&p(),w){let j=t.getItemProps(n);u.open(r.current,W,j.href,j.routerOptions)}},O={};a?(O.onPressStart=W=>{k.current=W.pointerType,P.current=F,W.pointerType==="keyboard"&&(!I||af())&&h(W)},f?(O.onPressUp=D?null:W=>{W.pointerType!=="keyboard"&&T&&h(W)},O.onPress=D?R:null):O.onPress=W=>{if(D||M&&W.pointerType!=="mouse"){if(W.pointerType==="keyboard"&&!of())return;R(W)}else W.pointerType!=="keyboard"&&T&&h(W)}):(O.onPressStart=W=>{k.current=W.pointerType,P.current=F,C.current=D,T&&(W.pointerType==="mouse"&&!D||W.pointerType==="keyboard"&&(!E||af()))&&h(W)},O.onPress=W=>{(W.pointerType==="touch"||W.pointerType==="pen"||W.pointerType==="virtual"||W.pointerType==="keyboard"&&I&&of()||W.pointerType==="mouse"&&C.current)&&(I?R(W):T&&h(W))}),g["data-key"]=n,O.preventFocusOnPress=s;let{pressProps:$,isPressed:z}=Km(O),L=M?W=>{k.current==="mouse"&&(W.stopPropagation(),W.preventDefault(),R(W))}:void 0,{longPressProps:oe}=WC({isDisabled:!F,onLongPress(W){W.pointerType==="touch"&&(h(W),t.setSelectionBehavior("toggle"))}}),B=W=>{k.current==="touch"&&P.current&&W.preventDefault()},ee=t.isLink(n)?W=>{Xn.isOpening||W.preventDefault()}:void 0;return{itemProps:kn(g,T||D?$:{},F?oe:{},{onDoubleClick:L,onDragStartCapture:B,onClick:ee}),isPressed:z,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:c,allowsSelection:T,hasAction:I}}function of(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function af(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}function rD(e,t,n){let{key:r,isDisabled:a,shouldSelectOnPressUp:s}=e,{selectionManager:l,selectedKey:c}=t,p=r===c,f=a||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:m,isPressed:u}=nD({selectionManager:l,key:r,ref:n,isDisabled:f,shouldSelectOnPressUp:s,linkBehavior:"selection"}),h=pa(t,r,"tab"),g=pa(t,r,"tabpanel"),{tabIndex:y}=m,w=t.collection.getItem(r),T=iC(w==null?void 0:w.props,{labelable:!0});delete T.id;let E=vC(w==null?void 0:w.props);return{tabProps:kn(T,E,m,{id:h,"aria-selected":p,"aria-disabled":f||void 0,"aria-controls":p?g:void 0,tabIndex:f?void 0:y,role:"tab"}),isSelected:p,isDisabled:f,isPressed:u}}function oD(e,t,n){let r=jC(n)?void 0:0;var a;const s=pa(t,(a=e.id)!==null&&a!==void 0?a:t==null?void 0:t.selectedKey,"tabpanel"),l=Mm({...e,id:s,"aria-labelledby":pa(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:kn(l,{tabIndex:r,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class aD{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 sD(e,t,n){let{orientation:r="horizontal",keyboardActivation:a="automatic"}=e,{collection:s,selectionManager:l,disabledKeys:c}=t,{direction:p}=rf(),f=x.useMemo(()=>new aD(s,p,r,c),[s,c,r,p]),{collectionProps:m}=tD({ref:n,selectionManager:l,keyboardDelegate:f,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),u=Em();vm.set(t,u);let h=Mm({...e,id:u});return{tabListProps:{...kn(m,h),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function sf({item:e,state:t}){const{key:n}=e,r=o.useRef(null),{tabProps:a}=rD({key:n},t,r),s=t.selectedKey===n,l=t.disabledKeys.has(n);return o.createElement("div",{...a,ref:r,className:U("sps-nav__item","sps-nav__link",s&&"active",l&&"sps-nav__item--disabled")},e.rendered)}function lf({state:e,...t}){const n=o.useRef(null),{tabPanelProps:r}=oD(t,e,n);return o.createElement("div",{...r,ref:n,className:"sps-card__body"},e.selectedItem?e.selectedItem.props.children:null)}class cf{*[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 Gt extends Set{constructor(t,n,r){super(t),t instanceof Gt?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function iD(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function lD(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),f=x.useRef(null),[,m]=x.useState(null),u=x.useMemo(()=>df(e.selectedKeys),[e.selectedKeys]),h=x.useMemo(()=>df(e.defaultSelectedKeys,new Gt),[e.defaultSelectedKeys]),[g,y]=Bm(u,h,e.onSelectionChange),w=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[T,E]=x.useState(a);a==="replace"&&T==="toggle"&&typeof g=="object"&&g.size===0&&E("replace");let D=x.useRef(a);return x.useEffect(()=>{a!==D.current&&(E(a),D.current=a)},[a]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:E,get isFocused(){return l.current},setFocused(M){l.current=M,c(M)},get focusedKey(){return p.current},get childFocusStrategy(){return f.current},setFocusedKey(M,I="first"){p.current=M,f.current=I,m(M)},selectedKeys:g,setSelectedKeys(M){(r||!iD(M,g))&&y(M)},disabledKeys:w,disabledBehavior:s}}function df(e,t){return e?e==="all"?"all":new Gt(e):t}class cD{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&&ar.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&&ar.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 Gt([t],t,t);else{let s=this.state.selectedKeys;var r;let l=(r=s.anchorKey)!==null&&r!==void 0?r:t;n=new Gt(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?ar.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 Gt(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 Gt([t],t,t):new Gt;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Gt;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(ar.getFirstItem(ar.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 Gt)}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 dD(e){let{filter:t,layoutDelegate:n}=e,r=lD(e),a=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=x.useCallback(m=>t?new cf(t(m)):new cf(m),[t]),l=x.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),c=ar.useCollection(e,s,l),p=x.useMemo(()=>new cD(c,r,{layoutDelegate:n}),[c,r,n]);const f=x.useRef(null);return x.useEffect(()=>{if(r.focusedKey!=null&&!c.getItem(r.focusedKey)&&f.current){const E=f.current.getItem(r.focusedKey),D=[...f.current.getKeys()].map(C=>{const R=f.current.getItem(C);return(R==null?void 0:R.type)==="item"?R:null}).filter(C=>C!==null),M=[...c.getKeys()].map(C=>{const R=c.getItem(C);return(R==null?void 0:R.type)==="item"?R:null}).filter(C=>C!==null);var m,u;const I=((m=D==null?void 0:D.length)!==null&&m!==void 0?m:0)-((u=M==null?void 0:M.length)!==null&&u!==void 0?u:0);var h,g,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):(g=E==null?void 0:E.index)!==null&&g!==void 0?g:0,((y=M==null?void 0:M.length)!==null&&y!==void 0?y:0)-1),F=null,P=!1;for(;k>=0;){if(!p.isDisabled(M[k].key)){F=M[k];break}if(k<M.length-1&&!P)k++;else{P=!0;var w,T;k>((w=E==null?void 0:E.index)!==null&&w!==void 0?w:0)&&(k=(T=E==null?void 0:E.index)!==null&&T!==void 0?T:0),k--}}r.setFocusedKey(F?F.key:null)}f.current=c},[c,p,r,r.focusedKey]),{collection:c,disabledKeys:a,selectionManager:p}}function pD(e){var t;let[n,r]=Bm(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}=dD({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:f=>{if(f==="all")return;var m;let u=(m=f.values().next().value)!==null&&m!==void 0?m: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 uD(e){var t;let n=pD({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:pf(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=pf(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 pf(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 mD={},fD={};function dl(e){const t=uD(e),n=o.useRef(null),{tabListProps:r}=sD(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(sf,{key:a.key,item:a,state:t}))),o.createElement(lf,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(dl,{props:mD,propTypes:fD,displayName:"SpsTabsV2"});const hD={};function pl({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__footer",t),...n},e)}Object.assign(pl,{props:hD,displayName:"SpsCardV2Footer"});const SD={};function ul({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__header",t),...n},e)}Object.assign(ul,{props:SD,displayName:"SpsCardV2Header"});const gD={};function uf({children:e,className:t,...n}){const[r,a,s,l,c]=Mt(e,[{type:ul},{type:dl},{type:xh.Tabs},{type:pl}]),p=a.length>0?a:s;return o.createElement("div",{className:U("sps-card",t),...n},r,p.length>0?p:o.createElement("div",{className:"sps-card__body"},c),l)}Object.assign(uf,{props:gD,displayName:"SpsCardV2"});const bD={};function mf({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__title",t),...n},e)}Object.assign(mf,{props:bD,displayName:"SpsCardV2Title"});const vD={...Hp,controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"};function ff(e){const{children:t,className:n,controlsDisabled:r,footerLinks:a,formArray:s,formGroup:l,formMeta:c,isOpen:p,onClear:f,onSubmit:m,unsafelyReplaceClassName:u,...h}=e,{t:g}=o.useContext(Ke);function y(){f&&f()}const w=U(u||"sps-advanced-search",p&&"sps-advanced-search--open",n);return o.createElement("div",{className:w,...h},o.createElement(oo,{onSubmit:m,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"},Et(a)),o.createElement("div",{className:"sps-advanced-search__footer-controls"},o.createElement(ze,{kind:Y.ButtonKind.DEFAULT,type:Y.ButtonType.BUTTON,className:"mr-2",onClick:y,disabled:r},g("design-system:advancedSearch.clear")),o.createElement(ze,{kind:Y.ButtonKind.KEY,type:Y.ButtonType.SUBMIT,disabled:r},g("design-system:advancedSearch.search"))))))}Object.assign(ff,{props:vD,displayName:"SpsAdvancedSearch"});const yD={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
|
-
`}}}},KD={onSubmit:"FormEventHandler"};function gl(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(vr,{className:"sps-list-toolbar__search-field"},t))}Object.assign(gl,{props:KD,displayName:"SpsListToolbarSearch"});const HD={};function bl(e){const{children:t}=e;return o.createElement("div",null,t)}Object.assign(bl,{props:HD,displayName:"SpsListToolbarSearchInfo"});const WD={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 Ef(e){const{activeTab:t,advancedSearch:n,children:r,className:a,onToggleAdvancedSearch:s,onTabChange:l,tabs:c,title:p,unsafelyReplaceClassName:f,onToolbarPinned:m,selectable:u,isSelected:h,isIndeterminate:g,onSelectionChange:y,pinResultsBar:w,pinToolbar:T=!0,"data-testid":E,...D}=e,{t:M}=o.useContext(Ke);let I=null;const[k,F]=o.useState(!1),P=o.useRef(null),C=o.useRef(null),R=v.lockToAnimationFrames(()=>{if(P.current&&T){const re=P.current.getBoundingClientRect();re&&re.height>0&&re.top<=60&&(typeof I=="number"?window.scrollY<I&&(I=null,F(!1)):(I=window.scrollY,F(!0),s&&s(!1)))}});o.useEffect(()=>(window.addEventListener("scroll",R),()=>{window.removeEventListener("scroll",R)}),[]);const O=o.useRef();o.useLayoutEffect(()=>{if(C.current&&P.current&&T){if(k&&O.current)C.current.style.height=O.current.height,C.current.style.width=O.current.width,C.current.style.marginBottom=O.current.marginBottom;else if(!k){C.current.style.height="",C.current.style.width="",C.current.style.marginBottom="";const re=window.getComputedStyle(P.current);O.current={height:re.height,width:re.width,marginBottom:re.marginBottom}}}},[k]);function $(re){l&&l(re)}function z(){s&&s(!(n!=null&&n.isOpen))}function L(re){m&&m(re)}o.useEffect(()=>{L(k)},[k]);const oe=U(f||"sps-list-toolbar",k&&T&&"sps-list-toolbar--pinned",k&&T&&"z-stratum-toolbar",n&&n.isOpen&&"sps-list-toolbar--advanced-search-open",a),[B,ee,W,j]=Mt(r,[{type:gl},{type:bl},{type:Sl}]);return o.createElement("div",{className:"sps-list-toolbar__wrapper",ref:C},o.createElement("div",{className:oe,"data-testid":E,ref:P,...D},o.createElement("div",{className:"sps-list-toolbar__content"},!!u&&o.createElement("div",{className:"sps-list-toolbar__selection-controls"},o.createElement(Vn,{checked:h,indeterminate:g,onChange:()=>{y==null||y(!h)}})),c&&o.createElement(yf,{tabs:c,onTabChange:$,activeTab:t,"data-testid":`${E}__tabs`}),o.createElement("div",{className:"sps-list-toolbar__search-controls"},!p&&B,!p&&ee,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(ze,{kind:Y.ButtonKind.LINK,onClick:z},M("design-system:listToolbar.advancedSearchToggle",{defaultValue:"Advanced Search"}))),(n.enteredFields||0)>0&&o.createElement(Kt,{"data-testid":`${E}__entered_fields`,kind:Y.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(xt.Provider,{value:{fixed:!0}},j)):o.createElement("div",{className:"sps-list-toolbar__header-content"},j)),o.createElement("div",null,(!k||w)&&W)))}Object.assign(Ef,{props:WD,displayName:"SpsListToolbar"});const GD={options:"SortOption[]",activeOption:"SortOption",onSortChange:"(option: SortOption) => void",defaultOption:"SortOption"};function wf(e){const{options:t,onSortChange:n,defaultOption:r,activeOption:a,className:s,unsafelyReplaceClassName:l}=e,c=(t||[]).map(f=>[{label:f.label,icon:f.icon},()=>{n&&n(f)}]),p=U(l||"sps-list-toolbar-sort-by",s);return o.createElement(jn,{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(wf,{props:GD,displayName:"SpsListToolbarSortBy"});function Cf(){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(ze,{kind:Y.ButtonKind.LINK,onClick:r},"View Content Order Example"),o.createElement(fl,{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(qn,null,o.createElement(Cn,null,o.createElement(
|
|
10036
|
+
`}}}},KD={onSubmit:"FormEventHandler"};function gl(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(vr,{className:"sps-list-toolbar__search-field"},t))}Object.assign(gl,{props:KD,displayName:"SpsListToolbarSearch"});const HD={};function bl(e){const{children:t}=e;return o.createElement("div",null,t)}Object.assign(bl,{props:HD,displayName:"SpsListToolbarSearchInfo"});const WD={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 Ef(e){const{activeTab:t,advancedSearch:n,children:r,className:a,onToggleAdvancedSearch:s,onTabChange:l,tabs:c,title:p,unsafelyReplaceClassName:f,onToolbarPinned:m,selectable:u,isSelected:h,isIndeterminate:g,onSelectionChange:y,pinResultsBar:w,pinToolbar:T=!0,"data-testid":E,...D}=e,{t:M}=o.useContext(Ke);let I=null;const[k,F]=o.useState(!1),P=o.useRef(null),C=o.useRef(null),R=v.lockToAnimationFrames(()=>{if(P.current&&T){const re=P.current.getBoundingClientRect();re&&re.height>0&&re.top<=60&&(typeof I=="number"?window.scrollY<I&&(I=null,F(!1)):(I=window.scrollY,F(!0),s&&s(!1)))}});o.useEffect(()=>(window.addEventListener("scroll",R),()=>{window.removeEventListener("scroll",R)}),[]);const O=o.useRef();o.useLayoutEffect(()=>{if(C.current&&P.current&&T){if(k&&O.current)C.current.style.height=O.current.height,C.current.style.width=O.current.width,C.current.style.marginBottom=O.current.marginBottom;else if(!k){C.current.style.height="",C.current.style.width="",C.current.style.marginBottom="";const re=window.getComputedStyle(P.current);O.current={height:re.height,width:re.width,marginBottom:re.marginBottom}}}},[k]);function $(re){l&&l(re)}function z(){s&&s(!(n!=null&&n.isOpen))}function L(re){m&&m(re)}o.useEffect(()=>{L(k)},[k]);const oe=U(f||"sps-list-toolbar",k&&T&&"sps-list-toolbar--pinned",k&&T&&"z-stratum-toolbar",n&&n.isOpen&&"sps-list-toolbar--advanced-search-open",a),[B,ee,W,j]=Mt(r,[{type:gl},{type:bl},{type:Sl}]);return o.createElement("div",{className:"sps-list-toolbar__wrapper",ref:C},o.createElement("div",{className:oe,"data-testid":E,ref:P,...D},o.createElement("div",{className:"sps-list-toolbar__content"},!!u&&o.createElement("div",{className:"sps-list-toolbar__selection-controls"},o.createElement(Vn,{checked:h,indeterminate:g,onChange:()=>{y==null||y(!h)}})),c&&o.createElement(yf,{tabs:c,onTabChange:$,activeTab:t,"data-testid":`${E}__tabs`}),o.createElement("div",{className:"sps-list-toolbar__search-controls"},!p&&B,!p&&ee,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(ze,{kind:Y.ButtonKind.LINK,onClick:z},M("design-system:listToolbar.advancedSearchToggle",{defaultValue:"Advanced Search"}))),(n.enteredFields||0)>0&&o.createElement(Kt,{"data-testid":`${E}__entered_fields`,kind:Y.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(xt.Provider,{value:{fixed:!0}},j)):o.createElement("div",{className:"sps-list-toolbar__header-content"},j)),o.createElement("div",null,(!k||w)&&W)))}Object.assign(Ef,{props:WD,displayName:"SpsListToolbar"});const GD={options:"SortOption[]",activeOption:"SortOption",onSortChange:"(option: SortOption) => void",defaultOption:"SortOption"};function wf(e){const{options:t,onSortChange:n,defaultOption:r,activeOption:a,className:s,unsafelyReplaceClassName:l}=e,c=(t||[]).map(f=>[{label:f.label,icon:f.icon},()=>{n&&n(f)}]),p=U(l||"sps-list-toolbar-sort-by",s);return o.createElement(jn,{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(wf,{props:GD,displayName:"SpsListToolbarSortBy"});function Cf(){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(ze,{kind:Y.ButtonKind.LINK,onClick:r},"View Content Order Example"),o.createElement(fl,{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(qn,null,o.createElement(Cn,null,o.createElement(it,{style:{width:"80px"}},"Order"),o.createElement(it,null,"Section"),o.createElement(it,null,"Notes")),o.createElement(Dn,null,o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"1")),o.createElement(ue,null,"Checkbox"),o.createElement(ue,null,"For Content Rows and Content Tiles only.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"2")),o.createElement(ue,null,"Search/Filter Box"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"3")),o.createElement(ue,null,"Saved Search"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"4")),o.createElement(ue,null,"Advanced Search"),o.createElement(ue,null,"For more information, visit the Advanced Search page.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"5")),o.createElement(ue,null,"Column Editor"),o.createElement(ue,{wrap:500},"Use for Tables only. For more information, visit the Column Editor page.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"6")),o.createElement(ue,null,"List View Selector"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"7")),o.createElement(ue,null,"Sorting"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"8")),o.createElement(ue,null,"Buttons"),o.createElement(ue,{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 YD={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(Cf,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
|
-
`}}}},eN={percentComplete:"number",title:"string",detail:"string",disabled:"boolean",onClose:"() => void"};function xf(e){const{children:t,className:n,detail:r,disabled:a,onClose:s,percentComplete:l=0,title:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,{t:u}=o.useContext(Ke),h=U(f||"sps-progress-bar",l===1&&"sps-progress-bar--complete",a&&"sps-progress-bar--disabled",n);return o.createElement("div",{className:h,...m},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(ze,{kind:Y.ButtonKind.ICON,icon:Y.SpsIcon.X,onClick:s,title:u("design-system:progressBar.closeButtonTitle",{defaultValue:"Close progress bar"})})))}Object.assign(xf,{props:eN,displayName:"SpsProgressBar"});const tN={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(qn,null,o.createElement(Cn,null,o.createElement(
|
|
10866
|
+
`}}}},eN={percentComplete:"number",title:"string",detail:"string",disabled:"boolean",onClose:"() => void"};function xf(e){const{children:t,className:n,detail:r,disabled:a,onClose:s,percentComplete:l=0,title:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,{t:u}=o.useContext(Ke),h=U(f||"sps-progress-bar",l===1&&"sps-progress-bar--complete",a&&"sps-progress-bar--disabled",n);return o.createElement("div",{className:h,...m},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(ze,{kind:Y.ButtonKind.ICON,icon:Y.SpsIcon.X,onClick:s,title:u("design-system:progressBar.closeButtonTitle",{defaultValue:"Close progress bar"})})))}Object.assign(xf,{props:eN,displayName:"SpsProgressBar"});const tN={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(qn,null,o.createElement(Cn,null,o.createElement(it,null,"Section"),o.createElement(it,null,"Content Type"),o.createElement(it,null,"Required"),o.createElement(it,null,"Description/Guidelines")),o.createElement(Dn,null,o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"1")),o.createElement(ue,null,"Title"),o.createElement(ue,null,"No"),o.createElement(ue,{wrap:400},"Use the Title when it provides necessary or helpful detail about the file or action that is being processed.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"2")),o.createElement(ue,null,"Progress Meter"),o.createElement(ue,null,"Yes"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"3")),o.createElement(ue,null,"Progress Counter"),o.createElement(ue,null,"No"),o.createElement(ue,{wrap:400},"The Progress Counter should not be used without the existence of a Title.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"4")),o.createElement(ue,null,"Clear Button"),o.createElement(ue,null,"No"),o.createElement(ue,{wrap:400},"If the process requires the option to be cancelled or removed from a list the clear button can be used.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"5")),o.createElement(ue,null,"Progress Details"),o.createElement(ue,null,"No"),o.createElement(ue,{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
|
-
`}}}},lN={title:"string",stepsCount:"number",completedStepsCount:"number",disabled:"boolean",showStepsCounter:"boolean",color:"SteppedProgressBarColor",data:"SteppedProgressBarData[]"};function Of(e){const{title:t,stepsCount:n,completedStepsCount:r=0,disabled:a,showStepsCounter:s,className:l,data:c,color:p=Y.SteppedProgressBarColor.PURPLE}=e,f=Array.from(Array(n)).map((u,h)=>({id:gn().current||void 0,...c==null?void 0:c.find(g=>g.index===h)})),m=U("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:m},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"},f.map((u,h)=>o.createElement("li",{id:u.id,key:u.id,className:U("sps-stepped-progress-bar__step",r>h&&!u.skipped&&"sps-stepped-progress-bar__step-complete")},u.icon&&o.createElement(Ht,{icon:u.icon,size:Y.SpsIconSize.SMALL,className:U("d-block",(u.index||0)>r-1?"gray400":"white")}),u.title&&u.id&&o.createElement(Rt,{for:u.id,title:u.title},u.description))))))}Object.assign(Of,{props:lN,displayName:"SpsSteppedProgressBar"});const cN={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(qn,null,o.createElement(Cn,null,o.createElement(
|
|
10976
|
+
`}}}},lN={title:"string",stepsCount:"number",completedStepsCount:"number",disabled:"boolean",showStepsCounter:"boolean",color:"SteppedProgressBarColor",data:"SteppedProgressBarData[]"};function Of(e){const{title:t,stepsCount:n,completedStepsCount:r=0,disabled:a,showStepsCounter:s,className:l,data:c,color:p=Y.SteppedProgressBarColor.PURPLE}=e,f=Array.from(Array(n)).map((u,h)=>({id:gn().current||void 0,...c==null?void 0:c.find(g=>g.index===h)})),m=U("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:m},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"},f.map((u,h)=>o.createElement("li",{id:u.id,key:u.id,className:U("sps-stepped-progress-bar__step",r>h&&!u.skipped&&"sps-stepped-progress-bar__step-complete")},u.icon&&o.createElement(Ht,{icon:u.icon,size:Y.SpsIconSize.SMALL,className:U("d-block",(u.index||0)>r-1?"gray400":"white")}),u.title&&u.id&&o.createElement(Rt,{for:u.id,title:u.title},u.description))))))}Object.assign(Of,{props:lN,displayName:"SpsSteppedProgressBar"});const cN={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(qn,null,o.createElement(Cn,null,o.createElement(it,null,"Section"),o.createElement(it,null,"Content Type"),o.createElement(it,null,"Required"),o.createElement(it,null,"Description/Guidelines")),o.createElement(Dn,null,o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"1")),o.createElement(ue,null,"Title"),o.createElement(ue,null,"No"),o.createElement(ue,{wrap:400},"Use the Title when it provides necessary or helpful detail about the file or action that is being processed.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"2")),o.createElement(ue,null,"Progress Meter"),o.createElement(ue,null,"Yes"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"3")),o.createElement(ue,null,"Progress Counter"),o.createElement(ue,null,"No"),o.createElement(ue,{wrap:400},"The Progress Counter should not be used without the existence of a Title.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"4")),o.createElement(ue,null,"Step icons"),o.createElement(ue,null,"No"),o.createElement(ue,{wrap:400},"Icons can be set inside of steps for visual emphasis.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"5")),o.createElement(ue,null,"Step Tooltips"),o.createElement(ue,null,"No"),o.createElement(ue,{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=ir,_.ContentOrderExample=Cf,_.DEFAULT_DATETIME_PRESETS=au,_.DEFAULT_PRESETS=pi,_.DragDropContext=kp,_.Draggable=Vp,_.Droppable=oi,_.FauxChangeEvent=bn,_.I18nContext=Ke,_.MANIFEST=Gw,_.ModalAction=Df,_.OnBlurErrorKeys=Ct,_.OnSubmitErrorKeys=To,_.PortalContext=xt,_.PreventativeErrorKeys=qt,_.Provide=cc,_.SimpleDateUtils=ne,_.SpsAddRemoveFormRowExamples=_E,_.SpsAdvancedSearch=ff,_.SpsAdvancedSearchExamples=yD,_.SpsApp=yS,_.SpsAutocomplete=Xt,_.SpsAutocompleteExamples=mc,_.SpsButton=ze,_.SpsButtonExamples=uw,_.SpsButtonGroup=Pu,_.SpsCard=si,_.SpsCardTabbedPane=ai,_.SpsCardV2=uf,_.SpsCardV2Footer=pl,_.SpsCardV2Header=ul,_.SpsCardV2Title=mf,_.SpsCheckbox=Vn,_.SpsCheckboxDropdown=Si,_.SpsCheckboxExamples=fc,_.SpsClickableTag=Fr,_.SpsClickableTagExamples=hc,_.SpsColumnChooser=li,_.SpsColumnChooserColumn=jo,_.SpsColumnChooserExamples=Gp,_.SpsConditionalField=Hi,_.SpsConditionalFieldExamples=fm,_.SpsContentRow=ci,_.SpsContentRowCol=Yn,_.SpsContentRowExamples=Yp,_.SpsContentRowExpansion=qo,_.SpsContextBar=TD,_.SpsCurrencyInput=hf,_.SpsCurrencyInputExamples=DD,_.SpsDateRangePicker=ui,_.SpsDateRangePickerExamples=tu,_.SpsDateTime=hi,_.SpsDateTimeRangePicker=mi,_.SpsDateTimeRangePickerExamples=iu,_.SpsDatepicker=di,_.SpsDatepickerExamples=Xp,_.SpsDatetimeExamples=cu,_.SpsDd=mu,_.SpsDescriptionList=Xo,_.SpsDescriptionListDefinition=Qo,_.SpsDescriptionListExamples=gu,_.SpsDescriptionListTerm=ta,_.SpsDl=pu,_.SpsDropdown=jn,_.SpsDropdownExamples=bu,_.SpsDt=Su,_.SpsFeedbackBlock=Ai,_.SpsFeedbackBlockExamples=Bw,_.SpsFieldset=gi,_.SpsFieldsetExamples=vu,_.SpsFilterPanel=Fi,_.SpsFilterPanelCap=$i,_.SpsFilterPanelExamples=mm,_.SpsFilterPanelFilterBox=Ki,_.SpsFilterPanelSection=Vi,_.SpsFilterTile=Pf,_.SpsFilterTileList=Af,_.SpsFilterTileListExamples=hN,_.SpsFocusedTask=fl,_.SpsFocusedTaskActions=ml,_.SpsFocusedTaskExamples=ID,_.SpsForm=oo,_.SpsFormArrayMeta=ec,_.SpsFormComponentWrapper=tt,_.SpsFormExamples=Wp,_.SpsFormFieldMeta=Rr,_.SpsFormGroupMeta=Ql,_.SpsFormMetaBase=Pn,_.SpsFormSetMeta=An,_.SpsGrowler=hl,_.SpsGrowlerExamples=_D,_.SpsI=Ht,_.SpsIconButtonPanel=Au,_.SpsIncrementor=bi,_.SpsIncrementorExamples=yu,_.SpsInputGroup=vr,_.SpsInsightTile=Sf,_.SpsInsights=LD,_.SpsKeyValueList=gf,_.SpsKeyValueListItem=bf,_.SpsKeyValueTag=vf,_.SpsKeyValueTagExamples=AD,_.SpsLabel=vi,_.SpsLabelExamples=Tu,_.SpsListActionBar=yi,_.SpsListActionBarExamples=Vu,_.SpsListToolbar=Ef,_.SpsListToolbarExamples=YD,_.SpsListToolbarSearch=gl,_.SpsListToolbarSearchInfo=bl,_.SpsListToolbarSortBy=wf,_.SpsMicroBlock=Ti,_.SpsMicroBlockExamples=$u,_.SpsMicroZeroState=$f,_.SpsModal=Ei,_.SpsModalExamples=Hu,_.SpsModalFooter=ra,_.SpsMultiSelect=Ci,_.SpsMultiSelectExamples=Wu,_.SpsMultiValueTextInput=Wi,_.SpsMultiValueTextInputExamples=Sm,_.SpsPageSelector=oa,_.SpsPageSubtitle=kf,_.SpsPageTitle=Nf,_.SpsPageTitleExamples=JD,_.SpsPagination=Di,_.SpsPaginationExamples=Gu,_.SpsProductBar=If,_.SpsProductBarExamples=QD,_.SpsProductBarTab=vl,_.SpsProgressBar=xf,_.SpsProgressBarExamples=tN,_.SpsProgressRing=Ri,_.SpsRadioButton=Ni,_.SpsRadioButtonExamples=Yu,_.SpsScrollableContainer=Mf,_.SpsSearchResultsBar=Tf,_.SpsSearchResultsBarExamples=$D,_.SpsSearchResultsBarV2=Sl,_.SpsSelect=Un,_.SpsSelectExamples=nu,_.SpsSideNav=zu,_.SpsSideNavExamples=ju,_.SpsSlackLink=_f,_.SpsSlackLinkExamples=oN,_.SpsSlideInPanel=wi,_.SpsSlideInPanelExamples=Ku,_.SpsSortingHeader=Lf,_.SpsSortingHeaderCell=yl,_.SpsSortingHeaderExamples=iN,_.SpsSpinner=Ha,_.SpsSplitButton=ki,_.SpsSplitButtonExamples=qu,_.SpsSteppedProgressBar=Of,_.SpsSteppedProgressBarExamples=cN,_.SpsSummaryListColumn=xi,_.SpsSummaryListExamples=Ju,_.SpsSummaryListExpansion=so,_.SpsSummaryListRow=Ii,_.SpsTab=sf,_.SpsTabPanel=lf,_.SpsTable=qn,_.SpsTableBody=Dn,_.SpsTableCell=ue,_.SpsTableExamples=Fu,_.SpsTableHead=Cn,_.SpsTableHeader=
|
|
11444
|
+
`}}}};_.AsTypingErrorKeys=ir,_.ContentOrderExample=Cf,_.DEFAULT_DATETIME_PRESETS=au,_.DEFAULT_PRESETS=pi,_.DragDropContext=kp,_.Draggable=Vp,_.Droppable=oi,_.FauxChangeEvent=bn,_.I18nContext=Ke,_.MANIFEST=Gw,_.ModalAction=Df,_.OnBlurErrorKeys=Ct,_.OnSubmitErrorKeys=To,_.PortalContext=xt,_.PreventativeErrorKeys=qt,_.Provide=cc,_.SimpleDateUtils=ne,_.SpsAddRemoveFormRowExamples=_E,_.SpsAdvancedSearch=ff,_.SpsAdvancedSearchExamples=yD,_.SpsApp=yS,_.SpsAutocomplete=Xt,_.SpsAutocompleteExamples=mc,_.SpsButton=ze,_.SpsButtonExamples=uw,_.SpsButtonGroup=Pu,_.SpsCard=si,_.SpsCardTabbedPane=ai,_.SpsCardV2=uf,_.SpsCardV2Footer=pl,_.SpsCardV2Header=ul,_.SpsCardV2Title=mf,_.SpsCheckbox=Vn,_.SpsCheckboxDropdown=Si,_.SpsCheckboxExamples=fc,_.SpsClickableTag=Fr,_.SpsClickableTagExamples=hc,_.SpsColumnChooser=li,_.SpsColumnChooserColumn=jo,_.SpsColumnChooserExamples=Gp,_.SpsConditionalField=Hi,_.SpsConditionalFieldExamples=fm,_.SpsContentRow=ci,_.SpsContentRowCol=Yn,_.SpsContentRowExamples=Yp,_.SpsContentRowExpansion=qo,_.SpsContextBar=TD,_.SpsCurrencyInput=hf,_.SpsCurrencyInputExamples=DD,_.SpsDateRangePicker=ui,_.SpsDateRangePickerExamples=tu,_.SpsDateTime=hi,_.SpsDateTimeRangePicker=mi,_.SpsDateTimeRangePickerExamples=iu,_.SpsDatepicker=di,_.SpsDatepickerExamples=Xp,_.SpsDatetimeExamples=cu,_.SpsDd=mu,_.SpsDescriptionList=Xo,_.SpsDescriptionListDefinition=Qo,_.SpsDescriptionListExamples=gu,_.SpsDescriptionListTerm=ta,_.SpsDl=pu,_.SpsDropdown=jn,_.SpsDropdownExamples=bu,_.SpsDt=Su,_.SpsFeedbackBlock=Ai,_.SpsFeedbackBlockExamples=Bw,_.SpsFieldset=gi,_.SpsFieldsetExamples=vu,_.SpsFilterPanel=Fi,_.SpsFilterPanelCap=$i,_.SpsFilterPanelExamples=mm,_.SpsFilterPanelFilterBox=Ki,_.SpsFilterPanelSection=Vi,_.SpsFilterTile=Pf,_.SpsFilterTileList=Af,_.SpsFilterTileListExamples=hN,_.SpsFocusedTask=fl,_.SpsFocusedTaskActions=ml,_.SpsFocusedTaskExamples=ID,_.SpsForm=oo,_.SpsFormArrayMeta=ec,_.SpsFormComponentWrapper=tt,_.SpsFormExamples=Wp,_.SpsFormFieldMeta=Rr,_.SpsFormGroupMeta=Ql,_.SpsFormMetaBase=Pn,_.SpsFormSetMeta=An,_.SpsGrowler=hl,_.SpsGrowlerExamples=_D,_.SpsI=Ht,_.SpsIconButtonPanel=Au,_.SpsIncrementor=bi,_.SpsIncrementorExamples=yu,_.SpsInputGroup=vr,_.SpsInsightTile=Sf,_.SpsInsights=LD,_.SpsKeyValueList=gf,_.SpsKeyValueListItem=bf,_.SpsKeyValueTag=vf,_.SpsKeyValueTagExamples=AD,_.SpsLabel=vi,_.SpsLabelExamples=Tu,_.SpsListActionBar=yi,_.SpsListActionBarExamples=Vu,_.SpsListToolbar=Ef,_.SpsListToolbarExamples=YD,_.SpsListToolbarSearch=gl,_.SpsListToolbarSearchInfo=bl,_.SpsListToolbarSortBy=wf,_.SpsMicroBlock=Ti,_.SpsMicroBlockExamples=$u,_.SpsMicroZeroState=$f,_.SpsModal=Ei,_.SpsModalExamples=Hu,_.SpsModalFooter=ra,_.SpsMultiSelect=Ci,_.SpsMultiSelectExamples=Wu,_.SpsMultiValueTextInput=Wi,_.SpsMultiValueTextInputExamples=Sm,_.SpsPageSelector=oa,_.SpsPageSubtitle=kf,_.SpsPageTitle=Nf,_.SpsPageTitleExamples=JD,_.SpsPagination=Di,_.SpsPaginationExamples=Gu,_.SpsProductBar=If,_.SpsProductBarExamples=QD,_.SpsProductBarTab=vl,_.SpsProgressBar=xf,_.SpsProgressBarExamples=tN,_.SpsProgressRing=Ri,_.SpsRadioButton=Ni,_.SpsRadioButtonExamples=Yu,_.SpsScrollableContainer=Mf,_.SpsSearchResultsBar=Tf,_.SpsSearchResultsBarExamples=$D,_.SpsSearchResultsBarV2=Sl,_.SpsSelect=Un,_.SpsSelectExamples=nu,_.SpsSideNav=zu,_.SpsSideNavExamples=ju,_.SpsSlackLink=_f,_.SpsSlackLinkExamples=oN,_.SpsSlideInPanel=wi,_.SpsSlideInPanelExamples=Ku,_.SpsSortingHeader=Lf,_.SpsSortingHeaderCell=yl,_.SpsSortingHeaderExamples=iN,_.SpsSpinner=Ha,_.SpsSplitButton=ki,_.SpsSplitButtonExamples=qu,_.SpsSteppedProgressBar=Of,_.SpsSteppedProgressBarExamples=cN,_.SpsSummaryListColumn=xi,_.SpsSummaryListExamples=Ju,_.SpsSummaryListExpansion=so,_.SpsSummaryListRow=Ii,_.SpsTab=sf,_.SpsTabPanel=lf,_.SpsTable=qn,_.SpsTableBody=Dn,_.SpsTableCell=ue,_.SpsTableExamples=Fu,_.SpsTableHead=Cn,_.SpsTableHeader=it,_.SpsTableRow=Ye,_.SpsTabsV2=dl,_.SpsTag=Kt,_.SpsTagExamples=hw,_.SpsTaskQueue=Mi,_.SpsTaskQueueExamples=Zu,_.SpsTbody=Ou,_.SpsTd=Bu,_.SpsTextInput=sa,_.SpsTextInputExamples=Xu,_.SpsTextarea=_i,_.SpsTextareaExamples=Qu,_.SpsTh=ku,_.SpsThead=xu,_.SpsTile=Rf,_.SpsTileList=Bf,_.SpsTileListExamples=uN,_.SpsTimeInput=Gi,_.SpsTimeInputExamples=bm,_.SpsToggle=Li,_.SpsToggleExamples=tm,_.SpsTooltip=Rt,_.SpsTooltipExamples=nm,_.SpsTooltipTitle=Oi,_.SpsTr=_u,_.SpsValidators=wo,_.SpsVerticalRule=Tl,_.SpsVr=Vf,_.SpsWf=om,_.SpsWfDoc=im,_.SpsWfDs=cm,_.SpsWfStep=pm,_.SpsWizardExamples=am,_.SpsWizardSidebar=Bi,_.SpsWizardSubstep=Pi,_.SpsWorkflow=ia,_.SpsWorkflowDocument=la,_.SpsWorkflowDocumentStatus=ca,_.SpsWorkflowExamples=um,_.SpsWorkflowStep=da,_.SpsZeroState=Kf,_.SpsZeroStateExamples=bN,_.TooltipVisibility=_e,_.ValidationMode=Jt,_.addOnChangeErrorKey=jl,_.addOnSubmitErrorKey=ql,_.bindProps=vS,_.contentOf=Et,_.date=Or,_.dateConstraint=Xl,_.dateRange=Zl,_.findParentBranches=aa,_.flipPosition=Wa,_.formArray=NE,_.formControl=kE,_.formGroup=IE,_.getMember=ii,_.getPosition=Fn,_.letterAndNumberKeys=Ga,_.resetServerContext=DT,_.selectChildren=Mt,_.setDateFormat=Jl,_.toggleTooltipState=ea,_.useCheckDeprecatedProps=dc,_.useColumnCellResizer=Du,_.useColumnHeaderResizer=Cu,_.useCustomValidator=sS,_.useDidUpdateEffect=Ya,_.useDocumentEventListener=Ua,_.useElementId=gn,_.useForm=xE,_.useGrowlers=MD,_.useInputPopup=pr,_.useKeyboardSensor=Tp,_.useModals=UD,_.useMouseSensor=yp,_.usePatchReducer=Zt,_.usePortal=dr,_.useServerSideValidation=ME,_.useSpsAction=zD,_.useSpsForm=tc,_.useTouchSensor=Ep,_.validate=Co,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|