PageSourceSearch

https://portal.keravanenergia.fi/_next/static/chunks/7996.3f6a859427ea21a1.js

js keravanenergia.fi collected 2026-09-25 05:05:33 UTC 36,146 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7996],{12396:(e,l,n)=>{n.d(l,{A:()=>r});var i=n(29369),t=n(67642);function r(){let{site:e}=(0,i.Z)(),l=null==e?void 0:e.country;return{format:(e,n)=>t.A.format(e,n,l)}}},14774:(e,l,n)=>{n.d(l,{A:()=>i});let i=(0,n(5597).A)("outline","home-edit","HomeEdit",[["path",{d:"M9 21v-6a2 2 0 0 1 2 -2h2c.645 0 1.218 .305 1.584 .78",key:"svg-0"}],["path",{d:"M20 11l-8 -8l-9 9h2v7a2 2 0 0 0 2 2h4",key:"svg-1"}],["path",{d:"M18.42 15.61a2.1 2.1 0 0 1 2.97 2.97l-3.39 3.42h-3v-3l3.42 -3.39z",key:"svg-2"}]])},19092:(e,l,n)=>{n.d(l,{E:()=>o,Z:()=>s});var i=n(56557),t=n.n(i),r=n(75326);let a={[r.Qh.ESTONIA]:r.ev.QUARTER_HOUR,[r.Qh.FINLAND]:null,[r.Qh.LATVIA]:null};function o(e,l){let n=e?a[e]:null;if(!n)return null;let{enabled:i}=s(l);return({[r.ev.FIVE_MINUTE]:!!i.fiveMinute,[r.ev.QUARTER_HOUR]:!!i.quarterHour,[r.ev.HOUR]:i.hour})[n]?n:null}function s(e){var l,n;let i={fiveMinute:null==e?void 0:e.some(e=>{var l;return null==(l=e.metering)?void 0:l.fiveMinute}),quarterHour:null==e?void 0:e.some(e=>{var l;return null==(l=e.metering)?void 0:l.quarterHourly}),hour:!0},r=null==e?void 0:e.filter(e=>e.consumption),a=null==e?void 0:e.filter(e=>e.production);return{enabled:i,meta:{consumption:{quarterHourlyDataAvailableFrom
1:null==r||null==(l=r.filter(e=>{var l;return null==(l=e.metering)?void 0:l.quarterHourlyDataAvailableFrom}).map(e=>{var l;return t()(null==(l=e.metering)?void 0:l.quarterHourlyDataAvailableFrom)}).sort((e,l)=>e.diff(l,"minute"))[0])?void 0:l.toISOString()},production:{quarterHourlyDataAvailableFrom:null==a||null==(n=a.filter(e=>{var l;return null==(l=e.metering)?void 0:l.quarterHourlyDataAvailableFrom}).map(e=>{var l;return t()(null==(l=e.metering)?void 0:l.quarterHourlyDataAvailableFrom)}).sort((e,l)=>e.diff(l,"minute"))[0])?void 0:n.toISOString()}}}}},23453:(e,l,n)=>{n.d(l,{A:()=>i});let i=(0,n(5597).A)("outline","home-move","HomeMove",[["path",{d:"M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2",key:"svg-0"}],["path",{d:"M19 12h2l-9 -9l-9 9h2v7a2 2 0 0 0 2 2h5.5",key:"svg-1"}],["path",{d:"M16 19h6",key:"svg-2"}],["path",{d:"M19 16l3 3l-3 3",key:"svg-3"}]])},37418:(e,l,n)=>{n.d(l,{A:()=>i});let i={formatEInvoice:function(e){var l;return"".concat(null!=(l=e.bank)?l:e.eInvoiceOperator)}}},48938:(e,l,n)=>{n.d(l,{f:()=>m});var i=n(37876),t=n(32920),r=n(44193),a=n(79021),o=n(45050),s=n(74188),c=n(34826),d=n(83331),u=n(96851),h=n(81778),p=n(75326),v=n(71033);function m(e){var l,n;let{consumption:m,production:x}
1=e,j=(0,u.c)("pages.charts.form.time-step-meta"),{colors:f}=(0,h.A)(p.H_.ELECTRICITY),g=v.A.formatDateTimeToString(m.quarterHourlyDataAvailableFrom),b=v.A.formatDateTimeToString(x.quarterHourlyDataAvailableFrom);return(0,i.jsxs)(t.j,{width:280,shadow:"md",children:[(0,i.jsx)(t.j.Target,{children:(0,i.jsx)(r.$,{variant:"transparent",px:4,children:(0,i.jsx)(d.A,{size:20})})}),(0,i.jsx)(t.j.Dropdown,{children:(0,i.jsxs)(a.B,{gap:"xs",children:[(0,i.jsx)(o.E,{size:"sm",children:j("label.quarter-hourly-data-available-from")}),(0,i.jsxs)(a.B,{gap:"xs",children:[g&&(0,i.jsxs)(s.Y,{gap:"xs",children:[(0,i.jsx)(c.E,{size:"xs",color:null==(l=f.consumption)?void 0:l[0],children:j("badge.consumption")}),(0,i.jsx)(o.E,{size:"xs",children:g})]}),b&&(0,i.jsxs)(s.Y,{gap:"xs",children:[(0,i.jsx)(c.E,{size:"xs",color:null==(n=f.production)?void 0:n[0],children:j("badge.production")}),(0,i.jsx)(o.E,{size:"xs",children:b})]})]})]})})]})}},70270:(e,l,n)=>{n.d(l,{u:()=>i});function i(e){return l=>{let n=e.safeParse(l);if(n.success)return{};let i={};return n.error.errors.forEach(e=>{i[e.path.join(".")]=e.message}),i}}},81778:(e,l,n)=>{n.d(l,{A:()=>r});var i=n(74533),t=n(4843);function r(e){let l=(0,i.xd)(),{colorScheme:n}=(0,t.C)(),r=function(e,l){let n="light"===l?e.primaryShade:e.primaryShade+2;return{consumption:[e.colors[e.primaryColor][n],e.colors[e.primaryColor][n-1],e.colors[e.primaryColor][n+1],e.colors[e.primaryColor][n-2]],production:[e.colors.green[n],e.colors.green[n-2]],netted:[e.colors[e.primaryColor][n],e.colors[e.primaryColor][n-2],e.colors[e.primaryColor][n+1],e.colors[e.primaryColor][n-1]],price:[e.colors.orange[n],e.colors.red[n]],priceAvg:[e.colors.orange[n],e.colors.red[n]],priceWithVat:[e.colors.orange[n],e.colors.red[n]],priceWithVatAvg:[e.colors.orange[n],e.colors.red[n]],temperature:[e.colors.orange[n],e.colors.red[n]]}}(l,n),a=function(e,l,n){var i,t,r,a,o,s,c,d,u,h,p,v;let m="light"===l?null!=(c=null==(i=e.other.lightColors.chart)?void 0:i.default)?c:{}:null!=(d=null==(t=e.other.darkColors.chart)?void 0:t.default)?d:{};if(!n)return m;let x="light"===l?null!=(h=null!=(u=null==(r=e.other.lightColors.chart)?void 0:r[n])?u:null==(a=e.other.lightColors.chart)?void 0:a.default)?h:{}:null!=(v=null!=(p=null==(o=e.other.darkColors.chart)?void 0:o[n])?p:null==(s=e.other.lightColors.chart)?void 0:s.default)?v:{};return{...m,...x}}(l,n,e),o={...r,...a};return!a.priceWithVat&&o.price&&(o.priceWithVat=o.price),!a.priceWithVatAvg&&o.priceAvg&&(o.priceWithVatAvg=o.priceAvg),{colors:o}}},87996:(e,l,n)=>{n.r(l),n.d(l,{default:()=>e4});var i=n(37876),t=n(74533),r=n(50589),a=n(79021),o=n(93038),s=n(20562),c=n(45050),d=n(44193),u=n(79179),h=n(56557),p=n.n(h),v=n(15129),m=n(96851),x=n(61342),j=n(95830),f=n(6965),g=n(44390),b=n(5597);let C=(0,b.A)("outline","ban","Ban",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M5.7 5.7l12.6 12.6",key:"svg-1"}]]);var y=n(10553),T=n(75326),E=n(56303),I=n(84407);function S(e){var l;let{contract:n,onCancelled:t}=e,r=(0,m.c)("pages.contracts.contract-details.cancel-contract"),{data:a,status:o}=(0,y.useSession)(),s=p().locale(),u=null==n?void 0:n.id,h=(null==n?void 0:n.type)===T.h$.SupplyContract,v=(null==n?void 0:n.status)===E.cED.Active,b="authenticated"===o&&!(null==a||null==(l=a.representative)?void 0:l.isLegalEntity),{data:S,isLoading:A}=(0,I.IK)({query:{id:u},locale:s},{skip:!u||!h||!v||!b}),[w,{isLoading:D}]=(0,I.qU)();if(!n||!h||!v||!b)return null;let N=!!(null==S?void 0:S.canCancel),M=A||!N,O=(null==S?void 0:S.cancellationDeadline)&&p()(S.cancellationDeadline).isBefore(p()())?r("deadline-passed"):(null==S?void 0:S.cannotCancelReason)||r("disabled"),B=async()=>{await w({id:n.id,locale:s,session:a}).unwrap(),(0,g.Ds)({message:r("success"),color:"green"}),null==t||t()},_=()=>f.jQ.openConfirmModal({title:r("step-two.title"),children:(0,i.jsx)(c.E,{children:r("step-two.message")}),labels:{confirm:r("step-two.confirm"),cancel:r("cancel")},confirmProps:{color:"red"},radius:"md",onConfirm:B});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.c,{}),(0,i.jsx)(j.m,{label:O,disabled:N||A,multiline:!0,w:260,children:(0,i.jsx)(d.$,{fullWidth:!0,color:"var(--mantine-color-red-filled)",variant:"light",disabled:M||void 0,loading:A||D,onClick:()=>{M||f.jQ.openConfirmModal({title:r("step-one.title"),children:(0,i.jsx)(c.E,{children:r("step-one.message")}),labels:{confirm:r("step-one.confirm"),cancel:r("cancel")},radius:"md",onConfirm:_})},leftSection:(0,i.jsx)(C,{}),children:r("button")})})]})}var A=n(29369),w=n(68529),D=n(9059);let N=[T.h$.GridContract];
1function M(e){let{contract:l}=e,n=(0,m.c)("pages.contracts"),{hasFeature:t}=(0,A.Z)(),[r,{isLoading:a,isFetching:o}]=(0,I.ep)();if(!l||!t(T.lo.CONTRACT_PDF_DOWNLOAD)&&!N.includes(l.type))return null;let s=async()=>{let{data:e}=await r(l.id);e&&e.notFound&&(0,g.Ds)({message:n("contract-details.pdf-not-found"),color:"yellow"})};return(0,i.jsx)(d.$,{fullWidth:!0,variant:"outline",loading:a||o,onClick:s,leftSection:(0,i.jsx)(D.A,{}),children:n("contract-details.download-contract")})}let O=(0,b.A)("outline","file-download","FileDownload",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M12 17v-6",key:"svg-2"}],["path",{d:"M9.5 14.5l2.5 2.5l2.5 -2.5",key:"svg-3"}]]);function B(e){let{contract:l}=e,n=(0,m.c)("pages.contracts"),[t,{isLoading:r,isFetching:a}]=(0,I.v0)(),o=async()=>{let{data:e}=await t(null==l?void 0:l.id);e&&e.notFound&&(0,g.Ds)({message:n("contract-details.signed-contract-not-found"),color:"yellow"})};return(0,i.jsx)(d.$,{fullWidth:!0,variant:"outline",loading:r||a,onClick:o,leftSection:(0,i.jsx)(O,{}),children:n("contract-details.download-signed-contract")})}var _=n(19543),k=n(11045),F=n(74188),z=n(19453),R=n(11871),P=n(4554),X=n(91932),L=n(41639),V=n(48938),$=n(19092);function q(e){let{contract:l}=e,n=(0,m.c)("pages.contracts.contract-details.export-readings.modal"),{hasFeature:t}=(0,A.Z)(),o=t(T.lo.CHART_TEMP_AND_PRICE_DISABLED)||t(T.lo.CHART_SPOT_PRICE_DISABLED),s=t(T.lo.CHART_SPOT_PRICE_WITH_VAT)&&!o,{data:u,isLoading:h}=(0,I.u5)(l.id),{enabled:v,meta:x}=(0,$.Z)(u?[{metering:u.metering,production:u.readingType===T.PG.PRODUCTION,consumption:u.readingType===T.PG.CONSUMPTION}]:null),j=(0,X.m)({initialValues:{from:p()().startOf("day").toDate(),to:p()().toDate(),timeStep:T.ev.HOUR.toString(),prices:!1,includeVat:!1},validate:{from:e=>e?null:n("form.from.errors.required"),to:e=>e?null:n("form.to.errors.required")}}),g=[v.fiveMinute?{label:"5 min",value:T.ev.FIVE_MINUTE.toString()}:null,v.quarterHour?{label:"15 min",value:T.ev.QUARTER_HOUR.toString()}:null,v.hour?{label:"60 min",value:T.ev.HOUR.toString()}:null].filter(e=>!!e);return(0,i.jsx)("form",{onSubmit:j.onSubmit(e=>{if(!e.from||!e.to)return;let n=p()(e.from).startOf("day").toDate(),i=p()(e.to).startOf("day").toDate(),t=L.A.stringify({step:e.timeStep,from:n.toISOString(),to:i.toISOString(),prices:e.prices||e.includeVat,includeVat:e.includeVat});window.open("/api/contracts/".concat(l.id,"/readings?").concat(t),"_blank")}),children:(0,i.jsxs)(a.B,{gap:"md",children:[(0,i.jsx)(c.E,{c:"fadedText",children:n("description")}),(0,i.jsx)(r.E,{visible:h,children:(0,i.jsxs)(k.x,{children:[g.length>1?(0,i.jsx)(k.x.Col,{span:12,children:(0,i.jsxs)(F.Y,{gap:"xs",align:"end",children:[(0,i.jsx)(z.l,{flex:1,...j.getInputProps("timeStep"),label:n("form.time-step.label"),data:g}),v.quarterHour&&(0,i.jsx)(V.f,{consumption:x.consumption,production:x.production})]})}):null,(0,i.jsx)(k.x.Col,{span:6,children:(0,i.jsx)(P.t,{valueFormat:"DD.MM.YYYY",label:n("form.from.label"),minDate:l.startDate,required:!0,...j.getInputProps("from")})}),(0,i.jsx)(k.x.Col,{span:6,children:(0,i.jsx)(P.t,{valueFormat:"DD.MM.YYYY",label:n("form.to.label"),maxDate:l.endDate,required:!0,...j.getInputProps("to")})}),!o&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k.x.Col,{children:(0,i.jsx)(R.S,{mt:"md",label:n("form.with-prices.label"),checked:j.values.prices,onChange:e=>{e.currentTarget.checked&&j.setFieldValue("includeVat",!1),j.setFieldValue("prices",e.currentTarget.checked)}})}),s&&(0,i.jsx)(k.x.Col,{children:(0,i.jsx)(R.S,{label:n("form.include-vat.label"),checked:j.values.includeVat,onChange:e=>{e.currentTarget.checked&&j.setFieldValue("prices",!1),j.setFieldValue("includeVat",e.currentTarget.checked)}})})]}),(0,i.jsx)(k.x.Col,{span:12,children:(0,i.jsxs)(F.Y,{gap:"sm",justify:"flex-end",children:[(0,i.jsx)(d.$,{variant:"outline",onClick:f.jQ.closeAll,children:n("btns.cancel")}),(0,i.jsx)(d.$,{type:"submit",children:n("btns.export")})]})})]})})]})})}let H=[T.h$.SupplyContract,T.h$.PurchaseContract,T.h$.GridContract];
1function Y(e){let{contract:l}=e,n=(0,m.c)("pages.contracts.contract-details");return l&&H.includes(l.type)?(0,i.jsx)(d.$,{fullWidth:!0,variant:"outline",onClick:()=>f.jQ.open({title:n("export-readings.modal.title"),children:(0,i.jsx)(q,{contract:l})}),leftSection:(0,i.jsx)(_.A,{}),children:n("export-readings.button")}):null}var G=n(23453),U=n(48230),W=n.n(U),Q=n(36768);let Z=[T.h$.SupplyContract,T.h$.PurchaseContract];function J(e){var l;let{contract:n}=e,t=(0,m.c)("pages.contracts.contract-details"),{hasFeature:r}=(0,A.Z)(),{data:a}=(0,y.useSession)();return!r(T.lo.CONTRACT_MANAGEMENT_DISABLED)&&(null==a||null==(l=a.user)?void 0:l.verified)===T.lt.SsnVerified&&n&&n.moveOutAllowed&&Z.includes(n.type)?(0,i.jsx)(d.$,{fullWidth:!0,variant:"outline",component:W(),href:Q.A.CONTRACTS_MOVE_OUT.replace(":id",null==n?void 0:n.id.toString()),leftSection:(0,i.jsx)(G.A,{}),children:t("move-out")}):null}var K=n(14232),ee=n(14774),el=n(61193),en=n(68206);function ei(e){let{contract:l}=e,n=(0,m.c)("pages.contracts.contract-details.submit-moving-notification"),[t]=(0,el.Jb)(),r=async()=>{let e=await t({type:T.xo.SUBMIT_MOVING_NOTIFICATION}).unwrap();if(!e)return void g.$e.show({message:n("error.submit-url-not-found"),color:"red"});let i=e;e&&l&&(i=function(e,l){let n=new URLSearchParams;if(n.append(en.ju.CONTRACTID,e.id.toString()),e.objectAddresses&&e.objectAddresses.length>0){let l=e.objectAddresses[0];l.street&&n.append(en.ju.OLDADDRESS,l.street),l.zipCode&&n.append(en.ju.OLDZIPCODE,l.zipCode),l.city&&n.append(en.ju.OLDCITY,l.city)}let i=l.includes("?")?"&":"?";return"".concat(l).concat(i).concat(n.toString())}(l,e)),window.open(i,"_blank")};return(0,i.jsx)(d.$,{fullWidth:!0,variant:"outline",onClick:r,leftSection:(0,i.jsx)(ee.A,{}),children:n("button")})}function et(e){let{contract:l,status:n}=e,t=(0,m.c)("pages.contracts.contract-details.other"),{hasFeature:r}=(0,A.Z)();if(!l)return null;let a=(0,i.jsx)(J,{contract:l}),o=r(T.lo.SUBMIT_MOVING_NOTIFICATION)&&n===w.n.ACTIVE?(0,i.jsx)(ei,{contract:l}):null,s=(0,i.jsx)(Y,{contract:l}),d=(0,i.jsx)(M,{contract:l}),u=r(T.lo.CONTRACT_SIGNED_DOWNLOAD)&&(l.type===T.h$.SupplyContract||l.type===T.h$.GasSupplyContract)?(0,i.jsx)(B,{contract:l}):null;return a||s||d||o?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.c,{labelPosition:"left",label:(0,i.jsx)(c.E,{fz:"md",fw:700,children:t("title")})}),a,o,s,d,u]}):null}var er=n(28118),ea=n(56446),eo=n(41600),es=n(32698),ec=n(65719),ed=n(43839);function eu(e){let{annualConsumptionReports:l,contractId:n}=e,t=(0,m.c)("pages.contracts.contract-details.annual-consumption-reports"),[r,a]=(0,K.useState)(0),[o,{isLoading:s,isFetching:c}]=(0,I.kY)(),u=async(e,l)=>{if(!n||!e.reportID||!e.period)return;a(l);let{data:i}=await o({consumptionReportId:e.reportID,contractId:n,period:e.period});i&&i.notFound&&(0,g.Ds)({message:t("report-pdf-not-found"),color:"yellow"})};return(0,i.jsxs)(ed.X,{striped:!0,captionSide:"bottom",children:[(0,i.jsx)(ed.X.Thead,{children:(0,i.jsxs)(ed.X.Tr,{children:[(0,i.jsx)(ed.X.Th,{children:t("period")}),(0,i.jsx)(ed.X.Th,{children:"Pdf"})]})}),(0,i.jsx)(ed.X.Tbody,{children:null==l?void 0:l.map((e,l)=>(0,i.jsxs)(ed.X.Tr,{children:[(0,i.jsx)(ed.X.Td,{children:e.period}),(0,i.jsx)(ed.X.Td,{children:(0,i.jsx)(d.$,{leftSection:(0,i.jsx)(D.A,{size:24}),size:"xs",onClick:()=>e&&u(e,l),loading:(s||c)&&r===l,children:t("btns.download")})})]},l))})]})}let eh=[T.h$.HeatingGridContract];function ep(e){let{contract:l}=e,n=(0,m.c)("pages.contracts.contract-details.annual-consumption-reports"),t=l&&(null==l?void 0:l.id)&&eh.includes(l.type),{data:o,isLoading:s,isFetching:d}=(0,I.Xh)(null==l?void 0:l.id,{skip:!t});return t?s||d?(0,i.jsx)(a.B,{children:(0,i.jsx)(r.E,{h:40})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.c,{labelPosition:"left",label:(0,i.jsx)(c.E,{fz:"md",fw:700,children:n("title")})}),(0,i.jsx)(es.n,{variant:"separated",children:(0,i.jsxs)(es.n.Item,{value:"reports-by-period",children:[(0,i.jsx)(es.n.Control,{children:(0,i.jsx)(c.E,{fz:"sm",children:n("description")})}),(0,i.jsx)(es.n.Panel,{children:o&&0!==o.length?(0,i.jsx)(eu,{annualConsumptionReports:o,contractId:null==l?void 0:l.id}):(0,i.jsx)(ec.A,{title:n("empty-state.title"),description:n("empty-state.description")})})]},"reports-by-period")})]}):null}var ev=n(30962),em=n(30753),ex=n.n(em),ej=n(69429),ef=n.n(ej),eg=n(71033);let eb=[T.h$.HeatingGridContract,T.h$.GasGridContract];function eC(e){var l,n,t,r,a;let{contract:o=null}=e,s=(0,m.c)("pages.contracts.contract-details.general"),d=ex()(ef()(e=>e.id))(null==o?void 0:o.objects),u=ex()(ef()(e=>e.gsrn))(null==o?void 0:o.objects);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.c,{labelPosition:"left",label:(0,i.jsx)(c.E,{fz:"md",fw:700,children:s("title")})}),(0,i.jsxs)(er.BM,{children:[(0,i.jsxs)(er.BM.Item,{label:s("validity"),loading:!o,children:[(null==o?void 0:o.startDate)?eg.A.formatDateToString(null==o?void 0:o.startDate):"..."," ","-"," ",(null==o?void 0:o.endDate)?eg.A.formatDateToString(null==o?void 0:o.endDate):"..."]}),(0,i.jsx)(er.BM.Item,{label:s("billing"),loading:!o,children:null==o?void 0:o.billing.frequency}),(0,i.jsx)(er.BM.Item,{label:s("products"),loading:!o,children:(0,i.jsx)(ev.B,{size:"sm",listStyleType:"none",children:null==o||null==(l=o.productNames)?void 0:l.map(e=>(0,i.jsx)(ev.B.Item,{children:e},e))})}),eb.includes(null==o?void 0:o.type)?(0,i.jsx)(er.BM.Item,{label:s("usage-point"),loading:!o,children:(0,i.jsx)(ev.B,{size:"sm",listStyleType:"none",children:d.map(e=>(0,i.jsx)(ev.B.Item,{children:e},e))})}):(0,i.jsx)(er.BM.Item,{label:s("gsrn"),loading:!o,children:(0,i.jsx)(ev.B,{size:"sm",listStyleType:"none",children:u.map(e=>(0,i.jsx)(ev.B.Item,{children:e},e))})}),(0,i.jsx)(er.BM.Item,{label:s("owner"),loading:!o,children:(0,i.jsx)(ev.B,{size:"sm",listStyleType:"none",children:null==o?void 0:o.ownerName})}),(null==o?void 0:o.type)===T.h$.GridContract?(0,i.jsxs)(i.Fragment,{children:[(null==(n=o.meter)?void 0:n.fuseAmperage)&&(0,i.jsx)(er.BM.Item,{label:s("fuse-amperage"),loading:!o,children:null==(t=o.meter)?void 0:t.fuseAmperage}),(null==(r=o.meter)?void 0:r.serialNumber)&&(0,i.jsx)(er.BM.Item,{label:s("serial-number"),loading:!o,children:null==(a=o.meter)?void 0:a.serialNumber})]}):null]})]})}var ey=n(87242),eT=n(42400),eE=n.n(eT),eI=n(44239),eS=n.n(eI),eA=n(49240),ew=n(84415),eD=n(12396);function eN(e){let{prices:l,vatInfo:n}=e,t=(0,m.c)("pages.contracts.contract-details.fees"),{format:r}=(0,eD.A)();return(0,i.jsxs)(ed.X,{striped:!0,captionSide:"bottom",children:[(0,i.jsx)(ed.X.Thead,{children:(0,i.jsxs)(ed.X.Tr,{children:[(0,i.jsx)(ed.X.Th,{children:t("fee")}),(0,i.jsx)(ed.X.Th,{children:t("amount")})]})}),(0,i.jsx)(ed.X.Tbody,{children:l.map(e=>(0,i.jsxs)(ed.X.Tr,{children:[(0,i.jsx)(ed.X.Td,{children:e.name}),(0,i.jsx)(ed.X.Td,{children:"".concat(r(e.price)," ").concat(e.priceUnit)})]},e.name+e.priceType+e.validFrom))}),(0,i.jsx)(ed.X.Caption,{fz:"xs",children:n})]})}function eM(e){let{prices:l,billingShares:n,vatInfo:t}=e,r=eS()(l.map(e=>e.supplyProductId)),o=l.filter(e=>"primary"===e.group),s=l.filter(e=>"secondary"===e.group),c=null==n?void 0:n.filter(e=>r.includes(e.supplyProductId));return 0===s.length?(0,i.jsx)(eN,{prices:o,vatInfo:t}):(0,i.jsxs)(a.B,{children:[(0,i.jsxs)(a.B,{gap:"xs",children:[c&&(0,i.jsx)(eA.HL,{billingShares:c,group:"primary"}),(0,i.jsx)(eN,{prices:o,vatInfo:t})]}),(0,i.jsxs)(a.B,{gap:"xs",children:[c&&(0,i.jsx)(eA.HL,{billingShares:c,group:"secondary"}),(0,i.jsx)(eN,{prices:s,vatInfo:t})]}),(0,i.jsx)(x.c,{variant:"dashed"}),c&&c.length>1?(0,i.jsx)(ew.E,{billingShares:c,narrow:!0}):null]})}function eO(e){var l,n,t,o,s;
1let{contract:d=null}=e,u=(0,m.c)("pages.contracts.contract-details.fees"),{data:h}=(0,y.useSession)();if((null==d||null==(l=d.prices)?void 0:l.length)===0)return null;let v=[...null!=(o=null==d||null==(n=d.prices)?void 0:n.map(e=>({...e,group:"primary"})))?o:[],...null!=(s=null==d||null==(t=d.secondaryPrices)?void 0:t.map(e=>({...e,group:"secondary"})))?s:[]],j=eE()(v,e=>e.validTo?"".concat(e.validFrom,"/").concat(e.validTo):e.validFrom);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.c,{labelPosition:"left",label:(0,i.jsx)(c.E,{fz:"md",fw:700,children:u("title")})}),d?null:(0,i.jsxs)(a.B,{children:[(0,i.jsx)(r.E,{h:40}),(0,i.jsx)(r.E,{h:40})]}),(0,i.jsx)(es.n,{variant:"separated",multiple:!0,children:Object.keys(j).map(e=>{var l,n;return(0,i.jsxs)(es.n.Item,{value:e,children:[(0,i.jsx)(es.n.Control,{children:(0,i.jsx)(c.E,{fz:"sm",children:(e=>{let[l,n]=e.split("/"),i=p()(l).tz(),t=p()(n).tz();return n&&t.isValid()?u("price-list-active-from",{date:"".concat(i.format("DD.MM.YYYY")," - ").concat(t.format("DD.MM.YYYY"))}):u("price-list-active-from",{date:"".concat(i.format("DD.MM.YYYY")," - ...")})})(e)})}),(0,i.jsx)(es.n.Panel,{children:(0,i.jsxs)(a.B,{children:[(l=j[e],eS()(l.map(e=>e.supplyProductId)).map(e=>{var l;let n=null==d||null==(l=d.products)?void 0:l.find(l=>l.id===e);return n?(0,i.jsxs)(ey.a,{children:[(0,i.jsx)(c.E,{fw:700,fz:"sm",children:n.title}),(0,i.jsx)(c.E,{fz:"sm",children:n.description})]},n.id):null})),(0,i.jsx)(eM,{prices:j[e],billingShares:null==d?void 0:d.billingShares,vatInfo:(null==d?void 0:d.type)===T.h$.PurchaseContract||(null==h||null==(n=h.representative)?void 0:n.isLegalEntity)?u("vat.excluded"):u("vat.included")})]})})]},e)})})]})}var eB=n(83888);function e_(e){let{contract:l=null}=e,n=(0,m.c)("pages.contracts.contract-details");return(null==l?void 0:l.type)!==T.h$.HeatingGridContract?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eB.F,{variant:"filled",styles:{message:{marginTop:0}},children:(0,i.jsx)(F.Y,{wrap:"nowrap",children:(0,i.jsx)(c.E,{size:"md",children:n("heating-grid-information")})})}),(0,i.jsx)(x.c,{})]})}var ek=n(83331),eF=n(88556),ez=n(96055),eR=n(70270),eP=n(34579);function eX(e){let{form:l,disabled:n,pending:t,channels:r}=e,o=(0,m.c)("pages.contracts.contract-details.invoicing.edit-modal.form"),s=!!r.length,d=(()=>{if(l.values.eInvoiceChannel)return r.find(e=>e.value===l.values.eInvoiceChannel).label})();return(0,i.jsx)(eF.L,{legend:o("e-invoice-legend"),children:(0,i.jsxs)(a.B,{children:[(0,i.jsx)(c.E,{size:"sm",children:o("e-invoice-priority-info")}),(0,i.jsx)(z.l,{data:r,disabled:n,clearable:!n&&!t,placeholder:o("select-bank"),allowDeselect:!0,inputWrapperOrder:["label","input","description","error"],...l.getInputProps("eInvoiceChannel")}),t?(0,i.jsx)(c.E,{size:"sm",c:"red",fw:700,children:o("request-pending")}):(0,i.jsxs)(i.Fragment,{children:[!!d&&(0,i.jsxs)(c.E,{size:"sm",fw:700,children:[o("invoice-to-e-invoice"),": ",d]}),s&&!d&&(0,i.jsx)(c.E,{size:"sm",fw:700,children:o("no-e-invoice")}),!s&&(0,i.jsx)(c.E,{size:"sm",fw:700,children:o("no-e-invoice-available")})]})]})})}var eL=n(6381);let eV=e=>eL.z.object({postChannel:eL.z.string().nullable(),emailChannel:eL.z.string().nullable(),eInvoiceChannel:eL.z.string().nullable(),selfServiceEnabled:eL.z.boolean()}).refine(e=>{let{postChannel:l,eInvoiceChannel:n,emailChannel:i,selfServiceEnabled:t}=e;return!!l||!!n||!!i||t},{path:["submitError"],message:e("form.errors.one-required")}).refine(e=>{let{postChannel:l,eInvoiceChannel:n,emailChannel:i,selfServiceEnabled:t}=e;return t||!n||!i&&!l},{path:["submitError"],message:e("form.errors.e-invoice-only-required")});function e$(e){let{form:l,disabled:n,overridden:t,channels:r}=e,o=(0,m.c)("pages.contracts.contract-details.invoicing.edit-modal.form"),s=!!r.length,d=(()=>{if(l.values.postChannel)return r.find(e=>e.value===l.values.postChannel).label})(),u=t?"dimmed":void 0;return(0,i.jsx)(eF.L,{legend:o("address-legend"),children:(0,i.jsxs)(a.B,{children:[(0,i.jsx)(z.l,{data:r,disabled:n,clearable:!n,placeholder:o("select-address"),allowDeselect:!0,inputWrapperOrder:["label","input","description","error"],...l.getIn
1putProps("postChannel")}),s&&!d?(0,i.jsx)(c.E,{size:"sm",fw:700,c:u,children:o("no-postal-invoice")}):d?(0,i.jsxs)(a.B,{gap:0,children:[(0,i.jsxs)(c.E,{size:"sm",fw:700,c:u,children:[o("invoice-to-address"),":"]}),(0,i.jsx)(c.E,{size:"sm",fw:700,c:u,children:d})]}):(0,i.jsx)(c.E,{size:"sm",fw:700,c:u,children:o("no-address-available")})]})})}function eq(e){let{form:l,disabled:n,overridden:t,channels:r}=e,o=(0,m.c)("pages.contracts.contract-details.invoicing.edit-modal.form"),s=!!r.length,d=(()=>{if(l.values.emailChannel)return r.find(e=>e.value===l.values.emailChannel).label})(),u=t?"dimmed":void 0;return(0,i.jsx)(eF.L,{legend:o("e-mail-legend"),children:(0,i.jsxs)(a.B,{children:[(0,i.jsx)(z.l,{data:r,disabled:n,clearable:!n,placeholder:o("select-email"),allowDeselect:!0,inputWrapperOrder:["label","input","description","error"],...l.getInputProps("emailChannel")}),s&&!d?(0,i.jsx)(c.E,{size:"sm",fw:700,c:u,children:o("no-email-invoice")}):d?(0,i.jsxs)(a.B,{gap:0,children:[(0,i.jsxs)(c.E,{size:"sm",fw:700,c:u,children:[o("invoice-to-email"),":"]}),(0,i.jsx)(c.E,{size:"sm",fw:700,c:u,children:d})]}):(0,i.jsx)(c.E,{size:"sm",fw:700,c:u,children:o("no-emails-available")})]})})}function eH(e){var l,n,t,r,o;let{contract:s,data:u,scrollRef:p}=e,v=(0,m.c)("pages.contracts.contract-details.invoicing.edit-modal"),{hasFeature:x}=(0,A.Z)(),j=x(T.lo.CONTRACT_SIGN_POSTAL_INVOICE_DISABLED),g=x(T.lo.CONTRACT_BILLING_MANAGEMENT_PREFER_EINVOICE),[b,{isLoading:C,isError:y}]=(0,I.ON)(),E=!!(null==u?void 0:u.eInvoiceChannels.find(e=>e.requestPending)),S=null==u||null==(l=u.postChannels.find(e=>e.selected))?void 0:l.id,w=null==u||null==(n=u.emailChannels.find(e=>e.selected))?void 0:n.id,D=null==u||null==(t=u.eInvoiceChannels.find(e=>e.selected))?void 0:t.bankId,N=!(j||g),M=!(g&&D),O=(null==u?void 0:u.postChannels.map(e=>({label:e.value,value:e.id.toString(),disabled:e.readonly})))||[],B=(null==u?void 0:u.emailChannels.map(e=>({label:e.value,value:e.id.toString(),disabled:e.readonly})))||[],_=(null==u?void 0:u.eInvoiceChannels.map(e=>({label:e.value,value:e.bankId.toString(),disabled:E,limited:e.limited})))||[],k=!!(null==u?void 0:u.selfServiceBillingSelected),z=(0,X.m)({validate:(0,eR.u)(eV(v)),initialValues:{postChannel:N&&(null==S?void 0:S.toString())||null,emailChannel:M&&(null==w?void 0:w.toString())||null,eInvoiceChannel:(null==D?void 0:D.toString())||null,selfServiceEnabled:k}}),P=!!(null==u?void 0:u.selfServiceBillingEnabled);(0,K.useEffect)(()=>{z.values.selfServiceEnabled&&(z.setFieldValue("postChannel",null),z.setFieldValue("emailChannel",null))},[z.values.selfServiceEnabled]);let L=()=>!!(null==u?void 0:u.eInvoiceChannels.find(e=>e.requestPending)),V=async e=>{var l,n,i;let{error:t}=await b({id:s.id,locale:(0,h.locale)(),currentValues:{eInvoiceChannelBankId:D,eInvoiceLimited:(null==u||null==(l=u.eInvoiceChannels.find(e=>e.selected))?void 0:l.limited)||!1},newValues:{postChannelId:N&&e.postChannel&&!e.selfServiceEnabled?+e.postChannel:void 0,eInvoiceChannelBankId:e.eInvoiceChannel?+e.eInvoiceChannel:void 0,eInvoiceLimited:(null==u||null==(n=u.eInvoiceChannels.find(l=>e.eInvoiceChannel&&l.bankId===+e.eInvoiceChannel))?void 0:n.limited)||!1,emailChannelId:M&&e.emailChannel&&!e.selfServiceEnabled?+e.emailChannel:void 0,selfServiceEnabled:e.selfServiceEnabled||void 0}});t?null==(i=p.current)||i.scrollTo({top:0}):f.jQ.closeAll()},$=!!z.values.selfServiceEnabled,q=!!z.values.eInvoiceChannel||$;return(0,i.jsxs)(a.B,{children:[y&&(0,i.jsx)(eB.F,{variant:"light",icon:(0,i.jsx)(ek.A,{}),color:"red",children:(0,i.jsx)(c.E,{inherit:!0,display:"inline",fw:700,c:"fadedText",children:v("alerts.unknown-error")})}),(0,i.jsxs)("form",{onSubmit:z.onSubmit(V),style:{position:"relative"},children:[(0,i.jsx)(eP.d,{visible:C}),(0,i.jsxs)(a.B,{gap:"md",children:[(0,i.jsx)(eX,{disabled:!!(null==u?void 0:u.eInvoiceChannels.find(e=>e.requestPending)),pending:L(),form:z,channels:_}),N&&(0,i.jsx)(e$,{disabled:!!(null==u||null==(r=u.postChannels.find(e=>e.selected))?void 0:r.readonly)||L()||$,overridden:q,form:z,channels:O}),M&&(0,i.jsx)(eq,{disabled:!!(null==u||null==(o=u.emailChannels.find(e=>e.selected))?void 0:o.readonly)||L()||$,overridden:q,form:z,channels:B}),P&&(0,i.jsx)(eF.L,{legend:v("form.self-service-legend"),children:(0,i.jsxs)(a.B,{children:[(0,i.jsx)(c.E,{size:"sm",children:v("form.self-service-info")}),(0,i.jsx)(R.S,{label:v("form.self-service-checkbox"),...z.getInputProps("selfServiceEnabled",{type:"checkbox"})})]})}),(0,i.jsx)(ez.o,{error:z.errors.submitError,pl:"lg"}),(0,i.jsxs)(F.Y,{gap:"sm",justify:"flex-end",children:[(0,i.jsx)(d.$,{variant:"outline",onClick:f.jQ.closeAll,children:v("btns.cancel")}),(0,i.jsx)(d.$,{type:"submit",children:v("btns.submit")})]})]})]})]})}
1function eY(e){let{contract:l,scrollRef:n}=e,t=(0,m.c)("pages.contracts.contract-details.invoicing.edit-modal"),{data:o,isLoading:s,isFetching:d,isError:u}=(0,I.ZT)({query:{id:l.id}});return u?(0,i.jsxs)(a.B,{children:[(0,i.jsx)(eB.F,{variant:"light",icon:(0,i.jsx)(ek.A,{}),color:"red",children:(0,i.jsx)(c.E,{inherit:!0,display:"inline",fw:700,c:"fadedText",children:t("alerts.unknown-error")})}),(0,i.jsx)(r.E,{mih:360})]}):s||d?(0,i.jsx)(r.E,{mih:560}):(0,i.jsx)(eH,{contract:l,data:o,scrollRef:n})}function eG(e){let{contract:l}=e,n=(0,m.c)("pages.contracts.contract-details.invoicing"),t=(0,K.useRef)(null);return l?(0,i.jsxs)(i.Fragment,{children:[!!l.billing.pendingEInvoiceRequestBankName&&(0,i.jsx)(eB.F,{children:n("alerts.e-invoice-in-progress",{bankName:l.billing.pendingEInvoiceRequestBankName})}),(0,i.jsx)(d.$,{disabled:!!l.billing.pendingEInvoiceRequestBankName,fullWidth:!0,variant:"outline",onClick:()=>f.jQ.open({title:n("edit-modal.title"),children:(0,i.jsx)(eY,{contract:l,scrollRef:t}),scrollAreaComponent:e=>{let{style:l,...n}=e;return(0,i.jsx)("div",{...n,ref:t,style:{...l,overflow:"auto"}})}}),children:n("edit")})]}):null}eV(()=>"stub");var eU=n(37418);function eW(e){var l,n;let{contract:t=null,canModify:o=!1}=e,s=(0,m.c)("pages.contracts.contract-details.invoicing"),{hasFeature:d}=(0,A.Z)(),u=d(T.lo.CONTRACT_BILLING_MANAGEMENT),{data:h}=(0,y.useSession)(),p=o&&u&&(!(null==h||null==(l=h.representative)?void 0:l.isLegalEntity)||d(T.lo.CONTRACT_BILLING_MANAGEMENT_BUSINESS));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.c,{labelPosition:"left",label:(0,i.jsx)(c.E,{fz:"md",fw:700,children:s("title")})}),(0,i.jsx)(r.E,{visible:!t,children:(0,i.jsxs)(a.B,{children:[(0,i.jsxs)(ed.X,{striped:!0,children:[(0,i.jsx)(ed.X.Thead,{children:(0,i.jsxs)(ed.X.Tr,{children:[(0,i.jsx)(ed.X.Th,{children:s("channel")}),(0,i.jsx)(ed.X.Th,{children:(null==t?void 0:t.billing.selfService)?"":s("address")})]})}),(0,i.jsxs)(ed.X.Tbody,{children:[(null==t?void 0:t.billing.email)&&(0,i.jsxs)(ed.X.Tr,{children:[(0,i.jsx)(ed.X.Td,{children:s("e-mail")}),(0,i.jsx)(ed.X.Td,{children:null==t?void 0:t.billing.email})]}),(null==t?void 0:t.billing.einvoice)&&(0,i.jsxs)(ed.X.Tr,{children:[(0,i.jsx)(ed.X.Td,{children:(null==t?void 0:t.billing.einvoice)?s((null==t||null==(n=t.billing.einvoice)?void 0:n.directDebit)?"direct-debit":"e-invoice"):null}),(0,i.jsx)(ed.X.Td,{children:eU.A.formatEInvoice(t.billing.einvoice)})]}),(null==t?void 0:t.billing.postal)&&(0,i.jsxs)(ed.X.Tr,{children:[(0,i.jsx)(ed.X.Td,{children:s("postal")}),(0,i.jsx)(ed.X.Td,{children:eo.Ay.toShortAddressString(t.billing.postal)})]}),(null==t?void 0:t.billing.selfService)&&(0,i.jsxs)(ed.X.Tr,{children:[(0,i.jsx)(ed.X.Td,{children:s("self-service")}),(0,i.jsx)(ed.X.Td,{})]})]})]}),(null==t?void 0:t.billing.supplierInvoicesBoth)&&(0,i.jsx)(eB.F,{icon:(0,i.jsx)(ek.A,{}),color:"blue",children:s("supplier-invoices-both")}),p&&(0,i.jsx)(eG,{contract:t})]})})]})}let eQ=(0,b.A)("outline","pencil","Pencil",[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]]);var eZ=n(40123),eJ=n.n(eZ),eK=n(89099);function e0(e){var l,n;let{contract:t=null}=e,r=(0,m.c)("pages.contracts.contract-details.outage-contacts"),o=(0,eK.useRouter)(),{hasFeature:s}=(0,A.Z)();return eJ()(null==t?void 0:t.outageContacts)||!s(T.lo.USER_SETTINGS_OUTAGE_CONTACTS)?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.c,{labelPosition:"left",label:(0,i.jsx)(c.E,{fz:"md",fw:700,children:r("title")})}),(0,i.jsx)(es.n,{variant:"separated",children:(0,i.jsxs)(es.n.Item,{value:r("title"),children:[(0,i.jsx)(es.n.Control,{children:(0,i.jsx)(c.E,{fz:"sm",children:"".concat(r("title")," (").concat(null==t||null==(l=t.outageContacts)?void 0:l.length,")")})}),(0,i.jsx)(es.n.Panel,{children:(0,i.jsx)(a.B,{children:(0,i.jsxs)(ed.X,{striped:!0,captionSide:"bottom",children:[(0,i.jsx)(ed.X.Thead,{children:(0,i.jsx)(ed.X.Tr,{children:(0,i.jsx)(ed.X.Th,{children:r("contact")})})}),(0,i.jsx)(ed.X.Tbody,{children:null==t||null==(n=t.outageContacts)?void 0:n.map(e=>(0,i.jsx)(ed.X.Tr,{children:(0,i.jsx)(ed.X.Td,{children:e.value})},e.id))}),(0,i.jsx)(ed.X.Caption,{children:(0,i.jsx)(d.$,{fz:"sm",onClick:()=>o.push("".concat(Q.A.SETTINGS,"?tab=outage-contacts&contractId=").concat(null==t?void 0:t.id)),variant:"outline",fullWidth:!0,leftSection:(0,i.jsx)(eQ,{}),children:r("manage")})})]})})})]})})]})}var e2=n(43168),e1=n(23898);function e9(e){var l;let{contract:n=null}=e,t=(0,m.c)("pages.contracts.contract-details.offer"),{data:r}=(0,y.useSession)(),{hasFeature:a}=(0,A.Z)(),{data:o}=(0,e1.BM)(r,{skip:!a(T.lo.RENEWAL_OFFERS)});return a(T.lo.RENEWAL_OFFERS)&&n&&o&&(null==(l=o.contracts)?void 0:l.some(e=>e===n.id))?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eB.F,{variant:"filled",styles:{message:{marginTop:0}},children:(0,i.jsxs)(F.Y,{wrap:"nowrap",justify:"space-between",children:[(0,i.jsx)(c.E,{size:"md",children:t("title")}),(0,i.jsx)(d.$,{component:W(),href:Q.A.CONTRACTS_OFFER.replace(":id",n.id.toString()),variant:"white",children:(0,i.jsx)(e2.A,{})})]})}),(0,i.jsx)(x.c,{})]}):null}function e3(e){var l,n,t,r;let{contract:a=null}=e,o=(0,m.c)("pages.contracts.contract-details.supplier");return(null==a?void 0:a.type)===T.h$.GridContract&&((null==a||null==(l=a.supplier)?void 0:l.name)||(null==a||null==(n=a.supplier)?void 0:n.period))?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.c,{labelPosition:"left",label:(0,i.jsx)(c.E,{fz:"md",fw:700,children:o("title")})}),(0,i.jsxs)(er.BM,{children:[(null==a||null==(t=a.supplier)?void 0:t.name)&&(0,i.jsx)(er.BM.Item,{label:o("name"),loading:!a,children:a.supplier.name}),(null==a||null==(r=a.supplier)?void 0:r.period)&&(0,i.jsx)(er.BM.Item,{label:o("period"),loading:!a,children:a.supplier.period})]})]}):null}let e4=function(e){var l,n,h,x;let{opened:j,contractId:f,brandId:g,canModify:b,onClose:C,status:y}=e,E=(0,m.c)("pages.contracts.contract-details"),{hasFeature:w}=(0,A.Z)(),D=(0,t.xd)(),N=p().locale(),{data:M}=(0,I.EA)({query:{id:f},locale:N},{skip:!j||!f}),O=(0,v.go)(null!=(n=null==M?void 0:M.brandId)?n:g),B=(0,v.Pn)(null!=(h=null==M?void 0:M.brandId)?h:g);return(0,i.jsx)(er.B9,{opened:j,onClose:C,hero:{backgroundColor:null==B?void 0:B.accent,logo:O?(0,i.jsx)(ea.FQ,{brandId:null!=(x=null==M?void 0:M.brandId)?x:g}
1):M?void 0:w(T.lo.BRAND_MANAGEMENT)?(0,i.jsx)(r.E,{w:105,h:35}):void 0,title:(0,i.jsxs)(a.B,{align:"center",children:[(0,i.jsx)(o.L,{radius:"lg",variant:"light",size:52,color:"icon",children:(0,i.jsx)(u.A,{color:"white"})}),(0,i.jsx)(r.E,{visible:!M,children:(0,i.jsxs)(s.s,{direction:"column",align:"center",mb:D.spacing.xs,children:[(0,i.jsx)(c.E,{fw:700,fz:"lg",children:M&&"#".concat(null==M?void 0:M.id)}),null==M||null==(l=M.objectAddresses)?void 0:l.map(e=>{let l=eo.Ay.toShortAddressString(e);return(0,i.jsx)(c.E,{fz:"sm",children:l},l.replace(/\s/g,""))})]})})]}),subtitle:(0,i.jsx)(ea.Ag,{size:"lg",contractType:null==M?void 0:M.type})},position:"right",footer:(0,i.jsx)(s.s,{justify:"flex-end",children:(0,i.jsx)(d.$,{variant:"light",onClick:C,children:E("close")})}),children:(0,i.jsxs)(a.B,{gap:"lg",children:[(0,i.jsx)(e9,{contract:M}),(0,i.jsx)(e_,{contract:M}),(0,i.jsx)(eC,{contract:M}),(0,i.jsx)(e3,{contract:M}),(0,i.jsx)(eW,{contract:M,canModify:b}),(0,i.jsx)(eO,{contract:M}),w(T.lo.ANNUAL_CONSUMPTION_REPORTS)&&(0,i.jsx)(ep,{contract:M}),(0,i.jsx)(e0,{contract:M}),(0,i.jsx)(et,{contract:M,status:y}),w(T.lo.CONTRACT_CANCELLATION)&&(0,i.jsx)(S,{contract:M,onCancelled:C})]})})}},88556:(e,l,n)=>{n.d(l,{L:()=>p});var i=n(37876);n(14232);var t=n(46249),r=n(1609),a=n(99545),o=n(88791),s=n(87242),c=n(80385),d={root:"m_e9408a47","root--default":"m_84c9523a","root--filled":"m_ef274e49","root--unstyled":"m_eda993d3",legend:"m_90794832","legend--unstyled":"m_74ca27fe"};let u={variant:"default"},h=(0,r.V)((e,{radius:l})=>({root:{"--fieldset-radius":void 0===l?void 0:(0,t.nJ)(l)}})),p=(0,c.P9)((e,l)=>{let n=(0,a.Y)("Fieldset",u,e),{classNames:t,className:r,style:c,styles:p,unstyled:v,vars:m,legend:x,variant:j,children:f,attributes:g,...b}=n,C=(0,o.I)({name:"Fieldset",classes:d,props:n,className:r,style:c,classNames:t,styles:p,unstyled:v,attributes:g,vars:m,varsResolver:h});return(0,i.jsxs)(s.a,{component:"fieldset",ref:l,variant:j,...C("root",{variant:j}),...b,children:[x&&(0,i.jsx)("legend",{...C("legend",{variant:j}),children:x}),f]})});p.classes=d,p.displayName="@mantine/core/Fieldset"}}]);

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.