diff --git a/dist/dist.js b/dist/dist.js index 7ceb9e54..a517259e 100644 --- a/dist/dist.js +++ b/dist/dist.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cdav",[],e):"object"==typeof exports?exports.cdav=e():t.cdav=e()}(self,(function(){return function(){var t={5071:function(t,e,r){"use strict";r.r(e),r.d(e,{debug:function(){return Pt},default:function(){return Fn},namespaces:function(){return n}});var n={};function o(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:function(){return new XMLHttpRequest};dt(this,t),this.baseUrl=e,this.parser=r,this.xhrProvider=n}var e,r,n,o,i,u,c,s,l,f,p,h,y,v,m;return e=t,(r=[{key:"get",value:function(){var t=yt(regeneratorRuntime.mark((function t(e){var r,n,o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},n=a.length>2&&void 0!==a[2]?a[2]:null,o=a.length>3&&void 0!==a[3]?a[3]:function(){return null},i=a.length>4&&void 0!==a[4]?a[4]:function(){return null},t.abrupt("return",this.request("GET",e,r,n,o,i));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"patch",value:(m=yt(regeneratorRuntime.mark((function t(e,r,n){var o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=a.length>3&&void 0!==a[3]?a[3]:function(){return null},i=a.length>4&&void 0!==a[4]?a[4]:function(){return null},t.abrupt("return",this.request("PATCH",e,r,n,o,i));case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return m.apply(this,arguments)})},{key:"post",value:(v=yt(regeneratorRuntime.mark((function t(e,r,n){var o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=a.length>3&&void 0!==a[3]?a[3]:function(){return null},i=a.length>4&&void 0!==a[4]?a[4]:function(){return null},t.abrupt("return",this.request("POST",e,r,n,o,i));case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return v.apply(this,arguments)})},{key:"put",value:(y=yt(regeneratorRuntime.mark((function t(e,r,n){var o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=a.length>3&&void 0!==a[3]?a[3]:function(){return null},i=a.length>4&&void 0!==a[4]?a[4]:function(){return null},t.abrupt("return",this.request("PUT",e,r,n,o,i));case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return y.apply(this,arguments)})},{key:"delete",value:(h=yt(regeneratorRuntime.mark((function t(e){var r,n,o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},n=a.length>2&&void 0!==a[2]?a[2]:null,o=a.length>3&&void 0!==a[3]?a[3]:function(){return null},i=a.length>4&&void 0!==a[4]?a[4]:function(){return null},t.abrupt("return",this.request("DELETE",e,r,n,o,i));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"copy",value:(p=yt(regeneratorRuntime.mark((function t(e,r){var n,o,i,a,u,c,s=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.length>2&&void 0!==s[2]?s[2]:0,o=s.length>3&&void 0!==s[3]&&s[3],i=s.length>4&&void 0!==s[4]?s[4]:{},a=s.length>5&&void 0!==s[5]?s[5]:null,u=s.length>6&&void 0!==s[6]?s[6]:function(){return null},c=s.length>7&&void 0!==s[7]?s[7]:function(){return null},i.Destination=r,i.Depth=n,i.Overwrite=o?"T":"F",t.abrupt("return",this.request("COPY",e,i,a,u,c));case 10:case"end":return t.stop()}}),t,this)}))),function(t,e){return p.apply(this,arguments)})},{key:"move",value:(f=yt(regeneratorRuntime.mark((function t(e,r){var n,o,i,a,u,c=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=c.length>2&&void 0!==c[2]&&c[2],o=c.length>3&&void 0!==c[3]?c[3]:{},i=c.length>4&&void 0!==c[4]?c[4]:null,a=c.length>5&&void 0!==c[5]?c[5]:function(){return null},u=c.length>6&&void 0!==c[6]?c[6]:function(){return null},o.Destination=r,o.Depth="Infinity",o.Overwrite=n?"T":"F",t.abrupt("return",this.request("MOVE",e,o,i,a,u));case 9:case"end":return t.stop()}}),t,this)}))),function(t,e){return f.apply(this,arguments)})},{key:"lock",value:(l=yt(regeneratorRuntime.mark((function t(e){var r,n,o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},n=a.length>2&&void 0!==a[2]?a[2]:null,o=a.length>3&&void 0!==a[3]?a[3]:function(){return null},i=a.length>4&&void 0!==a[4]?a[4]:function(){return null},t.abrupt("return",this.request("LOCK",e,r,n,o,i));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"unlock",value:(s=yt(regeneratorRuntime.mark((function t(e){var r,n,o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},n=a.length>2&&void 0!==a[2]?a[2]:null,o=a.length>3&&void 0!==a[3]?a[3]:function(){return null},i=a.length>4&&void 0!==a[4]?a[4]:function(){return null},t.abrupt("return",this.request("UNLOCK",e,r,n,o,i));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"propFind",value:(c=yt(regeneratorRuntime.mark((function t(e,r){var n,o,i,u,c,s,l,f,p,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=h.length>2&&void 0!==h[2]?h[2]:0,o=h.length>3&&void 0!==h[3]?h[3]:{},i=h.length>4&&void 0!==h[4]?h[4]:function(){return null},u=h.length>5&&void 0!==h[5]?h[5]:function(){return null},o.Depth=n,c=x([a,"propfind"],[a,"prop"]),s=lt(c,2),l=s[0],(f=s[1]).push.apply(f,st(r.map((function(t){return{name:t}})))),p=P(l),t.abrupt("return",this.request("PROPFIND",e,o,p,i,u));case 9:case"end":return t.stop()}}),t,this)}))),function(t,e){return c.apply(this,arguments)})},{key:"propPatch",value:(u=yt(regeneratorRuntime.mark((function t(e,r,n){var o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=a.length>3&&void 0!==a[3]?a[3]:function(){return null},i=a.length>4&&void 0!==a[4]?a[4]:function(){return null},t.abrupt("return",this.request("PROPPATCH",e,r,n,o,i));case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"mkCol",value:(i=yt(regeneratorRuntime.mark((function t(e,r,n){var o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=a.length>3&&void 0!==a[3]?a[3]:function(){return null},i=a.length>4&&void 0!==a[4]?a[4]:function(){return null},t.abrupt("return",this.request("MKCOL",e,r,n,o,i));case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return i.apply(this,arguments)})},{key:"report",value:(o=yt(regeneratorRuntime.mark((function t(e,r,n){var o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=a.length>3&&void 0!==a[3]?a[3]:function(){return null},i=a.length>4&&void 0!==a[4]?a[4]:function(){return null},t.abrupt("return",this.request("REPORT",e,r,n,o,i));case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return o.apply(this,arguments)})},{key:"request",value:(n=yt(regeneratorRuntime.mark((function t(e,r,n,o){var i,a,u,c,s,l=this,f=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(s in i=f.length>4&&void 0!==f[4]?f[4]:function(){return null},a=f.length>5&&void 0!==f[5]?f[5]:function(){return null},u=this.xhrProvider(),c=Object.assign({},{Depth:"0","Content-Type":"application/xml; charset=utf-8"},n),u.open(e,this.absoluteUrl(r),!0),c)u.setRequestHeader(s,c[s]);return i(u),null==o?u.send():u.send(o),t.abrupt("return",new Promise((function(t,r){u.onreadystatechange=function(){if(4===u.readyState){a(u);var n=u.response;if(!gt(u.status))return u.status>=400&&u.status<500?void r(new ct({body:n,status:u.status,xhr:u})):u.status>=500&&u.status<600?void r(new rt({body:n,status:u.status,xhr:u})):void r(new K({body:n,status:u.status,xhr:u}));207===u.status&&(n=l._parseMultiStatusResponse(n),0===parseInt(c.Depth,10)&&"PROPFIND"===e&&(n=n[Object.keys(n)[0]])),t({body:n,status:u.status,xhr:u})}},u.onerror=function(){return r(new X({body:null,status:-1,xhr:u}))},u.onabort=function(){return r(new N({body:null,status:-1,xhr:u}))}})));case 9:case"end":return t.stop()}}),t,this)}))),function(t,e,r,o){return n.apply(this,arguments)})},{key:"filename",value:function(t){var e=this.pathname(t);"/"===e.substr(-1)&&(e=e.substr(0,e.length-1));var r=e.lastIndexOf("/");return e.substr(r)}},{key:"pathname",value:function(t){return new URL(t,this.baseUrl).pathname}},{key:"absoluteUrl",value:function(t){return new URL(t,this.baseUrl).href}},{key:"_parseMultiStatusResponse",value:function(t){for(var e,r={},n=(new DOMParser).parseFromString(t,"application/xml"),o=n.evaluate("/d:multistatus/d:response",n,d,XPathResult.ANY_TYPE,null);null!==(e=o.iterateNext());){for(var i=n.evaluate("string(d:href)",e,d,XPathResult.ANY_TYPE,null).stringValue,a={},u=n.evaluate("d:propstat",e,d,XPathResult.ANY_TYPE,null),c=void 0;null!==(c=u.iterateNext());)if(gt((f=n.evaluate("string(d:status)",c,d,XPathResult.ANY_TYPE,null).stringValue,parseInt(f.split(" ")[1],10))))for(var s=n.evaluate("d:prop/*",c,d,XPathResult.ANY_TYPE,null),l=void 0;null!==(l=s.iterateNext());)this.parser.canParse("{".concat(l.namespaceURI,"}").concat(l.localName))&&(a["{".concat(l.namespaceURI,"}").concat(l.localName)]=this.parser.parse(n,l,d));r[i]=a}var f;return r}}])&&vt(e.prototype,r),t}();function gt(t){return t>=200&&t<300}function bt(t,e){return""!==(t=t||"")&&(t+="-"),""!==(e=e||"")&&(e="."+e),t+"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16).toUpperCase()}))+e}function wt(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:null;this._eventListeners[t]=this._eventListeners[t]||[],this._eventListeners[t].push({listener:e,options:r})}},{key:"removeEventListener",value:function(t,e){if(this._eventListeners[t]){var r=this._eventListeners[t].findIndex((function(t){return t.listener===e}));-1!==r&&this._eventListeners[t].splice(r,1)}}},{key:"dispatchEvent",value:function(t,e){var r=this;if(this._eventListeners[t]){var n=[],o=[];this._eventListeners[t].forEach((function(t){var e=t.listener,r=t.options;r&&r.once?o.push(e):n.push(e)})),o.forEach((function(n){r.removeEventListener(t,n),n(e)})),n.forEach((function(t){t(e)}))}}}])&&wt(e.prototype,r),t}();function Pt(t){return function(){if(Pt.enabled){for(var e,r=arguments.length,n=new Array(r),o=0;ot.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]&&arguments[4];return kt(this,h),o=p.call(this),Object.assign(Ct(o),{_parent:t,_request:e,_url:r,_props:n,_isPartial:i,_isDirty:!1}),o._exposeProperty("etag",a,"getetag",!0),o._exposeProperty("contenttype",a,"getcontenttype"),Object.defineProperty(Ct(o),"url",{get:function(){return o._url}}),o}return e=h,n=[{key:"getPropFindList",value:function(){return[[a,"getcontenttype"],[a,"getetag"],[a,"resourcetype"]]}}],(r=[{key:"fetchCompleteData",value:(s=jt(regeneratorRuntime.mark((function t(){var e,r=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.length>0&&void 0!==r[0]&&r[0]||this.isPartial()){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this._request.propFind(this._url,this.constructor.getPropFindList(),0);case 5:e=t.sent,this._props=e.body,this._isDirty=!1,this._isPartial=!1;case 9:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"copy",value:(c=jt(regeneratorRuntime.mark((function t(e){var r,n,o,i=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i.length>1&&void 0!==i[1]&&i[1],Dt("copying ".concat(this.url," from ").concat(this._parent.url," to ").concat(e.url)),this._parent!==e){t.next=4;break}throw new Error("Copying an object to the collection it's already part of is not supported");case 4:if(this._parent.isSameCollectionTypeAs(e)){t.next=6;break}throw new Error("Copying an object to a collection of a different type is not supported");case 6:if(e.isWriteable()){t.next=8;break}throw new Error("Can not copy object into read-only destination collection");case 8:return n=this.url.split("/").splice(-1,1)[0],o=e.url+n,t.next=12,this._request.copy(this.url,o,0,r);case 12:return t.abrupt("return",e.find(n));case 13:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"move",value:(u=jt(regeneratorRuntime.mark((function t(e){var r,n,o,i=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i.length>1&&void 0!==i[1]&&i[1],Dt("moving ".concat(this.url," from ").concat(this._parent.url," to ").concat(e.url)),this._parent!==e){t.next=4;break}throw new Error("Moving an object to the collection it's already part of is not supported");case 4:if(this._parent.isSameCollectionTypeAs(e)){t.next=6;break}throw new Error("Moving an object to a collection of a different type is not supported");case 6:if(e.isWriteable()){t.next=8;break}throw new Error("Can not move object into read-only destination collection");case 8:return n=this.url.split("/").splice(-1,1)[0],o=e.url+n,t.next=12,this._request.move(this.url,o,r);case 12:this._parent=e,this._url=o;case 14:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"update",value:(i=jt(regeneratorRuntime.mark((function t(){var e,r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isPartial()&&this.isDirty()&&this.data){t.next=2;break}return t.abrupt("return");case 2:return e={},this.etag&&(e["If-Match"]=this.etag),t.abrupt("return",this._request.put(this.url,e,this.data).then((function(t){r._isDirty=!1,r._props["{DAV:}getetag"]=t.xhr.getResponseHeader("etag")})).catch((function(t){throw r._isDirty=!0,t instanceof ct&&412===t.status&&(r._isPartial=!0),t})));case 5:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"delete",value:(o=jt(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._request.delete(this.url));case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"isPartial",value:function(){return this._isPartial}},{key:"isDirty",value:function(){return this._isDirty}},{key:"_exposeProperty",value:function(t,e,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];o?Object.defineProperty(this,t,{get:function(){return n._props["{".concat(e,"}").concat(r)]},set:function(t){n._isDirty=!0,n._props["{".concat(e,"}").concat(r)]=t}}):Object.defineProperty(this,t,{get:function(){return n._props["{".concat(e,"}").concat(r)]}})}}])&&At(e.prototype,r),n&&At(e,n),h}(xt);function Ft(t){return(Ft="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})(t)}function Ut(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}(t,e)||Yt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function qt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Nt(i,n,o,a,u,"next",t)}function u(t){Nt(i,n,o,a,u,"throw",t)}a(void 0)}))}}function Mt(t){return function(t){if(Array.isArray(t))return Vt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Yt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yt(t,e){if(t){if("string"==typeof t)return Vt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vt(t,e):void 0}}function Vt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==l[1]?l[1]:null,zt("creating a collection"),r||(r=[{name:[a,"resourcetype"],children:[{name:[a,"collection"]}]}]),n=x([a,"mkcol"],[a,"set"],[a,"prop"]),o=Ut(n,2),i=o[0],(u=o[1]).push.apply(u,Mt(r)),c=this._getAvailableNameFromToken(e),s=P(i),t.next=9,this._request.mkCol(this.url+c,{},s);case 9:return t.abrupt("return",this.find(c+"/"));case 10:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"createObject",value:(c=qt(regeneratorRuntime.mark((function t(e,r,n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return zt("creating an object"),t.next=3,this._request.put(this.url+e,r,n);case 3:return t.abrupt("return",this.find(e));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"update",value:(u=qt(regeneratorRuntime.mark((function t(){var e,r,n,o,i,u,c,s=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==this._updatedProperties.length){t.next=2;break}return t.abrupt("return");case 2:return e={},this._updatedProperties.forEach((function(t){e[t]=s._props[t]})),r=this._propSetFactory.reduce((function(t,r){return[].concat(Mt(t),Mt(r(e)))}),[]),n=x([a,"propertyupdate"],[a,"set"],[a,"prop"]),o=Ut(n,2),i=o[0],(u=o[1]).push.apply(u,Mt(r)),c=P(i),t.next=10,this._request.propPatch(this._url,{},c);case 10:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"delete",value:(i=qt(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._request.delete(this._url);case 2:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"isReadable",value:function(){return this.currentUserPrivilegeSet.includes("{DAV:}read")}},{key:"isWriteable",value:function(){return this.currentUserPrivilegeSet.includes("{DAV:}write")}},{key:"isSameCollectionTypeAs",value:function(t){var e=this.resourcetype,r=t.resourcetype,n=e.find((function(t){return-1===r.indexOf(t)})),o=r.find((function(t){return-1===e.indexOf(t)}));return void 0===n&&void 0===o}},{key:"_registerCollectionFactory",value:function(t,e){var r;this._collectionFactoryMapper[t]=e,"function"==typeof e.getPropFindList&&(r=this._propFindList).push.apply(r,Mt(e.getPropFindList()))}},{key:"_registerObjectFactory",value:function(t,e){var r;this._objectFactoryMapper[t]=e,"function"==typeof e.getPropFindList&&(r=this._propFindList).push.apply(r,Mt(e.getPropFindList()))}},{key:"_registerPropSetFactory",value:function(t){this._propSetFactory.push(t)}},{key:"_exposeProperty",value:function(t,e,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];o?Object.defineProperty(this,t,{get:function(){return n._props["{".concat(e,"}").concat(r)]},set:function(t){n._props["{".concat(e,"}").concat(r)]=t,-1===n._updatedProperties.indexOf("{".concat(e,"}").concat(r))&&n._updatedProperties.push("{".concat(e,"}").concat(r))}}):Object.defineProperty(this,t,{get:function(){return n._props["{".concat(e,"}").concat(r)]}})}},{key:"_getAvailableNameFromToken",value:function(t){var e=this;return function(t,e){var r=(t=t||"").toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"");if(""===r&&(r="-"),e(r))return r;if(-1===r.indexOf("-")&&e(r+="-1"))return r;do{var n=r.lastIndexOf("-"),o=r.substr(0,n),i=r.substr(n+1);i.match(/^\d+$/)?(i=parseInt(i),r=o+"-"+ ++i):r+="-1"}while(!1===e(r));return r}(t,(function(t){return-1===e._childrenNames.indexOf(e._url+t)&&-1===e._childrenNames.indexOf(e._url+t+"/")}))}},{key:"_updatePropsFromServer",value:(o=qt(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._request.propFind(this.url,this.constructor.getPropFindList());case 2:e=t.sent,this._props=e.body;case 4:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_handleMultiStatusResponse",value:function(t){var e,r=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=[],i=[];return Object.entries(t.body).forEach((function(t){var e=Ut(t,2),u=e[0],c=e[1];if(u!==r._url&&u+"/"!==r.url){o.push(u);var s=r._request.pathname(u);if(0===c["{DAV:}resourcetype"].length){zt("".concat(u," was identified as a file"));var l=c["{DAV:}getcontenttype"].split(";")[0];if(!r._objectFactoryMapper[l])return zt("No constructor for content-type ".concat(l," (").concat(u,") registered, treating as generic object")),void i.push(new It(r,r._request,s,c));i.push(new r._objectFactoryMapper[l](r,r._request,s,c,n))}else{zt("".concat(u," was identified as a collection"));var f=c["{DAV:}resourcetype"].find((function(t){return t!=="{".concat(a,"}collection")}));if(!f)return zt("Collection-type of ".concat(u," was not specified, treating as generic collection")),void i.push(new v(r,r._request,s,c));if(!r._collectionFactoryMapper[f])return zt("No constructor for collection-type ".concat(f," (").concat(u,") registered, treating as generic collection")),void i.push(new v(r,r._request,s,c));i.push(new r._collectionFactoryMapper[f](r,r._request,s,c))}}})),(e=this._childrenNames).push.apply(e,o),i}}])&&Bt(e.prototype,r),n&&Bt(e,n),v}(xt);function Kt(t){return(Kt="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})(t)}function Qt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Jt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==p[1]&&p[1],n=p.length>2&&void 0!==p[2]?p[2]:"",xe("Sharing ".concat(this.url," with ").concat(e)),o=x([s,"share"],[s,"set"]),i=le(o,2),u=i[0],(c=i[1]).push({name:[a,"href"],value:e}),r&&c.push({name:[s,"read-write"]}),""!==n&&c.push({name:[s,"summary"],value:n}),l=P(u),t.abrupt("return",this._request.post(this._url,{"Content-Type":"application/xml; charset=utf-8"},l).then((function(){var t=f.shares.findIndex((function(t){return t.href===e}));-1===t?f.shares.push({href:e,access:[r?"{http://owncloud.org/ns}read-write":"{http://owncloud.org/ns}read"],"common-name":null,"invite-accepted":!0}):f.shares[t].access=[r?"{http://owncloud.org/ns}read-write":"{http://owncloud.org/ns}read"]})));case 9:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"unshare",value:(o=he(regeneratorRuntime.mark((function t(e){var r,n,o,i,u=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return xe("Unsharing ".concat(this.url," with ").concat(e)),r=x([s,"share"],[s,"remove"]),n=le(r,2),o=n[0],n[1].push({name:[a,"href"],value:e}),i=P(o),t.abrupt("return",this._request.post(this._url,{"Content-Type":"application/xml; charset=utf-8"},i).then((function(){var t=u.shares.findIndex((function(t){return t.href===e}));-1!==t&&u.shares.splice(t,1)})));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"isShareable",value:function(){return!!Array.isArray(this.allowedSharingModes)&&this.allowedSharingModes.includes("{".concat(p,"}can-be-shared"))}},{key:"isPublishable",value:function(){return!!Array.isArray(this.allowedSharingModes)&&this.allowedSharingModes.includes("{".concat(p,"}can-be-published"))}}])&&de(e.prototype,r),n&&de(e,n),f}(t)}function _e(t){return(_e="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})(t)}function Se(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Oe(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==p[1]?p[1]:null,n=p.length>2&&void 0!==p[2]?p[2]:null,He("sending an calendar-query request"),o=x([u,"calendar-query"]),i=Ie(o,1),c=i[0],r?c.children.push({name:[a,"prop"],children:r}):c.children.push({name:[a,"prop"],children:this._propFindList.map((function(t){return{name:t}}))}),e&&c.children.push({name:[u,"filter"],children:e}),n&&c.children.push({name:[u,"timezone"],value:n}),s={Depth:"1"},l=P(c),t.next=11,this._request.report(this.url,s,l);case 11:return f=t.sent,t.abrupt("return",Xe($e(w.prototype),"_handleMultiStatusResponse",this).call(this,f,w._isRetrievalPartial(r)));case 13:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"calendarMultiget",value:(i=Ne(regeneratorRuntime.mark((function t(){var e,r,n,o,i,c,s,l,f=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=f.length>0&&void 0!==f[0]?f[0]:[],r=f.length>1?f[1]:void 0,He("sending an calendar-multiget request"),0!==e.length){t.next=5;break}return t.abrupt("return",[]);case 5:return n=x([u,"calendar-multiget"]),o=Ie(n,1),i=o[0],r?i.children.push({name:[a,"prop"],children:r}):i.children.push({name:[a,"prop"],children:this._propFindList.map((function(t){return{name:t}}))}),e.forEach((function(t){i.children.push({name:[a,"href"],value:t})})),c={Depth:"1"},s=P(i),t.next=12,this._request.report(this.url,c,s);case 12:return l=t.sent,t.abrupt("return",Xe($e(w.prototype),"_handleMultiStatusResponse",this).call(this,l,w._isRetrievalPartial(r)));case 14:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"freeBusyQuery",value:(o=Ne(regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(t,e){return o.apply(this,arguments)})}])&&Me(e.prototype,r),n&&Me(e,n),w}(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ne(t,e)}(s,t);var e,r,n,o,i,a,u,c=(a=s,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ue(a);if(u){var r=ue(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return oe(this,t)});function s(){var t,e;ee(this,s);for(var r=arguments.length,n=new Array(r),o=0;ot.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==p[2]?p[2]:null,o=p.length>3&&void 0!==p[3]?p[3]:null,i=p.length>4&&void 0!==p[4]?p[4]:null,Lr("creating a calendar collection"),c=[{name:[a,"resourcetype"],children:[{name:[a,"collection"]},{name:[u,"calendar"]}]},{name:[a,"displayname"],value:e},{name:[f,"calendar-color"],value:r},{name:[s,"calendar-enabled"],value:"1"}],i&&c.push({name:[u,"calendar-timezone"],value:i}),n&&c.push({name:[u,"supported-calendar-component-set"],children:n.map((function(t){return{name:[u,"comp"],attributes:[["name",t]]}}))}),o&&c.push({name:[f,"calendar-order"],value:o}),l=Tr(Cr(_.prototype),"_getAvailableNameFromToken",this).call(this,e),t.abrupt("return",Tr(Cr(_.prototype),"createCollection",this).call(this,l,c));case 10:case"end":return t.stop()}}),t,this)}))),function(t,e){return c.apply(this,arguments)})},{key:"createSubscribedCollection",value:(i=Or(regeneratorRuntime.mark((function t(e,r,n){var o,i,u,c=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=c.length>3&&void 0!==c[3]?c[3]:null,Lr("creating a subscribed collection"),i=[{name:[a,"resourcetype"],children:[{name:[a,"collection"]},{name:[p,"subscribed"]}]},{name:[a,"displayname"],value:e},{name:[f,"calendar-color"],value:r},{name:[s,"calendar-enabled"],value:"1"},{name:[p,"source"],children:[{name:[a,"href"],value:n}]}],o&&i.push({name:[f,"calendar-order"],value:o}),u=Tr(Cr(_.prototype),"_getAvailableNameFromToken",this).call(this,e),t.abrupt("return",Tr(Cr(_.prototype),"createCollection",this).call(this,u,i));case 6:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return i.apply(this,arguments)})},{key:"search",value:(o=Or(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"enableBirthdayCalendar",value:(n=Or(regeneratorRuntime.mark((function t(){var e,r,n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=x([l,"enable-birthday-calendar"]),a=1,r=function(t){if(Array.isArray(t))return t}(i=e)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}(i,a)||function(t,e){if(t){if("string"==typeof t)return _r(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_r(t,e):void 0}}(i,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=r[0],o=P(n),t.next=4,this._request.post(this.url,{},o);case 4:case"end":return t.stop()}var i,a}),t,this)}))),function(){return n.apply(this,arguments)})}])&&jr(e.prototype,r),_}(Wt);function Ir(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==h[1]?h[1]:null,n=h.length>2&&void 0!==h[2]?h[2]:null,o=h.length>3&&void 0!==h[3]?h[3]:"anyof",on("sending an addressbook-query request"),i=x([c,"addressbook-query"]),u=Gr(i,1),s=u[0],r?s.children.push({name:[a,"prop"],children:r}):s.children.push({name:[a,"prop"],children:this._propFindList.map((function(t){return{name:t}}))}),e&&s.children.push({name:[c,"filter"],attributes:[["test",o]],children:e}),n&&s.children.push({name:[c,"limit"],children:[{name:[c,"nresults"],value:n}]}),l={Depth:"1"},f=P(s),t.next=12,this._request.report(this.url,l,f);case 12:return p=t.sent,t.abrupt("return",rn(nn(m.prototype),"_handleMultiStatusResponse",this).call(this,p,m._isRetrievalPartial(r)));case 14:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"addressbookMultiget",value:(i=Kr(regeneratorRuntime.mark((function t(){var e,r,n,o,i,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=a.length>0&&void 0!==a[0]?a[0]:[],r=a.length>1?a[1]:void 0,on("sending an addressbook-multiget request"),0!==e.length){t.next=5;break}return t.abrupt("return",[]);case 5:return n={Depth:"1"},o=this._buildMultiGetBody(e,r),t.next=9,this._request.report(this.url,n,o);case 9:return i=t.sent,t.abrupt("return",rn(nn(m.prototype),"_handleMultiStatusResponse",this).call(this,i,m._isRetrievalPartial(r)));case 11:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"addressbookMultigetExport",value:(o=Kr(regeneratorRuntime.mark((function t(){var e,r,n,o,i=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=i.length>0&&void 0!==i[0]?i[0]:[],r=i.length>1?i[1]:void 0,on("sending an addressbook-multiget request and request download"),0!==e.length){t.next=5;break}return t.abrupt("return","");case 5:return n={Depth:"1"},o=this._buildMultiGetBody(e,r),t.abrupt("return",this._request.report(this.url+"?export",n,o));case 8:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_buildMultiGetBody",value:function(t,e){var r=Gr(x([c,"addressbook-multiget"]),1)[0];return e?r.children.push({name:[a,"prop"],children:e}):r.children.push({name:[a,"prop"],children:this._propFindList.map((function(t){return{name:t}}))}),t.forEach((function(t){r.children.push({name:[a,"href"],value:t})})),P(r)}}])&&Jr(e.prototype,r),n&&Jr(e,n),m}(Pe(Wt));function un(t){return(un="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})(t)}function cn(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function sn(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){cn(i,n,o,a,u,"next",t)}function u(t){cn(i,n,o,a,u,"throw",t)}a(void 0)}))}}function ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fn(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=[[a,"displayname"],[u,"calendar-user-type"],[u,"calendar-user-address-set"],[a,"principal-URL"],[a,"alternate-URI-set"],[h,"email-address"]];return t.enableCalDAV&&e.push([u,"calendar-home-set"],[u,"schedule-inbox-URL"],[u,"schedule-outbox-URL"],[l,"resource-type"],[l,"resource-vehicle-type"],[l,"resource-vehicle-make"],[l,"resource-vehicle-model"],[l,"resource-vehicle-is-electric"],[l,"resource-vehicle-range"],[l,"resource-vehicle-seating-capacity"],[l,"resource-contact-person"],[l,"resource-contact-person-vcard"],[l,"room-type"],[l,"room-seating-capacity"],[l,"room-building-address"],[l,"room-building-story"],[l,"room-building-room-number"],[l,"room-features"]),t.enableCardDAV&&e.push([c,"addressbook-home-set"]),e}}],null&&xn(e.prototype,null),r&&xn(e,r),s}(It);function kn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}(t,e)||An(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function An(t,e){if(t){if("string"==typeof t)return En(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?En(t,e):void 0}}function En(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:null;Ln(this,t),this.rootUrl=null,"/"!==e.rootUrl.substr(-1)&&(e.rootUrl+="/"),Object.assign(this,e),this.advertisedFeatures=[],this.currentUserPrincipal=null,this.principalCollections=[],this.calendarHomes=[],this.publicCalendarHome=null,this.addressBookHomes=[],this.parser=new i,this._isConnected=!1,this._request=new mt(this.rootUrl,this.parser,r)}var e,r,n,o,s,f,p,y,d,v,m,g;return e=t,(r=[{key:"connect",value:(g=Cn(regeneratorRuntime.mark((function t(){var e,r,n,o,i=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=i.length>0&&void 0!==i[0]?i[0]:{enableCalDAV:!1,enableCardDAV:!1},!this._isConnected){t.next=3;break}return t.abrupt("return",this);case 3:if(this.rootUrl){t.next=5;break}throw new Error("No rootUrl configured");case 5:return t.next=7,this._discoverPrincipalUri();case 7:return r=t.sent,In("PrincipalURL: ".concat(r)),n=jn.getPropFindList(e),(e.enableCalDAV||e.enableCardDAV)&&n.push([a,"principal-collection-set"],[a,"supported-report-set"]),t.next=13,this._request.propFind(r,n);case 13:return o=t.sent,this.currentUserPrincipal=new jn(null,this._request,r,o.body),this._extractAdvertisedDavFeatures(o.xhr),this._extractAddressBookHomes(o.body),this._extractCalendarHomes(o.body),this._extractPrincipalCollectionSets(o.body),this._createPublicCalendarHome(),this._isConnected=!0,t.abrupt("return",this);case 22:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"principalPropertySearchByDisplayname",value:(m=Cn(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.principalPropertySearch([{name:[a,"displayname"]}],e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"principalPropertySearchByDisplaynameOrEmail",value:(v=Cn(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.principalPropertySearch([{name:[a,"displayname"]},{name:[h,"email-address"]}],e,"anyof"));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"principalPropertySearchByAddress",value:(d=Cn(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.principalPropertySearch([{name:[l,"room-building-address"]}],e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"principalPropertySearchByAddressAndStory",value:(y=Cn(regeneratorRuntime.mark((function t(e,r){var n,o,i,u,c=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=x([a,"principal-property-search"]),o=kn(n,1),(i=o[0]).children.push({name:[a,"property-search"],children:[{name:[a,"prop"],children:[{name:[l,"room-building-address"]}]},{name:[a,"match"],value:e}]}),i.children.push({name:[a,"property-search"],children:[{name:[a,"prop"],children:[{name:[l,"room-building-story"]}]},{name:[a,"match"],value:r}]}),i.children.push({name:[a,"prop"],children:jn.getPropFindList().map((function(t){return{name:t}}))}),i.children.push({name:[a,"apply-to-principal-collection-set"]}),u=P(i),t.abrupt("return",this._request.report(this.rootUrl,{Depth:0},u).then((function(t){var e=[];return Object.entries(t.body).forEach((function(t){var r=kn(t,2),n=r[0],o=r[1],i=c._request.pathname(n);e.push(new jn(null,c._request,i,o))})),e})));case 7:case"end":return t.stop()}}),t,this)}))),function(t,e){return y.apply(this,arguments)})},{key:"principalPropertySearch",value:(p=Cn(regeneratorRuntime.mark((function t(e,r,n){var o,i,u,c,s,l=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=x([a,"principal-property-search"],[a,"property-search"]),i=kn(o,2),u=i[0],c=i[1],n&&(u.attributes=[["test",n]]),c.push({name:[a,"prop"],children:e},{name:[a,"match"],value:r}),u.children.push({name:[a,"prop"],children:jn.getPropFindList().map((function(t){return{name:t}}))}),u.children.push({name:[a,"apply-to-principal-collection-set"]}),s=P(u),t.abrupt("return",this._request.report(this.rootUrl,{Depth:0},s).then((function(t){var e=[];return Object.entries(t.body).forEach((function(t){var r=kn(t,2),n=r[0],o=r[1],i=l._request.pathname(n);e.push(new jn(null,l._request,i,o))})),e})));case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return p.apply(this,arguments)})},{key:"findPrincipal",value:(f=Cn(regeneratorRuntime.mark((function t(e){var r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._request.propFind(e,jn.getPropFindList()).then((function(t){var n=t.body;return new jn(null,r._request,e,n)})).catch((function(t){console.debug(t)})));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"_discoverPrincipalUri",value:(s=Cn(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._request.propFind(this.rootUrl,[[a,"current-user-principal"]],0);case 2:if((e=t.sent).body["{DAV:}current-user-principal"]){t.next=5;break}throw new Error("Error retrieving current user principal");case 5:if("unauthenticated"!==e.body["{DAV:}current-user-principal"].type){t.next=7;break}throw new Error("Current user is not authenticated");case 7:return t.abrupt("return",this._request.pathname(e.body["{DAV:}current-user-principal"].href));case 8:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"_extractCalendarHomes",value:(o=Cn(regeneratorRuntime.mark((function t(e){var r,n=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e["{".concat(u,"}calendar-home-set")]){t.next=3;break}return t.abrupt("return");case 3:this.calendarHomes=r.map((function(t){var r=n._request.pathname(t);return new Dr(n,n._request,r,e)}));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"_extractAddressBookHomes",value:(n=Cn(regeneratorRuntime.mark((function t(e){var r,n=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e["{".concat(c,"}addressbook-home-set")]){t.next=3;break}return t.abrupt("return");case 3:this.addressBookHomes=r.map((function(t){var r=n._request.pathname(t);return new gn(n,n._request,r,e)}));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"_extractPrincipalCollectionSets",value:function(t){var e=this,r=t["{".concat(a,"}principal-collection-set")];this.principalCollections=r.map((function(t){return e._request.pathname(t)}))}},{key:"_extractAdvertisedDavFeatures",value:function(t){var e,r,n=t.getResponseHeader("DAV");(e=this.advertisedFeatures).push.apply(e,function(t){if(Array.isArray(t))return En(t)}(r=n.split(",").map((function(t){return t.trim()})))||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(r)||An(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}},{key:"_createPublicCalendarHome",value:function(){var t=this._request.pathname(this.rootUrl)+"public-calendars/";this.publicCalendarHome=new Dr(this,this._request,t,{})}}])&&Dn(e.prototype,r),t}()},3099:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},6077:function(t,e,r){var n=r(111);t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},1223:function(t,e,r){var n=r(5112),o=r(30),i=r(3070),a=n("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},1530:function(t,e,r){"use strict";var n=r(8710).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},5787:function(t){t.exports=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}},9670:function(t,e,r){var n=r(111);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},8533:function(t,e,r){"use strict";var n=r(2092).forEach,o=r(9341),i=r(9207),a=o("forEach"),u=i("forEach");t.exports=a&&u?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},8457:function(t,e,r){"use strict";var n=r(9974),o=r(7908),i=r(3411),a=r(7659),u=r(7466),c=r(6135),s=r(1246);t.exports=function(t){var e,r,l,f,p,h,y=o(t),d="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,g=void 0!==m,b=s(y),w=0;if(g&&(m=n(m,v>2?arguments[2]:void 0,2)),null==b||d==Array&&a(b))for(r=new d(e=u(y.length));e>w;w++)h=g?m(y[w],w):y[w],c(r,w,h);else for(p=(f=b.call(y)).next,r=new d;!(l=p.call(f)).done;w++)h=g?i(f,m,[l.value,w],!0):l.value,c(r,w,h);return r.length=w,r}},1318:function(t,e,r){var n=r(5656),o=r(7466),i=r(1400),a=function(t){return function(e,r,a){var u,c=n(e),s=o(c.length),l=i(a,s);if(t&&r!=r){for(;s>l;)if((u=c[l++])!=u)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:function(t,e,r){var n=r(9974),o=r(8361),i=r(7908),a=r(7466),u=r(5417),c=[].push,s=function(t){var e=1==t,r=2==t,s=3==t,l=4==t,f=6==t,p=7==t,h=5==t||f;return function(y,d,v,m){for(var g,b,w=i(y),x=o(w),P=n(d,v,3),_=a(x.length),S=0,O=m||u,R=e?O(y,_):r||p?O(y,0):void 0;_>S;S++)if((h||S in x)&&(b=P(g=x[S],S,w),t))if(e)R[S]=b;else if(b)switch(t){case 3:return!0;case 5:return g;case 6:return S;case 2:c.call(R,g)}else switch(t){case 4:return!1;case 7:c.call(R,g)}return f?-1:s||l?l:R}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterOut:s(7)}},6583:function(t,e,r){"use strict";var n=r(5656),o=r(9958),i=r(7466),a=r(9341),u=r(9207),c=Math.min,s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0,f=a("lastIndexOf"),p=u("indexOf",{ACCESSORS:!0,1:0}),h=l||!f||!p;t.exports=h?function(t){if(l)return s.apply(this,arguments)||0;var e=n(this),r=i(e.length),a=r-1;for(arguments.length>1&&(a=c(a,o(arguments[1]))),a<0&&(a=r+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:s},1194:function(t,e,r){var n=r(7293),o=r(5112),i=r(7392),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},9341:function(t,e,r){"use strict";var n=r(7293);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},9207:function(t,e,r){var n=r(9781),o=r(7293),i=r(6656),a=Object.defineProperty,u={},c=function(t){throw t};t.exports=function(t,e){if(i(u,t))return u[t];e||(e={});var r=[][t],s=!!i(e,"ACCESSORS")&&e.ACCESSORS,l=i(e,0)?e[0]:c,f=i(e,1)?e[1]:void 0;return u[t]=!!r&&!o((function(){if(s&&!n)return!0;var t={length:-1};s?a(t,1,{enumerable:!0,get:c}):t[1]=1,r.call(t,l,f)}))}},3671:function(t,e,r){var n=r(3099),o=r(7908),i=r(8361),a=r(7466),u=function(t){return function(e,r,u,c){n(r);var s=o(e),l=i(s),f=a(s.length),p=t?f-1:0,h=t?-1:1;if(u<2)for(;;){if(p in l){c=l[p],p+=h;break}if(p+=h,t?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;t?p>=0:f>p;p+=h)p in l&&(c=r(c,l[p],p,s));return c}};t.exports={left:u(!1),right:u(!0)}},5417:function(t,e,r){var n=r(111),o=r(3157),i=r(5112)("species");t.exports=function(t,e){var r;return o(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!o(r.prototype)?n(r)&&null===(r=r[i])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)}},3411:function(t,e,r){var n=r(9670),o=r(9212);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){throw o(t),e}}},7072:function(t,e,r){var n=r(5112)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},4326:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:function(t,e,r){var n=r(1694),o=r(4326),i=r(5112)("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:a?o(e):"Object"==(n=o(e))&&"function"==typeof e.callee?"Arguments":n}},9920:function(t,e,r){var n=r(6656),o=r(3887),i=r(1236),a=r(3070);t.exports=function(t,e){for(var r=o(e),u=a.f,c=i.f,s=0;s=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=n[1]),t.exports=o&&+o},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,r){var n=r(7854),o=r(1236).f,i=r(8880),a=r(1320),u=r(3505),c=r(9920),s=r(4705);t.exports=function(t,e){var r,l,f,p,h,y=t.target,d=t.global,v=t.stat;if(r=d?n:v?n[y]||u(y,{}):(n[y]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(h=o(r,l))&&h.value:r[l],!s(d?l:y+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(r,l,p,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:function(t,e,r){"use strict";r(4916);var n=r(1320),o=r(7293),i=r(5112),a=r(2261),u=r(8880),c=i("species"),s=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),l="$0"==="a".replace(/./,"$0"),f=i("replace"),p=!!/./[f]&&""===/./[f]("a","$0"),h=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));t.exports=function(t,e,r,f){var y=i(t),d=!o((function(){var e={};return e[y]=function(){return 7},7!=""[t](e)})),v=d&&!o((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[y]=/./[y]),r.exec=function(){return e=!0,null},r[y](""),!e}));if(!d||!v||"replace"===t&&(!s||!l||p)||"split"===t&&!h){var m=/./[y],g=r(y,""[t],(function(t,e,r,n,o){return e.exec===a?d&&!o?{done:!0,value:m.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=g[0],w=g[1];n(String.prototype,t,b),n(RegExp.prototype,y,2==e?function(t,e){return w.call(t,this,e)}:function(t){return w.call(t,this)})}f&&u(RegExp.prototype[y],"sham",!0)}},9974:function(t,e,r){var n=r(3099);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},5005:function(t,e,r){var n=r(857),o=r(7854),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t])||i(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},1246:function(t,e,r){var n=r(648),o=r(7497),i=r(5112)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[n(t)]}},8554:function(t,e,r){var n=r(9670),o=r(1246);t.exports=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return n(e.call(t))}},647:function(t,e,r){var n=r(7908),o=Math.floor,i="".replace,a=/\$([$&'`]|\d\d?|<[^>]*>)/g,u=/\$([$&'`]|\d\d?)/g;t.exports=function(t,e,r,c,s,l){var f=r+t.length,p=c.length,h=u;return void 0!==s&&(s=n(s),h=a),i.call(l,h,(function(n,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(f);case"<":a=s[i.slice(1,-1)];break;default:var u=+i;if(0===u)return n;if(u>p){var l=o(u/10);return 0===l?n:l<=p?void 0===c[l-1]?i.charAt(1):c[l-1]+i.charAt(1):n}a=c[u-1]}return void 0===a?"":a}))}},7854:function(t,e,r){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},6656:function(t){var e={}.hasOwnProperty;t.exports=function(t,r){return e.call(t,r)}},3501:function(t){t.exports={}},842:function(t,e,r){var n=r(7854);t.exports=function(t,e){var r=n.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}},490:function(t,e,r){var n=r(5005);t.exports=n("document","documentElement")},4664:function(t,e,r){var n=r(9781),o=r(7293),i=r(317);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,r){var n=r(7293),o=r(4326),i="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},2788:function(t,e,r){var n=r(5465),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return o.call(t)}),t.exports=n.inspectSource},9909:function(t,e,r){var n,o,i,a=r(8536),u=r(7854),c=r(111),s=r(8880),l=r(6656),f=r(5465),p=r(6200),h=r(3501),y=u.WeakMap;if(a){var d=f.state||(f.state=new y),v=d.get,m=d.has,g=d.set;n=function(t,e){return e.facade=t,g.call(d,t,e),e},o=function(t){return v.call(d,t)||{}},i=function(t){return m.call(d,t)}}else{var b=p("state");h[b]=!0,n=function(t,e){return e.facade=t,s(t,b,e),e},o=function(t){return l(t,b)?t[b]:{}},i=function(t){return l(t,b)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!c(e)||(r=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},7659:function(t,e,r){var n=r(5112),o=r(7497),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},3157:function(t,e,r){var n=r(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},4705:function(t,e,r){var n=r(7293),o=/#|\.prototype\./,i=function(t,e){var r=u[a(t)];return r==s||r!=c&&("function"==typeof e?n(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=i.data={},c=i.NATIVE="N",s=i.POLYFILL="P";t.exports=i},111:function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},1913:function(t){t.exports=!1},7850:function(t,e,r){var n=r(111),o=r(4326),i=r(5112)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},408:function(t,e,r){var n=r(9670),o=r(7659),i=r(7466),a=r(9974),u=r(1246),c=r(9212),s=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,r){var l,f,p,h,y,d,v,m=r&&r.that,g=!(!r||!r.AS_ENTRIES),b=!(!r||!r.IS_ITERATOR),w=!(!r||!r.INTERRUPTED),x=a(e,m,1+g+w),P=function(t){return l&&c(l),new s(!0,t)},_=function(t){return g?(n(t),w?x(t[0],t[1],P):x(t[0],t[1])):w?x(t,P):x(t)};if(b)l=t;else{if("function"!=typeof(f=u(t)))throw TypeError("Target is not iterable");if(o(f)){for(p=0,h=i(t.length);h>p;p++)if((y=_(t[p]))&&y instanceof s)return y;return new s(!1)}l=f.call(t)}for(d=l.next;!(v=d.call(l)).done;){try{y=_(v.value)}catch(t){throw c(l),t}if("object"==typeof y&&y&&y instanceof s)return y}return new s(!1)}},9212:function(t,e,r){var n=r(9670);t.exports=function(t){var e=t.return;if(void 0!==e)return n(e.call(t)).value}},3383:function(t,e,r){"use strict";var n,o,i,a=r(7293),u=r(9518),c=r(8880),s=r(6656),l=r(5112),f=r(1913),p=l("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(n=o):h=!0);var y=null==n||a((function(){var t={};return n[p].call(t)!==t}));y&&(n={}),f&&!y||s(n,p)||c(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},7497:function(t){t.exports={}},5948:function(t,e,r){var n,o,i,a,u,c,s,l,f=r(7854),p=r(1236).f,h=r(261).set,y=r(6833),d=r(1036),v=r(5268),m=f.MutationObserver||f.WebKitMutationObserver,g=f.document,b=f.process,w=f.Promise,x=p(f,"queueMicrotask"),P=x&&x.value;P||(n=function(){var t,e;for(v&&(t=b.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},y||v||d||!m||!g?w&&w.resolve?(s=w.resolve(void 0),l=s.then,a=function(){l.call(s,n)}):a=v?function(){b.nextTick(n)}:function(){h.call(f,n)}:(u=!0,c=g.createTextNode(""),new m(n).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=P||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},3366:function(t,e,r){var n=r(7854);t.exports=n.Promise},133:function(t,e,r){var n=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},590:function(t,e,r){var n=r(7293),o=r(5112),i=r(1913),a=o("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),i&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},8536:function(t,e,r){var n=r(7854),o=r(2788),i=n.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},8523:function(t,e,r){"use strict";var n=r(3099),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},3929:function(t,e,r){var n=r(7850);t.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},1574:function(t,e,r){"use strict";var n=r(9781),o=r(7293),i=r(1956),a=r(5181),u=r(5296),c=r(7908),s=r(8361),l=Object.assign,f=Object.defineProperty;t.exports=!l||o((function(){if(n&&1!==l({b:1},l(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=l({},t)[r]||i(l({},e)).join("")!=o}))?function(t,e){for(var r=c(t),o=arguments.length,l=1,f=a.f,p=u.f;o>l;)for(var h,y=s(arguments[l++]),d=f?i(y).concat(f(y)):i(y),v=d.length,m=0;v>m;)h=d[m++],n&&!p.call(y,h)||(r[h]=y[h]);return r}:l},30:function(t,e,r){var n,o=r(9670),i=r(6048),a=r(748),u=r(3501),c=r(490),s=r(317),l=r(6200)("IE_PROTO"),f=function(){},p=function(t){return"