/*! For license information please see photos-node_modules_vue-material-design-icons_AccountBoxMultipleOutline_vue-src_components_FaceCover_vue.js.LICENSE.txt */ "use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["node_modules_vue-material-design-icons_AccountBoxMultipleOutline_vue-src_components_FaceCover_vue"],{46116:(t,e,r)=>{function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{Z:()=>i});const i={name:"FaceCoverMixin",computed:function(t){for(var e=1;e{n.d(r,{Z:()=>w});var o=n(20629),i=n(82880),a=n(45994),c=n(81067),s=n(59537),u=n(2161),l=n(94236),f=n(69363),h=n(86492),p=n.n(h);function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function m(t){for(var e=1;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),F(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;F(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function A(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function b(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){A(i,n,o,a,c,"next",t)}function c(t){A(i,n,o,a,c,"throw",t)}a(void 0)}))}}const w={name:"FetchFacesMixin",data:function(){return{errorFetchingFaces:null,loadingFaces:!1,errorFetchingFiles:null,loadingFiles:!1}},mixins:[f.Z],beforeMount:function(){var t=this;return b(g().mark((function e(){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.fetchFaces();case 1:case"end":return e.stop()}}),e)})))()},computed:m({},(0,o.Se)(["faces"])),methods:m(m({},(0,o.nv)(["appendFiles"])),{},{fetchFaces:function(){var e=this;return b(g().mark((function r(){var n,o,l;return g().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e.loadingFaces){r.next=2;break}return r.abrupt("return");case 2:if(!Object.keys(e.faces).length){r.next=4;break}return r.abrupt("return");case 4:return r.prev=4,e.loadingFaces=!0,e.errorFetchingFaces=null,r.next=9,c.ZP.getDirectoryContents("/recognize/".concat(null===(n=(0,a.ts)())||void 0===n?void 0:n.uid,"/faces/"),{data:u.Z,details:!0,signal:e.abortController.signal});case 9:o=r.sent,l=o.data,e.$store.dispatch("addFaces",{faces:l}),s.Z.debug("[FetchFacesMixin] Fetched ".concat(l.length," new faces: "),l),r.next=20;break;case 15:r.prev=15,r.t0=r.catch(4),r.t0.response&&r.t0.response.status&&(404===r.t0.response.status?e.errorFetchingFaces=404:e.errorFetchingFaces=r.t0),s.Z.error(t("photos","Failed to fetch faces list."),{error:r.t0}),(0,i.x2)(t("photos","Failed to fetch faces list."));case 20:return r.prev=20,e.loadingFaces=!1,r.finish(20);case 23:case"end":return r.stop()}}),r,null,[[4,15,20,23]])})))()},fetchFaceContent:function(t,e){var r=this;return b(g().mark((function n(){var o,i,f,h;return g().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!r.loadingFiles){n.next=2;break}return n.abrupt("return");case 2:if(e||!r.facesFiles[t]||!r.facesFiles[t].length){n.next=4;break}return n.abrupt("return");case 4:return n.prev=4,r.errorFetchingFiles=null,r.loadingFiles=!0,n.next=9,c.ZP.getDirectoryContents("/recognize/".concat(null===(o=(0,a.ts)())||void 0===o?void 0:o.uid,"/faces/").concat(t),{data:u.Z,details:!0,signal:r.abortController.signal});case 9:if(i=n.sent,f=(f=i.data).map((function(t){return(0,l.AX)(t)})).map((function(t){return m(m({},t),{},{filename:p().decode(t.realpath).replace("/".concat((0,a.ts)().uid,"/files"),"/files/".concat((0,a.ts)().uid))})})).map((function(t){return m(m({},t),{},{faceDetections:JSON.parse(p().decode(t.faceDetections))})})),h=f.map((function(t){return""+t.fileid})),r.appendFiles(f),!(f.length>0)){n.next=17;break}return n.next=17,r.$store.commit("addFilesToFace",{faceName:t,fileIdsToAdd:h});case 17:s.Z.debug("[FetchFacesMixin] Fetched ".concat(h.length," new files: "),h),n.next=24;break;case 20:n.prev=20,n.t0=n.catch(4),n.t0.response&&n.t0.response.status&&(404===n.t0.response.status?r.errorFetchingFiles=404:r.errorFetchingFiles=n.t0),s.Z.error("Error fetching face files",{error:n.t0});case 24:return n.prev=24,r.loadingFiles=!1,n.finish(24);case 27:case"end":return n.stop()}}),n,null,[[4,20,24,27]])})))()}})}},35033:(t,e,r)=>{r.d(e,{Z:()=>c});var n=r(87537),o=r.n(n),i=r(23645),a=r.n(i)()(o());a.push([t.id,".face-cover[data-v-53f3a852]{display:flex;flex-direction:column;padding:10px;border-radius:var(--border-radius-large)}.face-cover__crop-container[data-v-53f3a852]{overflow:hidden;width:128px;height:128px;border-radius:128px;position:relative;background:var(--color-background-darker);--photos-face-width: 128px}@media only screen and (max-width: 1020px){.face-cover__crop-container[data-v-53f3a852]{width:95px;height:95px;--photos-face-width: 95px}}.face-cover[data-v-53f3a852]:hover,.face-cover[data-v-53f3a852]:focus{background:var(--color-background-hover)}.face-cover__details[data-v-53f3a852]{display:flex;flex-direction:column;width:128px;margin-top:4px;text-align:center}@media only screen and (max-width: 1020px){.face-cover__details[data-v-53f3a852]{width:95px}}.face-cover__details__first-line[data-v-53f3a852]{display:flex;height:2em;overflow:hidden;text-overflow:ellipsis}.face-cover__details__second-line[data-v-53f3a852]{margin-top:6px;color:var(--color-text-maxcontrast)}.face-cover__details__name[data-v-53f3a852]{flex-grow:1;margin:0}.face-cover--small *[data-v-53f3a852]{font-size:15px !important}.face-cover--small .face-cover__details[data-v-53f3a852]{width:60px !important}.face-cover--small .face-cover__crop-container[data-v-53f3a852]{width:60px !important;height:60px !important;--photos-face-width: 60px !important}","",{version:3,sources:["webpack://./src/components/FaceCover.vue"],names:[],mappings:"AAEA,6BACC,YAAA,CACA,qBAAA,CACA,YAAA,CACA,wCAAA,CAEA,6CACC,eAAA,CACA,WAAA,CACA,YAAA,CACA,mBAAA,CACA,iBAAA,CACA,yCAAA,CACA,0BAAA,CAEA,2CATD,6CAUE,UAAA,CACA,WAAA,CACA,yBAAA,CAAA,CAIF,sEACC,wCAAA,CAGD,sCACC,YAAA,CACA,qBAAA,CACA,WAAA,CACA,cAAA,CACA,iBAAA,CAEA,2CAPD,sCAQE,UAAA,CAAA,CAGD,kDACC,YAAA,CACA,UAAA,CACA,eAAA,CACA,sBAAA,CAGD,mDACC,cAAA,CACA,mCAAA,CAGD,4CACC,WAAA,CACA,QAAA,CAMF,sCACC,yBAAA,CAED,yDACC,qBAAA,CAED,gEACC,qBAAA,CACA,sBAAA,CACA,oCAAA",sourcesContent:['$sizes: ("400": ("count": 3, "marginTop": 66, "marginW": 8), "700": ("count": 4, "marginTop": 66, "marginW": 8), "1024": ("count": 5, "marginTop": 66, "marginW": 44), "1280": ("count": 4, "marginTop": 66, "marginW": 44), "1440": ("count": 5, "marginTop": 88, "marginW": 66), "1600": ("count": 6, "marginTop": 88, "marginW": 66), "2048": ("count": 7, "marginTop": 88, "marginW": 66), "2560": ("count": 8, "marginTop": 88, "marginW": 88), "3440": ("count": 9, "marginTop": 88, "marginW": 88), "max": ("count": 10, "marginTop": 88, "marginW": 88));\n\n.face-cover {\n\tdisplay: flex;\n\tflex-direction: column;\n\tpadding: 10px;\n\tborder-radius: var(--border-radius-large);\n\n\t&__crop-container {\n\t\toverflow: hidden;\n\t\twidth: 128px;\n\t\theight: 128px;\n\t\tborder-radius: 128px;\n\t\tposition: relative;\n\t\tbackground: var(--color-background-darker);\n\t\t--photos-face-width: 128px;\n\n\t\t@media only screen and (max-width: 1020px) {\n\t\t\twidth: 95px;\n\t\t\theight: 95px;\n\t\t\t--photos-face-width: 95px;\n\t\t}\n\t}\n\n\t&:hover, &:focus {\n\t\tbackground: var(--color-background-hover);\n\t}\n\n\t&__details {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 128px;\n\t\tmargin-top: 4px;\n\t\ttext-align: center;\n\n\t\t@media only screen and (max-width: 1020px) {\n\t\t\twidth: 95px;\n\t\t}\n\n\t\t&__first-line {\n\t\t\tdisplay: flex;\n\t\t\theight: 2em;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t&__second-line {\n\t\t\tmargin-top: 6px;\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t&__name {\n\t\t\tflex-grow: 1;\n\t\t\tmargin: 0;\n\t\t}\n\t}\n}\n\n.face-cover--small {\n\t* {\n\t\tfont-size: 15px !important;\n\t}\n\t.face-cover__details {\n\t\twidth: 60px !important;\n\t}\n\t.face-cover__crop-container {\n\t\twidth: 60px !important;\n\t\theight: 60px !important;\n\t\t--photos-face-width: 60px !important;\n\t}\n}\n'],sourceRoot:""}]);const c=a},95807:(t,e,r)=>{r.d(e,{Z:()=>o});const n={name:"AccountBoxMultipleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const o=(0,r(51900).Z)(n,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon account-box-multiple-outline-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M4 6H2V20C2 21.11 2.9 22 4 22H18V20H4V6M18.5 14.25C18.5 12.75 15.5 12 14 12S9.5 12.75 9.5 14.25V15H18.5M14 10.25C15.24 10.25 16.25 9.24 16.25 8S15.24 5.75 14 5.75 11.75 6.76 11.75 8 12.76 10.25 14 10.25M20 2H8C6.9 2 6 2.9 6 4V16C6 17.11 6.9 18 8 18H20C21.11 18 22 17.11 22 16V4C22 2.89 21.1 2 20 2M20 16H8V4H20V16Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},17968:(t,e,r)=>{r.d(e,{Z:()=>L});var n=r(20629),o=r(79753),i=r(99751),a=r(46116);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),c=new j(o||[]);return n(a,"_invoke",{value:C(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var p={};function d(){}function v(){}function m(){}var y={};l(y,i,(function(){return this}));var g=Object.getPrototypeOf,A=g&&g(g(E([])));A&&A!==e&&r.call(A,i)&&(y=A);var b=m.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,i,a,s){var u=h(t[n],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==c(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function C(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=_(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function _(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),F(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;F(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function u(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)}))}}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e0&&(e(),r.disconnect())}))})),this.observer.observe(t)}}};var v=r(93379),m=r.n(v),y=r(7795),g=r.n(y),A=r(90569),b=r.n(A),w=r(3565),x=r.n(w),C=r(19216),_=r.n(C),O=r(44589),F=r.n(O),j=r(35033),E={};E.styleTagTransform=F(),E.setAttributes=x(),E.insert=b().bind(null,"head"),E.domAPI=g(),E.insertStyleElement=_();m()(j.Z,E);j.Z&&j.Z.locals&&j.Z.locals;const L=(0,r(51900).Z)(d,(function(){var t=this,e=t._self._c;return e("div",{class:["face-cover",t.small&&"face-cover--small"],on:{click:function(e){return t.$emit("click")}}},[e("div",{staticClass:"face-cover__crop-container"},[e("img",{ref:"image",staticClass:"face-cover__image",style:t.coverDimensions,attrs:{src:t.coverUrl}})]),t._v(" "),e("div",{staticClass:"face-cover__details"},[t.baseName.match(/^[0-9]+$/)?t._e():e("div",{staticClass:"face-cover__details__first-line"},[e("h2",{staticClass:"face-cover__details__name"},[t._v("\n\t\t\t\t"+t._s(t.baseName)+"\n\t\t\t")])]),t._v(" "),t.facesFiles[t.baseName]&&!t.small?e("div",{staticClass:"face-cover__details__second-line"},[t._v("\n\t\t\t"+t._s(t.n("photos","%n photos","%n photos",t.facesFiles[t.baseName].length))+"\n\t\t")]):t._e()])])}),[],!1,null,"53f3a852",null).exports}}]); //# sourceMappingURL=photos-node_modules_vue-material-design-icons_AccountBoxMultipleOutline_vue-src_components_FaceCover_vue.js.map?v=0d661f3d969665d43113