PageSourceSearch

https://app.merlinai.co/_next/static/chunks/55286-ec87ccfb3b6a405a.js

js merlinai.co collected 2026-09-30 05:40:28 UTC 15,913 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[55286],{208754:function(t,e,n){n.d(e,{f:function(){return a},h:function(){return s}});let o=/,\s*([^,\d]+),\s*([A-Z]{2})\s+(\d{5}(-\d{4})?)(?:[,\s]+([A-Z]{2,3}))?\s*$/,i=/\s+([A-Za-z][A-Za-z .]+?),\s*([A-Z]{2})\s+(\d{5}(-\d{4})?)(?:[,\s]+([A-Z]{2,3}))?\s*$/,r=/^(.+?)\s+(\d+[A-Za-z]?\s+.+)$/,l=t=>{let e={addressLine1:"",addressLine2:"",city:"",state:"",zip:"",country:""};if(t.includes("\n")){let n=t.split("\n").map(t=>t.trim()).filter(Boolean);if(n.length>=1&&(e.addressLine1=n[0]),n.length>=3){e.addressLine2=n.slice(1,-1).join(", ");let t=n[n.length-1],o=t.match(/^([^,]+),\s*([A-Z]{2})\s+(\d{5}(-\d{4})?)(?:[,\s]+([A-Z]{2,3}))?$/);o?(e.city=o[1],e.state=o[2],e.zip=o[3],o[5]&&(e.country=o[5])):e.addressLine2=n.slice(1).join(", ")}else if(2===n.length){let t=n[1].match(/^([^,]+),\s*([A-Z]{2})\s+(\d{5}(-\d{4})?)(?:[,\s]+([A-Z]{2,3}))?$/);t?(e.city=t[1],e.state=t[2],e.zip=t[3],t[5]&&(e.country=t[5])):e.addressLine2=n[1]}return e}let n=t.match(o)||t.match(i);if(n&&void 0!==n.index){e.city=n[1].trim(),e.state=n[2],e.zip=n[3],n[5]&&(e.country=n[5]);let o=t.substring(0,n.index).trim().replace(/,\s*$/,""),i=o.match(r);i?(e.addressLine1=i[1].trim().replace(/,\s*$/,""),e.addressLine2=i[2].trim().replace(/,\s*$/,"")):e.addressLine1=o}else{let n=t.split(",").map(t=>t.trim());n.length>=2?(e.addressLine1=n[0],e.addressLine2=n.slice(1).join(", ")):e.addressLine1=t}return e},a=t=>{let e={addressLine1:"",addressLine2:"",city:"",state:"",zip:"",country:""};if(!t)return e;if("string"==typeof t)return l(t);let n=String(t.addressLine1||""),o=String(t.city||""),i=String(t.state||""),r=String(t.zip||"");return o||i||r?{addressLine1:n,addressLine2:String(t.addressLine2||""),city:o,state:i,zip:r,country:String(t.country||"")}:n?l(n):e},s=t=>{let e=a(t),n=[];e.addressLine1&&n.push(e.addressLine1),e.addressLine2&&n.push(e.addressLine2);let o=[e.city,[e.state,e.zip].filter(Boolean).join(" ")].filter(Boolean).join(", ");return o&&n.push(o),e.country&&n.push(e.country),n}},785631:function(t,e,n){n.d(e,{W:function(){return s}});var o=n(461120),i=n.n(o),r=n(891819),l=n(440560);let a={a4:{width:210,height:297},letter:{width:215.9,height:279.4}};async function s(t,e){let{format:n,marginXMm:o=0,marginYMm:s=0,scale:c=2,singlePage:d=!1,imageType:u="png",imageQuality:h=.95}=e,{width:g,height:f}=a[n],m=g-2*o,y=f-2*s,S="jpeg"===u?"image/jpeg":"image/png",x="jpeg"===u?"JPEG":"PNG",p=t=>t.toDataURL(S,"jpeg"===u?h:void 0),F=new r.default({orientation:"portrait",unit:"mm",format:n}),v=!0;for(let e of t){let t=l.fB,n=e.offsetWidth,r=await i()(e,{scale:c,useCORS:!0,backgroundColor:"#ffffff",windowWidth:n,width:n,logging:!1,onclone:(e,n)=>{e.documentElement.classList.remove("dark"),t=(0,l.Vr)(n)}}),a=r.height*m/r.width;if(d||a<=y){let e=m,i=a;if(i>y){let t=y/i;i=y,e=m*t}let c=o+(m-e)/2;v||F.addPage(),F.addImage(p(r),x,c,s,e,i,void 0,"FAST"),(0,l.l0)(F,t,{originXMm:c,originYMm:s,mmPerPx:e/n}),v=!1;continue}let u=Math.floor(y*r.width/m),h=document.createElement("canvas");h.width=r.width;let g=h.getContext("2d");if(!g)throw Error("2D context unavailable");let f=r.width>0?n/r.width:0,S=0;for(;S<r.height;){let e=Math.min(u,r.height-S);
1h.height=e,g.fillStyle="#ffffff",g.fillRect(0,0,h.width,h.height),g.drawImage(r,0,S,r.width,e,0,0,r.width,e);let i=e*m/r.width;v||F.addPage(),F.addImage(p(h),x,o,s,m,i,void 0,"FAST"),(0,l.l0)(F,t,{originXMm:o,originYMm:s,mmPerPx:m/n,visibleTopPx:S*f,visibleBottomPx:(S+e)*f}),S+=e,v=!1}}return F.output("blob")}},785852:function(t,e,n){n.d(e,{H:function(){return c}});var o=n(891819),i=n(614320),r=n(907331),l=n(151790);let a=t=>t.changedByUserName?t.changedByUserName:t.changedByUser?t.changedByUser.split("@")[0].replace(/[._]/g," "):"Unknown",s=t=>{let e=new Map;return[...t].sort((t,e)=>e.changedAt-t.changedAt).forEach(t=>{let n=new Date(t.changedAt).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});e.has(n)||e.set(n,{date:n,users:[],items:[]});let o=e.get(n);o.items.push(t);let i=a(t);o.users.includes(i)||o.users.push(i)}),Array.from(e.values())},c=(t,e,n)=>{if(!t.length)return;let a=new o.jsPDF({orientation:"portrait",unit:"mm",format:"a4"});(0,i.$)(a);let c=s(t),d=(0,l.bp)(a);e&&(d=(0,l.DK)(a,e,d)),d=(0,l.u$)(a,t,d)+2;let u=1;c.forEach(t=>{d=(0,r.xo)(a,d,20),d=(0,l.$L)(a,t,d),t.items.forEach(t=>{let e=(0,l.R_)(t)+2;d=(0,r.xo)(a,d,e),d="SWAP"===t.operationType?(0,l.i3)(a,t,d,u):(0,l.um)(a,t,d,u),u++}),d+=3}),(0,r.OP)(a,n?"REF: ".concat(n):void 0);let h=new Date().toISOString().slice(0,10);a.save("Change_Order_History_".concat(h,".pdf"))}},845139:function(t,e,n){n.d(e,{K3:function(){return r},jS:function(){return l}});let o=["New item added","New custom item added","Item removed"],i=["Note added:","Note updated:"],r=t=>{if(!t.changeNotes||o.some(e=>t.changeNotes.startsWith(e)))return"";for(let e of i)if(t.changeNotes.startsWith(e))return e.slice(0,-1);return t.changeNotes},l=t=>{var e,n;return(null===(e=t.newSelection)||void 0===e?void 0:e.notes)||(null===(n=t.oldSelection)||void 0===n?void 0:n.notes)||""}},151790:function(t,e,n){n.d(e,{$L:function(){return x},DK:function(){return y},R_:function(){return c},bp:function(){return m},i3:function(){return F},u$:function(){return S},um:function(){return p}});var o=n(907331),i=n(845139);let r=o.Oj,l={ADDITION:"ADDED",DELETION:"REMOVED",SWAP:"SWAPPED"},a=t=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(t),s=t=>((0,i.K3)(t)?1:0)+((0,i.jS)(t)?1:0),c=t=>{let e=5.2*s(t);return"SWAP"===t.operationType?22.6+e:16.4+e},d=(t,e,n,i,r)=>{t.setFont("helvetica","bold"),t.setTextColor(...o.y9.label),t.text(e,i,r);let l=t.getTextWidth(e);return t.setFont("helvetica","normal"),t.setTextColor(...o.y9.black),t.text(n,i+l+1.5,r),i+l+1.5+t.getTextWidth(n)},u=(t,e,n,i,r)=>{t.setFontSize(8),t.setFont("helvetica","normal"),t.setTextColor(...o.y9.textMuted),t.text("#".concat(r),n,i);let a=n+8,s=l[e.operationType];t.setFont("helvetica","bold"),t.setTextColor(...o.y9.black),t.text(s,a,i);let c=t.getTextWidth(s);t.setDrawColor(...o.y9.border),t.setLineWidth(.15),t.line(a+c+3,i-2.5,a+c+3,i+1),t.setFont("helvetica","normal"),t.setTextColor(...o.y9.label),t.text(e.sectionName,a+c+6,i)},h=t=>t.replace(/→/g,"to"),g=(t,e,n,i,r)=>{t.setFont("helvetica","bold"),t.setTextColor(...o.y9.textMuted),t.text(e,i,r);let l=t.getTextWidth(e);t.setFont("helvetica","normal"),t.text(h(n),i+l+1.5,r)},f=(t,e,n,o)=>{let r=(0,i.K3)(e),l=(0,i.jS)(e);return(r||l)&&(t.setFontSize(7),r&&(g(t,"Activity:",r,n,o+=1),o+=4.2),l&&(r||(o+=1),g(t,"Note:",l,n,o),o+=4.2)),o},m=t=>{let e=t.internal.pageSize.getWidth(),n=12;return t.setFontSize(16),t.setFont("helvetica","bold"),t.setTextColor(...o.y9.black),t.text("Change Order History",r,n),n+=2,t.setDrawColor(...o.y9.border),t.setLineWidth(.4),t.line(r,n,e-r,n),n+5},y=(t,e,n)=>{let i=t.internal.pageSize.getWidth(),l=(i-2*r)/2,a=[[["Serial Number",e.serialNumber||"-"],["Dealer",e.dealer||"-"]],[["Sales Person",e.salesPerson||"-"],["Model of Home",e.modelOfHome||"-"]]];return a.forEach(e=>{t.setFontSize(7.5),e.forEach((e,i)=>{let[a,s]=e,c=r+i*l;t.setFont("helvetica","bold"),t.setTextColor(...o.y9.label),t.text("".concat(a,":"),c,n);let d=t.getTextWidth("".concat(a,":"));t.setFont("helvetica","normal"),t.setTextColor(...o.y9.black),t.text(s,c+d+2,n)}),n+=5.2}),n+=1,t.setDrawColor(...o.y9.border),t.setLineWidth(.15),t.line(r,n,i-r,n),n+4},S=(t,e,n)=>{let i=t.internal.pageSize.getWidth(),l=e.filter(t=>"ADDITION"===t.operationType).length,a=e.filter(t=>"DELETION"===t.operationType).length,s=e.filter(t=>"SWAP"===t.operationType).length;t.setFillColor(...o.y9.altRowBg),t.roundedRect(r,n-3,i-2*r,10,1,1,"F"),t.setFontSize(8);let c=r+3;c=d(t,"Total Changes:",String(e.length),c,n+1)+8,c=d(t,"Added:",String(l),c,n+1)+8,c=d(t,"Removed:",String(a),c,n+1)+8,d(t,"Swapped:",String(s),c,n+1),t.setFont("helvetica","normal"),t.setFontSize(7),t.setTextColor(...o.y9.textMuted);let u=new Date().toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return t.text("Generated: ".concat(u),i-r-3,n+1,{align:"right"}),n+11},x=(t,e,n)=>{let i=t.internal.pageSize.getWidth();t.setFontSize(10),t.setFont("helvetica","bold"),t.setTextColor(...o.y9.black),t.text(e.date,r,n);let l="".concat(e.users.join(", "),"  \xb7  ").concat(e.items.length," change").concat(1!==e.items.length?"s":"");return t.setFontSize(7.5),t.setFont("helvetica","normal"),t.setTextColor(...o.y9.textMuted),t.text(l,i-r,n,{align:"right"}),n+=1.5,t.setDrawColor(...o.y9.border),t.setLineWidth(.15),t.line(r,n,i-r,n),n+4},p=(t,e,n,i)=>{let l=t.internal.pageSize.getWidth(),s=l-2*r,d=e.newSelection||e.oldSelection,h=c(e);t.setFillColor(...o.y9.altRowBg),t.roundedRect(r,n,s,h,1.2,1.2,"F");let g=n+3+1;if(u(t,e,r+3,g,i),g+=5.2,d){t.setFontSize(8),t.setFont("helvetica","normal"),t.setTextColor(...o.y9.black);let e=t.splitTextToSize(d.description,.55*s);t.text(e[0],r+3,g);let n=l-r-3,i=0!==d.total?a(d.total):"",c="Qty: ".concat(d.quantity);t.setTextColor(...o.y9.label),i?(t.setFont("helvetica","bold"),t.text(i,n,g,{align:"right"}),t.setFont("helvetica","normal"),t.text(c,n-t.getTextWidth(i)-8,g,{align:"right"})):t.text(c,n,g,{align:"right"})}return g+=4.2,g=f(t,e,r+3,g),n+h+2},F=(t,e,n,i)=>{let l=t.internal.pageSize.getWidth(),s=l-2*r,d=c(e);t.setFillColor(...o.y9.altRowBg),t.roundedRect(r,n,s,d,1.2,1.2,"F");let h=n+3+1;u(t,e,r+3,h,i),h+=6.2;let g=(s-6-6)/2,m=r+3,y=r+3+g+6;t.setFontSize(7),t.setFont("helvetica","bold"),t.setTextColor(...o.y9.textMuted),t.text("BEFORE",m,h),t.text("AFTER",y,h);let S=m+g+1,x=h-.7;if(t.setDrawColor(...o.y9.textMuted),t.setLineWidth(.3),t.line(S,x,S+4,x),t.line(S+3,x-1,S+4,x),t.line(S+3,x+1,S+4,x),h+=4.2,e.oldSelection){t.setFontSize(8),t.setFont("helvetica","normal"),t.setTextColor(...o.y9.black);let n=t.splitTextToSize(e.oldSelection.description,g-4);t.text(n[0],m,h),t.setTextColor(...o.y9.label),t.setFontSize(7.5);let i="Qty: ".concat(e.oldSelection.quantity,"    ").concat(0!==e.oldSelection.total?a(e.oldSelection.total):"");t.text(i.trim(),m,h+4.2)}if(e.newSelection){t.setFontSize(8),t.setFont("helvetica","normal"),t.setTextColor(...o.y9.black);let n=t.splitTextToSize(e.newSelection.description,g-4);t.text(n[0],y,h),t.setTextColor(...o.y9.label),t.setFontSize(7.5);let i="Qty: ".concat(e.newSelection.quantity,"    ").concat(0!==e.newSelection.total?a(e.newSelection.total):"");if(t.text(i.trim(),y,h+4.2),e.oldSelection&&e.newSelection.total!==e.oldSelection.total){let n=e.newSelection.total-e.oldSelection.total;t.setFont("helvetica","bold"),t.setFontSize(8),t.setTextColor(...o.y9.black),t.text("".concat(n>=0?"+":"").concat(a(n)),l-r-3,h,{align:"right"})}}return h+=8.4,h=f(t,e,m,h),n+d+2}},463230:function(t,e,n){n.d(e,{H:function(){return r}});var o=n(907331);let i=async t=>{try{return await Promise.race([(0,o.po)(t),new Promise((t,e)=>setTimeout(()=>e(Error("logo timeout")),o.SZ))])}catch(t){return null}},r=async(t,e,n,r,l)=>{let a=t.internal.pageSize.getWidth(),s=l+4;if(null==e?void 0:e.logoUrl){let n=await i(e.logoUrl);if(n&&n.width>0&&n.height>0)try{let e=n.width/n.height,i=14,r=14*e;r>45&&(i=(r=45)/e);let a=(0,o.Cg)(n,i);t.addImage(a,"PNG",l,s,r,i,void 0,"FAST"),s+=i+4}catch(t){}}(null==e?void 0:e.orgName)&&(t.setFontSize(11),t.setFont("helvetica","bold"),t.setTextColor(0,0,0),t.text(e.orgName,l,s),s+=5);let c=[...(null==e?void 0:e.address)?e.address.split("\n"):[],(null==e?void 0:e.phone)||"",(null==e?void 0:e.email)||""].map(t=>
1t.trim()).filter(Boolean);c.length>0&&(t.setFontSize(8.5),t.setFont("helvetica","normal"),t.setTextColor(110,110,110),c.forEach(e=>{t.text(e,l,s),s+=4}));let d=l+6;t.setFontSize(16),t.setFont("helvetica","bold"),t.setTextColor(0,0,0),t.text(n,a-l,d,{align:"right"}),d+=7,t.setFontSize(12),t.setFont("helvetica","normal"),t.text(r,a-l,d,{align:"right"}),d+=6,t.setFontSize(9),t.setTextColor(128,128,128),t.text("Generated: ".concat(new Date().toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})),a-l,d,{align:"right"}),t.setTextColor(0,0,0);let u=Math.max(s,d+2)+3;return t.setDrawColor(220,220,220),t.setLineWidth(.3),t.line(l,u,a-l,u),u+7}},862282:function(t,e,n){n.d(e,{w:function(){return r}});var o=n(206709);let i=t=>"string"==typeof t?t:void 0;function r(t,e){let{dealerTerms:n,pdfTypeToUse:r,margin:l=10,pdfFontSizePref:a,includeTerms:s=!0}=e;if(!s||"normal"!==r||!n)return;let c=function(t){let e;try{e=JSON.parse(t)}catch(t){return null}if("object"!=typeof e||null===e||Array.isArray(e))return null;let n=e;if(!Array.isArray(n.clauses))return null;let o=[];for(let t of n.clauses){if("object"!=typeof t||null===t)continue;let e=t;"string"==typeof e.heading&&"string"==typeof e.body&&o.push({heading:e.heading.trim(),body:e.body.trim()})}return 0===o.length?null:{title:i(n.title),intro:i(n.intro),sectionHeading:i(n.sectionHeading),clauses:o,closing:i(n.closing),companyName:i(n.companyName),companySignatory:i(n.companySignatory)}}(n);if(c)try{var d;let e=t.internal.pageSize.getWidth(),n=t.internal.pageSize.getHeight(),i=e-2*l,r=n-l-5,s=c.companyName||"",u=l+5,h=null!==(d=o.B9[null!=a?a:"medium"])&&void 0!==d?d:1,g=t=>t*h,f=()=>{let e=t.getNumberOfPages();t.setPage(e),t.setFontSize(g(7)),t.setFont("helvetica","normal"),t.setTextColor(140,140,140),t.text(s,l,n-5),t.setTextColor(0,0,0)},m=()=>{t.addPage(),t.setPage(t.getNumberOfPages()),u=l+5,s&&f()};m();let y=t=>{u+t>r&&m()},S=(e,n,o,r)=>{if(!e)return;t.setFontSize(n),t.setFont("helvetica",o?"bold":"normal");let a=t.splitTextToSize(e,i);a.forEach(e=>{y(r),t.text(e,l,u),u+=r})},x=(e,n,o)=>{let i=e.split(/\s+/).filter(Boolean),r=[],l="",a=n;return i.forEach(e=>{let n=l?"".concat(l," ").concat(e):e;!l||t.getTextWidth(n)<=a?l=n:(r.push(l),l=e,a=o)}),l&&r.push(l),r};t.setTextColor(0,0,0),c.title&&(S(c.title,g(14),!0,g(6)),u+=g(2)),c.intro&&(S(c.intro,g(9),!1,g(4)),u+=g(3)),c.sectionHeading&&(S(c.sectionHeading,g(10),!0,g(5)),u+=g(2));let p=g(4);c.clauses.forEach((e,n)=>{let{heading:o,body:r}=e,a="".concat(n+1,". ").concat(o).concat(o?" ":"");y(p),t.setFontSize(g(9)),t.setFont("helvetica","bold");let s=t.getTextWidth(a);if(r){var c;t.text(a,l,u),t.setFontSize(g(9)),t.setFont("helvetica","normal");let e=x(r,Math.max(i-s,.2*i),i);t.text(null!==(c=e[0])&&void 0!==c?c:"",l+s,u),u+=p;for(let n=1;n<e.length;n++)y(p),t.setFontSize(g(9)),t.setFont("helvetica","normal"),t.text(e[n],l,u),u+=p}else t.text(a,l,u),u+=p;u+=g(2)}),c.closing&&(u+=g(2),S(c.closing,g(9),!1,g(4))),y(g(32)),u+=g(6);let F=l+(i-10)/2+10,v="_______________________________";t.setFontSize(g(9)),t.setFont("helvetica","bold"),t.text(s,l,u),t.text("Client",F,u);let T=u+g(8),w=u+g(8);t.setFontSize(g(9)),t.setFont("helvetica","normal"),t.text("By: ".concat(v),l,T),t.text("By: ".concat(v),F,w),T+=g(5),w+=g(5),c.companySignatory&&(t.setFontSize(g(8)),t.text(c.companySignatory,l,T),T+=g(5)),t.setFontSize(g(9)),t.text("Title/Date: ".concat(v),l,T),t.text("Title/Date: ".concat(v),F,w),t.setTextColor(0,0,0)}catch(t){}}},755286:function(t,e,n){n.d(e,{HL:function(){return i.H},Hd:function(){return r.H},K3:function(){return l.K3},Ki:function(){return o.Ki},OP:function(){return o.OP},Oj:function(){return o.Oj},P_:function(){return h.P},SZ:function(){return o.SZ},Vz:function(){return o.Vz},Wu:function(){return s.W},XC:function(){return o.XC},aF:function(){return o.aF},f0:function(){return a.f},hS:function(){return a.h},hk:function(){return g.hk},jJ:function(){return o.jJ},jS:function(){return l.jS},jo:function(){return c.j},p6:function(){return o.p6},po:function(){return o.po},sk:function(){return d.s},wo:function(){return u.w},xG:function(){return o.xG},xo:function(){return o.xo},y9:function(){return o.y9}});var o=n(907331);n(614320);var i=n(463230),r=n(785852),l=n(845139),a=n(208754);n(983311),n(58526),n(690302),n(773021),n(440560);var s=n(785631),c=n(345559),d=n(35519),u=n(862282),h=n(615457),g=n(206709)},773021:function(t,e,n){n(499055)}}]);

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.