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