PageSourceSearch

https://kernel-events-9c067a46a772.herokuapp.com/assets/index-_Q74Xx9m.js

js kernel-events-9c067a46a772.herokuapp.com collected 2026-10-03 14:50:41 UTC 7,878 bytes, 6 lines download raw bytes

1import{t as b,a as T,j as e,i,k as C,r as j,K as f,S as I,F as k,B as w,bo as S,n as N}from"./index-BCjZt3EG.js";import{u as E}from"./useGetEventSettings-CD37Ax2G.js";import{u as G}from"./useUpdateEventSettings-Q2c8tquz.js";import{u as z}from"./useFormErrorResponseHandler-CB6hFodv.js";import{T as D}from"./index-DbkqjYax.js";import{I as K}from"./index-Dtfolnz_.js";import{u as O,G as P}from"./useGetEventImages-COgEKz0G.js";import{L as H}from"./index-CTE_jb5r.js";import{u as V}from"./useGetEvent-CjRhCyqW.js";import{A as M}from"./index-CaflvYaz.js";import{u as R}from"./use-form-JzVFRM7k.js";import{A as v}from"./Accordion-TB8aG9F6.js";import{C as F}from"./ColorInput-BKLuuc_x.js";import{I as A}from"./IconHelp-B7hLiWK0.js";import{T as W}from"./Textarea-CxwG4elz.js";import{I as U}from"./IconPrinter-D4zI5ESy.js";import"./useMutation-5fpDe86F.js";import"./Tooltip-DdNrIaue.js";import"./get-floating-position-gPgTkdY-.js";import"./get-style-object-DUJZA7T_.js";import"./index-Cb9XYQR-.js";import"./index-Q7SQVUt1.js";import"./LoadingOverlay-BR9bJlAK.js";import"./use-resolved-styles-api-D1DNUn57.js";import"./use-disclosure-C4ezxH9Q.js";import"./useUploadImage-BC70meIy.js";import"./ActionIcon-231onH2S.js";import"./IconTrash-C_6jUgus.js";import"./products-CY7lGBpC.js";import"./currency-D0h3gs5J.js";import"./dates-D8vefGCw.js";import"./dayjs.min-CayCwTCH.js";import"./timezone-CpQFBHFL.js";import"./utc-LrfQODli.js";import"./index-BQie2ixR.js";import"./urlHelper-BsmDpWJc.js";import"./addressUtilities-dxvPSeRQ.js";import"./IconLock-CfL8PZc2.js";import"./CopyButton-FPPkSIrr.js";import"./use-clipboard-BbgvWSSF.js";import"./IconCopy-BJPcULGQ.js";import"./get-safe-id-Bp3H8K0-.js";import"./AccordionChevron-REuq0yYq.js";import"./create-scoped-keydown-handler-O-eo68DQ.js";import"./Collapse-DYEGWsfu.js";import"./use-uncontrolled-Cdx34M6a.js";import"./ColorPicker-DeQKvxVX.js";import"./ColorSwatch-C7-435ar.js";import"./clamp-DTmYCdls.js";import"./CheckIcon-DgtXd26i.js";import"./Input-7i8T04tH.js";import"./InputBase-Da_3HsBN.js";import"./Popover-66ExQcHx.js";import"./get-env-uyVen0u2.js";/**
2 * @license @tabler/icons-react v3.35.0 - MIT
3 *
4 * This source code is licensed under the MIT license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const J=[["path",{d:"M19 3h-4a2 2 0 0 0 -2 2v12a4 4 0 0 0 8 0v-12a2 2 0 0 0 -2 -2",key:"svg-0"}],["path",{d:"M13 7.35l-2 -2a2 2 0 0 0 -2.828 0l-2.828 2.828a2 2 0 0 0 0 2.828l9 9",key:"svg-1"}],["path",{d:"M7.3 13h-2.3a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h12",key:"svg-2"}],["path",{d:"M17 17l0 .01",key:"svg-3"}]],Q=b("outline","color-swatch","ColorSwatch",J),B="_container_naj0c_1",q="_sidebar_naj0c_18",X="_sticky_naj0c_43",Y="_header_naj0c_48",Z="_accordion_naj0c_60",$="_accordionItem_naj0c_63",L="_fieldset_naj0c_89",ee="_preview_naj0c_118",te="_previewHeader_naj0c_142",ie="_previewContent_naj0c_156",n={container:B,sidebar:q,sticky:X,header:Y,accordion:Z,accordionItem:$,fieldset:L,preview:ee,previewHeader:te,previewContent:ie},oe="_previewWrapper_757v0_1",re="_loadingState_757v0_32",y={previewWrapper:oe,loadingState:re},se=({settings:r,eventId:a,logoUrl:l})=>{const p=V(a),g=T(),x=E(a),t=p.data,o=g.data,m=x.data;if(!t||!o)return e.jsx("div",{className:y.loadingState,children:e.jsx("p",{children:i._({id:"WdmJIX"})})});const _={id:1,title:i._({id:"T02gNN"}),price:2500,type:"TICKET",sale_start_date:null,sale_end_date:null,max_per_order:null,min_per_order:null,quantity_available:null,is_hidden:!1,sort_order:1,description:"",is_hidden_without_promo_code:!1},u={id:1,public_id:"PREVIEW12345",short_id:"P1234",first_name:o.first_name||"John",last_name:o.last_name||"Doe",email:o.email||"[email protected]",status:"ACTIVE",checked_in_at:null,product_id:_.id,product:_,product_price_id:1,order_id:1,order:{id:1,short_id:"ORD123",created_at:new Date().toISOString(),total_gross:2500,currency:t.currency||"USD"}},h={...t,settings:{...t.settings,ticket_design_settings:{accent_color:r.accent_color,logo_image_id:r.logo_image_id,footer_text:r.footer_text,enabled:r.enabled},location_details:(m==null?void 0:m.location_details)||{venue_name:i._({id:"8BRPoH"}),address_line_1:i._({id:"HR/cvw"})}},images:l&&r.logo_image_id?[...(t.images||[]).filter(d=>d.type!=="TICKET_LOGO"),{id:r.logo_image_id,type:"TICKET_LOGO",url:l,size_bytes:0,filename:""}]:(t.images||[]).filter(d=>d.type!=="TICKET_LOGO")};return e.jsx("div",{className:y.previewWrapper,children:e.jsx(M,{event:h,attendee:u,product:_,hideButtons:!0})})},at=()=>{var h,d;const{eventId:r}=C(),a=E(r),l=O(r),p=G(),[g,x]=j.useState(["design"]),t=(h=l.data)==null?void 0:h.find(s=>s.type==="TICKET_LOGO"),o=R({initialValues:{accent_color:"#333333",logo_image_id:void 0,footer_text:"",enabled:!0}}),m=z();j.useEffect(()=>{var s;if(a!=null&&a.isFetched&&((s=a==null?void 0:a.data)!=null&&s.ticket_design_settings)){const c=a.data.ticket_design_settings;o.setValues({accent_color:c.accent_color||"#333333",logo_image_id:c.logo_
6image_id||void 0,footer_text:c.footer_text||"",enabled:c.enabled!==!1})}},[a.isFetched]),j.useEffect(()=>{t!=null&&t.id?o.setFieldValue("logo_image_id",t.id):o.setFieldValue("logo_image_id",null)},[t==null?void 0:t.id]);const _=s=>{p.mutate({eventSettings:{ticket_design_settings:{accent_color:s.accent_color,logo_image_id:s.logo_image_id,footer_text:s.footer_text||void 0,enabled:s.enabled}},eventId:r},{onSuccess:()=>{N(i._({id:"EZC/Cu"}))},onError:c=>{m(o,c)}})},u=()=>{S.invalidateQueries({queryKey:[P,r]})};return a.isLoading||l.isLoading?e.jsx(H,{}):e.jsxs("div",{className:n.container,children:[e.jsx("div",{className:n.sidebar,children:e.jsxs("div",{className:n.sticky,children:[e.jsxs("div",{className:n.header,children:[e.jsx("h2",{children:i._({id:"0GSPnc"})}),e.jsx(f,{c:"dimmed",size:"sm",children:i._({id:"CUKVDt"})})]}),e.jsx("form",{onSubmit:o.onSubmit(_),children:e.jsxs("fieldset",{disabled:p.isPending,className:n.fieldset,children:[e.jsx(v,{multiple:!0,value:g,onChange:x,variant:"contained",className:n.accordion,children:e.jsxs(v.Item,{value:"design",className:n.accordionItem,children:[e.jsx(v.Control,{icon:e.jsx(Q,{size:20}),children:e.jsx(f,{fw:500,children:i._({id:"NvuEhl"})})}),e.jsx(v.Panel,{children:e.jsxs(I,{gap:"lg",children:[e.jsx("div",{children:e.jsx(F,{format:"hexa",label:i._({id:"1uJlG9"}),description:i._({id:"rnoQsz"}),size:"sm",...o.getInputProps("accent_color")})}),e.jsxs("div",{children:[e.jsxs(k,{justify:"space-between",mb:"xs",children:[e.jsx(f,{fw:500,size:"sm",children:i._({id:"iG7KNr"})}),e.jsx(D,{label:i._({id:"IfN2Qo"}),children:e.jsx(A,{size:16,style:{color:"var(--mantine-color-gray-6)"}})})]}),e.jsx(K,{imageType:"TICKET_LOGO",entityId:r,onUploadSuccess:u,onDeleteSuccess:u,existingImageData:{url:t==null?void 0:t.url,id:t==null?void 0:t.id},helpText:i._({id:"Jzu30R"}),displayMode:"compact"})]}),e.jsxs("div",{children:[e.jsx(W,{label:i._({id:"nFm+5u"}),description:i._({id:"HXMJxH"}),placeholder:i._({id:"nm3Iz/"}),rows:2,maxLength:500,...o.getInputProps("footer_text"),onKeyDown:s=>{s.key==="Enter"&&s.preventDefault()},onChange:s=>{const c=s.currentTarget.value.replace(/\n/g," ");o.setFieldValue("footer_text",c)}}),e.jsxs(f,{size:"xs",c:"dimmed",ta:"right",mt:4,children:[((d=o.values.footer_text)==null?void 0:d.length)||0," / 500"]})]})]})})]})}),e.jsx(I,{gap:"sm",mt:"xl",children:e.jsx(w,{type:"submit",fullWidth:!0,disabled:!o.isDirty(),children:i._({id:"C8ne4X"})})})]})})]})}),e.jsxs("div",{className:n.preview,children:[e.jsxs("div",{className:n.previewHeader,children:[e.jsx("h3",{children:i._({id:"rdUucN"})}),e.jsx(w,{size:"xs",variant:"light",leftSection:e.jsx(U,{size:14}),onClick:()=>window==null?void 0:window.open(`/manage/event/${r}/ticket-designer/print`,"_blank"),children:i._({id:"ReihZ7"})})]}),e.jsx("div",{className:n.previewContent,children:e.jsx(se,{settings:o.values,eventId:r,logoUrl:t==null?void 0:t.url})})]})]})};export{at as default};

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.