1import{d as p}from"./BSk9Edm7.js";const _=1319,R={cutoffLeft:30284,cutoffRight:30286},d={minLength:45,maxLength:240,minWidth:45,maxWidth:160},s=1;function S(t){return t==="camper"}function W(t){const e=t.selections??[];return e.length===0?!0:e.every(n=>!n.items?.length)}function g(t){if(!t)return null;const e=p(t,"masterAdditionalData");if(!e||typeof e!="string")return null;try{return JSON.parse(e)}catch{return null}}function q(t){return g(t)?.customSizeConstraints??d}function f(t,e,n){return t==null||!Number.isFinite(t)?!1:t>=e&&t<=n}function C(t){if(t==null||!Number.isFinite(t))return null;const e=s,n=t-s;return n<e?null:{min:e,max:n}}function b(t,e,n){if(t==null||!Number.isFinite(t)||e==null||!Number.isFinite(e)||n==null||!Number.isFinite(n))return null;const r=t-n,u=s,i=e-s;if(r<u||i<u)return null;const a=Math.ceil(Math.sqrt(r*r+u*u)),o=Math.floor(Math.sqrt(r*r+i*i));return o<a?null:{min:a,max:o}}function D(t,e,n){const r=t-e;if(r<=0||n<=0)return null;const u=n*n-r*r;return u<=0||!Number.isFinite(u)?null:Math.sqrt(u)}function L(t){const{shape:e,a:n,b:r,c:u,d:i,constraints:a}=t,o=f(n,a.minWidth,a.maxWidth),h=f(r,a.minLength,a.maxLength);if(!o||!h)return!1;if(e==="rectangular")return!0;const c=C(n);if(!c||!f(u,c.min,c.max))return!1;const l=b(n,r,u);return l!=null&&f(i,l.min,l.max)}function E(t){const e={squareMeterValueWidth:t.width,squareMeterValueLength:t.length};return t.shape!=="rectangular"&&t.bottomWidth!=null&&t.diagonal!=null&&(e.cutoffBottomWidth=t.bottomWidth,e.cutoffDiagonal=t.diagonal,e.cutoffShape=t.shape),e}function m(t){if(!t||typeof t!="object")return null;const e=t,n=Number(e.squareMeterValueWidth),r=Number(e.squareMeterValueLength);if(!Number.isFinite(n)||!Number.isFinite(r))return null;const u={squareMeterValueWidth:n,squareMeterValueLength:r},i=Number(e.cutoffBottomWidth),a=Number(e.cutoffDiagonal);return Number.isFinite(i)&&(u.cutoffBottomWidth=i),Number.isFinite(a)&&(u.cutoffDiagonal=a),M(e.cutoffShape)&&(u.cutoffShape=e.cutoffShape),u}function T(t){if(!m(t))return!1;const e=t;return!(e.squareMeterValue!=null&&Number.isFinite(Number(e.squareMeterValue)))}function M(t){return t==="cutoffLeft"||t==="cutoffRight"}function N(t){return t==="cutoffLeft"?"shape_cutoff_left":"shape_cutoff_right"}function V(t){const e=m(t);if(!e)return null;const{cutoffBottomWidth:n,cutoffDiagonal:r,cutoffShape:u}=e;return n==null||r==null||!Number.isFinite(n)||!Number.isFinite(r)?null:{bottomWidth:n,diagonal:r,shape:u??null}}function x(t,e,n){return t("product.configurator.camper.summary_ab",{a:e,b:n})}function y(t,e){return e.shape?t("product.configurator.camper.summary_cutoff",{shape:t(`product.configurator.camper.${N(e.shape)}`),c:e.bottomWidth,d:e.diagonal}):t("product.configurator.camper.summary_cutoff_fallback",{c:e.bottomWidth,d:e.diagonal})}export{_ as C,y as a,V as b,L as c,S as d,E as e,x as f,q as g,R as h,W as i,C as j,b as k,f as l,D as m,T as n,m as r};
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.