File: /var/www/html/pmw24/app/public/admin_assets/fullcalendar/packages/bundle/google-calendar.min.js
/*!
FullCalendar Google Calendar Plugin v4.3.0
Docs & License: https://fullcalendar.io/
(c) 2019 Adam Shaw
*/
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("fullcalendar")):"function"==typeof define&&define.amd?define(["exports","fullcalendar"],r):r((e=e||self).FullCalendar=e.FullCalendar||{},e.FullCalendar)}(this,function(e,r){"use strict";var t=function(){return(t=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e}).apply(this,arguments)},n="https://www.googleapis.com/calendar/v3/calendars",a={url:String,googleCalendarApiKey:String,googleCalendarId:String,googleCalendarApiBase:String,data:null},o={parseMeta:function(e){if("string"==typeof e&&(e={url:e}),"object"==typeof e){var t=r.refineProps(e,a);if(!t.googleCalendarId&&t.url&&(t.googleCalendarId=function(e){var r;if(/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(e))return e;if((r=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(e))||(r=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(e)))return decodeURIComponent(r[1])}(t.url)),delete t.url,t.googleCalendarId)return t}return null},fetch:function(e,a,o){var l=e.calendar,i=e.eventSource.meta,d=i.googleCalendarApiKey||l.opt("googleCalendarApiKey");if(d){var s=function(e){var r=e.googleCalendarApiBase;r||(r=n);return r+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(i),u=function(e,n,a,o){var l,i,d;o.canComputeOffset?(i=o.formatIso(e.start),d=o.formatIso(e.end)):(i=r.addDays(e.start,-1).toISOString(),d=r.addDays(e.end,1).toISOString());l=t({},a||{},{key:n,timeMin:i,timeMax:d,singleEvents:!0,maxResults:9999}),"local"!==o.timeZone&&(l.timeZone=o.timeZone);return l}(e.range,d,i.data,l.dateEnv);r.requestJson("GET",s,u,function(e,r){var t,n;e.error?o({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):a({rawEvents:(t=e.items,n=u.timeZone,t.map(function(e){return function(e,r){var t=e.htmlLink||null;t&&r&&(t=function(e,r){return e.replace(/(\?.*?)?(#|$)/,function(e,t,n){return(t?t+"&":"?")+r+n})}(t,"ctz="+r));return{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:t,location:e.location,description:e.description}}(e,n)})),xhr:r})},function(e,r){o({message:e,xhr:r})})}else o({message:"Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"})}};var l=r.createPlugin({eventSourceDefs:[o]});e.default=l,Object.defineProperty(e,"__esModule",{value:!0}),e.globalPlugins&&(e.globalPlugins.push(e.default),delete e.default)});