PageSourceSearch

https://showlivre.com/_next/static/chunks/pages/checkout/[...idInvoice]-9fd01a2b2bb6678b.js

js showlivre.com collected 2026-09-24 23:33:18 UTC 13,324 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6495],{42127:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/checkout/[...idInvoice]",function(){return n(76743)}])},33253:function(e,t,n){"use strict";var r=n(69779),s=n(85893),a=n(67294),i=n(85405),o=n(40944);t.Z=function(e){var t=e.rating,n=e.setRating,u=e.readOnly,l=e.className,c=e.starClassName,d=e.allowHalfRating,f=(0,a.useState)(0),h=f[0],m=f[1];return(0,a.useEffect)((function(){u||h===t||m(t)}),[t]),(0,s.jsx)("div",{className:(0,i.AK)("star-rating flex",l),children:(0,r.Z)(Array(5)).map((function(e,r){return r+=1,(0,s.jsxs)("div",{className:"relative flex",children:[(0,s.jsx)("button",{type:"button",className:(0,i.AK)(r<=(!u&&h||t)?"text-yellow-400":"text-gray-200",u&&"cursor-default"),onClick:function(){return n(t===r?0:r)},onMouseEnter:function(){u||m(r)},onMouseLeave:function(){u||m(t)},disabled:u,children:(0,s.jsx)("div",{className:(0,i.AK)(c,"relative w-5 h-5"),children:(0,s.jsx)(o.Z,{icon:"StarSolidIcon",className:(0,i.AK)("absolute w-full h-full top-0 left-0")})})}),d&&(0,s.jsx)("button",{type:"button",className:(0,i.AK)("absolute top-0 left-0 w-1/2 overflow-hidden",r-.5<=(!u&&h||t)?"text-yellow-400":"text-gray-200",u&&"cursor-default"),onClick:function(){return n(t===r?.5:r-.5)},onMouseEnter:function(){u||m(r-.5)},onMouseLeave:function(){u||m(t-.5)},disabled:u,children:(0,s.jsx)("div",{className:(0,i.AK)(c,"relative w-5 h-5 overflow-hidden"),children:(0,s.jsx)(o.Z,{icon:"StarSolidIcon",className:(0,i.AK)("absolute w-full h-full top-0 left-0")})})})]},"star-".concat(r))}))})}},90638:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78282).Z;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=i.default,a=(null==t?void 0:t.suspense)?{}:{loading:function(e){e.error,e.isLoading;return e.pastDelay,null}};r(e,Promise)?a.loader=function(){return e}:"function"===typeof e?a.loader=e:"object"===typeof e&&(a=s({},a,e));if((a=s({},a,t)).suspense)throw new Error("Invalid suspense option usage in next/dynamic. Read more: https://nextjs.org/docs/messages/invalid-dynamic-suspense");a.suspense&&(delete a.ssr,delete a.loading);a.loadableGenerated&&delete(a=s({},a,a.loadableGenerated)).loadableGenerated;if("boolean"===typeof a.ssr&&!a.suspense){if(!a.ssr)return delete a.ssr,o(n,a);delete a.ssr}return n(a)},t.noSSR=o;var s=n(31032).Z,a=n(12845).Z,i=(a(n(67294)),a(n(14302)));function o(e,t){return delete t.webpack,delete t.modules,e(t)}("function"===typeof t.default||"object"===typeof t.default&&null!==t.default)&&"undefined"===typeof t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},16319:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoadableContext=void 0;var r=(0,n(12845).Z)(n(67294)).default.createContext(null);t.LoadableContext=r},14302:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25125).Z,s=n(40).Z;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(31032).Z,i=(0,n(12845).Z)(n(67294)),o=n(16319),u=n(61688).useSyncExternalStore,l=[],c=[],d=!1;function f(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}var h=function(){function e(t,n){r(this,e),this._loadFn=t,this._opts=n,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}return s(e,[{key:"promise",value:function(){return this._res.promise}},{key:"retry",value:function(){var e=this;this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};var t=this._res,n=this._opts;t.loading&&("number"===typeof n.delay&&(0===n.delay?this._state.pastDelay=!0:this._delay=setTimeout((function(){e._update({pastDelay:!0})}),n.delay)),"number"===typeof n.timeout&&(this._timeout=setTimeout((function(){e._update({timedOut:!0})}),n.timeout))),this._res.promise.then((function(){e._update({}),e._clearTimeouts()})).catch((function(t){e._update({}),e._clearTimeouts()})),this._update({})}},{key:"_update",value:function(e){this._state=a({},this._state,{error:this._res.error,loaded:this._res.loaded,loading:this._res.loading},e),this._callbacks.forEach((function(e){return e()}))}},{key:"_clearTimeouts",value:function(){clearTimeout(this._delay),clearTimeout(this._timeout)}},{key:"getCurrentValue",value:function(){return this._state}},{key:"subscribe",value:function(e){var t=this;return this._callbacks.add(e),function(){t._callbacks.delete(e)}}}]),e}();function m(e){return function(e,t){var n=function(){if(!l){var t=new h(e,s);l={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return l.promise()},r=function(){n();var e=i.default.useContext(o.LoadableContext);
1e&&Array.isArray(s.modules)&&s.modules.forEach((function(t){e(t)}))},s=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null,suspense:!1},t);s.suspense&&(s.lazy=i.default.lazy(s.loader));var l=null;if(!d){var f=s.webpack?s.webpack():s.modules;f&&c.push((function(e){var t=!0,r=!1,s=void 0;try{for(var a,i=f[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;if(-1!==e.indexOf(o))return n()}}catch(u){r=!0,s=u}finally{try{t||null==i.return||i.return()}finally{if(r)throw s}}}))}var m=s.suspense?function(e,t){return r(),i.default.createElement(s.lazy,a({},e,{ref:t}))}:function(e,t){r();var n=u(l.subscribe,l.getCurrentValue,l.getCurrentValue);return i.default.useImperativeHandle(t,(function(){return{retry:l.retry}}),[]),i.default.useMemo((function(){return n.loading||n.error?i.default.createElement(s.loading,{isLoading:n.loading,pastDelay:n.pastDelay,timedOut:n.timedOut,error:n.error,retry:l.retry}):n.loaded?i.default.createElement((t=n.loaded)&&t.__esModule?t.default:t,e):null;var t}),[e,n])};return m.preload=function(){return n()},m.displayName="LoadableComponent",i.default.forwardRef(m)}(f,e)}function p(e,t){for(var n=[];e.length;){var r=e.pop();n.push(r(t))}return Promise.all(n).then((function(){if(e.length)return p(e,t)}))}m.preloadAll=function(){return new Promise((function(e,t){p(l).then(e,t)}))},m.preloadReady=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new Promise((function(t){var n=function(){return d=!0,t()};p(c,e).then(n,n)}))},window.__NEXT_PRELOADREADY=m.preloadReady;var v=m;t.default=v},76743:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return C},default:function(){return E}});var r=n(34727),s=n(97582),a=n(85893),i=n(90387),o=n(29260),u=n.n(o),l=n(41664),c=n.n(l),d=n(67294),f=n(30120),h=n(85405),m=n(23226),p=n(43751),v=n(5152),x=function(e){var t=e.closeToast;return(0,a.jsx)(p.Z,{className:"h-5 w-5 text-gray-600",onClick:t})},y=n.n(v)()((function(){return Promise.resolve().then(n.bind(n,40782)).then((function(e){return e.toast}))}),{loadableGenerated:{webpack:function(){return[40782]}},loading:function(){return""},ssr:!1}),b={default:function(e){y(e)},info:function(e){y.info(e)},success:function(e){y.success(e)},warn:function(e){y.warn(e)},error:function(e){y.error(e,{autoClose:!1,closeButton:(0,a.jsx)(x,{})})}},g=n(16494),_=n(33253),j=n(9008),w=n.n(j),N=n(10124),k=n(89774),S=function(e){var t,n=e.website,o=e.apiUrl,l=(0,k.$G)("page_checkout_invoice").t,v=(0,i.useRouter)(),x=new m.Z(o),y=(0,d.useState)(null),j=y[0],S=y[1],C=(0,d.useState)(!1),E=C[0],O=C[1],Z=(0,d.useState)(null),A=Z[0],P=Z[1],D=(0,d.useState)(5),I=D[0],M=D[1],T=(0,d.useState)(!1),R=T[0],F=T[1],L=v.query.idInvoice,K={secondary:{backgroundColor:n.secondaryColor,color:(0,h.$O)(n.secondaryColor)},textAccent:{color:n.secondaryColor}},G=function(){var e=(0,r.Z)((function(){var e,t;return(0,s.__generator)(this,(function(r){switch(r.label){case 0:return n.Business.stripeDetails.paymentsEnabled?"success"!==L[0]?[3,2]:[4,x.get("/invoice/get-invoice-status",{idInvoice:L[1]})]:[3,9];case 1:return(e=r.sent())&&!0===e.status&&e.content?("paid"===e.content.status?(O((0,a.jsxs)("p",{children:[l("paymentSuccess")," ",e.content.paidAt&&f.ou.fromISO(e.content.paidAt).toFormat("DD"),"! "]})),M(e.content.customerRating)):setTimeout((function(){return G()}),5e3),P(e.content.status)):S((0,a.jsx)("p",{children:e.message})),[3,8];case 2:return[4,x.get("/stripe/get-checkout-session",{idInvoice:L[0]})];case 3:return(t=r.sent())&&!0===t.status&&t.content?"credit-card-payment-disabled"!==t.content?[3,5]:[4,v.push("/invoice/".concat(L[0]))]:[3,7];case 4:return r.sent(),[3,6];case 5:v.push(t.content),r.label=6;case 6:return[3,8];case 7:!0===t.status?O((0,a.jsx)("p",{children:t.message})):S((0,a.jsx)("p",{children:t.message})),r.label=8;case 8:return[3,11];case 9:return S((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:l("paymentDisabled")}),(0,a.jsx)(c(),{href:"/contact",children:(0,a.jsx)("a",{className:"button light sm mt-4",children:l("contactUs")})})]})),[4,v.push("/invoice/".concat(L[0]))];case 10:r.sent(),r.label=11;case 11:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}(),V=function(){var e=(0,r.Z)((function(){var e;return(0,s.__generator)(this,(function(t){switch(t.label){case 0:return F(!0),[4,x.post("/marketing/save-review",{idInvoice:L[1],rating:I})];case 1:return(e=t.sent())&&!0===e.status?b.success(l("rating.thankYou")):b.error(e.message),F(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}();return(0,d.useEffect)((function(){G()}),[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(w(),{children:[(0,a.jsxs)("title",{children:[R?"Checking invoice":"Invoice"," - ",n.Business.name]}),(0,a.jsx)("meta",{name:"description",content:R?"Checking invoice":"Invoice"}),(0,a.jsx)("link",{rel:"icon",href:(null===n||void 0===n||null===(t=n.favicon)||void 0===t?void 0:t.url)||""}),(0,a.jsx)("meta",{name:"robots",content:"noindex,nofollow"})]}),(0,a.jsx)("div",{className:"flex flex-col items-center justify-start bg-gray-50 w-full h-full",children:(0,a.jsxs)("div",{className:(0,h.AK)("grid grid-cols-1 divide-x lg:max-w-7xl py-10","success"===L[0]&&"lg:grid-cols-2"),children:[(0,a.jsxs)("div",{className:"text-center px-20",children:[(0,a.jsxs)("div",{className:"relative w-56 h-72 mx-auto",children:[(0,a.jsx)(u(),{sizes:"200vw",quality:90,className:(0,h.AK)(j||E?"":"animate-pulse"),src:(0,h.sd)("invoice-shadow.svg"),layout:"fill",objectFit:"cover",alt:"Invoice"}),j?(0,a.jsx)("div",{className:"flex items-center justify-center absolute top-2/4 left-2/4 -translate-y-1/2 -translate-x-1/2 h-10 w-10 bg-red-500 rounded-full shadow-xl",children:(0,a.jsx)(p.Z,{className:"h-6 w-6 text-white","aria-hidden":"true"})}):E&&(0,a.jsx)("div",{className:"flex items-center justify-center absolute top-2/4 left-2/4 -translate-y-1/2 -translate-x-1/2 h-10 w-10 bg-green-500 rounded-full shadow-xl",children:(0,a.jsx)(N.Z,{className:"h-6 w-6 text-white","aria-hidden":"true"})})]}),j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h4",{className:"mb-2",children:l("errors.generic")}),(0,a.jsx)("div",{className:"text-label text-gray-500 mb-6",children:j})]}):E?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h4",{className:"mb-2",children:l("success.paid")}),(0,a.jsx)("div",{className:"text-label text-gray-500 mb-6",children:E})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("h4",{className:"mb-2 text-lg",children:[(0,a.jsx)(g.Z,{text:"",className:"text-indigo-600"})," ",l("processing.title")]}),A&&(0,a.jsx)("p",{className:"text-label text-gray-500 mb-6",children:l("processing.subtitle")})]})]}),"success"===L[0]&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("hr",{className:"mx-20 lg:hidden"}),(0,a.jsxs)("div",{className:"text-center px-20 mb-6 lg:mb-0",children:[(0,a.jsx)("h2",{className:"mb-8 text-h3 lg:text-h2",children:l("rating.title")}),(0,a.jsx)("p",{className:"text-gray-600 mb-2",children:l("rating.subtitle")}),(0,a.jsx)(_.Z,{containerClassName:"mb-4 flex items-center justify-center gap-3",className:"flex",size:"h2",rating:I,setRating:M,showNumber:!0}),(0,a.jsx)("button",{style:K.secondary,className:"button primary lg mt-8",disabled:R,onClick:function(){return V()},children:R?(0,a.jsx)(g.Z,{}):l("rating.saveButton")})]})]})]})})]})};S.getLayout=function(e){return(0,h.G0)(e,{hideFooter:!1})};var C=!0,E=S},5152:function(e,t,n){e.exports=n(90638)},53250:function(e,t,n){"use strict";var r=n(67294);var s="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=r.useState,i=r.useEffect,o=r.useLayoutEffect,u=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!s(e,n)}catch(r){return!0}}var c="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),s=r[0].inst,c=r[1];return o((function(){s.value=n,s.getSnapshot=t,l(s)&&c({inst:s})}),[e,n,t]),i((function(){return l(s)&&c({inst:s}),e((function(){l(s)&&c({inst:s})}))}),[e]),u(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},61688:function(e,t,n){"use strict";e.exports=n(53250)}},function(e){e.O(0,[3891,120,5405,9774,2888,179],(function(){return t=42127,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.