PageSourceSearch

https://bmwtechworks.ro/chunk-C6ZGC3KV.js

js bmwtechworks.ro collected 2026-10-04 22:24:05 UTC 28,303 bytes, 2 lines download raw bytes

1import{a as ft}from"./chunk-4FCBIHS2.js";import{a as mt}from"./chunk-V6ITFS6U.js";import{a as gt}from"./chunk-6X5SWM2O.js";import"./chunk-U6YX47XM.js";import{b as ht,c as ct,d as pt,k as ut}from"./chunk-XL3I5AK3.js";import{A as y,Ab as lt,B as x,Ca as u,Da as m,G as it,H as M,N as nt,P as d,Pa as R,Q as V,U as O,W as _,aa as l,ba as p,ca as B,f as J,ga as L,ha as S,ia as v,jb as U,kb as H,na as st,oa as at,p as K,pa as ot,q as Z,ra as w,s as tt,sa as N,ta as P,u as T,v as et,va as E,wa as b,wb as rt,xa as k,yb as dt,za as F}from"./chunk-YT745NP4.js";var j=class{};var vt=(()=>{let t=class t{constructor(){this.placeholder="SelectDate",this.disabled=!1,this.valueChange=new M}formatDateForInput(e){if(!e)return"";let i=g=>g.toString().padStart(2,"0"),s=e.getFullYear(),o=i(e.getMonth()+1),h=i(e.getDate()),c=i(e.getHours()),r=i(e.getMinutes());return`${s}-${o}-${h}T${c}:${r}`}changeHour(e){let i=e.target.value,s=new Date(i);s!=this.value&&(this.value=s,this.valueChange.emit(s))}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=T({type:t,selectors:[["app-datepicker"]],inputs:{value:"value",placeholder:"placeholder",disabled:"disabled"},outputs:{valueChange:"valueChange"},standalone:!0,features:[F],decls:3,vars:5,consts:[[1,"form-group"],["type","datetime-local",1,"form-control",3,"change","value","disabled","placeholder"]],template:function(i,s){i&1&&(l(0,"div",0)(1,"input",1),u(2,"translate"),S("change",function(h){return s.changeHour(h)}),p()()),i&2&&(d(),_("value",s.formatDateForInput(s.value))("disabled",s.disabled)("placeholder",m(2,3,s.placeholder)))},dependencies:[H,U],encapsulation:2});let a=t;return a})();var A=class{constructor(t,n,e,i){if(isNaN(t)||isNaN(n))throw new Error(`Point is invalid: (${t}, ${n})`);this.x=+t,this.y=+n,this.pressure=e||0,this.time=i||Date.now()}distanceTo(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}},Y=class a{static fromPoints(t,n){let e=this.calculateControlPoints(t[0],t[1],t[2]).c2,i=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new a(t[1],e,i,t[2],n.start,n.end)}static calculateControlPoints(t,n,e){let i=t.x-n.x,s=t.y-n.y,o=n.x-e.x,h=n.y-e.y,c={x:(t.x+n.x)/2,y:(t.y+n.y)/2},r={x:(n.x+e.x)/2,y:(n.y+e.y)/2},g=Math.sqrt(i*i+s*s),f=Math.sqrt(o*o+h*h),W=c.x-r.x,D=c.y-r.y,C=g+f==0?0:f/(g+f),I={x:r.x+W*C,y:r.y+D*C},X=n.x-I.x,$=n.y-I.y;return{c1:new A(c.x+X,c.y+$),c2:new A(r.x+X,r.y+$)}}constructor(t,n,e,i,s,o){this.startPoint=t,this.control2=n,this.control1=e,this.endPoint=i,this.startWidth=s,this.endWidth=o}length(){let n=0,e,i;for(let s=0;s<=10;s+=1){let o=s/10,h=this.point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),c=this.point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(s>0){let r=h-e,g=c-i;n+=Math.sqrt(r*r+g*g)}e=h,i=c}return n}point(t,n,e,i,s){return n*(1-t)*(1-t)*(1-t)+3*e*(1-t)*(1-t)*t+3*i*(1-t)*t*t+s*t*t*t}},Q=class{constructor(){try{this._et=new EventTarget}catch{this._et=document}}addEventListener(t,n,e){this._et.addEventListener(t,n,e)}dispatchEvent(t){return this._et.dispatchEvent(t)}removeEventListener(t,n,e){this._et.removeEventListener(t,n,e)}};function Ct(a,t=250){let n=0,e=null,i,s,o,h=()=>{n=Date.now(),e=null,i=a.apply(s,o),e||(s=null,o=[])};return function(...r){let g=Date.now(),f=t-(g-n);return s=this,o=r,f<=0||f>t?(e&&(clearTimeout(e),e=null),n=g,i=a.apply(s,o),e||(s=null,o=[])):e||(e=window.setTimeout(h,f)),i}}var G=class a extends Q{constructor(t,n={}){var e,i,s;super(),this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.throttle=(e=n.throttle)!==null&&e!==void 0?e:16,this.minDistance=(i=n.minDistance)!==null&&i!==void 0?i:5,this.dotSize=n.dotSize||0,this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=n.compositeOperation||"source-over",this.canvasContextOptions=(s=n.canvasContextOptions)!==null&&s!==void 0?s:{},this._strokeMoveUpdate=this.throttle?Ct(a.prototype._strokeUpdate,this.throttle):a.prototype._strokeUpdate,this._handleMouseDown=this._handleMouseDown.bind(this),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handlePointerDown=this._handlePointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){let{_ctx:t,canvas:n}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,n.width,n.height),t.fillRect(0,0,n.width,n.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0,this._strokePointerId=void 0}fromDataURL(t,n={}){return new Promise((e,i)=>{let s=new Image,o=n.ratio||window.devicePixelRatio||1,h=n.width||this.canvas.width/o,c=n.height||this.canvas.height/o,r=n.xOffset||0,g=n.yOffset||0;this._reset(this._getPointGroupOptions()),s.onload=()=>{this._ctx.drawImage(s,r,g,h,c),e()},s.onerror=f=>{i(f)},s.crossOrigin="anonymous",s.src=t,this._isEmpty=!1})}toDataURL(t="image/png",n){switch(t){case"image/svg+xml":return typeof n!="object"&&(n=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(n))}`;default:return typeof n!="number"&&(n=void 0),this.canvas.toDataURL(t,n)}}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";let t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var t;let n=window.document===this.canvas.ownerDocument?window:(t=this.canvas.ownerDocument.defaultView)!==null&&t!==void 0?t:this.canvas.ownerDocument;return{addEventListener:n.addEventListener.bind(n),removeEventListener:n.removeEventListener.bind(n)}}_removeMoveUpEventListeners(){let{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("mou
1semove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(t,{clear:n=!0}={}){n&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,n){return n?t.buttons===1:(t.buttons&1)===1}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){let n=t.changedTouches[0];return{event:t,type:t.type,x:n.clientX,y:n.clientY,pressure:n.force}}_handleMouseDown(t){!this._isLeftButtonPressed(t,!0)||this._drawingStroke||this._strokeBegin(this._pointerEventToSignatureEvent(t))}_handleMouseMove(t){if(!this._isLeftButtonPressed(t,!0)||!this._drawingStroke){this._strokeEnd(this._pointerEventToSignatureEvent(t),!1);return}this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))}_handleMouseUp(t){this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))}_handleTouchStart(t){t.targetTouches.length!==1||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))}_handleTouchMove(t){if(t.targetTouches.length===1){if(t.cancelable&&t.preventDefault(),!this._drawingStroke){this._strokeEnd(this._touchEventToSignatureEvent(t),!1);return}this._strokeMoveUpdate(this._touchEventToSignatureEvent(t))}}_handleTouchEnd(t){t.targetTouches.length===0&&(t.cancelable&&t.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(t)))}_getPointerId(t){return t.persistentDeviceId||t.pointerId}_allowPointerId(t,n=!1){return typeof this._strokePointerId>"u"?n:this._getPointerId(t)===this._strokePointerId}_handlePointerDown(t){this._drawingStroke||!this._isLeftButtonPressed(t)||!this._allowPointerId(t,!0)||(this._strokePointerId=this._getPointerId(t),t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))}_handlePointerMove(t){if(this._allowPointerId(t)){if(!this._isLeftButtonPressed(t,!0)||!this._drawingStroke){this._strokeEnd(this._pointerEventToSignatureEvent(t),!1);return}t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))}}_handlePointerUp(t){this._isLeftButtonPressed(t)||!this._allowPointerId(t)||(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:t,cancelable:!0})))return;let{addEventListener:e}=this._getListenerFunctions();switch(t.event.type){case"mousedown":e("mousemove",this._handleMouseMove,{passive:!1}),e("mouseup",this._handleMouseUp,{passive:!1});break;case"touchstart":e("touchmove",this._handleTouchMove,{passive:!1}),e("touchend",this._handleTouchEnd,{passive:!1});break;case"pointerdown":e("pointermove",this._handlePointerMove,{passive:!1}),e("pointerup",this._handlePointerUp,{passive:!1});break}this._drawingStroke=!0;let i=this._getPointGroupOptions(),s=Object.assign(Object.assign({},i),{points:[]});this._data.push(s),this._reset(i),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(this._data.length===0){this._strokeBegin(t);return}this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:t}));let n=this._createPoint(t.x,t.y,t.pressure),e=this._data[this._data.length-1],i=e.points,s=i.length>0&&i[i.length-1],o=s?n.distanceTo(s)<=this.minDistance:!1,h=this._getPointGroupOptions(e);if(!s||!(s&&o)){let c=this._addPoint(n,h);s?c&&this._drawCurve(c,h):this._drawDot(n,h),i.push({time:n.time,x:n.x,y:n.y,pressure:n.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:t}))}_strokeEnd(t,n=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(n&&this._strokeUpdate(t),this._drawingStroke=!1,this._strokePointerId=void 0,this.dispatchEvent(new CustomEvent("endStroke",{detail:t})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown,{passive:!1})}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown,{passive:!1})}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart,{passive:!1})}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(t,n,e){let i=this.canvas.getBoundingClientRect();return new A(t-i.left,n-i.top,e,new Date().getTime())}_addPoint(t,n){let{_lastPoints:e}=this;if(e.push(t),e.length>2){e.length===3&&e.unshift(e[0]);let i=this._calculateCurveWidths(e[1],e[2],n),s=Y.fromPoints(e,i);return e.shift(),s}return null}_calculateCurveWidths(t,n,e){let i=e.velocityFilterWeight*n.velocityFrom(t)+(1-e.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(i,e),o={end:s,start:this._lastWidth};return this._lastVelocity=i,this._lastWidth=s,o}_strokeWidth(t,n){return Math.max(n.maxWidth/(t+1),n.minWidth)}_drawCurveSegment(t,n,e){let i=this._ctx;i.moveTo(t,n),i.arc(t,n,e,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(t,n){let e=this._ctx,i=t.endWidth-t.startWidth,s=Math.ceil(t.length())*2;e.beginPath(),e.fillStyle=n.penColor;for(let o=0;o<s;o+=1){let h=o/s,c=h*h,r=c*h,g=1-h,f=g*g,W=f*g,D=W*t.startPoint.x;D+=3*f*h*t.control1.x,D+=3*g*c*t.control2.x,D+=r*t.endPoint.x;let C=W*t.startPoint.y;C+=3*f*h*t.control1.y,C+=3*g*c*t.control2.y,C+=r*t.endPoint.y;let I=Math.min(t.startWidth+r*i,n.maxWidth);this._drawCurveSegment(D,C,I)}e.closePath(),e.fill()}_drawDot(t,n){let e=this._ctx,i=n.dotSize>0?n.dotSize:(n.minWidth+n.maxWidth)/2;e.beginPath(),this._drawCurveSegment(t.x,t.y,i),e.closePath(),e.fillStyle=n.penColor,e.fill()}_fromData(t,n,e){for(let i of t){let{points:s}=i,o=this._getPointGroupOptions(i);if(s.length>1)for(let h=0;h<s.length;h+=1){let c=s[h],r=new A(c.x,c.y,c.pressure,c.time);h===0&&this._reset(o);let g=this._addPoint(r,o);g&&n(g,o)}else this._reset(o),e(s[0],o)}}
1toSVG({includeBackgroundColor:t=!1}={}){let n=this._data,e=Math.max(window.devicePixelRatio||1,1),i=0,s=0,o=this.canvas.width/e,h=this.canvas.height/e,c=document.createElementNS("http://www.w3.org/2000/svg","svg");if(c.setAttribute("xmlns","http://www.w3.org/2000/svg"),c.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),c.setAttribute("viewBox",`${i} ${s} ${o} ${h}`),c.setAttribute("width",o.toString()),c.setAttribute("height",h.toString()),t&&this.backgroundColor){let r=document.createElement("rect");r.setAttribute("width","100%"),r.setAttribute("height","100%"),r.setAttribute("fill",this.backgroundColor),c.appendChild(r)}return this._fromData(n,(r,{penColor:g})=>{let f=document.createElement("path");if(!isNaN(r.control1.x)&&!isNaN(r.control1.y)&&!isNaN(r.control2.x)&&!isNaN(r.control2.y)){let W=`M ${r.startPoint.x.toFixed(3)},${r.startPoint.y.toFixed(3)} C ${r.control1.x.toFixed(3)},${r.control1.y.toFixed(3)} ${r.control2.x.toFixed(3)},${r.control2.y.toFixed(3)} ${r.endPoint.x.toFixed(3)},${r.endPoint.y.toFixed(3)}`;f.setAttribute("d",W),f.setAttribute("stroke-width",(r.endWidth*2.25).toFixed(3)),f.setAttribute("stroke",g),f.setAttribute("fill","none"),f.setAttribute("stroke-linecap","round"),c.appendChild(f)}},(r,{penColor:g,dotSize:f,minWidth:W,maxWidth:D})=>{let C=document.createElement("circle"),I=f>0?f:(W+D)/2;C.setAttribute("r",I.toString()),C.setAttribute("cx",r.x.toString()),C.setAttribute("cy",r.y.toString()),C.setAttribute("fill",g),c.appendChild(C)}),c.outerHTML}};var wt=(()=>{let t=class t{constructor(e){this._elementRef=e,this.options=this.options||{},this.drawStart=new M,this.drawBeforeUpdate=new M,this.drawAfterUpdate=new M,this.drawEnd=new M}ngAfterContentInit(){let e=this.initCanvas(this.options);this.initSignaturePad(e,this.options),this.redrawCanvas()}ngOnDestroy(){let e=this.getCanvas();e.width=0,e.height=0}getSignaturePad(){return this.signaturePad}getCanvas(){return this._elementRef.nativeElement.querySelector("canvas")}redrawCanvas(){let e=this.getCanvas(),i=Math.max(window.devicePixelRatio||1,1);e.width=this._getWidthFix(e)*i,e.height=this._getHeightFix(e)*i,e.getContext("2d").scale(i,i),this.changeBackgroundColor(this.signaturePad.backgroundColor)}changeBackgroundColor(e){this.signaturePad.backgroundColor=e;let i=this.signaturePad.toData();this.signaturePad.clear(),this.signaturePad.fromData(i)}toData(){return this.signaturePad?this.signaturePad.toData():[]}fromData(e){this.signaturePad.fromData(e)}toDataURL(e,i){return this.signaturePad.toDataURL(e,i)}fromDataURL(e,i={}){return!i.hasOwnProperty("height")&&this.options.canvasHeight&&(i.height=this.options.canvasHeight),!i.hasOwnProperty("width")&&this.options.canvasWidth&&(i.width=this.options.canvasWidth),this.signaturePad.fromDataURL(e,i)}clear(e=!0){e?(this.signaturePad.clear(),this.redrawCanvas()):this.signaturePad.clear(),this.endStroke(null)}isEmpty(){return this.signaturePad.isEmpty()}off(){this.signaturePad.off()}on(){this.signaturePad.on()}set(e,i){if(e==="canvasHeight"||e==="canvasWidth"){let s=this.getCanvas(),o=e.replace("canvas","").toLowerCase();if(s[o]===i)return;s[o]=i-this.extraWidth,this.clear()}else{if(this.signaturePad[e]===i)return;this.signaturePad[e]=i}}beginStroke(e){this.drawStart.emit(e)}beforeUpdateStroke(e){this.drawBeforeUpdate.emit(e)}afterUpdateStroke(e){this.drawAfterUpdate.emit(e)}endStroke(e){this.drawEnd.emit(e)}initCanvas(e){let i=this.getCanvas();return this.options.canvasHeight&&(i.height=e.canvasHeight-2),this.options.canvasWidth&&(i.width=e.canvasWidth-2),this.options.canvasBackground&&(i.style.background=e.canvasBackground),i}initSignaturePad(e,i){this.signaturePad=new G(e,i),this.signaturePad.addEventListener("beginStroke",s=>this.beginStroke(s.detail)),this.signaturePad.addEventListener("beforeUpdateStroke",s=>this.beforeUpdateStroke(s.detail)),this.signaturePad.addEventListener("afterUpdateStroke",s=>this.afterUpdateStroke(s.detail)),this.signaturePad.addEventListener("endStroke",s=>this.endStroke(s.detail))}_getWidthFix(e){let i=getComputedStyle(e),s=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth);return this.extraWidth=s+o,e.offsetWidth-(s+o)}_getHeightFix(e){let i=getComputedStyle(e),s=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),o=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);return e.offsetHeight-(s+o)}};t.\u0275fac=function(i){return new(i||t)(V(it))},t.\u0275cmp=T({type:t,selectors:[["signature-pad"]],inputs:{options:"options"},outputs:{drawStart:"drawStart",drawBeforeUpdate:"drawBeforeUpdate",drawAfterUpdate:"drawAfterUpdate",drawEnd:"drawEnd"},decls:1,vars:0,consts:[[1,"signature-pad-canvas"]],template:function(i,s){i&1&&B(0,"canvas",0)},styles:["[_nghost-%COMP%]{background:#faebd7;display:flex;align-items:center;justify-content:center}[_nghost-%COMP%]   .signature-pad-canvas[_ngcontent-%COMP%]{border:1px solid gray}"]});let a=t;return a})(),yt=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=et({type:t}),t.\u0275inj=Z({});let a=t;return a})();var Et=["signature"];function bt(a,t){if(a&1){let n=L();l(0,"signature-pad",4,0),S("drawEnd",function(i){y(n);let s=v();return x(s.drawComplete(i))}),p()}if(a&2){let n=v();_("options",n.signaturePadOptions)}}function kt(a,t){if(a&1){let n=L();l(0,"div",5)(1,"button",6),S("click",function(){y(n);let i=v();return x(i.clearSignature())}),B(2,"i",7),w(3),u(4,"translate"),p()()}a&2&&(d(3),P(" ",m(4,1,"sigPad.retrySignature")," "))}var xt=(()=>{let t=class t{constructor(e){this.serverDetectService=e,this.wrapId=mt.newId(),this.signatureChange=new M,this.signaturePadOptions={canvasWidth:500,canvasHeight:300,backgroundColor:"white",canvasBackgroun
1d:"white"}}ngOnInit(){this.serverDetectService.isServer()}onResize(e){this.setSigPadWidth()}setSigPadWidth(){let e=document.getElementById(this.wrapId);this.initialized=!0;let i=e.clientWidth,s=i/2;setTimeout(()=>{console.log(i,s),this.signaturePad.getCanvas().width=i,this.signaturePad.getCanvas().height=s,this.signaturePadOptions.canvasWidth=i,this.signaturePadOptions.canvasHeight=s})}ngAfterViewInit(){setTimeout(()=>{this.setSigPadWidth()})}drawComplete(e){let i=this.signaturePad.toDataURL();i!=this.signature&&(this.signature=i,this.signatureChange.emit(i))}clearSignature(){this.signaturePad.clear(),this.signature=null,this.signatureChange.emit(null)}};t.\u0275fac=function(i){return new(i||t)(V(gt))},t.\u0275cmp=T({type:t,selectors:[["app-sig-pad"]],viewQuery:function(i,s){if(i&1&&st(Et,5),i&2){let o;at(o=ot())&&(s.signaturePad=o.first)}},hostBindings:function(i,s){i&1&&S("resize",function(h){return s.onResize(h)},!1,nt)},inputs:{signature:"signature"},outputs:{signatureChange:"signatureChange"},standalone:!0,features:[F],decls:6,vars:6,consts:[["signature",""],[1,"mt-2",3,"id"],["style","background: white;justify-content: flex-start",3,"options","drawEnd",4,"ngIf"],["class","d-flex mt-2","style","gap:10px",4,"ngIf"],[2,"background","white","justify-content","flex-start",3,"drawEnd","options"],[1,"d-flex","mt-2",2,"gap","10px"],[1,"btn","btn-secondary",3,"click"],[1,"fas","fa-times-circle"]],template:function(i,s){i&1&&(l(0,"div",1)(1,"label"),w(2),u(3,"translate"),p(),O(4,bt,2,1,"signature-pad",2)(5,kt,5,3,"div",3),p()),i&2&&(_("id",s.wrapId),d(2),P("",m(3,4,"sigPad.signature"),":"),d(2),_("ngIf",s.initialized),d(),_("ngIf",s.signature))},dependencies:[yt,wt,H,U,R],encapsulation:2});let a=t;return a})();var Pt=(()=>{let t=class t{constructor(e){this.http=e,this.base=rt.url+"/api/visitor/"}submit(e){return this.http.post(this.base+"submit",e)}};t.\u0275fac=function(i){return new(i||t)(tt(dt))},t.\u0275prov=K({token:t,factory:t.\u0275fac,providedIn:"root"});let a=t;return a})();function Wt(a,t){if(a&1){let n=L();l(0,"div",7)(1,"label"),w(2),u(3,"translate"),p(),l(4,"app-datepicker",18),k("valueChange",function(i){y(n);let s=v(2);return b(s.model.exitHour,i)||(s.model.exitHour=i),x(i)}),p()()}if(a&2){let n=v(2);d(2),P("",m(3,4,"visitors.exitHour"),":"),d(2),E("value",n.model.exitHour),_("disabled",n.saving)("placeholder","visitors.exitHour")}}function Dt(a,t){if(a&1){let n=L();l(0,"div",4)(1,"h2"),w(2),u(3,"translate"),p(),l(4,"div",5)(5,"div",6)(6,"div",7)(7,"label"),w(8),u(9,"translate"),p(),l(10,"div",8)(11,"input",9),u(12,"translate"),k("ngModelChange",function(i){y(n);let s=v();return b(s.model.lastName,i)||(s.model.lastName=i),x(i)}),p()()(),l(13,"div",7)(14,"label"),w(15),u(16,"translate"),p(),l(17,"div",8)(18,"input",10),u(19,"translate"),k("ngModelChange",function(i){y(n);let s=v();return b(s.model.firstName,i)||(s.model.firstName=i),x(i)}),p()()()(),l(20,"label"),w(21),u(22,"translate"),p(),l(23,"div",8)(24,"input",11),u(25,"translate"),k("ngModelChange",function(i){y(n);let s=v();
1return b(s.model.company,i)||(s.model.company=i),x(i)}),p()(),l(26,"label"),w(27),u(28,"translate"),p(),l(29,"div",8)(30,"input",12),u(31,"translate"),k("ngModelChange",function(i){y(n);let s=v();return b(s.model.reasonForVisiting,i)||(s.model.reasonForVisiting=i),x(i)}),p()(),l(32,"label"),w(33),u(34,"translate"),p(),l(35,"div",8)(36,"input",13),u(37,"translate"),k("ngModelChange",function(i){y(n);let s=v();return b(s.model.contactPerson,i)||(s.model.contactPerson=i),x(i)}),p()(),l(38,"label"),w(39),u(40,"translate"),p(),l(41,"div",8)(42,"input",14),u(43,"translate"),k("ngModelChange",function(i){y(n);let s=v();return b(s.model.idDetails,i)||(s.model.idDetails=i),x(i)}),p()(),l(44,"label"),w(45),u(46,"translate"),p(),l(47,"div",8)(48,"input",15),u(49,"translate"),k("ngModelChange",function(i){y(n);let s=v();return b(s.model.cardAccess,i)||(s.model.cardAccess=i),x(i)}),p()(),l(50,"app-form-check",16),S("valueChange",function(i){y(n);let s=v();return x(s.changeStayUntilDayEnd(i))}),p(),l(51,"div",17)(52,"div",7)(53,"label"),w(54),u(55,"translate"),p(),l(56,"app-datepicker",18),S("valueChange",function(i){y(n);let s=v();return x(s.changeEntryHour(i))}),p()(),O(57,Wt,5,6,"div",19),p(),l(58,"div",7)(59,"app-sig-pad",20),k("signatureChange",function(i){y(n);let s=v();return b(s.model.signature,i)||(s.model.signature=i),x(i)}),p()(),l(60,"label",21),w(61),u(62,"translate"),l(63,"a",22),w(64," Privacy notice for visitor form "),p()(),l(65,"button",23),S("click",function(){y(n);let i=v();return x(i.submit())}),l(66,"span"),w(67),u(68,"translate"),p()()()()}if(a&2){let n=v();d(2),N(m(3,41,"visitors.content-title")),d(6),P("",m(9,43,"visitors.lastName"),":"),d(3),E("ngModel",n.model.lastName),_("disabled",n.saving)("placeholder",m(12,45,"visitors.lastName")),d(4),P("",m(16,47,"visitors.firstName"),":"),d(3),E("ngModel",n.model.firstName),_("disabled",n.saving)("placeholder",m(19,49,"visitors.firstName")),d(3),P("",m(22,51,"visitors.company"),":"),d(3),E("ngModel",n.model.company),_("disabled",n.saving)("placeholder",m(25,53,"visitors.company")),d(3),P("",m(28,55,"visitors.reasonForVisiting"),":"),d(3),E("ngModel",n.model.reasonForVisiting),_("disabled",n.saving)("placeholder",m(31,57,"visitors.reasonForVisiting")),d(3),P("",m(34,59,"visitors.contactPerson"),":"),d(3),E("ngModel",n.model.contactPerson),_("disabled",n.saving)("placeholder",m(37,61,"visitors.contactPerson")),d(3),P("",m(40,63,"visitors.idDetails"),":"),d(3),E("ngModel",n.model.idDetails),_("disabled",n.saving)("placeholder",m(43,65,"visitors.idDetails")),d(3),P("",m(46,67,"visitors.cardAccess"),":"),d(3),E("ngModel",n.model.cardAccess),_("disabled",n.saving)("placeholder",m(49,69,"visitors.cardAccess")),d(2),_("value",n.model.stayUntilDayEnd)("label","visitors.stayUntilDayEnd")("falseLabel","visitors.stayUntilTime"),d(4),P("",m(55,71,"visitors.entryHour"),":"),d(2),_("value",n.model.entryHour)("disabled",n.saving)("placeholder","visitors.entryHour"),d(),_("ngIf",!n.model.stayUntilDayEnd),d(2),E("signature",n.model.signature),d(2),P(" ",m(62,73,"trailblazer_consent")," "),d(4),_("disabled",n.saving||!n.isValid()),d(2),N(m(68,75,"visitors.submitForm"))}}function Tt(a,t){a&1&&(l(0,"div",4)(1,"div",24),w(2),u(3,"translate"),p()()),a&2&&(d(2),P(" ",m(3,1,"visitors.checkedIn")," "))}var q=(()=>{let t=class t{constructor(e){this.visitorService=e,this.model=new j}ngOnInit(){this.model.entryHour=new Date,this.model.stayUntilDayEnd=!0}checkAndSetExitHour(){let e=this.model.exitHour;this.model.exitHour||(e=new Date,e.setHours(18,0,0)),e<this.model.entryHour&&(e=this.model.entryHour),this.model.exitHour=e}changeStayUntilDayEnd(e){this.model.stayUntilDayEnd=e,this.checkAndSetExitHour()}changeEntryHour(e){this.model.entryHour=e,this.checkAndSetExitHour()}isValid(){return!(!this.model.entryHour||!this.model.firstName||!this.model.lastName||!this.model.reasonForVisiting||!this.model.contactPerson||!this.model.idDetails||!this.model.cardAccess||!this.model.signature)}submit(){return J(this,null,function*(){this.isValid()&&(yield this.visitorService.submit(this.model),this.checkedIn=!0,window.scrollTo(0,0))})}};t.\u0275fac=function(i){return new(i||t)(V(Pt))},t.\u0275cmp=T({type:t,selectors:[["app-visitors"]],standalone:!0,features:[F],decls:9,vars:5,consts:[[1,"hero-bg","hero-bg-contact"],[1,"d-flex","flex-column","justify-content-center","hero-header"],[1,"app-container"],["class","app-container pt-4",4,"ngIf"],[1,"app-container","pt-4"],[1,"col-lg-8"],[1,"row","mt-5"],[1,"col-md-6"],[1,"form-group"],["autocomplete","LastName",1,"form-control",3,"ngModelChange","ngModel","disabled","placeholder"],["autocomplete","FirstName",1,"form-control",3,"ngModelChange","ngModel","disabled","placeholder"],["autocomplete","Company",1,"form-control",3,"ngModelChange","ngModel","disabled","placeholder"],["autocomplete","visitors.reasonForVisiting",1,"form-control",3,"ngModelChange","ngModel","disabled","placeholder"],[1,"form-control",3,"ngModelChange","ngModel","disabled","placeholder"],["autocomplete","IdDetails",1,"form-control",3,"ngModelChange","ngModel","disabled","placeholder"],["autocomplete","CardAccess",1,"form-control",3,"ngModelChange","ngModel","disabled","placeholder"],[3,"valueChange","value","label","falseLabel"],[1,"row"],[3,"valueChange","value","disabled","placeholder"],["class","col-md-6",4,"ngIf"],[3,"signatureChange","signature"],[1,"form-check-label"],["href","visitors/Final - Notice on processing of PII - Visitors.pdf","target","_blank"],["type","submit",1,"call-to-action-link-btn","news-button","me-2","mt-2",3,"click","disabled"],[1,"alert","alert-success"]],template:function(i,s){i&1&&(l(0,"div",0),B(1,"app-navbar"),l(2,"div",1)(3,"div",2)(4,"h1"),w(5),u(6,"translate"),p()()()(),O(7,Dt,69,77,"div",3)(8,Tt,4,3,"div",3)),i&2&&(d(5),N(m(6,3,"visitors.description")),d(2),_("ngIf",!s.checkedIn),d(),_("ngIf",s.checkedIn))},dependencies:[H,U,lt,ut,ht,ct,pt,vt,R,xt,ft],encapsulation:2});let a=t;return a})();var ve=[{path:"visitors",redirectTo:"en/visitors",pathMatch:"full"},{path:"en/visitors",component:q},{path:"de/visitors",component:q},{path:"ro/visitors",component:q}];export{ve as routes};
2//# sourceMappingURL=chunk-C6ZGC3KV.js.map

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.