PageSourceSearch

https://app.airgradient.com/default-src_app_modules_onboarding_onboarding_module_ts.7026db73d6eafd15.js

js airgradient.com collected 2026-09-24 09:06:37 UTC 147,829 bytes, 1 lines download raw bytes

1(self.webpackChunkairgradient_app=self.webpackChunkairgradient_app||[]).push([["default-src_app_modules_onboarding_onboarding_module_ts"],{85876:($,p,o)=>{const s=o(70532),i=o(37554),a=o(80179),l=o(1036);function m(e,y,w,O,F){const n=[].slice.call(arguments,1),T=n.length,z="function"==typeof n[T-1];if(!z&&!s())throw new Error("Callback required as last argument");if(!z){if(T<1)throw new Error("Too few arguments provided");return 1===T?(w=y,y=O=void 0):2===T&&!y.getContext&&(O=w,w=y,y=void 0),new Promise(function(t,q){try{const G=i.create(w,O);t(e(G,y,O))}catch(G){q(G)}})}if(T<2)throw new Error("Too few arguments provided");2===T?(F=w,w=y,y=O=void 0):3===T&&(y.getContext&&void 0===F?(F=O,O=void 0):(F=O,O=w,w=y,y=void 0));try{const t=i.create(w,O);F(null,e(t,y,O))}catch(t){F(t)}}p.rT=m.bind(null,a.render),p.hz=m.bind(null,a.renderToDataURL),p.toString=m.bind(null,function(e,y,w){return l.render(e,w)})},70532:$=>{$.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},63012:($,p,o)=>{const c=o(54860).getSymbolSize;p.getRowColCoords=function(i){if(1===i)return[];const a=Math.floor(i/7)+2,l=c(i),m=145===l?26:2*Math.ceil((l-13)/(2*a-2)),e=[l-7];for(let y=1;y<a-1;y++)e[y]=e[y-1]-m;return e.push(6),e.reverse()},p.getPositions=function(i){const a=[],l=p.getRowColCoords(i),m=l.length;for(let e=0;e<m;e++)for(let y=0;y<m;y++)0===e&&0===y||0===e&&y===m-1||e===m-1&&0===y||a.push([l[e],l[y]]);return a}},30812:($,p,o)=>{const c=o(46906),s=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(a){this.mode=c.ALPHANUMERIC,this.data=a}i.getBitsLength=function(l){return 11*Math.floor(l/2)+l%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(l){let m;for(m=0;m+2<=this.data.length;m+=2){let e=45*s.indexOf(this.data[m]);e+=s.indexOf(this.data[m+1]),l.put(e,11)}this.data.length%2&&l.put(s.indexOf(this.data[m]),6)},$.exports=i},43044:$=>{function p(){this.buffer=[],this.length=0}p.prototype={get:function(o){const c=Math.floor(o/8);return 1==(this.buffer[c]>>>7-o%8&1)},put:function(o,c){for(let s=0;s<c;s++)this.putBit(1==(o>>>c-s-1&1))},getLengthInBits:function(){return this.length},putBit:function(o){const c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0),o&&(this.buffer[c]|=128>>>this.length%8),this.length++}},$.exports=p},41973:$=>{function p(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}p.prototype.set=function(o,c,s,i){const a=o*this.size+c;this.data[a]=s,i&&(this.reservedBit[a]=!0)},p.prototype.get=function(o,c){return this.data[o*this.size+c]},p.prototype.xor=function(o,c,s){this.data[o*this.size+c]^=s},p.prototype.isReserved=function(o,c){return this.reservedBit[o*this.size+c]},$.exports=p},81824:($,p,o)=>{const c=o(38419),s=o(46906);function i(a){this.mode=s.BYTE,this.data=new Uint8Array(c(a))}i.getBitsLength=function(l){return 8*l},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(a){for(let l=0,m=this.data.length;l<m;l++)a.put(this.data[l],8)},$.exports=i},96194:($,p,o)=>{const c=o(9020),s=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];p.getBlocksCount=function(l,m){switch(m){case c.L:return s[4*(l-1)+0];case c.M:return s[4*(l-1)+1];case c.Q:return s[4*(l-1)+2];case c.H:return s[4*(l-1)+3];default:return}},p.getTotalCodewordsCount=function(l,m){switch(m){case c.L:return i[4*(l-1)+0];case c.M:return i[4*(l-1)+1];case c.Q:return i[4*(l-1)+2];case c.H:return i[4*(l-1)+3];default:return}}},9020:($,p)=>{p.L={bit:1}
1,p.M={bit:0},p.Q={bit:3},p.H={bit:2},p.isValid=function(s){return s&&void 0!==s.bit&&s.bit>=0&&s.bit<4},p.from=function(s,i){if(p.isValid(s))return s;try{return function o(c){if("string"!=typeof c)throw new Error("Param is not a string");switch(c.toLowerCase()){case"l":case"low":return p.L;case"m":case"medium":return p.M;case"q":case"quartile":return p.Q;case"h":case"high":return p.H;default:throw new Error("Unknown EC Level: "+c)}}(s)}catch(a){return i}}},39172:($,p,o)=>{const c=o(54860).getSymbolSize;p.getPositions=function(a){const l=c(a);return[[0,0],[l-7,0],[0,l-7]]}},50611:($,p,o)=>{const c=o(54860),a=c.getBCHDigit(1335);p.getEncodedBits=function(m,e){const y=m.bit<<3|e;let w=y<<10;for(;c.getBCHDigit(w)-a>=0;)w^=1335<<c.getBCHDigit(w)-a;return 21522^(y<<10|w)}},37794:($,p)=>{const o=new Uint8Array(512),c=new Uint8Array(256);(function(){let i=1;for(let a=0;a<255;a++)o[a]=i,c[i]=a,i<<=1,256&i&&(i^=285);for(let a=255;a<512;a++)o[a]=o[a-255]})(),p.log=function(i){if(i<1)throw new Error("log("+i+")");return c[i]},p.exp=function(i){return o[i]},p.mul=function(i,a){return 0===i||0===a?0:o[c[i]+c[a]]}},98043:($,p,o)=>{const c=o(46906),s=o(54860);function i(a){this.mode=c.KANJI,this.data=a}i.getBitsLength=function(l){return 13*l},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(a){let l;for(l=0;l<this.data.length;l++){let m=s.toSJIS(this.data[l]);if(m>=33088&&m<=40956)m-=33088;else{if(!(m>=57408&&m<=60351))throw new Error("Invalid SJIS character: "+this.data[l]+"\nMake sure your charset is UTF-8");m-=49472}m=192*(m>>>8&255)+(255&m),a.put(m,13)}},$.exports=i},77135:($,p)=>{p.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function c(s,i,a){switch(s){case p.Patterns.PATTERN000:return(i+a)%2==0;case p.Patterns.PATTERN001:return i%2==0;case p.Patterns.PATTERN010:return a%3==0;case p.Patterns.PATTERN011:return(i+a)%3==0;case p.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2==0;case p.Patterns.PATTERN101:return i*a%2+i*a%3==0;case p.Patterns.PATTERN110:return(i*a%2+i*a%3)%2==0;case p.Patterns.PATTERN111:return(i*a%3+(i+a)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}}p.isValid=function(i){return null!=i&&""!==i&&!isNaN(i)&&i>=0&&i<=7},p.from=function(i){return p.isValid(i)?parseInt(i,10):void 0},p.getPenaltyN1=function(i){const a=i.size;let l=0,m=0,e=0,y=null,w=null;for(let O=0;O<a;O++){m=e=0,y=w=null;for(let F=0;F<a;F++){let n=i.get(O,F);n===y?m++:(m>=5&&(l+=m-5+3),y=n,m=1),n=i.get(F,O),n===w?e++:(e>=5&&(l+=e-5+3),w=n,e=1)}m>=5&&(l+=m-5+3),e>=5&&(l+=e-5+3)}return l},p.getPenaltyN2=function(i){const a=i.size;let l=0;for(let m=0;m<a-1;m++)for(let e=0;e<a-1;e++){const y=i.get(m,e)+i.get(m,e+1)+i.get(m+1,e)+i.get(m+1,e+1);(4===y||0===y)&&l++}return 3*l},p.getPenaltyN3=function(i){const a=i.size;let l=0,m=0,e=0;for(let y=0;y<a;y++){m=e=0;for(let w=0;w<a;w++)m=m<<1&2047|i.get(y,w),w>=10&&(1488===m||93===m)&&l++,e=e<<1&2047|i.get(w,y),w>=10&&(1488===e||93===e)&&l++}return 40*l},p.getPenaltyN4=function(i){let a=0;const l=i.data.length;for(let e=0;e<l;e++)a+=i.data[e];return 10*Math.abs(Math.ceil(100*a/l/5)-10)},p.applyMask=function(i,a){const l=a.size;for(let m=0;m<l;m++)for(let e=0;e<l;e++)a.isReserved(e,m)||a.xor(e,m,c(i,e,m))},p.getBestMask=function(i,a){const l=Object.keys(p.Patterns).length;let m=0,e=1/0;for(let y=0;y<l;y++){a(y),p.applyMask(y,i);const w=p.getPenaltyN1(i)+p.getPenaltyN2(i)+p.getPenaltyN3(i)+p.getPenaltyN4(i);p.applyMask(y,i),w<e&&(e=w,m=y)}return m}},46906:($,p,o)=>{const c=o(2316),s=o(54677);p.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},p.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},p.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},p.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},p.MIXED={bit:-1},p.getCharCountIndicator=function(l,m){if(!l.ccBits)throw new Error("Invalid mode: "+l);if(!c.isValid(m))throw new Error("Invalid version: "+m);return m>=1&&m<10?l.ccBits[0]:m<27?l.ccBits[1]:l.ccBits[2]},p.getBestModeForData=function(l){return s.testNumeric(l)?p.NUMERIC:s.testAlphanumeric(l)?p.ALPHANUMERIC:s.testKanji(l)?p.KANJI:p.BYTE},p.toString=function(l){if(l&&l.id)return l.id;throw new Error("Invalid mode")},p.isValid=function(l){return l&&l.bit&&l.ccBits},p.from=function(l,m){if(p.isValid(l))return l;try{return function i(a){if("string"!=typeof a)throw new Error("Param is not a string");switch(a.toLowerCase()){case"numeric":return p.NUMERIC;case"alphanumeric":return p.ALPHANUMERIC;case"kanji":return p.KANJI;case"byte":return p.BYTE;default:throw new Error("Unknown mode: "+a)}}(l)}catch(e){return m}}},86002:($,p,o)=>{const c=o(46906);function s(i){this.mode=c.NUMERIC,this.data=i.toString()}s.getBitsLength=function(a){return 10*Math.floor(a/3)+(a%3?a%3*3+1:0)},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(a){let l,m,e;for(l=0;l+3<=this.data.length;l+=3)m=this.data.substr(l,3),e=parseInt(m,10),a.put(e,10);const y=this.data.length-l;y>0&&(m=this.data.substr(l),e=parseInt(m,10),a.put(e,3*y+1))},$.exports=s},47793:($,p,o)=>{const c=o(37794);p.mul=function(i,a){const l=new Uint8Array(i.length+a.length-1);for(let m=0;m<i.length;m++)for(let e=0;e<a.length;e++)l[m+e]^=c.mul(i[m],a[e]);return l},p.mod=function(i,a){let l=new Uint8Array(i);for(;l.length-a.length>=0;){const m=l[0];for(let y=0;y<a.length;y++)l[y]^=c.mul(a[y],m);let e=0;for(;e<l.length&&0===l[e];)e++;l=l.slice(e)}return l},p.generateECPolynomial=function(i){let a=new Uint8Array([1]);for(let l=0;l<i;l++)a=p.mul(a,new Uint8Array([1,c.exp(l)]));return a}},37554:($,p,o)=>{const c=o(54860),s=o(9020),i=o(43044),a=o(41973),l=o(63012),m=o(39172),e=o(77135),y=o(96194),w=o(68098),O=o(6602),F=o(50611),n=o(46906),T=o(19465);function H(N,K,R){const D=N.size,Q=F.getEncodedBits(K,R);let V,B;for(V=0;
1V<15;V++)B=1==(Q>>V&1),N.set(V<6?V:V<8?V+1:D-15+V,8,B,!0),N.set(8,V<8?D-V-1:V<9?15-V-1+1:15-V-1,B,!0);N.set(D-8,8,1,!0)}function ae(N,K,R,D){let Q;if(Array.isArray(N))Q=T.fromArray(N);else{if("string"!=typeof N)throw new Error("Invalid data");{let ce=K;if(!ce){const me=T.rawSplit(N);ce=O.getBestVersionForData(me,R)}Q=T.fromString(N,ce||40)}}const V=O.getBestVersionForData(Q,R);if(!V)throw new Error("The amount of data is too big to be stored in a QR Code");if(K){if(K<V)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+V+".\n")}else K=V;const B=function W(N,K,R){const D=new i;R.forEach(function(J){D.put(J.mode.bit,4),D.put(J.getLength(),n.getCharCountIndicator(J.mode,N)),J.write(D)});const B=8*(c.getSymbolTotalCodewords(N)-y.getTotalCodewordsCount(N,K));for(D.getLengthInBits()+4<=B&&D.put(0,4);D.getLengthInBits()%8!=0;)D.putBit(0);const Y=(B-D.getLengthInBits())/8;for(let J=0;J<Y;J++)D.put(J%2?17:236,8);return function te(N,K,R){const D=c.getSymbolTotalCodewords(K),V=D-y.getTotalCodewordsCount(K,R),B=y.getBlocksCount(K,R),J=B-D%B,ce=Math.floor(D/B),me=Math.floor(V/B),xe=me+1,ye=ce-me,he=new w(ye);let Ce=0;const re=new Array(B),fe=new Array(B);let _e=0;const be=new Uint8Array(N.buffer);for(let d=0;d<B;d++){const h=d<J?me:xe;re[d]=be.slice(Ce,Ce+h),fe[d]=he.encode(re[d]),Ce+=h,_e=Math.max(_e,h)}const Se=new Uint8Array(D);let u,f,se=0;for(u=0;u<_e;u++)for(f=0;f<B;f++)u<re[f].length&&(Se[se++]=re[f][u]);for(u=0;u<ye;u++)for(f=0;f<B;f++)Se[se++]=fe[f][u];return Se}(D,N,K)}(K,R,Q),Y=c.getSymbolSize(K),J=new a(Y);return function z(N,K){const R=N.size,D=m.getPositions(K);for(let Q=0;Q<D.length;Q++){const V=D[Q][0],B=D[Q][1];for(let Y=-1;Y<=7;Y++)if(!(V+Y<=-1||R<=V+Y))for(let J=-1;J<=7;J++)B+J<=-1||R<=B+J||N.set(V+Y,B+J,Y>=0&&Y<=6&&(0===J||6===J)||J>=0&&J<=6&&(0===Y||6===Y)||Y>=2&&Y<=4&&J>=2&&J<=4,!0)}}(J,K),function t(N){const K=N.size;for(let R=8;R<K-8;R++){const D=R%2==0;N.set(R,6,D,!0),N.set(6,R,D,!0)}}(J),function q(N,K){const R=l.getPositions(K);for(let D=0;D<R.length;D++){const Q=R[D][0],V=R[D][1];for(let B=-2;B<=2;B++)for(let Y=-2;Y<=2;Y++)N.set(Q+B,V+Y,-2===B||2===B||-2===Y||2===Y||0===B&&0===Y,!0)}}(J,K),H(J,R,0),K>=7&&function G(N,K){const R=N.size,D=O.getEncodedBits(K);let Q,V,B;for(let Y=0;Y<18;Y++)Q=Math.floor(Y/3),V=Y%3+R-8-3,B=1==(D>>Y&1),N.set(Q,V,B,!0),N.set(V,Q,B,!0)}(J,K),function k(N,K){const R=N.size;let D=-1,Q=R-1,V=7,B=0;for(let Y=R-1;Y>0;Y-=2)for(6===Y&&Y--;;){for(let J=0;J<2;J++)if(!N.isReserved(Q,Y-J)){let ce=!1;B<K.length&&(ce=1==(K[B]>>>V&1)),N.set(Q,Y-J,ce),V--,-1===V&&(B++,V=7)}if(Q+=D,Q<0||R<=Q){Q-=D,D=-D;break}}}(J,B),isNaN(D)&&(D=e.getBestMask(J,H.bind(null,J,R))),e.applyMask(D,J),H(J,R,D),{modules:J,version:K,errorCorrectionLevel:R,maskPattern:D,segments:Q}}p.create=function(K,R){if(void 0===K||""===K)throw new Error("No input text");let Q,V,D=s.M;return void 0!==R&&(D=s.from(R.errorCorrectionLevel,s.M),Q=O.from(R.version),V=e.from(R.maskPattern),R.toSJISFunc&&c.setToSJISFunction(R.toSJISFunc)),ae(K,Q,D,V)}},68098:($,p,o)=>{const c=o(47793);function s(i){this.genPoly=void 0,this.degree=i,this.degree&&this.initialize(this.degree)}s.prototype.initialize=function(a){this.degree=a,this.genPoly=c.generateECPolynomial(this.degree)},s.prototype.encode=function(a){if(!this.genPoly)throw new Error("Encoder not initialized");const l=new Uint8Array(a.length+this.degree);l.set(a);const m=c.mod(l,this.genPoly),e=this.degree-m.length;if(e>0){const y=new Uint8Array(this.degree);return y.set(m,e),y}return m},$.exports=s},54677:($,p)=>{const o="[0-9]+";let s="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";s=s.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+s+")(?:.|[\r\n]))+";p.KANJI=new RegExp(s,"g"),p.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),p.BYTE=new RegExp(i,"g"),p.NUMERIC=new RegExp(o,"g"),p.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const a=new RegExp("^"+s+"$"),l=new RegExp("^"+o+"$"),m=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");p.testKanji=function(y){return a.test(y)},p.testNumeric=function(y){return l.test(y)},p.testAlphanumeric=function(y){return m.test(y)}},19465:($,p,o)=>{const c=o(46906),s=o(86002),i=o(30812),a=o(81824),l=o(98043),m=o(54677),e=o(54860),y=o(74901);function w(G){return unescape(encodeURIComponent(G)).length}function O(G,H,k){const W=[];let te;for(;null!==(te=G.exec(k));)W.push({data:te[0],index:te.index,mode:H,length:te[0].length});return W}function F(G){const H=O(m.NUMERIC,c.NUMERIC,G),k=O(m.ALPHANUMERIC,c.ALPHANUMERIC,G);let W,te;return e.isKanjiModeEnabled()?(W=O(m.BYTE,c.BYTE,G),te=O(m.KANJI,c.KANJI,G)):(W=O(m.BYTE_KANJI,c.BYTE,G),te=[]),H.concat(k,W,te).sort(function(N,K){return N.index-K.index}).map(function(N){return{data:N.data,mode:N.mode,length:N.length}})}function n(G,H){switch(H){case c.NUMERIC:return s.getBitsLength(G);case c.ALPHANUMERIC:return i.getBitsLength(G);case c.KANJI:return l.getBitsLength(G);case c.BYTE:return a.getBitsLength(G)}}function q(G,H){let k;const W=c.getBestModeForData(G);
1if(k=c.from(H,W),k!==c.BYTE&&k.bit<W.bit)throw new Error('"'+G+'" cannot be encoded with mode '+c.toString(k)+".\n Suggested mode is: "+c.toString(W));switch(k===c.KANJI&&!e.isKanjiModeEnabled()&&(k=c.BYTE),k){case c.NUMERIC:return new s(G);case c.ALPHANUMERIC:return new i(G);case c.KANJI:return new l(G);case c.BYTE:return new a(G)}}p.fromArray=function(H){return H.reduce(function(k,W){return"string"==typeof W?k.push(q(W,null)):W.data&&k.push(q(W.data,W.mode)),k},[])},p.fromString=function(H,k){const te=function z(G){const H=[];for(let k=0;k<G.length;k++){const W=G[k];switch(W.mode){case c.NUMERIC:H.push([W,{data:W.data,mode:c.ALPHANUMERIC,length:W.length},{data:W.data,mode:c.BYTE,length:W.length}]);break;case c.ALPHANUMERIC:H.push([W,{data:W.data,mode:c.BYTE,length:W.length}]);break;case c.KANJI:H.push([W,{data:W.data,mode:c.BYTE,length:w(W.data)}]);break;case c.BYTE:H.push([{data:W.data,mode:c.BYTE,length:w(W.data)}])}}return H}(F(H,e.isKanjiModeEnabled())),ae=function t(G,H){const k={},W={start:{}};let te=["start"];for(let ae=0;ae<G.length;ae++){const N=G[ae],K=[];for(let R=0;R<N.length;R++){const D=N[R],Q=""+ae+R;K.push(Q),k[Q]={node:D,lastCount:0},W[Q]={};for(let V=0;V<te.length;V++){const B=te[V];k[B]&&k[B].node.mode===D.mode?(W[B][Q]=n(k[B].lastCount+D.length,D.mode)-n(k[B].lastCount,D.mode),k[B].lastCount+=D.length):(k[B]&&(k[B].lastCount=D.length),W[B][Q]=n(D.length,D.mode)+4+c.getCharCountIndicator(D.mode,H))}}te=K}for(let ae=0;ae<te.length;ae++)W[te[ae]].end=0;return{map:W,table:k}}(te,k),N=y.find_path(ae.map,"start","end"),K=[];for(let R=1;R<N.length-1;R++)K.push(ae.table[N[R]].node);return p.fromArray(function T(G){return G.reduce(function(H,k){const W=H.length-1>=0?H[H.length-1]:null;return W&&W.mode===k.mode?(H[H.length-1].data+=k.data,H):(H.push(k),H)},[])}(K))},p.rawSplit=function(H){return p.fromArray(F(H,e.isKanjiModeEnabled()))}},54860:($,p)=>{let o;const c=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];p.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return 4*i+17},p.getSymbolTotalCodewords=function(i){return c[i]},p.getBCHDigit=function(s){let i=0;for(;0!==s;)i++,s>>>=1;return i},p.setToSJISFunction=function(i){if("function"!=typeof i)throw new Error('"toSJISFunc" is not a valid function.');o=i},p.isKanjiModeEnabled=function(){return void 0!==o},p.toSJIS=function(i){return o(i)}},2316:($,p)=>{p.isValid=function(c){return!isNaN(c)&&c>=1&&c<=40}},6602:($,p,o)=>{const c=o(54860),s=o(96194),i=o(9020),a=o(46906),l=o(2316),e=c.getBCHDigit(7973);function w(n,T){return a.getCharCountIndicator(n,T)+4}function O(n,T){let z=0;return n.forEach(function(t){z+=w(t.mode,T)+t.getBitsLength()}),z}p.from=function(T,z){return l.isValid(T)?parseInt(T,10):z},p.getCapacity=function(T,z,t){if(!l.isValid(T))throw new Error("Invalid QR Code version");void 0===t&&(t=a.BYTE);const H=8*(c.getSymbolTotalCodewords(T)-s.getTotalCodewordsCount(T,z));if(t===a.MIXED)return H;const k=H-w(t,T);switch(t){case a.NUMERIC:return Math.floor(k/10*3);case a.ALPHANUMERIC:return Math.floor(k/11*2);case a.KANJI:return Math.floor(k/13);default:return Math.floor(k/8)}},p.getBestVersionForData=function(T,z){let t;const q=i.from(z,i.M);if(Array.isArray(T)){if(T.length>1)return function F(n,T){for(let z=1;z<=40;z++)if(O(n,z)<=p.getCapacity(z,T,a.MIXED))return z}(T,q);if(0===T.length)return 1;t=T[0]}else t=T;return function y(n,T,z){for(let t=1;t<=40;t++)if(T<=p.getCapacity(t,z,n))return t}(t.mode,t.getLength(),q)}
1,p.getEncodedBits=function(T){if(!l.isValid(T)||T<7)throw new Error("Invalid QR Code version");let z=T<<12;for(;c.getBCHDigit(z)-e>=0;)z^=7973<<c.getBCHDigit(z)-e;return T<<12|z}},80179:($,p,o)=>{const c=o(90714);p.render=function(l,m,e){let y=e,w=m;void 0===y&&(!m||!m.getContext)&&(y=m,m=void 0),m||(w=function i(){try{return document.createElement("canvas")}catch(a){throw new Error("You need to specify a canvas element")}}()),y=c.getOptions(y);const O=c.getImageWidth(l.modules.size,y),F=w.getContext("2d"),n=F.createImageData(O,O);return c.qrToImageData(n.data,l,y),function s(a,l,m){a.clearRect(0,0,l.width,l.height),l.style||(l.style={}),l.height=m,l.width=m,l.style.height=m+"px",l.style.width=m+"px"}(F,w,O),F.putImageData(n,0,0),w},p.renderToDataURL=function(l,m,e){let y=e;return void 0===y&&(!m||!m.getContext)&&(y=m,m=void 0),y||(y={}),p.render(l,m,y).toDataURL(y.type||"image/png",(y.rendererOpts||{}).quality)}},1036:($,p,o)=>{const c=o(90714);function s(l,m){const e=l.a/255,y=m+'="'+l.hex+'"';return e<1?y+" "+m+'-opacity="'+e.toFixed(2).slice(1)+'"':y}function i(l,m,e){let y=l+m;return void 0!==e&&(y+=" "+e),y}p.render=function(m,e,y){const w=c.getOptions(e),O=m.modules.size,F=m.modules.data,n=O+2*w.margin,T=w.color.light.a?"<path "+s(w.color.light,"fill")+' d="M0 0h'+n+"v"+n+'H0z"/>':"",z="<path "+s(w.color.dark,"stroke")+' d="'+function a(l,m,e){let y="",w=0,O=!1,F=0;for(let n=0;n<l.length;n++){const T=Math.floor(n%m),z=Math.floor(n/m);!T&&!O&&(O=!0),l[n]?(F++,n>0&&T>0&&l[n-1]||(y+=O?i("M",T+e,.5+z+e):i("m",w,0),w=0,O=!1),T+1<m&&l[n+1]||(y+=i("h",F),F=0)):w++}return y}(F,O,w.margin)+'"/>',G='<svg xmlns="http://www.w3.org/2000/svg" '+(w.width?'width="'+w.width+'" height="'+w.width+'" ':"")+'viewBox="0 0 '+n+" "+n+'" shape-rendering="crispEdges">'+T+z+"</svg>\n";return"function"==typeof y&&y(null,G),G}},90714:($,p)=>{function o(c){if("number"==typeof c&&(c=c.toString()),"string"!=typeof c)throw new Error("Color should be defined as hex string");let s=c.slice().replace("#","").split("");if(s.length<3||5===s.length||s.length>8)throw new Error("Invalid hex color: "+c);(3===s.length||4===s.length)&&(s=Array.prototype.concat.apply([],s.map(function(a){return[a,a]}))),6===s.length&&s.push("F","F");const i=parseInt(s.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:255&i,hex:"#"+s.slice(0,6).join("")}}p.getOptions=function(s){s||(s={}),s.color||(s.color={});const a=s.width&&s.width>=21?s.width:void 0;return{width:a,scale:a?4:s.scale||4,margin:null==s.margin||s.margin<0?4:s.margin,color:{dark:o(s.color.dark||"#000000ff"),light:o(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},p.getScale=function(s,i){return i.width&&i.width>=s+2*i.margin?i.width/(s+2*i.margin):i.scale},p.getImageWidth=function(s,i){const a=p.getScale(s,i);return Math.floor((s+2*i.margin)*a)},p.qrToImageData=function(s,i,a){const l=i.modules.size,m=i.modules.data,e=p.getScale(l,a),y=Math.floor((l+2*a.margin)*e),w=a.margin*e,O=[a.color.light,a.color.dark];for(let F=0;F<y;F++)for(let n=0;n<y;n++){let T=4*(F*y+n),z=a.color.light;F>=w&&n>=w&&F<y-w&&n<y-w&&(z=O[m[Math.floor((F-w)/e)*l+Math.floor((n-w)/e)]?1:0]),s[T++]=z.r,s[T++]=z.g,s[T++]=z.b,s[T]=z.a}}},92451:($,p,o)=>{"use strict";o.d(p,{o:()=>c});const c=[{id:1,country:"Afghanistan",iso:"AF"},{id:2,country:"Albania",iso:"AL"},{id:3,country:"Algeria",iso:"DZ"},{id:4,country:"American Samoa",iso:"AS"},{id:5,country:"Andorra",iso:"AD"},{id:6,country:"Angola",iso:"AO"},{id:7,country:"Anguilla",iso:"AI"},{id:8,country:"Antarctica",iso:"AQ"},{id:9,country:"Antigua and Barbuda",iso:"AG"},{id:10,country:"Argentina",iso:"AR"},{id:11,country:"Armenia",iso:"AM"},{id:12,country:"Aruba",iso:"AW"},{id:13,country:"Australia",iso:"AU"},{id:14,country:"Austria",iso:"AT"},{id:15,country:"Azerbaijan",iso:"AZ"},{id:16,country:"Bahamas (the)",iso:"BS"},{id:17,country:"Bahrain",iso:"BH"},{id:18,country:"Bangladesh",iso:"BD"},{id:19,country:"Barbados",iso:"BB"},{id:20,country:"Belarus",iso:"BY"}
1,{id:21,country:"Belgium",iso:"BE"},{id:22,country:"Belize",iso:"BZ"},{id:23,country:"Benin",iso:"BJ"},{id:24,country:"Bermuda",iso:"BM"},{id:25,country:"Bhutan",iso:"BT"},{id:26,country:"Bolivia (Plurinational State of)",iso:"BO"},{id:27,country:"Bonaire, Sint Eustatius and Saba",iso:"BQ"},{id:28,country:"Bosnia and Herzegovina",iso:"BA"},{id:29,country:"Botswana",iso:"BW"},{id:30,country:"Bouvet Island",iso:"BV"},{id:31,country:"Brazil",iso:"BR"},{id:32,country:"British Indian Ocean Territory (the)",iso:"IO"},{id:33,country:"Brunei Darussalam",iso:"BN"},{id:34,country:"Bulgaria",iso:"BG"},{id:35,country:"Burkina Faso",iso:"BF"},{id:36,country:"Burundi",iso:"BI"},{id:37,country:"Cabo Verde",iso:"CV"},{id:38,country:"Cambodia",iso:"KH"},{id:39,country:"Cameroon",iso:"CM"},{id:40,country:"Canada",iso:"CA"},{id:41,country:"Cayman Islands (the)",iso:"KY"},{id:42,country:"Central African Republic (the)",iso:"CF"},{id:43,country:"Chad",iso:"TD"},{id:44,country:"Chile",iso:"CL"},{id:45,country:"China",iso:"CN"},{id:46,country:"Christmas Island",iso:"CX"},{id:47,country:"Cocos (Keeling) Islands (the)",iso:"CC"},{id:48,country:"Colombia",iso:"CO"},{id:49,country:"Comoros (the)",iso:"KM"},{id:50,country:"Congo (the Democratic Republic of the)",iso:"CD"},{id:51,country:"Congo (the)",iso:"CG"},{id:52,country:"Cook Islands (the)",iso:"CK"},{id:53,country:"Costa Rica",iso:"CR"},{id:54,country:"Croatia",iso:"HR"},{id:55,country:"Cuba",iso:"CU"},{id:56,country:"Cura\xe7ao",iso:"CW"},{id:57,country:"Cyprus",iso:"CY"},{id:58,country:"Czechia",iso:"CZ"},{id:59,country:"C\xf4te d Ivoire",iso:"CI"},{id:60,country:"Denmark",iso:"DK"},{id:61,country:"Djibouti",iso:"DJ"},{id:62,country:"Dominica",iso:"DM"},{id:63,country:"Dominican Republic (the)",iso:"DO"},{id:64,country:"Ecuador",iso:"EC"},{id:65,country:"Egypt",iso:"EG"},{id:66,country:"El Salvador",iso:"SV"},{id:67,country:"Equatorial Guinea",iso:"GQ"},{id:68,country:"Eritrea",iso:"ER"},{id:69,country:"Estonia",iso:"EE"},{id:70,country:"Eswatini",iso:"SZ"},{id:71,country:"Ethiopia",iso:"ET"},{id:72,country:"Falkland Islands (the) [Malvinas]",iso:"FK"},{id:73,country:"Faroe Islands (the)",iso:"FO"},{id:74,country:"Fiji",iso:"FJ"},{id:75,country:"Finland",iso:"FI"},{id:76,country:"France",iso:"FR"},{id:77,country:"French Guiana",iso:"GF"},{id:78,country:"French Polynesia",iso:"PF"},{id:79,country:"French Southern Territories (the)",iso:"TF"},{id:80,country:"Gabon",iso:"GA"},{id:81,country:"Gambia (the)",iso:"GM"},{id:82,country:"Georgia",iso:"GE"},{id:83,country:"Germany",iso:"DE"},{id:84,country:"Ghana",iso:"GH"},{id:85,country:"Gibraltar",iso:"GI"},{id:86,country:"Greece",iso:"GR"},{id:87,country:"Greenland",iso:"GL"},{id:88,country:"Grenada",iso:"GD"},{id:89,country:"Guadeloupe",iso:"GP"},{id:90,country:"Guam",iso:"GU"},{id:91,country:"Guatemala",iso:"GT"},{id:92,country:"Guernsey",iso:"GG"},{id:93,country:"Guinea",iso:"GN"},{id:94,country:"Guinea-Bissau",iso:"GW"},{id:95,country:"Guyana",iso:"GY"},{id:96,country:"Haiti",iso:"HT"},{id:97,country:"Heard Island and McDonald Islands",iso:"HM"},{id:98,country:"Holy See (the)",iso:"VA"},{id:99,country:"Honduras",iso:"HN"},{id:100,country:"Hong Kong",iso:"HK"},{id:101,country:"Hungary",iso:"HU"},{id:102,country:"Iceland",iso:"IS"},{id:103,country:"India",iso:"IN"},{id:104,country:"Indonesia",iso:"ID"},{id:105,country:"Iran (Islamic Republic of)",iso:"IR"},{id:106,country:"Iraq",iso:"IQ"},{id:107,country:"Ireland",iso:"IE"},{id:108,country:"Isle of Man",iso:"IM"},{id:109,country:"Israel",iso:"IL"},{id:110,country:"Italy",iso:"IT"},{id:111,country:"Jamaica",iso:"JM"},{id:112,country:"Japan",iso:"JP"},{id:113,country:"Jersey",iso:"JE"},{id:114,country:"Jordan",iso:"JO"},{id:115,country:"Kazakhstan",iso:"KZ"},{id:116,country:"Kenya",iso:"KE"},{id:117,country:"Kiribati",iso:"KI"},{id:118,country:"Korea (the Democratic Peoples Republic of)",iso:"KP"},{id:119,country:"Korea (the Republic of)",iso:"KR"},{id:120,country:"Kuwait",iso:"KW"},{id:121,country:"Kyrgyzstan",iso:"KG"},{id:122,country:"Lao Peoples Democratic Republic (the)",iso:"LA"},{id:123,country:"Latvia",iso:"LV"},{id:124,country:"Lebanon",iso:"LB"}
1,{id:125,country:"Lesotho",iso:"LS"},{id:126,country:"Liberia",iso:"LR"},{id:127,country:"Libya",iso:"LY"},{id:128,country:"Liechtenstein",iso:"LI"},{id:129,country:"Lithuania",iso:"LT"},{id:130,country:"Luxembourg",iso:"LU"},{id:131,country:"Macao",iso:"MO"},{id:132,country:"Madagascar",iso:"MG"},{id:133,country:"Malawi",iso:"MW"},{id:134,country:"Malaysia",iso:"MY"},{id:135,country:"Maldives",iso:"MV"},{id:136,country:"Mali",iso:"ML"},{id:137,country:"Malta",iso:"MT"},{id:138,country:"Marshall Islands (the)",iso:"MH"},{id:139,country:"Martinique",iso:"MQ"},{id:140,country:"Mauritania",iso:"MR"},{id:141,country:"Mauritius",iso:"MU"},{id:142,country:"Mayotte",iso:"YT"},{id:143,country:"Mexico",iso:"MX"},{id:144,country:"Micronesia (Federated States of)",iso:"FM"},{id:145,country:"Moldova (the Republic of)",iso:"MD"},{id:146,country:"Monaco",iso:"MC"},{id:147,country:"Mongolia",iso:"MN"},{id:148,country:"Montenegro",iso:"ME"},{id:149,country:"Montserrat",iso:"MS"},{id:150,country:"Morocco",iso:"MA"},{id:151,country:"Mozambique",iso:"MZ"},{id:152,country:"Myanmar",iso:"MM"},{id:153,country:"Namibia",iso:"NA"},{id:154,country:"Nauru",iso:"NR"},{id:155,country:"Nepal",iso:"NP"},{id:156,country:"Netherlands (the)",iso:"NL"},{id:157,country:"New Caledonia",iso:"NC"},{id:158,country:"New Zealand",iso:"NZ"},{id:159,country:"Nicaragua",iso:"NI"},{id:160,country:"Niger (the)",iso:"NE"},{id:161,country:"Nigeria",iso:"NG"},{id:162,country:"Niue",iso:"NU"},{id:163,country:"Norfolk Island",iso:"NF"},{id:164,country:"Northern Mariana Islands (the)",iso:"MP"},{id:165,country:"Norway",iso:"NO"},{id:166,country:"Oman",iso:"OM"},{id:167,country:"Pakistan",iso:"PK"},{id:168,country:"Palau",iso:"PW"},{id:169,country:"Palestine, State of",iso:"PS"},{id:170,country:"Panama",iso:"PA"},{id:171,country:"Papua New Guinea",iso:"PG"},{id:172,country:"Paraguay",iso:"PY"},{id:173,country:"Peru",iso:"PE"},{id:174,country:"Philippines (the)",iso:"PH"},{id:175,country:"Pitcairn",iso:"PN"},{id:176,country:"Poland",iso:"PL"},{id:177,country:"Portugal",iso:"PT"},{id:178,country:"Puerto Rico",iso:"PR"},{id:179,country:"Qatar",iso:"QA"},{id:180,country:"Republic of North Macedonia",iso:"MK"},{id:181,country:"Romania",iso:"RO"},{id:182,country:"Russian Federation (the)",iso:"RU"},{id:183,country:"Rwanda",iso:"RW"},{id:184,country:"R\xe9union",iso:"RE"},{id:185,country:"Saint Barth\xe9lemy",iso:"BL"},{id:186,country:"Saint Helena, Ascension and Tristan da Cunha",iso:"SH"},{id:187,country:"Saint Kitts and Nevis",iso:"KN"},{id:188,country:"Saint Lucia",iso:"LC"},{id:189,country:"Saint Martin (French part)",iso:"MF"},{id:190,country:"Saint Pierre and Miquelon",iso:"PM"},{id:191,country:"Saint Vincent and the Grenadines",iso:"VC"},{id:192,country:"Samoa",iso:"WS"},{id:193,country:"San Marino",iso:"SM"},{id:194,country:"Sao Tome and Principe",iso:"ST"},{id:195,country:"Saudi Arabia",iso:"SA"},{id:196,country:"Senegal",iso:"SN"},{id:197,country:"Serbia",iso:"RS"},{id:198,country:"Seychelles",iso:"SC"},{id:199,country:"Sierra Leone",iso:"SL"},{id:200,country:"Singapore",iso:"SG"},{id:201,country:"Sint Maarten (Dutch part)",iso:"SX"},{id:202,country:"Slovakia",iso:"SK"},{id:203,country:"Slovenia",iso:"SI"},{id:204,country:"Solomon Islands",iso:"SB"},{id:205,country:"Somalia",iso:"SO"},{id:206,country:"South Africa",iso:"ZA"},{id:207,country:"South Georgia and the South Sandwich Islands",iso:"GS"},{id:208,country:"South Sudan",iso:"SS"},{id:209,country:"Spain",iso:"ES"},{id:210,country:"Sri Lanka",iso:"LK"},{id:211,country:"Sudan (the)",iso:"SD"},{id:212,country:"Suriname",iso:"SR"},{id:213,country:"Svalbard and Jan Mayen",iso:"SJ"},{id:214,country:"Sweden",iso:"SE"},{id:215,country:"Switzerland",iso:"CH"},{id:216,country:"Syrian Arab Republic",iso:"SY"},{id:217,country:"Taiwan (Province of China)",iso:"TW"},{id:218,country:"Tajikistan",iso:"TJ"},{id:219,country:"Tanzania, United Republic of",iso:"TZ"},{id:220,country:"Thailand",iso:"TH"},{id:221,country:"Timor-Leste",iso:"TL"},{id:222,country:"Togo",iso:"TG"},{id:223,country:"Tokelau",iso:"TK"},{id:224,country:"Tonga",iso:"TO"},{id:225,country:"Trinidad and Tobago",iso:"TT"},{id:226,country:"Tunisia",iso:"TN"},{id:227,country:"Turkey",iso:"TR"},{id:228,country:"Turkmenistan",iso:"TM"},{id:229,country:"Turks and Caicos Islands (the)",iso:"TC"},{id:230,country:"Tuvalu",iso:"TV"}
1,{id:231,country:"Uganda",iso:"UG"},{id:232,country:"Ukraine",iso:"UA"},{id:233,country:"United Arab Emirates (the)",iso:"AE"},{id:234,country:"United Kingdom of Great Britain and Northern Ireland (the)",iso:"GB"},{id:235,country:"United States Minor Outlying Islands (the)",iso:"UM"},{id:236,country:"United States of America (the)",iso:"US"},{id:237,country:"Uruguay",iso:"UY"},{id:238,country:"Uzbekistan",iso:"UZ"},{id:239,country:"Vanuatu",iso:"VU"},{id:240,country:"Venezuela (Bolivarian Republic of)",iso:"VE"},{id:241,country:"Viet Nam",iso:"VN"},{id:242,country:"Virgin Islands (British)",iso:"VG"},{id:243,country:"Virgin Islands (U.S.)",iso:"VI"},{id:244,country:"Wallis and Futuna",iso:"WF"},{id:245,country:"Western Sahara",iso:"EH"},{id:246,country:"Yemen",iso:"YE"},{id:247,country:"Zambia",iso:"ZM"},{id:248,country:"Zimbabwe",iso:"ZW"},{id:249,country:"\xc5land Islands",iso:"AX"}]},12748:($,p,o)=>{"use strict";o.d(p,{A:()=>c});const c="^[0-9A-Fa-f]+$"},35660:($,p,o)=>{"use strict";o.d(p,{a:()=>e});var c=o(92198),s=o(72986),i=o(24850),a=o(80540),l=o(5e3),m=o(68555);let e=(()=>{class y{constructor(O,F){this.userService=O,this.router=F}canActivate(O,F){return this.userService.userSubject.pipe((0,c.h)(n=>void 0!==n),(0,s.q)(1),(0,i.U)(n=>void 0!==n&&(!this.userService.isDemoDashboardUser||this.router.createUrlTree(["dashboard"]))))}}return y.\u0275fac=function(O){return new(O||y)(l.\u0275\u0275inject(a.K),l.\u0275\u0275inject(m.F0))},y.\u0275prov=l.\u0275\u0275defineInjectable({token:y,factory:y.\u0275fac,providedIn:"root"}),y})()},51476:($,p,o)=>{"use strict";o.d(p,{g:()=>i});var c=o(92451),s=o(5e3);let i=(()=>{class a{transform(m){return c.o.find(e=>e.iso===m).country||"Not found"}}return a.\u0275fac=function(m){return new(m||a)},a.\u0275pipe=s.\u0275\u0275definePipe({name:"getCountryName",type:a,pure:!0}),a})()},93090:($,p,o)=>{"use strict";o.d(p,{F:()=>nt});var c=o(41555),s=o(93075),i=o(8929),a=o(7625),l=o(48781),m=o(66388),e=o(5e3),y=o(71245);let w=(()=>{class g{constructor(r){this._messageService=r,this.typeOfMonitor=""}changeOfSetupOptions(){this._messageService.sendMessage("type_of_setup_changed")}defineTypeOfConnectionOfMonitor(r){this.typeOfConnection=(null==r?void 0:r.endsWith("CE"))?"cellular":"wifi"}}return g.\u0275fac=function(r){return new(r||g)(e.\u0275\u0275inject(y.e))},g.\u0275prov=e.\u0275\u0275defineInjectable({token:g,factory:g.\u0275fac,providedIn:"root"}),g})();var O=o(55615),F=o(69808),n=o(79814),T=o(23322),z=o(28866),t=o(31545),q=o(64409),G=o(89306),H=o(39446),k=o(39360);let W=(()=>{class g{constructor(r){this.stepper=r}selectionChanged(r){const C=this.stepper._getStepLabelId(r.selectedIndex),M=document.getElementById(C);M&&setTimeout(()=>{M.scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"})},250)}}return g.\u0275fac=function(r){return new(r||g)(e.\u0275\u0275directiveInject(O.Vq))},g.\u0275dir=e.\u0275\u0275defineDirective({type:g,selectors:[["","appMatVerticalStepperScroller",""]],hostBindings:function(r,C){1&r&&e.\u0275\u0275listener("selectionChange",function(ne){return C.selectionChanged(ne)})}}),g})();var te=o(36787),ae=o(24850),N=o(80013),K=o(77700),R=o(12748),D=o(49973),Q=o(10745),V=o(4511),B=o(38131),Y=o(67075),J=o(97841),ce=o(9224),me=o(77093),xe=o(66819),ye=o(25245),he=o(67322),Ce=o(74107),re=o(90508),fe=o(98833),_e=o(53537),be=o(60865),Se=o(47423),se=o(87238);function u(g,L){if(1&g&&(e.\u0275\u0275elementStart(0,"mat-card-header")(1,"mat-card-title"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()()),2&g){const r=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1("Monitor Serial Number: ",r.setupMonitorGroup.get("chipID").value,"")}}function f(g,L){1&g&&(e.\u0275\u0275elementStart(0,"div")(1,"p"),e.\u0275\u0275text(2," For fully assembled monitors, the serial number is printed on the back of the device. Look for the label near the QR codes. The serial number is shown next to "),e.\u0275\u0275elementStart(3,"b"),e.\u0275\u0275text(4,"\u201cS/N:\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(5," and consists of letters and numbers. You can also scan the "),e.\u0275\u0275elementStart(6,"b"),e.\u0275\u0275text(7,"\u201cAdd to Dashboard\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(8," QR code, which opens the registration page with the serial number pre-filled. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"p"),e.\u0275\u0275text(10," For DIY kits, the device display will show the message "),e.\u0275\u0275elementStart(11,"b"),e.\u0275\u0275text(12,"\u201c180s to connect to WiFi Hotspot airgradient-xxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(13," during startup. The 12 characters represented by "),e.\u0275\u0275elementStart(14,"b"),e.\u0275\u0275text(15,"\u201cxxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(16," are the monitor\u2019s serial number. Enter them in lowercase without the "),e.\u0275\u0275elementStart(17,"b"),e.\u0275\u0275text(18,"\u201cairgradient-\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(19," prefix. "),e.\u0275\u0275elementEnd()()),2&g&&e.\u0275\u0275property("@slowAppearing",void 0)}function d(g,L){1&g&&(e.\u0275\u0275elementStart(0,"div")(1,"p"),e.\u0275\u0275text(2," The seri
1al number is printed on the back of the monitor. Look for the label near the QR codes. The serial number is shown next to "),e.\u0275\u0275elementStart(3,"b"),e.\u0275\u0275text(4,"\u201cS/N:\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(5," and consists of letters and numbers. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"p"),e.\u0275\u0275text(7," You can also scan the "),e.\u0275\u0275elementStart(8,"b"),e.\u0275\u0275text(9,"\u201cAdd to Dashboard\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(10," QR code located above the serial number. This opens the registration page with the serial number pre-filled. "),e.\u0275\u0275elementEnd()()),2&g&&e.\u0275\u0275property("@slowAppearing",void 0)}function h(g,L){if(1&g&&(e.\u0275\u0275elementStart(0,"app-warning-message",6),e.\u0275\u0275elementContainerStart(1,7),e.\u0275\u0275template(2,f,20,1,"div",1),e.\u0275\u0275template(3,d,11,1,"div",1),e.\u0275\u0275elementStart(4,"p"),e.\u0275\u0275text(5," For more information, see "),e.\u0275\u0275elementStart(6,"a",8),e.\u0275\u0275text(7," Where can I find the Serial Number of my AirGradient monitor? "),e.\u0275\u0275elementStart(8,"mat-icon"),e.\u0275\u0275text(9,"open_in_new"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()),2&g){const r=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("@slowAppearing",void 0)("isAccentWarning",!0)("subHeader","How to find the serial number?"),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf","wifi"===r.onboardingService.typeOfConnection),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","cellular"===r.onboardingService.typeOfConnection)}}function v(g,L){1&g&&(e.\u0275\u0275elementStart(0,"div")(1,"p"),e.\u0275\u0275text(2," For fully assembled monitors, the serial number is printed on the back of the device. Look for the label near the QR codes. The serial number is shown next to "),e.\u0275\u0275elementStart(3,"b"),e.\u0275\u0275text(4,"\u201cS/N:\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(5," and consists of letters and numbers. You can also scan the "),e.\u0275\u0275elementStart(6,"b"),e.\u0275\u0275text(7,"\u201cAdd to Dashboard\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(8," QR code, which opens the registration page with the serial number pre-filled. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"p"),e.\u0275\u0275text(10," For DIY kits, the monitor creates a Wi-Fi hotspot named "),e.\u0275\u0275elementStart(11,"b"),e.\u0275\u0275text(12,"\u201cairgradient-xxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(13," when powered on. Use a phone or computer to find this network. The 12 characters represented by "),e.\u0275\u0275elementStart(14,"b"),e.\u0275\u0275text(15,"\u201cxxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(16," are the monitor\u2019s serial number. Enter them in lowercase without the "),e.\u0275\u0275elementStart(17,"b"),e.\u0275\u0275text(18,"\u201cairgradient-\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(19," prefix. "),e.\u0275\u0275elementEnd()()),2&g&&e.\u0275\u0275property("@slowAppearing",void 0)}function S(g,L){1&g&&(e.\u0275\u0275elementStart(0,"div")(1,"p"),e.\u0275\u0275text(2," The serial number is printed on the back of the monitor. Look for the label near the QR codes. The serial number is shown next to "),e.\u0275\u0275elementStart(3,"b"),e.\u0275\u0275text(4,"\u201cS/N:\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(5," and consists of letters and numbers. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"p"),e.\u0275\u0275text(7," You can also scan the "),e.\u0275\u0275elementStart(8,"b"),e.\u0275\u0275text(9,"\u201cAdd to Dashboard\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(10," QR code located above the serial number. This opens the registration page with the serial number pre-filled. "),e.\u0275\u0275elementEnd()()),2&g&&e.\u0275\u0275property("@slowAppearing",void 0)}function _(g,L){if(1&g&&(e.\u0275\u0275elementStart(0,"app-warning-message",6),e.\u0275\u0275elementContainerStart(1,7),e.\u0275\u0275template(2,v,20,1,"div",1),e.\u0275\u0275template(3,
1S,11,1,"div",1),e.\u0275\u0275elementStart(4,"p"),e.\u0275\u0275text(5," For more information, see "),e.\u0275\u0275elementStart(6,"a",8),e.\u0275\u0275text(7," Where can I find the Serial Number of my AirGradient monitor? "),e.\u0275\u0275elementStart(8,"mat-icon"),e.\u0275\u0275text(9,"open_in_new"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()),2&g){const r=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("isAccentWarning",!0)("subHeader","How to find the serial number?"),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf","wifi"===r.onboardingService.typeOfConnection),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","cellular"===r.onboardingService.typeOfConnection)}}function U(g,L){if(1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,h,10,5,"app-warning-message",5),e.\u0275\u0275template(2,_,10,4,"app-warning-message",5),e.\u0275\u0275elementContainerEnd()),2&g){const r=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","indoorOne"===r.onboardingService.typeOfMonitor),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","openAir"===r.onboardingService.typeOfMonitor||"openAirMax"===r.onboardingService.typeOfMonitor)}}function x(g,L){if(1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"p"),e.\u0275\u0275text(2,"Current models:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"mat-radio-button",9),e.\u0275\u0275text(4," AirGradient ONE (I-9PSL-DE) Indoor Monitor "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"mat-radio-button",9),e.\u0275\u0275text(6," AirGradient ONE (I-9PSL-DE-CE) Indoor Monitor "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"p"),e.\u0275\u0275text(8,"Other models:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"mat-radio-button",9),e.\u0275\u0275text(10," AirGradient ONE (8PSL) Indoor Monitor "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"mat-radio-button",9),e.\u0275\u0275text(12," AirGradient DIY Basic / Pro (I-DIY) Indoor Monitor "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&g){const r=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275property("value",r.MonitorModels._I9PSLDE),e.\u0275\u0275advance(2),e.\u0275\u0275property("value",r.MonitorModels._I9PSLDECE),e.\u0275\u0275advance(4),e.\u0275\u0275property("value",r.MonitorModels._8PSL),e.\u0275\u0275advance(2),e.\u0275\u0275property("value",r.MonitorModels._I1DIY)}}function b(g,L){if(1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"mat-radio-button",9)(2,"span"),e.\u0275\u0275text(3," AirGradient Open Air (O-1PST) Outdoor Monitor "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"mat-radio-button",9)(5,"span"),e.\u0275\u0275text(6," AirGradient Open Air (O-1PPT) Outdoor Monitor "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"mat-radio-button",9)(8,"span"),e.\u0275\u0275text(9," AirGradient Open Air (O-1PST-CE) Outdoor Monitor "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"mat-radio-button",9)(11,"span"),e.\u0275\u0275text(12," AirGradient Open Air (O-1PPT-CE) Outdoor Monitor "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()),2&g){const r=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("value",r.MonitorModels._O1PST),e.\u0275\u0275advance(3),e.\u0275\u0275property("value",r.MonitorModels._O1PP),e.\u0275\u0275advance(3),e.\u0275\u0275property("value",r.MonitorModels._O1PSTCE),e.\u0275\u0275advance(3),e.\u0275\u0275property("value",r.MonitorModels._O1PPTCE)}}function A(g,L){if(1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"mat-radio-button",9),e.\u0275\u0275text(2," AirGradient Open Air Max (O-M-1PPST-CE) Outdoor Monitor "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"mat-radio-button",9),e.\u0275\u0275text(4," AirGradient Open Air Max (O-M-1PPSTON-CE) Outdoor Monitor "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&g){const r=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("value",r.MonitorModels._OM1PPSTCE),e.\u0275\u0275advance(2),e.\u0275\u0275property("value",r.MonitorModels._OM1PPSTONCE)}}function Z(g,L){1&g&&(e.\u0275\u0275elementStart(0,"p")(1,"strong"),e.\u0275\u0275text(2,"Main settings:"),e.\u0275\u0275elementEnd()())}function de(g,L){if(1&g&&(e.\u0275\u0275elementStart(0,"mat-option",9),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&g){const r=L.$implicit;e.\u0275\u0275property("value",r.id),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",r.name," ")}}function ee(g,L){if(1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"mat-form-field",17)(2,"mat-label"),e.\u0275\u0275text(3,"Place"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"mat-select",20),e.\u0275\u0275template(5,de,2,2,"mat-option",21),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()),2&g){const r=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(5),e.\u0275\u0275property("ngForOf",r.places.places)}}function j(g,L){1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275text(1," This field is required. "),e.\u0275\u0275elementContainerEnd())}function ue(g,L){if(1&g&&e.\u0275\u0275text(0),2&g){const r=e.\u0275\u0275nextContext(2);let C;
1e.\u0275\u0275textInterpolate1(" Serial No. should be ",(null==(C=r.setupMonitorGroup.get("modelName"))?null:C.value)===r.MonitorModels._I1DIY?"up to 6, or 12":"12"," characters long. ")}}function le(g,L){1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275text(1," This field is required. "),e.\u0275\u0275elementContainerEnd())}function pe(g,L){1&g&&e.\u0275\u0275text(0," The minimal length is 4. ")}function Me(g,L){if(1&g&&(e.\u0275\u0275elementStart(0,"div",10),e.\u0275\u0275template(1,ee,6,1,"ng-container",1),e.\u0275\u0275elementStart(2,"mat-form-field",11)(3,"mat-label"),e.\u0275\u0275text(4," Serial Number "),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(5,"input",12),e.\u0275\u0275elementStart(6,"mat-hint",13),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(8,"mat-error",14),e.\u0275\u0275template(9,j,2,0,"ng-container",15),e.\u0275\u0275template(10,ue,1,1,"ng-template",null,16,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(12,"mat-form-field",17)(13,"mat-label"),e.\u0275\u0275text(14,"Location Name"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(15,"input",18),e.\u0275\u0275elementStart(16,"mat-error",14),e.\u0275\u0275template(17,le,2,0,"ng-container",15),e.\u0275\u0275template(18,pe,1,0,"ng-template",null,19,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementEnd()()()),2&g){const r=e.\u0275\u0275reference(11),C=e.\u0275\u0275reference(19),M=e.\u0275\u0275nextContext();let ne;e.\u0275\u0275property("@slowAppearing",void 0),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",(null==M.places.currentPlace?null:M.places.currentPlace.name)&&1<M.places.places.length),e.\u0275\u0275advance(1),e.\u0275\u0275property("hintLabel","Enter "+((null==(ne=M.setupMonitorGroup.get("modelName"))?null:ne.value)===M.MonitorModels._I1DIY?"up to 12":"12")+" characters"),e.\u0275\u0275advance(3),e.\u0275\u0275property("regexString",M.SENSOR_ID_VALIDATION_STRING)("isLowerCaseOnly",!0)("errorStateMatcher",M.matcher),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",((null==M.setupMonitorGroup.get("chipID").value?null:M.setupMonitorGroup.get("chipID").value.length)||0)+"/12"," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",M.getErrors("chipID"))("ngIfElse",r),e.\u0275\u0275advance(6),e.\u0275\u0275property("errorStateMatcher",M.matcher),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",M.getErrors("locationName"))("ngIfElse",C)}}function P(g,L){1&g&&(e.\u0275\u0275elementStart(0,"app-warning-message",6),e.\u0275\u0275elementContainerStart(1,7),e.\u0275\u0275elementStart(2,"p"),e.\u0275\u0275text(3," The Public Contributor Name is not set for this Dashboard yet. You can set it now and it will be used for all locations that share data from this dashboard. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"p"),e.\u0275\u0275text(5," The Public Contributor Name will be provided to all 3rd parties you share data with and is then often displayed together with the air quality data you share on their application. The Public Contributor Name can be your personal name or the name of the organisation / company that owns the monitor. You can also leave the Public Contributor Name empty in case you do not wish to be named. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd(),e.\u0275\u0275elementEnd()),2&g&&e.\u0275\u0275property("isAccentWarning",!0)("subHeader","Set Your Public Contributor Name")}function oe(g,L){1&g&&(e.\u0275\u0275elementStart(0,"mat-form-field",24)(1,"mat-label"),e.\u0275\u0275text(2,"Public Contributor Name"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(3,"input",33),e.\u0275\u0275elementStart(4,"mat-hint",34),e.\u0275\u0275text(5," Set Public Contributor Name(e.g Your Name) "),e.\u0275\u0275elementEnd()())}function E(g,L){if(1&g&&(e.\u0275\u0275elementStart(0,"mat-form-field",24)(1,"mat-label"),e.\u0275\u0275text(2,"Public Name of Location"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(3,"input",35),e.\u0275\u0275elementStart(4,"mat-hint"),e.\u0275\u0275text(5,"As it will be displayed on the Map"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"mat-error",14),e.\u0275\u0275text(7," This field is required. "),e.\u0275\u0275elementEnd()()),2&g){const r=e.\u0275\u0275nextContext(3);e.\u0275\u0275property("@slowAppearing",void 0),e.\u0275\u0275advance(3),e.\u0275\u0275property("errorStateMatcher",r.matcher)}}function I(g,L){1&g&&(e.\u0275\u0275elementStart(0,"mat-error",14),e.\u0275\u0275text(1," This field is required. "),e.\u0275\u0275elementEnd())}function X(g,L){1&g&&(e.\u0275\u0275elementStart(0,"mat-error",14),e.\u0275\u0275text(1," Invalid value for coordinates. "),e.\u0275\u0275elementEnd())}function ie(g,L){1&g&&(e.\u0275\u0275elementStart(0,"mat-error",14),e.\u0275\u0275text(1," Coordinates must have at least four decimal places. "),e.\u0275\u0275elementEnd())}function ve(g,L){if(1&g){const r=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275template(1,P,6,2,"app-warning-message",5),e.\u0275\u0275template(2,oe,6,0,"mat-form-field",23),e.\u0275\u0275template(3,E,8,2,"mat-form-field",23),e.\u0275\u0275elementStart(4,"mat-form-field",24)(5,"mat-label"),e.\u0275\u0275text(6,"Latitude, Longitude"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(7,"input",25),e.\u0275\u0275elementStart(8,"button",26),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(r),e.\u0275\u0275nextContext(2).openMapPicker()}),e.\u0275\u0275elementStart(9,"mat-icon"),e.\u0275\u0275text(10,"place"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275template(11,I,2,0,"mat-error",27),e.\u0275\u0275template(12,X,2,0,"mat-error",27),e.\u0275\u0275template(13,ie,2,0,"mat-error",27),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(14,"div",28)(15,"p",29),e.\u0275\u0275text(16," Use the "),e.\u0275\u0275elementStart(17,"mat-icon",30),e.\u0275\u0275text(18,"place"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(19," button above to select the location on a map, or to use your current location. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(20,"p",29),e.\u0275\u0275text(2
11," You can also enter the coordinates by hand. To find them, right click the location on "),e.\u0275\u0275elementStart(22,"a",31),e.\u0275\u0275text(23," Google Maps "),e.\u0275\u0275elementStart(24,"mat-icon"),e.\u0275\u0275text(25,"open_in_new"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275text(26," and copy the latitude, longitude it shows. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(27,"p"),e.\u0275\u0275text(28,"We use the "),e.\u0275\u0275elementStart(29,"a",32),e.\u0275\u0275text(30," OpenStreetMap "),e.\u0275\u0275elementStart(31,"mat-icon"),e.\u0275\u0275text(32,"open_in_new"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275text(33," service to verify that the coordinates are within the geographic boundaries of the place configured for your dashboard. If the coordinates fall outside these boundaries, you will be prompted to confirm if these coordinates are correct. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd()}if(2&g){const r=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","indoorOne"!==r.onboardingService.typeOfMonitor&&!r.places.currentPlace.public_contributor_name),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","indoorOne"!==r.onboardingService.typeOfMonitor&&!r.places.currentPlace.public_contributor_name),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","indoorOne"!==r.onboardingService.typeOfMonitor),e.\u0275\u0275advance(1),e.\u0275\u0275property("@slowAppearing",void 0),e.\u0275\u0275advance(3),e.\u0275\u0275property("regexString","^[0-9-., ]+$")("isLowerCaseOnly",!1)("errorStateMatcher",r.matcher),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",r.getErrors("latLong","required")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",r.getErrors("latLong","pattern")),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",r.getErrors("latLong","decimalPlaces")),e.\u0275\u0275advance(1),e.\u0275\u0275property("@slowAppearing",void 0)}}function we(g,L){if(1&g){const r=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"app-public-settings-widget",22),e.\u0275\u0275listener("isS
1haringIndoorsChange",function(M){return e.\u0275\u0275restoreView(r),e.\u0275\u0275nextContext().handleSharingDataOptionsChange("isSharingIndoors",M)})("isSharingWithAgApiChange",function(M){return e.\u0275\u0275restoreView(r),e.\u0275\u0275nextContext().handleSharingDataOptionsChange("isSharingWithAgApi",M)})("isSharingWithOpenAqChange",function(M){return e.\u0275\u0275restoreView(r),e.\u0275\u0275nextContext().handleSharingDataOptionsChange("isSharingWithOpenAq",M)})("isSharingWithIqAirChange",function(M){return e.\u0275\u0275restoreView(r),e.\u0275\u0275nextContext().handleSharingDataOptionsChange("isSharingWithIqAir",M)})("isSharingWithAgMapChange",function(M){return e.\u0275\u0275restoreView(r),e.\u0275\u0275nextContext().handleSharingDataOptionsChange("isSharingWithAgMap",M)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(2,ve,34,11,"ng-container",1),e.\u0275\u0275elementContainerEnd()}if(2&g){const r=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("isSharingWithAgApi",r.setupMonitorGroup.get("isSharingWithAgApi").value)("isSharingWithAgMap",r.setupMonitorGroup.get("isSharingWithAgMap").value)("isSharingWithOpenAq",r.setupMonitorGroup.get("isSharingWithOpenAq").value)("indoors","indoorOne"===r.onboardingService.typeOfMonitor)("isSharingIndoors",r.setupMonitorGroup.get("isSharingIndoors").value),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",r.setupMonitorGroup.get("isSharingWithAgApi").value||r.setupMonitorGroup.get("isSharingWithIqAir").value||r.setupMonitorGroup.get("isSharingWithOpenAq").value||r.setupMonitorGroup.get("isSharingIndoors").value||r.setupMonitorGroup.get("isSharingWithAgMap").value)}}class Ie{isErrorState(L,r){return!(!L||!L.invalid||!L.dirty&&!L.touched)}}let Te=(()=>{class g{constructor(r,C,M,ne,ge,Ee,Ae,Oe,ot){this._messageService=r,this._formBuilder=C,this.sensorServices=M,this.changeDetection=ne,this.places=ge,this.onboardingService=Ee,this.httpHelper=Ae,this.contributeDataService=Oe,this.mapPicker=ot,this.embedded=!1,this.matcher=new Ie,this.isRequestInProgress=!1,this.isShareDataOptionsVisible=!1,this.SENSOR_ID_VALIDATION_STRING=R.A,this.MonitorModels=D.c,this.minimumDigitsAfterDotValidator=Y.H,this.destroy$=new i.xQ}openMapPicker(){const r=this.setupMonitorGroup.get("latLong");this.mapPicker.pick(r.value).pipe((0,a.R)(this.destroy$)).subscribe(C=>{!C||(r.setValue(C),r.markAsDirty(),r.markAsTouched(),r.updateValueAndValidity())})}ngOnInit(){this.location=new K.f,this.location.active=!0,this.location.indoor="indoorOne"===this.onboardingService.typeOfMonitor,this.location.controlled=!0,this.location.public=!1,this.initForm(),this._messageService.listenMessage().pipe((0,a.R)(this.destroy$)).subscribe(r=>{"places_loaded"===r&&this.resetForm(),"sensor_location_added"===r&&(this.location=null,this.location=new K.f,this.location.active=!0,this.location.indoor="indoorOne"===this.onboardingService.typeOfMonitor,this.location.controlled=!0,this.isRequestInProgress=!1,this.location.public=!1,this.setupMonitorGroup.get("chipID").valid&&this.checkPmModule(),this.stepper.next(),this.resetForm()),"type_of_setup_changed"===r&&(this.isShareDataOptionsVisible=!1,this.resetForm()),"sensor_location_error"===r&&(this.isRequestInProgress=!1)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initForm(){var r,C;this.setupMonitorGroup=this._formBuilder.group({selectedPlaceId:[null===(C=null===(r=this.places)||void 0===r?void 0:r.currentPlace)||void 0===C?void 0:C.id,s.kI.required],chipID:["",s.kI.required],locationName:["",s.kI.required],modelName:["",s.kI.required],isSharingWithAgApi:[!1],isSharingIndoors:[!1],isSharingWithOpenAq:[!1],isSharingWithIqAir:[!1],isSharingWithAgMap:[!1],locationPublicName:[""],publicContributorName:[""],latLong:[""]}),(0,te.T)(this.setupMonitorGroup.get("isSharingWithAgApi").valueChanges,this.setupMonitorGroup.get("isSharingIndoors").valueChanges,this.setupMonitorGroup.get("isSharingWithOpenAq").valueChanges,this.setupMonitorGroup.get("isSharingWithAgMap").valueChanges).pipe((0,a.R)(this.destroy$)).subscribe(()=>{const M=this.setupMonitorGroup.get("locationPublicName"),ne=this.setupMonitorGroup.get("latLong");ne.setValidators(this.getLatLongValidators()),this.isOutdoorMonitorWithSharedData?M.setValidators([s.kI.required]):(M.reset(),M.clearValidators()),M.updateV
1alueAndValidity(),ne.updateValueAndValidity(),this.changeDetection.detectChanges()}),this.listenForSerialNumber(),this.listenForModelChange()}listenForSerialNumber(){this.setupMonitorGroup.get("chipID").valueChanges.pipe((0,a.R)(this.destroy$),(0,ae.U)(r=>null==r?void 0:r.trim()),(0,N.b)(400)).subscribe(r=>{this.isChipIdFieldValid&&this.checkSensorReport(r)})}listenForModelChange(){this.setupMonitorGroup.get("modelName").valueChanges.pipe((0,a.R)(this.destroy$)).subscribe(r=>{r&&this.onboardingService.defineTypeOfConnectionOfMonitor(r)})}checkSensorReport(r){this.sensorServices.getMonitorPlatform(r).subscribe(C=>{C.core_platform===Q.$.ambient?this.isShareDataOptionsVisible=!1:(this.isShareDataOptionsVisible||this.resetSharingDataOptions(!1),this.isShareDataOptionsVisible=!0)},C=>{404===C.status?console.log("Sensor platform not found"):this.httpHelper.handleHttpErrorMessage(C),this.isShareDataOptionsVisible||this.resetSharingDataOptions(!1),this.isShareDataOptionsVisible=!0})}resetSharingDataOptions(r){this.handleSharingDataOptionsChange("isSharingWithAgMap",r),this.handleSharingDataOptionsChange("isSharingWithAgApi",r),this.handleSharingDataOptionsChange("isSharingWithOpenAq",r),this.handleSharingDataOptionsChange("isSharingIndoors",r)}checkPmModule(){this.sensorServices.getSensorTestReport(this.setupMonitorGroup.get("chipID").value).subscribe(r=>{this.sensorServices.testReportData=r.test_report},r=>{console.log(r)},()=>{this._messageService.sendMessage("test_report_for_module_retrieved")})}getErrors(r,C="required"){var M;return null===(M=this.setupMonitorGroup.controls[r].errors)||void 0===M?void 0:M[C]}resetForm(){var r;this.changeDetection.detectChanges(),this.setupMonitorGroup.reset(),this.setupMonitorGroup.patchValue({selectedPlaceId:null===(r=this.places.currentPlace)||void 0===r?void 0:r.id})}removeValidationOfFormControl(r){this.setupMonitorGroup.get(r).reset(),this.setupMonitorGroup.get(r).clearValidators(),this.setupMonitorGroup.get(r).updateValueAndValidity()}getLatLongValidators(){return this.hasAnySharingSelected?[s.kI.required,s.kI.pattern("^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?),\\s*[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$"),this.minimumDigitsAfterDotValidator(4)]:[]}get isChipIdFieldValid(){var r,C,M;const ne=this.setupMonitorGroup.value;return 12===(null===(r=ne.chipID)||void 0===r?void 0:r.length)||ne.modelName===D.c._I1DIY&&((null===(C=ne.chipID)||void 0===C?void 0:C.length)%6==0||(null===(M=ne.chipID)||void 0===M?void 0:M.length)<6)}get isLocationNameValid(){return this.setupMonitorGroup.value.locationName.length>3}get isIndoorMonitor(){return"indoorOne"===this.onboardingService.typeOfMonitor}get hasIndoorSharingSelected(){var r,C;return!!(null===(C=null===(r=this.setupMonitorGroup)||void 0===r?void 0:r.get("isSharingIndoors"))||void 0===C?void 0:C.value)}get hasOutdoorSharingSelected(){var r,C,M,ne,ge,Ee,Ae,Oe;return!!((null===(C=null===(r=this.setupMonitorGroup)||void 0===r?void 0:r.get("isSharingWithAgApi"))||void 0===C?void 0:C.value)||(null===(ne=null===(M=this.setupMonitorGroup)||void 0===M?void 0:M.get("isSharingWithOpenAq"))||void 0===ne?void 0:ne.value)||(null===(Ee=null===(ge=this.setupMonitorGroup)||void 0===ge?void 0:ge.get("isSharingWithIqAir"))||void 0===Ee?void 0:Ee.value)||(null===(Oe=null===(Ae=this.setupMonitorGroup)||void 0===Ae?void 0:Ae.get("isSharingWithAgMap"))||void 0===Oe?void 0:Oe.value))}get hasAnySharingSelected(){return this.isIndoorMonitor?this.hasIndoorSharingSelected:this.hasOutdoorSharingSelected}get isOutdoorMonitorWithSharedData(){return!this.isIndoorMonitor&&this.hasOutdoorSharingSelected}handleSharingDataOptionsChange(r,C){this.setupMonitorGroup.controls[r].setValue(C)}onSubmit(){var r,C;const M=this.setupMonitorGroup.value;if(this.isChipIdFieldValid&&this.isLocationNameValid){if(this.location.share_indoor_data=!!this.isIndoorMonitor&&M.isSharingIndoors,this.location.public=!this.isIndoorMonitor&&M.isSharingWithAgApi,this.location.share_with_iqair=!this.isIndoorMonitor&&M.isSharingWithIqAir,this.location.share_with_ag_map=!this.isIndoorMonitor&&M.isSharingWithAgMap,this.location.share_with_openaq=!this.isIndo
1orMonitor&&M.isSharingWithOpenAq,this.location.latitude=+(null===(r=M.latLong)||void 0===r?void 0:r.split(",")[0]),this.location.longitude=+(null===(C=M.latLong)||void 0===C?void 0:C.split(",")[1]),this.location.public_name=this.isIndoorMonitor?null:M.locationPublicName,this.contributeDataService.checkIsContributeYourDataShown(this.location))return void this.contributeDataService.validateLocation(M.latLong,this.setupMonitorGroup.controls.latLong,()=>this.saveLocationInfo(M));this.saveLocationInfo(M)}else this.setupMonitorGroup.controls.chipID.setErrors(this.isChipIdFieldValid?null:{incorrect:!0}),this.setupMonitorGroup.controls.locationName.setErrors(this.isLocationNameValid?null:{incorrect:!0})}saveLocationInfo(r=this.setupMonitorGroup.value){this.isRequestInProgress=!0,this.location.name=r.locationName,r.publicContributorName&&(this.places.currentPlace.public_contributor_name=r.publicContributorName,this.places.savePlace(this.places.currentPlace,!1)),this.sensorServices.addSensorAndLocation(r.selectedPlaceId,this.location,r.chipID.toLowerCase(),r.modelName)}}return g.\u0275fac=function(r){return new(r||g)(e.\u0275\u0275directiveInject(y.e),e.\u0275\u0275directiveInject(s.qu),e.\u0275\u0275directiveInject(z.K),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(t.E),e.\u0275\u0275directiveInject(w),e.\u0275\u0275directiveInject(V.r),e.\u0275\u0275directiveInject(B.J),e.\u0275\u0275directiveInject(J.p))},g.\u0275cmp=e.\u0275\u0275defineComponent({type:g,selectors:[["app-setup-monitor-widget"]],inputs:{embedded:"embedded",stepper:"stepper"},decls:17,vars:12,consts:[["fxLayout","column","fxLayoutGap","15px",3,"formGroup","ngSubmit"],[4,"ngIf"],["formControlName","modelName","name","model",1,"radio-group-wrapper-column"],["class","radio-group-wrapper-column",4,"ngIf"],["mat-button","","type","submit",1,"button-primary",3,"disabled"],[3,"isAccentWarning","subHeader",4,"ngIf"],[3,"isAccentWarning","subHeader"],["warning",""],["href","https://www.airgradient.com/documentation/kb/find-serial-number","target","_blank",1,"accent-link"],[3,"value"],[1,"radio-group-wrapper-column"],[1,"form-field-responsive-s",3,"hintLabel"],["matInput","","required","","maxlength","12","formControlName","chipID","appRegexInputValidation","",3,"regexString","isLowerCaseOnly","errorStateMatcher"],["align","end"],[1,"form-field-error"],[4,"ngIf","ngIfElse"],["setup",""],[1,"form-field-responsive-s"],["matInput","","required","","maxlength","90","type","text","name","name","formControlName","locationName",3,"errorStateMatcher"],["minLabelLength",""],["formControlName","selectedPlaceId"],[3,"value",4,"ngFor","ngForOf"],[3,"isSharingWithAgApi","isSharingWithAgMap","isSharingWithOpenAq","indoors","isSharingIndoors","isSharingIndoorsChange","isSharingWithAgApiChange","isSharingWithOpenAqChange","isSharingWithIqAirChange","isSharingWithAgMapChange"],["class","form-field-responsive-s spacer-left-sm",4,"ngIf"],[1,"form-field-responsive-s","spacer-left-sm"],["matInput","","required","","type","text","placeholder","Enter the latitude, longitude","formControlName","latLong","appRegexInputValidation","",3,"regexString","isLowerCaseOnly","errorStateMatcher"],["mat-icon-button","","matSuffix","","type","button","matTooltip","Select on map",3,"click"],["class","form-field-error",4,"ngIf"],[1,"spacer-left-sm"],[1,"spacer-top-nil"],[1,"inline-hint-icon"],["href","https://www.google.com/maps/","target","_blank",1,"accent-link"],["href","https://www.openstreetmap.org/#map=2/33.6/-0.7","target","_blank",1,"accent-link"],["matInput","","formControlName","publicContributorName","name","locationPublic","type","text","placeholder","Enter public contributor name"],["align","start"],["matInput","","required","","type","text","formControlName","locationPublicName","placeholder","Enter the public name (e.g. for map)",3,"errorStateMatcher"]],template:function(r,C){if(1&r&&(e.\u0275\u0275elementStart(0,"mat-card-content")(1,"form",0),e.\u0275\u0275listener("ngSubmit",function(){return C.onSubmit()}),e.\u0275\u0275template(2,u,3,1,"mat-card-header",1),e.\u0275\u0275template(3,U,3,2,"ng-container",1),e.\u0275\u0275elementStart(4,"p")(5,"strong"),e.\u0275\u0275text(6,"Select model:"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"mat-radio-group",2),e.\u0275\u0275template(8,x,13,4,"ng-container",1),e.\u0275\u0275template(9,b,13,4,"ng-container",1),e.\u0275\u0275template(10,A,5,2,"ng-container",1),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(11,Z,3,0,"p",1),e.\u0275\u0275template(12,Me,20,12,"div",3),e.\u0275\u0275template(13,we,3,6,"ng-container",1),e.\u0275\u0275elementStart(14,"div")(15,"button",4),e.\u0275\u0275text(16,"Add"),e.\u0275\u0275elementEnd()()()()),2&r){let M,ne,ge,Ee;e.\u0275\u0275advance(1),e.\u0275\u0275property("formGroup",C.setupMonitorGroup),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!C.embedded),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",(null==(M=C.setupMonitorGroup.get("modelName"))?null:M.value)&&C.onboardingService.typeOfConnection),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf","indoorOne"===C.onboardingService.typeOfMonitor),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","o
1penAir"===C.onboardingService.typeOfMonitor),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","openAirMax"===C.onboardingService.typeOfMonitor),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==(ne=C.setupMonitorGroup.get("modelName"))?null:ne.value),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",null==(ge=C.setupMonitorGroup.get("modelName"))?null:ge.value),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",(null==(Ee=C.setupMonitorGroup.get("modelName"))?null:Ee.value)&&C.isShareDataOptionsVisible),e.\u0275\u0275advance(2),e.\u0275\u0275classProp("spinner",C.isRequestInProgress),e.\u0275\u0275property("disabled",!C.setupMonitorGroup.valid)}},directives:[ce.dn,s._Y,s.JL,me.xw,me.SQ,s.sg,F.NgIf,ce.dk,ce.n5,xe.R,ye.Hw,n.VQ,s.JJ,s.u,n.U0,he.KE,he.hX,Ce.gD,F.NgForOf,re.ey,fe.Nt,s.Fj,s.Q7,s.nD,_e.J,he.bx,he.TO,be.D,Se.lW,he.R9,se.gM],styles:[".inline-hint-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;color:var(--primaryColor600)}"],data:{animation:[l.v]}}),g})();function De(g,L){1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"li")(2,"p"),e.\u0275\u0275text(3," Power the monitor through a USB cable or the internal batteries. In order to use the batteries press the two position switch at the bottom of the monitor. Typically the batteries of a new device should be charged, in case that they seem empty then use a USB cable. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"li")(5,"p"),e.\u0275\u0275text(6," Ensure that the blue LED at the bottom of the device is turned on. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"li")(8,"p"),e.\u0275\u0275text(9," Once the monitor has successfully connected to the mobile network, its LED will blink 3 times slowly. This can take several minutes. Alternatively verify on the Dashboard that the device comes online and sends data. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"li")(11,"p"),e.\u0275\u0275text(12," In case that the device doesn\u2019t come online for several hours please provide the device logs to "),e.\u0275\u0275elementStart(13,"a",3),e.\u0275\u0275text(14," our support "),e.\u0275\u0275elementStart(15,"mat-icon"),e.\u0275\u0275text(16,"open_in_new"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275text(17,". "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(18,"li")(19,"p"),e.\u0275\u0275text(20," Make sure that the solar panel is plugged into the device when you deploy the device outside. Observe a day later if the battery gets charged. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(21,"li")(22,"p"),e.\u0275\u0275text(23," Choose the final mounting location for the monitor unit. Look for a spot with good natural airflow, away from enclosed spaces or direct obstructions to the monitor's sensor vents. Crucially, the location must allow the solar panel to receive direct sunlight for at least a few hours throughout the day, minimising shadows from buildings or trees. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd())}function Le(g,L){1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"li")(2,"p"),e.\u0275\u0275text(3," Power the monitor using the provided USB cable. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"li")(5,"p"),e.\u0275\u0275text(6," Make sure the blue LED at the bottom of the device is turned on. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"li")(8,"p"),e.\u0275\u0275text(9," Once the monitor connects to the mobile network, the LED will blink slowly three times. This may take a few minutes. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"li")(11,"p"),e.\u0275\u0275text(12," Alternatively, you can verify on the Dashboard if the device has come online and started sending data. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(13,"li")(14,"p"),e.\u0275\u0275text(15," If the device doesn\u2019t come online within a few hours, please collect and send the device logs to our support team. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd())}function Ne(g,L){1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"li")(2,"p"),e.\u0275\u0275text(3," Power the monitor using the USB-C cable. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(4,"li")(5,"p"),e.\u0275\u0275text(6," Make sure the blue LED at the bottom of the device is turned on. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"li")(8,"p"),e.\u0275\u0275text(9," Once the monitor connects to the mobile network, the LED will blink slowly three times. This may take a few minutes depending on signal strength. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"li")(11,"p"),e.\u0275\u0275text(12," Alternatively, check the AirGradient Dashboard to confirm that the device is online and sending data. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(13,"li")(14,"p"),e.\u0275\u0275text(15," If the device does not appear online within a few hours, please provide the device logs to our support team "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd())}function Re(g,L){if(1&g&&(e.\u0275\u0275elementStart(0,"ul"),e.\u0275\u0275template(1,De,24,0,"ng-container",2),e.\u0275\u0275template(2,Le,16,0,"ng-container",2),e.\u0275\u0275template(3,Ne,16,0,"ng-container",2),e.\u0275\u0275elementEnd()),2&g){const r=e.\u0275\u0275nextContext();
1e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","openAirMax"===r.onboardingService.typeOfMonitor),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","indoorOne"===r.onboardingService.typeOfMonitor),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","openAir"===r.onboardingService.typeOfMonitor)}}function Be(g,L){1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"ul")(2,"li")(3,"p"),e.\u0275\u0275text(4," Connect the monitor to a "),e.\u0275\u0275elementStart(5,"b"),e.\u0275\u0275text(6,"5 V, 2 A power supply"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(7," and wait until the display shows "),e.\u0275\u0275elementStart(8,"b"),e.\u0275\u0275text(9,"\u201c180s to connect to airgradient-xxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(10,". "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"li")(12,"p"),e.\u0275\u0275text(13," The monitor will broadcast a WiFi hotspot named "),e.\u0275\u0275elementStart(14,"b"),e.\u0275\u0275text(15,"\u201cairgradient-xxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(16,". The characters represented by "),e.\u0275\u0275elementStart(17,"b"),e.\u0275\u0275text(18,"\u201cxxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(19," here are the monitor\u2019s serial number. Connect to the hotspot using a smartphone or laptop and the password: "),e.\u0275\u0275elementStart(20,"b"),e.\u0275\u0275text(21,"cleanair"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(22,"li")(23,"p"),e.\u0275\u0275text(24," Stay connected to the hotspot even if your smartphone reports that the hotspot has no internet access. The WiFi Manager should open automatically. If it does not, open "),e.\u0275\u0275elementStart(25,"b"),e.\u0275\u0275text(26,"192.168.4.1"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(27," in your smartphone\u2019s browser while still connected to "),e.\u0275\u0275elementStart(28,"b"),e.\u0275\u0275text(29,"\u201cairgradient-xxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(30,". "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(31,"li")(32,"p"),e.\u0275\u0275text(33," Tap "),e.\u0275\u0275elementStart(34,"b"),e.\u0275\u0275text(35,"\u201cConfigure WiFi,\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(36," enter your WiFi credentials, and tap "),e.\u0275\u0275elementStart(37,"b"),e.\u0275\u0275text(38,"\u201cSave.\u201d"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(39,"li")(40,"p"),e.\u0275\u0275text(41," Once connected to your WiFi network, the monitor will display a success message and begin showing air quality data. "),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(42,"p"),e.\u0275\u0275text(43," You have approximately "),e.\u0275\u0275elementStart(44,"b"),e.\u0275\u0275text(45,"180 seconds"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(46," to complete this process. If the setup times out, reboot the monitor and start again. The monitor only supports "),e.\u0275\u0275elementStart(47,"b"),e.\u0275\u0275text(48,"2.4 GHz"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(49," networks. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(50,"p"),e.\u0275\u0275text(51," If you have trouble connecting, follow the detailed guide: "),e.\u0275\u0275elementStart(52,"a",5),e.\u0275\u0275text(53," Connecting Your AirGradient ONE to WiFi "),e.\u0275\u0275elementStart(54,"mat-icon"),e.\u0275\u0275text(55,"open_in_new"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementContainerEnd())}function Ge(g,L){1&g&&(e.\u0275\u0275elementStart(0,"ul")(1,"li")(2,"p"),e.\u0275\u0275text(3," Connect the monitor to a "),e.\u0275\u0275elementStart(4,"b"),e.\u0275\u0275text(5,"5 V, 2 A power supply"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(6,". "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"li")(8,"p"),e.\u0275\u0275text(9," The monitor will broadcast a WiFi hotspot named "),e.\u0275\u0275elementStart(10,"b"),e.\u0275\u0275text(11,"\u201cairgradient-xxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(12,". The 12 characters represented by "),e.\u0275\u0275elementStart(13,"b"),e.\u0275\u0275text(14,"\u201cxxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(15," here are the monitor\u2019s serial number. Connect to the hotspot using a smartphone or laptop and the password: "),e.\u0275\u0275elementStart(16,"b"),e.\u0275\u0275text(17,"cleanair"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(18,"li")(19,"p"),e.\u0275\u0275text(20," Stay connected if your device reports that the hotspot has no internet access. The WiFi Manager should open automatically. If it does not, open "),e.\u0275\u0275elementStart(21,"b"),e.\u0275\u0275text(22,"192.168.4.1"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(23," in your browser while still connected to "),e.\u0275\u0275elementStart(24,"b"),e.\u0275\u0275text(25,"\u201cairgradient-xxxxxxxxxxxx\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(26,". "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(27,"li")(28,"p"),e.\u0275\u0275text(29," Tap "),e.\u0275\u0275elementStart(30,"b"),e.\u0275\u0275text(31,"\u201cConfigure WiFi,\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(32," enter your WiFi credentials, and tap "),e.\u0275\u0275elementStart(33,"b"),e.\u0275\u0275text(34,"\u201cSave.\u201d"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(35," The LED will turn off while the monitor connects. "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(36,"li")(37,"p"),e.\u0275\u0275text(38," Once successfully connected, the LED will blink slowly twice and then turn off. This indicates that the monitor is connected and operating normally. "),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(39,"p"),e.\u0275\u0275text(40," The monitor only supports "),e.\u0275\u0275elementStart(41,"b"),e.\u0275\u0275text(42,"2.4 GHz"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(43," networks. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(44,"p"),e.\u0275\u0275text(45," If you have trouble connecting, follow the detailed guide: "),e.\u0275\u0275elementStart(46,"a",6),e.\u0275\u0275text(47," Connecting Your AirGradient Open Air to WiFi "),e.\u0275\u0275elementStart(48,"mat-icon"),e.\u0275\u0275text(49,"open_in_new"),e.\u0275\u0275elementEnd()()())}function We(g,L){if(1&g&&(e.\u0275\u0275elementStart(0,"p")(1,"b"),e.\u0275\u0275text(2,"Note:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(3," If your monitor is already connected to WiFi, you can skip this 
1step. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(4,Be,56,0,"ng-container",0),e.\u0275\u0275template(5,Ge,50,0,"ng-template",null,4,e.\u0275\u0275templateRefExtractor)),2&g){const r=e.\u0275\u0275reference(6),C=e.\u0275\u0275nextContext();e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf","indoorOne"===C.onboardingService.typeOfMonitor)("ngIfElse",r)}}let Fe=(()=>{class g{constructor(r){this.onboardingService=r}}return g.\u0275fac=function(r){return new(r||g)(e.\u0275\u0275directiveInject(w))},g.\u0275cmp=e.\u0275\u0275defineComponent({type:g,selectors:[["app-partial-diy-wifi-connection"]],inputs:{typeOfMonitor:"typeOfMonitor"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["wifiInstructions",""],[4,"ngIf"],["href","https://www.airgradient.com/support/","target","_blank",1,"accent-link"],["monitorWithoutDisplay",""],["href","https://www.airgradient.com/documentation/kb/connecting-your-airgradient-one-to-wifi","target","_blank",1,"accent-link"],["href","https://www.airgradient.com/documentation/kb/connecting-your-airgradient-open-air-to-wifi","target","_blank",1,"accent-link"]],template:function(r,C){if(1&r&&(e.\u0275\u0275template(0,Re,4,3,"ul",0),e.\u0275\u0275template(1,We,7,2,"ng-template",null,1,e.\u0275\u0275templateRefExtractor)),2&r){const M=e.\u0275\u0275reference(2);e.\u0275\u0275property("ngIf","cellular"===C.onboardingService.typeOfConnection)("ngIfElse",M)}},directives:[F.NgIf,ye.Hw],styles:[""]}),g})();var Ue=o(3568),Ve=o(68555);const je=["manual_setup_stepper"],ze=function(){return{display:"block"}};function Ke(g,L){1&g&&(e.\u0275\u0275elementStart(0,"app-intro-hint",11)(1,"span",12),e.\u0275\u0275text(2," A calibration formula for the PM sensor has been automatically applied to enhance the accuracy. You can change this at any time in the Advanced Settings of the monitor. "),e.\u0275\u0275element(3,"br"),e.\u0275\u0275text(4," Learn more about "),e.\u0275\u0275elementStart(5,"a",13),e.\u0275\u0275text(6," PMS5003 Calibrations "),e.\u0275\u0275elementStart(7,"mat-icon"),e.\u0275\u0275text(8,"open_in_new"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275text(9,". "),e.\u0275\u0275elementEnd()()),2&g&&e.\u0275\u0275property("ngStyle",e.\u0275\u0275pureFunction0(2,ze))("showHideButton",!1)}const ke=function(){return["/dashboard"]};function He(g,L){if(1&g){const r=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",14)(1,"button",15),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(r),e.\u0275\u0275nextContext(2).onAddAnotherSensor()}),e.\u0275\u0275text(2," Add another Monitor "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(3,"button",16),e.\u0275\u0275text(4," To Dashboard "),e.\u0275\u0275elementEnd()()}2&g&&(e.\u0275\u0275advance(3),e.\u0275\u0275property("routerLink",e.\u0275\u0275pureFunction0(1,ke)))}function Qe(g,L){if(1&g){const r=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"mat-vertical-stepper",1,2),e.\u0275\u0275listener("selectionChange",function(M){return e.\u0275\u0275restoreView(r),e.\u0275\u0275nextContext().onStepSelectionChange(M)}),e.\u0275\u0275elementStart(2,"mat-step",3),e.\u0275\u0275element(3,"app-setup-monitor-widget",4),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"mat-step",5),e.\u0275\u0275pipe(5,"titlecase"),e.\u0275\u0275element(6,"app-partial-diy-wifi-connection",6),e.\u0275\u0275elementStart(7,"button",7),e.\u0275\u0275text(8," Next step "),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(9,"mat-step",8),e.\u0275\u0275template(10,Ke,10,3,"app-intro-hint",9),e.\u0275\u0275elementStart(11,"p"),e.\u0275\u0275text(12,"Please repeat the steps until you have all you monitors connected. Then you can visit the dashboard."),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(13,"p"),e.\u0275\u0275text(14," Note that it might take a few minutes before the first data arrives on the dashboard. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(15,He,5,2,"div",10),e.\u0275\u0275elementEnd()()}if(2&g){const r=e.\u0275\u0275reference(1),C=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275property("completed",C.onboardingService.typeOfConnection),e.\u0275\u0275advance(1),e.\u0275\u0275property("stepper",r)("embedded",!0),e.\u0275\u0275advance(1),e.\u0275\u0275property("label",C.onboardingService.typeOfConnection?"Connect to "+e.\u0275\u0275pipeBind1(5,7,C.onboardingService.typeOfConnection):"Connect to Wifi/Cellular"),e.\u0275\u0275advance(2),e.\u0275\u0275property("typeOfMonitor",C.onboardingService.typeOfMonitor),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",C.isCorrectionApplied),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",!C.embedded)}}let Je=(()=>{class g{constructor(r,C,M,ne,ge,Ee){this.onboardingService=r,this._messageService=C,this.sensorServices=M,this.placesService=ne,this.locationsServices=ge,this.correctionService=Ee,this.embedded=!1,this.DONE_STEP_INDEX=2,this.destroy$=new i.xQ}ngOnInit(){this._messageService.listenMessage().pipe((0,a.R)(this.destroy$)).subscribe(r=>{var C,M;"type_of_setup_changed"===r&&this.resetStepper(),"addAnotherMonitor"===r&&this.onAddAnotherSensor(),"test_report_for_module_retrieved"===r&&((null===(C=this.sensorServices.testReportData)||void 0===C?void 0:C.testReportVersion)<2&&(this.requiredCorrection=this.correctionService.checkIfPlantowerCorrectionNeed(this.sensorServices.testReportData.referenceData.dateTo)),(null===(M=this.sensorServices.testReportData)||void 0===M?void 0:M.testReportVersion)>=2?this.locationsServices.savePM02CorrectionFormula(this.placesService.currentPlace.id,this.sensorServices.lastCreatedMonitorLocation.id,{plantower_pm2_correction_algo:G.J7.factory_calibration}):this.requiredCorrection&&this.sensorServices.savePM_SLRCorrectionConfig(this.placesService.currentPlace.id,this.sensorServices.lastCreatedMonitorLocation.sensor_id,this.sensorServices.lastCreatedMonitorLocation.id,{pm2_slr_scaling_factor:H.lC[this.requiredCorrection].factorParams.scalingFactor,pm2_slr_intercept:H.lC[this.requiredCorrection].factorParams.intercept,pm2_slr_use_epa_2021:!1},{plantower_pm2_correction_algo:this.requiredCorrection})),"pm_correction_formula_updated"===r&&(this.isCorrectionApplied=!0)})}onStepSelectionChange(r){!this.embedded||this._messageService.sendMessage(r.selectedIndex===this.DONE_STEP_INDEX?"monitor_setup_done":"monitor_setup_reset")}onAddAnotherSensor(){this.resetStepper(),this._messageService.sendMessage("resetMainStepper")}resetStepper(){var r;null===(r=this.manualSetupStepper)||void 0===r||r.reset()}}return g.\u0275fac=function(r){return new(r||g)(e.\u0275\u0275directiveInject(w),e.\u0275\u0275directiveInject(y.e),e.\u0275\u0275directiveInject(z.K),e.\u0275\u0275directiveInject(t.E),e.\u0275\u0275directiveInject(q.z),e.\u0275\u0275directiveInject(k.i))},g.\u0275cmp=e.\u0275\u0275defineComponent({type:g,selectors:[["app-setup-monitor-step"]],viewQuery:function(r,C){if(1&r&&e.\u0275\u0275viewQuery(je,5),2&r){let M;e.\u0275\u0275queryRefresh(M=e.\u0275\u0275loadQuery())&&(C.manualSetupStepper=M.first)}},inputs:{embedded:"embedded"},decls:1,vars:1,consts:[["class","responsive-vertical-stepper","linear","","appMatVerticalStepperScroller","",3,"selectionChange",4,"ngIf"],["linear","","appMatVerticalStepperScroller","",1,"responsive-vertical-stepper",3,"selectionChange"],["manual_setup_stepper",""],["label","Add to Dashboard","state","dashboard",3,"completed"],[3,"stepper","embedded"],["state","wifi",3,"label"],[3,"typeOfMonitor"],["mat-button","","type","button","matStepperNext","",1,"button-primary","spacer-top-sm"],["label","Done","state","sync"],["class","spacer-top-sm",3,"ngStyle","showHideButton",4,"ngIf"],["class","controls-wrapper",4,"ngIf"],[1,"spacer-top-sm",3,"ngStyle","showHideButton"],["
1id","desktop"],["href","https://www.airgradient.com/blog/update-on-pms5003-calibration/","target","_blank",1,"accent-link"],[1,"controls-wrapper"],["mat-button","","type","button",1,"button-secondary","spacer-top-sm",3,"click"],["mat-button","","type","button","matStepperNext","",1,"button-primary","spacer-top-sm",3,"routerLink"]],template:function(r,C){1&r&&e.\u0275\u0275template(0,Qe,16,9,"mat-vertical-stepper",0),2&r&&e.\u0275\u0275property("ngIf",!!C.onboardingService.typeOfMonitor)},directives:[F.NgIf,O.Vq,W,O.C0,Te,Fe,Se.lW,O.Ic,Ue.$,T.Zl,F.NgStyle,ye.Hw,Ve.rH],pipes:[F.TitleCasePipe],styles:[".controls-wrapper[_ngcontent-%COMP%]{display:flex;gap:20px;align-items:center;flex-wrap:wrap}"]}),g})();const Ye=["mainStepper"];function $e(g,L){1&g&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"span"),e.\u0275\u0275text(2,"Select your monitor"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd())}function Ze(g,L){1&g&&e.\u0275\u0275element(0,"img",21),2&g&&e.\u0275\u0275property("@slowAppearing",void 0)}function Xe(g,L){1&g&&e.\u0275\u0275element(0,"img",22),2&g&&e.\u0275\u0275property("@slowAppearing",void 0)}function qe(g,L){1&g&&e.\u0275\u0275element(0,"img",23),2&g&&e.\u0275\u0275property("@slowAppearing",void 0)}function et(g,L){if(1&g&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275text(1,"Selected monitor:"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(2,Ze,1,1,"img",18),e.\u0275\u0275template(3,Xe,1,1,"img",19),e.\u0275\u0275template(4,qe,1,1,"img",20)),2&g){const r=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("@slowAppearing",void 0),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf","indoorOne"===r.onboardingService.typeOfMonitor),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","openAir"===r.onboardingService.typeOfMonitor),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf","openAirMax"===r.onboardingService.typeOfMonitor)}}function tt(g,L){if(1&g&&(e.\u0275\u0275elementStart(0,"div",15),e.\u0275\u0275template(1,$e,3,0,"ng-container",16),e.\u0275\u0275template(2,et,5,4,"ng-template",null,17,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275elementEnd()),2&g){const r=e.\u0275\u0275reference(3),C=e.\u0275\u0275nextContext();e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!C.onboardingService.typeOfMonitor)("ngIfElse",r)}}const Pe=function(g){return{faded:g}};let nt=(()=>{class g{constructor(r,C,M){this._formBuilder=r,this._messageService=C,this.onboardingService=M,this.embedded=!1,this.isPortrait=m.gr,this.destroy$=new i.xQ}ngOnInit(){this.firstStepFormGroup=this._formBuilder.group({typeOfMonitor:["",s.kI.required]}),this.firstStepFormGroup.valueChanges.pipe((0,a.R)(this.destroy$)).subscribe(r=>{this.onboardingService.typeOfMonitor=r.typeOfMonitor,this.onboardingService.changeOfSetupOptions(),this.mainStepper.next()}),this._messageService.listenMessage().pipe((0,a.R)(this.destroy$)).subscribe(r=>{"resetMainStepper"===r&&this.mainStepper.reset()})}ngOnDestroy(){this.onboardingService.typeOfMonitor="",this.destroy$.next(),this.destroy$.complete()}}return g.\u0275fac=function(r){return new(r||g)(e.\u0275\u0275directiveInject(s.qu),e.\u0275\u0275directiveInject(y.e),e.\u0275\u0275directiveInject(w))},g.\u0275cmp=e.\u0275\u0275defineComponent({type:g,selectors:[["app-setup-new-sensor"]],viewQuery:function(r,C){if(1&r&&e.\u0275\u0275viewQuery(Ye,5),2&r){let M;e.\u0275\u0275queryRefresh(M=e.\u0275\u0275loadQuery())&&(C.mainStepper=M.first)}},inputs:{embedded:"embedded"},features:[e.\u0275\u0275ProvidersFeature([{provide:c.gx,useValue:{displayDefaultIndicatorType:!1}}])],decls:21,vars:14,consts:[["linear","",3,"labelPosition"],["mainStepper",""],["state","cast","errorMessage","Monitor is required.",3,"stepControl"],["matStepLabel",""],[3,"formGroup"],["aria-label","Select sensor","formControlName","typeOfMonitor",1,"monitor-radio-button-group"],["value","indoorOne",3,"ngClass","click"],["src","/assets/oneSensor.webp","alt","indoorMonitorImage",1,"monitor-image",2,"height","150px"],[1,"radio-button-text"],["value","openAir",3,"ngClass","click"],["src","/assets/openAirMonitor.webp","alt","openAirImage",1,"monitor-image",2,"height","150px"],["value","o
1penAirMax",3,"ngClass","click"],["src","/assets/open-air-max.webp","alt","openAirMaxImage",1,"monitor-image",2,"min-width","280px"],["label","Setup","state","settings"],[3,"embedded"],[1,"stepper-label-content"],[4,"ngIf","ngIfElse"],["chosenMonitor",""],["src","/assets/oneSensor.webp","alt","AirGradient ONE Indoor monitor image thumbnail","width","30",4,"ngIf"],["src","/assets/openAirMonitor.webp","alt","AirGradient Open Air Outdoor monitor image thumbnail","width","30",4,"ngIf"],["src","/assets/open-air-max.webp","alt","AirGradient Open Air Max Outdoor monitor image thumbnail","width","45",4,"ngIf"],["src","/assets/oneSensor.webp","alt","AirGradient ONE Indoor monitor image thumbnail","width","30"],["src","/assets/openAirMonitor.webp","alt","AirGradient Open Air Outdoor monitor image thumbnail","width","30"],["src","/assets/open-air-max.webp","alt","AirGradient Open Air Max Outdoor monitor image thumbnail","width","45"]],template:function(r,C){if(1&r){const M=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div")(1,"mat-horizontal-stepper",0,1)(3,"mat-step",2),e.\u0275\u0275template(4,tt,4,2,"ng-template",3),e.\u0275\u0275elementStart(5,"form",4)(6,"mat-radio-group",5)(7,"mat-radio-button",6),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(M),e.\u0275\u0275reference(2).next()}),e.\u0275\u0275element(8,"img",7),e.\u0275\u0275elementStart(9,"p",8),e.\u0275\u0275text(10,"AirGradient ONE / BASIC / DIY PRO"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"mat-radio-button",9),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(M),e.\u0275\u0275reference(2).next()}),e.\u0275\u0275element(12,"img",10),e.\u0275\u0275elementStart(13,"p",8),e.\u0275\u0275text(14,"AirGradient Open Air"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(15,"mat-radio-button",11),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(M),e.\u0275\u0275reference(2).next()}),e.\u0275\u0275element(16,"img",12),e.\u0275\u0275elementStart(17,"p",8),e.\u0275\u0275text(18,"AirGradient Open Air Max"),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(19,"mat-step",13),e.\u0275\u0275element(20,"app-setup-monitor-step",14),e.\u0275\u0275elementEnd()()()}2&r&&(e.\u0275\u0275property("@slowAppearing",void 0),e.\u0275\u0275advance(1),e.\u0275\u0275property("labelPosition",C.isPortrait()?"bottom":"end"),e.\u0275\u0275advance(2),e.\u0275\u0275property("stepControl",C.firstStepFormGroup),e.\u0275\u0275advance(2),e.\u0275\u0275property("formGroup",C.firstStepFormGroup),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(8,Pe,!!C.onboardingService.typeOfMonitor&&"indoorOne"!==C.onboardingService.typeOfMonitor)),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(10,Pe,!!C.onboardingService.typeOfMonitor&&"openAir"!==C.onboardingService.typeOfMonitor)),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngClass",e.\u0275\u0275pureFunction1(12,Pe,!!C.onboardingService.typeOfMonitor&&"openAirMax"!==C.onboardingService.typeOfMonitor)),e.\u0275\u0275advance(5),e.\u0275\u0275property("embedded",C.embedded))},directives:[O.Vq,O.C0,O.VY,F.NgIf,s._Y,s.JL,s.sg,n.VQ,s.JJ,s.u,n.U0,T.oO,F.NgClass,Je],styles:["[_nghost-%COMP%]     .monitor-radio-button-group .mat-radio-label{height:100%;flex-direction:column-reverse;justify-content:space-between}[_nghost-%COMP%]     .monitor-radio-button-group .faded .mat-radio-label{opacity:.3;transition:.3s}[_nghost-%COMP%]     .faded .mat-radio-label:hover{opacity:1;transition:.2s}[_nghost-%COMP%]     .mat-radio-label-content{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:end}[_nghost-%COMP%]     .monitor-radio-button-group .mat-radio-button{width:350px;padding:var(--xs-size);font-weight:var(--mediumFontWeight)}[_nghost-%COMP%]     .monitor-radio-button-group .mat-radio-button:hover{background-color:var(--grayColor100);border-radius:10px;transition:.2s}[_nghost-%COMP%]     .mat-step-label{white-space:pre-wrap}.qr-header-icon[_ngcontent-%COMP%]{height:18px!important}.monitor-radio-button-group[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-around;flex-wrap:wrap}.radio-button-text[_ngcontent-%COMP%]{text-align:center}.stepper-label-content[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:3px}img[_ngcontent-%COMP%]{pointer-events:none}.monitor-image[_ngcontent-%COMP%]{height:100%;width:100%;max-height:200px;object-fit:contain}@media screen and (max-width: 668px){.radio-button-text[_ngcontent-%COMP%]{max-width:180px;white-space:initial}.stepper-label-content[_ngcontent-%COMP%]{max-width:60px}.monitor-image[_ngcontent-%COMP%]{width:140px;min-height:200px}[_nghost-%COMP%]     .monitor-radio-button-group{width:unset;flex-direction:row;justify-content:space-between}[_nghost-%COMP%]     .mat-radio-button .mat-radio-label{flex-direction:row;justify-content:space-around}[_nghost-%COMP%]     .mat-radio-label-content{width:100%}.mat-radio-button[_ngcontent-%COMP%]{width:100%}.second-step-direction[_ngcontent-%COMP%]{display:flex;flex-direction:column-reverse}}.mat-stepper-horizontal[_ngcontent-%COMP%]{min-height:calc(100vh - 65px)}"],data:{animation:[l.v]}}),g})()},67591:($,p,o)=>{"use strict";o.d(p,{O:()=>S});var c=o(8929),s=o(7625),i=o(35682),a=o(31545),l=o(92451),m=o(33342),e=o(67092),y=o(80540),w=o(32322),O=o(23353),F=o(34816),n=o(5e3),T=o(68555),z=o(15645),t=o(
171245),q=o(69808),G=o(77093),H=o(9224),k=o(23322),W=o(93075),te=o(67322),ae=o(98833),N=o(91079),K=o(90508),R=o(25245),D=o(77446),Q=o(45141),V=o(47423),B=o(51476);function Y(_,U){1&_&&(n.\u0275\u0275elementStart(0,"h3",28),n.\u0275\u0275text(1,"Setup Place"),n.\u0275\u0275elementEnd())}function J(_,U){1&_&&(n.\u0275\u0275elementStart(0,"p",29),n.\u0275\u0275text(1," Before setting up your monitor, you must setup the Place where the monitor will be located. A place can be a home, school, or office. A place can contain multiple locations. For example, a place named \u201cHome\u201d may contain locations such as \u201cLiving Room\u201d and \u201cBedroom\u201d. "),n.\u0275\u0275elementEnd())}function ce(_,U){1&_&&(n.\u0275\u0275elementStart(0,"mat-error"),n.\u0275\u0275text(1,"Minimum two letters"),n.\u0275\u0275elementEnd())}function me(_,U){1&_&&(n.\u0275\u0275elementStart(0,"mat-error"),n.\u0275\u0275text(1," Email is required "),n.\u0275\u0275elementEnd())}function xe(_,U){1&_&&(n.\u0275\u0275elementStart(0,"mat-error"),n.\u0275\u0275text(1," Incorrect email format "),n.\u0275\u0275elementEnd())}function ye(_,U){if(1&_){const x=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"mat-form-field",8)(1,"mat-label"),n.\u0275\u0275text(2,"Email"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(3,"input",30,31),n.\u0275\u0275listener("ngModelChange",function(A){return n.\u0275\u0275restoreView(x),n.\u0275\u0275nextContext(2).newplace.email=A}),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(5,"mat-hint"),n.\u0275\u0275text(6,"Email of the user who will be the owner of the place"),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(7,me,2,0,"mat-error",11),n.\u0275\u0275template(8,xe,2,0,"mat-error",11),n.\u0275\u0275elementEnd()}if(2&_){const x=n.\u0275\u0275reference(4),b=n.\u0275\u0275nextContext(2);n.\u0275\u0275advance(3),n.\u0275\u0275property("ngModel",b.newplace.email)("pattern",b.EMAIL_VALIDATION_STRING),n.\u0275\u0275advance(4),n.\u0275\u0275property("ngIf",null==x.errors?null:x.errors.required),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",null==x.errors?null:x.errors.pattern)}}function he(_,U){if(1&_&&(n.\u0275\u0275elementStart(0,"mat-option",32),n.\u0275\u0275text(1),n.\u0275\u0275elementEnd()),2&_){const x=U.$implicit;n.\u0275\u0275property("value",x.country),n.\u0275\u0275advance(1),n.\u0275\u0275textInterpolate1(" ",x.country," ")}}function Ce(_,U){1&_&&(n.\u0275\u0275elementStart(0,"mat-hint",33),n.\u0275\u0275text(1," Please, select a country from the list "),n.\u0275\u0275elementEnd())}function re(_,U){if(1&_&&(n.\u0275\u0275elementStart(0,"mat-option",32),n.\u0275\u0275text(1),n.\u0275\u0275elementEnd()),2&_){const x=U.$implicit;n.\u0275\u0275property("value",x.name),n.\u0275\u0275advance(1),n.\u0275\u0275textInterpolate1(" ",x.name," ")}}function fe(_,U){1&_&&(n.\u0275\u0275elementStart(0,"mat-hint",33),n.\u0275\u0275text(1," Please, select a timezone from the list "),n.\u0275\u0275elementEnd())}function _e(_,U){if(1&_){const x=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"mat-checkbox",34),n.\u0275\u0275listener("ngModelChange",function(A){return n.\u0275\u0275restoreView(x),n.\u0275\u0275nextContext(2).sendEmailInvitation=A}),n.\u0275\u0275text(1," Send Invitation Email "),n.\u0275\u0275elementEnd()}if(2&_){const x=n.\u0275\u0275nextContext(2);n.\u0275\u0275property("ngModel",x.sendEmailInvitation)}}function be(_,U){if(1&_){const x=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"button",42),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(x);const A=n.\u0275\u0275nextContext(3);return A.supportService.goToPlace(A.placeService.lastCreatedPlace.id,!1)}),n.\u0275\u0275text(1," Go to Place "),n.\u0275\u0275elementEnd()}}const Se=function(){return["/dashboard"]};function se(_,U){if(1&_&&(n.\u0275\u0275elementStart(0,"div",35)(1,"h3",36),n.\u0275\u0275text(2,"Recently Created Place"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(3,"p",37),n.\u0275\u0275text(4),n.\u0275\u0275element(5,"app-clipboard-copy",38),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(6,"p",39),n.\u0275\u0275text(7),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(8,"p"),n.\u0275\u0275text(9),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(10,"p"),n.\u0275\u0275text(11),n.\u0275\u0275pipe(12,"getCountryName"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(13,"p"),n.\u0275\u0275text(14),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(15,"a",40),n.\u0275\u0275template(16,be,2,0,"button",41),n.\u0275\u0275elementEnd()()),2&_){const x=n.\u0275\u0275nextContext(2);n.\u0275\u0275advance(4),n.\u0275\u0275textInterpolate1(" Place ID: ",x.placeService.last
1CreatedPlace.id," "),n.\u0275\u0275advance(1),n.\u0275\u0275property("copyValue",x.placeService.lastCreatedPlace.id),n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" Name: ",x.placeService.lastCreatedPlace.name," "),n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" Email: ",x.placeService.lastCreatedPlace.email," "),n.\u0275\u0275advance(2),n.\u0275\u0275textInterpolate1(" Country: ",n.\u0275\u0275pipeBind1(12,8,x.placeService.lastCreatedPlace.country_id)," "),n.\u0275\u0275advance(3),n.\u0275\u0275textInterpolate1(" Timezone: ",x.placeService.lastCreatedPlace.timezone_id," "),n.\u0275\u0275advance(1),n.\u0275\u0275property("routerLink",n.\u0275\u0275pureFunction0(10,Se)),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!!x.placeService.lastCreatedPlace&&x.userService.currentUser.support_staff)}}function u(_,U){if(1&_&&(n.\u0275\u0275elementStart(0,"span"),n.\u0275\u0275text(1),n.\u0275\u0275elementEnd()),2&_){const x=n.\u0275\u0275nextContext(2);n.\u0275\u0275advance(1),n.\u0275\u0275textInterpolate1(" Create ",x.isFormSubmitted?"Another":"New"," Place ")}}function f(_,U){1&_&&(n.\u0275\u0275elementStart(0,"span"),n.\u0275\u0275text(1," Next "),n.\u0275\u0275elementEnd())}const d=function(_){return{"box-shadow":_}},h=function(_){return{"form-field-error":_}};function v(_,U){if(1&_){const x=n.\u0275\u0275getCurrentView();n.\u0275\u0275elementStart(0,"section",1)(1,"mat-card",2)(2,"mat-card-content")(3,"div",3)(4,"div"),n.\u0275\u0275template(5,Y,2,0,"h3",4),n.\u0275\u0275template(6,J,2,0,"p",5),n.\u0275\u0275elementStart(7,"form",6,7)(9,"mat-form-field",8)(10,"mat-label"),n.\u0275\u0275text(11,"Name of Place"),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(12,"input",9,10),n.\u0275\u0275listener("ngModelChange",function(A){return n.\u0275\u0275restoreView(x),n.\u0275\u0275nextContext().newplace.name=A}),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(14,ce,2,0,"mat-error",11),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(15,ye,9,4,"mat-form-field",12),n.\u0275\u0275elementStart(16,"mat-form-field",13)(17,"input",14,15),n.\u0275\u0275listener("ngModelChange",function(A){return n.\u0275\u0275restoreView(x),n.\u0275\u0275nextContext().newplace.country=A})("ngModelChange",function(A){return n.\u0275\u0275restoreView(x),n.\u0275\u0275nextContext().applyCountryFilter(A)}),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(19,"mat-autocomplete",16,17),n.\u0275\u0275template(21,he,2,2,"mat-option",18),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(22,"mat-icon",19),n.\u0275\u0275listener("click",function(){return n.\u0275\u0275restoreView(x),n.\u0275\u0275nextContext().clearFilter("country")}),n.\u0275\u0275text(23,"clear "),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(24,Ce,2,0,"mat-hint",20),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(25,"mat-form-field",13)(26,"input",21,22),n.\u0275\u0275listener("ngModelChange",function(A){return n.\u0275\u0275restoreView(x),n.\u0275\u0275nextContext().newplace.timezone_id=A})("ngModelChange",function(A){return n.\u0275\u0275restoreView(x),n.\u0275\u0275nextContext().applyTimezoneFilter(A)}),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(28,"mat-autocomplete",16,23),n.\u0275\u0275template(30,re,2,2,"mat-option",18),n.\u0275\u0275elementEnd(),n.\u0275\u0275elementStart(31,"mat-icon",19),n.\u0275\u0275listener("click",function(){return n.\u0275\u0275restoreView(x),n.\u0275\u0275nextContext().clearFilter("timezone")}),n.\u0275\u0275text(32,"clear "),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(33,fe,2,0,"mat-hint",20),n.\u0275\u0275elementEnd(),n.\u0275\u0275template(34,_e,2,1,"mat-checkbox",24),n.\u0275\u0275elementEnd()(),n.\u0275\u0275template(35,se,17,11,"div",25),n.\u0275\u0275elementEnd()(),n.\u0275\u0275elementStart(36,"mat-card-actions",26)(37,"button",27),n.\u0275\u0275listener("click",function(){n.\u0275\u0275restoreView(x);const A=n.\u0275\u0275reference(8),Z=n.\u0275\u0275nextContext();return Z.createPlace(A,Z.isFormSubmitted)}),n.\u0275\u0275template(38,u,2,1,"span",11),n.\u0275\u0275template(39,f,2,0,"span",11),n.\u0275\u0275elementEnd()()()()}if(2&_){const x=n.\u0275\u0275reference(8),b=n.\u0275\u0275reference(13),A=n.\u0275\u0275reference(18),Z=n.\u0275\u0275reference(20),de=n.\u0275\u0275reference(27),ee=n.\u0275\u0275reference(29),j=n.\u0275\u0275nextContext();n.\u0275\u0275advance(1),n.\u0275\u0275property("ngStyle",n.\u0275\u0275pureFunction1(27,d,j.adminAccess?"none":"0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12)")),n.\u0275\u0275advance(4),n.\u0275\u0275property("ngIf",!j.adminAccess),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!j.adminAccess),n.\u0275\u0275advance(6),n.\u0275\u0275property("ngModel",j.newplace.name),n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",b.invalid),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",j.adminAccess),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngClass",n.\u0275\u0275pureFunction1(29,h,A.touched&&!j.checkOptionsListIncludeInputValue(j.newplace.country,"country"))),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngModel",j.newplace.country)("value",j.newplace.country)("matAutocomplete",Z),n.\u0275\u0275advance(2),n.\u0275\u0275property("displayWith",j.valueMapperCountry),n.\u0275\u0275advance(2),n.\u0275\u0275property("ngForOf",j.filteredDataCountry),n.\u0275\u0275advance(1),n.\u0275\u0275property("@hideInOut",j.newplace.country?"shown":"hidden"),n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",A.touched&&(!j.newplace.country||!j.checkOptionsListIncludeInputValue(j.newplace.country,"country"))),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngClass",n.\u0275\u0275pureFunction1(31,h,de.touched&&!j.checkOptionsListIncludeInputValue(j.newplace.timezone_id,"timezone"))),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngModel",j.newplace.timezone_id)("value",j.newplace.timezone_id)("matAutocomplete",ee),n.\u0275\u0275advance(2),n.\u0275\u0275property("displayWith",j.valueMapperTimezone),n.\u0275\u0275advance(2),n.\u0275\u0275property("ngForOf",j.filteredDataTimezone),n.\u0275\u0275advance(1),n.\u0275\u0275property("@hideInOut",j.newplace.timezone_id?"shown":"hidden"),n.\u0275\u0275advance(2),n.\u0275\u0275property("ngIf",de.touched&&(!j.newplace.timezone_id||!j.checkOptionsListIncludeInputValue(j.newplace.timezone_id,"timezone"))),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",j.adminAccess),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",j.adminAccess&&j.placeService.last
1CreatedPlace),n.\u0275\u0275advance(2),n.\u0275\u0275property("disabled",!x.valid||!j.checkOptionsListIncludeInputValue(j.newplace.timezone_id,"timezone")||!j.checkOptionsListIncludeInputValue(j.newplace.country,"country")),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",j.adminAccess),n.\u0275\u0275advance(1),n.\u0275\u0275property("ngIf",!j.adminAccess)}}let S=(()=>{class _{constructor(x,b,A,Z,de,ee,j,ue){this.route=x,this.dataServices=b,this.placeService=A,this._messageService=Z,this.router=de,this.userService=ee,this.supportService=j,this.permissionServices=ue,this.adminAccess=!1,this.newplace=new i.N,this.isFormSubmitted=!1,this.destroy$=new c.xQ,this.EMAIL_VALIDATION_STRING=F.L,this.valueMapperCountry=le=>{const pe=l.o.find(Me=>Me.id==le);if(pe)return pe.country},this.valueMapperTimezone=le=>{const pe=m.z.find(Me=>Me.id==le);if(pe)return pe.name}}ngOnInit(){var x,b;this.adminAccess=null!==(b=null===(x=this.route.snapshot.data)||void 0===x?void 0:x.adminAccess)&&void 0!==b?b:this.adminAccess,this.adminAccess&&(this.dataServices.currentScreen="Create New Place",this.placeService.currentPlace.name="Support Panel",this.placeService.staffMode="support_panel",this._messageService.sendMessage("place_changed")),this._messageService.listenMessage().pipe((0,s.R)(this.destroy$)).subscribe(A=>{"places_loaded"==A&&(this.adminAccess||this.redirectToLocations()),"place_created"===A&&this.adminAccess&&this.sendEmailInvitation&&this.permissionServices.getPermissions(this.placeService.lastCreatedPlace.id),"permissions_loaded"===A&&this.adminAccess&&this.permissionServices.emailInvitation(this.placeService.lastCreatedPlace,this.permissionServices.permissions[0].user_id)}),this.adminAccess?this.adminAccess&&JSON.parse(sessionStorage.getItem("lastCreatedPlace"))&&(this.placeService.lastCreatedPlace=JSON.parse(sessionStorage.getItem("lastCreatedPlace"))):this.redirectToLocations(),this.dataServices.appLoader=!0,this.filteredDataTimezone=m.z,this.filteredDataCountry=l.o}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.placeService.staffMode=null}redirectToLocations(){null!=this.placeService.currentPlace&&this.router.navigate(["onboarding/setup/sensors"])}applyCountryFilter(x){var b;this.filteredDataCountry=(x+="")?l.o.filter(A=>A.id+""===x||A.country.toLocaleLowerCase().indexOf(x.toLocaleLowerCase())>=0):l.o,this.newplace.country_id=null===(b=null==l.o?void 0:l.o.find(A=>A.country==this.newplace.country))||void 0===b?void 0:b.iso}applyTimezoneFilter(x){this.filteredDataTimezone=(x+="")?m.z.filter(b=>b.name.toLocaleLowerCase().indexOf(x.toLocaleLowerCase())>=0):m.z}clearFilter(x){"timezone"===x?(this.newplace.timezone_id="",this.filteredDataTimezone=m.z):(this.newplace.country="",this.filteredDataCountry=l.o)}createPlace(x,b=!1){if(b)b&&(this.newplace=new i.N,x.resetForm(),this.isFormSubmitted=!1);else{const A=m.z.find(Z=>Z.name.trim().toLowerCase()===this.newplace.timezone_id.trim().toLowerCase());this.placeService.addPlace(Object.assign(Object.assign({},this.newplace),{timezone_id:null==A?void 0:A.timezone}),!this.adminAccess),this.isFormSubmitted=!0}}checkOptionsListIncludeInputValue(x,b){var A;const Z=null===(A=null==x?void 0:x.trim())||void 0===A?void 0:A.toLowerCase();return Boolean("timezone"===b?m.z.find(de=>{var ee;return(null===(ee=de.name)||void 0===ee?void 0:ee.trim().toLowerCase())===Z}):l.o.find(de=>de.country.trim().toLowerCase()===Z))}}return _.\u0275fac=function(x){return new(x||_)(n.\u0275\u0275directiveInject(T.gz),n.\u0275\u0275directiveInject(z.O),n.\u0275\u0275directiveInject(a.E),n.\u0275\u0275directiveInject(t.e),n.\u0275\u0275directiveInject(T.F0),n.\u0275\u0275directiveInject(y.K),n.\u0275\u0275directiveInject(w.a),n.\u0275\u0275directiveInject(O.J))},_.\u0275cmp=n.\u0275\u0275defineComponent({type:_,selectors:[["app-page-setup-place"]],inputs:{adminAccess:"adminAccess"},decls:1,vars:1,consts:[["class","page","fxLayout","column","fxLayoutGap","20px","fxLayoutAlign","space-around center",4,"ngIf"],["fxLayout","column","fxLayoutGap","20px","fxLayoutAlign","space-around center",1,"page"],["fxFill","",2,"box-shadow","none",3,"ngStyle"],[1,"card-content-wrapper"],["class","page-header",4,"ngIf"],["class","text-left",4,"ngIf"],["fxLayout","column","fxFill","","fxLayoutGap","5px","fxLayoutAlign","start start"],["f","ngForm"],[1,"form-field-responsive-m"],["name","place","matInput","","minlength","2","required","","placeholder","Please enter your place name",3,"ngModel","ngModelChange"],["place","ngModel"],[4,"ngIf"],["class","form-field-responsive-m",4,"ngIf"],[1,"form-field-responsive-m",3,"ngClass"],["matInput","","name","country","required","","placeholder","Country",3,"ngModel","value","matAutocomplete","ngModelChange"],["country","ngModel"],[3,"displayWith"],["cntr","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","",1,"input-reset-btn",3,"click"],["class","error-message",4,"ngIf"],["matInput","","name","timezone","placeholder","Timezone","required","",3,"ngModel","value","matAutocomplete","ngModelChange"],["timezone","ngModel"],["zone","matAutocomplete"],["name","send_invitation",3,"ngModel","ngModelChange",4,"ngIf"],["class","last-created-place-info",4,"ngIf"],["fxLayoutGap","10px"],["mat-button","","type","button",1,"button-primary","spacer-right-sm",3,"disabled","click"],[1,"page-header"],[1,"text-left"],["matInput","","type","email","required","","placeholder","Enter the email","name","email",3,"ngModel","pattern","ngModelChange"],["email","ngModel"],[3,"value"],[1,"error-message"],["name","send_invitation",3,"ngModel","ngModelChange"],[1,"last-created-place-info"],[1,"page-header","spacer-bottom-lg"],[1,"spacer-bottom-nil"],["successMessage","Place ID has been copied to clipboard","size","normal",3,"copyValue"],[1,"spacer-top-xxs"],["target","_blank",3,"routerLink"],["mat-button","","class","button-primary","type","button",3,"click",4,"ngIf"],["mat-button","","type","button",1,"button-primary",3,"click"]],template:function(x,b){1&x&&n.\u0275\u0275template(0,v,40,33,"section",0),2&x&&n.\u0275\u0275property("ngIf",!b.placeService.currentPlace||b.adminAccess)},directives:[q.NgIf,G.xw,G.SQ,G.Wh,H.a8,G.s9,k.Zl,q.NgStyle,H.dn,W._Y,W.JL,W.F,te.KE,te.hX,ae.Nt,W.Fj,W.wO,W.Q7,W.JJ,W.On,te.TO,W.c5,te.bx,k.oO,q.NgClass,N.ZL,N.XC,q.NgForOf,K.ey,R.Hw,te.R9,D.oG,Q.Z,T.yS,V.lW,H.hq],pi
1pes:[B.g],styles:[".page[_ngcontent-%COMP%]{margin:20px}.card-content-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between;gap:var(--md-size)}.last-created-place-info[_ngcontent-%COMP%]{width:50%}@media (max-width: 658px){.last-created-place-info[_ngcontent-%COMP%]{width:100%}}"],data:{animation:[e.j]}}),_})()},68878:($,p,o)=>{"use strict";o.r(p),o.d(p,{OnboardingModule:()=>Me});var c=o(68555),s=o(83364),i=o(72271),a=o(42155),l=o(69808),m=o(8929),e=o(7625),y=o(92340),w=o(98443),O=o(23353),F=o(65218),n=o(57139),T=o(96836),z=o(38518),t=o(5e3),q=o(77093),G=o(9224),H=o(47423),k=o(25245),W=o(12946),te=o(63567),ae=o(91094),N=o(67322),K=o(98833),R=o(93075);function D(P,oe){if(1&P){const E=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div",6)(1,"div")(2,"p",7),t.\u0275\u0275text(3,"If you already have an AirGradient account please sign in:"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(4,"button",8),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(E),t.\u0275\u0275nextContext().signIn()}),t.\u0275\u0275elementStart(5,"span",9)(6,"mat-icon"),t.\u0275\u0275text(7,"check"),t.\u0275\u0275elementEnd(),t.\u0275\u0275text(8," Sign into existing Account "),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275elementStart(9,"div")(10,"p",7),t.\u0275\u0275text(11,"If you do not yet have an AirGradient account please create a new account:"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(12,"button",10),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(E),t.\u0275\u0275nextContext().showNewAccount=!0}),t.\u0275\u0275elementStart(13,"span",9)(14,"mat-icon"),t.\u0275\u0275text(15,"add"),t.\u0275\u0275elementEnd(),t.\u0275\u0275text(16," Create new Account "),t.\u0275\u0275elementEnd()()()()}}function Q(P,oe){if(1&P){const E=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"app-auth-navigation",12),t.\u0275\u0275element(1,"app-oauth-signin",13)(2,"app-oauth-signin",14),t.\u0275\u0275elementStart(3,"div",15)(4,"app-auth-form",16),t.\u0275\u0275listener("formSubmit",function(X){return t.\u0275\u0275restoreView(E),t.\u0275\u0275nextContext(2).handleFormSubmit(X)}),t.\u0275\u0275elementStart(5,"p",17),t.\u0275\u0275text(6," To create a new account, please enter your name and email address below then click on the Request Authentication Code button. "),t.\u0275\u0275elementEnd()()()()}if(2&P){const E=t.\u0275\u0275nextContext(2);t.\u0275\u0275property("appleAuthLink",E.getOAuthUrl("apple"))("showBackBtn",!0)("mode",E.AuthFormMode.join),t.\u0275\u0275advance(4),t.\u0275\u0275property("mode",E.AuthFormMode.join)("showNameField",!0)}}function V(P,oe){1&P&&(t.\u0275\u0275elementStart(0,"mat-error"),t.\u0275\u0275text(1,"Incorrect code format "),t.\u0275\u0275elementEnd())}function B(P,oe){if(1&P){const E=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div")(1,"p",7),t.\u0275\u0275text(2,"Please check your email for the Authentication Code then submit it below to continue the setup wizard."),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(3,"div",18)(4,"mat-form-field",19)(5,"mat-label"),t.\u0275\u0275text(6,"Authentication Code"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(7,"input",20,21),t.\u0275\u0275listener("ngModelChange",function(X){return t.\u0275\u0275restoreView(E),t.\u0275\u0275nextContext(2).user.token=X}),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(9,V,2,0,"mat-error",4),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(10,"div")(11,"button",22),t.\u0275\u0275listener("click",function(){t.\u0275\u0275restoreView(E);const X=t.\u0275\u0275nextContext(2);return X.permissionServices.joinUser(X.user,!0,X.redirectUrl)}),t.\u0275\u0275text(12," Submit"),t.\u0275\u0275elementEnd()()()()}if(2&P){const E=t.\u0275\u0275reference(8),I=t.\u0275\u0275nextContext(2);t.\u0275\u0275advance(7),t.\u0275\u0275property("ngModel",I.user.token),t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",E.invalid&&E.dirty&&E.value.length>0),t.\u0275\u0275advance(2),t.\u0275\u0275property("disabled",!(null!=I.user.token&&I.user.token.length)>0||!I.permissionServices.disableOBForm)}}function Y(P,oe){if(1&P&&(t.\u0275\u0275elementStart(0,"div"),t.\u0275\u0275template(1,Q,7,5,"app-auth-navigation",11),t.\u0275\u0275template(2,B,13,3,"div",4),t.\u0275\u0275elementEnd()),2&P){const E=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!E.waitforCode),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",E.waitforCode)}}function J(P,oe){if(1&P){const E=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"a",23),t.\u0275\u0275listener("click",function(){return t.\u0275\u0275restoreView(E),t.\u0275\u0275nextContext().handleBackNav()}),t.\u0275\u0275text(1," Back "),t.\u0275\u0275elementEnd()}}let ce=(()=>{class P{constructor(E,I,X,ie){this.route=E,this.permissionServices=I,this.router=X,this.appleAuthService=ie,this.apiRootUrl=y.N.apiRoot,this.user=new w.n,this.hasGoogleAuth=!1,this.hasAppleAuth=!1,this.waitforCode=!1,this.showNewAccount=!1,this.AuthFormMode=F.G,this.destroy$=new m.xQ,this.route.queryParams.pipe((0,e.R)(this.destroy$)).subscribe(ve=>{this.redirectUrl=ve.refURL?(0,z.X6)(ve.refURL):(0,z.CS)()}),y.N.hasGoogleAuth&&(this.hasGoogleAuth=!0),y.N.hasAppleAuth&&this.appleAuthService.isAppleAuthEnabled&&(this.hasAppleAuth=!0)}signIn(){this.router.navigate(["/auth/signin"],{queryParams:{refURL:this.redirectUrl},queryParamsHandling:"merge"})}handleFormSubmit({email:E,name:I,password:X}
1){this.user.email=E,this.user.name=I,this.user.password=X,this.permissionServices.joinUser(this.user,!1),this.waitforCode=!0}getOAuthUrl(E){return(0,T.O)(this.apiRootUrl,E,this.redirectUrl)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}handleBackNav(){this.showNewAccount=!1}}return P.\u0275fac=function(E){return new(E||P)(t.\u0275\u0275directiveInject(c.gz),t.\u0275\u0275directiveInject(O.J),t.\u0275\u0275directiveInject(c.F0),t.\u0275\u0275directiveInject(n.B))},P.\u0275cmp=t.\u0275\u0275defineComponent({type:P,selectors:[["app-page-signup"]],decls:8,vars:4,consts:[["fxLayout","column","fxLayoutGap","20px","fxLayoutAlign","space-around center",1,"page"],[1,"auth-card"],[1,"text-center","spacer-top-nil","spacer-bottom-lg"],["class","actions-wrapper",4,"ngIf"],[4,"ngIf"],["class","accent-link back-btn",3,"click",4,"ngIf"],[1,"actions-wrapper"],[1,"auth-subtitle"],["type","button","mat-button","",1,"button-primary",3,"click"],[1,"btn-content"],["mat-button","","type","button",1,"button-secondary",3,"click"],["manualBtnTitle","Sign Up With Email","googleBtnTitle","Sign Up With Google","appleBtnTitle","Sign Up With Apple",3,"appleAuthLink","showBackBtn","mode",4,"ngIf"],["manualBtnTitle","Sign Up With Email","googleBtnTitle","Sign Up With Google","appleBtnTitle","Sign Up With Apple",3,"appleAuthLink","showBackBtn","mode"],["id","google-form","provider","google"],["id","apple-form","provider","apple"],["id","manual-form"],["submitButtonText","Request Authentication Code",3,"mode","showNameField","formSubmit"],["id","flowhint",1,"auth-subtitle"],[1,"column-wrapper"],[1,"full-width"],["matInput","","placeholder","Please enter your code",3,"ngModel","ngModelChange"],["code","ngModel"],["mat-flat-button","","type","submit",1,"button-primary",3,"disabled","click"],[1,"accent-link","back-btn",3,"click"]],template:function(E,I){1&E&&(t.\u0275\u0275elementStart(0,"section",0)(1,"mat-card",1)(2,"mat-card-content")(3,"h2",2),t.\u0275\u0275text(4),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(5,D,17,0,"div",3),t.\u0275\u0275template(6,Y,3,2,"div",4),t.\u0275\u0275template(7,J,2,0,"a",5),t.\u0275\u0275elementEnd()()()),2&E&&(t.\u0275\u0275advance(4),t.\u0275\u0275textInterpolate(I.showNewAccount?"Create a New Account":"AirGradient User Account"),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",!I.showNewAccount),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",I.showNewAccount),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",I.showNewAccount))},directives:[q.xw,q.SQ,q.Wh,G.a8,G.dn,l.NgIf,H.lW,k.Hw,W.R,te.X,ae.c,N.KE,N.hX,K.Nt,R.Fj,R.JJ,R.On,N.TO],styles:[".actions-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:center;gap:30px;align-items:center}.back-btn[_ngcontent-%COMP%]{position:absolute;bottom:30px;left:26px}.column-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:500px;margin:0 auto;justify-content:center;align-items:center;gap:20px}"]}),P})();var me=o(67591),xe=o(80540),ye=o(38440),he=o(4511),Ce=o(15645);let re=(()=>{class P{constructor(E,I,X,ie,ve){this.httpHelper=E,this.router=I,this.data=X,this.userService=ie,this.logging=ve}canActivate(){console.log("onboarding guard");const E=window.location.href,I=this.userService.currentUser;if(null==I?void 0:I.authenticated)return this.logging.sendLogEntry("Authenticated","success"),!0;const X=new m.xQ;return this.userService.userSubject.subscribe(ie=>{if(void 0!==ie){if(null==ie?void 0:ie.authenticated)return this.logging.sendLogEntry("Authenticated","success"),X.next(!0),!0;this.data.appLoader=!0,X.next(!1),this.router.navigate(["/onboarding/signup"],{queryParams:{refURL:E},queryParamsHandling:"merge"})}}),X.asObservable()}}return P.\u0275fac=function(E){return new(E||P)(t.\u0275\u0275inject(he.r),t.\u0275\u0275inject(c.F0),t.\u0275\u0275inject(Ce.O),t.\u0275\u0275inject(xe.K),t.\u0275\u0275inject(ye.J))},P.\u0275prov=t.\u0275\u0275defineInjectable({token:P,factory:P.\u0275fac}),P})();var fe=o(31545),_e=o(71245),be=o(77700),Se=o(28866),se=o(49973),u=o(12906),f=o(74107),d=o(90508),h=o(79814);const v=["formRef"];function S(P,oe){if(1&P&&(t.\u0275\u0275elementStart(0,"mat-option",8),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&P){const E=oe.$implicit;t.\u0275\u0275property("value",E.id),t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" ",E.name," ")}}function _(P,oe){if(1&P){const E=t.\u0275\u0275getCurrentView();t.\u0275\u0275elementStart(0,"div")(1,"mat-form-field",3)(2,"mat-label"),t.\u0275\u0275text(3,"Place"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(4,"mat-select",12),t.\u0275\u0275listener("valueChange",function(X){return t.\u0275\u0275restoreView(E),t.\u0275\u0275nextContext().selectedPlaceId=X}),t.\u0275\u0275template(5,S,2,2,"mat-option",13),t.\u0275\u0275elementEnd()()()}if(2&P){const E=t.\u0275\u0275nextContext();t.\u0275\u0275advance(4),t.\u0275\u0275property("value",E.selectedPlaceId),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngForOf",E.places.places)}}let U=(()=>{class P{constructor(E,I,X){this._messageService=E,this.sensorServices=I,this.places=X,this.feedbackMsg="",this.sendRequest=!1,this.MonitorModels=se.c,this.destroy$=new m.xQ,this.location=new be.f,this.location.active=!0,this.location.controlled=!0,this._messageService.listenMessage().pipe((0,e.R)(this.destroy$)).subscribe(ie=>{var ve,we,Ie;"places_loaded"===ie&&(this.selectedPlaceId=null===(ve=this.places.currentPlace)||void 0===ve?void 0:ve.id),"sensor_location_added"===ie&&(this.selectedPlaceId=null,this.location=null,this.location=new be.f,this.location.active=!0,this.location.indoor=!0,this.location.controlled=!0,this.sendRequest=!1,null===(we=this.stepper)||void 0===we||we.next(),this.form.reset(),this.selectedPlaceId=null===(Ie=this.places.currentPlace)||void 0===Ie?void 0:Ie.id),("sensor_location_error"===ie||"sensor_location_error_already_in_use"==ie)&&(this.sendRequest=!1)})}ngOnInit(){var E,I;this.selectedPlaceId=null===(I=null===(E=this.places)||void 0===E?void 0:E.
1currentPlace)||void 0===I?void 0:I.id,this.sensorServices.isMonitorAlreadyConnectedToAnotherPlace(this.selectedPlaceId,this.chipid)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onSubmit(){var E,I;this.sendRequest=!0,this.chipid=null===(I=null===(E=this.chipid)||void 0===E?void 0:E.trim())||void 0===I?void 0:I.toLowerCase(),this.location.indoor=u.pc.includes(this.modelName),this.sensorServices.addSensorAndLocation(this.selectedPlaceId,this.location,this.chipid,this.modelName)}getModelDescriptionName(E){switch(E){case se.c._8PSL:return"AirGradient ONE (8PSL) Indoor Monitor";case se.c._I9PSL:return"AirGradient ONE (I-9PSL) Indoor Monitor";case se.c._I9PSLDE:return"AirGradient ONE (I-9PSL-DE) Indoor Monitor";case se.c._I9PSLDECE:return"AirGradient ONE (I-9PSL-DE-CE) Indoor Monitor";case se.c._O1PP:return"AirGradient Open Air (O-1PP) Outdoor Monitor";case se.c._O1PPT:return"AirGradient Open Air (O-1PPT) Outdoor Monitor";case se.c._O1PPTCE:return"AirGradient Open Air (O-1PPT-CE) Outdoor Monitor";case se.c._O1PST:return"AirGradient Open Air (O-1PST) Outdoor Monitor";case se.c._O1PSTCE:return"AirGradient Open Air (O-1PST-CE) Outdoor Monitor";case se.c._O1SCE:return"AirGradient Open Air (O-1S-CE) Outdoor Monitor";case se.c._OM1PPSTCE:return"AirGradient Open Air Max (O-M-1PPST-CE) Outdoor Monitor";case se.c._OM1PPSTONCE:return"AirGradient Open Air Max (O-M-1PPSTON-CE) Outdoor Monitor";default:return""}}}return P.\u0275fac=function(E){return new(E||P)(t.\u0275\u0275directiveInject(_e.e),t.\u0275\u0275directiveInject(Se.K),t.\u0275\u0275directiveInject(fe.E))},P.\u0275cmp=t.\u0275\u0275defineComponent({type:P,selectors:[["app-setup-sensor-widget"]],viewQuery:function(E,I){if(1&E&&t.\u0275\u0275viewQuery(v,5),2&E){let X;t.\u0275\u0275queryRefresh(X=t.\u0275\u0275loadQuery())&&(I.form=X.first)}},inputs:{chipid:"chipid",stepper:"stepper"},decls:52,vars:19,consts:[["fxLayout","column","fxLayoutGap","10px",3,"ngSubmit"],["formRef","ngForm"],[4,"ngIf"],[1,"form-field-responsive-s","full"],["matInput","","type","text","required","","name","name",3,"ngModel","ngModelChange"],["uidx",""],["required","","name","model",1,"radio-group-wrapper-column",3,"ngModel","ngModelChange"],[2,"margin-bottom","10px"],[3,"value"],["align","start",2,"margin-left","auto"],["mat-button","","type","button",1,"button-primary",3,"disabled","click"],[2,"color","red"],["required","",3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"]],template:function(E,I){if(1&E&&(t.\u0275\u0275elementStart(0,"h3"),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(2,"mat-card-content")(3,"form",0,1),t.\u0275\u0275listener("ngSubmit",function(){return I.onSubmit()}),t.\u0275\u0275template(5,_,6,2,"div",2),t.\u0275\u0275elementStart(6,"mat-form-field",3)(7,"mat-label"),t.\u0275\u0275text(8,"Name of Monitor Location / Room"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(9,"input",4,5),t.\u0275\u0275listener("ngModelChange",function(ie){return I.location.name=ie}),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(11,"p")(12,"strong"),t.\u0275\u0275text(13,"Select model:"),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(14,"mat-radio-group",6),t.\u0275\u0275listener("ngModelChange",function(ie){return I.modelName=ie}),t.\u0275\u0275elementStart(15,"p",7),t.\u0275\u0275text(16,"Current Models (ONE):"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(17,"mat-radio-button",8),t.\u0275\u0275text(18," AirGradient ONE (I-9PSL-DE) Indoor Monitor "),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(19,"mat-radio-button",8),t.\u0275\u0275text(20," AirGradient ONE (I-9PSL-DE-CE) Indoor Monitor "),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(21,"p",7),t.\u0275\u0275text(22,"Current Models (Open Air):"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(23,"mat-radio-button",8),t.\u0275\u0275text(24," AirGradient Open Air (O-1PST) Outdoor Monitor "),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(25,"mat-radio-button",8),t.\u0275\u0275text(26," AirGradient Open Air (O-1PPT) Outdoor Monitor "),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(27,"mat-radio-button",8),t.\u0275\u0275text(28," AirGradient Open Air (O-1PST-CE) Outdoor Monitor "),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(29,"mat-radio-button",8),t.\u0275\u0275text(30," AirGradient Open Air (O-1PPT-CE) Outdoor Monitor "),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(31,"p",7),t.\u0275\u0275text(32,"Current Models (Open Air Max):"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(33,"mat-radio-button",8),t.\u0275\u0275text(34," AirGradient Open Air Max (O-M-1PPST-CE) Outdoor Monitor "),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(35,"mat-radio-button",8),t.\u0275\u0275text(36," AirGradient Open Air Max (O-M-1PPSTON-CE) Outdoor Monitor "),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(37,"p",7),t.\u0275\u0275text(38,"Other Models:"),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(39,"mat-radio-button",8),t.\u0275\u0275text(40," AirGradient ONE (8PSL) Indoor Monitor "),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(41,"mat-radio-button",8),t.\u0275\u0275text(42," AirGradient Open Air (O-1PP) Outdoor Monitor "),t.\u0275\u0275elementEnd()()(),t.\u0275\u0275elementStart(43,"p")(44,"b"),t.\u0275\u0275text(45,"Model: "),t.\u0275\u0275elementEnd(),t.\u0275\u0275text(46),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(47,"mat-card-actions",9)(48,"button",10),t.\u0275\u0275listener("click",function(){return I.onSubmit()}),t.\u0275\u0275text(49,"Add "),t.\u0275\u0275elementEnd()(),t.\u0275\u0275elementStart(50,"div",11),t.\u0275\u0275text(51),t.\u0275\u0275elementEnd()),2&E){const X=t.\u0275\u0275reference(4);t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1(" Monitor Serial Number: ",I.chipid,""),t.\u0275\u0275advance(4),t.\u0275\u0275property("ngIf",null==I.places.currentPlace?null:I.places.currentPlace.name),t.\u0275\u0275advance(4),t.\u0275\u0275property("ngModel",I.location.name),t.\u0275\u0275advance(5),t.\u0275\u0275property("ngModel",I.modelName),t.\u0275\u0275advance(3),t.\u0275\u0275property("value",I.MonitorModels._I9PSLDE),t.\u0275\u0275advance(2),t.\u0275\u0275property("value",I.MonitorModels._I9PSLDECE),t.\u0275\u0275advance(4),t.\u0275\u0275property("value",I.MonitorModels._O1PST),t.\u0275\u0275advance(2),t.\u0275\u0275property("value",I.MonitorModels._O1PP),t.\u0275\u0275advance(2),t.\u0275\u0275property("value",I.MonitorModels._O1PSTCE),t.\u0275\u0275advance(2),t.\u0275\u0275property("value",I.MonitorModels._O1PPTCE),t.\u0275\u0275advance(4),t.\u0275\u0275property("value",I.MonitorModels._OM1PPSTCE),t.\u0275\u0275advance(2),t.\u0275\u0275property("value",I.MonitorModels._OM1PPSTONCE),t.\u0275\u0275advance(4),t.\u0275\u0275property("value",I.MonitorModels._8PSL),t.\u0275\u0275advance(2),t.\u0275\u0275property("value",I.MonitorModels._O1PP),t.\u0275\u0275advance(5),t.\u0275\u0275textInterpolate1(" ",I.getModelDescriptionName(I.modelName),""),t.\u0275\u0275advance(2),t.\u0275\u0275classProp("spinner",I.sendRequest),t.\u0275\u0275property("disabled",!X.valid||(null==I.chipid?null:I.chipid.length)<3||I.send
1Request),t.\u0275\u0275advance(3),t.\u0275\u0275textInterpolate(I.feedbackMsg)}},directives:[G.dn,R._Y,R.JL,R.F,q.xw,q.SQ,l.NgIf,N.KE,N.hX,f.gD,l.NgForOf,d.ey,K.Nt,R.Fj,R.Q7,R.JJ,R.On,h.VQ,h.U0,G.hq,H.lW],encapsulation:2}),P})();function x(P,oe){if(1&P&&(t.\u0275\u0275elementStart(0,"section",1)(1,"mat-card",2),t.\u0275\u0275element(2,"app-setup-sensor-widget",3),t.\u0275\u0275elementEnd()()),2&P){const E=t.\u0275\u0275nextContext();t.\u0275\u0275advance(2),t.\u0275\u0275property("chipid",E.chipid)}}let b=(()=>{class P{constructor(E,I,X,ie){this.route=E,this._messageService=I,this.places=X,this.router=ie,this.destroy$=new m.xQ,this._messageService.listenMessage().pipe((0,e.R)(this.destroy$)).subscribe(ve=>{"sensor_location_added"===ve&&this.router.navigate(["/dashboard"])})}ngOnInit(){this.route.params.pipe((0,e.R)(this.destroy$)).subscribe(E=>{this.chipid=E.id})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}}return P.\u0275fac=function(E){return new(E||P)(t.\u0275\u0275directiveInject(c.gz),t.\u0275\u0275directiveInject(_e.e),t.\u0275\u0275directiveInject(fe.E),t.\u0275\u0275directiveInject(c.F0))},P.\u0275cmp=t.\u0275\u0275defineComponent({type:P,selectors:[["app-page-setup-sensor"]],decls:1,vars:1,consts:[["class","page","fxLayout","column","fxLayoutGap","20px","fxLayoutAlign","space-around center",4,"ngIf"],["fxLayout","column","fxLayoutGap","20px","fxLayoutAlign","space-around center",1,"page"],[2,"width","100%","max-width","470px"],[3,"chipid"]],template:function(E,I){1&E&&t.\u0275\u0275template(0,x,3,1,"section",0),2&E&&t.\u0275\u0275property("ngIf",null!=I.places.currentPlace)},directives:[l.NgIf,q.xw,q.SQ,q.Wh,G.a8,U],styles:["p[_ngcontent-%COMP%]{text-align:left;color:#708090}h3[_ngcontent-%COMP%]{font-size:24px}.page[_ngcontent-%COMP%]{margin:20px 20px 100px}"]}),P})();var A=o(93090);function Z(P,oe){1&P&&(t.\u0275\u0275elementStart(0,"h3"),t.\u0275\u0275text(1,"Welcome to AirGradient!"),t.\u0275\u0275elementEnd())}function de(P,oe){if(1&P&&(t.\u0275\u0275elementStart(0,"h3",6),t.\u0275\u0275text(1),t.\u0275\u0275elementEnd()),2&P){const E=t.\u0275\u0275nextContext();t.\u0275\u0275advance(1),t.\u0275\u0275textInterpolate1("Welcome back ",E.userService.currentUser.name," !")}}function ee(P,oe){1&P&&(t.\u0275\u0275elementStart(0,"p"),t.\u0275\u0275text(1,"This setup wizard will help you create or sign in to an AirGradient user account, connect the AirGradient monitor to the internet and configure the dashboard."),t.\u0275\u0275elementEnd())}let j=(()=>{class P{constructor(E,I,X){this.userService=E,this.dataServices=I,this.router=X}ngOnInit(){this.dataServices.currentScreen="Connect Monitor"}ngOnDestroy(){this.dataServices.currentScreen=null}goNext(){this.userService.currentUser.authenticated?this.router.navigate(["/onboarding/setup/place"]):this.router.navigate(["/onboarding/signup"],{queryParams:{refURL:y.N.domain+"/onboarding/setup/place"},queryParamsHandling:"merge"})}}return P.\u0275fac=function(E){return new(E||P)(t.\u0275\u0275directiveInject(xe.K),t.\u0275\u0275directiveInject(Ce.O),t.\u0275\u0275directiveInject(c.F0))},P.\u0275cmp=t.\u0275\u0275defineComponent({type:P,selectors:[["app-onboarding-info"]],decls:15,vars:3,consts:[["fxLayout","column","fxLayoutGap","20px",1,"page"],[4,"ngIf"],["class","spacer-top-nil",4,"ngIf"],[2,"text-align","center","max-width","700px"],["src","/assets/ag-intro.webp","width","60%"],["mat-button","","type","button",1,"button-primary",3,"click"],[1,"spacer-top-nil"]],template:function(E,I){1&E&&(t.\u0275\u0275elementStart(0,"section",0)(1,"mat-card-content"),t.\u0275\u0275template(2,Z,2,0,"h3",1),t.\u0275\u0275template(3,de,2,1,"h3",2),t.\u0275\u0275elementStart(4,"p"),t.\u0275\u0275text(5,"AirGradient is a powerful system to continuously measure the air quality in indoor and outdoor locations."),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(6,"p"),t.\u0275\u0275text(7," It consists of the AirGradient air quality monitor that transmit data to the AirGradient platform, a cloud based dashboard providing tailored real time data, alerts and reports for various stakeholders."),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(8,"div",3),t.\u0275\u0275element(9,"img",4),t.\u0275\u0275elementEnd(),t.\u0275\u0275template(10,ee,2,0,"p",1),t.\u0275\u0275elementStart(11,"p"),t.\u0275\u0275text(12,"Click on the Next button to continue."),t.\u0275\u0275elementEnd(),t.\u0275\u0275elementStart(13,"button",5),t.\u0275\u0275listener("click",function(){return I.goNext()}),t.\u0275\u0275text(14," Next "),t.\u0275\u0275elementEnd()()()),2&E&&(t.\u0275\u0275advance(2),t.\u0275\u0275property("ngIf",!I.userService.currentUser.authenticated),t.\u0275\u0275advance(1),t.\u0275\u0275property("ngIf",I.userService.currentUser.authenticated),t.\u0275\u0275advance(7),t.\u0275\u0275property("ngIf",!I.userService.isDemoDashboardUser))},directives:[q.xw,q.SQ,G.dn,l.NgIf,H.lW],styles:[".page[_ngcontent-%COMP%]{min-height:calc(100vh - 65px);padding:var(--sm-size) var(--md-size)}"]}),P})();var ue=o(64348),le=o(35660);const pe=[{path:"",redirectTo:"welcome",pathMatch:"full"},{path:"signup",component:ce},{path:"welcome",component:j},{path:"setup/place",component:me.O,canActivate:[re,le.a]},{path:"setup/sensor/:id",component:b,canActivate:[re,le.a]},{path:"setup/sensors",component:A.F,canActivate:[re,le.a]}];let Me=(()=>{class P{}return P.\u0275fac=function(E){return new(E||P)},P.\u0275mod=t.\u0275\u0275defineNgModule({type:P}),P.\u0275inj=t.\u0275\u0275defineInjector({providers:[O.J,re],imports:[[c.Bz.forChild(pe),s.q,i.m,a.o9,l.CommonModule,ue.N]]}),P})()},74901:$=>{"use strict";var p={single_source_shortest_paths:function(o,c,s){var i={},a={};a[c]=0;var m,e,y,w,O,n,l=p.PriorityQueue.make();for(l.push(c,0);!l.empty();)for(y in w=(m=l.pop()).cost,O=o[e=m.value]||{})O.hasOwnProperty(y)&&(n=w+O[y],(void 0===a[y]||a[y]>n)&&(a[y]=n,l.push(y,n),i[y]=e));if(void 0!==s&&void 0===a[s]){var t=["Could not find a path from ",c," to ",s,"."].join("");throw new Error(t)}return i},extract_shortest_path_from_predecessor_list:function(o,c){for(var s=[],i=c;i;)s.push(i),i=o[i];return s.reverse(),s},find_path:function(o,c,s){var i=p.single_source_shortest_paths(o,c,s);return p.extract_shortest_path_from_predecessor_list(i,s)},PriorityQueue:{make:function(o){var i,c=p.PriorityQueue,s={};for(i in o=o||{},c)c.hasOwnProperty(i)&&(s[i]=c[i]);return s.queue=[],s.sorter=o.sorter||c.default_sorter,s},default_sorter:function(o,c){return o.cost-c.cost}
1,push:function(o,c){this.queue.push({value:o,cost:c}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};$.exports=p},38419:$=>{"use strict";$.exports=function(o){for(var c=[],s=o.length,i=0;i<s;i++){var a=o.charCodeAt(i);if(a>=55296&&a<=56319&&s>i+1){var l=o.charCodeAt(i+1);l>=56320&&l<=57343&&(a=1024*(a-55296)+l-56320+65536,i+=1)}a<128?c.push(a):a<2048?(c.push(a>>6|192),c.push(63&a|128)):a<55296||a>=57344&&a<65536?(c.push(a>>12|224),c.push(a>>6&63|128),c.push(63&a|128)):a>=65536&&a<=1114111?(c.push(a>>18|240),c.push(a>>12&63|128),c.push(a>>6&63|128),c.push(63&a|128)):c.push(239,191,189)}return new Uint8Array(c).buffer}},64348:($,p,o)=>{"use strict";function n(u,f,d,h){return new(d||(d=Promise))(function(S,_){function U(A){try{b(h.next(A))}catch(Z){_(Z)}}function x(A){try{b(h.throw(A))}catch(Z){_(Z)}}function b(A){A.done?S(A.value):function v(S){return S instanceof d?S:new d(function(_){_(S)})}(A.value).then(U,x)}b((h=h.apply(u,f||[])).next())})}o.d(p,{V:()=>Se,N:()=>se}),"function"==typeof SuppressedError&&SuppressedError;var re=o(5e3),fe=o(85876),_e=o(22313);const be=["qrcElement"];let Se=(()=>{class u{constructor(d,h){this.renderer=d,this.sanitizer=h,this.allowEmptyString=!1,this.colorDark="#000000ff",this.colorLight="#ffffffff",this.cssClass="qrcode",this.elementType="canvas",this.errorCorrectionLevel="M",this.margin=4,this.qrdata="",this.scale=4,this.width=10,this.qrCodeURL=new re.EventEmitter,this.context=null}ngOnChanges(){return n(this,void 0,void 0,function*(){yield this.createQRCode()})}isValidQrCodeText(d){return!1===this.allowEmptyString?!(void 0===d||""===d||"null"===d||null===d):void 0!==d}toDataURL(d){return new Promise((h,v)=>{fe.hz(this.qrdata,d,(S,_)=>{S?v(S):h(_)})})}toCanvas(d,h){return new Promise((v,S)=>{fe.rT(d,this.qrdata,h,_=>{_?S(_):v("success")})})}toSVG(d){return new Promise((h,v)=>{fe.toString(this.qrdata,d,(S,_)=>{S?v(S):h(_)})})}renderElement(d){for(const h of this.qrcElement.nativeElement.childNodes)this.renderer.removeChild(this.qrcElement.nativeElement,h);this.renderer.appendChild(this.qrcElement.nativeElement,d)}createQRCode(){return n(this,void 0,void 0,function*(){this.version&&this.version>40?(console.warn("[angularx-qrcode] max value for `version` is 40"),this.version=40):this.version&&this.version<1?(console.warn("[angularx-qrcode]`min value for `version` is 1"),this.version=1):void 0!==this.version&&isNaN(this.version)&&(console.warn("[angularx-qrcode] version should be a number, defaulting to auto."),this.version=void 0);try{if(!this.isValidQrCodeText(this.qrdata))throw new Error("[angularx-qrcode] Field `qrdata` is empty, set 'allowEmptyString=\"true\"' to overwrite this behaviour.");this.isValidQrCodeText(this.qrdata)&&""===this.qrdata&&(this.qrdata=" ");
1const d={color:{dark:this.colorDark,light:this.colorLight},errorCorrectionLevel:this.errorCorrectionLevel,margin:this.margin,scale:this.scale,type:this.elementType,version:this.version,width:this.width},h=this.imageSrc,v=this.imageHeight||40,S=this.imageWidth||40;switch(this.elementType){case"canvas":const _=this.renderer.createElement("canvas");this.context=_.getContext("2d"),this.toCanvas(_,d).then(()=>{if(this.ariaLabel&&this.renderer.setAttribute(_,"aria-label",`${this.ariaLabel}`),this.title&&this.renderer.setAttribute(_,"title",`${this.title}`),h&&this.context){this.centerImage=new Image(S,v),h!==this.centerImage.src&&(this.centerImage.src=h),v!==this.centerImage.height&&(this.centerImage.height=v),S!==this.centerImage.width&&(this.centerImage.width=S);const b=this.centerImage;b&&(b.onload=()=>{var A;null===(A=this.context)||void 0===A||A.drawImage(b,_.width/2-S/2,_.height/2-v/2,S,v)})}this.renderElement(_),this.emitQRCodeURL(_)}).catch(b=>{console.error("[angularx-qrcode] canvas error:",b)});break;case"svg":const U=this.renderer.createElement("div");this.toSVG(d).then(b=>{this.renderer.setProperty(U,"innerHTML",b);const A=U.firstChild;this.renderer.setAttribute(A,"height",`${this.width}`),this.renderer.setAttribute(A,"width",`${this.width}`),this.renderElement(A),this.emitQRCodeURL(A)}).catch(b=>{console.error("[angularx-qrcode] svg error:",b)});break;default:const x=this.renderer.createElement("img");this.toDataURL(d).then(b=>{this.alt&&x.setAttribute("alt",this.alt),this.ariaLabel&&x.setAttribute("aria-label",this.ariaLabel),x.setAttribute("src",b),this.title&&x.setAttribute("title",this.title),this.renderElement(x),this.emitQRCodeURL(x)}).catch(b=>{console.error("[angularx-qrcode] img/url error:",b)})}}catch(d){console.error("[angularx-qrcode] Error generating QR Code:",d.message)}})}emitQRCodeURL(d){const h=d.constructor.name;if(h===SVGSVGElement.name){const _=new Blob([d.outerHTML],{type:"image/svg+xml"}),U=URL.createObjectURL(_),x=this.sanitizer.bypassSecurityTrustUrl(U);return void this.qrCodeURL.emit(x)}let v="";h===HTMLCanvasElement.name&&(v=d.toDataURL("image/png")),h===HTMLImageElement.name&&(v=d.src),fetch(v).then(S=>S.blob()).then(S=>URL.createObjectURL(S)).then(S=>this.sanitizer.bypassSecurityTrustUrl(S)).then(S=>{this.qrCodeURL.emit(S)}).catch(S=>{console.error("[angularx-qrcode] Error when fetching image/png URL: "+S)})}}return u.\u0275fac=function(d){return new(d||u)(re.\u0275\u0275directiveInject(re.Renderer2),re.\u0275\u0275directiveInject(_e.H7))},u.\u0275cmp=re.\u0275\u0275defineComponent({type:u,selectors:[["qrcode"]],viewQuery:function(d,h){if(1&d&&re.\u0275\u0275viewQuery(be,7),2&d){let v;re.\u0275\u0275queryRefresh(v=re.\u0275\u0275loadQuery())&&(h.qrcElement=v.first)}},inputs:{allowEmptyString:"allowEmptyString",colorDark:"colorDark",colorLight:"colorLight",cssClass:"cssClass",elementType:"elementType",errorCorrectionLevel:"errorCorrectionLevel",imageSrc:"imageSrc",imageHeight:"imageHeight",imageWidth:"imageWidth",margin:"margin",qrdata:"qrdata",scale:"scale",version:"version",width:"width",alt:"alt",ariaLabel:"ariaLabel",title:"title"},outputs:{qrCodeURL:"qrCodeURL"},features:[re.\u0275\u0275NgOnChangesFeature],decls:2,vars:2,consts:[["qrcElement",""]],template:function(d,h){1&d&&re.\u0275\u0275element(0,"div",null,0),2&d&&re.\u0275\u0275classMap(h.cssClass)},encapsulation:2,changeDetection:0}),u})(),se=(()=>{class u{}return u.\u0275fac=function(d){return new(d||u)},u.\u0275mod=re.\u0275\u0275defineNgModule({type:u}),u.\u0275inj=re.\u0275\u0275defineInjector({providers:[]}),u})()}}]);

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.