var f=Object.defineProperty;var H=(e,s,i)=>s in e?f(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i;var t=(e,s,i)=>H(e,typeof s!="symbol"?s+"":s,i);import{J as M,K as L}from"./C-p8iwFB.js";var b=(e=>(e.ZASILKOVNA_CZ_CONTACT_FORM="packeta-cz-contact-form",e.PACKETA_SK_CONTACT_FORM="packeta-sk-contact-form",e.PACKETA_HU_CONTACT_FORM="packeta-hu-contact-form",e.PACKETA_RO_CONTACT_FORM="packeta-ro-contact-form",e.PACKETA_PL_CONTACT_FORM="packeta-pl-contact-form",e.PACKETA_DE_CONTACT_FORM="packeta-de-contact-form",e.PACKETA_COM_CONTACT_FORM="packeta-global-contact-form",e))(b||{}),g=(e=>(e.PRICES="prices",e.DOCUMENTS_CONTRACTS_AMENDMENTS="documents-contracts-amendments",e.REQUIREMENT_FOR_A_BUSINESS_MANAGER="requirement-for-a-business-manager",e.COLLECTION="collection",e.TECHNICAL_ISSUES_IMPLEMENTATION="technical-issues-implementation",e.SHIPPING_ABROAD="shipping-abroad",e.CHANGE_IN_BILLING_FREQUENCY="change-in-billing-frequency",e.CHANGE_OF_CASH_ON_DELIVERY_METHOD="change-of-cash-on-delivery-method",e.REVERSE_LOGISTIC="reverse-logistic",e))(g||{}),U=(e=>(e.PRICES="prices",e.DOCUMENTS_CONTRACTS_AMENDMENTS="documents-contracts-amendments",e.BILLING="billing",e.REQUIREMENT_FOR_A_BUSINESS_MANAGER="requirement-for-a-business-manager",e.LAUNCHING_A_COLLABORATION="launching-a-collaboration",e.COLLECTION="collection",e.SHIPPING_ABROAD="shipping-abroad",e.REVERSE_LOGISTIC="reverse-logistic",e))(U||{}),N=(e=>(e.ESHOP_WITHOUT_REGISTRATION="eshop-without-registration",e.QUESTION="question",e.SALES_QUESTION="sales-question",e.SHIPMENT_CHATBOT="shipment-chatbot",e.SHIPMENT_QUESTION="shipment-question",e.SHIPMENT_EXTENSION="shipment-extension",e.WHERE_IS_MY_SHIPMENT="where-is-my-shipment",e))(N||{}),G=(e=>(e.QUESTION="Question",e.SALES_QUESTION="SalesQuestion",e.SHIPMENT_CHATBOT="ShipmentChatbot",e.SHIPMENT_QUESTION="ShipmentQuestion",e.SHIPMENT_EXTENSION="ShipmentExtension",e))(G||{}),d=(e=>(e.SHOW_TIP="show-tip",e.SHIPMENT_NUMBER_OPTIONAL="shipment-number-optional",e.VAT_NUMBER_OPTIONAL="vat-number-optional",e))(d||{}),y=(e=>(e.RECEIVER="receiver",e.SENDER="sender",e.ESHOP_CUSTOMER_SERVICE="eshop-customer-service",e.ESHOP_SALES_DEPARTMENT="eshop-sales-department",e.NON_OF_THESE="non-of-these",e.WHERE_IS_MY_SHIPMENT="where-is-my-shipment",e.CHANGE_OF_CONTACT_DETAILS="change-of-contact-details",e.REDIRECTION_OF_THE_SHIPMENT="redirection-of-the-shipment",e.RETURN_THE_SHIPMENT_TO_SENDER="return-the-shipment-to-sender",e.AUTO_EXTENSION_OF_THE_SHIPMENT="auto-extension-of-the-shipment",e.COMPLAINT_NEGATIVE_EXPERIENCE="complaint-negative-experience",e.PROBLEMS_WITH_PICKING_UP_ZBOX="problems-with-picking-up-zbox",e.RECEIPT_OF_COD="receipt-of-cod",e.FRAUDULENT_CONDUCT="fraudulent-conduct",e.PROBLEM_WITH_APPLICATION="problem-with-application",e.PROBLEMS_WITH_PICKING_UP_AT_PICKUP_POINT="problems-with-picking-up-at-pickup-point",e.WHERE_IS_THE_SHIPMENT="where-is-the-shipment",e.SHIPMENT_CANCELATION="shipment-cancelation",e.PAYMENT_PROBLEMS="payment-problems",e.CHANGE_OF_RECIPIENT="change-of-recipient",e.CONTACT_DETAILS_CHANGE="contact-details-change",e.RETURN="return",e.INVOICING="invoicing",e.CHANGE_SHIPMENT="change-shipment",e.SHIPMENT_PARAMETERS="shipment-parameters",e.BILLING="billing",e.CASH_ON_DELIVERY="cash-on-delivery",e.CLIENT_SECTION="client-section",e.DOCUMENTS="documents",e.RETURN_LOGISTIC="return-logistic",e.TECHNICAL_DIFFICULTIES="technical-difficulties",e.FILE_A_COMPLAINT="file-a-complaint",e.PRICES="prices",e.SHIPPING_ABROAD="shipping-abroad",e.ESHOP_WITH_REGISTRATION="eshop-with-registration",e.ESHOP_WITHOUT_REGISTRATION="eshop-without-registration",e.COLLECTION="collection",e.REQUIREMENT_FOR_A_BUSINESS_MANAGER="requirement-for-a-business-manager",e.DOCUMENTS_CONTRACTS_AMENDMENTS="documents-contracts-amendments",e.LAUNCHING_A_COLLABORATION="launching-a-collaboration",e.REVERSE_LOGISTIC="reverse-logistic",e.CHANGE_IN_BILLING_FREQUENCY="change-in-billing-frequency",e.CHANGE_OF_CASH_ON_DELIVERY_METHOD="change-of-cash-on-delivery-method",e.TECHNICAL_ISSUES_IMPLEMENTATION="technical-issues-implementation",e.TO_BECOME_PICKUP_POINT="to-became-pickup-point",e.ESHOP_REGISTRATION="eshop-registration",e.COLLABORATION="collaboration",e.COMPLAINT="complaint",e.REPORT_SYSTEM_OUTAGE="report-system-outage",e.MARKETING="marketing",e.E_SHOP="e-shop",e.DATA_CHANGE="data-change",e.NEGATIVE_EXPERIENCE="negative-experience",e.NOT_SATISFIED_WITH_SERVICE="not-satisfied-with-service",e.POOR_QUALITY_OF_SERVICE="poor-quality-of-service",e.REPORT_DAMAGE_OF_THE_SHIPMENT="report-damage-of-the-shipment",e.LATE_DELIVERY="late-delivery",e.LOST_SHIPMENT="lost-shipment",e.DAMAGE_TO_THE_SHIPMENT="damage-to-the-shipment",e.MISSING_SHIPMENT_IN_THE_APP="missing-shipment-in-the-app",e.PICKUP_POINT="pickup-point",e.SOMETHING_ELSE="something-else",e.PRICE_OF_TRANSPORTATION="price-of-transportation",e.PROBLEMS_WITH_INVOICING="problems-with-invoicing",e.FEEDBACK_ON_APPLICATION="feedback-on-application",e.SHIPMENT_DIMENSIONS="shipment-dimensions",e.CHANGE_PICKUP_POINT_DATA="change-pickup-point-data",e.REPORT_VACATION="report-vacation",e.COMMISSION="commission",e.WHERE_CAN_I_SEND_THE_SHIPMENT="where-can-i-send-the-shipment",e.HOW_TO_RETURN_SHIPMENT="how-to-return-shipment",e.SHIPMENT_EXCHANGED="shipment-exchanged",e.INCORRECT_CONTENT="incorrect-content",e.CONTACT_TO_THE_ESHOP="contact-to-the-eshop",e.CHANGE_OF_DELIVERY_ADDRESS="change-of-delivery-address",e.RETURNING_THE_SHIPMENT_TO_THE_SENDER="returning-the-shipment-to-the-sender",e.SHIPMENT_HAS_NOT_BEEN_DELIVERED="shipment-has-not-been-delivered",e.CONTENT_DIFFERENT_THAN_ORDER="content-different-than-order",e.CONTACT_TO_THE_SENDER="contact-to-the-sender",e.LINK_COMPLAINTS="link-complaints",e.EXERCISE_OF_DATA_SUBJECTS_RIGHTS_GDPR="exercise-of-data-subjects-rights-gdpr",e.WORK_IN_THE_APPLICATION="work-in-the-application",e.WORK_IN_APPLICATION="work-in-application",e.SENDING_ABROAD="sending-abroad",e.PACKAGE_COMPLAINT="package-complaint",e.OTHER_COMPLAINT="other-complaint",e.COMPLAINT_OTHER="complaint-other",e.COMPLAINT_PACKAGE="complaint-package",e))(y||{}),v=(e=>(e.PERSON="person",e.MOBILE="mobile",e.ESHOP="eshop",e.FOR_ENTREPRENEURS="for-entrepreneurs",e.PACKAGE_SEND="package-send",e.OVERSIZE_PARCEL="oversize-parcel",e.CURSOR_CLICK="cursor-click",e.PARCEL_REDIRECT="parcel-redirect",e.NONSTOP="nonstop",e.PACKAGE_COMPLAINT="package-complaint",e.ZBOX="zbox",e.CUSTOMS="customs",e.WARNING="warning",e.PICKUP="pickup",e.SPEED_DOWN="speed-down",e.VISA="visa",e.HOME="home",e.BENEFIT_CASH="benefit-cash",e.FORM="form",e.DOCUMENT="document",e.FAST_DELIVERY="fast-delivery",e.CARD="card",e.BENEFIT_EARTH="ecology-icon-globe",e.CHECK="check",e.CLOSE_ROUNDED="close-rounded",e.BENEFIT_TRUCK="benefit-truck",e.BENEFIT_HANDSHAKE="benefit-handshake",e.OFFER="offer",e.PACKAGE_RECEIVED="package-received",e.PICKUP_POINT="pickup-point",e.BENEFIT_GROW="benefit-grow",e.EMOJI_SAD="emoji-sad",e.COMPLAINTS="complaints",e.BENEFIT_CLOCK="clock-icon-hours",e.DELIVERY_PRICE="delivery-price",e.THUMB_UP="thumb-up",e.SPEED="speed",e.PHONE_RINGING="phone-ringing",e.QUESTION="question",e.SAFETY_SHIELD="insurance-up-to-value",e))(v||{});class V{constructor(s={}){t(this,"baseUrl","");t(this,"securityData",null);t(this,"securityWorker");t(this,"abortControllers",new Map);t(this,"customFetch",(...s)=>fetch(...s));t(this,"baseApiParams",{credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"});t(this,"setSecurityData",s=>{this.securityData=s});t(this,"contentFormatters",{"application/json":s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,"text/plain":s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,"multipart/form-data":s=>Object.keys(s||{}).reduce((i,E)=>{const r=s[E];return Array.isArray(r)?r.forEach(T=>{i.append(E,T)}):r instanceof Blob||r instanceof File?i.append(E,r):typeof r=="object"&&r!==null?i.append(E,JSON.stringify(r)):r!=null&&i.append(E,`${r}`),i},new FormData),"application/x-www-form-urlencoded":s=>this.toQueryString(s)});t(this,"createAbortSignal",s=>{if(this.abortControllers.has(s)){const E=this.abortControllers.get(s);return E?E.signal:void 0}const i=new AbortController;return this.abortControllers.set(s,i),i.signal});t(this,"abortRequest",s=>{const i=this.abortControllers.get(s);i&&(i.abort(),this.abortControllers.delete(s))});t(this,"request",async({body:s,secure:i,path:E,type:r,query:T,format:I,baseUrl:u,cancelToken:l,...P})=>{const R=(typeof i=="boolean"?i:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},O=this.mergeRequestParams(P,R),S=T&&this.toQueryString(T),c=this.contentFormatters[r||"application/json"],p=I||O.format;return this.customFetch(`${u||this.baseUrl||""}${E}${S?`?${S}`:""}`,{...O,headers:{...O.headers||{},...r&&r!=="multipart/form-data"?{"Content-Type":r}:{}},signal:(l?this.createAbortSignal(l):O.signal)||null,body:typeof s>"u"||s===null?null:c(s)}).then(async a=>{const _=a.clone();_.data=null,_.error=null;const A=p?await a[p]().then(h=>(_.ok?_.data=h:_.error=h,_)).catch(h=>(_.error=h,_)):_;if(l&&this.abortControllers.delete(l),!a.ok)throw A;return A})});Object.assign(this,s)}encodeQueryParam(s,i){return`${encodeURIComponent(s)}=${encodeURIComponent(typeof i=="number"?i:`${i}`)}`}addQueryParam(s,i){return this.encodeQueryParam(i,s[i])}addArrayQueryParam(s,i){return s[i].map(r=>this.encodeQueryParam(i,r)).join("&")}toQueryString(s){const i=s||{};return Object.keys(i).filter(r=>typeof i[r]<"u").map(r=>Array.isArray(i[r])?this.addArrayQueryParam(i,r):this.addQueryParam(i,r)).join("&")}addQueryParams(s){const i=this.toQueryString(s);return i?`?${i}`:""}mergeRequestParams(s,i){return{...this.baseApiParams,...s,...i||{},headers:{...this.baseApiParams.headers||{},...s.headers||{},...i&&i.headers||{}}}}}class k extends V{constructor(){super(...arguments);t(this,"api",{codebooksV1LoadShipmentVolumesList:(i={})=>this.request({path:"/api/codebooks/v1/load-shipment-volumes",method:"GET",format:"json",...i}),configsV1AttachmentsList:(i={})=>this.request({path:"/api/configs/v1/attachments",method:"GET",format:"json",...i}),menuItemsV1Detail:(i,E={})=>this.request({path:`/api/menu-items/v1/${i}`,method:"GET",format:"json",...E}),formsQuestionV1Create:(i,E={})=>this.request({path:"/api/forms/question/v1",method:"POST",body:i,type:"multipart/form-data",...E}),formsSalesQuestionV1Create:(i,E={})=>this.request({path:"/api/forms/sales-question/v1",method:"POST",body:i,type:"multipart/form-data",...E}),formsShipmentExtensionV1Create:(i,E={})=>this.request({path:"/api/forms/shipment-extension/v1",method:"POST",body:i,type:"multipart/form-data",format:"json",...E}),formsShipmentQuestionV1Create:(i,E={})=>this.request({path:"/api/forms/shipment-question/v1",method:"POST",body:i,type:"multipart/form-data",...E}),testingDetail:(i,E={})=>this.request({path:`/api/testing/${i}`,method:"GET",format:"json",...E}),ticketsV1Detail:(i,E={})=>this.request({path:`/api/tickets/v1/${i}`,method:"GET",format:"json",...E}),ticketsV1CloseUpdate:(i,E={})=>this.request({path:"/api/tickets/v1/close",method:"PUT",body:i,type:"application/json",...E}),validationsV1ValidateEmailDetail:(i,E={})=>this.request({path:`/api/validations/v1/validate-email/${i}`,method:"GET",format:"json",...E})})}}const n=(e="")=>{const{baseUrl:s}=M(L.CONTACT_FORM_API);return new k({baseUrl:`${s}`,baseApiParams:{headers:{"x-language":e}}}).api},K=async()=>n().configsV1AttachmentsList().then(e=>e.data).catch(()=>null),D=async()=>n().codebooksV1LoadShipmentVolumesList().then(e=>e.data).catch(()=>null),m=async(e,s)=>n(s).menuItemsV1Detail(e).then(i=>i.data).catch(()=>null),q=(e,s,i)=>{const E=n(i);let r;switch(e){case N.QUESTION:r=E.formsQuestionV1Create(s);break;case N.SALES_QUESTION:r=E.formsSalesQuestionV1Create(s);break;case N.SHIPMENT_QUESTION:r=E.formsShipmentQuestionV1Create(s);break;case N.SHIPMENT_EXTENSION:r=E.formsShipmentExtensionV1Create(s);break;default:r=null}return r?r.then(T=>T.data||!0).catch(T=>({status:T.status})):null},w=async e=>n().ticketsV1Detail(e).then(s=>s.data).catch(()=>null),W=async e=>n().ticketsV1CloseUpdate(e).then(()=>!0).catch(()=>null),j=async e=>n().validationsV1ValidateEmailDetail(e).then(s=>s.data).catch(()=>({isValid:!1}));export{d as C,G as F,U as H,N as a,b,v as c,y as d,g as e,m as f,K as g,w as h,W as i,D as j,q as p,j as v}; //# sourceMappingURL=BwoOsL7s.js.map