text: (window.webpackJsonp=window.webpackJsonp||[]).push([[89],{611:function(t,n,e){"use strict";e.d(n,"c",(function(){return J})),e.d(n,"a",(function(){return E})),e.d(n,"u",(function(){return U})),e.d(n,"p",(function(){return x})),e.d(n,"n",(function(){return P})),e.d(n,"f",(function(){return F})),e.d(n,"g",(function(){return W})),e.d(n,"r",(function(){return A})),e.d(n,"i",(function(){return G})),e.d(n,"j",(function(){return K})),e.d(n,"o",(function(){return Q})),e.d(n,"t",(function(){return X})),e.d(n,"d",(function(){return Z})),e.d(n,"e",(function(){return nt})),e.d(n,"b",(function(){return at})),e.d(n,"s",(function(){return ot})),e.d(n,"m",(function(){return lt})),e.d(n,"l",(function(){return st})),e.d(n,"k",(function(){return ft})),e.d(n,"q",(function(){return bt})),e.d(n,"h",(function(){return ht}));var r,o,l,c,m,d,f,I,h,$,y,D,O,j,v,S,C,T,w,_,R,N=e(222),M=e(4),k=(e(18),e(25),e(65),e(90));e(162);function J(t,n){return t.mutate({mutation:Object(k.a)(r||(r=Object(N.a)(["\n      mutation ($name: String!) {\n        createTeam(name: $name) {\n          name\n        }\n      }\n    "]))),variables:{name:n}})}function E(t,n,e,r){return t.mutate({mutation:Object(k.a)(o||(o=Object(N.a)(["\n      mutation addTeamMemberByEmail(\n        $userRole: TeamMemberRole!\n        $userEmail: String!\n        $teamID: String!\n      ) {\n        addTeamMemberByEmail(\n          userRole: $userRole\n          userEmail: $userEmail\n          teamID: $teamID\n        ) {\n          role\n        }\n      }\n    "]))),variables:{userRole:n,userEmail:e,teamID:r}})}function U(t,n,e,r){return t.mutate({mutation:Object(k.a)(l||(l=Object(N.a)(["\n      mutation updateTeamMemberRole(\n        $newRole: TeamMemberRole!\n        $userUid: String!\n        $teamID: String!\n      ) {\n        updateTeamMemberRole(\n          newRole: $newRole\n          userUid: $userUid\n          teamID: $teamID\n        ) {\n          role\n        }\n      }\n    "]))),variables:{newRole:e,userUid:n,teamID:r}})}function x(t,n,e){return t.mutate({mutation:Object(k.a)(c||(c=Object(N.a)(["\n      mutation renameTeam($newName: String!, $teamID: String!) {\n        renameTeam(newName: $newName, teamID: $teamID) {\n          id\n        }\n      }\n    "]))),variables:{newName:n,teamID:e}})}function P(t,n,e){return t.mutate({mutation:Object(k.a)(m||(m=Object(N.a)(["\n      mutation removeTeamMember($userUid: String!, $teamID: String!) {\n        removeTeamMember(userUid: $userUid, teamID: $teamID)\n      }\n    "]))),variables:{userUid:n,teamID:e}})}function F(t,n){return B.apply(this,arguments)}function B(){return(B=Object(M.a)((function*(t,n){for(var e;void 0===(e=yield t.mutate({mutation:Object(k.a)(f||(f=Object(N.a)(["\n        mutation ($teamID: String!) {\n          deleteTeam(teamID: $teamID)\n        }\n      "]))),variables:{teamID:n}})););return e}))).apply(this,arguments)}function W(t,n){t.mutate({mutation:Object(k.a)(d||(d=Object(N.a)(["\n      mutation ($teamID: String!) {\n        leaveTeam(teamID: $teamID)\n      }\n    "]))),variables:{teamID:n}})}function A(t,n){return z.apply(this,arguments)}function z(){return(z=Object(M.a)((function*(t,n){for(var e=[],cursor="";;){var r=yield t.query({query:Object(k.a)(I||(I=Object(N.a)(["\n        query rootCollectionsOfTeam($teamID: String!, $cursor: String!) {\n          rootCollectionsOfTeam(teamID: $teamID, cursor: $cursor) {\n            id\n            title\n          }\n        }\n      "]))),variables:{teamID:n,cursor:cursor},fetchPolicy:"no-cache"});if(0===r.data.rootCollectionsOfTeam.length)break;r.data.rootCollectionsOfTeam.forEach((t=>{e.push(t)})),cursor=e[e.length-1].id}return e}))).apply(this,arguments)}function G(t,n){return H.apply(this,arguments)}function H(){return(H=Object(M.a)((function*(t,n){var e=[];return(yield t.query({query:Object(k.a)(h||(h=Object(N.a)(["\n      query getCollectionChildren($collectionID: String!) {\n        collection(collectionID: $collectionID) {\n          children {\n            id\n            title\n          }\n        }\n      }\n    "]))),variables:{collectionID:n},fetchPolicy:"no-cache"})).data.collection.children.forEach((t=>{e.push(t)})),e}))).apply(this,arguments)}function K(t,n){return L.apply(this,arguments)}function L(){return(L=Object(M.a)((function*(t,n){for(var e=[],cursor="";;){var r=yield t.query({query:Object(k.a)($||($=Object(N.a)(["\n        query getCollectionRequests($collectionID: String!, $cursor: String) {\n          requestsInCollection(collectionID: $collectionID, cursor: $cursor) {\n            id\n            title\n            request\n          }\n        }\n      "]))),variables:{collectionID:n,cursor:cursor},fetchPolicy:"no-cache"});if(r.data.requestsInCollection.forEach((t=>{e.push(t)})),r.data.requestsInCollection.length<10)break;cursor=e[e.length-1].id}return e}))).apply(this,arguments)}function Q(t,n,e){return V.apply(this,arguments)}function V(){return(V=Object(M.a)((function*(t,title,n){for(var e;void 0===(e=yield t.mutate({mutation:Object(k.a)(y||(y=Object(N.a)(["\n        mutation ($newTitle: String!, $collectionID: String!) {\n          renameCollection(newTitle: $newTitle, collectionID: $collectionID) {\n            id\n          }\n        }\n      "]))),variables:{newTitle:title,collectionID:n}})););return e}))).apply(this,arguments)}function X(t,n,e,r){return Y.apply(this,arguments)}function Y(){return(Y=Object(M.a)((function*(t,n,e,r){for(var o;void 0===(o=yield t.mutate({mutation:Object(k.a)(D||(D=Object(N.a)(["\n        mutation ($data: UpdateTeamRequestInput!, $requestID: String!) {\n          updateRequest(data: $data, requestID: $requestID) {\n            id\n          }\n        }\n      "]))),variables:{data:{request:JSON.stringify(n),title:e},requestID:r}})););return o}))).apply(this,arguments)}function Z(t,n){return tt.apply(this,arguments)}function tt(){return(tt=Object(M.a)((function*(t,n){for(var e;void 0===(e=yield t.mutate({mutation:Object(k.a)(O||(O=Object(N.a)(["\n        mutation ($collectionID: String!) {\n          deleteCollection(collectionID: $collectionID)\n        }\n      "]))),variables:{collectionID:n}})););return e}))).apply(this,arguments)}function nt(t,n){return et.apply(this,arguments)}function et(){return(et=Object(M.a)((function*(t,n){for(var e;void 0===(e=yield t.mutate({mutation:Object(k.a)(j||(j=Object(N.a)(["\n        mutation ($requestID: String!) {\n          deleteRequest(requestID: $requestID)\n        }\n      "]))),variables:{requestID:n}})););return e}))).apply(this,arguments)}function at(t,n,e){return it.apply(this,arguments)}function it(){return(it=Object(M.a)((function*(t,title,n){for(var e;void 0===(e=yield t.mutate({mutation:Object(k.a)(v||(v=Object(N.a)(["\n        mutation ($title: String!, $teamID: String!) {\n          createRootCollection(title: $title, teamID: $teamID) {\n            id\n          }\n        }\n      "]))),variables:{title:title,teamID:n}})););return e}))).apply(this,arguments)}function ot(t,n,e,r,o){return ut.apply(this,arguments)}function ut(){return(ut=Object(M.a)((function*(t,n,title,e,r){yield t.mutate({mutation:Object(k.a)(S||(S=Object(N.a)(["\n      mutation ($data: CreateTeamRequestInput!, $collectionID: String!) {\n        createRequestInCollection(data: $data, collectionID: $collectionID) {\n          collection {\n            id\n            team {\n              id\n              name\n            }\n          }\n        }\n      }\n    "]))),variables:{collectionID:r,data:{teamID:e,title:title,request:n}}})}))).apply(this,arguments)}function lt(t,n,e,r){return ct.apply(this,arguments)}function ct(){return(ct=Object(M.a)((function*(t,n,title,e){yield t.mutate({mutation:Object(k.a)(C||(C=Object(N.a)(["\n      mutation updateRequest(\n        $data: UpdateTeamRequestInput!\n        $requestID: String!\n      ) {\n        updateRequest(data: $data, requestID: $requestID) {\n          id\n          title\n        }\n      }\n    "]))),variables:{requestID:e,data:{request:n,title:title}}})}))).apply(this,arguments)}function st(t,n,e){return mt.apply(this,arguments)}function mt(){return(mt=Object(M.a)((function*(t,n,e){return null!=(yield t.mutate({mutation:Object(k.a)(T||(T=Object(N.a)(["\n      mutation importFromMyCollections(\n        $fbCollectionPath: String!\n        $teamID: String!\n      ) {\n        importCollectionFromUserFirestore(\n          fbCollectionPath: $fbCollectionPath\n          teamID: $teamID\n        ) {\n          id\n          title\n        }\n      }\n    "]))),variables:{fbCollectionPath:n,teamID:e}})).data}))).apply(this,arguments)}function ft(t,n,e){return pt.apply(this,arguments)}function pt(){return(pt=Object(M.a)((function*(t,n,e){return null!=(yield t.mutate({mutation:Object(k.a)(w||(w=Object(N.a)(["\n      mutation importFromJSON($jsonString: String!, $teamID: String!) {\n        importCollectionsFromJSON(jsonString: $jsonString, teamID: $teamID)\n      }\n    "]))),variables:{jsonString:JSON.stringify(n),teamID:e}})).data}))).apply(this,arguments)}function bt(t,n,e){return It.apply(this,arguments)}function It(){return(It=Object(M.a)((function*(t,n,e){return null!=(yield t.mutate({mutation:Object(k.a)(_||(_=Object(N.a)(["\n      mutation replaceWithJSON($jsonString: String!, $teamID: String!) {\n        replaceCollectionsWithJSON(jsonString: $jsonString, teamID: $teamID)\n      }\n    "]))),variables:{jsonString:JSON.stringify(n),teamID:e}})).data}))).apply(this,arguments)}function ht(t,n){return $t.apply(this,arguments)}function $t(){return($t=Object(M.a)((function*(t,n){return(yield t.query({query:Object(k.a)(R||(R=Object(N.a)(["\n      query exportAsJSON($teamID: String!) {\n        exportCollectionsToJSON(teamID: $teamID)\n      }\n    "]))),variables:{teamID:n}})).data.exportCollectionsToJSON}))).apply(this,arguments)}},768:function(t,n,e){"use strict";e.r(n);e(74);var r=e(611),o={props:{show:Boolean},data:()=>({name:null}),methods:{addNewTeam(){var t=this.name;this.name="",null!=t&&t.replace(/\s/g,"").length<6?this.$toast.error(this.$t("string_length_insufficient"),{icon:"error"}):(r.c(this.$apollo,t).then((()=>{this.hideModal()})).catch((n=>{console.error(n),this.name=t})),this.hideModal())},hideModal(){this.name=null,this.$emit("hide-modal")}}},l=e(15),component=Object(l.a)(o,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return t.show?e("SmartModal",{on:{close:t.hideModal},scopedSlots:t._u([{key:"header",fn:function(){return[e("h3",{staticClass:"heading"},[t._v(t._s(t.$t("new_team")))]),t._v(" "),e("button",{staticClass:"icon button",on:{click:t.hideModal}},[e("i",{staticClass:"material-icons"},[t._v("close")])])]},proxy:!0},{key:"body",fn:function(){return[e("ul",[e("li",[e("label",[t._v(t._s(t.$t("label")))])])]),t._v(" "),e("ul",[e("li",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"name"}],staticClass:"input",attrs:{type:"text",placeholder:t.$t("my_new_team")},domProps:{value:t.name},on:{keyup:function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:t.addNewTeam.apply(null,arguments)},input:function(n){n.target.composing||(t.name=n.target.value)}}})])])]},proxy:!0},{key:"footer",fn:function(){return[e("span"),t._v(" "),e("span",[e("button",{staticClass:"icon button",on:{click:t.hideModal}},[t._v("\n        "+t._s(t.$t("cancel"))+"\n      ")]),t._v(" "),e("button",{staticClass:"icon button primary",on:{click:t.addNewTeam}},[t._v("\n        "+t._s(t.$t("save"))+"\n      ")])])]},proxy:!0}],null,!1,129184659)}):t._e()}),[],!1,null,null,null);n.default=component.exports;installComponents(component,{SmartModal:e(163).default})}}]);