text: /** 
   * Kendo UI v2020.2.617 (http://www.telerik.com/kendo-ui)                                                                                                                                               
   * Copyright 2020 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.                                                                                      
   *                                                                                                                                                                                                      
   * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
   * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
   * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
  
  */
  !function(e,define){define("util/text-metrics.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return(e+"").replace(s,l)}function i(e){var t,i=[];for(t in e)i.push(t+e[t]);return i.sort().join("")}function n(e){var t,i=2166136261;for(t=0;t<e.length;++t)i+=(i<<1)+(i<<4)+(i<<7)+(i<<8)+(i<<24),i^=e.charCodeAt(t);return i>>>0}function a(){return{width:0,height:0,baseline:0}}function o(e,t,i){return u.current.measure(e,t,i)}var r,s,l,d,c,u;window.kendo.util=window.kendo.util||{},r=kendo.Class.extend({init:function(e){this._size=e,this._length=0,this._map={}},put:function(e,t){var i=this._map,n={key:e,value:t};i[e]=n,this._head?(this._tail.newer=n,n.older=this._tail,this._tail=n):this._head=this._tail=n,this._length>=this._size?(i[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},get:function(e){var t=this._map[e];if(t)return t===this._head&&t!==this._tail&&(this._head=t.newer,this._head.older=null),t!==this._tail&&(t.older&&(t.older.newer=t.newer,t.newer.older=t.older),t.older=this._tail,t.newer=null,this._tail.newer=t,this._tail=t),t.value}}),s=/\r?\n|\r|\t/g,l=" ",d={baselineMarkerSize:1},"undefined"!=typeof document&&(c=document.createElement("div"),c.style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;"),u=kendo.Class.extend({init:function(t){this._cache=new r(1e3),this.options=e.extend({},d,t)},measure:function(e,o,r){var s,l,d,u,p,h,f,v,m;if(void 0===r&&(r={}),!e)return a();if(s=i(o),l=n(e+s),d=this._cache.get(l))return d;u=a(),p=r.box||c,h=this._baselineMarker().cloneNode(!1);for(f in o)v=o[f],void 0!==v&&(p.style[f]=v);return m=r.normalizeText!==!1?t(e):e+"",p.textContent=m,p.appendChild(h),document.body.appendChild(p),m.length&&(u.width=p.offsetWidth-this.options.baselineMarkerSize,u.height=p.offsetHeight,u.baseline=h.offsetTop+this.options.baselineMarkerSize),u.width>0&&u.height>0&&this._cache.put(l,u),p.parentNode.removeChild(p),u},_baselineMarker:function(){var e=document.createElement("div");return e.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",e}}),u.current=new u,kendo.deepExtend(kendo.util,{LRUCache:r,TextMetrics:u,measureText:o,objectKey:i,hashKey:n,normalizeText:t})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.scheduler.min",["kendo.dropdownlist.min","kendo.editable.min","kendo.multiselect.min","kendo.window.min","kendo.datetimepicker.min","kendo.scheduler.recurrence.min","kendo.scheduler.view.min","kendo.scheduler.dayview.min","kendo.scheduler.agendaview.min","kendo.scheduler.monthview.min","kendo.scheduler.timelineview.min","kendo.dialog.min","kendo.pane.min","kendo.pdf.min","kendo.switch.min"],e)}(function(){return function(e,t){function i(e,t){return t=t||"",e.startTimezone&&(t=e.startTimezone,e.endTimezone&&(t+=" | "+e.endTimezone)),t}function n(e,t){var i=t.timezone;i&&(e[A.attr("timezone")]=i)}function a(e,t){var i,n=t.model.fields[t.field].validation;n&&(i=n.validDateValidator,i&&$(i)&&i.message&&(e[A.attr("validDate-msg")]=i.message))}function o(e,t){var i,n=t.model.fields[t.field].validation;n&&(i=n.dateCompare,i&&$(i)&&i.message&&(e[A.attr("dateCompare-msg")]=i.message))}function r(e,t){return function(i){return i=e(i),l(i,"apply",t),i||[]}}function s(e,t){return function(i){return i&&("[object Array]"===Z.call(i)||i instanceof A.data.ObservableArray||(i=[i])),l(i,"remove",t,!0),i=e(i),i||[]}}function l(e,t,i,n){var a,o,r;for(e=e||[],o=0,r=e.length;o<r;o++)a=e[o],n?a.startTimezone||a.endTimezone?i?(a.start=A.timezone.convert(a.start,a.startTimezone||a.endTimezone,i),a.end=A.timezone.convert(a.end,a.endTimezone||a.startTimezone,i),a.start=A.timezone[t](a.start,i),a.end=A.timezone[t](a.end,i)):(a.start=A.timezone[t](a.start,a.startTimezone||a.endTimezone),a.end=A.timezone[t](a.end,a.endTimezone||a.startTimezone)):i&&(a.start=A.timezone[t](a.start,i),a.end=A.timezone[t](a.end,i)):a.startTimezone||a.endTimezone?(a.start=A.timezone[t](a.start,a.startTimezone||a.endTimezone),a.end=A.timezone[t](a.end,a.endTimezone||a.startTimezone),i&&(a.start=A.timezone.convert(a.start,a.startTimezone||a.endTimezone,i),a.end=A.timezone.convert(a.end,a.endTimezone||a.startTimezone,i))):i&&(a.start=A.timezone[t](a.start,i),a.end=A.timezone[t](a.end,i)),n&&delete a.uid;return e}function d(e,t){for(var i,n=e.length,a=0;a<n;a++)if(i=e[a],i.uid===t)return i}function c(e,t,i){return e=i?A.timezone.convert(e,t,i):A.timezone.remove(e,t)}function u(e){var t,i;return!(e.filter("[name=start]").length&&e.filter("[title=Start]").length||e.filter("[name=end]").length&&e.filter("[title=End]").length||e.filter(".k-recur-until").length)||(i=A.widgetInstance(e,A.ui),i?(t=A.parseDate(e.val(),i.options.format),!!t&&i.value()):(t=A.parseDate(e.val()),!!t))}function p(e){var t,i,n,a,o,r,s,l,d,u,p,h;return!(e.filter("[name=end]").length&&(t=e.closest(".k-scheduler-edit-form"),i=t.find("[name=start]:visible"),n=t.find("[name=end]:visible"),n[0]&&i[0]&&(r=A.widgetInstance(i,A.ui),s=A.widgetInstance(n,A.ui),l=t.data("kendoEditable"),d=l?l.options.model:null,r&&s?(a=r.value(),o=s.value()):(a=A.parseDate(i.val()),o=A.parseDate(n.val())),a&&o)))||(d&&(u=i.attr(A.attr("timezone")),p=d.startTimezone,h=d.endTimezone,p=p||h,h=h||p,p&&(a=c(a,p,u),o=c(o,h,u))),a<=o)}function h(e){var t,i,n,a,o,r;return!(e.filter(".k-recur-until").length&&(t=A.widgetInstance(e,A.ui),i=t.value(),n=e.closest(".k-scheduler-edit-form"),a=n.find("[name=start]:visible"),a[0]&&(r=A.widgetInstance(a,A.ui),o=r?r.value():A.parseDate(a.val()),o&&i)))||o<=i}function f(e,t,i,n){for(var a=e.length,o=[],r=0;r<a;r++)o=o.concat(e[r].expand(t,i,n));return o}function v(e,t){delete e.name,delete e.prefix,delete e.remove,delete e.edit,delete e.add,delete e.navigate;for(var i in t)e[i]=t[i];return e}function m(t,i){var n,a,o=(t.fields||t)[i],r=["url","email","number","date","boolean"],s=o?o.validation:{},l=A.attr("type"),d=e.inArray,c={};for(n in s)a=s[n],d(n,r)>=0?c[l]=n:A.isFunction(a)||(c[n]=$(a)?a.value||n:a),c[A.attr(n+"-msg")]=a.message;return c}function g(t,i){var n=m(i,t.field);return function(a){e(A.format('<select data-{0}bind="value:{1}" title="'+i.title+'">',A.ns,t.field)).appendTo(a).attr(n).kendoDropDownList({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource,valuePrimitive:t.valuePrimitive,optionLabel:"None",template:A.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField)})}}function _(t,i){var n=m(i,t.field);return function(i){var a,o,r="",s=t.dataSource.view();for(a=0,o=s.length;a<o;a++)r+=A.format('<option value="{0}">{1}</option>',A.getter(t.dataValueField)(s[a]),A.getter(t.dataTextField)(s[a]));e(A.format('<select data-{0}bind="value:{1}">{2}</select>',A.ns,t.field,r,t.valuePrimitive)).appendTo(i).attr(n)}}function k(t){var i=m(t.model,t.field);return function(t,n){e('<textarea name="description" class="k-textarea" title="'+n.title+'"/>').attr(i).appendTo(t)}}function b(t,i){var n=m(i,t.field);return function(i){e(A.format('<select data-{0}bind="value:{1}">',A.ns,t.field)).appendTo(i).attr(n).kendoMultiSelect({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource,valuePrimitive:t.valuePrimitive,itemTemplate:A.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField),tagTemplate:A.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField)})}}function w(t,i){var n=m(i,t.field);return function(i){var a,o,r="",s=t.dataSource.view();for(a=0,o=s.length;a<o;a++)r+=A.format('<option value="{0}">{1}</option>',A.getter(t.dataValueField)(s[a]),A.getter(t.dataTextField)(s[a]));e(A.format('<select data-{0}bind="value:{1}" multiple="multiple" data-{0}value-primitive="{3}">{2}</select>',A.ns,t.field,r,t.valuePrimitive)).appendTo(i).attr(n)}}function y(e,t){var i,n=e.end.getTime()-e.start.getTime(),a=new Date(e.start.getTime());return A.date.setTime(a,t),i=new Date(a.getTime()),A.date.setTime(i,n,!0),{start:a,end:i}}var z,T,D,S,x,E,R,C,P,M,I,V,A=window.kendo,B=A.date,H=B.MS_PER_DAY,O=B.getDate,W=A.date.getMilliseconds,F=A.recurrence,N=e.extend({F10:121},A.keys),L=A.ui,U=L.Widget,K=L.DataBoundWidget,q="string",Y=L.Popup,j=L.Calendar,Q=A.data.DataSource,$=e.isPlainObject,X=e.extend,J=e.proxy,Z=Object.prototype.toString,G=e.isArray,ee=".kendoScheduler",te="click",ie="mousedown",ne=A.support.pointers?"pointerdown":"touchstart",ae=A.support.pointers?"pointermove":"touchmove",oe=A.support.pointers?"pointerup":"touchend",re=A.support.mousemove,se="change",le="progress",de="error",ce="cancel",ue="remove",pe="resetSeries",he="save",fe="add",ve="edit",me="k-state-focused",ge="k-state-expanded",_e=".k-scheduler-views",ke="k-event-inverse",be=/(?:value:start|value:end)(?:,|$)/,we=O(new Date),ye=",",ze=/\;/g,Te="recurrenceException",De="Are you sure you want to delete this event?",Se="Do you want to delete only this event occurrence or the whole series?",xe="Do you want to edit only this event occurrence or the whole series?",Ee="Are you sure you want to delete this event occurrence?",Re="Are you sure you want to reset the whole series?",Ce="Are you sure you want to delete the whole series?",Pe='<button type="button" class="k-button #=className#" #=attr#><span class="k-button-text">#=text#</span></button>',Me=A.template('<select class="k-dropdown k-views-dropdown">#for (var view in views) {#<option value="#= view #">${views[view].title}</option>#}#</select>'),Ie=A.template('<div class="k-scheduler-toolbar k-toolbar"># if (pdf) { #<button class="k-button k-pdf"><span class="k-icon k-i-file-pdf"></span><span class="k-button-text">${messages.pdf}</span></button># } #<span class="k-scheduler-navigation k-button-group"><button class="k-button k-nav-today" title="${messages.today}"><span class="k-button-text">${messages.today}</span></button><button class="k-button k-button-icon k-icon-button k-nav-prev" title="${messages.previous}" aria-label="${messages.previous}"><span class="k-icon k-i-arrow-60-left"></span></button><button class="k-button k-button-icon k-icon-button k-nav-next" title="${messages.next}" aria-label="${messages.next}"><span class="k-icon k-i-arrow-60-right"></span></button></span><a role="button" href="\\#" class="k-nav-current"><span class="k-icon k-i-calendar"></span><span class="k-sm-date-format" data-#=ns#bind="text: formattedShortDate"></span><span class="k-lg-date-format" data-#=ns#bind="text: formattedDate"></span></a><span class="k-spacer k-toolbar-spacer"></span># if (search) { #<span class="k-scheduler-search k-textbox"><input autocomplete="off" placeholder="Search..." title="Search..." class="k-input k-scheduler-search-input" /><span class="k-input-icon"><span class="k-icon k-i-search"></span></span></span># } ## if (viewsCount === 1) { #<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-button k-button-icon k-icon-button k-scheduler-refresh"><span class="k-icon k-i-reload"></span></a># } else { #<span class="k-scheduler-views-wrapper"><span class="k-scheduler-views k-button-group"># for (var view in views) { #<button type="button" class="k-button k-view-#= view.toLowerCase() #" data-#=ns#name="#=view#">${views[view].title}</button># } #</span></span># } #</div>'),Ve=A.template('<div class="k-scheduler-toolbar k-toolbar"><span class="k-scheduler-tools k-button-group"># if (pdf) { #<button type="button" class="k-button k-icon-button k-button-icon k-pdf"><span class="k-icon k-i-file-pdf"></span></button># } #<button type="button" class="k-button k-icon-button k-button-icon k-nav-calendar"><span class="k-icon k-i-calendar"></span></button># if (editable) { #<button type="button" class="k-button k-icon-button k-button-icon k-create-event"><span class="k-icon k-i-plus"></span></button># } #</span><span class="k-spacer k-toolbar-spacer"></span># if (search) { #<span class="k-scheduler-search k-textbox"><input autocomplete="off" placeholder="Search..." title="Search..." class="k-scheduler-search-input" /><span class="k-input-icon"><span class="k-icon k-i-search"></span></span></span># } ##if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-button k-button-icon k-icon-button k-scheduler-refresh"><span class="k-icon k-i-reload"></span></a>#} else {#<select class="k-dropdown k-scheduler-mobile-views">#for(var view in views){#<option class="k-view-#= view.toLowerCase() #" value="#=view#">${views[view].title}</option>#}#</select>#}#</div><div class="k-scheduler-toolbar k-toolbar"><span class="k-scheduler-navigation"><button class="k-button k-button-icon k-icon-button k-nav-prev"><span class="k-icon k-i-arrow-chevron-left"></span></button><span class="k-state-default k-nav-current"><span class="k-m-date-format" data-#=ns#bind="text: formattedMobileDate"></span><span class="k-y-date-format" data-#=ns#bind="text: formattedYear"></span></span><button class="k-button k-button-icon k-icon-button k-nav-next"><span class="k-icon k-i-arrow-chevron-right"></span></button></span></div>'),Ae=function(t,i){var r={name:i.field,title:i.title},s=i.model.isAllDay,l=A.attr("validate")+"='"+!s+"'",d=A.attr("validate")+"='"+s+"'";n(r,i),a(r,i),o(r,i),e('<input type="datetime-local" required '+A.attr("type")+'="datetime-local" '+A.attr("bind")+'="value:'+i.field+', invisible:isAllDay" '+l+"/>").attr(r).appendTo(t),e('<input type="date" required '+A.attr("type")+'="date" '+A.attr("bind")+'="value:'+i.field+',visible:isAllDay" '+d+"/>").attr(r).appendTo(t),e("<span "+A.attr("for")+'="'+i.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},Be=function(t,i){var r={name:i.field,title:i.title},s=i.model.isAllDay,l=A.attr("validate")+"='"+!s+"' ",d=A.attr("validate")+"='"+s+"' ";n(r,i),a(r,i),o(r,i),e('<input type="text" required '+A.attr("type")+'="date" '+A.attr("role")+'="datetimepicker" '+A.attr("bind")+'="value:'+i.field+',invisible:isAllDay" '+l+"/>").attr(r).appendTo(t),e('<input type="text" required '+A.attr("type")+'="date" '+A.attr("role")+'="datepicker" '+A.attr("bind")+'="value:'+i.field+',visible:isAllDay" '+d+"/>").attr(r).appendTo(t),e("<span "+A.attr("bind")+'="text: '+i.field+'Timezone"></span>').appendTo(t),"end"===i.field&&e("<span "+A.attr("bind")+'="text: startTimezone, invisible: endTimezone"></span>').appendTo(t),e("<span "+A.attr("for")+'="'+i.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},He=function(t,i){e("<div "+A.attr("bind")+'="value:'+i.field+'" />').attr({name:i.field}).appendTo(t).kendoRecurrenceEditor({start:i.model.start,timezone:i.timezone,messages:i.messages})},Oe=function(t,i){e("<div "+A.attr("bind")+'="value:'+i.field+'" />').attr({name:i.field}).appendTo(t).kendoMobileRecurrenceEditor({start:i.model.start,timezone:i.timezone,messages:i.messages,pane:i.pane,value:i.model[i.field]})},We=function(t,i){e('<input type="checkbox" data-role="switch"'+A.attr("bind")+'="value:'+i.field+'" />').appendTo(t)},Fe=function(t,n){var a=i(n.model,n.messages.noTimezone);e('<span class="k-timezone-label"></span>').text(a).appendTo(t),e('<span class="k-icon k-i-arrow-chevron-right"></span>').appendTo(t),t.closest("li.k-item label").click(n.click)},Ne=function(t,i){e('<a href="#" class="k-button" data-bind="invisible:isAllDay">'+i.messages.timezoneEditorButton+"</a>").click(i.click).appendTo(t)},Le=function(t,i){e('<div class="k-mobiletimezoneeditor" '+A.attr("bind")+'="value:'+i.field+'" />').attr({name:i.field}).appendTo(t).kendoMobileTimezoneEditor({optionLabel:i.noTimezone})},Ue=function(i,n){var a=n.visible||n.visible===t;e("<div "+A.attr("bind")+'="value:'+n.field+'" />').attr({name:n.field}).toggle(a).appendTo(i).kendoTimezoneEditor({optionLabel:n.noTimezone,title:n.title})},Ke=A.Class.extend({init:function(t,i){var n=t.timezone;this.reader=i,i.model&&(this.model=i.model),this.timezone=n,this.data=r(e.proxy(this.data,this),n),this.serialize=s(e.proxy(this.serialize,this),n)},errors:function(e){return this.reader.errors(e)},parse:function(e){return this.reader.parse(e)},data:function(e){return this.reader.data(e)},total:function(e){return this.reader.total(e)},groups:function(e){return this.reader.groups(e)},aggregates:function(e){return this.reader.aggregates(e)},serialize:function(e){return this.reader.serialize(e)}}),qe=A.data.Model.define({init:function(e){var t=this;A.data.Model.fn.init.call(t,e),t._defaultId=t.defaults[t.idField]},_time:function(e){var t=this[e],i="_"+e+"Time";return this[i]?this[i]-A.date.toUtcTime(A.date.getDate(t)):W(t)},_date:function(e){var t="_"+e+"Time";return this[t]?this[t]-this._time(e):A.date.getDate(this[e])},clone:function(t,i){var n=this.uid,a=new this.constructor(e.extend({},this.toJSON(),t));return i||(a.uid=n),a},duration:function(){var e=this.end,t=this.start,i=(e.getTimezoneOffset()-t.getTimezoneOffset())*A.date.MS_PER_MINUTE;return e-t-i},expand:function(e,t,i){return F?F.expand(this,e,t,i):[this]},update:function(e){for(var t in e)this.set(t,e[t]);this._startTime&&this.set("_startTime",A.date.toUtcTime(this.start)),this._endTime&&this.set("_endTime",A.date.toUtcTime(this.end))},isMultiDay:function(){return this.isAllDay||this.duration()>=A.date.MS_PER_DAY},isException:function(){return!this.isNew()&&this.recurrenceId},isOccurrence:function(){return this.isNew()&&this.recurrenceId},isRecurring:function(){return!(!this.recurrenceRule&&!this.recurrenceId)},isRecurrenceHead:function(){return!(!this.id||!this.recurrenceRule)},toOccurrence:function(t){return t=e.extend(t,{recurrenceException:null,recurrenceRule:null,recurrenceId:this.id||this.recurrenceId}),t[this.idField]=this.defaults[this.idField],this.clone(t,!0)},toJSON:function(){var e=A.data.Model.fn.toJSON.call(this);return e.uid=this.uid,delete e._startTime,delete e._endTime,e},shouldSerialize:function(e){return A.data.Model.fn.shouldSerialize.call(this,e)&&"_defaultId"!==e},set:function(e,t){var i,n,a,o=this.isAllDay||!1;A.data.Model.fn.set.call(this,e,t),"isAllDay"==e&&t!=o&&(i=A.date.getDate(this.start),n=new Date(this.end),a=A.date.getMilliseconds(n),0===a&&t&&(a=H),this.set("start",i),t===!0?(A.date.setTime(n,-a),n<i&&(n=i)):A.date.setTime(n,H-a),this.set("end",n))},id:"id",fields:{id:{type:"number"},title:{defaultValue:"",type:"string"},start:{type:"date",validation:{required:!0,validDate:{value:u}}},startTimezone:{type:"string"},end:{type:"date",validation:{required:!0,validDate:{value:u},dateCompare:{value:p}}},endTimezone:{type:"string"},recurrenceRule:{defaultValue:"",type:"string",validation:{validDate:{value:u},untilDateCompare:{value:h}}},recurrenceException:{defaultValue:"",type:"string"},isAllDay:{type:"boolean",defaultValue:!1},description:{type:"string"}}}),Ye=Q.extend({init:function(e){Q.fn.init.call(this,X(!0,{},{schema:{modelBase:qe,model:qe}},e)),this.reader=new Ke(this.options.schema,this.reader)},expand:function(e,t){var i,n=this.view(),a={};return e&&t&&(i=t.getTimezoneOffset(),t=new Date(t.getTime()+H-1),t.getTimezoneOffset()!==i&&(t=A.timezone.apply(t,i)),a={logic:"or",filters:[{logic:"and",filters:[{field:"start",operator:"gte",value:e},{field:"end",operator:"gte",value:e},{field:"start",operator:"lte",value:t}]},{logic:"and",filters:[{field:"start",operator:"lte",value:new Date(e.getTime()+H-1)},{field:"end",operator:"gte",value:e}]}]},n=new A.data.Query(f(n,e,t,this.reader.timezone)).filter(a).toArray()),n},cancelChanges:function(e){e&&e.isOccurrence()&&this._removeExceptionDate(e),Q.fn.cancelChanges.call(this,e)},insert:function(e,t){if(t){if(!(t instanceof qe)){var i=t;t=this._createNewModel(),t.accept(i)}return(!this._pushCreated&&t.isRecurrenceHead()||t.recurrenceId)&&(t=t.recurrenceId?t:t.toOccurrence(),this._addExceptionDate(t)),Q.fn.insert.call(this,e,t)}},pushCreate:function(e){this._pushCreated=!0,Q.fn.pushCreate.call(this,e),this._pushCreated=!1},remove:function(e){return e.isRecurrenceHead()?this._removeExceptions(e):e.isRecurring()&&this._addExceptionDate(e),Q.fn.remove.call(this,e)},_removeExceptions:function(e){for(var t=this.data().slice(0),i=t.shift(),n=e.id;i;)i.recurrenceId===n&&Q.fn.remove.call(this,i),i=t.shift();e.set(Te,"")},_removeExceptionDate:function(e){var t,i,n,a;e.recurrenceId&&(t=this.get(e.recurrenceId),t&&(i=e.defaults.start,n=RegExp("(\\"+ye+"?)"+F.toExceptionString(i,this.reader.timezone)),a=(t.recurrenceException||"").replace(ze,ye).replace(/\,$/,""),n.test(a)?t.set(Te,a.replace(n,"")):(i=e.start,n=RegExp("(\\"+ye+"?)"+F.toExceptionString(i,this.reader.timezone)),t.set(Te,a.replace(n,"")))))},_addExceptionDate:function(e){var t,i=e.start,n=this.reader.timezone,a=this.get(e.recurrenceId),o=(a.recurrenceException||"").replace(ze,ye).replace(/\,$/,"");F.isException(o,i,n)||(t=F.toExceptionString(i,n),e.defaults.start=i,a.set(Te,o+(o&&t?ye:"")+t))}});Ye.create=function(e){(G(e)||e instanceof A.data.ObservableArray)&&(e={data:e});var t=e||{},i=t.data;if(t.data=i,!(t instanceof Ye)&&t instanceof A.data.DataSource)throw Error("Incorrect DataSource type. Only SchedulerDataSource instances are supported");return t instanceof Ye?t:new Ye(t)},X(!0,A.data,{SchedulerDataSource:Ye,SchedulerDataReader:Ke,SchedulerEvent:qe}),z={update:{text:"Save",className:"k-primary k-scheduler-update"},canceledit:{text:"Cancel",className:"k-scheduler-cancel"},destroy:{text:"Delete",imageClass:"k-i-close",className:"k-primary k-scheduler-delete",iconClass:"k-icon"}},T={mobile:{dateRange:Ae,timezonePopUp:Fe,timezone:Le,recurrence:Oe,description:k,multipleResources:w,resources:_,isAllDay:We},desktop:{dateRange:Be,timezonePopUp:Ne,timezone:Ue,recurrence:He,description:k,multipleResources:b,resources:g}},D=A.Observable.extend({init:function(e,t){A.Observable.fn.init.call(this),this.element=e,this.options=X(!0,{},this.options,t),this.createButton=this.options.createButton,this.toggleDateValidationHandler=J(this._toggleDateValidation,this)},_toggleDateValidation:function(t){if("isAllDay"==t.field){var i,n,a,o=this.container,r=this.editable.options.model.isAllDay,s=A.attr("bind");o.find("["+s+"*=end],["+s+"*=start]").each(function(){i=e(this),be.test(i.attr(s))&&(n=i.is("["+A.attr("role")+"=datetimepicker],[type*=datetime]"),a=r!==n,i.attr(A.attr("validate"),a))})}},fields:function(e,t){var i,n,a=this,o=a.options.messages,r=a.options.timezone,s=function(e){e.preventDefault(),a._initTimezoneEditor(t,this)},l=[{field:"title",title:o.editor.title},{field:"start",title:o.editor.start,editor:e.dateRange,timezone:r},{field:"end",title:o.editor.end,editor:e.dateRange,timezone:r},{field:"isAllDay",title:o.editor.allDayEvent,editor:e.isAllDay}];A.timezone.windows_zones&&(l.push({field:"timezone",title:o.editor.timezone,editor:e.timezonePopUp,click:s,messages:o.editor,model:t}),l.push({field:"startTimezone",title:o.editor.startTimezone,editor:e.timezone,noTimezone:o.editor.noTimezone}),l.push({field:"endTimezone",title:o.editor.endTimezone,editor:e.timezone,noTimezone:o.editor.noTimezone})),t.recurrenceId||l.push({field:"recurrenceRule",title:o.editor.repeat,editor:e.recurrence,timezone:r,messages:o.recurrenceEditor,pane:this.pane}),"description"in t&&l.push({field:"description",title:o.editor.description,editor:e.description({model:t,field:"description"})});for(i=0;i<this.options.resources.length;i++)n=this.options.resources[i],l.push({field:n.field,title:n.title,editor:n.multiple?e.multipleResources(n,t):e.resources(n,t)});return l},end:function(){return this.editable.end()},_buildDesktopEditTemplate:function(e,t,i){var n,a,o,r,s=this.options.messages,l=X({},A.Template,this.options.templateSettings),d=l.paramName,c="";for(n=0,a=t.length;n<a;n++)o=t[n],"startTimezone"===o.field&&(c+='<div class="k-popup-edit-form k-scheduler-edit-form k-scheduler-timezones" style="display:none">',c+='<div class="k-edit-form-container">',c+='<div class="k-edit-label"></div>',c+='<div class="k-edit-field"><label class="k-check"><input class="k-timezone-toggle" type="checkbox" />'+s.editor.separateTimezones+"</label></div>"),c+='<div class="k-edit-label"><label for="'+o.field+'">'+(o.title||o.field||"")+"</label></div>",!e.editable||e.editable(o.field)?(i.push(o),c+="<div "+A.attr("container-for")+'="'+o.field+'" class="k-edit-field"></div>'):(r="#:",o.field?(o=A.expr(o.field,d),r+=o+"==null?'':"+o):r+="''",r+="#",r=A.template(r,l),c+='<div class="k-edit-field">'+r(e)+"</div>"),"endTimezone"===o.field&&(c+=this._createEndTimezoneButton());return c},_buildMobileEditTemplate:function(e,t,i){var n,a,o,r,s=this.options.messages,l=X({},A.Template,this.options.templateSettings),d=l.paramName,c="";for(c+='<ul class="k-listgroup k-listgroup-flush">',n=0,a=t.length;n<a;n++)o=t[n],"timezone"!==o.field&&"recurrenceRule"!==o.field||(c+='</ul><ul class="k-listgroup k-listgroup-flush">'),"startTimezone"===o.field&&(c+='<div class="k-popup-edit-form k-scheduler-edit-form k-scheduler-timezones" style="display:none">',c+='<ul class="k-listgroup k-listgroup-flush">',c+='<li class="k-item k-listgroup-item">',c+='<label class="k-label k-listgroup-form-row">',c+='<span class="k-item-title k-listgroup-form-row">'+s.editor.separateTimezones+"</span>",c+='<span class="k-listgroup-form-field-wrapper">',c+='<input class="k-timezone-toggle" data-role="switch" type="checkbox" />',c+="</span>",c+="</label>",c+="</li>"),!e.editable||e.editable(o.field)?(c+='<li class="k-item k-listgroup-item">',c+="timezone"===o.field?'<label class="k-label k-listgroup-form-row" data-bind="css: { k-state-disabled: isAllDay }">':'<label class="k-label k-listgroup-form-row">',c+='<span class="k-item-title k-listgroup-form-field-label">'+(o.title||o.field||"")+"</span>",i.push(o),c+='<div class="k-listgroup-form-field-wrapper" '+A.attr("container-for")+'="'+o.field+'"></div>',c+="</label></li>"):(r="#:",c+='<li class="k-item k-listgroup-item">',c+='<label class="k-label k-no-click k-listgroup-form-row">',c+='<span class="k-item-title k-listgroup-form-field-label">'+(o.title||o.field||"")+"</span>",o.field?(o=A.expr(o.field,d),r+=o+"==null?'':"+o):r+="''",r+="#",r=A.template(r,l),c+='<span class="k-no-editor k-listgroup-form-field-wrapper">'+r(e)+"</span>",c+="</label></li>"),"recurrenceRule"===o.field&&(c+='</ul><ul class="k-listgroup k-listgroup-flush">'),"endTimezone"===o.field&&(c+="</ul></div>");return c+="</ul>"},_buildEditTemplate:function(e,t,i,n){var a=X({},A.Template,this.options.templateSettings),o=this.options.editable.template,r="";return o?(typeof o===q&&(o=A.unescape(o)),r+=A.template(o,a)(e)):r+=n?'<div data-role="content">'+this._buildMobileEditTemplate(e,t,i)+"</div>":this._buildDesktopEditTemplate(e,t,i),r},_createEndTimezoneButton:function(){return"</ul></div>"},_revertTimezones:function(e){e.set("startTimezone",this._startTimezone),e.set("endTimezone",this._endTimezone),delete this._startTimezone,delete this._endTimezone}}),S=D.extend({init:function(){D.fn.init.apply(this,arguments),this.pane=A.Pane.wrap(this.element,{viewEngine:{viewOptions:{renderOnInit:!0,wrap:!1,wrapInSections:!0,detachOnHide:!1,detachOnDestroy:!1}}}),this.pane.element.parent().css("height",this.options.height),this.view=this.pane.view()},options:{animations:{left:"slide",right:"slide:right"}},destroy:function(){this.close(),this.unbind(),this.pane.destroy()},_initTimezoneEditor:function(t){var n,a=this,o=a.pane,r=a.options.messages,s=a.timezoneView,l=s?s.content.find(".k-scheduler-timezones"):a.container.find(".k-scheduler-timezones"),d=l.find("input.k-timezone-toggle").data("kendoSwitch"),c=l.find("li.k-item:not(.k-zonepicker):last"),u=function(e){if("startTimezone"===e.field){var i=t.startTimezone;d.enable(i),i||(c.hide(),t.set("endTimezone",""),d.value(!1))}};a._startTimezone=t.startTimezone||"",a._endTimezone=t.endTimezone||"",s||(n='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form"><div data-role="header" class="k-header"><a href="\\#" class="k-header-cancel k-scheduler-cancel k-link" title="'+r.cancel+'"aria-label="'+r.cancel+'"><span class="k-icon k-i-arrow-chevron-left"></span></a>'+r.editor.timezoneTitle+'<a href="\\#" class="k-header-done k-scheduler-update k-link" title="'+r.save+'" aria-label="'+r.save+'"><span class="k-icon k-i-check"></span></a></div><div data-role="content"></div>',this.timezoneView=s=o.append(n),s.contentElement.append(l.show()),s.element.on(te+ee,".k-scheduler-cancel, .k-scheduler-update",function(n){var s,l;n.preventDefault(),n.stopPropagation(),e(this).hasClass("k-scheduler-cancel")&&a._revertTimezones(t),s=a._editPane,l=i(t,r.editor.noTimezone),s.content.find(".k-timezone-label").text(l),o.navigate(s,a.options.animations.right)}),d.bind("change",function(e){c.toggle(e.checked),t.set("endTimezone","")}),t.bind("change",u)),d.value(!!t.endTimezone),d.enable(!!t.startTimezone),t.endTimezone?c.show():c.hide(),o.navigate(s,a.options.animations.left)},showDialog:function(t){var i=t.buttons.map(function(e){return{text:e.text,action:e.click}});i.push({text:this.options.messages.cancel,primary:!0}),e("<div />").appendTo(document.body).kendoDialog({close:function(){this.destroy()},modal:{preventScroll:!0},closable:!1,title:!1,content:t.text,actions:i})},editEvent:function(t){var i,n,a,o,r,s,l,d=this.pane,c="",u=this.options.messages,p=u.save,h=u.destroy,f=u.cancel,v=u.editor.editorTitle,m=u.resetSeries;return c+='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form"'+A.attr("uid")+'="'+t.uid+'"><div data-role="header" class="k-header"><a href="\\#" class="k-header-cancel k-scheduler-cancel k-link" title="'+f+'"aria-label="'+f+'"><span class="k-icon k-i-arrow-chevron-left"></span></a>'+v+'<a href="\\#" class="k-header-done k-scheduler-update k-link" title="'+p+'" aria-label="'+p+'"><span class="k-icon k-i-check"></span></a></div>',i=this.fields(T.mobile,t),n=this,a=[],c+=this._buildEditTemplate(t,i,a,!0),c+="</div>",o=d.append(c),!t.isNew()&&this.options.editable&&this.options.editable.destroy!==!1&&t.isRecurrenceHead()&&t.recurrenceException&&(r='<ul class="k-edit-buttons k-listgroup k-listgroup-flush"><li class="k-item k-listgroup-item"><span class="k-scheduler-resetSeries k-link k-label" aria-label="'+m+'">'+m+"</span></li></ul>",o.contentElement.append(r)),!t.isNew()&&this.options.editable&&this.options.editable.destroy!==!1&&(s='<ul class="k-edit-buttons k-listgroup k-listgroup-flush"><li class="k-item k-listgroup-item"><span class="k-scheduler-delete k-link k-label" aria-label="'+h+'">'+h+"</span></li></ul>",o.contentElement.append(s)),this._editPane=o,l=this.container=o.element,this.editable=l.kendoEditable({fields:a,model:t,clearContainer:!1,target:n.options.target,validateOnBlur:!0}).data("kendoEditable"),this.trigger("edit",{container:l,model:t})?this.trigger("cancel",{container:l,model:t}):(l.on(te+ee,"a.k-scheduler-edit, a.k-scheduler-cancel, a.k-scheduler-update, span.k-scheduler-delete, span.k-scheduler-resetSeries",function(i){var a,o;i.preventDefault(),i.stopPropagation(),a=e(this),a.hasClass("k-scheduler-edit")?d.navigate(this._editPane,n.options.animations.right):(o="cancel",a.hasClass("k-scheduler-update")?o="save":a.hasClass("k-scheduler-delete")?o="remove":a.hasClass("k-scheduler-resetSeries")&&(o=pe),n.trigger(o,{container:l,model:t}))}),d.navigate(o,n.options.animations.left),t.bind("change",n.toggleDateValidationHandler)),this.editable},_views:function(){return this.pane.element.find(A.roleSelector("view")).not(this.view.element)},close:function(){var e,t,i,n;if(this.container){for(this.pane.navigate("",this.options.animations.right),e=this._views(),i=0,n=e.length;i<n;i++)t=e.eq(i).data("kendoView"),t&&t.purge();e.remove(),this.container=null,this.editable&&(this.editable.options.model.unbind("change",this.toggleDateValidationHandler),this.editable.destroy(),this.editable=null),
  this.timezoneView=null}}}),x=D.extend({destroy:function(){this.close(),this.unbind()},editEvent:function(t){var i,n,a,o=this,r=o.options.editable,s="<div "+A.attr("uid")+'="'+t.uid+'" class="k-popup-edit-form k-scheduler-edit-form"><div class="k-edit-form-container">',l=o.options.messages,d=l.save,c=l.cancel,u=l.destroy,p=l.resetSeries,h=this.fields(T.desktop,t),f=[];return s+=this._buildEditTemplate(t,h,f,!1),n=$(r)?r.window:{},s+='<div class="k-edit-buttons k-state-default">',s+=this.createButton({name:"update",text:d,attr:i})+this.createButton({name:"canceledit",text:c,attr:i}),!t.isNew()&&r.destroy!==!1&&t.isRecurrenceHead()&&t.recurrenceException&&(s+=this.createButton({name:"resetSeries",text:p,attr:i})),t.isNew()&&!t.isRecurring()||r.destroy===!1||(s+=this.createButton({name:"delete",text:u,attr:i})),s+="</div></div></div>",a=this.container=e(s).appendTo(o.element).eq(0).kendoWindow(X({modal:!0,resizable:!1,draggable:!0,title:l.editor.editorTitle,visible:!1,close:function(e){e.userTriggered&&o.trigger(ce,{container:a,model:t})&&e.preventDefault()}},n)),o.editable=a.kendoEditable({fields:f,model:t,clearContainer:!1,validateOnBlur:!0,target:o.options.target}).data("kendoEditable"),o.trigger(ve,{container:a,model:t})?o.trigger(ce,{container:a,model:t}):(a.data("kendoWindow").center().open(),a.on(te+ee,"button.k-scheduler-cancel",function(e){e.preventDefault(),e.stopPropagation(),o.trigger(ce,{container:a,model:t})}),a.on(te+ee,"button.k-scheduler-update",function(e){e.preventDefault(),e.stopPropagation(),o.trigger("save",{container:a,model:t})}),a.on(te+ee,"button.k-scheduler-delete",function(e){e.preventDefault(),e.stopPropagation(),o.trigger(ue,{container:a,model:t})}),a.on(te+ee,"button.k-scheduler-resetSeries",function(e){e.preventDefault(),e.stopPropagation(),o.trigger(pe,{container:a,model:t})}),A.cycleForm(a),t.bind("change",o.toggleDateValidationHandler)),o.editable},close:function(){var e=this,t=function(){e.editable&&(e.editable.options.model.unbind("change",e.toggleDateValidationHandler),e.editable.destroy(),e.editable=null,e.container=null),e.popup&&(e.popup.destroy(),e.popup=null)};e.editable?(e._timezonePopup&&e._timezonePopup.data("kendoWindow")&&(e._timezonePopup.data("kendoWindow").destroy(),e._timezonePopup=null),e.container.is(":visible")?e.container.data("kendoWindow").bind("deactivate",t).close():t()):t()},_createEndTimezoneButton:function(){var e=this.options.messages,t="";return t+='<div class="k-edit-buttons k-state-default">',t+=this.createButton({name:"savetimezone",text:e.save})+this.createButton({name:"canceltimezone",text:e.cancel}),t+="</div></div></div>"},showDialog:function(t){var i,n,a,o=A.format("<div class='k-popup-edit-form'><div class='k-edit-form-container'><p class='k-popup-message'>{0}</p>",t.text);for(o+='<div class="k-edit-buttons k-state-default">',i=0;i<t.buttons.length;i++)o+=this.createButton(t.buttons[i]);o+="</div></div></div>",n=this.element,this.popup&&this.popup.destroy(),a=this.popup=e(o).appendTo(n).eq(0).on(te,".k-button",function(i){i.preventDefault(),a.close();var n=e(i.currentTarget).index();t.buttons[n].click()}).kendoWindow({modal:!0,resizable:!1,draggable:!1,title:t.title,visible:!1,close:function(){this.destroy(),n.focus()}}).getKendoWindow(),a.center().open()},_initTimezoneEditor:function(e,t){var i,n=this,a=n.container.find(".k-scheduler-timezones"),o=a.find("input.k-timezone-toggle"),r=a.find(".k-edit-label:last").add(a.find(".k-edit-field:last")),s=a.find(".k-scheduler-savetimezone"),l=a.find(".k-scheduler-canceltimezone"),d=n._timezonePopup,c=function(t){if("startTimezone"===t.field){var i=e.startTimezone;o.prop("disabled",!i),i||(r.hide(),e.set("endTimezone",""),o.prop("checked",!1))}};n._startTimezone=e.startTimezone,n._endTimezone=e.endTimezone,d||(n._timezonePopup=d=a.kendoWindow({modal:!0,resizable:!1,draggable:!0,title:n.options.messages.editor.timezoneEditorTitle,visible:!1,close:function(i){e.unbind("change",c),i.userTriggered&&n._revertTimezones(e),t&&t.focus()}}),o.click(function(){r.toggle(o.prop("checked")),e.set("endTimezone","")}),s.click(function(e){e.preventDefault(),i.close()}),l.click(function(t){t.preventDefault(),n._revertTimezones(e),i.close()}),e.bind("change",c)),o.prop("checked",e.endTimezone).prop("disabled",!e.startTimezone),e.endTimezone?r.show():r.hide(),i=d.data("kendoWindow"),i.center().open()}}),E=K.extend({init:function(t,i){var n=this;U.fn.init.call(n,t,i),n.options.views&&n.options.views.length||(n.options.views=["day","week"]),n.resources=[],n._initModel(),n._wrapper(),n._views(),n._toolbar(),n._dataSource(),n._resources(),n._resizeHandler=function(){n.resize()},n.wrapper.on(ie+ee+" selectstart"+ee,function(t){e(t.target).is(":kendoFocusable")||t.preventDefault()}),n.options.editable&&n.options.editable.resize!==!1&&n._resizable(),n._movable(),n._bindResize(),n.options.messages&&n.options.messages.recurrence&&(F.options=n.options.messages.recurrence),n._selectable(),n._touchHandlers(),n._ariaId=A.guid(),n._createEditor()},_bindResize:function(){e(window).on("resize"+ee,this._resizeHandler)},_unbindResize:function(){e(window).off("resize"+ee,this._resizeHandler)},dataItems:function(){var i,n,a,o,r,s=this,l=s.items(),d=s._data,c=e.map(l,function(t){return e(t).attr("data-uid")}),u={},p=c.length;for(i=0;i<p;i++)u[c[i]]=null;for(a=d.length,i=0;i<a;i++)o=d[i],u[o.uid]!==t&&(u[o.uid]=o);r=[];for(n in u)r.push(u[n]);return r},_isMobile:function(){var e=this.options;return e.mobile===!0&&A.support.mobileOS||"phone"===e.mobile||"tablet"===e.mobile},_isTouch:function(e){return/touch/.test(e.type)||e.originalEvent&&/touch/.test(e.originalEvent.pointerType)},_isInverseColor:function(e){return e.hasClass(ke)},_groupsByResource:function(e,t,i,n,a){var o,r,s,l,d,c,u;if(i||(i=[]),o=e[0]){for(s=o.dataSource.view(),l=0,d=0;d<s.length;d++)c=A.getter(o.dataValueField)(s[d]),u=t+l+d,r=this._groupsByResource(e.slice(1),u,i,c,o.field),r[o.field]=c,l=r.groupIndex,a&&n&&(r[a]=n),1===e.length&&(r.groupIndex=t+d,i.push(r));return r}return{}},data:function(){return this._data},select:function(i){var n,a,o,r,s,l,d,c,u,p,h=this,f=h.view(),v=h._selection,m=f.groups;if(i===t)return o=f._selectedSlots,v?(v&&v.events&&(a=h._selectedEvents()),{start:v.start,end:v.end,events:a,slots:o,resources:f._resourceBySlot(v)}):[];if(!i)return h._selection=null,h._old=null,f.clearSelection(),t;if(e.isArray(i)&&(i={events:i.splice(0)}),i.resources){s=[],l=[],f.groupedResources&&h._groupsByResource(f.groupedResources,0,l);for(r in i.resources)s.push({field:r,operator:"eq",value:i.resources[r]});n=new A.data.Query(l).filter(s).toArray()}return i.events&&i.events.length?(h._selectEvents(i.events,n),h._select(),t):(m&&i.start&&i.end&&(d=O(f._startDate),c=A.date.addDays(O(f._endDate),1),i.start<c&&d<=i.end&&(u=n&&n.length?m[n[0].groupIndex]:m[0],u.timeSlotCollectionCount()||(i.isAllDay=!0),p=u.ranges(i.start,i.end,i.isAllDay,!1),p.length&&(h._selection={start:A.timezone.toLocalDate(p[0].start.start),end:A.timezone.toLocalDate(p[p.length-1].end.end),groupIndex:p[0].start.groupIndex,index:p[0].start.index,isAllDay:p[0].start.isDaySlot,events:[]},h._select()))),t)},_selectEvents:function(e,t){var i,n,a,o,r,s,l,d,c=this,u=c.view(),p=u.groups,h=e.length,f=t&&t.length;for(i=0;i<h;i++)if(p&&f){for(n=p[t[0].groupIndex],a=[],o=n.timeSlotCollectionCount(),r=n.daySlotCollectionCount(),s=0;s<o;s++)a=a.concat(n.getTimeSlotCollection(s).events());for(l=0;l<r;l++)a=a.concat(n.getDaySlotCollection(l).events());a=new A.data.Query(a).filter({field:"element[0].getAttribute('data-uid')",operator:"eq",value:e[i]}).toArray(),a[0]&&c._createSelection(a[0].element)}else d=u.element.find(A.format(".k-event[data-uid={0}], .k-task[data-uid={0}]",e[i])),d.length&&c._createSelection(d[0])},_touchHandlers:function(){var t,i,n,a,o,r=this,s=r.wrapper,l=e.proxy(r._touchMove,r);s.on(ne+ee,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",function(e){var n=r.wrapper.find(".k-scheduler-content");r._isTouch(e)&&(n.stop(!0,!1),r._touchPosX=t=r._tapPosition(e,"X"),r._touchPosY=i=r._tapPosition(e,"Y"),r._userTouched=!0,r.view()._scrolling=!1,o=Date.now(),s.on(ae+ee,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",l))}),s.on(oe+ee,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",function(e){var d,c,u;r._isTouch(e)&&(d=Date.now()-o,c=r.wrapper.find(".k-scheduler-content"),u=-r._amplitude*(3e3/d),n=r._tapPosition(e,"X"),a=r._tapPosition(e,"Y"),r._dragging||(r.options.selectable&&(Math.abs(n-t)<=10||Math.abs(a-i)<=10)&&r._mouseDownSelection(e),!A.support.kineticScrollNeeded&&d<200&&Math.abs(n-t)>10&&c.animate({scrollTop:c[0].scrollTop+u}),s.off(ae+ee,".k-scheduler-header-all-day td, .k-scheduler-content td",l)))})},_selectable:function(){var t,i=this,n=i.wrapper;i.options.selectable&&(i._tabindex(),n.on(ie+ee,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",function(e){i._isTouch(e)||i._mouseDownSelection(e)}),t=e.proxy(i._mouseMove,i),n.on(ie+ee,".k-scheduler-header-all-day td, .k-scheduler-content td",function(e){var a=e.which,o=e.button,r=a&&3===a||o&&2==o;i._isTouch(e)||r||n.on(re+ee,".k-scheduler-header-all-day td, .k-scheduler-content td",t)}),n.on("mouseup"+ee+" mousecancel"+ee,function(){n.off(re+ee,".k-scheduler-header-all-day td, .k-scheduler-content td",t)}),n.on("focus"+ee,function(){i._selection||i._userTouched||i._selectFirstSlot(),i._select()}),n.on("focusout"+ee,function(t){i._ctrlKey=i._shiftKey=!1,i.toolbar.find("ul > li").removeClass(me),e(t.relatedTarget).closest(_e).length||i.toolbar.find(_e).removeClass(ge)}),n.on("keydown"+ee,J(i._keydown,i)),n.on("keyup"+ee,function(e){i._ctrlKey=e.ctrlKey,i._shiftKey=e.shiftKey}))},_mouseDownSelection:function(e){var t=e.which,i=e.button,n=t&&3===t||i&&2==i;n||(e.ctrlKey&&(this._ctrlKey=e.ctrlKey),e.shiftKey&&(this._shiftKey=e.shiftKey),this._createSelection(e.currentTarget)),A._activeElement()!==this.wrapper.get(0)?A.focusElement(this.wrapper):this._select(),this.toolbar&&this.toolbar.find("ul > li").removeClass(me)},_selectFirstSlot:function(){this._createSelection(this.wrapper.find(".k-scheduler-content").find("td:first"))},_select:function(){var t,i,n,a,o,r=this,s=r.view(),l=r.wrapper,d=s.current(),c=r._selection,u=r._old?r._old.selection:null,p=r._old?r._old.eventsLength:null;if(c&&(d&&(d.removeAttribute("id"),d.removeAttribute("aria-label"),l.removeAttr("aria-activedescendant")),s.select(c),d=s.current(),d&&(u!==d||c.events&&p!==c.events.length))){if(t=e(d).data("uid"),r._old&&t&&t===e(r._old.selection).data("uid")&&c.events&&r._old.eventsLength===c.events.length)return;n=c,a=r._selectedEvents(),o=s._selectedSlots,a[0]?(n=a[0]||c,i=A.format(r.options.messages.ariaEventLabel,n.title,n.start,n.start)):i=A.format(r.options.messages.ariaSlotLabel,n.start,n.end),d.setAttribute("id",r._ariaId),d.setAttribute("aria-label",i),l.attr("aria-activedescendant",r._ariaId),r._old={selection:d,eventsLength:a.length},r.trigger("change",{start:c.start,end:c.end,events:a,slots:o,resources:s._resourceBySlot(c)})}},_selectedEvents:function(){for(var e,t=this._selection.events,i=t.length,n=0,a=[];n<i;n++)e=this.occurrenceByUid(t[n]),e&&a.push(e);return a},_tapPosition:function(e,t){return/touch/.test(e.type)?(e.originalEvent||e).changedTouches[0]["page"+t]:e["page"+t]},_touchMove:function(e){var t=this,i=t.wrapper.find(".k-scheduler-content"),n=i[0].scrollHeight>i[0].clientHeight,a=i[0].scrollWidth>i[0].clientWidth,o=t._tapPosition(e,"Y"),r=t._tapPosition(e,"X"),s=i[0].scrollTop-Math.round(o-t._touchPosY),l=i[0].scrollLeft-Math.round(r-t._touchPosX),d=n&&Math.abs(o-t._touchPosY)>10,c=a&&Math.abs(o-t._touchPosY)>10;t._dragging||A.support.kineticScrollNeeded||!t._isTouch(e)||(d||c)&&(t._amplitude=Math.round(o-t._touchPosY),t._touchPosY=o,t._touchPosX=r,i.animate({scrollTop:s,scrollLeft:l},0),t.view()._scrolling=!0)},_mouseMove:function(t){var i=this;clearTimeout(i._moveTimer),i._isTouch(t)||(i._moveTimer=setTimeout(function(){var n,a,o,r=i.view(),s=i._selection;s&&(n=r.selectionByElement(e(t.currentTarget)),n&&s.groupIndex===n.groupIndex&&(a=n.startDate(),o=n.endDate(),a>=s.end?s.backward=!1:o<=s.start&&(s.backward=!0),s.backward?s.start=a:s.end=o,i._select()))},5))},_viewByIndex:function(e){var t,i=this.views;for(t in i){if(!e)return t;e--}},_keydown:function(i){var n,a,o,r,s,l=this,d=i.keyCode,c=l.view(),u=c.options.editable,p=l._selection,h=e.extend(p),f=16===d||18===d||17===d||91===d||92===d,v="> .k-button,.k-scheduler-navigation > .k-button,.k-nav-current,.k-views-dropdown.k-scheduler-views > .k-button",m=l.toolbar.find(v),g=l.toolbar.find(_e),_=e(i.target).closest(_e).length||l.toolbar.find(".k-scheduler-views .k-state-focused").length,k=g.children().index(l.toolbar.find("."+me)),b=A.support.isRtl(l.element),w=b?-1:1;if(k==-1&&(k=g.children().index(l.toolbar.find(".k-state-selected"))),l._ctrlKey=i.ctrlKey,l._shiftKey=i.shiftKey,d===N.F10)return l.toolbar.find(".k-button:first").focus().addClass(me),i.preventDefault(),t;if(d===N.TAB){if(l.toolbar.find("."+me).length)return n=m.index(l.toolbar.find("."+me)),n===-1&&l._focusedView&&(n=m.index(l.toolbar.find(".k-scheduler-views > .k-state-selected"))),a=i.shiftKey?m[n-1]:m[n+1],l.toolbar.find("."+me).removeClass(me),a?(e(a).addClass(me).focus(),l._focusedView=null,i.preventDefault(),t):(l.element.focus(),i.preventDefault(),t)}else if(d===N.ENTER||d===N.SPACEBAR){if(_&&l._focusedView&&!l._focusedView.hasClass("k-state-selected"))return o=l._focusedView.data().name,l.trigger("navigate",{view:o,action:"changeView",date:l.date()})||l.view(o),i.preventDefault(),t;if(l.toolbar.find("."+me+":visible").length)return l.toolbar.find("."+me+":visible").click(),i.preventDefault(),t}else if(i.altKey&&d===N.DOWN){if(l.toolbar.find("."+me+":visible").length)return l.toolbar.find("."+me+":visible").click(),i.preventDefault(),t}else{if(d===N.RIGHT&&_)return e(l.toolbar.find("."+me)).removeClass(me),l._focusedView=e(b?k-1===0?g.children(":last"):g.children()[k+1*w]:k+1===g.children().length?g.children(":first"):g.children()[k+1*w]),l._focusedView.focus().addClass(me),i.preventDefault(),t;if(d===N.LEFT&&_)return e(l.toolbar.find("."+me)).removeClass(me),l._focusedView=e(b?k+1===g.children().length?g.children(":first"):g.children()[k-1*w]:k-1===0?g.children(":last"):g.children()[k-1*w]),l._focusedView.focus().addClass(me),i.preventDefault(),t;if(i.altKey&&d===N.DOWN&&l.toolbar.find(".k-nav-current").hasClass(me))return l._showCalendar(),i.preventDefault(),t;if(d===N.ESC&&l.popup&&l.popup.visible())return l.popup.close(),i.preventDefault(),t}if(!f){if(!p)return l._selectFirstSlot(),l._select(),l.element.focus(),t;d===N.TAB?c.moveToEvent(p,i.shiftKey)&&(l._select(),document.activeElement.getAttribute("id")!==l.element.attr("id")&&l.element.focus(),i.preventDefault()):d===N.ENTER||d===N.SPACEBAR?p.events.length&&u?u.update!==!1&&l.editEvent(p.events[0]):u&&u.create!==!1&&(p.isAllDay&&(p=e.extend({},p,{end:A.date.addDays(p.end,-1)})),i.preventDefault(),l.addEvent(X({},p,c._resourceBySlot(p)))):d===N.DELETE&&u!==!1&&u.destroy!==!1?l.removeEvent(p.events[0]):d>=49&&d<=57?(r=l._viewByIndex(d-49),r&&!l.trigger("navigate",{view:r,action:"changeView",date:l.date()})&&l.view(r)):c.move(p,d,i.shiftKey)&&(c.inRange(p)?l._select():(s=l.date().getTime()>p.start.getTime()?"previous":"next",l.trigger("navigate",{view:l._selectedViewName,action:s,date:p.start})?(p.start=h.start,p.end=h.end):l.date(p.start)),l.toolbar.find("ul > li").removeClass(me),i.preventDefault()),l._adjustSelectedDate()}},_createSelection:function(t){var i,n,a=this._selection;t=e(t),t.is(".k-event")&&(i=t.attr(A.attr("uid")),a&&a.events.indexOf(i)!==-1&&!this._ctrlKey)||(a&&(this._ctrlKey||this._shiftKey)||(a=this._selection={events:[],groupIndex:0}),n=this.view().selectionByElement(t),n&&(a.groupIndex=n.groupIndex||0),i&&(n=d(this._data,i)),n&&n.uid&&(i=[n.uid]),this._updateSelection(n,i),this._adjustSelectedDate())},_updateSelection:function(e,i,n){var a,o,r,s=this._selection;e&&s&&(a=this.view(),e.uid&&(e=a._updateEventForSelection(e)),this._shiftKey&&s.start&&s.end?(o=e.end<s.end,s.end=e.endDate?e.endDate():e.end,o&&a._timeSlotInterval&&A.date.setTime(s.end,-a._timeSlotInterval())):(s.start=e.startDate?e.startDate():e.start,s.end=e.endDate?e.endDate():e.end),s.isAllDay="isDaySlot"in e?e.isDaySlot:e.isAllDay,null!==n&&n!==t&&(s.groupIndex=n),s.index=e.index,this._ctrlKey?(r=i&&i.length?s.events.indexOf(i[0]):-1,r>-1?s.events.splice(r,1):s.events=s.events.concat(i||[])):s.events=i||[])},options:{name:"Scheduler",date:we,editable:!0,autoBind:!0,snap:!0,mobile:!1,timezone:"",allDaySlot:!0,min:new Date(1900,0,1),max:new Date(2099,11,31),toolbar:null,workWeekStart:1,workWeekEnd:5,workDays:null,showWorkHours:!1,startTime:we,endTime:we,currentTimeMarker:{updateInterval:1e4,useLocalTimezone:!0},footer:{},messages:{today:"Today",pdf:"Export to PDF",save:"Save",cancel:"Cancel",destroy:"Delete",resetSeries:"Reset Series",deleteWindowTitle:"Delete event",next:"Next",previous:"Previous",ariaSlotLabel:"Selected from {0:t} to {1:t}",ariaEventLabel:"{0} on {1:D} at {2:t}",views:{day:"Day",week:"Week",workWeek:"Work Week",agenda:"Agenda",month:"Month",timeline:"Timeline",timelineWeek:"Timeline Week",timelineWorkWeek:"Timeline Work Week",timelineMonth:"Timeline Month"},recurrenceMessages:{deleteWindowTitle:"Delete Recurring Item",resetSeriesWindowTitle:"Reset Series",deleteWindowOccurrence:"Delete current occurrence",deleteWindowSeries:"Delete the series",editWindowTitle:"Edit Recurring Item",editWindowOccurrence:"Edit current occurrence",editWindowSeries:"Edit the series"},editable:{confirmation:De},editor:{title:"Title",start:"Start",end:"End",allDayEvent:"All day event",description:"Description",repeat:"Repeat",timezone:"Timezone",startTimezone:"Start timezone",endTimezone:"End timezone",separateTimezones:"Use separate start and end time zones",timezoneEditorTitle:"Timezones",timezoneEditorButton:"Time zone",timezoneTitle:"Time zones",noTimezone:"No timezone",editorTitle:"Event"}},height:null,width:null,resources:[],group:{resources:[],orientation:"horizontal"},views:[],selectable:!1},events:[ue,ve,ce,he,"add","dataBinding","dataBound","moveStart","move","moveEnd","resizeStart","resize","resizeEnd","navigate","change"],destroy:function(){var t,i,n,a=this;if(U.fn.destroy.call(a),a.dataSource&&(a.dataSource.unbind(se,a._refreshHandler),a.dataSource.unbind(le,a._progressHandler),a.dataSource.unbind(de,a._errorHandler)),a._resourceRefreshHandler)for(i=0;i<a.resources.length;i++)n=a.resources[i].dataSource,n.unbind(se,a._resourceRefreshHandler),n.unbind(le,a._resourceProgressHandler),n.unbind(de,a._resourceErrorHandler);a.calendar&&(a.calendar.destroy(),a.popup.destroy()),a.view()&&a.view().destroy(),a._editor&&a._editor.destroy(),this._moveDraggable&&this._moveDraggable.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),t=a.element.add(a.wrapper).add(a.toolbar).add(a.popup),t.off(ee),clearTimeout(a._moveTimer),a._model=null,a.toolbar=null,a.element=null,e(window).off("resize"+ee,a._resizeHandler),A.destroy(a.wrapper)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch?e.fetch():G(e)&&this.view(this._selectedView)},items:function(){var e=this.wrapper.find(".k-scheduler-content"),t=this.view();return t&&"agenda"===t.options.name?e.find(".k-task"):e.find(".k-event").add(this.wrapper.find(".k-scheduler-header-wrap").find(".k-scheduler-header-all-day").siblings())},_movable:function(){var i,n,a,o,r,s,l,d,c,u,p=this,h=0,f=[],v=[],m=p._isMobile(),g=p.options.editable&&p.options.editable.move!==!1,_=p.options.editable&&p.options.editable.resize!==!1;(g||_&&m)&&(p._dragging=!1,m&&A.support.mobileOS.android&&(h=5),p._moveDraggable=new A.ui.Draggable(p.element,{distance:h,filter:".k-event",ignore:".k-resize-handle",holdToDrag:m,autoScroll:!0}),g&&p._moveDraggable.bind("dragstart",function(e){var r,h,v,m,g=p.view(),_=e.currentTarget,k=p._isTouch(e);if(p._dragging=!0,!g.options.editable||g.options.editable.move===!1)return p._dragging=!1,e.preventDefault(),t;if(k&&!_.hasClass("k-event-active"))return p._dragging=!1,p.element.find(".k-event-active").removeClass("k-event-active"),e.preventDefault(),t;if(s=p.occurrenceByUid(_.attr(A.attr("uid"))),l=s.clone(),u=s.clone(),l.update(g._eventOptionsForMove(l)),l.inverseColor=p._isInverseColor(_),f=[],p._selection)for(r=p._selection.events,h=0;h<r.length;h++)v=p.occurrenceByUid(r[h]).clone(),m=this.element.find('div.k-event[data-uid="'+v.uid+'"]').eq(0),v.update(g._eventOptionsForMove(v)),m.length&&(v.inverseColor=p._isInverseColor(m)),f.push(v);else f.push(l);i=g._slotByPosition(e.x.startLocation,e.y.startLocation),a=g._resourceBySlot(i),c=o=i.startOffset(e.x.startLocation,e.y.startLocation,p.options.snap),n=i,d=i,i&&!p.trigger("moveStart",{event:s})||e.preventDefault()}).bind("drag",function(t){var a,u,h,m,g,_=p.view(),k=_._slotByPosition(t.x.location,t.y.location);if(k){if(r=k.startOffset(t.x.location,t.y.location,p.options.snap),k.isDaySlot!==i.isDaySlot)if(k.isDaySlot!==d.isDaySlot)for(m=e(i.element).index(),g=e(k.element).parent().children().eq(m),i=_._slotByPosition(g.offset().left,g.offset().top),o=i.startOffset(t.x.location,t.y.location,!0),v=f.map(function(e){return e.clone()}),h=0;h<f.length;h++)f[h].isAllDay!=k.isDaySlot&&(f[h].isAllDay=k.isDaySlot,f[h].end=A.date.getDate(f[h].start),f[h].start=A.date.getDate(f[h].start),k.isDaySlot||(A.date.setTime(f[h].start,A.date.getMilliseconds(_.startTime())),A.date.setTime(f[h].end,A.date.getMilliseconds(_.startTime())+_._timeSlotInterval())));else i=e.extend(!0,{},d),o=c,f=v;for(a=r-o,h=0;h<f.length;h++)_._updateMoveHint(f[h],k.groupIndex,a);if(u=y(l,a),p.trigger("move",{event:s,slot:{element:k.element,start:k.startDate(),end:k.endDate(),isDaySlot:k.isDaySlot},resources:_._resourceBySlot(k),start:u.start,end:u.end}))for(h=0;h<f.length;h++)_._updateMoveHint(f[h],k.groupIndex,a);else n=k}}).bind("dragend",function(t){var i,c,u,h,m,g,_,k,b,w;if(p.view()._removeMoveHint(),i=r-o,c=y(l,i),u=c.start,h=c.end,p._dragging=!1,m=p.view()._resourceBySlot(n),g=p.trigger("moveEnd",{event:s,slot:{element:n.element,start:n.startDate(),end:n.endDate()},start:u,end:h,resources:m}),!g&&(s.start.getTime()!==u.getTime()||s.end.getTime()!==h.getTime()||d.isDaySlot!==n.isDaySlot||A.stringify(m)!==A.stringify(a))){for(p._isMultiDrag=f.length>1,_=0;_<f.length;_++)k=f[_],c=y(k,i),b=p.view()._eventOptionsForMove(k),w=e.extend({isAllDay:k.isAllDay,start:c.start,end:c.end},b,m),p._updateEvent(null,k,w);p._isMultiDrag&&(p.dataSource.sync(),p._isMultiDrag=!1)}t.currentTarget.removeClass("k-event-active"),this.cancelHold(),f=[],v=[]}).bind("dragcancel",function(){p.view()._removeMoveHint(),this.cancelHold(),f=[],v=[]}),p._moveDraggable.bind("hold",function(e){p._isTouch(e)&&(p.element.find(".k-event-active").removeClass("k-event-active"),p.options.selectable&&p._createSelection(e.currentTarget),e.currentTarget.addClass("k-event-active"))}))},_resizable:function(){function t(e){var t,i={"k-resize-e":"east","k-resize-w":"west","k-resize-n":"north","k-resize-s":"south"};for(t in i)if(e.hasClass(t))return i[t]}var i,n,a,o,r,s=this,l=0;s._isMobile()&&A.support.mobileOS.android&&(l=5),s._resizeDraggable=new A.ui.Draggable(s.element,{distance:l,filter:".k-resize-handle",autoScroll:!0,dragstart:function(t){var l=e(t.currentTarget),d=l.closest(".k-event"),c=d.attr(A.attr("uid")),u=s.view();s._dragging=!0,a=s.occurrenceByUid(c),o=a.clone(),u._updateEventForResize(o),r=u._slotByPosition(t.x.startLocation,t.y.startLocation),s.trigger("resizeStart",{event:a})&&t.preventDefault(),i=A.date.toUtcTime(o.start),n=A.date.toUtcTime(o.end)},drag:function(l){var d,c,u,p,h,f;r&&(d=e(l.currentTarget),c=t(d),u=s.view(),p=u._slotByPosition(l.x.location,l.y.location),p&&r.groupIndex==p.groupIndex&&(r=p,h=i,f=n,"south"==c?!r.isDaySlot&&r.end-A.date.toUtcTime(o.start)>=u._timeSlotInterval()&&(n=o.isAllDay?r.startOffset(l.x.location,l.y.location,s.options.snap):r.endOffset(l.x.location,l.y.location,s.options.snap)):"north"==c?!r.isDaySlot&&A.date.toUtcTime(o.end)-r.start>=u._timeSlotInterval()&&(i=r.startOffset(l.x.location,l.y.location,s.options.snap)):"east"==c?r.isDaySlot&&A.date.toUtcTime(A.date.getDate(r.endDate()))>=A.date.toUtcTime(A.date.getDate(o.start))?n=o.isAllDay?r.startOffset(l.x.location,l.y.location,s.options.snap):r.endOffset(l.x.location,l.y.location,s.options.snap):!r.isDaySlot&&r.end-A.date.toUtcTime(o.start)>=u._timeSlotInterval()&&(n=r.endOffset(l.x.location,l.y.location,s.options.snap)):"west"==c&&(r.isDaySlot&&A.date.toUtcTime(A.date.getDate(o.end))>=A.date.toUtcTime(A.date.getDate(r.startDate()))?i=r.startOffset(l.x.location,l.y.location,s.options.snap):!r.isDaySlot&&A.date.toUtcTime(o.end)-r.start>=u._timeSlotInterval()&&(i=r.startOffset(l.x.location,l.y.location,s.options.snap))),s.trigger("resize",{event:a,slot:{element:r.element,start:r.startDate(),end:r.endDate()},start:A.timezone.toLocalDate(i),end:A.timezone.toLocalDate(n),resources:u._resourceBySlot(r)})?(i=h,n=f):u._updateResizeHint(o,r.groupIndex,i,n)))},dragend:function(l){var d,c=e(l.currentTarget),u=new Date(o.start.getTime()),p=new Date(o.end.getTime()),h=t(c);s._dragging=!1,s.view()._removeResizeHint(),"south"==h?p=A.timezone.toLocalDate(n):"north"==h?u=A.timezone.toLocalDate(i):"east"==h?p=r.isDaySlot?A.date.getDate(A.timezone.toLocalDate(n)):A.timezone.toLocalDate(n):"west"==h&&(r.isDaySlot?(u=new Date(A.timezone.toLocalDate(i)),u.setHours(0),u.setMinutes(0)):u=A.timezone.toLocalDate(i)),d=s.trigger("resizeEnd",{event:a,slot:{element:r.element,start:r.startDate(),end:r.endDate()},start:u,end:p,resources:s.view()._resourceBySlot(r)}),!d&&p.getTime()>=u.getTime()&&(o.start.getTime()==u.getTime()&&o.end.getTime()==p.getTime()||(s.view()._updateEventForResize(a),s._updateEvent(h,a,{start:u,end:p}))),r=null,a=null},dragcancel:function(){s._dragging=!1,s.view()._removeResizeHint(),r=null,a=null}})},_updateEvent:function(e,t,i){var n,a=this,o=function(e,t){try{a._preventRefresh=!0,e.update(i),a._convertDates(e)}finally{a._preventRefresh=!1}a.trigger(he,{event:e})||(t&&t(),a._isMultiDrag||a.dataSource.sync())},r=function(e){return e.recurrenceRule?a.dataSource.getByUid(e.uid):a.dataSource.get(e.recurrenceId)},s=function(){var n,s,l=r(t);"south"!=e&&"north"!=e||(i.start&&(n=A.date.getDate(l.start),A.date.setTime(n,W(i.start)),i.start=n),i.end&&(s=A.date.getDate(l.end),A.date.setTime(s,W(i.end)),i.end=s)),a.dataSource._removeExceptions(l),o(l)},l=function(){var e=r(t),i=function(){a._convertDates(e),a._selection&&a._selection.events.push(s)},n=e.toOccurrence({start:t.start,end:t.end}),s=n.uid;o(a.dataSource.add(n),i)};t.recurrenceRule||t.isOccurrence()?(n=a.options.messages.recurrenceMessages,a._showRecurringDialog(t,l,s,{title:n.editWindowTitle,text:n.editRecurring?n.editRecurring:xe,occurrenceText:n.editWindowOccurrence,seriesText:n.editWindowSeries})):o(a.dataSource.getByUid(t.uid))},_modelForContainer:function(t){return t=e(t).closest("["+A.attr("uid")+"]"),this.dataSource.getByUid(t.attr(A.attr("uid")))},showDialog:function(e){this._editor.showDialog(e)},focus:function(){this.wrapper.focus()},_confirmation:function(e,t,i){var n,a,o,r,s,l=this.options.editable;l===!0||l.confirmation!==!1?(n=this.options.messages,a=n.deleteWindowTitle,o=typeof l.confirmation===q?l.confirmation:n.editable.confirmation,this._isEditorOpened()&&t.isRecurring()&&(r=this.options.messages.recurrenceMessages,a=r.deleteWindowTitle,o=t.isException()||t.isNew()?r.deleteRecurringConfirmation?r.deleteRecurringConfirmation:Ee:r.deleteSeriesConfirmation?r.deleteSeriesConfirmation:Ce,i&&(a=r.resetSeriesWindowTitle,o=r.resetSeriesConfirmation?r.resetSeriesConfirmation:Re)),s=[{name:"destroy",text:i?n.resetSeries:n.destroy,click:function(){e()}}],this._isMobile()&&A.Pane||s.push({name:"canceledit",text:n.cancel,click:function(){e(!0)}}),this._unbindResize(),this.showDialog({model:t,text:o,title:a,buttons:s}),this._bindResize()):e()},addEvent:function(e){var t,i,n=this._editor.editable,a=this.dataSource;e=e||{},i=this.trigger("add",{event:e}),!i&&(n&&n.end()||!n)&&(this.cancelEvent(),e&&e.toJSON&&(e=e.toJSON()),t=a.add(e),t&&(this.cancelEvent(),this._editEvent(t)))},saveEvent:function(){var e,t,i,n,a,o,r=this,s=r._editor,l=r.dataSource;if(s&&(e=s.editable,t=s.container,i=r._modelForContainer(t),t&&e&&e.end()&&!r.trigger(he,{container:t,event:i}))){if(!i.isOccurrence()&&i.recurrenceException&&!i.recurrenceRule){for(n=l.data(),a=n.length-1;a>=0;a-=1)o=n[a],o&&o.recurrenceId===i.id&&l.remove(o);i.set("recurrenceException","")}i.dirty||i.isOccurrence()||r._convertDates(i,"remove"),l.sync()}},cancelEvent:function(){var e,t=this._editor,i=t.container;i&&(e=this._modelForContainer(i),e&&e.isOccurrence()&&(this._convertDates(e,"remove"),this._convertDates(this.dataSource.get(e.recurrenceId),"remove")),this.dataSource.cancelChanges(e),t.close())},editEvent:function(e){var t="string"==typeof e?this.occurrenceByUid(e):e;t&&(this.cancelEvent(),t.isRecurring()?this._editRecurringDialog(t):this._editEvent(t))},_editEvent:function(e){this._preventRefresh=!0,this._unbindResize(),this._createPopupEditor(e),this._bindResize()},_editRecurringDialog:function(e){var t=this,i=function(){e.isException()?t._editEvent(e):t.addEvent(e)},n=function(){e.recurrenceId&&(e=t.dataSource.get(e.recurrenceId)),t._editEvent(e)},a=t.options.messages.recurrenceMessages;t._showRecurringDialog(e,i,n,{title:a.editWindowTitle,text:a.editRecurring?a.editRecurring:xe,occurrenceText:a.editWindowOccurrence,seriesText:a.editWindowSeries})},_showRecurringDialog:function(e,t,i,n){var a=this.options.editable,o=$(a)?a.editRecurringMode:"dialog";"occurrence"===o||this._isMultiDrag?t():"series"===o?i():(this._unbindResize(),this.showDialog({model:e,title:n.title,text:n.text,buttons:[{text:n.occurrenceText,click:t},{text:n.seriesText,click:i}]}),this._bindResize())},_createButton:function(e){var t=e.template||Pe,i=typeof e===q?e:e.name||e.text,n={className:"k-scheduler-"+(i||"").replace(/\s/g,""),text:i,attr:""};if(!(i||$(e)&&e.template))throw Error("Custom commands should have name specified");return $(e)?(e.className&&(e.className+=" "+n.className),"edit"===i&&$(e.text)&&(e=X(!0,{},e),e.text=e.text.edit),n=X(!0,n,z[i],e)):n=X(!0,n,z[i]),A.template(t)(n)},_convertDates:function(e,t){var i=this.dataSource.reader.timezone,n=e.startTimezone,a=e.endTimezone,o=e.start,r=e.start;t=t||"apply",n=n||a,a=a||n,n&&(i?"apply"===t?(o=A.timezone.convert(e.start,i,n),r=A.timezone.convert(e.end,i,a)):(o=A.timezone.convert(e.start,n,i),r=A.timezone.convert(e.end,a,i)):(o=A.timezone[t](e.start,n),r=A.timezone[t](e.end,a)),e._set("start",o),e._set("end",r))},_createEditor:function(){var e,i=this;e=i._editor=this._isMobile()&&A.Pane?new S(this.wrapper,X({},this.options,{target:this,timezone:i.dataSource.reader.timezone,resources:i.resources,createButton:J(this._createButton,this)})):new x(this.wrapper,X({},this.options,{target:this,createButton:J(this._createButton,this),timezone:i.dataSource.reader.timezone,resources:i.resources})),e.bind("cancel",function(e){return i.trigger("cancel",{container:e.container,event:e.model})?(e.preventDefault(),t):(i._preventRefresh=!1,i.cancelEvent(),i._attemptRefresh&&i.refresh(),i.focus(),t)}),e.bind("edit",function(e){i.trigger(ve,{container:e.container,event:e.model})&&e.preventDefault()}),e.bind("save",function(){i._preventRefresh=!1,i.saveEvent()}),e.bind("remove",function(e){i._preventRefresh=!1,i.removeEvent(e.model)}),e.bind("resetSeries",function(e){i._confirmation(function(t){i._preventRefresh=!1,t||(i.dataSource._removeExceptions(e.model),i.saveEvent())},e.model,!0)})},_createPopupEditor:function(e){var t=this._editor;e.isNew()&&!e.isOccurrence()||(e.isOccurrence()&&this._convertDates(e.recurrenceId?this.dataSource.get(e.recurrenceId):e),this._convertDates(e)),this.editable=t.editEvent(e)},removeEvent:function(e){var t=this,i="string"==typeof e?t.occurrenceByUid(e):e;i&&(i.isRecurring()?t._deleteRecurringDialog(i):t._confirmation(function(e){
  e||t._removeEvent(i)},i))},occurrenceByUid:function(e){var t=this.dataSource.getByUid(e);return t||(t=d(this._data,e)),t},occurrencesInRange:function(e,t){return new A.data.Query(this._data).filter({logic:"or",filters:[{logic:"and",filters:[{field:"start",operator:"gte",value:e},{field:"end",operator:"gte",value:e},{field:"start",operator:"lt",value:t}]},{logic:"and",filters:[{field:"start",operator:"lte",value:e},{field:"end",operator:"gt",value:e}]}]}).toArray()},_removeEvent:function(e){this.trigger(ue,{event:e})||this.dataSource.remove(e)&&this.dataSource.sync()},_deleteRecurringDialog:function(e){var t,i,n,a,o,r,s,l=this,d=e,c=l.options.editable,u=$(c)?c.editRecurringMode:"dialog",p=function(){var e=d.recurrenceId?d:d.toOccurrence(),t=l.dataSource.get(e.recurrenceId);l._convertDates(t),l._removeEvent(e)},h=function(){d.recurrenceId&&(d=l.dataSource.get(d.recurrenceId)),l._removeEvent(d)},f=function(){l.dataSource.remove(d),l.dataSource.sync()};("dialog"!=u||l._isEditorOpened())&&(t=function(){l._confirmation(function(e){e||p()},d)},i=function(){l._confirmation(function(e){e||h()},d)},n=function(){l._confirmation(function(e){e||f()},d)}),a=i||h,o=t||p,r=n||f,l._isEditorOpened()?e.isException()?o():e.isNew()?r():a():(s=l.options.messages.recurrenceMessages,l._showRecurringDialog(e,o,a,{title:s.deleteWindowTitle,text:s.deleteRecurring?s.deleteRecurring:Se,occurrenceText:s.deleteWindowOccurrence,seriesText:s.deleteWindowSeries}))},_isEditorOpened:function(){return!!this._editor.container},_unbindView:function(e){var t=this;t.angular("cleanup",function(){return{elements:t.items()}}),e.destroy()},_bindView:function(e){var t=this;t.options.editable&&(t._viewRemoveHandler&&e.unbind(ue,t._viewRemoveHandler),t._viewRemoveHandler=function(e){t.removeEvent(e.uid)},e.bind(ue,t._viewRemoveHandler),t._viewAddHandler&&e.unbind(fe,t._viewAddHandler),t._viewAddHandler=function(e){t.addEvent(e.eventInfo)},e.bind(fe,this._viewAddHandler),t._viewEditHandler&&e.unbind(ve,t._viewEditHandler),t._viewEditHandler=function(e){t.editEvent(e.uid)},e.bind(ve,this._viewEditHandler)),t._viewNavigateHandler&&e.unbind("navigate",t._viewNavigateHandler),t._viewNavigateHandler=function(e){var i,n;e.view&&(i="isWorkDay"in e,n=i?"changeWorkDay":"changeView",t.trigger("navigate",{view:e.view,isWorkDay:e.isWorkDay,action:n,date:e.date})||(i&&(t._workDayMode=e.isWorkDay),t._selectView(e.view),t.date(e.date)))},e.bind("navigate",t._viewNavigateHandler),t._viewActivateHandler&&e.unbind("activate",t._viewActivateHandler),t._viewActivateHandler=function(){var e=this;t._selection&&(e.constrainSelection(t._selection),t._select(),t._adjustSelectedDate())},e.bind("activate",t._viewActivateHandler)},_selectView:function(e){var t,i,n,a=this;e&&a.views[e]&&(a._selectedView&&a._unbindView(a._selectedView),a._selectedView=a._renderView(e),a._selectedViewName=e,a._viewsCount>1&&!a._isMobile()?(t=a.toolbar.find(".k-views-dropdown"),i=a.toolbar.find(".k-scheduler-views > .k-button"),0===a.toolbar.find(".k-views-dropdown").length&&(a.toolbar.find(".k-scheduler-views-wrapper").prepend(Me({views:a.views,view:e,ns:A.ns})),t=a.toolbar.find(".k-views-dropdown")),t.val(e),i.removeClass("k-state-selected"),i.filter(".k-view-"+e.replace(/\./g,"\\.").toLowerCase()).addClass("k-state-selected")):(n=a.toolbar.find(".k-scheduler-mobile-views"),n.find("[value="+e.replace(/\./g,"\\.")+"]").prop("selected","selected")))},view:function(e){var i=this;return e?(i._selectView(e),i.rebind(),t):i._selectedView},viewName:function(){return this.view().name},_renderView:function(e){var t=this._initializeView(e);return this._bindView(t),(A.support.mouseAndTouchPresent||A.support.pointers)&&(t.content.css("-ms-touch-action","pinch-zoom"),t.content.css("touch-action","pinch-zoom")),this._model.set("formattedDate",t.dateForTitle()),this._model.set("formattedShortDate",t.shortDateForTitle()),this._model.set("formattedMobileDate",t.mobileDateForTitle?t.mobileDateForTitle():t.shortDateForTitle()),this._model.set("formattedYear",A.format("{0:yyyy}",t.startDate())),t},resize:function(e){var t=this.getSize(),i=this._size,n=this.view();n&&n.groups&&(!e&&i&&t.width===i.width&&t.height===i.height||(this.refresh({action:"resize"}),this._size=t))},_adjustSelectedDate:function(){var e=this._model.selectedDate,t=this._selection,i=t.start;i&&!A.date.isInDateRange(e,O(i),O(t.end))&&e.setFullYear(i.getFullYear(),i.getMonth(),i.getDate())},_initializeView:function(e){var t,i,n,a=this.views[e];if(a){if(t=$(a),i={},n=a.type,typeof n===q&&(n=A.getter(a.type)(window)),t&&a.workDays&&a.workDays.length&&(i.workDays=a.workDays),!n)throw Error("There is no such view");a=new n(this.wrapper,v(X(!0,{},this.options,t?a:{},{resources:this.resources,date:this.date(),startTime:A.parseDate(a.startTime)||A.parseDate(this.options.startTime),endTime:A.parseDate(a.endTime)||A.parseDate(this.options.endTime),showWorkHours:this._workDayMode}),i))}return a},_views:function(){var e,t,i,n,a,o,r,s,l,d=this.options.views;for(this.views={},this._viewsCount=0,r=0,s=d.length;r<s;r++)l=!1,e=d[r],n=$(e),n?(o=a=e.type?e.type:e,typeof o!==q&&(a=e.name||e.title,l=!0)):o=a=e,t=R[a],t&&!l&&(e.type=t.type,t.title=this.options.messages.views[a],"day"===t.type?t.messages={allDay:this.options.messages.allDay}:"agenda"===t.type&&(t.messages={event:this.options.messages.event,date:this.options.messages.date,time:this.options.messages.time})),e=X({title:a},t,n?e:{}),a&&(this.views[a]=e,this._viewsCount++,i&&!e.selected||(i=a));i&&(this._selectedViewName=i)},rebind:function(){this.dataSource.fetch()},_dataSource:function(){var e=this,t=e.options,i=t.dataSource;i=G(i)?{data:i}:i,!t.timezone||i instanceof Ye?i instanceof Ye&&(t.timezone=i.options.schema?i.options.schema.timezone:""):i=X(!0,i,{schema:{timezone:t.timezone}}),e.dataSource&&e._refreshHandler?e.dataSource.unbind(se,e._refreshHandler).unbind(le,e._progressHandler).unbind(de,e._errorHandler):(e._refreshHandler=J(e.refresh,e),e._progressHandler=J(e._requestStart,e),e._errorHandler=J(e._error,e)),e.dataSource=A.data.SchedulerDataSource.create(i).bind(se,e._refreshHandler).bind(le,e._progressHandler).bind(de,e._errorHandler),e.options.dataSource=e.dataSource},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_progress:function(e){var t=this.element.find(".k-scheduler-content");A.ui.progress(t,e)},_resources:function(){var t,i,n,a,o,r=this,s=r.options.resources,l=[];for(t=0;t<s.length;t++){if(i=s[t],n=i.field,a=i.name||n,o=i.dataSource,!n||!o)throw Error('The "field" and "dataSource" options of the scheduler resource are mandatory.');r.resources.push({field:n,name:a,title:i.title||n,dataTextField:i.dataTextField||"text",dataValueField:i.dataValueField||"value",dataColorField:i.dataColorField||"color",valuePrimitive:null==i.valuePrimitive||i.valuePrimitive,multiple:i.multiple||!1,dataSource:r._resourceDataSource(o,a,l)})}r.options.autoBind?e.when.apply(null,l).then(function(){r.view(r._selectedViewName)}):r._selectView(r._selectedViewName)},_resourceDataSource:function(e,t,i){var n=this,a=G(e)?{data:e}:e,o=A.data.DataSource.create(a);return n.options.autoBind?i.push(o.fetch(function(){n._bindResourceEvents(this,t)})):n._bindResourceEvents(o,t),o},_bindResourceEvents:function(e,t){var i=this,n=i.options.group&&i.options.group.resources.length,a=n&&i.options.group.resources.indexOf(t)>-1;!i._resourceRefreshHandler&&a&&(i._resourceRefreshHandler=J(i._refreshResource,i),i._resourceErrorHandler=J(i._error,i)),a&&e.bind(se,i._resourceRefreshHandler).bind(de,i._resourceErrorHandler)},_refreshResource:function(){var e=this,t=e._editor.editable||e._preventRefresh;t||e.view(e._selectedViewName)},_initModel:function(){var e=this;e._model=A.observable({selectedDate:new Date(this.options.date),formattedDate:"",formattedShortDate:""}),e._model.bind("change",function(t){"selectedDate"===t.field&&e.view(e._selectedViewName)})},_wrapper:function(){var e=this,t=e.options,i=t.height,n=t.width;e.wrapper=e.element.addClass("k-widget k-scheduler k-floatwrap").attr("role","grid").attr("aria-multiselectable",!0),e._isMobile()&&e.wrapper.addClass("k-scheduler-mobile"),i&&e.wrapper.height(i),n&&e.wrapper.width(n)},date:function(e){return null!=e&&O(e)>=O(this.options.min)&&O(e)<=O(this.options.max)&&this._model.set("selectedDate",e),O(this._model.get("selectedDate"))},_toolbar:function(){var t,i,n=this,a=n.options,o=[];a.toolbar&&(o=e.isArray(a.toolbar)?a.toolbar:[a.toolbar]),t=this._isMobile()?Ve:Ie,i=e(t({messages:a.messages,pdf:e.grep(o,function(e){return"pdf"==e||"pdf"==e.name}).length>0,search:e.grep(o,function(e){return"search"==e||"search"==e.name}).length>0,ns:A.ns,view:n._selectedViewName,views:n.views,viewsCount:n._viewsCount,editable:n.options.editable})),n.wrapper.append(i),n.toolbar=i,A.bind(n.toolbar,n._model),i.on(te+ee,".k-pdf",function(e){e.preventDefault(),n.saveAsPDF()}),i.on("input"+ee,".k-scheduler-search-input",A.throttle(function(e){n.dataSource.filter({logic:"or",filters:[{field:"title",operator:"contains",value:e.target.value},{field:"description",operator:"contains",value:e.target.value}]})},250)),i.on(te+ee,".k-create-event",function(e){e.preventDefault(),n.addEvent()}),i.on(te+ee,".k-nav-calendar",function(e){e.preventDefault(),n._showCalendar(e.target)}),i.on(te+ee,".k-scheduler-navigation > .k-button",function(t){var i,a=e(this),o=new Date(n.date()),r="",s=new Date,l=n.options.timezone;e(t.target).is("input")||(t.preventDefault(),a.hasClass("k-nav-today")?(r="today",l?(i=A.timezone.offset(s,l),o=A.timezone.convert(s,s.getTimezoneOffset(),i)):o=s):a.hasClass("k-nav-next")?(r="next",o=n.view().nextDate()):a.hasClass("k-nav-prev")&&(r="previous",o=n.view().previousDate()),n.trigger("navigate",{view:n._selectedViewName,action:r,date:o})||n.date(o))}),i.on(te+ee,".k-nav-current",function(e){e.preventDefault(),n._isMobile()||n._showCalendar()}),i.on(te+ee,".k-scheduler-views > .k-button, .k-scheduler-refresh",function(t){t.preventDefault();var i=e(this).attr(A.attr("name"));n.trigger("navigate",{view:i,action:"changeView",date:n.date()})||n.view(i)}),i.on(se+ee,".k-views-dropdown",function(){var e=this.value;n.trigger("navigate",{view:e,action:"changeView",date:n.date()})||n.view(e)}),i.find(".k-scheduler-mobile-views").on("change",function(e){n.view(e.target.value)})},_showCalendar:function(t){var i=this,n=t||i.toolbar.find(".k-nav-current"),a=e('<div class="k-calendar-container"><div class="k-scheduler-calendar"></div></div>');i.popup||(i.popup=new Y(a,{anchor:n,activate:function(){i.popup&&i.calendar&&(i.popup._toggleResize(!1),i.calendar.element.find("table").focus(),i.popup._toggleResize(!0))},open:function(){i.calendar||(i.calendar=new j(this.element.find(".k-scheduler-calendar"),{change:function(){var e=this.value();i.trigger("navigate",{view:i._selectedViewName,action:"changeDate",date:e})||(i.date(e),i.popup.close()),i._isMobile||(i._selectedView.element.focus(),i.toolbar.find(".k-nav-current").focus().addClass(me))},min:i.options.min,max:i.options.max})),i.calendar.element.on("keydown"+ee,function(e){e.keyCode!==N.ESC&&e.keyCode!==N.TAB||(i.popup.close(),i._selectedView.element.focus(),i.toolbar.find(".k-nav-current").focus().addClass(me))}),i.calendar.value(i.date())},copyAnchorStyles:!1})),i.popup.open()},refresh:function(e){var i=this,n=this.view(),a=e&&"itemchange"===e.action&&(this._editor.editable||this._preventRefresh)||"signalr"===this.dataSource.options.type&&this._preventRefresh;if(this._progress(!1),this.angular("cleanup",function(){return{elements:i.items()}}),e=e||{},n)return a?(this._attemptRefresh="signalr"===this.dataSource.options.type,t):(this.trigger("dataBinding",{action:e.action||"rebind",index:e.index,items:e.items})||(e&&"resize"===e.action||!this._editor||this._editor.close(),this._data=this.dataSource.expand(n.startDate(),n.visibleEndDate()),n.refreshLayout(),n.render(this._data),this.trigger("dataBound"),this._attemptRefresh=!1),t)},slotByPosition:function(e,t){var i,n=this.view();return n._slotByPosition?(i=n._slotByPosition(e,t),i?{startDate:i.startDate(),endDate:i.endDate(),groupIndex:i.groupIndex,element:i.element,isDaySlot:i.isDaySlot}:null):null},slotByElement:function(t){var i=e(t).offset();return this.slotByPosition(i.left,i.top)},resourcesBySlot:function(e){return this.view()._resourceBySlot(e)}}),R={day:{type:"kendo.ui.DayView"},week:{type:"kendo.ui.WeekView"},workWeek:{type:"kendo.ui.WorkWeekView"},agenda:{type:"kendo.ui.AgendaView"},month:{type:"kendo.ui.MonthView"},timeline:{type:"kendo.ui.TimelineView"},timelineWeek:{type:"kendo.ui.TimelineWeekView"},timelineWorkWeek:{type:"kendo.ui.TimelineWorkWeekView"},timelineMonth:{type:"kendo.ui.TimelineMonthView"}},L.plugin(E),A.PDFMixin&&(A.PDFMixin.extend(E.prototype),C="k-scheduler-pdf-export",E.fn._drawPDF=function(t){var i,n,a,o=this.wrapper,r=o[0].style.cssText;return o.css({width:o.width(),height:o.height()}),o.addClass(C),i=this,n=new e.Deferred,a=o.find(".k-scheduler-content").find("table").css("table-layout","auto"),setTimeout(function(){a.css("table-layout","fixed"),i.resize(!0),i._drawPDFShadow({},{avoidLinks:i.options.pdf.avoidLinks}).done(function(e){var i={page:e,pageNumber:1,progress:1,totalPages:1};t.notify(i),n.resolve(i.page)}).fail(function(e){n.reject(e)}).always(function(){o[0].style.cssText=r,o.removeClass(C),i.resize(!0),i.resize(!0)})}),n}),P=U.extend({init:function(e,t){var i=this,n=A.timezone.windows_zones;if(!n||!A.timezone.zones_titles)throw Error("kendo.timezones.min.js is not included.");U.fn.init.call(i,e,t),i.wrapper=i.element,i._zonesQuery=new A.data.Query(n),i._zoneTitleId=A.guid(),i._zoneTitlePicker(),i._zonePicker(),i._zoneTitle.bind("cascade",function(){this.value()||i._zone.wrapper.hide()}),i._zone.bind("cascade",function(){i._value=this.value(),i.trigger("change")}),i.value(i.options.value)},options:{name:"TimezoneEditor",value:"",optionLabel:"No timezone"},events:["change"],_zoneTitlePicker:function(){var t=this,i=e('<input id="'+t._zoneTitleId+'" aria-label="'+t.options.title+'"/>').appendTo(t.wrapper);t._zoneTitle=new A.ui.DropDownList(i,{dataSource:A.timezone.zones_titles,dataValueField:"other_zone",dataTextField:"name",optionLabel:t.options.optionLabel})},_zonePicker:function(){var t=this,i=e('<input aria-label="'+t.options.title+'"/>').appendTo(this.wrapper);t._zone=new A.ui.DropDownList(i,{dataValueField:"zone",dataTextField:"territory",dataSource:t._zonesQuery.data,cascadeFrom:t._zoneTitleId,dataBound:function(){t._value=this.value(),this.wrapper.toggle(this.dataSource.view().length>1)}}),t._zone.wrapper.hide()},destroy:function(){U.fn.destroy.call(this),A.destroy(this.wrapper)},value:function(e){var i,n=this;return e===t?n._value:(i=n._zonesQuery.filter({field:"zone",operator:"eq",value:e}).data[0],i?(n._zoneTitle.value(i.other_zone),n._zone.value(i.zone)):n._zoneTitle.select(0),t)}}),L.plugin(P),M=A.template('<option value="#=other_zone#">#=name#</option>'),I=A.template('<option value="#=zone#">#=territory#</option>'),V=U.extend({init:function(e,t){var i=this,n=A.timezone.windows_zones;if(!n||!A.timezone.zones_titles)throw Error("kendo.timezones.min.js is not included.");U.fn.init.call(i,e,t),i.wrapper=i.element,i._zonesQuery=new A.data.Query(n),i._zoneTitlePicker(),i._zonePicker(),i.value(i.options.value)},options:{name:"MobileTimezoneEditor",optionLabel:"No timezone",value:""},events:["change"],_bindZones:function(e){var t=e?this._filter(e):[];this._zone.html(this._options(t,I))},_filter:function(e){return this._zonesQuery.filter({field:"other_zone",operator:"eq",value:e}).data},_options:function(e,t,i){var n=0,a="",o=e.length;for(i&&(a+=t({other_zone:"",name:i}));n<o;n++)a+=t(e[n]);return a},_zoneTitlePicker:function(){var t=this,i=t._options(A.timezone.zones_titles,M,t.options.optionLabel);t._zoneTitle=e("<select>"+i+"</select>").appendTo(t.wrapper).change(function(){var e=this.value,i=t._zonePickerLabel,n=i.find("select");t._bindZones(e),e&&n.children().length>1?i.show():i.hide(),t._value=t._zone[0].value,t.trigger("change")})},_zonePicker:function(){var t=this;t._zonePickerLabel=e("<li class='k-item k-listgroup-item k-zonepicker' style='display:none'><label class='k-label k-listgroup-form-row'><span class='k-item-title k-listgroup-form-field-label'></span><div class='k-listgroup-form-field-wrapper'></div></label></li>"),t._zone=e("<select></select>").appendTo(t._zonePickerLabel.find("div")).change(function(){t._value=this.value,t.trigger("change")}),this.wrapper.closest(".k-item").after(t._zonePickerLabel),t._bindZones(t._zoneTitle.val()),t._value=t._zone[0].value},destroy:function(){U.fn.destroy.call(this),A.destroy(this.wrapper)},value:function(e){var i,n=this,a=n._zone,o="",r="";return e===t?n._value:(i=n._zonesQuery.filter({field:"zone",operator:"eq",value:e}).data[0],i&&(r=i.zone,o=i.other_zone),n._zoneTitle.val(o),n._bindZones(o),a.val(r),r=a[0].value,r&&a.children.length>1?n._zonePickerLabel.show():n._zonePickerLabel.hide(),n._value=r,t)}}),L.plugin(V)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()});
  //# sourceMappingURL=kendo.scheduler.min.js.map
  