PageSourceSearch

https://portal.cardapioweb.com/assets/OpeningHoursPage-COe3GaN0.js

js cardapioweb.com collected 2026-09-24 11:58:30 UTC 3,490 bytes, 6 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="648f880b-a27a-550d-ae1f-efb1fbe0262f")}catch(e){}}();
3import{W as F,v as I,R as a,x as m,ai as N,cu as y,aF as v,a5 as x,bD as $,bT as A,bU as M,k as O}from"./index-Cs-In7Vx.js";import{u as W}from"./profile.actions-5K7DhYPO.js";import{u,W as j,C as L}from"./index-B3KUoMZT.js";import"./formatPeriod-CMJE9Ypw.js";const D=[{timezone:"America/Noronha",offset:"-02:00",hour:2},{timezone:"America/Sao_Paulo",offset:"-03:00",hour:3},{timezone:"America/Manaus",offset:"-04:00",hour:4},{timezone:"America/Rio_Branco",offset:"-05:00",hour:5}];function U(s,o){return(s%o+o)%o}function q(){const s=F(),o=I(),[C,d]=a.useState(""),[E,f]=a.useState(!1),l=u(e=>e.weekData),p=u(e=>e.setFirstRenderIntervals),_=u(e=>e.modified),w=u(e=>e.errors),n=m(({globalCompany:e})=>e.company.business_hours),z=m(({globalCompany:e})=>e.company.business_hours?.custom_dates),i=m(({globalCompany:e})=>e.company.local_timezone),b=a.useRef(!0),S=a.useCallback(async e=>{if(e.persist(),f(!0),e.target.value){const t=new FormData;t.append("local_timezone",e.target.value),await o(W(t)),d(e.target.value)}f(!1)},[o]);a.useEffect(()=>{i&&d(i)},[i]);const h=a.useCallback(()=>{Object.keys(l).forEach(e=>{p(e,n[e])})},[l,p,n]);a.useEffect(()=>{b.current&&n&&(b.current=!1,h())},[n,h]);const k=a.useCallback(e=>{const t=D.find(c=>c.timezone===e);if(t){const c=new Date().getUTCHours(),r=new Date().getUTCMinutes(),R=c-t.hour,T=U(R,24);return`${String(T).padStart(2,"0")}:${String(r).padStart(2,"0")}`}return"Desconhecida"},[]),g=a.useMemo(()=>N(async e=>{try{let t={...e};Object.keys(e).forEach(r=>{t={...t,[r]:y(t[r]).sort()}}),await o(v({business_hour_attributes:t})),s.success("Salvo com sucesso!")}catch{s.error("Erro ao salvar as informações")}},2e3),[s,o]);a.useEffect(()=>{_&&w.length===0&&g(l)},[l,g]);const H=a.useCallback(async e=>{try{const t={...e};Object.keys(e).forEach(r=>{t[r]={...t[r],intervals:y(t[r].intervals).sort()}}),await o(v({business_hour_attributes:{custom_dates:t}})),s.success("Salvo com sucesso!")}catch{s.error("Erro ao salvar as informações")}},[s,o]);return n?a.createElement("div",{className:"absolute inset-0 flex flex-col md:p-24"},a.createElement("div",{className:"grid h-full grid-cols-1 gap-72 overflow-auto border border-solid border-gray-200 bg-white p-12 md:rounded-8 md:p-24 lg:grid-cols-2"},a.createElement("div",{className:"space-y-32"},a.createElement("span",{className:"text-20 font-bold text-gray-600"},"Horários de funcionamento do Delivery e Retirada"),a.createElement(j,null),a.createElement($,{variant:"outlined",fullWidth:!0},a.createElement(A,{id:"local_timezone-label"},"Fuso Horário"),a.createElement(M,{labelId:"local_timezone-label",id:"local_timezone",name:"local_timezone",value:C,onChange:e=>S(e),renderValue:e=>e,label:"Fuso Horário",className:"bg-white",disabled:E},D.map(({timezone:e,offset:t})=>a.createElement(O,{key:e,value:e},`${e} (${t}) - Hora atual: ${k(e)}`))))),a.createElement(L,{title:"Datas personalizadas",subTitle:`Configure horários diferentes para certas datas, elas irão sobrepor os horários normais de funcionamento do
4            estabelecimento.`,customDates:z||{},saveCustomDates:H}))):a.createElement(x,null)}export{q as default};
5
6//# debugId=648f880b-a27a-550d-ae1f-efb1fbe0262f

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.