File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/js/calendar/util/dist/util.bundle.min.js
Back
this.BX=this.BX||{};(function(t,e,a,r,i,n){"use strict";let s=t=>t,o;class c{static parseTime(t){let e=c.parseDate1(BX.date.format(c.getDateFormat(),new Date)+" "+t,false);return e?{h:e.getHours(),m:e.getMinutes()}:e}static getTimeRounded(t){return Math.round(t.getTime()/6e4)*6e4}static parseDate(t,e,a,r){return BX.parseDate(t,e,a,r)}static parseDate1(t,a,r){let i,n,s,o;if(!a)a=e.Loc.getMessage("FORMAT_DATETIME");t=BX.util.trim(t);if(r!==false)a=a.replace(":SS","");if(BX.type.isNotEmptyString(t)){o="";for(i=1;i<=12;i++){o=o+"|"+e.Loc.getMessage("MON_"+i)}let r=new RegExp("([0-9]+|[a-z]+"+o+")","ig"),c=t.match(r),l=e.Loc.getMessage("FORMAT_DATE").match(/(DD|MI|MMMM|MM|M|YYYY)/gi),u=[],g=[],m={};if(!c){return null}if(c.length>l.length){l=a.match(/(DD|MI|MMMM|MM|M|YYYY|HH|H|SS|TT|T|GG|G)/gi)}for(i=0,n=c.length;i<n;i++){if(BX.util.trim(c[i])!==""){u[u.length]=c[i]}}for(i=0,n=l.length;i<n;i++){if(BX.util.trim(l[i])!=""){g[g.length]=l[i]}}let d=BX.util.array_search("MMMM",g);if(d>0){u[d]=BX.getNumMonth(u[d]);g[d]="MM"}else{d=BX.util.array_search("M",g);if(d>0){u[d]=BX.getNumMonth(u[d]);g[d]="MM"}}for(i=0,n=g.length;i<n;i++){s=g[i].toUpperCase();m[s]=s=="T"||s=="TT"?u[i]:parseInt(u[i],10)}if(m["DD"]>0&&m["MM"]>0&&m["YYYY"]>0){let t=new Date;{t.setDate(1);t.setFullYear(m["YYYY"]);t.setMonth(m["MM"]-1);t.setDate(m["DD"]);t.setHours(0,0,0)}if((!isNaN(m["HH"])||!isNaN(m["GG"])||!isNaN(m["H"])||!isNaN(m["G"]))&&!isNaN(m["MI"])){if(!isNaN(m["H"])||!isNaN(m["G"])){let t=(m["T"]||m["TT"]||"am").toUpperCase()=="PM";let e=parseInt(m["H"]||m["G"]||0,10);if(t){m["HH"]=e+(e==12?0:12)}else{m["HH"]=e<12?e:0}}else{m["HH"]=parseInt(m["HH"]||m["GG"]||0,10)}if(isNaN(m["SS"]))m["SS"]=0;{t.setHours(m["HH"],m["MI"],m["SS"])}}return t}}return null}static formatTime(t,a){let r;if(e.Type.isDate(t)){r=t}else{r=new Date;r.setHours(t,a,0)}return BX.date.format(c.getTimeFormatShort(),r.getTime()/1e3)}static formatDate(t){if(e.Type.isDate(t)){t=t.getTime()}return BX.date.format(c.getDateFormat(),t/1e3)}static formatDateTime(t){if(e.Type.isDate(t)){t=t.getTime()}return BX.date.format(c.getDateTimeFormat(),t/1e3)}static formatTimeInterval(t,e){const r=a.DateTimeFormat.format(c.getTimeFormatShort(),t.getTime()/1e3);const i=a.DateTimeFormat.format(c.getTimeFormatShort(),e.getTime()/1e3);return`${r} - ${i}`}static formatDateUsable(t,a=true,r=false){const i=e.Loc.getMessage("LANGUAGE_ID");let n=c.getDateFormat();if(i==="ru"||i==="ua"){n=r?"l, j F":"j F";if(t.getFullYear&&t.getFullYear()!==(new Date).getFullYear()&&a!==false){n+=" Y"}}return BX.date.format([["today","today"],["tommorow","tommorow"],["yesterday","yesterday"],["",n]],t)}static getDayLength(){if(!c.DAY_LENGTH){c.DAY_LENGTH=864e5}return c.DAY_LENGTH}static getDefaultColorList(){return["#86b100","#0092cc","#00afc7","#e89b06","#00b38c","#de2b24","#bd7ac9","#838fa0","#c3612c","#e97090"]}static findTargetNode(t,e){let a=false;if(t){let r="data-bx-calendar",i;if(t.attributes&&t.attributes.length){for(i=0;i<t.attributes.length;i++){if(t.attributes[i].name&&t.attributes[i].name.substr(0,r.length)===r){a=t;break}}}if(!a){a=BX.findParent(t,(function(t){let e;if(t.attributes&&t.attributes.length){for(e=0;e<t.attributes.length;e++){if(t.attributes[e].name&&t.attributes[e].name.substr(0,r.length)===r)return true}}return false}),e)}}return a}static getFollowedUserList(t){return[]}static getWeekDayByInd(t){return["SU","MO","TU","WE","TH","FR","SA"][t]}static getIndByWeekDay(t){return new Object({SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6})[t]}static getWeekdaysLoc(){const t=new Date;const e=[];const r=24*60*60*1e3;for(let i=0;i<7;i++){const n=a.DateTimeFormat.format("D",new Date(t.getTime()+r*i));e[(t.getDay()+i)%7]=n}return e}static getLoader(t,a){return e.Tag.render(o||(o=s` <div class="${0}"> <svg class="calendar-loader-circular" style="width:${0}px; height:${0}px;" viewBox="25 25 50 50"> <circle class="calendar-loader-path" cx="50" cy="50" r="20" fill="none" stroke-miterlimit="10"/> <circle class="calendar-loader-inner-path" cx="50" cy="50" r="20" fill="none" stroke-miterlimit="10"/> </svg> </div> `),a||"calendar-loader",parseInt(t),parseInt(t))}static getDayCode(t){return t.getFullYear()+"-"+("0"+~~(t.getMonth()+1)).substr(-2,2)+"-"+("0"+~~t.getDate()).substr(-2,2)}static getTextColor(t){if(!t){return false}if(t.charAt(0)==="#"){t=t.substring(1,7)}let e=parseInt(t.substring(0,2),16),a=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16),i=(e*.8+a+r*.2)/510*100;return i<50}static getKeyCode(t){if(!e.Type.isString(t)){return false}let a={backspace:8,enter:13,escape:27,space:32,delete:46,left:37,right:39,up:38,down:40,z:90,y:89,shift:16,ctrl:17,alt:18,cmd:91,cmdRight:93,pageUp:33,pageDown:34,d:68,w:87,m:77,a:65};return a[t.toLowerCase()]}static isAnyModifierKeyPressed(t=window.event){if(t){return t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}return null}static getUsableDateTime(t,a){if(e.Type.isDate(t)){t=t.getTime()}let r=(a||10)*60*1e3;t=Math.ceil(t/r)*r;return new Date(t)}static showNotification(t,a=null){if(e.Type.isString(t)&&t!==""){BX.UI.Notification.Center.notify({content:t,actions:a})}}static showFieldError(t,a,r){if(e.Type.isDomNode(a)&&e.Type.isString(t)&&t!==""){e.Dom.remove(a.querySelector(".ui-alert"));let r=new BX.UI.Alert({color:BX.UI.Alert.Color.DANGER,icon:BX.UI.Alert.Icon.DANGER,text:t});let i=r.getContainer();a.appendChild(i);return i}}static getDateFormat(){if(!c.DATE_FORMAT){c.DATE_FORMAT=BX.Main.Date.convertBitrixFormat(e.Loc.getMessage("FORMAT_DATE"))}return c.DATE_FORMAT}static setDayOfWeekMonthFormat(t){c.dayOfWeekMonthFormat=t}static getDayOfWeekMonthFormat(){return c.dayOfWeekMonthFormat||"l, j F"}static setDayMonthFormat(t){c.dayMonthFormat=t}static getDayMonthFormat(){return c.dayMonthFormat||"j F"}static setLongDateFormat(t){c.longDateFormat=t}static getLongDateFormat(){return c.longDateFormat||"j F Y"}static getDateTimeFormat(){if(!c.DATETIME_FORMAT){c.DATETIME_FORMAT=BX.Main.Date.convertBitrixFormat(e.Loc.getMessage("FORMAT_DATETIME"))}return c.DATETIME_FORMAT}static getTimeFormat(){if(!c.TIME_FORMAT){if(e.Loc.getMessage("FORMAT_DATETIME").substr(0,e.Loc.getMessage("FORMAT_DATE").length)===e.Loc.getMessage("FORMAT_DATE")){c.TIME_FORMAT=BX.util.trim(c.getDateTimeFormat().substr(c.getDateFormat().length));c.TIME_FORMAT_BX=BX.util.trim(e.Loc.getMessage("FORMAT_DATETIME").substr(e.Loc.getMessage("FORMAT_DATE").length))}else{c.TIME_FORMAT_BX=BX.isAmPmMode()?"H:MI:SS T":"HH:MI:SS";c.TIME_FORMAT=BX.date.convertBitrixFormat(BX.isAmPmMode()?"H:MI:SS T":"HH:MI:SS")}}return c.TIME_FORMAT}static getTimeFormatShort(){if(!c.TIME_FORMAT_SHORT){c.TIME_FORMAT_SHORT=c.getTimeFormat().replace(":s","");c.TIME_FORMAT_SHORT_BX=c.TIME_FORMAT_BX.replace(":SS","")}return c.TIME_FORMAT_SHORT}static getCurrentUserId(){if(!c.currentUserId){c.currentUserId=parseInt(e.Loc.getMessage("USER_ID"))}return c.currentUserId}static getTimeByInt(t){t=parseInt(t);let e=Math.floor(t/60);return{hour:e,min:t-e*60}}static preventSelection(t){t.ondrag=BX.False;t.ondragstart=BX.False;t.onselectstart=BX.False}static getBX(){return window.top.BX||window.BX}static closeAllPopups(){if(i.PopupManager.isAnyPopupShown()){for(let t=0,e=i.PopupManager._popups.length;t<e;t++){if(i.PopupManager._popups[t]&&i.PopupManager._popups[t].isShown()){i.PopupManager._popups[t].close()}}}}static sendAnalyticLabel(t){BX.ajax.runAction("calendar.api.calendarajax.sendAnalyticsLabel",{analyticsLabel:t})}static setOptions(t,e){c.config=t;c.additionalParams=e}static setUserSettings(t){c.userSettings=t}static getUserSettings(){return e.Type.isObjectLike(c.userSettings)?c.userSettings:{}}static setCalendarContext(t){c.calendarContext=t}static getCalendarContext(){return c.calendarContext||null}static getMeetingStatusList(){return["Y","N","Q","H"]}static checkEmailLimitationPopup(){const t=c.getEventWithEmailGuestAmount();const e=c.getEventWithEmailGuestLimit();return e>0&&(t===8||t===4||t>=e)}static isEventWithEmailGuestAllowed(){return c.getEventWithEmailGuestLimit()===-1||c.getEventWithEmailGuestAmount()<c.getEventWithEmailGuestLimit()}static setEventWithEmailGuestAmount(t){c.countEventWithEmailGuestAmount=t}static setEventWithEmailGuestLimit(t){c.eventWithEmailGuestLimit=t}static getEventWithEmailGuestAmount(){return c.countEventWithEmailGuestAmount}static getEventWithEmailGuestLimit(){return c.eventWithEmailGuestLimit}static setCurrentView(t=null){c.currentCalendarView=t}static getCurrentView(){return c.currentCalendarView||null}static adjustDateForTimezoneOffset(t,a=0,r=false){if(!e.Type.isDate(t))throw new Error("Wrong type for date attribute. DateTime object expected.");if(!parseInt(a)||r===true)return t;return new Date(t.getTime()-parseInt(a)*1e3)}static getFormattedTimezone(t){const e=this.getTimeZoneOffset(t);if(e===0){return"(UTC) "+t}const a=e>0?"-":"+";const r=("0"+Math.floor(Math.abs(e)/60)).slice(-2);const i=("0"+Math.abs(e)%60).slice(-2);return"(UTC "+a+r+":"+i+") "+t}static getTimezoneDateFromTimestampUTC(t,e){return new Date(t+this.getTimeZoneOffset()*60*1e3-this.getTimeZoneOffset(e)*60*1e3)}static getTimeZoneOffset(t=undefined){const e=new Date((new Date).toLocaleString("en-US",{timeZone:t})).getTime();const a=new Date((new Date).toLocaleString("en-US",{timeZone:"UTC"})).getTime();return parseInt((a-e)/6e4)}static randomInt(t,e){return Math.round(t-.5+Math.random()*(e-t+1))}static getRandomColor(){const t=c.getDefaultColorList();return t[c.randomInt(0,t.length-1)]}static setAccessNames(t={}){c.accessNames={};for(let e in t){if(t.hasOwnProperty(e)){c.setAccessName(e,t[e])}}}static getAccessName(t){return c.accessNames[t]||t}static setAccessName(t,e){c.accessNames[t]=e}static getRandomInt(t=6){return Math.round(Math.random()*Math.pow(10,t))}static displayError(t,a){if(e.Type.isArray(t)){let e="";for(let a=0;a<t.length;a++){e+=t[a].message+"\n"}t=e}setTimeout((()=>{alert(t||"[Bitrix Calendar] Request error");if(a){location.reload()}}),200)}static convertEntityToAccessCode(t){if(e.Type.isObjectLike(t)){if(t.entityId==="meta-user"&&t.id==="all-users"){return"UA"}else if(t.entityId==="user"){return"U"+t.id}else if(t.entityId==="project"){return"SG"+t.id+"_K"}else if(t.entityId==="department"){return"DR"+t.id}else if(t.entityId==="group"){return t.id}}}static extendPlannerWatches({entries:t,userId:e}){t.forEach((t=>{if(t.type==="user"&&parseInt(t.id)!==parseInt(e)){const e=c.PLANNER_PULL_TAG.replace("#USER_ID#",t.id);if(!c.PLANNER_WATCH_LIST.includes(e)){n.PULL.extendWatch(e);c.PLANNER_WATCH_LIST.push(e)}}}))}static clearPlannerWatches(){c.PLANNER_WATCH_LIST.forEach((t=>{n.PULL.clearWatch(t)}));c.PLANNER_WATCH_LIST=[]}static registerRequestId(){const t=BX.Calendar.Util.getRandomInt(8);c.REQUEST_ID_LIST.push(t);return t}static unregisterRequestId(t){c.REQUEST_ID_LIST=c.REQUEST_ID_LIST.filter((e=>e!==t))}static checkRequestId(t){t=parseInt(t);return!e.Type.isInteger(t)||!c.REQUEST_ID_LIST.includes(t)}static initHintNode(t){var a;const r=c.getBX();if(e.Type.isElementNode(t)&&r!=null&&(a=r.UI)!=null&&a.Hint){var i,n;if(r!=null&&(i=r.UI)!=null&&(n=i.Hint)!=null&&n.popup){r.UI.Hint.popup.destroy();r.UI.Hint.popup=null;r.UI.Hint.content=null}r.UI.Hint.initNode(t)}}static documentIsDisplayingNow(){return!document.hidden}static removeHash(){if("pushState"in history){history.pushState("",document.title,window.location.pathname+window.location.search)}else{let t=document.body.scrollTop;let e=document.body.scrollLeft;window.location.hash="";document.body.scrollTop=t;document.body.scrollLeft=e}}static setIphoneConnectionStatus(t){c.iphoneConnectionStatus=t}static isIphoneConnected(){return c.iphoneConnectionStatus}static setMacConnectionStatus(t){c.macConnectionStatus=t}static isMacConnected(){return c.macConnectionStatus}static setIcloudConnectionStatus(t){c.icloudConnectionStatus=t}static isIcloudConnected(){return c.icloudConnectionStatus}static setGoogleConnectionStatus(t){c.googleConnectionStatus=t}static isGoogleConnected(){return c.googleConnectionStatus}static setIsSharingFeatureEnabled(t){c.isSharingFeatureEnabled=t}static checkSharingFeatureEnabled(){return c.isSharingFeatureEnabled}static setSharingConfig(t){c.sharingConfig=t}static getSharingConfig(){return c.sharingConfig}static downloadIcsFile(t,e){const a=document.createElement("a");a.href="data:text/calendar,"+encodeURI(t);a.download=e;a.click()}static isMobileBrowser(){return navigator.userAgent.toLowerCase().includes("iphone")||navigator.userAgent.toLowerCase().includes("ipad")||navigator.userAgent.toLowerCase().includes("android")}}c.PLANNER_PULL_TAG="calendar-planner-#USER_ID#";c.PLANNER_WATCH_LIST=[];c.REQUEST_ID_LIST=[];c.accessNames={};t.Util=c})(this.BX.Calendar=this.BX.Calendar||{},BX,BX.Main,BX,BX.Main,BX); //# sourceMappingURL=util.bundle.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.23 |
proxy
|
phpinfo
|
Settings