@theroutingcompany/components 0.0.132 → 0.0.133
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.
|
@@ -1997,7 +1997,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1997
1997
|
:hover {
|
|
1998
1998
|
background-color: ${p.color_gray_opacity_5};
|
|
1999
1999
|
}
|
|
2000
|
-
`,S1=e=>{var r,o,a;const t=((r=e.formatted_address)==null?void 0:r.length)&&((o=e.name)==null?void 0:o.length)&&!e.formatted_address.startsWith(e.name),n=(a=e.formatted_address)==null?void 0:a.length;return t&&e.name&&e.formatted_address?`${e.name}, ${e.formatted_address}`:n?e.formatted_address:""},VM=["name","formatted_address","geometry.location"],BM=({googleApiKey:e,placeholder:t="Enter an address",options:n={},libraries:r=["places"],googleMapsScriptBaseUrl:o,debounce:a=750,defaultValue:i,value:l,onChange:s,disabled:u,isInvalid:d,label:f,labelId:g="location-input-label",inputId:m="location-input",hideLabel:h=!1,boldLabel:b=!0,autoFocus:v,extraMenuActions:_=[],showExtraActionsWithResults:y=!1,...x})=>{const[S,C]=c.useState(i??l??""),P=c.createRef(),M=c.useRef(null),$=da({}),{overlayProps:k}=pv({},P),{fields:z=VM}=n;c.useEffect(()=>{l&&C(l)},[l]);const{autocompleteSessionToken:w,refreshSessionToken:K,placesService:I,placePredictions:T,getPlacePredictions:U,isPlacePredictionsLoading:O}=IM({apiKey:e,libraries:r,googleMapsScriptBaseUrl:o,debounce:a,options:{input:S,...n},sessionToken:!0}),[J,V]=c.useState(-1),Y=c.useCallback(q=>{q&&(I==null||I.getDetails({placeId:q.place_id??"",fields:z,sessionToken:w},(Z,ie)=>{if(Z&&ie===google.maps.places.PlacesServiceStatus.OK){const he=S1(Z);he&&C(he),s==null||s(Z),$.close(),V(-1)}else console.error("Error getting place details.",ie,Z);K()}))},[I,z,w,K,s,$]);ri(()=>{document.activeElement===P.current&&$.close()});const B=q=>{const Z=q.target.value;Z.length===0?(C(Z),s==null||s(null),V(-1)):(U({input:Z,locationRestriction:n.bounds,sessionToken:w}),C(Z),V(-1))},j=q=>{q.target.select(),K(),$.isOpen||$.open()},W=()=>{$.isOpen&&($.close(),V(-1))},R={extra:_.length&&(y||!O&&T.length===0||S.length===0),predictions:S.length>0&&!O&&T.length>0},H=(q,Z)=>{const ie=(R.predictions?T.length:0)+(R.extra?_.length:0);if(ie===0)return;let he=J;Z==="down"&&(he=(J+1)%ie),Z==="up"&&(he=(J-1+ie)%ie),V(he)},te=q=>{var Z;q.key==="Tab"?J!==-1&&(R.predictions&&J<T.length?Y(T[J]):R.extra&&((Z=_[J-(R.predictions?T.length:0)])==null||Z.onClick(),$.close(),V(-1))):q.key==="Enter"?q.preventDefault():q.key==="ArrowDown"?($.open(),H(q,"down")):q.key==="ArrowUp"?($.open(),H(q,"up")):(V(-1),$.isOpen||$.open())},ee=q=>{var Z;q.key==="Enter"&&J!==-1&&(R.predictions&&J<T.length?Y(T[J]):R.extra&&((Z=_[J-(R.predictions?T.length:0)])==null||Z.onClick(),$.close(),V(-1)))},ae=R.extra&&(O||R.predictions&&T.length);return Q(Et,{children:[f?Q(Re,{id:g,htmlFor:m,srOnly:h,mb:p.spacing_150,bold:b,children:[f,x.tooltipContent?E(Qe,{children:x.tooltipContent}):null]}):null,E(Nt,{height:p.spacing_600,type:"text",autoComplete:"off",autoFocus:v,"data-id":x["data-id"]??m,id:m,disabled:u,"data-state":d?"invalid":void 0,value:S,placeholder:t,ref:P,onChange:B,onFocus:j,onBlur:W,onKeyDown:te,onKeyUp:ee,onMouseUp:q=>q.preventDefault()}),x.description?E(z$,{children:x.description}):null,x.errorMessage?E(St,{children:x.errorMessage}):null,$.isOpen&&(R.extra||R.predictions)?E(Gr,{className:"google-input-popover",targetRef:P,popoverRef:M,state:$,...k,isTargetWidth:!0,placement:"bottom start",isNonModal:!0,children:Q(fe,{onMouseDown:q=>q.preventDefault(),children:[R.predictions?T.map((q,Z)=>E(E1,{p:p.spacing_200,truncate:!0,onClick:()=>Y(q),style:{cursor:"pointer"},backgroundColor:J===Z?p.color_gray_opacity_5:"transparent",children:q.description},q.place_id)):null,O?E(tt,{as:"span",italic:!0,p:p.spacing_200,style:{cursor:"pointer"},children:"Loading..."}):null,!R.extra&&!R.predictions?E(tt,{as:"span",p:p.spacing_200,style:{cursor:"pointer"},children:"No results found"}):null,ae?E("hr",{style:{margin:0,backgroundColor:p.color_gray_88,height:"1px",border:0}}):null,R.extra?_.map((q,Z)=>E(E1,{p:p.spacing_200,truncate:!0,onClick:()=>{q.onClick(),$.close()},style:{cursor:"pointer"},backgroundColor:(R.predictions?J===Z+T.length:J===Z)?p.color_gray_opacity_5:"transparent",children:q.label},q.id)):null]})}):null]})};var D1={};D1={Empty:"فارغ"};var P1={};P1={Empty:"Изпразни"};var T1={};T1={Empty:"Prázdné"};var C1={};C1={Empty:"Tom"};var k1={};k1={Empty:"Leer"};var A1={};A1={Empty:"Άδειο"};var I1={};I1={Empty:"Empty"};var O1={};O1={Empty:"Vacío"};var M1={};M1={Empty:"Tühjenda"};var F1={};F1={Empty:"Tyhjä"};var L1={};L1={Empty:"Vide"};var N1={};N1={Empty:"ריק"};var z1={};z1={Empty:"Prazno"};var R1={};R1={Empty:"Üres"};var K1={};K1={Empty:"Vuoto"};var V1={};V1={Empty:"空"};var B1={};B1={Empty:"비어 있음"};var j1={};j1={Empty:"Tuščias"};var U1={};U1={Empty:"Tukšs"};var W1={};W1={Empty:"Tom"};var H1={};H1={Empty:"Leeg"};var G1={};G1={Empty:"Pusty"};var Y1={};Y1={Empty:"Vazio"};var q1={};q1={Empty:"Vazio"};var X1={};X1={Empty:"Gol"};var J1={};J1={Empty:"Не заполнено"};var Z1={};Z1={Empty:"Prázdne"};var Q1={};Q1={Empty:"Prazen"};var ex={};ex={Empty:"Prazno"};var tx={};tx={Empty:"Tomt"};var nx={};nx={Empty:"Boş"};var rx={};rx={Empty:"Пусто"};var ox={};ox={Empty:"空"};var ax={};ax={Empty:"空白"};function jM(e){return e&&e.__esModule?e.default:e}var ix={};ix={"ar-AE":D1,"bg-BG":P1,"cs-CZ":T1,"da-DK":C1,"de-DE":k1,"el-GR":A1,"en-US":I1,"es-ES":O1,"et-EE":M1,"fi-FI":F1,"fr-FR":L1,"he-IL":N1,"hr-HR":z1,"hu-HU":R1,"it-IT":K1,"ja-JP":V1,"ko-KR":B1,"lt-LT":j1,"lv-LV":U1,"nb-NO":W1,"nl-NL":H1,"pl-PL":G1,"pt-BR":Y1,"pt-PT":q1,"ro-RO":X1,"ru-RU":J1,"sk-SK":Z1,"sl-SI":Q1,"sr-SP":ex,"sv-SE":tx,"tr-TR":nx,"uk-UA":rx,"zh-CN":ox,"zh-TW":ax};function UM(e){const t=c.useRef();let{value:n,textValue:r,minValue:o,maxValue:a,isDisabled:i,isReadOnly:l,isRequired:s,onIncrement:u,onIncrementPage:d,onDecrement:f,onDecrementPage:g,onDecrementToMin:m,onIncrementToMax:h}=e;const b=_t(jM(ix),"@react-aria/spinbutton"),v=()=>clearTimeout(t.current);c.useEffect(()=>()=>v(),[]);let _=w=>{if(!(w.ctrlKey||w.metaKey||w.shiftKey||w.altKey||l))switch(w.key){case"PageUp":if(d){w.preventDefault(),d==null||d();break}case"ArrowUp":case"Up":u&&(w.preventDefault(),u==null||u());break;case"PageDown":if(g){w.preventDefault(),g==null||g();break}case"ArrowDown":case"Down":f&&(w.preventDefault(),f==null||f());break;case"Home":m&&(w.preventDefault(),m==null||m());break;case"End":h&&(w.preventDefault(),h==null||h());break}},y=c.useRef(!1),x=()=>{y.current=!0},S=()=>{y.current=!1},C=r===""?b.format("Empty"):(r||`${n}`).replace("-","−");c.useEffect(()=>{y.current&&(K4("assertive"),Mr(C,"assertive"))},[C]);const P=ke(w=>{v(),u==null||u(),t.current=window.setTimeout(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n<a)&&P(60)},w)}),M=ke(w=>{v(),f==null||f(),t.current=window.setTimeout(()=>{(o===void 0||isNaN(o)||n===void 0||isNaN(n)||n>o)&&M(60)},w)});let $=w=>{w.preventDefault()},{addGlobalListener:k,removeAllGlobalListeners:z}=Dc();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":C,"aria-valuemin":o,"aria-valuemax":a,"aria-disabled":i||void 0,"aria-readonly":l||void 0,"aria-required":s||void 0,onKeyDown:_,onFocus:x,onBlur:S},incrementButtonProps:{onPressStart:()=>{P(400),k(window,"contextmenu",$)},onPressEnd:()=>{v(),z()},onFocus:x,onBlur:S},decrementButtonProps:{onPressStart:()=>{M(400),k(window,"contextmenu",$)},onPressEnd:()=>{v(),z()},onFocus:x,onBlur:S}}}function WM(e){return e&&e.__esModule?e.default:e}var lx={},sx={};sx={decrease:e=>`خفض ${e.fieldLabel}`,increase:e=>`زيادة ${e.fieldLabel}`,numberField:"حقل رقمي"};var cx={};cx={decrease:e=>`Намаляване ${e.fieldLabel}`,increase:e=>`Усилване ${e.fieldLabel}`,numberField:"Номер на полето"};var ux={};ux={decrease:e=>`Snížit ${e.fieldLabel}`,increase:e=>`Zvýšit ${e.fieldLabel}`,numberField:"Číselné pole"};var dx={};dx={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`Øg ${e.fieldLabel}`,numberField:"Talfelt"};var fx={};fx={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erhöhen`,numberField:"Nummernfeld"};var px={};px={decrease:e=>`Μείωση ${e.fieldLabel}`,increase:e=>`Αύξηση ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"};var mx={};mx={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var gx={};gx={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var hx={};hx={decrease:e=>`Vähenda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri väli"};var bx={};bx={decrease:e=>`Vähennä ${e.fieldLabel}`,increase:e=>`Lisää ${e.fieldLabel}`,numberField:"Numerokenttä"};var vx={};vx={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"};var yx={};yx={decrease:e=>`הקטן ${e.fieldLabel}`,increase:e=>`הגדל ${e.fieldLabel}`,numberField:"שדה מספר"};var $x={};$x={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Povećaj ${e.fieldLabel}`,numberField:"Polje broja"};var _x={};_x={decrease:e=>`${e.fieldLabel} csökkentése`,increase:e=>`${e.fieldLabel} növelése`,numberField:"Számmező"};var xx={};xx={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"};var wx={};wx={decrease:e=>`${e.fieldLabel}を縮小`,increase:e=>`${e.fieldLabel}を拡大`,numberField:"数値フィールド"};var Ex={};Ex={decrease:e=>`${e.fieldLabel} 감소`,increase:e=>`${e.fieldLabel} 증가`,numberField:"번호 필드"};var Sx={};Sx={decrease:e=>`Sumažinti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"};var Dx={};Dx={decrease:e=>`Samazināšana ${e.fieldLabel}`,increase:e=>`Palielināšana ${e.fieldLabel}`,numberField:"Skaitļu lauks"};var Px={};Px={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`Øk ${e.fieldLabel}`,numberField:"Tallfelt"};var Tx={};Tx={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"};var Cx={};Cx={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwiększ ${e.fieldLabel}`,numberField:"Pole numeru"};var kx={};kx={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var Ax={};Ax={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo numérico"};var Ix={};Ix={decrease:e=>`Scădere ${e.fieldLabel}`,increase:e=>`Creștere ${e.fieldLabel}`,numberField:"Câmp numeric"};var Ox={};Ox={decrease:e=>`Уменьшение ${e.fieldLabel}`,increase:e=>`Увеличение ${e.fieldLabel}`,numberField:"Числовое поле"};var Mx={};Mx={decrease:e=>`Znížiť ${e.fieldLabel}`,increase:e=>`Zvýšiť ${e.fieldLabel}`,numberField:"Číselné pole"};var Fx={};Fx={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Povečajte ${e.fieldLabel}`,numberField:"Številčno polje"};var Lx={};Lx={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var Nx={};Nx={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`Öka ${e.fieldLabel}`,numberField:"Nummerfält"};var zx={};zx={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} arttır`,numberField:"Sayı alanı"};var Rx={};Rx={decrease:e=>`Зменшити ${e.fieldLabel}`,increase:e=>`Збільшити ${e.fieldLabel}`,numberField:"Поле номера"};var Kx={};Kx={decrease:e=>`降低 ${e.fieldLabel}`,increase:e=>`提高 ${e.fieldLabel}`,numberField:"数字字段"};var Vx={};Vx={decrease:e=>`縮小 ${e.fieldLabel}`,increase:e=>`放大 ${e.fieldLabel}`,numberField:"數字欄位"},lx={"ar-AE":sx,"bg-BG":cx,"cs-CZ":ux,"da-DK":dx,"de-DE":fx,"el-GR":px,"en-US":mx,"es-ES":gx,"et-EE":hx,"fi-FI":bx,"fr-FR":vx,"he-IL":yx,"hr-HR":$x,"hu-HU":_x,"it-IT":xx,"ja-JP":wx,"ko-KR":Ex,"lt-LT":Sx,"lv-LV":Dx,"nb-NO":Px,"nl-NL":Tx,"pl-PL":Cx,"pt-BR":kx,"pt-PT":Ax,"ro-RO":Ix,"ru-RU":Ox,"sk-SK":Mx,"sl-SI":Fx,"sr-SP":Lx,"sv-SE":Nx,"tr-TR":zx,"uk-UA":Rx,"zh-CN":Kx,"zh-TW":Vx};function HM(e,t,n){let{id:r,decrementAriaLabel:o,incrementAriaLabel:a,isDisabled:i,isReadOnly:l,isRequired:s,minValue:u,maxValue:d,autoFocus:f,validationState:g,label:m,formatOptions:h,onBlur:b=()=>{},onFocus:v,onFocusChange:_,onKeyDown:y,onKeyUp:x,description:S,errorMessage:C,...P}=e,{increment:M,incrementToMax:$,decrement:k,decrementToMin:z,numberValue:w,inputValue:K,commit:I}=t;const T=_t(WM(lx));let U=ct(r),{focusProps:O}=Nc({onBlur:()=>{I()}}),J=Cb(h),V=c.useMemo(()=>J.resolvedOptions(),[J]),Y=Cb({...h,currencySign:void 0}),B=c.useMemo(()=>isNaN(w)?"":Y.format(w),[Y,w]),{spinButtonProps:j,incrementButtonProps:W,decrementButtonProps:R}=UM({isDisabled:i,isReadOnly:l,isRequired:s,maxValue:d,minValue:u,onIncrement:M,onIncrementToMax:$,onDecrement:k,onDecrementToMin:z,value:w,textValue:B}),[H,te]=c.useState(!1),{focusWithinProps:ee}=Lo({isDisabled:i,onFocusWithinChange:te}),ae=c.useCallback(st=>{Math.abs(st.deltaY)<=Math.abs(st.deltaX)||(st.deltaY>0?M():st.deltaY<0&&k())},[k,M]);vC({onScroll:ae,isDisabled:i||l||!H},n);let Z=V.maximumFractionDigits>0,ie=isNaN(t.minValue)||t.minValue<0,he="numeric";Dg()?ie?he="text":Z&&(he="decimal"):Ec()&&(ie?he="numeric":Z&&(he="decimal"));let se=st=>{t.validate(st)&&t.setInputValue(st)},me=$n(e),{labelProps:Se,inputProps:Mn,descriptionProps:Fn,errorMessageProps:io}=H9({...P,...me,label:m,autoFocus:f,isDisabled:i,isReadOnly:l,isRequired:s,validationState:g,value:K,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||null,"aria-labelledby":e["aria-labelledby"]||null,id:U,type:"text",inputMode:he,onChange:se,onBlur:b,onFocus:v,onFocusChange:_,onKeyDown:y,onKeyUp:x,description:S,errorMessage:C},t,n),lo=pe(j,O,Mn,{role:null,"aria-roledescription":ko()?null:T.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"}),cn=st=>{document.activeElement!==n.current&&(st.pointerType==="mouse"?n.current.focus():st.target.focus())},Rt=e["aria-label"]||(typeof e.label=="string"?e.label:""),un;Rt||(un=e.label!=null?Se.id:e["aria-labelledby"]);let so=ct(),Zl=ct(),ep=pe(W,{"aria-label":a||T.format("increase",{fieldLabel:Rt}).trim(),id:un&&!a?so:null,"aria-labelledby":un&&!a?`${so} ${un}`:null,"aria-controls":U,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:cn}),Ql=pe(R,{"aria-label":o||T.format("decrease",{fieldLabel:Rt}).trim(),id:un&&!o?Zl:null,"aria-labelledby":un&&!o?`${Zl} ${un}`:null,"aria-controls":U,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:cn});return{groupProps:{role:"group","aria-disabled":i,"aria-invalid":g==="invalid"?"true":void 0,...ee},labelProps:Se,inputProps:lo,incrementButtonProps:ep,decrementButtonProps:Ql,errorMessageProps:io,descriptionProps:Fn}}function GM(e){let{minValue:t,maxValue:n,step:r,formatOptions:o,value:a,defaultValue:i,onChange:l,locale:s,isDisabled:u,isReadOnly:d}=e,[f,g]=Mt(a,isNaN(i)?NaN:i,l),[m,h]=c.useState(()=>isNaN(f)?"":new qi(s,o).format(f)),b=c.useMemo(()=>new Eb(s,o),[s,o]),v=c.useMemo(()=>b.getNumberingSystem(m),[b,m]),_=c.useMemo(()=>new qi(s,{...o,numberingSystem:v}),[s,o,v]),y=c.useMemo(()=>_.resolvedOptions(),[_]),x=c.useCallback(j=>isNaN(j)||j===null?"":_.format(j),[_]),S=isNaN(r)?1:r;y.style==="percent"&&isNaN(r)&&(S=.01);let[C,P]=c.useState(f),[M,$]=c.useState(s),[k,z]=c.useState(o);(!Object.is(f,C)||s!==M||o!==k)&&(h(x(f)),P(f),$(s),z(o));let w=c.useMemo(()=>b.parse(m),[b,m]),K=()=>{if(!m.length){g(NaN),h(a===void 0?"":x(f));return}if(isNaN(w)){h(x(f));return}let j;isNaN(r)?j=di(w,t,n):j=jn(w,t,n,r),j=b.parse(x(j)),g(j),h(x(a===void 0?j:f))},I=(j,W)=>{let R=w;if(isNaN(R)){let H=isNaN(W)?0:W;return jn(H,t,n,S)}else{let H=jn(R,t,n,S);return j==="+"&&H>R||j==="-"&&H<R?H:jn(Rd(j,R,S),t,n,S)}},T=()=>{let j=I("+",t);j===f&&h(x(j)),g(j)},U=()=>{let j=I("-",n);j===f&&h(x(j)),g(j)},O=()=>{n!=null&&g(jn(n,t,n,S))},J=()=>{t!=null&&g(t)},V=c.useMemo(()=>!u&&!d&&(isNaN(w)||isNaN(n)||jn(w,t,n,S)>w||Rd("+",w,S)<=n),[u,d,t,n,S,w]),Y=c.useMemo(()=>!u&&!d&&(isNaN(w)||isNaN(t)||jn(w,t,n,S)<w||Rd("-",w,S)>=t),[u,d,t,n,S,w]);return{validate:j=>b.isValidPartialNumber(j,t,n),increment:T,incrementToMax:O,decrement:U,decrementToMin:J,canIncrement:V,canDecrement:Y,minValue:t,maxValue:n,numberValue:w,setInputValue:h,inputValue:m,commit:K}}function Rd(e,t,n){let r=e==="+"?t+n:t-n;if(t%1!==0||n%1!==0){const o=t.toString().split("."),a=n.toString().split("."),i=o[1]&&o[1].length||0,l=a[1]&&a[1].length||0,s=Math.pow(10,Math.max(i,l));t=Math.round(t*s),n=Math.round(n*s),r=e==="+"?t+n:t-n,r/=s}return r}function Bx(e){const t=c.useRef(null),{buttonProps:n,isPressed:r}=Dr(e,t),{children:o,className:a}=e;return E("button",{"data-state":r?"pressed":void 0,ref:t,...n,className:a,children:o})}const YM=L.default.div`
|
|
2000
|
+
`,S1=e=>{var r,o,a;const t=((r=e.formatted_address)==null?void 0:r.length)&&((o=e.name)==null?void 0:o.length)&&!e.formatted_address.startsWith(e.name),n=(a=e.formatted_address)==null?void 0:a.length;return t&&e.name&&e.formatted_address?`${e.name}, ${e.formatted_address}`:n?e.formatted_address:""},VM=["name","formatted_address","geometry.location"],BM=({googleApiKey:e,placeholder:t="Enter an address",options:n={},libraries:r=["places"],googleMapsScriptBaseUrl:o,debounce:a=750,defaultValue:i,value:l,onChange:s,disabled:u,isInvalid:d,label:f,labelId:g="location-input-label",inputId:m="location-input",hideLabel:h=!1,boldLabel:b=!0,autoFocus:v,extraMenuActions:_=[],showExtraActionsWithResults:y=!1,...x})=>{const[S,C]=c.useState(i??l??""),P=c.createRef(),M=c.useRef(null),$=da({}),{overlayProps:k}=pv({},P),{fields:z=VM}=n;c.useEffect(()=>{l&&C(l)},[l]);const{autocompleteSessionToken:w,refreshSessionToken:K,placesService:I,placePredictions:T,getPlacePredictions:U,isPlacePredictionsLoading:O}=IM({apiKey:e,libraries:r,googleMapsScriptBaseUrl:o,debounce:a,options:{input:S,...n},sessionToken:!0}),[J,V]=c.useState(-1),Y=c.useCallback(q=>{q&&(I==null||I.getDetails({placeId:q.place_id??"",fields:z,sessionToken:w},(Z,ie)=>{if(Z&&ie===google.maps.places.PlacesServiceStatus.OK){const he=S1(Z);he&&C(he),s==null||s(Z),$.close(),V(-1)}else console.error("Error getting place details.",ie,Z);typeof google=="object"&&K()}))},[I,z,w,K,s,$]);ri(()=>{document.activeElement===P.current&&$.close()});const B=q=>{const Z=q.target.value;Z.length===0?(C(Z),s==null||s(null),V(-1)):(U({input:Z,locationRestriction:n.bounds,sessionToken:w}),C(Z),V(-1))},j=q=>{q.target.select(),typeof google=="object"&&K(),$.isOpen||$.open()},W=()=>{$.isOpen&&($.close(),V(-1))},R={extra:_.length&&(y||!O&&T.length===0||S.length===0),predictions:S.length>0&&!O&&T.length>0},H=(q,Z)=>{const ie=(R.predictions?T.length:0)+(R.extra?_.length:0);if(ie===0)return;let he=J;Z==="down"&&(he=(J+1)%ie),Z==="up"&&(he=(J-1+ie)%ie),V(he)},te=q=>{var Z;q.key==="Tab"?J!==-1&&(R.predictions&&J<T.length?Y(T[J]):R.extra&&((Z=_[J-(R.predictions?T.length:0)])==null||Z.onClick(),$.close(),V(-1))):q.key==="Enter"?q.preventDefault():q.key==="ArrowDown"?($.open(),H(q,"down")):q.key==="ArrowUp"?($.open(),H(q,"up")):(V(-1),$.isOpen||$.open())},ee=q=>{var Z;q.key==="Enter"&&J!==-1&&(R.predictions&&J<T.length?Y(T[J]):R.extra&&((Z=_[J-(R.predictions?T.length:0)])==null||Z.onClick(),$.close(),V(-1)))},ae=R.extra&&(O||R.predictions&&T.length);return Q(Et,{children:[f?Q(Re,{id:g,htmlFor:m,srOnly:h,mb:p.spacing_150,bold:b,children:[f,x.tooltipContent?E(Qe,{children:x.tooltipContent}):null]}):null,E(Nt,{height:p.spacing_600,type:"text",autoComplete:"off",autoFocus:v,"data-id":x["data-id"]??m,id:m,disabled:u,"data-state":d?"invalid":void 0,value:S,placeholder:t,ref:P,onChange:B,onFocus:j,onBlur:W,onKeyDown:te,onKeyUp:ee,onMouseUp:q=>q.preventDefault()}),x.description?E(z$,{children:x.description}):null,x.errorMessage?E(St,{children:x.errorMessage}):null,$.isOpen&&(R.extra||R.predictions)?E(Gr,{className:"google-input-popover",targetRef:P,popoverRef:M,state:$,...k,isTargetWidth:!0,placement:"bottom start",isNonModal:!0,children:Q(fe,{onMouseDown:q=>q.preventDefault(),children:[R.predictions?T.map((q,Z)=>E(E1,{p:p.spacing_200,truncate:!0,onClick:()=>Y(q),style:{cursor:"pointer"},backgroundColor:J===Z?p.color_gray_opacity_5:"transparent",children:q.description},q.place_id)):null,O?E(tt,{as:"span",italic:!0,p:p.spacing_200,style:{cursor:"pointer"},children:"Loading..."}):null,!R.extra&&!R.predictions?E(tt,{as:"span",p:p.spacing_200,style:{cursor:"pointer"},children:"No results found"}):null,ae?E("hr",{style:{margin:0,backgroundColor:p.color_gray_88,height:"1px",border:0}}):null,R.extra?_.map((q,Z)=>E(E1,{p:p.spacing_200,truncate:!0,onClick:()=>{q.onClick(),$.close()},style:{cursor:"pointer"},backgroundColor:(R.predictions?J===Z+T.length:J===Z)?p.color_gray_opacity_5:"transparent",children:q.label},q.id)):null]})}):null]})};var D1={};D1={Empty:"فارغ"};var P1={};P1={Empty:"Изпразни"};var T1={};T1={Empty:"Prázdné"};var C1={};C1={Empty:"Tom"};var k1={};k1={Empty:"Leer"};var A1={};A1={Empty:"Άδειο"};var I1={};I1={Empty:"Empty"};var O1={};O1={Empty:"Vacío"};var M1={};M1={Empty:"Tühjenda"};var F1={};F1={Empty:"Tyhjä"};var L1={};L1={Empty:"Vide"};var N1={};N1={Empty:"ריק"};var z1={};z1={Empty:"Prazno"};var R1={};R1={Empty:"Üres"};var K1={};K1={Empty:"Vuoto"};var V1={};V1={Empty:"空"};var B1={};B1={Empty:"비어 있음"};var j1={};j1={Empty:"Tuščias"};var U1={};U1={Empty:"Tukšs"};var W1={};W1={Empty:"Tom"};var H1={};H1={Empty:"Leeg"};var G1={};G1={Empty:"Pusty"};var Y1={};Y1={Empty:"Vazio"};var q1={};q1={Empty:"Vazio"};var X1={};X1={Empty:"Gol"};var J1={};J1={Empty:"Не заполнено"};var Z1={};Z1={Empty:"Prázdne"};var Q1={};Q1={Empty:"Prazen"};var ex={};ex={Empty:"Prazno"};var tx={};tx={Empty:"Tomt"};var nx={};nx={Empty:"Boş"};var rx={};rx={Empty:"Пусто"};var ox={};ox={Empty:"空"};var ax={};ax={Empty:"空白"};function jM(e){return e&&e.__esModule?e.default:e}var ix={};ix={"ar-AE":D1,"bg-BG":P1,"cs-CZ":T1,"da-DK":C1,"de-DE":k1,"el-GR":A1,"en-US":I1,"es-ES":O1,"et-EE":M1,"fi-FI":F1,"fr-FR":L1,"he-IL":N1,"hr-HR":z1,"hu-HU":R1,"it-IT":K1,"ja-JP":V1,"ko-KR":B1,"lt-LT":j1,"lv-LV":U1,"nb-NO":W1,"nl-NL":H1,"pl-PL":G1,"pt-BR":Y1,"pt-PT":q1,"ro-RO":X1,"ru-RU":J1,"sk-SK":Z1,"sl-SI":Q1,"sr-SP":ex,"sv-SE":tx,"tr-TR":nx,"uk-UA":rx,"zh-CN":ox,"zh-TW":ax};function UM(e){const t=c.useRef();let{value:n,textValue:r,minValue:o,maxValue:a,isDisabled:i,isReadOnly:l,isRequired:s,onIncrement:u,onIncrementPage:d,onDecrement:f,onDecrementPage:g,onDecrementToMin:m,onIncrementToMax:h}=e;const b=_t(jM(ix),"@react-aria/spinbutton"),v=()=>clearTimeout(t.current);c.useEffect(()=>()=>v(),[]);let _=w=>{if(!(w.ctrlKey||w.metaKey||w.shiftKey||w.altKey||l))switch(w.key){case"PageUp":if(d){w.preventDefault(),d==null||d();break}case"ArrowUp":case"Up":u&&(w.preventDefault(),u==null||u());break;case"PageDown":if(g){w.preventDefault(),g==null||g();break}case"ArrowDown":case"Down":f&&(w.preventDefault(),f==null||f());break;case"Home":m&&(w.preventDefault(),m==null||m());break;case"End":h&&(w.preventDefault(),h==null||h());break}},y=c.useRef(!1),x=()=>{y.current=!0},S=()=>{y.current=!1},C=r===""?b.format("Empty"):(r||`${n}`).replace("-","−");c.useEffect(()=>{y.current&&(K4("assertive"),Mr(C,"assertive"))},[C]);const P=ke(w=>{v(),u==null||u(),t.current=window.setTimeout(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n<a)&&P(60)},w)}),M=ke(w=>{v(),f==null||f(),t.current=window.setTimeout(()=>{(o===void 0||isNaN(o)||n===void 0||isNaN(n)||n>o)&&M(60)},w)});let $=w=>{w.preventDefault()},{addGlobalListener:k,removeAllGlobalListeners:z}=Dc();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":C,"aria-valuemin":o,"aria-valuemax":a,"aria-disabled":i||void 0,"aria-readonly":l||void 0,"aria-required":s||void 0,onKeyDown:_,onFocus:x,onBlur:S},incrementButtonProps:{onPressStart:()=>{P(400),k(window,"contextmenu",$)},onPressEnd:()=>{v(),z()},onFocus:x,onBlur:S},decrementButtonProps:{onPressStart:()=>{M(400),k(window,"contextmenu",$)},onPressEnd:()=>{v(),z()},onFocus:x,onBlur:S}}}function WM(e){return e&&e.__esModule?e.default:e}var lx={},sx={};sx={decrease:e=>`خفض ${e.fieldLabel}`,increase:e=>`زيادة ${e.fieldLabel}`,numberField:"حقل رقمي"};var cx={};cx={decrease:e=>`Намаляване ${e.fieldLabel}`,increase:e=>`Усилване ${e.fieldLabel}`,numberField:"Номер на полето"};var ux={};ux={decrease:e=>`Snížit ${e.fieldLabel}`,increase:e=>`Zvýšit ${e.fieldLabel}`,numberField:"Číselné pole"};var dx={};dx={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`Øg ${e.fieldLabel}`,numberField:"Talfelt"};var fx={};fx={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erhöhen`,numberField:"Nummernfeld"};var px={};px={decrease:e=>`Μείωση ${e.fieldLabel}`,increase:e=>`Αύξηση ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"};var mx={};mx={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var gx={};gx={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var hx={};hx={decrease:e=>`Vähenda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri väli"};var bx={};bx={decrease:e=>`Vähennä ${e.fieldLabel}`,increase:e=>`Lisää ${e.fieldLabel}`,numberField:"Numerokenttä"};var vx={};vx={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"};var yx={};yx={decrease:e=>`הקטן ${e.fieldLabel}`,increase:e=>`הגדל ${e.fieldLabel}`,numberField:"שדה מספר"};var $x={};$x={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Povećaj ${e.fieldLabel}`,numberField:"Polje broja"};var _x={};_x={decrease:e=>`${e.fieldLabel} csökkentése`,increase:e=>`${e.fieldLabel} növelése`,numberField:"Számmező"};var xx={};xx={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"};var wx={};wx={decrease:e=>`${e.fieldLabel}を縮小`,increase:e=>`${e.fieldLabel}を拡大`,numberField:"数値フィールド"};var Ex={};Ex={decrease:e=>`${e.fieldLabel} 감소`,increase:e=>`${e.fieldLabel} 증가`,numberField:"번호 필드"};var Sx={};Sx={decrease:e=>`Sumažinti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"};var Dx={};Dx={decrease:e=>`Samazināšana ${e.fieldLabel}`,increase:e=>`Palielināšana ${e.fieldLabel}`,numberField:"Skaitļu lauks"};var Px={};Px={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`Øk ${e.fieldLabel}`,numberField:"Tallfelt"};var Tx={};Tx={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"};var Cx={};Cx={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwiększ ${e.fieldLabel}`,numberField:"Pole numeru"};var kx={};kx={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var Ax={};Ax={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo numérico"};var Ix={};Ix={decrease:e=>`Scădere ${e.fieldLabel}`,increase:e=>`Creștere ${e.fieldLabel}`,numberField:"Câmp numeric"};var Ox={};Ox={decrease:e=>`Уменьшение ${e.fieldLabel}`,increase:e=>`Увеличение ${e.fieldLabel}`,numberField:"Числовое поле"};var Mx={};Mx={decrease:e=>`Znížiť ${e.fieldLabel}`,increase:e=>`Zvýšiť ${e.fieldLabel}`,numberField:"Číselné pole"};var Fx={};Fx={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Povečajte ${e.fieldLabel}`,numberField:"Številčno polje"};var Lx={};Lx={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var Nx={};Nx={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`Öka ${e.fieldLabel}`,numberField:"Nummerfält"};var zx={};zx={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} arttır`,numberField:"Sayı alanı"};var Rx={};Rx={decrease:e=>`Зменшити ${e.fieldLabel}`,increase:e=>`Збільшити ${e.fieldLabel}`,numberField:"Поле номера"};var Kx={};Kx={decrease:e=>`降低 ${e.fieldLabel}`,increase:e=>`提高 ${e.fieldLabel}`,numberField:"数字字段"};var Vx={};Vx={decrease:e=>`縮小 ${e.fieldLabel}`,increase:e=>`放大 ${e.fieldLabel}`,numberField:"數字欄位"},lx={"ar-AE":sx,"bg-BG":cx,"cs-CZ":ux,"da-DK":dx,"de-DE":fx,"el-GR":px,"en-US":mx,"es-ES":gx,"et-EE":hx,"fi-FI":bx,"fr-FR":vx,"he-IL":yx,"hr-HR":$x,"hu-HU":_x,"it-IT":xx,"ja-JP":wx,"ko-KR":Ex,"lt-LT":Sx,"lv-LV":Dx,"nb-NO":Px,"nl-NL":Tx,"pl-PL":Cx,"pt-BR":kx,"pt-PT":Ax,"ro-RO":Ix,"ru-RU":Ox,"sk-SK":Mx,"sl-SI":Fx,"sr-SP":Lx,"sv-SE":Nx,"tr-TR":zx,"uk-UA":Rx,"zh-CN":Kx,"zh-TW":Vx};function HM(e,t,n){let{id:r,decrementAriaLabel:o,incrementAriaLabel:a,isDisabled:i,isReadOnly:l,isRequired:s,minValue:u,maxValue:d,autoFocus:f,validationState:g,label:m,formatOptions:h,onBlur:b=()=>{},onFocus:v,onFocusChange:_,onKeyDown:y,onKeyUp:x,description:S,errorMessage:C,...P}=e,{increment:M,incrementToMax:$,decrement:k,decrementToMin:z,numberValue:w,inputValue:K,commit:I}=t;const T=_t(WM(lx));let U=ct(r),{focusProps:O}=Nc({onBlur:()=>{I()}}),J=Cb(h),V=c.useMemo(()=>J.resolvedOptions(),[J]),Y=Cb({...h,currencySign:void 0}),B=c.useMemo(()=>isNaN(w)?"":Y.format(w),[Y,w]),{spinButtonProps:j,incrementButtonProps:W,decrementButtonProps:R}=UM({isDisabled:i,isReadOnly:l,isRequired:s,maxValue:d,minValue:u,onIncrement:M,onIncrementToMax:$,onDecrement:k,onDecrementToMin:z,value:w,textValue:B}),[H,te]=c.useState(!1),{focusWithinProps:ee}=Lo({isDisabled:i,onFocusWithinChange:te}),ae=c.useCallback(st=>{Math.abs(st.deltaY)<=Math.abs(st.deltaX)||(st.deltaY>0?M():st.deltaY<0&&k())},[k,M]);vC({onScroll:ae,isDisabled:i||l||!H},n);let Z=V.maximumFractionDigits>0,ie=isNaN(t.minValue)||t.minValue<0,he="numeric";Dg()?ie?he="text":Z&&(he="decimal"):Ec()&&(ie?he="numeric":Z&&(he="decimal"));let se=st=>{t.validate(st)&&t.setInputValue(st)},me=$n(e),{labelProps:Se,inputProps:Mn,descriptionProps:Fn,errorMessageProps:io}=H9({...P,...me,label:m,autoFocus:f,isDisabled:i,isReadOnly:l,isRequired:s,validationState:g,value:K,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||null,"aria-labelledby":e["aria-labelledby"]||null,id:U,type:"text",inputMode:he,onChange:se,onBlur:b,onFocus:v,onFocusChange:_,onKeyDown:y,onKeyUp:x,description:S,errorMessage:C},t,n),lo=pe(j,O,Mn,{role:null,"aria-roledescription":ko()?null:T.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"}),cn=st=>{document.activeElement!==n.current&&(st.pointerType==="mouse"?n.current.focus():st.target.focus())},Rt=e["aria-label"]||(typeof e.label=="string"?e.label:""),un;Rt||(un=e.label!=null?Se.id:e["aria-labelledby"]);let so=ct(),Zl=ct(),ep=pe(W,{"aria-label":a||T.format("increase",{fieldLabel:Rt}).trim(),id:un&&!a?so:null,"aria-labelledby":un&&!a?`${so} ${un}`:null,"aria-controls":U,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:cn}),Ql=pe(R,{"aria-label":o||T.format("decrease",{fieldLabel:Rt}).trim(),id:un&&!o?Zl:null,"aria-labelledby":un&&!o?`${Zl} ${un}`:null,"aria-controls":U,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:cn});return{groupProps:{role:"group","aria-disabled":i,"aria-invalid":g==="invalid"?"true":void 0,...ee},labelProps:Se,inputProps:lo,incrementButtonProps:ep,decrementButtonProps:Ql,errorMessageProps:io,descriptionProps:Fn}}function GM(e){let{minValue:t,maxValue:n,step:r,formatOptions:o,value:a,defaultValue:i,onChange:l,locale:s,isDisabled:u,isReadOnly:d}=e,[f,g]=Mt(a,isNaN(i)?NaN:i,l),[m,h]=c.useState(()=>isNaN(f)?"":new qi(s,o).format(f)),b=c.useMemo(()=>new Eb(s,o),[s,o]),v=c.useMemo(()=>b.getNumberingSystem(m),[b,m]),_=c.useMemo(()=>new qi(s,{...o,numberingSystem:v}),[s,o,v]),y=c.useMemo(()=>_.resolvedOptions(),[_]),x=c.useCallback(j=>isNaN(j)||j===null?"":_.format(j),[_]),S=isNaN(r)?1:r;y.style==="percent"&&isNaN(r)&&(S=.01);let[C,P]=c.useState(f),[M,$]=c.useState(s),[k,z]=c.useState(o);(!Object.is(f,C)||s!==M||o!==k)&&(h(x(f)),P(f),$(s),z(o));let w=c.useMemo(()=>b.parse(m),[b,m]),K=()=>{if(!m.length){g(NaN),h(a===void 0?"":x(f));return}if(isNaN(w)){h(x(f));return}let j;isNaN(r)?j=di(w,t,n):j=jn(w,t,n,r),j=b.parse(x(j)),g(j),h(x(a===void 0?j:f))},I=(j,W)=>{let R=w;if(isNaN(R)){let H=isNaN(W)?0:W;return jn(H,t,n,S)}else{let H=jn(R,t,n,S);return j==="+"&&H>R||j==="-"&&H<R?H:jn(Rd(j,R,S),t,n,S)}},T=()=>{let j=I("+",t);j===f&&h(x(j)),g(j)},U=()=>{let j=I("-",n);j===f&&h(x(j)),g(j)},O=()=>{n!=null&&g(jn(n,t,n,S))},J=()=>{t!=null&&g(t)},V=c.useMemo(()=>!u&&!d&&(isNaN(w)||isNaN(n)||jn(w,t,n,S)>w||Rd("+",w,S)<=n),[u,d,t,n,S,w]),Y=c.useMemo(()=>!u&&!d&&(isNaN(w)||isNaN(t)||jn(w,t,n,S)<w||Rd("-",w,S)>=t),[u,d,t,n,S,w]);return{validate:j=>b.isValidPartialNumber(j,t,n),increment:T,incrementToMax:O,decrement:U,decrementToMin:J,canIncrement:V,canDecrement:Y,minValue:t,maxValue:n,numberValue:w,setInputValue:h,inputValue:m,commit:K}}function Rd(e,t,n){let r=e==="+"?t+n:t-n;if(t%1!==0||n%1!==0){const o=t.toString().split("."),a=n.toString().split("."),i=o[1]&&o[1].length||0,l=a[1]&&a[1].length||0,s=Math.pow(10,Math.max(i,l));t=Math.round(t*s),n=Math.round(n*s),r=e==="+"?t+n:t-n,r/=s}return r}function Bx(e){const t=c.useRef(null),{buttonProps:n,isPressed:r}=Dr(e,t),{children:o,className:a}=e;return E("button",{"data-state":r?"pressed":void 0,ref:t,...n,className:a,children:o})}const YM=L.default.div`
|
|
2001
2001
|
display: inline-grid;
|
|
2002
2002
|
grid-template:
|
|
2003
2003
|
'field increment'
|