1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,361653,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",0,t])},63209,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircle",()=>t.default])},473708,803408,e=>{"use strict";let t=(0,e.i(475254).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);e.s(["default",0,t],803408),e.s(["Image",0,t],473708)},582894,192986,57489,e=>{"use strict";var t=e.i(475254);let r=(0,t.default)("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);e.s(["default",0,r],582894);let s=(0,t.default)("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);e.s(["default",0,s],192986);let a=(0,t.default)("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);e.s(["default",0,a],57489)},991918,820783,e=>{"use strict";var t=e.i(271645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function s(...e){return t=>{let s=!1,a=e.map(e=>{let a=r(e,t);return s||"function"!=typeof a||(s=!0),a});if(s)return()=>{for(let t=0;t<a.length;t++){let s=a[t];"function"==typeof s?s():r(e[t],null)}}}}e.s(["composeRefs",0,s,"useComposedRefs",0,function(...e){return t.useCallback(s(...e),e)}],820783);var a=e.i(843476),n=Symbol.for("react.lazy"),l=t[" use ".trim().toString()];function i(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===n&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}function o(e){var r;let n,o=(r=e,(n=t.forwardRef((e,r)=>{let{children:a,...n}=e;if(i(a)&&"function"==typeof l&&(a=l(a._payload)),t.isValidElement(a)){var o;let e,l,i=(o=a,(l=(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(l=(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref),d=function(e,t){let r={...t};for(let s in t){let a=e[s],n=t[s];/^on[A-Z]/.test(s)?a&&n?r[s]=(...e)=>{let t=n(...e);return a(...e),t}:a&&(r[s]=a):"style"===s?r[s]={...a,...n}:"className"===s&&(r[s]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}(n,a.props);return a.type!==t.Fragment&&(d.ref=r?s(r,i):i),t.cloneElement(a,d)}return t.Children.count(a)>1?t.Children.only(null):null})).displayName=`${r}.SlotClone`,n),d=t.forwardRef((e,r)=>{let{children:s,...n}=e;i(s)&&"function"==typeof l&&(s=l(s._payload));let d=t.Children.toArray(s),c=d.find(u);if(c){let e=c.props.children,s=d.map(r=>r!==c?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,a.jsx)(o,{...n,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,s):null})}return(0,a.jsx)(o,{...n,ref:r,children:s})});return d.displayName=`${e}.Slot`,d}var d=o("Slot"),c=Symbol("radix.slottable");function u(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===c}e.s(["Slot",0,d,"createSlot",0,o],991918)},167881,225913,e=>{"use strict";var t=e.i(843476),r=e.i(991918),s=e.i(207670);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=s.clsx,l=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:l,defaultVariants:i}=t,o=Object.keys(l).map(e=>{let t=null==r?void 0:r[e],s=null==i?void 0:i[e];if(null===t)return null;let n=a(t)||a(s);return l[e][n]}),d=r&&Object.entries(r).reduce((e,t)=>
1{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return n(e,o,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...d}[t]):({...i,...d})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)};e.s(["cva",0,l],225913);var i=e.i(647163);let o=l("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Button",0,function({className:e,variant:s="default",size:a="default",asChild:n=!1,...l}){let d=n?r.Slot:"button";return(0,t.jsx)(d,{"data-slot":"button","data-variant":s,"data-size":a,className:(0,i.cn)(o({variant:s,size:a,className:e})),...l})}],167881)},290571,e=>{"use strict";var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,r)},r=function(){return(r=Object.assign||function(e){for(var t,r=1,s=arguments.length;r<s;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError,e.s(["__assign",()=>r,"__extends",0,function(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function s(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(s.prototype=r.prototype,new s)},"__rest",0,function(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)0>t.indexOf(s[a])&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r},"__spreadArray",0,function(e,t,r){if(r||2==arguments.length)for(var s,a=0,n=t.length;a<n;a++)!s&&a in t||(s||(s=Array.prototype.slice.call(t,0,a)),s[a]=t[a]);return e.concat(s||Array.prototype.slice.call(t))}])},949411,497140,486348,e=>{"use strict";var t=e.i(475254);let r=(0,t.default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["default",0,r],949411);let s=(0,t.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);e.s(["default",0,s],497140);let a=(0,t.default)("store",[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]]);e.s(["default",0,a],486348)},503116,e=>{"use strict";var t=e.i(949411);e.s(["Clock",()=>t.default])},667585,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return a}});let s=e.r(132061);function a({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new s.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},309885,(e,t,r)=>{"use strict";function s(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return s}})},652157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let s=e.r(843476),a=e.r(174080),n=e.r(563599),l=e.r(309885),i=e.r(543369);function o({moduleIds:e}){if("u">typeof window)return null;let t=n.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let s=t.reactLoadableManifest;for(let t of e){if(!s[t])continue;let e=s[t].files;r.push(...e)}}if(0===r.length)return null;let d=(0,i.getAssetTokenQuery)();return(0,s.jsx)(s.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,s.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,a.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},869093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return d}});let s=e.r(843476),a=e.r(271645),n=e.r(667585),l=e.r(652157);function i(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},d=function(e){let t={...o,...e},r=(0,a.lazy)(()=>t.loader().then(i)),d=t.loading;function c(e){let i=d?(0,s.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,c=o?a.Suspense:a.Fragment,u=t.ssr?(0,s.jsxs)(s.Fragment,{children:["u"<typeof window?(0,s.jsx)(l.PreloadChunks,{moduleIds:t.modules}):null,(0,s.jsx)(r,{...e})]}):(0,s.jsx)(n.BailoutToCSR,{reason:"next/dynamic",children:(0,s.jsx)(r,{...e})});return(0,s.jsx)(c,{...o?{fallback:i}:{},children:u})}return c.displayName="LoadableComponent",c}},770703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let s=e.r(555682)._(e.r(869093));function a(e,t){let r={};"function"==typeof e&&(r.loader=e);let a={...r,...t};return(0,s.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},884849,e=>{"use strict";var t=e.i(843476),r=e.i(95187);let s=(0,r.createServerReference)("4009642980af4844f9906c9370766e264dcace2893",r.callServer,void 0,r.findSourceMapURL,"submitCompany");var a=e.i(271645),n=e.i(174080),l=e.i(494499),i=e.i(256378),o=e.i(963612),d=e.i(204753),c=e.i(915085),u=e.i(370956),m=e.i(448876);let p=({content:e,onChange:r})=>{let s=(0,l.useEditor)({extensions:[i.default,o.default.configure({openOnClick:!1})],content:e,editorProps:{attributes:{class:"min-h-[150px] w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 prose prose-sm max-w-none dark:bg-zinc-900 dark:border-zinc-700 dark:text-gray-100"}},onUpdate:({editor:e})=>{r(e.getHTML())},immediatelyRender:!1});return s?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex gap-1 border rounded-md p-1 bg-gray-50 dark:bg-zinc-800 dark:border-zinc-700",children:[(0,t.jsx)("button",{type:"button",onClick:()=>s.chain().focus().toggleBold().run(),disabled:!s.can().chain().focus().toggleBold().run(),className:`p-2 rounded hover:bg-gray-200 dark:hover:bg-zinc-700 ${s.isActive("bold")?"bg-gray-200 dark:bg-zinc-700":""}`,children:(0,t.jsx)(d.Bold,{className:"w-4 h-4"})}),(0,t.jsx)("button",{type:"button",onClick:()=>s.chain().focus().toggleItalic().run(),disabled:!s.can().chain().focus().toggleItalic().run(),className:`p-2 rounded hover:bg-gray-200 dark:hover:bg-zinc-700 ${s.isActive("italic")?"bg-gray-200 dark:bg-zinc-700":""}`,children:(0,t.jsx)(c.Italic,{className:"w-4 h-4"})}),(0,t.jsx)("button",{type:"button",onClick:()=>s.chain().focus().toggleBulletList().run(),className:`p-2 rounded hover:bg-gray-200 dark:hover:bg-zinc-700 ${s.isActive("bulletList")?"bg-gray-200 dark:bg-zinc-700":""}`,children:(0,t.jsx)(u.List,{className:"w-4 h-4"})}),(0,t.jsx)("button",{type:"button",onClick:()=>s.chain().focus().toggleOrderedList().run(),className:`p-2 rounded hover:bg-gray-200 dark:hover:bg-zinc-700 ${s.isActive("orderedList")?"bg-gray-200 dark:bg-zinc-700":""}`,children:(0,t.jsx)(m.ListOrdered,{className:"w-4 h-4"})})]}),(0,t.jsx)(l.EditorContent,{editor:s})]}):null},x=(0,e.i(770703).default)(()=>e.A(858309),{loadableGenerated:{modules:[532465]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"h-[300px] w-full bg-gray-100 animate-pulse rounded-md"})});function f(e){return(0,t.jsx)(x,{...e})}var h=e.i(976351),g=e.i(503116),b=e.i(107233),y=e.i(37727),v=e.i(647163);let j=[{id:1,label:"Lundi"},{id:2,label:"Mardi"},{id:3,label:"Mercredi"},{id:4,label:"Jeudi"},{id:5,label:"Vendredi"},{id:6,label:"Samedi"},{id:0,label:"Dimanche"}];function N({value:e,onChange:r}){let[s,n]=(0,a.useState)(()=>e&&e.length>0?e:j.map(e=>({dayId:e.id,isOpen:0!==e.id,is24h:!1,slots:[{open:"09:00",close:"19:00"}]}))),l=(e,t)=>
1{let a=[...s];a[e]={...a[e],...t},n(a),r(a)},i=(e,t,r,a)=>{let n=[...s[e].slots];n[t]={...n[t],[r]:a},l(e,{slots:n})};return(0,t.jsx)("div",{className:"space-y-4 bg-white rounded-lg border border-gray-200 p-4",children:s.map((e,a)=>(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4 py-3 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)("div",{className:"w-32 flex items-center gap-2 pt-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:e.isOpen,onChange:()=>{l(a,{isOpen:!s[a].isOpen})},className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-600",id:`day-${e.dayId}`}),(0,t.jsx)("label",{htmlFor:`day-${e.dayId}`,className:(0,v.cn)("text-sm font-medium cursor-pointer",e.isOpen?"text-gray-900":"text-gray-400"),children:j.find(t=>t.id===e.dayId)?.label})]}),(0,t.jsx)("div",{className:"flex-1",children:e.isOpen?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-gray-600 cursor-pointer select-none",children:[(0,t.jsx)("input",{type:"checkbox",checked:e.is24h,onChange:()=>{l(a,{is24h:!s[a].is24h})},className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600 focus:ring-blue-600"}),"Ouvert 24h/24"]}),!e.is24h&&(0,t.jsx)("button",{type:"button",onClick:()=>{let e,t;return e=s[a],void(n(t=s.map(t=>({...t,isOpen:e.isOpen,is24h:e.is24h,slots:e.slots.map(e=>({...e}))}))),r(t))},className:"text-xs text-blue-600 hover:text-blue-700 hover:underline",title:"Appliquer ces horaires à tous les autres jours",children:"Copier partout"})]}),!e.is24h&&(0,t.jsx)("div",{className:"space-y-2",children:e.slots.map((r,n)=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 bg-gray-50 rounded-lg border border-gray-200 px-3 py-2 shadow-sm",children:[(0,t.jsx)(g.Clock,{className:"w-4 h-4 text-gray-500 shrink-0"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"time",value:r.open,onChange:e=>i(a,n,"open",e.target.value),className:"bg-white border border-gray-300 rounded-md px-2 py-1.5 text-sm w-[6.5rem] focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none text-gray-900 font-medium transition-all"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm font-medium px-1",children:"à "}),(0,t.jsx)("input",{type:"time",value:r.close,onChange:e=>i(a,n,"close",e.target.value),className:"bg-white border border-gray-300 rounded-md px-2 py-1.5 text-sm w-[6.5rem] focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 outline-none text-gray-900 font-medium transition-all"})]})]}),e.slots.length>1&&(0,t.jsx)("button",{type:"button",onClick:()=>{let e;(e=s[a].slots).length<=1||l(a,{slots:e.filter((e,t)=>t!==n)})},className:"p-1 text-gray-400 hover:text-red-500 hover:bg-red-50 rounded-full transition-colors",title:"Supprimer ce créneau",children:(0,t.jsx)(y.X,{className:"w-4 h-4"})}),n===e.slots.length-1&&(0,t.jsxs)("button",{type:"button",onClick:()=>{let e;return e=s[a].slots,void l(a,{slots:[...e,{open:"14:00",close:"18:00"}]})},className:"flex items-center gap-1 px-2 py-1 text-xs font-medium text-blue-700 bg-blue-100 hover:bg-blue-200 rounded-md transition-colors ml-2",children:[(0,t.jsx)(b.Plus,{className:"w-3 h-3"}),"Ajouter une coupure"]})]},n))})]}):(0,t.jsx)("span",{className:"text-sm text-gray-400 italic pt-2 block",children:"Fermé"})})]},e.dayId))})}var w=e.i(643531),k=e.i(497140),k=k,C=e.i(486348),C=C,O=e.i(63209);function _({disabled:e,isPremium:r}){let{pending:s}=(0,n.useFormStatus)();return(0,t.jsx)("button",{type:"submit",disabled:s||e,className:(0,v.cn)("w-full inline-flex items-center justify-center rounded-md h-12 text-sm font-semibold text-white shadow-md transition-all hover:shadow-lg focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed",r?"bg-gradient-to-r from-amber-500 to-orange-600 hover:from-amber-600 hover:to-orange-700 focus:ring-amber-500":"bg-blue-600 hover:bg-blue-700 focus:ring-blue-600"),children:s?"Envoi en cours...":r?"
1Soumettre l'annonce Premium":"Soumettre l'annonce Gratuite"})}e.s(["AddCompanyForm",0,function({placeholderName:e="Ex: Pharmacie Centrale",isFreeEnabled:r=!0,isPremiumEnabled:n=!0,basePrice:l}){let[i,o]=(0,a.useState)(n&&!r?"premium":"free"),[d,c]=(0,a.useState)("monthly"),u=l||47,m=(12*u*.8).toFixed(2),x=(12*u*.8/12).toFixed(2),[g,b]=(0,a.useState)(""),[y,j]=(0,a.useState)([]),[S,P]=(0,a.useState)(""),[A,z]=(0,a.useState)(null),[M,F]=(0,a.useState)(null),[R,L]=(0,a.useState)(!1),[E,I]=(0,a.useState)(""),[$,T]=(0,a.useState)(""),[V,B]=(0,a.useState)([]),[q,U]=(0,a.useState)(!1),D=async e=>{let t=e.target.value;if(I(t),t.length>2)try{let e=await fetch(`https://api-adresse.data.gouv.fr/search/?q=${encodeURIComponent(t)}&type=municipality&limit=5`),r=await e.json();B(r.features||[]),U(!0)}catch(e){console.error(e)}else B([]),U(!1)},W=async e=>{L(!0);let t=new FormData;t.append("file",e,"company-image.jpg");try{let e=await fetch("/api/upload/",{method:"POST",body:t});if(e.ok){let t=await e.json();P(t.url)}else console.error("Upload failed")}catch(e){console.error("Upload failed",e)}finally{L(!1)}};return(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 p-1 bg-gray-100 rounded-xl",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>o("free"),className:(0,v.cn)("flex items-center justify-center gap-2 py-3 rounded-lg text-sm font-medium transition-all duration-200","free"===i?"bg-white text-gray-900 shadow-sm ring-1 ring-gray-200":"text-gray-500 hover:text-gray-900"),children:[(0,t.jsx)(C.default,{className:"w-4 h-4"}),"Annonce Gratuite"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>o("premium"),className:(0,v.cn)("flex items-center justify-center gap-2 py-3 rounded-lg text-sm font-medium transition-all duration-200","premium"===i?"bg-white text-amber-600 shadow-sm ring-1 ring-amber-200":"text-gray-500 hover:text-amber-600"),children:[(0,t.jsx)(k.default,{className:"w-4 h-4"}),"Annonce Premium"]})]}),"free"===i&&!r&&(0,t.jsxs)("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-8 text-center space-y-4 animate-in fade-in zoom-in-95 duration-300",children:[(0,t.jsx)("div",{className:"mx-auto w-12 h-12 bg-slate-100 rounded-full flex items-center justify-center",children:(0,t.jsx)(O.AlertCircle,{className:"w-6 h-6 text-slate-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-slate-900",children:"Annonces gratuites momentanément suspendues"}),(0,t.jsx)("p",{className:"text-slate-500 mt-2 max-w-md mx-auto leading-relaxed",children:"Les annonces gratuites sont actuellement désactivées en raison d'un trop grand nombre de demandes et d'une équipe de modération réduite."})]}),(0,t.jsx)("button",{type:"button",onClick:()=>o("premium"),className:"text-amber-600 font-medium hover:text-amber-700 hover:underline mt-4 inline-block",children:"Passer à une annonce Premium â"})]}),"premium"===i&&!n&&(0,t.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-8 text-center space-y-4 animate-in fade-in zoom-in-95 duration-300",children:[(0,t.jsx)("div",{className:"mx-auto w-12 h-12 bg-amber-100 rounded-full flex items-center justify-center",children:(0,t.jsx)(O.AlertCircle,{className:"w-6 h-6 text-amber-600"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-amber-900",children:"Annonces Premium indisponibles"}),(0,t.jsx)("p",{className:"text-amber-700 mt-2 max-w-md mx-auto leading-relaxed",children:"Les soumissions d'annonces Premium sont temporairement suspendues."})]}),r?(0,t.jsx)("button",{type:"button",onClick:()=>o("free"),className:"text-gray-600 font-medium hover:text-gray-800 hover:underline mt-4 inline-block",children:"Opter pour une annonce Gratuite â"}):(0,t.jsx)("p",{className:"text-sm text-amber-600/80 mt-2",children:"Les annonces gratuites sont également fermées."})]}),("free"===i&&r||"premium"===i&&n)&&(0,t.jsxs)(t.Fragment,{children:["premium"===i&&(0,t.jsxs)("div",{className:"bg-amber-50 border border-amber-100 rounded-lg p-4 text-sm text-amber-800 flex flex-col gap-2 animate-in fade-in slide-in-from-top-2",children:[(0,t.jsxs)("p",{className:"font-semibold flex items-center gap-2",children:[(0,t.jsx)(k.default,{className:"w-4 h-4 fill-amber-600 text-amber-600"}),"Avantages Premium :"]}),(0,t.jsxs)("ul",{className:"space-y-1 ml-6 list-disc text-amber-700/80",children:[(0,t.jsx)("li",{children:"Fiche détaillée avec description complète"}),(0,t.jsx)("li",{children:"Jusqu'à 10 photos"}),(0,t.jsx)("li",{children:"Lien vers votre site web"}),(0,t.jsx)("li",{children:"Affichage des horaires d'ouverture"}),(0,t.jsx)("li",{children:'Badge "Vérifié" sur les listes'}),(0,t.jsx)("li",{children:"Possibilité de recevoir des avis"})]})]}),(0,t.jsxs)("form",{action:s,className:"space-y-8 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[(0,t.jsx)("input",{type:"hidden",name:"is_premium",value:"premium"===i?"true":"false"}),(0,t.jsx)("input",{type:"hidden",name:"billing_cycle",value:"premium"===i?d:""}),(0,t.jsx)("input",{type:"hidden",name:"description",value:"premium"===i?g:""}),(0,t.jsx)("input",{type:"hidden",name:"latitude",value:A||""}),(0,t.jsx)("input",{type:"hidden",name:"longitude",value:M||""}),(0,t.jsx)("input",{type:"hidden",name:"img_url",value:S}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"name",className:"text-sm font-medium leading-none text-gray-700",children:"Nom de l'entreprise *"}),(0,t.jsx)("input",{type:"text",name:"name",required:!0,className:"flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent",placeholder:e})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium leading-none text-gray-700",children:"Image principale (Logo ou Photo)"}),(0,t.jsx)(h.default,{onImageCropped:W}),R&&(0,t.jsx)("p",{className:"text-xs text-blue-600 animate-pulse",children:"Téléchargement en cours..."}),!R&&S&&(0,t.jsxs)("p",{className:"text-xs text-green-600 font-medium flex items-center gap-1",children:[(0,t.jsx)(w.Check,{className:"w-3 h-3"})," Image prête"]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium leading-none text-gray-700",children:"Emplacement (cliquez sur la carte)"}),(0,t.jsx)(f,{onLocationSelect:(e,t)=>
1{z(e),F(t)}}),A&&M&&(0,t.jsxs)("p",{className:"text-xs text-green-600 flex items-center gap-1",children:[(0,t.jsx)(w.Check,{className:"w-3 h-3"})," Position : ",A.toFixed(5),", ",M.toFixed(5)]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"address",className:"text-sm font-medium leading-none text-gray-700",children:"Adresse *"}),(0,t.jsx)("input",{type:"text",name:"address",required:!0,className:"flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent",placeholder:"Ex: 12 rue de la République"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 relative",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"postal_code",className:"text-sm font-medium leading-none text-gray-700",children:"Code Postal *"}),(0,t.jsx)("input",{type:"text",name:"postal_code",required:!0,value:$,onChange:e=>T(e.target.value),className:"flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent",placeholder:"75000"})]}),(0,t.jsxs)("div",{className:"space-y-2 relative",children:[(0,t.jsx)("label",{htmlFor:"city",className:"text-sm font-medium leading-none text-gray-700",children:"Ville *"}),(0,t.jsx)("input",{type:"text",name:"city",required:!0,value:E,onChange:D,onFocus:()=>E.length>2&&U(!0),className:"flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent",placeholder:"Paris",autoComplete:"off"}),q&&V.length>0&&(0,t.jsx)("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-200 rounded-md shadow-lg max-h-60 overflow-auto",children:V.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{I(e.properties.city),T(e.properties.postcode),U(!1),e.geometry&&e.geometry.coordinates&&(F(e.geometry.coordinates[0]),z(e.geometry.coordinates[1]))},className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 focus:bg-gray-100 focus:outline-none transition-colors",children:[(0,t.jsx)("span",{className:"font-medium",children:e.properties.city}),(0,t.jsxs)("span",{className:"text-gray-500 ml-2",children:["(",e.properties.postcode,")"]})]},e.properties.id||Math.random()))}),q&&(0,t.jsx)("div",{className:"fixed inset-0 z-40 bg-transparent",onClick:()=>U(!1)})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"phone",className:"text-sm font-medium leading-none text-gray-700",children:"Téléphone"}),(0,t.jsx)("input",{type:"tel",name:"phone",className:"flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-600 focus:border-transparent",placeholder:"01 23 45 67 89"})]})]}),"premium"===i&&(0,t.jsxs)("div",{className:"space-y-6 pt-6 border-t border-gray-200 animate-in fade-in slide-in-from-top-4 duration-500",children:[(0,t.jsxs)("div",{className:"p-6 bg-gradient-to-br from-amber-50 to-orange-50 rounded-xl border border-amber-100 shadow-sm",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-2 font-semibold text-amber-900 mb-4",children:[(0,t.jsx)(k.default,{className:"w-5 h-5 text-amber-600 fill-amber-600"}),"Choisissez votre formule"]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("label",{className:(0,v.cn)("relative flex flex-col p-4 rounded-xl border-2 cursor-pointer transition-all","monthly"===d?"border-amber-500 bg-white shadow-md transform scale-[1.02]":"border-amber-200 bg-white/50 hover:border-amber-300"),children:[(0,t.jsx)("input",{type:"radio",name:"billing_selector",value:"monthly",checked:"monthly"===d,onChange:()=>c("monthly"),className:"sr-only"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)("span",{className:"font-bold text-slate-800",children:"Mensuel"}),"monthly"===d&&(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-amber-500"})]}),(0,t.jsxs)("div",{className:"mt-auto",children:[(0,t.jsxs)("span",{className:"text-2xl font-bold text-amber-600",children:[u," â¬"]}),(0,t.jsx)("span",{className:"text-sm text-slate-500",children:" / mois"})]}),(0,t.jsx)("p",{className:"text-xs text-slate-400 mt-2",children:"Sans engagement"})]}),(0,t.jsxs)("label",{className:(0,v.cn)("relative flex flex-col p-4 rounded-xl border-2 cursor-pointer transition-all","yearly"===d?"border-amber-500 bg-white shadow-md transform scale-[1.02]":"border-amber-200 bg-white/50 hover:border-amber-300"),children:[(0,t.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-green-600 text-white text-[10px] uppercase font-bold px-2 py-1 rounded-full shadow-sm",children:"-20% de réduction"}),(0,t.jsx)("input",{type:"radio",name:"billing_selector",value:"yearly",checked:"yearly"===d,onChange:()=>c("yearly"),className:"sr-only"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)("span",{className:"font-bold text-slate-800",children:"Annuel"}),"yearly"===d&&(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-amber-500"})]}),(0,t.jsxs)("div",{className:"mt-auto",children:[(0,t.jsxs)("span",{className:"text-2xl font-bold text-amber-600",children:[x," â¬"]}),(0,t.jsx)("span",{className:"text-sm text-slate-500",children:" / mois"})]}),(0,t.jsxs)("p",{className:"text-xs text-slate-400 mt-2",children:["Facturé ",m," ⬠/ an"]})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"url",className:"text-sm font-medium leading-none text-gray-700",children:"Site Web"}),(0,t.jsx)("input",{type:"url",name:"url",className:"flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent",placeholder:"https://www.mon-site.com"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium leading-none text-gray-700",children:"Horaires d'ouverture"}),(0,t.jsx)(N,{value:y,onChange:j}),(0,t.jsx)("input",{type:"hidden",name:"opening_hours",value:JSON.stringify(y)})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"tags",className:"text-sm font-medium leading-none text-gray-700",children:"Services / Tags (séparés par des virgules)"}),(0,t.jsx)("input",{type:"text",name:"tags",className:"flex h-10 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-amber-500 focus:border-transparent",placeholder:"Livraison à domicile, Vaccination, Test Covid..."})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium leading-none text-gray-700",children:"Description détaillée"}),(0,t.jsx)(p,{content:g,onChange:b})]})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 italic",children:"* Champs obligatoires"}),(0,t.jsx)(_,{disabled:R,isPremium:"premium"===i}),"premium"===i&&(0,t.jsx)("p",{className:"text-xs text-center text-slate-400 mt-2",children:"Vous serez redirigé vers la page de paiement sécurisée."})]})]})]})}],884849)}]);
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.