1import{a as Se,b as Be,c as Ae,d as Fe}from"./chunk-6B2I3S7B.js";import{a as Ke,b as qe}from"./chunk-YQGVVXIW.js";import{a as Ye,b as Je}from"./chunk-4BP6FASQ.js";import{a as He,d as Qe,e as $e}from"./chunk-WYFIVRGY.js";import{h as We}from"./chunk-LFK5DF23.js";import"./chunk-RTAXFE3S.js";import{K as Re,M as B,N as ee,O as Ve,P as D,R as U,T as te,U as ie,V as A,X as Ze,Y as z}from"./chunk-GAWQ4BZL.js";import{j as Ue}from"./chunk-IG6YIK5R.js";import"./chunk-2NCTYQIN.js";import{b as xe,c as Oe,f as Pe,n as De}from"./chunk-CZL3Y3XH.js";import{a as Ge}from"./chunk-XR27XSVK.js";import{a as je}from"./chunk-V2QYUKCQ.js";import{a as Ne}from"./chunk-2FA737DQ.js";import{$ as ce,$a as ue,Ab as S,Bb as W,Ca as M,Ea as Z,Fa as O,G as $,Ga as me,Ja as f,L as de,M as Y,Na as d,Pb as ve,Qb as Ce,S as x,Ta as s,Ua as r,V as v,Va as _,Wb as be,Xb as ze,Ya as j,Yb as we,Za as P,Zb as Ie,_a as c,a as q,aa as I,ab as _e,b as Q,ba as k,bb as T,cb as G,cc as ke,i as ae,ia as V,j as se,ja as L,jb as u,k as R,kb as N,la as pe,lb as C,mc as Le,nb as fe,oa as he,ob as Me,oc as Ee,pb as ye,pc as Te,sc as X,ta as E,u as le,v as ge,xa as o,xb as J,zb as b}from"./chunk-VE7Z2ZFS.js";var at=["*"],H=class{_ngZone;_pending=[];_listeners=[];_targetStream=new R(void 0);_clearListeners(){for(let a of this._listeners)a.remove();this._listeners=[]}constructor(a){this._ngZone=a}getLazyEmitter(a){return this._targetStream.pipe(de(e=>{let t=new ae(n=>{if(!e){this._pending.push({observable:t,observer:n});return}let g=e.addListener(a,l=>{this._ngZone.run(()=>n.next(l))});if(!g){n.complete();return}return this._listeners.push(g),()=>g.remove()});return t}))}setTarget(a){let e=this._targetStream.value;a!==e&&(e&&(this._clearListeners(),this._pending=[]),this._targetStream.next(a),this._pending.forEach(t=>t.observable.subscribe(t.observer)),this._pending=[])}destroy(){this._clearListeners(),this._pending=[],this._targetStream.complete()}},F={center:{lat:37.421995,lng:-122.084092},zoom:17,mapTypeId:"roadmap"},Xe="500px",et="500px",re=(()=>{class i{_elementRef=v(pe);_ngZone=v(L);_eventManager=new H(v(L));_mapEl;_existingAuthFailureCallback;googleMap;_isBrowser;height=Xe;width=et;mapId;mapTypeId;set center(e){this._center=e}_center;set zoom(e){this._zoom=e}_zoom;set options(e){this._options=e||F}_options=F;mapInitialized=new V;authFailure=new V;boundsChanged=this._eventManager.getLazyEmitter("bounds_changed");centerChanged=this._eventManager.getLazyEmitter("center_changed");mapClick=this._eventManager.getLazyEmitter("click");mapDblclick=this._eventManager.getLazyEmitter("dblclick");mapDrag=this._eventManager.getLazyEmitter("drag");mapDragend=this._eventManager.getLazyEmitter("dragend");mapDragstart=this._eventManager.getLazyEmitter("dragstart");headingChanged=this._eventManager.getLazyEmitter("heading_changed");idle=this._eventManager.getLazyEmitter("idle");maptypeidChanged=this._eventManager.getLazyEmitter("maptypeid_changed");mapMousemove=this._eventManager.getLazyEmitter("mousemove");mapMouseout=this._eventManager.getLazyEmitter("mouseout");mapMouseover=this._eventManager.getLazyEmitter("mouseover");projectionChanged=this._eventManager.getLazyEmitter("projection_changed");mapRightclick=this._eventManager.getLazyEmitter("rightclick");tilesloaded=this._eventManager.getLazyEmitter("tilesloaded");tiltChanged=this._eventManager.getLazyEmitter("tilt_changed");zoomChanged=this._eventManager.getLazyEmitter("zoom_changed");constructor(){let e=v(he);if(this._isBrowser=Ie(e),this._isBrowser){let t=window;t.google,this._existingAuthFailureCallback=t.gm_authFailure,t.gm_authFailure=()=>{this._existingAuthFailureCallback&&this._existingAuthFailureCallback(),this.authFailure.emit()}}}ngOnChanges(e){(e.height||e.width)&&this._setSize();let t=this.googleMap;t&&(e.options&&t.setOptions(this._combineOptions()),e.center&&this._center&&t.setCenter(this._center),e.zoom&&this._zoom!=null&&t.setZoom(this._zoom),e.mapTypeId&&this.mapTypeId&&t.setMapTypeId(this.mapTypeId)
1)}ngOnInit(){this._isBrowser&&(this._mapEl=this._elementRef.nativeElement.querySelector(".map-container"),this._setSize(),google.maps.Map?this._initialize(google.maps.Map):this._ngZone.runOutsideAngular(()=>{google.maps.importLibrary("maps").then(e=>this._initialize(e.Map))}))}_initialize(e){this._ngZone.runOutsideAngular(()=>{this.googleMap=new e(this._mapEl,this._combineOptions()),this._eventManager.setTarget(this.googleMap),this.mapInitialized.emit(this.googleMap)})}ngOnDestroy(){if(this.mapInitialized.complete(),this._eventManager.destroy(),this._isBrowser){let e=window;e.gm_authFailure=this._existingAuthFailureCallback}}fitBounds(e,t){this._assertInitialized(),this.googleMap.fitBounds(e,t)}panBy(e,t){this._assertInitialized(),this.googleMap.panBy(e,t)}panTo(e){this._assertInitialized(),this.googleMap.panTo(e)}panToBounds(e,t){this._assertInitialized(),this.googleMap.panToBounds(e,t)}getBounds(){return this._assertInitialized(),this.googleMap.getBounds()||null}getCenter(){return this._assertInitialized(),this.googleMap.getCenter()}getClickableIcons(){return this._assertInitialized(),this.googleMap.getClickableIcons()}getHeading(){return this._assertInitialized(),this.googleMap.getHeading()}getMapTypeId(){return this._assertInitialized(),this.googleMap.getMapTypeId()}getProjection(){return this._assertInitialized(),this.googleMap.getProjection()||null}getStreetView(){return this._assertInitialized(),this.googleMap.getStreetView()}getTilt(){return this._assertInitialized(),this.googleMap.getTilt()}getZoom(){return this._assertInitialized(),this.googleMap.getZoom()}get controls(){return this._assertInitialized(),this.googleMap.controls}get data(){return this._assertInitialized(),this.googleMap.data}get mapTypes(){return this._assertInitialized(),this.googleMap.mapTypes}get overlayMapTypes(){return this._assertInitialized(),this.googleMap.overlayMapTypes}_resolveMap(){return this.googleMap?Promise.resolve(this.googleMap):this.mapInitialized.pipe($(1)).toPromise()}_setSize(){if(this._mapEl){let e=this._mapEl.style;e.height=this.height===null?"":tt(this.height)||Xe,e.width=this.width===null?"":tt(this.width)||et}}_combineOptions(){let e=this._options||{};return Q(q({},e),{center:this._center||e.center||F.center,zoom:this._zoom??e.zoom??F.zoom,mapTypeId:this.mapTypeId||e.mapTypeId||F.mapTypeId,mapId:this.mapId||e.mapId})}_assertInitialized(){this.googleMap}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Z({type:i,selectors:[["google-map"]],inputs:{height:"height",width:"width",mapId:"mapId",mapTypeId:"mapTypeId",center:"center",zoom:"zoom",options:"options"},outputs:{mapInitialized:"mapInitialized",authFailure:"authFailure",boundsChanged:"boundsChanged",centerChanged:"centerChanged",mapClick:"mapClick",mapDblclick:"mapDblclick",mapDrag:"mapDrag",mapDragend:"mapDragend",mapDragstart:"mapDragstart",headingChanged:"headingChanged",idle:"idle",maptypeidChanged:"maptypeidChanged",mapMousemove:"mapMousemove",mapMouseout:"mapMouseout",mapMouseover:"mapMouseover",projectionChanged:"projectionChanged",mapRightclick:"mapRightclick",tilesloaded:"tilesloaded",tiltChanged:"tiltChanged",zoomChanged:"zoomChanged"},exportAs:["googleMap"],features:[ce],ngContentSelectors:at,decls:2,vars:0,consts:[[1,"map-container"]],template:function(t,n){t&1&&(ue(),_(0,"div",0),_e(1))},encapsulation:2,changeDetection:0})}return i})(),st=/([A-Za-z%]+)$/;function tt(i){return i==null?"":st.test(i)?i:`${i}px`}var it=(()=>{class i{_map=v(re);_ngZone=v(L);_eventManager=new H(v(L));_options=new R({});_path=new R(void 0);_destroyed=new se;polyline;set options(e){this._options.next(e||{})}set path(e){this._path.next(e)}polylineClick=this._eventManager.getLazyEmitter("click");polylineDblclick=this._eventManager.getLazyEmitter("dblclick");polylineDrag=this._eventManager.getLazyEmitter("drag");polylineDragend=this._eventManager.getLazyEmitter("dragend");polylineDragstart=this._eventManager.getLazyEmitter("dragstart");polylineMousedown=this._eventManager.getLazyEmitter("mousedown");polylineMousemove=this._eventManager.getLazyEmitter("mousemove");polylineMouseout=this._eventManager.getLazyEmitter("mouseout");polylineMouseover=this._eventManager.getLazyEmitter("mouseover");polylineMouseup=this._eventManager.getLazyEmitter("mouseup");polylineRightclick=this._eventManager.getLazyEmitter("rightclick");polylineInitialized=new V;constructor(){}ngOnInit(){this._map._isBrowser&&this._combineOptions().pipe($(1)).subscribe(e=>{google.maps.Polyline&&this._map.googleMap?this._initialize(this._map.googleMap,google.maps.Polyline,e):this._ngZone.runOutsideAngular(()=>{Promise.all([this._map._resolveMap(),google.maps.importLibrary("maps")]).then(([t,n])=>{this._initialize(t,n.Polyline,e)})})})}_initialize(e,t,n){this._ngZone.runOutsideAngular(()=>{this.polyline=new t(n),this._assertInitialized(),this.polyline.setMap(e),this._eventManager.setTarget(this.polyline),this.polylineInitialized.emit(this.polyline),this._watchForOptionsChanges(),this._watchForPathChanges()})}ngOnDestroy(){this._eventManager.destroy(),this._destroyed.next(),this._destroyed.complete(),this.polyline?.setMap(null)}getDraggable(){return this._assertInitialized(),this.polyline.getDraggable()}getEditable(){return this._assertInitialized(),this.polyline.getEditable()}getPath(){return this._assertInitialized(),this.polyline.getPath()}getVisible(){return this._assertInitialized(),this.polyline.getVisible()}_combineOptions(){return ge([this._options,this._path]).pipe(le(([e,t])=>Q(q({},e),{path:t||e.path})))}_watchForOptionsChanges(){this._options.pipe(Y(this._destroyed)).subscribe(e=>{this._assertInitialized(),this.polyline.setOptions(e)})}_watchForPathChanges(){this._path.pipe(Y(this._destroyed)).subscribe(e=>{e&&(this._assertInitialized(),this.polyline.setPath(e))})}_assertInitialized(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=me({type:i,selectors:[["map-polyline"]],inputs:{options:"options",path:"path"},outputs:{polylineClick:"polylineClick",polylineDblclick:"polylineDblclick",polylineDrag:"polylineDrag",polylineDragend:"polylineDragend",polylineDragstart:"polylineDragstart",polylineMousedown:"polylineMousedown",polylineMousemove:"polylineMousemove",polylineMouseout:"polylineMouseout",polylineMouseover:"polylineMouseover",polylineMouseup:"polylineMouseup",polylineRightclick:"polylineRightclick",polylineInitialized:"polylineInitialized"},exportAs:["mapPolyline"]})}return i})();var nt=(()=>
1{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=O({type:i});static \u0275inj=x({})}return i})();var gt=(i,a)=>({lat:i,lng:a}),dt=(i,a)=>({strokeColor:i,strokeWeight:a});function ct(i,a){if(i&1&&(s(0,"div",9),_(1,"img",10),s(2,"p"),u(3),r()()),i&2){let e=c();o(),d("src",e.opData.photoURL,E),o(2),C(" ",e.opData.name," ")}}function pt(i,a){i&1&&(s(0,"div",18),_(1,"img",19),s(2,"h3"),u(3,"This video is unavailable."),r()())}function ht(i,a){if(i&1&&_(0,"app-player",34),i&2){let e=c(3);d("currentVideo",e.currentVideo)("tag","Profile")("currentTime",e.currentTime)}}function mt(i,a){if(i&1){let e=j();s(0,"ul",49)(1,"li",50)(2,"a",51),u(3," Edit Details"),r()(),s(4,"li",50)(5,"a",52),u(6," Download"),r()(),_(7,"li",53),s(8,"li",50)(9,"a",54),P("click",function(){I(e);let n=c(5);return k(n.removeClip())}),u(10," Delete"),r()()()}if(i&2){let e=c(5);o(2),G("routerLink","/studio/",e.videoId,""),o(3),T("href",e.currentVideo.clips.src,E)}}function ut(i,a){i&1&&(s(0,"li",46),_(1,"span",47),f(2,mt,11,3,"ul",48),r())}function _t(i,a){if(i&1&&(s(0,"p")(1,"b"),u(2,"License Plate: "),r(),u(3),r()),i&2){let e=c(4);o(3),C(" ",e.currentVideo.plates,"")}}function ft(i,a){if(i&1&&(s(0,"p",55),u(1),b(2,"date"),r()),i&2){let e=c(4);o(),C(" ",W(2,1,e.normalizeTimeStamp(e.currentVideo.timestamp),"medium")," ")}}function Mt(i,a){if(i&1){let e=j();s(0,"div",35)(1,"div",36)(2,"ul",37)(3,"li",38),P("click",function(){I(e);let n=c(3);return k(n.fbShare())}),_(4,"span",39),r(),s(5,"li",38),P("click",function(){I(e);let n=c(3);return k(n.twShare())}),_(6,"span",40),r(),f(7,ut,3,0,"li",41),r(),s(8,"div",42)(9,"label"),u(10),b(11,"number"),r(),u(12," \xA0\xA0\xA0 "),s(13,"label",38),P("click",function(){I(e);let n=c(3);return k(n.commentFoucs())}),u(14),r()(),_(15,"div",33),r(),s(16,"div",43),f(17,_t,4,1,"p",44),s(18,"p")(19,"b"),u(20," Description: "),r(),u(21),r(),f(22,ft,3,4,"p",45),r(),_(23,"div",33),r()}if(i&2){let e=c(3);o(7),d("ngIf",e.isOwnerVar),o(3),C("",W(11,6,e.currentVideo.views,0)," Views "),o(4),C("",e.currentVideo.cmntsCount?e.currentVideo.cmntsCount:0," Comments"),o(3),d("ngIf",e.currentVideo.plates),o(4),C(" ",e.currentVideo.description,""),o(),d("ngIf",e.currentVideo.timestamp)}}function yt(i,a){if(i&1&&(s(0,"div",25)(1,"google-map",56),_(2,"map-polyline",57),r()()),i&2){let e=c(3);o(),d("center",J(4,gt,e.map.center.latitude,e.map.center.longitude))("zoom",e.map.zoom),o(),d("path",e.mapPolylinePath)("options",J(7,dt,e.map.stroke.color,e.map.stroke.weight))}}function vt(i,a){i&1&&_(0,"div",66)}function Ct(i,a){if(i&1&&(s(0,"div",58)(1,"div")(2,"div",59)(3,"div",60),_(4,"img",61),r(),s(5,"div",62),u(6),b(7,"timeAgo"),r(),s(8,"a",63),u(9),r(),s(10,"div",64),u(11),r()(),f(12,vt,1,0,"div",65),r()()),i&2){let e=a.$implicit,t=c(3);d("@introAnim",void 0),o(4),T("src",t.comments[e].pic,E),T("alt",t.comments[e].auther),o(2),N(S(7,9,t.comments[e].timestamp)),o(2),G("routerLink","/profile/",t.comments[e].autherId,""),o(),C("@",t.comments[e].auther,""),o(2),N(t.comments[e].body),o(),d("ngIf",t.conversationPreviusIsMine[e])}}function bt(i,a){i&1&&(s(0,"p",67),u(1,"Be the first to comment"),r())}function zt(i,a){if(i&1){let e=j();s(0,"div",20)(1,"div",21),f(2,ht,1,3,"app-player",22),r(),f(3,Mt,24,9,"div",23)(4,yt,3,10,"div",24),s(5,"div",25)(6,"div",26),f(7,Ct,13,11,"div",27),b(8,"keys"),f(9,bt,2,0,"p",28),r(),s(10,"div",29)(11,"div",30)(12,"textarea",31),ye("ngModelChange",function(n){I(e);let g=c(2);return Me(g.replyBox,n)||(g.replyBox=n),k(n)}),r(),s(13,"button",32),P("click",function(){I(e);let n=c(2);return k(n.sendComment())}),u(14,"Send"),r()()(),_(15,"div",33),r()()}if(i&2){let e=c(2);o(2),d("ngIf",e.currentVideo),o(),d("ngIf",e.currentVideo),o(),d("ngIf",e.map.path),o(3),d("ngForOf",S(8,7,e.comments)),o(2),d("ngIf",e.currentVideo&&!e.comments),o(3),d("fixPadding",0),fe("ngModel",e.replyBox)}}function wt(i,a){if(i&1&&(s(0,"p",72),u(1),b(2,"date"),r()),i&2){let e=c().$implicit,t=c(3);o(),N(W(2,1,t.preatifyDate(e),"MMM d y"))}}function It(i,a){if(i&1&&_(0,"img",76),i&2){let e=c().$implicit,t=c().$implicit,n=c(3);T("src",n.orderedClips[t][e].thumbs.src,E)}}function kt(i,a){if(i&1&&(s(0,"div",73)(1,"a",74),f(2,It,1,1,"img",75),r()()),i&2){let e=a.$implicit,t=c().$implicit,n=c(3);o(),G("routerLink","/clip/",e,""),o(),d("ngIf",n.orderedClips[t][e].thumbs)}}function xt(i,a){if(i&1&&(s(0,"div"),f(1,wt,3,4,"p",70)(2,kt,3,3,"div",71),b(3,"keys"),r()),i&2){let e=a.$implicit,t=c(3);o(),d("ngIf",e),o(),d("ngForOf",S(3,2,t.orderedClips[e]))}}function Ot(i,a){if(i&1&&(s(0,"div",68),f(1,xt,4,4,"div",69),b(2,"keys"),r()),i&2){let e=c(2);o(),d("ngForOf",S(2,1,e.orderedClips))}}function Pt(i,a){if(i&1&&(s(0,"div",11)(1,"div",12)(2,"div",13)(3,"div",14),f(4,pt,4,0,"div",15)(5,zt,16,9,"div",16)(6,Ot,3,3,"div",17),r()()()()),i&2){let e=c();o(4),d("ngIf",e.video404),o(),d("ngIf",!e.video404),o(),d("ngIf",e.orderedClips)}}function Dt(i,a){i&1&&(s(0,"div",77)(1,"div",78)(2,"div",13)(3,"div",14)(4,"h3",79),u(5,"This user doesn't have any videos yet.."),r()()()()())}var rt=(()=>{class i{get mapPolylinePath(){return this.map.path?this.map.path.map(e=>({lat:e.latitude,lng:e.longitude})):[]}constructor(e,t,n,g,l,h,m,p){this.firestore=e,this.route=t,this.http=n,this.router=g,this.auth=l,this.mixpanel=h,this.ssr=m,this.meta=p,this.map={stroke:{color:"#6060
1FB",weight:4},zoom:16},this.userHaveNoVideos=!1,this.videoRoute=[],this.conversationPreviusIsMine=[],this.comments={},this.video404=!1,this.isOwnerVar=!1,this.firebaseUser=this.auth.firebaseUser,this.currentTime=this.route.snapshot.queryParams.s,this.route.params.subscribe(y=>{if(this.userHaveNoVideos=!1,this.videoRoute=[],this.uid=y.uid,this.videoId=y.videoId,this.isOwnerVar=this.isOwner(),this.videoId&&this.videoId.length<15&&this.uid){this.redirectIfOldFormat();return}if(typeof this.videoId>"u"){let K=A(D(this.firestore,"clips"),z("uid","==",this.uid),z("isPublic","==",!0),ie("dateUploaded","desc"),te(1));B(K,{idField:"key"}).subscribe(w=>{w[0]?this.router.navigate(["/clip/"+w[0].key]):this.userHaveNoVideos=!0},w=>{this.userHaveNoVideos=!0,console.error("An error occurred when requesting clips.",w)})}})}ngOnInit(){!this.videoId&&!this.uid||this.route.params.subscribe(e=>{if(this.comments=[],this.map.center=null,this.map.path=null,this.userHaveNoVideos=!1,this.videoRoute=[],this.uid=e.uid,this.videoId=e.videoId,this.uid&&this.loadUserDetails(),this.ssr.isBrowser()&&window.scrollTo(0,0),this.ssr.isBrowser()||this.setMetaTags(this.videoId),this.videoId){this.loadComments();let t=U(this.firestore,"clips",this.videoId),n=ee(t).subscribe(g=>{let l=g;if(!l||!l.timestamp){this.video404=!0;return}this.currentVideo=l,console.log(l),this.uid=l.uid,this.currentVideo.op=this.uid,this.currentVideo.videoId=this.videoId,this.currentVideo.thumbs&&this.currentVideo.thumbs.src&&this.currentVideo.thumbs.src.indexOf("events")!==-1&&(this.currentVideo.thumbs.src=this.currentVideo.thumbs.src.split("?")[0],this.currentVideo.clips&&this.currentVideo.clips.src&&(this.currentVideo.clips.src=this.currentVideo.clips.src.split("?")[0])),this.isOwnerVar=this.isOwner(),this.loadUserDetails(),this.ssr.isBrowser()&&this.meta.set(this.currentVideo?this.currentVideo.description:"",this.currentVideo?this.currentVideo.plates:""),l.gps&&(this.http.get(l.gps.src).subscribe(h=>{if(!h)return;let m=this.prepGeoJsonToGoogleMaps(h),p=Math.ceil(m.length/2);m[p]&&(this.map.center={latitude:m[p].latitude,longitude:m[p].longitude},this.map.path=m)},h=>{console.log("An error occurred when requesting clips.",h)}),n.unsubscribe())})}})}loadComments(){let e=A(D(this.firestore,"clipsComments"),z("videoId","==",this.videoId));B(e,{idField:"key"}).subscribe(t=>{this.comments=t})}loadUserDetails(){try{let e=U(this.firestore,"users",this.uid);ee(e).subscribe(n=>this.opData=n);let t=A(D(this.firestore,"clips"),z("uid","==",this.uid),z("isPublic","==",!0),ie("dateUploaded","desc"));B(t,{idField:"key"}).subscribe(n=>{this.orderedClips=this.orderClipsByDate(n)})}catch(e){console.error(e)}}orderClipsByDate(e){let t={},n;for(let l=0;l<e.length;l++){n=e[l],e[l].key&&e[l].key.indexOf("_s")!==-1&&(e[l].key=e[l].key.replace("_s",""));let h=n.key,m=new Date(this.normalizeTimeStamp(n.timestamp,n.key)),p=m.getDate()+"-"+m.getMonth()+"-"+m.getFullYear();n&&n.thumbs&&n.thumbs&&n.thumbs.src&&(t[p]||(t[p]={}),n.thumbs.src.indexOf("events")!==-1&&(n.thumbs.src=n.thumbs.src.split("?")[0]),t[p][h]=n)}let g=Object.keys(t).sort((l,h)=>{let[m,p,y]=l.split("-").map(Number),[K,w,oe]=h.split("-").map(Number);return y!==oe?oe-y:p!==w?w-p:K-m}).reduce((l,h)=>(l[h]=t[h],l),{});return console.log("--",g),g}reverseForIn(e,t){let n=[];for(let g in e)g&&n.push(g);for(let g=n.length-1;g>=0;g--)t.call(e,n[g])}reverseObject(e){let t={};return this.reverseForIn(e,n=>{t[n]=e[n]}),t}preatifyDate(e){if(!e)return"";let t=e.split("-");return new Date(t[2],t[1],t[0],0,0,0,0).getTime()}hasComments(e){return!!(e&&Object.keys(e).length)}hasMoreToLoad(){return!this.comments||typeof this.comments>"u"?!1:!!(this.currentVideo&&this.currentVideo.cmntsCount>Object.keys(this.comments).length)}isOwner(){return this.auth.firebaseUser&&this.uid===this.auth.firebaseUser.uid}commentFoucs(){document.getElementById("replyBox").focus()}sendComment(){if(!this.replyBox){alert("Please write something");return}this.auth.verifyLoggedIn().then(e=>{Ve(D(this.firestore,"clipsComments"),{autherId:e.uid,auther:e.displayName,pic:e.photoURL,body:this.replyBox,timestamp:new Date().getTime(),videoId:this.videoId}).then(()=>{this.replyBox=""}),this.mixpanel.track("posted a comment",{})})}fbShare(){this.ssr.isBrowser()&&window.open("https://www.facebook.com/sharer/sharer.php?u=https://dride.io
1/clip/"+this.videoId,"Facebook","toolbar=0,status=0,resizable=yes,width=500,height=600,top="+(window.innerHeight-600)/2+",left="+(window.innerWidth-500)/2)}twShare(){if(!this.ssr.isBrowser())return;let e="https://dride.io/clip/"+this.videoId,t=encodeURIComponent("You need to see this! #dride "+e);window.open("https://www.twitter.com/intent/tweet?text="+t,"Twitter","toolbar=0,status=0,resizable=yes,width=500,height=600,top="+(window.innerHeight-600)/2+",left="+(window.innerWidth-500)/2)}removeClip(){if(!this.uid||!this.videoId){console.error("Error: No Uid or videoId, Delete aborted");return}Ze(U(this.firestore,"clips",this.videoId),{deleted:!0}),this.router.navigate(["/profile/"+this.uid])}prepGeoJsonToGoogleMaps(e){let t=[];return Object.keys(e).forEach(function(n){t.push({latitude:parseFloat(e[n].latitude),longitude:parseFloat(e[n].longitude)})}),t}setMetaTags(e){if(!e)return;let t=`https://firestore.googleapis.com/v1/projects/dride-2384f/databases/(default)/documents/clips/${e}`;this.http.get(t).subscribe({next:n=>{if(!n||!n.fields)return;let g=n.fields,l="Event on Dride Cloud",h=g.description?.stringValue||"",m=g.thumbs?.mapValue?.fields?.src?.stringValue||"",p=g.clips?.mapValue?.fields?.src?.stringValue||"",y="https://dride.io/clip/"+e;this.meta.addTag({property:"og:title",content:l}),this.meta.addTag({property:"og:description",content:h}),this.meta.addTag({property:"og:url",content:y}),this.meta.addTag({property:"og:type",content:"video.other"}),this.meta.addTag({property:"og:image",content:m}),this.meta.addTag({property:"og:image:width",content:"320"}),this.meta.addTag({property:"og:image:height",content:"176"}),this.meta.addTag({property:"og:video",content:p}),this.meta.addTag({property:"og:video:secure_url",content:p}),this.meta.addTag({property:"og:video:type",content:"video/mp4"}),this.meta.addTag({name:"twitter:card",content:"player"}),this.meta.addTag({name:"twitter:site",content:"@drideHQ"}),this.meta.addTag({name:"twitter:url",content:y}),this.meta.addTag({name:"twitter:title",content:l}),this.meta.addTag({name:"twitter:description",content:h}),this.meta.addTag({name:"twitter:image",content:m}),this.meta.addTag({name:"twitter:player",content:p}),this.meta.addTag({name:"twitter:player:width",content:"1280"}),this.meta.addTag({name:"twitter:player:height",content:"720"}),this.meta.addTag({name:"twitter:player:stream",content:p}),this.meta.addTag({name:"twitter:player:stream:content_type",content:"video/mp4"})},error:()=>{}})}normalizeTimeStamp(e,t=null){return e&&(e.toString().length===10&&(e=e+"
1000"),e=parseInt(e,10)),!isNaN(e)&&new Date(e).getTime()>0?e:t?this.yi_getTimeStamp(t):e}yi_getTimeStamp(e){let t=e.split("_");if(!t[1])return e;let n=t[0],g=t[1][0]+t[1][1],l=t[1][2]+t[1][3],h=t[2][0]+t[2][1],m=t[2][2]+t[2][3],p=t[2][4]+t[2][5];return new Date(n+"-"+g+"-"+l+" "+h+":"+m+":"+p).getTime()?new Date(n+"-"+g+"-"+l+" "+h+":"+m+":"+p).getTime():(n=t[0],g=t[1][0]+t[1][1],l=t[2][0]+t[2][1],h=t[3][0]+t[3][1],m=t[3][2]+t[3][3],p=t[3][4]+t[3][5],new Date(n+"-"+g+"-"+l+" "+h+":"+m+":"+p).getTime())}redirectIfOldFormat(){let e=A(D(this.firestore,"clips"),z("uid","==",this.uid),z("id","==",this.videoId),te(1)),t=B(e,{idField:"key"}).subscribe(n=>{this.router.navigate(["/clip/"+n[0].key]),t.unsubscribe()})}static{this.\u0275fac=function(t){return new(t||i)(M(Re),M(Le),M(ke),M(Ee),M(We),M(Ge),M(je),M(Ne))}}static{this.\u0275cmp=Z({type:i,selectors:[["app-profile"]],standalone:!1,decls:9,vars:3,consts:[[1,"profile"],[1,"container-fluid","p-0"],[1,"headerBg"],[1,"gradBg"],[1,"container","hidden-xs-down"],["class","profilePic",4,"ngIf"],["class","container-fluid greyBg p-xs-0",4,"ngIf"],["class","container-fluid greyBg mh",4,"ngIf"],[1,"clearfix"],[1,"profilePic"],[3,"src"],[1,"container-fluid","greyBg","p-xs-0"],[1,"col-md-12","no-padding"],[1,"clearfix","container"],[1,"row"],["class","col-md-8 p-xs-0 p404",4,"ngIf"],["class","col-md-8 p-xs-0",4,"ngIf"],["class","col-md-4",4,"ngIf"],[1,"col-md-8","p-xs-0","p404"],["src","assets/images/problem.gif","alt","problem"],[1,"col-md-8","p-xs-0"],[1,"box","mainVid"],[3,"currentVideo","tag","currentTime",4,"ngIf"],["class","box innerPad",4,"ngIf"],["class","box",4,"ngIf"],[1,"box"],[1,"cmntsBox","innerPad"],["class","listItem",4,"ngFor","ngForOf"],["class","firstToCmnt",4,"ngIf"],[1,"postBox"],[1,"wrapReplyBox","mt-0"],["autosize","","id","replyBox","ctrl-enter","sendComment()","type","text","name","reply","placeholder","What's on your mind?",1,"form-control","replyBox","mt-0",3,"ngModelChange","fixPadding","ngModel"],[1,"btn","btn-dride-black","sendBtn","float-right",3,"click"],[1,"clear"],[3,"currentVideo","tag","currentTime"],[1,"box","innerPad"],[1,"actionBar"],[1,"float-right","actions"],[3,"click"],[1,"icon-facebookMedium","shareIcon"],[1,"icon-twitterMedium","shareIcon"],["class","btn-group","dropdown","",4,"ngIf"],[1,"views","float-left"],[1,"desc"],[4,"ngIf"],["class","dateLabel",4,"ngIf"],["dropdown","",1,"btn-group"],["dropdownToggle","",1,"icon-dots-three-horizontal"],["class","dropdown-menu dropdown-menu-right","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","dropdown-menu-right"],["role","menuitem"],[1,"dropdown-item",3,"routerLink"],["target","_BLANK","download","",1,"dropdown-item",3,"href"],[1,"divider","dropdown-divider"],[1,"dropdown-item","delete",3,"click"],[1,"dateLabel"],["width","100%","height","300px",1,"pad5",3,"center","zoom"],[3,"path","options"],[1,"listItem"],[1,"bubble"],[1,"auther","float-left","pl"],[3,"src","alt"],[1,"ago"],[1,"bold",3,"routerLink"],[1,"bdy"],["class","connectorLine",4,"ngIf"],[1,"connectorLine"],[1,"firstToCmnt"],[1,"col-md-4"],[4,"ngFor","ngForOf"],["class","dvdrOfClips",4,"ngIf"],["class","box moreClips",4,"ngFor","ngForOf"],[1,"dvdrOfClips"],[1,"box","moreClips"],[3,"routerLink"],["class","img-fluid",3,"src",4,"ngIf"],[1,"img-fluid",3,"src"],[1,"container-fluid","greyBg","mh"],[1,"col-md-12","p-0"],[1,"noVideos","mx-auto"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),f(5,ct,4,2,"div",5),r()()()(),f(6,Pt,7,3,"div",6)(7,Dt,6,0,"div",7),r(),_(8,"div",8)),t&2&&(o(5),d("ngIf",n.opData),o(),d("ngIf",!n.userHaveNoVideos),o(),d("ngIf",n.userHaveNoVideos))},dependencies:[Te,ve,Ce,xe,Oe,Pe,re,it,Ke,Ye,Be,Ae,Se,ze,be,He,Qe],styles:['.profile[_ngcontent-%COMP%]{color:#666;min-height:100vh;background-color:#f9f9f9}.profile[_ngcontent-%COMP%] .headerBg[_ngcontent-%COMP%]{background-color:#333;background-image:url("./media/defaultBg-7TLXWANV.jpg");height:250px;background-size:cover;background-repeat:no-repeat}.profile[_ngcontent-%COMP%] .profilePic[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:2px;border:1px solid #fff;width:87px;height:87px}.profile[_ngcontent-%COMP%] .mh[_ngcontent-%COMP%]{min-height:calc(100vh - 430px)}.profile[_ngcontent-%COMP%] .profilePic[_ngcontent-%COMP%]{position:relative;top:-70px;padding:9px}.profile[_ngcontent-%COMP%] .profilePic[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:20px;color:#fff;font-size:26px;font-weight:100;text-transform:uppercase}.profile[_ngcontent-%COMP%] .profilePic[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-weight:100}.profile[_ngcontent-%COMP%] .p404[_ngcontent-%COMP%]{text-align:center}.profile[_ngcontent-%COMP%] .p404[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{padding-top:80px}.profile[_ngcontent-%COMP%] .dropdown-divider[_ngcontent-%COMP%], .profile[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{width:100%}
1.profile[_ngcontent-%COMP%] .delete[_ngcontent-%COMP%]{color:#ce2626!important}.profile[_ngcontent-%COMP%] .ic[_ngcontent-%COMP%]{float:left;left:-9px;position:relative}@media (min-width: 600px){.profile[_ngcontent-%COMP%] .gradBg[_ngcontent-%COMP%]{background:linear-gradient(to top,#2b2b2b 0%,transparent 100%);height:90px;position:relative;top:160px}}.profile[_ngcontent-%COMP%] ui-gmap-google-map[_ngcontent-%COMP%]{display:inherit}.profile[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{background-color:#fff;border:11px solid #f9f9f9;min-height:100px;padding:0}.profile[_ngcontent-%COMP%] .pad5[_ngcontent-%COMP%]{padding:7px;width:100%}.profile[_ngcontent-%COMP%] .mainVid[_ngcontent-%COMP%]{margin-top:47px;padding:7px}.profile[_ngcontent-%COMP%] .actionBar[_ngcontent-%COMP%]{margin:20px 0;border-bottom:1px dashed #666666;height:29px}.profile[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{list-style:none}.profile[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{float:left;margin-right:20px;font-size:15.6px;font-weight:100;cursor:pointer}.profile[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{margin-right:0}.profile[_ngcontent-%COMP%] .views[_ngcontent-%COMP%]{font-weight:600;font-size:19px;margin-top:-5px}.profile[_ngcontent-%COMP%] .innerPad[_ngcontent-%COMP%]{padding:0 25px}.profile[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:100;font-size:16px;color:#8e8e8e}.profile[_ngcontent-%COMP%] p[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:#666}.profile[_ngcontent-%COMP%] .noVideos[_ngcontent-%COMP%]{text-align:center;padding-top:100px}.profile[_ngcontent-%COMP%] .dateLabel[_ngcontent-%COMP%]{font-size:12px;float:right}.profile[_ngcontent-%COMP%] .moreClips[_ngcontent-%COMP%]{padding:7px}.profile[_ngcontent-%COMP%] .dvdrOfClips[_ngcontent-%COMP%]{text-align:center;font-size:12px;margin-top:14px}.profile[_ngcontent-%COMP%] .icon-trash-can[_ngcontent-%COMP%]{font-size:24px;position:relative;top:-2px}.profile[_ngcontent-%COMP%] .shareIcon[_ngcontent-%COMP%]{font-size:28px;position:relative;top:-4px}.profile[_ngcontent-%COMP%] .icon-dots-three-horizontal[_ngcontent-%COMP%]{font-size:19px}.profile[_ngcontent-%COMP%] .postBox[_ngcontent-%COMP%]{min-height:35px;border-top:1px solid #f9f9f9;width:100%}.profile[_ngcontent-%COMP%] .postBox[_ngcontent-%COMP%] .wrapReplyBox[_ngcontent-%COMP%]{min-height:35px;background-color:#fff;width:100%}.profile[_ngcontent-%COMP%] .postBox[_ngcontent-%COMP%] .wrapReplyBox[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{box-shadow:initial;border:0;resize:none;margin-top:-10px;padding:9px 12px 0;font-size:14px;color:#555;width:82%;font-family:inherit}.profile[_ngcontent-%COMP%] .postBox[_ngcontent-%COMP%] .sendBtn[_ngcontent-%COMP%]{border-radius:2px 0;margin-top:-43px;font-size:19px;font-weight:100;padding:5px 25px;background-color:#333}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .cmt[_ngcontent-%COMP%]{transition:all .5s ease}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]{margin:auto;border-radius:2px;padding:10px;font-weight:100}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%] .bdy[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#337ab7!important}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%] .bdy[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:300}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%] .bdy[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:hover .ago[_ngcontent-%COMP%]{color:#999}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .pl[_ngcontent-%COMP%]{margin-left:-69px;margin-right:18px}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .connectorLine[_ngcontent-%COMP%]{border:1px dashed #b7b7b7;width:1px;height:14px;margin-top:-9px;margin-bottom:-5px;margin-left:-27px}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .auther[_ngcontent-%COMP%]{height:48px;margin-top:45px}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .auther[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:50px;max-height:50px;border-radius:2px;
1margin-top:-73px}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .auther[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{position:relative;top:-43px;left:10px;color:#848484;font-weight:100}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .ago[_ngcontent-%COMP%]{float:right!important;position:relative;left:25px;color:#fff;transition:all .5s ease}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .moreCmnts[_ngcontent-%COMP%]{text-align:center;font-size:14px;color:#333;font-weight:600;cursor:pointer}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .firstToCmnt[_ngcontent-%COMP%]{text-align:center;font-size:14px;color:#6f6f6f;font-weight:300;margin-bottom:17px;margin-top:17px}.profile[_ngcontent-%COMP%] agm-map[_ngcontent-%COMP%]{height:400px;display:inline-block}@media (max-width: 990px){.profile[_ngcontent-%COMP%]{margin-top:-100px}}@media (max-width: 442px){.profile[_ngcontent-%COMP%] .p-xs-0[_ngcontent-%COMP%]{padding:0!important}.profile[_ngcontent-%COMP%] .headerBg[_ngcontent-%COMP%]{height:90px}.profile[_ngcontent-%COMP%] .views[_ngcontent-%COMP%]{font-size:13px}.profile[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{padding-left:0}.profile[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-right:10px;margin-top:-7px;font-size:15.6px}.profile[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-right:inherit;margin-top:inherit}.profile[_ngcontent-%COMP%] .postBox[_ngcontent-%COMP%] .wrapReplyBox[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:67%}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .ago[_ngcontent-%COMP%]{width:106px;font-size:10px}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .auther[_ngcontent-%COMP%]{margin-top:0;position:relative;top:56px}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .auther[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:2px;margin-top:-92px}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .pl[_ngcontent-%COMP%]{margin-left:-14px}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-block}.profile[_ngcontent-%COMP%] .cmntsBox[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%] .bdy[_ngcontent-%COMP%]{margin-top:0;min-height:35px;padding-bottom:17px}}'],data:{animation:[Ue]}})}}return i})();var Lt=[{path:"",component:rt}],ot=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=O({type:i})}static{this.\u0275inj=x({imports:[X.forChild(Lt),X]})}}return i})();var Di=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=O({type:i})}static{this.\u0275inj=x({imports:[ot,we,$e,De,nt,qe,Je,Fe.forRoot()]})}}return i})();export{Di as ProfileModule};
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.